const kL = Vue.getCurrentScope
const VL = Vue.onScopeDispose
const BL = Vue.unref
const og = Vue.watch
const bb = Vue.computed
const Tb = Vue.ref
const zL = Vue.getCurrentInstance
const Db = Vue.onMounted
const GL = Vue.defineComponent
const FL = Vue.onUnmounted
const HL = Vue.openBlock
const WL = Vue.createElementBlock
const $L = Vue.createElementVNode
function Cb(r) {
  return kL() ? (VL(r), !0) : !1;
}
function Ab(r) {
  return typeof r == "function" ? r() : BL(r);
}
const UL = typeof window < "u", YL = () => {
};
function mp(r) {
  var e;
  const t = Ab(r);
  return (e = t == null ? void 0 : t.$el) != null ? e : t;
}
const Mb = UL ? window : void 0;
function ZL(...r) {
  let e, t, a, n;
  if (typeof r[0] == "string" || Array.isArray(r[0]) ? ([t, a, n] = r, e = Mb) : [e, t, a, n] = r, !e)
    return YL;
  Array.isArray(t) || (t = [t]), Array.isArray(a) || (a = [a]);
  const i = [], o = () => {
    i.forEach((f) => f()), i.length = 0;
  }, s = (f, h, v, c) => (f.addEventListener(h, v, c), () => f.removeEventListener(h, v, c)), l = og(
    () => [mp(e), Ab(n)],
    ([f, h]) => {
      o(), f && i.push(
        ...t.flatMap((v) => a.map((c) => s(f, v, c, h)))
      );
    },
    { immediate: !0, flush: "post" }
  ), u = () => {
    l(), o();
  };
  return Cb(u), u;
}
function XL() {
  const r = Tb(!1);
  return zL() && Db(() => {
    r.value = !0;
  }), r;
}
function qL(r) {
  const e = XL();
  return bb(() => (e.value, !!r()));
}
var gm = Object.getOwnPropertySymbols, KL = Object.prototype.hasOwnProperty, jL = Object.prototype.propertyIsEnumerable, QL = (r, e) => {
  var t = {};
  for (var a in r)
    KL.call(r, a) && e.indexOf(a) < 0 && (t[a] = r[a]);
  if (r != null && gm)
    for (var a of gm(r))
      e.indexOf(a) < 0 && jL.call(r, a) && (t[a] = r[a]);
  return t;
};
function JL(r, e, t = {}) {
  const a = t, { window: n = Mb } = a, i = QL(a, ["window"]);
  let o;
  const s = qL(() => n && "ResizeObserver" in n), l = () => {
    o && (o.disconnect(), o = void 0);
  }, u = bb(
    () => Array.isArray(r) ? r.map((v) => mp(v)) : [mp(r)]
  ), f = og(
    u,
    (v) => {
      if (l(), s.value && n) {
        o = new ResizeObserver(e);
        for (const c of v)
          c && o.observe(c, i);
      }
    },
    { immediate: !0, flush: "post", deep: !0 }
  ), h = () => {
    l(), f();
  };
  return Cb(h), {
    isSupported: s,
    stop: h
  };
}
/*! *****************************************************************************
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 _p = function(r, e) {
  return _p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, a) {
    t.__proto__ = a;
  } || function(t, a) {
    for (var n in a)
      Object.prototype.hasOwnProperty.call(a, n) && (t[n] = a[n]);
  }, _p(r, e);
};
function N(r, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  _p(r, e);
  function t() {
    this.constructor = r;
  }
  r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
}
var t2 = function() {
  function r() {
    this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  }
  return r;
}(), e2 = function() {
  function r() {
    this.browser = new t2(), 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 r;
}(), Rn = new e2();
typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (Rn.wxa = !0, Rn.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? Rn.worker = !0 : typeof navigator > "u" ? (Rn.node = !0, Rn.svgSupported = !0) : r2(navigator.userAgent, Rn);
function r2(r, e) {
  var t = e.browser, a = r.match(/Firefox\/([\d.]+)/), n = r.match(/MSIE\s([\d.]+)/) || r.match(/Trident\/.+?rv:(([\d.]+))/), i = r.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(r);
  a && (t.firefox = !0, t.version = a[1]), n && (t.ie = !0, t.version = n[1]), i && (t.edge = !0, t.version = i[1], t.newEdge = +i[1].split(".")[0] > 18), o && (t.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !t.ie && !t.edge, e.pointerEventsSupported = "onpointerdown" in window && (t.edge || t.ie && +t.version >= 11), e.domSupported = typeof document < "u";
  var s = document.documentElement.style;
  e.transform3dSupported = (t.ie && "transition" in s || t.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || t.ie && +t.version >= 9;
}
const wt = Rn;
var sg = 12, Ib = "sans-serif", Xa = sg + "px " + Ib, a2 = 20, n2 = 100, i2 = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
function o2(r) {
  var e = {};
  if (typeof JSON > "u")
    return e;
  for (var t = 0; t < r.length; t++) {
    var a = String.fromCharCode(t + 32), n = (r.charCodeAt(t) - a2) / n2;
    e[a] = n;
  }
  return e;
}
var s2 = o2(i2), qa = {
  createCanvas: function() {
    return typeof document < "u" && document.createElement("canvas");
  },
  measureText: function() {
    var r, e;
    return function(t, a) {
      if (!r) {
        var n = qa.createCanvas();
        r = n && n.getContext("2d");
      }
      if (r)
        return e !== a && (e = r.font = a || Xa), r.measureText(t);
      t = t || "", a = a || Xa;
      var i = /(\d+)px/.exec(a), o = i && +i[1] || sg, s = 0;
      if (a.indexOf("mono") >= 0)
        s = o * t.length;
      else
        for (var l = 0; l < t.length; l++) {
          var u = s2[t[l]];
          s += u == null ? o : u * o;
        }
      return { width: s };
    };
  }(),
  loadImage: function(r, e, t) {
    var a = new Image();
    return a.onload = e, a.onerror = t, a.src = r, a;
  }
}, Lb = $r([
  "Function",
  "RegExp",
  "Date",
  "Error",
  "CanvasGradient",
  "CanvasPattern",
  "Image",
  "Canvas"
], function(r, e) {
  return r["[object " + e + "]"] = !0, r;
}, {}), Eb = $r([
  "Int8",
  "Uint8",
  "Uint8Clamped",
  "Int16",
  "Uint16",
  "Int32",
  "Uint32",
  "Float32",
  "Float64"
], function(r, e) {
  return r["[object " + e + "Array]"] = !0, r;
}, {}), _o = Object.prototype.toString, nh = Array.prototype, l2 = nh.forEach, u2 = nh.filter, lg = nh.slice, f2 = nh.map, ym = function() {
}.constructor, Rl = ym ? ym.prototype : null, ug = "__proto__", h2 = 2311;
function Pb() {
  return h2++;
}
function Sr() {
  for (var r = [], e = 0; e < arguments.length; e++)
    r[e] = arguments[e];
  typeof console < "u" && console.error.apply(console, r);
}
function rt(r) {
  if (r == null || typeof r != "object")
    return r;
  var e = r, t = _o.call(r);
  if (t === "[object Array]") {
    if (!Ds(r)) {
      e = [];
      for (var a = 0, n = r.length; a < n; a++)
        e[a] = rt(r[a]);
    }
  } else if (Eb[t]) {
    if (!Ds(r)) {
      var i = r.constructor;
      if (i.from)
        e = i.from(r);
      else {
        e = new i(r.length);
        for (var a = 0, n = r.length; a < n; a++)
          e[a] = r[a];
      }
    }
  } else if (!Lb[t] && !Ds(r) && !so(r)) {
    e = {};
    for (var o in r)
      r.hasOwnProperty(o) && o !== ug && (e[o] = rt(r[o]));
  }
  return e;
}
function ft(r, e, t) {
  if (!j(e) || !j(r))
    return t ? rt(e) : r;
  for (var a in e)
    if (e.hasOwnProperty(a) && a !== ug) {
      var n = r[a], i = e[a];
      j(i) && j(n) && !z(i) && !z(n) && !so(i) && !so(n) && !mm(i) && !mm(n) && !Ds(i) && !Ds(n) ? ft(n, i, t) : (t || !(a in r)) && (r[a] = rt(e[a]));
    }
  return r;
}
function fg(r, e) {
  for (var t = r[0], a = 1, n = r.length; a < n; a++)
    t = ft(t, r[a], e);
  return t;
}
function V(r, e) {
  if (Object.assign)
    Object.assign(r, e);
  else
    for (var t in e)
      e.hasOwnProperty(t) && t !== ug && (r[t] = e[t]);
  return r;
}
function tt(r, e, t) {
  for (var a = _t(e), n = 0; n < a.length; n++) {
    var i = a[n];
    (t ? e[i] != null : r[i] == null) && (r[i] = e[i]);
  }
  return r;
}
function ct(r, e) {
  if (r) {
    if (r.indexOf)
      return r.indexOf(e);
    for (var t = 0, a = r.length; t < a; t++)
      if (r[t] === e)
        return t;
  }
  return -1;
}
function v2(r, e) {
  var t = r.prototype;
  function a() {
  }
  a.prototype = e.prototype, r.prototype = new a();
  for (var n in t)
    t.hasOwnProperty(n) && (r.prototype[n] = t[n]);
  r.prototype.constructor = r, r.superClass = e;
}
function te(r, e, t) {
  if (r = "prototype" in r ? r.prototype : r, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
    for (var a = Object.getOwnPropertyNames(e), n = 0; n < a.length; n++) {
      var i = a[n];
      i !== "constructor" && (t ? e[i] != null : r[i] == null) && (r[i] = e[i]);
    }
  else
    tt(r, e, t);
}
function Se(r) {
  return !r || typeof r == "string" ? !1 : typeof r.length == "number";
}
function C(r, e, t) {
  if (r && e)
    if (r.forEach && r.forEach === l2)
      r.forEach(e, t);
    else if (r.length === +r.length)
      for (var a = 0, n = r.length; a < n; a++)
        e.call(t, r[a], a, r);
    else
      for (var i in r)
        r.hasOwnProperty(i) && e.call(t, r[i], i, r);
}
function G(r, e, t) {
  if (!r)
    return [];
  if (!e)
    return hg(r);
  if (r.map && r.map === f2)
    return r.map(e, t);
  for (var a = [], n = 0, i = r.length; n < i; n++)
    a.push(e.call(t, r[n], n, r));
  return a;
}
function $r(r, e, t, a) {
  if (r && e) {
    for (var n = 0, i = r.length; n < i; n++)
      t = e.call(a, t, r[n], n, r);
    return t;
  }
}
function Et(r, e, t) {
  if (!r)
    return [];
  if (!e)
    return hg(r);
  if (r.filter && r.filter === u2)
    return r.filter(e, t);
  for (var a = [], n = 0, i = r.length; n < i; n++)
    e.call(t, r[n], n, r) && a.push(r[n]);
  return a;
}
function c2(r, e, t) {
  if (r && e) {
    for (var a = 0, n = r.length; a < n; a++)
      if (e.call(t, r[a], a, r))
        return r[a];
  }
}
function _t(r) {
  if (!r)
    return [];
  if (Object.keys)
    return Object.keys(r);
  var e = [];
  for (var t in r)
    r.hasOwnProperty(t) && e.push(t);
  return e;
}
function p2(r, e) {
  for (var t = [], a = 2; a < arguments.length; a++)
    t[a - 2] = arguments[a];
  return function() {
    return r.apply(e, t.concat(lg.call(arguments)));
  };
}
var Y = Rl && q(Rl.bind) ? Rl.call.bind(Rl.bind) : p2;
function ot(r) {
  for (var e = [], t = 1; t < arguments.length; t++)
    e[t - 1] = arguments[t];
  return function() {
    return r.apply(this, e.concat(lg.call(arguments)));
  };
}
function z(r) {
  return Array.isArray ? Array.isArray(r) : _o.call(r) === "[object Array]";
}
function q(r) {
  return typeof r == "function";
}
function $(r) {
  return typeof r == "string";
}
function ef(r) {
  return _o.call(r) === "[object String]";
}
function Ct(r) {
  return typeof r == "number";
}
function j(r) {
  var e = typeof r;
  return e === "function" || !!r && e === "object";
}
function mm(r) {
  return !!Lb[_o.call(r)];
}
function ke(r) {
  return !!Eb[_o.call(r)];
}
function so(r) {
  return typeof r == "object" && typeof r.nodeType == "number" && typeof r.ownerDocument == "object";
}
function ih(r) {
  return r.colorStops != null;
}
function d2(r) {
  return r.image != null;
}
function Rb(r) {
  return _o.call(r) === "[object RegExp]";
}
function li(r) {
  return r !== r;
}
function jt() {
  for (var r = [], e = 0; e < arguments.length; e++)
    r[e] = arguments[e];
  for (var t = 0, a = r.length; t < a; t++)
    if (r[t] != null)
      return r[t];
}
function ut(r, e) {
  return r ?? e;
}
function xr(r, e, t) {
  return r ?? e ?? t;
}
function hg(r) {
  for (var e = [], t = 1; t < arguments.length; t++)
    e[t - 1] = arguments[t];
  return lg.apply(r, e);
}
function vg(r) {
  if (typeof r == "number")
    return [r, r, r, r];
  var e = r.length;
  return e === 2 ? [r[0], r[1], r[0], r[1]] : e === 3 ? [r[0], r[1], r[2], r[1]] : r;
}
function Q(r, e) {
  if (!r)
    throw new Error(e);
}
function mr(r) {
  return r == null ? null : typeof r.trim == "function" ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
var Nb = "__ec_primitive__";
function rf(r) {
  r[Nb] = !0;
}
function Ds(r) {
  return r[Nb];
}
var g2 = function() {
  function r() {
    this.data = {};
  }
  return r.prototype.delete = function(e) {
    var t = this.has(e);
    return t && delete this.data[e], t;
  }, r.prototype.has = function(e) {
    return this.data.hasOwnProperty(e);
  }, r.prototype.get = function(e) {
    return this.data[e];
  }, r.prototype.set = function(e, t) {
    return this.data[e] = t, this;
  }, r.prototype.keys = function() {
    return _t(this.data);
  }, r.prototype.forEach = function(e) {
    var t = this.data;
    for (var a in t)
      t.hasOwnProperty(a) && e(t[a], a);
  }, r;
}(), Ob = typeof Map == "function";
function y2() {
  return Ob ? /* @__PURE__ */ new Map() : new g2();
}
var m2 = function() {
  function r(e) {
    var t = z(e);
    this.data = y2();
    var a = this;
    e instanceof r ? e.each(n) : e && C(e, n);
    function n(i, o) {
      t ? a.set(i, o) : a.set(o, i);
    }
  }
  return r.prototype.hasKey = function(e) {
    return this.data.has(e);
  }, r.prototype.get = function(e) {
    return this.data.get(e);
  }, r.prototype.set = function(e, t) {
    return this.data.set(e, t), t;
  }, r.prototype.each = function(e, t) {
    this.data.forEach(function(a, n) {
      e.call(t, a, n);
    });
  }, r.prototype.keys = function() {
    var e = this.data.keys();
    return Ob ? Array.from(e) : e;
  }, r.prototype.removeKey = function(e) {
    this.data.delete(e);
  }, r;
}();
function K(r) {
  return new m2(r);
}
function af(r, e) {
  for (var t = new r.constructor(r.length + e.length), a = 0; a < r.length; a++)
    t[a] = r[a];
  for (var n = r.length, a = 0; a < e.length; a++)
    t[a + n] = e[a];
  return t;
}
function oh(r, e) {
  var t;
  if (Object.create)
    t = Object.create(r);
  else {
    var a = function() {
    };
    a.prototype = r, t = new a();
  }
  return e && V(t, e), t;
}
function kb(r) {
  var e = r.style;
  e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
}
function U(r, e) {
  return r.hasOwnProperty(e);
}
function Xt() {
}
var Ou = 180 / Math.PI;
function gi(r, e) {
  return r == null && (r = 0), e == null && (e = 0), [r, e];
}
function be(r, e) {
  return r[0] = e[0], r[1] = e[1], r;
}
function sa(r) {
  return [r[0], r[1]];
}
function _2(r, e, t) {
  return r[0] = e, r[1] = t, r;
}
function _m(r, e, t) {
  return r[0] = e[0] + t[0], r[1] = e[1] + t[1], r;
}
function Sp(r, e, t, a) {
  return r[0] = e[0] + t[0] * a, r[1] = e[1] + t[1] * a, r;
}
function $n(r, e, t) {
  return r[0] = e[0] - t[0], r[1] = e[1] - t[1], r;
}
function xp(r) {
  return Math.sqrt(S2(r));
}
function S2(r) {
  return r[0] * r[0] + r[1] * r[1];
}
function ku(r, e, t) {
  return r[0] = e[0] * t, r[1] = e[1] * t, r;
}
function So(r, e) {
  var t = xp(e);
  return t === 0 ? (r[0] = 0, r[1] = 0) : (r[0] = e[0] / t, r[1] = e[1] / t), r;
}
function wp(r, e) {
  return Math.sqrt((r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]));
}
var ka = wp;
function x2(r, e) {
  return (r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]);
}
var Qn = x2;
function Vu(r, e, t, a) {
  return r[0] = e[0] + a * (t[0] - e[0]), r[1] = e[1] + a * (t[1] - e[1]), r;
}
function fe(r, e, t) {
  var a = e[0], n = e[1];
  return r[0] = t[0] * a + t[2] * n + t[4], r[1] = t[1] * a + t[3] * n + t[5], r;
}
function Va(r, e, t) {
  return r[0] = Math.min(e[0], t[0]), r[1] = Math.min(e[1], t[1]), r;
}
function Ba(r, e, t) {
  return r[0] = Math.max(e[0], t[0]), r[1] = Math.max(e[1], t[1]), r;
}
var bi = function() {
  function r(e, t) {
    this.target = e, this.topTarget = t && t.topTarget;
  }
  return r;
}(), w2 = function() {
  function r(e) {
    this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  }
  return r.prototype._dragStart = function(e) {
    for (var t = e.target; t && !t.draggable; )
      t = t.parent || t.__hostTarget;
    t && (this._draggingTarget = t, t.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new bi(t, e), "dragstart", e.event));
  }, r.prototype._drag = function(e) {
    var t = this._draggingTarget;
    if (t) {
      var a = e.offsetX, n = e.offsetY, i = a - this._x, o = n - this._y;
      this._x = a, this._y = n, t.drift(i, o, e), this.handler.dispatchToElement(new bi(t, e), "drag", e.event);
      var s = this.handler.findHover(a, n, t).target, l = this._dropTarget;
      this._dropTarget = s, t !== s && (l && s !== l && this.handler.dispatchToElement(new bi(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new bi(s, e), "dragenter", e.event));
    }
  }, r.prototype._dragEnd = function(e) {
    var t = this._draggingTarget;
    t && (t.dragging = !1), this.handler.dispatchToElement(new bi(t, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new bi(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  }, r;
}();
const b2 = w2;
var T2 = function() {
  function r(e) {
    e && (this._$eventProcessor = e);
  }
  return r.prototype.on = function(e, t, a, n) {
    this._$handlers || (this._$handlers = {});
    var i = this._$handlers;
    if (typeof t == "function" && (n = a, a = t, t = null), !a || !e)
      return this;
    var o = this._$eventProcessor;
    t != null && o && o.normalizeQuery && (t = o.normalizeQuery(t)), i[e] || (i[e] = []);
    for (var s = 0; s < i[e].length; s++)
      if (i[e][s].h === a)
        return this;
    var l = {
      h: a,
      query: t,
      ctx: n || this,
      callAtLast: a.zrEventfulCallAtLast
    }, u = i[e].length - 1, f = i[e][u];
    return f && f.callAtLast ? i[e].splice(u, 0, l) : i[e].push(l), this;
  }, r.prototype.isSilent = function(e) {
    var t = this._$handlers;
    return !t || !t[e] || !t[e].length;
  }, r.prototype.off = function(e, t) {
    var a = this._$handlers;
    if (!a)
      return this;
    if (!e)
      return this._$handlers = {}, this;
    if (t) {
      if (a[e]) {
        for (var n = [], i = 0, o = a[e].length; i < o; i++)
          a[e][i].h !== t && n.push(a[e][i]);
        a[e] = n;
      }
      a[e] && a[e].length === 0 && delete a[e];
    } else
      delete a[e];
    return this;
  }, r.prototype.trigger = function(e) {
    for (var t = [], a = 1; a < arguments.length; a++)
      t[a - 1] = arguments[a];
    if (!this._$handlers)
      return this;
    var n = this._$handlers[e], i = this._$eventProcessor;
    if (n)
      for (var o = t.length, s = n.length, l = 0; l < s; l++) {
        var u = n[l];
        if (!(i && i.filter && u.query != null && !i.filter(e, u.query)))
          switch (o) {
            case 0:
              u.h.call(u.ctx);
              break;
            case 1:
              u.h.call(u.ctx, t[0]);
              break;
            case 2:
              u.h.call(u.ctx, t[0], t[1]);
              break;
            default:
              u.h.apply(u.ctx, t);
              break;
          }
      }
    return i && i.afterTrigger && i.afterTrigger(e), this;
  }, r.prototype.triggerWithContext = function(e) {
    for (var t = [], a = 1; a < arguments.length; a++)
      t[a - 1] = arguments[a];
    if (!this._$handlers)
      return this;
    var n = this._$handlers[e], i = this._$eventProcessor;
    if (n)
      for (var o = t.length, s = t[o - 1], l = n.length, u = 0; u < l; u++) {
        var f = n[u];
        if (!(i && i.filter && f.query != null && !i.filter(e, f.query)))
          switch (o) {
            case 0:
              f.h.call(s);
              break;
            case 1:
              f.h.call(s, t[0]);
              break;
            case 2:
              f.h.call(s, t[0], t[1]);
              break;
            default:
              f.h.apply(s, t.slice(1, o - 1));
              break;
          }
      }
    return i && i.afterTrigger && i.afterTrigger(e), this;
  }, r;
}();
const fr = T2;
var D2 = Math.log(2);
function bp(r, e, t, a, n, i) {
  var o = a + "-" + n, s = r.length;
  if (i.hasOwnProperty(o))
    return i[o];
  if (e === 1) {
    var l = Math.round(Math.log((1 << s) - 1 & ~n) / D2);
    return r[t][l];
  }
  for (var u = a | 1 << t, f = t + 1; a & 1 << f; )
    f++;
  for (var h = 0, v = 0, c = 0; v < s; v++) {
    var p = 1 << v;
    p & n || (h += (c % 2 ? -1 : 1) * r[t][v] * bp(r, e - 1, f, u, n | p, i), c++);
  }
  return i[o] = h, h;
}
function Sm(r, e) {
  var t = [
    [r[0], r[1], 1, 0, 0, 0, -e[0] * r[0], -e[0] * r[1]],
    [0, 0, 0, r[0], r[1], 1, -e[1] * r[0], -e[1] * r[1]],
    [r[2], r[3], 1, 0, 0, 0, -e[2] * r[2], -e[2] * r[3]],
    [0, 0, 0, r[2], r[3], 1, -e[3] * r[2], -e[3] * r[3]],
    [r[4], r[5], 1, 0, 0, 0, -e[4] * r[4], -e[4] * r[5]],
    [0, 0, 0, r[4], r[5], 1, -e[5] * r[4], -e[5] * r[5]],
    [r[6], r[7], 1, 0, 0, 0, -e[6] * r[6], -e[6] * r[7]],
    [0, 0, 0, r[6], r[7], 1, -e[7] * r[6], -e[7] * r[7]]
  ], a = {}, n = bp(t, 8, 0, 0, 0, a);
  if (n !== 0) {
    for (var i = [], o = 0; o < 8; o++)
      for (var s = 0; s < 8; s++)
        i[s] == null && (i[s] = 0), i[s] += ((o + s) % 2 ? -1 : 1) * bp(t, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, a) / n * e[o];
    return function(l, u, f) {
      var h = u * i[6] + f * i[7] + 1;
      l[0] = (u * i[0] + f * i[1] + i[2]) / h, l[1] = (u * i[3] + f * i[4] + i[5]) / h;
    };
  }
}
var xm = "___zrEVENTSAVED", Zh = [];
function C2(r, e, t, a, n) {
  return Tp(Zh, e, a, n, !0) && Tp(r, t, Zh[0], Zh[1]);
}
function Tp(r, e, t, a, n) {
  if (e.getBoundingClientRect && wt.domSupported && !Vb(e)) {
    var i = e[xm] || (e[xm] = {}), o = A2(e, i), s = M2(o, i, n);
    if (s)
      return s(r, t, a), !0;
  }
  return !1;
}
function A2(r, e) {
  var t = e.markers;
  if (t)
    return t;
  t = e.markers = [];
  for (var a = ["left", "right"], n = ["top", "bottom"], i = 0; i < 4; i++) {
    var o = document.createElement("div"), s = o.style, l = i % 2, u = (i >> 1) % 2;
    s.cssText = [
      "position: absolute",
      "visibility: hidden",
      "padding: 0",
      "margin: 0",
      "border-width: 0",
      "user-select: none",
      "width:0",
      "height:0",
      a[l] + ":0",
      n[u] + ":0",
      a[1 - l] + ":auto",
      n[1 - u] + ":auto",
      ""
    ].join("!important;"), r.appendChild(o), t.push(o);
  }
  return t;
}
function M2(r, e, t) {
  for (var a = t ? "invTrans" : "trans", n = e[a], i = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
    var f = r[u].getBoundingClientRect(), h = 2 * u, v = f.left, c = f.top;
    o.push(v, c), l = l && i && v === i[h] && c === i[h + 1], s.push(r[u].offsetLeft, r[u].offsetTop);
  }
  return l && n ? n : (e.srcCoords = o, e[a] = t ? Sm(s, o) : Sm(o, s));
}
function Vb(r) {
  return r.nodeName.toUpperCase() === "CANVAS";
}
var I2 = /([&<>"'])/g, L2 = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
};
function Pe(r) {
  return r == null ? "" : (r + "").replace(I2, function(e, t) {
    return L2[t];
  });
}
var E2 = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, Xh = [], P2 = wt.browser.firefox && +wt.browser.version.split(".")[0] < 39;
function Dp(r, e, t, a) {
  return t = t || {}, a ? wm(r, e, t) : P2 && e.layerX != null && e.layerX !== e.offsetX ? (t.zrX = e.layerX, t.zrY = e.layerY) : e.offsetX != null ? (t.zrX = e.offsetX, t.zrY = e.offsetY) : wm(r, e, t), t;
}
function wm(r, e, t) {
  if (wt.domSupported && r.getBoundingClientRect) {
    var a = e.clientX, n = e.clientY;
    if (Vb(r)) {
      var i = r.getBoundingClientRect();
      t.zrX = a - i.left, t.zrY = n - i.top;
      return;
    } else if (Tp(Xh, r, a, n)) {
      t.zrX = Xh[0], t.zrY = Xh[1];
      return;
    }
  }
  t.zrX = t.zrY = 0;
}
function cg(r) {
  return r || window.event;
}
function Qe(r, e, t) {
  if (e = cg(e), e.zrX != null)
    return e;
  var a = e.type, n = a && a.indexOf("touch") >= 0;
  if (n) {
    var o = a !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
    o && Dp(r, o, e, t);
  } else {
    Dp(r, e, e, t);
    var i = R2(e);
    e.zrDelta = i ? i / 120 : -(e.detail || 0) / 3;
  }
  var s = e.button;
  return e.which == null && s !== void 0 && E2.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
}
function R2(r) {
  var e = r.wheelDelta;
  if (e)
    return e;
  var t = r.deltaX, a = r.deltaY;
  if (t == null || a == null)
    return e;
  var n = Math.abs(a !== 0 ? a : t), i = a > 0 ? -1 : a < 0 ? 1 : t > 0 ? -1 : 1;
  return 3 * n * i;
}
function Cp(r, e, t, a) {
  r.addEventListener(e, t, a);
}
function N2(r, e, t, a) {
  r.removeEventListener(e, t, a);
}
var ca = function(r) {
  r.preventDefault(), r.stopPropagation(), r.cancelBubble = !0;
};
function bm(r) {
  return r.which === 2 || r.which === 3;
}
var O2 = function() {
  function r() {
    this._track = [];
  }
  return r.prototype.recognize = function(e, t, a) {
    return this._doTrack(e, t, a), this._recognize(e);
  }, r.prototype.clear = function() {
    return this._track.length = 0, this;
  }, r.prototype._doTrack = function(e, t, a) {
    var n = e.touches;
    if (n) {
      for (var i = {
        points: [],
        touches: [],
        target: t,
        event: e
      }, o = 0, s = n.length; o < s; o++) {
        var l = n[o], u = Dp(a, l, {});
        i.points.push([u.zrX, u.zrY]), i.touches.push(l);
      }
      this._track.push(i);
    }
  }, r.prototype._recognize = function(e) {
    for (var t in qh)
      if (qh.hasOwnProperty(t)) {
        var a = qh[t](this._track, e);
        if (a)
          return a;
      }
  }, r;
}();
function Tm(r) {
  var e = r[1][0] - r[0][0], t = r[1][1] - r[0][1];
  return Math.sqrt(e * e + t * t);
}
function k2(r) {
  return [
    (r[0][0] + r[1][0]) / 2,
    (r[0][1] + r[1][1]) / 2
  ];
}
var qh = {
  pinch: function(r, e) {
    var t = r.length;
    if (t) {
      var a = (r[t - 1] || {}).points, n = (r[t - 2] || {}).points || a;
      if (n && n.length > 1 && a && a.length > 1) {
        var i = Tm(a) / Tm(n);
        !isFinite(i) && (i = 1), e.pinchScale = i;
        var o = k2(a);
        return e.pinchX = o[0], e.pinchY = o[1], {
          type: "pinch",
          target: r[0].target,
          event: e
        };
      }
    }
  }
};
function lr() {
  return [1, 0, 0, 1, 0, 0];
}
function sh(r) {
  return r[0] = 1, r[1] = 0, r[2] = 0, r[3] = 1, r[4] = 0, r[5] = 0, r;
}
function pg(r, e) {
  return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r;
}
function la(r, e, t) {
  var a = e[0] * t[0] + e[2] * t[1], n = e[1] * t[0] + e[3] * t[1], i = e[0] * t[2] + e[2] * t[3], o = e[1] * t[2] + e[3] * t[3], s = e[0] * t[4] + e[2] * t[5] + e[4], l = e[1] * t[4] + e[3] * t[5] + e[5];
  return r[0] = a, r[1] = n, r[2] = i, r[3] = o, r[4] = s, r[5] = l, r;
}
function Ur(r, e, t) {
  return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4] + t[0], r[5] = e[5] + t[1], r;
}
function yi(r, e, t) {
  var a = e[0], n = e[2], i = e[4], o = e[1], s = e[3], l = e[5], u = Math.sin(t), f = Math.cos(t);
  return r[0] = a * f + o * u, r[1] = -a * u + o * f, r[2] = n * f + s * u, r[3] = -n * u + f * s, r[4] = f * i + u * l, r[5] = f * l - u * i, r;
}
function dg(r, e, t) {
  var a = t[0], n = t[1];
  return r[0] = e[0] * a, r[1] = e[1] * n, r[2] = e[2] * a, r[3] = e[3] * n, r[4] = e[4] * a, r[5] = e[5] * n, r;
}
function xo(r, e) {
  var t = e[0], a = e[2], n = e[4], i = e[1], o = e[3], s = e[5], l = t * o - i * a;
  return l ? (l = 1 / l, r[0] = o * l, r[1] = -i * l, r[2] = -a * l, r[3] = t * l, r[4] = (a * s - o * n) * l, r[5] = (i * n - t * s) * l, r) : null;
}
function V2(r) {
  var e = lr();
  return pg(e, r), e;
}
var B2 = function() {
  function r(e, t) {
    this.x = e || 0, this.y = t || 0;
  }
  return r.prototype.copy = function(e) {
    return this.x = e.x, this.y = e.y, this;
  }, r.prototype.clone = function() {
    return new r(this.x, this.y);
  }, r.prototype.set = function(e, t) {
    return this.x = e, this.y = t, this;
  }, r.prototype.equal = function(e) {
    return e.x === this.x && e.y === this.y;
  }, r.prototype.add = function(e) {
    return this.x += e.x, this.y += e.y, this;
  }, r.prototype.scale = function(e) {
    this.x *= e, this.y *= e;
  }, r.prototype.scaleAndAdd = function(e, t) {
    this.x += e.x * t, this.y += e.y * t;
  }, r.prototype.sub = function(e) {
    return this.x -= e.x, this.y -= e.y, this;
  }, r.prototype.dot = function(e) {
    return this.x * e.x + this.y * e.y;
  }, r.prototype.len = function() {
    return Math.sqrt(this.x * this.x + this.y * this.y);
  }, r.prototype.lenSquare = function() {
    return this.x * this.x + this.y * this.y;
  }, r.prototype.normalize = function() {
    var e = this.len();
    return this.x /= e, this.y /= e, this;
  }, r.prototype.distance = function(e) {
    var t = this.x - e.x, a = this.y - e.y;
    return Math.sqrt(t * t + a * a);
  }, r.prototype.distanceSquare = function(e) {
    var t = this.x - e.x, a = this.y - e.y;
    return t * t + a * a;
  }, r.prototype.negate = function() {
    return this.x = -this.x, this.y = -this.y, this;
  }, r.prototype.transform = function(e) {
    if (e) {
      var t = this.x, a = this.y;
      return this.x = e[0] * t + e[2] * a + e[4], this.y = e[1] * t + e[3] * a + e[5], this;
    }
  }, r.prototype.toArray = function(e) {
    return e[0] = this.x, e[1] = this.y, e;
  }, r.prototype.fromArray = function(e) {
    this.x = e[0], this.y = e[1];
  }, r.set = function(e, t, a) {
    e.x = t, e.y = a;
  }, r.copy = function(e, t) {
    e.x = t.x, e.y = t.y;
  }, r.len = function(e) {
    return Math.sqrt(e.x * e.x + e.y * e.y);
  }, r.lenSquare = function(e) {
    return e.x * e.x + e.y * e.y;
  }, r.dot = function(e, t) {
    return e.x * t.x + e.y * t.y;
  }, r.add = function(e, t, a) {
    e.x = t.x + a.x, e.y = t.y + a.y;
  }, r.sub = function(e, t, a) {
    e.x = t.x - a.x, e.y = t.y - a.y;
  }, r.scale = function(e, t, a) {
    e.x = t.x * a, e.y = t.y * a;
  }, r.scaleAndAdd = function(e, t, a, n) {
    e.x = t.x + a.x * n, e.y = t.y + a.y * n;
  }, r.lerp = function(e, t, a, n) {
    var i = 1 - n;
    e.x = i * t.x + n * a.x, e.y = i * t.y + n * a.y;
  }, r;
}();
const lt = B2;
var Nl = Math.min, Ol = Math.max, ln = new lt(), un = new lt(), fn = new lt(), hn = new lt(), Vo = new lt(), Bo = new lt(), z2 = function() {
  function r(e, t, a, n) {
    a < 0 && (e = e + a, a = -a), n < 0 && (t = t + n, n = -n), this.x = e, this.y = t, this.width = a, this.height = n;
  }
  return r.prototype.union = function(e) {
    var t = Nl(e.x, this.x), a = Nl(e.y, this.y);
    isFinite(this.x) && isFinite(this.width) ? this.width = Ol(e.x + e.width, this.x + this.width) - t : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Ol(e.y + e.height, this.y + this.height) - a : this.height = e.height, this.x = t, this.y = a;
  }, r.prototype.applyTransform = function(e) {
    r.applyTransform(this, this, e);
  }, r.prototype.calculateTransform = function(e) {
    var t = this, a = e.width / t.width, n = e.height / t.height, i = lr();
    return Ur(i, i, [-t.x, -t.y]), dg(i, i, [a, n]), Ur(i, i, [e.x, e.y]), i;
  }, r.prototype.intersect = function(e, t) {
    if (!e)
      return !1;
    e instanceof r || (e = r.create(e));
    var a = this, n = a.x, i = a.x + a.width, o = a.y, s = a.y + a.height, l = e.x, u = e.x + e.width, f = e.y, h = e.y + e.height, v = !(i < l || u < n || s < f || h < o);
    if (t) {
      var c = 1 / 0, p = 0, d = Math.abs(i - l), g = Math.abs(u - n), y = Math.abs(s - f), m = Math.abs(h - o), _ = Math.min(d, g), S = Math.min(y, m);
      i < l || u < n ? _ > p && (p = _, d < g ? lt.set(Bo, -d, 0) : lt.set(Bo, g, 0)) : _ < c && (c = _, d < g ? lt.set(Vo, d, 0) : lt.set(Vo, -g, 0)), s < f || h < o ? S > p && (p = S, y < m ? lt.set(Bo, 0, -y) : lt.set(Bo, 0, m)) : _ < c && (c = _, y < m ? lt.set(Vo, 0, y) : lt.set(Vo, 0, -m));
    }
    return t && lt.copy(t, v ? Vo : Bo), v;
  }, r.prototype.contain = function(e, t) {
    var a = this;
    return e >= a.x && e <= a.x + a.width && t >= a.y && t <= a.y + a.height;
  }, r.prototype.clone = function() {
    return new r(this.x, this.y, this.width, this.height);
  }, r.prototype.copy = function(e) {
    r.copy(this, e);
  }, r.prototype.plain = function() {
    return {
      x: this.x,
      y: this.y,
      width: this.width,
      height: this.height
    };
  }, r.prototype.isFinite = function() {
    return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  }, r.prototype.isZero = function() {
    return this.width === 0 || this.height === 0;
  }, r.create = function(e) {
    return new r(e.x, e.y, e.width, e.height);
  }, r.copy = function(e, t) {
    e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height;
  }, r.applyTransform = function(e, t, a) {
    if (!a) {
      e !== t && r.copy(e, t);
      return;
    }
    if (a[1] < 1e-5 && a[1] > -1e-5 && a[2] < 1e-5 && a[2] > -1e-5) {
      var n = a[0], i = a[3], o = a[4], s = a[5];
      e.x = t.x * n + o, e.y = t.y * i + s, e.width = t.width * n, e.height = t.height * i, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
      return;
    }
    ln.x = fn.x = t.x, ln.y = hn.y = t.y, un.x = hn.x = t.x + t.width, un.y = fn.y = t.y + t.height, ln.transform(a), hn.transform(a), un.transform(a), fn.transform(a), e.x = Nl(ln.x, un.x, fn.x, hn.x), e.y = Nl(ln.y, un.y, fn.y, hn.y);
    var l = Ol(ln.x, un.x, fn.x, hn.x), u = Ol(ln.y, un.y, fn.y, hn.y);
    e.width = l - e.x, e.height = u - e.y;
  }, r;
}();
const ht = z2;
var Bb = "silent";
function G2(r, e, t) {
  return {
    type: r,
    event: t,
    target: e.target,
    topTarget: e.topTarget,
    cancelBubble: !1,
    offsetX: t.zrX,
    offsetY: t.zrY,
    gestureEvent: t.gestureEvent,
    pinchX: t.pinchX,
    pinchY: t.pinchY,
    pinchScale: t.pinchScale,
    wheelDelta: t.zrDelta,
    zrByTouch: t.zrByTouch,
    which: t.which,
    stop: F2
  };
}
function F2() {
  ca(this.event);
}
var H2 = function(r) {
  N(e, r);
  function e() {
    var t = r !== null && r.apply(this, arguments) || this;
    return t.handler = null, t;
  }
  return e.prototype.dispose = function() {
  }, e.prototype.setCursor = function() {
  }, e;
}(fr), zo = function() {
  function r(e, t) {
    this.x = e, this.y = t;
  }
  return r;
}(), W2 = [
  "click",
  "dblclick",
  "mousewheel",
  "mouseout",
  "mouseup",
  "mousedown",
  "mousemove",
  "contextmenu"
], Kh = new ht(0, 0, 0, 0), zb = function(r) {
  N(e, r);
  function e(t, a, n, i, o) {
    var s = r.call(this) || this;
    return s._hovered = new zo(0, 0), s.storage = t, s.painter = a, s.painterRoot = i, s._pointerSize = o, n = n || new H2(), s.proxy = null, s.setHandlerProxy(n), s._draggingMgr = new b2(s), s;
  }
  return e.prototype.setHandlerProxy = function(t) {
    this.proxy && this.proxy.dispose(), t && (C(W2, function(a) {
      t.on && t.on(a, this[a], this);
    }, this), t.handler = this), this.proxy = t;
  }, e.prototype.mousemove = function(t) {
    var a = t.zrX, n = t.zrY, i = Gb(this, a, n), o = this._hovered, s = o.target;
    s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
    var l = this._hovered = i ? new zo(a, n) : this.findHover(a, n), u = l.target, f = this.proxy;
    f.setCursor && f.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", t), this.dispatchToElement(l, "mousemove", t), u && u !== s && this.dispatchToElement(l, "mouseover", t);
  }, e.prototype.mouseout = function(t) {
    var a = t.zrEventControl;
    a !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", t), a !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: t });
  }, e.prototype.resize = function() {
    this._hovered = new zo(0, 0);
  }, e.prototype.dispatch = function(t, a) {
    var n = this[t];
    n && n.call(this, a);
  }, e.prototype.dispose = function() {
    this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  }, e.prototype.setCursorStyle = function(t) {
    var a = this.proxy;
    a.setCursor && a.setCursor(t);
  }, e.prototype.dispatchToElement = function(t, a, n) {
    t = t || {};
    var i = t.target;
    if (!(i && i.silent)) {
      for (var o = "on" + a, s = G2(a, t, n); i && (i[o] && (s.cancelBubble = !!i[o].call(i, s)), i.trigger(a, s), i = i.__hostTarget ? i.__hostTarget : i.parent, !s.cancelBubble); )
        ;
      s.cancelBubble || (this.trigger(a, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
        typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(a, s);
      }));
    }
  }, e.prototype.findHover = function(t, a, n) {
    var i = this.storage.getDisplayList(), o = new zo(t, a);
    if (Dm(i, o, t, a, n), this._pointerSize && !o.target) {
      for (var s = [], l = this._pointerSize, u = l / 2, f = new ht(t - u, a - u, l, l), h = i.length - 1; h >= 0; h--) {
        var v = i[h];
        v !== n && !v.ignore && !v.ignoreCoarsePointer && (!v.parent || !v.parent.ignoreCoarsePointer) && (Kh.copy(v.getBoundingRect()), v.transform && Kh.applyTransform(v.transform), Kh.intersect(f) && s.push(v));
      }
      if (s.length)
        for (var c = 4, p = Math.PI / 12, d = Math.PI * 2, g = 0; g < u; g += c)
          for (var y = 0; y < d; y += p) {
            var m = t + g * Math.cos(y), _ = a + g * Math.sin(y);
            if (Dm(s, o, m, _, n), o.target)
              return o;
          }
    }
    return o;
  }, e.prototype.processGesture = function(t, a) {
    this._gestureMgr || (this._gestureMgr = new O2());
    var n = this._gestureMgr;
    a === "start" && n.clear();
    var i = n.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
    if (a === "end" && n.clear(), i) {
      var o = i.type;
      t.gestureEvent = o;
      var s = new zo();
      s.target = i.target, this.dispatchToElement(s, o, i.event);
    }
  }, e;
}(fr);
C(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(r) {
  zb.prototype[r] = function(e) {
    var t = e.zrX, a = e.zrY, n = Gb(this, t, a), i, o;
    if ((r !== "mouseup" || !n) && (i = this.findHover(t, a), o = i.target), r === "mousedown")
      this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
    else if (r === "mouseup")
      this._upEl = o;
    else if (r === "click") {
      if (this._downEl !== this._upEl || !this._downPoint || ka(this._downPoint, [e.zrX, e.zrY]) > 4)
        return;
      this._downPoint = null;
    }
    this.dispatchToElement(i, r, e);
  };
});
function $2(r, e, t) {
  if (r[r.rectHover ? "rectContain" : "contain"](e, t)) {
    for (var a = r, n = void 0, i = !1; a; ) {
      if (a.ignoreClip && (i = !0), !i) {
        var o = a.getClipPath();
        if (o && !o.contain(e, t))
          return !1;
        a.silent && (n = !0);
      }
      var s = a.__hostTarget;
      a = s || a.parent;
    }
    return n ? Bb : !0;
  }
  return !1;
}
function Dm(r, e, t, a, n) {
  for (var i = r.length - 1; i >= 0; i--) {
    var o = r[i], s = void 0;
    if (o !== n && !o.ignore && (s = $2(o, t, a)) && (!e.topTarget && (e.topTarget = o), s !== Bb)) {
      e.target = o;
      break;
    }
  }
}
function Gb(r, e, t) {
  var a = r.painter;
  return e < 0 || e > a.getWidth() || t < 0 || t > a.getHeight();
}
const U2 = zb;
var Fb = 32, Go = 7;
function Y2(r) {
  for (var e = 0; r >= Fb; )
    e |= r & 1, r >>= 1;
  return r + e;
}
function Cm(r, e, t, a) {
  var n = e + 1;
  if (n === t)
    return 1;
  if (a(r[n++], r[e]) < 0) {
    for (; n < t && a(r[n], r[n - 1]) < 0; )
      n++;
    Z2(r, e, n);
  } else
    for (; n < t && a(r[n], r[n - 1]) >= 0; )
      n++;
  return n - e;
}
function Z2(r, e, t) {
  for (t--; e < t; ) {
    var a = r[e];
    r[e++] = r[t], r[t--] = a;
  }
}
function Am(r, e, t, a, n) {
  for (a === e && a++; a < t; a++) {
    for (var i = r[a], o = e, s = a, l; o < s; )
      l = o + s >>> 1, n(i, r[l]) < 0 ? s = l : o = l + 1;
    var u = a - o;
    switch (u) {
      case 3:
        r[o + 3] = r[o + 2];
      case 2:
        r[o + 2] = r[o + 1];
      case 1:
        r[o + 1] = r[o];
        break;
      default:
        for (; u > 0; )
          r[o + u] = r[o + u - 1], u--;
    }
    r[o] = i;
  }
}
function jh(r, e, t, a, n, i) {
  var o = 0, s = 0, l = 1;
  if (i(r, e[t + n]) > 0) {
    for (s = a - n; l < s && i(r, e[t + n + l]) > 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += n, l += n;
  } else {
    for (s = n + 1; l < s && i(r, e[t + n - l]) <= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = n - l, l = n - u;
  }
  for (o++; o < l; ) {
    var f = o + (l - o >>> 1);
    i(r, e[t + f]) > 0 ? o = f + 1 : l = f;
  }
  return l;
}
function Qh(r, e, t, a, n, i) {
  var o = 0, s = 0, l = 1;
  if (i(r, e[t + n]) < 0) {
    for (s = n + 1; l < s && i(r, e[t + n - l]) < 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = n - l, l = n - u;
  } else {
    for (s = a - n; l < s && i(r, e[t + n + l]) >= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += n, l += n;
  }
  for (o++; o < l; ) {
    var f = o + (l - o >>> 1);
    i(r, e[t + f]) < 0 ? l = f : o = f + 1;
  }
  return l;
}
function X2(r, e) {
  var t = Go, a, n, i = 0;
  r.length;
  var o = [];
  a = [], n = [];
  function s(c, p) {
    a[i] = c, n[i] = p, i += 1;
  }
  function l() {
    for (; i > 1; ) {
      var c = i - 2;
      if (c >= 1 && n[c - 1] <= n[c] + n[c + 1] || c >= 2 && n[c - 2] <= n[c] + n[c - 1])
        n[c - 1] < n[c + 1] && c--;
      else if (n[c] > n[c + 1])
        break;
      f(c);
    }
  }
  function u() {
    for (; i > 1; ) {
      var c = i - 2;
      c > 0 && n[c - 1] < n[c + 1] && c--, f(c);
    }
  }
  function f(c) {
    var p = a[c], d = n[c], g = a[c + 1], y = n[c + 1];
    n[c] = d + y, c === i - 3 && (a[c + 1] = a[c + 2], n[c + 1] = n[c + 2]), i--;
    var m = Qh(r[g], r, p, d, 0, e);
    p += m, d -= m, d !== 0 && (y = jh(r[p + d - 1], r, g, y, y - 1, e), y !== 0 && (d <= y ? h(p, d, g, y) : v(p, d, g, y)));
  }
  function h(c, p, d, g) {
    var y = 0;
    for (y = 0; y < p; y++)
      o[y] = r[c + y];
    var m = 0, _ = d, S = c;
    if (r[S++] = r[_++], --g === 0) {
      for (y = 0; y < p; y++)
        r[S + y] = o[m + y];
      return;
    }
    if (p === 1) {
      for (y = 0; y < g; y++)
        r[S + y] = r[_ + y];
      r[S + g] = o[m];
      return;
    }
    for (var w = t, x, b, T; ; ) {
      x = 0, b = 0, T = !1;
      do
        if (e(r[_], o[m]) < 0) {
          if (r[S++] = r[_++], b++, x = 0, --g === 0) {
            T = !0;
            break;
          }
        } else if (r[S++] = o[m++], x++, b = 0, --p === 1) {
          T = !0;
          break;
        }
      while ((x | b) < w);
      if (T)
        break;
      do {
        if (x = Qh(r[_], o, m, p, 0, e), x !== 0) {
          for (y = 0; y < x; y++)
            r[S + y] = o[m + y];
          if (S += x, m += x, p -= x, p <= 1) {
            T = !0;
            break;
          }
        }
        if (r[S++] = r[_++], --g === 0) {
          T = !0;
          break;
        }
        if (b = jh(o[m], r, _, g, 0, e), b !== 0) {
          for (y = 0; y < b; y++)
            r[S + y] = r[_ + y];
          if (S += b, _ += b, g -= b, g === 0) {
            T = !0;
            break;
          }
        }
        if (r[S++] = o[m++], --p === 1) {
          T = !0;
          break;
        }
        w--;
      } while (x >= Go || b >= Go);
      if (T)
        break;
      w < 0 && (w = 0), w += 2;
    }
    if (t = w, t < 1 && (t = 1), p === 1) {
      for (y = 0; y < g; y++)
        r[S + y] = r[_ + y];
      r[S + g] = o[m];
    } else {
      if (p === 0)
        throw new Error();
      for (y = 0; y < p; y++)
        r[S + y] = o[m + y];
    }
  }
  function v(c, p, d, g) {
    var y = 0;
    for (y = 0; y < g; y++)
      o[y] = r[d + y];
    var m = c + p - 1, _ = g - 1, S = d + g - 1, w = 0, x = 0;
    if (r[S--] = r[m--], --p === 0) {
      for (w = S - (g - 1), y = 0; y < g; y++)
        r[w + y] = o[y];
      return;
    }
    if (g === 1) {
      for (S -= p, m -= p, x = S + 1, w = m + 1, y = p - 1; y >= 0; y--)
        r[x + y] = r[w + y];
      r[S] = o[_];
      return;
    }
    for (var b = t; ; ) {
      var T = 0, D = 0, A = !1;
      do
        if (e(o[_], r[m]) < 0) {
          if (r[S--] = r[m--], T++, D = 0, --p === 0) {
            A = !0;
            break;
          }
        } else if (r[S--] = o[_--], D++, T = 0, --g === 1) {
          A = !0;
          break;
        }
      while ((T | D) < b);
      if (A)
        break;
      do {
        if (T = p - Qh(o[_], r, c, p, p - 1, e), T !== 0) {
          for (S -= T, m -= T, p -= T, x = S + 1, w = m + 1, y = T - 1; y >= 0; y--)
            r[x + y] = r[w + y];
          if (p === 0) {
            A = !0;
            break;
          }
        }
        if (r[S--] = o[_--], --g === 1) {
          A = !0;
          break;
        }
        if (D = g - jh(r[m], o, 0, g, g - 1, e), D !== 0) {
          for (S -= D, _ -= D, g -= D, x = S + 1, w = _ + 1, y = 0; y < D; y++)
            r[x + y] = o[w + y];
          if (g <= 1) {
            A = !0;
            break;
          }
        }
        if (r[S--] = r[m--], --p === 0) {
          A = !0;
          break;
        }
        b--;
      } while (T >= Go || D >= Go);
      if (A)
        break;
      b < 0 && (b = 0), b += 2;
    }
    if (t = b, t < 1 && (t = 1), g === 1) {
      for (S -= p, m -= p, x = S + 1, w = m + 1, y = p - 1; y >= 0; y--)
        r[x + y] = r[w + y];
      r[S] = o[_];
    } else {
      if (g === 0)
        throw new Error();
      for (w = S - (g - 1), y = 0; y < g; y++)
        r[w + y] = o[y];
    }
  }
  return {
    mergeRuns: l,
    forceMergeRuns: u,
    pushRun: s
  };
}
function Bu(r, e, t, a) {
  t || (t = 0), a || (a = r.length);
  var n = a - t;
  if (!(n < 2)) {
    var i = 0;
    if (n < Fb) {
      i = Cm(r, t, a, e), Am(r, t, a, t + i, e);
      return;
    }
    var o = X2(r, e), s = Y2(n);
    do {
      if (i = Cm(r, t, a, e), i < s) {
        var l = n;
        l > s && (l = s), Am(r, t, t + l, t + i, e), i = l;
      }
      o.pushRun(t, i), o.mergeRuns(), n -= i, t += i;
    } while (n !== 0);
    o.forceMergeRuns();
  }
}
var We = 1, vs = 2, Yi = 4, Mm = !1;
function Jh() {
  Mm || (Mm = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
}
function Im(r, e) {
  return r.zlevel === e.zlevel ? r.z === e.z ? r.z2 - e.z2 : r.z - e.z : r.zlevel - e.zlevel;
}
var q2 = function() {
  function r() {
    this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = Im;
  }
  return r.prototype.traverse = function(e, t) {
    for (var a = 0; a < this._roots.length; a++)
      this._roots[a].traverse(e, t);
  }, r.prototype.getDisplayList = function(e, t) {
    t = t || !1;
    var a = this._displayList;
    return (e || !a.length) && this.updateDisplayList(t), a;
  }, r.prototype.updateDisplayList = function(e) {
    this._displayListLen = 0;
    for (var t = this._roots, a = this._displayList, n = 0, i = t.length; n < i; n++)
      this._updateAndAddDisplayable(t[n], null, e);
    a.length = this._displayListLen, Bu(a, Im);
  }, r.prototype._updateAndAddDisplayable = function(e, t, a) {
    if (!(e.ignore && !a)) {
      e.beforeUpdate(), e.update(), e.afterUpdate();
      var n = e.getClipPath();
      if (e.ignoreClip)
        t = null;
      else if (n) {
        t ? t = t.slice() : t = [];
        for (var i = n, o = e; i; )
          i.parent = o, i.updateTransform(), t.push(i), o = i, i = i.getClipPath();
      }
      if (e.childrenRef) {
        for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
          var u = s[l];
          e.__dirty && (u.__dirty |= We), this._updateAndAddDisplayable(u, t, a);
        }
        e.__dirty = 0;
      } else {
        var f = e;
        t && t.length ? f.__clipPaths = t : f.__clipPaths && f.__clipPaths.length > 0 && (f.__clipPaths = []), isNaN(f.z) && (Jh(), f.z = 0), isNaN(f.z2) && (Jh(), f.z2 = 0), isNaN(f.zlevel) && (Jh(), f.zlevel = 0), this._displayList[this._displayListLen++] = f;
      }
      var h = e.getDecalElement && e.getDecalElement();
      h && this._updateAndAddDisplayable(h, t, a);
      var v = e.getTextGuideLine();
      v && this._updateAndAddDisplayable(v, t, a);
      var c = e.getTextContent();
      c && this._updateAndAddDisplayable(c, t, a);
    }
  }, r.prototype.addRoot = function(e) {
    e.__zr && e.__zr.storage === this || this._roots.push(e);
  }, r.prototype.delRoot = function(e) {
    if (e instanceof Array) {
      for (var t = 0, a = e.length; t < a; t++)
        this.delRoot(e[t]);
      return;
    }
    var n = ct(this._roots, e);
    n >= 0 && this._roots.splice(n, 1);
  }, r.prototype.delAllRoots = function() {
    this._roots = [], this._displayList = [], this._displayListLen = 0;
  }, r.prototype.getRoots = function() {
    return this._roots;
  }, r.prototype.dispose = function() {
    this._displayList = null, this._roots = null;
  }, r;
}();
const K2 = q2;
var Hb;
Hb = wt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(r) {
  return setTimeout(r, 16);
};
const Ap = Hb;
var zu = {
  linear: function(r) {
    return r;
  },
  quadraticIn: function(r) {
    return r * r;
  },
  quadraticOut: function(r) {
    return r * (2 - r);
  },
  quadraticInOut: function(r) {
    return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1);
  },
  cubicIn: function(r) {
    return r * r * r;
  },
  cubicOut: function(r) {
    return --r * r * r + 1;
  },
  cubicInOut: function(r) {
    return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2);
  },
  quarticIn: function(r) {
    return r * r * r * r;
  },
  quarticOut: function(r) {
    return 1 - --r * r * r * r;
  },
  quarticInOut: function(r) {
    return (r *= 2) < 1 ? 0.5 * r * r * r * r : -0.5 * ((r -= 2) * r * r * r - 2);
  },
  quinticIn: function(r) {
    return r * r * r * r * r;
  },
  quinticOut: function(r) {
    return --r * r * r * r * r + 1;
  },
  quinticInOut: function(r) {
    return (r *= 2) < 1 ? 0.5 * r * r * r * r * r : 0.5 * ((r -= 2) * r * r * r * r + 2);
  },
  sinusoidalIn: function(r) {
    return 1 - Math.cos(r * Math.PI / 2);
  },
  sinusoidalOut: function(r) {
    return Math.sin(r * Math.PI / 2);
  },
  sinusoidalInOut: function(r) {
    return 0.5 * (1 - Math.cos(Math.PI * r));
  },
  exponentialIn: function(r) {
    return r === 0 ? 0 : Math.pow(1024, r - 1);
  },
  exponentialOut: function(r) {
    return r === 1 ? 1 : 1 - Math.pow(2, -10 * r);
  },
  exponentialInOut: function(r) {
    return r === 0 ? 0 : r === 1 ? 1 : (r *= 2) < 1 ? 0.5 * Math.pow(1024, r - 1) : 0.5 * (-Math.pow(2, -10 * (r - 1)) + 2);
  },
  circularIn: function(r) {
    return 1 - Math.sqrt(1 - r * r);
  },
  circularOut: function(r) {
    return Math.sqrt(1 - --r * r);
  },
  circularInOut: function(r) {
    return (r *= 2) < 1 ? -0.5 * (Math.sqrt(1 - r * r) - 1) : 0.5 * (Math.sqrt(1 - (r -= 2) * r) + 1);
  },
  elasticIn: function(r) {
    var e, t = 0.1, a = 0.4;
    return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = a / 4) : e = a * Math.asin(1 / t) / (2 * Math.PI), -(t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / a)));
  },
  elasticOut: function(r) {
    var e, t = 0.1, a = 0.4;
    return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = a / 4) : e = a * Math.asin(1 / t) / (2 * Math.PI), t * Math.pow(2, -10 * r) * Math.sin((r - e) * (2 * Math.PI) / a) + 1);
  },
  elasticInOut: function(r) {
    var e, t = 0.1, a = 0.4;
    return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = a / 4) : e = a * Math.asin(1 / t) / (2 * Math.PI), (r *= 2) < 1 ? -0.5 * (t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / a)) : t * Math.pow(2, -10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / a) * 0.5 + 1);
  },
  backIn: function(r) {
    var e = 1.70158;
    return r * r * ((e + 1) * r - e);
  },
  backOut: function(r) {
    var e = 1.70158;
    return --r * r * ((e + 1) * r + e) + 1;
  },
  backInOut: function(r) {
    var e = 2.5949095;
    return (r *= 2) < 1 ? 0.5 * (r * r * ((e + 1) * r - e)) : 0.5 * ((r -= 2) * r * ((e + 1) * r + e) + 2);
  },
  bounceIn: function(r) {
    return 1 - zu.bounceOut(1 - r);
  },
  bounceOut: function(r) {
    return r < 1 / 2.75 ? 7.5625 * r * r : r < 2 / 2.75 ? 7.5625 * (r -= 1.5 / 2.75) * r + 0.75 : r < 2.5 / 2.75 ? 7.5625 * (r -= 2.25 / 2.75) * r + 0.9375 : 7.5625 * (r -= 2.625 / 2.75) * r + 0.984375;
  },
  bounceInOut: function(r) {
    return r < 0.5 ? zu.bounceIn(r * 2) * 0.5 : zu.bounceOut(r * 2 - 1) * 0.5 + 0.5;
  }
};
const Wb = zu;
var kl = Math.pow, Ua = Math.sqrt, nf = 1e-8, $b = 1e-4, Lm = Ua(3), Vl = 1 / 3, Vr = gi(), rr = gi(), eo = gi();
function za(r) {
  return r > -nf && r < nf;
}
function Ub(r) {
  return r > nf || r < -nf;
}
function ae(r, e, t, a, n) {
  var i = 1 - n;
  return i * i * (i * r + 3 * n * e) + n * n * (n * a + 3 * i * t);
}
function Em(r, e, t, a, n) {
  var i = 1 - n;
  return 3 * (((e - r) * i + 2 * (t - e) * n) * i + (a - t) * n * n);
}
function of(r, e, t, a, n, i) {
  var o = a + 3 * (e - t) - r, s = 3 * (t - e * 2 + r), l = 3 * (e - r), u = r - n, f = s * s - 3 * o * l, h = s * l - 9 * o * u, v = l * l - 3 * s * u, c = 0;
  if (za(f) && za(h))
    if (za(s))
      i[0] = 0;
    else {
      var p = -l / s;
      p >= 0 && p <= 1 && (i[c++] = p);
    }
  else {
    var d = h * h - 4 * f * v;
    if (za(d)) {
      var g = h / f, p = -s / o + g, y = -g / 2;
      p >= 0 && p <= 1 && (i[c++] = p), y >= 0 && y <= 1 && (i[c++] = y);
    } else if (d > 0) {
      var m = Ua(d), _ = f * s + 1.5 * o * (-h + m), S = f * s + 1.5 * o * (-h - m);
      _ < 0 ? _ = -kl(-_, Vl) : _ = kl(_, Vl), S < 0 ? S = -kl(-S, Vl) : S = kl(S, Vl);
      var p = (-s - (_ + S)) / (3 * o);
      p >= 0 && p <= 1 && (i[c++] = p);
    } else {
      var w = (2 * f * s - 3 * o * h) / (2 * Ua(f * f * f)), x = Math.acos(w) / 3, b = Ua(f), T = Math.cos(x), p = (-s - 2 * b * T) / (3 * o), y = (-s + b * (T + Lm * Math.sin(x))) / (3 * o), D = (-s + b * (T - Lm * Math.sin(x))) / (3 * o);
      p >= 0 && p <= 1 && (i[c++] = p), y >= 0 && y <= 1 && (i[c++] = y), D >= 0 && D <= 1 && (i[c++] = D);
    }
  }
  return c;
}
function Yb(r, e, t, a, n) {
  var i = 6 * t - 12 * e + 6 * r, o = 9 * e + 3 * a - 3 * r - 9 * t, s = 3 * e - 3 * r, l = 0;
  if (za(o)) {
    if (Ub(i)) {
      var u = -s / i;
      u >= 0 && u <= 1 && (n[l++] = u);
    }
  } else {
    var f = i * i - 4 * o * s;
    if (za(f))
      n[0] = -i / (2 * o);
    else if (f > 0) {
      var h = Ua(f), u = (-i + h) / (2 * o), v = (-i - h) / (2 * o);
      u >= 0 && u <= 1 && (n[l++] = u), v >= 0 && v <= 1 && (n[l++] = v);
    }
  }
  return l;
}
function Ka(r, e, t, a, n, i) {
  var o = (e - r) * n + r, s = (t - e) * n + e, l = (a - t) * n + t, u = (s - o) * n + o, f = (l - s) * n + s, h = (f - u) * n + u;
  i[0] = r, i[1] = o, i[2] = u, i[3] = h, i[4] = h, i[5] = f, i[6] = l, i[7] = a;
}
function Zb(r, e, t, a, n, i, o, s, l, u, f) {
  var h, v = 5e-3, c = 1 / 0, p, d, g, y;
  Vr[0] = l, Vr[1] = u;
  for (var m = 0; m < 1; m += 0.05)
    rr[0] = ae(r, t, n, o, m), rr[1] = ae(e, a, i, s, m), g = Qn(Vr, rr), g < c && (h = m, c = g);
  c = 1 / 0;
  for (var _ = 0; _ < 32 && !(v < $b); _++)
    p = h - v, d = h + v, rr[0] = ae(r, t, n, o, p), rr[1] = ae(e, a, i, s, p), g = Qn(rr, Vr), p >= 0 && g < c ? (h = p, c = g) : (eo[0] = ae(r, t, n, o, d), eo[1] = ae(e, a, i, s, d), y = Qn(eo, Vr), d <= 1 && y < c ? (h = d, c = y) : v *= 0.5);
  return f && (f[0] = ae(r, t, n, o, h), f[1] = ae(e, a, i, s, h)), Ua(c);
}
function j2(r, e, t, a, n, i, o, s, l) {
  for (var u = r, f = e, h = 0, v = 1 / l, c = 1; c <= l; c++) {
    var p = c * v, d = ae(r, t, n, o, p), g = ae(e, a, i, s, p), y = d - u, m = g - f;
    h += Math.sqrt(y * y + m * m), u = d, f = g;
  }
  return h;
}
function se(r, e, t, a) {
  var n = 1 - a;
  return n * (n * r + 2 * a * e) + a * a * t;
}
function Mp(r, e, t, a) {
  return 2 * ((1 - a) * (e - r) + a * (t - e));
}
function Q2(r, e, t, a, n) {
  var i = r - 2 * e + t, o = 2 * (e - r), s = r - a, l = 0;
  if (za(i)) {
    if (Ub(o)) {
      var u = -s / o;
      u >= 0 && u <= 1 && (n[l++] = u);
    }
  } else {
    var f = o * o - 4 * i * s;
    if (za(f)) {
      var u = -o / (2 * i);
      u >= 0 && u <= 1 && (n[l++] = u);
    } else if (f > 0) {
      var h = Ua(f), u = (-o + h) / (2 * i), v = (-o - h) / (2 * i);
      u >= 0 && u <= 1 && (n[l++] = u), v >= 0 && v <= 1 && (n[l++] = v);
    }
  }
  return l;
}
function Xb(r, e, t) {
  var a = r + t - 2 * e;
  return a === 0 ? 0.5 : (r - e) / a;
}
function Gs(r, e, t, a, n) {
  var i = (e - r) * a + r, o = (t - e) * a + e, s = (o - i) * a + i;
  n[0] = r, n[1] = i, n[2] = s, n[3] = s, n[4] = o, n[5] = t;
}
function qb(r, e, t, a, n, i, o, s, l) {
  var u, f = 5e-3, h = 1 / 0;
  Vr[0] = o, Vr[1] = s;
  for (var v = 0; v < 1; v += 0.05) {
    rr[0] = se(r, t, n, v), rr[1] = se(e, a, i, v);
    var c = Qn(Vr, rr);
    c < h && (u = v, h = c);
  }
  h = 1 / 0;
  for (var p = 0; p < 32 && !(f < $b); p++) {
    var d = u - f, g = u + f;
    rr[0] = se(r, t, n, d), rr[1] = se(e, a, i, d);
    var c = Qn(rr, Vr);
    if (d >= 0 && c < h)
      u = d, h = c;
    else {
      eo[0] = se(r, t, n, g), eo[1] = se(e, a, i, g);
      var y = Qn(eo, Vr);
      g <= 1 && y < h ? (u = g, h = y) : f *= 0.5;
    }
  }
  return l && (l[0] = se(r, t, n, u), l[1] = se(e, a, i, u)), Ua(h);
}
function J2(r, e, t, a, n, i, o) {
  for (var s = r, l = e, u = 0, f = 1 / o, h = 1; h <= o; h++) {
    var v = h * f, c = se(r, t, n, v), p = se(e, a, i, v), d = c - s, g = p - l;
    u += Math.sqrt(d * d + g * g), s = c, l = p;
  }
  return u;
}
var tE = /cubic-bezier\(([0-9,\.e ]+)\)/;
function gg(r) {
  var e = r && tE.exec(r);
  if (e) {
    var t = e[1].split(","), a = +mr(t[0]), n = +mr(t[1]), i = +mr(t[2]), o = +mr(t[3]);
    if (isNaN(a + n + i + o))
      return;
    var s = [];
    return function(l) {
      return l <= 0 ? 0 : l >= 1 ? 1 : of(0, a, i, 1, l, s) && ae(0, n, o, 1, s[0]);
    };
  }
}
var eE = function() {
  function r(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 || Xt, this.ondestroy = e.ondestroy || Xt, this.onrestart = e.onrestart || Xt, e.easing && this.setEasing(e.easing);
  }
  return r.prototype.step = function(e, t) {
    if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
      this._pausedTime += t;
      return;
    }
    var a = this._life, n = e - this._startTime - this._pausedTime, i = n / a;
    i < 0 && (i = 0), i = Math.min(i, 1);
    var o = this.easingFunc, s = o ? o(i) : i;
    if (this.onframe(s), i === 1)
      if (this.loop) {
        var l = n % a;
        this._startTime = e - l, this._pausedTime = 0, this.onrestart();
      } else
        return !0;
    return !1;
  }, r.prototype.pause = function() {
    this._paused = !0;
  }, r.prototype.resume = function() {
    this._paused = !1;
  }, r.prototype.setEasing = function(e) {
    this.easing = e, this.easingFunc = q(e) ? e : Wb[e] || gg(e);
  }, r;
}();
const rE = eE;
var Kb = function() {
  function r(e) {
    this.value = e;
  }
  return r;
}(), aE = function() {
  function r() {
    this._len = 0;
  }
  return r.prototype.insert = function(e) {
    var t = new Kb(e);
    return this.insertEntry(t), t;
  }, r.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++;
  }, r.prototype.remove = function(e) {
    var t = e.prev, a = e.next;
    t ? t.next = a : this.head = a, a ? a.prev = t : this.tail = t, e.next = e.prev = null, this._len--;
  }, r.prototype.len = function() {
    return this._len;
  }, r.prototype.clear = function() {
    this.head = this.tail = null, this._len = 0;
  }, r;
}(), nE = function() {
  function r(e) {
    this._list = new aE(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  }
  return r.prototype.put = function(e, t) {
    var a = this._list, n = this._map, i = null;
    if (n[e] == null) {
      var o = a.len(), s = this._lastRemovedEntry;
      if (o >= this._maxSize && o > 0) {
        var l = a.head;
        a.remove(l), delete n[l.key], i = l.value, this._lastRemovedEntry = l;
      }
      s ? s.value = t : s = new Kb(t), s.key = e, a.insertEntry(s), n[e] = s;
    }
    return i;
  }, r.prototype.get = function(e) {
    var t = this._map[e], a = this._list;
    if (t != null)
      return t !== a.tail && (a.remove(t), a.insertEntry(t)), t.value;
  }, r.prototype.clear = function() {
    this._list.clear(), this._map = {};
  }, r.prototype.len = function() {
    return this._list.len();
  }, r;
}();
const hl = nE;
var Pm = {
  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 wr(r) {
  return r = Math.round(r), r < 0 ? 0 : r > 255 ? 255 : r;
}
function iE(r) {
  return r = Math.round(r), r < 0 ? 0 : r > 360 ? 360 : r;
}
function Fs(r) {
  return r < 0 ? 0 : r > 1 ? 1 : r;
}
function tv(r) {
  var e = r;
  return e.length && e.charAt(e.length - 1) === "%" ? wr(parseFloat(e) / 100 * 255) : wr(parseInt(e, 10));
}
function Jn(r) {
  var e = r;
  return e.length && e.charAt(e.length - 1) === "%" ? Fs(parseFloat(e) / 100) : Fs(parseFloat(e));
}
function ev(r, e, t) {
  return t < 0 ? t += 1 : t > 1 && (t -= 1), t * 6 < 1 ? r + (e - r) * t * 6 : t * 2 < 1 ? e : t * 3 < 2 ? r + (e - r) * (2 / 3 - t) * 6 : r;
}
function Ga(r, e, t) {
  return r + (e - r) * t;
}
function je(r, e, t, a, n) {
  return r[0] = e, r[1] = t, r[2] = a, r[3] = n, r;
}
function Ip(r, e) {
  return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r;
}
var jb = new hl(20), Bl = null;
function Ti(r, e) {
  Bl && Ip(Bl, e), Bl = jb.put(r, Bl || e.slice());
}
function $e(r, e) {
  if (r) {
    e = e || [];
    var t = jb.get(r);
    if (t)
      return Ip(e, t);
    r = r + "";
    var a = r.replace(/ /g, "").toLowerCase();
    if (a in Pm)
      return Ip(e, Pm[a]), Ti(r, e), e;
    var n = a.length;
    if (a.charAt(0) === "#") {
      if (n === 4 || n === 5) {
        var i = parseInt(a.slice(1, 4), 16);
        if (!(i >= 0 && i <= 4095)) {
          je(e, 0, 0, 0, 1);
          return;
        }
        return je(e, (i & 3840) >> 4 | (i & 3840) >> 8, i & 240 | (i & 240) >> 4, i & 15 | (i & 15) << 4, n === 5 ? parseInt(a.slice(4), 16) / 15 : 1), Ti(r, e), e;
      } else if (n === 7 || n === 9) {
        var i = parseInt(a.slice(1, 7), 16);
        if (!(i >= 0 && i <= 16777215)) {
          je(e, 0, 0, 0, 1);
          return;
        }
        return je(e, (i & 16711680) >> 16, (i & 65280) >> 8, i & 255, n === 9 ? parseInt(a.slice(7), 16) / 255 : 1), Ti(r, e), e;
      }
      return;
    }
    var o = a.indexOf("("), s = a.indexOf(")");
    if (o !== -1 && s + 1 === n) {
      var l = a.substr(0, o), u = a.substr(o + 1, s - (o + 1)).split(","), f = 1;
      switch (l) {
        case "rgba":
          if (u.length !== 4)
            return u.length === 3 ? je(e, +u[0], +u[1], +u[2], 1) : je(e, 0, 0, 0, 1);
          f = Jn(u.pop());
        case "rgb":
          if (u.length >= 3)
            return je(e, tv(u[0]), tv(u[1]), tv(u[2]), u.length === 3 ? f : Jn(u[3])), Ti(r, e), e;
          je(e, 0, 0, 0, 1);
          return;
        case "hsla":
          if (u.length !== 4) {
            je(e, 0, 0, 0, 1);
            return;
          }
          return u[3] = Jn(u[3]), Lp(u, e), Ti(r, e), e;
        case "hsl":
          if (u.length !== 3) {
            je(e, 0, 0, 0, 1);
            return;
          }
          return Lp(u, e), Ti(r, e), e;
        default:
          return;
      }
    }
    je(e, 0, 0, 0, 1);
  }
}
function Lp(r, e) {
  var t = (parseFloat(r[0]) % 360 + 360) % 360 / 360, a = Jn(r[1]), n = Jn(r[2]), i = n <= 0.5 ? n * (a + 1) : n + a - n * a, o = n * 2 - i;
  return e = e || [], je(e, wr(ev(o, i, t + 1 / 3) * 255), wr(ev(o, i, t) * 255), wr(ev(o, i, t - 1 / 3) * 255), 1), r.length === 4 && (e[3] = r[3]), e;
}
function oE(r) {
  if (r) {
    var e = r[0] / 255, t = r[1] / 255, a = r[2] / 255, n = Math.min(e, t, a), i = Math.max(e, t, a), o = i - n, s = (i + n) / 2, l, u;
    if (o === 0)
      l = 0, u = 0;
    else {
      s < 0.5 ? u = o / (i + n) : u = o / (2 - i - n);
      var f = ((i - e) / 6 + o / 2) / o, h = ((i - t) / 6 + o / 2) / o, v = ((i - a) / 6 + o / 2) / o;
      e === i ? l = v - h : t === i ? l = 1 / 3 + f - v : a === i && (l = 2 / 3 + h - f), l < 0 && (l += 1), l > 1 && (l -= 1);
    }
    var c = [l * 360, u, s];
    return r[3] != null && c.push(r[3]), c;
  }
}
function Ep(r, e) {
  var t = $e(r);
  if (t) {
    for (var a = 0; a < 3; a++)
      e < 0 ? t[a] = t[a] * (1 - e) | 0 : t[a] = (255 - t[a]) * e + t[a] | 0, t[a] > 255 ? t[a] = 255 : t[a] < 0 && (t[a] = 0);
    return ua(t, t.length === 4 ? "rgba" : "rgb");
  }
}
function rv(r, e, t) {
  if (!(!(e && e.length) || !(r >= 0 && r <= 1))) {
    t = t || [];
    var a = r * (e.length - 1), n = Math.floor(a), i = Math.ceil(a), o = e[n], s = e[i], l = a - n;
    return t[0] = wr(Ga(o[0], s[0], l)), t[1] = wr(Ga(o[1], s[1], l)), t[2] = wr(Ga(o[2], s[2], l)), t[3] = Fs(Ga(o[3], s[3], l)), t;
  }
}
function sE(r, e, t) {
  if (!(!(e && e.length) || !(r >= 0 && r <= 1))) {
    var a = r * (e.length - 1), n = Math.floor(a), i = Math.ceil(a), o = $e(e[n]), s = $e(e[i]), l = a - n, u = ua([
      wr(Ga(o[0], s[0], l)),
      wr(Ga(o[1], s[1], l)),
      wr(Ga(o[2], s[2], l)),
      Fs(Ga(o[3], s[3], l))
    ], "rgba");
    return t ? {
      color: u,
      leftIndex: n,
      rightIndex: i,
      value: a
    } : u;
  }
}
function Cs(r, e, t, a) {
  var n = $e(r);
  if (r)
    return n = oE(n), e != null && (n[0] = iE(e)), t != null && (n[1] = Jn(t)), a != null && (n[2] = Jn(a)), ua(Lp(n), "rgba");
}
function sf(r, e) {
  var t = $e(r);
  if (t && e != null)
    return t[3] = Fs(e), ua(t, "rgba");
}
function ua(r, e) {
  if (!(!r || !r.length)) {
    var t = r[0] + "," + r[1] + "," + r[2];
    return (e === "rgba" || e === "hsva" || e === "hsla") && (t += "," + r[3]), e + "(" + t + ")";
  }
}
function lf(r, e) {
  var t = $e(r);
  return t ? (0.299 * t[0] + 0.587 * t[1] + 0.114 * t[2]) * t[3] / 255 + (1 - t[3]) * e : 0;
}
var uf = Math.round;
function Hs(r) {
  var e;
  if (!r || r === "transparent")
    r = "none";
  else if (typeof r == "string" && r.indexOf("rgba") > -1) {
    var t = $e(r);
    t && (r = "rgb(" + t[0] + "," + t[1] + "," + t[2] + ")", e = t[3]);
  }
  return {
    color: r,
    opacity: e ?? 1
  };
}
var Rm = 1e-4;
function Fa(r) {
  return r < Rm && r > -Rm;
}
function zl(r) {
  return uf(r * 1e3) / 1e3;
}
function Pp(r) {
  return uf(r * 1e4) / 1e4;
}
function lE(r) {
  return "matrix(" + zl(r[0]) + "," + zl(r[1]) + "," + zl(r[2]) + "," + zl(r[3]) + "," + Pp(r[4]) + "," + Pp(r[5]) + ")";
}
var uE = {
  left: "start",
  right: "end",
  center: "middle",
  middle: "middle"
};
function fE(r, e, t) {
  return t === "top" ? r += e / 2 : t === "bottom" && (r -= e / 2), r;
}
function hE(r) {
  return r && (r.shadowBlur || r.shadowOffsetX || r.shadowOffsetY);
}
function vE(r) {
  var e = r.style, t = r.getGlobalScale();
  return [
    e.shadowColor,
    (e.shadowBlur || 0).toFixed(2),
    (e.shadowOffsetX || 0).toFixed(2),
    (e.shadowOffsetY || 0).toFixed(2),
    t[0],
    t[1]
  ].join(",");
}
function Qb(r) {
  return r && !!r.image;
}
function cE(r) {
  return r && !!r.svgElement;
}
function yg(r) {
  return Qb(r) || cE(r);
}
function Jb(r) {
  return r.type === "linear";
}
function tT(r) {
  return r.type === "radial";
}
function eT(r) {
  return r && (r.type === "linear" || r.type === "radial");
}
function lh(r) {
  return "url(#" + r + ")";
}
function rT(r) {
  var e = r.getGlobalScale(), t = Math.max(e[0], e[1]);
  return Math.max(Math.ceil(Math.log(t) / Math.log(10)), 1);
}
function aT(r) {
  var e = r.x || 0, t = r.y || 0, a = (r.rotation || 0) * Ou, n = ut(r.scaleX, 1), i = ut(r.scaleY, 1), o = r.skewX || 0, s = r.skewY || 0, l = [];
  return (e || t) && l.push("translate(" + e + "px," + t + "px)"), a && l.push("rotate(" + a + ")"), (n !== 1 || i !== 1) && l.push("scale(" + n + "," + i + ")"), (o || s) && l.push("skew(" + uf(o * Ou) + "deg, " + uf(s * Ou) + "deg)"), l.join(" ");
}
var pE = function() {
  return wt.hasGlobalWindow && q(window.btoa) ? function(r) {
    return window.btoa(unescape(encodeURIComponent(r)));
  } : typeof Buffer < "u" ? function(r) {
    return Buffer.from(r).toString("base64");
  } : function(r) {
    return {}.NODE_ENV !== "production" && Sr("Base64 isn't natively supported in the current environment."), null;
  };
}(), Rp = Array.prototype.slice;
function ra(r, e, t) {
  return (e - r) * t + r;
}
function av(r, e, t, a) {
  for (var n = e.length, i = 0; i < n; i++)
    r[i] = ra(e[i], t[i], a);
  return r;
}
function dE(r, e, t, a) {
  for (var n = e.length, i = n && e[0].length, o = 0; o < n; o++) {
    r[o] || (r[o] = []);
    for (var s = 0; s < i; s++)
      r[o][s] = ra(e[o][s], t[o][s], a);
  }
  return r;
}
function Gl(r, e, t, a) {
  for (var n = e.length, i = 0; i < n; i++)
    r[i] = e[i] + t[i] * a;
  return r;
}
function Nm(r, e, t, a) {
  for (var n = e.length, i = n && e[0].length, o = 0; o < n; o++) {
    r[o] || (r[o] = []);
    for (var s = 0; s < i; s++)
      r[o][s] = e[o][s] + t[o][s] * a;
  }
  return r;
}
function gE(r, e) {
  for (var t = r.length, a = e.length, n = t > a ? e : r, i = Math.min(t, a), o = n[i - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = i; s < Math.max(t, a); s++)
    n.push({
      offset: o.offset,
      color: o.color.slice()
    });
}
function yE(r, e, t) {
  var a = r, n = e;
  if (!(!a.push || !n.push)) {
    var i = a.length, o = n.length;
    if (i !== o) {
      var s = i > o;
      if (s)
        a.length = o;
      else
        for (var l = i; l < o; l++)
          a.push(t === 1 ? n[l] : Rp.call(n[l]));
    }
    for (var u = a[0] && a[0].length, l = 0; l < a.length; l++)
      if (t === 1)
        isNaN(a[l]) && (a[l] = n[l]);
      else
        for (var f = 0; f < u; f++)
          isNaN(a[l][f]) && (a[l][f] = n[l][f]);
  }
}
function As(r) {
  if (Se(r)) {
    var e = r.length;
    if (Se(r[0])) {
      for (var t = [], a = 0; a < e; a++)
        t.push(Rp.call(r[a]));
      return t;
    }
    return Rp.call(r);
  }
  return r;
}
function Gu(r) {
  return r[0] = Math.floor(r[0]) || 0, r[1] = Math.floor(r[1]) || 0, r[2] = Math.floor(r[2]) || 0, r[3] = r[3] == null ? 1 : r[3], "rgba(" + r.join(",") + ")";
}
function mE(r) {
  return Se(r && r[0]) ? 2 : 1;
}
var Fl = 0, Fu = 1, nT = 2, cs = 3, Np = 4, Op = 5, Om = 6;
function km(r) {
  return r === Np || r === Op;
}
function Hl(r) {
  return r === Fu || r === nT;
}
var Fo = [0, 0, 0, 0], _E = function() {
  function r(e) {
    this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  }
  return r.prototype.isFinished = function() {
    return this._finished;
  }, r.prototype.setFinished = function() {
    this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  }, r.prototype.needsAnimate = function() {
    return this.keyframes.length >= 1;
  }, r.prototype.getAdditiveTrack = function() {
    return this._additiveTrack;
  }, r.prototype.addKeyframe = function(e, t, a) {
    this._needsSort = !0;
    var n = this.keyframes, i = n.length, o = !1, s = Om, l = t;
    if (Se(t)) {
      var u = mE(t);
      s = u, (u === 1 && !Ct(t[0]) || u === 2 && !Ct(t[0][0])) && (o = !0);
    } else if (Ct(t) && !li(t))
      s = Fl;
    else if ($(t))
      if (!isNaN(+t))
        s = Fl;
      else {
        var f = $e(t);
        f && (l = f, s = cs);
      }
    else if (ih(t)) {
      var h = V({}, l);
      h.colorStops = G(t.colorStops, function(c) {
        return {
          offset: c.offset,
          color: $e(c.color)
        };
      }), Jb(t) ? s = Np : tT(t) && (s = Op), l = h;
    }
    i === 0 ? this.valType = s : (s !== this.valType || s === Om) && (o = !0), this.discrete = this.discrete || o;
    var v = {
      time: e,
      value: l,
      rawValue: t,
      percent: 0
    };
    return a && (v.easing = a, v.easingFunc = q(a) ? a : Wb[a] || gg(a)), n.push(v), v;
  }, r.prototype.prepare = function(e, t) {
    var a = this.keyframes;
    this._needsSort && a.sort(function(d, g) {
      return d.time - g.time;
    });
    for (var n = this.valType, i = a.length, o = a[i - 1], s = this.discrete, l = Hl(n), u = km(n), f = 0; f < i; f++) {
      var h = a[f], v = h.value, c = o.value;
      h.percent = h.time / e, s || (l && f !== i - 1 ? yE(v, c, n) : u && gE(v.colorStops, c.colorStops));
    }
    if (!s && n !== Op && t && this.needsAnimate() && t.needsAnimate() && n === t.valType && !t._finished) {
      this._additiveTrack = t;
      for (var p = a[0].value, f = 0; f < i; f++)
        n === Fl ? a[f].additiveValue = a[f].value - p : n === cs ? a[f].additiveValue = Gl([], a[f].value, p, -1) : Hl(n) && (a[f].additiveValue = n === Fu ? Gl([], a[f].value, p, -1) : Nm([], a[f].value, p, -1));
    }
  }, r.prototype.step = function(e, t) {
    if (!this._finished) {
      this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
      var a = this._additiveTrack != null, n = a ? "additiveValue" : "value", i = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = i === cs, f, h = this._lastFr, v = Math.min, c, p;
      if (s === 1)
        c = p = o[0];
      else {
        if (t < 0)
          f = 0;
        else if (t < this._lastFrP) {
          var d = v(h + 1, s - 1);
          for (f = d; f >= 0 && !(o[f].percent <= t); f--)
            ;
          f = v(f, s - 2);
        } else {
          for (f = h; f < s && !(o[f].percent > t); f++)
            ;
          f = v(f - 1, s - 2);
        }
        p = o[f + 1], c = o[f];
      }
      if (c && p) {
        this._lastFr = f, this._lastFrP = t;
        var g = p.percent - c.percent, y = g === 0 ? 1 : v((t - c.percent) / g, 1);
        p.easingFunc && (y = p.easingFunc(y));
        var m = a ? this._additiveValue : u ? Fo : e[l];
        if ((Hl(i) || u) && !m && (m = this._additiveValue = []), this.discrete)
          e[l] = y < 1 ? c.rawValue : p.rawValue;
        else if (Hl(i))
          i === Fu ? av(m, c[n], p[n], y) : dE(m, c[n], p[n], y);
        else if (km(i)) {
          var _ = c[n], S = p[n], w = i === Np;
          e[l] = {
            type: w ? "linear" : "radial",
            x: ra(_.x, S.x, y),
            y: ra(_.y, S.y, y),
            colorStops: G(_.colorStops, function(b, T) {
              var D = S.colorStops[T];
              return {
                offset: ra(b.offset, D.offset, y),
                color: Gu(av([], b.color, D.color, y))
              };
            }),
            global: S.global
          }, w ? (e[l].x2 = ra(_.x2, S.x2, y), e[l].y2 = ra(_.y2, S.y2, y)) : e[l].r = ra(_.r, S.r, y);
        } else if (u)
          av(m, c[n], p[n], y), a || (e[l] = Gu(m));
        else {
          var x = ra(c[n], p[n], y);
          a ? this._additiveValue = x : e[l] = x;
        }
        a && this._addToTarget(e);
      }
    }
  }, r.prototype._addToTarget = function(e) {
    var t = this.valType, a = this.propName, n = this._additiveValue;
    t === Fl ? e[a] = e[a] + n : t === cs ? ($e(e[a], Fo), Gl(Fo, Fo, n, 1), e[a] = Gu(Fo)) : t === Fu ? Gl(e[a], e[a], n, 1) : t === nT && Nm(e[a], e[a], n, 1);
  }, r;
}(), mg = function() {
  function r(e, t, a, n) {
    if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = t, t && n) {
      Sr("Can' use additive animation on looped animation.");
      return;
    }
    this._additiveAnimators = n, this._allowDiscrete = a;
  }
  return r.prototype.getMaxTime = function() {
    return this._maxTime;
  }, r.prototype.getDelay = function() {
    return this._delay;
  }, r.prototype.getLoop = function() {
    return this._loop;
  }, r.prototype.getTarget = function() {
    return this._target;
  }, r.prototype.changeTarget = function(e) {
    this._target = e;
  }, r.prototype.when = function(e, t, a) {
    return this.whenWithKeys(e, t, _t(t), a);
  }, r.prototype.whenWithKeys = function(e, t, a, n) {
    for (var i = this._tracks, o = 0; o < a.length; o++) {
      var s = a[o], l = i[s];
      if (!l) {
        l = i[s] = new _E(s);
        var u = void 0, f = this._getAdditiveTrack(s);
        if (f) {
          var h = f.keyframes, v = h[h.length - 1];
          u = v && v.value, f.valType === cs && u && (u = Gu(u));
        } else
          u = this._target[s];
        if (u == null)
          continue;
        e > 0 && l.addKeyframe(0, As(u), n), this._trackKeys.push(s);
      }
      l.addKeyframe(e, As(t[s]), n);
    }
    return this._maxTime = Math.max(this._maxTime, e), this;
  }, r.prototype.pause = function() {
    this._clip.pause(), this._paused = !0;
  }, r.prototype.resume = function() {
    this._clip.resume(), this._paused = !1;
  }, r.prototype.isPaused = function() {
    return !!this._paused;
  }, r.prototype.duration = function(e) {
    return this._maxTime = e, this._force = !0, this;
  }, r.prototype._doneCallback = function() {
    this._setTracksFinished(), this._clip = null;
    var e = this._doneCbs;
    if (e)
      for (var t = e.length, a = 0; a < t; a++)
        e[a].call(this);
  }, r.prototype._abortedCallback = function() {
    this._setTracksFinished();
    var e = this.animation, t = this._abortedCbs;
    if (e && e.removeClip(this._clip), this._clip = null, t)
      for (var a = 0; a < t.length; a++)
        t[a].call(this);
  }, r.prototype._setTracksFinished = function() {
    for (var e = this._tracks, t = this._trackKeys, a = 0; a < t.length; a++)
      e[t[a]].setFinished();
  }, r.prototype._getAdditiveTrack = function(e) {
    var t, a = this._additiveAnimators;
    if (a)
      for (var n = 0; n < a.length; n++) {
        var i = a[n].getTrack(e);
        i && (t = i);
      }
    return t;
  }, r.prototype.start = function(e) {
    if (!(this._started > 0)) {
      this._started = 1;
      for (var t = this, a = [], n = this._maxTime || 0, i = 0; i < this._trackKeys.length; i++) {
        var o = this._trackKeys[i], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, f = u.length;
        if (s.prepare(n, l), s.needsAnimate())
          if (!this._allowDiscrete && s.discrete) {
            var h = u[f - 1];
            h && (t._target[s.propName] = h.rawValue), s.setFinished();
          } else
            a.push(s);
      }
      if (a.length || this._force) {
        var v = new rE({
          life: n,
          loop: this._loop,
          delay: this._delay || 0,
          onframe: function(c) {
            t._started = 2;
            var p = t._additiveAnimators;
            if (p) {
              for (var d = !1, g = 0; g < p.length; g++)
                if (p[g]._clip) {
                  d = !0;
                  break;
                }
              d || (t._additiveAnimators = null);
            }
            for (var g = 0; g < a.length; g++)
              a[g].step(t._target, c);
            var y = t._onframeCbs;
            if (y)
              for (var g = 0; g < y.length; g++)
                y[g](t._target, c);
          },
          ondestroy: function() {
            t._doneCallback();
          }
        });
        this._clip = v, this.animation && this.animation.addClip(v), e && v.setEasing(e);
      } else
        this._doneCallback();
      return this;
    }
  }, r.prototype.stop = function(e) {
    if (this._clip) {
      var t = this._clip;
      e && t.onframe(1), this._abortedCallback();
    }
  }, r.prototype.delay = function(e) {
    return this._delay = e, this;
  }, r.prototype.during = function(e) {
    return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  }, r.prototype.done = function(e) {
    return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  }, r.prototype.aborted = function(e) {
    return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  }, r.prototype.getClip = function() {
    return this._clip;
  }, r.prototype.getTrack = function(e) {
    return this._tracks[e];
  }, r.prototype.getTracks = function() {
    var e = this;
    return G(this._trackKeys, function(t) {
      return e._tracks[t];
    });
  }, r.prototype.stopTracks = function(e, t) {
    if (!e.length || !this._clip)
      return !0;
    for (var a = this._tracks, n = this._trackKeys, i = 0; i < e.length; i++) {
      var o = a[e[i]];
      o && !o.isFinished() && (t ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
    }
    for (var s = !0, i = 0; i < n.length; i++)
      if (!a[n[i]].isFinished()) {
        s = !1;
        break;
      }
    return s && this._abortedCallback(), s;
  }, r.prototype.saveTo = function(e, t, a) {
    if (e) {
      t = t || this._trackKeys;
      for (var n = 0; n < t.length; n++) {
        var i = t[n], o = this._tracks[i];
        if (!(!o || o.isFinished())) {
          var s = o.keyframes, l = s[a ? 0 : s.length - 1];
          l && (e[i] = As(l.rawValue));
        }
      }
    }
  }, r.prototype.__changeFinalValue = function(e, t) {
    t = t || _t(e);
    for (var a = 0; a < t.length; a++) {
      var n = t[a], i = this._tracks[n];
      if (i) {
        var o = i.keyframes;
        if (o.length > 1) {
          var s = o.pop();
          i.addKeyframe(s.time, e[n]), i.prepare(this._maxTime, i.getAdditiveTrack());
        }
      }
    }
  }, r;
}();
function ji() {
  return (/* @__PURE__ */ new Date()).getTime();
}
var SE = function(r) {
  N(e, r);
  function e(t) {
    var a = r.call(this) || this;
    return a._running = !1, a._time = 0, a._pausedTime = 0, a._pauseStart = 0, a._paused = !1, t = t || {}, a.stage = t.stage || {}, a;
  }
  return e.prototype.addClip = function(t) {
    t.animation && this.removeClip(t), this._head ? (this._tail.next = t, t.prev = this._tail, t.next = null, this._tail = t) : this._head = this._tail = t, t.animation = this;
  }, e.prototype.addAnimator = function(t) {
    t.animation = this;
    var a = t.getClip();
    a && this.addClip(a);
  }, e.prototype.removeClip = function(t) {
    if (t.animation) {
      var a = t.prev, n = t.next;
      a ? a.next = n : this._head = n, n ? n.prev = a : this._tail = a, t.next = t.prev = t.animation = null;
    }
  }, e.prototype.removeAnimator = function(t) {
    var a = t.getClip();
    a && this.removeClip(a), t.animation = null;
  }, e.prototype.update = function(t) {
    for (var a = ji() - this._pausedTime, n = a - this._time, i = this._head; i; ) {
      var o = i.next, s = i.step(a, n);
      s && (i.ondestroy(), this.removeClip(i)), i = o;
    }
    this._time = a, t || (this.trigger("frame", n), this.stage.update && this.stage.update());
  }, e.prototype._startLoop = function() {
    var t = this;
    this._running = !0;
    function a() {
      t._running && (Ap(a), !t._paused && t.update());
    }
    Ap(a);
  }, e.prototype.start = function() {
    this._running || (this._time = ji(), this._pausedTime = 0, this._startLoop());
  }, e.prototype.stop = function() {
    this._running = !1;
  }, e.prototype.pause = function() {
    this._paused || (this._pauseStart = ji(), this._paused = !0);
  }, e.prototype.resume = function() {
    this._paused && (this._pausedTime += ji() - this._pauseStart, this._paused = !1);
  }, e.prototype.clear = function() {
    for (var t = this._head; t; ) {
      var a = t.next;
      t.prev = t.next = t.animation = null, t = a;
    }
    this._head = this._tail = null;
  }, e.prototype.isFinished = function() {
    return this._head == null;
  }, e.prototype.animate = function(t, a) {
    a = a || {}, this.start();
    var n = new mg(t, a.loop);
    return this.addAnimator(n), n;
  }, e;
}(fr);
const xE = SE;
var wE = 300, nv = wt.domSupported, iv = function() {
  var r = [
    "click",
    "dblclick",
    "mousewheel",
    "wheel",
    "mouseout",
    "mouseup",
    "mousedown",
    "mousemove",
    "contextmenu"
  ], e = [
    "touchstart",
    "touchend",
    "touchmove"
  ], t = {
    pointerdown: 1,
    pointerup: 1,
    pointermove: 1,
    pointerout: 1
  }, a = G(r, function(n) {
    var i = n.replace("mouse", "pointer");
    return t.hasOwnProperty(i) ? i : n;
  });
  return {
    mouse: r,
    touch: e,
    pointer: a
  };
}(), Vm = {
  mouse: ["mousemove", "mouseup"],
  pointer: ["pointermove", "pointerup"]
}, Bm = !1;
function kp(r) {
  var e = r.pointerType;
  return e === "pen" || e === "touch";
}
function bE(r) {
  r.touching = !0, r.touchTimer != null && (clearTimeout(r.touchTimer), r.touchTimer = null), r.touchTimer = setTimeout(function() {
    r.touching = !1, r.touchTimer = null;
  }, 700);
}
function ov(r) {
  r && (r.zrByTouch = !0);
}
function TE(r, e) {
  return Qe(r.dom, new DE(r, e), !0);
}
function iT(r, e) {
  for (var t = e, a = !1; t && t.nodeType !== 9 && !(a = t.domBelongToZr || t !== e && t === r.painterRoot); )
    t = t.parentNode;
  return a;
}
var DE = function() {
  function r(e, t) {
    this.stopPropagation = Xt, this.stopImmediatePropagation = Xt, this.preventDefault = Xt, this.type = t.type, this.target = this.currentTarget = e.dom, this.pointerType = t.pointerType, this.clientX = t.clientX, this.clientY = t.clientY;
  }
  return r;
}(), dr = {
  mousedown: function(r) {
    r = Qe(this.dom, r), this.__mayPointerCapture = [r.zrX, r.zrY], this.trigger("mousedown", r);
  },
  mousemove: function(r) {
    r = Qe(this.dom, r);
    var e = this.__mayPointerCapture;
    e && (r.zrX !== e[0] || r.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", r);
  },
  mouseup: function(r) {
    r = Qe(this.dom, r), this.__togglePointerCapture(!1), this.trigger("mouseup", r);
  },
  mouseout: function(r) {
    r = Qe(this.dom, r);
    var e = r.toElement || r.relatedTarget;
    iT(this, e) || (this.__pointerCapturing && (r.zrEventControl = "no_globalout"), this.trigger("mouseout", r));
  },
  wheel: function(r) {
    Bm = !0, r = Qe(this.dom, r), this.trigger("mousewheel", r);
  },
  mousewheel: function(r) {
    Bm || (r = Qe(this.dom, r), this.trigger("mousewheel", r));
  },
  touchstart: function(r) {
    r = Qe(this.dom, r), ov(r), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(r, "start"), dr.mousemove.call(this, r), dr.mousedown.call(this, r);
  },
  touchmove: function(r) {
    r = Qe(this.dom, r), ov(r), this.handler.processGesture(r, "change"), dr.mousemove.call(this, r);
  },
  touchend: function(r) {
    r = Qe(this.dom, r), ov(r), this.handler.processGesture(r, "end"), dr.mouseup.call(this, r), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < wE && dr.click.call(this, r);
  },
  pointerdown: function(r) {
    dr.mousedown.call(this, r);
  },
  pointermove: function(r) {
    kp(r) || dr.mousemove.call(this, r);
  },
  pointerup: function(r) {
    dr.mouseup.call(this, r);
  },
  pointerout: function(r) {
    kp(r) || dr.mouseout.call(this, r);
  }
};
C(["click", "dblclick", "contextmenu"], function(r) {
  dr[r] = function(e) {
    e = Qe(this.dom, e), this.trigger(r, e);
  };
});
var Vp = {
  pointermove: function(r) {
    kp(r) || Vp.mousemove.call(this, r);
  },
  pointerup: function(r) {
    Vp.mouseup.call(this, r);
  },
  mousemove: function(r) {
    this.trigger("mousemove", r);
  },
  mouseup: function(r) {
    var e = this.__pointerCapturing;
    this.__togglePointerCapture(!1), this.trigger("mouseup", r), e && (r.zrEventControl = "only_globalout", this.trigger("mouseout", r));
  }
};
function CE(r, e) {
  var t = e.domHandlers;
  wt.pointerEventsSupported ? C(iv.pointer, function(a) {
    Hu(e, a, function(n) {
      t[a].call(r, n);
    });
  }) : (wt.touchEventsSupported && C(iv.touch, function(a) {
    Hu(e, a, function(n) {
      t[a].call(r, n), bE(e);
    });
  }), C(iv.mouse, function(a) {
    Hu(e, a, function(n) {
      n = cg(n), e.touching || t[a].call(r, n);
    });
  }));
}
function AE(r, e) {
  wt.pointerEventsSupported ? C(Vm.pointer, t) : wt.touchEventsSupported || C(Vm.mouse, t);
  function t(a) {
    function n(i) {
      i = cg(i), iT(r, i.target) || (i = TE(r, i), e.domHandlers[a].call(r, i));
    }
    Hu(e, a, n, { capture: !0 });
  }
}
function Hu(r, e, t, a) {
  r.mounted[e] = t, r.listenerOpts[e] = a, Cp(r.domTarget, e, t, a);
}
function sv(r) {
  var e = r.mounted;
  for (var t in e)
    e.hasOwnProperty(t) && N2(r.domTarget, t, e[t], r.listenerOpts[t]);
  r.mounted = {};
}
var zm = function() {
  function r(e, t) {
    this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = t;
  }
  return r;
}(), ME = function(r) {
  N(e, r);
  function e(t, a) {
    var n = r.call(this) || this;
    return n.__pointerCapturing = !1, n.dom = t, n.painterRoot = a, n._localHandlerScope = new zm(t, dr), nv && (n._globalHandlerScope = new zm(document, Vp)), CE(n, n._localHandlerScope), n;
  }
  return e.prototype.dispose = function() {
    sv(this._localHandlerScope), nv && sv(this._globalHandlerScope);
  }, e.prototype.setCursor = function(t) {
    this.dom.style && (this.dom.style.cursor = t || "default");
  }, e.prototype.__togglePointerCapture = function(t) {
    if (this.__mayPointerCapture = null, nv && +this.__pointerCapturing ^ +t) {
      this.__pointerCapturing = t;
      var a = this._globalHandlerScope;
      t ? AE(this, a) : sv(a);
    }
  }, e;
}(fr);
const IE = ME;
var oT = 1;
wt.hasGlobalWindow && (oT = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
var ff = oT, Bp = 0.4, zp = "#333", Gp = "#ccc", LE = "#eee", Gm = sh, Fm = 5e-5;
function vn(r) {
  return r > Fm || r < -Fm;
}
var cn = [], Di = [], lv = lr(), uv = Math.abs, EE = function() {
  function r() {
  }
  return r.prototype.getLocalTransform = function(e) {
    return r.getLocalTransform(this, e);
  }, r.prototype.setPosition = function(e) {
    this.x = e[0], this.y = e[1];
  }, r.prototype.setScale = function(e) {
    this.scaleX = e[0], this.scaleY = e[1];
  }, r.prototype.setSkew = function(e) {
    this.skewX = e[0], this.skewY = e[1];
  }, r.prototype.setOrigin = function(e) {
    this.originX = e[0], this.originY = e[1];
  }, r.prototype.needLocalTransform = function() {
    return vn(this.rotation) || vn(this.x) || vn(this.y) || vn(this.scaleX - 1) || vn(this.scaleY - 1) || vn(this.skewX) || vn(this.skewY);
  }, r.prototype.updateTransform = function() {
    var e = this.parent && this.parent.transform, t = this.needLocalTransform(), a = this.transform;
    if (!(t || e)) {
      a && Gm(a);
      return;
    }
    a = a || lr(), t ? this.getLocalTransform(a) : Gm(a), e && (t ? la(a, e, a) : pg(a, e)), this.transform = a, this._resolveGlobalScaleRatio(a);
  }, r.prototype._resolveGlobalScaleRatio = function(e) {
    var t = this.globalScaleRatio;
    if (t != null && t !== 1) {
      this.getGlobalScale(cn);
      var a = cn[0] < 0 ? -1 : 1, n = cn[1] < 0 ? -1 : 1, i = ((cn[0] - a) * t + a) / cn[0] || 0, o = ((cn[1] - n) * t + n) / cn[1] || 0;
      e[0] *= i, e[1] *= i, e[2] *= o, e[3] *= o;
    }
    this.invTransform = this.invTransform || lr(), xo(this.invTransform, e);
  }, r.prototype.getComputedTransform = function() {
    for (var e = this, t = []; e; )
      t.push(e), e = e.parent;
    for (; e = t.pop(); )
      e.updateTransform();
    return this.transform;
  }, r.prototype.setLocalTransform = function(e) {
    if (e) {
      var t = e[0] * e[0] + e[1] * e[1], a = e[2] * e[2] + e[3] * e[3], n = Math.atan2(e[1], e[0]), i = Math.PI / 2 + n - Math.atan2(e[3], e[2]);
      a = Math.sqrt(a) * Math.cos(i), t = Math.sqrt(t), this.skewX = i, this.skewY = 0, this.rotation = -n, this.x = +e[4], this.y = +e[5], this.scaleX = t, this.scaleY = a, this.originX = 0, this.originY = 0;
    }
  }, r.prototype.decomposeTransform = function() {
    if (this.transform) {
      var e = this.parent, t = this.transform;
      e && e.transform && (la(Di, e.invTransform, t), t = Di);
      var a = this.originX, n = this.originY;
      (a || n) && (lv[4] = a, lv[5] = n, la(Di, t, lv), Di[4] -= a, Di[5] -= n, t = Di), this.setLocalTransform(t);
    }
  }, r.prototype.getGlobalScale = function(e) {
    var t = this.transform;
    return e = e || [], t ? (e[0] = Math.sqrt(t[0] * t[0] + t[1] * t[1]), e[1] = Math.sqrt(t[2] * t[2] + t[3] * t[3]), t[0] < 0 && (e[0] = -e[0]), t[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
  }, r.prototype.transformCoordToLocal = function(e, t) {
    var a = [e, t], n = this.invTransform;
    return n && fe(a, a, n), a;
  }, r.prototype.transformCoordToGlobal = function(e, t) {
    var a = [e, t], n = this.transform;
    return n && fe(a, a, n), a;
  }, r.prototype.getLineScale = function() {
    var e = this.transform;
    return e && uv(e[0] - 1) > 1e-10 && uv(e[3] - 1) > 1e-10 ? Math.sqrt(uv(e[0] * e[3] - e[2] * e[1])) : 1;
  }, r.prototype.copyTransform = function(e) {
    sT(this, e);
  }, r.getLocalTransform = function(e, t) {
    t = t || [];
    var a = e.originX || 0, n = e.originY || 0, i = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, f = e.x, h = e.y, v = e.skewX ? Math.tan(e.skewX) : 0, c = e.skewY ? Math.tan(-e.skewY) : 0;
    if (a || n || s || l) {
      var p = a + s, d = n + l;
      t[4] = -p * i - v * d * o, t[5] = -d * o - c * p * i;
    } else
      t[4] = t[5] = 0;
    return t[0] = i, t[3] = o, t[1] = c * i, t[2] = v * o, u && yi(t, t, u), t[4] += a + f, t[5] += n + h, t;
  }, r.initDefaultProps = function() {
    var e = r.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;
  }(), r;
}(), Yr = [
  "x",
  "y",
  "originX",
  "originY",
  "anchorX",
  "anchorY",
  "rotation",
  "scaleX",
  "scaleY",
  "skewX",
  "skewY"
];
function sT(r, e) {
  for (var t = 0; t < Yr.length; t++) {
    var a = Yr[t];
    r[a] = e[a];
  }
}
const na = EE;
var Hm = {};
function Ue(r, e) {
  e = e || Xa;
  var t = Hm[e];
  t || (t = Hm[e] = new hl(500));
  var a = t.get(r);
  return a == null && (a = qa.measureText(r, e).width, t.put(r, a)), a;
}
function Wm(r, e, t, a) {
  var n = Ue(r, e), i = uh(e), o = ps(0, n, t), s = Zi(0, i, a), l = new ht(o, s, n, i);
  return l;
}
function vl(r, e, t, a) {
  var n = ((r || "") + "").split(`
`), i = n.length;
  if (i === 1)
    return Wm(n[0], e, t, a);
  for (var o = new ht(0, 0, 0, 0), s = 0; s < n.length; s++) {
    var l = Wm(n[s], e, t, a);
    s === 0 ? o.copy(l) : o.union(l);
  }
  return o;
}
function ps(r, e, t) {
  return t === "right" ? r -= e : t === "center" && (r -= e / 2), r;
}
function Zi(r, e, t) {
  return t === "middle" ? r -= e / 2 : t === "bottom" && (r -= e), r;
}
function uh(r) {
  return Ue("国", r);
}
function Tr(r, e) {
  return typeof r == "string" ? r.lastIndexOf("%") >= 0 ? parseFloat(r) / 100 * e : parseFloat(r) : r;
}
function hf(r, e, t) {
  var a = e.position || "inside", n = e.distance != null ? e.distance : 5, i = t.height, o = t.width, s = i / 2, l = t.x, u = t.y, f = "left", h = "top";
  if (a instanceof Array)
    l += Tr(a[0], t.width), u += Tr(a[1], t.height), f = null, h = null;
  else
    switch (a) {
      case "left":
        l -= n, u += s, f = "right", h = "middle";
        break;
      case "right":
        l += n + o, u += s, h = "middle";
        break;
      case "top":
        l += o / 2, u -= n, f = "center", h = "bottom";
        break;
      case "bottom":
        l += o / 2, u += i + n, f = "center";
        break;
      case "inside":
        l += o / 2, u += s, f = "center", h = "middle";
        break;
      case "insideLeft":
        l += n, u += s, h = "middle";
        break;
      case "insideRight":
        l += o - n, u += s, f = "right", h = "middle";
        break;
      case "insideTop":
        l += o / 2, u += n, f = "center";
        break;
      case "insideBottom":
        l += o / 2, u += i - n, f = "center", h = "bottom";
        break;
      case "insideTopLeft":
        l += n, u += n;
        break;
      case "insideTopRight":
        l += o - n, u += n, f = "right";
        break;
      case "insideBottomLeft":
        l += n, u += i - n, h = "bottom";
        break;
      case "insideBottomRight":
        l += o - n, u += i - n, f = "right", h = "bottom";
        break;
    }
  return r = r || {}, r.x = l, r.y = u, r.align = f, r.verticalAlign = h, r;
}
var fv = "__zr_normal__", hv = Yr.concat(["ignore"]), PE = $r(Yr, function(r, e) {
  return r[e] = !0, r;
}, { ignore: !1 }), Ci = {}, RE = new ht(0, 0, 0, 0), _g = function() {
  function r(e) {
    this.id = Pb(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  }
  return r.prototype._init = function(e) {
    this.attr(e);
  }, r.prototype.drift = function(e, t, a) {
    switch (this.draggable) {
      case "horizontal":
        t = 0;
        break;
      case "vertical":
        e = 0;
        break;
    }
    var n = this.transform;
    n || (n = this.transform = [1, 0, 0, 1, 0, 0]), n[4] += e, n[5] += t, this.decomposeTransform(), this.markRedraw();
  }, r.prototype.beforeUpdate = function() {
  }, r.prototype.afterUpdate = function() {
  }, r.prototype.update = function() {
    this.updateTransform(), this.__dirty && this.updateInnerText();
  }, r.prototype.updateInnerText = function(e) {
    var t = this._textContent;
    if (t && (!t.ignore || e)) {
      this.textConfig || (this.textConfig = {});
      var a = this.textConfig, n = a.local, i = t.innerTransformable, o = void 0, s = void 0, l = !1;
      i.parent = n ? this : null;
      var u = !1;
      if (i.copyTransform(t), a.position != null) {
        var f = RE;
        a.layoutRect ? f.copy(a.layoutRect) : f.copy(this.getBoundingRect()), n || f.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(Ci, a, f) : hf(Ci, a, f), i.x = Ci.x, i.y = Ci.y, o = Ci.align, s = Ci.verticalAlign;
        var h = a.origin;
        if (h && a.rotation != null) {
          var v = void 0, c = void 0;
          h === "center" ? (v = f.width * 0.5, c = f.height * 0.5) : (v = Tr(h[0], f.width), c = Tr(h[1], f.height)), u = !0, i.originX = -i.x + v + (n ? 0 : f.x), i.originY = -i.y + c + (n ? 0 : f.y);
        }
      }
      a.rotation != null && (i.rotation = a.rotation);
      var p = a.offset;
      p && (i.x += p[0], i.y += p[1], u || (i.originX = -p[0], i.originY = -p[1]));
      var d = a.inside == null ? typeof a.position == "string" && a.position.indexOf("inside") >= 0 : a.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), y = void 0, m = void 0, _ = void 0;
      d && this.canBeInsideText() ? (y = a.insideFill, m = a.insideStroke, (y == null || y === "auto") && (y = this.getInsideTextFill()), (m == null || m === "auto") && (m = this.getInsideTextStroke(y), _ = !0)) : (y = a.outsideFill, m = a.outsideStroke, (y == null || y === "auto") && (y = this.getOutsideFill()), (m == null || m === "auto") && (m = this.getOutsideStroke(y), _ = !0)), y = y || "#000", (y !== g.fill || m !== g.stroke || _ !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = y, g.stroke = m, g.autoStroke = _, g.align = o, g.verticalAlign = s, t.setDefaultTextStyle(g)), t.__dirty |= We, l && t.dirtyStyle(!0);
    }
  }, r.prototype.canBeInsideText = function() {
    return !0;
  }, r.prototype.getInsideTextFill = function() {
    return "#fff";
  }, r.prototype.getInsideTextStroke = function(e) {
    return "#000";
  }, r.prototype.getOutsideFill = function() {
    return this.__zr && this.__zr.isDarkMode() ? Gp : zp;
  }, r.prototype.getOutsideStroke = function(e) {
    var t = this.__zr && this.__zr.getBackgroundColor(), a = typeof t == "string" && $e(t);
    a || (a = [255, 255, 255, 1]);
    for (var n = a[3], i = this.__zr.isDarkMode(), o = 0; o < 3; o++)
      a[o] = a[o] * n + (i ? 0 : 255) * (1 - n);
    return a[3] = 1, ua(a, "rgba");
  }, r.prototype.traverse = function(e, t) {
  }, r.prototype.attrKV = function(e, t) {
    e === "textConfig" ? this.setTextConfig(t) : e === "textContent" ? this.setTextContent(t) : e === "clipPath" ? this.setClipPath(t) : e === "extra" ? (this.extra = this.extra || {}, V(this.extra, t)) : this[e] = t;
  }, r.prototype.hide = function() {
    this.ignore = !0, this.markRedraw();
  }, r.prototype.show = function() {
    this.ignore = !1, this.markRedraw();
  }, r.prototype.attr = function(e, t) {
    if (typeof e == "string")
      this.attrKV(e, t);
    else if (j(e))
      for (var a = e, n = _t(a), i = 0; i < n.length; i++) {
        var o = n[i];
        this.attrKV(o, e[o]);
      }
    return this.markRedraw(), this;
  }, r.prototype.saveCurrentToNormalState = function(e) {
    this._innerSaveToNormal(e);
    for (var t = this._normalState, a = 0; a < this.animators.length; a++) {
      var n = this.animators[a], i = n.__fromStateTransition;
      if (!(n.getLoop() || i && i !== fv)) {
        var o = n.targetName, s = o ? t[o] : t;
        n.saveTo(s);
      }
    }
  }, r.prototype._innerSaveToNormal = function(e) {
    var t = this._normalState;
    t || (t = this._normalState = {}), e.textConfig && !t.textConfig && (t.textConfig = this.textConfig), this._savePrimaryToNormal(e, t, hv);
  }, r.prototype._savePrimaryToNormal = function(e, t, a) {
    for (var n = 0; n < a.length; n++) {
      var i = a[n];
      e[i] != null && !(i in t) && (t[i] = this[i]);
    }
  }, r.prototype.hasState = function() {
    return this.currentStates.length > 0;
  }, r.prototype.getState = function(e) {
    return this.states[e];
  }, r.prototype.ensureState = function(e) {
    var t = this.states;
    return t[e] || (t[e] = {}), t[e];
  }, r.prototype.clearStates = function(e) {
    this.useState(fv, !1, e);
  }, r.prototype.useState = function(e, t, a, n) {
    var i = e === fv, o = this.hasState();
    if (!(!o && i)) {
      var s = this.currentStates, l = this.stateTransition;
      if (!(ct(s, e) >= 0 && (t || s.length === 1))) {
        var u;
        if (this.stateProxy && !i && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !i) {
          Sr("State " + e + " not exists.");
          return;
        }
        i || this.saveCurrentToNormalState(u);
        var f = !!(u && u.hoverLayer || n);
        f && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, t, !a && !this.__inHover && l && l.duration > 0, l);
        var h = this._textContent, v = this._textGuide;
        return h && h.useState(e, t, a, f), v && v.useState(e, t, a, f), i ? (this.currentStates = [], this._normalState = {}) : t ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !f && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~We), u;
      }
    }
  }, r.prototype.useStates = function(e, t, a) {
    if (!e.length)
      this.clearStates();
    else {
      var n = [], i = this.currentStates, o = e.length, s = o === i.length;
      if (s) {
        for (var l = 0; l < o; l++)
          if (e[l] !== i[l]) {
            s = !1;
            break;
          }
      }
      if (s)
        return;
      for (var l = 0; l < o; l++) {
        var u = e[l], f = void 0;
        this.stateProxy && (f = this.stateProxy(u, e)), f || (f = this.states[u]), f && n.push(f);
      }
      var h = n[o - 1], v = !!(h && h.hoverLayer || a);
      v && this._toggleHoverLayerFlag(!0);
      var c = this._mergeStates(n), p = this.stateTransition;
      this.saveCurrentToNormalState(c), this._applyStateObj(e.join(","), c, this._normalState, !1, !t && !this.__inHover && p && p.duration > 0, p);
      var d = this._textContent, g = this._textGuide;
      d && d.useStates(e, t, v), g && g.useStates(e, t, v), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !v && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~We);
    }
  }, r.prototype._updateAnimationTargets = function() {
    for (var e = 0; e < this.animators.length; e++) {
      var t = this.animators[e];
      t.targetName && t.changeTarget(this[t.targetName]);
    }
  }, r.prototype.removeState = function(e) {
    var t = ct(this.currentStates, e);
    if (t >= 0) {
      var a = this.currentStates.slice();
      a.splice(t, 1), this.useStates(a);
    }
  }, r.prototype.replaceState = function(e, t, a) {
    var n = this.currentStates.slice(), i = ct(n, e), o = ct(n, t) >= 0;
    i >= 0 ? o ? n.splice(i, 1) : n[i] = t : a && !o && n.push(t), this.useStates(n);
  }, r.prototype.toggleState = function(e, t) {
    t ? this.useState(e, !0) : this.removeState(e);
  }, r.prototype._mergeStates = function(e) {
    for (var t = {}, a, n = 0; n < e.length; n++) {
      var i = e[n];
      V(t, i), i.textConfig && (a = a || {}, V(a, i.textConfig));
    }
    return a && (t.textConfig = a), t;
  }, r.prototype._applyStateObj = function(e, t, a, n, i, o) {
    var s = !(t && n);
    t && t.textConfig ? (this.textConfig = V({}, n ? this.textConfig : a.textConfig), V(this.textConfig, t.textConfig)) : s && a.textConfig && (this.textConfig = a.textConfig);
    for (var l = {}, u = !1, f = 0; f < hv.length; f++) {
      var h = hv[f], v = i && PE[h];
      t && t[h] != null ? v ? (u = !0, l[h] = t[h]) : this[h] = t[h] : s && a[h] != null && (v ? (u = !0, l[h] = a[h]) : this[h] = a[h]);
    }
    if (!i)
      for (var f = 0; f < this.animators.length; f++) {
        var c = this.animators[f], p = c.targetName;
        c.getLoop() || c.__changeFinalValue(p ? (t || a)[p] : t || a);
      }
    u && this._transitionState(e, l, o);
  }, r.prototype._attachComponent = function(e) {
    if (e.__zr && !e.__hostTarget) {
      if ({}.NODE_ENV !== "production")
        throw new Error("Text element has been added to zrender.");
      return;
    }
    if (e === this) {
      if ({}.NODE_ENV !== "production")
        throw new Error("Recursive component attachment.");
      return;
    }
    var t = this.__zr;
    t && e.addSelfToZr(t), e.__zr = t, e.__hostTarget = this;
  }, r.prototype._detachComponent = function(e) {
    e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  }, r.prototype.getClipPath = function() {
    return this._clipPath;
  }, r.prototype.setClipPath = function(e) {
    this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  }, r.prototype.removeClipPath = function() {
    var e = this._clipPath;
    e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  }, r.prototype.getTextContent = function() {
    return this._textContent;
  }, r.prototype.setTextContent = function(e) {
    var t = this._textContent;
    if (t !== e) {
      if (t && t !== e && this.removeTextContent(), {}.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
        throw new Error("Text element has been added to zrender.");
      e.innerTransformable = new na(), this._attachComponent(e), this._textContent = e, this.markRedraw();
    }
  }, r.prototype.setTextConfig = function(e) {
    this.textConfig || (this.textConfig = {}), V(this.textConfig, e), this.markRedraw();
  }, r.prototype.removeTextConfig = function() {
    this.textConfig = null, this.markRedraw();
  }, r.prototype.removeTextContent = function() {
    var e = this._textContent;
    e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  }, r.prototype.getTextGuideLine = function() {
    return this._textGuide;
  }, r.prototype.setTextGuideLine = function(e) {
    this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  }, r.prototype.removeTextGuideLine = function() {
    var e = this._textGuide;
    e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  }, r.prototype.markRedraw = function() {
    this.__dirty |= We;
    var e = this.__zr;
    e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  }, r.prototype.dirty = function() {
    this.markRedraw();
  }, r.prototype._toggleHoverLayerFlag = function(e) {
    this.__inHover = e;
    var t = this._textContent, a = this._textGuide;
    t && (t.__inHover = e), a && (a.__inHover = e);
  }, r.prototype.addSelfToZr = function(e) {
    if (this.__zr !== e) {
      this.__zr = e;
      var t = this.animators;
      if (t)
        for (var a = 0; a < t.length; a++)
          e.animation.addAnimator(t[a]);
      this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
    }
  }, r.prototype.removeSelfFromZr = function(e) {
    if (this.__zr) {
      this.__zr = null;
      var t = this.animators;
      if (t)
        for (var a = 0; a < t.length; a++)
          e.animation.removeAnimator(t[a]);
      this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
    }
  }, r.prototype.animate = function(e, t, a) {
    var n = e ? this[e] : this;
    if ({}.NODE_ENV !== "production" && !n) {
      Sr('Property "' + e + '" is not existed in element ' + this.id);
      return;
    }
    var i = new mg(n, t, a);
    return e && (i.targetName = e), this.addAnimator(i, e), i;
  }, r.prototype.addAnimator = function(e, t) {
    var a = this.__zr, n = this;
    e.during(function() {
      n.updateDuringAnimation(t);
    }).done(function() {
      var i = n.animators, o = ct(i, e);
      o >= 0 && i.splice(o, 1);
    }), this.animators.push(e), a && a.animation.addAnimator(e), a && a.wakeUp();
  }, r.prototype.updateDuringAnimation = function(e) {
    this.markRedraw();
  }, r.prototype.stopAnimation = function(e, t) {
    for (var a = this.animators, n = a.length, i = [], o = 0; o < n; o++) {
      var s = a[o];
      !e || e === s.scope ? s.stop(t) : i.push(s);
    }
    return this.animators = i, this;
  }, r.prototype.animateTo = function(e, t, a) {
    vv(this, e, t, a);
  }, r.prototype.animateFrom = function(e, t, a) {
    vv(this, e, t, a, !0);
  }, r.prototype._transitionState = function(e, t, a, n) {
    for (var i = vv(this, t, a, n), o = 0; o < i.length; o++)
      i[o].__fromStateTransition = e;
  }, r.prototype.getBoundingRect = function() {
    return null;
  }, r.prototype.getPaintRect = function() {
    return null;
  }, r.initDefaultProps = function() {
    var e = r.prototype;
    e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = We;
    var t = {};
    function a(i, o, s) {
      t[i + o + s] || (console.warn("DEPRECATED: '" + i + "' has been deprecated. use '" + o + "', '" + s + "' instead"), t[i + o + s] = !0);
    }
    function n(i, o, s, l) {
      Object.defineProperty(e, i, {
        get: function() {
          if ({}.NODE_ENV !== "production" && a(i, s, l), !this[o]) {
            var f = this[o] = [];
            u(this, f);
          }
          return this[o];
        },
        set: function(f) {
          ({}).NODE_ENV !== "production" && a(i, s, l), this[s] = f[0], this[l] = f[1], this[o] = f, u(this, f);
        }
      });
      function u(f, h) {
        Object.defineProperty(h, 0, {
          get: function() {
            return f[s];
          },
          set: function(v) {
            f[s] = v;
          }
        }), Object.defineProperty(h, 1, {
          get: function() {
            return f[l];
          },
          set: function(v) {
            f[l] = v;
          }
        });
      }
    }
    Object.defineProperty && (n("position", "_legacyPos", "x", "y"), n("scale", "_legacyScale", "scaleX", "scaleY"), n("origin", "_legacyOrigin", "originX", "originY"));
  }(), r;
}();
te(_g, fr);
te(_g, na);
function vv(r, e, t, a, n) {
  t = t || {};
  var i = [];
  lT(r, "", r, e, t, a, i, n);
  var o = i.length, s = !1, l = t.done, u = t.aborted, f = function() {
    s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  }, h = function() {
    o--, o <= 0 && (s ? l && l() : u && u());
  };
  o || l && l(), i.length > 0 && t.during && i[0].during(function(p, d) {
    t.during(d);
  });
  for (var v = 0; v < i.length; v++) {
    var c = i[v];
    f && c.done(f), h && c.aborted(h), t.force && c.duration(t.duration), c.start(t.easing);
  }
  return i;
}
function cv(r, e, t) {
  for (var a = 0; a < t; a++)
    r[a] = e[a];
}
function NE(r) {
  return Se(r[0]);
}
function OE(r, e, t) {
  if (Se(e[t]))
    if (Se(r[t]) || (r[t] = []), ke(e[t])) {
      var a = e[t].length;
      r[t].length !== a && (r[t] = new e[t].constructor(a), cv(r[t], e[t], a));
    } else {
      var n = e[t], i = r[t], o = n.length;
      if (NE(n))
        for (var s = n[0].length, l = 0; l < o; l++)
          i[l] ? cv(i[l], n[l], s) : i[l] = Array.prototype.slice.call(n[l]);
      else
        cv(i, n, o);
      i.length = n.length;
    }
  else
    r[t] = e[t];
}
function kE(r, e) {
  return r === e || Se(r) && Se(e) && VE(r, e);
}
function VE(r, e) {
  var t = r.length;
  if (t !== e.length)
    return !1;
  for (var a = 0; a < t; a++)
    if (r[a] !== e[a])
      return !1;
  return !0;
}
function lT(r, e, t, a, n, i, o, s) {
  for (var l = _t(a), u = n.duration, f = n.delay, h = n.additive, v = n.setToFinal, c = !j(i), p = r.animators, d = [], g = 0; g < l.length; g++) {
    var y = l[g], m = a[y];
    if (m != null && t[y] != null && (c || i[y]))
      if (j(m) && !Se(m) && !ih(m)) {
        if (e) {
          s || (t[y] = m, r.updateDuringAnimation(e));
          continue;
        }
        lT(r, y, t[y], m, n, i && i[y], o, s);
      } else
        d.push(y);
    else
      s || (t[y] = m, r.updateDuringAnimation(e), d.push(y));
  }
  var _ = d.length;
  if (!h && _)
    for (var S = 0; S < p.length; S++) {
      var w = p[S];
      if (w.targetName === e) {
        var x = w.stopTracks(d);
        if (x) {
          var b = ct(p, w);
          p.splice(b, 1);
        }
      }
    }
  if (n.force || (d = Et(d, function(M) {
    return !kE(a[M], t[M]);
  }), _ = d.length), _ > 0 || n.force && !o.length) {
    var T = void 0, D = void 0, A = void 0;
    if (s) {
      D = {}, v && (T = {});
      for (var S = 0; S < _; S++) {
        var y = d[S];
        D[y] = t[y], v ? T[y] = a[y] : t[y] = a[y];
      }
    } else if (v) {
      A = {};
      for (var S = 0; S < _; S++) {
        var y = d[S];
        A[y] = As(t[y]), OE(t, a, y);
      }
    }
    var w = new mg(t, !1, !1, h ? Et(p, function(I) {
      return I.targetName === e;
    }) : null);
    w.targetName = e, n.scope && (w.scope = n.scope), v && T && w.whenWithKeys(0, T, d), A && w.whenWithKeys(0, A, d), w.whenWithKeys(u ?? 500, s ? D : a, d).delay(f || 0), r.addAnimator(w, e), o.push(w);
  }
}
const uT = _g;
var fT = function(r) {
  N(e, r);
  function e(t) {
    var a = r.call(this) || this;
    return a.isGroup = !0, a._children = [], a.attr(t), a;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.children = function() {
    return this._children.slice();
  }, e.prototype.childAt = function(t) {
    return this._children[t];
  }, e.prototype.childOfName = function(t) {
    for (var a = this._children, n = 0; n < a.length; n++)
      if (a[n].name === t)
        return a[n];
  }, e.prototype.childCount = function() {
    return this._children.length;
  }, e.prototype.add = function(t) {
    if (t && (t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), {}.NODE_ENV !== "production" && t.__hostTarget))
      throw "This elemenet has been used as an attachment";
    return this;
  }, e.prototype.addBefore = function(t, a) {
    if (t && t !== this && t.parent !== this && a && a.parent === this) {
      var n = this._children, i = n.indexOf(a);
      i >= 0 && (n.splice(i, 0, t), this._doAdd(t));
    }
    return this;
  }, e.prototype.replace = function(t, a) {
    var n = ct(this._children, t);
    return n >= 0 && this.replaceAt(a, n), this;
  }, e.prototype.replaceAt = function(t, a) {
    var n = this._children, i = n[a];
    if (t && t !== this && t.parent !== this && t !== i) {
      n[a] = t, i.parent = null;
      var o = this.__zr;
      o && i.removeSelfFromZr(o), this._doAdd(t);
    }
    return this;
  }, e.prototype._doAdd = function(t) {
    t.parent && t.parent.remove(t), t.parent = this;
    var a = this.__zr;
    a && a !== t.__zr && t.addSelfToZr(a), a && a.refresh();
  }, e.prototype.remove = function(t) {
    var a = this.__zr, n = this._children, i = ct(n, t);
    return i < 0 ? this : (n.splice(i, 1), t.parent = null, a && t.removeSelfFromZr(a), a && a.refresh(), this);
  }, e.prototype.removeAll = function() {
    for (var t = this._children, a = this.__zr, n = 0; n < t.length; n++) {
      var i = t[n];
      a && i.removeSelfFromZr(a), i.parent = null;
    }
    return t.length = 0, this;
  }, e.prototype.eachChild = function(t, a) {
    for (var n = this._children, i = 0; i < n.length; i++) {
      var o = n[i];
      t.call(a, o, i);
    }
    return this;
  }, e.prototype.traverse = function(t, a) {
    for (var n = 0; n < this._children.length; n++) {
      var i = this._children[n], o = t.call(a, i);
      i.isGroup && !o && i.traverse(t, a);
    }
    return this;
  }, e.prototype.addSelfToZr = function(t) {
    r.prototype.addSelfToZr.call(this, t);
    for (var a = 0; a < this._children.length; a++) {
      var n = this._children[a];
      n.addSelfToZr(t);
    }
  }, e.prototype.removeSelfFromZr = function(t) {
    r.prototype.removeSelfFromZr.call(this, t);
    for (var a = 0; a < this._children.length; a++) {
      var n = this._children[a];
      n.removeSelfFromZr(t);
    }
  }, e.prototype.getBoundingRect = function(t) {
    for (var a = new ht(0, 0, 0, 0), n = t || this._children, i = [], o = null, s = 0; s < n.length; s++) {
      var l = n[s];
      if (!(l.ignore || l.invisible)) {
        var u = l.getBoundingRect(), f = l.getLocalTransform(i);
        f ? (ht.applyTransform(a, u, f), o = o || a.clone(), o.union(a)) : (o = o || u.clone(), o.union(u));
      }
    }
    return o || a;
  }, e;
}(uT);
fT.prototype.type = "group";
const nt = fT;
/*!
* 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 ds = {}, hT = {};
function BE(r) {
  delete hT[r];
}
function zE(r) {
  if (!r)
    return !1;
  if (typeof r == "string")
    return lf(r, 1) < Bp;
  if (r.colorStops) {
    for (var e = r.colorStops, t = 0, a = e.length, n = 0; n < a; n++)
      t += lf(e[n].color, 1);
    return t /= a, t < Bp;
  }
  return !1;
}
var GE = function() {
  function r(e, t, a) {
    var n = this;
    this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, a = a || {}, this.dom = t, this.id = e;
    var i = new K2(), o = a.renderer || "canvas";
    if (ds[o] || (o = _t(ds)[0]), {}.NODE_ENV !== "production" && !ds[o])
      throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
    a.useDirtyRect = a.useDirtyRect == null ? !1 : a.useDirtyRect;
    var s = new ds[o](t, i, a, e), l = a.ssr || s.ssrOnly;
    this.storage = i, this.painter = s;
    var u = !wt.node && !wt.worker && !l ? new IE(s.getViewportRoot(), s.root) : null, f = a.useCoarsePointer, h = f == null || f === "auto" ? wt.touchEventsSupported : !!f, v = 44, c;
    h && (c = ut(a.pointerSize, v)), this.handler = new U2(i, s, u, s.root, c), this.animation = new xE({
      stage: {
        update: l ? null : function() {
          return n._flush(!0);
        }
      }
    }), l || this.animation.start();
  }
  return r.prototype.add = function(e) {
    e && (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  }, r.prototype.remove = function(e) {
    e && (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  }, r.prototype.configLayer = function(e, t) {
    this.painter.configLayer && this.painter.configLayer(e, t), this.refresh();
  }, r.prototype.setBackgroundColor = function(e) {
    this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = zE(e);
  }, r.prototype.getBackgroundColor = function() {
    return this._backgroundColor;
  }, r.prototype.setDarkMode = function(e) {
    this._darkMode = e;
  }, r.prototype.isDarkMode = function() {
    return this._darkMode;
  }, r.prototype.refreshImmediately = function(e) {
    e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1;
  }, r.prototype.refresh = function() {
    this._needsRefresh = !0, this.animation.start();
  }, r.prototype.flush = function() {
    this._flush(!1);
  }, r.prototype._flush = function(e) {
    var t, a = ji();
    this._needsRefresh && (t = !0, this.refreshImmediately(e)), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately());
    var n = ji();
    t ? (this._stillFrameAccum = 0, this.trigger("rendered", {
      elapsedTime: n - a
    })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  }, r.prototype.setSleepAfterStill = function(e) {
    this._sleepAfterStill = e;
  }, r.prototype.wakeUp = function() {
    this.animation.start(), this._stillFrameAccum = 0;
  }, r.prototype.refreshHover = function() {
    this._needsRefreshHover = !0;
  }, r.prototype.refreshHoverImmediately = function() {
    this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover();
  }, r.prototype.resize = function(e) {
    e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize();
  }, r.prototype.clearAnimation = function() {
    this.animation.clear();
  }, r.prototype.getWidth = function() {
    return this.painter.getWidth();
  }, r.prototype.getHeight = function() {
    return this.painter.getHeight();
  }, r.prototype.setCursorStyle = function(e) {
    this.handler.setCursorStyle(e);
  }, r.prototype.findHover = function(e, t) {
    return this.handler.findHover(e, t);
  }, r.prototype.on = function(e, t, a) {
    return this.handler.on(e, t, a), this;
  }, r.prototype.off = function(e, t) {
    this.handler.off(e, t);
  }, r.prototype.trigger = function(e, t) {
    this.handler.trigger(e, t);
  }, r.prototype.clear = function() {
    for (var e = this.storage.getRoots(), t = 0; t < e.length; t++)
      e[t] instanceof nt && e[t].removeSelfFromZr(this);
    this.storage.delAllRoots(), this.painter.clear();
  }, r.prototype.dispose = function() {
    this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, BE(this.id);
  }, r;
}();
function $m(r, e) {
  var t = new GE(Pb(), r, e);
  return hT[t.id] = t, t;
}
function FE(r, e) {
  ds[r] = e;
}
var Um = 1e-4, vT = 20;
function HE(r) {
  return r.replace(/^\s+|\s+$/g, "");
}
function Lt(r, e, t, a) {
  var n = e[0], i = e[1], o = t[0], s = t[1], l = i - n, u = s - o;
  if (l === 0)
    return u === 0 ? o : (o + s) / 2;
  if (a)
    if (l > 0) {
      if (r <= n)
        return o;
      if (r >= i)
        return s;
    } else {
      if (r >= n)
        return o;
      if (r <= i)
        return s;
    }
  else {
    if (r === n)
      return o;
    if (r === i)
      return s;
  }
  return (r - n) / l * u + o;
}
function H(r, e) {
  switch (r) {
    case "center":
    case "middle":
      r = "50%";
      break;
    case "left":
    case "top":
      r = "0%";
      break;
    case "right":
    case "bottom":
      r = "100%";
      break;
  }
  return $(r) ? HE(r).match(/%$/) ? parseFloat(r) / 100 * e : parseFloat(r) : r == null ? NaN : +r;
}
function Yt(r, e, t) {
  return e == null && (e = 10), e = Math.min(Math.max(0, e), vT), r = (+r).toFixed(e), t ? r : +r;
}
function or(r) {
  return r.sort(function(e, t) {
    return e - t;
  }), r;
}
function zr(r) {
  if (r = +r, isNaN(r))
    return 0;
  if (r > 1e-14) {
    for (var e = 1, t = 0; t < 15; t++, e *= 10)
      if (Math.round(r * e) / e === r)
        return t;
  }
  return Fp(r);
}
function Fp(r) {
  var e = r.toString().toLowerCase(), t = e.indexOf("e"), a = t > 0 ? +e.slice(t + 1) : 0, n = t > 0 ? t : e.length, i = e.indexOf("."), o = i < 0 ? 0 : n - 1 - i;
  return Math.max(0, o - a);
}
function cT(r, e) {
  var t = Math.log, a = Math.LN10, n = Math.floor(t(r[1] - r[0]) / a), i = Math.round(t(Math.abs(e[1] - e[0])) / a), o = Math.min(Math.max(-n + i, 0), 20);
  return isFinite(o) ? o : 20;
}
function WE(r, e) {
  var t = $r(r, function(c, p) {
    return c + (isNaN(p) ? 0 : p);
  }, 0);
  if (t === 0)
    return [];
  for (var a = Math.pow(10, e), n = G(r, function(c) {
    return (isNaN(c) ? 0 : c) / t * a * 100;
  }), i = a * 100, o = G(n, function(c) {
    return Math.floor(c);
  }), s = $r(o, function(c, p) {
    return c + p;
  }, 0), l = G(n, function(c, p) {
    return c - o[p];
  }); s < i; ) {
    for (var u = Number.NEGATIVE_INFINITY, f = null, h = 0, v = l.length; h < v; ++h)
      l[h] > u && (u = l[h], f = h);
    ++o[f], l[f] = 0, ++s;
  }
  return G(o, function(c) {
    return c / a;
  });
}
function $E(r, e) {
  var t = Math.max(zr(r), zr(e)), a = r + e;
  return t > vT ? a : Yt(a, t);
}
var Ym = 9007199254740991;
function pT(r) {
  var e = Math.PI * 2;
  return (r % e + e) % e;
}
function vf(r) {
  return r > -Um && r < Um;
}
var UE = /^(?:(\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 Zr(r) {
  if (r instanceof Date)
    return r;
  if ($(r)) {
    var e = UE.exec(r);
    if (!e)
      return /* @__PURE__ */ new Date(NaN);
    if (e[8]) {
      var t = +e[4] || 0;
      return e[8].toUpperCase() !== "Z" && (t -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, t, +(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 (r == null)
    return /* @__PURE__ */ new Date(NaN);
  return new Date(Math.round(r));
}
function YE(r) {
  return Math.pow(10, fh(r));
}
function fh(r) {
  if (r === 0)
    return 0;
  var e = Math.floor(Math.log(r) / Math.LN10);
  return r / Math.pow(10, e) >= 10 && e++, e;
}
function dT(r, e) {
  var t = fh(r), a = Math.pow(10, t), n = r / a, i;
  return e ? n < 1.5 ? i = 1 : n < 2.5 ? i = 2 : n < 4 ? i = 3 : n < 7 ? i = 5 : i = 10 : n < 1 ? i = 1 : n < 2 ? i = 2 : n < 3 ? i = 3 : n < 5 ? i = 5 : i = 10, r = i * a, t >= -20 ? +r.toFixed(t < 0 ? -t : 0) : r;
}
function pv(r, e) {
  var t = (r.length - 1) * e + 1, a = Math.floor(t), n = +r[a - 1], i = t - a;
  return i ? n + i * (r[a] - n) : n;
}
function Zm(r) {
  r.sort(function(l, u) {
    return s(l, u, 0) ? -1 : 1;
  });
  for (var e = -1 / 0, t = 1, a = 0; a < r.length; ) {
    for (var n = r[a].interval, i = r[a].close, o = 0; o < 2; o++)
      n[o] <= e && (n[o] = e, i[o] = o ? 1 : 1 - t), e = n[o], t = i[o];
    n[0] === n[1] && i[0] * i[1] !== 1 ? r.splice(a, 1) : a++;
  }
  return r;
  function s(l, u, f) {
    return l.interval[f] < u.interval[f] || l.interval[f] === u.interval[f] && (l.close[f] - u.close[f] === (f ? -1 : 1) || !f && s(l, u, 1));
  }
}
function pa(r) {
  var e = parseFloat(r);
  return e == r && (e !== 0 || !$(r) || r.indexOf("x") <= 0) ? e : NaN;
}
function Sg(r) {
  return !isNaN(pa(r));
}
function gT() {
  return Math.round(Math.random() * 9);
}
function yT(r, e) {
  return e === 0 ? r : yT(e, r % e);
}
function Xm(r, e) {
  return r == null ? e : e == null ? r : r * e / yT(r, e);
}
var ZE = "[ECharts] ", qm = {}, XE = typeof console < "u" && console.warn && console.log;
function hh(r, e, t) {
  if (XE) {
    if (t) {
      if (qm[e])
        return;
      qm[e] = !0;
    }
    console[r](ZE + e);
  }
}
function qE(r, e) {
  hh("log", r, e);
}
function Ft(r, e) {
  hh("warn", r, e);
}
function ve(r, e) {
  hh("error", r, e);
}
function Dr(r) {
  ({}).NODE_ENV !== "production" && hh("warn", "DEPRECATED: " + r, !0);
}
function Kt(r, e, t) {
  ({}).NODE_ENV !== "production" && Dr((t ? "[" + t + "]" : "") + (r + " is deprecated, use " + e + " instead."));
}
function Ae() {
  for (var r = [], e = 0; e < arguments.length; e++)
    r[e] = arguments[e];
  var t = "";
  if ({}.NODE_ENV !== "production") {
    var a = function(n) {
      return n === void 0 ? "undefined" : n === 1 / 0 ? "Infinity" : n === -1 / 0 ? "-Infinity" : li(n) ? "NaN" : n instanceof Date ? "Date(" + n.toISOString() + ")" : q(n) ? "function () { ... }" : Rb(n) ? n + "" : null;
    };
    t = G(r, function(n) {
      if ($(n))
        return n;
      var i = a(n);
      if (i != null)
        return i;
      if (typeof JSON < "u" && JSON.stringify)
        try {
          return JSON.stringify(n, function(o, s) {
            var l = a(s);
            return l ?? s;
          });
        } catch {
          return "?";
        }
      else
        return "?";
    }).join(" ");
  }
  return t;
}
function It(r) {
  throw new Error(r);
}
function Km(r, e, t) {
  return (e - r) * t + r;
}
var mT = "series\0", _T = "\0_ec_\0";
function Pt(r) {
  return r instanceof Array ? r : r == null ? [] : [r];
}
function ui(r, e, t) {
  if (r) {
    r[e] = r[e] || {}, r.emphasis = r.emphasis || {}, r.emphasis[e] = r.emphasis[e] || {};
    for (var a = 0, n = t.length; a < n; a++) {
      var i = t[a];
      !r.emphasis[e].hasOwnProperty(i) && r[e].hasOwnProperty(i) && (r.emphasis[e][i] = r[e][i]);
    }
  }
}
var jm = ["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 wo(r) {
  return j(r) && !z(r) && !(r instanceof Date) ? r.value : r;
}
function KE(r) {
  return j(r) && !(r instanceof Array);
}
function ST(r, e, t) {
  var a = t === "normalMerge", n = t === "replaceMerge", i = t === "replaceAll";
  r = r || [], e = (e || []).slice();
  var o = K();
  C(e, function(l, u) {
    if (!j(l)) {
      e[u] = null;
      return;
    }
    ({}).NODE_ENV !== "production" && (l.id != null && !Jm(l.id) && Qm(l.id), l.name != null && !Jm(l.name) && Qm(l.name));
  });
  var s = jE(r, o, t);
  return (a || n) && QE(s, r, o, e), a && JE(s, e), a || n ? tP(s, e, n) : i && eP(s, e), rP(s), s;
}
function jE(r, e, t) {
  var a = [];
  if (t === "replaceAll")
    return a;
  for (var n = 0; n < r.length; n++) {
    var i = r[n];
    i && i.id != null && e.set(i.id, n), a.push({
      existing: t === "replaceMerge" || lo(i) ? null : i,
      newOption: null,
      keyInfo: null,
      brandNew: null
    });
  }
  return a;
}
function QE(r, e, t, a) {
  C(a, function(n, i) {
    if (!(!n || n.id == null)) {
      var o = Ms(n.id), s = t.get(o);
      if (s != null) {
        var l = r[s];
        Q(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = n, l.existing = e[s], a[i] = null;
      }
    }
  });
}
function JE(r, e) {
  C(e, function(t, a) {
    if (!(!t || t.name == null))
      for (var n = 0; n < r.length; n++) {
        var i = r[n].existing;
        if (!r[n].newOption && i && (i.id == null || t.id == null) && !lo(t) && !lo(i) && xT("name", i, t)) {
          r[n].newOption = t, e[a] = null;
          return;
        }
      }
  });
}
function tP(r, e, t) {
  C(e, function(a) {
    if (a) {
      for (
        var n, i = 0;
        // Be `!resultItem` only when `nextIdx >= result.length`.
        (n = r[i]) && // (1) Existing models that already have id should be able to mapped to. Because
        // after mapping performed, model will always be assigned with an id if user not given.
        // After that all models have id.
        // (2) If new option has id, it can only set to a hole or append to the last. It should
        // not be merged to the existings with different id. Because id should not be overwritten.
        // (3) Name can be overwritten, because axis use name as 'show label text'.
        (n.newOption || lo(n.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
        n.existing && a.id != null && !xT("id", a, n.existing));
      )
        i++;
      n ? (n.newOption = a, n.brandNew = t) : r.push({
        newOption: a,
        brandNew: t,
        existing: null,
        keyInfo: null
      }), i++;
    }
  });
}
function eP(r, e) {
  C(e, function(t) {
    r.push({
      newOption: t,
      brandNew: !0,
      existing: null,
      keyInfo: null
    });
  });
}
function rP(r) {
  var e = K();
  C(r, function(t) {
    var a = t.existing;
    a && e.set(a.id, t);
  }), C(r, function(t) {
    var a = t.newOption;
    Q(!a || a.id == null || !e.get(a.id) || e.get(a.id) === t, "id duplicates: " + (a && a.id)), a && a.id != null && e.set(a.id, t), !t.keyInfo && (t.keyInfo = {});
  }), C(r, function(t, a) {
    var n = t.existing, i = t.newOption, o = t.keyInfo;
    if (j(i)) {
      if (o.name = i.name != null ? Ms(i.name) : n ? n.name : mT + a, n)
        o.id = Ms(n.id);
      else if (i.id != null)
        o.id = Ms(i.id);
      else {
        var s = 0;
        do
          o.id = "\0" + o.name + "\0" + s++;
        while (e.get(o.id));
      }
      e.set(o.id, t);
    }
  });
}
function xT(r, e, t) {
  var a = ee(e[r], null), n = ee(t[r], null);
  return a != null && n != null && a === n;
}
function Ms(r) {
  if ({}.NODE_ENV !== "production" && r == null)
    throw new Error();
  return ee(r, "");
}
function ee(r, e) {
  return r == null ? e : $(r) ? r : Ct(r) || ef(r) ? r + "" : e;
}
function Qm(r) {
  ({}).NODE_ENV !== "production" && Ft("`" + r + "` is invalid id or name. Must be a string or number.");
}
function Jm(r) {
  return ef(r) || Sg(r);
}
function xg(r) {
  var e = r.name;
  return !!(e && e.indexOf(mT));
}
function lo(r) {
  return r && r.id != null && Ms(r.id).indexOf(_T) === 0;
}
function aP(r) {
  return _T + r;
}
function nP(r, e, t) {
  C(r, function(a) {
    var n = a.newOption;
    j(n) && (a.keyInfo.mainType = e, a.keyInfo.subType = iP(e, n, a.existing, t));
  });
}
function iP(r, e, t, a) {
  var n = e.type ? e.type : t ? t.subType : a.determineSubType(r, e);
  return n;
}
function oP(r, e) {
  var t = {}, a = {};
  return n(r || [], t), n(e || [], a, t), [i(t), i(a)];
  function n(o, s, l) {
    for (var u = 0, f = o.length; u < f; u++) {
      var h = ee(o[u].seriesId, null);
      if (h == null)
        return;
      for (var v = Pt(o[u].dataIndex), c = l && l[h], p = 0, d = v.length; p < d; p++) {
        var g = v[p];
        c && c[g] ? c[g] = null : (s[h] || (s[h] = {}))[g] = 1;
      }
    }
  }
  function i(o, s) {
    var l = [];
    for (var u in o)
      if (o.hasOwnProperty(u) && o[u] != null)
        if (s)
          l.push(+u);
        else {
          var f = i(o[u], !0);
          f.length && l.push({
            seriesId: u,
            dataIndex: f
          });
        }
    return l;
  }
}
function fi(r, e) {
  if (e.dataIndexInside != null)
    return e.dataIndexInside;
  if (e.dataIndex != null)
    return z(e.dataIndex) ? G(e.dataIndex, function(t) {
      return r.indexOfRawIndex(t);
    }) : r.indexOfRawIndex(e.dataIndex);
  if (e.name != null)
    return z(e.name) ? G(e.name, function(t) {
      return r.indexOfName(t);
    }) : r.indexOfName(e.name);
}
function Tt() {
  var r = "__ec_inner_" + sP++;
  return function(e) {
    return e[r] || (e[r] = {});
  };
}
var sP = gT();
function Is(r, e, t) {
  var a = wg(e, t), n = a.mainTypeSpecified, i = a.queryOptionMap, o = a.others, s = o, l = t ? t.defaultMainType : null;
  return !n && l && i.set(l, {}), i.each(function(u, f) {
    var h = cl(r, f, u, {
      useDefault: l === f,
      enableAll: t && t.enableAll != null ? t.enableAll : !0,
      enableNone: t && t.enableNone != null ? t.enableNone : !0
    });
    s[f + "Models"] = h.models, s[f + "Model"] = h.models[0];
  }), s;
}
function wg(r, e) {
  var t;
  if ($(r)) {
    var a = {};
    a[r + "Index"] = 0, t = a;
  } else
    t = r;
  var n = K(), i = {}, o = !1;
  return C(t, function(s, l) {
    if (l === "dataIndex" || l === "dataIndexInside") {
      i[l] = s;
      return;
    }
    var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], f = u[1], h = (u[2] || "").toLowerCase();
    if (!(!f || !h || e && e.includeMainTypes && ct(e.includeMainTypes, f) < 0)) {
      o = o || !!f;
      var v = n.get(f) || n.set(f, {});
      v[h] = s;
    }
  }), {
    mainTypeSpecified: o,
    queryOptionMap: n,
    others: i
  };
}
var Qt = {
  useDefault: !0,
  enableAll: !1,
  enableNone: !1
}, lP = {
  useDefault: !1,
  enableAll: !0,
  enableNone: !0
};
function cl(r, e, t, a) {
  a = a || Qt;
  var n = t.index, i = t.id, o = t.name, s = {
    models: null,
    specified: n != null || i != null || o != null
  };
  if (!s.specified) {
    var l = void 0;
    return s.models = a.useDefault && (l = r.getComponent(e)) ? [l] : [], s;
  }
  return n === "none" || n === !1 ? (Q(a.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (n === "all" && (Q(a.enableAll, '`"all"` is not a valid value on index option.'), n = i = o = null), s.models = r.queryComponents({
    mainType: e,
    index: n,
    id: i,
    name: o
  }), s);
}
function wT(r, e, t) {
  r.setAttribute ? r.setAttribute(e, t) : r[e] = t;
}
function uP(r, e) {
  return r.getAttribute ? r.getAttribute(e) : r[e];
}
function fP(r) {
  return r === "auto" ? wt.domSupported ? "html" : "richText" : r || "html";
}
function Hp(r, e) {
  var t = K(), a = [];
  return C(r, function(n) {
    var i = e(n);
    (t.get(i) || (a.push(i), t.set(i, []))).push(n);
  }), {
    keys: a,
    buckets: t
  };
}
function bT(r, e, t, a, n) {
  var i = e == null || e === "auto";
  if (a == null)
    return a;
  if (Ct(a)) {
    var o = Km(t || 0, a, n);
    return Yt(o, i ? Math.max(zr(t || 0), zr(a)) : e);
  } else {
    if ($(a))
      return n < 1 ? t : a;
    for (var s = [], l = t, u = a, f = Math.max(l ? l.length : 0, u.length), h = 0; h < f; ++h) {
      var v = r.getDimensionInfo(h);
      if (v && v.type === "ordinal")
        s[h] = (n < 1 && l ? l : u)[h];
      else {
        var c = l && l[h] ? l[h] : 0, p = u[h], o = Km(c, p, n);
        s[h] = Yt(o, i ? Math.max(zr(c), zr(p)) : e);
      }
    }
    return s;
  }
}
var hP = ".", pn = "___EC__COMPONENT__CONTAINER___", TT = "___EC__EXTENDED_CLASS___";
function Gr(r) {
  var e = {
    main: "",
    sub: ""
  };
  if (r) {
    var t = r.split(hP);
    e.main = t[0] || "", e.sub = t[1] || "";
  }
  return e;
}
function vP(r) {
  Q(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r), 'componentType "' + r + '" illegal');
}
function cP(r) {
  return !!(r && r[TT]);
}
function bg(r, e) {
  r.$constructor = r, r.extend = function(t) {
    ({}).NODE_ENV !== "production" && C(e, function(i) {
      t[i] || console.warn("Method `" + i + "` should be implemented" + (t.type ? " in " + t.type : "") + ".");
    });
    var a = this, n;
    return pP(a) ? n = /** @class */
    function(i) {
      N(o, i);
      function o() {
        return i.apply(this, arguments) || this;
      }
      return o;
    }(a) : (n = function() {
      (t.$constructor || a).apply(this, arguments);
    }, v2(n, this)), V(n.prototype, t), n[TT] = !0, n.extend = this.extend, n.superCall = yP, n.superApply = mP, n.superClass = a, n;
  };
}
function pP(r) {
  return q(r) && /^class\s/.test(Function.prototype.toString.call(r));
}
function DT(r, e) {
  r.extend = e.extend;
}
var dP = Math.round(Math.random() * 10);
function gP(r) {
  var e = ["__\0is_clz", dP++].join("_");
  r.prototype[e] = !0, {}.NODE_ENV !== "production" && Q(!r.isInstance, 'The method "is" can not be defined.'), r.isInstance = function(t) {
    return !!(t && t[e]);
  };
}
function yP(r, e) {
  for (var t = [], a = 2; a < arguments.length; a++)
    t[a - 2] = arguments[a];
  return this.superClass.prototype[e].apply(r, t);
}
function mP(r, e, t) {
  return this.superClass.prototype[e].apply(r, t);
}
function vh(r) {
  var e = {};
  r.registerClass = function(a) {
    var n = a.type || a.prototype.type;
    if (n) {
      vP(n), a.prototype.type = n;
      var i = Gr(n);
      if (!i.sub)
        ({}).NODE_ENV !== "production" && e[i.main] && console.warn(i.main + " exists."), e[i.main] = a;
      else if (i.sub !== pn) {
        var o = t(i);
        o[i.sub] = a;
      }
    }
    return a;
  }, r.getClass = function(a, n, i) {
    var o = e[a];
    if (o && o[pn] && (o = n ? o[n] : null), i && !o)
      throw new Error(n ? "Component " + a + "." + (n || "") + " is used but not imported." : a + ".type should be specified.");
    return o;
  }, r.getClassesByMainType = function(a) {
    var n = Gr(a), i = [], o = e[n.main];
    return o && o[pn] ? C(o, function(s, l) {
      l !== pn && i.push(s);
    }) : i.push(o), i;
  }, r.hasClass = function(a) {
    var n = Gr(a);
    return !!e[n.main];
  }, r.getAllClassMainTypes = function() {
    var a = [];
    return C(e, function(n, i) {
      a.push(i);
    }), a;
  }, r.hasSubTypes = function(a) {
    var n = Gr(a), i = e[n.main];
    return i && i[pn];
  };
  function t(a) {
    var n = e[a.main];
    return (!n || !n[pn]) && (n = e[a.main] = {}, n[pn] = !0), n;
  }
}
function hi(r, e) {
  for (var t = 0; t < r.length; t++)
    r[t][1] || (r[t][1] = r[t][0]);
  return e = e || !1, function(a, n, i) {
    for (var o = {}, s = 0; s < r.length; s++) {
      var l = r[s][1];
      if (!(n && ct(n, l) >= 0 || i && ct(i, l) < 0)) {
        var u = a.getShallow(l, e);
        u != null && (o[r[s][0]] = u);
      }
    }
    return o;
  };
}
var _P = [
  ["fill", "color"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["opacity"],
  ["shadowColor"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
], SP = hi(_P), xP = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getAreaStyle = function(e, t) {
      return SP(this, e, t);
    }, r;
  }()
), Wp = new hl(50);
function wP(r) {
  if (typeof r == "string") {
    var e = Wp.get(r);
    return e && e.image;
  } else
    return r;
}
function Tg(r, e, t, a, n) {
  if (r)
    if (typeof r == "string") {
      if (e && e.__zrImageSrc === r || !t)
        return e;
      var i = Wp.get(r), o = { hostEl: t, cb: a, cbPayload: n };
      return i ? (e = i.image, !ch(e) && i.pending.push(o)) : (e = qa.loadImage(r, t0, t0), e.__zrImageSrc = r, Wp.put(r, e.__cachedImgObj = {
        image: e,
        pending: [o]
      })), e;
    } else
      return r;
  else
    return e;
}
function t0() {
  var r = this.__cachedImgObj;
  this.onload = this.onerror = this.__cachedImgObj = null;
  for (var e = 0; e < r.pending.length; e++) {
    var t = r.pending[e], a = t.cb;
    a && a(this, t.cbPayload), t.hostEl.dirty();
  }
  r.pending.length = 0;
}
function ch(r) {
  return r && r.width && r.height;
}
var dv = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
function bP(r, e, t, a, n) {
  if (!e)
    return "";
  var i = (r + "").split(`
`);
  n = CT(e, t, a, n);
  for (var o = 0, s = i.length; o < s; o++)
    i[o] = AT(i[o], n);
  return i.join(`
`);
}
function CT(r, e, t, a) {
  a = a || {};
  var n = V({}, a);
  n.font = e, t = ut(t, "..."), n.maxIterations = ut(a.maxIterations, 2);
  var i = n.minChar = ut(a.minChar, 0);
  n.cnCharWidth = Ue("国", e);
  var o = n.ascCharWidth = Ue("a", e);
  n.placeholder = ut(a.placeholder, "");
  for (var s = r = Math.max(0, r - 1), l = 0; l < i && s >= o; l++)
    s -= o;
  var u = Ue(t, e);
  return u > s && (t = "", u = 0), s = r - u, n.ellipsis = t, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = r, n;
}
function AT(r, e) {
  var t = e.containerWidth, a = e.font, n = e.contentWidth;
  if (!t)
    return "";
  var i = Ue(r, a);
  if (i <= t)
    return r;
  for (var o = 0; ; o++) {
    if (i <= n || o >= e.maxIterations) {
      r += e.ellipsis;
      break;
    }
    var s = o === 0 ? TP(r, n, e.ascCharWidth, e.cnCharWidth) : i > 0 ? Math.floor(r.length * n / i) : 0;
    r = r.substr(0, s), i = Ue(r, a);
  }
  return r === "" && (r = e.placeholder), r;
}
function TP(r, e, t, a) {
  for (var n = 0, i = 0, o = r.length; i < o && n < e; i++) {
    var s = r.charCodeAt(i);
    n += 0 <= s && s <= 127 ? t : a;
  }
  return i;
}
function DP(r, e) {
  r != null && (r += "");
  var t = e.overflow, a = e.padding, n = e.font, i = t === "truncate", o = uh(n), s = ut(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", f = e.width, h;
  f != null && (t === "break" || t === "breakAll") ? h = r ? MT(r, e.font, f, t === "breakAll", 0).lines : [] : h = r ? r.split(`
`) : [];
  var v = h.length * s, c = ut(e.height, v);
  if (v > c && u) {
    var p = Math.floor(c / s);
    h = h.slice(0, p);
  }
  if (r && i && f != null)
    for (var d = CT(f, n, e.ellipsis, {
      minChar: e.truncateMinChar,
      placeholder: e.placeholder
    }), g = 0; g < h.length; g++)
      h[g] = AT(h[g], d);
  for (var y = c, m = 0, g = 0; g < h.length; g++)
    m = Math.max(Ue(h[g], n), m);
  f == null && (f = m);
  var _ = m;
  return a && (y += a[0] + a[2], _ += a[1] + a[3], f += a[1] + a[3]), l && (_ = f), {
    lines: h,
    height: c,
    outerWidth: _,
    outerHeight: y,
    lineHeight: s,
    calculatedLineHeight: o,
    contentWidth: m,
    contentHeight: v,
    width: f
  };
}
var CP = function() {
  function r() {
  }
  return r;
}(), e0 = function() {
  function r(e) {
    this.tokens = [], e && (this.tokens = e);
  }
  return r;
}(), AP = function() {
  function r() {
    this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  }
  return r;
}();
function MP(r, e) {
  var t = new AP();
  if (r != null && (r += ""), !r)
    return t;
  for (var a = e.width, n = e.height, i = e.overflow, o = (i === "break" || i === "breakAll") && a != null ? { width: a, accumWidth: 0, breakAll: i === "breakAll" } : null, s = dv.lastIndex = 0, l; (l = dv.exec(r)) != null; ) {
    var u = l.index;
    u > s && gv(t, r.substring(s, u), e, o), gv(t, l[2], e, o, l[1]), s = dv.lastIndex;
  }
  s < r.length && gv(t, r.substring(s, r.length), e, o);
  var f = [], h = 0, v = 0, c = e.padding, p = i === "truncate", d = e.lineOverflow === "truncate";
  function g(O, B, F) {
    O.width = B, O.lineHeight = F, h += F, v = Math.max(v, B);
  }
  t:
    for (var y = 0; y < t.lines.length; y++) {
      for (var m = t.lines[y], _ = 0, S = 0, w = 0; w < m.tokens.length; w++) {
        var x = m.tokens[w], b = x.styleName && e.rich[x.styleName] || {}, T = x.textPadding = b.padding, D = T ? T[1] + T[3] : 0, A = x.font = b.font || e.font;
        x.contentHeight = uh(A);
        var M = ut(b.height, x.contentHeight);
        if (x.innerHeight = M, T && (M += T[0] + T[2]), x.height = M, x.lineHeight = xr(b.lineHeight, e.lineHeight, M), x.align = b && b.align || e.align, x.verticalAlign = b && b.verticalAlign || "middle", d && n != null && h + x.lineHeight > n) {
          w > 0 ? (m.tokens = m.tokens.slice(0, w), g(m, S, _), t.lines = t.lines.slice(0, y + 1)) : t.lines = t.lines.slice(0, y);
          break t;
        }
        var I = b.width, L = I == null || I === "auto";
        if (typeof I == "string" && I.charAt(I.length - 1) === "%")
          x.percentWidth = I, f.push(x), x.contentWidth = Ue(x.text, A);
        else {
          if (L) {
            var E = b.backgroundColor, P = E && E.image;
            P && (P = wP(P), ch(P) && (x.width = Math.max(x.width, P.width * M / P.height)));
          }
          var R = p && a != null ? a - S : null;
          R != null && R < x.width ? !L || R < D ? (x.text = "", x.width = x.contentWidth = 0) : (x.text = bP(x.text, R - D, A, e.ellipsis, { minChar: e.truncateMinChar }), x.width = x.contentWidth = Ue(x.text, A)) : x.contentWidth = Ue(x.text, A);
        }
        x.width += D, S += x.width, b && (_ = Math.max(_, x.lineHeight));
      }
      g(m, S, _);
    }
  t.outerWidth = t.width = ut(a, v), t.outerHeight = t.height = ut(n, h), t.contentHeight = h, t.contentWidth = v, c && (t.outerWidth += c[1] + c[3], t.outerHeight += c[0] + c[2]);
  for (var y = 0; y < f.length; y++) {
    var x = f[y], k = x.percentWidth;
    x.width = parseInt(k, 10) / 100 * t.width;
  }
  return t;
}
function gv(r, e, t, a, n) {
  var i = e === "", o = n && t.rich[n] || {}, s = r.lines, l = o.font || t.font, u = !1, f, h;
  if (a) {
    var v = o.padding, c = v ? v[1] + v[3] : 0;
    if (o.width != null && o.width !== "auto") {
      var p = Tr(o.width, a.width) + c;
      s.length > 0 && p + a.accumWidth > a.width && (f = e.split(`
`), u = !0), a.accumWidth = p;
    } else {
      var d = MT(e, l, a.width, a.breakAll, a.accumWidth);
      a.accumWidth = d.accumWidth + c, h = d.linesWidths, f = d.lines;
    }
  } else
    f = e.split(`
`);
  for (var g = 0; g < f.length; g++) {
    var y = f[g], m = new CP();
    if (m.styleName = n, m.text = y, m.isLineHolder = !y && !i, typeof o.width == "number" ? m.width = o.width : m.width = h ? h[g] : Ue(y, l), !g && !u) {
      var _ = (s[s.length - 1] || (s[0] = new e0())).tokens, S = _.length;
      S === 1 && _[0].isLineHolder ? _[0] = m : (y || !S || i) && _.push(m);
    } else
      s.push(new e0([m]));
  }
}
function IP(r) {
  var e = r.charCodeAt(0);
  return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
}
var LP = $r(",&?/;] ".split(""), function(r, e) {
  return r[e] = !0, r;
}, {});
function EP(r) {
  return IP(r) ? !!LP[r] : !0;
}
function MT(r, e, t, a, n) {
  for (var i = [], o = [], s = "", l = "", u = 0, f = 0, h = 0; h < r.length; h++) {
    var v = r.charAt(h);
    if (v === `
`) {
      l && (s += l, f += u), i.push(s), o.push(f), s = "", l = "", u = 0, f = 0;
      continue;
    }
    var c = Ue(v, e), p = a ? !1 : !EP(v);
    if (i.length ? f + c > t : n + f + c > t) {
      f ? (s || l) && (p ? (s || (s = l, l = "", u = 0, f = u), i.push(s), o.push(f - u), l += v, u += c, s = "", f = u) : (l && (s += l, l = "", u = 0), i.push(s), o.push(f), s = v, f = c)) : p ? (i.push(l), o.push(u), l = v, u = c) : (i.push(v), o.push(c));
      continue;
    }
    f += c, p ? (l += v, u += c) : (l && (s += l, l = "", u = 0), s += v);
  }
  return !i.length && !s && (s = r, l = "", u = 0), l && (s += l), s && (i.push(s), o.push(f)), i.length === 1 && (f += n), {
    accumWidth: f,
    lines: i,
    linesWidths: o
  };
}
var $p = "__zr_style_" + Math.round(Math.random() * 10), ti = {
  shadowBlur: 0,
  shadowOffsetX: 0,
  shadowOffsetY: 0,
  shadowColor: "#000",
  opacity: 1,
  blend: "source-over"
}, ph = {
  style: {
    shadowBlur: !0,
    shadowOffsetX: !0,
    shadowOffsetY: !0,
    shadowColor: !0,
    opacity: !0
  }
};
ti[$p] = !0;
var r0 = ["z", "z2", "invisible"], PP = ["invisible"], RP = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype._init = function(t) {
    for (var a = _t(t), n = 0; n < a.length; n++) {
      var i = a[n];
      i === "style" ? this.useStyle(t[i]) : r.prototype.attrKV.call(this, i, t[i]);
    }
    this.style || this.useStyle({});
  }, e.prototype.beforeBrush = function() {
  }, e.prototype.afterBrush = function() {
  }, e.prototype.innerBeforeBrush = function() {
  }, e.prototype.innerAfterBrush = function() {
  }, e.prototype.shouldBePainted = function(t, a, n, i) {
    var o = this.transform;
    if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && NP(this, t, a) || o && !o[0] && !o[3])
      return !1;
    if (n && this.__clipPaths) {
      for (var s = 0; s < this.__clipPaths.length; ++s)
        if (this.__clipPaths[s].isZeroArea())
          return !1;
    }
    if (i && this.parent)
      for (var l = this.parent; l; ) {
        if (l.ignore)
          return !1;
        l = l.parent;
      }
    return !0;
  }, e.prototype.contain = function(t, a) {
    return this.rectContain(t, a);
  }, e.prototype.traverse = function(t, a) {
    t.call(a, this);
  }, e.prototype.rectContain = function(t, a) {
    var n = this.transformCoordToLocal(t, a), i = this.getBoundingRect();
    return i.contain(n[0], n[1]);
  }, e.prototype.getPaintRect = function() {
    var t = this._paintRect;
    if (!this._paintRect || this.__dirty) {
      var a = this.transform, n = this.getBoundingRect(), i = this.style, o = i.shadowBlur || 0, s = i.shadowOffsetX || 0, l = i.shadowOffsetY || 0;
      t = this._paintRect || (this._paintRect = new ht(0, 0, 0, 0)), a ? ht.applyTransform(t, n, a) : t.copy(n), (o || s || l) && (t.width += o * 2 + Math.abs(s), t.height += o * 2 + Math.abs(l), t.x = Math.min(t.x, t.x + s - o), t.y = Math.min(t.y, t.y + l - o));
      var u = this.dirtyRectTolerance;
      t.isZero() || (t.x = Math.floor(t.x - u), t.y = Math.floor(t.y - u), t.width = Math.ceil(t.width + 1 + u * 2), t.height = Math.ceil(t.height + 1 + u * 2));
    }
    return t;
  }, e.prototype.setPrevPaintRect = function(t) {
    t ? (this._prevPaintRect = this._prevPaintRect || new ht(0, 0, 0, 0), this._prevPaintRect.copy(t)) : this._prevPaintRect = null;
  }, e.prototype.getPrevPaintRect = function() {
    return this._prevPaintRect;
  }, e.prototype.animateStyle = function(t) {
    return this.animate("style", t);
  }, e.prototype.updateDuringAnimation = function(t) {
    t === "style" ? this.dirtyStyle() : this.markRedraw();
  }, e.prototype.attrKV = function(t, a) {
    t !== "style" ? r.prototype.attrKV.call(this, t, a) : this.style ? this.setStyle(a) : this.useStyle(a);
  }, e.prototype.setStyle = function(t, a) {
    return typeof t == "string" ? this.style[t] = a : V(this.style, t), this.dirtyStyle(), this;
  }, e.prototype.dirtyStyle = function(t) {
    t || this.markRedraw(), this.__dirty |= vs, this._rect && (this._rect = null);
  }, e.prototype.dirty = function() {
    this.dirtyStyle();
  }, e.prototype.styleChanged = function() {
    return !!(this.__dirty & vs);
  }, e.prototype.styleUpdated = function() {
    this.__dirty &= ~vs;
  }, e.prototype.createStyle = function(t) {
    return oh(ti, t);
  }, e.prototype.useStyle = function(t) {
    t[$p] || (t = this.createStyle(t)), this.__inHover ? this.__hoverStyle = t : this.style = t, this.dirtyStyle();
  }, e.prototype.isStyleObject = function(t) {
    return t[$p];
  }, e.prototype._innerSaveToNormal = function(t) {
    r.prototype._innerSaveToNormal.call(this, t);
    var a = this._normalState;
    t.style && !a.style && (a.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(t, a, r0);
  }, e.prototype._applyStateObj = function(t, a, n, i, o, s) {
    r.prototype._applyStateObj.call(this, t, a, n, i, o, s);
    var l = !(a && i), u;
    if (a && a.style ? o ? i ? u = a.style : (u = this._mergeStyle(this.createStyle(), n.style), this._mergeStyle(u, a.style)) : (u = this._mergeStyle(this.createStyle(), i ? this.style : n.style), this._mergeStyle(u, a.style)) : l && (u = n.style), u)
      if (o) {
        var f = this.style;
        if (this.style = this.createStyle(l ? {} : f), l)
          for (var h = _t(f), v = 0; v < h.length; v++) {
            var c = h[v];
            c in u && (u[c] = u[c], this.style[c] = f[c]);
          }
        for (var p = _t(u), v = 0; v < p.length; v++) {
          var c = p[v];
          this.style[c] = this.style[c];
        }
        this._transitionState(t, {
          style: u
        }, s, this.getAnimationStyleProps());
      } else
        this.useStyle(u);
    for (var d = this.__inHover ? PP : r0, v = 0; v < d.length; v++) {
      var c = d[v];
      a && a[c] != null ? this[c] = a[c] : l && n[c] != null && (this[c] = n[c]);
    }
  }, e.prototype._mergeStates = function(t) {
    for (var a = r.prototype._mergeStates.call(this, t), n, i = 0; i < t.length; i++) {
      var o = t[i];
      o.style && (n = n || {}, this._mergeStyle(n, o.style));
    }
    return n && (a.style = n), a;
  }, e.prototype._mergeStyle = function(t, a) {
    return V(t, a), t;
  }, e.prototype.getAnimationStyleProps = function() {
    return ph;
  }, e.initDefaultProps = function() {
    var t = e.prototype;
    t.type = "displayable", t.invisible = !1, t.z = 0, t.z2 = 0, t.zlevel = 0, t.culling = !1, t.cursor = "pointer", t.rectHover = !1, t.incremental = !1, t._rect = null, t.dirtyRectTolerance = 0, t.__dirty = We | vs;
  }(), e;
}(uT), yv = new ht(0, 0, 0, 0), mv = new ht(0, 0, 0, 0);
function NP(r, e, t) {
  return yv.copy(r.getBoundingRect()), r.transform && yv.applyTransform(r.transform), mv.width = e, mv.height = t, !yv.intersect(mv);
}
const ur = RP;
var Re = Math.min, Ne = Math.max, _v = Math.sin, Sv = Math.cos, dn = Math.PI * 2, Wl = gi(), $l = gi(), Ul = gi();
function dh(r, e, t) {
  if (r.length !== 0) {
    for (var a = r[0], n = a[0], i = a[0], o = a[1], s = a[1], l = 1; l < r.length; l++)
      a = r[l], n = Re(n, a[0]), i = Ne(i, a[0]), o = Re(o, a[1]), s = Ne(s, a[1]);
    e[0] = n, e[1] = o, t[0] = i, t[1] = s;
  }
}
function a0(r, e, t, a, n, i) {
  n[0] = Re(r, t), n[1] = Re(e, a), i[0] = Ne(r, t), i[1] = Ne(e, a);
}
var n0 = [], i0 = [];
function OP(r, e, t, a, n, i, o, s, l, u) {
  var f = Yb, h = ae, v = f(r, t, n, o, n0);
  l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  for (var c = 0; c < v; c++) {
    var p = h(r, t, n, o, n0[c]);
    l[0] = Re(p, l[0]), u[0] = Ne(p, u[0]);
  }
  v = f(e, a, i, s, i0);
  for (var c = 0; c < v; c++) {
    var d = h(e, a, i, s, i0[c]);
    l[1] = Re(d, l[1]), u[1] = Ne(d, u[1]);
  }
  l[0] = Re(r, l[0]), u[0] = Ne(r, u[0]), l[0] = Re(o, l[0]), u[0] = Ne(o, u[0]), l[1] = Re(e, l[1]), u[1] = Ne(e, u[1]), l[1] = Re(s, l[1]), u[1] = Ne(s, u[1]);
}
function kP(r, e, t, a, n, i, o, s) {
  var l = Xb, u = se, f = Ne(Re(l(r, t, n), 1), 0), h = Ne(Re(l(e, a, i), 1), 0), v = u(r, t, n, f), c = u(e, a, i, h);
  o[0] = Re(r, n, v), o[1] = Re(e, i, c), s[0] = Ne(r, n, v), s[1] = Ne(e, i, c);
}
function VP(r, e, t, a, n, i, o, s, l) {
  var u = Va, f = Ba, h = Math.abs(n - i);
  if (h % dn < 1e-4 && h > 1e-4) {
    s[0] = r - t, s[1] = e - a, l[0] = r + t, l[1] = e + a;
    return;
  }
  if (Wl[0] = Sv(n) * t + r, Wl[1] = _v(n) * a + e, $l[0] = Sv(i) * t + r, $l[1] = _v(i) * a + e, u(s, Wl, $l), f(l, Wl, $l), n = n % dn, n < 0 && (n = n + dn), i = i % dn, i < 0 && (i = i + dn), n > i && !o ? i += dn : n < i && o && (n += dn), o) {
    var v = i;
    i = n, n = v;
  }
  for (var c = 0; c < i; c += Math.PI / 2)
    c > n && (Ul[0] = Sv(c) * t + r, Ul[1] = _v(c) * a + e, u(s, Ul, s), f(l, Ul, l));
}
var Rt = {
  M: 1,
  L: 2,
  C: 3,
  Q: 4,
  A: 5,
  Z: 6,
  R: 7
}, gn = [], yn = [], Ir = [], Ta = [], Lr = [], Er = [], xv = Math.min, wv = Math.max, mn = Math.cos, _n = Math.sin, Jr = Math.abs, Up = Math.PI, Pa = Up * 2, bv = typeof Float32Array < "u", Ho = [];
function Tv(r) {
  var e = Math.round(r / Up * 1e8) / 1e8;
  return e % 2 * Up;
}
function IT(r, e) {
  var t = Tv(r[0]);
  t < 0 && (t += Pa);
  var a = t - r[0], n = r[1];
  n += a, !e && n - t >= Pa ? n = t + Pa : e && t - n >= Pa ? n = t - Pa : !e && t > n ? n = t + (Pa - Tv(t - n)) : e && t < n && (n = t - (Pa - Tv(n - t))), r[0] = t, r[1] = n;
}
var BP = function() {
  function r(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 r.prototype.increaseVersion = function() {
    this._version++;
  }, r.prototype.getVersion = function() {
    return this._version;
  }, r.prototype.setScale = function(e, t, a) {
    a = a || 0, a > 0 && (this._ux = Jr(a / ff / e) || 0, this._uy = Jr(a / ff / t) || 0);
  }, r.prototype.setDPR = function(e) {
    this.dpr = e;
  }, r.prototype.setContext = function(e) {
    this._ctx = e;
  }, r.prototype.getContext = function() {
    return this._ctx;
  }, r.prototype.beginPath = function() {
    return this._ctx && this._ctx.beginPath(), this.reset(), this;
  }, r.prototype.reset = function() {
    this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  }, r.prototype.moveTo = function(e, t) {
    return this._drawPendingPt(), this.addData(Rt.M, e, t), this._ctx && this._ctx.moveTo(e, t), this._x0 = e, this._y0 = t, this._xi = e, this._yi = t, this;
  }, r.prototype.lineTo = function(e, t) {
    var a = Jr(e - this._xi), n = Jr(t - this._yi), i = a > this._ux || n > this._uy;
    if (this.addData(Rt.L, e, t), this._ctx && i && this._ctx.lineTo(e, t), i)
      this._xi = e, this._yi = t, this._pendingPtDist = 0;
    else {
      var o = a * a + n * n;
      o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = t, this._pendingPtDist = o);
    }
    return this;
  }, r.prototype.bezierCurveTo = function(e, t, a, n, i, o) {
    return this._drawPendingPt(), this.addData(Rt.C, e, t, a, n, i, o), this._ctx && this._ctx.bezierCurveTo(e, t, a, n, i, o), this._xi = i, this._yi = o, this;
  }, r.prototype.quadraticCurveTo = function(e, t, a, n) {
    return this._drawPendingPt(), this.addData(Rt.Q, e, t, a, n), this._ctx && this._ctx.quadraticCurveTo(e, t, a, n), this._xi = a, this._yi = n, this;
  }, r.prototype.arc = function(e, t, a, n, i, o) {
    this._drawPendingPt(), Ho[0] = n, Ho[1] = i, IT(Ho, o), n = Ho[0], i = Ho[1];
    var s = i - n;
    return this.addData(Rt.A, e, t, a, a, n, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, t, a, n, i, o), this._xi = mn(i) * a + e, this._yi = _n(i) * a + t, this;
  }, r.prototype.arcTo = function(e, t, a, n, i) {
    return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, t, a, n, i), this;
  }, r.prototype.rect = function(e, t, a, n) {
    return this._drawPendingPt(), this._ctx && this._ctx.rect(e, t, a, n), this.addData(Rt.R, e, t, a, n), this;
  }, r.prototype.closePath = function() {
    this._drawPendingPt(), this.addData(Rt.Z);
    var e = this._ctx, t = this._x0, a = this._y0;
    return e && e.closePath(), this._xi = t, this._yi = a, this;
  }, r.prototype.fill = function(e) {
    e && e.fill(), this.toStatic();
  }, r.prototype.stroke = function(e) {
    e && e.stroke(), this.toStatic();
  }, r.prototype.len = function() {
    return this._len;
  }, r.prototype.setData = function(e) {
    var t = e.length;
    !(this.data && this.data.length === t) && bv && (this.data = new Float32Array(t));
    for (var a = 0; a < t; a++)
      this.data[a] = e[a];
    this._len = t;
  }, r.prototype.appendPath = function(e) {
    e instanceof Array || (e = [e]);
    for (var t = e.length, a = 0, n = this._len, i = 0; i < t; i++)
      a += e[i].len();
    bv && this.data instanceof Float32Array && (this.data = new Float32Array(n + a));
    for (var i = 0; i < t; i++)
      for (var o = e[i].data, s = 0; s < o.length; s++)
        this.data[n++] = o[s];
    this._len = n;
  }, r.prototype.addData = function(e, t, a, n, i, o, s, l, u) {
    if (this._saveData) {
      var f = this.data;
      this._len + arguments.length > f.length && (this._expandData(), f = this.data);
      for (var h = 0; h < arguments.length; h++)
        f[this._len++] = arguments[h];
    }
  }, r.prototype._drawPendingPt = function() {
    this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  }, r.prototype._expandData = function() {
    if (!(this.data instanceof Array)) {
      for (var e = [], t = 0; t < this._len; t++)
        e[t] = this.data[t];
      this.data = e;
    }
  }, r.prototype.toStatic = function() {
    if (this._saveData) {
      this._drawPendingPt();
      var e = this.data;
      e instanceof Array && (e.length = this._len, bv && this._len > 11 && (this.data = new Float32Array(e)));
    }
  }, r.prototype.getBoundingRect = function() {
    Ir[0] = Ir[1] = Lr[0] = Lr[1] = Number.MAX_VALUE, Ta[0] = Ta[1] = Er[0] = Er[1] = -Number.MAX_VALUE;
    var e = this.data, t = 0, a = 0, n = 0, i = 0, o;
    for (o = 0; o < this._len; ) {
      var s = e[o++], l = o === 1;
      switch (l && (t = e[o], a = e[o + 1], n = t, i = a), s) {
        case Rt.M:
          t = n = e[o++], a = i = e[o++], Lr[0] = n, Lr[1] = i, Er[0] = n, Er[1] = i;
          break;
        case Rt.L:
          a0(t, a, e[o], e[o + 1], Lr, Er), t = e[o++], a = e[o++];
          break;
        case Rt.C:
          OP(t, a, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], Lr, Er), t = e[o++], a = e[o++];
          break;
        case Rt.Q:
          kP(t, a, e[o++], e[o++], e[o], e[o + 1], Lr, Er), t = e[o++], a = e[o++];
          break;
        case Rt.A:
          var u = e[o++], f = e[o++], h = e[o++], v = e[o++], c = e[o++], p = e[o++] + c;
          o += 1;
          var d = !e[o++];
          l && (n = mn(c) * h + u, i = _n(c) * v + f), VP(u, f, h, v, c, p, d, Lr, Er), t = mn(p) * h + u, a = _n(p) * v + f;
          break;
        case Rt.R:
          n = t = e[o++], i = a = e[o++];
          var g = e[o++], y = e[o++];
          a0(n, i, n + g, i + y, Lr, Er);
          break;
        case Rt.Z:
          t = n, a = i;
          break;
      }
      Va(Ir, Ir, Lr), Ba(Ta, Ta, Er);
    }
    return o === 0 && (Ir[0] = Ir[1] = Ta[0] = Ta[1] = 0), new ht(Ir[0], Ir[1], Ta[0] - Ir[0], Ta[1] - Ir[1]);
  }, r.prototype._calculateLength = function() {
    var e = this.data, t = this._len, a = this._ux, n = this._uy, i = 0, o = 0, s = 0, l = 0;
    this._pathSegLen || (this._pathSegLen = []);
    for (var u = this._pathSegLen, f = 0, h = 0, v = 0; v < t; ) {
      var c = e[v++], p = v === 1;
      p && (i = e[v], o = e[v + 1], s = i, l = o);
      var d = -1;
      switch (c) {
        case Rt.M:
          i = s = e[v++], o = l = e[v++];
          break;
        case Rt.L: {
          var g = e[v++], y = e[v++], m = g - i, _ = y - o;
          (Jr(m) > a || Jr(_) > n || v === t - 1) && (d = Math.sqrt(m * m + _ * _), i = g, o = y);
          break;
        }
        case Rt.C: {
          var S = e[v++], w = e[v++], g = e[v++], y = e[v++], x = e[v++], b = e[v++];
          d = j2(i, o, S, w, g, y, x, b, 10), i = x, o = b;
          break;
        }
        case Rt.Q: {
          var S = e[v++], w = e[v++], g = e[v++], y = e[v++];
          d = J2(i, o, S, w, g, y, 10), i = g, o = y;
          break;
        }
        case Rt.A:
          var T = e[v++], D = e[v++], A = e[v++], M = e[v++], I = e[v++], L = e[v++], E = L + I;
          v += 1, e[v++], p && (s = mn(I) * A + T, l = _n(I) * M + D), d = wv(A, M) * xv(Pa, Math.abs(L)), i = mn(E) * A + T, o = _n(E) * M + D;
          break;
        case Rt.R: {
          s = i = e[v++], l = o = e[v++];
          var P = e[v++], R = e[v++];
          d = P * 2 + R * 2;
          break;
        }
        case Rt.Z: {
          var m = s - i, _ = l - o;
          d = Math.sqrt(m * m + _ * _), i = s, o = l;
          break;
        }
      }
      d >= 0 && (u[h++] = d, f += d);
    }
    return this._pathLen = f, f;
  }, r.prototype.rebuildPath = function(e, t) {
    var a = this.data, n = this._ux, i = this._uy, o = this._len, s, l, u, f, h, v, c = t < 1, p, d, g = 0, y = 0, m, _ = 0, S, w;
    if (!(c && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, d = this._pathLen, m = t * d, !m)))
      t:
        for (var x = 0; x < o; ) {
          var b = a[x++], T = x === 1;
          switch (T && (u = a[x], f = a[x + 1], s = u, l = f), b !== Rt.L && _ > 0 && (e.lineTo(S, w), _ = 0), b) {
            case Rt.M:
              s = u = a[x++], l = f = a[x++], e.moveTo(u, f);
              break;
            case Rt.L: {
              h = a[x++], v = a[x++];
              var D = Jr(h - u), A = Jr(v - f);
              if (D > n || A > i) {
                if (c) {
                  var M = p[y++];
                  if (g + M > m) {
                    var I = (m - g) / M;
                    e.lineTo(u * (1 - I) + h * I, f * (1 - I) + v * I);
                    break t;
                  }
                  g += M;
                }
                e.lineTo(h, v), u = h, f = v, _ = 0;
              } else {
                var L = D * D + A * A;
                L > _ && (S = h, w = v, _ = L);
              }
              break;
            }
            case Rt.C: {
              var E = a[x++], P = a[x++], R = a[x++], k = a[x++], O = a[x++], B = a[x++];
              if (c) {
                var M = p[y++];
                if (g + M > m) {
                  var I = (m - g) / M;
                  Ka(u, E, R, O, I, gn), Ka(f, P, k, B, I, yn), e.bezierCurveTo(gn[1], yn[1], gn[2], yn[2], gn[3], yn[3]);
                  break t;
                }
                g += M;
              }
              e.bezierCurveTo(E, P, R, k, O, B), u = O, f = B;
              break;
            }
            case Rt.Q: {
              var E = a[x++], P = a[x++], R = a[x++], k = a[x++];
              if (c) {
                var M = p[y++];
                if (g + M > m) {
                  var I = (m - g) / M;
                  Gs(u, E, R, I, gn), Gs(f, P, k, I, yn), e.quadraticCurveTo(gn[1], yn[1], gn[2], yn[2]);
                  break t;
                }
                g += M;
              }
              e.quadraticCurveTo(E, P, R, k), u = R, f = k;
              break;
            }
            case Rt.A:
              var F = a[x++], W = a[x++], Z = a[x++], J = a[x++], et = a[x++], yt = a[x++], At = a[x++], dt = !a[x++], at = Z > J ? Z : J, mt = Jr(Z - J) > 1e-3, vt = et + yt, X = !1;
              if (c) {
                var M = p[y++];
                g + M > m && (vt = et + yt * (m - g) / M, X = !0), g += M;
              }
              if (mt && e.ellipse ? e.ellipse(F, W, Z, J, At, et, vt, dt) : e.arc(F, W, at, et, vt, dt), X)
                break t;
              T && (s = mn(et) * Z + F, l = _n(et) * J + W), u = mn(vt) * Z + F, f = _n(vt) * J + W;
              break;
            case Rt.R:
              s = u = a[x], l = f = a[x + 1], h = a[x++], v = a[x++];
              var st = a[x++], zt = a[x++];
              if (c) {
                var M = p[y++];
                if (g + M > m) {
                  var xt = m - g;
                  e.moveTo(h, v), e.lineTo(h + xv(xt, st), v), xt -= st, xt > 0 && e.lineTo(h + st, v + xv(xt, zt)), xt -= zt, xt > 0 && e.lineTo(h + wv(st - xt, 0), v + zt), xt -= st, xt > 0 && e.lineTo(h, v + wv(zt - xt, 0));
                  break t;
                }
                g += M;
              }
              e.rect(h, v, st, zt);
              break;
            case Rt.Z:
              if (c) {
                var M = p[y++];
                if (g + M > m) {
                  var I = (m - g) / M;
                  e.lineTo(u * (1 - I) + s * I, f * (1 - I) + l * I);
                  break t;
                }
                g += M;
              }
              e.closePath(), u = s, f = l;
          }
        }
  }, r.prototype.clone = function() {
    var e = new r(), t = this.data;
    return e.data = t.slice ? t.slice() : Array.prototype.slice.call(t), e._len = this._len, e;
  }, r.CMD = Rt, r.initDefaultProps = function() {
    var e = r.prototype;
    e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  }(), r;
}();
const Xr = BP;
function Na(r, e, t, a, n, i, o) {
  if (n === 0)
    return !1;
  var s = n, l = 0, u = r;
  if (o > e + s && o > a + s || o < e - s && o < a - s || i > r + s && i > t + s || i < r - s && i < t - s)
    return !1;
  if (r !== t)
    l = (e - a) / (r - t), u = (r * a - t * e) / (r - t);
  else
    return Math.abs(i - r) <= s / 2;
  var f = l * i - o + u, h = f * f / (l * l + 1);
  return h <= s / 2 * s / 2;
}
function zP(r, e, t, a, n, i, o, s, l, u, f) {
  if (l === 0)
    return !1;
  var h = l;
  if (f > e + h && f > a + h && f > i + h && f > s + h || f < e - h && f < a - h && f < i - h && f < s - h || u > r + h && u > t + h && u > n + h && u > o + h || u < r - h && u < t - h && u < n - h && u < o - h)
    return !1;
  var v = Zb(r, e, t, a, n, i, o, s, u, f, null);
  return v <= h / 2;
}
function LT(r, e, t, a, n, i, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  if (l > e + u && l > a + u && l > i + u || l < e - u && l < a - u && l < i - u || s > r + u && s > t + u && s > n + u || s < r - u && s < t - u && s < n - u)
    return !1;
  var f = qb(r, e, t, a, n, i, s, l, null);
  return f <= u / 2;
}
var o0 = Math.PI * 2;
function ia(r) {
  return r %= o0, r < 0 && (r += o0), r;
}
var Wo = Math.PI * 2;
function GP(r, e, t, a, n, i, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  s -= r, l -= e;
  var f = Math.sqrt(s * s + l * l);
  if (f - u > t || f + u < t)
    return !1;
  if (Math.abs(a - n) % Wo < 1e-4)
    return !0;
  if (i) {
    var h = a;
    a = ia(n), n = ia(h);
  } else
    a = ia(a), n = ia(n);
  a > n && (n += Wo);
  var v = Math.atan2(l, s);
  return v < 0 && (v += Wo), v >= a && v <= n || v + Wo >= a && v + Wo <= n;
}
function aa(r, e, t, a, n, i) {
  if (i > e && i > a || i < e && i < a || a === e)
    return 0;
  var o = (i - e) / (a - e), s = a < e ? 1 : -1;
  (o === 1 || o === 0) && (s = a < e ? 0.5 : -0.5);
  var l = o * (t - r) + r;
  return l === n ? 1 / 0 : l > n ? s : 0;
}
var Da = Xr.CMD, Sn = Math.PI * 2, FP = 1e-4;
function HP(r, e) {
  return Math.abs(r - e) < FP;
}
var Te = [-1, -1, -1], tr = [-1, -1];
function WP() {
  var r = tr[0];
  tr[0] = tr[1], tr[1] = r;
}
function $P(r, e, t, a, n, i, o, s, l, u) {
  if (u > e && u > a && u > i && u > s || u < e && u < a && u < i && u < s)
    return 0;
  var f = of(e, a, i, s, u, Te);
  if (f === 0)
    return 0;
  for (var h = 0, v = -1, c = void 0, p = void 0, d = 0; d < f; d++) {
    var g = Te[d], y = g === 0 || g === 1 ? 0.5 : 1, m = ae(r, t, n, o, g);
    m < l || (v < 0 && (v = Yb(e, a, i, s, tr), tr[1] < tr[0] && v > 1 && WP(), c = ae(e, a, i, s, tr[0]), v > 1 && (p = ae(e, a, i, s, tr[1]))), v === 2 ? g < tr[0] ? h += c < e ? y : -y : g < tr[1] ? h += p < c ? y : -y : h += s < p ? y : -y : g < tr[0] ? h += c < e ? y : -y : h += s < c ? y : -y);
  }
  return h;
}
function UP(r, e, t, a, n, i, o, s) {
  if (s > e && s > a && s > i || s < e && s < a && s < i)
    return 0;
  var l = Q2(e, a, i, s, Te);
  if (l === 0)
    return 0;
  var u = Xb(e, a, i);
  if (u >= 0 && u <= 1) {
    for (var f = 0, h = se(e, a, i, u), v = 0; v < l; v++) {
      var c = Te[v] === 0 || Te[v] === 1 ? 0.5 : 1, p = se(r, t, n, Te[v]);
      p < o || (Te[v] < u ? f += h < e ? c : -c : f += i < h ? c : -c);
    }
    return f;
  } else {
    var c = Te[0] === 0 || Te[0] === 1 ? 0.5 : 1, p = se(r, t, n, Te[0]);
    return p < o ? 0 : i < e ? c : -c;
  }
}
function YP(r, e, t, a, n, i, o, s) {
  if (s -= e, s > t || s < -t)
    return 0;
  var l = Math.sqrt(t * t - s * s);
  Te[0] = -l, Te[1] = l;
  var u = Math.abs(a - n);
  if (u < 1e-4)
    return 0;
  if (u >= Sn - 1e-4) {
    a = 0, n = Sn;
    var f = i ? 1 : -1;
    return o >= Te[0] + r && o <= Te[1] + r ? f : 0;
  }
  if (a > n) {
    var h = a;
    a = n, n = h;
  }
  a < 0 && (a += Sn, n += Sn);
  for (var v = 0, c = 0; c < 2; c++) {
    var p = Te[c];
    if (p + r > o) {
      var d = Math.atan2(s, p), f = i ? 1 : -1;
      d < 0 && (d = Sn + d), (d >= a && d <= n || d + Sn >= a && d + Sn <= n) && (d > Math.PI / 2 && d < Math.PI * 1.5 && (f = -f), v += f);
    }
  }
  return v;
}
function ET(r, e, t, a, n) {
  for (var i = r.data, o = r.len(), s = 0, l = 0, u = 0, f = 0, h = 0, v, c, p = 0; p < o; ) {
    var d = i[p++], g = p === 1;
    switch (d === Da.M && p > 1 && (t || (s += aa(l, u, f, h, a, n))), g && (l = i[p], u = i[p + 1], f = l, h = u), d) {
      case Da.M:
        f = i[p++], h = i[p++], l = f, u = h;
        break;
      case Da.L:
        if (t) {
          if (Na(l, u, i[p], i[p + 1], e, a, n))
            return !0;
        } else
          s += aa(l, u, i[p], i[p + 1], a, n) || 0;
        l = i[p++], u = i[p++];
        break;
      case Da.C:
        if (t) {
          if (zP(l, u, i[p++], i[p++], i[p++], i[p++], i[p], i[p + 1], e, a, n))
            return !0;
        } else
          s += $P(l, u, i[p++], i[p++], i[p++], i[p++], i[p], i[p + 1], a, n) || 0;
        l = i[p++], u = i[p++];
        break;
      case Da.Q:
        if (t) {
          if (LT(l, u, i[p++], i[p++], i[p], i[p + 1], e, a, n))
            return !0;
        } else
          s += UP(l, u, i[p++], i[p++], i[p], i[p + 1], a, n) || 0;
        l = i[p++], u = i[p++];
        break;
      case Da.A:
        var y = i[p++], m = i[p++], _ = i[p++], S = i[p++], w = i[p++], x = i[p++];
        p += 1;
        var b = !!(1 - i[p++]);
        v = Math.cos(w) * _ + y, c = Math.sin(w) * S + m, g ? (f = v, h = c) : s += aa(l, u, v, c, a, n);
        var T = (a - y) * S / _ + y;
        if (t) {
          if (GP(y, m, S, w, w + x, b, e, T, n))
            return !0;
        } else
          s += YP(y, m, S, w, w + x, b, T, n);
        l = Math.cos(w + x) * _ + y, u = Math.sin(w + x) * S + m;
        break;
      case Da.R:
        f = l = i[p++], h = u = i[p++];
        var D = i[p++], A = i[p++];
        if (v = f + D, c = h + A, t) {
          if (Na(f, h, v, h, e, a, n) || Na(v, h, v, c, e, a, n) || Na(v, c, f, c, e, a, n) || Na(f, c, f, h, e, a, n))
            return !0;
        } else
          s += aa(v, h, v, c, a, n), s += aa(f, c, f, h, a, n);
        break;
      case Da.Z:
        if (t) {
          if (Na(l, u, f, h, e, a, n))
            return !0;
        } else
          s += aa(l, u, f, h, a, n);
        l = f, u = h;
        break;
    }
  }
  return !t && !HP(u, h) && (s += aa(l, u, f, h, a, n) || 0), s !== 0;
}
function ZP(r, e, t) {
  return ET(r, 0, !1, e, t);
}
function XP(r, e, t, a) {
  return ET(r, e, !0, t, a);
}
var cf = tt({
  fill: "#000",
  stroke: null,
  strokePercent: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  lineDashOffset: 0,
  lineWidth: 1,
  lineCap: "butt",
  miterLimit: 10,
  strokeNoScale: !1,
  strokeFirst: !1
}, ti), qP = {
  style: tt({
    fill: !0,
    stroke: !0,
    strokePercent: !0,
    fillOpacity: !0,
    strokeOpacity: !0,
    lineDashOffset: !0,
    lineWidth: !0,
    miterLimit: !0
  }, ph.style)
}, Dv = Yr.concat([
  "invisible",
  "culling",
  "z",
  "z2",
  "zlevel",
  "parent"
]), KP = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.update = function() {
    var t = this;
    r.prototype.update.call(this);
    var a = this.style;
    if (a.decal) {
      var n = this._decalEl = this._decalEl || new e();
      n.buildPath === e.prototype.buildPath && (n.buildPath = function(l) {
        t.buildPath(l, t.shape);
      }), n.silent = !0;
      var i = n.style;
      for (var o in a)
        i[o] !== a[o] && (i[o] = a[o]);
      i.fill = a.fill ? a.decal : null, i.decal = null, i.shadowColor = null, a.strokeFirst && (i.stroke = null);
      for (var s = 0; s < Dv.length; ++s)
        n[Dv[s]] = this[Dv[s]];
      n.__dirty |= We;
    } else
      this._decalEl && (this._decalEl = null);
  }, e.prototype.getDecalElement = function() {
    return this._decalEl;
  }, e.prototype._init = function(t) {
    var a = _t(t);
    this.shape = this.getDefaultShape();
    var n = this.getDefaultStyle();
    n && this.useStyle(n);
    for (var i = 0; i < a.length; i++) {
      var o = a[i], s = t[o];
      o === "style" ? this.style ? V(this.style, s) : this.useStyle(s) : o === "shape" ? V(this.shape, s) : r.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 t = this.style.fill;
    if (t !== "none") {
      if ($(t)) {
        var a = lf(t, 0);
        return a > 0.5 ? zp : a > 0.2 ? LE : Gp;
      } else if (t)
        return Gp;
    }
    return zp;
  }, e.prototype.getInsideTextStroke = function(t) {
    var a = this.style.fill;
    if ($(a)) {
      var n = this.__zr, i = !!(n && n.isDarkMode()), o = lf(t, 0) < Bp;
      if (i === o)
        return a;
    }
  }, e.prototype.buildPath = function(t, a, n) {
  }, e.prototype.pathUpdated = function() {
    this.__dirty &= ~Yi;
  }, e.prototype.getUpdatedPathProxy = function(t) {
    return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, t), this.path;
  }, e.prototype.createPathProxy = function() {
    this.path = new Xr(!1);
  }, e.prototype.hasStroke = function() {
    var t = this.style, a = t.stroke;
    return !(a == null || a === "none" || !(t.lineWidth > 0));
  }, e.prototype.hasFill = function() {
    var t = this.style, a = t.fill;
    return a != null && a !== "none";
  }, e.prototype.getBoundingRect = function() {
    var t = this._rect, a = this.style, n = !t;
    if (n) {
      var i = !1;
      this.path || (i = !0, this.createPathProxy());
      var o = this.path;
      (i || this.__dirty & Yi) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), t = o.getBoundingRect();
    }
    if (this._rect = t, this.hasStroke() && this.path && this.path.len() > 0) {
      var s = this._rectStroke || (this._rectStroke = t.clone());
      if (this.__dirty || n) {
        s.copy(t);
        var l = a.strokeNoScale ? this.getLineScale() : 1, u = a.lineWidth;
        if (!this.hasFill()) {
          var f = this.strokeContainThreshold;
          u = Math.max(u, f ?? 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 t;
  }, e.prototype.contain = function(t, a) {
    var n = this.transformCoordToLocal(t, a), i = this.getBoundingRect(), o = this.style;
    if (t = n[0], a = n[1], i.contain(t, a)) {
      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)), XP(s, l / u, t, a)))
          return !0;
      }
      if (this.hasFill())
        return ZP(s, t, a);
    }
    return !1;
  }, e.prototype.dirtyShape = function() {
    this.__dirty |= Yi, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  }, e.prototype.dirty = function() {
    this.dirtyStyle(), this.dirtyShape();
  }, e.prototype.animateShape = function(t) {
    return this.animate("shape", t);
  }, e.prototype.updateDuringAnimation = function(t) {
    t === "style" ? this.dirtyStyle() : t === "shape" ? this.dirtyShape() : this.markRedraw();
  }, e.prototype.attrKV = function(t, a) {
    t === "shape" ? this.setShape(a) : r.prototype.attrKV.call(this, t, a);
  }, e.prototype.setShape = function(t, a) {
    var n = this.shape;
    return n || (n = this.shape = {}), typeof t == "string" ? n[t] = a : V(n, t), this.dirtyShape(), this;
  }, e.prototype.shapeChanged = function() {
    return !!(this.__dirty & Yi);
  }, e.prototype.createStyle = function(t) {
    return oh(cf, t);
  }, e.prototype._innerSaveToNormal = function(t) {
    r.prototype._innerSaveToNormal.call(this, t);
    var a = this._normalState;
    t.shape && !a.shape && (a.shape = V({}, this.shape));
  }, e.prototype._applyStateObj = function(t, a, n, i, o, s) {
    r.prototype._applyStateObj.call(this, t, a, n, i, o, s);
    var l = !(a && i), u;
    if (a && a.shape ? o ? i ? u = a.shape : (u = V({}, n.shape), V(u, a.shape)) : (u = V({}, i ? this.shape : n.shape), V(u, a.shape)) : l && (u = n.shape), u)
      if (o) {
        this.shape = V({}, this.shape);
        for (var f = {}, h = _t(u), v = 0; v < h.length; v++) {
          var c = h[v];
          typeof u[c] == "object" ? this.shape[c] = u[c] : f[c] = u[c];
        }
        this._transitionState(t, {
          shape: f
        }, s);
      } else
        this.shape = u, this.dirtyShape();
  }, e.prototype._mergeStates = function(t) {
    for (var a = r.prototype._mergeStates.call(this, t), n, i = 0; i < t.length; i++) {
      var o = t[i];
      o.shape && (n = n || {}, this._mergeStyle(n, o.shape));
    }
    return n && (a.shape = n), a;
  }, e.prototype.getAnimationStyleProps = function() {
    return qP;
  }, e.prototype.isZeroArea = function() {
    return !1;
  }, e.extend = function(t) {
    var a = function(i) {
      N(o, i);
      function o(s) {
        var l = i.call(this, s) || this;
        return t.init && t.init.call(l, s), l;
      }
      return o.prototype.getDefaultStyle = function() {
        return rt(t.style);
      }, o.prototype.getDefaultShape = function() {
        return rt(t.shape);
      }, o;
    }(e);
    for (var n in t)
      typeof t[n] == "function" && (a.prototype[n] = t[n]);
    return a;
  }, e.initDefaultProps = function() {
    var t = e.prototype;
    t.type = "path", t.strokeContainThreshold = 5, t.segmentIgnoreThreshold = 0, t.subPixelOptimize = !1, t.autoBatch = !1, t.__dirty = We | vs | Yi;
  }(), e;
}(ur);
const gt = KP;
var jP = tt({
  strokeFirst: !0,
  font: Xa,
  x: 0,
  y: 0,
  textAlign: "left",
  textBaseline: "top",
  miterLimit: 2
}, cf), PT = function(r) {
  N(e, r);
  function e() {
    return r !== null && r.apply(this, arguments) || this;
  }
  return e.prototype.hasStroke = function() {
    var t = this.style, a = t.stroke;
    return a != null && a !== "none" && t.lineWidth > 0;
  }, e.prototype.hasFill = function() {
    var t = this.style, a = t.fill;
    return a != null && a !== "none";
  }, e.prototype.createStyle = function(t) {
    return oh(jP, t);
  }, e.prototype.setBoundingRect = function(t) {
    this._rect = t;
  }, e.prototype.getBoundingRect = function() {
    var t = this.style;
    if (!this._rect) {
      var a = t.text;
      a != null ? a += "" : a = "";
      var n = vl(a, t.font, t.textAlign, t.textBaseline);
      if (n.x += t.x || 0, n.y += t.y || 0, this.hasStroke()) {
        var i = t.lineWidth;
        n.x -= i / 2, n.y -= i / 2, n.width += i, n.height += i;
      }
      this._rect = n;
    }
    return this._rect;
  }, e.initDefaultProps = function() {
    var t = e.prototype;
    t.dirtyRectTolerance = 10;
  }(), e;
}(ur);
PT.prototype.type = "tspan";
const Ws = PT;
var QP = tt({
  x: 0,
  y: 0
}, ti), JP = {
  style: tt({
    x: !0,
    y: !0,
    width: !0,
    height: !0,
    sx: !0,
    sy: !0,
    sWidth: !0,
    sHeight: !0
  }, ph.style)
};
function tR(r) {
  return !!(r && typeof r != "string" && r.width && r.height);
}
var RT = function(r) {
  N(e, r);
  function e() {
    return r !== null && r.apply(this, arguments) || this;
  }
  return e.prototype.createStyle = function(t) {
    return oh(QP, t);
  }, e.prototype._getSize = function(t) {
    var a = this.style, n = a[t];
    if (n != null)
      return n;
    var i = tR(a.image) ? a.image : this.__image;
    if (!i)
      return 0;
    var o = t === "width" ? "height" : "width", s = a[o];
    return s == null ? i[t] : i[t] / i[o] * s;
  }, e.prototype.getWidth = function() {
    return this._getSize("width");
  }, e.prototype.getHeight = function() {
    return this._getSize("height");
  }, e.prototype.getAnimationStyleProps = function() {
    return JP;
  }, e.prototype.getBoundingRect = function() {
    var t = this.style;
    return this._rect || (this._rect = new ht(t.x || 0, t.y || 0, this.getWidth(), this.getHeight())), this._rect;
  }, e;
}(ur);
RT.prototype.type = "image";
const de = RT;
function eR(r, e) {
  var t = e.x, a = e.y, n = e.width, i = e.height, o = e.r, s, l, u, f;
  n < 0 && (t = t + n, n = -n), i < 0 && (a = a + i, i = -i), typeof o == "number" ? s = l = u = f = o : o instanceof Array ? o.length === 1 ? s = l = u = f = o[0] : o.length === 2 ? (s = u = o[0], l = f = o[1]) : o.length === 3 ? (s = o[0], l = f = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], f = o[3]) : s = l = u = f = 0;
  var h;
  s + l > n && (h = s + l, s *= n / h, l *= n / h), u + f > n && (h = u + f, u *= n / h, f *= n / h), l + u > i && (h = l + u, l *= i / h, u *= i / h), s + f > i && (h = s + f, s *= i / h, f *= i / h), r.moveTo(t + s, a), r.lineTo(t + n - l, a), l !== 0 && r.arc(t + n - l, a + l, l, -Math.PI / 2, 0), r.lineTo(t + n, a + i - u), u !== 0 && r.arc(t + n - u, a + i - u, u, 0, Math.PI / 2), r.lineTo(t + f, a + i), f !== 0 && r.arc(t + f, a + i - f, f, Math.PI / 2, Math.PI), r.lineTo(t, a + s), s !== 0 && r.arc(t + s, a + s, s, Math.PI, Math.PI * 1.5);
}
var Qi = Math.round;
function NT(r, e, t) {
  if (e) {
    var a = e.x1, n = e.x2, i = e.y1, o = e.y2;
    r.x1 = a, r.x2 = n, r.y1 = i, r.y2 = o;
    var s = t && t.lineWidth;
    return s && (Qi(a * 2) === Qi(n * 2) && (r.x1 = r.x2 = Un(a, s, !0)), Qi(i * 2) === Qi(o * 2) && (r.y1 = r.y2 = Un(i, s, !0))), r;
  }
}
function OT(r, e, t) {
  if (e) {
    var a = e.x, n = e.y, i = e.width, o = e.height;
    r.x = a, r.y = n, r.width = i, r.height = o;
    var s = t && t.lineWidth;
    return s && (r.x = Un(a, s, !0), r.y = Un(n, s, !0), r.width = Math.max(Un(a + i, s, !1) - r.x, i === 0 ? 0 : 1), r.height = Math.max(Un(n + o, s, !1) - r.y, o === 0 ? 0 : 1)), r;
  }
}
function Un(r, e, t) {
  if (!e)
    return r;
  var a = Qi(r * 2);
  return (a + Qi(e)) % 2 === 0 ? a / 2 : (a + (t ? 1 : -1)) / 2;
}
var rR = function() {
  function r() {
    this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  }
  return r;
}(), aR = {}, kT = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new rR();
  }, e.prototype.buildPath = function(t, a) {
    var n, i, o, s;
    if (this.subPixelOptimize) {
      var l = OT(aR, a, this.style);
      n = l.x, i = l.y, o = l.width, s = l.height, l.r = a.r, a = l;
    } else
      n = a.x, i = a.y, o = a.width, s = a.height;
    a.r ? eR(t, a) : t.rect(n, i, o, s);
  }, e.prototype.isZeroArea = function() {
    return !this.shape.width || !this.shape.height;
  }, e;
}(gt);
kT.prototype.type = "rect";
const bt = kT;
var s0 = {
  fill: "#000"
}, l0 = 2, nR = {
  style: tt({
    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
  }, ph.style)
}, VT = function(r) {
  N(e, r);
  function e(t) {
    var a = r.call(this) || this;
    return a.type = "text", a._children = [], a._defaultStyle = s0, a.attr(t), a;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.update = function() {
    r.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
    for (var t = 0; t < this._children.length; t++) {
      var a = this._children[t];
      a.zlevel = this.zlevel, a.z = this.z, a.z2 = this.z2, a.culling = this.culling, a.cursor = this.cursor, a.invisible = this.invisible;
    }
  }, e.prototype.updateTransform = function() {
    var t = this.innerTransformable;
    t ? (t.updateTransform(), t.transform && (this.transform = t.transform)) : r.prototype.updateTransform.call(this);
  }, e.prototype.getLocalTransform = function(t) {
    var a = this.innerTransformable;
    return a ? a.getLocalTransform(t) : r.prototype.getLocalTransform.call(this, t);
  }, e.prototype.getComputedTransform = function() {
    return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), r.prototype.getComputedTransform.call(this);
  }, e.prototype._updateSubTexts = function() {
    this._childCursor = 0, sR(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  }, e.prototype.addSelfToZr = function(t) {
    r.prototype.addSelfToZr.call(this, t);
    for (var a = 0; a < this._children.length; a++)
      this._children[a].__zr = t;
  }, e.prototype.removeSelfFromZr = function(t) {
    r.prototype.removeSelfFromZr.call(this, t);
    for (var a = 0; a < this._children.length; a++)
      this._children[a].__zr = null;
  }, e.prototype.getBoundingRect = function() {
    if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
      for (var t = new ht(0, 0, 0, 0), a = this._children, n = [], i = null, o = 0; o < a.length; o++) {
        var s = a[o], l = s.getBoundingRect(), u = s.getLocalTransform(n);
        u ? (t.copy(l), t.applyTransform(u), i = i || t.clone(), i.union(t)) : (i = i || l.clone(), i.union(l));
      }
      this._rect = i || t;
    }
    return this._rect;
  }, e.prototype.setDefaultTextStyle = function(t) {
    this._defaultStyle = t || s0;
  }, e.prototype.setTextContent = function(t) {
    if ({}.NODE_ENV !== "production")
      throw new Error("Can't attach text on another text");
  }, e.prototype._mergeStyle = function(t, a) {
    if (!a)
      return t;
    var n = a.rich, i = t.rich || n && {};
    return V(t, a), n && i ? (this._mergeRich(i, n), t.rich = i) : i && (t.rich = i), t;
  }, e.prototype._mergeRich = function(t, a) {
    for (var n = _t(a), i = 0; i < n.length; i++) {
      var o = n[i];
      t[o] = t[o] || {}, V(t[o], a[o]);
    }
  }, e.prototype.getAnimationStyleProps = function() {
    return nR;
  }, e.prototype._getOrCreateChild = function(t) {
    var a = this._children[this._childCursor];
    return (!a || !(a instanceof t)) && (a = new t()), this._children[this._childCursor++] = a, a.__zr = this.__zr, a.parent = this, a;
  }, e.prototype._updatePlainTexts = function() {
    var t = this.style, a = t.font || Xa, n = t.padding, i = d0(t), o = DP(i, t), s = Cv(t), l = !!t.backgroundColor, u = o.outerHeight, f = o.outerWidth, h = o.contentWidth, v = o.lines, c = o.lineHeight, p = this._defaultStyle, d = t.x || 0, g = t.y || 0, y = t.align || p.align || "left", m = t.verticalAlign || p.verticalAlign || "top", _ = d, S = Zi(g, o.contentHeight, m);
    if (s || n) {
      var w = ps(d, f, y), x = Zi(g, u, m);
      s && this._renderBackground(t, t, w, x, f, u);
    }
    S += c / 2, n && (_ = p0(d, y, n), m === "top" ? S += n[0] : m === "bottom" && (S -= n[2]));
    for (var b = 0, T = !1, D = c0("fill" in t ? t.fill : (T = !0, p.fill)), A = v0("stroke" in t ? t.stroke : !l && (!p.autoStroke || T) ? (b = l0, p.stroke) : null), M = t.textShadowBlur > 0, I = t.width != null && (t.overflow === "truncate" || t.overflow === "break" || t.overflow === "breakAll"), L = o.calculatedLineHeight, E = 0; E < v.length; E++) {
      var P = this._getOrCreateChild(Ws), R = P.createStyle();
      P.useStyle(R), R.text = v[E], R.x = _, R.y = S, y && (R.textAlign = y), R.textBaseline = "middle", R.opacity = t.opacity, R.strokeFirst = !0, M && (R.shadowBlur = t.textShadowBlur || 0, R.shadowColor = t.textShadowColor || "transparent", R.shadowOffsetX = t.textShadowOffsetX || 0, R.shadowOffsetY = t.textShadowOffsetY || 0), R.stroke = A, R.fill = D, A && (R.lineWidth = t.lineWidth || b, R.lineDash = t.lineDash, R.lineDashOffset = t.lineDashOffset || 0), R.font = a, f0(R, t), S += c, I && P.setBoundingRect(new ht(ps(R.x, t.width, R.textAlign), Zi(R.y, L, R.textBaseline), h, L));
    }
  }, e.prototype._updateRichTexts = function() {
    var t = this.style, a = d0(t), n = MP(a, t), i = n.width, o = n.outerWidth, s = n.outerHeight, l = t.padding, u = t.x || 0, f = t.y || 0, h = this._defaultStyle, v = t.align || h.align, c = t.verticalAlign || h.verticalAlign, p = ps(u, o, v), d = Zi(f, s, c), g = p, y = d;
    l && (g += l[3], y += l[0]);
    var m = g + i;
    Cv(t) && this._renderBackground(t, t, p, d, o, s);
    for (var _ = !!t.backgroundColor, S = 0; S < n.lines.length; S++) {
      for (var w = n.lines[S], x = w.tokens, b = x.length, T = w.lineHeight, D = w.width, A = 0, M = g, I = m, L = b - 1, E = void 0; A < b && (E = x[A], !E.align || E.align === "left"); )
        this._placeToken(E, t, T, y, M, "left", _), D -= E.width, M += E.width, A++;
      for (; L >= 0 && (E = x[L], E.align === "right"); )
        this._placeToken(E, t, T, y, I, "right", _), D -= E.width, I -= E.width, L--;
      for (M += (i - (M - g) - (m - I) - D) / 2; A <= L; )
        E = x[A], this._placeToken(E, t, T, y, M + E.width / 2, "center", _), M += E.width, A++;
      y += T;
    }
  }, e.prototype._placeToken = function(t, a, n, i, o, s, l) {
    var u = a.rich[t.styleName] || {};
    u.text = t.text;
    var f = t.verticalAlign, h = i + n / 2;
    f === "top" ? h = i + t.height / 2 : f === "bottom" && (h = i + n - t.height / 2);
    var v = !t.isLineHolder && Cv(u);
    v && this._renderBackground(u, a, s === "right" ? o - t.width : s === "center" ? o - t.width / 2 : o, h - t.height / 2, t.width, t.height);
    var c = !!u.backgroundColor, p = t.textPadding;
    p && (o = p0(o, s, p), h -= t.height / 2 - p[0] - t.innerHeight / 2);
    var d = this._getOrCreateChild(Ws), g = d.createStyle();
    d.useStyle(g);
    var y = this._defaultStyle, m = !1, _ = 0, S = c0("fill" in u ? u.fill : "fill" in a ? a.fill : (m = !0, y.fill)), w = v0("stroke" in u ? u.stroke : "stroke" in a ? a.stroke : !c && !l && (!y.autoStroke || m) ? (_ = l0, y.stroke) : null), x = u.textShadowBlur > 0 || a.textShadowBlur > 0;
    g.text = t.text, g.x = o, g.y = h, x && (g.shadowBlur = u.textShadowBlur || a.textShadowBlur || 0, g.shadowColor = u.textShadowColor || a.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || a.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || a.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = t.font || Xa, g.opacity = xr(u.opacity, a.opacity, 1), f0(g, u), w && (g.lineWidth = xr(u.lineWidth, a.lineWidth, _), g.lineDash = ut(u.lineDash, a.lineDash), g.lineDashOffset = a.lineDashOffset || 0, g.stroke = w), S && (g.fill = S);
    var b = t.contentWidth, T = t.contentHeight;
    d.setBoundingRect(new ht(ps(g.x, b, g.textAlign), Zi(g.y, T, g.textBaseline), b, T));
  }, e.prototype._renderBackground = function(t, a, n, i, o, s) {
    var l = t.backgroundColor, u = t.borderWidth, f = t.borderColor, h = l && l.image, v = l && !h, c = t.borderRadius, p = this, d, g;
    if (v || t.lineHeight || u && f) {
      d = this._getOrCreateChild(bt), d.useStyle(d.createStyle()), d.style.fill = null;
      var y = d.shape;
      y.x = n, y.y = i, y.width = o, y.height = s, y.r = c, d.dirtyShape();
    }
    if (v) {
      var m = d.style;
      m.fill = l || null, m.fillOpacity = ut(t.fillOpacity, 1);
    } else if (h) {
      g = this._getOrCreateChild(de), g.onload = function() {
        p.dirtyStyle();
      };
      var _ = g.style;
      _.image = l.image, _.x = n, _.y = i, _.width = o, _.height = s;
    }
    if (u && f) {
      var m = d.style;
      m.lineWidth = u, m.stroke = f, m.strokeOpacity = ut(t.strokeOpacity, 1), m.lineDash = t.borderDash, m.lineDashOffset = t.borderDashOffset || 0, d.strokeContainThreshold = 0, d.hasFill() && d.hasStroke() && (m.strokeFirst = !0, m.lineWidth *= 2);
    }
    var S = (d || g).style;
    S.shadowBlur = t.shadowBlur || 0, S.shadowColor = t.shadowColor || "transparent", S.shadowOffsetX = t.shadowOffsetX || 0, S.shadowOffsetY = t.shadowOffsetY || 0, S.opacity = xr(t.opacity, a.opacity, 1);
  }, e.makeFont = function(t) {
    var a = "";
    return zT(t) && (a = [
      t.fontStyle,
      t.fontWeight,
      BT(t.fontSize),
      t.fontFamily || "sans-serif"
    ].join(" ")), a && mr(a) || t.textFont || t.font;
  }, e;
}(ur), iR = { left: !0, right: 1, center: 1 }, oR = { top: 1, bottom: 1, middle: 1 }, u0 = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
function BT(r) {
  return typeof r == "string" && (r.indexOf("px") !== -1 || r.indexOf("rem") !== -1 || r.indexOf("em") !== -1) ? r : isNaN(+r) ? sg + "px" : r + "px";
}
function f0(r, e) {
  for (var t = 0; t < u0.length; t++) {
    var a = u0[t], n = e[a];
    n != null && (r[a] = n);
  }
}
function zT(r) {
  return r.fontSize != null || r.fontFamily || r.fontWeight;
}
function sR(r) {
  return h0(r), C(r.rich, h0), r;
}
function h0(r) {
  if (r) {
    r.font = VT.makeFont(r);
    var e = r.align;
    e === "middle" && (e = "center"), r.align = e == null || iR[e] ? e : "left";
    var t = r.verticalAlign;
    t === "center" && (t = "middle"), r.verticalAlign = t == null || oR[t] ? t : "top";
    var a = r.padding;
    a && (r.padding = vg(r.padding));
  }
}
function v0(r, e) {
  return r == null || e <= 0 || r === "transparent" || r === "none" ? null : r.image || r.colorStops ? "#000" : r;
}
function c0(r) {
  return r == null || r === "none" ? null : r.image || r.colorStops ? "#000" : r;
}
function p0(r, e, t) {
  return e === "right" ? r - t[1] : e === "center" ? r + t[3] / 2 - t[1] / 2 : r + t[3];
}
function d0(r) {
  var e = r.text;
  return e != null && (e += ""), e;
}
function Cv(r) {
  return !!(r.backgroundColor || r.lineHeight || r.borderWidth && r.borderColor);
}
const Dt = VT;
var it = Tt(), Yp = function(r, e, t, a) {
  if (a) {
    var n = it(a);
    n.dataIndex = t, n.dataType = e, n.seriesIndex = r, a.type === "group" && a.traverse(function(i) {
      var o = it(i);
      o.seriesIndex = r, o.dataIndex = t, o.dataType = e;
    });
  }
}, g0 = 1, y0 = {}, GT = Tt(), Dg = Tt(), Cg = 0, pl = 1, gh = 2, Me = ["emphasis", "blur", "select"], $s = ["normal", "emphasis", "blur", "select"], bo = 10, lR = 9, ei = "highlight", Wu = "downplay", Ls = "select", $u = "unselect", Es = "toggleSelect";
function Ai(r) {
  return r != null && r !== "none";
}
var m0 = new hl(100);
function _0(r) {
  if ($(r)) {
    var e = m0.get(r);
    return e || (e = Ep(r, -0.1), m0.put(r, e)), e;
  } else if (ih(r)) {
    var t = V({}, r);
    return t.colorStops = G(r.colorStops, function(a) {
      return {
        offset: a.offset,
        color: Ep(a.color, -0.1)
      };
    }), t;
  }
  return r;
}
function yh(r, e, t) {
  r.onHoverStateChange && (r.hoverState || 0) !== t && r.onHoverStateChange(e), r.hoverState = t;
}
function FT(r) {
  yh(r, "emphasis", gh);
}
function HT(r) {
  r.hoverState === gh && yh(r, "normal", Cg);
}
function Ag(r) {
  yh(r, "blur", pl);
}
function WT(r) {
  r.hoverState === pl && yh(r, "normal", Cg);
}
function uR(r) {
  r.selected = !0;
}
function fR(r) {
  r.selected = !1;
}
function S0(r, e, t) {
  e(r, t);
}
function Sa(r, e, t) {
  S0(r, e, t), r.isGroup && r.traverse(function(a) {
    S0(a, e, t);
  });
}
function pf(r, e) {
  switch (e) {
    case "emphasis":
      r.hoverState = gh;
      break;
    case "normal":
      r.hoverState = Cg;
      break;
    case "blur":
      r.hoverState = pl;
      break;
    case "select":
      r.selected = !0;
  }
}
function hR(r, e, t, a) {
  for (var n = r.style, i = {}, o = 0; o < e.length; o++) {
    var s = e[o], l = n[s];
    i[s] = l ?? (a && a[s]);
  }
  for (var o = 0; o < r.animators.length; o++) {
    var u = r.animators[o];
    u.__fromStateTransition && u.__fromStateTransition.indexOf(t) < 0 && u.targetName === "style" && u.saveTo(i, e);
  }
  return i;
}
function vR(r, e, t, a) {
  var n = t && ct(t, "select") >= 0, i = !1;
  if (r instanceof gt) {
    var o = GT(r), s = n && o.selectFill || o.normalFill, l = n && o.selectStroke || o.normalStroke;
    if (Ai(s) || Ai(l)) {
      a = a || {};
      var u = a.style || {};
      u.fill === "inherit" ? (i = !0, a = V({}, a), u = V({}, u), u.fill = s) : !Ai(u.fill) && Ai(s) ? (i = !0, a = V({}, a), u = V({}, u), u.fill = _0(s)) : !Ai(u.stroke) && Ai(l) && (i || (a = V({}, a), u = V({}, u)), u.stroke = _0(l)), a.style = u;
    }
  }
  if (a && a.z2 == null) {
    i || (a = V({}, a));
    var f = r.z2EmphasisLift;
    a.z2 = r.z2 + (f ?? bo);
  }
  return a;
}
function cR(r, e, t) {
  if (t && t.z2 == null) {
    t = V({}, t);
    var a = r.z2SelectLift;
    t.z2 = r.z2 + (a ?? lR);
  }
  return t;
}
function pR(r, e, t) {
  var a = ct(r.currentStates, e) >= 0, n = r.style.opacity, i = a ? null : hR(r, ["opacity"], e, {
    opacity: 1
  });
  t = t || {};
  var o = t.style || {};
  return o.opacity == null && (t = V({}, t), o = V({
    // Already being applied 'emphasis'. DON'T mul opacity multiple times.
    opacity: a ? n : i.opacity * 0.1
  }, o), t.style = o), t;
}
function Av(r, e) {
  var t = this.states[r];
  if (this.style) {
    if (r === "emphasis")
      return vR(this, r, e, t);
    if (r === "blur")
      return pR(this, r, t);
    if (r === "select")
      return cR(this, r, t);
  }
  return t;
}
function vi(r) {
  r.stateProxy = Av;
  var e = r.getTextContent(), t = r.getTextGuideLine();
  e && (e.stateProxy = Av), t && (t.stateProxy = Av);
}
function x0(r, e) {
  !ZT(r, e) && !r.__highByOuter && Sa(r, FT);
}
function w0(r, e) {
  !ZT(r, e) && !r.__highByOuter && Sa(r, HT);
}
function da(r, e) {
  r.__highByOuter |= 1 << (e || 0), Sa(r, FT);
}
function ga(r, e) {
  !(r.__highByOuter &= ~(1 << (e || 0))) && Sa(r, HT);
}
function $T(r) {
  Sa(r, Ag);
}
function Mg(r) {
  Sa(r, WT);
}
function UT(r) {
  Sa(r, uR);
}
function YT(r) {
  Sa(r, fR);
}
function ZT(r, e) {
  return r.__highDownSilentOnTouch && e.zrByTouch;
}
function XT(r) {
  var e = r.getModel(), t = [], a = [];
  e.eachComponent(function(n, i) {
    var o = Dg(i), s = n === "series", l = s ? r.getViewOfSeriesModel(i) : r.getViewOfComponentModel(i);
    !s && a.push(l), o.isBlured && (l.group.traverse(function(u) {
      WT(u);
    }), s && t.push(i)), o.isBlured = !1;
  }), C(a, function(n) {
    n && n.toggleBlurSeries && n.toggleBlurSeries(t, !1, e);
  });
}
function Zp(r, e, t, a) {
  var n = a.getModel();
  t = t || "coordinateSystem";
  function i(u, f) {
    for (var h = 0; h < f.length; h++) {
      var v = u.getItemGraphicEl(f[h]);
      v && Mg(v);
    }
  }
  if (r != null && !(!e || e === "none")) {
    var o = n.getSeriesByIndex(r), s = o.coordinateSystem;
    s && s.master && (s = s.master);
    var l = [];
    n.eachSeries(function(u) {
      var f = o === u, h = u.coordinateSystem;
      h && h.master && (h = h.master);
      var v = h && s ? h === s : f;
      if (!// Not blur other series if blurScope series
      (t === "series" && !f || t === "coordinateSystem" && !v || e === "series" && f)) {
        var c = a.getViewOfSeriesModel(u);
        if (c.group.traverse(function(g) {
          Ag(g);
        }), Se(e))
          i(u.getData(), e);
        else if (j(e))
          for (var p = _t(e), d = 0; d < p.length; d++)
            i(u.getData(p[d]), e[p[d]]);
        l.push(u), Dg(u).isBlured = !0;
      }
    }), n.eachComponent(function(u, f) {
      if (u !== "series") {
        var h = a.getViewOfComponentModel(f);
        h && h.toggleBlurSeries && h.toggleBlurSeries(l, !0, n);
      }
    });
  }
}
function Xp(r, e, t) {
  if (!(r == null || e == null)) {
    var a = t.getModel().getComponent(r, e);
    if (a) {
      Dg(a).isBlured = !0;
      var n = t.getViewOfComponentModel(a);
      !n || !n.focusBlurEnabled || n.group.traverse(function(i) {
        Ag(i);
      });
    }
  }
}
function dR(r, e, t) {
  var a = r.seriesIndex, n = r.getData(e.dataType);
  if (!n) {
    ({}).NODE_ENV !== "production" && ve("Unknown dataType " + e.dataType);
    return;
  }
  var i = fi(n, e);
  i = (z(i) ? i[0] : i) || 0;
  var o = n.getItemGraphicEl(i);
  if (!o)
    for (var s = n.count(), l = 0; !o && l < s; )
      o = n.getItemGraphicEl(l++);
  if (o) {
    var u = it(o);
    Zp(a, u.focus, u.blurScope, t);
  } else {
    var f = r.get(["emphasis", "focus"]), h = r.get(["emphasis", "blurScope"]);
    f != null && Zp(a, f, h, t);
  }
}
function Ig(r, e, t, a) {
  var n = {
    focusSelf: !1,
    dispatchers: null
  };
  if (r == null || r === "series" || e == null || t == null)
    return n;
  var i = a.getModel().getComponent(r, e);
  if (!i)
    return n;
  var o = a.getViewOfComponentModel(i);
  if (!o || !o.findHighDownDispatchers)
    return n;
  for (var s = o.findHighDownDispatchers(t), l, u = 0; u < s.length; u++)
    if ({}.NODE_ENV !== "production" && !ja(s[u]) && ve("param should be highDownDispatcher"), it(s[u]).focus === "self") {
      l = !0;
      break;
    }
  return {
    focusSelf: l,
    dispatchers: s
  };
}
function gR(r, e, t) {
  ({}).NODE_ENV !== "production" && !ja(r) && ve("param should be highDownDispatcher");
  var a = it(r), n = Ig(a.componentMainType, a.componentIndex, a.componentHighDownName, t), i = n.dispatchers, o = n.focusSelf;
  i ? (o && Xp(a.componentMainType, a.componentIndex, t), C(i, function(s) {
    return x0(s, e);
  })) : (Zp(a.seriesIndex, a.focus, a.blurScope, t), a.focus === "self" && Xp(a.componentMainType, a.componentIndex, t), x0(r, e));
}
function yR(r, e, t) {
  ({}).NODE_ENV !== "production" && !ja(r) && ve("param should be highDownDispatcher"), XT(t);
  var a = it(r), n = Ig(a.componentMainType, a.componentIndex, a.componentHighDownName, t).dispatchers;
  n ? C(n, function(i) {
    return w0(i, e);
  }) : w0(r, e);
}
function mR(r, e, t) {
  if (Kp(e)) {
    var a = e.dataType, n = r.getData(a), i = fi(n, e);
    z(i) || (i = [i]), r[e.type === Es ? "toggleSelect" : e.type === Ls ? "select" : "unselect"](i, a);
  }
}
function b0(r) {
  var e = r.getAllData();
  C(e, function(t) {
    var a = t.data, n = t.type;
    a.eachItemGraphicEl(function(i, o) {
      r.isSelected(o, n) ? UT(i) : YT(i);
    });
  });
}
function _R(r) {
  var e = [];
  return r.eachSeries(function(t) {
    var a = t.getAllData();
    C(a, function(n) {
      n.data;
      var i = n.type, o = t.getSelectedDataIndices();
      if (o.length > 0) {
        var s = {
          dataIndex: o,
          seriesIndex: t.seriesIndex
        };
        i != null && (s.dataType = i), e.push(s);
      }
    });
  }), e;
}
function ri(r, e, t) {
  Yn(r, !0), Sa(r, vi), qp(r, e, t);
}
function SR(r) {
  Yn(r, !1);
}
function Wt(r, e, t, a) {
  a ? SR(r) : ri(r, e, t);
}
function qp(r, e, t) {
  var a = it(r);
  e != null ? (a.focus = e, a.blurScope = t) : a.focus && (a.focus = null);
}
var T0 = ["emphasis", "blur", "select"], xR = {
  itemStyle: "getItemStyle",
  lineStyle: "getLineStyle",
  areaStyle: "getAreaStyle"
};
function ce(r, e, t, a) {
  t = t || "itemStyle";
  for (var n = 0; n < T0.length; n++) {
    var i = T0[n], o = e.getModel([i, t]), s = r.ensureState(i);
    s.style = a ? a(o) : o[xR[t]]();
  }
}
function Yn(r, e) {
  var t = e === !1, a = r;
  r.highDownSilentOnTouch && (a.__highDownSilentOnTouch = r.highDownSilentOnTouch), (!t || a.__highDownDispatcher) && (a.__highByOuter = a.__highByOuter || 0, a.__highDownDispatcher = !t);
}
function ja(r) {
  return !!(r && r.__highDownDispatcher);
}
function wR(r, e, t) {
  var a = it(r);
  a.componentMainType = e.mainType, a.componentIndex = e.componentIndex, a.componentHighDownName = t;
}
function bR(r) {
  var e = y0[r];
  return e == null && g0 <= 32 && (e = y0[r] = g0++), e;
}
function Kp(r) {
  var e = r.type;
  return e === Ls || e === $u || e === Es;
}
function D0(r) {
  var e = r.type;
  return e === ei || e === Wu;
}
function TR(r) {
  var e = GT(r);
  e.normalFill = r.style.fill, e.normalStroke = r.style.stroke;
  var t = r.states.select || {};
  e.selectFill = t.style && t.style.fill || null, e.selectStroke = t.style && t.style.stroke || null;
}
var Mi = Xr.CMD, DR = [[], [], []], C0 = Math.sqrt, CR = Math.atan2;
function qT(r, e) {
  if (e) {
    var t = r.data, a = r.len(), n, i, o, s, l, u, f = Mi.M, h = Mi.C, v = Mi.L, c = Mi.R, p = Mi.A, d = Mi.Q;
    for (o = 0, s = 0; o < a; ) {
      switch (n = t[o++], s = o, i = 0, n) {
        case f:
          i = 1;
          break;
        case v:
          i = 1;
          break;
        case h:
          i = 3;
          break;
        case d:
          i = 2;
          break;
        case p:
          var g = e[4], y = e[5], m = C0(e[0] * e[0] + e[1] * e[1]), _ = C0(e[2] * e[2] + e[3] * e[3]), S = CR(-e[1] / _, e[0] / m);
          t[o] *= m, t[o++] += g, t[o] *= _, t[o++] += y, t[o++] *= m, t[o++] *= _, t[o++] += S, t[o++] += S, o += 2, s = o;
          break;
        case c:
          u[0] = t[o++], u[1] = t[o++], fe(u, u, e), t[s++] = u[0], t[s++] = u[1], u[0] += t[o++], u[1] += t[o++], fe(u, u, e), t[s++] = u[0], t[s++] = u[1];
      }
      for (l = 0; l < i; l++) {
        var w = DR[l];
        w[0] = t[o++], w[1] = t[o++], fe(w, w, e), t[s++] = w[0], t[s++] = w[1];
      }
    }
    r.increaseVersion();
  }
}
var Mv = Math.sqrt, Yl = Math.sin, Zl = Math.cos, $o = Math.PI;
function A0(r) {
  return Math.sqrt(r[0] * r[0] + r[1] * r[1]);
}
function jp(r, e) {
  return (r[0] * e[0] + r[1] * e[1]) / (A0(r) * A0(e));
}
function M0(r, e) {
  return (r[0] * e[1] < r[1] * e[0] ? -1 : 1) * Math.acos(jp(r, e));
}
function I0(r, e, t, a, n, i, o, s, l, u, f) {
  var h = l * ($o / 180), v = Zl(h) * (r - t) / 2 + Yl(h) * (e - a) / 2, c = -1 * Yl(h) * (r - t) / 2 + Zl(h) * (e - a) / 2, p = v * v / (o * o) + c * c / (s * s);
  p > 1 && (o *= Mv(p), s *= Mv(p));
  var d = (n === i ? -1 : 1) * Mv((o * o * (s * s) - o * o * (c * c) - s * s * (v * v)) / (o * o * (c * c) + s * s * (v * v))) || 0, g = d * o * c / s, y = d * -s * v / o, m = (r + t) / 2 + Zl(h) * g - Yl(h) * y, _ = (e + a) / 2 + Yl(h) * g + Zl(h) * y, S = M0([1, 0], [(v - g) / o, (c - y) / s]), w = [(v - g) / o, (c - y) / s], x = [(-1 * v - g) / o, (-1 * c - y) / s], b = M0(w, x);
  if (jp(w, x) <= -1 && (b = $o), jp(w, x) >= 1 && (b = 0), b < 0) {
    var T = Math.round(b / $o * 1e6) / 1e6;
    b = $o * 2 + T % 2 * $o;
  }
  f.addData(u, m, _, o, s, S, b, h, i);
}
var AR = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, MR = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function IR(r) {
  var e = new Xr();
  if (!r)
    return e;
  var t = 0, a = 0, n = t, i = a, o, s = Xr.CMD, l = r.match(AR);
  if (!l)
    return e;
  for (var u = 0; u < l.length; u++) {
    for (var f = l[u], h = f.charAt(0), v = void 0, c = f.match(MR) || [], p = c.length, d = 0; d < p; d++)
      c[d] = parseFloat(c[d]);
    for (var g = 0; g < p; ) {
      var y = void 0, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0, b = void 0, T = t, D = a, A = void 0, M = void 0;
      switch (h) {
        case "l":
          t += c[g++], a += c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "L":
          t = c[g++], a = c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "m":
          t += c[g++], a += c[g++], v = s.M, e.addData(v, t, a), n = t, i = a, h = "l";
          break;
        case "M":
          t = c[g++], a = c[g++], v = s.M, e.addData(v, t, a), n = t, i = a, h = "L";
          break;
        case "h":
          t += c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "H":
          t = c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "v":
          a += c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "V":
          a = c[g++], v = s.L, e.addData(v, t, a);
          break;
        case "C":
          v = s.C, e.addData(v, c[g++], c[g++], c[g++], c[g++], c[g++], c[g++]), t = c[g - 2], a = c[g - 1];
          break;
        case "c":
          v = s.C, e.addData(v, c[g++] + t, c[g++] + a, c[g++] + t, c[g++] + a, c[g++] + t, c[g++] + a), t += c[g - 2], a += c[g - 1];
          break;
        case "S":
          y = t, m = a, A = e.len(), M = e.data, o === s.C && (y += t - M[A - 4], m += a - M[A - 3]), v = s.C, T = c[g++], D = c[g++], t = c[g++], a = c[g++], e.addData(v, y, m, T, D, t, a);
          break;
        case "s":
          y = t, m = a, A = e.len(), M = e.data, o === s.C && (y += t - M[A - 4], m += a - M[A - 3]), v = s.C, T = t + c[g++], D = a + c[g++], t += c[g++], a += c[g++], e.addData(v, y, m, T, D, t, a);
          break;
        case "Q":
          T = c[g++], D = c[g++], t = c[g++], a = c[g++], v = s.Q, e.addData(v, T, D, t, a);
          break;
        case "q":
          T = c[g++] + t, D = c[g++] + a, t += c[g++], a += c[g++], v = s.Q, e.addData(v, T, D, t, a);
          break;
        case "T":
          y = t, m = a, A = e.len(), M = e.data, o === s.Q && (y += t - M[A - 4], m += a - M[A - 3]), t = c[g++], a = c[g++], v = s.Q, e.addData(v, y, m, t, a);
          break;
        case "t":
          y = t, m = a, A = e.len(), M = e.data, o === s.Q && (y += t - M[A - 4], m += a - M[A - 3]), t += c[g++], a += c[g++], v = s.Q, e.addData(v, y, m, t, a);
          break;
        case "A":
          _ = c[g++], S = c[g++], w = c[g++], x = c[g++], b = c[g++], T = t, D = a, t = c[g++], a = c[g++], v = s.A, I0(T, D, t, a, x, b, _, S, w, v, e);
          break;
        case "a":
          _ = c[g++], S = c[g++], w = c[g++], x = c[g++], b = c[g++], T = t, D = a, t += c[g++], a += c[g++], v = s.A, I0(T, D, t, a, x, b, _, S, w, v, e);
          break;
      }
    }
    (h === "z" || h === "Z") && (v = s.Z, e.addData(v), t = n, a = i), o = v;
  }
  return e.toStatic(), e;
}
var KT = function(r) {
  N(e, r);
  function e() {
    return r !== null && r.apply(this, arguments) || this;
  }
  return e.prototype.applyTransform = function(t) {
  }, e;
}(gt);
function jT(r) {
  return r.setData != null;
}
function QT(r, e) {
  var t = IR(r), a = V({}, e);
  return a.buildPath = function(n) {
    if (jT(n)) {
      n.setData(t.data);
      var i = n.getContext();
      i && n.rebuildPath(i, 1);
    } else {
      var i = n;
      t.rebuildPath(i, 1);
    }
  }, a.applyTransform = function(n) {
    qT(t, n), this.dirtyShape();
  }, a;
}
function JT(r, e) {
  return new KT(QT(r, e));
}
function LR(r, e) {
  var t = QT(r, e), a = function(n) {
    N(i, n);
    function i(o) {
      var s = n.call(this, o) || this;
      return s.applyTransform = t.applyTransform, s.buildPath = t.buildPath, s;
    }
    return i;
  }(KT);
  return a;
}
function ER(r, e) {
  for (var t = [], a = r.length, n = 0; n < a; n++) {
    var i = r[n];
    t.push(i.getUpdatedPathProxy(!0));
  }
  var o = new gt(e);
  return o.createPathProxy(), o.buildPath = function(s) {
    if (jT(s)) {
      s.appendPath(t);
      var l = s.getContext();
      l && s.rebuildPath(l, 1);
    }
  }, o;
}
function Lg(r, e) {
  e = e || {};
  var t = new gt();
  return r.shape && t.setShape(r.shape), t.setStyle(r.style), e.bakeTransform ? qT(t.path, r.getComputedTransform()) : e.toLocal ? t.setLocalTransform(r.getComputedTransform()) : t.copyTransform(r), t.buildPath = r.buildPath, t.applyTransform = t.applyTransform, t.z = r.z, t.z2 = r.z2, t.zlevel = r.zlevel, t;
}
var PR = function() {
  function r() {
    this.cx = 0, this.cy = 0, this.r = 0;
  }
  return r;
}(), tD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new PR();
  }, e.prototype.buildPath = function(t, a) {
    t.moveTo(a.cx + a.r, a.cy), t.arc(a.cx, a.cy, a.r, 0, Math.PI * 2);
  }, e;
}(gt);
tD.prototype.type = "circle";
const qr = tD;
var RR = function() {
  function r() {
    this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  }
  return r;
}(), eD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new RR();
  }, e.prototype.buildPath = function(t, a) {
    var n = 0.5522848, i = a.cx, o = a.cy, s = a.rx, l = a.ry, u = s * n, f = l * n;
    t.moveTo(i - s, o), t.bezierCurveTo(i - s, o - f, i - u, o - l, i, o - l), t.bezierCurveTo(i + u, o - l, i + s, o - f, i + s, o), t.bezierCurveTo(i + s, o + f, i + u, o + l, i, o + l), t.bezierCurveTo(i - u, o + l, i - s, o + f, i - s, o), t.closePath();
  }, e;
}(gt);
eD.prototype.type = "ellipse";
const Eg = eD;
var rD = Math.PI, Iv = rD * 2, xn = Math.sin, Ii = Math.cos, NR = Math.acos, ye = Math.atan2, L0 = Math.abs, Ps = Math.sqrt, gs = Math.max, Pr = Math.min, pr = 1e-4;
function OR(r, e, t, a, n, i, o, s) {
  var l = t - r, u = a - e, f = o - n, h = s - i, v = h * l - f * u;
  if (!(v * v < pr))
    return v = (f * (e - i) - h * (r - n)) / v, [r + v * l, e + v * u];
}
function Xl(r, e, t, a, n, i, o) {
  var s = r - t, l = e - a, u = (o ? i : -i) / Ps(s * s + l * l), f = u * l, h = -u * s, v = r + f, c = e + h, p = t + f, d = a + h, g = (v + p) / 2, y = (c + d) / 2, m = p - v, _ = d - c, S = m * m + _ * _, w = n - i, x = v * d - p * c, b = (_ < 0 ? -1 : 1) * Ps(gs(0, w * w * S - x * x)), T = (x * _ - m * b) / S, D = (-x * m - _ * b) / S, A = (x * _ + m * b) / S, M = (-x * m + _ * b) / S, I = T - g, L = D - y, E = A - g, P = M - y;
  return I * I + L * L > E * E + P * P && (T = A, D = M), {
    cx: T,
    cy: D,
    x0: -f,
    y0: -h,
    x1: T * (n / w - 1),
    y1: D * (n / w - 1)
  };
}
function kR(r) {
  var e;
  if (z(r)) {
    var t = r.length;
    if (!t)
      return r;
    t === 1 ? e = [r[0], r[0], 0, 0] : t === 2 ? e = [r[0], r[0], r[1], r[1]] : t === 3 ? e = r.concat(r[2]) : e = r;
  } else
    e = [r, r, r, r];
  return e;
}
function VR(r, e) {
  var t, a = gs(e.r, 0), n = gs(e.r0 || 0, 0), i = a > 0, o = n > 0;
  if (!(!i && !o)) {
    if (i || (a = n, n = 0), n > a) {
      var s = a;
      a = n, n = s;
    }
    var l = e.startAngle, u = e.endAngle;
    if (!(isNaN(l) || isNaN(u))) {
      var f = e.cx, h = e.cy, v = !!e.clockwise, c = L0(u - l), p = c > Iv && c % Iv;
      if (p > pr && (c = p), !(a > pr))
        r.moveTo(f, h);
      else if (c > Iv - pr)
        r.moveTo(f + a * Ii(l), h + a * xn(l)), r.arc(f, h, a, l, u, !v), n > pr && (r.moveTo(f + n * Ii(u), h + n * xn(u)), r.arc(f, h, n, u, l, v));
      else {
        var d = void 0, g = void 0, y = void 0, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0, b = void 0, T = void 0, D = void 0, A = void 0, M = void 0, I = void 0, L = void 0, E = void 0, P = a * Ii(l), R = a * xn(l), k = n * Ii(u), O = n * xn(u), B = c > pr;
        if (B) {
          var F = e.cornerRadius;
          F && (t = kR(F), d = t[0], g = t[1], y = t[2], m = t[3]);
          var W = L0(a - n) / 2;
          if (_ = Pr(W, y), S = Pr(W, m), w = Pr(W, d), x = Pr(W, g), D = b = gs(_, S), A = T = gs(w, x), (b > pr || T > pr) && (M = a * Ii(u), I = a * xn(u), L = n * Ii(l), E = n * xn(l), c < rD)) {
            var Z = OR(P, R, L, E, M, I, k, O);
            if (Z) {
              var J = P - Z[0], et = R - Z[1], yt = M - Z[0], At = I - Z[1], dt = 1 / xn(NR((J * yt + et * At) / (Ps(J * J + et * et) * Ps(yt * yt + At * At))) / 2), at = Ps(Z[0] * Z[0] + Z[1] * Z[1]);
              D = Pr(b, (a - at) / (dt + 1)), A = Pr(T, (n - at) / (dt - 1));
            }
          }
        }
        if (!B)
          r.moveTo(f + P, h + R);
        else if (D > pr) {
          var mt = Pr(y, D), vt = Pr(m, D), X = Xl(L, E, P, R, a, mt, v), st = Xl(M, I, k, O, a, vt, v);
          r.moveTo(f + X.cx + X.x0, h + X.cy + X.y0), D < b && mt === vt ? r.arc(f + X.cx, h + X.cy, D, ye(X.y0, X.x0), ye(st.y0, st.x0), !v) : (mt > 0 && r.arc(f + X.cx, h + X.cy, mt, ye(X.y0, X.x0), ye(X.y1, X.x1), !v), r.arc(f, h, a, ye(X.cy + X.y1, X.cx + X.x1), ye(st.cy + st.y1, st.cx + st.x1), !v), vt > 0 && r.arc(f + st.cx, h + st.cy, vt, ye(st.y1, st.x1), ye(st.y0, st.x0), !v));
        } else
          r.moveTo(f + P, h + R), r.arc(f, h, a, l, u, !v);
        if (!(n > pr) || !B)
          r.lineTo(f + k, h + O);
        else if (A > pr) {
          var mt = Pr(d, A), vt = Pr(g, A), X = Xl(k, O, M, I, n, -vt, v), st = Xl(P, R, L, E, n, -mt, v);
          r.lineTo(f + X.cx + X.x0, h + X.cy + X.y0), A < T && mt === vt ? r.arc(f + X.cx, h + X.cy, A, ye(X.y0, X.x0), ye(st.y0, st.x0), !v) : (vt > 0 && r.arc(f + X.cx, h + X.cy, vt, ye(X.y0, X.x0), ye(X.y1, X.x1), !v), r.arc(f, h, n, ye(X.cy + X.y1, X.cx + X.x1), ye(st.cy + st.y1, st.cx + st.x1), v), mt > 0 && r.arc(f + st.cx, h + st.cy, mt, ye(st.y1, st.x1), ye(st.y0, st.x0), !v));
        } else
          r.lineTo(f + k, h + O), r.arc(f, h, n, u, l, v);
      }
      r.closePath();
    }
  }
}
var BR = function() {
  function r() {
    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 r;
}(), aD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new BR();
  }, e.prototype.buildPath = function(t, a) {
    VR(t, a);
  }, e.prototype.isZeroArea = function() {
    return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  }, e;
}(gt);
aD.prototype.type = "sector";
const Ve = aD;
var zR = function() {
  function r() {
    this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  }
  return r;
}(), nD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new zR();
  }, e.prototype.buildPath = function(t, a) {
    var n = a.cx, i = a.cy, o = Math.PI * 2;
    t.moveTo(n + a.r, i), t.arc(n, i, a.r, 0, o, !1), t.moveTo(n + a.r0, i), t.arc(n, i, a.r0, 0, o, !0);
  }, e;
}(gt);
nD.prototype.type = "ring";
const mh = nD;
function GR(r, e, t, a) {
  var n = [], i = [], o = [], s = [], l, u, f, h;
  if (a) {
    f = [1 / 0, 1 / 0], h = [-1 / 0, -1 / 0];
    for (var v = 0, c = r.length; v < c; v++)
      Va(f, f, r[v]), Ba(h, h, r[v]);
    Va(f, f, a[0]), Ba(h, h, a[1]);
  }
  for (var v = 0, c = r.length; v < c; v++) {
    var p = r[v];
    if (t)
      l = r[v ? v - 1 : c - 1], u = r[(v + 1) % c];
    else if (v === 0 || v === c - 1) {
      n.push(sa(r[v]));
      continue;
    } else
      l = r[v - 1], u = r[v + 1];
    $n(i, u, l), ku(i, i, e);
    var d = wp(p, l), g = wp(p, u), y = d + g;
    y !== 0 && (d /= y, g /= y), ku(o, i, -d), ku(s, i, g);
    var m = _m([], p, o), _ = _m([], p, s);
    a && (Ba(m, m, f), Va(m, m, h), Ba(_, _, f), Va(_, _, h)), n.push(m), n.push(_);
  }
  return t && n.push(n.shift()), n;
}
function iD(r, e, t) {
  var a = e.smooth, n = e.points;
  if (n && n.length >= 2) {
    if (a) {
      var i = GR(n, a, t, e.smoothConstraint);
      r.moveTo(n[0][0], n[0][1]);
      for (var o = n.length, s = 0; s < (t ? o : o - 1); s++) {
        var l = i[s * 2], u = i[s * 2 + 1], f = n[(s + 1) % o];
        r.bezierCurveTo(l[0], l[1], u[0], u[1], f[0], f[1]);
      }
    } else {
      r.moveTo(n[0][0], n[0][1]);
      for (var s = 1, h = n.length; s < h; s++)
        r.lineTo(n[s][0], n[s][1]);
    }
    t && r.closePath();
  }
}
var FR = function() {
  function r() {
    this.points = null, this.smooth = 0, this.smoothConstraint = null;
  }
  return r;
}(), oD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new FR();
  }, e.prototype.buildPath = function(t, a) {
    iD(t, a, !0);
  }, e;
}(gt);
oD.prototype.type = "polygon";
const Be = oD;
var HR = function() {
  function r() {
    this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  }
  return r;
}(), sD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new HR();
  }, e.prototype.buildPath = function(t, a) {
    iD(t, a, !1);
  }, e;
}(gt);
sD.prototype.type = "polyline";
const ze = sD;
var WR = {}, $R = function() {
  function r() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  }
  return r;
}(), lD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new $R();
  }, e.prototype.buildPath = function(t, a) {
    var n, i, o, s;
    if (this.subPixelOptimize) {
      var l = NT(WR, a, this.style);
      n = l.x1, i = l.y1, o = l.x2, s = l.y2;
    } else
      n = a.x1, i = a.y1, o = a.x2, s = a.y2;
    var u = a.percent;
    u !== 0 && (t.moveTo(n, i), u < 1 && (o = n * (1 - u) + o * u, s = i * (1 - u) + s * u), t.lineTo(o, s));
  }, e.prototype.pointAt = function(t) {
    var a = this.shape;
    return [
      a.x1 * (1 - t) + a.x2 * t,
      a.y1 * (1 - t) + a.y2 * t
    ];
  }, e;
}(gt);
lD.prototype.type = "line";
const le = lD;
var Le = [], UR = function() {
  function r() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  }
  return r;
}();
function E0(r, e, t) {
  var a = r.cpx2, n = r.cpy2;
  return a != null || n != null ? [
    (t ? Em : ae)(r.x1, r.cpx1, r.cpx2, r.x2, e),
    (t ? Em : ae)(r.y1, r.cpy1, r.cpy2, r.y2, e)
  ] : [
    (t ? Mp : se)(r.x1, r.cpx1, r.x2, e),
    (t ? Mp : se)(r.y1, r.cpy1, r.y2, e)
  ];
}
var uD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new UR();
  }, e.prototype.buildPath = function(t, a) {
    var n = a.x1, i = a.y1, o = a.x2, s = a.y2, l = a.cpx1, u = a.cpy1, f = a.cpx2, h = a.cpy2, v = a.percent;
    v !== 0 && (t.moveTo(n, i), f == null || h == null ? (v < 1 && (Gs(n, l, o, v, Le), l = Le[1], o = Le[2], Gs(i, u, s, v, Le), u = Le[1], s = Le[2]), t.quadraticCurveTo(l, u, o, s)) : (v < 1 && (Ka(n, l, f, o, v, Le), l = Le[1], f = Le[2], o = Le[3], Ka(i, u, h, s, v, Le), u = Le[1], h = Le[2], s = Le[3]), t.bezierCurveTo(l, u, f, h, o, s)));
  }, e.prototype.pointAt = function(t) {
    return E0(this.shape, t, !1);
  }, e.prototype.tangentAt = function(t) {
    var a = E0(this.shape, t, !0);
    return So(a, a);
  }, e;
}(gt);
uD.prototype.type = "bezier-curve";
const _h = uD;
var YR = function() {
  function r() {
    this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  }
  return r;
}(), fD = function(r) {
  N(e, r);
  function e(t) {
    return r.call(this, t) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new YR();
  }, e.prototype.buildPath = function(t, a) {
    var n = a.cx, i = a.cy, o = Math.max(a.r, 0), s = a.startAngle, l = a.endAngle, u = a.clockwise, f = Math.cos(s), h = Math.sin(s);
    t.moveTo(f * o + n, h * o + i), t.arc(n, i, o, s, l, !u);
  }, e;
}(gt);
fD.prototype.type = "arc";
const Pg = fD;
var ZR = function(r) {
  N(e, r);
  function e() {
    var t = r !== null && r.apply(this, arguments) || this;
    return t.type = "compound", t;
  }
  return e.prototype._updatePathDirty = function() {
    for (var t = this.shape.paths, a = this.shapeChanged(), n = 0; n < t.length; n++)
      a = a || t[n].shapeChanged();
    a && this.dirtyShape();
  }, e.prototype.beforeBrush = function() {
    this._updatePathDirty();
    for (var t = this.shape.paths || [], a = this.getGlobalScale(), n = 0; n < t.length; n++)
      t[n].path || t[n].createPathProxy(), t[n].path.setScale(a[0], a[1], t[n].segmentIgnoreThreshold);
  }, e.prototype.buildPath = function(t, a) {
    for (var n = a.paths || [], i = 0; i < n.length; i++)
      n[i].buildPath(t, n[i].shape, !0);
  }, e.prototype.afterBrush = function() {
    for (var t = this.shape.paths || [], a = 0; a < t.length; a++)
      t[a].pathUpdated();
  }, e.prototype.getBoundingRect = function() {
    return this._updatePathDirty.call(this), gt.prototype.getBoundingRect.call(this);
  }, e;
}(gt);
const Rg = ZR;
var XR = function() {
  function r(e) {
    this.colorStops = e || [];
  }
  return r.prototype.addColorStop = function(e, t) {
    this.colorStops.push({
      offset: e,
      color: t
    });
  }, r;
}();
const hD = XR;
var qR = function(r) {
  N(e, r);
  function e(t, a, n, i, o, s) {
    var l = r.call(this, o) || this;
    return l.x = t ?? 0, l.y = a ?? 0, l.x2 = n ?? 1, l.y2 = i ?? 0, l.type = "linear", l.global = s || !1, l;
  }
  return e;
}(hD);
const dl = qR;
var KR = function(r) {
  N(e, r);
  function e(t, a, n, i, o) {
    var s = r.call(this, i) || this;
    return s.x = t ?? 0.5, s.y = a ?? 0.5, s.r = n ?? 0.5, s.type = "radial", s.global = o || !1, s;
  }
  return e;
}(hD);
const vD = KR;
var wn = [0, 0], bn = [0, 0], ql = new lt(), Kl = new lt(), jR = function() {
  function r(e, t) {
    this._corners = [], this._axes = [], this._origin = [0, 0];
    for (var a = 0; a < 4; a++)
      this._corners[a] = new lt();
    for (var a = 0; a < 2; a++)
      this._axes[a] = new lt();
    e && this.fromBoundingRect(e, t);
  }
  return r.prototype.fromBoundingRect = function(e, t) {
    var a = this._corners, n = this._axes, i = e.x, o = e.y, s = i + e.width, l = o + e.height;
    if (a[0].set(i, o), a[1].set(s, o), a[2].set(s, l), a[3].set(i, l), t)
      for (var u = 0; u < 4; u++)
        a[u].transform(t);
    lt.sub(n[0], a[1], a[0]), lt.sub(n[1], a[3], a[0]), n[0].normalize(), n[1].normalize();
    for (var u = 0; u < 2; u++)
      this._origin[u] = n[u].dot(a[0]);
  }, r.prototype.intersect = function(e, t) {
    var a = !0, n = !t;
    return ql.set(1 / 0, 1 / 0), Kl.set(0, 0), !this._intersectCheckOneSide(this, e, ql, Kl, n, 1) && (a = !1, n) || !this._intersectCheckOneSide(e, this, ql, Kl, n, -1) && (a = !1, n) || n || lt.copy(t, a ? ql : Kl), a;
  }, r.prototype._intersectCheckOneSide = function(e, t, a, n, i, o) {
    for (var s = !0, l = 0; l < 2; l++) {
      var u = this._axes[l];
      if (this._getProjMinMaxOnAxis(l, e._corners, wn), this._getProjMinMaxOnAxis(l, t._corners, bn), wn[1] < bn[0] || wn[0] > bn[1]) {
        if (s = !1, i)
          return s;
        var f = Math.abs(bn[0] - wn[1]), h = Math.abs(wn[0] - bn[1]);
        Math.min(f, h) > n.len() && (f < h ? lt.scale(n, u, -f * o) : lt.scale(n, u, h * o));
      } else if (a) {
        var f = Math.abs(bn[0] - wn[1]), h = Math.abs(wn[0] - bn[1]);
        Math.min(f, h) < a.len() && (f < h ? lt.scale(a, u, f * o) : lt.scale(a, u, -h * o));
      }
    }
    return s;
  }, r.prototype._getProjMinMaxOnAxis = function(e, t, a) {
    for (var n = this._axes[e], i = this._origin, o = t[0].dot(n) + i[e], s = o, l = o, u = 1; u < t.length; u++) {
      var f = t[u].dot(n) + i[e];
      s = Math.min(f, s), l = Math.max(f, l);
    }
    a[0] = s, a[1] = l;
  }, r;
}();
const df = jR;
var QR = [], JR = function(r) {
  N(e, r);
  function e() {
    var t = r !== null && r.apply(this, arguments) || this;
    return t.notClear = !0, t.incremental = !0, t._displayables = [], t._temporaryDisplayables = [], t._cursor = 0, t;
  }
  return e.prototype.traverse = function(t, a) {
    t.call(a, 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(t, a) {
    a ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.markRedraw();
  }, e.prototype.addDisplayables = function(t, a) {
    a = a || !1;
    for (var n = 0; n < t.length; n++)
      this.addDisplayable(t[n], a);
  }, e.prototype.getDisplayables = function() {
    return this._displayables;
  }, e.prototype.getTemporalDisplayables = function() {
    return this._temporaryDisplayables;
  }, e.prototype.eachPendingDisplayable = function(t) {
    for (var a = this._cursor; a < this._displayables.length; a++)
      t && t(this._displayables[a]);
    for (var a = 0; a < this._temporaryDisplayables.length; a++)
      t && t(this._temporaryDisplayables[a]);
  }, e.prototype.update = function() {
    this.updateTransform();
    for (var t = this._cursor; t < this._displayables.length; t++) {
      var a = this._displayables[t];
      a.parent = this, a.update(), a.parent = null;
    }
    for (var t = 0; t < this._temporaryDisplayables.length; t++) {
      var a = this._temporaryDisplayables[t];
      a.parent = this, a.update(), a.parent = null;
    }
  }, e.prototype.getBoundingRect = function() {
    if (!this._rect) {
      for (var t = new ht(1 / 0, 1 / 0, -1 / 0, -1 / 0), a = 0; a < this._displayables.length; a++) {
        var n = this._displayables[a], i = n.getBoundingRect().clone();
        n.needLocalTransform() && i.applyTransform(n.getLocalTransform(QR)), t.union(i);
      }
      this._rect = t;
    }
    return this._rect;
  }, e.prototype.contain = function(t, a) {
    var n = this.transformCoordToLocal(t, a), i = this.getBoundingRect();
    if (i.contain(n[0], n[1]))
      for (var o = 0; o < this._displayables.length; o++) {
        var s = this._displayables[o];
        if (s.contain(t, a))
          return !0;
      }
    return !1;
  }, e;
}(ur);
const tN = JR;
var cD = Tt();
function To(r, e, t, a, n) {
  var i;
  if (e && e.ecModel) {
    var o = e.ecModel.getUpdatePayload();
    i = o && o.animation;
  }
  var s = e && e.isAnimationEnabled(), l = r === "update";
  if (s) {
    var u = void 0, f = void 0, h = void 0;
    a ? (u = ut(a.duration, 200), f = ut(a.easing, "cubicOut"), h = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), f = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), h = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), i && (i.duration != null && (u = i.duration), i.easing != null && (f = i.easing), i.delay != null && (h = i.delay)), q(h) && (h = h(t, n)), q(u) && (u = u(t));
    var v = {
      duration: u || 0,
      delay: h,
      easing: f
    };
    return v;
  } else
    return null;
}
function Ng(r, e, t, a, n, i, o) {
  var s = !1, l;
  q(n) ? (o = i, i = n, n = null) : j(n) && (i = n.cb, o = n.during, s = n.isFrom, l = n.removeOpt, n = n.dataIndex);
  var u = r === "leave";
  u || e.stopAnimation("leave");
  var f = To(r, a, n, u ? l || {} : null, a && a.getAnimationDelayParams ? a.getAnimationDelayParams(e, n) : null);
  if (f && f.duration > 0) {
    var h = f.duration, v = f.delay, c = f.easing, p = {
      duration: h,
      delay: v || 0,
      easing: c,
      done: i,
      force: !!i || !!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: r,
      during: o
    };
    s ? e.animateFrom(t, p) : e.animateTo(t, p);
  } else
    e.stopAnimation(), !s && e.attr(t), o && o(1), i && i();
}
function Mt(r, e, t, a, n, i) {
  Ng("update", r, e, t, a, n, i);
}
function Bt(r, e, t, a, n, i) {
  Ng("enter", r, e, t, a, n, i);
}
function ro(r) {
  if (!r.__zr)
    return !0;
  for (var e = 0; e < r.animators.length; e++) {
    var t = r.animators[e];
    if (t.scope === "leave")
      return !0;
  }
  return !1;
}
function Qa(r, e, t, a, n, i) {
  ro(r) || Ng("leave", r, e, t, a, n, i);
}
function P0(r, e, t, a) {
  r.removeTextContent(), r.removeTextGuideLine(), Qa(r, {
    style: {
      opacity: 0
    }
  }, e, t, a);
}
function Us(r, e, t) {
  function a() {
    r.parent && r.parent.remove(r);
  }
  r.isGroup ? r.traverse(function(n) {
    n.isGroup || P0(n, e, t, a);
  }) : P0(r, e, t, a);
}
function Cr(r) {
  cD(r).oldStyle = r.style;
}
function eN(r) {
  return cD(r).oldStyle;
}
var gf = Math.max, yf = Math.min, Qp = {};
function rN(r) {
  return gt.extend(r);
}
var aN = LR;
function nN(r, e) {
  return aN(r, e);
}
function Ar(r, e) {
  Qp[r] = e;
}
function Og(r) {
  if (Qp.hasOwnProperty(r))
    return Qp[r];
}
function Sh(r, e, t, a) {
  var n = JT(r, e);
  return t && (a === "center" && (t = dD(t, n.getBoundingRect())), gD(n, t)), n;
}
function pD(r, e, t) {
  var a = new de({
    style: {
      image: r,
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    onload: function(n) {
      if (t === "center") {
        var i = {
          width: n.width,
          height: n.height
        };
        a.setStyle(dD(e, i));
      }
    }
  });
  return a;
}
function dD(r, e) {
  var t = e.width / e.height, a = r.height * t, n;
  a <= r.width ? n = r.height : (a = r.width, n = a / t);
  var i = r.x + r.width / 2, o = r.y + r.height / 2;
  return {
    x: i - a / 2,
    y: o - n / 2,
    width: a,
    height: n
  };
}
var nr = ER;
function gD(r, e) {
  if (r.applyTransform) {
    var t = r.getBoundingRect(), a = t.calculateTransform(e);
    r.applyTransform(a);
  }
}
function uo(r, e) {
  return NT(r, r, {
    lineWidth: e
  }), r;
}
function iN(r) {
  return OT(r.shape, r.shape, r.style), r;
}
var Uu = Un;
function ai(r, e) {
  for (var t = sh([]); r && r !== e; )
    la(t, r.getLocalTransform(), t), r = r.parent;
  return t;
}
function br(r, e, t) {
  return e && !Se(e) && (e = na.getLocalTransform(e)), t && (e = xo([], e)), fe([], r, e);
}
function xh(r, e, t) {
  var a = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), n = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), i = [r === "left" ? -a : r === "right" ? a : 0, r === "top" ? -n : r === "bottom" ? n : 0];
  return i = br(i, e, t), Math.abs(i[0]) > Math.abs(i[1]) ? i[0] > 0 ? "right" : "left" : i[1] > 0 ? "bottom" : "top";
}
function R0(r) {
  return !r.isGroup;
}
function oN(r) {
  return r.shape != null;
}
function gl(r, e, t) {
  if (!r || !e)
    return;
  function a(o) {
    var s = {};
    return o.traverse(function(l) {
      R0(l) && l.anid && (s[l.anid] = l);
    }), s;
  }
  function n(o) {
    var s = {
      x: o.x,
      y: o.y,
      rotation: o.rotation
    };
    return oN(o) && (s.shape = V({}, o.shape)), s;
  }
  var i = a(r);
  e.traverse(function(o) {
    if (R0(o) && o.anid) {
      var s = i[o.anid];
      if (s) {
        var l = n(o);
        o.attr(n(s)), Mt(o, l, t, it(o).dataIndex);
      }
    }
  });
}
function yD(r, e) {
  return G(r, function(t) {
    var a = t[0];
    a = gf(a, e.x), a = yf(a, e.x + e.width);
    var n = t[1];
    return n = gf(n, e.y), n = yf(n, e.y + e.height), [a, n];
  });
}
function sN(r, e) {
  var t = gf(r.x, e.x), a = yf(r.x + r.width, e.x + e.width), n = gf(r.y, e.y), i = yf(r.y + r.height, e.y + e.height);
  if (a >= t && i >= n)
    return {
      x: t,
      y: n,
      width: a - t,
      height: i - n
    };
}
function yl(r, e, t) {
  var a = V({
    rectHover: !0
  }, e), n = a.style = {
    strokeNoScale: !0
  };
  if (t = t || {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }, r)
    return r.indexOf("image://") === 0 ? (n.image = r.slice(8), tt(n, t), new de(a)) : Sh(r.replace("path://", ""), a, t, "center");
}
function ys(r, e, t, a, n) {
  for (var i = 0, o = n[n.length - 1]; i < n.length; i++) {
    var s = n[i];
    if (mD(r, e, t, a, s[0], s[1], o[0], o[1]))
      return !0;
    o = s;
  }
}
function mD(r, e, t, a, n, i, o, s) {
  var l = t - r, u = a - e, f = o - n, h = s - i, v = Lv(f, h, l, u);
  if (lN(v))
    return !1;
  var c = r - n, p = e - i, d = Lv(c, p, l, u) / v;
  if (d < 0 || d > 1)
    return !1;
  var g = Lv(c, p, f, h) / v;
  return !(g < 0 || g > 1);
}
function Lv(r, e, t, a) {
  return r * a - t * e;
}
function lN(r) {
  return r <= 1e-6 && r >= -1e-6;
}
function Do(r) {
  var e = r.itemTooltipOption, t = r.componentModel, a = r.itemName, n = $(e) ? {
    formatter: e
  } : e, i = t.mainType, o = t.componentIndex, s = {
    componentType: i,
    name: a,
    $vars: ["name"]
  };
  s[i + "Index"] = o;
  var l = r.formatterParamsExtra;
  l && C(_t(l), function(f) {
    U(s, f) || (s[f] = l[f], s.$vars.push(f));
  });
  var u = it(r.el);
  u.componentMainType = i, u.componentIndex = o, u.tooltipConfig = {
    name: a,
    option: tt({
      content: a,
      formatterParams: s
    }, n)
  };
}
function N0(r, e) {
  var t;
  r.isGroup && (t = e(r)), t || r.traverse(e);
}
function on(r, e) {
  if (r)
    if (z(r))
      for (var t = 0; t < r.length; t++)
        N0(r[t], e);
    else
      N0(r, e);
}
Ar("circle", qr);
Ar("ellipse", Eg);
Ar("sector", Ve);
Ar("ring", mh);
Ar("polygon", Be);
Ar("polyline", ze);
Ar("rect", bt);
Ar("line", le);
Ar("bezierCurve", _h);
Ar("arc", Pg);
const ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Arc: Pg,
  BezierCurve: _h,
  BoundingRect: ht,
  Circle: qr,
  CompoundPath: Rg,
  Ellipse: Eg,
  Group: nt,
  Image: de,
  IncrementalDisplayable: tN,
  Line: le,
  LinearGradient: dl,
  OrientedBoundingRect: df,
  Path: gt,
  Point: lt,
  Polygon: Be,
  Polyline: ze,
  RadialGradient: vD,
  Rect: bt,
  Ring: mh,
  Sector: Ve,
  Text: Dt,
  applyTransform: br,
  clipPointsByRect: yD,
  clipRectByRect: sN,
  createIcon: yl,
  extendPath: nN,
  extendShape: rN,
  getShapeClass: Og,
  getTransform: ai,
  groupTransition: gl,
  initProps: Bt,
  isElementRemoved: ro,
  lineLineIntersect: mD,
  linePolygonIntersect: ys,
  makeImage: pD,
  makePath: Sh,
  mergePath: nr,
  registerShape: Ar,
  removeElement: Qa,
  removeElementWithFadeOut: Us,
  resizePath: gD,
  setTooltipConfig: Do,
  subPixelOptimize: Uu,
  subPixelOptimizeLine: uo,
  subPixelOptimizeRect: iN,
  transformDirection: xh,
  traverseElements: on,
  updateProps: Mt
}, Symbol.toStringTag, { value: "Module" }));
var wh = {};
function _D(r, e) {
  for (var t = 0; t < Me.length; t++) {
    var a = Me[t], n = e[a], i = r.ensureState(a);
    i.style = i.style || {}, i.style.text = n;
  }
  var o = r.currentStates.slice();
  r.clearStates(!0), r.setStyle({
    text: e.normal
  }), r.useStates(o, !0);
}
function Jp(r, e, t) {
  var a = r.labelFetcher, n = r.labelDataIndex, i = r.labelDimIndex, o = e.normal, s;
  a && (s = a.getFormattedLabel(n, "normal", null, i, o && o.get("formatter"), t != null ? {
    interpolatedValue: t
  } : null)), s == null && (s = q(r.defaultText) ? r.defaultText(n, r, t) : r.defaultText);
  for (var l = {
    normal: s
  }, u = 0; u < Me.length; u++) {
    var f = Me[u], h = e[f];
    l[f] = ut(a ? a.getFormattedLabel(n, f, null, i, h && h.get("formatter")) : null, s);
  }
  return l;
}
function pe(r, e, t, a) {
  t = t || wh;
  for (var n = r instanceof Dt, i = !1, o = 0; o < $s.length; o++) {
    var s = e[$s[o]];
    if (s && s.getShallow("show")) {
      i = !0;
      break;
    }
  }
  var l = n ? r : r.getTextContent();
  if (i) {
    n || (l || (l = new Dt(), r.setTextContent(l)), r.stateProxy && (l.stateProxy = r.stateProxy));
    var u = Jp(t, e), f = e.normal, h = !!f.getShallow("show"), v = Ot(f, a && a.normal, t, !1, !n);
    v.text = u.normal, n || r.setTextConfig(mf(f, t, !1));
    for (var o = 0; o < Me.length; o++) {
      var c = Me[o], s = e[c];
      if (s) {
        var p = l.ensureState(c), d = !!ut(s.getShallow("show"), h);
        if (d !== h && (p.ignore = !d), p.style = Ot(s, a && a[c], t, !0, !n), p.style.text = u[c], !n) {
          var g = r.ensureState(c);
          g.textConfig = mf(s, t, !0);
        }
      }
    }
    l.silent = !!f.getShallow("silent"), l.style.x != null && (v.x = l.style.x), l.style.y != null && (v.y = l.style.y), l.ignore = !h, l.useStyle(v), l.dirty(), t.enableTextSetter && (Co(l).setLabelText = function(y) {
      var m = Jp(t, e, y);
      _D(l, m);
    });
  } else
    l && (l.ignore = !0);
  r.dirty();
}
function ie(r, e) {
  e = e || "label";
  for (var t = {
    normal: r.getModel(e)
  }, a = 0; a < Me.length; a++) {
    var n = Me[a];
    t[n] = r.getModel([n, e]);
  }
  return t;
}
function Ot(r, e, t, a, n) {
  var i = {};
  return uN(i, r, t, a, n), e && V(i, e), i;
}
function mf(r, e, t) {
  e = e || {};
  var a = {}, n, i = r.getShallow("rotate"), o = ut(r.getShallow("distance"), t ? null : 5), s = r.getShallow("offset");
  return n = r.getShallow("position") || (t ? null : "inside"), n === "outside" && (n = e.defaultOutsidePosition || "top"), n != null && (a.position = n), s != null && (a.offset = s), i != null && (i *= Math.PI / 180, a.rotation = i), o != null && (a.distance = o), a.outsideFill = r.get("color") === "inherit" ? e.inheritColor || null : "auto", a;
}
function uN(r, e, t, a, n) {
  t = t || wh;
  var i = e.ecModel, o = i && i.option.textStyle, s = fN(e), l;
  if (s) {
    l = {};
    for (var u in s)
      if (s.hasOwnProperty(u)) {
        var f = e.getModel(["rich", u]);
        B0(l[u] = {}, f, o, t, a, n, !1, !0);
      }
  }
  l && (r.rich = l);
  var h = e.get("overflow");
  h && (r.overflow = h);
  var v = e.get("minMargin");
  v != null && (r.margin = v), B0(r, e, o, t, a, n, !0, !1);
}
function fN(r) {
  for (var e; r && r !== r.ecModel; ) {
    var t = (r.option || wh).rich;
    if (t) {
      e = e || {};
      for (var a = _t(t), n = 0; n < a.length; n++) {
        var i = a[n];
        e[i] = 1;
      }
    }
    r = r.parentModel;
  }
  return e;
}
var O0 = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], k0 = ["align", "lineHeight", "width", "height", "tag", "verticalAlign"], V0 = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
function B0(r, e, t, a, n, i, o, s) {
  t = !n && t || wh;
  var l = a && a.inheritColor, u = e.getShallow("color"), f = e.getShallow("textBorderColor"), h = ut(e.getShallow("opacity"), t.opacity);
  (u === "inherit" || u === "auto") && ({}.NODE_ENV !== "production" && u === "auto" && Kt("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (f === "inherit" || f === "auto") && ({}.NODE_ENV !== "production" && f === "auto" && Kt("color: 'auto'", "color: 'inherit'"), l ? f = l : f = null), i || (u = u || t.color, f = f || t.textBorderColor), u != null && (r.fill = u), f != null && (r.stroke = f);
  var v = ut(e.getShallow("textBorderWidth"), t.textBorderWidth);
  v != null && (r.lineWidth = v);
  var c = ut(e.getShallow("textBorderType"), t.textBorderType);
  c != null && (r.lineDash = c);
  var p = ut(e.getShallow("textBorderDashOffset"), t.textBorderDashOffset);
  p != null && (r.lineDashOffset = p), !n && h == null && !s && (h = a && a.defaultOpacity), h != null && (r.opacity = h), !n && !i && r.fill == null && a.inheritColor && (r.fill = a.inheritColor);
  for (var d = 0; d < O0.length; d++) {
    var g = O0[d], y = ut(e.getShallow(g), t[g]);
    y != null && (r[g] = y);
  }
  for (var d = 0; d < k0.length; d++) {
    var g = k0[d], y = e.getShallow(g);
    y != null && (r[g] = y);
  }
  if (r.verticalAlign == null) {
    var m = e.getShallow("baseline");
    m != null && (r.verticalAlign = m);
  }
  if (!o || !a.disableBox) {
    for (var d = 0; d < V0.length; d++) {
      var g = V0[d], y = e.getShallow(g);
      y != null && (r[g] = y);
    }
    var _ = e.getShallow("borderType");
    _ != null && (r.borderDash = _), (r.backgroundColor === "auto" || r.backgroundColor === "inherit") && l && ({}.NODE_ENV !== "production" && r.backgroundColor === "auto" && Kt("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), r.backgroundColor = l), (r.borderColor === "auto" || r.borderColor === "inherit") && l && ({}.NODE_ENV !== "production" && r.borderColor === "auto" && Kt("borderColor: 'auto'", "borderColor: 'inherit'"), r.borderColor = l);
  }
}
function SD(r, e) {
  var t = e && e.getModel("textStyle");
  return mr([
    // FIXME in node-canvas fontWeight is before fontStyle
    r.fontStyle || t && t.getShallow("fontStyle") || "",
    r.fontWeight || t && t.getShallow("fontWeight") || "",
    (r.fontSize || t && t.getShallow("fontSize") || 12) + "px",
    r.fontFamily || t && t.getShallow("fontFamily") || "sans-serif"
  ].join(" "));
}
var Co = Tt();
function xD(r, e, t, a) {
  if (r) {
    var n = Co(r);
    n.prevValue = n.value, n.value = t;
    var i = e.normal;
    n.valueAnimation = i.get("valueAnimation"), n.valueAnimation && (n.precision = i.get("precision"), n.defaultInterpolatedText = a, n.statesModels = e);
  }
}
function wD(r, e, t, a, n) {
  var i = Co(r);
  if (!i.valueAnimation || i.prevValue === i.value)
    return;
  var o = i.defaultInterpolatedText, s = ut(i.interpolatedValue, i.prevValue), l = i.value;
  function u(f) {
    var h = bT(t, i.precision, s, l, f);
    i.interpolatedValue = f === 1 ? null : h;
    var v = Jp({
      labelDataIndex: e,
      labelFetcher: n,
      defaultText: o ? o(h) : h + ""
    }, i.statesModels, h);
    _D(r, v);
  }
  r.percent = 0, (i.prevValue == null ? Bt : Mt)(r, {
    // percent is used to prevent animation from being aborted #15916
    percent: 1
  }, a, e, null, u);
}
var hN = ["textStyle", "color"], Ev = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], Pv = new Dt(), vN = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getTextColor = function(e) {
      var t = this.ecModel;
      return this.getShallow("color") || (!e && t ? t.get(hN) : null);
    }, r.prototype.getFont = function() {
      return SD({
        fontStyle: this.getShallow("fontStyle"),
        fontWeight: this.getShallow("fontWeight"),
        fontSize: this.getShallow("fontSize"),
        fontFamily: this.getShallow("fontFamily")
      }, this.ecModel);
    }, r.prototype.getTextRect = function(e) {
      for (var t = {
        text: e,
        verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
      }, a = 0; a < Ev.length; a++)
        t[Ev[a]] = this.getShallow(Ev[a]);
      return Pv.useStyle(t), Pv.update(), Pv.getBoundingRect();
    }, r;
  }()
);
const cN = vN;
var bD = [
  ["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.
], pN = hi(bD), dN = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getLineStyle = function(e) {
      return pN(this, e);
    }, r;
  }()
), TD = [
  ["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.
], gN = hi(TD), yN = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getItemStyle = function(e, t) {
      return gN(this, e, t);
    }, r;
  }()
), mi = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.parentModel = t, this.ecModel = a, this.option = e;
    }
    return r.prototype.init = function(e, t, a) {
    }, r.prototype.mergeOption = function(e, t) {
      ft(this.option, e, !0);
    }, r.prototype.get = function(e, t) {
      return e == null ? this.option : this._doGet(this.parsePath(e), !t && this.parentModel);
    }, r.prototype.getShallow = function(e, t) {
      var a = this.option, n = a == null ? a : a[e];
      if (n == null && !t) {
        var i = this.parentModel;
        i && (n = i.getShallow(e));
      }
      return n;
    }, r.prototype.getModel = function(e, t) {
      var a = e != null, n = a ? this.parsePath(e) : null, i = a ? this._doGet(n) : this.option;
      return t = t || this.parentModel && this.parentModel.getModel(this.resolveParentPath(n)), new r(i, t, this.ecModel);
    }, r.prototype.isEmpty = function() {
      return this.option == null;
    }, r.prototype.restoreData = function() {
    }, r.prototype.clone = function() {
      var e = this.constructor;
      return new e(rt(this.option));
    }, r.prototype.parsePath = function(e) {
      return typeof e == "string" ? e.split(".") : e;
    }, r.prototype.resolveParentPath = function(e) {
      return e;
    }, r.prototype.isAnimationEnabled = function() {
      if (!wt.node && this.option) {
        if (this.option.animation != null)
          return !!this.option.animation;
        if (this.parentModel)
          return this.parentModel.isAnimationEnabled();
      }
    }, r.prototype._doGet = function(e, t) {
      var a = this.option;
      if (!e)
        return a;
      for (var n = 0; n < e.length && !(e[n] && (a = a && typeof a == "object" ? a[e[n]] : null, a == null)); n++)
        ;
      return a == null && t && (a = t._doGet(this.resolveParentPath(e), t.parentModel)), a;
    }, r;
  }()
);
bg(mi);
gP(mi);
te(mi, dN);
te(mi, yN);
te(mi, xP);
te(mi, cN);
const kt = mi;
var mN = Math.round(Math.random() * 10);
function Ao(r) {
  return [r || "", mN++].join("_");
}
function _N(r) {
  var e = {};
  r.registerSubTypeDefaulter = function(t, a) {
    var n = Gr(t);
    e[n.main] = a;
  }, r.determineSubType = function(t, a) {
    var n = a.type;
    if (!n) {
      var i = Gr(t).main;
      r.hasSubTypes(t) && e[i] && (n = e[i](a));
    }
    return n;
  };
}
function SN(r, e) {
  r.topologicalTravel = function(i, o, s, l) {
    if (!i.length)
      return;
    var u = t(o), f = u.graph, h = u.noEntryList, v = {};
    for (C(i, function(m) {
      v[m] = !0;
    }); h.length; ) {
      var c = h.pop(), p = f[c], d = !!v[c];
      d && (s.call(l, c, p.originalDeps.slice()), delete v[c]), C(p.successor, d ? y : g);
    }
    C(v, function() {
      var m = "";
      throw {}.NODE_ENV !== "production" && (m = Ae("Circular dependency may exists: ", v, i, o)), new Error(m);
    });
    function g(m) {
      f[m].entryCount--, f[m].entryCount === 0 && h.push(m);
    }
    function y(m) {
      v[m] = !0, g(m);
    }
  };
  function t(i) {
    var o = {}, s = [];
    return C(i, function(l) {
      var u = a(o, l), f = u.originalDeps = e(l), h = n(f, i);
      u.entryCount = h.length, u.entryCount === 0 && s.push(l), C(h, function(v) {
        ct(u.predecessor, v) < 0 && u.predecessor.push(v);
        var c = a(o, v);
        ct(c.successor, v) < 0 && c.successor.push(l);
      });
    }), {
      graph: o,
      noEntryList: s
    };
  }
  function a(i, o) {
    return i[o] || (i[o] = {
      predecessor: [],
      successor: []
    }), i[o];
  }
  function n(i, o) {
    var s = [];
    return C(i, function(l) {
      ct(o, l) >= 0 && s.push(l);
    }), s;
  }
}
function sn(r, e) {
  return ft(ft({}, r, !0), e, !0);
}
const xN = {
  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"
    }
  },
  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: ". "
      }
    }
  }
}, wN = {
  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: "旭日图"
    }
  },
  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 _f = "ZH", kg = "EN", Ys = kg, Yu = {}, Vg = {}, DD = wt.domSupported ? function() {
  var r = (
    /* eslint-disable-next-line */
    (document.documentElement.lang || navigator.language || navigator.browserLanguage).toUpperCase()
  );
  return r.indexOf(_f) > -1 ? _f : Ys;
}() : Ys;
function CD(r, e) {
  r = r.toUpperCase(), Vg[r] = new kt(e), Yu[r] = e;
}
function bN(r) {
  if ($(r)) {
    var e = Yu[r.toUpperCase()] || {};
    return r === _f || r === kg ? rt(e) : ft(rt(e), rt(Yu[Ys]), !1);
  } else
    return ft(rt(r), rt(Yu[Ys]), !1);
}
function td(r) {
  return Vg[r];
}
function TN() {
  return Vg[Ys];
}
CD(kg, xN);
CD(_f, wN);
var Bg = 1e3, zg = Bg * 60, Rs = zg * 60, ir = Rs * 24, z0 = ir * 365, ms = {
  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}"
}, jl = "{yyyy}-{MM}-{dd}", G0 = {
  year: "{yyyy}",
  month: "{yyyy}-{MM}",
  day: jl,
  hour: jl + " " + ms.hour,
  minute: jl + " " + ms.minute,
  second: jl + " " + ms.second,
  millisecond: ms.none
}, Rv = ["year", "month", "day", "hour", "minute", "second", "millisecond"], AD = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
function Tn(r, e) {
  return r += "", "0000".substr(0, e - r.length) + r;
}
function ao(r) {
  switch (r) {
    case "half-year":
    case "quarter":
      return "month";
    case "week":
    case "half-week":
      return "day";
    case "half-day":
    case "quarter-day":
      return "hour";
    default:
      return r;
  }
}
function DN(r) {
  return r === ao(r);
}
function CN(r) {
  switch (r) {
    case "year":
    case "month":
      return "day";
    case "millisecond":
      return "millisecond";
    default:
      return "second";
  }
}
function bh(r, e, t, a) {
  var n = Zr(r), i = n[Gg(t)](), o = n[no(t)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = n[Th(t)](), u = n["get" + (t ? "UTC" : "") + "Day"](), f = n[Zs(t)](), h = (f - 1) % 12 + 1, v = n[Dh(t)](), c = n[Ch(t)](), p = n[Ah(t)](), d = a instanceof kt ? a : td(a || DD) || TN(), g = d.getModel("time"), y = g.get("month"), m = g.get("monthAbbr"), _ = g.get("dayOfWeek"), S = g.get("dayOfWeekAbbr");
  return (e || "").replace(/{yyyy}/g, i + "").replace(/{yy}/g, i % 100 + "").replace(/{Q}/g, s + "").replace(/{MMMM}/g, y[o - 1]).replace(/{MMM}/g, m[o - 1]).replace(/{MM}/g, Tn(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Tn(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, _[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Tn(f, 2)).replace(/{H}/g, f + "").replace(/{hh}/g, Tn(h + "", 2)).replace(/{h}/g, h + "").replace(/{mm}/g, Tn(v, 2)).replace(/{m}/g, v + "").replace(/{ss}/g, Tn(c, 2)).replace(/{s}/g, c + "").replace(/{SSS}/g, Tn(p, 3)).replace(/{S}/g, p + "");
}
function AN(r, e, t, a, n) {
  var i = null;
  if ($(t))
    i = t;
  else if (q(t))
    i = t(r.value, e, {
      level: r.level
    });
  else {
    var o = V({}, ms);
    if (r.level > 0)
      for (var s = 0; s < Rv.length; ++s)
        o[Rv[s]] = "{primary|" + o[Rv[s]] + "}";
    var l = t ? t.inherit === !1 ? t : tt(t, o) : o, u = MD(r.value, n);
    if (l[u])
      i = l[u];
    else if (l.inherit) {
      for (var f = AD.indexOf(u), s = f - 1; s >= 0; --s)
        if (l[u]) {
          i = l[u];
          break;
        }
      i = i || o.none;
    }
    if (z(i)) {
      var h = r.level == null ? 0 : r.level >= 0 ? r.level : i.length + r.level;
      h = Math.min(h, i.length - 1), i = i[h];
    }
  }
  return bh(new Date(r.value), i, n, a);
}
function MD(r, e) {
  var t = Zr(r), a = t[no(e)]() + 1, n = t[Th(e)](), i = t[Zs(e)](), o = t[Dh(e)](), s = t[Ch(e)](), l = t[Ah(e)](), u = l === 0, f = u && s === 0, h = f && o === 0, v = h && i === 0, c = v && n === 1, p = c && a === 1;
  return p ? "year" : c ? "month" : v ? "day" : h ? "hour" : f ? "minute" : u ? "second" : "millisecond";
}
function F0(r, e, t) {
  var a = Ct(r) ? Zr(r) : r;
  switch (e = e || MD(r, t), e) {
    case "year":
      return a[Gg(t)]();
    case "half-year":
      return a[no(t)]() >= 6 ? 1 : 0;
    case "quarter":
      return Math.floor((a[no(t)]() + 1) / 4);
    case "month":
      return a[no(t)]();
    case "day":
      return a[Th(t)]();
    case "half-day":
      return a[Zs(t)]() / 24;
    case "hour":
      return a[Zs(t)]();
    case "minute":
      return a[Dh(t)]();
    case "second":
      return a[Ch(t)]();
    case "millisecond":
      return a[Ah(t)]();
  }
}
function Gg(r) {
  return r ? "getUTCFullYear" : "getFullYear";
}
function no(r) {
  return r ? "getUTCMonth" : "getMonth";
}
function Th(r) {
  return r ? "getUTCDate" : "getDate";
}
function Zs(r) {
  return r ? "getUTCHours" : "getHours";
}
function Dh(r) {
  return r ? "getUTCMinutes" : "getMinutes";
}
function Ch(r) {
  return r ? "getUTCSeconds" : "getSeconds";
}
function Ah(r) {
  return r ? "getUTCMilliseconds" : "getMilliseconds";
}
function MN(r) {
  return r ? "setUTCFullYear" : "setFullYear";
}
function ID(r) {
  return r ? "setUTCMonth" : "setMonth";
}
function LD(r) {
  return r ? "setUTCDate" : "setDate";
}
function ED(r) {
  return r ? "setUTCHours" : "setHours";
}
function PD(r) {
  return r ? "setUTCMinutes" : "setMinutes";
}
function RD(r) {
  return r ? "setUTCSeconds" : "setSeconds";
}
function ND(r) {
  return r ? "setUTCMilliseconds" : "setMilliseconds";
}
function OD(r) {
  if (!Sg(r))
    return $(r) ? r : "-";
  var e = (r + "").split(".");
  return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
}
function kD(r, e) {
  return r = (r || "").toLowerCase().replace(/-(.)/g, function(t, a) {
    return a.toUpperCase();
  }), e && r && (r = r.charAt(0).toUpperCase() + r.slice(1)), r;
}
var Mo = vg;
function ed(r, e, t) {
  var a = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  function n(f) {
    return f && mr(f) ? f : "-";
  }
  function i(f) {
    return !!(f != null && !isNaN(f) && isFinite(f));
  }
  var o = e === "time", s = r instanceof Date;
  if (o || s) {
    var l = o ? Zr(r) : r;
    if (isNaN(+l)) {
      if (s)
        return "-";
    } else
      return bh(l, a, t);
  }
  if (e === "ordinal")
    return ef(r) ? n(r) : Ct(r) && i(r) ? r + "" : "-";
  var u = pa(r);
  return i(u) ? OD(u) : ef(r) ? n(r) : typeof r == "boolean" ? r + "" : "-";
}
var H0 = ["a", "b", "c", "d", "e", "f", "g"], Nv = function(r, e) {
  return "{" + r + (e ?? "") + "}";
};
function VD(r, e, t) {
  z(e) || (e = [e]);
  var a = e.length;
  if (!a)
    return "";
  for (var n = e[0].$vars || [], i = 0; i < n.length; i++) {
    var o = H0[i];
    r = r.replace(Nv(o), Nv(o, 0));
  }
  for (var s = 0; s < a; s++)
    for (var l = 0; l < n.length; l++) {
      var u = e[s][n[l]];
      r = r.replace(Nv(H0[l], s), t ? Pe(u) : u);
    }
  return r;
}
function IN(r, e, t) {
  return C(e, function(a, n) {
    r = r.replace("{" + n + "}", t ? Pe(a) : a);
  }), r;
}
function LN(r, e) {
  var t = $(r) ? {
    color: r,
    extraCssText: e
  } : r || {}, a = t.color, n = t.type;
  e = t.extraCssText;
  var i = t.renderMode || "html";
  if (!a)
    return "";
  if (i === "html")
    return n === "subItem" ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + Pe(a) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + Pe(a) + ";" + (e || "") + '"></span>';
  var o = t.markerId || "markerX";
  return {
    renderMode: i,
    content: "{" + o + "|}  ",
    style: n === "subItem" ? {
      width: 4,
      height: 4,
      borderRadius: 2,
      backgroundColor: a
    } : {
      width: 10,
      height: 10,
      borderRadius: 5,
      backgroundColor: a
    }
  };
}
function ci(r, e) {
  return e = e || "transparent", $(r) ? r : j(r) && r.colorStops && (r.colorStops[0] || {}).color || e;
}
function Sf(r, e) {
  if (e === "_blank" || e === "blank") {
    var t = window.open();
    t.opener = null, t.location.href = r;
  } else
    window.open(r, e);
}
var Zu = C, BD = ["left", "right", "top", "bottom", "width", "height"], Zn = [["width", "left", "right"], ["height", "top", "bottom"]];
function Fg(r, e, t, a, n) {
  var i = 0, o = 0;
  a == null && (a = 1 / 0), n == null && (n = 1 / 0);
  var s = 0;
  e.eachChild(function(l, u) {
    var f = l.getBoundingRect(), h = e.childAt(u + 1), v = h && h.getBoundingRect(), c, p;
    if (r === "horizontal") {
      var d = f.width + (v ? -v.x + f.x : 0);
      c = i + d, c > a || l.newline ? (i = 0, c = d, o += s + t, s = f.height) : s = Math.max(s, f.height);
    } else {
      var g = f.height + (v ? -v.y + f.y : 0);
      p = o + g, p > n || l.newline ? (i += s + t, o = 0, p = g, s = f.width) : s = Math.max(s, f.width);
    }
    l.newline || (l.x = i, l.y = o, l.markRedraw(), r === "horizontal" ? i = c + t : o = p + t);
  });
}
var ni = Fg;
ot(Fg, "vertical");
ot(Fg, "horizontal");
function EN(r, e, t) {
  var a = e.width, n = e.height, i = H(r.left, a), o = H(r.top, n), s = H(r.right, a), l = H(r.bottom, n);
  return (isNaN(i) || isNaN(parseFloat(r.left))) && (i = 0), (isNaN(s) || isNaN(parseFloat(r.right))) && (s = a), (isNaN(o) || isNaN(parseFloat(r.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(r.bottom))) && (l = n), t = Mo(t || 0), {
    width: Math.max(s - i - t[1] - t[3], 0),
    height: Math.max(l - o - t[0] - t[2], 0)
  };
}
function re(r, e, t) {
  t = Mo(t || 0);
  var a = e.width, n = e.height, i = H(r.left, a), o = H(r.top, n), s = H(r.right, a), l = H(r.bottom, n), u = H(r.width, a), f = H(r.height, n), h = t[2] + t[0], v = t[1] + t[3], c = r.aspect;
  switch (isNaN(u) && (u = a - s - v - i), isNaN(f) && (f = n - l - h - o), c != null && (isNaN(u) && isNaN(f) && (c > a / n ? u = a * 0.8 : f = n * 0.8), isNaN(u) && (u = c * f), isNaN(f) && (f = u / c)), isNaN(i) && (i = a - s - u - v), isNaN(o) && (o = n - l - f - h), r.left || r.right) {
    case "center":
      i = a / 2 - u / 2 - t[3];
      break;
    case "right":
      i = a - u - v;
      break;
  }
  switch (r.top || r.bottom) {
    case "middle":
    case "center":
      o = n / 2 - f / 2 - t[0];
      break;
    case "bottom":
      o = n - f - h;
      break;
  }
  i = i || 0, o = o || 0, isNaN(u) && (u = a - v - i - (s || 0)), isNaN(f) && (f = n - h - o - (l || 0));
  var p = new ht(i + t[3], o + t[0], u, f);
  return p.margin = t, p;
}
function Mh(r, e, t, a, n, i) {
  var o = !n || !n.hv || n.hv[0], s = !n || !n.hv || n.hv[1], l = n && n.boundingMode || "all";
  if (i = i || r, i.x = r.x, i.y = r.y, !o && !s)
    return !1;
  var u;
  if (l === "raw")
    u = r.type === "group" ? new ht(0, 0, +e.width || 0, +e.height || 0) : r.getBoundingRect();
  else if (u = r.getBoundingRect(), r.needLocalTransform()) {
    var f = r.getLocalTransform();
    u = u.clone(), u.applyTransform(f);
  }
  var h = re(tt({
    width: u.width,
    height: u.height
  }, e), t, a), v = o ? h.x - u.x : 0, c = s ? h.y - u.y : 0;
  return l === "raw" ? (i.x = v, i.y = c) : (i.x += v, i.y += c), i === r && r.markRedraw(), !0;
}
function PN(r, e) {
  return r[Zn[e][0]] != null || r[Zn[e][1]] != null && r[Zn[e][2]] != null;
}
function Xs(r) {
  var e = r.layoutMode || r.constructor.layoutMode;
  return j(e) ? e : e ? {
    type: e
  } : null;
}
function Ja(r, e, t) {
  var a = t && t.ignoreSize;
  !z(a) && (a = [a, a]);
  var n = o(Zn[0], 0), i = o(Zn[1], 1);
  u(Zn[0], r, n), u(Zn[1], r, i);
  function o(f, h) {
    var v = {}, c = 0, p = {}, d = 0, g = 2;
    if (Zu(f, function(_) {
      p[_] = r[_];
    }), Zu(f, function(_) {
      s(e, _) && (v[_] = p[_] = e[_]), l(v, _) && c++, l(p, _) && d++;
    }), a[h])
      return l(e, f[1]) ? p[f[2]] = null : l(e, f[2]) && (p[f[1]] = null), p;
    if (d === g || !c)
      return p;
    if (c >= g)
      return v;
    for (var y = 0; y < f.length; y++) {
      var m = f[y];
      if (!s(v, m) && s(r, m)) {
        v[m] = r[m];
        break;
      }
    }
    return v;
  }
  function s(f, h) {
    return f.hasOwnProperty(h);
  }
  function l(f, h) {
    return f[h] != null && f[h] !== "auto";
  }
  function u(f, h, v) {
    Zu(f, function(c) {
      h[c] = v[c];
    });
  }
}
function Io(r) {
  return zD({}, r);
}
function zD(r, e) {
  return e && r && Zu(BD, function(t) {
    e.hasOwnProperty(t) && (r[t] = e[t]);
  }), r;
}
var RN = Tt(), Lo = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this, t, a, n) || this;
      return i.uid = Ao("ec_cpt_model"), i;
    }
    return e.prototype.init = function(t, a, n) {
      this.mergeDefaultAndTheme(t, n);
    }, e.prototype.mergeDefaultAndTheme = function(t, a) {
      var n = Xs(this), i = n ? Io(t) : {}, o = a.getTheme();
      ft(t, o.get(this.mainType)), ft(t, this.getDefaultOption()), n && Ja(t, i, n);
    }, e.prototype.mergeOption = function(t, a) {
      ft(this.option, t, !0);
      var n = Xs(this);
      n && Ja(this.option, t, n);
    }, e.prototype.optionUpdated = function(t, a) {
    }, e.prototype.getDefaultOption = function() {
      var t = this.constructor;
      if (!cP(t))
        return t.defaultOption;
      var a = RN(this);
      if (!a.defaultOption) {
        for (var n = [], i = t; i; ) {
          var o = i.prototype.defaultOption;
          o && n.push(o), i = i.superClass;
        }
        for (var s = {}, l = n.length - 1; l >= 0; l--)
          s = ft(s, n[l], !0);
        a.defaultOption = s;
      }
      return a.defaultOption;
    }, e.prototype.getReferringComponents = function(t, a) {
      var n = t + "Index", i = t + "Id";
      return cl(this.ecModel, t, {
        index: this.get(n, !0),
        id: this.get(i, !0)
      }, a);
    }, e.prototype.getBoxLayoutParams = function() {
      var t = this;
      return {
        left: t.get("left"),
        top: t.get("top"),
        right: t.get("right"),
        bottom: t.get("bottom"),
        width: t.get("width"),
        height: t.get("height")
      };
    }, e.prototype.getZLevelKey = function() {
      return "";
    }, e.prototype.setZLevel = function(t) {
      this.option.zlevel = t;
    }, e.protoInitialize = function() {
      var t = e.prototype;
      t.type = "component", t.id = "", t.name = "", t.mainType = "", t.subType = "", t.componentIndex = 0;
    }(), e;
  }(kt)
);
DT(Lo, kt);
vh(Lo);
_N(Lo);
SN(Lo, NN);
function NN(r) {
  var e = [];
  return C(Lo.getClassesByMainType(r), function(t) {
    e = e.concat(t.dependencies || t.prototype.dependencies || []);
  }), e = G(e, function(t) {
    return Gr(t).main;
  }), r !== "dataset" && ct(e, "dataset") <= 0 && e.unshift("dataset"), e;
}
const St = Lo;
var GD = "";
typeof navigator < "u" && (GD = navigator.platform || "");
var Li = "rgba(0, 0, 0, 0.2)";
const ON = {
  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: Li,
        dashArrayX: [1, 0],
        dashArrayY: [2, 5],
        symbolSize: 1,
        rotation: Math.PI / 6
      }, {
        color: Li,
        symbol: "circle",
        dashArrayX: [[8, 8], [0, 8, 8, 0]],
        dashArrayY: [6, 0],
        symbolSize: 0.8
      }, {
        color: Li,
        dashArrayX: [1, 0],
        dashArrayY: [4, 3],
        rotation: -Math.PI / 4
      }, {
        color: Li,
        dashArrayX: [[6, 6], [0, 6, 6, 0]],
        dashArrayY: [6, 0]
      }, {
        color: Li,
        dashArrayX: [[1, 0], [1, 6]],
        dashArrayY: [1, 0, 6, 0],
        rotation: Math.PI / 4
      }, {
        color: Li,
        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: GD.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 rd = K(["tooltip", "label", "itemName", "itemId", "itemGroupId", "seriesName"]), hr = "original", xe = "arrayRows", vr = "objectRows", Kr = "keyedColumns", fa = "typedArray", FD = "unknown", Wr = "column", Eo = "row", ue = {
  Must: 1,
  Might: 2,
  Not: 3
  // Other cases
}, HD = Tt();
function kN(r) {
  HD(r).datasetMap = K();
}
function WD(r, e, t) {
  var a = {}, n = Wg(e);
  if (!n || !r)
    return a;
  var i = [], o = [], s = e.ecModel, l = HD(s).datasetMap, u = n.uid + "_" + t.seriesLayoutBy, f, h;
  r = r.slice(), C(r, function(d, g) {
    var y = j(d) ? d : r[g] = {
      name: d
    };
    y.type === "ordinal" && f == null && (f = g, h = p(y)), a[y.name] = [];
  });
  var v = l.get(u) || l.set(u, {
    categoryWayDim: h,
    valueWayDim: 0
  });
  C(r, function(d, g) {
    var y = d.name, m = p(d);
    if (f == null) {
      var _ = v.valueWayDim;
      c(a[y], _, m), c(o, _, m), v.valueWayDim += m;
    } else if (f === g)
      c(a[y], 0, m), c(i, 0, m);
    else {
      var _ = v.categoryWayDim;
      c(a[y], _, m), c(o, _, m), v.categoryWayDim += m;
    }
  });
  function c(d, g, y) {
    for (var m = 0; m < y; m++)
      d.push(g + m);
  }
  function p(d) {
    var g = d.dimsDef;
    return g ? g.length : 1;
  }
  return i.length && (a.itemName = i), o.length && (a.seriesName = o), a;
}
function Hg(r, e, t) {
  var a = {}, n = Wg(r);
  if (!n)
    return a;
  var i = e.sourceFormat, o = e.dimensionsDefine, s;
  (i === vr || i === Kr) && C(o, function(f, h) {
    (j(f) ? f.name : f) === "name" && (s = h);
  });
  var l = function() {
    for (var f = {}, h = {}, v = [], c = 0, p = Math.min(5, t); c < p; c++) {
      var d = UD(e.data, i, e.seriesLayoutBy, o, e.startIndex, c);
      v.push(d);
      var g = d === ue.Not;
      if (g && f.v == null && c !== s && (f.v = c), (f.n == null || f.n === f.v || !g && v[f.n] === ue.Not) && (f.n = c), y(f) && v[f.n] !== ue.Not)
        return f;
      g || (d === ue.Might && h.v == null && c !== s && (h.v = c), (h.n == null || h.n === h.v) && (h.n = c));
    }
    function y(m) {
      return m.v != null && m.n != null;
    }
    return y(f) ? f : y(h) ? h : null;
  }();
  if (l) {
    a.value = [l.v];
    var u = s ?? l.n;
    a.itemName = [u], a.seriesName = [u];
  }
  return a;
}
function Wg(r) {
  var e = r.get("data", !0);
  if (!e)
    return cl(r.ecModel, "dataset", {
      index: r.get("datasetIndex", !0),
      id: r.get("datasetId", !0)
    }, Qt).models[0];
}
function VN(r) {
  return !r.get("transform", !0) && !r.get("fromTransformResult", !0) ? [] : cl(r.ecModel, "dataset", {
    index: r.get("fromDatasetIndex", !0),
    id: r.get("fromDatasetId", !0)
  }, Qt).models;
}
function $D(r, e) {
  return UD(r.data, r.sourceFormat, r.seriesLayoutBy, r.dimensionsDefine, r.startIndex, e);
}
function UD(r, e, t, a, n, i) {
  var o, s = 5;
  if (ke(r))
    return ue.Not;
  var l, u;
  if (a) {
    var f = a[i];
    j(f) ? (l = f.name, u = f.type) : $(f) && (l = f);
  }
  if (u != null)
    return u === "ordinal" ? ue.Must : ue.Not;
  if (e === xe) {
    var h = r;
    if (t === Eo) {
      for (var v = h[i], c = 0; c < (v || []).length && c < s; c++)
        if ((o = S(v[n + c])) != null)
          return o;
    } else
      for (var c = 0; c < h.length && c < s; c++) {
        var p = h[n + c];
        if (p && (o = S(p[i])) != null)
          return o;
      }
  } else if (e === vr) {
    var d = r;
    if (!l)
      return ue.Not;
    for (var c = 0; c < d.length && c < s; c++) {
      var g = d[c];
      if (g && (o = S(g[l])) != null)
        return o;
    }
  } else if (e === Kr) {
    var y = r;
    if (!l)
      return ue.Not;
    var v = y[l];
    if (!v || ke(v))
      return ue.Not;
    for (var c = 0; c < v.length && c < s; c++)
      if ((o = S(v[c])) != null)
        return o;
  } else if (e === hr)
    for (var m = r, c = 0; c < m.length && c < s; c++) {
      var g = m[c], _ = wo(g);
      if (!z(_))
        return ue.Not;
      if ((o = S(_[i])) != null)
        return o;
    }
  function S(w) {
    var x = $(w);
    if (w != null && isFinite(w) && w !== "")
      return x ? ue.Might : ue.Not;
    if (x && w !== "-")
      return ue.Must;
  }
  return ue.Not;
}
var ad = K();
function BN(r, e) {
  Q(ad.get(r) == null && e), ad.set(r, e);
}
function zN(r, e, t) {
  var a = ad.get(e);
  if (!a)
    return t;
  var n = a(r);
  if (!n)
    return t;
  if ({}.NODE_ENV !== "production")
    for (var i = 0; i < n.length; i++)
      Q(lo(n[i]));
  return t.concat(n);
}
var W0 = Tt(), GN = Tt(), $g = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getColorFromPalette = function(e, t, a) {
      var n = Pt(this.get("color", !0)), i = this.get("colorLayer", !0);
      return YD(this, W0, n, i, e, t, a);
    }, r.prototype.clearColorPalette = function() {
      HN(this, W0);
    }, r;
  }()
);
function nd(r, e, t, a) {
  var n = Pt(r.get(["aria", "decal", "decals"]));
  return YD(r, GN, n, null, e, t, a);
}
function FN(r, e) {
  for (var t = r.length, a = 0; a < t; a++)
    if (r[a].length > e)
      return r[a];
  return r[t - 1];
}
function YD(r, e, t, a, n, i, o) {
  i = i || r;
  var s = e(i), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  if (u.hasOwnProperty(n))
    return u[n];
  var f = o == null || !a ? t : FN(a, o);
  if (f = f || t, !(!f || !f.length)) {
    var h = f[l];
    return n && (u[n] = h), s.paletteIdx = (l + 1) % f.length, h;
  }
}
function HN(r, e) {
  e(r).paletteIdx = 0, e(r).paletteNameMap = {};
}
var Ql, Uo, $0, Ov = "\0_ec_inner", U0 = 1, WN = {
  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"
}, $N = {
  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"
}, xf = {};
function UN(r) {
  C(r, function(e, t) {
    if (!St.hasClass(t)) {
      var a = WN[t];
      a && !xf[a] && (ve("Component " + t + ` is used but not imported.
import { ` + a + ` } from 'echarts/components';
echarts.use([` + a + "]);"), xf[a] = !0);
    }
  });
}
var ZD = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.init = function(t, a, n, i, o, s) {
      i = i || {}, this.option = null, this._theme = new kt(i), this._locale = new kt(o), this._optionManager = s;
    }, e.prototype.setOption = function(t, a, n) {
      ({}).NODE_ENV !== "production" && (Q(t != null, "option is null/undefined"), Q(t[Ov] !== U0, "please use chart.getOption()"));
      var i = X0(a);
      this._optionManager.setOption(t, n, i), this._resetOption(null, i);
    }, e.prototype.resetOption = function(t, a) {
      return this._resetOption(t, X0(a));
    }, e.prototype._resetOption = function(t, a) {
      var n = !1, i = this._optionManager;
      if (!t || t === "recreate") {
        var o = i.mountOption(t === "recreate");
        ({}).NODE_ENV !== "production" && UN(o), !this.option || t === "recreate" ? $0(this, o) : (this.restoreData(), this._mergeOption(o, a)), n = !0;
      }
      if ((t === "timeline" || t === "media") && this.restoreData(), !t || t === "recreate" || t === "timeline") {
        var s = i.getTimelineOption(this);
        s && (n = !0, this._mergeOption(s, a));
      }
      if (!t || t === "recreate" || t === "media") {
        var l = i.getMediaOption(this);
        l.length && C(l, function(u) {
          n = !0, this._mergeOption(u, a);
        }, this);
      }
      return n;
    }, e.prototype.mergeOption = function(t) {
      this._mergeOption(t, null);
    }, e.prototype._mergeOption = function(t, a) {
      var n = this.option, i = this._componentsMap, o = this._componentsCount, s = [], l = K(), u = a && a.replaceMergeMainTypeMap;
      kN(this), C(t, function(h, v) {
        h != null && (St.hasClass(v) ? v && (s.push(v), l.set(v, !0)) : n[v] = n[v] == null ? rt(h) : ft(n[v], h, !0));
      }), u && u.each(function(h, v) {
        St.hasClass(v) && !l.get(v) && (s.push(v), l.set(v, !0));
      }), St.topologicalTravel(s, St.getAllClassMainTypes(), f, this);
      function f(h) {
        var v = zN(this, h, Pt(t[h])), c = i.get(h), p = (
          // `!oldCmptList` means init. See the comment in `mappingToExists`
          c ? u && u.get(h) ? "replaceMerge" : "normalMerge" : "replaceAll"
        ), d = ST(c, v, p);
        nP(d, h, St), n[h] = null, i.set(h, null), o.set(h, 0);
        var g = [], y = [], m = 0, _, S;
        C(d, function(w, x) {
          var b = w.existing, T = w.newOption;
          if (!T)
            b && (b.mergeOption({}, this), b.optionUpdated({}, !1));
          else {
            var D = h === "series", A = St.getClass(
              h,
              w.keyInfo.subType,
              !D
              // Give a more detailed warn later if series don't exists
            );
            if (!A) {
              if ({}.NODE_ENV !== "production") {
                var M = w.keyInfo.subType, I = $N[M];
                xf[M] || (xf[M] = !0, ve(I ? "Series " + M + ` is used but not imported.
import { ` + I + ` } from 'echarts/charts';
echarts.use([` + I + "]);" : "Unknown series " + M));
              }
              return;
            }
            if (h === "tooltip") {
              if (_) {
                ({}).NODE_ENV !== "production" && (S || (Ft("Currently only one tooltip component is allowed."), S = !0));
                return;
              }
              _ = !0;
            }
            if (b && b.constructor === A)
              b.name = w.keyInfo.name, b.mergeOption(T, this), b.optionUpdated(T, !1);
            else {
              var L = V({
                componentIndex: x
              }, w.keyInfo);
              b = new A(T, this, this, L), V(b, L), w.brandNew && (b.__requireNewView = !0), b.init(T, this, this), b.optionUpdated(null, !0);
            }
          }
          b ? (g.push(b.option), y.push(b), m++) : (g.push(void 0), y.push(void 0));
        }, this), n[h] = g, i.set(h, y), o.set(h, m), h === "series" && Ql(this);
      }
      this._seriesIndices || Ql(this);
    }, e.prototype.getOption = function() {
      var t = rt(this.option);
      return C(t, function(a, n) {
        if (St.hasClass(n)) {
          for (var i = Pt(a), o = i.length, s = !1, l = o - 1; l >= 0; l--)
            i[l] && !lo(i[l]) ? s = !0 : (i[l] = null, !s && o--);
          i.length = o, t[n] = i;
        }
      }), delete t[Ov], t;
    }, e.prototype.getTheme = function() {
      return this._theme;
    }, e.prototype.getLocaleModel = function() {
      return this._locale;
    }, e.prototype.setUpdatePayload = function(t) {
      this._payload = t;
    }, e.prototype.getUpdatePayload = function() {
      return this._payload;
    }, e.prototype.getComponent = function(t, a) {
      var n = this._componentsMap.get(t);
      if (n) {
        var i = n[a || 0];
        if (i)
          return i;
        if (a == null) {
          for (var o = 0; o < n.length; o++)
            if (n[o])
              return n[o];
        }
      }
    }, e.prototype.queryComponents = function(t) {
      var a = t.mainType;
      if (!a)
        return [];
      var n = t.index, i = t.id, o = t.name, s = this._componentsMap.get(a);
      if (!s || !s.length)
        return [];
      var l;
      return n != null ? (l = [], C(Pt(n), function(u) {
        s[u] && l.push(s[u]);
      })) : i != null ? l = Y0("id", i, s) : o != null ? l = Y0("name", o, s) : l = Et(s, function(u) {
        return !!u;
      }), Z0(l, t);
    }, e.prototype.findComponents = function(t) {
      var a = t.query, n = t.mainType, i = s(a), o = i ? this.queryComponents(i) : Et(this._componentsMap.get(n), function(u) {
        return !!u;
      });
      return l(Z0(o, t));
      function s(u) {
        var f = n + "Index", h = n + "Id", v = n + "Name";
        return u && (u[f] != null || u[h] != null || u[v] != null) ? {
          mainType: n,
          // subType will be filtered finally.
          index: u[f],
          id: u[h],
          name: u[v]
        } : null;
      }
      function l(u) {
        return t.filter ? Et(u, t.filter) : u;
      }
    }, e.prototype.eachComponent = function(t, a, n) {
      var i = this._componentsMap;
      if (q(t)) {
        var o = a, s = t;
        i.each(function(h, v) {
          for (var c = 0; h && c < h.length; c++) {
            var p = h[c];
            p && s.call(o, v, p, p.componentIndex);
          }
        });
      } else
        for (var l = $(t) ? i.get(t) : j(t) ? this.findComponents(t) : null, u = 0; l && u < l.length; u++) {
          var f = l[u];
          f && a.call(n, f, f.componentIndex);
        }
    }, e.prototype.getSeriesByName = function(t) {
      var a = ee(t, null);
      return Et(this._componentsMap.get("series"), function(n) {
        return !!n && a != null && n.name === a;
      });
    }, e.prototype.getSeriesByIndex = function(t) {
      return this._componentsMap.get("series")[t];
    }, e.prototype.getSeriesByType = function(t) {
      return Et(this._componentsMap.get("series"), function(a) {
        return !!a && a.subType === t;
      });
    }, e.prototype.getSeries = function() {
      return Et(this._componentsMap.get("series"), function(t) {
        return !!t;
      });
    }, e.prototype.getSeriesCount = function() {
      return this._componentsCount.get("series");
    }, e.prototype.eachSeries = function(t, a) {
      Uo(this), C(this._seriesIndices, function(n) {
        var i = this._componentsMap.get("series")[n];
        t.call(a, i, n);
      }, this);
    }, e.prototype.eachRawSeries = function(t, a) {
      C(this._componentsMap.get("series"), function(n) {
        n && t.call(a, n, n.componentIndex);
      });
    }, e.prototype.eachSeriesByType = function(t, a, n) {
      Uo(this), C(this._seriesIndices, function(i) {
        var o = this._componentsMap.get("series")[i];
        o.subType === t && a.call(n, o, i);
      }, this);
    }, e.prototype.eachRawSeriesByType = function(t, a, n) {
      return C(this.getSeriesByType(t), a, n);
    }, e.prototype.isSeriesFiltered = function(t) {
      return Uo(this), this._seriesIndicesMap.get(t.componentIndex) == null;
    }, e.prototype.getCurrentSeriesIndices = function() {
      return (this._seriesIndices || []).slice();
    }, e.prototype.filterSeries = function(t, a) {
      Uo(this);
      var n = [];
      C(this._seriesIndices, function(i) {
        var o = this._componentsMap.get("series")[i];
        t.call(a, o, i) && n.push(i);
      }, this), this._seriesIndices = n, this._seriesIndicesMap = K(n);
    }, e.prototype.restoreData = function(t) {
      Ql(this);
      var a = this._componentsMap, n = [];
      a.each(function(i, o) {
        St.hasClass(o) && n.push(o);
      }), St.topologicalTravel(n, St.getAllClassMainTypes(), function(i) {
        C(a.get(i), function(o) {
          o && (i !== "series" || !YN(o, t)) && o.restoreData();
        });
      });
    }, e.internalField = function() {
      Ql = function(t) {
        var a = t._seriesIndices = [];
        C(t._componentsMap.get("series"), function(n) {
          n && a.push(n.componentIndex);
        }), t._seriesIndicesMap = K(a);
      }, Uo = function(t) {
        if ({}.NODE_ENV !== "production" && !t._seriesIndices)
          throw new Error("Option should contains series.");
      }, $0 = function(t, a) {
        t.option = {}, t.option[Ov] = U0, t._componentsMap = K({
          series: []
        }), t._componentsCount = K();
        var n = a.aria;
        j(n) && n.enabled == null && (n.enabled = !0), ZN(a, t._theme.option), ft(a, ON, !1), t._mergeOption(a, null);
      };
    }(), e;
  }(kt)
);
function YN(r, e) {
  if (e) {
    var t = e.seriesIndex, a = e.seriesId, n = e.seriesName;
    return t != null && r.componentIndex !== t || a != null && r.id !== a || n != null && r.name !== n;
  }
}
function ZN(r, e) {
  var t = r.color && !r.colorLayer;
  C(e, function(a, n) {
    n === "colorLayer" && t || St.hasClass(n) || (typeof a == "object" ? r[n] = r[n] ? ft(r[n], a, !1) : rt(a) : r[n] == null && (r[n] = a));
  });
}
function Y0(r, e, t) {
  if (z(e)) {
    var a = K();
    return C(e, function(i) {
      if (i != null) {
        var o = ee(i, null);
        o != null && a.set(i, !0);
      }
    }), Et(t, function(i) {
      return i && a.get(i[r]);
    });
  } else {
    var n = ee(e, null);
    return Et(t, function(i) {
      return i && n != null && i[r] === n;
    });
  }
}
function Z0(r, e) {
  return e.hasOwnProperty("subType") ? Et(r, function(t) {
    return t && t.subType === e.subType;
  }) : r;
}
function X0(r) {
  var e = K();
  return r && C(Pt(r.replaceMerge), function(t) {
    ({}).NODE_ENV !== "production" && Q(St.hasClass(t), '"' + t + '" is not valid component main type in "replaceMerge"'), e.set(t, !0);
  }), {
    replaceMergeMainTypeMap: e
  };
}
te(ZD, $g);
const XD = ZD;
var XN = [
  "getDom",
  "getZr",
  "getWidth",
  "getHeight",
  "getDevicePixelRatio",
  "dispatchAction",
  "isSSR",
  "isDisposed",
  "on",
  "off",
  "getDataURL",
  "getConnectedDataURL",
  // 'getModel',
  "getOption",
  // 'getViewOfComponentModel',
  // 'getViewOfSeriesModel',
  "getId",
  "updateLabelLayout"
], qN = (
  /** @class */
  function() {
    function r(e) {
      C(XN, function(t) {
        this[t] = Y(e[t], e);
      }, this);
    }
    return r;
  }()
);
const qD = qN;
var kv = {}, KN = (
  /** @class */
  function() {
    function r() {
      this._coordinateSystems = [];
    }
    return r.prototype.create = function(e, t) {
      var a = [];
      C(kv, function(n, i) {
        var o = n.create(e, t);
        a = a.concat(o || []);
      }), this._coordinateSystems = a;
    }, r.prototype.update = function(e, t) {
      C(this._coordinateSystems, function(a) {
        a.update && a.update(e, t);
      });
    }, r.prototype.getCoordinateSystems = function() {
      return this._coordinateSystems.slice();
    }, r.register = function(e, t) {
      kv[e] = t;
    }, r.get = function(e) {
      return kv[e];
    }, r;
  }()
);
const Po = KN;
var jN = /^(min|max)?(.+)$/, QN = (
  /** @class */
  function() {
    function r(e) {
      this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
    }
    return r.prototype.setOption = function(e, t, a) {
      e && (C(Pt(e.series), function(o) {
        o && o.data && ke(o.data) && rf(o.data);
      }), C(Pt(e.dataset), function(o) {
        o && o.source && ke(o.source) && rf(o.source);
      })), e = rt(e);
      var n = this._optionBackup, i = JN(e, t, !n);
      this._newBaseOption = i.baseOption, n ? (i.timelineOptions.length && (n.timelineOptions = i.timelineOptions), i.mediaList.length && (n.mediaList = i.mediaList), i.mediaDefault && (n.mediaDefault = i.mediaDefault)) : this._optionBackup = i;
    }, r.prototype.mountOption = function(e) {
      var t = this._optionBackup;
      return this._timelineOptions = t.timelineOptions, this._mediaList = t.mediaList, this._mediaDefault = t.mediaDefault, this._currentMediaIndices = [], rt(e ? t.baseOption : this._newBaseOption);
    }, r.prototype.getTimelineOption = function(e) {
      var t, a = this._timelineOptions;
      if (a.length) {
        var n = e.getComponent("timeline");
        n && (t = rt(
          // FIXME:TS as TimelineModel or quivlant interface
          a[n.getCurrentIndex()]
        ));
      }
      return t;
    }, r.prototype.getMediaOption = function(e) {
      var t = this._api.getWidth(), a = this._api.getHeight(), n = this._mediaList, i = this._mediaDefault, o = [], s = [];
      if (!n.length && !i)
        return s;
      for (var l = 0, u = n.length; l < u; l++)
        tO(n[l].query, t, a) && o.push(l);
      return !o.length && i && (o = [-1]), o.length && !rO(o, this._currentMediaIndices) && (s = G(o, function(f) {
        return rt(f === -1 ? i.option : n[f].option);
      })), this._currentMediaIndices = o, s;
    }, r;
  }()
);
function JN(r, e, t) {
  var a = [], n, i, o = r.baseOption, s = r.timeline, l = r.options, u = r.media, f = !!r.media, h = !!(l || s || o && o.timeline);
  o ? (i = o, i.timeline || (i.timeline = s)) : ((h || f) && (r.options = r.media = null), i = r), f && (z(u) ? C(u, function(c) {
    ({}).NODE_ENV !== "production" && c && !c.option && j(c.query) && j(c.query.option) && ve("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), c && c.option && (c.query ? a.push(c) : n || (n = c));
  }) : {}.NODE_ENV !== "production" && ve("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), v(i), C(l, function(c) {
    return v(c);
  }), C(a, function(c) {
    return v(c.option);
  });
  function v(c) {
    C(e, function(p) {
      p(c, t);
    });
  }
  return {
    baseOption: i,
    timelineOptions: l || [],
    mediaDefault: n,
    mediaList: a
  };
}
function tO(r, e, t) {
  var a = {
    width: e,
    height: t,
    aspectratio: e / t
    // lower case for convenience.
  }, n = !0;
  return C(r, function(i, o) {
    var s = o.match(jN);
    if (!(!s || !s[1] || !s[2])) {
      var l = s[1], u = s[2].toLowerCase();
      eO(a[u], i, l) || (n = !1);
    }
  }), n;
}
function eO(r, e, t) {
  return t === "min" ? r >= e : t === "max" ? r <= e : r === e;
}
function rO(r, e) {
  return r.join(",") === e.join(",");
}
const aO = QN;
var Ye = C, qs = j, q0 = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
function Vv(r) {
  var e = r && r.itemStyle;
  if (e)
    for (var t = 0, a = q0.length; t < a; t++) {
      var n = q0[t], i = e.normal, o = e.emphasis;
      i && i[n] && ({}.NODE_ENV !== "production" && Kt("itemStyle.normal." + n, n), r[n] = r[n] || {}, r[n].normal ? ft(r[n].normal, i[n]) : r[n].normal = i[n], i[n] = null), o && o[n] && ({}.NODE_ENV !== "production" && Kt("itemStyle.emphasis." + n, "emphasis." + n), r[n] = r[n] || {}, r[n].emphasis ? ft(r[n].emphasis, o[n]) : r[n].emphasis = o[n], o[n] = null);
    }
}
function _e(r, e, t) {
  if (r && r[e] && (r[e].normal || r[e].emphasis)) {
    var a = r[e].normal, n = r[e].emphasis;
    a && ({}.NODE_ENV !== "production" && Dr("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), t ? (r[e].normal = r[e].emphasis = null, tt(r[e], a)) : r[e] = a), n && ({}.NODE_ENV !== "production" && Dr(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), r.emphasis = r.emphasis || {}, r.emphasis[e] = n, n.focus && (r.emphasis.focus = n.focus), n.blurScope && (r.emphasis.blurScope = n.blurScope));
  }
}
function _s(r) {
  _e(r, "itemStyle"), _e(r, "lineStyle"), _e(r, "areaStyle"), _e(r, "label"), _e(r, "labelLine"), _e(r, "upperLabel"), _e(r, "edgeLabel");
}
function qt(r, e) {
  var t = qs(r) && r[e], a = qs(t) && t.textStyle;
  if (a) {
    ({}).NODE_ENV !== "production" && Dr("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
    for (var n = 0, i = jm.length; n < i; n++) {
      var o = jm[n];
      a.hasOwnProperty(o) && (t[o] = a[o]);
    }
  }
}
function Je(r) {
  r && (_s(r), qt(r, "label"), r.emphasis && qt(r.emphasis, "label"));
}
function nO(r) {
  if (qs(r)) {
    Vv(r), _s(r), qt(r, "label"), qt(r, "upperLabel"), qt(r, "edgeLabel"), r.emphasis && (qt(r.emphasis, "label"), qt(r.emphasis, "upperLabel"), qt(r.emphasis, "edgeLabel"));
    var e = r.markPoint;
    e && (Vv(e), Je(e));
    var t = r.markLine;
    t && (Vv(t), Je(t));
    var a = r.markArea;
    a && Je(a);
    var n = r.data;
    if (r.type === "graph") {
      n = n || r.nodes;
      var i = r.links || r.edges;
      if (i && !ke(i))
        for (var o = 0; o < i.length; o++)
          Je(i[o]);
      C(r.categories, function(u) {
        _s(u);
      });
    }
    if (n && !ke(n))
      for (var o = 0; o < n.length; o++)
        Je(n[o]);
    if (e = r.markPoint, e && e.data)
      for (var s = e.data, o = 0; o < s.length; o++)
        Je(s[o]);
    if (t = r.markLine, t && t.data)
      for (var l = t.data, o = 0; o < l.length; o++)
        z(l[o]) ? (Je(l[o][0]), Je(l[o][1])) : Je(l[o]);
    r.type === "gauge" ? (qt(r, "axisLabel"), qt(r, "title"), qt(r, "detail")) : r.type === "treemap" ? (_e(r.breadcrumb, "itemStyle"), C(r.levels, function(u) {
      _s(u);
    })) : r.type === "tree" && _s(r.leaves);
  }
}
function ta(r) {
  return z(r) ? r : r ? [r] : [];
}
function K0(r) {
  return (z(r) ? r[0] : r) || {};
}
function iO(r, e) {
  Ye(ta(r.series), function(a) {
    qs(a) && nO(a);
  });
  var t = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  e && t.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Ye(t, function(a) {
    Ye(ta(r[a]), function(n) {
      n && (qt(n, "axisLabel"), qt(n.axisPointer, "label"));
    });
  }), Ye(ta(r.parallel), function(a) {
    var n = a && a.parallelAxisDefault;
    qt(n, "axisLabel"), qt(n && n.axisPointer, "label");
  }), Ye(ta(r.calendar), function(a) {
    _e(a, "itemStyle"), qt(a, "dayLabel"), qt(a, "monthLabel"), qt(a, "yearLabel");
  }), Ye(ta(r.radar), function(a) {
    qt(a, "name"), a.name && a.axisName == null && (a.axisName = a.name, delete a.name, {}.NODE_ENV !== "production" && Dr("name property in radar component has been changed to axisName")), a.nameGap != null && a.axisNameGap == null && (a.axisNameGap = a.nameGap, delete a.nameGap, {}.NODE_ENV !== "production" && Dr("nameGap property in radar component has been changed to axisNameGap")), {}.NODE_ENV !== "production" && Ye(a.indicator, function(n) {
      n.text && Kt("text", "name", "radar.indicator");
    });
  }), Ye(ta(r.geo), function(a) {
    qs(a) && (Je(a), Ye(ta(a.regions), function(n) {
      Je(n);
    }));
  }), Ye(ta(r.timeline), function(a) {
    Je(a), _e(a, "label"), _e(a, "itemStyle"), _e(a, "controlStyle", !0);
    var n = a.data;
    z(n) && C(n, function(i) {
      j(i) && (_e(i, "label"), _e(i, "itemStyle"));
    });
  }), Ye(ta(r.toolbox), function(a) {
    _e(a, "iconStyle"), Ye(a.feature, function(n) {
      _e(n, "iconStyle");
    });
  }), qt(K0(r.axisPointer), "label"), qt(K0(r.tooltip).axisPointer, "label");
}
function oO(r, e) {
  for (var t = e.split(","), a = r, n = 0; n < t.length && (a = a && a[t[n]], a != null); n++)
    ;
  return a;
}
function sO(r, e, t, a) {
  for (var n = e.split(","), i = r, o, s = 0; s < n.length - 1; s++)
    o = n[s], i[o] == null && (i[o] = {}), i = i[o];
  (a || i[n[s]] == null) && (i[n[s]] = t);
}
function j0(r) {
  r && C(lO, function(e) {
    e[0] in r && !(e[1] in r) && (r[e[1]] = r[e[0]]);
  });
}
var lO = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], uO = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], Bv = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
function Yo(r) {
  var e = r && r.itemStyle;
  if (e)
    for (var t = 0; t < Bv.length; t++) {
      var a = Bv[t][1], n = Bv[t][0];
      e[a] != null && (e[n] = e[a], {}.NODE_ENV !== "production" && Kt(a, n));
    }
}
function Q0(r) {
  r && r.alignTo === "edge" && r.margin != null && r.edgeDistance == null && ({}.NODE_ENV !== "production" && Kt("label.margin", "label.edgeDistance", "pie"), r.edgeDistance = r.margin);
}
function J0(r) {
  r && r.downplay && !r.blur && (r.blur = r.downplay, {}.NODE_ENV !== "production" && Kt("downplay", "blur", "sunburst"));
}
function fO(r) {
  r && r.focusNodeAdjacency != null && (r.emphasis = r.emphasis || {}, r.emphasis.focus == null && ({}.NODE_ENV !== "production" && Kt("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), r.emphasis.focus = "adjacency"));
}
function KD(r, e) {
  if (r)
    for (var t = 0; t < r.length; t++)
      e(r[t]), r[t] && KD(r[t].children, e);
}
function jD(r, e) {
  iO(r, e), r.series = Pt(r.series), C(r.series, function(t) {
    if (j(t)) {
      var a = t.type;
      if (a === "line")
        t.clipOverflow != null && (t.clip = t.clipOverflow, {}.NODE_ENV !== "production" && Kt("clipOverflow", "clip", "line"));
      else if (a === "pie" || a === "gauge") {
        t.clockWise != null && (t.clockwise = t.clockWise, {}.NODE_ENV !== "production" && Kt("clockWise", "clockwise")), Q0(t.label);
        var n = t.data;
        if (n && !ke(n))
          for (var i = 0; i < n.length; i++)
            Q0(n[i]);
        t.hoverOffset != null && (t.emphasis = t.emphasis || {}, (t.emphasis.scaleSize = null) && ({}.NODE_ENV !== "production" && Kt("hoverOffset", "emphasis.scaleSize"), t.emphasis.scaleSize = t.hoverOffset));
      } else if (a === "gauge") {
        var o = oO(t, "pointer.color");
        o != null && sO(t, "itemStyle.color", o);
      } else if (a === "bar") {
        Yo(t), Yo(t.backgroundStyle), Yo(t.emphasis);
        var n = t.data;
        if (n && !ke(n))
          for (var i = 0; i < n.length; i++)
            typeof n[i] == "object" && (Yo(n[i]), Yo(n[i] && n[i].emphasis));
      } else if (a === "sunburst") {
        var s = t.highlightPolicy;
        s && (t.emphasis = t.emphasis || {}, t.emphasis.focus || (t.emphasis.focus = s, {}.NODE_ENV !== "production" && Kt("highlightPolicy", "emphasis.focus", "sunburst"))), J0(t), KD(t.data, J0);
      } else
        a === "graph" || a === "sankey" ? fO(t) : a === "map" && (t.mapType && !t.map && ({}.NODE_ENV !== "production" && Kt("mapType", "map", "map"), t.map = t.mapType), t.mapLocation && ({}.NODE_ENV !== "production" && Dr("`mapLocation` is not used anymore."), tt(t, t.mapLocation)));
      t.hoverAnimation != null && (t.emphasis = t.emphasis || {}, t.emphasis && t.emphasis.scale == null && ({}.NODE_ENV !== "production" && Kt("hoverAnimation", "emphasis.scale"), t.emphasis.scale = t.hoverAnimation)), j0(t);
    }
  }), r.dataRange && (r.visualMap = r.dataRange), C(uO, function(t) {
    var a = r[t];
    a && (z(a) || (a = [a]), C(a, function(n) {
      j0(n);
    }));
  });
}
function hO(r) {
  var e = K();
  r.eachSeries(function(t) {
    var a = t.get("stack");
    if (a) {
      var n = e.get(a) || e.set(a, []), i = t.getData(), o = {
        // Used for calculate axis extent automatically.
        // TODO: Type getCalculationInfo return more specific type?
        stackResultDimension: i.getCalculationInfo("stackResultDimension"),
        stackedOverDimension: i.getCalculationInfo("stackedOverDimension"),
        stackedDimension: i.getCalculationInfo("stackedDimension"),
        stackedByDimension: i.getCalculationInfo("stackedByDimension"),
        isStackedByIndex: i.getCalculationInfo("isStackedByIndex"),
        data: i,
        seriesModel: t
      };
      if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
        return;
      n.length && i.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(o);
    }
  }), e.each(vO);
}
function vO(r) {
  C(r, function(e, t) {
    var a = [], n = [NaN, NaN], i = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
    o.modify(i, function(u, f, h) {
      var v = o.get(e.stackedDimension, h);
      if (isNaN(v))
        return n;
      var c, p;
      s ? p = o.getRawIndex(h) : c = o.get(e.stackedByDimension, h);
      for (var d = NaN, g = t - 1; g >= 0; g--) {
        var y = r[g];
        if (s || (p = y.data.rawIndexOf(y.stackedByDimension, c)), p >= 0) {
          var m = y.data.getByRawIndex(y.stackResultDimension, p);
          if (l === "all" || l === "positive" && m > 0 || l === "negative" && m < 0 || l === "samesign" && v >= 0 && m > 0 || l === "samesign" && v <= 0 && m < 0) {
            v = $E(v, m), d = m;
            break;
          }
        }
      }
      return a[0] = v, a[1] = d, a;
    });
  });
}
var Ih = (
  /** @class */
  function() {
    function r(e) {
      this.data = e.data || (e.sourceFormat === Kr ? {} : []), this.sourceFormat = e.sourceFormat || FD, this.seriesLayoutBy = e.seriesLayoutBy || Wr, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
      var t = this.dimensionsDefine = e.dimensionsDefine;
      if (t)
        for (var a = 0; a < t.length; a++) {
          var n = t[a];
          n.type == null && $D(this, a) === ue.Must && (n.type = "ordinal");
        }
    }
    return r;
  }()
);
function Ug(r) {
  return r instanceof Ih;
}
function id(r, e, t) {
  t = t || QD(r);
  var a = e.seriesLayoutBy, n = pO(r, t, a, e.sourceHeader, e.dimensions), i = new Ih({
    data: r,
    sourceFormat: t,
    seriesLayoutBy: a,
    dimensionsDefine: n.dimensionsDefine,
    startIndex: n.startIndex,
    dimensionsDetectedCount: n.dimensionsDetectedCount,
    metaRawOption: rt(e)
  });
  return i;
}
function Yg(r) {
  return new Ih({
    data: r,
    sourceFormat: ke(r) ? fa : hr
  });
}
function cO(r) {
  return new Ih({
    data: r.data,
    sourceFormat: r.sourceFormat,
    seriesLayoutBy: r.seriesLayoutBy,
    dimensionsDefine: rt(r.dimensionsDefine),
    startIndex: r.startIndex,
    dimensionsDetectedCount: r.dimensionsDetectedCount
  });
}
function QD(r) {
  var e = FD;
  if (ke(r))
    e = fa;
  else if (z(r)) {
    r.length === 0 && (e = xe);
    for (var t = 0, a = r.length; t < a; t++) {
      var n = r[t];
      if (n != null) {
        if (z(n)) {
          e = xe;
          break;
        } else if (j(n)) {
          e = vr;
          break;
        }
      }
    }
  } else if (j(r)) {
    for (var i in r)
      if (U(r, i) && Se(r[i])) {
        e = Kr;
        break;
      }
  }
  return e;
}
function pO(r, e, t, a, n) {
  var i, o;
  if (!r)
    return {
      dimensionsDefine: t_(n),
      startIndex: o,
      dimensionsDetectedCount: i
    };
  if (e === xe) {
    var s = r;
    a === "auto" || a == null ? e_(function(u) {
      u != null && u !== "-" && ($(u) ? o == null && (o = 1) : o = 0);
    }, t, s, 10) : o = Ct(a) ? a : a ? 1 : 0, !n && o === 1 && (n = [], e_(function(u, f) {
      n[f] = u != null ? u + "" : "";
    }, t, s, 1 / 0)), i = n ? n.length : t === Eo ? s.length : s[0] ? s[0].length : null;
  } else if (e === vr)
    n || (n = dO(r));
  else if (e === Kr)
    n || (n = [], C(r, function(u, f) {
      n.push(f);
    }));
  else if (e === hr) {
    var l = wo(r[0]);
    i = z(l) && l.length || 1;
  } else
    e === fa && {}.NODE_ENV !== "production" && Q(!!n, "dimensions must be given if data is TypedArray.");
  return {
    startIndex: o,
    dimensionsDefine: t_(n),
    dimensionsDetectedCount: i
  };
}
function dO(r) {
  for (var e = 0, t; e < r.length && !(t = r[e++]); )
    ;
  if (t)
    return _t(t);
}
function t_(r) {
  if (r) {
    var e = K();
    return G(r, function(t, a) {
      t = j(t) ? t : {
        name: t
      };
      var n = {
        name: t.name,
        displayName: t.displayName,
        type: t.type
      };
      if (n.name == null)
        return n;
      n.name += "", n.displayName == null && (n.displayName = n.name);
      var i = e.get(n.name);
      return i ? n.name += "-" + i.count++ : e.set(n.name, {
        count: 1
      }), n;
    });
  }
}
function e_(r, e, t, a) {
  if (e === Eo)
    for (var n = 0; n < t.length && n < a; n++)
      r(t[n] ? t[n][0] : null, n);
  else
    for (var i = t[0] || [], n = 0; n < i.length && n < a; n++)
      r(i[n], n);
}
function JD(r) {
  var e = r.sourceFormat;
  return e === vr || e === Kr;
}
var Dn, Cn, An, r_, a_, tC = (
  /** @class */
  function() {
    function r(e, t) {
      var a = Ug(e) ? e : Yg(e);
      this._source = a;
      var n = this._data = a.data;
      if (a.sourceFormat === fa) {
        if ({}.NODE_ENV !== "production" && t == null)
          throw new Error("Typed array data must specify dimension size");
        this._offset = 0, this._dimSize = t, this._data = n;
      }
      a_(this, n, a);
    }
    return r.prototype.getSource = function() {
      return this._source;
    }, r.prototype.count = function() {
      return 0;
    }, r.prototype.getItem = function(e, t) {
    }, r.prototype.appendData = function(e) {
    }, r.prototype.clean = function() {
    }, r.protoInitialize = function() {
      var e = r.prototype;
      e.pure = !1, e.persistent = !0;
    }(), r.internalField = function() {
      var e;
      a_ = function(o, s, l) {
        var u = l.sourceFormat, f = l.seriesLayoutBy, h = l.startIndex, v = l.dimensionsDefine, c = r_[Zg(u, f)];
        if ({}.NODE_ENV !== "production" && Q(c, "Invalide sourceFormat: " + u), V(o, c), u === fa)
          o.getItem = t, o.count = n, o.fillStorage = a;
        else {
          var p = eC(u, f);
          o.getItem = Y(p, null, s, h, v);
          var d = rC(u, f);
          o.count = Y(d, null, s, h, v);
        }
      };
      var t = function(o, s) {
        o = o - this._offset, s = s || [];
        for (var l = this._data, u = this._dimSize, f = u * o, h = 0; h < u; h++)
          s[h] = l[f + h];
        return s;
      }, a = function(o, s, l, u) {
        for (var f = this._data, h = this._dimSize, v = 0; v < h; v++) {
          for (var c = u[v], p = c[0] == null ? 1 / 0 : c[0], d = c[1] == null ? -1 / 0 : c[1], g = s - o, y = l[v], m = 0; m < g; m++) {
            var _ = f[m * h + v];
            y[o + m] = _, _ < p && (p = _), _ > d && (d = _);
          }
          c[0] = p, c[1] = d;
        }
      }, n = function() {
        return this._data ? this._data.length / this._dimSize : 0;
      };
      r_ = (e = {}, e[xe + "_" + Wr] = {
        pure: !0,
        appendData: i
      }, e[xe + "_" + Eo] = {
        pure: !0,
        appendData: function() {
          throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
        }
      }, e[vr] = {
        pure: !0,
        appendData: i
      }, e[Kr] = {
        pure: !0,
        appendData: function(o) {
          var s = this._data;
          C(o, function(l, u) {
            for (var f = s[u] || (s[u] = []), h = 0; h < (l || []).length; h++)
              f.push(l[h]);
          });
        }
      }, e[hr] = {
        appendData: i
      }, e[fa] = {
        persistent: !1,
        pure: !0,
        appendData: function(o) {
          ({}).NODE_ENV !== "production" && Q(ke(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 i(o) {
        for (var s = 0; s < o.length; s++)
          this._data.push(o[s]);
      }
    }(), r;
  }()
), n_ = function(r, e, t, a) {
  return r[a];
}, gO = (Dn = {}, Dn[xe + "_" + Wr] = function(r, e, t, a) {
  return r[a + e];
}, Dn[xe + "_" + Eo] = function(r, e, t, a, n) {
  a += e;
  for (var i = n || [], o = r, s = 0; s < o.length; s++) {
    var l = o[s];
    i[s] = l ? l[a] : null;
  }
  return i;
}, Dn[vr] = n_, Dn[Kr] = function(r, e, t, a, n) {
  for (var i = n || [], o = 0; o < t.length; o++) {
    var s = t[o].name;
    if ({}.NODE_ENV !== "production" && s == null)
      throw new Error();
    var l = r[s];
    i[o] = l ? l[a] : null;
  }
  return i;
}, Dn[hr] = n_, Dn);
function eC(r, e) {
  var t = gO[Zg(r, e)];
  return {}.NODE_ENV !== "production" && Q(t, 'Do not support get item on "' + r + '", "' + e + '".'), t;
}
var i_ = function(r, e, t) {
  return r.length;
}, yO = (Cn = {}, Cn[xe + "_" + Wr] = function(r, e, t) {
  return Math.max(0, r.length - e);
}, Cn[xe + "_" + Eo] = function(r, e, t) {
  var a = r[0];
  return a ? Math.max(0, a.length - e) : 0;
}, Cn[vr] = i_, Cn[Kr] = function(r, e, t) {
  var a = t[0].name;
  if ({}.NODE_ENV !== "production" && a == null)
    throw new Error();
  var n = r[a];
  return n ? n.length : 0;
}, Cn[hr] = i_, Cn);
function rC(r, e) {
  var t = yO[Zg(r, e)];
  return {}.NODE_ENV !== "production" && Q(t, 'Do not support count on "' + r + '", "' + e + '".'), t;
}
var zv = function(r, e, t) {
  return r[e];
}, mO = (An = {}, An[xe] = zv, An[vr] = function(r, e, t) {
  return r[t];
}, An[Kr] = zv, An[hr] = function(r, e, t) {
  var a = wo(r);
  return a instanceof Array ? a[e] : a;
}, An[fa] = zv, An);
function aC(r) {
  var e = mO[r];
  return {}.NODE_ENV !== "production" && Q(e, 'Do not support get value on "' + r + '".'), e;
}
function Zg(r, e) {
  return r === xe ? r + "_" + e : r;
}
function fo(r, e, t) {
  if (r) {
    var a = r.getRawDataItem(e);
    if (a != null) {
      var n = r.getStore(), i = n.getSource().sourceFormat;
      if (t != null) {
        var o = r.getDimensionIndex(t), s = n.getDimensionProperty(o);
        return aC(i)(a, o, s);
      } else {
        var l = a;
        return i === hr && (l = wo(a)), l;
      }
    }
  }
}
var _O = /\{@(.+?)\}/g, Xg = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getDataParams = function(e, t) {
      var a = this.getData(t), n = this.getRawValue(e, t), i = a.getRawIndex(e), o = a.getName(e), s = a.getRawDataItem(e), l = a.getItemVisual(e, "style"), u = l && l[a.getItemVisual(e, "drawType") || "fill"], f = l && l.stroke, h = this.mainType, v = h === "series", c = a.userOutput && a.userOutput.get();
      return {
        componentType: h,
        componentSubType: this.subType,
        componentIndex: this.componentIndex,
        seriesType: v ? this.subType : null,
        seriesIndex: this.seriesIndex,
        seriesId: v ? this.id : null,
        seriesName: v ? this.name : null,
        name: o,
        dataIndex: i,
        data: s,
        dataType: t,
        value: n,
        color: u,
        borderColor: f,
        dimensionNames: c ? c.fullDimensions : null,
        encode: c ? c.encode : null,
        // Param name list for mapping `a`, `b`, `c`, `d`, `e`
        $vars: ["seriesName", "name", "value"]
      };
    }, r.prototype.getFormattedLabel = function(e, t, a, n, i, o) {
      t = t || "normal";
      var s = this.getData(a), l = this.getDataParams(e, a);
      if (o && (l.value = o.interpolatedValue), n != null && z(l.value) && (l.value = l.value[n]), !i) {
        var u = s.getItemModel(e);
        i = u.get(t === "normal" ? ["label", "formatter"] : [t, "label", "formatter"]);
      }
      if (q(i))
        return l.status = t, l.dimensionIndex = n, i(l);
      if ($(i)) {
        var f = VD(i, l);
        return f.replace(_O, function(h, v) {
          var c = v.length, p = v;
          p.charAt(0) === "[" && p.charAt(c - 1) === "]" && (p = +p.slice(1, c - 1), {}.NODE_ENV !== "production" && isNaN(p) && ve("Invalide label formatter: @" + v + ", only support @[0], @[1], @[2], ..."));
          var d = fo(s, e, p);
          if (o && z(o.interpolatedValue)) {
            var g = s.getDimensionIndex(p);
            g >= 0 && (d = o.interpolatedValue[g]);
          }
          return d != null ? d + "" : "";
        });
      }
    }, r.prototype.getRawValue = function(e, t) {
      return fo(this.getData(t), e);
    }, r.prototype.formatTooltip = function(e, t, a) {
    }, r;
  }()
);
function o_(r) {
  var e, t;
  return j(r) ? r.type ? t = r : {}.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + Ae(r)) : e = r, {
    text: e,
    // markers: markers || markersExisting,
    frag: t
  };
}
function Ns(r) {
  return new SO(r);
}
var SO = (
  /** @class */
  function() {
    function r(e) {
      e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
    }
    return r.prototype.perform = function(e) {
      var t = this._upstream, a = e && e.skip;
      if (this._dirty && t) {
        var n = this.context;
        n.data = n.outputData = t.context.outputData;
      }
      this.__pipeline && (this.__pipeline.currentTask = this);
      var i;
      this._plan && !a && (i = this._plan(this.context));
      var o = f(this._modBy), s = this._modDataCount || 0, l = f(e && e.modBy), u = e && e.modDataCount || 0;
      (o !== l || s !== u) && (i = "reset");
      function f(m) {
        return !(m >= 1) && (m = 1), m;
      }
      var h;
      (this._dirty || i === "reset") && (this._dirty = !1, h = this._doReset(a)), this._modBy = l, this._modDataCount = u;
      var v = e && e.step;
      if (t ? ({}.NODE_ENV !== "production" && Q(t._outputDueEnd != null), this._dueEnd = t._outputDueEnd) : ({}.NODE_ENV !== "production" && Q(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
        var c = this._dueIndex, p = Math.min(v != null ? this._dueIndex + v : 1 / 0, this._dueEnd);
        if (!a && (h || c < p)) {
          var d = this._progress;
          if (z(d))
            for (var g = 0; g < d.length; g++)
              this._doProgress(d[g], c, p, l, u);
          else
            this._doProgress(d, c, p, l, u);
        }
        this._dueIndex = p;
        var y = this._settedOutputEnd != null ? this._settedOutputEnd : p;
        ({}).NODE_ENV !== "production" && Q(y >= this._outputDueEnd), this._outputDueEnd = y;
      } else
        this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
      return this.unfinished();
    }, r.prototype.dirty = function() {
      this._dirty = !0, this._onDirty && this._onDirty(this.context);
    }, r.prototype._doProgress = function(e, t, a, n, i) {
      s_.reset(t, a, n, i), this._callingProgress = e, this._callingProgress({
        start: t,
        end: a,
        count: a - t,
        next: s_.next
      }, this.context);
    }, r.prototype._doReset = function(e) {
      this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
      var t, a;
      !e && this._reset && (t = this._reset(this.context), t && t.progress && (a = t.forceFirstProgress, t = t.progress), z(t) && !t.length && (t = null)), this._progress = t, this._modBy = this._modDataCount = null;
      var n = this._downstream;
      return n && n.dirty(), a;
    }, r.prototype.unfinished = function() {
      return this._progress && this._dueIndex < this._dueEnd;
    }, r.prototype.pipe = function(e) {
      ({}).NODE_ENV !== "production" && Q(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
    }, r.prototype.dispose = function() {
      this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
    }, r.prototype.getUpstream = function() {
      return this._upstream;
    }, r.prototype.getDownstream = function() {
      return this._downstream;
    }, r.prototype.setOutputEnd = function(e) {
      this._outputDueEnd = this._settedOutputEnd = e;
    }, r;
  }()
), s_ = function() {
  var r, e, t, a, n, i = {
    reset: function(l, u, f, h) {
      e = l, r = u, t = f, a = h, n = Math.ceil(a / t), i.next = t > 1 && a > 0 ? s : o;
    }
  };
  return i;
  function o() {
    return e < r ? e++ : null;
  }
  function s() {
    var l = e % n * t + Math.ceil(e / n), u = e >= r ? null : l < a ? l : e;
    return e++, u;
  }
}();
function Ya(r, e) {
  var t = e && e.type;
  return t === "ordinal" ? r : (t === "time" && !Ct(r) && r != null && r !== "-" && (r = +Zr(r)), r == null || r === "" ? NaN : +r);
}
var xO = K({
  number: function(r) {
    return parseFloat(r);
  },
  time: function(r) {
    return +Zr(r);
  },
  trim: function(r) {
    return $(r) ? mr(r) : r;
  }
});
function nC(r) {
  return xO.get(r);
}
var iC = {
  lt: function(r, e) {
    return r < e;
  },
  lte: function(r, e) {
    return r <= e;
  },
  gt: function(r, e) {
    return r > e;
  },
  gte: function(r, e) {
    return r >= e;
  }
}, wO = (
  /** @class */
  function() {
    function r(e, t) {
      if (!Ct(t)) {
        var a = "";
        ({}).NODE_ENV !== "production" && (a = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), It(a);
      }
      this._opFn = iC[e], this._rvalFloat = pa(t);
    }
    return r.prototype.evaluate = function(e) {
      return Ct(e) ? this._opFn(e, this._rvalFloat) : this._opFn(pa(e), this._rvalFloat);
    }, r;
  }()
), oC = (
  /** @class */
  function() {
    function r(e, t) {
      var a = e === "desc";
      this._resultLT = a ? 1 : -1, t == null && (t = a ? "min" : "max"), this._incomparable = t === "min" ? -1 / 0 : 1 / 0;
    }
    return r.prototype.evaluate = function(e, t) {
      var a = Ct(e) ? e : pa(e), n = Ct(t) ? t : pa(t), i = isNaN(a), o = isNaN(n);
      if (i && (a = this._incomparable), o && (n = this._incomparable), i && o) {
        var s = $(e), l = $(t);
        s && (a = l ? e : 0), l && (n = s ? t : 0);
      }
      return a < n ? this._resultLT : a > n ? -this._resultLT : 0;
    }, r;
  }()
), bO = (
  /** @class */
  function() {
    function r(e, t) {
      this._rval = t, this._isEQ = e, this._rvalTypeof = typeof t, this._rvalFloat = pa(t);
    }
    return r.prototype.evaluate = function(e) {
      var t = e === this._rval;
      if (!t) {
        var a = typeof e;
        a !== this._rvalTypeof && (a === "number" || this._rvalTypeof === "number") && (t = pa(e) === this._rvalFloat);
      }
      return this._isEQ ? t : !t;
    }, r;
  }()
);
function TO(r, e) {
  return r === "eq" || r === "ne" ? new bO(r === "eq", e) : U(iC, r) ? new wO(r, e) : null;
}
var DO = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getRawData = function() {
      throw new Error("not supported");
    }, r.prototype.getRawDataItem = function(e) {
      throw new Error("not supported");
    }, r.prototype.cloneRawData = function() {
    }, r.prototype.getDimensionInfo = function(e) {
    }, r.prototype.cloneAllDimensionInfo = function() {
    }, r.prototype.count = function() {
    }, r.prototype.retrieveValue = function(e, t) {
    }, r.prototype.retrieveValueFromItem = function(e, t) {
    }, r.prototype.convertValue = function(e, t) {
      return Ya(e, t);
    }, r;
  }()
);
function CO(r, e) {
  var t = new DO(), a = r.data, n = t.sourceFormat = r.sourceFormat, i = r.startIndex, o = "";
  r.seriesLayoutBy !== Wr && ({}.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), It(o));
  var s = [], l = {}, u = r.dimensionsDefine;
  if (u)
    C(u, function(d, g) {
      var y = d.name, m = {
        index: g,
        name: y,
        displayName: d.displayName
      };
      if (s.push(m), y != null) {
        var _ = "";
        U(l, y) && ({}.NODE_ENV !== "production" && (_ = 'dimension name "' + y + '" duplicated.'), It(_)), l[y] = m;
      }
    });
  else
    for (var f = 0; f < r.dimensionsDetectedCount; f++)
      s.push({
        index: f
      });
  var h = eC(n, Wr);
  e.__isBuiltIn && (t.getRawDataItem = function(d) {
    return h(a, i, s, d);
  }, t.getRawData = Y(AO, null, r)), t.cloneRawData = Y(MO, null, r);
  var v = rC(n, Wr);
  t.count = Y(v, null, a, i, s);
  var c = aC(n);
  t.retrieveValue = function(d, g) {
    var y = h(a, i, s, d);
    return p(y, g);
  };
  var p = t.retrieveValueFromItem = function(d, g) {
    if (d != null) {
      var y = s[g];
      if (y)
        return c(d, g, y.name);
    }
  };
  return t.getDimensionInfo = Y(IO, null, s, l), t.cloneAllDimensionInfo = Y(LO, null, s), t;
}
function AO(r) {
  var e = r.sourceFormat;
  if (!qg(e)) {
    var t = "";
    ({}).NODE_ENV !== "production" && (t = "`getRawData` is not supported in source format " + e), It(t);
  }
  return r.data;
}
function MO(r) {
  var e = r.sourceFormat, t = r.data;
  if (!qg(e)) {
    var a = "";
    ({}).NODE_ENV !== "production" && (a = "`cloneRawData` is not supported in source format " + e), It(a);
  }
  if (e === xe) {
    for (var n = [], i = 0, o = t.length; i < o; i++)
      n.push(t[i].slice());
    return n;
  } else if (e === vr) {
    for (var n = [], i = 0, o = t.length; i < o; i++)
      n.push(V({}, t[i]));
    return n;
  }
}
function IO(r, e, t) {
  if (t != null) {
    if (Ct(t) || !isNaN(t) && !U(e, t))
      return r[t];
    if (U(e, t))
      return e[t];
  }
}
function LO(r) {
  return rt(r);
}
var sC = K();
function EO(r) {
  r = rt(r);
  var e = r.type, t = "";
  e || ({}.NODE_ENV !== "production" && (t = "Must have a `type` when `registerTransform`."), It(t));
  var a = e.split(":");
  a.length !== 2 && ({}.NODE_ENV !== "production" && (t = 'Name must include namespace like "ns:regression".'), It(t));
  var n = !1;
  a[0] === "echarts" && (e = a[1], n = !0), r.__isBuiltIn = n, sC.set(e, r);
}
function PO(r, e, t) {
  var a = Pt(r), n = a.length, i = "";
  n || ({}.NODE_ENV !== "production" && (i = "If `transform` declared, it should at least contain one transform."), It(i));
  for (var o = 0, s = n; o < s; o++) {
    var l = a[o];
    e = RO(l, e, t, n === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  }
  return e;
}
function RO(r, e, t, a) {
  var n = "";
  e.length || ({}.NODE_ENV !== "production" && (n = "Must have at least one upstream dataset."), It(n)), j(r) || ({}.NODE_ENV !== "production" && (n = "transform declaration must be an object rather than " + typeof r + "."), It(n));
  var i = r.type, o = sC.get(i);
  o || ({}.NODE_ENV !== "production" && (n = 'Can not find transform on type "' + i + '".'), It(n));
  var s = G(e, function(f) {
    return CO(f, o);
  }), l = Pt(o.transform({
    upstream: s[0],
    upstreamList: s,
    config: rt(r.config)
  }));
  if ({}.NODE_ENV !== "production" && r.print) {
    var u = G(l, function(f) {
      var h = a != null ? " === pipe index: " + a : "";
      return ["=== dataset index: " + t.datasetIndex + h + " ===", "- transform result data:", Ae(f.data), "- transform result dimensions:", Ae(f.dimensions)].join(`
`);
    }).join(`
`);
    qE(u);
  }
  return G(l, function(f, h) {
    var v = "";
    j(f) || ({}.NODE_ENV !== "production" && (v = "A transform should not return some empty results."), It(v)), f.data || ({}.NODE_ENV !== "production" && (v = "Transform result data should be not be null or undefined"), It(v));
    var c = QD(f.data);
    qg(c) || ({}.NODE_ENV !== "production" && (v = "Transform result data should be array rows or object rows."), It(v));
    var p, d = e[0];
    if (d && h === 0 && !f.dimensions) {
      var g = d.startIndex;
      g && (f.data = d.data.slice(0, g).concat(f.data)), p = {
        seriesLayoutBy: Wr,
        sourceHeader: g,
        dimensions: d.metaRawOption.dimensions
      };
    } else
      p = {
        seriesLayoutBy: Wr,
        sourceHeader: 0,
        dimensions: f.dimensions
      };
    return id(f.data, p, null);
  });
}
function qg(r) {
  return r === xe || r === vr;
}
var Lh = "undefined", NO = typeof Uint32Array === Lh ? Array : Uint32Array, OO = typeof Uint16Array === Lh ? Array : Uint16Array, lC = typeof Int32Array === Lh ? Array : Int32Array, l_ = typeof Float64Array === Lh ? Array : Float64Array, uC = {
  float: l_,
  int: lC,
  // Ordinal data type can be string or int
  ordinal: Array,
  number: Array,
  time: l_
}, Gv;
function Zo(r) {
  return r > 65535 ? NO : OO;
}
function Ei() {
  return [1 / 0, -1 / 0];
}
function kO(r) {
  var e = r.constructor;
  return e === Array ? r.slice() : new e(r);
}
function u_(r, e, t, a, n) {
  var i = uC[t || "float"];
  if (n) {
    var o = r[e], s = o && o.length;
    if (s !== a) {
      for (var l = new i(a), u = 0; u < s; u++)
        l[u] = o[u];
      r[e] = l;
    }
  } else
    r[e] = new i(a);
}
var od = (
  /** @class */
  function() {
    function r() {
      this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = K();
    }
    return r.prototype.initData = function(e, t, a) {
      ({}).NODE_ENV !== "production" && Q(q(e.getItem) && q(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
      var n = e.getSource(), i = this.defaultDimValueGetter = Gv[n.sourceFormat];
      this._dimValueGetter = a || i, this._rawExtent = [];
      var o = JD(n);
      this._dimensions = G(t, function(s) {
        return {}.NODE_ENV !== "production" && o && Q(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());
    }, r.prototype.getProvider = function() {
      return this._provider;
    }, r.prototype.getSource = function() {
      return this._provider.getSource();
    }, r.prototype.ensureCalculationDimension = function(e, t) {
      var a = this._calcDimNameToIdx, n = this._dimensions, i = a.get(e);
      if (i != null) {
        if (n[i].type === t)
          return i;
      } else
        i = n.length;
      return n[i] = {
        type: t
      }, a.set(e, i), this._chunks[i] = new uC[t || "float"](this._rawCount), this._rawExtent[i] = Ei(), i;
    }, r.prototype.collectOrdinalMeta = function(e, t) {
      var a = this._chunks[e], n = this._dimensions[e], i = this._rawExtent, o = n.ordinalOffset || 0, s = a.length;
      o === 0 && (i[e] = Ei());
      for (var l = i[e], u = o; u < s; u++) {
        var f = a[u] = t.parseAndCollect(a[u]);
        isNaN(f) || (l[0] = Math.min(f, l[0]), l[1] = Math.max(f, l[1]));
      }
      n.ordinalMeta = t, n.ordinalOffset = s, n.type = "ordinal";
    }, r.prototype.getOrdinalMeta = function(e) {
      var t = this._dimensions[e], a = t.ordinalMeta;
      return a;
    }, r.prototype.getDimensionProperty = function(e) {
      var t = this._dimensions[e];
      return t && t.property;
    }, r.prototype.appendData = function(e) {
      ({}).NODE_ENV !== "production" && Q(!this._indices, "appendData can only be called on raw data.");
      var t = this._provider, a = this.count();
      t.appendData(e);
      var n = t.count();
      return t.persistent || (n += a), a < n && this._initDataFromProvider(a, n, !0), [a, n];
    }, r.prototype.appendValues = function(e, t) {
      for (var a = this._chunks, n = this._dimensions, i = n.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, t || 0), u = 0; u < i; u++) {
        var f = n[u];
        u_(a, u, f.type, l, !0);
      }
      for (var h = [], v = s; v < l; v++)
        for (var c = v - s, p = 0; p < i; p++) {
          var f = n[p], d = Gv.arrayRows.call(this, e[c] || h, f.property, c, p);
          a[p][v] = d;
          var g = o[p];
          d < g[0] && (g[0] = d), d > g[1] && (g[1] = d);
        }
      return this._rawCount = this._count = l, {
        start: s,
        end: l
      };
    }, r.prototype._initDataFromProvider = function(e, t, a) {
      for (var n = this._provider, i = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = G(o, function(m) {
        return m.property;
      }), f = 0; f < s; f++) {
        var h = o[f];
        l[f] || (l[f] = Ei()), u_(i, f, h.type, t, a);
      }
      if (n.fillStorage)
        n.fillStorage(e, t, i, l);
      else
        for (var v = [], c = e; c < t; c++) {
          v = n.getItem(c, v);
          for (var p = 0; p < s; p++) {
            var d = i[p], g = this._dimValueGetter(v, u[p], c, p);
            d[c] = g;
            var y = l[p];
            g < y[0] && (y[0] = g), g > y[1] && (y[1] = g);
          }
        }
      !n.persistent && n.clean && n.clean(), this._rawCount = this._count = t, this._extent = [];
    }, r.prototype.count = function() {
      return this._count;
    }, r.prototype.get = function(e, t) {
      if (!(t >= 0 && t < this._count))
        return NaN;
      var a = this._chunks[e];
      return a ? a[this.getRawIndex(t)] : NaN;
    }, r.prototype.getValues = function(e, t) {
      var a = [], n = [];
      if (t == null) {
        t = e, e = [];
        for (var i = 0; i < this._dimensions.length; i++)
          n.push(i);
      } else
        n = e;
      for (var i = 0, o = n.length; i < o; i++)
        a.push(this.get(n[i], t));
      return a;
    }, r.prototype.getByRawIndex = function(e, t) {
      if (!(t >= 0 && t < this._rawCount))
        return NaN;
      var a = this._chunks[e];
      return a ? a[t] : NaN;
    }, r.prototype.getSum = function(e) {
      var t = this._chunks[e], a = 0;
      if (t)
        for (var n = 0, i = this.count(); n < i; n++) {
          var o = this.get(e, n);
          isNaN(o) || (a += o);
        }
      return a;
    }, r.prototype.getMedian = function(e) {
      var t = [];
      this.each([e], function(i) {
        isNaN(i) || t.push(i);
      });
      var a = t.sort(function(i, o) {
        return i - o;
      }), n = this.count();
      return n === 0 ? 0 : n % 2 === 1 ? a[(n - 1) / 2] : (a[n / 2] + a[n / 2 - 1]) / 2;
    }, r.prototype.indexOfRawIndex = function(e) {
      if (e >= this._rawCount || e < 0)
        return -1;
      if (!this._indices)
        return e;
      var t = this._indices, a = t[e];
      if (a != null && a < this._count && a === e)
        return e;
      for (var n = 0, i = this._count - 1; n <= i; ) {
        var o = (n + i) / 2 | 0;
        if (t[o] < e)
          n = o + 1;
        else if (t[o] > e)
          i = o - 1;
        else
          return o;
      }
      return -1;
    }, r.prototype.indicesOfNearest = function(e, t, a) {
      var n = this._chunks, i = n[e], o = [];
      if (!i)
        return o;
      a == null && (a = 1 / 0);
      for (var s = 1 / 0, l = -1, u = 0, f = 0, h = this.count(); f < h; f++) {
        var v = this.getRawIndex(f), c = t - i[v], p = Math.abs(c);
        p <= a && ((p < s || p === s && c >= 0 && l < 0) && (s = p, l = c, u = 0), c === l && (o[u++] = f));
      }
      return o.length = u, o;
    }, r.prototype.getIndices = function() {
      var e, t = this._indices;
      if (t) {
        var a = t.constructor, n = this._count;
        if (a === Array) {
          e = new a(n);
          for (var i = 0; i < n; i++)
            e[i] = t[i];
        } else
          e = new a(t.buffer, 0, n);
      } else {
        var a = Zo(this._rawCount);
        e = new a(this.count());
        for (var i = 0; i < e.length; i++)
          e[i] = i;
      }
      return e;
    }, r.prototype.filter = function(e, t) {
      if (!this._count)
        return this;
      for (var a = this.clone(), n = a.count(), i = Zo(a._rawCount), o = new i(n), s = [], l = e.length, u = 0, f = e[0], h = a._chunks, v = 0; v < n; v++) {
        var c = void 0, p = a.getRawIndex(v);
        if (l === 0)
          c = t(v);
        else if (l === 1) {
          var d = h[f][p];
          c = t(d, v);
        } else {
          for (var g = 0; g < l; g++)
            s[g] = h[e[g]][p];
          s[g] = v, c = t.apply(null, s);
        }
        c && (o[u++] = p);
      }
      return u < n && (a._indices = o), a._count = u, a._extent = [], a._updateGetRawIdx(), a;
    }, r.prototype.selectRange = function(e) {
      var t = this.clone(), a = t._count;
      if (!a)
        return this;
      var n = _t(e), i = n.length;
      if (!i)
        return this;
      var o = t.count(), s = Zo(t._rawCount), l = new s(o), u = 0, f = n[0], h = e[f][0], v = e[f][1], c = t._chunks, p = !1;
      if (!t._indices) {
        var d = 0;
        if (i === 1) {
          for (var g = c[n[0]], y = 0; y < a; y++) {
            var m = g[y];
            (m >= h && m <= v || isNaN(m)) && (l[u++] = d), d++;
          }
          p = !0;
        } else if (i === 2) {
          for (var g = c[n[0]], _ = c[n[1]], S = e[n[1]][0], w = e[n[1]][1], y = 0; y < a; y++) {
            var m = g[y], x = _[y];
            (m >= h && m <= v || isNaN(m)) && (x >= S && x <= w || isNaN(x)) && (l[u++] = d), d++;
          }
          p = !0;
        }
      }
      if (!p)
        if (i === 1)
          for (var y = 0; y < o; y++) {
            var b = t.getRawIndex(y), m = c[n[0]][b];
            (m >= h && m <= v || isNaN(m)) && (l[u++] = b);
          }
        else
          for (var y = 0; y < o; y++) {
            for (var T = !0, b = t.getRawIndex(y), D = 0; D < i; D++) {
              var A = n[D], m = c[A][b];
              (m < e[A][0] || m > e[A][1]) && (T = !1);
            }
            T && (l[u++] = t.getRawIndex(y));
          }
      return u < o && (t._indices = l), t._count = u, t._extent = [], t._updateGetRawIdx(), t;
    }, r.prototype.map = function(e, t) {
      var a = this.clone(e);
      return this._updateDims(a, e, t), a;
    }, r.prototype.modify = function(e, t) {
      this._updateDims(this, e, t);
    }, r.prototype._updateDims = function(e, t, a) {
      for (var n = e._chunks, i = [], o = t.length, s = e.count(), l = [], u = e._rawExtent, f = 0; f < t.length; f++)
        u[t[f]] = Ei();
      for (var h = 0; h < s; h++) {
        for (var v = e.getRawIndex(h), c = 0; c < o; c++)
          l[c] = n[t[c]][v];
        l[o] = h;
        var p = a && a.apply(null, l);
        if (p != null) {
          typeof p != "object" && (i[0] = p, p = i);
          for (var f = 0; f < p.length; f++) {
            var d = t[f], g = p[f], y = u[d], m = n[d];
            m && (m[v] = g), g < y[0] && (y[0] = g), g > y[1] && (y[1] = g);
          }
        }
      }
    }, r.prototype.lttbDownSample = function(e, t) {
      var a = this.clone([e], !0), n = a._chunks, i = n[e], o = this.count(), s = 0, l = Math.floor(1 / t), u = this.getRawIndex(0), f, h, v, c = new (Zo(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
      c[s++] = u;
      for (var p = 1; p < o - 1; p += l) {
        for (var d = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), y = (g + d) / 2, m = 0, _ = d; _ < g; _++) {
          var S = this.getRawIndex(_), w = i[S];
          isNaN(w) || (m += w);
        }
        m /= g - d;
        var x = p, b = Math.min(p + l, o), T = p - 1, D = i[u];
        f = -1, v = x;
        for (var A = -1, M = 0, _ = x; _ < b; _++) {
          var S = this.getRawIndex(_), w = i[S];
          if (isNaN(w)) {
            M++, A < 0 && (A = S);
            continue;
          }
          h = Math.abs((T - y) * (w - D) - (T - _) * (m - D)), h > f && (f = h, v = S);
        }
        M > 0 && M < b - x && (c[s++] = Math.min(A, v), v = Math.max(A, v)), c[s++] = v, u = v;
      }
      return c[s++] = this.getRawIndex(o - 1), a._count = s, a._indices = c, a.getRawIndex = this._getRawIdx, a;
    }, r.prototype.downSample = function(e, t, a, n) {
      for (var i = this.clone([e], !0), o = i._chunks, s = [], l = Math.floor(1 / t), u = o[e], f = this.count(), h = i._rawExtent[e] = Ei(), v = new (Zo(this._rawCount))(Math.ceil(f / l)), c = 0, p = 0; p < f; p += l) {
        l > f - p && (l = f - p, s.length = l);
        for (var d = 0; d < l; d++) {
          var g = this.getRawIndex(p + d);
          s[d] = u[g];
        }
        var y = a(s), m = this.getRawIndex(Math.min(p + n(s, y) || 0, f - 1));
        u[m] = y, y < h[0] && (h[0] = y), y > h[1] && (h[1] = y), v[c++] = m;
      }
      return i._count = c, i._indices = v, i._updateGetRawIdx(), i;
    }, r.prototype.each = function(e, t) {
      if (this._count)
        for (var a = e.length, n = this._chunks, i = 0, o = this.count(); i < o; i++) {
          var s = this.getRawIndex(i);
          switch (a) {
            case 0:
              t(i);
              break;
            case 1:
              t(n[e[0]][s], i);
              break;
            case 2:
              t(n[e[0]][s], n[e[1]][s], i);
              break;
            default:
              for (var l = 0, u = []; l < a; l++)
                u[l] = n[e[l]][s];
              u[l] = i, t.apply(null, u);
          }
        }
    }, r.prototype.getDataExtent = function(e) {
      var t = this._chunks[e], a = Ei();
      if (!t)
        return a;
      var n = this.count(), i = !this._indices, o;
      if (i)
        return this._rawExtent[e].slice();
      if (o = this._extent[e], o)
        return o.slice();
      o = a;
      for (var s = o[0], l = o[1], u = 0; u < n; u++) {
        var f = this.getRawIndex(u), h = t[f];
        h < s && (s = h), h > l && (l = h);
      }
      return o = [s, l], this._extent[e] = o, o;
    }, r.prototype.getRawDataItem = function(e) {
      var t = this.getRawIndex(e);
      if (this._provider.persistent)
        return this._provider.getItem(t);
      for (var a = [], n = this._chunks, i = 0; i < n.length; i++)
        a.push(n[i][t]);
      return a;
    }, r.prototype.clone = function(e, t) {
      var a = new r(), n = this._chunks, i = e && $r(e, function(s, l) {
        return s[l] = !0, s;
      }, {});
      if (i)
        for (var o = 0; o < n.length; o++)
          a._chunks[o] = i[o] ? kO(n[o]) : n[o];
      else
        a._chunks = n;
      return this._copyCommonProps(a), t || (a._indices = this._cloneIndices()), a._updateGetRawIdx(), a;
    }, r.prototype._copyCommonProps = function(e) {
      e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = rt(this._extent), e._rawExtent = rt(this._rawExtent);
    }, r.prototype._cloneIndices = function() {
      if (this._indices) {
        var e = this._indices.constructor, t = void 0;
        if (e === Array) {
          var a = this._indices.length;
          t = new e(a);
          for (var n = 0; n < a; n++)
            t[n] = this._indices[n];
        } else
          t = new e(this._indices);
        return t;
      }
      return null;
    }, r.prototype._getRawIdxIdentity = function(e) {
      return e;
    }, r.prototype._getRawIdx = function(e) {
      return e < this._count && e >= 0 ? this._indices[e] : -1;
    }, r.prototype._updateGetRawIdx = function() {
      this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
    }, r.internalField = function() {
      function e(t, a, n, i) {
        return Ya(t[i], this._dimensions[i]);
      }
      Gv = {
        arrayRows: e,
        objectRows: function(t, a, n, i) {
          return Ya(t[a], this._dimensions[i]);
        },
        keyedColumns: e,
        original: function(t, a, n, i) {
          var o = t && (t.value == null ? t : t.value);
          return Ya(o instanceof Array ? o[i] : o, this._dimensions[i]);
        },
        typedArray: function(t, a, n, i) {
          return t[i];
        }
      };
    }(), r;
  }()
), fC = (
  /** @class */
  function() {
    function r(e) {
      this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
    }
    return r.prototype.dirty = function() {
      this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
    }, r.prototype._setLocalSource = function(e, t) {
      this._sourceList = e, this._upstreamSignList = t, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
    }, r.prototype._getVersionSign = function() {
      return this._sourceHost.uid + "_" + this._versionSignBase;
    }, r.prototype.prepareSource = function() {
      this._isDirty() && (this._createSource(), this._dirty = !1);
    }, r.prototype._createSource = function() {
      this._setLocalSource([], []);
      var e = this._sourceHost, t = this._getUpstreamSourceManagers(), a = !!t.length, n, i;
      if (Xo(e)) {
        var o = e, s = void 0, l = void 0, u = void 0;
        if (a) {
          var f = t[0];
          f.prepareSource(), u = f.getSource(), s = u.data, l = u.sourceFormat, i = [f._getVersionSign()];
        } else
          s = o.get("data", !0), l = ke(s) ? fa : hr, i = [];
        var h = this._getSourceMetaRawOption() || {}, v = u && u.metaRawOption || {}, c = ut(h.seriesLayoutBy, v.seriesLayoutBy) || null, p = ut(h.sourceHeader, v.sourceHeader), d = ut(h.dimensions, v.dimensions), g = c !== v.seriesLayoutBy || !!p != !!v.sourceHeader || d;
        n = g ? [id(s, {
          seriesLayoutBy: c,
          sourceHeader: p,
          dimensions: d
        }, l)] : [];
      } else {
        var y = e;
        if (a) {
          var m = this._applyTransform(t);
          n = m.sourceList, i = m.upstreamSignList;
        } else {
          var _ = y.get("source", !0);
          n = [id(_, this._getSourceMetaRawOption(), null)], i = [];
        }
      }
      ({}).NODE_ENV !== "production" && Q(n && i), this._setLocalSource(n, i);
    }, r.prototype._applyTransform = function(e) {
      var t = this._sourceHost, a = t.get("transform", !0), n = t.get("fromTransformResult", !0);
      if ({}.NODE_ENV !== "production" && Q(n != null || a != null), n != null) {
        var i = "";
        e.length !== 1 && ({}.NODE_ENV !== "production" && (i = "When using `fromTransformResult`, there should be only one upstream dataset"), h_(i));
      }
      var o, s = [], l = [];
      return C(e, function(u) {
        u.prepareSource();
        var f = u.getSource(n || 0), h = "";
        n != null && !f && ({}.NODE_ENV !== "production" && (h = "Can not retrieve result by `fromTransformResult`: " + n), h_(h)), s.push(f), l.push(u._getVersionSign());
      }), a ? o = PO(a, s, {
        datasetIndex: t.componentIndex
      }) : n != null && (o = [cO(s[0])]), {
        sourceList: o,
        upstreamSignList: l
      };
    }, r.prototype._isDirty = function() {
      if (this._dirty)
        return !0;
      for (var e = this._getUpstreamSourceManagers(), t = 0; t < e.length; t++) {
        var a = e[t];
        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.
          a._isDirty() || this._upstreamSignList[t] !== a._getVersionSign()
        )
          return !0;
      }
    }, r.prototype.getSource = function(e) {
      e = e || 0;
      var t = this._sourceList[e];
      if (!t) {
        var a = this._getUpstreamSourceManagers();
        return a[0] && a[0].getSource(e);
      }
      return t;
    }, r.prototype.getSharedDataStore = function(e) {
      ({}).NODE_ENV !== "production" && Q(Xo(this._sourceHost), "Can only call getDataStore on series source manager.");
      var t = e.makeStoreSchema();
      return this._innerGetDataStore(t.dimensions, e.source, t.hash);
    }, r.prototype._innerGetDataStore = function(e, t, a) {
      var n = 0, i = this._storeList, o = i[n];
      o || (o = i[n] = {});
      var s = o[a];
      if (!s) {
        var l = this._getUpstreamSourceManagers()[0];
        Xo(this._sourceHost) && l ? s = l._innerGetDataStore(e, t, a) : (s = new od(), s.initData(new tC(t, e.length), e)), o[a] = s;
      }
      return s;
    }, r.prototype._getUpstreamSourceManagers = function() {
      var e = this._sourceHost;
      if (Xo(e)) {
        var t = Wg(e);
        return t ? [t.getSourceManager()] : [];
      } else
        return G(VN(e), function(a) {
          return a.getSourceManager();
        });
    }, r.prototype._getSourceMetaRawOption = function() {
      var e = this._sourceHost, t, a, n;
      if (Xo(e))
        t = e.get("seriesLayoutBy", !0), a = e.get("sourceHeader", !0), n = e.get("dimensions", !0);
      else if (!this._getUpstreamSourceManagers().length) {
        var i = e;
        t = i.get("seriesLayoutBy", !0), a = i.get("sourceHeader", !0), n = i.get("dimensions", !0);
      }
      return {
        seriesLayoutBy: t,
        sourceHeader: a,
        dimensions: n
      };
    }, r;
  }()
);
function f_(r) {
  var e = r.option.transform;
  e && rf(r.option.transform);
}
function Xo(r) {
  return r.mainType === "series";
}
function h_(r) {
  throw new Error(r);
}
var hC = "line-height:1";
function vC(r, e) {
  var t = r.color || "#6e7079", a = r.fontSize || 12, n = r.fontWeight || "400", i = r.color || "#464646", o = r.fontSize || 14, s = r.fontWeight || "900";
  return e === "html" ? {
    // eslint-disable-next-line max-len
    nameStyle: "font-size:" + Pe(a + "") + "px;color:" + Pe(t) + ";font-weight:" + Pe(n + ""),
    // eslint-disable-next-line max-len
    valueStyle: "font-size:" + Pe(o + "") + "px;color:" + Pe(i) + ";font-weight:" + Pe(s + "")
  } : {
    nameStyle: {
      fontSize: a,
      fill: t,
      fontWeight: n
    },
    valueStyle: {
      fontSize: o,
      fill: i,
      fontWeight: s
    }
  };
}
var VO = [0, 10, 20, 30], BO = ["", `
`, `

`, `


`];
function oe(r, e) {
  return e.type = r, e;
}
function sd(r) {
  return r.type === "section";
}
function cC(r) {
  return sd(r) ? zO : GO;
}
function pC(r) {
  if (sd(r)) {
    var e = 0, t = r.blocks.length, a = t > 1 || t > 0 && !r.noHeader;
    return C(r.blocks, function(n) {
      var i = pC(n);
      i >= e && (e = i + +(a && // 0 always can not be readable gap level.
      (!i || sd(n) && !n.noHeader)));
    }), e;
  }
  return 0;
}
function zO(r, e, t, a) {
  var n = e.noHeader, i = FO(pC(e)), o = [], s = e.blocks || [];
  Q(!s || z(s)), s = s || [];
  var l = r.orderMode;
  if (e.sortBlocks && l) {
    s = s.slice();
    var u = {
      valueAsc: "asc",
      valueDesc: "desc"
    };
    if (U(u, l)) {
      var f = new oC(u[l], null);
      s.sort(function(p, d) {
        return f.evaluate(p.sortParam, d.sortParam);
      });
    } else
      l === "seriesDesc" && s.reverse();
  }
  C(s, function(p, d) {
    var g = e.valueFormatter, y = cC(p)(
      // Inherit valueFormatter
      g ? V(V({}, r), {
        valueFormatter: g
      }) : r,
      p,
      d > 0 ? i.html : 0,
      a
    );
    y != null && o.push(y);
  });
  var h = r.renderMode === "richText" ? o.join(i.richText) : ld(o.join(""), n ? t : i.html);
  if (n)
    return h;
  var v = ed(e.header, "ordinal", r.useUTC), c = vC(a, r.renderMode).nameStyle;
  return r.renderMode === "richText" ? dC(r, v, c) + i.richText + h : ld('<div style="' + c + ";" + hC + ';">' + Pe(v) + "</div>" + h, t);
}
function GO(r, e, t, a) {
  var n = r.renderMode, i = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = r.useUTC, f = e.valueFormatter || r.valueFormatter || function(S) {
    return S = z(S) ? S : [S], G(S, function(w, x) {
      return ed(w, z(c) ? c[x] : c, u);
    });
  };
  if (!(i && o)) {
    var h = s ? "" : r.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", n), v = i ? "" : ed(l, "ordinal", u), c = e.valueType, p = o ? [] : f(e.value), d = !s || !i, g = !s && i, y = vC(a, n), m = y.nameStyle, _ = y.valueStyle;
    return n === "richText" ? (s ? "" : h) + (i ? "" : dC(r, v, m)) + (o ? "" : $O(r, p, d, g, _)) : ld((s ? "" : h) + (i ? "" : HO(v, !s, m)) + (o ? "" : WO(p, d, g, _)), t);
  }
}
function v_(r, e, t, a, n, i) {
  if (r) {
    var o = cC(r), s = {
      useUTC: n,
      renderMode: t,
      orderMode: a,
      markupStyleCreator: e,
      valueFormatter: r.valueFormatter
    };
    return o(s, r, 0, i);
  }
}
function FO(r) {
  return {
    html: VO[r],
    richText: BO[r]
  };
}
function ld(r, e) {
  var t = '<div style="clear:both"></div>', a = "margin: " + e + "px 0 0";
  return '<div style="' + a + ";" + hC + ';">' + r + t + "</div>";
}
function HO(r, e, t) {
  var a = e ? "margin-left:2px" : "";
  return '<span style="' + t + ";" + a + '">' + Pe(r) + "</span>";
}
function WO(r, e, t, a) {
  var n = t ? "10px" : "20px", i = e ? "float:right;margin-left:" + n : "";
  return r = z(r) ? r : [r], '<span style="' + i + ";" + a + '">' + G(r, function(o) {
    return Pe(o);
  }).join("&nbsp;&nbsp;") + "</span>";
}
function dC(r, e, t) {
  return r.markupStyleCreator.wrapRichTextStyle(e, t);
}
function $O(r, e, t, a, n) {
  var i = [n], o = a ? 10 : 20;
  return t && i.push({
    padding: [0, 0, 0, o],
    align: "right"
  }), r.markupStyleCreator.wrapRichTextStyle(z(e) ? e.join("  ") : e, i);
}
function gC(r, e) {
  var t = r.getData().getItemVisual(e, "style"), a = t[r.visualDrawType];
  return ci(a);
}
function yC(r, e) {
  var t = r.get("padding");
  return t ?? (e === "richText" ? [8, 10] : 10);
}
var Fv = (
  /** @class */
  function() {
    function r() {
      this.richTextStyles = {}, this._nextStyleNameId = gT();
    }
    return r.prototype._generateStyleName = function() {
      return "__EC_aUTo_" + this._nextStyleNameId++;
    }, r.prototype.makeTooltipMarker = function(e, t, a) {
      var n = a === "richText" ? this._generateStyleName() : null, i = LN({
        color: t,
        type: e,
        renderMode: a,
        markerId: n
      });
      return $(i) ? i : ({}.NODE_ENV !== "production" && Q(n), this.richTextStyles[n] = i.style, i.content);
    }, r.prototype.wrapRichTextStyle = function(e, t) {
      var a = {};
      z(t) ? C(t, function(i) {
        return V(a, i);
      }) : V(a, t);
      var n = this._generateStyleName();
      return this.richTextStyles[n] = a, "{" + n + "|" + e + "}";
    }, r;
  }()
);
function mC(r) {
  var e = r.series, t = r.dataIndex, a = r.multipleSeries, n = e.getData(), i = n.mapDimensionsAll("defaultedTooltip"), o = i.length, s = e.getRawValue(t), l = z(s), u = gC(e, t), f, h, v, c;
  if (o > 1 || l && !o) {
    var p = UO(s, e, t, i, u);
    f = p.inlineValues, h = p.inlineValueTypes, v = p.blocks, c = p.inlineValues[0];
  } else if (o) {
    var d = n.getDimensionInfo(i[0]);
    c = f = fo(n, t, i[0]), h = d.type;
  } else
    c = f = l ? s[0] : s;
  var g = xg(e), y = g && e.name || "", m = n.getName(t), _ = a ? y : m;
  return oe("section", {
    header: y,
    // When series name is not specified, do not show a header line with only '-'.
    // This case always happens in tooltip.trigger: 'item'.
    noHeader: a || !g,
    sortParam: c,
    blocks: [oe("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: !mr(_),
      value: f,
      valueType: h
    })].concat(v || [])
  });
}
function UO(r, e, t, a, n) {
  var i = e.getData(), o = $r(r, function(h, v, c) {
    var p = i.getDimensionInfo(c);
    return h = h || p && p.tooltip !== !1 && p.displayName != null;
  }, !1), s = [], l = [], u = [];
  a.length ? C(a, function(h) {
    f(fo(i, t, h), h);
  }) : C(r, f);
  function f(h, v) {
    var c = i.getDimensionInfo(v);
    !c || c.otherDims.tooltip === !1 || (o ? u.push(oe("nameValue", {
      markerType: "subItem",
      markerColor: n,
      name: c.displayName,
      value: h,
      valueType: c.type
    })) : (s.push(h), l.push(c.type)));
  }
  return {
    inlineValues: s,
    inlineValueTypes: l,
    blocks: u
  };
}
var Ca = Tt();
function Jl(r, e) {
  return r.getName(e) || r.getId(e);
}
var Xu = "__universalTransitionEnabled", Eh = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t._selectedDataIndicesMap = {}, t;
    }
    return e.prototype.init = function(t, a, n) {
      this.seriesIndex = this.componentIndex, this.dataTask = Ns({
        count: ZO,
        reset: XO
      }), this.dataTask.context = {
        model: this
      }, this.mergeDefaultAndTheme(t, n);
      var i = Ca(this).sourceManager = new fC(this);
      i.prepareSource();
      var o = this.getInitialData(t, n);
      p_(o, this), this.dataTask.context.data = o, {}.NODE_ENV !== "production" && Q(o, "getInitialData returned invalid data."), Ca(this).dataBeforeProcessed = o, c_(this), this._initSelectedMapFromData(o);
    }, e.prototype.mergeDefaultAndTheme = function(t, a) {
      var n = Xs(this), i = n ? Io(t) : {}, o = this.subType;
      St.hasClass(o) && (o += "Series"), ft(t, a.getTheme().get(this.subType)), ft(t, this.getDefaultOption()), ui(t, "label", ["show"]), this.fillDataTextStyle(t.data), n && Ja(t, i, n);
    }, e.prototype.mergeOption = function(t, a) {
      t = ft(this.option, t, !0), this.fillDataTextStyle(t.data);
      var n = Xs(this);
      n && Ja(this.option, t, n);
      var i = Ca(this).sourceManager;
      i.dirty(), i.prepareSource();
      var o = this.getInitialData(t, a);
      p_(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, Ca(this).dataBeforeProcessed = o, c_(this), this._initSelectedMapFromData(o);
    }, e.prototype.fillDataTextStyle = function(t) {
      if (t && !ke(t))
        for (var a = ["show"], n = 0; n < t.length; n++)
          t[n] && t[n].label && ui(t[n], "label", a);
    }, e.prototype.getInitialData = function(t, a) {
    }, e.prototype.appendData = function(t) {
      var a = this.getRawData();
      a.appendData(t.data);
    }, e.prototype.getData = function(t) {
      var a = ud(this);
      if (a) {
        var n = a.context.data;
        return t == null ? n : n.getLinkedData(t);
      } else
        return Ca(this).data;
    }, e.prototype.getAllData = function() {
      var t = this.getData();
      return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{
        data: t
      }];
    }, e.prototype.setData = function(t) {
      var a = ud(this);
      if (a) {
        var n = a.context;
        n.outputData = t, a !== this.dataTask && (n.data = t);
      }
      Ca(this).data = t;
    }, e.prototype.getEncode = function() {
      var t = this.get("encode", !0);
      if (t)
        return K(t);
    }, e.prototype.getSourceManager = function() {
      return Ca(this).sourceManager;
    }, e.prototype.getSource = function() {
      return this.getSourceManager().getSource();
    }, e.prototype.getRawData = function() {
      return Ca(this).dataBeforeProcessed;
    }, e.prototype.getColorBy = function() {
      var t = this.get("colorBy");
      return t || "series";
    }, e.prototype.isColorBySeries = function() {
      return this.getColorBy() === "series";
    }, e.prototype.getBaseAxis = function() {
      var t = this.coordinateSystem;
      return t && t.getBaseAxis && t.getBaseAxis();
    }, e.prototype.formatTooltip = function(t, a, n) {
      return mC({
        series: this,
        dataIndex: t,
        multipleSeries: a
      });
    }, e.prototype.isAnimationEnabled = function() {
      var t = this.ecModel;
      if (wt.node && !(t && t.ssr))
        return !1;
      var a = this.getShallow("animation");
      return a && this.getData().count() > this.getShallow("animationThreshold") && (a = !1), !!a;
    }, e.prototype.restoreData = function() {
      this.dataTask.dirty();
    }, e.prototype.getColorFromPalette = function(t, a, n) {
      var i = this.ecModel, o = $g.prototype.getColorFromPalette.call(this, t, a, n);
      return o || (o = i.getColorFromPalette(t, a, n)), o;
    }, e.prototype.coordDimToDataDim = function(t) {
      return this.getRawData().mapDimensionsAll(t);
    }, e.prototype.getProgressive = function() {
      return this.get("progressive");
    }, e.prototype.getProgressiveThreshold = function() {
      return this.get("progressiveThreshold");
    }, e.prototype.select = function(t, a) {
      this._innerSelect(this.getData(a), t);
    }, e.prototype.unselect = function(t, a) {
      var n = this.option.selectedMap;
      if (n) {
        var i = this.option.selectedMode, o = this.getData(a);
        if (i === "series" || n === "all") {
          this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
          return;
        }
        for (var s = 0; s < t.length; s++) {
          var l = t[s], u = Jl(o, l);
          n[u] = !1, this._selectedDataIndicesMap[u] = -1;
        }
      }
    }, e.prototype.toggleSelect = function(t, a) {
      for (var n = [], i = 0; i < t.length; i++)
        n[0] = t[i], this.isSelected(t[i], a) ? this.unselect(n, a) : this.select(n, a);
    }, e.prototype.getSelectedDataIndices = function() {
      if (this.option.selectedMap === "all")
        return [].slice.call(this.getData().getIndices());
      for (var t = this._selectedDataIndicesMap, a = _t(t), n = [], i = 0; i < a.length; i++) {
        var o = t[a[i]];
        o >= 0 && n.push(o);
      }
      return n;
    }, e.prototype.isSelected = function(t, a) {
      var n = this.option.selectedMap;
      if (!n)
        return !1;
      var i = this.getData(a);
      return (n === "all" || n[Jl(i, t)]) && !i.getItemModel(t).get(["select", "disabled"]);
    }, e.prototype.isUniversalTransitionEnabled = function() {
      if (this[Xu])
        return !0;
      var t = this.option.universalTransition;
      return t ? t === !0 ? !0 : t && t.enabled : !1;
    }, e.prototype._innerSelect = function(t, a) {
      var n, i, o = this.option, s = o.selectedMode, l = a.length;
      if (!(!s || !l)) {
        if (s === "series")
          o.selectedMap = "all";
        else if (s === "multiple") {
          j(o.selectedMap) || (o.selectedMap = {});
          for (var u = o.selectedMap, f = 0; f < l; f++) {
            var h = a[f], v = Jl(t, h);
            u[v] = !0, this._selectedDataIndicesMap[v] = t.getRawIndex(h);
          }
        } else if (s === "single" || s === !0) {
          var c = a[l - 1], v = Jl(t, c);
          o.selectedMap = (n = {}, n[v] = !0, n), this._selectedDataIndicesMap = (i = {}, i[v] = t.getRawIndex(c), i);
        }
      }
    }, e.prototype._initSelectedMapFromData = function(t) {
      if (!this.option.selectedMap) {
        var a = [];
        t.hasItemOption && t.each(function(n) {
          var i = t.getRawDataItem(n);
          i && i.selected && a.push(n);
        }), a.length > 0 && this._innerSelect(t, a);
      }
    }, e.registerClass = function(t) {
      return St.registerClass(t);
    }, e.protoInitialize = function() {
      var t = e.prototype;
      t.type = "series.__base__", t.seriesIndex = 0, t.ignoreStyleOnData = !1, t.hasSymbolVisual = !1, t.defaultSymbol = "circle", t.visualStyleAccessPath = "itemStyle", t.visualDrawType = "fill";
    }(), e;
  }(St)
);
te(Eh, Xg);
te(Eh, $g);
DT(Eh, St);
function c_(r) {
  var e = r.name;
  xg(r) || (r.name = YO(r) || e);
}
function YO(r) {
  var e = r.getRawData(), t = e.mapDimensionsAll("seriesName"), a = [];
  return C(t, function(n) {
    var i = e.getDimensionInfo(n);
    i.displayName && a.push(i.displayName);
  }), a.join(" ");
}
function ZO(r) {
  return r.model.getRawData().count();
}
function XO(r) {
  var e = r.model;
  return e.setData(e.getRawData().cloneShallow()), qO;
}
function qO(r, e) {
  e.outputData && r.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
}
function p_(r, e) {
  C(af(r.CHANGABLE_METHODS, r.DOWNSAMPLE_METHODS), function(t) {
    r.wrapMethod(t, ot(KO, e));
  });
}
function KO(r, e) {
  var t = ud(r);
  return t && t.setOutputEnd((e || this).count()), e;
}
function ud(r) {
  var e = (r.ecModel || {}).scheduler, t = e && e.getPipeline(r.uid);
  if (t) {
    var a = t.currentTask;
    if (a) {
      var n = a.agentStubMap;
      n && (a = n.get(r.uid));
    }
    return a;
  }
}
const Gt = Eh;
var Kg = (
  /** @class */
  function() {
    function r() {
      this.group = new nt(), this.uid = Ao("viewComponent");
    }
    return r.prototype.init = function(e, t) {
    }, r.prototype.render = function(e, t, a, n) {
    }, r.prototype.dispose = function(e, t) {
    }, r.prototype.updateView = function(e, t, a, n) {
    }, r.prototype.updateLayout = function(e, t, a, n) {
    }, r.prototype.updateVisual = function(e, t, a, n) {
    }, r.prototype.toggleBlurSeries = function(e, t, a) {
    }, r.prototype.eachRendered = function(e) {
      var t = this.group;
      t && t.traverse(e);
    }, r;
  }()
);
bg(Kg);
vh(Kg);
const $t = Kg;
function Ro() {
  var r = Tt();
  return function(e) {
    var t = r(e), a = e.pipelineContext, n = !!t.large, i = !!t.progressiveRender, o = t.large = !!(a && a.large), s = t.progressiveRender = !!(a && a.progressiveRender);
    return (n !== o || i !== s) && "reset";
  };
}
var _C = Tt(), jO = Ro(), jg = (
  /** @class */
  function() {
    function r() {
      this.group = new nt(), this.uid = Ao("viewChart"), this.renderTask = Ns({
        plan: QO,
        reset: JO
      }), this.renderTask.context = {
        view: this
      };
    }
    return r.prototype.init = function(e, t) {
    }, r.prototype.render = function(e, t, a, n) {
      if ({}.NODE_ENV !== "production")
        throw new Error("render method must been implemented");
    }, r.prototype.highlight = function(e, t, a, n) {
      var i = e.getData(n && n.dataType);
      if (!i) {
        ({}).NODE_ENV !== "production" && ve("Unknown dataType " + n.dataType);
        return;
      }
      g_(i, n, "emphasis");
    }, r.prototype.downplay = function(e, t, a, n) {
      var i = e.getData(n && n.dataType);
      if (!i) {
        ({}).NODE_ENV !== "production" && ve("Unknown dataType " + n.dataType);
        return;
      }
      g_(i, n, "normal");
    }, r.prototype.remove = function(e, t) {
      this.group.removeAll();
    }, r.prototype.dispose = function(e, t) {
    }, r.prototype.updateView = function(e, t, a, n) {
      this.render(e, t, a, n);
    }, r.prototype.updateLayout = function(e, t, a, n) {
      this.render(e, t, a, n);
    }, r.prototype.updateVisual = function(e, t, a, n) {
      this.render(e, t, a, n);
    }, r.prototype.eachRendered = function(e) {
      on(this.group, e);
    }, r.markUpdateMethod = function(e, t) {
      _C(e).updateMethod = t;
    }, r.protoInitialize = function() {
      var e = r.prototype;
      e.type = "chart";
    }(), r;
  }()
);
function d_(r, e, t) {
  r && ja(r) && (e === "emphasis" ? da : ga)(r, t);
}
function g_(r, e, t) {
  var a = fi(r, e), n = e && e.highlightKey != null ? bR(e.highlightKey) : null;
  a != null ? C(Pt(a), function(i) {
    d_(r.getItemGraphicEl(i), t, n);
  }) : r.eachItemGraphicEl(function(i) {
    d_(i, t, n);
  });
}
bg(jg, ["dispose"]);
vh(jg);
function QO(r) {
  return jO(r.model);
}
function JO(r) {
  var e = r.model, t = r.ecModel, a = r.api, n = r.payload, i = e.pipelineContext.progressiveRender, o = r.view, s = n && _C(n).updateMethod, l = i ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  return l !== "render" && o[l](e, t, a, n), tk[l];
}
var tk = {
  incrementalPrepareRender: {
    progress: function(r, e) {
      e.view.incrementalRender(r, 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(r, e) {
      e.view.render(e.model, e.ecModel, e.api, e.payload);
    }
  }
};
const Vt = jg;
var wf = "\0__throttleOriginMethod", y_ = "\0__throttleRate", m_ = "\0__throttleType";
function Qg(r, e, t) {
  var a, n = 0, i = 0, o = null, s, l, u, f;
  e = e || 0;
  function h() {
    i = (/* @__PURE__ */ new Date()).getTime(), o = null, r.apply(l, u || []);
  }
  var v = function() {
    for (var c = [], p = 0; p < arguments.length; p++)
      c[p] = arguments[p];
    a = (/* @__PURE__ */ new Date()).getTime(), l = this, u = c;
    var d = f || e, g = f || t;
    f = null, s = a - (g ? n : i) - d, clearTimeout(o), g ? o = setTimeout(h, d) : s >= 0 ? h() : o = setTimeout(h, -s), n = a;
  };
  return v.clear = function() {
    o && (clearTimeout(o), o = null);
  }, v.debounceNextCall = function(c) {
    f = c;
  }, v;
}
function No(r, e, t, a) {
  var n = r[e];
  if (n) {
    var i = n[wf] || n, o = n[m_], s = n[y_];
    if (s !== t || o !== a) {
      if (t == null || !a)
        return r[e] = i;
      n = r[e] = Qg(i, t, a === "debounce"), n[wf] = i, n[m_] = a, n[y_] = t;
    }
    return n;
  }
}
function Ks(r, e) {
  var t = r[e];
  t && t[wf] && (t.clear && t.clear(), r[e] = t[wf]);
}
var __ = Tt(), S_ = {
  itemStyle: hi(TD, !0),
  lineStyle: hi(bD, !0)
}, ek = {
  lineStyle: "stroke",
  itemStyle: "fill"
};
function SC(r, e) {
  var t = r.visualStyleMapper || S_[e];
  return t || (console.warn("Unknown style type '" + e + "'."), S_.itemStyle);
}
function xC(r, e) {
  var t = r.visualDrawType || ek[e];
  return t || (console.warn("Unknown style type '" + e + "'."), "fill");
}
var rk = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(r, e) {
    var t = r.getData(), a = r.visualStyleAccessPath || "itemStyle", n = r.getModel(a), i = SC(r, a), o = i(n), s = n.getShallow("decal");
    s && (t.setVisual("decal", s), s.dirty = !0);
    var l = xC(r, a), u = o[l], f = q(u) ? u : null, h = o.fill === "auto" || o.stroke === "auto";
    if (!o[l] || f || h) {
      var v = r.getColorFromPalette(
        // TODO series count changed.
        r.name,
        null,
        e.getSeriesCount()
      );
      o[l] || (o[l] = v, t.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || q(o.fill) ? v : o.fill, o.stroke = o.stroke === "auto" || q(o.stroke) ? v : o.stroke;
    }
    if (t.setVisual("style", o), t.setVisual("drawType", l), !e.isSeriesFiltered(r) && f)
      return t.setVisual("colorFromPalette", !1), {
        dataEach: function(c, p) {
          var d = r.getDataParams(p), g = V({}, o);
          g[l] = f(d), c.setItemVisual(p, "style", g);
        }
      };
  }
}, qo = new kt(), ak = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(r, e) {
    if (!(r.ignoreStyleOnData || e.isSeriesFiltered(r))) {
      var t = r.getData(), a = r.visualStyleAccessPath || "itemStyle", n = SC(r, a), i = t.getVisual("drawType");
      return {
        dataEach: t.hasItemOption ? function(o, s) {
          var l = o.getRawDataItem(s);
          if (l && l[a]) {
            qo.option = l[a];
            var u = n(qo), f = o.ensureUniqueItemVisual(s, "style");
            V(f, u), qo.option.decal && (o.setItemVisual(s, "decal", qo.option.decal), qo.option.decal.dirty = !0), i in u && o.setItemVisual(s, "colorFromPalette", !1);
          }
        } : null
      };
    }
  }
}, nk = {
  performRawSeries: !0,
  overallReset: function(r) {
    var e = K();
    r.eachSeries(function(t) {
      var a = t.getColorBy();
      if (!t.isColorBySeries()) {
        var n = t.type + "-" + a, i = e.get(n);
        i || (i = {}, e.set(n, i)), __(t).scope = i;
      }
    }), r.eachSeries(function(t) {
      if (!(t.isColorBySeries() || r.isSeriesFiltered(t))) {
        var a = t.getRawData(), n = {}, i = t.getData(), o = __(t).scope, s = t.visualStyleAccessPath || "itemStyle", l = xC(t, s);
        i.each(function(u) {
          var f = i.getRawIndex(u);
          n[f] = u;
        }), a.each(function(u) {
          var f = n[u], h = i.getItemVisual(f, "colorFromPalette");
          if (h) {
            var v = i.ensureUniqueItemVisual(f, "style"), c = a.getName(u) || u + "", p = a.count();
            v[l] = t.getColorFromPalette(c, o, p);
          }
        });
      }
    });
  }
}, tu = Math.PI;
function ik(r, e) {
  e = e || {}, tt(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 t = new nt(), a = new bt({
    style: {
      fill: e.maskColor
    },
    zlevel: e.zlevel,
    z: 1e4
  });
  t.add(a);
  var n = new Dt({
    style: {
      text: e.text,
      fill: e.textColor,
      fontSize: e.fontSize,
      fontWeight: e.fontWeight,
      fontStyle: e.fontStyle,
      fontFamily: e.fontFamily
    },
    zlevel: e.zlevel,
    z: 10001
  }), i = new bt({
    style: {
      fill: "none"
    },
    textContent: n,
    textConfig: {
      position: "right",
      distance: 10
    },
    zlevel: e.zlevel,
    z: 10001
  });
  t.add(i);
  var o;
  return e.showSpinner && (o = new Pg({
    shape: {
      startAngle: -tu / 2,
      endAngle: -tu / 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: tu * 3 / 2
  }).start("circularInOut"), o.animateShape(!0).when(1e3, {
    startAngle: tu * 3 / 2
  }).delay(300).start("circularInOut"), t.add(o)), t.resize = function() {
    var s = n.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (r.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), f = r.getHeight() / 2;
    e.showSpinner && o.setShape({
      cx: u,
      cy: f
    }), i.setShape({
      x: u - l,
      y: f - l,
      width: l * 2,
      height: l * 2
    }), a.setShape({
      x: 0,
      y: 0,
      width: r.getWidth(),
      height: r.getHeight()
    });
  }, t.resize(), t;
}
var ok = (
  /** @class */
  function() {
    function r(e, t, a, n) {
      this._stageTaskMap = K(), this.ecInstance = e, this.api = t, a = this._dataProcessorHandlers = a.slice(), n = this._visualHandlers = n.slice(), this._allHandlers = a.concat(n);
    }
    return r.prototype.restoreData = function(e, t) {
      e.restoreData(t), this._stageTaskMap.each(function(a) {
        var n = a.overallTask;
        n && n.dirty();
      });
    }, r.prototype.getPerformArgs = function(e, t) {
      if (e.__pipeline) {
        var a = this._pipelineMap.get(e.__pipeline.id), n = a.context, i = !t && a.progressiveEnabled && (!n || n.progressiveRender) && e.__idxInPipeline > a.blockIndex, o = i ? a.step : null, s = n && n.modDataCount, l = s != null ? Math.ceil(s / o) : null;
        return {
          step: o,
          modBy: l,
          modDataCount: s
        };
      }
    }, r.prototype.getPipeline = function(e) {
      return this._pipelineMap.get(e);
    }, r.prototype.updateStreamModes = function(e, t) {
      var a = this._pipelineMap.get(e.uid), n = e.getData(), i = n.count(), o = a.progressiveEnabled && t.incrementalPrepareRender && i >= a.threshold, s = e.get("large") && i >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? i : null;
      e.pipelineContext = a.context = {
        progressiveRender: o,
        modDataCount: l,
        large: s
      };
    }, r.prototype.restorePipelines = function(e) {
      var t = this, a = t._pipelineMap = K();
      e.eachSeries(function(n) {
        var i = n.getProgressive(), o = n.uid;
        a.set(o, {
          id: o,
          head: null,
          tail: null,
          threshold: n.getProgressiveThreshold(),
          progressiveEnabled: i && !(n.preventIncremental && n.preventIncremental()),
          blockIndex: -1,
          step: Math.round(i || 700),
          count: 0
        }), t._pipe(n, n.dataTask);
      });
    }, r.prototype.prepareStageTasks = function() {
      var e = this._stageTaskMap, t = this.api.getModel(), a = this.api;
      C(this._allHandlers, function(n) {
        var i = e.get(n.uid) || e.set(n.uid, {}), o = "";
        ({}).NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), Q(!(n.reset && n.overallReset), o), n.reset && this._createSeriesStageTask(n, i, t, a), n.overallReset && this._createOverallStageTask(n, i, t, a);
      }, this);
    }, r.prototype.prepareView = function(e, t, a, n) {
      var i = e.renderTask, o = i.context;
      o.model = t, o.ecModel = a, o.api = n, i.__block = !e.incrementalPrepareRender, this._pipe(t, i);
    }, r.prototype.performDataProcessorTasks = function(e, t) {
      this._performStageTasks(this._dataProcessorHandlers, e, t, {
        block: !0
      });
    }, r.prototype.performVisualTasks = function(e, t, a) {
      this._performStageTasks(this._visualHandlers, e, t, a);
    }, r.prototype._performStageTasks = function(e, t, a, n) {
      n = n || {};
      var i = !1, o = this;
      C(e, function(l, u) {
        if (!(n.visualType && n.visualType !== l.visualType)) {
          var f = o._stageTaskMap.get(l.uid), h = f.seriesTaskMap, v = f.overallTask;
          if (v) {
            var c, p = v.agentStubMap;
            p.each(function(g) {
              s(n, g) && (g.dirty(), c = !0);
            }), c && v.dirty(), o.updatePayload(v, a);
            var d = o.getPerformArgs(v, n.block);
            p.each(function(g) {
              g.perform(d);
            }), v.perform(d) && (i = !0);
          } else
            h && h.each(function(g, y) {
              s(n, g) && g.dirty();
              var m = o.getPerformArgs(g, n.block);
              m.skip = !l.performRawSeries && t.isSeriesFiltered(g.context.model), o.updatePayload(g, a), g.perform(m) && (i = !0);
            });
        }
      });
      function s(l, u) {
        return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
      }
      this.unfinished = i || this.unfinished;
    }, r.prototype.performSeriesTasks = function(e) {
      var t;
      e.eachSeries(function(a) {
        t = a.dataTask.perform() || t;
      }), this.unfinished = t || this.unfinished;
    }, r.prototype.plan = function() {
      this._pipelineMap.each(function(e) {
        var t = e.tail;
        do {
          if (t.__block) {
            e.blockIndex = t.__idxInPipeline;
            break;
          }
          t = t.getUpstream();
        } while (t);
      });
    }, r.prototype.updatePayload = function(e, t) {
      t !== "remain" && (e.context.payload = t);
    }, r.prototype._createSeriesStageTask = function(e, t, a, n) {
      var i = this, o = t.seriesTaskMap, s = t.seriesTaskMap = K(), l = e.seriesType, u = e.getTargetSeries;
      e.createOnAllSeries ? a.eachRawSeries(f) : l ? a.eachRawSeriesByType(l, f) : u && u(a, n).each(f);
      function f(h) {
        var v = h.uid, c = s.set(v, o && o.get(v) || Ns({
          plan: hk,
          reset: vk,
          count: pk
        }));
        c.context = {
          model: h,
          ecModel: a,
          api: n,
          // PENDING: `useClearVisual` not used?
          useClearVisual: e.isVisual && !e.isLayout,
          plan: e.plan,
          reset: e.reset,
          scheduler: i
        }, i._pipe(h, c);
      }
    }, r.prototype._createOverallStageTask = function(e, t, a, n) {
      var i = this, o = t.overallTask = t.overallTask || Ns({
        reset: sk
      });
      o.context = {
        ecModel: a,
        api: n,
        overallReset: e.overallReset,
        scheduler: i
      };
      var s = o.agentStubMap, l = o.agentStubMap = K(), u = e.seriesType, f = e.getTargetSeries, h = !0, v = !1, c = "";
      ({}).NODE_ENV !== "production" && (c = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), Q(!e.createOnAllSeries, c), u ? a.eachRawSeriesByType(u, p) : f ? f(a, n).each(p) : (h = !1, C(a.getSeries(), p));
      function p(d) {
        var g = d.uid, y = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
        // should be set as dirty and re-performed.
        (v = !0, Ns({
          reset: lk,
          onDirty: fk
        })));
        y.context = {
          model: d,
          overallProgress: h
          // FIXME:TS never used, so comment it
          // modifyOutputEnd: modifyOutputEnd
        }, y.agent = o, y.__block = h, i._pipe(d, y);
      }
      v && o.dirty();
    }, r.prototype._pipe = function(e, t) {
      var a = e.uid, n = this._pipelineMap.get(a);
      !n.head && (n.head = t), n.tail && n.tail.pipe(t), n.tail = t, t.__idxInPipeline = n.count++, t.__pipeline = n;
    }, r.wrapStageHandler = function(e, t) {
      return q(e) && (e = {
        overallReset: e,
        seriesType: dk(e)
      }), e.uid = Ao("stageHandler"), t && (e.visualType = t), e;
    }, r;
  }()
);
function sk(r) {
  r.overallReset(r.ecModel, r.api, r.payload);
}
function lk(r) {
  return r.overallProgress && uk;
}
function uk() {
  this.agent.dirty(), this.getDownstream().dirty();
}
function fk() {
  this.agent && this.agent.dirty();
}
function hk(r) {
  return r.plan ? r.plan(r.model, r.ecModel, r.api, r.payload) : null;
}
function vk(r) {
  r.useClearVisual && r.data.clearAllVisual();
  var e = r.resetDefines = Pt(r.reset(r.model, r.ecModel, r.api, r.payload));
  return e.length > 1 ? G(e, function(t, a) {
    return wC(a);
  }) : ck;
}
var ck = wC(0);
function wC(r) {
  return function(e, t) {
    var a = t.data, n = t.resetDefines[r];
    if (n && n.dataEach)
      for (var i = e.start; i < e.end; i++)
        n.dataEach(a, i);
    else
      n && n.progress && n.progress(e, a);
  };
}
function pk(r) {
  return r.data.count();
}
function dk(r) {
  bf = null;
  try {
    r(js, bC);
  } catch {
  }
  return bf;
}
var js = {}, bC = {}, bf;
TC(js, XD);
TC(bC, qD);
js.eachSeriesByType = js.eachRawSeriesByType = function(r) {
  bf = r;
};
js.eachComponent = function(r) {
  r.mainType === "series" && r.subType && (bf = r.subType);
};
function TC(r, e) {
  for (var t in e.prototype)
    r[t] = Xt;
}
const DC = ok;
var x_ = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
const gk = {
  color: x_,
  colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], x_]
};
var we = "#B9B8CE", w_ = "#100C2A", eu = function() {
  return {
    axisLine: {
      lineStyle: {
        color: we
      }
    },
    splitLine: {
      lineStyle: {
        color: "#484753"
      }
    },
    splitArea: {
      areaStyle: {
        color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
      }
    },
    minorSplitLine: {
      lineStyle: {
        color: "#20203B"
      }
    }
  };
}, b_ = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], CC = {
  darkMode: !0,
  color: b_,
  backgroundColor: w_,
  axisPointer: {
    lineStyle: {
      color: "#817f91"
    },
    crossStyle: {
      color: "#817f91"
    },
    label: {
      // TODO Contrast of label backgorundColor
      color: "#fff"
    }
  },
  legend: {
    textStyle: {
      color: we
    }
  },
  textStyle: {
    color: we
  },
  title: {
    textStyle: {
      color: "#EEF1FA"
    },
    subtextStyle: {
      color: "#B9B8CE"
    }
  },
  toolbox: {
    iconStyle: {
      borderColor: we
    }
  },
  dataZoom: {
    borderColor: "#71708A",
    textStyle: {
      color: we
    },
    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: we
    }
  },
  timeline: {
    lineStyle: {
      color: we
    },
    label: {
      color: we
    },
    controlStyle: {
      color: we,
      borderColor: we
    }
  },
  calendar: {
    itemStyle: {
      color: w_
    },
    dayLabel: {
      color: we
    },
    monthLabel: {
      color: we
    },
    yearLabel: {
      color: we
    }
  },
  timeAxis: eu(),
  logAxis: eu(),
  valueAxis: eu(),
  categoryAxis: eu(),
  line: {
    symbol: "circle"
  },
  graph: {
    color: b_
  },
  gauge: {
    title: {
      color: we
    },
    axisLine: {
      lineStyle: {
        color: [[1, "rgba(207,212,219,0.2)"]]
      }
    },
    axisLabel: {
      color: we
    },
    detail: {
      color: "#EEF1FA"
    }
  },
  candlestick: {
    itemStyle: {
      color: "#f64e56",
      color0: "#54ea92",
      borderColor: "#f64e56",
      borderColor0: "#54ea92"
      // borderColor: '#ca2824',
      // borderColor0: '#09a443'
    }
  }
};
CC.categoryAxis.splitLine.show = !1;
const yk = CC;
var mk = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.normalizeQuery = function(e) {
      var t = {}, a = {}, n = {};
      if ($(e)) {
        var i = Gr(e);
        t.mainType = i.main || null, t.subType = i.sub || null;
      } else {
        var o = ["Index", "Name", "Id"], s = {
          name: 1,
          dataIndex: 1,
          dataType: 1
        };
        C(e, function(l, u) {
          for (var f = !1, h = 0; h < o.length; h++) {
            var v = o[h], c = u.lastIndexOf(v);
            if (c > 0 && c === u.length - v.length) {
              var p = u.slice(0, c);
              p !== "data" && (t.mainType = p, t[v.toLowerCase()] = l, f = !0);
            }
          }
          s.hasOwnProperty(u) && (a[u] = l, f = !0), f || (n[u] = l);
        });
      }
      return {
        cptQuery: t,
        dataQuery: a,
        otherQuery: n
      };
    }, r.prototype.filter = function(e, t) {
      var a = this.eventInfo;
      if (!a)
        return !0;
      var n = a.targetEl, i = a.packedEvent, o = a.model, s = a.view;
      if (!o || !s)
        return !0;
      var l = t.cptQuery, u = t.dataQuery;
      return f(l, o, "mainType") && f(l, o, "subType") && f(l, o, "index", "componentIndex") && f(l, o, "name") && f(l, o, "id") && f(u, i, "name") && f(u, i, "dataIndex") && f(u, i, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, t.otherQuery, n, i));
      function f(h, v, c, p) {
        return h[c] == null || v[p || c] === h[c];
      }
    }, r.prototype.afterTrigger = function() {
      this.eventInfo = null;
    }, r;
  }()
), fd = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], T_ = fd.concat(["symbolKeepAspect"]), _k = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(r, e) {
    var t = r.getData();
    if (r.legendIcon && t.setVisual("legendIcon", r.legendIcon), !r.hasSymbolVisual)
      return;
    for (var a = {}, n = {}, i = !1, o = 0; o < fd.length; o++) {
      var s = fd[o], l = r.get(s);
      q(l) ? (i = !0, n[s] = l) : a[s] = l;
    }
    if (a.symbol = a.symbol || r.defaultSymbol, t.setVisual(V({
      legendIcon: r.legendIcon || a.symbol,
      symbolKeepAspect: r.get("symbolKeepAspect")
    }, a)), e.isSeriesFiltered(r))
      return;
    var u = _t(n);
    function f(h, v) {
      for (var c = r.getRawValue(v), p = r.getDataParams(v), d = 0; d < u.length; d++) {
        var g = u[d];
        h.setItemVisual(v, g, n[g](c, p));
      }
    }
    return {
      dataEach: i ? f : null
    };
  }
}, Sk = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(r, e) {
    if (!r.hasSymbolVisual || e.isSeriesFiltered(r))
      return;
    var t = r.getData();
    function a(n, i) {
      for (var o = n.getItemModel(i), s = 0; s < T_.length; s++) {
        var l = T_[s], u = o.getShallow(l, !0);
        u != null && n.setItemVisual(i, l, u);
      }
    }
    return {
      dataEach: t.hasItemOption ? a : null
    };
  }
};
function Jg(r, e, t) {
  switch (t) {
    case "color":
      var a = r.getItemVisual(e, "style");
      return a[r.getVisual("drawType")];
    case "opacity":
      return r.getItemVisual(e, "style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return r.getItemVisual(e, t);
    default:
      ({}).NODE_ENV !== "production" && console.warn("Unknown visual type " + t);
  }
}
function _l(r, e) {
  switch (e) {
    case "color":
      var t = r.getVisual("style");
      return t[r.getVisual("drawType")];
    case "opacity":
      return r.getVisual("style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return r.getVisual(e);
    default:
      ({}).NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  }
}
function AC(r, e, t, a) {
  switch (t) {
    case "color":
      var n = r.ensureUniqueItemVisual(e, "style");
      n[r.getVisual("drawType")] = a, r.setItemVisual(e, "colorFromPalette", !1);
      break;
    case "opacity":
      r.ensureUniqueItemVisual(e, "style").opacity = a;
      break;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      r.setItemVisual(e, t, a);
      break;
    default:
      ({}).NODE_ENV !== "production" && console.warn("Unknown visual type " + t);
  }
}
function MC(r, e) {
  function t(a, n) {
    var i = [];
    return a.eachComponent({
      mainType: "series",
      subType: r,
      query: n
    }, function(o) {
      i.push(o.seriesIndex);
    }), i;
  }
  C([[r + "ToggleSelect", "toggleSelect"], [r + "Select", "select"], [r + "UnSelect", "unselect"]], function(a) {
    e(a[0], function(n, i, o) {
      n = V({}, n), {}.NODE_ENV !== "production" && Kt(n.type, a[1]), o.dispatchAction(V(n, {
        type: a[1],
        seriesIndex: t(i, n)
      }));
    });
  });
}
function Pi(r, e, t, a, n) {
  var i = r + e;
  t.isSilent(i) || ({}.NODE_ENV !== "production" && Dr("event " + i + " is deprecated."), a.eachComponent({
    mainType: "series",
    subType: "pie"
  }, function(o) {
    for (var s = o.seriesIndex, l = o.option.selectedMap, u = n.selected, f = 0; f < u.length; f++)
      if (u[f].seriesIndex === s) {
        var h = o.getData(), v = fi(h, n.fromActionPayload);
        t.trigger(i, {
          type: i,
          seriesId: o.id,
          name: z(v) ? h.getName(v[0]) : h.getName(v),
          selected: $(l) ? l : V({}, l)
        });
      }
  }));
}
function xk(r, e, t) {
  r.on("selectchanged", function(a) {
    var n = t.getModel();
    a.isFromClick ? (Pi("map", "selectchanged", e, n, a), Pi("pie", "selectchanged", e, n, a)) : a.fromAction === "select" ? (Pi("map", "selected", e, n, a), Pi("pie", "selected", e, n, a)) : a.fromAction === "unselect" && (Pi("map", "unselected", e, n, a), Pi("pie", "unselected", e, n, a));
  });
}
function Xn(r, e, t) {
  for (var a; r && !(e(r) && (a = r, t)); )
    r = r.__hostTarget || r.parent;
  return a;
}
var wk = Math.round(Math.random() * 9), bk = typeof Object.defineProperty == "function", Tk = function() {
  function r() {
    this._id = "__ec_inner_" + wk++;
  }
  return r.prototype.get = function(e) {
    return this._guard(e)[this._id];
  }, r.prototype.set = function(e, t) {
    var a = this._guard(e);
    return bk ? Object.defineProperty(a, this._id, {
      value: t,
      enumerable: !1,
      configurable: !0
    }) : a[this._id] = t, this;
  }, r.prototype.delete = function(e) {
    return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  }, r.prototype.has = function(e) {
    return !!this._guard(e)[this._id];
  }, r.prototype._guard = function(e) {
    if (e !== Object(e))
      throw TypeError("Value of WeakMap is not a non-null object.");
    return e;
  }, r;
}();
const Dk = Tk;
var Ck = gt.extend({
  type: "triangle",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(r, e) {
    var t = e.cx, a = e.cy, n = e.width / 2, i = e.height / 2;
    r.moveTo(t, a - i), r.lineTo(t + n, a + i), r.lineTo(t - n, a + i), r.closePath();
  }
}), Ak = gt.extend({
  type: "diamond",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(r, e) {
    var t = e.cx, a = e.cy, n = e.width / 2, i = e.height / 2;
    r.moveTo(t, a - i), r.lineTo(t + n, a), r.lineTo(t, a + i), r.lineTo(t - n, a), r.closePath();
  }
}), Mk = gt.extend({
  type: "pin",
  shape: {
    // x, y on the cusp
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(r, e) {
    var t = e.x, a = e.y, n = e.width / 5 * 3, i = Math.max(n, e.height), o = n / 2, s = o * o / (i - o), l = a - i + o + s, u = Math.asin(s / o), f = Math.cos(u) * o, h = Math.sin(u), v = Math.cos(u), c = o * 0.6, p = o * 0.7;
    r.moveTo(t - f, l + s), r.arc(t, l, o, Math.PI - u, Math.PI * 2 + u), r.bezierCurveTo(t + f - h * c, l + s + v * c, t, a - p, t, a), r.bezierCurveTo(t, a - p, t - f + h * c, l + s + v * c, t - f, l + s), r.closePath();
  }
}), Ik = gt.extend({
  type: "arrow",
  shape: {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(r, e) {
    var t = e.height, a = e.width, n = e.x, i = e.y, o = a / 3 * 2;
    r.moveTo(n, i), r.lineTo(n + o, i + t), r.lineTo(n, i + t / 4 * 3), r.lineTo(n - o, i + t), r.lineTo(n, i), r.closePath();
  }
}), Lk = {
  line: le,
  rect: bt,
  roundRect: bt,
  square: bt,
  circle: qr,
  diamond: Ak,
  pin: Mk,
  arrow: Ik,
  triangle: Ck
}, Ek = {
  line: function(r, e, t, a, n) {
    n.x1 = r, n.y1 = e + a / 2, n.x2 = r + t, n.y2 = e + a / 2;
  },
  rect: function(r, e, t, a, n) {
    n.x = r, n.y = e, n.width = t, n.height = a;
  },
  roundRect: function(r, e, t, a, n) {
    n.x = r, n.y = e, n.width = t, n.height = a, n.r = Math.min(t, a) / 4;
  },
  square: function(r, e, t, a, n) {
    var i = Math.min(t, a);
    n.x = r, n.y = e, n.width = i, n.height = i;
  },
  circle: function(r, e, t, a, n) {
    n.cx = r + t / 2, n.cy = e + a / 2, n.r = Math.min(t, a) / 2;
  },
  diamond: function(r, e, t, a, n) {
    n.cx = r + t / 2, n.cy = e + a / 2, n.width = t, n.height = a;
  },
  pin: function(r, e, t, a, n) {
    n.x = r + t / 2, n.y = e + a / 2, n.width = t, n.height = a;
  },
  arrow: function(r, e, t, a, n) {
    n.x = r + t / 2, n.y = e + a / 2, n.width = t, n.height = a;
  },
  triangle: function(r, e, t, a, n) {
    n.cx = r + t / 2, n.cy = e + a / 2, n.width = t, n.height = a;
  }
}, Tf = {};
C(Lk, function(r, e) {
  Tf[e] = new r();
});
var Pk = gt.extend({
  type: "symbol",
  shape: {
    symbolType: "",
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  calculateTextPosition: function(r, e, t) {
    var a = hf(r, e, t), n = this.shape;
    return n && n.symbolType === "pin" && e.position === "inside" && (a.y = t.y + t.height * 0.4), a;
  },
  buildPath: function(r, e, t) {
    var a = e.symbolType;
    if (a !== "none") {
      var n = Tf[a];
      n || (a = "rect", n = Tf[a]), Ek[a](e.x, e.y, e.width, e.height, n.shape), n.buildPath(r, n.shape, t);
    }
  }
});
function Rk(r, e) {
  if (this.type !== "image") {
    var t = this.style;
    this.__isEmptyBrush ? (t.stroke = r, t.fill = e || "#fff", t.lineWidth = 2) : this.shape.symbolType === "line" ? t.stroke = r : t.fill = r, this.markRedraw();
  }
}
function Jt(r, e, t, a, n, i, o) {
  var s = r.indexOf("empty") === 0;
  s && (r = r.substr(5, 1).toLowerCase() + r.substr(6));
  var l;
  return r.indexOf("image://") === 0 ? l = pD(r.slice(8), new ht(e, t, a, n), o ? "center" : "cover") : r.indexOf("path://") === 0 ? l = Sh(r.slice(7), {}, new ht(e, t, a, n), o ? "center" : "cover") : l = new Pk({
    shape: {
      symbolType: r,
      x: e,
      y: t,
      width: a,
      height: n
    }
  }), l.__isEmptyBrush = s, l.setColor = Rk, i && l.setColor(i), l;
}
function Sl(r) {
  return z(r) || (r = [+r, +r]), [r[0] || 0, r[1] || 0];
}
function Oo(r, e) {
  if (r != null)
    return z(r) || (r = [r, r]), [H(r[0], e[0]) || 0, H(ut(r[1], r[0]), e[1]) || 0];
}
function qn(r) {
  return isFinite(r);
}
function Nk(r, e, t) {
  var a = e.x == null ? 0 : e.x, n = e.x2 == null ? 1 : e.x2, i = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
  e.global || (a = a * t.width + t.x, n = n * t.width + t.x, i = i * t.height + t.y, o = o * t.height + t.y), a = qn(a) ? a : 0, n = qn(n) ? n : 1, i = qn(i) ? i : 0, o = qn(o) ? o : 0;
  var s = r.createLinearGradient(a, i, n, o);
  return s;
}
function Ok(r, e, t) {
  var a = t.width, n = t.height, i = Math.min(a, n), 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 * a + t.x, s = s * n + t.y, l = l * i), o = qn(o) ? o : 0.5, s = qn(s) ? s : 0.5, l = l >= 0 && qn(l) ? l : 0.5;
  var u = r.createRadialGradient(o, s, 0, o, s, l);
  return u;
}
function hd(r, e, t) {
  for (var a = e.type === "radial" ? Ok(r, e, t) : Nk(r, e, t), n = e.colorStops, i = 0; i < n.length; i++)
    a.addColorStop(n[i].offset, n[i].color);
  return a;
}
function kk(r, e) {
  if (r === e || !r && !e)
    return !1;
  if (!r || !e || r.length !== e.length)
    return !0;
  for (var t = 0; t < r.length; t++)
    if (r[t] !== e[t])
      return !0;
  return !1;
}
function ru(r) {
  return parseInt(r, 10);
}
function Ji(r, e, t) {
  var a = ["width", "height"][e], n = ["clientWidth", "clientHeight"][e], i = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  if (t[a] != null && t[a] !== "auto")
    return parseFloat(t[a]);
  var s = document.defaultView.getComputedStyle(r);
  return (r[n] || ru(s[a]) || ru(r.style[a])) - (ru(s[i]) || 0) - (ru(s[o]) || 0) | 0;
}
function Vk(r, e) {
  return !r || r === "solid" || !(e > 0) ? null : r === "dashed" ? [4 * e, 2 * e] : r === "dotted" ? [e] : Ct(r) ? [r] : z(r) ? r : null;
}
function ty(r) {
  var e = r.style, t = e.lineDash && e.lineWidth > 0 && Vk(e.lineDash, e.lineWidth), a = e.lineDashOffset;
  if (t) {
    var n = e.strokeNoScale && r.getLineScale ? r.getLineScale() : 1;
    n && n !== 1 && (t = G(t, function(i) {
      return i / n;
    }), a /= n);
  }
  return [t, a];
}
var Bk = new Xr(!0);
function Df(r) {
  var e = r.stroke;
  return !(e == null || e === "none" || !(r.lineWidth > 0));
}
function D_(r) {
  return typeof r == "string" && r !== "none";
}
function Cf(r) {
  var e = r.fill;
  return e != null && e !== "none";
}
function C_(r, e) {
  if (e.fillOpacity != null && e.fillOpacity !== 1) {
    var t = r.globalAlpha;
    r.globalAlpha = e.fillOpacity * e.opacity, r.fill(), r.globalAlpha = t;
  } else
    r.fill();
}
function A_(r, e) {
  if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
    var t = r.globalAlpha;
    r.globalAlpha = e.strokeOpacity * e.opacity, r.stroke(), r.globalAlpha = t;
  } else
    r.stroke();
}
function vd(r, e, t) {
  var a = Tg(e.image, e.__image, t);
  if (ch(a)) {
    var n = r.createPattern(a, e.repeat || "repeat");
    if (typeof DOMMatrix == "function" && n && n.setTransform) {
      var i = new DOMMatrix();
      i.translateSelf(e.x || 0, e.y || 0), i.rotateSelf(0, 0, (e.rotation || 0) * Ou), i.scaleSelf(e.scaleX || 1, e.scaleY || 1), n.setTransform(i);
    }
    return n;
  }
}
function zk(r, e, t, a) {
  var n, i = Df(t), o = Cf(t), s = t.strokePercent, l = s < 1, u = !e.path;
  (!e.silent || l) && u && e.createPathProxy();
  var f = e.path || Bk, h = e.__dirty;
  if (!a) {
    var v = t.fill, c = t.stroke, p = o && !!v.colorStops, d = i && !!c.colorStops, g = o && !!v.image, y = i && !!c.image, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0;
    (p || d) && (x = e.getBoundingRect()), p && (m = h ? hd(r, v, x) : e.__canvasFillGradient, e.__canvasFillGradient = m), d && (_ = h ? hd(r, c, x) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = _), g && (S = h || !e.__canvasFillPattern ? vd(r, v, e) : e.__canvasFillPattern, e.__canvasFillPattern = S), y && (w = h || !e.__canvasStrokePattern ? vd(r, c, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = S), p ? r.fillStyle = m : g && (S ? r.fillStyle = S : o = !1), d ? r.strokeStyle = _ : y && (w ? r.strokeStyle = w : i = !1);
  }
  var b = e.getGlobalScale();
  f.setScale(b[0], b[1], e.segmentIgnoreThreshold);
  var T, D;
  r.setLineDash && t.lineDash && (n = ty(e), T = n[0], D = n[1]);
  var A = !0;
  (u || h & Yi) && (f.setDPR(r.dpr), l ? f.setContext(null) : (f.setContext(r), A = !1), f.reset(), e.buildPath(f, e.shape, a), f.toStatic(), e.pathUpdated()), A && f.rebuildPath(r, l ? s : 1), T && (r.setLineDash(T), r.lineDashOffset = D), a || (t.strokeFirst ? (i && A_(r, t), o && C_(r, t)) : (o && C_(r, t), i && A_(r, t))), T && r.setLineDash([]);
}
function Gk(r, e, t) {
  var a = e.__image = Tg(t.image, e.__image, e, e.onload);
  if (!(!a || !ch(a))) {
    var n = t.x || 0, i = t.y || 0, o = e.getWidth(), s = e.getHeight(), l = a.width / a.height;
    if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = a.width, s = a.height), t.sWidth && t.sHeight) {
      var u = t.sx || 0, f = t.sy || 0;
      r.drawImage(a, u, f, t.sWidth, t.sHeight, n, i, o, s);
    } else if (t.sx && t.sy) {
      var u = t.sx, f = t.sy, h = o - u, v = s - f;
      r.drawImage(a, u, f, h, v, n, i, o, s);
    } else
      r.drawImage(a, n, i, o, s);
  }
}
function Fk(r, e, t) {
  var a, n = t.text;
  if (n != null && (n += ""), n) {
    r.font = t.font || Xa, r.textAlign = t.textAlign, r.textBaseline = t.textBaseline;
    var i = void 0, o = void 0;
    r.setLineDash && t.lineDash && (a = ty(e), i = a[0], o = a[1]), i && (r.setLineDash(i), r.lineDashOffset = o), t.strokeFirst ? (Df(t) && r.strokeText(n, t.x, t.y), Cf(t) && r.fillText(n, t.x, t.y)) : (Cf(t) && r.fillText(n, t.x, t.y), Df(t) && r.strokeText(n, t.x, t.y)), i && r.setLineDash([]);
  }
}
var M_ = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], I_ = [
  ["lineCap", "butt"],
  ["lineJoin", "miter"],
  ["miterLimit", 10]
];
function IC(r, e, t, a, n) {
  var i = !1;
  if (!a && (t = t || {}, e === t))
    return !1;
  if (a || e.opacity !== t.opacity) {
    Oe(r, n), i = !0;
    var o = Math.max(Math.min(e.opacity, 1), 0);
    r.globalAlpha = isNaN(o) ? ti.opacity : o;
  }
  (a || e.blend !== t.blend) && (i || (Oe(r, n), i = !0), r.globalCompositeOperation = e.blend || ti.blend);
  for (var s = 0; s < M_.length; s++) {
    var l = M_[s];
    (a || e[l] !== t[l]) && (i || (Oe(r, n), i = !0), r[l] = r.dpr * (e[l] || 0));
  }
  return (a || e.shadowColor !== t.shadowColor) && (i || (Oe(r, n), i = !0), r.shadowColor = e.shadowColor || ti.shadowColor), i;
}
function L_(r, e, t, a, n) {
  var i = Qs(e, n.inHover), o = a ? null : t && Qs(t, n.inHover) || {};
  if (i === o)
    return !1;
  var s = IC(r, i, o, a, n);
  if ((a || i.fill !== o.fill) && (s || (Oe(r, n), s = !0), D_(i.fill) && (r.fillStyle = i.fill)), (a || i.stroke !== o.stroke) && (s || (Oe(r, n), s = !0), D_(i.stroke) && (r.strokeStyle = i.stroke)), (a || i.opacity !== o.opacity) && (s || (Oe(r, n), s = !0), r.globalAlpha = i.opacity == null ? 1 : i.opacity), e.hasStroke()) {
    var l = i.lineWidth, u = l / (i.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
    r.lineWidth !== u && (s || (Oe(r, n), s = !0), r.lineWidth = u);
  }
  for (var f = 0; f < I_.length; f++) {
    var h = I_[f], v = h[0];
    (a || i[v] !== o[v]) && (s || (Oe(r, n), s = !0), r[v] = i[v] || h[1]);
  }
  return s;
}
function Hk(r, e, t, a, n) {
  return IC(r, Qs(e, n.inHover), t && Qs(t, n.inHover), a, n);
}
function LC(r, e) {
  var t = e.transform, a = r.dpr || 1;
  t ? r.setTransform(a * t[0], a * t[1], a * t[2], a * t[3], a * t[4], a * t[5]) : r.setTransform(a, 0, 0, a, 0, 0);
}
function Wk(r, e, t) {
  for (var a = !1, n = 0; n < r.length; n++) {
    var i = r[n];
    a = a || i.isZeroArea(), LC(e, i), e.beginPath(), i.buildPath(e, i.shape), e.clip();
  }
  t.allClipped = a;
}
function $k(r, e) {
  return r && e ? r[0] !== e[0] || r[1] !== e[1] || r[2] !== e[2] || r[3] !== e[3] || r[4] !== e[4] || r[5] !== e[5] : !(!r && !e);
}
var E_ = 1, P_ = 2, R_ = 3, N_ = 4;
function Uk(r) {
  var e = Cf(r), t = Df(r);
  return !(r.lineDash || !(+e ^ +t) || e && typeof r.fill != "string" || t && typeof r.stroke != "string" || r.strokePercent < 1 || r.strokeOpacity < 1 || r.fillOpacity < 1);
}
function Oe(r, e) {
  e.batchFill && r.fill(), e.batchStroke && r.stroke(), e.batchFill = "", e.batchStroke = "";
}
function Qs(r, e) {
  return e && r.__hoverStyle || r.style;
}
function EC(r, e) {
  Kn(r, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
}
function Kn(r, e, t, a) {
  var n = e.transform;
  if (!e.shouldBePainted(t.viewWidth, t.viewHeight, !1, !1)) {
    e.__dirty &= ~We, e.__isRendered = !1;
    return;
  }
  var i = e.__clipPaths, o = t.prevElClipPaths, s = !1, l = !1;
  if ((!o || kk(i, o)) && (o && o.length && (Oe(r, t), r.restore(), l = s = !0, t.prevElClipPaths = null, t.allClipped = !1, t.prevEl = null), i && i.length && (Oe(r, t), r.save(), Wk(i, r, t), s = !0), t.prevElClipPaths = i), t.allClipped) {
    e.__isRendered = !1;
    return;
  }
  e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  var u = t.prevEl;
  u || (l = s = !0);
  var f = e instanceof gt && e.autoBatch && Uk(e.style);
  s || $k(n, u.transform) ? (Oe(r, t), LC(r, e)) : f || Oe(r, t);
  var h = Qs(e, t.inHover);
  e instanceof gt ? (t.lastDrawType !== E_ && (l = !0, t.lastDrawType = E_), L_(r, e, u, l, t), (!f || !t.batchFill && !t.batchStroke) && r.beginPath(), zk(r, e, h, f), f && (t.batchFill = h.fill || "", t.batchStroke = h.stroke || "")) : e instanceof Ws ? (t.lastDrawType !== R_ && (l = !0, t.lastDrawType = R_), L_(r, e, u, l, t), Fk(r, e, h)) : e instanceof de ? (t.lastDrawType !== P_ && (l = !0, t.lastDrawType = P_), Hk(r, e, u, l, t), Gk(r, e, h)) : e.getTemporalDisplayables && (t.lastDrawType !== N_ && (l = !0, t.lastDrawType = N_), Yk(r, e, t)), f && a && Oe(r, t), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), t.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
}
function Yk(r, e, t) {
  var a = e.getDisplayables(), n = e.getTemporalDisplayables();
  r.save();
  var i = {
    prevElClipPaths: null,
    prevEl: null,
    allClipped: !1,
    viewWidth: t.viewWidth,
    viewHeight: t.viewHeight,
    inHover: t.inHover
  }, o, s;
  for (o = e.getCursor(), s = a.length; o < s; o++) {
    var l = a[o];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Kn(r, l, i, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), i.prevEl = l;
  }
  for (var u = 0, f = n.length; u < f; u++) {
    var l = n[u];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Kn(r, l, i, u === f - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), i.prevEl = l;
  }
  e.clearTemporalDisplayables(), e.notClear = !0, r.restore();
}
var Hv = new Dk(), O_ = new hl(100), k_ = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
function ho(r, e) {
  if (r === "none")
    return null;
  var t = e.getDevicePixelRatio(), a = e.getZr(), n = a.painter.type === "svg";
  r.dirty && Hv.delete(r);
  var i = Hv.get(r);
  if (i)
    return i;
  var o = tt(r, {
    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 = n ? 1 : 1 / t, Hv.set(r, s), r.dirty = !1, s;
  function l(u) {
    for (var f = [t], h = !0, v = 0; v < k_.length; ++v) {
      var c = o[k_[v]];
      if (c != null && !z(c) && !$(c) && !Ct(c) && typeof c != "boolean") {
        h = !1;
        break;
      }
      f.push(c);
    }
    var p;
    if (h) {
      p = f.join(",") + (n ? "-svg" : "");
      var d = O_.get(p);
      d && (n ? u.svgElement = d : u.image = d);
    }
    var g = RC(o.dashArrayX), y = Zk(o.dashArrayY), m = PC(o.symbol), _ = Xk(g), S = NC(y), w = !n && qa.createCanvas(), x = n && {
      tag: "g",
      attrs: {},
      key: "dcl",
      children: []
    }, b = D(), T;
    w && (w.width = b.width * t, w.height = b.height * t, T = w.getContext("2d")), A(), h && O_.put(p, w || x), u.image = w, u.svgElement = x, u.svgWidth = b.width, u.svgHeight = b.height;
    function D() {
      for (var M = 1, I = 0, L = _.length; I < L; ++I)
        M = Xm(M, _[I]);
      for (var E = 1, I = 0, L = m.length; I < L; ++I)
        E = Xm(E, m[I].length);
      M *= E;
      var P = S * _.length * m.length;
      if ({}.NODE_ENV !== "production") {
        var R = function(k) {
          console.warn("Calculated decal size is greater than " + k + " due to decal option settings so " + k + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + k + " to be larger to avoid incontinuity.");
        };
        M > o.maxTileWidth && R("maxTileWidth"), P > o.maxTileHeight && R("maxTileHeight");
      }
      return {
        width: Math.max(1, Math.min(M, o.maxTileWidth)),
        height: Math.max(1, Math.min(P, o.maxTileHeight))
      };
    }
    function A() {
      T && (T.clearRect(0, 0, w.width, w.height), o.backgroundColor && (T.fillStyle = o.backgroundColor, T.fillRect(0, 0, w.width, w.height)));
      for (var M = 0, I = 0; I < y.length; ++I)
        M += y[I];
      if (M <= 0)
        return;
      for (var L = -S, E = 0, P = 0, R = 0; L < b.height; ) {
        if (E % 2 === 0) {
          for (var k = P / 2 % m.length, O = 0, B = 0, F = 0; O < b.width * 2; ) {
            for (var W = 0, I = 0; I < g[R].length; ++I)
              W += g[R][I];
            if (W <= 0)
              break;
            if (B % 2 === 0) {
              var Z = (1 - o.symbolSize) * 0.5, J = O + g[R][B] * Z, et = L + y[E] * Z, yt = g[R][B] * o.symbolSize, At = y[E] * o.symbolSize, dt = F / 2 % m[k].length;
              at(J, et, yt, At, m[k][dt]);
            }
            O += g[R][B], ++F, ++B, B === g[R].length && (B = 0);
          }
          ++R, R === g.length && (R = 0);
        }
        L += y[E], ++P, ++E, E === y.length && (E = 0);
      }
      function at(mt, vt, X, st, zt) {
        var xt = n ? 1 : t, Ut = Jt(zt, mt * xt, vt * xt, X * xt, st * xt, o.color, o.symbolKeepAspect);
        if (n) {
          var Ht = a.painter.renderOneToVNode(Ut);
          Ht && x.children.push(Ht);
        } else
          EC(T, Ut);
      }
    }
  }
}
function PC(r) {
  if (!r || r.length === 0)
    return [["rect"]];
  if ($(r))
    return [[r]];
  for (var e = !0, t = 0; t < r.length; ++t)
    if (!$(r[t])) {
      e = !1;
      break;
    }
  if (e)
    return PC([r]);
  for (var a = [], t = 0; t < r.length; ++t)
    $(r[t]) ? a.push([r[t]]) : a.push(r[t]);
  return a;
}
function RC(r) {
  if (!r || r.length === 0)
    return [[0, 0]];
  if (Ct(r)) {
    var e = Math.ceil(r);
    return [[e, e]];
  }
  for (var t = !0, a = 0; a < r.length; ++a)
    if (!Ct(r[a])) {
      t = !1;
      break;
    }
  if (t)
    return RC([r]);
  for (var n = [], a = 0; a < r.length; ++a)
    if (Ct(r[a])) {
      var e = Math.ceil(r[a]);
      n.push([e, e]);
    } else {
      var e = G(r[a], function(s) {
        return Math.ceil(s);
      });
      e.length % 2 === 1 ? n.push(e.concat(e)) : n.push(e);
    }
  return n;
}
function Zk(r) {
  if (!r || typeof r == "object" && r.length === 0)
    return [0, 0];
  if (Ct(r)) {
    var e = Math.ceil(r);
    return [e, e];
  }
  var t = G(r, function(a) {
    return Math.ceil(a);
  });
  return r.length % 2 ? t.concat(t) : t;
}
function Xk(r) {
  return G(r, function(e) {
    return NC(e);
  });
}
function NC(r) {
  for (var e = 0, t = 0; t < r.length; ++t)
    e += r[t];
  return r.length % 2 === 1 ? e * 2 : e;
}
function qk(r, e) {
  r.eachRawSeries(function(t) {
    if (!r.isSeriesFiltered(t)) {
      var a = t.getData();
      a.hasItemVisual() && a.each(function(o) {
        var s = a.getItemVisual(o, "decal");
        if (s) {
          var l = a.ensureUniqueItemVisual(o, "style");
          l.decal = ho(s, e);
        }
      });
      var n = a.getVisual("decal");
      if (n) {
        var i = a.getVisual("style");
        i.decal = ho(n, e);
      }
    }
  });
}
var Kk = new fr();
const gr = Kk;
var Af = {};
function jk(r, e) {
  ({}).NODE_ENV !== "production" && Af[r] && ve("Already has an implementation of " + r + "."), Af[r] = e;
}
function Qk(r) {
  return {}.NODE_ENV !== "production" && (Af[r] || ve("Implementation of " + r + " doesn't exists.")), Af[r];
}
var Jk = 1, tV = 800, eV = 900, rV = 1e3, aV = 2e3, nV = 5e3, OC = 1e3, iV = 1100, ey = 2e3, kC = 3e3, oV = 4e3, Ph = 4500, sV = 4600, lV = 5e3, uV = 6e3, VC = 7e3, fV = {
  PROCESSOR: {
    FILTER: rV,
    SERIES_FILTER: tV,
    STATISTIC: nV
  },
  VISUAL: {
    LAYOUT: OC,
    PROGRESSIVE_LAYOUT: iV,
    GLOBAL: ey,
    CHART: kC,
    POST_CHART_LAYOUT: sV,
    COMPONENT: oV,
    BRUSH: lV,
    CHART_ITEM: Ph,
    ARIA: uV,
    DECAL: VC
  }
}, me = "__flagInMainProcess", Ee = "__pendingUpdate", Wv = "__needsUpdateStatus", V_ = /^[a-zA-Z0-9_]+$/, $v = "__connectUpdateStatus", B_ = 0, hV = 1, vV = 2;
function BC(r) {
  return function() {
    for (var e = [], t = 0; t < arguments.length; t++)
      e[t] = arguments[t];
    if (this.isDisposed()) {
      He(this.id);
      return;
    }
    return GC(this, r, e);
  };
}
function zC(r) {
  return function() {
    for (var e = [], t = 0; t < arguments.length; t++)
      e[t] = arguments[t];
    return GC(this, r, e);
  };
}
function GC(r, e, t) {
  return t[0] = t[0] && t[0].toLowerCase(), fr.prototype[e].apply(r, t);
}
var FC = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e;
  }(fr)
), HC = FC.prototype;
HC.on = zC("on");
HC.off = zC("off");
var Ri, Uv, au, Aa, Yv, Zv, Xv, Ko, jo, z_, G_, qv, F_, nu, H_, WC, Ze, W_, Mf = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this, new mk()) || this;
      i._chartsViews = [], i._chartsMap = {}, i._componentsViews = [], i._componentsMap = {}, i._pendingActions = [], n = n || {}, $(a) && (a = $C[a]), i._dom = t;
      var o = "canvas", s = "auto", l = !1;
      if ({}.NODE_ENV !== "production") {
        var u = (
          /* eslint-disable-next-line */
          wt.hasGlobalWindow ? window : global
        );
        o = u.__ECHARTS__DEFAULT__RENDERER__ || o, s = ut(u.__ECHARTS__DEFAULT__COARSE_POINTER, s);
        var f = u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__;
        l = f ?? l;
      }
      var h = i._zr = $m(t, {
        renderer: n.renderer || o,
        devicePixelRatio: n.devicePixelRatio,
        width: n.width,
        height: n.height,
        ssr: n.ssr,
        useDirtyRect: ut(n.useDirtyRect, l),
        useCoarsePointer: ut(n.useCoarsePointer, s),
        pointerSize: n.pointerSize
      });
      i._ssr = n.ssr, i._throttledZrFlush = Qg(Y(h.flush, h), 17), a = rt(a), a && jD(a, !0), i._theme = a, i._locale = bN(n.locale || DD), i._coordSysMgr = new Po();
      var v = i._api = H_(i);
      function c(p, d) {
        return p.__prio - d.__prio;
      }
      return Bu(Lf, c), Bu(cd, c), i._scheduler = new DC(i, v, cd, Lf), i._messageCenter = new FC(), i._initEvents(), i.resize = Y(i.resize, i), h.animation.on("frame", i._onframe, i), z_(h, i), G_(h, i), rf(i), i;
    }
    return e.prototype._onframe = function() {
      if (!this._disposed) {
        W_(this);
        var t = this._scheduler;
        if (this[Ee]) {
          var a = this[Ee].silent;
          this[me] = !0;
          try {
            Ri(this), Aa.update.call(this, null, this[Ee].updateParams);
          } catch (l) {
            throw this[me] = !1, this[Ee] = null, l;
          }
          this._zr.flush(), this[me] = !1, this[Ee] = null, Ko.call(this, a), jo.call(this, a);
        } else if (t.unfinished) {
          var n = Jk, i = this._model, o = this._api;
          t.unfinished = !1;
          do {
            var s = +/* @__PURE__ */ new Date();
            t.performSeriesTasks(i), t.performDataProcessorTasks(i), Zv(this, i), t.performVisualTasks(i), nu(this, this._model, o, "remain", {}), n -= +/* @__PURE__ */ new Date() - s;
          } while (n > 0 && t.unfinished);
          t.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(t, a, n) {
      if (this[me]) {
        ({}).NODE_ENV !== "production" && ve("`setOption` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        He(this.id);
        return;
      }
      var i, o, s;
      if (j(a) && (n = a.lazyUpdate, i = a.silent, o = a.replaceMerge, s = a.transition, a = a.notMerge), this[me] = !0, !this._model || a) {
        var l = new aO(this._api), u = this._theme, f = this._model = new XD();
        f.scheduler = this._scheduler, f.ssr = this._ssr, f.init(null, null, null, u, this._locale, l);
      }
      this._model.setOption(t, {
        replaceMerge: o
      }, pd);
      var h = {
        seriesTransition: s,
        optionChanged: !0
      };
      if (n)
        this[Ee] = {
          silent: i,
          updateParams: h
        }, this[me] = !1, this.getZr().wakeUp();
      else {
        try {
          Ri(this), Aa.update.call(this, null, h);
        } catch (v) {
          throw this[Ee] = null, this[me] = !1, v;
        }
        this._ssr || this._zr.flush(), this[Ee] = null, this[me] = !1, Ko.call(this, i), jo.call(this, i);
      }
    }, e.prototype.setTheme = function() {
      Dr("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 || wt.hasGlobalWindow && window.devicePixelRatio || 1;
    }, e.prototype.getRenderedCanvas = function(t) {
      return {}.NODE_ENV !== "production" && Kt("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(t);
    }, e.prototype.renderToCanvas = function(t) {
      t = t || {};
      var a = this._zr.painter;
      if ({}.NODE_ENV !== "production" && a.type !== "canvas")
        throw new Error("renderToCanvas can only be used in the canvas renderer.");
      return a.getRenderedCanvas({
        backgroundColor: t.backgroundColor || this._model.get("backgroundColor"),
        pixelRatio: t.pixelRatio || this.getDevicePixelRatio()
      });
    }, e.prototype.renderToSVGString = function(t) {
      t = t || {};
      var a = this._zr.painter;
      if ({}.NODE_ENV !== "production" && a.type !== "svg")
        throw new Error("renderToSVGString can only be used in the svg renderer.");
      return a.renderToString({
        useViewBox: t.useViewBox
      });
    }, e.prototype.getSvgDataURL = function() {
      if (wt.svgSupported) {
        var t = this._zr, a = t.storage.getDisplayList();
        return C(a, function(n) {
          n.stopAnimation(null, !0);
        }), t.painter.toDataURL();
      }
    }, e.prototype.getDataURL = function(t) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      t = t || {};
      var a = t.excludeComponents, n = this._model, i = [], o = this;
      C(a, function(l) {
        n.eachComponent({
          mainType: l
        }, function(u) {
          var f = o._componentsMap[u.__viewId];
          f.group.ignore || (i.push(f), f.group.ignore = !0);
        });
      });
      var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png"));
      return C(i, function(l) {
        l.group.ignore = !1;
      }), s;
    }, e.prototype.getConnectedDataURL = function(t) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      var a = t.type === "svg", n = this.group, i = Math.min, o = Math.max, s = 1 / 0;
      if ($_[n]) {
        var l = s, u = s, f = -s, h = -s, v = [], c = t && t.pixelRatio || this.getDevicePixelRatio();
        C(io, function(_, S) {
          if (_.group === n) {
            var w = a ? _.getZr().painter.getSvgDom().innerHTML : _.renderToCanvas(rt(t)), x = _.getDom().getBoundingClientRect();
            l = i(x.left, l), u = i(x.top, u), f = o(x.right, f), h = o(x.bottom, h), v.push({
              dom: w,
              left: x.left,
              top: x.top
            });
          }
        }), l *= c, u *= c, f *= c, h *= c;
        var p = f - l, d = h - u, g = qa.createCanvas(), y = $m(g, {
          renderer: a ? "svg" : "canvas"
        });
        if (y.resize({
          width: p,
          height: d
        }), a) {
          var m = "";
          return C(v, function(_) {
            var S = _.left - l, w = _.top - u;
            m += '<g transform="translate(' + S + "," + w + ')">' + _.dom + "</g>";
          }), y.painter.getSvgRoot().innerHTML = m, t.connectedBackgroundColor && y.painter.setBackgroundColor(t.connectedBackgroundColor), y.refreshImmediately(), y.painter.toDataURL();
        } else
          return t.connectedBackgroundColor && y.add(new bt({
            shape: {
              x: 0,
              y: 0,
              width: p,
              height: d
            },
            style: {
              fill: t.connectedBackgroundColor
            }
          })), C(v, function(_) {
            var S = new de({
              style: {
                x: _.left * c - l,
                y: _.top * c - u,
                image: _.dom
              }
            });
            y.add(S);
          }), y.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"));
      } else
        return this.getDataURL(t);
    }, e.prototype.convertToPixel = function(t, a) {
      return Yv(this, "convertToPixel", t, a);
    }, e.prototype.convertFromPixel = function(t, a) {
      return Yv(this, "convertFromPixel", t, a);
    }, e.prototype.containPixel = function(t, a) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      var n = this._model, i, o = Is(n, t);
      return C(o, function(s, l) {
        l.indexOf("Models") >= 0 && C(s, function(u) {
          var f = u.coordinateSystem;
          if (f && f.containPoint)
            i = i || !!f.containPoint(a);
          else if (l === "seriesModels") {
            var h = this._chartsMap[u.__viewId];
            h && h.containPoint ? i = i || h.containPoint(a, u) : {}.NODE_ENV !== "production" && Ft(l + ": " + (h ? "The found component do not support containPoint." : "No view mapping to the found component."));
          } else
            ({}).NODE_ENV !== "production" && Ft(l + ": containPoint is not supported");
        }, this);
      }, this), !!i;
    }, e.prototype.getVisual = function(t, a) {
      var n = this._model, i = Is(n, t, {
        defaultMainType: "series"
      }), o = i.seriesModel;
      ({}).NODE_ENV !== "production" && (o || Ft("There is no specified series model"));
      var s = o.getData(), l = i.hasOwnProperty("dataIndexInside") ? i.dataIndexInside : i.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(i.dataIndex) : null;
      return l != null ? Jg(s, l, a) : _l(s, a);
    }, e.prototype.getViewOfComponentModel = function(t) {
      return this._componentsMap[t.__viewId];
    }, e.prototype.getViewOfSeriesModel = function(t) {
      return this._chartsMap[t.__viewId];
    }, e.prototype._initEvents = function() {
      var t = this;
      C(cV, function(a) {
        var n = function(i) {
          var o = t.getModel(), s = i.target, l, u = a === "globalout";
          if (u ? l = {} : s && Xn(s, function(p) {
            var d = it(p);
            if (d && d.dataIndex != null) {
              var g = d.dataModel || o.getSeriesByIndex(d.seriesIndex);
              return l = g && g.getDataParams(d.dataIndex, d.dataType) || {}, !0;
            } else if (d.eventData)
              return l = V({}, d.eventData), !0;
          }, !0), l) {
            var f = l.componentType, h = l.componentIndex;
            (f === "markLine" || f === "markPoint" || f === "markArea") && (f = "series", h = l.seriesIndex);
            var v = f && h != null && o.getComponent(f, h), c = v && t[v.mainType === "series" ? "_chartsMap" : "_componentsMap"][v.__viewId];
            ({}).NODE_ENV !== "production" && !u && !(v && c) && Ft("model or view can not be found by params"), l.event = i, l.type = a, t._$eventProcessor.eventInfo = {
              targetEl: s,
              packedEvent: l,
              model: v,
              view: c
            }, t.trigger(a, l);
          }
        };
        n.zrEventfulCallAtLast = !0, t._zr.on(a, n, t);
      }), C(Os, function(a, n) {
        t._messageCenter.on(n, function(i) {
          this.trigger(n, i);
        }, t);
      }), C(["selectchanged"], function(a) {
        t._messageCenter.on(a, function(n) {
          this.trigger(a, n);
        }, t);
      }), xk(this._messageCenter, this, this._api);
    }, e.prototype.isDisposed = function() {
      return this._disposed;
    }, e.prototype.clear = function() {
      if (this._disposed) {
        He(this.id);
        return;
      }
      this.setOption({
        series: []
      }, !0);
    }, e.prototype.dispose = function() {
      if (this._disposed) {
        He(this.id);
        return;
      }
      this._disposed = !0;
      var t = this.getDom();
      t && wT(this.getDom(), ay, "");
      var a = this, n = a._api, i = a._model;
      C(a._componentsViews, function(o) {
        o.dispose(i, n);
      }), C(a._chartsViews, function(o) {
        o.dispose(i, n);
      }), a._zr.dispose(), a._dom = a._model = a._chartsMap = a._componentsMap = a._chartsViews = a._componentsViews = a._scheduler = a._api = a._zr = a._throttledZrFlush = a._theme = a._coordSysMgr = a._messageCenter = null, delete io[a.id];
    }, e.prototype.resize = function(t) {
      if (this[me]) {
        ({}).NODE_ENV !== "production" && ve("`resize` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        He(this.id);
        return;
      }
      this._zr.resize(t);
      var a = this._model;
      if (this._loadingFX && this._loadingFX.resize(), !!a) {
        var n = a.resetOption("media"), i = t && t.silent;
        this[Ee] && (i == null && (i = this[Ee].silent), n = !0, this[Ee] = null), this[me] = !0;
        try {
          n && Ri(this), Aa.update.call(this, {
            type: "resize",
            animation: V({
              // Disable animation
              duration: 0
            }, t && t.animation)
          });
        } catch (o) {
          throw this[me] = !1, o;
        }
        this[me] = !1, Ko.call(this, i), jo.call(this, i);
      }
    }, e.prototype.showLoading = function(t, a) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      if (j(t) && (a = t, t = ""), t = t || "default", this.hideLoading(), !dd[t]) {
        ({}).NODE_ENV !== "production" && Ft("Loading effects " + t + " not exists.");
        return;
      }
      var n = dd[t](this._api, a), i = this._zr;
      this._loadingFX = n, i.add(n);
    }, e.prototype.hideLoading = function() {
      if (this._disposed) {
        He(this.id);
        return;
      }
      this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
    }, e.prototype.makeActionFromEvent = function(t) {
      var a = V({}, t);
      return a.type = Os[t.type], a;
    }, e.prototype.dispatchAction = function(t, a) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      if (j(a) || (a = {
        silent: !!a
      }), !!If[t.type] && this._model) {
        if (this[me]) {
          this._pendingActions.push(t);
          return;
        }
        var n = a.silent;
        Xv.call(this, t, n);
        var i = a.flush;
        i ? this._zr.flush() : i !== !1 && wt.browser.weChat && this._throttledZrFlush(), Ko.call(this, n), jo.call(this, n);
      }
    }, e.prototype.updateLabelLayout = function() {
      gr.trigger("series:layoutlabels", this._model, this._api, {
        // Not adding series labels.
        // TODO
        updatedSeries: []
      });
    }, e.prototype.appendData = function(t) {
      if (this._disposed) {
        He(this.id);
        return;
      }
      var a = t.seriesIndex, n = this.getModel(), i = n.getSeriesByIndex(a);
      ({}).NODE_ENV !== "production" && Q(t.data && i), i.appendData(t), this._scheduler.unfinished = !0, this.getZr().wakeUp();
    }, e.internalField = function() {
      Ri = function(h) {
        var v = h._scheduler;
        v.restorePipelines(h._model), v.prepareStageTasks(), Uv(h, !0), Uv(h, !1), v.plan();
      }, Uv = function(h, v) {
        for (var c = h._model, p = h._scheduler, d = v ? h._componentsViews : h._chartsViews, g = v ? h._componentsMap : h._chartsMap, y = h._zr, m = h._api, _ = 0; _ < d.length; _++)
          d[_].__alive = !1;
        v ? c.eachComponent(function(x, b) {
          x !== "series" && S(b);
        }) : c.eachSeries(S);
        function S(x) {
          var b = x.__requireNewView;
          x.__requireNewView = !1;
          var T = "_ec_" + x.id + "_" + x.type, D = !b && g[T];
          if (!D) {
            var A = Gr(x.type), M = v ? $t.getClass(A.main, A.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.
              Vt.getClass(A.sub)
            );
            ({}).NODE_ENV !== "production" && Q(M, A.sub + " does not exist."), D = new M(), D.init(c, m), g[T] = D, d.push(D), y.add(D.group);
          }
          x.__viewId = D.__id = T, D.__alive = !0, D.__model = x, D.group.__ecComponentInfo = {
            mainType: x.mainType,
            index: x.componentIndex
          }, !v && p.prepareView(D, x, c, m);
        }
        for (var _ = 0; _ < d.length; ) {
          var w = d[_];
          w.__alive ? _++ : (!v && w.renderTask.dispose(), y.remove(w.group), w.dispose(c, m), d.splice(_, 1), g[w.__id] === w && delete g[w.__id], w.__id = w.group.__ecComponentInfo = null);
        }
      }, au = function(h, v, c, p, d) {
        var g = h._model;
        if (g.setUpdatePayload(c), !p) {
          C([].concat(h._componentsViews).concat(h._chartsViews), w);
          return;
        }
        var y = {};
        y[p + "Id"] = c[p + "Id"], y[p + "Index"] = c[p + "Index"], y[p + "Name"] = c[p + "Name"];
        var m = {
          mainType: p,
          query: y
        };
        d && (m.subType = d);
        var _ = c.excludeSeriesId, S;
        _ != null && (S = K(), C(Pt(_), function(x) {
          var b = ee(x, null);
          b != null && S.set(b, !0);
        })), g && g.eachComponent(m, function(x) {
          var b = S && S.get(x.id) != null;
          if (!b)
            if (D0(c))
              if (x instanceof Gt)
                c.type === ei && !c.notBlur && !x.get(["emphasis", "disabled"]) && dR(x, c, h._api);
              else {
                var T = Ig(x.mainType, x.componentIndex, c.name, h._api), D = T.focusSelf, A = T.dispatchers;
                c.type === ei && D && !c.notBlur && Xp(x.mainType, x.componentIndex, h._api), A && C(A, function(M) {
                  c.type === ei ? da(M) : ga(M);
                });
              }
            else
              Kp(c) && x instanceof Gt && (mR(x, c, h._api), b0(x), Ze(h));
        }, h), g && g.eachComponent(m, function(x) {
          var b = S && S.get(x.id) != null;
          b || w(h[p === "series" ? "_chartsMap" : "_componentsMap"][x.__viewId]);
        }, h);
        function w(x) {
          x && x.__alive && x[v] && x[v](x.__model, g, h._api, c);
        }
      }, Aa = {
        prepareAndUpdate: function(h) {
          Ri(this), Aa.update.call(this, h, {
            // Needs to mark option changed if newOption is given.
            // It's from MagicType.
            // TODO If use a separate flag optionChanged in payload?
            optionChanged: h.newOption != null
          });
        },
        update: function(h, v) {
          var c = this._model, p = this._api, d = this._zr, g = this._coordSysMgr, y = this._scheduler;
          if (c) {
            c.setUpdatePayload(h), y.restoreData(c, h), y.performSeriesTasks(c), g.create(c, p), y.performDataProcessorTasks(c, h), Zv(this, c), g.update(c, p), t(c), y.performVisualTasks(c, h), qv(this, c, p, h, v);
            var m = c.get("backgroundColor") || "transparent", _ = c.get("darkMode");
            d.setBackgroundColor(m), _ != null && _ !== "auto" && d.setDarkMode(_), gr.trigger("afterupdate", c, p);
          }
        },
        updateTransform: function(h) {
          var v = this, c = this._model, p = this._api;
          if (c) {
            c.setUpdatePayload(h);
            var d = [];
            c.eachComponent(function(y, m) {
              if (y !== "series") {
                var _ = v.getViewOfComponentModel(m);
                if (_ && _.__alive)
                  if (_.updateTransform) {
                    var S = _.updateTransform(m, c, p, h);
                    S && S.update && d.push(_);
                  } else
                    d.push(_);
              }
            });
            var g = K();
            c.eachSeries(function(y) {
              var m = v._chartsMap[y.__viewId];
              if (m.updateTransform) {
                var _ = m.updateTransform(y, c, p, h);
                _ && _.update && g.set(y.uid, 1);
              } else
                g.set(y.uid, 1);
            }), t(c), this._scheduler.performVisualTasks(c, h, {
              setDirty: !0,
              dirtyMap: g
            }), nu(this, c, p, h, {}, g), gr.trigger("afterupdate", c, p);
          }
        },
        updateView: function(h) {
          var v = this._model;
          v && (v.setUpdatePayload(h), Vt.markUpdateMethod(h, "updateView"), t(v), this._scheduler.performVisualTasks(v, h, {
            setDirty: !0
          }), qv(this, v, this._api, h, {}), gr.trigger("afterupdate", v, this._api));
        },
        updateVisual: function(h) {
          var v = this, c = this._model;
          c && (c.setUpdatePayload(h), c.eachSeries(function(p) {
            p.getData().clearAllVisual();
          }), Vt.markUpdateMethod(h, "updateVisual"), t(c), this._scheduler.performVisualTasks(c, h, {
            visualType: "visual",
            setDirty: !0
          }), c.eachComponent(function(p, d) {
            if (p !== "series") {
              var g = v.getViewOfComponentModel(d);
              g && g.__alive && g.updateVisual(d, c, v._api, h);
            }
          }), c.eachSeries(function(p) {
            var d = v._chartsMap[p.__viewId];
            d.updateVisual(p, c, v._api, h);
          }), gr.trigger("afterupdate", c, this._api));
        },
        updateLayout: function(h) {
          Aa.update.call(this, h);
        }
      }, Yv = function(h, v, c, p) {
        if (h._disposed) {
          He(h.id);
          return;
        }
        for (var d = h._model, g = h._coordSysMgr.getCoordinateSystems(), y, m = Is(d, c), _ = 0; _ < g.length; _++) {
          var S = g[_];
          if (S[v] && (y = S[v](d, m, p)) != null)
            return y;
        }
        ({}).NODE_ENV !== "production" && Ft("No coordinate system that supports " + v + " found by the given finder.");
      }, Zv = function(h, v) {
        var c = h._chartsMap, p = h._scheduler;
        v.eachSeries(function(d) {
          p.updateStreamModes(d, c[d.__viewId]);
        });
      }, Xv = function(h, v) {
        var c = this, p = this.getModel(), d = h.type, g = h.escapeConnect, y = If[d], m = y.actionInfo, _ = (m.update || "update").split(":"), S = _.pop(), w = _[0] != null && Gr(_[0]);
        this[me] = !0;
        var x = [h], b = !1;
        h.batch && (b = !0, x = G(h.batch, function(E) {
          return E = tt(V({}, E), h), E.batch = null, E;
        }));
        var T = [], D, A = Kp(h), M = D0(h);
        if (M && XT(this._api), C(x, function(E) {
          if (D = y.action(E, c._model, c._api), D = D || V({}, E), D.type = m.event || D.type, T.push(D), M) {
            var P = wg(h), R = P.queryOptionMap, k = P.mainTypeSpecified, O = k ? R.keys()[0] : "series";
            au(c, S, E, O), Ze(c);
          } else
            A ? (au(c, S, E, "series"), Ze(c)) : w && au(c, S, E, w.main, w.sub);
        }), S !== "none" && !M && !A && !w)
          try {
            this[Ee] ? (Ri(this), Aa.update.call(this, h), this[Ee] = null) : Aa[S].call(this, h);
          } catch (E) {
            throw this[me] = !1, E;
          }
        if (b ? D = {
          type: m.event || d,
          escapeConnect: g,
          batch: T
        } : D = T[0], this[me] = !1, !v) {
          var I = this._messageCenter;
          if (I.trigger(D.type, D), A) {
            var L = {
              type: "selectchanged",
              escapeConnect: g,
              selected: _R(p),
              isFromClick: h.isFromClick || !1,
              fromAction: h.type,
              fromActionPayload: h
            };
            I.trigger(L.type, L);
          }
        }
      }, Ko = function(h) {
        for (var v = this._pendingActions; v.length; ) {
          var c = v.shift();
          Xv.call(this, c, h);
        }
      }, jo = function(h) {
        !h && this.trigger("updated");
      }, z_ = function(h, v) {
        h.on("rendered", function(c) {
          v.trigger("rendered", c), // Although zr is dirty if initial animation is not finished
          // and this checking is called on frame, we also check
          // animation finished for robustness.
          h.animation.isFinished() && !v[Ee] && !v._scheduler.unfinished && !v._pendingActions.length && v.trigger("finished");
        });
      }, G_ = function(h, v) {
        h.on("mouseover", function(c) {
          var p = c.target, d = Xn(p, ja);
          d && (gR(d, c, v._api), Ze(v));
        }).on("mouseout", function(c) {
          var p = c.target, d = Xn(p, ja);
          d && (yR(d, c, v._api), Ze(v));
        }).on("click", function(c) {
          var p = c.target, d = Xn(p, function(m) {
            return it(m).dataIndex != null;
          }, !0);
          if (d) {
            var g = d.selected ? "unselect" : "select", y = it(d);
            v._api.dispatchAction({
              type: g,
              dataType: y.dataType,
              dataIndexInside: y.dataIndex,
              seriesIndex: y.seriesIndex,
              isFromClick: !0
            });
          }
        });
      };
      function t(h) {
        h.clearColorPalette(), h.eachSeries(function(v) {
          v.clearColorPalette();
        });
      }
      function a(h) {
        var v = [], c = [], p = !1;
        if (h.eachComponent(function(m, _) {
          var S = _.get("zlevel") || 0, w = _.get("z") || 0, x = _.getZLevelKey();
          p = p || !!x, (m === "series" ? c : v).push({
            zlevel: S,
            z: w,
            idx: _.componentIndex,
            type: m,
            key: x
          });
        }), p) {
          var d = v.concat(c), g, y;
          Bu(d, function(m, _) {
            return m.zlevel === _.zlevel ? m.z - _.z : m.zlevel - _.zlevel;
          }), C(d, function(m) {
            var _ = h.getComponent(m.type, m.idx), S = m.zlevel, w = m.key;
            g != null && (S = Math.max(g, S)), w ? (S === g && w !== y && S++, y = w) : y && (S === g && S++, y = ""), g = S, _.setZLevel(S);
          });
        }
      }
      qv = function(h, v, c, p, d) {
        a(v), F_(h, v, c, p, d), C(h._chartsViews, function(g) {
          g.__alive = !1;
        }), nu(h, v, c, p, d), C(h._chartsViews, function(g) {
          g.__alive || g.remove(v, c);
        });
      }, F_ = function(h, v, c, p, d, g) {
        C(g || h._componentsViews, function(y) {
          var m = y.__model;
          u(m, y), y.render(m, v, c, p), s(m, y), f(m, y);
        });
      }, nu = function(h, v, c, p, d, g) {
        var y = h._scheduler;
        d = V(d || {}, {
          updatedSeries: v.getSeries()
        }), gr.trigger("series:beforeupdate", v, c, d);
        var m = !1;
        v.eachSeries(function(_) {
          var S = h._chartsMap[_.__viewId];
          S.__alive = !0;
          var w = S.renderTask;
          y.updatePayload(w, p), u(_, S), g && g.get(_.uid) && w.dirty(), w.perform(y.getPerformArgs(w)) && (m = !0), S.group.silent = !!_.get("silent"), o(_, S), b0(_);
        }), y.unfinished = m || y.unfinished, gr.trigger("series:layoutlabels", v, c, d), gr.trigger("series:transition", v, c, d), v.eachSeries(function(_) {
          var S = h._chartsMap[_.__viewId];
          s(_, S), f(_, S);
        }), i(h, v), gr.trigger("series:afterupdate", v, c, d);
      }, Ze = function(h) {
        h[Wv] = !0, h.getZr().wakeUp();
      }, W_ = function(h) {
        h[Wv] && (h.getZr().storage.traverse(function(v) {
          ro(v) || n(v);
        }), h[Wv] = !1);
      };
      function n(h) {
        for (var v = [], c = h.currentStates, p = 0; p < c.length; p++) {
          var d = c[p];
          d === "emphasis" || d === "blur" || d === "select" || v.push(d);
        }
        h.selected && h.states.select && v.push("select"), h.hoverState === gh && h.states.emphasis ? v.push("emphasis") : h.hoverState === pl && h.states.blur && v.push("blur"), h.useStates(v);
      }
      function i(h, v) {
        var c = h._zr, p = c.storage, d = 0;
        p.traverse(function(g) {
          g.isGroup || d++;
        }), d > v.get("hoverLayerThreshold") && !wt.node && !wt.worker && v.eachSeries(function(g) {
          if (!g.preventUsingHoverLayer) {
            var y = h._chartsMap[g.__viewId];
            y.__alive && y.eachRendered(function(m) {
              m.states.emphasis && (m.states.emphasis.hoverLayer = !0);
            });
          }
        });
      }
      function o(h, v) {
        var c = h.get("blendMode") || null;
        v.eachRendered(function(p) {
          p.isGroup || (p.style.blend = c);
        });
      }
      function s(h, v) {
        if (!h.preventAutoZ) {
          var c = h.get("z") || 0, p = h.get("zlevel") || 0;
          v.eachRendered(function(d) {
            return l(d, c, p, -1 / 0), !0;
          });
        }
      }
      function l(h, v, c, p) {
        var d = h.getTextContent(), g = h.getTextGuideLine(), y = h.isGroup;
        if (y)
          for (var m = h.childrenRef(), _ = 0; _ < m.length; _++)
            p = Math.max(l(m[_], v, c, p), p);
        else
          h.z = v, h.zlevel = c, p = Math.max(h.z2, p);
        if (d && (d.z = v, d.zlevel = c, isFinite(p) && (d.z2 = p + 2)), g) {
          var S = h.textGuideLineConfig;
          g.z = v, g.zlevel = c, isFinite(p) && (g.z2 = p + (S && S.showAbove ? 1 : -1));
        }
        return p;
      }
      function u(h, v) {
        v.eachRendered(function(c) {
          if (!ro(c)) {
            var p = c.getTextContent(), d = c.getTextGuideLine();
            c.stateTransition && (c.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), d && d.stateTransition && (d.stateTransition = null), c.hasState() ? (c.prevStates = c.currentStates, c.clearStates()) : c.prevStates && (c.prevStates = null);
          }
        });
      }
      function f(h, v) {
        var c = h.getModel("stateAnimation"), p = h.isAnimationEnabled(), d = c.get("duration"), g = d > 0 ? {
          duration: d,
          delay: c.get("delay"),
          easing: c.get("easing")
          // additive: stateAnimationModel.get('additive')
        } : null;
        v.eachRendered(function(y) {
          if (y.states && y.states.emphasis) {
            if (ro(y))
              return;
            if (y instanceof gt && TR(y), y.__dirty) {
              var m = y.prevStates;
              m && y.useStates(m);
            }
            if (p) {
              y.stateTransition = g;
              var _ = y.getTextContent(), S = y.getTextGuideLine();
              _ && (_.stateTransition = g), S && (S.stateTransition = g);
            }
            y.__dirty && n(y);
          }
        });
      }
      H_ = function(h) {
        return new /** @class */
        (function(v) {
          N(c, v);
          function c() {
            return v !== null && v.apply(this, arguments) || this;
          }
          return c.prototype.getCoordinateSystems = function() {
            return h._coordSysMgr.getCoordinateSystems();
          }, c.prototype.getComponentByElement = function(p) {
            for (; p; ) {
              var d = p.__ecComponentInfo;
              if (d != null)
                return h._model.getComponent(d.mainType, d.index);
              p = p.parent;
            }
          }, c.prototype.enterEmphasis = function(p, d) {
            da(p, d), Ze(h);
          }, c.prototype.leaveEmphasis = function(p, d) {
            ga(p, d), Ze(h);
          }, c.prototype.enterBlur = function(p) {
            $T(p), Ze(h);
          }, c.prototype.leaveBlur = function(p) {
            Mg(p), Ze(h);
          }, c.prototype.enterSelect = function(p) {
            UT(p), Ze(h);
          }, c.prototype.leaveSelect = function(p) {
            YT(p), Ze(h);
          }, c.prototype.getModel = function() {
            return h.getModel();
          }, c.prototype.getViewOfComponentModel = function(p) {
            return h.getViewOfComponentModel(p);
          }, c.prototype.getViewOfSeriesModel = function(p) {
            return h.getViewOfSeriesModel(p);
          }, c;
        }(qD))(h);
      }, WC = function(h) {
        function v(c, p) {
          for (var d = 0; d < c.length; d++) {
            var g = c[d];
            g[$v] = p;
          }
        }
        C(Os, function(c, p) {
          h._messageCenter.on(p, function(d) {
            if ($_[h.group] && h[$v] !== B_) {
              if (d && d.escapeConnect)
                return;
              var g = h.makeActionFromEvent(d), y = [];
              C(io, function(m) {
                m !== h && m.group === h.group && y.push(m);
              }), v(y, B_), C(y, function(m) {
                m[$v] !== hV && m.dispatchAction(g);
              }), v(y, vV);
            }
          });
        });
      };
    }(), e;
  }(fr)
), ry = Mf.prototype;
ry.on = BC("on");
ry.off = BC("off");
ry.one = function(r, e, t) {
  var a = this;
  Dr("ECharts#one is deprecated.");
  function n() {
    for (var i = [], o = 0; o < arguments.length; o++)
      i[o] = arguments[o];
    e && e.apply && e.apply(this, i), a.off(r, n);
  }
  this.on.call(this, r, n, t);
};
var cV = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
function He(r) {
  ({}).NODE_ENV !== "production" && Ft("Instance " + r + " has been disposed");
}
var If = {}, Os = {}, cd = [], pd = [], Lf = [], $C = {}, dd = {}, io = {}, $_ = {}, pV = +/* @__PURE__ */ new Date() - 0, ay = "_echarts_instance_";
function dV(r, e, t) {
  var a = !(t && t.ssr);
  if (a) {
    if ({}.NODE_ENV !== "production" && !r)
      throw new Error("Initialize failed: invalid dom.");
    var n = UC(r);
    if (n)
      return {}.NODE_ENV !== "production" && Ft("There is a chart instance already initialized on the dom."), n;
    ({}).NODE_ENV !== "production" && so(r) && r.nodeName.toUpperCase() !== "CANVAS" && (!r.clientWidth && (!t || t.width == null) || !r.clientHeight && (!t || t.height == null)) && Ft("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 i = new Mf(r, e, t);
  return i.id = "ec_" + pV++, io[i.id] = i, a && wT(r, ay, i.id), WC(i), gr.trigger("afterinit", i), i;
}
function gV(r) {
  $(r) ? r = io[r] : r instanceof Mf || (r = UC(r)), r instanceof Mf && !r.isDisposed() && r.dispose();
}
function UC(r) {
  return io[uP(r, ay)];
}
function YC(r, e) {
  $C[r] = e;
}
function ZC(r) {
  ct(pd, r) < 0 && pd.push(r);
}
function XC(r, e) {
  iy(cd, r, e, aV);
}
function yV(r) {
  ny("afterinit", r);
}
function mV(r) {
  ny("afterupdate", r);
}
function ny(r, e) {
  gr.on(r, e);
}
function jr(r, e, t) {
  q(e) && (t = e, e = "");
  var a = j(r) ? r.type : [r, r = {
    event: e
  }][0];
  r.event = (r.event || a).toLowerCase(), e = r.event, !Os[e] && (Q(V_.test(a) && V_.test(e)), If[a] || (If[a] = {
    action: t,
    actionInfo: r
  }), Os[e] = a);
}
function _V(r, e) {
  Po.register(r, e);
}
function SV(r, e) {
  iy(Lf, r, e, OC, "layout");
}
function _i(r, e) {
  iy(Lf, r, e, kC, "visual");
}
var U_ = [];
function iy(r, e, t, a, n) {
  if ((q(e) || j(e)) && (t = e, e = a), {}.NODE_ENV !== "production") {
    if (isNaN(e) || e == null)
      throw new Error("Illegal priority");
    C(r, function(o) {
      Q(o.__raw !== t);
    });
  }
  if (!(ct(U_, t) >= 0)) {
    U_.push(t);
    var i = DC.wrapStageHandler(t, n);
    i.__prio = e, i.__raw = t, r.push(i);
  }
}
function qC(r, e) {
  dd[r] = e;
}
function xV(r, e, t) {
  var a = Qk("registerMap");
  a && a(r, e, t);
}
var wV = EO;
_i(ey, rk);
_i(Ph, ak);
_i(Ph, nk);
_i(ey, _k);
_i(Ph, Sk);
_i(VC, qk);
ZC(jD);
XC(eV, hO);
qC("default", ik);
jr({
  type: ei,
  event: ei,
  update: ei
}, Xt);
jr({
  type: Wu,
  event: Wu,
  update: Wu
}, Xt);
jr({
  type: Ls,
  event: Ls,
  update: Ls
}, Xt);
jr({
  type: $u,
  event: $u,
  update: $u
}, Xt);
jr({
  type: Es,
  event: Es,
  update: Es
}, Xt);
YC("light", gk);
YC("dark", yk);
var Y_ = [], bV = {
  registerPreprocessor: ZC,
  registerProcessor: XC,
  registerPostInit: yV,
  registerPostUpdate: mV,
  registerUpdateLifecycle: ny,
  registerAction: jr,
  registerCoordinateSystem: _V,
  registerLayout: SV,
  registerVisual: _i,
  registerTransform: wV,
  registerLoading: qC,
  registerMap: xV,
  registerImpl: jk,
  PRIORITY: fV,
  ComponentModel: St,
  ComponentView: $t,
  SeriesModel: Gt,
  ChartView: Vt,
  // TODO Use ComponentModel and SeriesModel instead of Constructor
  registerComponentModel: function(r) {
    St.registerClass(r);
  },
  registerComponentView: function(r) {
    $t.registerClass(r);
  },
  registerSeriesModel: function(r) {
    Gt.registerClass(r);
  },
  registerChartView: function(r) {
    Vt.registerClass(r);
  },
  registerSubTypeDefaulter: function(r, e) {
    St.registerSubTypeDefaulter(r, e);
  },
  registerPainter: function(r, e) {
    FE(r, e);
  }
};
function pt(r) {
  if (z(r)) {
    C(r, function(e) {
      pt(e);
    });
    return;
  }
  ct(Y_, r) >= 0 || (Y_.push(r), q(r) && (r = {
    install: r
  }), r.install(bV));
}
function Qo(r) {
  return r == null ? 0 : r.length || 1;
}
function Z_(r) {
  return r;
}
var TV = (
  /** @class */
  function() {
    function r(e, t, a, n, i, o) {
      this._old = e, this._new = t, this._oldKeyGetter = a || Z_, this._newKeyGetter = n || Z_, this.context = i, this._diffModeMultiple = o === "multiple";
    }
    return r.prototype.add = function(e) {
      return this._add = e, this;
    }, r.prototype.update = function(e) {
      return this._update = e, this;
    }, r.prototype.updateManyToOne = function(e) {
      return this._updateManyToOne = e, this;
    }, r.prototype.updateOneToMany = function(e) {
      return this._updateOneToMany = e, this;
    }, r.prototype.updateManyToMany = function(e) {
      return this._updateManyToMany = e, this;
    }, r.prototype.remove = function(e) {
      return this._remove = e, this;
    }, r.prototype.execute = function() {
      this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
    }, r.prototype._executeOneToOne = function() {
      var e = this._old, t = this._new, a = {}, n = new Array(e.length), i = new Array(t.length);
      this._initIndexMap(e, null, n, "_oldKeyGetter"), this._initIndexMap(t, a, i, "_newKeyGetter");
      for (var o = 0; o < e.length; o++) {
        var s = n[o], l = a[s], u = Qo(l);
        if (u > 1) {
          var f = l.shift();
          l.length === 1 && (a[s] = l[0]), this._update && this._update(f, o);
        } else
          u === 1 ? (a[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
      }
      this._performRestAdd(i, a);
    }, r.prototype._executeMultiple = function() {
      var e = this._old, t = this._new, a = {}, n = {}, i = [], o = [];
      this._initIndexMap(e, a, i, "_oldKeyGetter"), this._initIndexMap(t, n, o, "_newKeyGetter");
      for (var s = 0; s < i.length; s++) {
        var l = i[s], u = a[l], f = n[l], h = Qo(u), v = Qo(f);
        if (h > 1 && v === 1)
          this._updateManyToOne && this._updateManyToOne(f, u), n[l] = null;
        else if (h === 1 && v > 1)
          this._updateOneToMany && this._updateOneToMany(f, u), n[l] = null;
        else if (h === 1 && v === 1)
          this._update && this._update(f, u), n[l] = null;
        else if (h > 1 && v > 1)
          this._updateManyToMany && this._updateManyToMany(f, u), n[l] = null;
        else if (h > 1)
          for (var c = 0; c < h; c++)
            this._remove && this._remove(u[c]);
        else
          this._remove && this._remove(u);
      }
      this._performRestAdd(o, n);
    }, r.prototype._performRestAdd = function(e, t) {
      for (var a = 0; a < e.length; a++) {
        var n = e[a], i = t[n], o = Qo(i);
        if (o > 1)
          for (var s = 0; s < o; s++)
            this._add && this._add(i[s]);
        else
          o === 1 && this._add && this._add(i);
        t[n] = null;
      }
    }, r.prototype._initIndexMap = function(e, t, a, n) {
      for (var i = this._diffModeMultiple, o = 0; o < e.length; o++) {
        var s = "_ec_" + this[n](e[o], o);
        if (i || (a[o] = s), !!t) {
          var l = t[s], u = Qo(l);
          u === 0 ? (t[s] = o, i && a.push(s)) : u === 1 ? t[s] = [l, o] : l.push(o);
        }
      }
    }, r;
  }()
);
const ya = TV;
var DV = (
  /** @class */
  function() {
    function r(e, t) {
      this._encode = e, this._schema = t;
    }
    return r.prototype.get = function() {
      return {
        // Do not generate full dimension name until fist used.
        fullDimensions: this._getFullDimensionNames(),
        encode: this._encode
      };
    }, r.prototype._getFullDimensionNames = function() {
      return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
    }, r;
  }()
);
function CV(r, e) {
  var t = {}, a = t.encode = {}, n = K(), i = [], o = [], s = {};
  C(r.dimensions, function(v) {
    var c = r.getDimensionInfo(v), p = c.coordDim;
    if (p) {
      ({}).NODE_ENV !== "production" && Q(rd.get(p) == null);
      var d = c.coordDimIndex;
      Kv(a, p)[d] = v, c.isExtraCoord || (n.set(p, 1), AV(c.type) && (i[0] = v), Kv(s, p)[d] = r.getDimensionIndex(c.name)), c.defaultTooltip && o.push(v);
    }
    rd.each(function(g, y) {
      var m = Kv(a, y), _ = c.otherDims[y];
      _ != null && _ !== !1 && (m[_] = c.name);
    });
  });
  var l = [], u = {};
  n.each(function(v, c) {
    var p = a[c];
    u[c] = p[0], l = l.concat(p);
  }), t.dataDimsOnCoord = l, t.dataDimIndicesOnCoord = G(l, function(v) {
    return r.getDimensionInfo(v).storeDimIndex;
  }), t.encodeFirstDimNotExtra = u;
  var f = a.label;
  f && f.length && (i = f.slice());
  var h = a.tooltip;
  return h && h.length ? o = h.slice() : o.length || (o = i.slice()), a.defaultedLabel = i, a.defaultedTooltip = o, t.userOutput = new DV(s, e), t;
}
function Kv(r, e) {
  return r.hasOwnProperty(e) || (r[e] = []), r[e];
}
function Ef(r) {
  return r === "category" ? "ordinal" : r === "time" ? "time" : "float";
}
function AV(r) {
  return !(r === "ordinal" || r === "time");
}
var MV = (
  /** @class */
  function() {
    function r(e) {
      this.otherDims = {}, e != null && V(this, e);
    }
    return r;
  }()
);
const qu = MV;
var IV = Tt(), LV = {
  float: "f",
  int: "i",
  ordinal: "o",
  number: "n",
  time: "t"
}, KC = (
  /** @class */
  function() {
    function r(e) {
      this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
    }
    return r.prototype.isDimensionOmitted = function() {
      return this._dimOmitted;
    }, r.prototype._updateDimOmitted = function(e) {
      this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = JC(this.source)));
    }, r.prototype.getSourceDimensionIndex = function(e) {
      return ut(this._dimNameMap.get(e), -1);
    }, r.prototype.getSourceDimension = function(e) {
      var t = this.source.dimensionsDefine;
      if (t)
        return t[e];
    }, r.prototype.makeStoreSchema = function() {
      for (var e = this._fullDimCount, t = JD(this.source), a = !tA(e), n = "", i = [], o = 0, s = 0; o < e; o++) {
        var l = void 0, u = void 0, f = void 0, h = this.dimensions[s];
        if (h && h.storeDimIndex === o)
          l = t ? h.name : null, u = h.type, f = h.ordinalMeta, s++;
        else {
          var v = this.getSourceDimension(o);
          v && (l = t ? v.name : null, u = v.type);
        }
        i.push({
          property: l,
          type: u,
          ordinalMeta: f
        }), t && l != null && (!h || !h.isCalculationCoord) && (n += a ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), n += "$", n += LV[u] || "f", f && (n += f.uid), n += "$";
      }
      var c = this.source, p = [c.seriesLayoutBy, c.startIndex, n].join("$$");
      return {
        dimensions: i,
        hash: p
      };
    }, r.prototype.makeOutputDimensionNames = function() {
      for (var e = [], t = 0, a = 0; t < this._fullDimCount; t++) {
        var n = void 0, i = this.dimensions[a];
        if (i && i.storeDimIndex === t)
          i.isCalculationCoord || (n = i.name), a++;
        else {
          var o = this.getSourceDimension(t);
          o && (n = o.name);
        }
        e.push(n);
      }
      return e;
    }, r.prototype.appendCalculationDimension = function(e) {
      this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
    }, r;
  }()
);
function jC(r) {
  return r instanceof KC;
}
function QC(r) {
  for (var e = K(), t = 0; t < (r || []).length; t++) {
    var a = r[t], n = j(a) ? a.name : a;
    n != null && e.get(n) == null && e.set(n, t);
  }
  return e;
}
function JC(r) {
  var e = IV(r);
  return e.dimNameMap || (e.dimNameMap = QC(r.dimensionsDefine));
}
function tA(r) {
  return r > 30;
}
var Jo = j, Ma = G, EV = typeof Int32Array > "u" ? Array : Int32Array, PV = "e\0\0", X_ = -1, RV = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], NV = ["_approximateExtent"], q_, iu, ts, Ni, jv, ou, Qv, OV = (
  /** @class */
  function() {
    function r(e, t) {
      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 a, n = !1;
      jC(e) ? (a = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (n = !0, a = e), a = a || ["x", "y"];
      for (var i = {}, o = [], s = {}, l = !1, u = {}, f = 0; f < a.length; f++) {
        var h = a[f], v = $(h) ? new qu({
          name: h
        }) : h instanceof qu ? h : new qu(h), c = v.name;
        v.type = v.type || "float", v.coordDim || (v.coordDim = c, v.coordDimIndex = 0);
        var p = v.otherDims = v.otherDims || {};
        o.push(c), i[c] = v, u[c] != null && (l = !0), v.createInvertedIndices && (s[c] = []), p.itemName === 0 && (this._nameDimIdx = f), p.itemId === 0 && (this._idDimIdx = f), {}.NODE_ENV !== "production" && Q(n || v.storeDimIndex >= 0), n && (v.storeDimIndex = f);
      }
      if (this.dimensions = o, this._dimInfos = i, this._initGetDimensionInfo(l), this.hostModel = t, this._invertedIndicesMap = s, this._dimOmitted) {
        var d = this._dimIdxToName = K();
        C(o, function(g) {
          d.set(i[g].storeDimIndex, g);
        });
      }
    }
    return r.prototype.getDimension = function(e) {
      var t = this._recognizeDimIndex(e);
      if (t == null)
        return e;
      if (t = e, !this._dimOmitted)
        return this.dimensions[t];
      var a = this._dimIdxToName.get(t);
      if (a != null)
        return a;
      var n = this._schema.getSourceDimension(t);
      if (n)
        return n.name;
    }, r.prototype.getDimensionIndex = function(e) {
      var t = this._recognizeDimIndex(e);
      if (t != null)
        return t;
      if (e == null)
        return -1;
      var a = this._getDimInfo(e);
      return a ? a.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
    }, r.prototype._recognizeDimIndex = function(e) {
      if (Ct(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
        return +e;
    }, r.prototype._getStoreDimIndex = function(e) {
      var t = this.getDimensionIndex(e);
      if ({}.NODE_ENV !== "production" && t == null)
        throw new Error("Unknown dimension " + e);
      return t;
    }, r.prototype.getDimensionInfo = function(e) {
      return this._getDimInfo(this.getDimension(e));
    }, r.prototype._initGetDimensionInfo = function(e) {
      var t = this._dimInfos;
      this._getDimInfo = e ? function(a) {
        return t.hasOwnProperty(a) ? t[a] : void 0;
      } : function(a) {
        return t[a];
      };
    }, r.prototype.getDimensionsOnCoord = function() {
      return this._dimSummary.dataDimsOnCoord.slice();
    }, r.prototype.mapDimension = function(e, t) {
      var a = this._dimSummary;
      if (t == null)
        return a.encodeFirstDimNotExtra[e];
      var n = a.encode[e];
      return n ? n[t] : null;
    }, r.prototype.mapDimensionsAll = function(e) {
      var t = this._dimSummary, a = t.encode[e];
      return (a || []).slice();
    }, r.prototype.getStore = function() {
      return this._store;
    }, r.prototype.initData = function(e, t, a) {
      var n = this, i;
      if (e instanceof od && (i = e), !i) {
        var o = this.dimensions, s = Ug(e) || Se(e) ? new tC(e, o.length) : e;
        i = new od();
        var l = Ma(o, function(u) {
          return {
            type: n._dimInfos[u].type,
            property: u
          };
        });
        i.initData(s, l, a);
      }
      this._store = i, this._nameList = (t || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, i.count()), this._dimSummary = CV(this, this._schema), this.userOutput = this._dimSummary.userOutput;
    }, r.prototype.appendData = function(e) {
      var t = this._store.appendData(e);
      this._doInit(t[0], t[1]);
    }, r.prototype.appendValues = function(e, t) {
      var a = this._store.appendValues(e, t.length), n = a.start, i = a.end, o = this._shouldMakeIdFromName();
      if (this._updateOrdinalMeta(), t)
        for (var s = n; s < i; s++) {
          var l = s - n;
          this._nameList[s] = t[l], o && Qv(this, s);
        }
    }, r.prototype._updateOrdinalMeta = function() {
      for (var e = this._store, t = this.dimensions, a = 0; a < t.length; a++) {
        var n = this._dimInfos[t[a]];
        n.ordinalMeta && e.collectOrdinalMeta(n.storeDimIndex, n.ordinalMeta);
      }
    }, r.prototype._shouldMakeIdFromName = function() {
      var e = this._store.getProvider();
      return this._idDimIdx == null && e.getSource().sourceFormat !== fa && !e.fillStorage;
    }, r.prototype._doInit = function(e, t) {
      if (!(e >= t)) {
        var a = this._store, n = a.getProvider();
        this._updateOrdinalMeta();
        var i = this._nameList, o = this._idList, s = n.getSource().sourceFormat, l = s === hr;
        if (l && !n.pure)
          for (var u = [], f = e; f < t; f++) {
            var h = n.getItem(f, u);
            if (!this.hasItemOption && KE(h) && (this.hasItemOption = !0), h) {
              var v = h.name;
              i[f] == null && v != null && (i[f] = ee(v, null));
              var c = h.id;
              o[f] == null && c != null && (o[f] = ee(c, null));
            }
          }
        if (this._shouldMakeIdFromName())
          for (var f = e; f < t; f++)
            Qv(this, f);
        q_(this);
      }
    }, r.prototype.getApproximateExtent = function(e) {
      return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
    }, r.prototype.setApproximateExtent = function(e, t) {
      t = this.getDimension(t), this._approximateExtent[t] = e.slice();
    }, r.prototype.getCalculationInfo = function(e) {
      return this._calculationInfo[e];
    }, r.prototype.setCalculationInfo = function(e, t) {
      Jo(e) ? V(this._calculationInfo, e) : this._calculationInfo[e] = t;
    }, r.prototype.getName = function(e) {
      var t = this.getRawIndex(e), a = this._nameList[t];
      return a == null && this._nameDimIdx != null && (a = ts(this, this._nameDimIdx, t)), a == null && (a = ""), a;
    }, r.prototype._getCategory = function(e, t) {
      var a = this._store.get(e, t), n = this._store.getOrdinalMeta(e);
      return n ? n.categories[a] : a;
    }, r.prototype.getId = function(e) {
      return iu(this, this.getRawIndex(e));
    }, r.prototype.count = function() {
      return this._store.count();
    }, r.prototype.get = function(e, t) {
      var a = this._store, n = this._dimInfos[e];
      if (n)
        return a.get(n.storeDimIndex, t);
    }, r.prototype.getByRawIndex = function(e, t) {
      var a = this._store, n = this._dimInfos[e];
      if (n)
        return a.getByRawIndex(n.storeDimIndex, t);
    }, r.prototype.getIndices = function() {
      return this._store.getIndices();
    }, r.prototype.getDataExtent = function(e) {
      return this._store.getDataExtent(this._getStoreDimIndex(e));
    }, r.prototype.getSum = function(e) {
      return this._store.getSum(this._getStoreDimIndex(e));
    }, r.prototype.getMedian = function(e) {
      return this._store.getMedian(this._getStoreDimIndex(e));
    }, r.prototype.getValues = function(e, t) {
      var a = this, n = this._store;
      return z(e) ? n.getValues(Ma(e, function(i) {
        return a._getStoreDimIndex(i);
      }), t) : n.getValues(e);
    }, r.prototype.hasValue = function(e) {
      for (var t = this._dimSummary.dataDimIndicesOnCoord, a = 0, n = t.length; a < n; a++)
        if (isNaN(this._store.get(t[a], e)))
          return !1;
      return !0;
    }, r.prototype.indexOfName = function(e) {
      for (var t = 0, a = this._store.count(); t < a; t++)
        if (this.getName(t) === e)
          return t;
      return -1;
    }, r.prototype.getRawIndex = function(e) {
      return this._store.getRawIndex(e);
    }, r.prototype.indexOfRawIndex = function(e) {
      return this._store.indexOfRawIndex(e);
    }, r.prototype.rawIndexOf = function(e, t) {
      var a = e && this._invertedIndicesMap[e];
      if ({}.NODE_ENV !== "production" && !a)
        throw new Error("Do not supported yet");
      var n = a[t];
      return n == null || isNaN(n) ? X_ : n;
    }, r.prototype.indicesOfNearest = function(e, t, a) {
      return this._store.indicesOfNearest(this._getStoreDimIndex(e), t, a);
    }, r.prototype.each = function(e, t, a) {
      q(e) && (a = t, t = e, e = []);
      var n = a || this, i = Ma(Ni(e), this._getStoreDimIndex, this);
      this._store.each(i, n ? Y(t, n) : t);
    }, r.prototype.filterSelf = function(e, t, a) {
      q(e) && (a = t, t = e, e = []);
      var n = a || this, i = Ma(Ni(e), this._getStoreDimIndex, this);
      return this._store = this._store.filter(i, n ? Y(t, n) : t), this;
    }, r.prototype.selectRange = function(e) {
      var t = this, a = {}, n = _t(e);
      return C(n, function(i) {
        var o = t._getStoreDimIndex(i);
        a[o] = e[i];
      }), this._store = this._store.selectRange(a), this;
    }, r.prototype.mapArray = function(e, t, a) {
      q(e) && (a = t, t = e, e = []), a = a || this;
      var n = [];
      return this.each(e, function() {
        n.push(t && t.apply(this, arguments));
      }, a), n;
    }, r.prototype.map = function(e, t, a, n) {
      var i = a || n || this, o = Ma(Ni(e), this._getStoreDimIndex, this), s = ou(this);
      return s._store = this._store.map(o, i ? Y(t, i) : t), s;
    }, r.prototype.modify = function(e, t, a, n) {
      var i = this, o = a || n || this;
      ({}).NODE_ENV !== "production" && C(Ni(e), function(l) {
        var u = i.getDimensionInfo(l);
        u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
      });
      var s = Ma(Ni(e), this._getStoreDimIndex, this);
      this._store.modify(s, o ? Y(t, o) : t);
    }, r.prototype.downSample = function(e, t, a, n) {
      var i = ou(this);
      return i._store = this._store.downSample(this._getStoreDimIndex(e), t, a, n), i;
    }, r.prototype.lttbDownSample = function(e, t) {
      var a = ou(this);
      return a._store = this._store.lttbDownSample(this._getStoreDimIndex(e), t), a;
    }, r.prototype.getRawDataItem = function(e) {
      return this._store.getRawDataItem(e);
    }, r.prototype.getItemModel = function(e) {
      var t = this.hostModel, a = this.getRawDataItem(e);
      return new kt(a, t, t && t.ecModel);
    }, r.prototype.diff = function(e) {
      var t = this;
      return new ya(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(a) {
        return iu(e, a);
      }, function(a) {
        return iu(t, a);
      });
    }, r.prototype.getVisual = function(e) {
      var t = this._visual;
      return t && t[e];
    }, r.prototype.setVisual = function(e, t) {
      this._visual = this._visual || {}, Jo(e) ? V(this._visual, e) : this._visual[e] = t;
    }, r.prototype.getItemVisual = function(e, t) {
      var a = this._itemVisuals[e], n = a && a[t];
      return n ?? this.getVisual(t);
    }, r.prototype.hasItemVisual = function() {
      return this._itemVisuals.length > 0;
    }, r.prototype.ensureUniqueItemVisual = function(e, t) {
      var a = this._itemVisuals, n = a[e];
      n || (n = a[e] = {});
      var i = n[t];
      return i == null && (i = this.getVisual(t), z(i) ? i = i.slice() : Jo(i) && (i = V({}, i)), n[t] = i), i;
    }, r.prototype.setItemVisual = function(e, t, a) {
      var n = this._itemVisuals[e] || {};
      this._itemVisuals[e] = n, Jo(t) ? V(n, t) : n[t] = a;
    }, r.prototype.clearAllVisual = function() {
      this._visual = {}, this._itemVisuals = [];
    }, r.prototype.setLayout = function(e, t) {
      Jo(e) ? V(this._layout, e) : this._layout[e] = t;
    }, r.prototype.getLayout = function(e) {
      return this._layout[e];
    }, r.prototype.getItemLayout = function(e) {
      return this._itemLayouts[e];
    }, r.prototype.setItemLayout = function(e, t, a) {
      this._itemLayouts[e] = a ? V(this._itemLayouts[e] || {}, t) : t;
    }, r.prototype.clearItemLayouts = function() {
      this._itemLayouts.length = 0;
    }, r.prototype.setItemGraphicEl = function(e, t) {
      var a = this.hostModel && this.hostModel.seriesIndex;
      Yp(a, this.dataType, e, t), this._graphicEls[e] = t;
    }, r.prototype.getItemGraphicEl = function(e) {
      return this._graphicEls[e];
    }, r.prototype.eachItemGraphicEl = function(e, t) {
      C(this._graphicEls, function(a, n) {
        a && e && e.call(t, a, n);
      });
    }, r.prototype.cloneShallow = function(e) {
      return e || (e = new r(this._schema ? this._schema : Ma(this.dimensions, this._getDimInfo, this), this.hostModel)), jv(e, this), e._store = this._store, e;
    }, r.prototype.wrapMethod = function(e, t) {
      var a = this[e];
      q(a) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
        var n = a.apply(this, arguments);
        return t.apply(this, [n].concat(hg(arguments)));
      });
    }, r.internalField = function() {
      q_ = function(e) {
        var t = e._invertedIndicesMap;
        C(t, function(a, n) {
          var i = e._dimInfos[n], o = i.ordinalMeta, s = e._store;
          if (o) {
            a = t[n] = new EV(o.categories.length);
            for (var l = 0; l < a.length; l++)
              a[l] = X_;
            for (var l = 0; l < s.count(); l++)
              a[s.get(i.storeDimIndex, l)] = l;
          }
        });
      }, ts = function(e, t, a) {
        return ee(e._getCategory(t, a), null);
      }, iu = function(e, t) {
        var a = e._idList[t];
        return a == null && e._idDimIdx != null && (a = ts(e, e._idDimIdx, t)), a == null && (a = PV + t), a;
      }, Ni = function(e) {
        return z(e) || (e = e != null ? [e] : []), e;
      }, ou = function(e) {
        var t = new r(e._schema ? e._schema : Ma(e.dimensions, e._getDimInfo, e), e.hostModel);
        return jv(t, e), t;
      }, jv = function(e, t) {
        C(RV.concat(t.__wrappedMethods || []), function(a) {
          t.hasOwnProperty(a) && (e[a] = t[a]);
        }), e.__wrappedMethods = t.__wrappedMethods, C(NV, function(a) {
          e[a] = rt(t[a]);
        }), e._calculationInfo = V({}, t._calculationInfo);
      }, Qv = function(e, t) {
        var a = e._nameList, n = e._idList, i = e._nameDimIdx, o = e._idDimIdx, s = a[t], l = n[t];
        if (s == null && i != null && (a[t] = s = ts(e, i, t)), l == null && o != null && (n[t] = l = ts(e, o, t)), l == null && s != null) {
          var u = e._nameRepeatCount, f = u[s] = (u[s] || 0) + 1;
          l = s, f > 1 && (l += "__ec__" + f), n[t] = l;
        }
      };
    }(), r;
  }()
);
const Ce = OV;
function xl(r, e) {
  Ug(r) || (r = Yg(r)), e = e || {};
  var t = e.coordDimensions || [], a = e.dimensionsDefine || r.dimensionsDefine || [], n = K(), i = [], o = VV(r, t, a, e.dimensionsCount), s = e.canOmitUnusedDimensions && tA(o), l = a === r.dimensionsDefine, u = l ? JC(r) : QC(a), f = e.encodeDefine;
  !f && e.encodeDefaulter && (f = e.encodeDefaulter(r, o));
  for (var h = K(f), v = new lC(o), c = 0; c < v.length; c++)
    v[c] = -1;
  function p(D) {
    var A = v[D];
    if (A < 0) {
      var M = a[D], I = j(M) ? M : {
        name: M
      }, L = new qu(), E = I.name;
      E != null && u.get(E) != null && (L.name = L.displayName = E), I.type != null && (L.type = I.type), I.displayName != null && (L.displayName = I.displayName);
      var P = i.length;
      return v[D] = P, L.storeDimIndex = D, i.push(L), L;
    }
    return i[A];
  }
  if (!s)
    for (var c = 0; c < o; c++)
      p(c);
  h.each(function(D, A) {
    var M = Pt(D).slice();
    if (M.length === 1 && !$(M[0]) && M[0] < 0) {
      h.set(A, !1);
      return;
    }
    var I = h.set(A, []);
    C(M, function(L, E) {
      var P = $(L) ? u.get(L) : L;
      P != null && P < o && (I[E] = P, g(p(P), A, E));
    });
  });
  var d = 0;
  C(t, function(D) {
    var A, M, I, L;
    if ($(D))
      A = D, L = {};
    else {
      L = D, A = L.name;
      var E = L.ordinalMeta;
      L.ordinalMeta = null, L = V({}, L), L.ordinalMeta = E, M = L.dimsDef, I = L.otherDims, L.name = L.coordDim = L.coordDimIndex = L.dimsDef = L.otherDims = null;
    }
    var P = h.get(A);
    if (P !== !1) {
      if (P = Pt(P), !P.length)
        for (var R = 0; R < (M && M.length || 1); R++) {
          for (; d < o && p(d).coordDim != null; )
            d++;
          d < o && P.push(d++);
        }
      C(P, function(k, O) {
        var B = p(k);
        if (l && L.type != null && (B.type = L.type), g(tt(B, L), A, O), B.name == null && M) {
          var F = M[O];
          !j(F) && (F = {
            name: F
          }), B.name = B.displayName = F.name, B.defaultTooltip = F.defaultTooltip;
        }
        I && tt(B.otherDims, I);
      });
    }
  });
  function g(D, A, M) {
    rd.get(A) != null ? D.otherDims[A] = M : (D.coordDim = A, D.coordDimIndex = M, n.set(A, !0));
  }
  var y = e.generateCoord, m = e.generateCoordCount, _ = m != null;
  m = y ? m || 1 : 0;
  var S = y || "value";
  function w(D) {
    D.name == null && (D.name = D.coordDim);
  }
  if (s)
    C(i, function(D) {
      w(D);
    }), i.sort(function(D, A) {
      return D.storeDimIndex - A.storeDimIndex;
    });
  else
    for (var x = 0; x < o; x++) {
      var b = p(x), T = b.coordDim;
      T == null && (b.coordDim = BV(S, n, _), b.coordDimIndex = 0, (!y || m <= 0) && (b.isExtraCoord = !0), m--), w(b), b.type == null && ($D(r, x) === ue.Must || b.isExtraCoord && (b.otherDims.itemName != null || b.otherDims.seriesName != null)) && (b.type = "ordinal");
    }
  return kV(i), new KC({
    source: r,
    dimensions: i,
    fullDimensionCount: o,
    dimensionOmitted: s
  });
}
function kV(r) {
  for (var e = K(), t = 0; t < r.length; t++) {
    var a = r[t], n = a.name, i = e.get(n) || 0;
    i > 0 && (a.name = n + (i - 1)), i++, e.set(n, i);
  }
}
function VV(r, e, t, a) {
  var n = Math.max(r.dimensionsDetectedCount || 1, e.length, t.length, a || 0);
  return C(e, function(i) {
    var o;
    j(i) && (o = i.dimsDef) && (n = Math.max(n, o.length));
  }), n;
}
function BV(r, e, t) {
  if (t || e.hasKey(r)) {
    for (var a = 0; e.hasKey(r + a); )
      a++;
    r += a;
  }
  return e.set(r, !0), r;
}
var zV = (
  /** @class */
  function() {
    function r(e) {
      this.coordSysDims = [], this.axisMap = K(), this.categoryAxisMap = K(), this.coordSysName = e;
    }
    return r;
  }()
);
function GV(r) {
  var e = r.get("coordinateSystem"), t = new zV(e), a = FV[e];
  if (a)
    return a(r, t, t.axisMap, t.categoryAxisMap), t;
}
var FV = {
  cartesian2d: function(r, e, t, a) {
    var n = r.getReferringComponents("xAxis", Qt).models[0], i = r.getReferringComponents("yAxis", Qt).models[0];
    if ({}.NODE_ENV !== "production") {
      if (!n)
        throw new Error('xAxis "' + jt(r.get("xAxisIndex"), r.get("xAxisId"), 0) + '" not found');
      if (!i)
        throw new Error('yAxis "' + jt(r.get("xAxisIndex"), r.get("yAxisId"), 0) + '" not found');
    }
    e.coordSysDims = ["x", "y"], t.set("x", n), t.set("y", i), Oi(n) && (a.set("x", n), e.firstCategoryDimIndex = 0), Oi(i) && (a.set("y", i), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  singleAxis: function(r, e, t, a) {
    var n = r.getReferringComponents("singleAxis", Qt).models[0];
    if ({}.NODE_ENV !== "production" && !n)
      throw new Error("singleAxis should be specified.");
    e.coordSysDims = ["single"], t.set("single", n), Oi(n) && (a.set("single", n), e.firstCategoryDimIndex = 0);
  },
  polar: function(r, e, t, a) {
    var n = r.getReferringComponents("polar", Qt).models[0], i = n.findAxisModel("radiusAxis"), o = n.findAxisModel("angleAxis");
    if ({}.NODE_ENV !== "production") {
      if (!o)
        throw new Error("angleAxis option not found");
      if (!i)
        throw new Error("radiusAxis option not found");
    }
    e.coordSysDims = ["radius", "angle"], t.set("radius", i), t.set("angle", o), Oi(i) && (a.set("radius", i), e.firstCategoryDimIndex = 0), Oi(o) && (a.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  geo: function(r, e, t, a) {
    e.coordSysDims = ["lng", "lat"];
  },
  parallel: function(r, e, t, a) {
    var n = r.ecModel, i = n.getComponent("parallel", r.get("parallelIndex")), o = e.coordSysDims = i.dimensions.slice();
    C(i.parallelAxisIndex, function(s, l) {
      var u = n.getComponent("parallelAxis", s), f = o[l];
      t.set(f, u), Oi(u) && (a.set(f, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
    });
  }
};
function Oi(r) {
  return r.get("type") === "category";
}
function HV(r, e, t) {
  t = t || {};
  var a = t.byIndex, n = t.stackedCoordDimension, i, o, s;
  WV(e) ? i = e : (o = e.schema, i = o.dimensions, s = e.store);
  var l = !!(r && r.get("stack")), u, f, h, v;
  if (C(i, function(m, _) {
    $(m) && (i[_] = m = {
      name: m
    }), l && !m.isExtraCoord && (!a && !u && m.ordinalMeta && (u = m), !f && m.type !== "ordinal" && m.type !== "time" && (!n || n === m.coordDim) && (f = m));
  }), f && !a && !u && (a = !0), f) {
    h = "__\0ecstackresult_" + r.id, v = "__\0ecstackedover_" + r.id, u && (u.createInvertedIndices = !0);
    var c = f.coordDim, p = f.type, d = 0;
    C(i, function(m) {
      m.coordDim === c && d++;
    });
    var g = {
      name: h,
      coordDim: c,
      coordDimIndex: d,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: i.length
    }, y = {
      name: v,
      // This dimension contains stack base (generally, 0), so do not set it as
      // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
      coordDim: v,
      coordDimIndex: d + 1,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: i.length + 1
    };
    o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(v, p), y.storeDimIndex = s.ensureCalculationDimension(h, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(y)) : (i.push(g), i.push(y));
  }
  return {
    stackedDimension: f && f.name,
    stackedByDimension: u && u.name,
    isStackedByIndex: a,
    stackedOverDimension: v,
    stackResultDimension: h
  };
}
function WV(r) {
  return !jC(r.schema);
}
function tn(r, e) {
  return !!e && e === r.getCalculationInfo("stackedDimension");
}
function eA(r, e) {
  return tn(r, e) ? r.getCalculationInfo("stackResultDimension") : e;
}
function $V(r, e) {
  var t = r.get("coordinateSystem"), a = Po.get(t), n;
  return e && e.coordSysDims && (n = G(e.coordSysDims, function(i) {
    var o = {
      name: i
    }, s = e.axisMap.get(i);
    if (s) {
      var l = s.get("type");
      o.type = Ef(l);
    }
    return o;
  })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]), n;
}
function UV(r, e, t) {
  var a, n;
  return t && C(r, function(i, o) {
    var s = i.coordDim, l = t.categoryAxisMap.get(s);
    l && (a == null && (a = o), i.ordinalMeta = l.getOrdinalMeta(), e && (i.createInvertedIndices = !0)), i.otherDims.itemName != null && (n = !0);
  }), !n && a != null && (r[a].otherDims.itemName = 0), a;
}
function xa(r, e, t) {
  t = t || {};
  var a = e.getSourceManager(), n, i = !1;
  r ? (i = !0, n = Yg(r)) : (n = a.getSource(), i = n.sourceFormat === hr);
  var o = GV(e), s = $V(e, o), l = t.useEncodeDefaulter, u = q(l) ? l : l ? ot(WD, s, e) : null, f = {
    coordDimensions: s,
    generateCoord: t.generateCoord,
    encodeDefine: e.getEncode(),
    encodeDefaulter: u,
    canOmitUnusedDimensions: !i
  }, h = xl(n, f), v = UV(h.dimensions, t.createInvertedIndices, o), c = i ? null : a.getSharedDataStore(h), p = HV(e, {
    schema: h,
    store: c
  }), d = new Ce(h, e);
  d.setCalculationInfo(p);
  var g = v != null && YV(n) ? function(y, m, _, S) {
    return S === v ? _ : this.defaultDimValueGetter(y, m, _, S);
  } : null;
  return d.hasItemOption = !1, d.initData(
    // Try to reuse the data store in sourceManager if using dataset.
    i ? n : c,
    null,
    g
  ), d;
}
function YV(r) {
  if (r.sourceFormat === hr) {
    var e = ZV(r.data || []);
    return !z(wo(e));
  }
}
function ZV(r) {
  for (var e = 0; e < r.length && r[e] == null; )
    e++;
  return r[e];
}
var rA = (
  /** @class */
  function() {
    function r(e) {
      this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
    }
    return r.prototype.getSetting = function(e) {
      return this._setting[e];
    }, r.prototype.unionExtent = function(e) {
      var t = this._extent;
      e[0] < t[0] && (t[0] = e[0]), e[1] > t[1] && (t[1] = e[1]);
    }, r.prototype.unionExtentFromData = function(e, t) {
      this.unionExtent(e.getApproximateExtent(t));
    }, r.prototype.getExtent = function() {
      return this._extent.slice();
    }, r.prototype.setExtent = function(e, t) {
      var a = this._extent;
      isNaN(e) || (a[0] = e), isNaN(t) || (a[1] = t);
    }, r.prototype.isInExtentRange = function(e) {
      return this._extent[0] <= e && this._extent[1] >= e;
    }, r.prototype.isBlank = function() {
      return this._isBlank;
    }, r.prototype.setBlank = function(e) {
      this._isBlank = e;
    }, r;
  }()
);
vh(rA);
const wa = rA;
var XV = 0, qV = (
  /** @class */
  function() {
    function r(e) {
      this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++XV;
    }
    return r.createByAxisModel = function(e) {
      var t = e.option, a = t.data, n = a && G(a, KV);
      return new r({
        categories: n,
        needCollect: !n,
        // deduplication is default in axis.
        deduplication: t.dedplication !== !1
      });
    }, r.prototype.getOrdinal = function(e) {
      return this._getOrCreateMap().get(e);
    }, r.prototype.parseAndCollect = function(e) {
      var t, a = this._needCollect;
      if (!$(e) && !a)
        return e;
      if (a && !this._deduplication)
        return t = this.categories.length, this.categories[t] = e, t;
      var n = this._getOrCreateMap();
      return t = n.get(e), t == null && (a ? (t = this.categories.length, this.categories[t] = e, n.set(e, t)) : t = NaN), t;
    }, r.prototype._getOrCreateMap = function() {
      return this._map || (this._map = K(this.categories));
    }, r;
  }()
);
function KV(r) {
  return j(r) && r.value != null ? r.value : r + "";
}
const gd = qV;
function jV(r) {
  var e = Math.pow(10, fh(Math.abs(r))), t = Math.abs(r / e);
  return t === 0 || t === 1 || t === 2 || t === 3 || t === 5;
}
function yd(r) {
  return r.type === "interval" || r.type === "log";
}
function QV(r, e, t, a) {
  var n = {}, i = r[1] - r[0], o = n.interval = dT(i / e, !0);
  t != null && o < t && (o = n.interval = t), a != null && o > a && (o = n.interval = a);
  var s = n.intervalPrecision = aA(o), l = n.niceTickExtent = [Yt(Math.ceil(r[0] / o) * o, s), Yt(Math.floor(r[1] / o) * o, s)];
  return JV(l, r), n;
}
function Jv(r) {
  var e = Math.pow(10, fh(r)), t = r / e;
  return t ? t === 2 ? t = 3 : t === 3 ? t = 5 : t *= 2 : t = 1, Yt(t * e);
}
function aA(r) {
  return zr(r) + 2;
}
function K_(r, e, t) {
  r[e] = Math.max(Math.min(r[e], t[1]), t[0]);
}
function JV(r, e) {
  !isFinite(r[0]) && (r[0] = e[0]), !isFinite(r[1]) && (r[1] = e[1]), K_(r, 0, e), K_(r, 1, e), r[0] > r[1] && (r[0] = r[1]);
}
function Rh(r, e) {
  return r >= e[0] && r <= e[1];
}
function Nh(r, e) {
  return e[1] === e[0] ? 0.5 : (r - e[0]) / (e[1] - e[0]);
}
function Oh(r, e) {
  return r * (e[1] - e[0]) + e[0];
}
var nA = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      a.type = "ordinal";
      var n = a.getSetting("ordinalMeta");
      return n || (n = new gd({})), z(n) && (n = new gd({
        categories: G(n, function(i) {
          return j(i) ? i.value : i;
        })
      })), a._ordinalMeta = n, a._extent = a.getSetting("extent") || [0, n.categories.length - 1], a;
    }
    return e.prototype.parse = function(t) {
      return t == null ? NaN : $(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t);
    }, e.prototype.contain = function(t) {
      return t = this.parse(t), Rh(t, this._extent) && this._ordinalMeta.categories[t] != null;
    }, e.prototype.normalize = function(t) {
      return t = this._getTickNumber(this.parse(t)), Nh(t, this._extent);
    }, e.prototype.scale = function(t) {
      return t = Math.round(Oh(t, this._extent)), this.getRawOrdinalNumber(t);
    }, e.prototype.getTicks = function() {
      for (var t = [], a = this._extent, n = a[0]; n <= a[1]; )
        t.push({
          value: n
        }), n++;
      return t;
    }, e.prototype.getMinorTicks = function(t) {
    }, e.prototype.setSortInfo = function(t) {
      if (t == null) {
        this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
        return;
      }
      for (var a = t.ordinalNumbers, n = this._ordinalNumbersByTick = [], i = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, a.length); o < l; ++o) {
        var u = a[o];
        n[o] = u, i[u] = o;
      }
      for (var f = 0; o < s; ++o) {
        for (; i[f] != null; )
          f++;
        n.push(f), i[f] = o;
      }
    }, e.prototype._getTickNumber = function(t) {
      var a = this._ticksByOrdinalNumber;
      return a && t >= 0 && t < a.length ? a[t] : t;
    }, e.prototype.getRawOrdinalNumber = function(t) {
      var a = this._ordinalNumbersByTick;
      return a && t >= 0 && t < a.length ? a[t] : t;
    }, e.prototype.getLabel = function(t) {
      if (!this.isBlank()) {
        var a = this.getRawOrdinalNumber(t.value), n = this._ordinalMeta.categories[a];
        return n == null ? "" : n + "";
      }
    }, e.prototype.count = function() {
      return this._extent[1] - this._extent[0] + 1;
    }, e.prototype.unionExtentFromData = function(t, a) {
      this.unionExtent(t.getApproximateExtent(a));
    }, e.prototype.isInExtentRange = function(t) {
      return t = this._getTickNumber(t), this._extent[0] <= t && this._extent[1] >= t;
    }, e.prototype.getOrdinalMeta = function() {
      return this._ordinalMeta;
    }, e.prototype.calcNiceTicks = function() {
    }, e.prototype.calcNiceExtent = function() {
    }, e.type = "ordinal", e;
  }(wa)
);
wa.registerClass(nA);
const oy = nA;
var Mn = Yt, iA = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "interval", t._interval = 0, t._intervalPrecision = 2, t;
    }
    return e.prototype.parse = function(t) {
      return t;
    }, e.prototype.contain = function(t) {
      return Rh(t, this._extent);
    }, e.prototype.normalize = function(t) {
      return Nh(t, this._extent);
    }, e.prototype.scale = function(t) {
      return Oh(t, this._extent);
    }, e.prototype.setExtent = function(t, a) {
      var n = this._extent;
      isNaN(t) || (n[0] = parseFloat(t)), isNaN(a) || (n[1] = parseFloat(a));
    }, e.prototype.unionExtent = function(t) {
      var a = this._extent;
      t[0] < a[0] && (a[0] = t[0]), t[1] > a[1] && (a[1] = t[1]), this.setExtent(a[0], a[1]);
    }, e.prototype.getInterval = function() {
      return this._interval;
    }, e.prototype.setInterval = function(t) {
      this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = aA(t);
    }, e.prototype.getTicks = function(t) {
      var a = this._interval, n = this._extent, i = this._niceExtent, o = this._intervalPrecision, s = [];
      if (!a)
        return s;
      var l = 1e4;
      n[0] < i[0] && (t ? s.push({
        value: Mn(i[0] - a, o)
      }) : s.push({
        value: n[0]
      }));
      for (var u = i[0]; u <= i[1] && (s.push({
        value: u
      }), u = Mn(u + a, o), u !== s[s.length - 1].value); )
        if (s.length > l)
          return [];
      var f = s.length ? s[s.length - 1].value : i[1];
      return n[1] > f && (t ? s.push({
        value: Mn(f + a, o)
      }) : s.push({
        value: n[1]
      })), s;
    }, e.prototype.getMinorTicks = function(t) {
      for (var a = this.getTicks(!0), n = [], i = this.getExtent(), o = 1; o < a.length; o++) {
        for (var s = a[o], l = a[o - 1], u = 0, f = [], h = s.value - l.value, v = h / t; u < t - 1; ) {
          var c = Mn(l.value + (u + 1) * v);
          c > i[0] && c < i[1] && f.push(c), u++;
        }
        n.push(f);
      }
      return n;
    }, e.prototype.getLabel = function(t, a) {
      if (t == null)
        return "";
      var n = a && a.precision;
      n == null ? n = zr(t.value) || 0 : n === "auto" && (n = this._intervalPrecision);
      var i = Mn(t.value, n, !0);
      return OD(i);
    }, e.prototype.calcNiceTicks = function(t, a, n) {
      t = t || 5;
      var i = this._extent, o = i[1] - i[0];
      if (isFinite(o)) {
        o < 0 && (o = -o, i.reverse());
        var s = QV(i, t, a, n);
        this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
      }
    }, e.prototype.calcNiceExtent = function(t) {
      var a = this._extent;
      if (a[0] === a[1])
        if (a[0] !== 0) {
          var n = Math.abs(a[0]);
          t.fixMax || (a[1] += n / 2), a[0] -= n / 2;
        } else
          a[1] = 1;
      var i = a[1] - a[0];
      isFinite(i) || (a[0] = 0, a[1] = 1), this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
      var o = this._interval;
      t.fixMin || (a[0] = Mn(Math.floor(a[0] / o) * o)), t.fixMax || (a[1] = Mn(Math.ceil(a[1] / o) * o));
    }, e.prototype.setNiceExtent = function(t, a) {
      this._niceExtent = [t, a];
    }, e.type = "interval", e;
  }(wa)
);
wa.registerClass(iA);
const en = iA;
var oA = typeof Float32Array < "u", tB = oA ? Float32Array : Array;
function Fr(r) {
  return z(r) ? oA ? new Float32Array(r) : r : new tB(r);
}
var md = "__ec_stack_";
function sy(r) {
  return r.get("stack") || md + r.seriesIndex;
}
function ly(r) {
  return r.dim + r.index;
}
function eB(r) {
  var e = [], t = r.axis, a = "axis0";
  if (t.type === "category") {
    for (var n = t.getBandWidth(), i = 0; i < r.count; i++)
      e.push(tt({
        bandWidth: n,
        axisKey: a,
        stackId: md + i
      }, r));
    for (var o = uA(e), s = [], i = 0; i < r.count; i++) {
      var l = o[a][md + i];
      l.offsetCenter = l.offset + l.width / 2, s.push(l);
    }
    return s;
  }
}
function sA(r, e) {
  var t = [];
  return e.eachSeriesByType(r, function(a) {
    vA(a) && t.push(a);
  }), t;
}
function rB(r) {
  var e = {};
  C(r, function(l) {
    var u = l.coordinateSystem, f = u.getBaseAxis();
    if (!(f.type !== "time" && f.type !== "value"))
      for (var h = l.getData(), v = f.dim + "_" + f.index, c = h.getDimensionIndex(h.mapDimension(f.dim)), p = h.getStore(), d = 0, g = p.count(); d < g; ++d) {
        var y = p.get(c, d);
        e[v] ? e[v].push(y) : e[v] = [y];
      }
  });
  var t = {};
  for (var a in e)
    if (e.hasOwnProperty(a)) {
      var n = e[a];
      if (n) {
        n.sort(function(l, u) {
          return l - u;
        });
        for (var i = null, o = 1; o < n.length; ++o) {
          var s = n[o] - n[o - 1];
          s > 0 && (i = i === null ? s : Math.min(i, s));
        }
        t[a] = i;
      }
    }
  return t;
}
function lA(r) {
  var e = rB(r), t = [];
  return C(r, function(a) {
    var n = a.coordinateSystem, i = n.getBaseAxis(), o = i.getExtent(), s;
    if (i.type === "category")
      s = i.getBandWidth();
    else if (i.type === "value" || i.type === "time") {
      var l = i.dim + "_" + i.index, u = e[l], f = Math.abs(o[1] - o[0]), h = i.scale.getExtent(), v = Math.abs(h[1] - h[0]);
      s = u ? f / v * u : f;
    } else {
      var c = a.getData();
      s = Math.abs(o[1] - o[0]) / c.count();
    }
    var p = H(a.get("barWidth"), s), d = H(a.get("barMaxWidth"), s), g = H(
      // 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.
      a.get("barMinWidth") || (cA(a) ? 0.5 : 1),
      s
    ), y = a.get("barGap"), m = a.get("barCategoryGap");
    t.push({
      bandWidth: s,
      barWidth: p,
      barMaxWidth: d,
      barMinWidth: g,
      barGap: y,
      barCategoryGap: m,
      axisKey: ly(i),
      stackId: sy(a)
    });
  }), uA(t);
}
function uA(r) {
  var e = {};
  C(r, function(a, n) {
    var i = a.axisKey, o = a.bandWidth, s = e[i] || {
      bandWidth: o,
      remainedWidth: o,
      autoWidthCount: 0,
      categoryGap: null,
      gap: "20%",
      stacks: {}
    }, l = s.stacks;
    e[i] = s;
    var u = a.stackId;
    l[u] || s.autoWidthCount++, l[u] = l[u] || {
      width: 0,
      maxWidth: 0
    };
    var f = a.barWidth;
    f && !l[u].width && (l[u].width = f, f = Math.min(s.remainedWidth, f), s.remainedWidth -= f);
    var h = a.barMaxWidth;
    h && (l[u].maxWidth = h);
    var v = a.barMinWidth;
    v && (l[u].minWidth = v);
    var c = a.barGap;
    c != null && (s.gap = c);
    var p = a.barCategoryGap;
    p != null && (s.categoryGap = p);
  });
  var t = {};
  return C(e, function(a, n) {
    t[n] = {};
    var i = a.stacks, o = a.bandWidth, s = a.categoryGap;
    if (s == null) {
      var l = _t(i).length;
      s = Math.max(35 - l * 4, 15) + "%";
    }
    var u = H(s, o), f = H(a.gap, 1), h = a.remainedWidth, v = a.autoWidthCount, c = (h - u) / (v + (v - 1) * f);
    c = Math.max(c, 0), C(i, function(y) {
      var m = y.maxWidth, _ = y.minWidth;
      if (y.width) {
        var S = y.width;
        m && (S = Math.min(S, m)), _ && (S = Math.max(S, _)), y.width = S, h -= S + f * S, v--;
      } else {
        var S = c;
        m && m < S && (S = Math.min(m, h)), _ && _ > S && (S = _), S !== c && (y.width = S, h -= S + f * S, v--);
      }
    }), c = (h - u) / (v + (v - 1) * f), c = Math.max(c, 0);
    var p = 0, d;
    C(i, function(y, m) {
      y.width || (y.width = c), d = y, p += y.width * (1 + f);
    }), d && (p -= d.width * f);
    var g = -p / 2;
    C(i, function(y, m) {
      t[n][m] = t[n][m] || {
        bandWidth: o,
        offset: g,
        width: y.width
      }, g += y.width * (1 + f);
    });
  }), t;
}
function aB(r, e, t) {
  if (r && e) {
    var a = r[ly(e)];
    return a != null && t != null ? a[sy(t)] : a;
  }
}
function fA(r, e) {
  var t = sA(r, e), a = lA(t);
  C(t, function(n) {
    var i = n.getData(), o = n.coordinateSystem, s = o.getBaseAxis(), l = sy(n), u = a[ly(s)][l], f = u.offset, h = u.width;
    i.setLayout({
      bandWidth: u.bandWidth,
      offset: f,
      size: h
    });
  });
}
function hA(r) {
  return {
    seriesType: r,
    plan: Ro(),
    reset: function(e) {
      if (vA(e)) {
        var t = e.getData(), a = e.coordinateSystem, n = a.getBaseAxis(), i = a.getOtherAxis(n), o = t.getDimensionIndex(t.mapDimension(i.dim)), s = t.getDimensionIndex(t.mapDimension(n.dim)), l = e.get("showBackground", !0), u = t.mapDimension(i.dim), f = t.getCalculationInfo("stackResultDimension"), h = tn(t, u) && !!t.getCalculationInfo("stackedOnSeries"), v = i.isHorizontal(), c = nB(n, i), p = cA(e), d = e.get("barMinHeight") || 0, g = f && t.getDimensionIndex(f), y = t.getLayout("size"), m = t.getLayout("offset");
        return {
          progress: function(_, S) {
            for (var w = _.count, x = p && Fr(w * 3), b = p && l && Fr(w * 3), T = p && Fr(w), D = a.master.getRect(), A = v ? D.width : D.height, M, I = S.getStore(), L = 0; (M = _.next()) != null; ) {
              var E = I.get(h ? g : o, M), P = I.get(s, M), R = c, k = void 0;
              h && (k = +E - I.get(o, M));
              var O = void 0, B = void 0, F = void 0, W = void 0;
              if (v) {
                var Z = a.dataToPoint([E, P]);
                if (h) {
                  var J = a.dataToPoint([k, P]);
                  R = J[0];
                }
                O = R, B = Z[1] + m, F = Z[0] - R, W = y, Math.abs(F) < d && (F = (F < 0 ? -1 : 1) * d);
              } else {
                var Z = a.dataToPoint([P, E]);
                if (h) {
                  var J = a.dataToPoint([P, k]);
                  R = J[1];
                }
                O = Z[0] + m, B = R, F = y, W = Z[1] - R, Math.abs(W) < d && (W = (W <= 0 ? -1 : 1) * d);
              }
              p ? (x[L] = O, x[L + 1] = B, x[L + 2] = v ? F : W, b && (b[L] = v ? D.x : O, b[L + 1] = v ? B : D.y, b[L + 2] = A), T[M] = M) : S.setItemLayout(M, {
                x: O,
                y: B,
                width: F,
                height: W
              }), L += 3;
            }
            p && S.setLayout({
              largePoints: x,
              largeDataIndices: T,
              largeBackgroundPoints: b,
              valueAxisHorizontal: v
            });
          }
        };
      }
    }
  };
}
function vA(r) {
  return r.coordinateSystem && r.coordinateSystem.type === "cartesian2d";
}
function cA(r) {
  return r.pipelineContext && r.pipelineContext.large;
}
function nB(r, e) {
  return e.toGlobalCoord(e.dataToCoord(e.type === "log" ? 1 : 0));
}
var iB = function(r, e, t, a) {
  for (; t < a; ) {
    var n = t + a >>> 1;
    r[n][1] < e ? t = n + 1 : a = n;
  }
  return t;
}, pA = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "time", a;
    }
    return e.prototype.getLabel = function(t) {
      var a = this.getSetting("useUTC");
      return bh(t.value, G0[CN(ao(this._minLevelUnit))] || G0.second, a, this.getSetting("locale"));
    }, e.prototype.getFormattedLabel = function(t, a, n) {
      var i = this.getSetting("useUTC"), o = this.getSetting("locale");
      return AN(t, a, n, o, i);
    }, e.prototype.getTicks = function() {
      var t = this._interval, a = this._extent, n = [];
      if (!t)
        return n;
      n.push({
        value: a[0],
        level: 0
      });
      var i = this.getSetting("useUTC"), o = vB(this._minLevelUnit, this._approxInterval, i, a);
      return n = n.concat(o), n.push({
        value: a[1],
        level: 0
      }), n;
    }, e.prototype.calcNiceExtent = function(t) {
      var a = this._extent;
      if (a[0] === a[1] && (a[0] -= ir, a[1] += ir), a[1] === -1 / 0 && a[0] === 1 / 0) {
        var n = /* @__PURE__ */ new Date();
        a[1] = +new Date(n.getFullYear(), n.getMonth(), n.getDate()), a[0] = a[1] - ir;
      }
      this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
    }, e.prototype.calcNiceTicks = function(t, a, n) {
      t = t || 10;
      var i = this._extent, o = i[1] - i[0];
      this._approxInterval = o / t, a != null && this._approxInterval < a && (this._approxInterval = a), n != null && this._approxInterval > n && (this._approxInterval = n);
      var s = su.length, l = Math.min(iB(su, this._approxInterval, 0, s), s - 1);
      this._interval = su[l][1], this._minLevelUnit = su[Math.max(l - 1, 0)][0];
    }, e.prototype.parse = function(t) {
      return Ct(t) ? t : +Zr(t);
    }, e.prototype.contain = function(t) {
      return Rh(this.parse(t), this._extent);
    }, e.prototype.normalize = function(t) {
      return Nh(this.parse(t), this._extent);
    }, e.prototype.scale = function(t) {
      return Oh(t, this._extent);
    }, e.type = "time", e;
  }(en)
), su = [
  // Format                           interval
  ["second", Bg],
  ["minute", zg],
  ["hour", Rs],
  ["quarter-day", Rs * 6],
  ["half-day", Rs * 12],
  ["day", ir * 1.2],
  ["half-week", ir * 3.5],
  ["week", ir * 7],
  ["month", ir * 31],
  ["quarter", ir * 95],
  ["half-year", z0 / 2],
  ["year", z0]
  // 1Y
];
function oB(r, e, t, a) {
  var n = Zr(e), i = Zr(t), o = function(p) {
    return F0(n, p, a) === F0(i, p, a);
  }, s = function() {
    return o("year");
  }, l = function() {
    return s() && o("month");
  }, u = function() {
    return l() && o("day");
  }, f = function() {
    return u() && o("hour");
  }, h = function() {
    return f() && o("minute");
  }, v = function() {
    return h() && o("second");
  }, c = function() {
    return v() && o("millisecond");
  };
  switch (r) {
    case "year":
      return s();
    case "month":
      return l();
    case "day":
      return u();
    case "hour":
      return f();
    case "minute":
      return h();
    case "second":
      return v();
    case "millisecond":
      return c();
  }
}
function sB(r, e) {
  return r /= ir, r > 16 ? 16 : r > 7.5 ? 7 : r > 3.5 ? 4 : r > 1.5 ? 2 : 1;
}
function lB(r) {
  var e = 30 * ir;
  return r /= e, r > 6 ? 6 : r > 3 ? 3 : r > 2 ? 2 : 1;
}
function uB(r) {
  return r /= Rs, r > 12 ? 12 : r > 6 ? 6 : r > 3.5 ? 4 : r > 2 ? 2 : 1;
}
function j_(r, e) {
  return r /= e ? zg : Bg, r > 30 ? 30 : r > 20 ? 20 : r > 15 ? 15 : r > 10 ? 10 : r > 5 ? 5 : r > 2 ? 2 : 1;
}
function fB(r) {
  return dT(r, !0);
}
function hB(r, e, t) {
  var a = new Date(r);
  switch (ao(e)) {
    case "year":
    case "month":
      a[ID(t)](0);
    case "day":
      a[LD(t)](1);
    case "hour":
      a[ED(t)](0);
    case "minute":
      a[PD(t)](0);
    case "second":
      a[RD(t)](0), a[ND(t)](0);
  }
  return a.getTime();
}
function vB(r, e, t, a) {
  var n = 1e4, i = AD, o = 0;
  function s(A, M, I, L, E, P, R) {
    for (var k = new Date(M), O = M, B = k[L](); O < I && O <= a[1]; )
      R.push({
        value: O
      }), B += A, k[E](B), O = k.getTime();
    R.push({
      value: O,
      notAdd: !0
    });
  }
  function l(A, M, I) {
    var L = [], E = !M.length;
    if (!oB(ao(A), a[0], a[1], t)) {
      E && (M = [{
        // TODO Optimize. Not include so may ticks.
        value: hB(new Date(a[0]), A, t)
      }, {
        value: a[1]
      }]);
      for (var P = 0; P < M.length - 1; P++) {
        var R = M[P].value, k = M[P + 1].value;
        if (R !== k) {
          var O = void 0, B = void 0, F = void 0, W = !1;
          switch (A) {
            case "year":
              O = Math.max(1, Math.round(e / ir / 365)), B = Gg(t), F = MN(t);
              break;
            case "half-year":
            case "quarter":
            case "month":
              O = lB(e), B = no(t), F = ID(t);
              break;
            case "week":
            case "half-week":
            case "day":
              O = sB(e), B = Th(t), F = LD(t), W = !0;
              break;
            case "half-day":
            case "quarter-day":
            case "hour":
              O = uB(e), B = Zs(t), F = ED(t);
              break;
            case "minute":
              O = j_(e, !0), B = Dh(t), F = PD(t);
              break;
            case "second":
              O = j_(e, !1), B = Ch(t), F = RD(t);
              break;
            case "millisecond":
              O = fB(e), B = Ah(t), F = ND(t);
              break;
          }
          s(O, R, k, B, F, W, L), A === "year" && I.length > 1 && P === 0 && I.unshift({
            value: I[0].value - O
          });
        }
      }
      for (var P = 0; P < L.length; P++)
        I.push(L[P]);
      return L;
    }
  }
  for (var u = [], f = [], h = 0, v = 0, c = 0; c < i.length && o++ < n; ++c) {
    var p = ao(i[c]);
    if (DN(i[c])) {
      l(i[c], u[u.length - 1] || [], f);
      var d = i[c + 1] ? ao(i[c + 1]) : null;
      if (p !== d) {
        if (f.length) {
          v = h, f.sort(function(A, M) {
            return A.value - M.value;
          });
          for (var g = [], y = 0; y < f.length; ++y) {
            var m = f[y].value;
            (y === 0 || f[y - 1].value !== m) && (g.push(f[y]), m >= a[0] && m <= a[1] && h++);
          }
          var _ = (a[1] - a[0]) / e;
          if (h > _ * 1.5 && v > _ / 1.5 || (u.push(g), h > _ || r === i[c]))
            break;
        }
        f = [];
      }
    }
  }
  ({}).NODE_ENV !== "production" && o >= n && Ft("Exceed safe limit.");
  for (var S = Et(G(u, function(A) {
    return Et(A, function(M) {
      return M.value >= a[0] && M.value <= a[1] && !M.notAdd;
    });
  }), function(A) {
    return A.length > 0;
  }), w = [], x = S.length - 1, c = 0; c < S.length; ++c)
    for (var b = S[c], T = 0; T < b.length; ++T)
      w.push({
        value: b[T].value,
        level: x - c
      });
  w.sort(function(A, M) {
    return A.value - M.value;
  });
  for (var D = [], c = 0; c < w.length; ++c)
    (c === 0 || w[c].value !== w[c - 1].value) && D.push(w[c]);
  return D;
}
wa.registerClass(pA);
const dA = pA;
var Q_ = wa.prototype, ks = en.prototype, cB = Yt, pB = Math.floor, dB = Math.ceil, lu = Math.pow, cr = Math.log, uy = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "log", t.base = 10, t._originalScale = new en(), t._interval = 0, t;
    }
    return e.prototype.getTicks = function(t) {
      var a = this._originalScale, n = this._extent, i = a.getExtent(), o = ks.getTicks.call(this, t);
      return G(o, function(s) {
        var l = s.value, u = Yt(lu(this.base, l));
        return u = l === n[0] && this._fixMin ? uu(u, i[0]) : u, u = l === n[1] && this._fixMax ? uu(u, i[1]) : u, {
          value: u
        };
      }, this);
    }, e.prototype.setExtent = function(t, a) {
      var n = cr(this.base);
      t = cr(Math.max(0, t)) / n, a = cr(Math.max(0, a)) / n, ks.setExtent.call(this, t, a);
    }, e.prototype.getExtent = function() {
      var t = this.base, a = Q_.getExtent.call(this);
      a[0] = lu(t, a[0]), a[1] = lu(t, a[1]);
      var n = this._originalScale, i = n.getExtent();
      return this._fixMin && (a[0] = uu(a[0], i[0])), this._fixMax && (a[1] = uu(a[1], i[1])), a;
    }, e.prototype.unionExtent = function(t) {
      this._originalScale.unionExtent(t);
      var a = this.base;
      t[0] = cr(t[0]) / cr(a), t[1] = cr(t[1]) / cr(a), Q_.unionExtent.call(this, t);
    }, e.prototype.unionExtentFromData = function(t, a) {
      this.unionExtent(t.getApproximateExtent(a));
    }, e.prototype.calcNiceTicks = function(t) {
      t = t || 10;
      var a = this._extent, n = a[1] - a[0];
      if (!(n === 1 / 0 || n <= 0)) {
        var i = YE(n), o = t / n * i;
        for (o <= 0.5 && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0; )
          i *= 10;
        var s = [Yt(dB(a[0] / i) * i), Yt(pB(a[1] / i) * i)];
        this._interval = i, this._niceExtent = s;
      }
    }, e.prototype.calcNiceExtent = function(t) {
      ks.calcNiceExtent.call(this, t), this._fixMin = t.fixMin, this._fixMax = t.fixMax;
    }, e.prototype.parse = function(t) {
      return t;
    }, e.prototype.contain = function(t) {
      return t = cr(t) / cr(this.base), Rh(t, this._extent);
    }, e.prototype.normalize = function(t) {
      return t = cr(t) / cr(this.base), Nh(t, this._extent);
    }, e.prototype.scale = function(t) {
      return t = Oh(t, this._extent), lu(this.base, t);
    }, e.type = "log", e;
  }(wa)
), gA = uy.prototype;
gA.getMinorTicks = ks.getMinorTicks;
gA.getLabel = ks.getLabel;
function uu(r, e) {
  return cB(r, zr(e));
}
wa.registerClass(uy);
const gB = uy;
var yB = (
  /** @class */
  function() {
    function r(e, t, a) {
      this._prepareParams(e, t, a);
    }
    return r.prototype._prepareParams = function(e, t, a) {
      a[1] < a[0] && (a = [NaN, NaN]), this._dataMin = a[0], this._dataMax = a[1];
      var n = this._isOrdinal = e.type === "ordinal";
      this._needCrossZero = e.type === "interval" && t.getNeedCrossZero && t.getNeedCrossZero();
      var i = this._modelMinRaw = t.get("min", !0);
      q(i) ? this._modelMinNum = fu(e, i({
        min: a[0],
        max: a[1]
      })) : i !== "dataMin" && (this._modelMinNum = fu(e, i));
      var o = this._modelMaxRaw = t.get("max", !0);
      if (q(o) ? this._modelMaxNum = fu(e, o({
        min: a[0],
        max: a[1]
      })) : o !== "dataMax" && (this._modelMaxNum = fu(e, o)), n)
        this._axisDataLen = t.getCategories().length;
      else {
        var s = t.get("boundaryGap"), l = z(s) ? s : [s || 0, s || 0];
        typeof l[0] == "boolean" || typeof l[1] == "boolean" ? ({}.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 = [Tr(l[0], 1), Tr(l[1], 1)];
      }
    }, r.prototype.calculate = function() {
      var e = this._isOrdinal, t = this._dataMin, a = this._dataMax, n = this._axisDataLen, i = this._boundaryGapInner, o = e ? null : a - t || Math.abs(t), s = this._modelMinRaw === "dataMin" ? t : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? a : this._modelMaxNum, u = s != null, f = l != null;
      s == null && (s = e ? n ? 0 : NaN : t - i[0] * o), l == null && (l = e ? n ? n - 1 : NaN : a + i[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
      var h = li(s) || li(l) || e && !n;
      this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !f && (l = 0));
      var v = this._determinedMin, c = this._determinedMax;
      return v != null && (s = v, u = !0), c != null && (l = c, f = !0), {
        min: s,
        max: l,
        minFixed: u,
        maxFixed: f,
        isBlank: h
      };
    }, r.prototype.modifyDataMinMax = function(e, t) {
      ({}).NODE_ENV !== "production" && Q(!this.frozen), this[_B[e]] = t;
    }, r.prototype.setDeterminedMinMax = function(e, t) {
      var a = mB[e];
      ({}).NODE_ENV !== "production" && Q(!this.frozen && this[a] == null), this[a] = t;
    }, r.prototype.freeze = function() {
      this.frozen = !0;
    }, r;
  }()
), mB = {
  min: "_determinedMin",
  max: "_determinedMax"
}, _B = {
  min: "_dataMin",
  max: "_dataMax"
};
function yA(r, e, t) {
  var a = r.rawExtentInfo;
  return a || (a = new yB(r, e, t), r.rawExtentInfo = a, a);
}
function fu(r, e) {
  return e == null ? null : li(e) ? NaN : r.parse(e);
}
function mA(r, e) {
  var t = r.type, a = yA(r, e, r.getExtent()).calculate();
  r.setBlank(a.isBlank);
  var n = a.min, i = a.max, o = e.ecModel;
  if (o && t === "time") {
    var s = sA("bar", o), l = !1;
    if (C(s, function(h) {
      l = l || h.getBaseAxis() === e.axis;
    }), l) {
      var u = lA(s), f = SB(n, i, e, u);
      n = f.min, i = f.max;
    }
  }
  return {
    extent: [n, i],
    // "fix" means "fixed", the value should not be
    // changed in the subsequent steps.
    fixMin: a.minFixed,
    fixMax: a.maxFixed
  };
}
function SB(r, e, t, a) {
  var n = t.axis.getExtent(), i = n[1] - n[0], o = aB(a, t.axis);
  if (o === void 0)
    return {
      min: r,
      max: e
    };
  var s = 1 / 0;
  C(o, function(c) {
    s = Math.min(c.offset, s);
  });
  var l = -1 / 0;
  C(o, function(c) {
    l = Math.max(c.offset + c.width, l);
  }), s = Math.abs(s), l = Math.abs(l);
  var u = s + l, f = e - r, h = 1 - (s + l) / i, v = f / h - f;
  return e += v * (l / u), r -= v * (s / u), {
    min: r,
    max: e
  };
}
function vo(r, e) {
  var t = e, a = mA(r, t), n = a.extent, i = t.get("splitNumber");
  r instanceof gB && (r.base = t.get("logBase"));
  var o = r.type, s = t.get("interval"), l = o === "interval" || o === "time";
  r.setExtent(n[0], n[1]), r.calcNiceExtent({
    splitNumber: i,
    fixMin: a.fixMin,
    fixMax: a.fixMax,
    minInterval: l ? t.get("minInterval") : null,
    maxInterval: l ? t.get("maxInterval") : null
  }), s != null && r.setInterval && r.setInterval(s);
}
function kh(r, e) {
  if (e = e || r.get("type"), e)
    switch (e) {
      case "category":
        return new oy({
          ordinalMeta: r.getOrdinalMeta ? r.getOrdinalMeta() : r.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new dA({
          locale: r.ecModel.getLocaleModel(),
          useUTC: r.ecModel.get("useUTC")
        });
      default:
        return new (wa.getClass(e) || en)();
    }
}
function xB(r) {
  var e = r.scale.getExtent(), t = e[0], a = e[1];
  return !(t > 0 && a > 0 || t < 0 && a < 0);
}
function wl(r) {
  var e = r.getLabelModel().get("formatter"), t = r.type === "category" ? r.scale.getExtent()[0] : null;
  return r.scale.type === "time" ? function(a) {
    return function(n, i) {
      return r.scale.getFormattedLabel(n, i, a);
    };
  }(e) : $(e) ? function(a) {
    return function(n) {
      var i = r.scale.getLabel(n), o = a.replace("{value}", i ?? "");
      return o;
    };
  }(e) : q(e) ? function(a) {
    return function(n, i) {
      return t != null && (i = n.value - t), a(fy(r, n), i, n.level != null ? {
        level: n.level
      } : null);
    };
  }(e) : function(a) {
    return r.scale.getLabel(a);
  };
}
function fy(r, e) {
  return r.type === "category" ? r.scale.getLabel(e) : e.value;
}
function wB(r) {
  var e = r.model, t = r.scale;
  if (!(!e.get(["axisLabel", "show"]) || t.isBlank())) {
    var a, n, i = t.getExtent();
    t instanceof oy ? n = t.count() : (a = t.getTicks(), n = a.length);
    var o = r.getLabelModel(), s = wl(r), l, u = 1;
    n > 40 && (u = Math.ceil(n / 40));
    for (var f = 0; f < n; f += u) {
      var h = a ? a[f] : {
        value: i[0] + f
      }, v = s(h, f), c = o.getTextRect(v), p = bB(c, o.get("rotate") || 0);
      l ? l.union(p) : l = p;
    }
    return l;
  }
}
function bB(r, e) {
  var t = e * Math.PI / 180, a = r.width, n = r.height, i = a * Math.abs(Math.cos(t)) + Math.abs(n * Math.sin(t)), o = a * Math.abs(Math.sin(t)) + Math.abs(n * Math.cos(t)), s = new ht(r.x, r.y, i, o);
  return s;
}
function hy(r) {
  var e = r.get("interval");
  return e ?? "auto";
}
function _A(r) {
  return r.type === "category" && hy(r.getLabelModel()) === 0;
}
function Pf(r, e) {
  var t = {};
  return C(r.mapDimensionsAll(e), function(a) {
    t[eA(r, a)] = !0;
  }), _t(t);
}
function TB(r, e, t) {
  e && C(Pf(e, t), function(a) {
    var n = e.getApproximateExtent(a);
    n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]);
  });
}
var bl = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getNeedCrossZero = function() {
      var e = this.option;
      return !e.scale;
    }, r.prototype.getCoordSysModel = function() {
    }, r;
  }()
), DB = 1e-8;
function J_(r, e) {
  return Math.abs(r - e) < DB;
}
function Gn(r, e, t) {
  var a = 0, n = r[0];
  if (!n)
    return !1;
  for (var i = 1; i < r.length; i++) {
    var o = r[i];
    a += aa(n[0], n[1], o[0], o[1], e, t), n = o;
  }
  var s = r[0];
  return (!J_(n[0], s[0]) || !J_(n[1], s[1])) && (a += aa(n[0], n[1], s[0], s[1], e, t)), a !== 0;
}
var CB = [];
function tc(r, e) {
  for (var t = 0; t < r.length; t++)
    fe(r[t], r[t], e);
}
function t1(r, e, t, a) {
  for (var n = 0; n < r.length; n++) {
    var i = r[n];
    a && (i = a.project(i)), i && isFinite(i[0]) && isFinite(i[1]) && (Va(e, e, i), Ba(t, t, i));
  }
}
function AB(r) {
  for (var e = 0, t = 0, a = 0, n = r.length, i = r[n - 1][0], o = r[n - 1][1], s = 0; s < n; s++) {
    var l = r[s][0], u = r[s][1], f = i * u - l * o;
    e += f, t += (i + l) * f, a += (o + u) * f, i = l, o = u;
  }
  return e ? [t / e / 3, a / e / 3, e] : [r[0][0] || 0, r[0][1] || 0];
}
var SA = (
  /** @class */
  function() {
    function r(e) {
      this.name = e;
    }
    return r.prototype.setCenter = function(e) {
      this._center = e;
    }, r.prototype.getCenter = function() {
      var e = this._center;
      return e || (e = this._center = this.calcCenter()), e;
    }, r;
  }()
), e1 = (
  /** @class */
  function() {
    function r(e, t) {
      this.type = "polygon", this.exterior = e, this.interiors = t;
    }
    return r;
  }()
), r1 = (
  /** @class */
  function() {
    function r(e) {
      this.type = "linestring", this.points = e;
    }
    return r;
  }()
), xA = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this, t) || this;
      return i.type = "geoJSON", i.geometries = a, i._center = n && [n[0], n[1]], i;
    }
    return e.prototype.calcCenter = function() {
      for (var t = this.geometries, a, n = 0, i = 0; i < t.length; i++) {
        var o = t[i], s = o.exterior, l = s && s.length;
        l > n && (a = o, n = l);
      }
      if (a)
        return AB(a.exterior);
      var u = this.getBoundingRect();
      return [u.x + u.width / 2, u.y + u.height / 2];
    }, e.prototype.getBoundingRect = function(t) {
      var a = this._rect;
      if (a && !t)
        return a;
      var n = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0], o = this.geometries;
      return C(o, function(s) {
        s.type === "polygon" ? t1(s.exterior, n, i, t) : C(s.points, function(l) {
          t1(l, n, i, t);
        });
      }), isFinite(n[0]) && isFinite(n[1]) && isFinite(i[0]) && isFinite(i[1]) || (n[0] = n[1] = i[0] = i[1] = 0), a = new ht(n[0], n[1], i[0] - n[0], i[1] - n[1]), t || (this._rect = a), a;
    }, e.prototype.contain = function(t) {
      var a = this.getBoundingRect(), n = this.geometries;
      if (!a.contain(t[0], t[1]))
        return !1;
      t:
        for (var i = 0, o = n.length; i < o; i++) {
          var s = n[i];
          if (s.type === "polygon") {
            var l = s.exterior, u = s.interiors;
            if (Gn(l, t[0], t[1])) {
              for (var f = 0; f < (u ? u.length : 0); f++)
                if (Gn(u[f], t[0], t[1]))
                  continue t;
              return !0;
            }
          }
        }
      return !1;
    }, e.prototype.transformTo = function(t, a, n, i) {
      var o = this.getBoundingRect(), s = o.width / o.height;
      n ? i || (i = n / s) : n = s * i;
      for (var l = new ht(t, a, n, i), u = o.calculateTransform(l), f = this.geometries, h = 0; h < f.length; h++) {
        var v = f[h];
        v.type === "polygon" ? (tc(v.exterior, u), C(v.interiors, function(c) {
          tc(c, u);
        })) : C(v.points, function(c) {
          tc(c, u);
        });
      }
      o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
    }, e.prototype.cloneShallow = function(t) {
      t == null && (t = this.name);
      var a = new e(t, this.geometries, this._center);
      return a._rect = this._rect, a.transformTo = null, a;
    }, e;
  }(SA)
), MB = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a) {
      var n = r.call(this, t) || this;
      return n.type = "geoSVG", n._elOnlyForCalculate = a, n;
    }
    return e.prototype.calcCenter = function() {
      for (var t = this._elOnlyForCalculate, a = t.getBoundingRect(), n = [a.x + a.width / 2, a.y + a.height / 2], i = sh(CB), o = t; o && !o.isGeoSVGGraphicRoot; )
        la(i, o.getLocalTransform(), i), o = o.parent;
      return xo(i, i), fe(n, n, i), n;
    }, e;
  }(SA)
);
function IB(r) {
  if (!r.UTF8Encoding)
    return r;
  var e = r, t = e.UTF8Scale;
  t == null && (t = 1024);
  var a = e.features;
  return C(a, function(n) {
    var i = n.geometry, o = i.encodeOffsets, s = i.coordinates;
    if (o)
      switch (i.type) {
        case "LineString":
          i.coordinates = wA(s, o, t);
          break;
        case "Polygon":
          ec(s, o, t);
          break;
        case "MultiLineString":
          ec(s, o, t);
          break;
        case "MultiPolygon":
          C(s, function(l, u) {
            return ec(l, o[u], t);
          });
      }
  }), e.UTF8Encoding = !1, e;
}
function ec(r, e, t) {
  for (var a = 0; a < r.length; a++)
    r[a] = wA(r[a], e[a], t);
}
function wA(r, e, t) {
  for (var a = [], n = e[0], i = e[1], o = 0; o < r.length; o += 2) {
    var s = r.charCodeAt(o) - 64, l = r.charCodeAt(o + 1) - 64;
    s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += n, l += i, n = s, i = l, a.push([s / t, l / t]);
  }
  return a;
}
function LB(r, e) {
  return r = IB(r), G(Et(r.features, function(t) {
    return t.geometry && t.properties && t.geometry.coordinates.length > 0;
  }), function(t) {
    var a = t.properties, n = t.geometry, i = [];
    switch (n.type) {
      case "Polygon":
        var o = n.coordinates;
        i.push(new e1(o[0], o.slice(1)));
        break;
      case "MultiPolygon":
        C(n.coordinates, function(l) {
          l[0] && i.push(new e1(l[0], l.slice(1)));
        });
        break;
      case "LineString":
        i.push(new r1([n.coordinates]));
        break;
      case "MultiLineString":
        i.push(new r1(n.coordinates));
    }
    var s = new xA(a[e || "name"], i, a.cp);
    return s.properties = a, s;
  });
}
var Js = Tt();
function EB(r) {
  return r.type === "category" ? RB(r) : OB(r);
}
function PB(r, e) {
  return r.type === "category" ? NB(r, e) : {
    ticks: G(r.scale.getTicks(), function(t) {
      return t.value;
    })
  };
}
function RB(r) {
  var e = r.getLabelModel(), t = bA(r, e);
  return !e.get("show") || r.scale.isBlank() ? {
    labels: [],
    labelCategoryInterval: t.labelCategoryInterval
  } : t;
}
function bA(r, e) {
  var t = TA(r, "labels"), a = hy(e), n = DA(t, a);
  if (n)
    return n;
  var i, o;
  return q(a) ? i = MA(r, a) : (o = a === "auto" ? kB(r) : a, i = AA(r, o)), CA(t, a, {
    labels: i,
    labelCategoryInterval: o
  });
}
function NB(r, e) {
  var t = TA(r, "ticks"), a = hy(e), n = DA(t, a);
  if (n)
    return n;
  var i, o;
  if ((!e.get("show") || r.scale.isBlank()) && (i = []), q(a))
    i = MA(r, a, !0);
  else if (a === "auto") {
    var s = bA(r, r.getLabelModel());
    o = s.labelCategoryInterval, i = G(s.labels, function(l) {
      return l.tickValue;
    });
  } else
    o = a, i = AA(r, o, !0);
  return CA(t, a, {
    ticks: i,
    tickCategoryInterval: o
  });
}
function OB(r) {
  var e = r.scale.getTicks(), t = wl(r);
  return {
    labels: G(e, function(a, n) {
      return {
        level: a.level,
        formattedLabel: t(a, n),
        rawLabel: r.scale.getLabel(a),
        tickValue: a.value
      };
    })
  };
}
function TA(r, e) {
  return Js(r)[e] || (Js(r)[e] = []);
}
function DA(r, e) {
  for (var t = 0; t < r.length; t++)
    if (r[t].key === e)
      return r[t].value;
}
function CA(r, e, t) {
  return r.push({
    key: e,
    value: t
  }), t;
}
function kB(r) {
  var e = Js(r).autoInterval;
  return e ?? (Js(r).autoInterval = r.calculateCategoryInterval());
}
function VB(r) {
  var e = BB(r), t = wl(r), a = (e.axisRotate - e.labelRotate) / 180 * Math.PI, n = r.scale, i = n.getExtent(), o = n.count();
  if (i[1] - i[0] < 1)
    return 0;
  var s = 1;
  o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  for (var l = i[0], u = r.dataToCoord(l + 1) - r.dataToCoord(l), f = Math.abs(u * Math.cos(a)), h = Math.abs(u * Math.sin(a)), v = 0, c = 0; l <= i[1]; l += s) {
    var p = 0, d = 0, g = vl(t({
      value: l
    }), e.font, "center", "top");
    p = g.width * 1.3, d = g.height * 1.3, v = Math.max(v, p, 7), c = Math.max(c, d, 7);
  }
  var y = v / f, m = c / h;
  isNaN(y) && (y = 1 / 0), isNaN(m) && (m = 1 / 0);
  var _ = Math.max(0, Math.floor(Math.min(y, m))), S = Js(r.model), w = r.getExtent(), x = S.lastAutoInterval, b = S.lastTickCount;
  return x != null && b != null && Math.abs(x - _) <= 1 && Math.abs(b - o) <= 1 && x > _ && S.axisExtent0 === w[0] && S.axisExtent1 === w[1] ? _ = x : (S.lastTickCount = o, S.lastAutoInterval = _, S.axisExtent0 = w[0], S.axisExtent1 = w[1]), _;
}
function BB(r) {
  var e = r.getLabelModel();
  return {
    axisRotate: r.getRotate ? r.getRotate() : r.isHorizontal && !r.isHorizontal() ? 90 : 0,
    labelRotate: e.get("rotate") || 0,
    font: e.getFont()
  };
}
function AA(r, e, t) {
  var a = wl(r), n = r.scale, i = n.getExtent(), o = r.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = i[0], f = n.count();
  u !== 0 && l > 1 && f / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  var h = _A(r), v = o.get("showMinLabel") || h, c = o.get("showMaxLabel") || h;
  v && u !== i[0] && d(i[0]);
  for (var p = u; p <= i[1]; p += l)
    d(p);
  c && p - l !== i[1] && d(i[1]);
  function d(g) {
    var y = {
      value: g
    };
    s.push(t ? g : {
      formattedLabel: a(y),
      rawLabel: n.getLabel(y),
      tickValue: g
    });
  }
  return s;
}
function MA(r, e, t) {
  var a = r.scale, n = wl(r), i = [];
  return C(a.getTicks(), function(o) {
    var s = a.getLabel(o), l = o.value;
    e(o.value, s) && i.push(t ? l : {
      formattedLabel: n(o),
      rawLabel: s,
      tickValue: l
    });
  }), i;
}
var a1 = [0, 1], zB = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = t, this._extent = a || [0, 0];
    }
    return r.prototype.contain = function(e) {
      var t = this._extent, a = Math.min(t[0], t[1]), n = Math.max(t[0], t[1]);
      return e >= a && e <= n;
    }, r.prototype.containData = function(e) {
      return this.scale.contain(e);
    }, r.prototype.getExtent = function() {
      return this._extent.slice();
    }, r.prototype.getPixelPrecision = function(e) {
      return cT(e || this.scale.getExtent(), this._extent);
    }, r.prototype.setExtent = function(e, t) {
      var a = this._extent;
      a[0] = e, a[1] = t;
    }, r.prototype.dataToCoord = function(e, t) {
      var a = this._extent, n = this.scale;
      return e = n.normalize(e), this.onBand && n.type === "ordinal" && (a = a.slice(), n1(a, n.count())), Lt(e, a1, a, t);
    }, r.prototype.coordToData = function(e, t) {
      var a = this._extent, n = this.scale;
      this.onBand && n.type === "ordinal" && (a = a.slice(), n1(a, n.count()));
      var i = Lt(e, a, a1, t);
      return this.scale.scale(i);
    }, r.prototype.pointToData = function(e, t) {
    }, r.prototype.getTicksCoords = function(e) {
      e = e || {};
      var t = e.tickModel || this.getTickModel(), a = PB(this, t), n = a.ticks, i = G(n, function(s) {
        return {
          coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
          tickValue: s
        };
      }, this), o = t.get("alignWithLabel");
      return GB(this, i, o, e.clamp), i;
    }, r.prototype.getMinorTicksCoords = function() {
      if (this.scale.type === "ordinal")
        return [];
      var e = this.model.getModel("minorTick"), t = e.get("splitNumber");
      t > 0 && t < 100 || (t = 5);
      var a = this.scale.getMinorTicks(t), n = G(a, function(i) {
        return G(i, function(o) {
          return {
            coord: this.dataToCoord(o),
            tickValue: o
          };
        }, this);
      }, this);
      return n;
    }, r.prototype.getViewLabels = function() {
      return EB(this).labels;
    }, r.prototype.getLabelModel = function() {
      return this.model.getModel("axisLabel");
    }, r.prototype.getTickModel = function() {
      return this.model.getModel("axisTick");
    }, r.prototype.getBandWidth = function() {
      var e = this._extent, t = this.scale.getExtent(), a = t[1] - t[0] + (this.onBand ? 1 : 0);
      a === 0 && (a = 1);
      var n = Math.abs(e[1] - e[0]);
      return Math.abs(n) / a;
    }, r.prototype.calculateCategoryInterval = function() {
      return VB(this);
    }, r;
  }()
);
function n1(r, e) {
  var t = r[1] - r[0], a = e, n = t / a / 2;
  r[0] += n, r[1] -= n;
}
function GB(r, e, t, a) {
  var n = e.length;
  if (!r.onBand || t || !n)
    return;
  var i = r.getExtent(), o, s;
  if (n === 1)
    e[0].coord = i[0], o = e[1] = {
      coord: i[0]
    };
  else {
    var l = e[n - 1].tickValue - e[0].tickValue, u = (e[n - 1].coord - e[0].coord) / l;
    C(e, function(c) {
      c.coord -= u / 2;
    });
    var f = r.scale.getExtent();
    s = 1 + f[1] - e[n - 1].tickValue, o = {
      coord: e[n - 1].coord + u * s
    }, e.push(o);
  }
  var h = i[0] > i[1];
  v(e[0].coord, i[0]) && (a ? e[0].coord = i[0] : e.shift()), a && v(i[0], e[0].coord) && e.unshift({
    coord: i[0]
  }), v(i[1], o.coord) && (a ? o.coord = i[1] : e.pop()), a && v(o.coord, i[1]) && e.push({
    coord: i[1]
  });
  function v(c, p) {
    return c = Yt(c), p = Yt(p), h ? c > p : c < p;
  }
}
const Mr = zB;
var es = Math.PI * 2, In = Xr.CMD, FB = ["top", "right", "bottom", "left"];
function HB(r, e, t, a, n) {
  var i = t.width, o = t.height;
  switch (r) {
    case "top":
      a.set(t.x + i / 2, t.y - e), n.set(0, -1);
      break;
    case "bottom":
      a.set(t.x + i / 2, t.y + o + e), n.set(0, 1);
      break;
    case "left":
      a.set(t.x - e, t.y + o / 2), n.set(-1, 0);
      break;
    case "right":
      a.set(t.x + i + e, t.y + o / 2), n.set(1, 0);
      break;
  }
}
function WB(r, e, t, a, n, i, o, s, l) {
  o -= r, s -= e;
  var u = Math.sqrt(o * o + s * s);
  o /= u, s /= u;
  var f = o * t + r, h = s * t + e;
  if (Math.abs(a - n) % es < 1e-4)
    return l[0] = f, l[1] = h, u - t;
  if (i) {
    var v = a;
    a = ia(n), n = ia(v);
  } else
    a = ia(a), n = ia(n);
  a > n && (n += es);
  var c = Math.atan2(s, o);
  if (c < 0 && (c += es), c >= a && c <= n || c + es >= a && c + es <= n)
    return l[0] = f, l[1] = h, u - t;
  var p = t * Math.cos(a) + r, d = t * Math.sin(a) + e, g = t * Math.cos(n) + r, y = t * Math.sin(n) + e, m = (p - o) * (p - o) + (d - s) * (d - s), _ = (g - o) * (g - o) + (y - s) * (y - s);
  return m < _ ? (l[0] = p, l[1] = d, Math.sqrt(m)) : (l[0] = g, l[1] = y, Math.sqrt(_));
}
function Rf(r, e, t, a, n, i, o, s) {
  var l = n - r, u = i - e, f = t - r, h = a - e, v = Math.sqrt(f * f + h * h);
  f /= v, h /= v;
  var c = l * f + u * h, p = c / v;
  s && (p = Math.min(Math.max(p, 0), 1)), p *= v;
  var d = o[0] = r + p * f, g = o[1] = e + p * h;
  return Math.sqrt((d - n) * (d - n) + (g - i) * (g - i));
}
function IA(r, e, t, a, n, i, o) {
  t < 0 && (r = r + t, t = -t), a < 0 && (e = e + a, a = -a);
  var s = r + t, l = e + a, u = o[0] = Math.min(Math.max(n, r), s), f = o[1] = Math.min(Math.max(i, e), l);
  return Math.sqrt((u - n) * (u - n) + (f - i) * (f - i));
}
var yr = [];
function $B(r, e, t) {
  var a = IA(e.x, e.y, e.width, e.height, r.x, r.y, yr);
  return t.set(yr[0], yr[1]), a;
}
function UB(r, e, t) {
  for (var a = 0, n = 0, i = 0, o = 0, s, l, u = 1 / 0, f = e.data, h = r.x, v = r.y, c = 0; c < f.length; ) {
    var p = f[c++];
    c === 1 && (a = f[c], n = f[c + 1], i = a, o = n);
    var d = u;
    switch (p) {
      case In.M:
        i = f[c++], o = f[c++], a = i, n = o;
        break;
      case In.L:
        d = Rf(a, n, f[c], f[c + 1], h, v, yr, !0), a = f[c++], n = f[c++];
        break;
      case In.C:
        d = Zb(a, n, f[c++], f[c++], f[c++], f[c++], f[c], f[c + 1], h, v, yr), a = f[c++], n = f[c++];
        break;
      case In.Q:
        d = qb(a, n, f[c++], f[c++], f[c], f[c + 1], h, v, yr), a = f[c++], n = f[c++];
        break;
      case In.A:
        var g = f[c++], y = f[c++], m = f[c++], _ = f[c++], S = f[c++], w = f[c++];
        c += 1;
        var x = !!(1 - f[c++]);
        s = Math.cos(S) * m + g, l = Math.sin(S) * _ + y, c <= 1 && (i = s, o = l);
        var b = (h - g) * _ / m + g;
        d = WB(g, y, _, S, S + w, x, b, v, yr), a = Math.cos(S + w) * m + g, n = Math.sin(S + w) * _ + y;
        break;
      case In.R:
        i = a = f[c++], o = n = f[c++];
        var T = f[c++], D = f[c++];
        d = IA(i, o, T, D, h, v, yr);
        break;
      case In.Z:
        d = Rf(a, n, i, o, h, v, yr, !0), a = i, n = o;
        break;
    }
    d < u && (u = d, t.set(yr[0], yr[1]));
  }
  return u;
}
var _r = new lt(), Nt = new lt(), Zt = new lt(), Hr = new lt(), Br = new lt();
function i1(r, e) {
  if (r) {
    var t = r.getTextGuideLine(), a = r.getTextContent();
    if (a && t) {
      var n = r.textGuideLineConfig || {}, i = [[0, 0], [0, 0], [0, 0]], o = n.candidates || FB, s = a.getBoundingRect().clone();
      s.applyTransform(a.getComputedTransform());
      var l = 1 / 0, u = n.anchor, f = r.getComputedTransform(), h = f && xo([], f), v = e.get("length2") || 0;
      u && Zt.copy(u);
      for (var c = 0; c < o.length; c++) {
        var p = o[c];
        HB(p, 0, s, _r, Hr), lt.scaleAndAdd(Nt, _r, Hr, v), Nt.transform(h);
        var d = r.getBoundingRect(), g = u ? u.distance(Nt) : r instanceof gt ? UB(Nt, r.path, Zt) : $B(Nt, d, Zt);
        g < l && (l = g, Nt.transform(f), Zt.transform(f), Zt.toArray(i[0]), Nt.toArray(i[1]), _r.toArray(i[2]));
      }
      LA(i, e.get("minTurnAngle")), t.setShape({
        points: i
      });
    }
  }
}
var Nf = [], De = new lt();
function LA(r, e) {
  if (e <= 180 && e > 0) {
    e = e / 180 * Math.PI, _r.fromArray(r[0]), Nt.fromArray(r[1]), Zt.fromArray(r[2]), lt.sub(Hr, _r, Nt), lt.sub(Br, Zt, Nt);
    var t = Hr.len(), a = Br.len();
    if (!(t < 1e-3 || a < 1e-3)) {
      Hr.scale(1 / t), Br.scale(1 / a);
      var n = Hr.dot(Br), i = Math.cos(e);
      if (i < n) {
        var o = Rf(Nt.x, Nt.y, Zt.x, Zt.y, _r.x, _r.y, Nf, !1);
        De.fromArray(Nf), De.scaleAndAdd(Br, o / Math.tan(Math.PI - e));
        var s = Zt.x !== Nt.x ? (De.x - Nt.x) / (Zt.x - Nt.x) : (De.y - Nt.y) / (Zt.y - Nt.y);
        if (isNaN(s))
          return;
        s < 0 ? lt.copy(De, Nt) : s > 1 && lt.copy(De, Zt), De.toArray(r[1]);
      }
    }
  }
}
function YB(r, e, t) {
  if (t <= 180 && t > 0) {
    t = t / 180 * Math.PI, _r.fromArray(r[0]), Nt.fromArray(r[1]), Zt.fromArray(r[2]), lt.sub(Hr, Nt, _r), lt.sub(Br, Zt, Nt);
    var a = Hr.len(), n = Br.len();
    if (!(a < 1e-3 || n < 1e-3)) {
      Hr.scale(1 / a), Br.scale(1 / n);
      var i = Hr.dot(e), o = Math.cos(t);
      if (i < o) {
        var s = Rf(Nt.x, Nt.y, Zt.x, Zt.y, _r.x, _r.y, Nf, !1);
        De.fromArray(Nf);
        var l = Math.PI / 2, u = Math.acos(Br.dot(e)), f = l + u - t;
        if (f >= l)
          lt.copy(De, Zt);
        else {
          De.scaleAndAdd(Br, s / Math.tan(Math.PI / 2 - f));
          var h = Zt.x !== Nt.x ? (De.x - Nt.x) / (Zt.x - Nt.x) : (De.y - Nt.y) / (Zt.y - Nt.y);
          if (isNaN(h))
            return;
          h < 0 ? lt.copy(De, Nt) : h > 1 && lt.copy(De, Zt);
        }
        De.toArray(r[1]);
      }
    }
  }
}
function o1(r, e, t, a) {
  var n = t === "normal", i = n ? r : r.ensureState(t);
  i.ignore = e;
  var o = a.get("smooth");
  o && o === !0 && (o = 0.3), i.shape = i.shape || {}, o > 0 && (i.shape.smooth = o);
  var s = a.getModel("lineStyle").getLineStyle();
  n ? r.useStyle(s) : i.style = s;
}
function ZB(r, e) {
  var t = e.smooth, a = e.points;
  if (a)
    if (r.moveTo(a[0][0], a[0][1]), t > 0 && a.length >= 3) {
      var n = ka(a[0], a[1]), i = ka(a[1], a[2]);
      if (!n || !i) {
        r.lineTo(a[1][0], a[1][1]), r.lineTo(a[2][0], a[2][1]);
        return;
      }
      var o = Math.min(n, i) * t, s = Vu([], a[1], a[0], o / n), l = Vu([], a[1], a[2], o / i), u = Vu([], s, l, 0.5);
      r.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), r.bezierCurveTo(l[0], l[1], l[0], l[1], a[2][0], a[2][1]);
    } else
      for (var f = 1; f < a.length; f++)
        r.lineTo(a[f][0], a[f][1]);
}
function vy(r, e, t) {
  var a = r.getTextGuideLine(), n = r.getTextContent();
  if (!n) {
    a && r.removeTextGuideLine();
    return;
  }
  for (var i = e.normal, o = i.get("show"), s = n.ignore, l = 0; l < $s.length; l++) {
    var u = $s[l], f = e[u], h = u === "normal";
    if (f) {
      var v = f.get("show"), c = h ? s : ut(n.states[u] && n.states[u].ignore, s);
      if (c || !ut(v, o)) {
        var p = h ? a : a && a.states[u];
        p && (p.ignore = !0);
        continue;
      }
      a || (a = new ze(), r.setTextGuideLine(a), !h && (s || !o) && o1(a, !0, "normal", e.normal), r.stateProxy && (a.stateProxy = r.stateProxy)), o1(a, !1, u, f);
    }
  }
  if (a) {
    tt(a.style, t), a.style.fill = null;
    var d = i.get("showAbove"), g = r.textGuideLineConfig = r.textGuideLineConfig || {};
    g.showAbove = d || !1, a.buildPath = ZB;
  }
}
function cy(r, e) {
  e = e || "labelLine";
  for (var t = {
    normal: r.getModel(e)
  }, a = 0; a < Me.length; a++) {
    var n = Me[a];
    t[n] = r.getModel([n, e]);
  }
  return t;
}
function EA(r) {
  for (var e = [], t = 0; t < r.length; t++) {
    var a = r[t];
    if (!a.defaultAttr.ignore) {
      var n = a.label, i = n.getComputedTransform(), o = n.getBoundingRect(), s = !i || i[1] < 1e-5 && i[2] < 1e-5, l = n.style.margin || 0, u = o.clone();
      u.applyTransform(i), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
      var f = s ? new df(o, i) : null;
      e.push({
        label: n,
        labelLine: a.labelLine,
        rect: u,
        localRect: o,
        obb: f,
        priority: a.priority,
        defaultAttr: a.defaultAttr,
        layoutOption: a.computedLayoutOption,
        axisAligned: s,
        transform: i
      });
    }
  }
  return e;
}
function PA(r, e, t, a, n, i) {
  var o = r.length;
  if (o < 2)
    return;
  r.sort(function(T, D) {
    return T.rect[e] - D.rect[e];
  });
  for (var s = 0, l, u = !1, f = 0, h = 0; h < o; h++) {
    var v = r[h], c = v.rect;
    l = c[e] - s, l < 0 && (c[e] -= l, v.label[e] -= l, u = !0);
    var p = Math.max(-l, 0);
    f += p, s = c[e] + c[t];
  }
  f > 0 && i && w(-f / o, 0, o);
  var d = r[0], g = r[o - 1], y, m;
  _(), y < 0 && x(-y, 0.8), m < 0 && x(m, 0.8), _(), S(y, m, 1), S(m, y, -1), _(), y < 0 && b(-y), m < 0 && b(m);
  function _() {
    y = d.rect[e] - a, m = n - g.rect[e] - g.rect[t];
  }
  function S(T, D, A) {
    if (T < 0) {
      var M = Math.min(D, -T);
      if (M > 0) {
        w(M * A, 0, o);
        var I = M + T;
        I < 0 && x(-I * A, 1);
      } else
        x(-T * A, 1);
    }
  }
  function w(T, D, A) {
    T !== 0 && (u = !0);
    for (var M = D; M < A; M++) {
      var I = r[M], L = I.rect;
      L[e] += T, I.label[e] += T;
    }
  }
  function x(T, D) {
    for (var A = [], M = 0, I = 1; I < o; I++) {
      var L = r[I - 1].rect, E = Math.max(r[I].rect[e] - L[e] - L[t], 0);
      A.push(E), M += E;
    }
    if (M) {
      var P = Math.min(Math.abs(T) / M, D);
      if (T > 0)
        for (var I = 0; I < o - 1; I++) {
          var R = A[I] * P;
          w(R, 0, I + 1);
        }
      else
        for (var I = o - 1; I > 0; I--) {
          var R = A[I - 1] * P;
          w(-R, I, o);
        }
    }
  }
  function b(T) {
    var D = T < 0 ? -1 : 1;
    T = Math.abs(T);
    for (var A = Math.ceil(T / (o - 1)), M = 0; M < o - 1; M++)
      if (D > 0 ? w(A, 0, M + 1) : w(-A, o - M - 1, o), T -= A, T <= 0)
        return;
  }
  return u;
}
function XB(r, e, t, a) {
  return PA(r, "x", "width", e, t, a);
}
function RA(r, e, t, a) {
  return PA(r, "y", "height", e, t, a);
}
function NA(r) {
  var e = [];
  r.sort(function(d, g) {
    return g.priority - d.priority;
  });
  var t = new ht(0, 0, 0, 0);
  function a(d) {
    if (!d.ignore) {
      var g = d.ensureState("emphasis");
      g.ignore == null && (g.ignore = !1);
    }
    d.ignore = !0;
  }
  for (var n = 0; n < r.length; n++) {
    var i = r[n], o = i.axisAligned, s = i.localRect, l = i.transform, u = i.label, f = i.labelLine;
    t.copy(i.rect), t.width -= 0.1, t.height -= 0.1, t.x += 0.05, t.y += 0.05;
    for (var h = i.obb, v = !1, c = 0; c < e.length; c++) {
      var p = e[c];
      if (t.intersect(p.rect)) {
        if (o && p.axisAligned) {
          v = !0;
          break;
        }
        if (p.obb || (p.obb = new df(p.localRect, p.transform)), h || (h = new df(s, l)), h.intersect(p.obb)) {
          v = !0;
          break;
        }
      }
    }
    v ? (a(u), f && a(f)) : (u.attr("ignore", i.defaultAttr.ignore), f && f.attr("ignore", i.defaultAttr.labelGuideIgnore), e.push(i));
  }
}
function qB(r) {
  if (r) {
    for (var e = [], t = 0; t < r.length; t++)
      e.push(r[t].slice());
    return e;
  }
}
function KB(r, e) {
  var t = r.label, a = e && e.getTextGuideLine();
  return {
    dataIndex: r.dataIndex,
    dataType: r.dataType,
    seriesIndex: r.seriesModel.seriesIndex,
    text: r.label.style.text,
    rect: r.hostRect,
    labelRect: r.rect,
    // x: labelAttr.x,
    // y: labelAttr.y,
    align: t.style.align,
    verticalAlign: t.style.verticalAlign,
    labelLinePoints: qB(a && a.shape.points)
  };
}
var s1 = ["align", "verticalAlign", "width", "height", "fontSize"], Ge = new na(), rc = Tt(), jB = Tt();
function hu(r, e, t) {
  for (var a = 0; a < t.length; a++) {
    var n = t[a];
    e[n] != null && (r[n] = e[n]);
  }
}
var vu = ["x", "y", "rotation"], QB = (
  /** @class */
  function() {
    function r() {
      this._labelList = [], this._chartViewList = [];
    }
    return r.prototype.clearLabels = function() {
      this._labelList = [], this._chartViewList = [];
    }, r.prototype._addLabel = function(e, t, a, n, i) {
      var o = n.style, s = n.__hostTarget, l = s.textConfig || {}, u = n.getComputedTransform(), f = n.getBoundingRect().plain();
      ht.applyTransform(f, f, u), u ? Ge.setLocalTransform(u) : (Ge.x = Ge.y = Ge.rotation = Ge.originX = Ge.originY = 0, Ge.scaleX = Ge.scaleY = 1);
      var h = n.__hostTarget, v;
      if (h) {
        v = h.getBoundingRect().plain();
        var c = h.getComputedTransform();
        ht.applyTransform(v, v, c);
      }
      var p = v && h.getTextGuideLine();
      this._labelList.push({
        label: n,
        labelLine: p,
        seriesModel: a,
        dataIndex: e,
        dataType: t,
        layoutOption: i,
        computedLayoutOption: null,
        rect: f,
        hostRect: v,
        // Label with lower priority will be hidden when overlapped
        // Use rect size as default priority
        priority: v ? v.width * v.height : 0,
        // Save default label attributes.
        // For restore if developers want get back to default value in callback.
        defaultAttr: {
          ignore: n.ignore,
          labelGuideIgnore: p && p.ignore,
          x: Ge.x,
          y: Ge.y,
          scaleX: Ge.scaleX,
          scaleY: Ge.scaleY,
          rotation: Ge.rotation,
          style: {
            x: o.x,
            y: o.y,
            align: o.align,
            verticalAlign: o.verticalAlign,
            width: o.width,
            height: o.height,
            fontSize: o.fontSize
          },
          cursor: n.cursor,
          attachedPos: l.position,
          attachedRot: l.rotation
        }
      });
    }, r.prototype.addLabelsOfSeries = function(e) {
      var t = this;
      this._chartViewList.push(e);
      var a = e.__model, n = a.get("labelLayout");
      (q(n) || _t(n).length) && e.group.traverse(function(i) {
        if (i.ignore)
          return !0;
        var o = i.getTextContent(), s = it(i);
        o && !o.disableLabelLayout && t._addLabel(s.dataIndex, s.dataType, a, o, n);
      });
    }, r.prototype.updateLayoutConfig = function(e) {
      var t = e.getWidth(), a = e.getHeight();
      function n(_, S) {
        return function() {
          i1(_, S);
        };
      }
      for (var i = 0; i < this._labelList.length; i++) {
        var o = this._labelList[i], s = o.label, l = s.__hostTarget, u = o.defaultAttr, f = void 0;
        q(o.layoutOption) ? f = o.layoutOption(KB(o, l)) : f = o.layoutOption, f = f || {}, o.computedLayoutOption = f;
        var h = 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: f.x != null || f.y != null ? null : u.attachedPos,
          // Ignore rotation config on the host el if rotation is changed.
          rotation: f.rotate != null ? f.rotate * h : u.attachedRot,
          offset: [f.dx || 0, f.dy || 0]
        });
        var v = !1;
        if (f.x != null ? (s.x = H(f.x, t), s.setStyle("x", 0), v = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), f.y != null ? (s.y = H(f.y, a), s.setStyle("y", 0), v = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), f.labelLinePoints) {
          var c = l.getTextGuideLine();
          c && (c.setShape({
            points: f.labelLinePoints
          }), v = !1);
        }
        var p = rc(s);
        p.needsUpdateLabelLine = v, s.rotation = f.rotate != null ? f.rotate * h : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
        for (var d = 0; d < s1.length; d++) {
          var g = s1[d];
          s.setStyle(g, f[g] != null ? f[g] : u.style[g]);
        }
        if (f.draggable) {
          if (s.draggable = !0, s.cursor = "move", l) {
            var y = o.seriesModel;
            if (o.dataIndex != null) {
              var m = o.seriesModel.getData(o.dataType);
              y = m.getItemModel(o.dataIndex);
            }
            s.on("drag", n(l, y.getModel("labelLine")));
          }
        } else
          s.off("drag"), s.cursor = u.cursor;
      }
    }, r.prototype.layout = function(e) {
      var t = e.getWidth(), a = e.getHeight(), n = EA(this._labelList), i = Et(n, function(l) {
        return l.layoutOption.moveOverlap === "shiftX";
      }), o = Et(n, function(l) {
        return l.layoutOption.moveOverlap === "shiftY";
      });
      XB(i, 0, t), RA(o, 0, a);
      var s = Et(n, function(l) {
        return l.layoutOption.hideOverlap;
      });
      NA(s);
    }, r.prototype.processLabelsOverall = function() {
      var e = this;
      C(this._chartViewList, function(t) {
        var a = t.__model, n = t.ignoreLabelLineUpdate, i = a.isAnimationEnabled();
        t.group.traverse(function(o) {
          if (o.ignore && !o.forceLabelAnimation)
            return !0;
          var s = !n, l = o.getTextContent();
          !s && l && (s = rc(l).needsUpdateLabelLine), s && e._updateLabelLine(o, a), i && e._animateLabels(o, a);
        });
      });
    }, r.prototype._updateLabelLine = function(e, t) {
      var a = e.getTextContent(), n = it(e), i = n.dataIndex;
      if (a && i != null) {
        var o = t.getData(n.dataType), s = o.getItemModel(i), l = {}, u = o.getItemVisual(i, "style"), f = o.getVisual("drawType");
        l.stroke = u[f];
        var h = s.getModel("labelLine");
        vy(e, cy(s), l), i1(e, h);
      }
    }, r.prototype._animateLabels = function(e, t) {
      var a = e.getTextContent(), n = e.getTextGuideLine();
      if (a && (e.forceLabelAnimation || !a.ignore && !a.invisible && !e.disableLabelAnimation && !ro(e))) {
        var i = rc(a), o = i.oldLayout, s = it(e), l = s.dataIndex, u = {
          x: a.x,
          y: a.y,
          rotation: a.rotation
        }, f = t.getData(s.dataType);
        if (o) {
          a.attr(o);
          var v = e.prevStates;
          v && (ct(v, "select") >= 0 && a.attr(i.oldLayoutSelect), ct(v, "emphasis") >= 0 && a.attr(i.oldLayoutEmphasis)), Mt(a, u, t, l);
        } else if (a.attr(u), !Co(a).valueAnimation) {
          var h = ut(a.style.opacity, 1);
          a.style.opacity = 0, Bt(a, {
            style: {
              opacity: h
            }
          }, t, l);
        }
        if (i.oldLayout = u, a.states.select) {
          var c = i.oldLayoutSelect = {};
          hu(c, u, vu), hu(c, a.states.select, vu);
        }
        if (a.states.emphasis) {
          var p = i.oldLayoutEmphasis = {};
          hu(p, u, vu), hu(p, a.states.emphasis, vu);
        }
        wD(a, l, f, t, t);
      }
      if (n && !n.ignore && !n.invisible) {
        var i = jB(n), o = i.oldLayout, d = {
          points: n.shape.points
        };
        o ? (n.attr({
          shape: o
        }), Mt(n, {
          shape: d
        }, t)) : (n.setShape(d), n.style.strokePercent = 0, Bt(n, {
          style: {
            strokePercent: 1
          }
        }, t)), i.oldLayout = d;
      }
    }, r;
  }()
);
const JB = QB;
var ac = Tt();
function tz(r) {
  r.registerUpdateLifecycle("series:beforeupdate", function(e, t, a) {
    var n = ac(t).labelManager;
    n || (n = ac(t).labelManager = new JB()), n.clearLabels();
  }), r.registerUpdateLifecycle("series:layoutlabels", function(e, t, a) {
    var n = ac(t).labelManager;
    a.updatedSeries.forEach(function(i) {
      n.addLabelsOfSeries(t.getViewOfSeriesModel(i));
    }), n.updateLayoutConfig(t), n.layout(t), n.processLabelsOverall();
  });
}
var nc = Math.sin, ic = Math.cos, OA = Math.PI, Ln = Math.PI * 2, ez = 180 / OA, rz = function() {
  function r() {
  }
  return r.prototype.reset = function(e) {
    this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  }, r.prototype.moveTo = function(e, t) {
    this._add("M", e, t);
  }, r.prototype.lineTo = function(e, t) {
    this._add("L", e, t);
  }, r.prototype.bezierCurveTo = function(e, t, a, n, i, o) {
    this._add("C", e, t, a, n, i, o);
  }, r.prototype.quadraticCurveTo = function(e, t, a, n) {
    this._add("Q", e, t, a, n);
  }, r.prototype.arc = function(e, t, a, n, i, o) {
    this.ellipse(e, t, a, a, 0, n, i, o);
  }, r.prototype.ellipse = function(e, t, a, n, i, o, s, l) {
    var u = s - o, f = !l, h = Math.abs(u), v = Fa(h - Ln) || (f ? u >= Ln : -u >= Ln), c = u > 0 ? u % Ln : u % Ln + Ln, p = !1;
    v ? p = !0 : Fa(h) ? p = !1 : p = c >= OA == !!f;
    var d = e + a * ic(o), g = t + n * nc(o);
    this._start && this._add("M", d, g);
    var y = Math.round(i * ez);
    if (v) {
      var m = 1 / this._p, _ = (f ? 1 : -1) * (Ln - m);
      this._add("A", a, n, y, 1, +f, e + a * ic(o + _), t + n * nc(o + _)), m > 0.01 && this._add("A", a, n, y, 0, +f, d, g);
    } else {
      var S = e + a * ic(s), w = t + n * nc(s);
      this._add("A", a, n, y, +p, +f, S, w);
    }
  }, r.prototype.rect = function(e, t, a, n) {
    this._add("M", e, t), this._add("l", a, 0), this._add("l", 0, n), this._add("l", -a, 0), this._add("Z");
  }, r.prototype.closePath = function() {
    this._d.length > 0 && this._add("Z");
  }, r.prototype._add = function(e, t, a, n, i, o, s, l, u) {
    for (var f = [], h = this._p, v = 1; v < arguments.length; v++) {
      var c = arguments[v];
      if (isNaN(c)) {
        this._invalid = !0;
        return;
      }
      f.push(Math.round(c * h) / h);
    }
    this._d.push(e + f.join(" ")), this._start = e === "Z";
  }, r.prototype.generateStr = function() {
    this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  }, r.prototype.getStr = function() {
    return this._str;
  }, r;
}();
const kA = rz;
var Vs = "none", az = Math.round;
function nz(r) {
  var e = r.fill;
  return e != null && e !== Vs;
}
function iz(r) {
  var e = r.stroke;
  return e != null && e !== Vs;
}
var _d = ["lineCap", "miterLimit", "lineJoin"], oz = G(_d, function(r) {
  return "stroke-" + r.toLowerCase();
});
function sz(r, e, t, a) {
  var n = e.opacity == null ? 1 : e.opacity;
  if (t instanceof de) {
    r("opacity", n);
    return;
  }
  if (nz(e)) {
    var i = Hs(e.fill);
    r("fill", i.color);
    var o = e.fillOpacity != null ? e.fillOpacity * i.opacity * n : i.opacity * n;
    (a || o < 1) && r("fill-opacity", o);
  } else
    r("fill", Vs);
  if (iz(e)) {
    var s = Hs(e.stroke);
    r("stroke", s.color);
    var l = e.strokeNoScale ? t.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, f = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * n : s.opacity * n, h = e.strokeFirst;
    if ((a || u !== 1) && r("stroke-width", u), (a || h) && r("paint-order", h ? "stroke" : "fill"), (a || f < 1) && r("stroke-opacity", f), e.lineDash) {
      var v = ty(t), c = v[0], p = v[1];
      c && (p = az(p || 0), r("stroke-dasharray", c.join(",")), (p || a) && r("stroke-dashoffset", p));
    } else
      a && r("stroke-dasharray", Vs);
    for (var d = 0; d < _d.length; d++) {
      var g = _d[d];
      if (a || e[g] !== cf[g]) {
        var y = e[g] || cf[g];
        y && r(oz[d], y);
      }
    }
  } else
    a && r("stroke", Vs);
}
var VA = "http://www.w3.org/2000/svg", BA = "http://www.w3.org/1999/xlink", lz = "http://www.w3.org/2000/xmlns/", uz = "http://www.w3.org/XML/1998/namespace";
function zA(r) {
  return document.createElementNS(VA, r);
}
function ne(r, e, t, a, n) {
  return {
    tag: r,
    attrs: t || {},
    children: a,
    text: n,
    key: e
  };
}
function fz(r, e) {
  var t = [];
  if (e)
    for (var a in e) {
      var n = e[a], i = a;
      n !== !1 && (n !== !0 && n != null && (i += '="' + n + '"'), t.push(i));
    }
  return "<" + r + " " + t.join(" ") + ">";
}
function hz(r) {
  return "</" + r + ">";
}
function py(r, e) {
  e = e || {};
  var t = e.newline ? `
` : "";
  function a(n) {
    var i = n.children, o = n.tag, s = n.attrs, l = n.text;
    return fz(o, s) + (o !== "style" ? Pe(l) : l || "") + (i ? "" + t + G(i, function(u) {
      return a(u);
    }).join(t) + t : "") + hz(o);
  }
  return a(r);
}
function vz(r, e, t) {
  t = t || {};
  var a = t.newline ? `
` : "", n = " {" + a, i = a + "}", o = G(_t(r), function(l) {
    return l + n + G(_t(r[l]), function(u) {
      return u + ":" + r[l][u] + ";";
    }).join(a) + i;
  }).join(a), s = G(_t(e), function(l) {
    return "@keyframes " + l + n + G(_t(e[l]), function(u) {
      return u + n + G(_t(e[l][u]), function(f) {
        var h = e[l][u][f];
        return f === "d" && (h = 'path("' + h + '")'), f + ":" + h + ";";
      }).join(a) + i;
    }).join(a) + i;
  }).join(a);
  return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(a);
}
function Sd(r) {
  return {
    zrId: r,
    shadowCache: {},
    patternCache: {},
    gradientCache: {},
    clipPathCache: {},
    defs: {},
    cssNodes: {},
    cssAnims: {},
    cssClassIdx: 0,
    cssAnimIdx: 0,
    shadowIdx: 0,
    gradientIdx: 0,
    patternIdx: 0,
    clipPathIdx: 0
  };
}
function l1(r, e, t, a) {
  return ne("svg", "root", {
    width: r,
    height: e,
    xmlns: VA,
    "xmlns:xlink": BA,
    version: "1.1",
    baseProfile: "full",
    viewBox: a ? "0 0 " + r + " " + e : !1
  }, t);
}
var u1 = {
  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"
}, Nn = "transform-origin";
function cz(r, e, t) {
  var a = V({}, r.shape);
  V(a, e), r.buildPath(t, a);
  var n = new kA();
  return n.reset(rT(r)), t.rebuildPath(n, 1), n.generateStr(), n.getStr();
}
function pz(r, e) {
  var t = e.originX, a = e.originY;
  (t || a) && (r[Nn] = t + "px " + a + "px");
}
var dz = {
  fill: "fill",
  opacity: "opacity",
  lineWidth: "stroke-width",
  lineDashOffset: "stroke-dashoffset"
};
function GA(r, e) {
  var t = e.zrId + "-ani-" + e.cssAnimIdx++;
  return e.cssAnims[t] = r, t;
}
function gz(r, e, t) {
  var a = r.shape.paths, n = {}, i, o;
  if (C(a, function(l) {
    var u = Sd(t.zrId);
    u.animation = !0, Vh(l, {}, u, !0);
    var f = u.cssAnims, h = u.cssNodes, v = _t(f), c = v.length;
    if (c) {
      o = v[c - 1];
      var p = f[o];
      for (var d in p) {
        var g = p[d];
        n[d] = n[d] || { d: "" }, n[d].d += g.d || "";
      }
      for (var y in h) {
        var m = h[y].animation;
        m.indexOf(o) >= 0 && (i = m);
      }
    }
  }), !!i) {
    e.d = !1;
    var s = GA(n, t);
    return i.replace(o, s);
  }
}
function f1(r) {
  return $(r) ? u1[r] ? "cubic-bezier(" + u1[r] + ")" : gg(r) ? r : "" : "";
}
function Vh(r, e, t, a) {
  var n = r.animators, i = n.length, o = [];
  if (r instanceof Rg) {
    var s = gz(r, e, t);
    if (s)
      o.push(s);
    else if (!i)
      return;
  } else if (!i)
    return;
  for (var l = {}, u = 0; u < i; u++) {
    var f = n[u], h = [f.getMaxTime() / 1e3 + "s"], v = f1(f.getClip().easing), c = f.getDelay();
    v ? h.push(v) : h.push("linear"), c && h.push(c / 1e3 + "s"), f.getLoop() && h.push("infinite");
    var p = h.join(" ");
    l[p] = l[p] || [p, []], l[p][1].push(f);
  }
  function d(m) {
    var _ = m[1], S = _.length, w = {}, x = {}, b = {}, T = "animation-timing-function";
    function D(at, mt, vt) {
      for (var X = at.getTracks(), st = at.getMaxTime(), zt = 0; zt < X.length; zt++) {
        var xt = X[zt];
        if (xt.needsAnimate()) {
          var Ut = xt.keyframes, Ht = xt.propName;
          if (vt && (Ht = vt(Ht)), Ht)
            for (var ge = 0; ge < Ut.length; ge++) {
              var Qr = Ut[ge], Ie = Math.round(Qr.time / st * 100) + "%", Pl = f1(Qr.easing), ba = Qr.rawValue;
              ($(ba) || Ct(ba)) && (mt[Ie] = mt[Ie] || {}, mt[Ie][Ht] = Qr.rawValue, Pl && (mt[Ie][T] = Pl));
            }
        }
      }
    }
    for (var A = 0; A < S; A++) {
      var M = _[A], I = M.targetName;
      I ? I === "shape" && D(M, x) : !a && D(M, w);
    }
    for (var L in w) {
      var E = {};
      sT(E, r), V(E, w[L]);
      var P = aT(E), R = w[L][T];
      b[L] = P ? {
        transform: P
      } : {}, pz(b[L], E), R && (b[L][T] = R);
    }
    var k, O = !0;
    for (var L in x) {
      b[L] = b[L] || {};
      var B = !k, R = x[L][T];
      B && (k = new Xr());
      var F = k.len();
      k.reset(), b[L].d = cz(r, x[L], k);
      var W = k.len();
      if (!B && F !== W) {
        O = !1;
        break;
      }
      R && (b[L][T] = R);
    }
    if (!O)
      for (var L in b)
        delete b[L].d;
    if (!a)
      for (var A = 0; A < S; A++) {
        var M = _[A], I = M.targetName;
        I === "style" && D(M, b, function(X) {
          return dz[X];
        });
      }
    for (var Z = _t(b), J = !0, et, A = 1; A < Z.length; A++) {
      var yt = Z[A - 1], At = Z[A];
      if (b[yt][Nn] !== b[At][Nn]) {
        J = !1;
        break;
      }
      et = b[yt][Nn];
    }
    if (J && et) {
      for (var L in b)
        b[L][Nn] && delete b[L][Nn];
      e[Nn] = et;
    }
    if (Et(Z, function(at) {
      return _t(b[at]).length > 0;
    }).length) {
      var dt = GA(b, t);
      return dt + " " + m[0] + " both";
    }
  }
  for (var g in l) {
    var s = d(l[g]);
    s && o.push(s);
  }
  if (o.length) {
    var y = t.zrId + "-cls-" + t.cssClassIdx++;
    t.cssNodes["." + y] = {
      animation: o.join(",")
    }, e.class = y;
  }
}
var tl = Math.round;
function FA(r) {
  return r && $(r.src);
}
function HA(r) {
  return r && q(r.toDataURL);
}
function dy(r, e, t, a) {
  sz(function(n, i) {
    var o = n === "fill" || n === "stroke";
    o && eT(i) ? $A(e, r, n, a) : o && yg(i) ? UA(t, r, n, a) : r[n] = i;
  }, e, t, !1), bz(t, r, a);
}
function h1(r) {
  return Fa(r[0] - 1) && Fa(r[1]) && Fa(r[2]) && Fa(r[3] - 1);
}
function yz(r) {
  return Fa(r[4]) && Fa(r[5]);
}
function gy(r, e, t) {
  if (e && !(yz(e) && h1(e))) {
    var a = t ? 10 : 1e4;
    r.transform = h1(e) ? "translate(" + tl(e[4] * a) / a + " " + tl(e[5] * a) / a + ")" : lE(e);
  }
}
function v1(r, e, t) {
  for (var a = r.points, n = [], i = 0; i < a.length; i++)
    n.push(tl(a[i][0] * t) / t), n.push(tl(a[i][1] * t) / t);
  e.points = n.join(" ");
}
function c1(r) {
  return !r.smooth;
}
function mz(r) {
  var e = G(r, function(t) {
    return typeof t == "string" ? [t, t] : t;
  });
  return function(t, a, n) {
    for (var i = 0; i < e.length; i++) {
      var o = e[i], s = t[o[0]];
      s != null && (a[o[1]] = tl(s * n) / n);
    }
  };
}
var _z = {
  circle: [mz(["cx", "cy", "r"])],
  polyline: [v1, c1],
  polygon: [v1, c1]
};
function Sz(r) {
  for (var e = r.animators, t = 0; t < e.length; t++)
    if (e[t].targetName === "shape")
      return !0;
  return !1;
}
function WA(r, e) {
  var t = r.style, a = r.shape, n = _z[r.type], i = {}, o = e.animation, s = "path", l = r.style.strokePercent, u = e.compress && rT(r) || 4;
  if (n && !e.willUpdate && !(n[1] && !n[1](a)) && !(o && Sz(r)) && !(l < 1)) {
    s = r.type;
    var f = Math.pow(10, u);
    n[0](a, i, f);
  } else {
    var h = !r.path || r.shapeChanged();
    r.path || r.createPathProxy();
    var v = r.path;
    h && (v.beginPath(), r.buildPath(v, r.shape), r.pathUpdated());
    var c = v.getVersion(), p = r, d = p.__svgPathBuilder;
    (p.__svgPathVersion !== c || !d || l !== p.__svgPathStrokePercent) && (d || (d = p.__svgPathBuilder = new kA()), d.reset(u), v.rebuildPath(d, l), d.generateStr(), p.__svgPathVersion = c, p.__svgPathStrokePercent = l), i.d = d.getStr();
  }
  return gy(i, r.transform), dy(i, t, r, e), e.animation && Vh(r, i, e), ne(s, r.id + "", i);
}
function xz(r, e) {
  var t = r.style, a = t.image;
  if (a && !$(a) && (FA(a) ? a = a.src : HA(a) && (a = a.toDataURL())), !!a) {
    var n = t.x || 0, i = t.y || 0, o = t.width, s = t.height, l = {
      href: a,
      width: o,
      height: s
    };
    return n && (l.x = n), i && (l.y = i), gy(l, r.transform), dy(l, t, r, e), e.animation && Vh(r, l, e), ne("image", r.id + "", l);
  }
}
function wz(r, e) {
  var t = r.style, a = t.text;
  if (a != null && (a += ""), !(!a || isNaN(t.x) || isNaN(t.y))) {
    var n = t.font || Xa, i = t.x || 0, o = fE(t.y || 0, uh(n), t.textBaseline), s = uE[t.textAlign] || t.textAlign, l = {
      "dominant-baseline": "central",
      "text-anchor": s
    };
    if (zT(t)) {
      var u = "", f = t.fontStyle, h = BT(t.fontSize);
      if (!parseFloat(h))
        return;
      var v = t.fontFamily || Ib, c = t.fontWeight;
      u += "font-size:" + h + ";font-family:" + v + ";", f && f !== "normal" && (u += "font-style:" + f + ";"), c && c !== "normal" && (u += "font-weight:" + c + ";"), l.style = u;
    } else
      l.style = "font: " + n;
    return a.match(/\s/) && (l["xml:space"] = "preserve"), i && (l.x = i), o && (l.y = o), gy(l, r.transform), dy(l, t, r, e), e.animation && Vh(r, l, e), ne("text", r.id + "", l, void 0, a);
  }
}
function p1(r, e) {
  if (r instanceof gt)
    return WA(r, e);
  if (r instanceof de)
    return xz(r, e);
  if (r instanceof Ws)
    return wz(r, e);
}
function bz(r, e, t) {
  var a = r.style;
  if (hE(a)) {
    var n = vE(r), i = t.shadowCache, o = i[n];
    if (!o) {
      var s = r.getGlobalScale(), l = s[0], u = s[1];
      if (!l || !u)
        return;
      var f = a.shadowOffsetX || 0, h = a.shadowOffsetY || 0, v = a.shadowBlur, c = Hs(a.shadowColor), p = c.opacity, d = c.color, g = v / 2 / l, y = v / 2 / u, m = g + " " + y;
      o = t.zrId + "-s" + t.shadowIdx++, t.defs[o] = ne("filter", o, {
        id: o,
        x: "-100%",
        y: "-100%",
        width: "300%",
        height: "300%"
      }, [
        ne("feDropShadow", "", {
          dx: f / l,
          dy: h / u,
          stdDeviation: m,
          "flood-color": d,
          "flood-opacity": p
        })
      ]), i[n] = o;
    }
    e.filter = lh(o);
  }
}
function $A(r, e, t, a) {
  var n = r[t], i, o = {
    gradientUnits: n.global ? "userSpaceOnUse" : "objectBoundingBox"
  };
  if (Jb(n))
    i = "linearGradient", o.x1 = n.x, o.y1 = n.y, o.x2 = n.x2, o.y2 = n.y2;
  else if (tT(n))
    i = "radialGradient", o.cx = ut(n.x, 0.5), o.cy = ut(n.y, 0.5), o.r = ut(n.r, 0.5);
  else {
    ({}).NODE_ENV !== "production" && Sr("Illegal gradient type.");
    return;
  }
  for (var s = n.colorStops, l = [], u = 0, f = s.length; u < f; ++u) {
    var h = Pp(s[u].offset) * 100 + "%", v = s[u].color, c = Hs(v), p = c.color, d = c.opacity, g = {
      offset: h
    };
    g["stop-color"] = p, d < 1 && (g["stop-opacity"] = d), l.push(ne("stop", u + "", g));
  }
  var y = ne(i, "", o, l), m = py(y), _ = a.gradientCache, S = _[m];
  S || (S = a.zrId + "-g" + a.gradientIdx++, _[m] = S, o.id = S, a.defs[S] = ne(i, S, o, l)), e[t] = lh(S);
}
function UA(r, e, t, a) {
  var n = r.style[t], i = r.getBoundingRect(), o = {}, s = n.repeat, l = s === "no-repeat", u = s === "repeat-x", f = s === "repeat-y", h;
  if (Qb(n)) {
    var v = n.imageWidth, c = n.imageHeight, p = void 0, d = n.image;
    if ($(d) ? p = d : FA(d) ? p = d.src : HA(d) && (p = d.toDataURL()), typeof Image > "u") {
      var g = "Image width/height must been given explictly in svg-ssr renderer.";
      Q(v, g), Q(c, g);
    } else if (v == null || c == null) {
      var y = function(A, M) {
        if (A) {
          var I = A.elm, L = v || M.width, E = c || M.height;
          A.tag === "pattern" && (u ? (E = 1, L /= i.width) : f && (L = 1, E /= i.height)), A.attrs.width = L, A.attrs.height = E, I && (I.setAttribute("width", L), I.setAttribute("height", E));
        }
      }, m = Tg(p, null, r, function(A) {
        l || y(x, A), y(h, A);
      });
      m && m.width && m.height && (v = v || m.width, c = c || m.height);
    }
    h = ne("image", "img", {
      href: p,
      width: v,
      height: c
    }), o.width = v, o.height = c;
  } else
    n.svgElement && (h = rt(n.svgElement), o.width = n.svgWidth, o.height = n.svgHeight);
  if (h) {
    var _, S;
    l ? _ = S = 1 : u ? (S = 1, _ = o.width / i.width) : f ? (_ = 1, S = o.height / i.height) : o.patternUnits = "userSpaceOnUse", _ != null && !isNaN(_) && (o.width = _), S != null && !isNaN(S) && (o.height = S);
    var w = aT(n);
    w && (o.patternTransform = w);
    var x = ne("pattern", "", o, [h]), b = py(x), T = a.patternCache, D = T[b];
    D || (D = a.zrId + "-p" + a.patternIdx++, T[b] = D, o.id = D, x = a.defs[D] = ne("pattern", D, o, [h])), e[t] = lh(D);
  }
}
function Tz(r, e, t) {
  var a = t.clipPathCache, n = t.defs, i = a[r.id];
  if (!i) {
    i = t.zrId + "-c" + t.clipPathIdx++;
    var o = {
      id: i
    };
    a[r.id] = i, n[i] = ne("clipPath", i, o, [WA(r, t)]);
  }
  e["clip-path"] = lh(i);
}
function d1(r) {
  return document.createTextNode(r);
}
function Fn(r, e, t) {
  r.insertBefore(e, t);
}
function g1(r, e) {
  r.removeChild(e);
}
function y1(r, e) {
  r.appendChild(e);
}
function YA(r) {
  return r.parentNode;
}
function ZA(r) {
  return r.nextSibling;
}
function oc(r, e) {
  r.textContent = e;
}
var m1 = 58, Dz = 120, Cz = ne("", "");
function xd(r) {
  return r === void 0;
}
function kr(r) {
  return r !== void 0;
}
function Az(r, e, t) {
  for (var a = {}, n = e; n <= t; ++n) {
    var i = r[n].key;
    i !== void 0 && ({}.NODE_ENV !== "production" && a[i] != null && console.error("Duplicate key " + i), a[i] = n);
  }
  return a;
}
function Ss(r, e) {
  var t = r.key === e.key, a = r.tag === e.tag;
  return a && t;
}
function el(r) {
  var e, t = r.children, a = r.tag;
  if (kr(a)) {
    var n = r.elm = zA(a);
    if (yy(Cz, r), z(t))
      for (e = 0; e < t.length; ++e) {
        var i = t[e];
        i != null && y1(n, el(i));
      }
    else
      kr(r.text) && !j(r.text) && y1(n, d1(r.text));
  } else
    r.elm = d1(r.text);
  return r.elm;
}
function XA(r, e, t, a, n) {
  for (; a <= n; ++a) {
    var i = t[a];
    i != null && Fn(r, el(i), e);
  }
}
function Of(r, e, t, a) {
  for (; t <= a; ++t) {
    var n = e[t];
    if (n != null)
      if (kr(n.tag)) {
        var i = YA(n.elm);
        g1(i, n.elm);
      } else
        g1(r, n.elm);
  }
}
function yy(r, e) {
  var t, a = e.elm, n = r && r.attrs || {}, i = e.attrs || {};
  if (n !== i) {
    for (t in i) {
      var o = i[t], s = n[t];
      s !== o && (o === !0 ? a.setAttribute(t, "") : o === !1 ? a.removeAttribute(t) : t.charCodeAt(0) !== Dz ? a.setAttribute(t, o) : t === "xmlns:xlink" || t === "xmlns" ? a.setAttributeNS(lz, t, o) : t.charCodeAt(3) === m1 ? a.setAttributeNS(uz, t, o) : t.charCodeAt(5) === m1 ? a.setAttributeNS(BA, t, o) : a.setAttribute(t, o));
    }
    for (t in n)
      t in i || a.removeAttribute(t);
  }
}
function Mz(r, e, t) {
  for (var a = 0, n = 0, i = e.length - 1, o = e[0], s = e[i], l = t.length - 1, u = t[0], f = t[l], h, v, c, p; a <= i && n <= l; )
    o == null ? o = e[++a] : s == null ? s = e[--i] : u == null ? u = t[++n] : f == null ? f = t[--l] : Ss(o, u) ? (Xi(o, u), o = e[++a], u = t[++n]) : Ss(s, f) ? (Xi(s, f), s = e[--i], f = t[--l]) : Ss(o, f) ? (Xi(o, f), Fn(r, o.elm, ZA(s.elm)), o = e[++a], f = t[--l]) : Ss(s, u) ? (Xi(s, u), Fn(r, s.elm, o.elm), s = e[--i], u = t[++n]) : (xd(h) && (h = Az(e, a, i)), v = h[u.key], xd(v) ? Fn(r, el(u), o.elm) : (c = e[v], c.tag !== u.tag ? Fn(r, el(u), o.elm) : (Xi(c, u), e[v] = void 0, Fn(r, c.elm, o.elm))), u = t[++n]);
  (a <= i || n <= l) && (a > i ? (p = t[l + 1] == null ? null : t[l + 1].elm, XA(r, p, t, n, l)) : Of(r, e, a, i));
}
function Xi(r, e) {
  var t = e.elm = r.elm, a = r.children, n = e.children;
  r !== e && (yy(r, e), xd(e.text) ? kr(a) && kr(n) ? a !== n && Mz(t, a, n) : kr(n) ? (kr(r.text) && oc(t, ""), XA(t, null, n, 0, n.length - 1)) : kr(a) ? Of(t, a, 0, a.length - 1) : kr(r.text) && oc(t, "") : r.text !== e.text && (kr(a) && Of(t, a, 0, a.length - 1), oc(t, e.text)));
}
function Iz(r, e) {
  if (Ss(r, e))
    Xi(r, e);
  else {
    var t = r.elm, a = YA(t);
    el(e), a !== null && (Fn(a, e.elm, ZA(t)), Of(a, [r], 0, 0));
  }
  return e;
}
var Lz = 0, Ez = function() {
  function r(e, t, a) {
    if (this.type = "svg", this.refreshHover = _1("refreshHover"), this.configLayer = _1("configLayer"), this.storage = t, this._opts = a = V({}, a), this.root = e, this._id = "zr" + Lz++, this._oldVNode = l1(a.width, a.height), e && !a.ssr) {
      var n = this._viewport = document.createElement("div");
      n.style.cssText = "position:relative;overflow:hidden";
      var i = this._svgDom = this._oldVNode.elm = zA("svg");
      yy(null, this._oldVNode), n.appendChild(i), e.appendChild(n);
    }
    this.resize(a.width, a.height);
  }
  return r.prototype.getType = function() {
    return this.type;
  }, r.prototype.getViewportRoot = function() {
    return this._viewport;
  }, r.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, r.prototype.getSvgDom = function() {
    return this._svgDom;
  }, r.prototype.refresh = function() {
    if (this.root) {
      var e = this.renderToVNode({
        willUpdate: !0
      });
      e.attrs.style = "position:absolute;left:0;top:0;user-select:none", Iz(this._oldVNode, e), this._oldVNode = e;
    }
  }, r.prototype.renderOneToVNode = function(e) {
    return p1(e, Sd(this._id));
  }, r.prototype.renderToVNode = function(e) {
    e = e || {};
    var t = this.storage.getDisplayList(!0), a = this._width, n = this._height, i = Sd(this._id);
    i.animation = e.animation, i.willUpdate = e.willUpdate, i.compress = e.compress;
    var o = [], s = this._bgVNode = Pz(a, n, this._backgroundColor, i);
    s && o.push(s);
    var l = e.compress ? null : this._mainVNode = ne("g", "main", {}, []);
    this._paintList(t, i, l ? l.children : o), l && o.push(l);
    var u = G(_t(i.defs), function(v) {
      return i.defs[v];
    });
    if (u.length && o.push(ne("defs", "defs", {}, u)), e.animation) {
      var f = vz(i.cssNodes, i.cssAnims, { newline: !0 });
      if (f) {
        var h = ne("style", "stl", {}, [], f);
        o.push(h);
      }
    }
    return l1(a, n, o, e.useViewBox);
  }, r.prototype.renderToString = function(e) {
    return e = e || {}, py(this.renderToVNode({
      animation: ut(e.cssAnimation, !0),
      willUpdate: !1,
      compress: !0,
      useViewBox: ut(e.useViewBox, !0)
    }), { newline: !0 });
  }, r.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e;
  }, r.prototype.getSvgRoot = function() {
    return this._mainVNode && this._mainVNode.elm;
  }, r.prototype._paintList = function(e, t, a) {
    for (var n = e.length, i = [], o = 0, s, l, u = 0, f = 0; f < n; f++) {
      var h = e[f];
      if (!h.invisible) {
        var v = h.__clipPaths, c = v && v.length || 0, p = l && l.length || 0, d = void 0;
        for (d = Math.max(c - 1, p - 1); d >= 0 && !(v && l && v[d] === l[d]); d--)
          ;
        for (var g = p - 1; g > d; g--)
          o--, s = i[o - 1];
        for (var y = d + 1; y < c; y++) {
          var m = {};
          Tz(v[y], m, t);
          var _ = ne("g", "clip-g-" + u++, m, []);
          (s ? s.children : a).push(_), i[o++] = _, s = _;
        }
        l = v;
        var S = p1(h, t);
        S && (s ? s.children : a).push(S);
      }
    }
  }, r.prototype.resize = function(e, t) {
    var a = this._opts, n = this.root, i = this._viewport;
    if (e != null && (a.width = e), t != null && (a.height = t), n && i && (i.style.display = "none", e = Ji(n, 0, a), t = Ji(n, 1, a), i.style.display = ""), this._width !== e || this._height !== t) {
      if (this._width = e, this._height = t, i) {
        var o = i.style;
        o.width = e + "px", o.height = t + "px";
      }
      if (yg(this._backgroundColor))
        this.refresh();
      else {
        var s = this._svgDom;
        s && (s.setAttribute("width", e), s.setAttribute("height", t));
        var l = this._bgVNode && this._bgVNode.elm;
        l && (l.setAttribute("width", e), l.setAttribute("height", t));
      }
    }
  }, r.prototype.getWidth = function() {
    return this._width;
  }, r.prototype.getHeight = function() {
    return this._height;
  }, r.prototype.dispose = function() {
    this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  }, r.prototype.clear = function() {
    this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  }, r.prototype.toDataURL = function(e) {
    var t = this.renderToString(), a = "data:image/svg+xml;";
    return e ? (t = pE(t), t && a + "base64," + t) : a + "charset=UTF-8," + encodeURIComponent(t);
  }, r;
}();
function _1(r) {
  return function() {
    ({}).NODE_ENV !== "production" && Sr('In SVG mode painter not support method "' + r + '"');
  };
}
function Pz(r, e, t, a) {
  var n;
  if (t && t !== "none")
    if (n = ne("rect", "bg", {
      width: r,
      height: e,
      x: "0",
      y: "0",
      id: "0"
    }), eT(t))
      $A({ fill: t }, n.attrs, "fill", a);
    else if (yg(t))
      UA({
        style: {
          fill: t
        },
        dirty: Xt,
        getBoundingRect: function() {
          return { width: r, height: e };
        }
      }, n.attrs, "fill", a);
    else {
      var i = Hs(t), o = i.color, s = i.opacity;
      n.attrs.fill = o, s < 1 && (n.attrs["fill-opacity"] = s);
    }
  return n;
}
const Rz = Ez;
function Nz(r) {
  r.registerPainter("svg", Rz);
}
function S1(r, e, t) {
  var a = qa.createCanvas(), n = e.getWidth(), i = e.getHeight(), o = a.style;
  return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = n + "px", o.height = i + "px", a.setAttribute("data-zr-dom-id", r)), a.width = n * t, a.height = i * t, a;
}
var Oz = function(r) {
  N(e, r);
  function e(t, a, n) {
    var i = r.call(this) || this;
    i.motionBlur = !1, i.lastFrameAlpha = 0.7, i.dpr = 1, i.virtual = !1, i.config = {}, i.incremental = !1, i.zlevel = 0, i.maxRepaintRectCount = 5, i.__dirty = !0, i.__firstTimePaint = !0, i.__used = !1, i.__drawIndex = 0, i.__startIndex = 0, i.__endIndex = 0, i.__prevStartIndex = null, i.__prevEndIndex = null;
    var o;
    n = n || ff, typeof t == "string" ? o = S1(t, a, n) : j(t) && (o = t, t = o.id), i.id = t, i.dom = o;
    var s = o.style;
    return s && (kb(o), o.onselectstart = function() {
      return !1;
    }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), i.painter = a, i.dpr = n, i;
  }
  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 t = this.dpr;
    this.domBack = S1("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), t !== 1 && this.ctxBack.scale(t, t);
  }, e.prototype.createRepaintRects = function(t, a, n, i) {
    if (this.__firstTimePaint)
      return this.__firstTimePaint = !1, null;
    var o = [], s = this.maxRepaintRectCount, l = !1, u = new ht(0, 0, 0, 0);
    function f(m) {
      if (!(!m.isFinite() || m.isZero()))
        if (o.length === 0) {
          var _ = new ht(0, 0, 0, 0);
          _.copy(m), o.push(_);
        } else {
          for (var S = !1, w = 1 / 0, x = 0, b = 0; b < o.length; ++b) {
            var T = o[b];
            if (T.intersect(m)) {
              var D = new ht(0, 0, 0, 0);
              D.copy(T), D.union(m), o[b] = D, S = !0;
              break;
            } else if (l) {
              u.copy(m), u.union(T);
              var A = m.width * m.height, M = T.width * T.height, I = u.width * u.height, L = I - A - M;
              L < w && (w = L, x = b);
            }
          }
          if (l && (o[x].union(m), S = !0), !S) {
            var _ = new ht(0, 0, 0, 0);
            _.copy(m), o.push(_);
          }
          l || (l = o.length >= s);
        }
    }
    for (var h = this.__startIndex; h < this.__endIndex; ++h) {
      var v = t[h];
      if (v) {
        var c = v.shouldBePainted(n, i, !0, !0), p = v.__isRendered && (v.__dirty & We || !c) ? v.getPrevPaintRect() : null;
        p && f(p);
        var d = c && (v.__dirty & We || !v.__isRendered) ? v.getPaintRect() : null;
        d && f(d);
      }
    }
    for (var h = this.__prevStartIndex; h < this.__prevEndIndex; ++h) {
      var v = a[h], c = v.shouldBePainted(n, i, !0, !0);
      if (v && (!c || !v.__zr) && v.__isRendered) {
        var p = v.getPrevPaintRect();
        p && f(p);
      }
    }
    var g;
    do {
      g = !1;
      for (var h = 0; h < o.length; ) {
        if (o[h].isZero()) {
          o.splice(h, 1);
          continue;
        }
        for (var y = h + 1; y < o.length; )
          o[h].intersect(o[y]) ? (g = !0, o[h].union(o[y]), o.splice(y, 1)) : y++;
        h++;
      }
    } while (g);
    return this._paintRects = o, o;
  }, e.prototype.debugGetPaintRects = function() {
    return (this._paintRects || []).slice();
  }, e.prototype.resize = function(t, a) {
    var n = this.dpr, i = this.dom, o = i.style, s = this.domBack;
    o && (o.width = t + "px", o.height = a + "px"), i.width = t * n, i.height = a * n, s && (s.width = t * n, s.height = a * n, n !== 1 && this.ctxBack.scale(n, n));
  }, e.prototype.clear = function(t, a, n) {
    var i = this.dom, o = this.ctx, s = i.width, l = i.height;
    a = a || this.clearColor;
    var u = this.motionBlur && !t, f = this.lastFrameAlpha, h = this.dpr, v = this;
    u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, s / h, l / h));
    var c = this.domBack;
    function p(d, g, y, m) {
      if (o.clearRect(d, g, y, m), a && a !== "transparent") {
        var _ = void 0;
        if (ih(a)) {
          var S = a.global || a.__width === y && a.__height === m;
          _ = S && a.__canvasGradient || hd(o, a, {
            x: 0,
            y: 0,
            width: y,
            height: m
          }), a.__canvasGradient = _, a.__width = y, a.__height = m;
        } else
          d2(a) && (a.scaleX = a.scaleX || h, a.scaleY = a.scaleY || h, _ = vd(o, a, {
            dirty: function() {
              v.setUnpainted(), v.__painter.refresh();
            }
          }));
        o.save(), o.fillStyle = _ || a, o.fillRect(d, g, y, m), o.restore();
      }
      u && (o.save(), o.globalAlpha = f, o.drawImage(c, d, g, y, m), o.restore());
    }
    !n || u ? p(0, 0, s, l) : n.length && C(n, function(d) {
      p(d.x * h, d.y * h, d.width * h, d.height * h);
    });
  }, e;
}(fr);
const sc = Oz;
var x1 = 1e5, En = 314159, cu = 0.01, kz = 1e-3;
function Vz(r) {
  return r ? r.__builtin__ ? !0 : !(typeof r.resize != "function" || typeof r.refresh != "function") : !1;
}
function Bz(r, e) {
  var t = document.createElement("div");
  return t.style.cssText = [
    "position:relative",
    "width:" + r + "px",
    "height:" + e + "px",
    "padding:0",
    "margin:0",
    "border-width:0"
  ].join(";") + ";", t;
}
var zz = function() {
  function r(e, t, a, n) {
    this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
    var i = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
    this._opts = a = V({}, a || {}), this.dpr = a.devicePixelRatio || ff, this._singleCanvas = i, this.root = e;
    var o = e.style;
    o && (kb(e), e.innerHTML = ""), this.storage = t;
    var s = this._zlevelList;
    this._prevDisplayList = [];
    var l = this._layers;
    if (i) {
      var f = e, h = f.width, v = f.height;
      a.width != null && (h = a.width), a.height != null && (v = a.height), this.dpr = a.devicePixelRatio || 1, f.width = h * this.dpr, f.height = v * this.dpr, this._width = h, this._height = v;
      var c = new sc(f, this, this.dpr);
      c.__builtin__ = !0, c.initContext(), l[En] = c, c.zlevel = En, s.push(En), this._domRoot = e;
    } else {
      this._width = Ji(e, 0, a), this._height = Ji(e, 1, a);
      var u = this._domRoot = Bz(this._width, this._height);
      e.appendChild(u);
    }
  }
  return r.prototype.getType = function() {
    return "canvas";
  }, r.prototype.isSingleCanvas = function() {
    return this._singleCanvas;
  }, r.prototype.getViewportRoot = function() {
    return this._domRoot;
  }, r.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, r.prototype.refresh = function(e) {
    var t = this.storage.getDisplayList(!0), a = this._prevDisplayList, n = this._zlevelList;
    this._redrawId = Math.random(), this._paintList(t, a, e, this._redrawId);
    for (var i = 0; i < n.length; i++) {
      var o = n[i], s = this._layers[o];
      if (!s.__builtin__ && s.refresh) {
        var l = i === 0 ? this._backgroundColor : null;
        s.refresh(l);
      }
    }
    return this._opts.useDirtyRect && (this._prevDisplayList = t.slice()), this;
  }, r.prototype.refreshHover = function() {
    this._paintHoverList(this.storage.getDisplayList(!1));
  }, r.prototype._paintHoverList = function(e) {
    var t = e.length, a = this._hoverlayer;
    if (a && a.clear(), !!t) {
      for (var n = {
        inHover: !0,
        viewWidth: this._width,
        viewHeight: this._height
      }, i, o = 0; o < t; o++) {
        var s = e[o];
        s.__inHover && (a || (a = this._hoverlayer = this.getLayer(x1)), i || (i = a.ctx, i.save()), Kn(i, s, n, o === t - 1));
      }
      i && i.restore();
    }
  }, r.prototype.getHoverLayer = function() {
    return this.getLayer(x1);
  }, r.prototype.paintOne = function(e, t) {
    EC(e, t);
  }, r.prototype._paintList = function(e, t, a, n) {
    if (this._redrawId === n) {
      a = a || !1, this._updateLayerStatus(e);
      var i = this._doPaintList(e, t, a), o = i.finished, s = i.needsRefreshHover;
      if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
        this.eachLayer(function(u) {
          u.afterBrush && u.afterBrush();
        });
      else {
        var l = this;
        Ap(function() {
          l._paintList(e, t, a, n);
        });
      }
    }
  }, r.prototype._compositeManually = function() {
    var e = this.getLayer(En).ctx, t = this._domRoot.width, a = this._domRoot.height;
    e.clearRect(0, 0, t, a), this.eachBuiltinLayer(function(n) {
      n.virtual && e.drawImage(n.dom, 0, 0, t, a);
    });
  }, r.prototype._doPaintList = function(e, t, a) {
    for (var n = this, i = [], 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 || a) && i.push(u);
    }
    for (var f = !0, h = !1, v = function(d) {
      var g = i[d], y = g.ctx, m = o && g.createRepaintRects(e, t, c._width, c._height), _ = a ? g.__startIndex : g.__drawIndex, S = !a && g.incremental && Date.now, w = S && Date.now(), x = g.zlevel === c._zlevelList[0] ? c._backgroundColor : null;
      if (g.__startIndex === g.__endIndex)
        g.clear(!1, x, m);
      else if (_ === g.__startIndex) {
        var b = e[_];
        (!b.incremental || !b.notClear || a) && g.clear(!1, x, m);
      }
      _ === -1 && (console.error("For some unknown reason. drawIndex is -1"), _ = g.__startIndex);
      var T, D = function(L) {
        var E = {
          inHover: !1,
          allClipped: !1,
          prevEl: null,
          viewWidth: n._width,
          viewHeight: n._height
        };
        for (T = _; T < g.__endIndex; T++) {
          var P = e[T];
          if (P.__inHover && (h = !0), n._doPaintEl(P, g, o, L, E, T === g.__endIndex - 1), S) {
            var R = Date.now() - w;
            if (R > 15)
              break;
          }
        }
        E.prevElClipPaths && y.restore();
      };
      if (m)
        if (m.length === 0)
          T = g.__endIndex;
        else
          for (var A = c.dpr, M = 0; M < m.length; ++M) {
            var I = m[M];
            y.save(), y.beginPath(), y.rect(I.x * A, I.y * A, I.width * A, I.height * A), y.clip(), D(I), y.restore();
          }
      else
        y.save(), D(), y.restore();
      g.__drawIndex = T, g.__drawIndex < g.__endIndex && (f = !1);
    }, c = this, p = 0; p < i.length; p++)
      v(p);
    return wt.wxa && C(this._layers, function(d) {
      d && d.ctx && d.ctx.draw && d.ctx.draw();
    }), {
      finished: f,
      needsRefreshHover: h
    };
  }, r.prototype._doPaintEl = function(e, t, a, n, i, o) {
    var s = t.ctx;
    if (a) {
      var l = e.getPaintRect();
      (!n || l && l.intersect(n)) && (Kn(s, e, i, o), e.setPrevPaintRect(l));
    } else
      Kn(s, e, i, o);
  }, r.prototype.getLayer = function(e, t) {
    this._singleCanvas && !this._needsManuallyCompositing && (e = En);
    var a = this._layers[e];
    return a || (a = new sc("zr_" + e, this, this.dpr), a.zlevel = e, a.__builtin__ = !0, this._layerConfig[e] ? ft(a, this._layerConfig[e], !0) : this._layerConfig[e - cu] && ft(a, this._layerConfig[e - cu], !0), t && (a.virtual = t), this.insertLayer(e, a), a.initContext()), a;
  }, r.prototype.insertLayer = function(e, t) {
    var a = this._layers, n = this._zlevelList, i = n.length, o = this._domRoot, s = null, l = -1;
    if (a[e]) {
      ({}).NODE_ENV !== "production" && Sr("ZLevel " + e + " has been used already");
      return;
    }
    if (!Vz(t)) {
      ({}).NODE_ENV !== "production" && Sr("Layer of zlevel " + e + " is not valid");
      return;
    }
    if (i > 0 && e > n[0]) {
      for (l = 0; l < i - 1 && !(n[l] < e && n[l + 1] > e); l++)
        ;
      s = a[n[l]];
    }
    if (n.splice(l + 1, 0, e), a[e] = t, !t.virtual)
      if (s) {
        var u = s.dom;
        u.nextSibling ? o.insertBefore(t.dom, u.nextSibling) : o.appendChild(t.dom);
      } else
        o.firstChild ? o.insertBefore(t.dom, o.firstChild) : o.appendChild(t.dom);
    t.__painter = this;
  }, r.prototype.eachLayer = function(e, t) {
    for (var a = this._zlevelList, n = 0; n < a.length; n++) {
      var i = a[n];
      e.call(t, this._layers[i], i);
    }
  }, r.prototype.eachBuiltinLayer = function(e, t) {
    for (var a = this._zlevelList, n = 0; n < a.length; n++) {
      var i = a[n], o = this._layers[i];
      o.__builtin__ && e.call(t, o, i);
    }
  }, r.prototype.eachOtherLayer = function(e, t) {
    for (var a = this._zlevelList, n = 0; n < a.length; n++) {
      var i = a[n], o = this._layers[i];
      o.__builtin__ || e.call(t, o, i);
    }
  }, r.prototype.getLayers = function() {
    return this._layers;
  }, r.prototype._updateLayerStatus = function(e) {
    this.eachBuiltinLayer(function(h, v) {
      h.__dirty = h.__used = !1;
    });
    function t(h) {
      i && (i.__endIndex !== h && (i.__dirty = !0), i.__endIndex = h);
    }
    if (this._singleCanvas)
      for (var a = 1; a < e.length; a++) {
        var n = e[a];
        if (n.zlevel !== e[a - 1].zlevel || n.incremental) {
          this._needsManuallyCompositing = !0;
          break;
        }
      }
    var i = null, o = 0, s, l;
    for (l = 0; l < e.length; l++) {
      var n = e[l], u = n.zlevel, f = void 0;
      s !== u && (s = u, o = 0), n.incremental ? (f = this.getLayer(u + kz, this._needsManuallyCompositing), f.incremental = !0, o = 1) : f = this.getLayer(u + (o > 0 ? cu : 0), this._needsManuallyCompositing), f.__builtin__ || Sr("ZLevel " + u + " has been used by unkown layer " + f.id), f !== i && (f.__used = !0, f.__startIndex !== l && (f.__dirty = !0), f.__startIndex = l, f.incremental ? f.__drawIndex = -1 : f.__drawIndex = l, t(l), i = f), n.__dirty & We && !n.__inHover && (f.__dirty = !0, f.incremental && f.__drawIndex < 0 && (f.__drawIndex = l));
    }
    t(l), this.eachBuiltinLayer(function(h, v) {
      !h.__used && h.getElementCount() > 0 && (h.__dirty = !0, h.__startIndex = h.__endIndex = h.__drawIndex = 0), h.__dirty && h.__drawIndex < 0 && (h.__drawIndex = h.__startIndex);
    });
  }, r.prototype.clear = function() {
    return this.eachBuiltinLayer(this._clearLayer), this;
  }, r.prototype._clearLayer = function(e) {
    e.clear();
  }, r.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e, C(this._layers, function(t) {
      t.setUnpainted();
    });
  }, r.prototype.configLayer = function(e, t) {
    if (t) {
      var a = this._layerConfig;
      a[e] ? ft(a[e], t, !0) : a[e] = t;
      for (var n = 0; n < this._zlevelList.length; n++) {
        var i = this._zlevelList[n];
        if (i === e || i === e + cu) {
          var o = this._layers[i];
          ft(o, a[e], !0);
        }
      }
    }
  }, r.prototype.delLayer = function(e) {
    var t = this._layers, a = this._zlevelList, n = t[e];
    n && (n.dom.parentNode.removeChild(n.dom), delete t[e], a.splice(ct(a, e), 1));
  }, r.prototype.resize = function(e, t) {
    if (this._domRoot.style) {
      var a = this._domRoot;
      a.style.display = "none";
      var n = this._opts, i = this.root;
      if (e != null && (n.width = e), t != null && (n.height = t), e = Ji(i, 0, n), t = Ji(i, 1, n), a.style.display = "", this._width !== e || t !== this._height) {
        a.style.width = e + "px", a.style.height = t + "px";
        for (var o in this._layers)
          this._layers.hasOwnProperty(o) && this._layers[o].resize(e, t);
        this.refresh(!0);
      }
      this._width = e, this._height = t;
    } else {
      if (e == null || t == null)
        return;
      this._width = e, this._height = t, this.getLayer(En).resize(e, t);
    }
    return this;
  }, r.prototype.clearLayer = function(e) {
    var t = this._layers[e];
    t && t.clear();
  }, r.prototype.dispose = function() {
    this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  }, r.prototype.getRenderedCanvas = function(e) {
    if (e = e || {}, this._singleCanvas && !this._compositeManually)
      return this._layers[En].dom;
    var t = new sc("image", this, e.pixelRatio || this.dpr);
    t.initContext(), t.clear(!1, e.backgroundColor || this._backgroundColor);
    var a = t.ctx;
    if (e.pixelRatio <= this.dpr) {
      this.refresh();
      var n = t.dom.width, i = t.dom.height;
      this.eachLayer(function(h) {
        h.__builtin__ ? a.drawImage(h.dom, 0, 0, n, i) : h.renderToCanvas && (a.save(), h.renderToCanvas(a), a.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 f = s[l];
        Kn(a, f, o, l === u - 1);
      }
    return t.dom;
  }, r.prototype.getWidth = function() {
    return this._width;
  }, r.prototype.getHeight = function() {
    return this._height;
  }, r;
}();
const Gz = zz;
function Fz(r) {
  r.registerPainter("canvas", Gz);
}
var Hz = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t;
    }
    return e.prototype.getInitialData = function(t) {
      if ({}.NODE_ENV !== "production") {
        var a = t.coordinateSystem;
        if (a !== "polar" && a !== "cartesian2d")
          throw new Error("Line not support coordinateSystem besides cartesian and polar");
      }
      return xa(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getLegendIcon = function(t) {
      var a = new nt(), n = Jt("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1);
      a.add(n), n.setStyle(t.lineStyle);
      var i = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = i === "none" ? "circle" : i, l = t.itemHeight * 0.8, u = Jt(s, (t.itemWidth - l) / 2, (t.itemHeight - l) / 2, l, l, t.itemStyle.fill);
      a.add(u), u.setStyle(t.itemStyle);
      var f = t.iconRotate === "inherit" ? o : t.iconRotate || 0;
      return u.rotation = f * Math.PI / 180, u.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), a;
    }, 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;
  }(Gt)
);
const Wz = Hz;
function co(r, e) {
  var t = r.mapDimensionsAll("defaultedLabel"), a = t.length;
  if (a === 1) {
    var n = fo(r, e, t[0]);
    return n != null ? n + "" : null;
  } else if (a) {
    for (var i = [], o = 0; o < t.length; o++)
      i.push(fo(r, e, t[o]));
    return i.join(" ");
  }
}
function qA(r, e) {
  var t = r.mapDimensionsAll("defaultedLabel");
  if (!z(e))
    return e + "";
  for (var a = [], n = 0; n < t.length; n++) {
    var i = r.getDimensionIndex(t[n]);
    i >= 0 && a.push(e[i]);
  }
  return a.join(" ");
}
var $z = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i) {
      var o = r.call(this) || this;
      return o.updateData(t, a, n, i), o;
    }
    return e.prototype._createSymbol = function(t, a, n, i, o) {
      this.removeAll();
      var s = Jt(t, -1, -1, 2, 2, null, o);
      s.attr({
        z2: 100,
        culling: !0,
        scaleX: i[0] / 2,
        scaleY: i[1] / 2
      }), s.drift = Uz, this._symbolType = t, this.add(s);
    }, e.prototype.stopSymbolAnimation = function(t) {
      this.childAt(0).stopAnimation(null, t);
    }, e.prototype.getSymbolType = function() {
      return this._symbolType;
    }, e.prototype.getSymbolPath = function() {
      return this.childAt(0);
    }, e.prototype.highlight = function() {
      da(this.childAt(0));
    }, e.prototype.downplay = function() {
      ga(this.childAt(0));
    }, e.prototype.setZ = function(t, a) {
      var n = this.childAt(0);
      n.zlevel = t, n.z = a;
    }, e.prototype.setDraggable = function(t, a) {
      var n = this.childAt(0);
      n.draggable = t, n.cursor = !a && t ? "move" : n.cursor;
    }, e.prototype.updateData = function(t, a, n, i) {
      this.silent = !1;
      var o = t.getItemVisual(a, "symbol") || "circle", s = t.hostModel, l = e.getSymbolSize(t, a), u = o !== this._symbolType, f = i && i.disableAnimation;
      if (u) {
        var h = t.getItemVisual(a, "symbolKeepAspect");
        this._createSymbol(o, t, a, l, h);
      } else {
        var v = this.childAt(0);
        v.silent = !1;
        var c = {
          scaleX: l[0] / 2,
          scaleY: l[1] / 2
        };
        f ? v.attr(c) : Mt(v, c, s, a), Cr(v);
      }
      if (this._updateCommon(t, a, l, n, i), u) {
        var v = this.childAt(0);
        if (!f) {
          var c = {
            scaleX: this._sizeX,
            scaleY: this._sizeY,
            style: {
              // Always fadeIn. Because it has fadeOut animation when symbol is removed..
              opacity: v.style.opacity
            }
          };
          v.scaleX = v.scaleY = 0, v.style.opacity = 0, Bt(v, c, s, a);
        }
      }
      f && this.childAt(0).stopAnimation("leave");
    }, e.prototype._updateCommon = function(t, a, n, i, o) {
      var s = this.childAt(0), l = t.hostModel, u, f, h, v, c, p, d, g, y;
      if (i && (u = i.emphasisItemStyle, f = i.blurItemStyle, h = i.selectItemStyle, v = i.focus, c = i.blurScope, d = i.labelStatesModels, g = i.hoverScale, y = i.cursorStyle, p = i.emphasisDisabled), !i || t.hasItemOption) {
        var m = i && i.itemModel ? i.itemModel : t.getItemModel(a), _ = m.getModel("emphasis");
        u = _.getModel("itemStyle").getItemStyle(), h = m.getModel(["select", "itemStyle"]).getItemStyle(), f = m.getModel(["blur", "itemStyle"]).getItemStyle(), v = _.get("focus"), c = _.get("blurScope"), p = _.get("disabled"), d = ie(m), g = _.getShallow("scale"), y = m.getShallow("cursor");
      }
      var S = t.getItemVisual(a, "symbolRotate");
      s.attr("rotation", (S || 0) * Math.PI / 180 || 0);
      var w = Oo(t.getItemVisual(a, "symbolOffset"), n);
      w && (s.x = w[0], s.y = w[1]), y && s.attr("cursor", y);
      var x = t.getItemVisual(a, "style"), b = x.fill;
      if (s instanceof de) {
        var T = s.style;
        s.useStyle(V({
          // TODO other properties like x, y ?
          image: T.image,
          x: T.x,
          y: T.y,
          width: T.width,
          height: T.height
        }, x));
      } else
        s.__isEmptyBrush ? s.useStyle(V({}, x)) : s.useStyle(x), s.style.decal = null, s.setColor(b, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
      var D = t.getItemVisual(a, "liftZ"), A = this._z2;
      D != null ? A == null && (this._z2 = s.z2, s.z2 += D) : A != null && (s.z2 = A, this._z2 = null);
      var M = o && o.useNameLabel;
      pe(s, d, {
        labelFetcher: l,
        labelDataIndex: a,
        defaultText: I,
        inheritColor: b,
        defaultOpacity: x.opacity
      });
      function I(P) {
        return M ? t.getName(P) : co(t, P);
      }
      this._sizeX = n[0] / 2, this._sizeY = n[1] / 2;
      var L = s.ensureState("emphasis");
      L.style = u, s.ensureState("select").style = h, s.ensureState("blur").style = f;
      var E = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
      L.scaleX = this._sizeX * E, L.scaleY = this._sizeY * E, this.setSymbolScale(1), Wt(this, v, c, p);
    }, e.prototype.setSymbolScale = function(t) {
      this.scaleX = this.scaleY = t;
    }, e.prototype.fadeOut = function(t, a, n) {
      var i = this.childAt(0), o = it(this).dataIndex, s = n && n.animation;
      if (this.silent = i.silent = !0, n && n.fadeLabel) {
        var l = i.getTextContent();
        l && Qa(l, {
          style: {
            opacity: 0
          }
        }, a, {
          dataIndex: o,
          removeOpt: s,
          cb: function() {
            i.removeTextContent();
          }
        });
      } else
        i.removeTextContent();
      Qa(i, {
        style: {
          opacity: 0
        },
        scaleX: 0,
        scaleY: 0
      }, a, {
        dataIndex: o,
        cb: t,
        removeOpt: s
      });
    }, e.getSymbolSize = function(t, a) {
      return Sl(t.getItemVisual(a, "symbolSize"));
    }, e;
  }(nt)
);
function Uz(r, e) {
  this.parent.drift(r, e);
}
const Tl = $z;
function lc(r, e, t, a) {
  return e && !isNaN(e[0]) && !isNaN(e[1]) && !(a.isIgnore && a.isIgnore(t)) && !(a.clipShape && !a.clipShape.contain(e[0], e[1])) && r.getItemVisual(t, "symbol") !== "none";
}
function w1(r) {
  return r != null && !j(r) && (r = {
    isIgnore: r
  }), r || {};
}
function b1(r) {
  var e = r.hostModel, t = e.getModel("emphasis");
  return {
    emphasisItemStyle: t.getModel("itemStyle").getItemStyle(),
    blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
    selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
    focus: t.get("focus"),
    blurScope: t.get("blurScope"),
    emphasisDisabled: t.get("disabled"),
    hoverScale: t.get("scale"),
    labelStatesModels: ie(e),
    cursorStyle: e.get("cursor")
  };
}
var Yz = (
  /** @class */
  function() {
    function r(e) {
      this.group = new nt(), this._SymbolCtor = e || Tl;
    }
    return r.prototype.updateData = function(e, t) {
      this._progressiveEls = null, t = w1(t);
      var a = this.group, n = e.hostModel, i = this._data, o = this._SymbolCtor, s = t.disableAnimation, l = b1(e), u = {
        disableAnimation: s
      }, f = t.getSymbolPoint || function(h) {
        return e.getItemLayout(h);
      };
      i || a.removeAll(), e.diff(i).add(function(h) {
        var v = f(h);
        if (lc(e, v, h, t)) {
          var c = new o(e, h, l, u);
          c.setPosition(v), e.setItemGraphicEl(h, c), a.add(c);
        }
      }).update(function(h, v) {
        var c = i.getItemGraphicEl(v), p = f(h);
        if (!lc(e, p, h, t)) {
          a.remove(c);
          return;
        }
        var d = e.getItemVisual(h, "symbol") || "circle", g = c && c.getSymbolType && c.getSymbolType();
        if (!c || g && g !== d)
          a.remove(c), c = new o(e, h, l, u), c.setPosition(p);
        else {
          c.updateData(e, h, l, u);
          var y = {
            x: p[0],
            y: p[1]
          };
          s ? c.attr(y) : Mt(c, y, n);
        }
        a.add(c), e.setItemGraphicEl(h, c);
      }).remove(function(h) {
        var v = i.getItemGraphicEl(h);
        v && v.fadeOut(function() {
          a.remove(v);
        }, n);
      }).execute(), this._getSymbolPoint = f, this._data = e;
    }, r.prototype.updateLayout = function() {
      var e = this, t = this._data;
      t && t.eachItemGraphicEl(function(a, n) {
        var i = e._getSymbolPoint(n);
        a.setPosition(i), a.markRedraw();
      });
    }, r.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = b1(e), this._data = null, this.group.removeAll();
    }, r.prototype.incrementalUpdate = function(e, t, a) {
      this._progressiveEls = [], a = w1(a);
      function n(l) {
        l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
      }
      for (var i = e.start; i < e.end; i++) {
        var o = t.getItemLayout(i);
        if (lc(t, o, i, a)) {
          var s = new this._SymbolCtor(t, i, this._seriesScope);
          s.traverse(n), s.setPosition(o), this.group.add(s), t.setItemGraphicEl(i, s), this._progressiveEls.push(s);
        }
      }
    }, r.prototype.eachRendered = function(e) {
      on(this._progressiveEls || this.group, e);
    }, r.prototype.remove = function(e) {
      var t = this.group, a = this._data;
      a && e ? a.eachItemGraphicEl(function(n) {
        n.fadeOut(function() {
          t.remove(n);
        }, a.hostModel);
      }) : t.removeAll();
    }, r;
  }()
);
const Dl = Yz;
function KA(r, e, t) {
  var a = r.getBaseAxis(), n = r.getOtherAxis(a), i = Zz(n, t), o = a.dim, s = n.dim, l = e.mapDimension(s), u = e.mapDimension(o), f = s === "x" || s === "radius" ? 1 : 0, h = G(r.dimensions, function(p) {
    return e.mapDimension(p);
  }), v = !1, c = e.getCalculationInfo("stackResultDimension");
  return tn(
    e,
    h[0]
    /* , dims[1] */
  ) && (v = !0, h[0] = c), tn(
    e,
    h[1]
    /* , dims[0] */
  ) && (v = !0, h[1] = c), {
    dataDimsForPoint: h,
    valueStart: i,
    valueAxisDim: s,
    baseAxisDim: o,
    stacked: !!v,
    valueDim: l,
    baseDim: u,
    baseDataOffset: f,
    stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  };
}
function Zz(r, e) {
  var t = 0, a = r.scale.getExtent();
  return e === "start" ? t = a[0] : e === "end" ? t = a[1] : Ct(e) && !isNaN(e) ? t = e : a[0] > 0 ? t = a[0] : a[1] < 0 && (t = a[1]), t;
}
function jA(r, e, t, a) {
  var n = NaN;
  r.stacked && (n = t.get(t.getCalculationInfo("stackedOverDimension"), a)), isNaN(n) && (n = r.valueStart);
  var i = r.baseDataOffset, o = [];
  return o[i] = t.get(r.baseDim, a), o[1 - i] = n, e.dataToPoint(o);
}
function Xz(r, e) {
  var t = [];
  return e.diff(r).add(function(a) {
    t.push({
      cmd: "+",
      idx: a
    });
  }).update(function(a, n) {
    t.push({
      cmd: "=",
      idx: n,
      idx1: a
    });
  }).remove(function(a) {
    t.push({
      cmd: "-",
      idx: a
    });
  }).execute(), t;
}
function qz(r, e, t, a, n, i, o, s) {
  for (var l = Xz(r, e), u = [], f = [], h = [], v = [], c = [], p = [], d = [], g = KA(n, e, o), y = r.getLayout("points") || [], m = e.getLayout("points") || [], _ = 0; _ < l.length; _++) {
    var S = l[_], w = !0, x = void 0, b = void 0;
    switch (S.cmd) {
      case "=":
        x = S.idx * 2, b = S.idx1 * 2;
        var T = y[x], D = y[x + 1], A = m[b], M = m[b + 1];
        (isNaN(T) || isNaN(D)) && (T = A, D = M), u.push(T, D), f.push(A, M), h.push(t[x], t[x + 1]), v.push(a[b], a[b + 1]), d.push(e.getRawIndex(S.idx1));
        break;
      case "+":
        var I = S.idx, L = g.dataDimsForPoint, E = n.dataToPoint([e.get(L[0], I), e.get(L[1], I)]);
        b = I * 2, u.push(E[0], E[1]), f.push(m[b], m[b + 1]);
        var P = jA(g, n, e, I);
        h.push(P[0], P[1]), v.push(a[b], a[b + 1]), d.push(e.getRawIndex(I));
        break;
      case "-":
        w = !1;
    }
    w && (c.push(S), p.push(p.length));
  }
  p.sort(function(yt, At) {
    return d[yt] - d[At];
  });
  for (var R = u.length, k = Fr(R), O = Fr(R), B = Fr(R), F = Fr(R), W = [], _ = 0; _ < p.length; _++) {
    var Z = p[_], J = _ * 2, et = Z * 2;
    k[J] = u[et], k[J + 1] = u[et + 1], O[J] = f[et], O[J + 1] = f[et + 1], B[J] = h[et], B[J + 1] = h[et + 1], F[J] = v[et], F[J + 1] = v[et + 1], W[_] = c[Z];
  }
  return {
    current: k,
    next: O,
    stackedOnCurrent: B,
    stackedOnNext: F,
    status: W
  };
}
var Ia = Math.min, La = Math.max;
function ii(r, e) {
  return isNaN(r) || isNaN(e);
}
function wd(r, e, t, a, n, i, o, s, l) {
  for (var u, f, h, v, c, p, d = t, g = 0; g < a; g++) {
    var y = e[d * 2], m = e[d * 2 + 1];
    if (d >= n || d < 0)
      break;
    if (ii(y, m)) {
      if (l) {
        d += i;
        continue;
      }
      break;
    }
    if (d === t)
      r[i > 0 ? "moveTo" : "lineTo"](y, m), h = y, v = m;
    else {
      var _ = y - u, S = m - f;
      if (_ * _ + S * S < 0.5) {
        d += i;
        continue;
      }
      if (o > 0) {
        for (var w = d + i, x = e[w * 2], b = e[w * 2 + 1]; x === y && b === m && g < a; )
          g++, w += i, d += i, x = e[w * 2], b = e[w * 2 + 1], y = e[d * 2], m = e[d * 2 + 1], _ = y - u, S = m - f;
        var T = g + 1;
        if (l)
          for (; ii(x, b) && T < a; )
            T++, w += i, x = e[w * 2], b = e[w * 2 + 1];
        var D = 0.5, A = 0, M = 0, I = void 0, L = void 0;
        if (T >= a || ii(x, b))
          c = y, p = m;
        else {
          A = x - u, M = b - f;
          var E = y - u, P = x - y, R = m - f, k = b - m, O = void 0, B = void 0;
          if (s === "x") {
            O = Math.abs(E), B = Math.abs(P);
            var F = A > 0 ? 1 : -1;
            c = y - F * O * o, p = m, I = y + F * B * o, L = m;
          } else if (s === "y") {
            O = Math.abs(R), B = Math.abs(k);
            var W = M > 0 ? 1 : -1;
            c = y, p = m - W * O * o, I = y, L = m + W * B * o;
          } else
            O = Math.sqrt(E * E + R * R), B = Math.sqrt(P * P + k * k), D = B / (B + O), c = y - A * o * (1 - D), p = m - M * o * (1 - D), I = y + A * o * D, L = m + M * o * D, I = Ia(I, La(x, y)), L = Ia(L, La(b, m)), I = La(I, Ia(x, y)), L = La(L, Ia(b, m)), A = I - y, M = L - m, c = y - A * O / B, p = m - M * O / B, c = Ia(c, La(u, y)), p = Ia(p, La(f, m)), c = La(c, Ia(u, y)), p = La(p, Ia(f, m)), A = y - c, M = m - p, I = y + A * B / O, L = m + M * B / O;
        }
        r.bezierCurveTo(h, v, c, p, y, m), h = I, v = L;
      } else
        r.lineTo(y, m);
    }
    u = y, f = m, d += i;
  }
  return g;
}
var QA = (
  /** @class */
  function() {
    function r() {
      this.smooth = 0, this.smoothConstraint = !0;
    }
    return r;
  }()
), Kz = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "ec-polyline", a;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new QA();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.points, i = 0, o = n.length / 2;
      if (a.connectNulls) {
        for (; o > 0 && ii(n[o * 2 - 2], n[o * 2 - 1]); o--)
          ;
        for (; i < o && ii(n[i * 2], n[i * 2 + 1]); i++)
          ;
      }
      for (; i < o; )
        i += wd(t, n, i, o, o, 1, a.smooth, a.smoothMonotone, a.connectNulls) + 1;
    }, e.prototype.getPointOn = function(t, a) {
      this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
      for (var n = this.path, i = n.data, o = Xr.CMD, s, l, u = a === "x", f = [], h = 0; h < i.length; ) {
        var v = i[h++], c = void 0, p = void 0, d = void 0, g = void 0, y = void 0, m = void 0, _ = void 0;
        switch (v) {
          case o.M:
            s = i[h++], l = i[h++];
            break;
          case o.L:
            if (c = i[h++], p = i[h++], _ = u ? (t - s) / (c - s) : (t - l) / (p - l), _ <= 1 && _ >= 0) {
              var S = u ? (p - l) * _ + l : (c - s) * _ + s;
              return u ? [t, S] : [S, t];
            }
            s = c, l = p;
            break;
          case o.C:
            c = i[h++], p = i[h++], d = i[h++], g = i[h++], y = i[h++], m = i[h++];
            var w = u ? of(s, c, d, y, t, f) : of(l, p, g, m, t, f);
            if (w > 0)
              for (var x = 0; x < w; x++) {
                var b = f[x];
                if (b <= 1 && b >= 0) {
                  var S = u ? ae(l, p, g, m, b) : ae(s, c, d, y, b);
                  return u ? [t, S] : [S, t];
                }
              }
            s = y, l = m;
            break;
        }
      }
    }, e;
  }(gt)
), jz = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e;
  }(QA)
), JA = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "ec-polygon", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new jz();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.points, i = a.stackedOnPoints, o = 0, s = n.length / 2, l = a.smoothMonotone;
      if (a.connectNulls) {
        for (; s > 0 && ii(n[s * 2 - 2], n[s * 2 - 1]); s--)
          ;
        for (; o < s && ii(n[o * 2], n[o * 2 + 1]); o++)
          ;
      }
      for (; o < s; ) {
        var u = wd(t, n, o, s, s, 1, a.smooth, l, a.connectNulls);
        wd(t, i, o + u - 1, u, s, -1, a.stackedOnSmooth, l, a.connectNulls), o += u + 1, t.closePath();
      }
    }, e;
  }(gt)
);
function tM(r, e, t, a, n) {
  var i = r.getArea(), o = i.x, s = i.y, l = i.width, u = i.height, f = t.get(["lineStyle", "width"]) || 2;
  o -= f / 2, s -= f / 2, l += f, u += f, o = Math.floor(o), l = Math.round(l);
  var h = new bt({
    shape: {
      x: o,
      y: s,
      width: l,
      height: u
    }
  });
  if (e) {
    var v = r.getBaseAxis(), c = v.isHorizontal(), p = v.inverse;
    c ? (p && (h.shape.x += l), h.shape.width = 0) : (p || (h.shape.y += u), h.shape.height = 0);
    var d = q(n) ? function(g) {
      n(g, h);
    } : null;
    Bt(h, {
      shape: {
        width: l,
        height: u,
        x: o,
        y: s
      }
    }, t, null, a, d);
  }
  return h;
}
function eM(r, e, t) {
  var a = r.getArea(), n = Yt(a.r0, 1), i = Yt(a.r, 1), o = new Ve({
    shape: {
      cx: Yt(r.cx, 1),
      cy: Yt(r.cy, 1),
      r0: n,
      r: i,
      startAngle: a.startAngle,
      endAngle: a.endAngle,
      clockwise: a.clockwise
    }
  });
  if (e) {
    var s = r.getBaseAxis().dim === "angle";
    s ? o.shape.endAngle = a.startAngle : o.shape.r = n, Bt(o, {
      shape: {
        endAngle: a.endAngle,
        r: i
      }
    }, t);
  }
  return o;
}
function Bh(r, e, t, a, n) {
  if (r) {
    if (r.type === "polar")
      return eM(r, e, t);
    if (r.type === "cartesian2d")
      return tM(r, e, t, a, n);
  } else
    return null;
  return null;
}
function Si(r, e) {
  return r.type === e;
}
function T1(r, e) {
  if (r.length === e.length) {
    for (var t = 0; t < r.length; t++)
      if (r[t] !== e[t])
        return;
    return !0;
  }
}
function D1(r) {
  for (var e = 1 / 0, t = 1 / 0, a = -1 / 0, n = -1 / 0, i = 0; i < r.length; ) {
    var o = r[i++], s = r[i++];
    isNaN(o) || (e = Math.min(o, e), a = Math.max(o, a)), isNaN(s) || (t = Math.min(s, t), n = Math.max(s, n));
  }
  return [[e, t], [a, n]];
}
function C1(r, e) {
  var t = D1(r), a = t[0], n = t[1], i = D1(e), o = i[0], s = i[1];
  return Math.max(Math.abs(a[0] - o[0]), Math.abs(a[1] - o[1]), Math.abs(n[0] - s[0]), Math.abs(n[1] - s[1]));
}
function A1(r) {
  return Ct(r) ? r : r ? 0.5 : 0;
}
function Qz(r, e, t) {
  if (!t.valueDim)
    return [];
  for (var a = e.count(), n = Fr(a * 2), i = 0; i < a; i++) {
    var o = jA(t, r, e, i);
    n[i * 2] = o[0], n[i * 2 + 1] = o[1];
  }
  return n;
}
function Ea(r, e, t, a) {
  var n = e.getBaseAxis(), i = n.dim === "x" || n.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], f = [], h = [];
  if (a) {
    for (s = 0; s < r.length; s += 2)
      !isNaN(r[s]) && !isNaN(r[s + 1]) && h.push(r[s], r[s + 1]);
    r = h;
  }
  for (s = 0; s < r.length - 2; s += 2)
    switch (f[0] = r[s + 2], f[1] = r[s + 3], u[0] = r[s], u[1] = r[s + 1], o.push(u[0], u[1]), t) {
      case "end":
        l[i] = f[i], l[1 - i] = u[1 - i], o.push(l[0], l[1]);
        break;
      case "middle":
        var v = (u[i] + f[i]) / 2, c = [];
        l[i] = c[i] = v, l[1 - i] = u[1 - i], c[1 - i] = f[1 - i], o.push(l[0], l[1]), o.push(c[0], c[1]);
        break;
      default:
        l[i] = u[i], l[1 - i] = f[1 - i], o.push(l[0], l[1]);
    }
  return o.push(r[s++], r[s++]), o;
}
function Jz(r, e) {
  var t = [], a = r.length, n, i;
  function o(f, h, v) {
    var c = f.coord, p = (v - c) / (h.coord - c), d = sE(p, [f.color, h.color]);
    return {
      coord: v,
      color: d
    };
  }
  for (var s = 0; s < a; s++) {
    var l = r[s], u = l.coord;
    if (u < 0)
      n = l;
    else if (u > e) {
      i ? t.push(o(i, l, e)) : n && t.push(o(n, l, 0), o(n, l, e));
      break;
    } else
      n && (t.push(o(n, l, 0)), n = null), t.push(l), i = l;
  }
  return t;
}
function t5(r, e, t) {
  var a = r.getVisual("visualMeta");
  if (!(!a || !a.length || !r.count())) {
    if (e.type !== "cartesian2d") {
      ({}).NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
      return;
    }
    for (var n, i, o = a.length - 1; o >= 0; o--) {
      var s = r.getDimensionInfo(a[o].dimension);
      if (n = s && s.coordDim, n === "x" || n === "y") {
        i = a[o];
        break;
      }
    }
    if (!i) {
      ({}).NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
      return;
    }
    var l = e.getAxis(n), u = G(i.stops, function(_) {
      return {
        coord: l.toGlobalCoord(l.dataToCoord(_.value)),
        color: _.color
      };
    }), f = u.length, h = i.outerColors.slice();
    f && u[0].coord > u[f - 1].coord && (u.reverse(), h.reverse());
    var v = Jz(u, n === "x" ? t.getWidth() : t.getHeight()), c = v.length;
    if (!c && f)
      return u[0].coord < 0 ? h[1] ? h[1] : u[f - 1].color : h[0] ? h[0] : u[0].color;
    var p = 10, d = v[0].coord - p, g = v[c - 1].coord + p, y = g - d;
    if (y < 1e-3)
      return "transparent";
    C(v, function(_) {
      _.offset = (_.coord - d) / y;
    }), v.push({
      // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
      offset: c ? v[c - 1].offset : 0.5,
      color: h[1] || "transparent"
    }), v.unshift({
      offset: c ? v[0].offset : 0.5,
      color: h[0] || "transparent"
    });
    var m = new dl(0, 0, 0, 0, v, !0);
    return m[n] = d, m[n + "2"] = g, m;
  }
}
function e5(r, e, t) {
  var a = r.get("showAllSymbol"), n = a === "auto";
  if (!(a && !n)) {
    var i = t.getAxesByScale("ordinal")[0];
    if (i && !(n && r5(i, e))) {
      var o = e.mapDimension(i.dim), s = {};
      return C(i.getViewLabels(), function(l) {
        var u = i.scale.getRawOrdinalNumber(l.tickValue);
        s[u] = 1;
      }), function(l) {
        return !s.hasOwnProperty(e.get(o, l));
      };
    }
  }
}
function r5(r, e) {
  var t = r.getExtent(), a = Math.abs(t[1] - t[0]) / r.scale.count();
  isNaN(a) && (a = 0);
  for (var n = e.count(), i = Math.max(1, Math.round(n / 5)), o = 0; o < n; o += i)
    if (Tl.getSymbolSize(
      e,
      o
      // Only for cartesian, where `isHorizontal` exists.
    )[r.isHorizontal() ? 1 : 0] * 1.5 > a)
      return !1;
  return !0;
}
function a5(r, e) {
  return isNaN(r) || isNaN(e);
}
function n5(r) {
  for (var e = r.length / 2; e > 0 && a5(r[e * 2 - 2], r[e * 2 - 1]); e--)
    ;
  return e - 1;
}
function M1(r, e) {
  return [r[e * 2], r[e * 2 + 1]];
}
function i5(r, e, t) {
  for (var a = r.length / 2, n = t === "x" ? 0 : 1, i, o, s = 0, l = -1, u = 0; u < a; u++)
    if (o = r[u * 2 + n], !(isNaN(o) || isNaN(r[u * 2 + 1 - n]))) {
      if (u === 0) {
        i = o;
        continue;
      }
      if (i <= e && o >= e || i >= e && o <= e) {
        l = u;
        break;
      }
      s = u, i = o;
    }
  return {
    range: [s, l],
    t: (e - i) / (o - i)
  };
}
function rM(r) {
  if (r.get(["endLabel", "show"]))
    return !0;
  for (var e = 0; e < Me.length; e++)
    if (r.get([Me[e], "endLabel", "show"]))
      return !0;
  return !1;
}
function uc(r, e, t, a) {
  if (Si(e, "cartesian2d")) {
    var n = a.getModel("endLabel"), i = n.get("valueAnimation"), o = a.getData(), s = {
      lastFrameIndex: 0
    }, l = rM(a) ? function(c, p) {
      r._endLabelOnDuring(c, p, o, s, i, n, e);
    } : null, u = e.getBaseAxis().isHorizontal(), f = tM(e, t, a, function() {
      var c = r._endLabel;
      c && t && s.originalX != null && c.attr({
        x: s.originalX,
        y: s.originalY
      });
    }, l);
    if (!a.get("clip", !0)) {
      var h = f.shape, v = Math.max(h.width, h.height);
      u ? (h.y -= v, h.height += v * 2) : (h.x -= v, h.width += v * 2);
    }
    return l && l(1, f), f;
  } else
    return {}.NODE_ENV !== "production" && a.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), eM(e, t, a);
}
function o5(r, e) {
  var t = e.getBaseAxis(), a = t.isHorizontal(), n = t.inverse, i = a ? n ? "right" : "left" : "center", o = a ? "middle" : n ? "top" : "bottom";
  return {
    normal: {
      align: r.get("align") || i,
      verticalAlign: r.get("verticalAlign") || o
    }
  };
}
var s5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.init = function() {
      var t = new nt(), a = new Dl();
      this.group.add(a.group), this._symbolDraw = a, this._lineGroup = t;
    }, e.prototype.render = function(t, a, n) {
      var i = this, o = t.coordinateSystem, s = this.group, l = t.getData(), u = t.getModel("lineStyle"), f = t.getModel("areaStyle"), h = l.getLayout("points") || [], v = o.type === "polar", c = this._coordSys, p = this._symbolDraw, d = this._polyline, g = this._polygon, y = this._lineGroup, m = !a.ssr && t.isAnimationEnabled(), _ = !f.isEmpty(), S = f.get("origin"), w = KA(o, l, S), x = _ && Qz(o, l, w), b = t.get("showSymbol"), T = t.get("connectNulls"), D = b && !v && e5(t, l, o), A = this._data;
      A && A.eachItemGraphicEl(function(At, dt) {
        At.__temp && (s.remove(At), A.setItemGraphicEl(dt, null));
      }), b || p.remove(), s.add(y);
      var M = v ? !1 : t.get("step"), I;
      o && o.getArea && t.get("clip", !0) && (I = o.getArea(), I.width != null ? (I.x -= 0.1, I.y -= 0.1, I.width += 0.2, I.height += 0.2) : I.r0 && (I.r0 -= 0.5, I.r += 0.5)), this._clipShapeForSymbol = I;
      var L = t5(l, o, n) || l.getVisual("style")[l.getVisual("drawType")];
      if (!(d && c.type === o.type && M === this._step))
        b && p.updateData(l, {
          isIgnore: D,
          clipShape: I,
          disableAnimation: !0,
          getSymbolPoint: function(At) {
            return [h[At * 2], h[At * 2 + 1]];
          }
        }), m && this._initSymbolLabelAnimation(l, o, I), M && (h = Ea(h, o, M, T), x && (x = Ea(x, o, M, T))), d = this._newPolyline(h), _ ? g = this._newPolygon(h, x) : g && (y.remove(g), g = this._polygon = null), v || this._initOrUpdateEndLabel(t, o, ci(L)), y.setClipPath(uc(this, o, !0, t));
      else {
        _ && !g ? g = this._newPolygon(h, x) : g && !_ && (y.remove(g), g = this._polygon = null), v || this._initOrUpdateEndLabel(t, o, ci(L));
        var E = y.getClipPath();
        if (E) {
          var P = uc(this, o, !1, t);
          Bt(E, {
            shape: P.shape
          }, t);
        } else
          y.setClipPath(uc(this, o, !0, t));
        b && p.updateData(l, {
          isIgnore: D,
          clipShape: I,
          disableAnimation: !0,
          getSymbolPoint: function(At) {
            return [h[At * 2], h[At * 2 + 1]];
          }
        }), (!T1(this._stackedOnPoints, x) || !T1(this._points, h)) && (m ? this._doUpdateAnimation(l, x, o, n, M, S, T) : (M && (h = Ea(h, o, M, T), x && (x = Ea(x, o, M, T))), d.setShape({
          points: h
        }), g && g.setShape({
          points: h,
          stackedOnPoints: x
        })));
      }
      var R = t.getModel("emphasis"), k = R.get("focus"), O = R.get("blurScope"), B = R.get("disabled");
      if (d.useStyle(tt(
        // Use color in lineStyle first
        u.getLineStyle(),
        {
          fill: "none",
          stroke: L,
          lineJoin: "bevel"
        }
      )), ce(d, t, "lineStyle"), d.style.lineWidth > 0 && t.get(["emphasis", "lineStyle", "width"]) === "bolder") {
        var F = d.getState("emphasis").style;
        F.lineWidth = +d.style.lineWidth + 1;
      }
      it(d).seriesIndex = t.seriesIndex, Wt(d, k, O, B);
      var W = A1(t.get("smooth")), Z = t.get("smoothMonotone");
      if (d.setShape({
        smooth: W,
        smoothMonotone: Z,
        connectNulls: T
      }), g) {
        var J = l.getCalculationInfo("stackedOnSeries"), et = 0;
        g.useStyle(tt(f.getAreaStyle(), {
          fill: L,
          opacity: 0.7,
          lineJoin: "bevel",
          decal: l.getVisual("style").decal
        })), J && (et = A1(J.get("smooth"))), g.setShape({
          smooth: W,
          stackedOnSmooth: et,
          smoothMonotone: Z,
          connectNulls: T
        }), ce(g, t, "areaStyle"), it(g).seriesIndex = t.seriesIndex, Wt(g, k, O, B);
      }
      var yt = function(At) {
        i._changePolyState(At);
      };
      l.eachItemGraphicEl(function(At) {
        At && (At.onHoverStateChange = yt);
      }), this._polyline.onHoverStateChange = yt, this._data = l, this._coordSys = o, this._stackedOnPoints = x, this._points = h, this._step = M, this._valueOrigin = S, t.get("triggerLineEvent") && (this.packEventData(t, d), g && this.packEventData(t, g));
    }, e.prototype.packEventData = function(t, a) {
      it(a).eventData = {
        componentType: "series",
        componentSubType: "line",
        componentIndex: t.componentIndex,
        seriesIndex: t.seriesIndex,
        seriesName: t.name,
        seriesType: "line"
      };
    }, e.prototype.highlight = function(t, a, n, i) {
      var o = t.getData(), s = fi(o, i);
      if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
        var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
        if (!u) {
          var f = l[s * 2], h = l[s * 2 + 1];
          if (isNaN(f) || isNaN(h) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(f, h))
            return;
          var v = t.get("zlevel") || 0, c = t.get("z") || 0;
          u = new Tl(o, s), u.x = f, u.y = h, u.setZ(v, c);
          var p = u.getSymbolPath().getTextContent();
          p && (p.zlevel = v, p.z = c, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
        }
        u.highlight();
      } else
        Vt.prototype.highlight.call(this, t, a, n, i);
    }, e.prototype.downplay = function(t, a, n, i) {
      var o = t.getData(), s = fi(o, i);
      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
        Vt.prototype.downplay.call(this, t, a, n, i);
    }, e.prototype._changePolyState = function(t) {
      var a = this._polygon;
      pf(this._polyline, t), a && pf(a, t);
    }, e.prototype._newPolyline = function(t) {
      var a = this._polyline;
      return a && this._lineGroup.remove(a), a = new Kz({
        shape: {
          points: t
        },
        segmentIgnoreThreshold: 2,
        z2: 10
      }), this._lineGroup.add(a), this._polyline = a, a;
    }, e.prototype._newPolygon = function(t, a) {
      var n = this._polygon;
      return n && this._lineGroup.remove(n), n = new JA({
        shape: {
          points: t,
          stackedOnPoints: a
        },
        segmentIgnoreThreshold: 2
      }), this._lineGroup.add(n), this._polygon = n, n;
    }, e.prototype._initSymbolLabelAnimation = function(t, a, n) {
      var i, o, s = a.getBaseAxis(), l = s.inverse;
      a.type === "cartesian2d" ? (i = s.isHorizontal(), o = !1) : a.type === "polar" && (i = s.dim === "angle", o = !0);
      var u = t.hostModel, f = u.get("animationDuration");
      q(f) && (f = f(null));
      var h = u.get("animationDelay") || 0, v = q(h) ? h(null) : h;
      t.eachItemGraphicEl(function(c, p) {
        var d = c;
        if (d) {
          var g = [c.x, c.y], y = void 0, m = void 0, _ = void 0;
          if (n)
            if (o) {
              var S = n, w = a.pointToCoord(g);
              i ? (y = S.startAngle, m = S.endAngle, _ = -w[1] / 180 * Math.PI) : (y = S.r0, m = S.r, _ = w[0]);
            } else {
              var x = n;
              i ? (y = x.x, m = x.x + x.width, _ = c.x) : (y = x.y + x.height, m = x.y, _ = c.y);
            }
          var b = m === y ? 0 : (_ - y) / (m - y);
          l && (b = 1 - b);
          var T = q(h) ? h(p) : f * b + v, D = d.getSymbolPath(), A = D.getTextContent();
          d.attr({
            scaleX: 0,
            scaleY: 0
          }), d.animateTo({
            scaleX: 1,
            scaleY: 1
          }, {
            duration: 200,
            setToFinal: !0,
            delay: T
          }), A && A.animateFrom({
            style: {
              opacity: 0
            }
          }, {
            duration: 300,
            delay: T
          }), D.disableLabelAnimation = !0;
        }
      });
    }, e.prototype._initOrUpdateEndLabel = function(t, a, n) {
      var i = t.getModel("endLabel");
      if (rM(t)) {
        var o = t.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 Dt({
          z2: 200
          // should be higher than item symbol
        }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
        var f = n5(l);
        f >= 0 && (pe(s, ie(t, "endLabel"), {
          inheritColor: n,
          labelFetcher: t,
          labelDataIndex: f,
          defaultText: function(h, v, c) {
            return c != null ? qA(o, c) : co(o, h);
          },
          enableTextSetter: !0
        }, o5(i, a)), s.textConfig.position = null);
      } else
        this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
    }, e.prototype._endLabelOnDuring = function(t, a, n, i, o, s, l) {
      var u = this._endLabel, f = this._polyline;
      if (u) {
        t < 1 && i.originalX == null && (i.originalX = u.x, i.originalY = u.y);
        var h = n.getLayout("points"), v = n.hostModel, c = v.get("connectNulls"), p = s.get("precision"), d = s.get("distance") || 0, g = l.getBaseAxis(), y = g.isHorizontal(), m = g.inverse, _ = a.shape, S = m ? y ? _.x : _.y + _.height : y ? _.x + _.width : _.y, w = (y ? d : 0) * (m ? -1 : 1), x = (y ? 0 : -d) * (m ? -1 : 1), b = y ? "x" : "y", T = i5(h, S, b), D = T.range, A = D[1] - D[0], M = void 0;
        if (A >= 1) {
          if (A > 1 && !c) {
            var I = M1(h, D[0]);
            u.attr({
              x: I[0] + w,
              y: I[1] + x
            }), o && (M = v.getRawValue(D[0]));
          } else {
            var I = f.getPointOn(S, b);
            I && u.attr({
              x: I[0] + w,
              y: I[1] + x
            });
            var L = v.getRawValue(D[0]), E = v.getRawValue(D[1]);
            o && (M = bT(n, p, L, E, T.t));
          }
          i.lastFrameIndex = D[0];
        } else {
          var P = t === 1 || i.lastFrameIndex > 0 ? D[0] : 0, I = M1(h, P);
          o && (M = v.getRawValue(P)), u.attr({
            x: I[0] + w,
            y: I[1] + x
          });
        }
        o && Co(u).setLabelText(M);
      }
    }, e.prototype._doUpdateAnimation = function(t, a, n, i, o, s, l) {
      var u = this._polyline, f = this._polygon, h = t.hostModel, v = qz(this._data, t, this._stackedOnPoints, a, this._coordSys, n, this._valueOrigin), c = v.current, p = v.stackedOnCurrent, d = v.next, g = v.stackedOnNext;
      if (o && (c = Ea(v.current, n, o, l), p = Ea(v.stackedOnCurrent, n, o, l), d = Ea(v.next, n, o, l), g = Ea(v.stackedOnNext, n, o, l)), C1(c, d) > 3e3 || f && C1(p, g) > 3e3) {
        u.stopAnimation(), u.setShape({
          points: d
        }), f && (f.stopAnimation(), f.setShape({
          points: d,
          stackedOnPoints: g
        }));
        return;
      }
      u.shape.__points = v.current, u.shape.points = c;
      var y = {
        shape: {
          points: d
        }
      };
      v.current !== c && (y.shape.__points = v.next), u.stopAnimation(), Mt(u, y, h), f && (f.setShape({
        // Reuse the points with polyline.
        points: c,
        stackedOnPoints: p
      }), f.stopAnimation(), Mt(f, {
        shape: {
          stackedOnPoints: g
        }
      }, h), u.shape.points !== f.shape.points && (f.shape.points = u.shape.points));
      for (var m = [], _ = v.status, S = 0; S < _.length; S++) {
        var w = _[S].cmd;
        if (w === "=") {
          var x = t.getItemGraphicEl(_[S].idx1);
          x && m.push({
            el: x,
            ptIdx: S
            // Index of points
          });
        }
      }
      u.animators && u.animators.length && u.animators[0].during(function() {
        f && f.dirtyShape();
        for (var b = u.shape.__points, T = 0; T < m.length; T++) {
          var D = m[T].el, A = m[T].ptIdx * 2;
          D.x = b[A], D.y = b[A + 1], D.markRedraw();
        }
      });
    }, e.prototype.remove = function(t) {
      var a = this.group, n = this._data;
      this._lineGroup.removeAll(), this._symbolDraw.remove(!0), n && n.eachItemGraphicEl(function(i, o) {
        i.__temp && (a.remove(i), n.setItemGraphicEl(o, null));
      }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
    }, e.type = "line", e;
  }(Vt)
);
const l5 = s5;
function Cl(r, e) {
  return {
    seriesType: r,
    plan: Ro(),
    reset: function(t) {
      var a = t.getData(), n = t.coordinateSystem, i = t.pipelineContext, o = e || i.large;
      if (n) {
        var s = G(n.dimensions, function(c) {
          return a.mapDimension(c);
        }).slice(0, 2), l = s.length, u = a.getCalculationInfo("stackResultDimension");
        tn(a, s[0]) && (s[0] = u), tn(a, s[1]) && (s[1] = u);
        var f = a.getStore(), h = a.getDimensionIndex(s[0]), v = a.getDimensionIndex(s[1]);
        return l && {
          progress: function(c, p) {
            for (var d = c.end - c.start, g = o && Fr(d * l), y = [], m = [], _ = c.start, S = 0; _ < c.end; _++) {
              var w = void 0;
              if (l === 1) {
                var x = f.get(h, _);
                w = n.dataToPoint(x, null, m);
              } else
                y[0] = f.get(h, _), y[1] = f.get(v, _), w = n.dataToPoint(y, null, m);
              o ? (g[S++] = w[0], g[S++] = w[1]) : p.setItemLayout(_, w.slice());
            }
            o && p.setLayout("points", g);
          }
        };
      }
    }
  };
}
var u5 = {
  average: function(r) {
    for (var e = 0, t = 0, a = 0; a < r.length; a++)
      isNaN(r[a]) || (e += r[a], t++);
    return t === 0 ? NaN : e / t;
  },
  sum: function(r) {
    for (var e = 0, t = 0; t < r.length; t++)
      e += r[t] || 0;
    return e;
  },
  max: function(r) {
    for (var e = -1 / 0, t = 0; t < r.length; t++)
      r[t] > e && (e = r[t]);
    return isFinite(e) ? e : NaN;
  },
  min: function(r) {
    for (var e = 1 / 0, t = 0; t < r.length; t++)
      r[t] < e && (e = r[t]);
    return isFinite(e) ? e : NaN;
  },
  // TODO
  // Median
  nearest: function(r) {
    return r[0];
  }
}, f5 = function(r) {
  return Math.round(r.length / 2);
};
function aM(r) {
  return {
    seriesType: r,
    // FIXME:TS never used, so comment it
    // modifyOutputEnd: true,
    reset: function(e, t, a) {
      var n = e.getData(), i = e.get("sampling"), o = e.coordinateSystem, s = n.count();
      if (s > 10 && o.type === "cartesian2d" && i) {
        var l = o.getBaseAxis(), u = o.getOtherAxis(l), f = l.getExtent(), h = a.getDevicePixelRatio(), v = Math.abs(f[1] - f[0]) * (h || 1), c = Math.round(s / v);
        if (isFinite(c) && c > 1) {
          i === "lttb" && e.setData(n.lttbDownSample(n.mapDimension(u.dim), 1 / c));
          var p = void 0;
          $(i) ? p = u5[i] : q(i) && (p = i), p && e.setData(n.downSample(n.mapDimension(u.dim), 1 / c, p, f5));
        }
      }
    }
  };
}
function h5(r) {
  r.registerChartView(l5), r.registerSeriesModel(Wz), r.registerLayout(Cl("line", !0)), r.registerVisual({
    seriesType: "line",
    reset: function(e) {
      var t = e.getData(), a = e.getModel("lineStyle").getLineStyle();
      a && !a.stroke && (a.stroke = t.getVisual("style").fill), t.setVisual("legendLineStyle", a);
    }
  }), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, aM("line"));
}
var nM = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return xa(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getMarkerPosition = function(t, a, n) {
      var i = this.coordinateSystem;
      if (i && i.clampData) {
        var o = i.clampData(t), s = i.dataToPoint(o);
        if (n)
          C(i.getAxes(), function(v, c) {
            if (v.type === "category" && a != null) {
              var p = v.getTicksCoords(), d = o[c], g = a[c] === "x1" || a[c] === "y1";
              if (g && (d += 1), p.length < 2)
                return;
              if (p.length === 2) {
                s[c] = v.toGlobalCoord(v.getExtent()[g ? 1 : 0]);
                return;
              }
              for (var y = void 0, m = void 0, _ = 1, S = 0; S < p.length; S++) {
                var w = p[S].coord, x = S === p.length - 1 ? p[S - 1].tickValue + _ : p[S].tickValue;
                if (x === d) {
                  m = w;
                  break;
                } else if (x < d)
                  y = w;
                else if (y != null && x > d) {
                  m = (w + y) / 2;
                  break;
                }
                S === 1 && (_ = x - p[0].tickValue);
              }
              m == null && (y ? y && (m = p[p.length - 1].coord) : m = p[0].coord), s[c] = v.toGlobalCoord(m);
            }
          });
        else {
          var l = this.getData(), u = l.getLayout("offset"), f = l.getLayout("size"), h = i.getBaseAxis().isHorizontal() ? 0 : 1;
          s[h] += u + f / 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;
  }(Gt)
);
Gt.registerClass(nM);
const kf = nM;
var v5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.getInitialData = function() {
      return xa(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 t = this.get("progressiveThreshold"), a = this.get("largeThreshold");
      return a > t && (t = a), t;
    }, e.prototype.brushSelector = function(t, a, n) {
      return n.rect(a.getItemLayout(t));
    }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = sn(kf.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;
  }(kf)
);
const c5 = v5;
var p5 = (
  /** @class */
  function() {
    function r() {
      this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
    }
    return r;
  }()
), d5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "sausage", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new p5();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.cx, i = a.cy, o = Math.max(a.r0 || 0, 0), s = Math.max(a.r, 0), l = (s - o) * 0.5, u = o + l, f = a.startAngle, h = a.endAngle, v = a.clockwise, c = Math.PI * 2, p = v ? h - f < c : f - h < c;
      p || (f = h - (v ? c : -c));
      var d = Math.cos(f), g = Math.sin(f), y = Math.cos(h), m = Math.sin(h);
      p ? (t.moveTo(d * o + n, g * o + i), t.arc(d * u + n, g * u + i, l, -Math.PI + f, f, !v)) : t.moveTo(d * s + n, g * s + i), t.arc(n, i, s, f, h, !v), t.arc(y * u + n, m * u + i, l, h - Math.PI * 2, h - Math.PI, !v), o !== 0 && t.arc(n, i, o, h, f, v);
    }, e;
  }(gt)
);
const Vf = d5;
function g5(r, e) {
  e = e || {};
  var t = e.isRoundCap;
  return function(a, n, i) {
    var o = n.position;
    if (!o || o instanceof Array)
      return hf(a, n, i);
    var s = r(o), l = n.distance != null ? n.distance : 5, u = this.shape, f = u.cx, h = u.cy, v = u.r, c = u.r0, p = (v + c) / 2, d = u.startAngle, g = u.endAngle, y = (d + g) / 2, m = t ? Math.abs(v - c) / 2 : 0, _ = Math.cos, S = Math.sin, w = f + v * _(d), x = h + v * S(d), b = "left", T = "top";
    switch (s) {
      case "startArc":
        w = f + (c - l) * _(y), x = h + (c - l) * S(y), b = "center", T = "top";
        break;
      case "insideStartArc":
        w = f + (c + l) * _(y), x = h + (c + l) * S(y), b = "center", T = "bottom";
        break;
      case "startAngle":
        w = f + p * _(d) + pu(d, l + m, !1), x = h + p * S(d) + du(d, l + m, !1), b = "right", T = "middle";
        break;
      case "insideStartAngle":
        w = f + p * _(d) + pu(d, -l + m, !1), x = h + p * S(d) + du(d, -l + m, !1), b = "left", T = "middle";
        break;
      case "middle":
        w = f + p * _(y), x = h + p * S(y), b = "center", T = "middle";
        break;
      case "endArc":
        w = f + (v + l) * _(y), x = h + (v + l) * S(y), b = "center", T = "bottom";
        break;
      case "insideEndArc":
        w = f + (v - l) * _(y), x = h + (v - l) * S(y), b = "center", T = "top";
        break;
      case "endAngle":
        w = f + p * _(g) + pu(g, l + m, !0), x = h + p * S(g) + du(g, l + m, !0), b = "left", T = "middle";
        break;
      case "insideEndAngle":
        w = f + p * _(g) + pu(g, -l + m, !0), x = h + p * S(g) + du(g, -l + m, !0), b = "right", T = "middle";
        break;
      default:
        return hf(a, n, i);
    }
    return a = a || {}, a.x = w, a.y = x, a.align = b, a.verticalAlign = T, a;
  };
}
function y5(r, e, t, a) {
  if (Ct(a)) {
    r.setTextConfig({
      rotation: a
    });
    return;
  } else if (z(e)) {
    r.setTextConfig({
      rotation: 0
    });
    return;
  }
  var n = r.shape, i = n.clockwise ? n.startAngle : n.endAngle, o = n.clockwise ? n.endAngle : n.startAngle, s = (i + o) / 2, l, u = t(e);
  switch (u) {
    case "startArc":
    case "insideStartArc":
    case "middle":
    case "insideEndArc":
    case "endArc":
      l = s;
      break;
    case "startAngle":
    case "insideStartAngle":
      l = i;
      break;
    case "endAngle":
    case "insideEndAngle":
      l = o;
      break;
    default:
      r.setTextConfig({
        rotation: 0
      });
      return;
  }
  var f = Math.PI * 1.5 - l;
  u === "middle" && f > Math.PI / 2 && f < Math.PI * 1.5 && (f -= Math.PI), r.setTextConfig({
    rotation: f
  });
}
function pu(r, e, t) {
  return e * Math.sin(r) * (t ? -1 : 1);
}
function du(r, e, t) {
  return e * Math.cos(r) * (t ? 1 : -1);
}
function jn(r, e, t) {
  var a = r.get("borderRadius");
  if (a == null)
    return t ? {
      cornerRadius: 0
    } : null;
  z(a) || (a = [a, a, a, a]);
  var n = Math.abs(e.r || 0 - e.r0 || 0);
  return {
    cornerRadius: G(a, function(i) {
      return Tr(i, n);
    })
  };
}
var fc = Math.max, hc = Math.min;
function m5(r, e) {
  var t = r.getArea && r.getArea();
  if (Si(r, "cartesian2d")) {
    var a = r.getBaseAxis();
    if (a.type !== "category" || !a.onBand) {
      var n = e.getLayout("bandWidth");
      a.isHorizontal() ? (t.x -= n, t.width += n * 2) : (t.y -= n, t.height += n * 2);
    }
  }
  return t;
}
var _5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r.call(this) || this;
      return t.type = e.type, t._isFirstFrame = !0, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      this._model = t, this._removeOnRenderedListener(n), this._updateDrawMode(t);
      var o = t.get("coordinateSystem");
      o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(t, a, n) : this._renderNormal(t, a, n, i)) : {}.NODE_ENV !== "production" && Ft("Only cartesian2d and polar supported for bar.");
    }, e.prototype.incrementalPrepareRender = function(t) {
      this._clear(), this._updateDrawMode(t), this._updateLargeClip(t);
    }, e.prototype.incrementalRender = function(t, a) {
      this._progressiveEls = [], this._incrementalRenderLarge(t, a);
    }, e.prototype.eachRendered = function(t) {
      on(this._progressiveEls || this.group, t);
    }, e.prototype._updateDrawMode = function(t) {
      var a = t.pipelineContext.large;
      (this._isLargeDraw == null || a !== this._isLargeDraw) && (this._isLargeDraw = a, this._clear());
    }, e.prototype._renderNormal = function(t, a, n, i) {
      var o = this.group, s = t.getData(), l = this._data, u = t.coordinateSystem, f = u.getBaseAxis(), h;
      u.type === "cartesian2d" ? h = f.isHorizontal() : u.type === "polar" && (h = f.dim === "angle");
      var v = t.isAnimationEnabled() ? t : null, c = S5(t, u);
      c && this._enableRealtimeSort(c, s, n);
      var p = t.get("clip", !0) || c, d = m5(u, s);
      o.removeClipPath();
      var g = t.get("roundCap", !0), y = t.get("showBackground", !0), m = t.getModel("backgroundStyle"), _ = m.get("borderRadius") || 0, S = [], w = this._backgroundEls, x = i && i.isInitSort, b = i && i.type === "changeAxisOrder";
      function T(M) {
        var I = gu[u.type](s, M), L = A5(u, h, I);
        return L.useStyle(m.getItemStyle()), u.type === "cartesian2d" ? L.setShape("r", _) : L.setShape("cornerRadius", _), S[M] = L, L;
      }
      s.diff(l).add(function(M) {
        var I = s.getItemModel(M), L = gu[u.type](s, M, I);
        if (y && T(M), !(!s.hasValue(M) || !R1[u.type](L))) {
          var E = !1;
          p && (E = I1[u.type](d, L));
          var P = L1[u.type](t, s, M, L, h, v, f.model, !1, g);
          c && (P.forceLabelAnimation = !0), N1(P, s, M, I, L, t, h, u.type === "polar"), x ? P.attr({
            shape: L
          }) : c ? E1(c, v, P, L, M, h, !1, !1) : Bt(P, {
            shape: L
          }, t, M), s.setItemGraphicEl(M, P), o.add(P), P.ignore = E;
        }
      }).update(function(M, I) {
        var L = s.getItemModel(M), E = gu[u.type](s, M, L);
        if (y) {
          var P = void 0;
          w.length === 0 ? P = T(I) : (P = w[I], P.useStyle(m.getItemStyle()), u.type === "cartesian2d" ? P.setShape("r", _) : P.setShape("cornerRadius", _), S[M] = P);
          var R = gu[u.type](s, M), k = oM(h, R, u);
          Mt(P, {
            shape: k
          }, v, M);
        }
        var O = l.getItemGraphicEl(I);
        if (!s.hasValue(M) || !R1[u.type](E)) {
          o.remove(O);
          return;
        }
        var B = !1;
        if (p && (B = I1[u.type](d, E), B && o.remove(O)), O ? Cr(O) : O = L1[u.type](t, s, M, E, h, v, f.model, !!O, g), c && (O.forceLabelAnimation = !0), b) {
          var F = O.getTextContent();
          if (F) {
            var W = Co(F);
            W.prevValue != null && (W.prevValue = W.value);
          }
        } else
          N1(O, s, M, L, E, t, h, u.type === "polar");
        x ? O.attr({
          shape: E
        }) : c ? E1(c, v, O, E, M, h, !0, b) : Mt(O, {
          shape: E
        }, t, M, null), s.setItemGraphicEl(M, O), O.ignore = B, o.add(O);
      }).remove(function(M) {
        var I = l.getItemGraphicEl(M);
        I && Us(I, t, M);
      }).execute();
      var D = this._backgroundGroup || (this._backgroundGroup = new nt());
      D.removeAll();
      for (var A = 0; A < S.length; ++A)
        D.add(S[A]);
      o.add(D), this._backgroundEls = S, this._data = s;
    }, e.prototype._renderLarge = function(t, a, n) {
      this._clear(), k1(t, this.group), this._updateLargeClip(t);
    }, e.prototype._incrementalRenderLarge = function(t, a) {
      this._removeBackground(), k1(a, this.group, this._progressiveEls, !0);
    }, e.prototype._updateLargeClip = function(t) {
      var a = t.get("clip", !0) && Bh(t.coordinateSystem, !1, t), n = this.group;
      a ? n.setClipPath(a) : n.removeClipPath();
    }, e.prototype._enableRealtimeSort = function(t, a, n) {
      var i = this;
      if (a.count()) {
        var o = t.baseAxis;
        if (this._isFirstFrame)
          this._dispatchInitSort(a, t, n), this._isFirstFrame = !1;
        else {
          var s = function(l) {
            var u = a.getItemGraphicEl(l), f = u && u.shape;
            return f && // 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() ? f.height : f.width) || 0;
          };
          this._onRendered = function() {
            i._updateSortWithinSameData(a, s, o, n);
          }, n.getZr().on("rendered", this._onRendered);
        }
      }
    }, e.prototype._dataSort = function(t, a, n) {
      var i = [];
      return t.each(t.mapDimension(a.dim), function(o, s) {
        var l = n(s);
        l = l ?? NaN, i.push({
          dataIndex: s,
          mappedValue: l,
          ordinalNumber: o
        });
      }), i.sort(function(o, s) {
        return s.mappedValue - o.mappedValue;
      }), {
        ordinalNumbers: G(i, function(o) {
          return o.ordinalNumber;
        })
      };
    }, e.prototype._isOrderChangedWithinSameData = function(t, a, n) {
      for (var i = n.scale, o = t.mapDimension(n.dim), s = Number.MAX_VALUE, l = 0, u = i.getOrdinalMeta().categories.length; l < u; ++l) {
        var f = t.rawIndexOf(o, i.getRawOrdinalNumber(l)), h = f < 0 ? Number.MIN_VALUE : a(t.indexOfRawIndex(f));
        if (h > s)
          return !0;
        s = h;
      }
      return !1;
    }, e.prototype._isOrderDifferentInView = function(t, a) {
      for (var n = a.scale, i = n.getExtent(), o = Math.max(0, i[0]), s = Math.min(i[1], n.getOrdinalMeta().categories.length - 1); o <= s; ++o)
        if (t.ordinalNumbers[o] !== n.getRawOrdinalNumber(o))
          return !0;
    }, e.prototype._updateSortWithinSameData = function(t, a, n, i) {
      if (this._isOrderChangedWithinSameData(t, a, n)) {
        var o = this._dataSort(t, n, a);
        this._isOrderDifferentInView(o, n) && (this._removeOnRenderedListener(i), i.dispatchAction({
          type: "changeAxisOrder",
          componentType: n.dim + "Axis",
          axisId: n.index,
          sortInfo: o
        }));
      }
    }, e.prototype._dispatchInitSort = function(t, a, n) {
      var i = a.baseAxis, o = this._dataSort(t, i, function(s) {
        return t.get(t.mapDimension(a.otherAxis.dim), s);
      });
      n.dispatchAction({
        type: "changeAxisOrder",
        componentType: i.dim + "Axis",
        isInitSort: !0,
        axisId: i.index,
        sortInfo: o
      });
    }, e.prototype.remove = function(t, a) {
      this._clear(this._model), this._removeOnRenderedListener(a);
    }, e.prototype.dispose = function(t, a) {
      this._removeOnRenderedListener(a);
    }, e.prototype._removeOnRenderedListener = function(t) {
      this._onRendered && (t.getZr().off("rendered", this._onRendered), this._onRendered = null);
    }, e.prototype._clear = function(t) {
      var a = this.group, n = this._data;
      t && t.isAnimationEnabled() && n && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], n.eachItemGraphicEl(function(i) {
        Us(i, t, it(i).dataIndex);
      })) : a.removeAll(), this._data = null, this._isFirstFrame = !0;
    }, e.prototype._removeBackground = function() {
      this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
    }, e.type = "bar", e;
  }(Vt)
), I1 = {
  cartesian2d: function(r, e) {
    var t = e.width < 0 ? -1 : 1, a = e.height < 0 ? -1 : 1;
    t < 0 && (e.x += e.width, e.width = -e.width), a < 0 && (e.y += e.height, e.height = -e.height);
    var n = r.x + r.width, i = r.y + r.height, o = fc(e.x, r.x), s = hc(e.x + e.width, n), l = fc(e.y, r.y), u = hc(e.y + e.height, i), f = s < o, h = u < l;
    return e.x = f && o > n ? s : o, e.y = h && l > i ? u : l, e.width = f ? 0 : s - o, e.height = h ? 0 : u - l, t < 0 && (e.x += e.width, e.width = -e.width), a < 0 && (e.y += e.height, e.height = -e.height), f || h;
  },
  polar: function(r, e) {
    var t = e.r0 <= e.r ? 1 : -1;
    if (t < 0) {
      var a = e.r;
      e.r = e.r0, e.r0 = a;
    }
    var n = hc(e.r, r.r), i = fc(e.r0, r.r0);
    e.r = n, e.r0 = i;
    var o = n - i < 0;
    if (t < 0) {
      var a = e.r;
      e.r = e.r0, e.r0 = a;
    }
    return o;
  }
}, L1 = {
  cartesian2d: function(r, e, t, a, n, i, o, s, l) {
    var u = new bt({
      shape: V({}, a),
      z2: 1
    });
    if (u.__dataIndex = t, u.name = "item", i) {
      var f = u.shape, h = n ? "height" : "width";
      f[h] = 0;
    }
    return u;
  },
  polar: function(r, e, t, a, n, i, o, s, l) {
    var u = !n && l ? Vf : Ve, f = new u({
      shape: a,
      z2: 1
    });
    f.name = "item";
    var h = iM(n);
    if (f.calculateTextPosition = g5(h, {
      isRoundCap: u === Vf
    }), i) {
      var v = f.shape, c = n ? "r" : "endAngle", p = {};
      v[c] = n ? a.r0 : a.startAngle, p[c] = a[c], (s ? Mt : Bt)(f, {
        shape: p
        // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
      }, i);
    }
    return f;
  }
};
function S5(r, e) {
  var t = r.get("realtimeSort", !0), a = e.getBaseAxis();
  if ({}.NODE_ENV !== "production" && t && (a.type !== "category" && Ft("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && Ft("`realtimeSort` will not work because this bar series is not on cartesian2d.")), t && a.type === "category" && e.type === "cartesian2d")
    return {
      baseAxis: a,
      otherAxis: e.getOtherAxis(a)
    };
}
function E1(r, e, t, a, n, i, o, s) {
  var l, u;
  i ? (u = {
    x: a.x,
    width: a.width
  }, l = {
    y: a.y,
    height: a.height
  }) : (u = {
    y: a.y,
    height: a.height
  }, l = {
    x: a.x,
    width: a.width
  }), s || (o ? Mt : Bt)(t, {
    shape: l
  }, e, n, null);
  var f = e ? r.baseAxis.model : null;
  (o ? Mt : Bt)(t, {
    shape: u
  }, f, n);
}
function P1(r, e) {
  for (var t = 0; t < e.length; t++)
    if (!isFinite(r[e[t]]))
      return !0;
  return !1;
}
var x5 = ["x", "y", "width", "height"], w5 = ["cx", "cy", "r", "startAngle", "endAngle"], R1 = {
  cartesian2d: function(r) {
    return !P1(r, x5);
  },
  polar: function(r) {
    return !P1(r, w5);
  }
}, gu = {
  // itemModel is only used to get borderWidth, which is not needed
  // when calculating bar background layout.
  cartesian2d: function(r, e, t) {
    var a = r.getItemLayout(e), n = t ? T5(t, a) : 0, i = a.width > 0 ? 1 : -1, o = a.height > 0 ? 1 : -1;
    return {
      x: a.x + i * n / 2,
      y: a.y + o * n / 2,
      width: a.width - i * n,
      height: a.height - o * n
    };
  },
  polar: function(r, e, t) {
    var a = r.getItemLayout(e);
    return {
      cx: a.cx,
      cy: a.cy,
      r0: a.r0,
      r: a.r,
      startAngle: a.startAngle,
      endAngle: a.endAngle,
      clockwise: a.clockwise
    };
  }
};
function b5(r) {
  return r.startAngle != null && r.endAngle != null && r.startAngle === r.endAngle;
}
function iM(r) {
  return function(e) {
    var t = e ? "Arc" : "Angle";
    return function(a) {
      switch (a) {
        case "start":
        case "insideStart":
        case "end":
        case "insideEnd":
          return a + t;
        default:
          return a;
      }
    };
  }(r);
}
function N1(r, e, t, a, n, i, o, s) {
  var l = e.getItemVisual(t, "style");
  if (s) {
    if (!i.get("roundCap")) {
      var f = r.shape, h = jn(a.getModel("itemStyle"), f, !0);
      V(f, h), r.setShape(f);
    }
  } else {
    var u = a.get(["itemStyle", "borderRadius"]) || 0;
    r.setShape("r", u);
  }
  r.useStyle(l);
  var v = a.getShallow("cursor");
  v && r.attr("cursor", v);
  var c = s ? o ? n.r >= n.r0 ? "endArc" : "startArc" : n.endAngle >= n.startAngle ? "endAngle" : "startAngle" : o ? n.height >= 0 ? "bottom" : "top" : n.width >= 0 ? "right" : "left", p = ie(a);
  pe(r, p, {
    labelFetcher: i,
    labelDataIndex: t,
    defaultText: co(i.getData(), t),
    inheritColor: l.fill,
    defaultOpacity: l.opacity,
    defaultOutsidePosition: c
  });
  var d = r.getTextContent();
  if (s && d) {
    var g = a.get(["label", "position"]);
    r.textConfig.inside = g === "middle" ? !0 : null, y5(r, g === "outside" ? c : g, iM(o), a.get(["label", "rotate"]));
  }
  xD(d, p, i.getRawValue(t), function(m) {
    return qA(e, m);
  });
  var y = a.getModel(["emphasis"]);
  Wt(r, y.get("focus"), y.get("blurScope"), y.get("disabled")), ce(r, a), b5(n) && (r.style.fill = "none", r.style.stroke = "none", C(r.states, function(m) {
    m.style && (m.style.fill = m.style.stroke = "none");
  }));
}
function T5(r, e) {
  var t = r.get(["itemStyle", "borderColor"]);
  if (!t || t === "none")
    return 0;
  var a = r.get(["itemStyle", "borderWidth"]) || 0, n = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), i = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  return Math.min(a, n, i);
}
var D5 = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), O1 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "largeBar", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new D5();
    }, e.prototype.buildPath = function(t, a) {
      for (var n = a.points, i = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, f = 0; f < n.length; f += 3)
        l[i] = u, l[o] = n[f + 2], s[i] = n[f + i], s[o] = n[f + o], t.rect(s[0], s[1], l[0], l[1]);
    }, e;
  }(gt)
);
function k1(r, e, t, a) {
  var n = r.getData(), i = n.getLayout("valueAxisHorizontal") ? 1 : 0, o = n.getLayout("largeDataIndices"), s = n.getLayout("size"), l = r.getModel("backgroundStyle"), u = n.getLayout("largeBackgroundPoints");
  if (u) {
    var f = new O1({
      shape: {
        points: u
      },
      incremental: !!a,
      silent: !0,
      z2: 0
    });
    f.baseDimIdx = i, f.largeDataIndices = o, f.barWidth = s, f.useStyle(l.getItemStyle()), e.add(f), t && t.push(f);
  }
  var h = new O1({
    shape: {
      points: n.getLayout("largePoints")
    },
    incremental: !!a,
    ignoreCoarsePointer: !0,
    z2: 1
  });
  h.baseDimIdx = i, h.largeDataIndices = o, h.barWidth = s, e.add(h), h.useStyle(n.getVisual("style")), it(h).seriesIndex = r.seriesIndex, r.get("silent") || (h.on("mousedown", V1), h.on("mousemove", V1)), t && t.push(h);
}
var V1 = Qg(function(r) {
  var e = this, t = C5(e, r.offsetX, r.offsetY);
  it(e).dataIndex = t >= 0 ? t : null;
}, 30, !1);
function C5(r, e, t) {
  for (var a = r.baseDimIdx, n = 1 - a, i = r.shape.points, o = r.largeDataIndices, s = [], l = [], u = r.barWidth, f = 0, h = i.length / 3; f < h; f++) {
    var v = f * 3;
    if (l[a] = u, l[n] = i[v + 2], s[a] = i[v + a], s[n] = i[v + n], l[n] < 0 && (s[n] += l[n], l[n] = -l[n]), e >= s[0] && e <= s[0] + l[0] && t >= s[1] && t <= s[1] + l[1])
      return o[f];
  }
  return -1;
}
function oM(r, e, t) {
  if (Si(t, "cartesian2d")) {
    var a = e, n = t.getArea();
    return {
      x: r ? a.x : n.x,
      y: r ? n.y : a.y,
      width: r ? a.width : n.width,
      height: r ? n.height : a.height
    };
  } else {
    var n = t.getArea(), i = e;
    return {
      cx: n.cx,
      cy: n.cy,
      r0: r ? n.r0 : i.r0,
      r: r ? n.r : i.r,
      startAngle: r ? i.startAngle : 0,
      endAngle: r ? i.endAngle : Math.PI * 2
    };
  }
}
function A5(r, e, t) {
  var a = r.type === "polar" ? Ve : bt;
  return new a({
    shape: oM(e, t, r),
    silent: !0,
    z2: 0
  });
}
const M5 = _5;
function I5(r) {
  r.registerChartView(M5), r.registerSeriesModel(c5), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, ot(fA, "bar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, hA("bar")), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, aM("bar")), r.registerAction({
    type: "changeAxisOrder",
    event: "changeAxisOrder",
    update: "update"
  }, function(e, t) {
    var a = e.componentType || "series";
    t.eachComponent({
      mainType: a,
      query: e
    }, function(n) {
      e.sortInfo && n.axis.setCategorySortInfo(e.sortInfo);
    });
  });
}
var yu = Math.PI * 2, B1 = Math.PI / 180;
function sM(r, e) {
  return re(r.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function lM(r, e) {
  var t = sM(r, e), a = r.get("center"), n = r.get("radius");
  z(n) || (n = [0, n]);
  var i = H(t.width, e.getWidth()), o = H(t.height, e.getHeight()), s = Math.min(i, o), l = H(n[0], s / 2), u = H(n[1], s / 2), f, h, v = r.coordinateSystem;
  if (v) {
    var c = v.dataToPoint(a);
    f = c[0] || 0, h = c[1] || 0;
  } else
    z(a) || (a = [a, a]), f = H(a[0], i) + t.x, h = H(a[1], o) + t.y;
  return {
    cx: f,
    cy: h,
    r0: l,
    r: u
  };
}
function L5(r, e, t) {
  e.eachSeriesByType(r, function(a) {
    var n = a.getData(), i = n.mapDimension("value"), o = sM(a, t), s = lM(a, t), l = s.cx, u = s.cy, f = s.r, h = s.r0, v = -a.get("startAngle") * B1, c = a.get("minAngle") * B1, p = 0;
    n.each(i, function(A) {
      !isNaN(A) && p++;
    });
    var d = n.getSum(i), g = Math.PI / (d || p) * 2, y = a.get("clockwise"), m = a.get("roseType"), _ = a.get("stillShowZeroSum"), S = n.getDataExtent(i);
    S[0] = 0;
    var w = yu, x = 0, b = v, T = y ? 1 : -1;
    if (n.setLayout({
      viewRect: o,
      r: f
    }), n.each(i, function(A, M) {
      var I;
      if (isNaN(A)) {
        n.setItemLayout(M, {
          angle: NaN,
          startAngle: NaN,
          endAngle: NaN,
          clockwise: y,
          cx: l,
          cy: u,
          r0: h,
          r: m ? NaN : f
        });
        return;
      }
      m !== "area" ? I = d === 0 && _ ? g : A * g : I = yu / p, I < c ? (I = c, w -= c) : x += A;
      var L = b + T * I;
      n.setItemLayout(M, {
        angle: I,
        startAngle: b,
        endAngle: L,
        clockwise: y,
        cx: l,
        cy: u,
        r0: h,
        r: m ? Lt(A, S, [h, f]) : f
      }), b = L;
    }), w < yu && p)
      if (w <= 1e-3) {
        var D = yu / p;
        n.each(i, function(A, M) {
          if (!isNaN(A)) {
            var I = n.getItemLayout(M);
            I.angle = D, I.startAngle = v + T * M * D, I.endAngle = v + T * (M + 1) * D;
          }
        });
      } else
        g = w / x, b = v, n.each(i, function(A, M) {
          if (!isNaN(A)) {
            var I = n.getItemLayout(M), L = I.angle === c ? c : A * g;
            I.startAngle = b, I.endAngle = b + T * L, b += T * L;
          }
        });
  });
}
function Al(r) {
  return {
    seriesType: r,
    reset: function(e, t) {
      var a = t.findComponents({
        mainType: "legend"
      });
      if (!(!a || !a.length)) {
        var n = e.getData();
        n.filterSelf(function(i) {
          for (var o = n.getName(i), s = 0; s < a.length; s++)
            if (!a[s].isSelected(o))
              return !1;
          return !0;
        });
      }
    }
  };
}
var E5 = Math.PI / 180;
function z1(r, e, t, a, n, i, o, s, l, u) {
  if (r.length < 2)
    return;
  function f(d) {
    for (var g = d.rB, y = g * g, m = 0; m < d.list.length; m++) {
      var _ = d.list[m], S = Math.abs(_.label.y - t), w = a + _.len, x = w * w, b = Math.sqrt((1 - Math.abs(S * S / y)) * x), T = e + (b + _.len2) * n, D = T - _.label.x, A = _.targetTextWidth - D * n;
      uM(_, A, !0), _.label.x = T;
    }
  }
  function h(d) {
    for (var g = {
      list: [],
      maxY: 0
    }, y = {
      list: [],
      maxY: 0
    }, m = 0; m < d.length; m++)
      if (d[m].labelAlignTo === "none") {
        var _ = d[m], S = _.label.y > t ? y : g, w = Math.abs(_.label.y - t);
        if (w >= S.maxY) {
          var x = _.label.x - e - _.len2 * n, b = a + _.len, T = Math.abs(x) < b ? Math.sqrt(w * w / (1 - x * x / b / b)) : b;
          S.rB = T, S.maxY = w;
        }
        S.list.push(_);
      }
    f(g), f(y);
  }
  for (var v = r.length, c = 0; c < v; c++)
    if (r[c].position === "outer" && r[c].labelAlignTo === "labelLine") {
      var p = r[c].label.x - u;
      r[c].linePoints[1][0] += p, r[c].label.x = u;
    }
  RA(r, l, l + o) && h(r);
}
function P5(r, e, t, a, n, i, o, s) {
  for (var l = [], u = [], f = Number.MAX_VALUE, h = -Number.MAX_VALUE, v = 0; v < r.length; v++) {
    var c = r[v].label;
    vc(r[v]) || (c.x < e ? (f = Math.min(f, c.x), l.push(r[v])) : (h = Math.max(h, c.x), u.push(r[v])));
  }
  for (var v = 0; v < r.length; v++) {
    var p = r[v];
    if (!vc(p) && p.linePoints) {
      if (p.labelStyleWidth != null)
        continue;
      var c = p.label, d = p.linePoints, g = void 0;
      p.labelAlignTo === "edge" ? c.x < e ? g = d[2][0] - p.labelDistance - o - p.edgeDistance : g = o + n - p.edgeDistance - d[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? c.x < e ? g = f - o - p.bleedMargin : g = o + n - h - p.bleedMargin : c.x < e ? g = c.x - o - p.bleedMargin : g = o + n - c.x - p.bleedMargin, p.targetTextWidth = g, uM(p, g);
    }
  }
  z1(u, e, t, a, 1, n, i, o, s, h), z1(l, e, t, a, -1, n, i, o, s, f);
  for (var v = 0; v < r.length; v++) {
    var p = r[v];
    if (!vc(p) && p.linePoints) {
      var c = p.label, d = p.linePoints, y = p.labelAlignTo === "edge", m = c.style.padding, _ = m ? m[1] + m[3] : 0, S = c.style.backgroundColor ? 0 : _, w = p.rect.width + S, x = d[1][0] - d[2][0];
      y ? c.x < e ? d[2][0] = o + p.edgeDistance + w + p.labelDistance : d[2][0] = o + n - p.edgeDistance - w - p.labelDistance : (c.x < e ? d[2][0] = c.x + p.labelDistance : d[2][0] = c.x - p.labelDistance, d[1][0] = d[2][0] + x), d[1][1] = d[2][1] = c.y;
    }
  }
}
function uM(r, e, t) {
  if (t === void 0 && (t = !1), r.labelStyleWidth == null) {
    var a = r.label, n = a.style, i = r.rect, o = n.backgroundColor, s = n.padding, l = s ? s[1] + s[3] : 0, u = n.overflow, f = i.width + (o ? 0 : l);
    if (e < f || t) {
      var h = i.height;
      if (u && u.match("break")) {
        a.setStyle("backgroundColor", null), a.setStyle("width", e - l);
        var v = a.getBoundingRect();
        a.setStyle("width", Math.ceil(v.width)), a.setStyle("backgroundColor", o);
      } else {
        var c = e - l, p = e < f ? c : (
          // Current available width is enough, but the text may have
          // already been wrapped with a smaller available width.
          t ? c > r.unconstrainedWidth ? null : c : (
            // Current available width is enough, so no need to
            // constrain.
            null
          )
        );
        a.setStyle("width", p);
      }
      var d = a.getBoundingRect();
      i.width = d.width;
      var g = (a.style.margin || 0) + 2.1;
      i.height = d.height + g, i.y -= (i.height - h) / 2;
    }
  }
}
function vc(r) {
  return r.position === "center";
}
function R5(r) {
  var e = r.getData(), t = [], a, n, i = !1, o = (r.get("minShowLabelAngle") || 0) * E5, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, f = s.x, h = s.y, v = s.height;
  function c(x) {
    x.ignore = !0;
  }
  function p(x) {
    if (!x.ignore)
      return !0;
    for (var b in x.states)
      if (x.states[b].ignore === !1)
        return !0;
    return !1;
  }
  e.each(function(x) {
    var b = e.getItemGraphicEl(x), T = b.shape, D = b.getTextContent(), A = b.getTextGuideLine(), M = e.getItemModel(x), I = M.getModel("label"), L = I.get("position") || M.get(["emphasis", "label", "position"]), E = I.get("distanceToLabelLine"), P = I.get("alignTo"), R = H(I.get("edgeDistance"), u), k = I.get("bleedMargin"), O = M.getModel("labelLine"), B = O.get("length");
    B = H(B, u);
    var F = O.get("length2");
    if (F = H(F, u), Math.abs(T.endAngle - T.startAngle) < o) {
      C(D.states, c), D.ignore = !0, A && (C(A.states, c), A.ignore = !0);
      return;
    }
    if (p(D)) {
      var W = (T.startAngle + T.endAngle) / 2, Z = Math.cos(W), J = Math.sin(W), et, yt, At, dt;
      a = T.cx, n = T.cy;
      var at = L === "inside" || L === "inner";
      if (L === "center")
        et = T.cx, yt = T.cy, dt = "center";
      else {
        var mt = (at ? (T.r + T.r0) / 2 * Z : T.r * Z) + a, vt = (at ? (T.r + T.r0) / 2 * J : T.r * J) + n;
        if (et = mt + Z * 3, yt = vt + J * 3, !at) {
          var X = mt + Z * (B + l - T.r), st = vt + J * (B + l - T.r), zt = X + (Z < 0 ? -1 : 1) * F, xt = st;
          P === "edge" ? et = Z < 0 ? f + R : f + u - R : et = zt + (Z < 0 ? -E : E), yt = xt, At = [[mt, vt], [X, st], [zt, xt]];
        }
        dt = at ? "center" : P === "edge" ? Z > 0 ? "right" : "left" : Z > 0 ? "left" : "right";
      }
      var Ut = Math.PI, Ht = 0, ge = I.get("rotate");
      if (Ct(ge))
        Ht = ge * (Ut / 180);
      else if (L === "center")
        Ht = 0;
      else if (ge === "radial" || ge === !0) {
        var Qr = Z < 0 ? -W + Ut : -W;
        Ht = Qr;
      } else if (ge === "tangential" && L !== "outside" && L !== "outer") {
        var Ie = Math.atan2(Z, J);
        Ie < 0 && (Ie = Ut * 2 + Ie);
        var Pl = J > 0;
        Pl && (Ie = Ut + Ie), Ht = Ie - Ut;
      }
      if (i = !!Ht, D.x = et, D.y = yt, D.rotation = Ht, D.setStyle({
        verticalAlign: "middle"
      }), at) {
        D.setStyle({
          align: dt
        });
        var Yh = D.states.select;
        Yh && (Yh.x += D.x, Yh.y += D.y);
      } else {
        var ba = D.getBoundingRect().clone();
        ba.applyTransform(D.getComputedTransform());
        var dm = (D.style.margin || 0) + 2.1;
        ba.y -= dm / 2, ba.height += dm, t.push({
          label: D,
          labelLine: A,
          position: L,
          len: B,
          len2: F,
          minTurnAngle: O.get("minTurnAngle"),
          maxSurfaceAngle: O.get("maxSurfaceAngle"),
          surfaceNormal: new lt(Z, J),
          linePoints: At,
          textAlign: dt,
          labelDistance: E,
          labelAlignTo: P,
          edgeDistance: R,
          bleedMargin: k,
          rect: ba,
          unconstrainedWidth: ba.width,
          labelStyleWidth: D.style.width
        });
      }
      b.setTextConfig({
        inside: at
      });
    }
  }), !i && r.get("avoidLabelOverlap") && P5(t, a, n, l, u, v, f, h);
  for (var d = 0; d < t.length; d++) {
    var g = t[d], y = g.label, m = g.labelLine, _ = isNaN(y.x) || isNaN(y.y);
    if (y) {
      y.setStyle({
        align: g.textAlign
      }), _ && (C(y.states, c), y.ignore = !0);
      var S = y.states.select;
      S && (S.x += y.x, S.y += y.y);
    }
    if (m) {
      var w = g.linePoints;
      _ || !w ? (C(m.states, c), m.ignore = !0) : (LA(w, g.minTurnAngle), YB(w, g.surfaceNormal, g.maxSurfaceAngle), m.setShape({
        points: w
      }), y.__hostTarget.textGuideLineConfig = {
        anchor: new lt(w[0][0], w[0][1])
      });
    }
  }
}
var N5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this) || this;
      i.z2 = 2;
      var o = new Dt();
      return i.setTextContent(o), i.updateData(t, a, n, !0), i;
    }
    return e.prototype.updateData = function(t, a, n, i) {
      var o = this, s = t.hostModel, l = t.getItemModel(a), u = l.getModel("emphasis"), f = t.getItemLayout(a), h = V(jn(l.getModel("itemStyle"), f, !0), f);
      if (isNaN(h.startAngle)) {
        o.setShape(h);
        return;
      }
      if (i) {
        o.setShape(h);
        var v = s.getShallow("animationType");
        s.ecModel.ssr ? (Bt(o, {
          scaleX: 0,
          scaleY: 0
        }, s, {
          dataIndex: a,
          isFrom: !0
        }), o.originX = h.cx, o.originY = h.cy) : v === "scale" ? (o.shape.r = f.r0, Bt(o, {
          shape: {
            r: f.r
          }
        }, s, a)) : n != null ? (o.setShape({
          startAngle: n,
          endAngle: n
        }), Bt(o, {
          shape: {
            startAngle: f.startAngle,
            endAngle: f.endAngle
          }
        }, s, a)) : (o.shape.endAngle = f.startAngle, Mt(o, {
          shape: {
            endAngle: f.endAngle
          }
        }, s, a));
      } else
        Cr(o), Mt(o, {
          shape: h
        }, s, a);
      o.useStyle(t.getItemVisual(a, "style")), ce(o, l);
      var c = (f.startAngle + f.endAngle) / 2, p = s.get("selectedOffset"), d = Math.cos(c) * p, g = Math.sin(c) * p, y = l.getShallow("cursor");
      y && o.attr("cursor", y), this._updateLabel(s, t, a), o.ensureState("emphasis").shape = V({
        r: f.r + (u.get("scale") && u.get("scaleSize") || 0)
      }, jn(u.getModel("itemStyle"), f)), V(o.ensureState("select"), {
        x: d,
        y: g,
        shape: jn(l.getModel(["select", "itemStyle"]), f)
      }), V(o.ensureState("blur"), {
        shape: jn(l.getModel(["blur", "itemStyle"]), f)
      });
      var m = o.getTextGuideLine(), _ = o.getTextContent();
      m && V(m.ensureState("select"), {
        x: d,
        y: g
      }), V(_.ensureState("select"), {
        x: d,
        y: g
      }), Wt(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(t, a, n) {
      var i = this, o = a.getItemModel(n), s = o.getModel("labelLine"), l = a.getItemVisual(n, "style"), u = l && l.fill, f = l && l.opacity;
      pe(i, ie(o), {
        labelFetcher: a.hostModel,
        labelDataIndex: n,
        inheritColor: u,
        defaultOpacity: f,
        defaultText: t.getFormattedLabel(n, "normal") || a.getName(n)
      });
      var h = i.getTextContent();
      i.setTextConfig({
        // reset position, rotation
        position: null,
        rotation: null
      }), h.attr({
        z2: 10
      });
      var v = t.get(["label", "position"]);
      if (v !== "outside" && v !== "outer")
        i.removeTextGuideLine();
      else {
        var c = this.getTextGuideLine();
        c || (c = new ze(), this.setTextGuideLine(c)), vy(this, cy(o), {
          stroke: u,
          opacity: xr(s.get(["lineStyle", "opacity"]), f, 1)
        });
      }
    }, e;
  }(Ve)
), O5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.ignoreLabelLineUpdate = !0, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      var o = t.getData(), s = this._data, l = this.group, u;
      if (!s && o.count() > 0) {
        for (var f = o.getItemLayout(0), h = 1; isNaN(f && f.startAngle) && h < o.count(); ++h)
          f = o.getItemLayout(h);
        f && (u = f.startAngle);
      }
      if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && t.get("showEmptyCircle")) {
        var v = new Ve({
          shape: lM(t, n)
        });
        v.useStyle(t.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = v, l.add(v);
      }
      o.diff(s).add(function(c) {
        var p = new N5(o, c, u);
        o.setItemGraphicEl(c, p), l.add(p);
      }).update(function(c, p) {
        var d = s.getItemGraphicEl(p);
        d.updateData(o, c, u), d.off("click"), l.add(d), o.setItemGraphicEl(c, d);
      }).remove(function(c) {
        var p = s.getItemGraphicEl(c);
        Us(p, t, c);
      }).execute(), R5(t), t.get("animationTypeUpdate") !== "expansion" && (this._data = o);
    }, e.prototype.dispose = function() {
    }, e.prototype.containPoint = function(t, a) {
      var n = a.getData(), i = n.getItemLayout(0);
      if (i) {
        var o = t[0] - i.cx, s = t[1] - i.cy, l = Math.sqrt(o * o + s * s);
        return l <= i.r && l >= i.r0;
      }
    }, e.type = "pie", e;
  }(Vt)
);
const k5 = O5;
function ko(r, e, t) {
  e = z(e) && {
    coordDimensions: e
  } || V({
    encodeDefine: r.getEncode()
  }, e);
  var a = r.getSource(), n = xl(a, e).dimensions, i = new Ce(n, r);
  return i.initData(a, t), i;
}
var V5 = (
  /** @class */
  function() {
    function r(e, t) {
      this._getDataWithEncodedVisual = e, this._getRawData = t;
    }
    return r.prototype.getAllNames = function() {
      var e = this._getRawData();
      return e.mapArray(e.getName);
    }, r.prototype.containName = function(e) {
      var t = this._getRawData();
      return t.indexOfName(e) >= 0;
    }, r.prototype.indexOfName = function(e) {
      var t = this._getDataWithEncodedVisual();
      return t.indexOfName(e);
    }, r.prototype.getItemVisual = function(e, t) {
      var a = this._getDataWithEncodedVisual();
      return a.getItemVisual(e, t);
    }, r;
  }()
);
const Ml = V5;
var B5 = Tt(), z5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.init = function(t) {
      r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Ml(Y(this.getData, this), Y(this.getRawData, this)), this._defaultLabelLine(t);
    }, e.prototype.mergeOption = function() {
      r.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.getInitialData = function() {
      return ko(this, {
        coordDimensions: ["value"],
        encodeDefaulter: ot(Hg, this)
      });
    }, e.prototype.getDataParams = function(t) {
      var a = this.getData(), n = B5(a), i = n.seats;
      if (!i) {
        var o = [];
        a.each(a.mapDimension("value"), function(l) {
          o.push(l);
        }), i = n.seats = WE(o, a.hostModel.get("percentPrecision"));
      }
      var s = r.prototype.getDataParams.call(this, t);
      return s.percent = i[t] || 0, s.$vars.push("percent"), s;
    }, e.prototype._defaultLabelLine = function(t) {
      ui(t, "labelLine", ["show"]);
      var a = t.labelLine, n = t.emphasis.labelLine;
      a.show = a.show && t.label.show, n.show = n.show && t.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,
      // 最小角度改为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;
  }(Gt)
);
const G5 = z5;
function F5(r) {
  return {
    seriesType: r,
    reset: function(e, t) {
      var a = e.getData();
      a.filterSelf(function(n) {
        var i = a.mapDimension("value"), o = a.get(i, n);
        return !(Ct(o) && !isNaN(o) && o < 0);
      });
    }
  };
}
function H5(r) {
  r.registerChartView(k5), r.registerSeriesModel(G5), MC("pie", r.registerAction), r.registerLayout(ot(L5, "pie")), r.registerProcessor(Al("pie")), r.registerProcessor(F5("pie"));
}
var W5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return xa(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getProgressive = function() {
      var t = this.option.progressive;
      return t ?? (this.option.large ? 5e3 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var t = this.option.progressiveThreshold;
      return t ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
    }, e.prototype.brushSelector = function(t, a, n) {
      return n.point(a.getItemLayout(t));
    }, 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;
  }(Gt)
);
const $5 = W5;
var fM = 4, U5 = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), Y5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a._off = 0, a.hoverDataIdx = -1, a;
    }
    return e.prototype.getDefaultShape = function() {
      return new U5();
    }, e.prototype.reset = function() {
      this.notClear = !1, this._off = 0;
    }, e.prototype.buildPath = function(t, a) {
      var n = a.points, i = a.size, o = this.symbolProxy, s = o.shape, l = t.getContext ? t.getContext() : t, u = l && i[0] < fM, f = this.softClipShape, h;
      if (u) {
        this._ctx = l;
        return;
      }
      for (this._ctx = null, h = this._off; h < n.length; ) {
        var v = n[h++], c = n[h++];
        isNaN(v) || isNaN(c) || f && !f.contain(v, c) || (s.x = v - i[0] / 2, s.y = c - i[1] / 2, s.width = i[0], s.height = i[1], o.buildPath(t, s, !0));
      }
      this.incremental && (this._off = h, this.notClear = !0);
    }, e.prototype.afterBrush = function() {
      var t = this.shape, a = t.points, n = t.size, i = this._ctx, o = this.softClipShape, s;
      if (i) {
        for (s = this._off; s < a.length; ) {
          var l = a[s++], u = a[s++];
          isNaN(l) || isNaN(u) || o && !o.contain(l, u) || i.fillRect(l - n[0] / 2, u - n[1] / 2, n[0], n[1]);
        }
        this.incremental && (this._off = s, this.notClear = !0);
      }
    }, e.prototype.findDataIndex = function(t, a) {
      for (var n = this.shape, i = n.points, o = n.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = i.length / 2 - 1; u >= 0; u--) {
        var f = u * 2, h = i[f] - s / 2, v = i[f + 1] - l / 2;
        if (t >= h && a >= v && t <= h + s && a <= v + l)
          return u;
      }
      return -1;
    }, e.prototype.contain = function(t, a) {
      var n = this.transformCoordToLocal(t, a), i = this.getBoundingRect();
      if (t = n[0], a = n[1], i.contain(t, a)) {
        var o = this.hoverDataIdx = this.findDataIndex(t, a);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var t = this._rect;
      if (!t) {
        for (var a = this.shape, n = a.points, i = a.size, o = i[0], s = i[1], l = 1 / 0, u = 1 / 0, f = -1 / 0, h = -1 / 0, v = 0; v < n.length; ) {
          var c = n[v++], p = n[v++];
          l = Math.min(c, l), f = Math.max(c, f), u = Math.min(p, u), h = Math.max(p, h);
        }
        t = this._rect = new ht(l - o / 2, u - s / 2, f - l + o, h - u + s);
      }
      return t;
    }, e;
  }(gt)
), Z5 = (
  /** @class */
  function() {
    function r() {
      this.group = new nt();
    }
    return r.prototype.updateData = function(e, t) {
      this._clear();
      var a = this._create();
      a.setShape({
        points: e.getLayout("points")
      }), this._setCommon(a, e, t);
    }, r.prototype.updateLayout = function(e) {
      var t = e.getLayout("points");
      this.group.eachChild(function(a) {
        if (a.startIndex != null) {
          var n = (a.endIndex - a.startIndex) * 2, i = a.startIndex * 4 * 2;
          t = new Float32Array(t.buffer, i, n);
        }
        a.setShape("points", t), a.reset();
      });
    }, r.prototype.incrementalPrepareUpdate = function(e) {
      this._clear();
    }, r.prototype.incrementalUpdate = function(e, t, a) {
      var n = this._newAdded[0], i = t.getLayout("points"), o = n && n.shape.points;
      if (o && o.length < 2e4) {
        var s = o.length, l = new Float32Array(s + i.length);
        l.set(o), l.set(i, s), n.endIndex = e.end, n.setShape({
          points: l
        });
      } else {
        this._newAdded = [];
        var u = this._create();
        u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
          points: i
        }), this._setCommon(u, t, a);
      }
    }, r.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, r.prototype._create = function() {
      var e = new Y5({
        cursor: "default"
      });
      return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
    }, r.prototype._setCommon = function(e, t, a) {
      var n = t.hostModel;
      a = a || {};
      var i = t.getVisual("symbolSize");
      e.setShape("size", i instanceof Array ? i : [i, i]), e.softClipShape = a.clipShape || null, e.symbolProxy = Jt(t.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
      var o = e.shape.size[0] < fM;
      e.useStyle(
        // Draw shadow when doing fillRect is extremely slow.
        n.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
      );
      var s = t.getVisual("style"), l = s && s.fill;
      l && e.setColor(l);
      var u = it(e);
      u.seriesIndex = n.seriesIndex, e.on("mousemove", function(f) {
        u.dataIndex = null;
        var h = e.hoverDataIdx;
        h >= 0 && (u.dataIndex = h + (e.startIndex || 0));
      });
    }, r.prototype.remove = function() {
      this._clear();
    }, r.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, r;
  }()
);
const X5 = Z5;
var q5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this._updateSymbolDraw(i, t);
      o.updateData(i, {
        // 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(t)
      }), this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      var i = t.getData(), o = this._updateSymbolDraw(i, t);
      o.incrementalPrepareUpdate(i), this._finished = !1;
    }, e.prototype.incrementalRender = function(t, a, n) {
      this._symbolDraw.incrementalUpdate(t, a.getData(), {
        clipShape: this._getClipShape(a)
      }), this._finished = t.end === a.getData().count();
    }, e.prototype.updateTransform = function(t, a, n) {
      var i = t.getData();
      if (this.group.dirty(), !this._finished || i.count() > 1e4)
        return {
          update: !0
        };
      var o = Cl("").reset(t, a, n);
      o.progress && o.progress({
        start: 0,
        end: i.count(),
        count: i.count()
      }, i), this._symbolDraw.updateLayout(i);
    }, e.prototype.eachRendered = function(t) {
      this._symbolDraw && this._symbolDraw.eachRendered(t);
    }, e.prototype._getClipShape = function(t) {
      var a = t.coordinateSystem, n = a && a.getArea && a.getArea();
      return t.get("clip", !0) ? n : null;
    }, e.prototype._updateSymbolDraw = function(t, a) {
      var n = this._symbolDraw, i = a.pipelineContext, o = i.large;
      return (!n || o !== this._isLargeDraw) && (n && n.remove(), n = this._symbolDraw = o ? new X5() : new Dl(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(n.group), n;
    }, e.prototype.remove = function(t, a) {
      this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
    }, e.prototype.dispose = function() {
    }, e.type = "scatter", e;
  }(Vt)
);
const K5 = q5;
var j5 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.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;
  }(St)
);
const Q5 = j5;
var bd = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("grid", Qt).models[0];
    }, e.type = "cartesian2dAxis", e;
  }(St)
);
te(bd, bl);
var hM = {
  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)"]
    }
  }
}, J5 = ft({
  // 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"
  }
}, hM), my = ft({
  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
    }
  }
}, hM), tG = ft({
  splitNumber: 6,
  axisLabel: {
    // To eliminate labels that are not nice
    showMinLabel: !1,
    showMaxLabel: !1,
    rich: {
      primary: {
        fontWeight: "bold"
      }
    }
  },
  splitLine: {
    show: !1
  }
}, my), eG = tt({
  logBase: 10
}, my);
const vM = {
  category: J5,
  value: my,
  time: tG,
  log: eG
};
var rG = {
  value: 1,
  category: 1,
  time: 1,
  log: 1
};
function po(r, e, t, a) {
  C(rG, function(n, i) {
    var o = ft(ft({}, vM[i], !0), a, !0), s = (
      /** @class */
      function(l) {
        N(u, l);
        function u() {
          var f = l !== null && l.apply(this, arguments) || this;
          return f.type = e + "Axis." + i, f;
        }
        return u.prototype.mergeDefaultAndTheme = function(f, h) {
          var v = Xs(this), c = v ? Io(f) : {}, p = h.getTheme();
          ft(f, p.get(i + "Axis")), ft(f, this.getDefaultOption()), f.type = G1(f), v && Ja(f, c, v);
        }, u.prototype.optionUpdated = function() {
          var f = this.option;
          f.type === "category" && (this.__ordinalMeta = gd.createByAxisModel(this));
        }, u.prototype.getCategories = function(f) {
          var h = this.option;
          if (h.type === "category")
            return f ? h.data : this.__ordinalMeta.categories;
        }, u.prototype.getOrdinalMeta = function() {
          return this.__ordinalMeta;
        }, u.type = e + "Axis." + i, u.defaultOption = o, u;
      }(t)
    );
    r.registerComponentModel(s);
  }), r.registerSubTypeDefaulter(e + "Axis", G1);
}
function G1(r) {
  return r.type || (r.data ? "category" : "value");
}
var aG = (
  /** @class */
  function() {
    function r(e) {
      this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
    }
    return r.prototype.getAxis = function(e) {
      return this._axes[e];
    }, r.prototype.getAxes = function() {
      return G(this._dimList, function(e) {
        return this._axes[e];
      }, this);
    }, r.prototype.getAxesByScale = function(e) {
      return e = e.toLowerCase(), Et(this.getAxes(), function(t) {
        return t.scale.type === e;
      });
    }, r.prototype.addAxis = function(e) {
      var t = e.dim;
      this._axes[t] = e, this._dimList.push(t);
    }, r;
  }()
);
const nG = aG;
var Td = ["x", "y"];
function F1(r) {
  return r.type === "interval" || r.type === "time";
}
var iG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "cartesian2d", t.dimensions = Td, t;
    }
    return e.prototype.calcAffineTransform = function() {
      this._transform = this._invTransform = null;
      var t = this.getAxis("x").scale, a = this.getAxis("y").scale;
      if (!(!F1(t) || !F1(a))) {
        var n = t.getExtent(), i = a.getExtent(), o = this.dataToPoint([n[0], i[0]]), s = this.dataToPoint([n[1], i[1]]), l = n[1] - n[0], u = i[1] - i[0];
        if (!(!l || !u)) {
          var f = (s[0] - o[0]) / l, h = (s[1] - o[1]) / u, v = o[0] - n[0] * f, c = o[1] - i[0] * h, p = this._transform = [f, 0, 0, h, v, c];
          this._invTransform = xo([], p);
        }
      }
    }, e.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
    }, e.prototype.containPoint = function(t) {
      var a = this.getAxis("x"), n = this.getAxis("y");
      return a.contain(a.toLocalCoord(t[0])) && n.contain(n.toLocalCoord(t[1]));
    }, e.prototype.containData = function(t) {
      return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]);
    }, e.prototype.containZone = function(t, a) {
      var n = this.dataToPoint(t), i = this.dataToPoint(a), o = this.getArea(), s = new ht(n[0], n[1], i[0] - n[0], i[1] - n[1]);
      return o.intersect(s);
    }, e.prototype.dataToPoint = function(t, a, n) {
      n = n || [];
      var i = t[0], o = t[1];
      if (this._transform && i != null && isFinite(i) && o != null && isFinite(o))
        return fe(n, t, this._transform);
      var s = this.getAxis("x"), l = this.getAxis("y");
      return n[0] = s.toGlobalCoord(s.dataToCoord(i, a)), n[1] = l.toGlobalCoord(l.dataToCoord(o, a)), n;
    }, e.prototype.clampData = function(t, a) {
      var n = this.getAxis("x").scale, i = this.getAxis("y").scale, o = n.getExtent(), s = i.getExtent(), l = n.parse(t[0]), u = i.parse(t[1]);
      return a = a || [], a[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), a[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), a;
    }, e.prototype.pointToData = function(t, a) {
      var n = [];
      if (this._invTransform)
        return fe(n, t, this._invTransform);
      var i = this.getAxis("x"), o = this.getAxis("y");
      return n[0] = i.coordToData(i.toLocalCoord(t[0]), a), n[1] = o.coordToData(o.toLocalCoord(t[1]), a), n;
    }, e.prototype.getOtherAxis = function(t) {
      return this.getAxis(t.dim === "x" ? "y" : "x");
    }, e.prototype.getArea = function() {
      var t = this.getAxis("x").getGlobalExtent(), a = this.getAxis("y").getGlobalExtent(), n = Math.min(t[0], t[1]), i = Math.min(a[0], a[1]), o = Math.max(t[0], t[1]) - n, s = Math.max(a[0], a[1]) - i;
      return new ht(n, i, o, s);
    }, e;
  }(nG)
), oG = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i, o) {
      var s = r.call(this, t, a, n) || this;
      return s.index = 0, s.type = i || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var t = this.position;
      return t === "top" || t === "bottom";
    }, e.prototype.getGlobalExtent = function(t) {
      var a = this.getExtent();
      return a[0] = this.toGlobalCoord(a[0]), a[1] = this.toGlobalCoord(a[1]), t && a[0] > a[1] && a.reverse(), a;
    }, e.prototype.pointToData = function(t, a) {
      return this.coordToData(this.toLocalCoord(t[this.dim === "x" ? 0 : 1]), a);
    }, e.prototype.setCategorySortInfo = function(t) {
      if (this.type !== "category")
        return !1;
      this.model.option.categorySortInfo = t, this.scale.setSortInfo(t);
    }, e;
  }(Mr)
);
const sG = oG;
function Dd(r, e, t) {
  t = t || {};
  var a = r.coordinateSystem, n = e.axis, i = {}, o = n.getAxesOnZeroOf()[0], s = n.position, l = o ? "onZero" : s, u = n.dim, f = a.getRect(), h = [f.x, f.x + f.width, f.y, f.y + f.height], v = {
    left: 0,
    right: 1,
    top: 0,
    bottom: 1,
    onZero: 2
  }, c = e.get("offset") || 0, p = u === "x" ? [h[2] - c, h[3] + c] : [h[0] - c, h[1] + c];
  if (o) {
    var d = o.toGlobalCoord(o.dataToCoord(0));
    p[v.onZero] = Math.max(Math.min(d, p[1]), p[0]);
  }
  i.position = [u === "y" ? p[v[l]] : h[0], u === "x" ? p[v[l]] : h[3]], i.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
  var g = {
    top: -1,
    bottom: 1,
    left: -1,
    right: 1
  };
  i.labelDirection = i.tickDirection = i.nameDirection = g[s], i.labelOffset = o ? p[v[s]] - p[v.onZero] : 0, e.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), jt(t.labelInside, e.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
  var y = e.get(["axisLabel", "rotate"]);
  return i.labelRotate = l === "top" ? -y : y, i.z2 = 1, i;
}
function H1(r) {
  return r.get("coordinateSystem") === "cartesian2d";
}
function W1(r) {
  var e = {
    xAxisModel: null,
    yAxisModel: null
  };
  return C(e, function(t, a) {
    var n = a.replace(/Model$/, ""), i = r.getReferringComponents(n, Qt).models[0];
    if ({}.NODE_ENV !== "production" && !i)
      throw new Error(n + ' "' + xr(r.get(n + "Index"), r.get(n + "Id"), 0) + '" not found');
    e[a] = i;
  }), e;
}
var cc = Math.log;
function cM(r, e, t) {
  var a = en.prototype, n = a.getTicks.call(t), i = a.getTicks.call(t, !0), o = n.length - 1, s = a.getInterval.call(t), l = mA(r, e), u = l.extent, f = l.fixMin, h = l.fixMax;
  if (r.type === "log") {
    var v = cc(r.base);
    u = [cc(u[0]) / v, cc(u[1]) / v];
  }
  r.setExtent(u[0], u[1]), r.calcNiceExtent({
    splitNumber: o,
    fixMin: f,
    fixMax: h
  });
  var c = a.getExtent.call(r);
  f && (u[0] = c[0]), h && (u[1] = c[1]);
  var p = a.getInterval.call(r), d = u[0], g = u[1];
  if (f && h)
    p = (g - d) / o;
  else if (f)
    for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
      p = Jv(p), g = u[0] + p * o;
  else if (h)
    for (d = u[1] - p * o; d > u[0] && isFinite(d) && isFinite(u[0]); )
      p = Jv(p), d = u[1] - p * o;
  else {
    var y = r.getTicks().length - 1;
    y > o && (p = Jv(p));
    var m = p * o;
    g = Math.ceil(u[1] / p) * p, d = Yt(g - m), d < 0 && u[0] >= 0 ? (d = 0, g = Yt(m)) : g > 0 && u[1] <= 0 && (g = 0, d = -Yt(m));
  }
  var _ = (n[0].value - i[0].value) / s, S = (n[o].value - i[o].value) / s;
  if (a.setExtent.call(r, d + p * _, g + p * S), a.setInterval.call(r, p), (_ || S) && a.setNiceExtent.call(r, d + p, g - p), {}.NODE_ENV !== "production") {
    var w = a.getTicks.call(r);
    w[1] && (!jV(p) || Fp(w[1].value) > Fp(p)) && Ft(
      // eslint-disable-next-line
      "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
    );
  }
}
var lG = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = Td, this._initCartesian(e, t, a), this.model = e;
    }
    return r.prototype.getRect = function() {
      return this._rect;
    }, r.prototype.update = function(e, t) {
      var a = this._axesMap;
      this._updateScale(e, this.model);
      function n(o) {
        var s, l = _t(o), u = l.length;
        if (u) {
          for (var f = [], h = u - 1; h >= 0; h--) {
            var v = +l[h], c = o[v], p = c.model, d = c.scale;
            // Only value and log axis without interval support alignTicks.
            yd(d) && p.get("alignTicks") && p.get("interval") == null ? f.push(c) : (vo(d, p), yd(d) && (s = c));
          }
          f.length && (s || (s = f.pop(), vo(s.scale, s.model)), C(f, function(g) {
            cM(g.scale, g.model, s.scale);
          }));
        }
      }
      n(a.x), n(a.y);
      var i = {};
      C(a.x, function(o) {
        $1(a, "y", o, i);
      }), C(a.y, function(o) {
        $1(a, "x", o, i);
      }), this.resize(this.model, t);
    }, r.prototype.resize = function(e, t, a) {
      var n = e.getBoxLayoutParams(), i = !a && e.get("containLabel"), o = re(n, {
        width: t.getWidth(),
        height: t.getHeight()
      });
      this._rect = o;
      var s = this._axesList;
      l(), i && (C(s, function(u) {
        if (!u.model.get(["axisLabel", "inside"])) {
          var f = wB(u);
          if (f) {
            var h = u.isHorizontal() ? "height" : "width", v = u.model.get(["axisLabel", "margin"]);
            o[h] -= f[h] + v, u.position === "top" ? o.y += f.height + v : u.position === "left" && (o.x += f.width + v);
          }
        }
      }), l()), C(this._coordsList, function(u) {
        u.calcAffineTransform();
      });
      function l() {
        C(s, function(u) {
          var f = u.isHorizontal(), h = f ? [0, o.width] : [0, o.height], v = u.inverse ? 1 : 0;
          u.setExtent(h[v], h[1 - v]), uG(u, f ? o.x : o.y);
        });
      }
    }, r.prototype.getAxis = function(e, t) {
      var a = this._axesMap[e];
      if (a != null)
        return a[t || 0];
    }, r.prototype.getAxes = function() {
      return this._axesList.slice();
    }, r.prototype.getCartesian = function(e, t) {
      if (e != null && t != null) {
        var a = "x" + e + "y" + t;
        return this._coordsMap[a];
      }
      j(e) && (t = e.yAxisIndex, e = e.xAxisIndex);
      for (var n = 0, i = this._coordsList; n < i.length; n++)
        if (i[n].getAxis("x").index === e || i[n].getAxis("y").index === t)
          return i[n];
    }, r.prototype.getCartesians = function() {
      return this._coordsList.slice();
    }, r.prototype.convertToPixel = function(e, t, a) {
      var n = this._findConvertTarget(t);
      return n.cartesian ? n.cartesian.dataToPoint(a) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(a)) : null;
    }, r.prototype.convertFromPixel = function(e, t, a) {
      var n = this._findConvertTarget(t);
      return n.cartesian ? n.cartesian.pointToData(a) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(a)) : null;
    }, r.prototype._findConvertTarget = function(e) {
      var t = e.seriesModel, a = e.xAxisModel || t && t.getReferringComponents("xAxis", Qt).models[0], n = e.yAxisModel || t && t.getReferringComponents("yAxis", Qt).models[0], i = e.gridModel, o = this._coordsList, s, l;
      if (t)
        s = t.coordinateSystem, ct(o, s) < 0 && (s = null);
      else if (a && n)
        s = this.getCartesian(a.componentIndex, n.componentIndex);
      else if (a)
        l = this.getAxis("x", a.componentIndex);
      else if (n)
        l = this.getAxis("y", n.componentIndex);
      else if (i) {
        var u = i.coordinateSystem;
        u === this && (s = this._coordsList[0]);
      }
      return {
        cartesian: s,
        axis: l
      };
    }, r.prototype.containPoint = function(e) {
      var t = this._coordsList[0];
      if (t)
        return t.containPoint(e);
    }, r.prototype._initCartesian = function(e, t, a) {
      var n = this, i = this, o = {
        left: !1,
        right: !1,
        top: !1,
        bottom: !1
      }, s = {
        x: {},
        y: {}
      }, l = {
        x: 0,
        y: 0
      };
      if (t.eachComponent("xAxis", u("x"), this), t.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
        this._axesMap = {}, this._axesList = [];
        return;
      }
      this._axesMap = s, C(s.x, function(f, h) {
        C(s.y, function(v, c) {
          var p = "x" + h + "y" + c, d = new iG(p);
          d.master = n, d.model = e, n._coordsMap[p] = d, n._coordsList.push(d), d.addAxis(f), d.addAxis(v);
        });
      });
      function u(f) {
        return function(h, v) {
          if (pc(h, e)) {
            var c = h.get("position");
            f === "x" ? c !== "top" && c !== "bottom" && (c = o.bottom ? "top" : "bottom") : c !== "left" && c !== "right" && (c = o.left ? "right" : "left"), o[c] = !0;
            var p = new sG(f, kh(h), [0, 0], h.get("type"), c), d = p.type === "category";
            p.onBand = d && h.get("boundaryGap"), p.inverse = h.get("inverse"), h.axis = p, p.model = h, p.grid = i, p.index = v, i._axesList.push(p), s[f][v] = p, l[f]++;
          }
        };
      }
    }, r.prototype._updateScale = function(e, t) {
      C(this._axesList, function(n) {
        if (n.scale.setExtent(1 / 0, -1 / 0), n.type === "category") {
          var i = n.model.get("categorySortInfo");
          n.scale.setSortInfo(i);
        }
      }), e.eachSeries(function(n) {
        if (H1(n)) {
          var i = W1(n), o = i.xAxisModel, s = i.yAxisModel;
          if (!pc(o, t) || !pc(s, t))
            return;
          var l = this.getCartesian(o.componentIndex, s.componentIndex), u = n.getData(), f = l.getAxis("x"), h = l.getAxis("y");
          a(u, f), a(u, h);
        }
      }, this);
      function a(n, i) {
        C(Pf(n, i.dim), function(o) {
          i.scale.unionExtentFromData(n, o);
        });
      }
    }, r.prototype.getTooltipAxes = function(e) {
      var t = [], a = [];
      return C(this.getCartesians(), function(n) {
        var i = e != null && e !== "auto" ? n.getAxis(e) : n.getBaseAxis(), o = n.getOtherAxis(i);
        ct(t, i) < 0 && t.push(i), ct(a, o) < 0 && a.push(o);
      }), {
        baseAxes: t,
        otherAxes: a
      };
    }, r.create = function(e, t) {
      var a = [];
      return e.eachComponent("grid", function(n, i) {
        var o = new r(n, e, t);
        o.name = "grid_" + i, o.resize(n, t, !0), n.coordinateSystem = o, a.push(o);
      }), e.eachSeries(function(n) {
        if (H1(n)) {
          var i = W1(n), o = i.xAxisModel, s = i.yAxisModel, l = o.getCoordSysModel();
          if ({}.NODE_ENV !== "production") {
            if (!l)
              throw new Error('Grid "' + xr(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;
          n.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
        }
      }), a;
    }, r.dimensions = Td, r;
  }()
);
function pc(r, e) {
  return r.getCoordSysModel() === e;
}
function $1(r, e, t, a) {
  t.getAxesOnZeroOf = function() {
    return i ? [i] : [];
  };
  var n = r[e], i, o = t.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  if (!s)
    return;
  if (l != null)
    U1(n[l]) && (i = n[l]);
  else
    for (var u in n)
      if (n.hasOwnProperty(u) && U1(n[u]) && !a[f(n[u])]) {
        i = n[u];
        break;
      }
  i && (a[f(i)] = !0);
  function f(h) {
    return h.dim + "_" + h.index;
  }
}
function U1(r) {
  return r && r.type !== "category" && r.type !== "time" && xB(r);
}
function uG(r, e) {
  var t = r.getExtent(), a = t[0] + t[1];
  r.toGlobalCoord = r.dim === "x" ? function(n) {
    return n + e;
  } : function(n) {
    return a - n + e;
  }, r.toLocalCoord = r.dim === "x" ? function(n) {
    return n - e;
  } : function(n) {
    return a - n + e;
  };
}
const fG = lG;
var Ha = Math.PI, oi = (
  /** @class */
  function() {
    function r(e, t) {
      this.group = new nt(), this.opt = t, this.axisModel = e, tt(t, {
        labelOffset: 0,
        nameDirection: 1,
        tickDirection: 1,
        labelDirection: 1,
        silent: !0,
        handleAutoShown: function() {
          return !0;
        }
      });
      var a = new nt({
        x: t.position[0],
        y: t.position[1],
        rotation: t.rotation
      });
      a.updateTransform(), this._transformGroup = a;
    }
    return r.prototype.hasBuilder = function(e) {
      return !!Y1[e];
    }, r.prototype.add = function(e) {
      Y1[e](this.opt, this.axisModel, this.group, this._transformGroup);
    }, r.prototype.getGroup = function() {
      return this.group;
    }, r.innerTextLayout = function(e, t, a) {
      var n = pT(t - e), i, o;
      return vf(n) ? (o = a > 0 ? "top" : "bottom", i = "center") : vf(n - Ha) ? (o = a > 0 ? "bottom" : "top", i = "center") : (o = "middle", n > 0 && n < Ha ? i = a > 0 ? "right" : "left" : i = a > 0 ? "left" : "right"), {
        rotation: n,
        textAlign: i,
        textVerticalAlign: o
      };
    }, r.makeAxisEventDataBase = function(e) {
      var t = {
        componentType: e.mainType,
        componentIndex: e.componentIndex
      };
      return t[e.mainType + "Index"] = e.componentIndex, t;
    }, r.isLabelSilent = function(e) {
      var t = e.get("tooltip");
      return e.get("silent") || !(e.get("triggerEvent") || t && t.show);
    }, r;
  }()
), Y1 = {
  axisLine: function(r, e, t, a) {
    var n = e.get(["axisLine", "show"]);
    if (n === "auto" && r.handleAutoShown && (n = r.handleAutoShown("axisLine")), !!n) {
      var i = e.axis.getExtent(), o = a.transform, s = [i[0], 0], l = [i[1], 0], u = s[0] > l[0];
      o && (fe(s, s, o), fe(l, l, o));
      var f = V({
        lineCap: "round"
      }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), h = new le({
        shape: {
          x1: s[0],
          y1: s[1],
          x2: l[0],
          y2: l[1]
        },
        style: f,
        strokeContainThreshold: r.strokeContainThreshold || 5,
        silent: !0,
        z2: 1
      });
      uo(h.shape, h.style.lineWidth), h.anid = "line", t.add(h);
      var v = e.get(["axisLine", "symbol"]);
      if (v != null) {
        var c = e.get(["axisLine", "symbolSize"]);
        $(v) && (v = [v, v]), ($(c) || Ct(c)) && (c = [c, c]);
        var p = Oo(e.get(["axisLine", "symbolOffset"]) || 0, c), d = c[0], g = c[1];
        C([{
          rotate: r.rotation + Math.PI / 2,
          offset: p[0],
          r: 0
        }, {
          rotate: r.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(y, m) {
          if (v[m] !== "none" && v[m] != null) {
            var _ = Jt(v[m], -d / 2, -g / 2, d, g, f.stroke, !0), S = y.r + y.offset, w = u ? l : s;
            _.attr({
              rotation: y.rotate,
              x: w[0] + S * Math.cos(r.rotation),
              y: w[1] - S * Math.sin(r.rotation),
              silent: !0,
              z2: 11
            }), t.add(_);
          }
        });
      }
    }
  },
  axisTickLabel: function(r, e, t, a) {
    var n = cG(t, a, e, r), i = dG(t, a, e, r);
    if (vG(e, i, n), pG(t, a, e, r.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
      var o = EA(G(i, function(s) {
        return {
          label: s,
          priority: s.z2,
          defaultAttr: {
            ignore: s.ignore
          }
        };
      }));
      NA(o);
    }
  },
  axisName: function(r, e, t, a) {
    var n = jt(r.axisName, e.get("name"));
    if (n) {
      var i = e.get("nameLocation"), o = r.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), f = u[0] > u[1] ? -1 : 1, h = [
        i === "start" ? u[0] - f * l : i === "end" ? u[1] + f * l : (u[0] + u[1]) / 2,
        // Reuse labelOffset.
        X1(i) ? r.labelOffset + o * l : 0
      ], v, c = e.get("nameRotate");
      c != null && (c = c * Ha / 180);
      var p;
      X1(i) ? v = oi.innerTextLayout(
        r.rotation,
        c ?? r.rotation,
        // Adapt to axis.
        o
      ) : (v = hG(r.rotation, i, c || 0, u), p = r.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(v.rotation)), !isFinite(p) && (p = null)));
      var d = s.getFont(), g = e.get("nameTruncate", !0) || {}, y = g.ellipsis, m = jt(r.nameTruncateMaxWidth, g.maxWidth, p), _ = new Dt({
        x: h[0],
        y: h[1],
        rotation: v.rotation,
        silent: oi.isLabelSilent(e),
        style: Ot(s, {
          text: n,
          font: d,
          overflow: "truncate",
          width: m,
          ellipsis: y,
          fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          align: s.get("align") || v.textAlign,
          verticalAlign: s.get("verticalAlign") || v.textVerticalAlign
        }),
        z2: 1
      });
      if (Do({
        el: _,
        componentModel: e,
        itemName: n
      }), _.__fullText = n, _.anid = "name", e.get("triggerEvent")) {
        var S = oi.makeAxisEventDataBase(e);
        S.targetType = "axisName", S.name = n, it(_).eventData = S;
      }
      a.add(_), _.updateTransform(), t.add(_), _.decomposeTransform();
    }
  }
};
function hG(r, e, t, a) {
  var n = pT(t - r), i, o, s = a[0] > a[1], l = e === "start" && !s || e !== "start" && s;
  return vf(n - Ha / 2) ? (o = l ? "bottom" : "top", i = "center") : vf(n - Ha * 1.5) ? (o = l ? "top" : "bottom", i = "center") : (o = "middle", n < Ha * 1.5 && n > Ha / 2 ? i = l ? "left" : "right" : i = l ? "right" : "left"), {
    rotation: n,
    textAlign: i,
    textVerticalAlign: o
  };
}
function vG(r, e, t) {
  if (!_A(r.axis)) {
    var a = r.get(["axisLabel", "showMinLabel"]), n = r.get(["axisLabel", "showMaxLabel"]);
    e = e || [], t = t || [];
    var i = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = t[0], f = t[1], h = t[t.length - 1], v = t[t.length - 2];
    a === !1 ? (Xe(i), Xe(u)) : Z1(i, o) && (a ? (Xe(o), Xe(f)) : (Xe(i), Xe(u))), n === !1 ? (Xe(s), Xe(h)) : Z1(l, s) && (n ? (Xe(l), Xe(v)) : (Xe(s), Xe(h)));
  }
}
function Xe(r) {
  r && (r.ignore = !0);
}
function Z1(r, e) {
  var t = r && r.getBoundingRect().clone(), a = e && e.getBoundingRect().clone();
  if (!(!t || !a)) {
    var n = sh([]);
    return yi(n, n, -r.rotation), t.applyTransform(la([], n, r.getLocalTransform())), a.applyTransform(la([], n, e.getLocalTransform())), t.intersect(a);
  }
}
function X1(r) {
  return r === "middle" || r === "center";
}
function pM(r, e, t, a, n) {
  for (var i = [], o = [], s = [], l = 0; l < r.length; l++) {
    var u = r[l].coord;
    o[0] = u, o[1] = 0, s[0] = u, s[1] = t, e && (fe(o, o, e), fe(s, s, e));
    var f = new le({
      shape: {
        x1: o[0],
        y1: o[1],
        x2: s[0],
        y2: s[1]
      },
      style: a,
      z2: 2,
      autoBatch: !0,
      silent: !0
    });
    uo(f.shape, f.style.lineWidth), f.anid = n + "_" + r[l].tickValue, i.push(f);
  }
  return i;
}
function cG(r, e, t, a) {
  var n = t.axis, i = t.getModel("axisTick"), o = i.get("show");
  if (o === "auto" && a.handleAutoShown && (o = a.handleAutoShown("axisTick")), !(!o || n.scale.isBlank())) {
    for (var s = i.getModel("lineStyle"), l = a.tickDirection * i.get("length"), u = n.getTicksCoords(), f = pM(u, e.transform, l, tt(s.getLineStyle(), {
      stroke: t.get(["axisLine", "lineStyle", "color"])
    }), "ticks"), h = 0; h < f.length; h++)
      r.add(f[h]);
    return f;
  }
}
function pG(r, e, t, a) {
  var n = t.axis, i = t.getModel("minorTick");
  if (!(!i.get("show") || n.scale.isBlank())) {
    var o = n.getMinorTicksCoords();
    if (o.length)
      for (var s = i.getModel("lineStyle"), l = a * i.get("length"), u = tt(s.getLineStyle(), tt(t.getModel("axisTick").getLineStyle(), {
        stroke: t.get(["axisLine", "lineStyle", "color"])
      })), f = 0; f < o.length; f++)
        for (var h = pM(o[f], e.transform, l, u, "minorticks_" + f), v = 0; v < h.length; v++)
          r.add(h[v]);
  }
}
function dG(r, e, t, a) {
  var n = t.axis, i = jt(a.axisLabelShow, t.get(["axisLabel", "show"]));
  if (!(!i || n.scale.isBlank())) {
    var o = t.getModel("axisLabel"), s = o.get("margin"), l = n.getViewLabels(), u = (jt(a.labelRotate, o.get("rotate")) || 0) * Ha / 180, f = oi.innerTextLayout(a.rotation, u, a.labelDirection), h = t.getCategories && t.getCategories(!0), v = [], c = oi.isLabelSilent(t), p = t.get("triggerEvent");
    return C(l, function(d, g) {
      var y = n.scale.type === "ordinal" ? n.scale.getRawOrdinalNumber(d.tickValue) : d.tickValue, m = d.formattedLabel, _ = d.rawLabel, S = o;
      if (h && h[y]) {
        var w = h[y];
        j(w) && w.textStyle && (S = new kt(w.textStyle, o, t.ecModel));
      }
      var x = S.getTextColor() || t.get(["axisLine", "lineStyle", "color"]), b = n.dataToCoord(y), T = new Dt({
        x: b,
        y: a.labelOffset + a.labelDirection * s,
        rotation: f.rotation,
        silent: c,
        z2: 10 + (d.level || 0),
        style: Ot(S, {
          text: m,
          align: S.getShallow("align", !0) || f.textAlign,
          verticalAlign: S.getShallow("verticalAlign", !0) || S.getShallow("baseline", !0) || f.textVerticalAlign,
          fill: q(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.
            n.type === "category" ? _ : n.type === "value" ? y + "" : y,
            g
          ) : x
        })
      });
      if (T.anid = "label_" + y, p) {
        var D = oi.makeAxisEventDataBase(t);
        D.targetType = "axisLabel", D.value = _, D.tickIndex = g, n.type === "category" && (D.dataIndex = y), it(T).eventData = D;
      }
      e.add(T), T.updateTransform(), v.push(T), r.add(T), T.decomposeTransform();
    }), v;
  }
}
const ma = oi;
function gG(r, e) {
  var t = {
    /**
     * key: makeKey(axis.model)
     * value: {
     *      axis,
     *      coordSys,
     *      axisPointerModel,
     *      triggerTooltip,
     *      involveSeries,
     *      snap,
     *      seriesModels,
     *      seriesDataCount
     * }
     */
    axesInfo: {},
    seriesInvolved: !1,
    /**
     * key: makeKey(coordSys.model)
     * value: Object: key makeKey(axis.model), value: axisInfo
     */
    coordSysAxesInfo: {},
    coordSysMap: {}
  };
  return yG(t, r, e), t.seriesInvolved && _G(t, r), t;
}
function yG(r, e, t) {
  var a = e.getComponent("tooltip"), n = e.getComponent("axisPointer"), i = n.get("link", !0) || [], o = [];
  C(t.getCoordinateSystems(), function(s) {
    if (!s.axisPointerEnabled)
      return;
    var l = rl(s.model), u = r.coordSysAxesInfo[l] = {};
    r.coordSysMap[l] = s;
    var f = s.model, h = f.getModel("tooltip", a);
    if (C(s.getAxes(), ot(d, !1, null)), s.getTooltipAxes && a && h.get("show")) {
      var v = h.get("trigger") === "axis", c = h.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(h.get(["axisPointer", "axis"]));
      (v || c) && C(p.baseAxes, ot(d, c ? "cross" : !0, v)), c && C(p.otherAxes, ot(d, "cross", !1));
    }
    function d(g, y, m) {
      var _ = m.model.getModel("axisPointer", n), S = _.get("show");
      if (!(!S || S === "auto" && !g && !Cd(_))) {
        y == null && (y = _.get("triggerTooltip")), _ = g ? mG(m, h, n, e, g, y) : _;
        var w = _.get("snap"), x = rl(m.model), b = y || w || m.type === "category", T = r.axesInfo[x] = {
          key: x,
          axis: m,
          coordSys: s,
          axisPointerModel: _,
          triggerTooltip: y,
          involveSeries: b,
          snap: w,
          useHandle: Cd(_),
          seriesModels: [],
          linkGroup: null
        };
        u[x] = T, r.seriesInvolved = r.seriesInvolved || b;
        var D = SG(i, m);
        if (D != null) {
          var A = o[D] || (o[D] = {
            axesInfo: {}
          });
          A.axesInfo[x] = T, A.mapper = i[D].mapper, T.linkGroup = A;
        }
      }
    }
  });
}
function mG(r, e, t, a, n, i) {
  var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  C(s, function(v) {
    l[v] = rt(o.get(v));
  }), l.snap = r.type !== "category" && !!i, o.get("type") === "cross" && (l.type = "line");
  var u = l.label || (l.label = {});
  if (u.show == null && (u.show = !1), n === "cross") {
    var f = o.get(["label", "show"]);
    if (u.show = f ?? !0, !i) {
      var h = l.lineStyle = o.get("crossStyle");
      h && tt(u, h.textStyle);
    }
  }
  return r.model.getModel("axisPointer", new kt(l, t, a));
}
function _G(r, e) {
  e.eachSeries(function(t) {
    var a = t.coordinateSystem, n = t.get(["tooltip", "trigger"], !0), i = t.get(["tooltip", "show"], !0);
    !a || n === "none" || n === !1 || n === "item" || i === !1 || t.get(["axisPointer", "show"], !0) === !1 || C(r.coordSysAxesInfo[rl(a.model)], function(o) {
      var s = o.axis;
      a.getAxis(s.dim) === s && (o.seriesModels.push(t), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += t.getData().count());
    });
  });
}
function SG(r, e) {
  for (var t = e.model, a = e.dim, n = 0; n < r.length; n++) {
    var i = r[n] || {};
    if (dc(i[a + "AxisId"], t.id) || dc(i[a + "AxisIndex"], t.componentIndex) || dc(i[a + "AxisName"], t.name))
      return n;
  }
}
function dc(r, e) {
  return r === "all" || z(r) && ct(r, e) >= 0 || r === e;
}
function xG(r) {
  var e = _y(r);
  if (e) {
    var t = e.axisPointerModel, a = e.axis.scale, n = t.option, i = t.get("status"), o = t.get("value");
    o != null && (o = a.parse(o));
    var s = Cd(t);
    i == null && (n.status = s ? "show" : "hide");
    var l = a.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]), n.value = o, s && (n.status = e.axis.scale.isBlank() ? "hide" : "show");
  }
}
function _y(r) {
  var e = (r.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  return e && e.axesInfo[rl(r)];
}
function wG(r) {
  var e = _y(r);
  return e && e.axisPointerModel;
}
function Cd(r) {
  return !!r.get(["handle", "show"]);
}
function rl(r) {
  return r.type + "||" + r.id;
}
var gc = {}, bG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      this.axisPointerClass && xG(t), r.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(t, n, !0);
    }, e.prototype.updateAxisPointer = function(t, a, n, i) {
      this._doUpdateAxisPointerClass(t, n, !1);
    }, e.prototype.remove = function(t, a) {
      var n = this._axisPointer;
      n && n.remove(a);
    }, e.prototype.dispose = function(t, a) {
      this._disposeAxisPointer(a), r.prototype.dispose.apply(this, arguments);
    }, e.prototype._doUpdateAxisPointerClass = function(t, a, n) {
      var i = e.getAxisPointerClass(this.axisPointerClass);
      if (i) {
        var o = wG(t);
        o ? (this._axisPointer || (this._axisPointer = new i())).render(t, o, a, n) : this._disposeAxisPointer(a);
      }
    }, e.prototype._disposeAxisPointer = function(t) {
      this._axisPointer && this._axisPointer.dispose(t), this._axisPointer = null;
    }, e.registerAxisPointerClass = function(t, a) {
      if ({}.NODE_ENV !== "production" && gc[t])
        throw new Error("axisPointer " + t + " exists");
      gc[t] = a;
    }, e.getAxisPointerClass = function(t) {
      return t && gc[t];
    }, e.type = "axis", e;
  }($t)
);
const xi = bG;
var Ad = Tt();
function dM(r, e, t, a) {
  var n = t.axis;
  if (!n.scale.isBlank()) {
    var i = t.getModel("splitArea"), o = i.getModel("areaStyle"), s = o.get("color"), l = a.coordinateSystem.getRect(), u = n.getTicksCoords({
      tickModel: i,
      clamp: !0
    });
    if (u.length) {
      var f = s.length, h = Ad(r).splitAreaColors, v = K(), c = 0;
      if (h)
        for (var p = 0; p < u.length; p++) {
          var d = h.get(u[p].tickValue);
          if (d != null) {
            c = (d + (f - 1) * p) % f;
            break;
          }
        }
      var g = n.toGlobalCoord(u[0].coord), y = o.getAreaStyle();
      s = z(s) ? s : [s];
      for (var p = 1; p < u.length; p++) {
        var m = n.toGlobalCoord(u[p].coord), _ = void 0, S = void 0, w = void 0, x = void 0;
        n.isHorizontal() ? (_ = g, S = l.y, w = m - _, x = l.height, g = _ + w) : (_ = l.x, S = g, w = l.width, x = m - S, g = S + x);
        var b = u[p - 1].tickValue;
        b != null && v.set(b, c), e.add(new bt({
          anid: b != null ? "area_" + b : null,
          shape: {
            x: _,
            y: S,
            width: w,
            height: x
          },
          style: tt({
            fill: s[c]
          }, y),
          autoBatch: !0,
          silent: !0
        })), c = (c + 1) % f;
      }
      Ad(r).splitAreaColors = v;
    }
  }
}
function gM(r) {
  Ad(r).splitAreaColors = null;
}
var TG = ["axisLine", "axisTickLabel", "axisName"], DG = ["splitArea", "splitLine", "minorSplitLine"], yM = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.axisPointerClass = "CartesianAxisPointer", t;
    }
    return e.prototype.render = function(t, a, n, i) {
      this.group.removeAll();
      var o = this._axisGroup;
      if (this._axisGroup = new nt(), this.group.add(this._axisGroup), !!t.get("show")) {
        var s = t.getCoordSysModel(), l = Dd(s, t), u = new ma(t, V({
          handleAutoShown: function(h) {
            for (var v = s.coordinateSystem.getCartesians(), c = 0; c < v.length; c++)
              if (yd(v[c].getOtherAxis(t.axis).scale))
                return !0;
            return !1;
          }
        }, l));
        C(TG, u.add, u), this._axisGroup.add(u.getGroup()), C(DG, function(h) {
          t.get([h, "show"]) && CG[h](this, this._axisGroup, t, s);
        }, this);
        var f = i && i.type === "changeAxisOrder" && i.isInitSort;
        f || gl(o, this._axisGroup, t), r.prototype.render.call(this, t, a, n, i);
      }
    }, e.prototype.remove = function() {
      gM(this);
    }, e.type = "cartesianAxis", e;
  }(xi)
), CG = {
  splitLine: function(r, e, t, a) {
    var n = t.axis;
    if (!n.scale.isBlank()) {
      var i = t.getModel("splitLine"), o = i.getModel("lineStyle"), s = o.get("color");
      s = z(s) ? s : [s];
      for (var l = a.coordinateSystem.getRect(), u = n.isHorizontal(), f = 0, h = n.getTicksCoords({
        tickModel: i
      }), v = [], c = [], p = o.getLineStyle(), d = 0; d < h.length; d++) {
        var g = n.toGlobalCoord(h[d].coord);
        u ? (v[0] = g, v[1] = l.y, c[0] = g, c[1] = l.y + l.height) : (v[0] = l.x, v[1] = g, c[0] = l.x + l.width, c[1] = g);
        var y = f++ % s.length, m = h[d].tickValue, _ = new le({
          anid: m != null ? "line_" + h[d].tickValue : null,
          autoBatch: !0,
          shape: {
            x1: v[0],
            y1: v[1],
            x2: c[0],
            y2: c[1]
          },
          style: tt({
            stroke: s[y]
          }, p),
          silent: !0
        });
        uo(_.shape, p.lineWidth), e.add(_);
      }
    }
  },
  minorSplitLine: function(r, e, t, a) {
    var n = t.axis, i = t.getModel("minorSplitLine"), o = i.getModel("lineStyle"), s = a.coordinateSystem.getRect(), l = n.isHorizontal(), u = n.getMinorTicksCoords();
    if (u.length)
      for (var f = [], h = [], v = o.getLineStyle(), c = 0; c < u.length; c++)
        for (var p = 0; p < u[c].length; p++) {
          var d = n.toGlobalCoord(u[c][p].coord);
          l ? (f[0] = d, f[1] = s.y, h[0] = d, h[1] = s.y + s.height) : (f[0] = s.x, f[1] = d, h[0] = s.x + s.width, h[1] = d);
          var g = new le({
            anid: "minor_line_" + u[c][p].tickValue,
            autoBatch: !0,
            shape: {
              x1: f[0],
              y1: f[1],
              x2: h[0],
              y2: h[1]
            },
            style: v,
            silent: !0
          });
          uo(g.shape, v.lineWidth), e.add(g);
        }
  },
  splitArea: function(r, e, t, a) {
    dM(r, e, t, a);
  }
}, mM = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "xAxis", e;
  }(yM)
), AG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = mM.type, t;
    }
    return e.type = "yAxis", e;
  }(yM)
), MG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "grid", t;
    }
    return e.prototype.render = function(t, a) {
      this.group.removeAll(), t.get("show") && this.group.add(new bt({
        shape: t.coordinateSystem.getRect(),
        style: tt({
          fill: t.get("backgroundColor")
        }, t.getItemStyle()),
        silent: !0,
        z2: -1
      }));
    }, e.type = "grid", e;
  }($t)
), q1 = {
  // gridIndex: 0,
  // gridId: '',
  offset: 0
};
function _M(r) {
  r.registerComponentView(MG), r.registerComponentModel(Q5), r.registerCoordinateSystem("cartesian2d", fG), po(r, "x", bd, q1), po(r, "y", bd, q1), r.registerComponentView(mM), r.registerComponentView(AG), r.registerPreprocessor(function(e) {
    e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  });
}
function IG(r) {
  pt(_M), r.registerSeriesModel($5), r.registerChartView(K5), r.registerLayout(Cl("scatter"));
}
function LG(r) {
  r.eachSeriesByType("radar", function(e) {
    var t = e.getData(), a = [], n = e.coordinateSystem;
    if (n) {
      var i = n.getIndicatorAxes();
      C(i, function(o, s) {
        t.each(t.mapDimension(i[s].dim), function(l, u) {
          a[u] = a[u] || [];
          var f = n.dataToPoint(l, s);
          a[u][s] = K1(f) ? f : j1(n);
        });
      }), t.each(function(o) {
        var s = c2(a[o], function(l) {
          return K1(l);
        }) || j1(n);
        a[o].push(s.slice()), t.setItemLayout(o, a[o]);
      });
    }
  });
}
function K1(r) {
  return !isNaN(r[0]) && !isNaN(r[1]);
}
function j1(r) {
  return [r.cx, r.cy];
}
function EG(r) {
  var e = r.polar;
  if (e) {
    z(e) || (e = [e]);
    var t = [];
    C(e, function(a, n) {
      a.indicator ? (a.type && !a.shape && (a.shape = a.type), r.radar = r.radar || [], z(r.radar) || (r.radar = [r.radar]), r.radar.push(a)) : t.push(a);
    }), r.polar = t;
  }
  C(r.series, function(a) {
    a && a.type === "radar" && a.polarIndex && (a.radarIndex = a.polarIndex);
  });
}
var PG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.coordinateSystem, o = this.group, s = t.getData(), l = this._data;
      function u(v, c) {
        var p = v.getItemVisual(c, "symbol") || "circle";
        if (p !== "none") {
          var d = Sl(v.getItemVisual(c, "symbolSize")), g = Jt(p, -1, -1, 2, 2), y = v.getItemVisual(c, "symbolRotate") || 0;
          return g.attr({
            style: {
              strokeNoScale: !0
            },
            z2: 100,
            scaleX: d[0] / 2,
            scaleY: d[1] / 2,
            rotation: y * Math.PI / 180 || 0
          }), g;
        }
      }
      function f(v, c, p, d, g, y) {
        p.removeAll();
        for (var m = 0; m < c.length - 1; m++) {
          var _ = u(d, g);
          _ && (_.__dimIdx = m, v[m] ? (_.setPosition(v[m]), ml[y ? "initProps" : "updateProps"](_, {
            x: c[m][0],
            y: c[m][1]
          }, t, g)) : _.setPosition(c[m]), p.add(_));
        }
      }
      function h(v) {
        return G(v, function(c) {
          return [i.cx, i.cy];
        });
      }
      s.diff(l).add(function(v) {
        var c = s.getItemLayout(v);
        if (c) {
          var p = new Be(), d = new ze(), g = {
            shape: {
              points: c
            }
          };
          p.shape.points = h(c), d.shape.points = h(c), Bt(p, g, t, v), Bt(d, g, t, v);
          var y = new nt(), m = new nt();
          y.add(d), y.add(p), y.add(m), f(d.shape.points, c, m, s, v, !0), s.setItemGraphicEl(v, y);
        }
      }).update(function(v, c) {
        var p = l.getItemGraphicEl(c), d = p.childAt(0), g = p.childAt(1), y = p.childAt(2), m = {
          shape: {
            points: s.getItemLayout(v)
          }
        };
        m.shape.points && (f(d.shape.points, m.shape.points, y, s, v, !1), Cr(g), Cr(d), Mt(d, m, t), Mt(g, m, t), s.setItemGraphicEl(v, p));
      }).remove(function(v) {
        o.remove(l.getItemGraphicEl(v));
      }).execute(), s.eachItemGraphicEl(function(v, c) {
        var p = s.getItemModel(c), d = v.childAt(0), g = v.childAt(1), y = v.childAt(2), m = s.getItemVisual(c, "style"), _ = m.fill;
        o.add(v), d.useStyle(tt(p.getModel("lineStyle").getLineStyle(), {
          fill: "none",
          stroke: _
        })), ce(d, p, "lineStyle"), ce(g, p, "areaStyle");
        var S = p.getModel("areaStyle"), w = S.isEmpty() && S.parentModel.isEmpty();
        g.ignore = w, C(["emphasis", "select", "blur"], function(T) {
          var D = p.getModel([T, "areaStyle"]), A = D.isEmpty() && D.parentModel.isEmpty();
          g.ensureState(T).ignore = A && w;
        }), g.useStyle(tt(S.getAreaStyle(), {
          fill: _,
          opacity: 0.7,
          decal: m.decal
        }));
        var x = p.getModel("emphasis"), b = x.getModel("itemStyle").getItemStyle();
        y.eachChild(function(T) {
          if (T instanceof de) {
            var D = T.style;
            T.useStyle(V({
              // TODO other properties like x, y ?
              image: D.image,
              x: D.x,
              y: D.y,
              width: D.width,
              height: D.height
            }, m));
          } else
            T.useStyle(m), T.setColor(_), T.style.strokeNoScale = !0;
          var A = T.ensureState("emphasis");
          A.style = rt(b);
          var M = s.getStore().get(s.getDimensionIndex(T.__dimIdx), c);
          (M == null || isNaN(M)) && (M = ""), pe(T, ie(p), {
            labelFetcher: s.hostModel,
            labelDataIndex: c,
            labelDimIndex: T.__dimIdx,
            defaultText: M,
            inheritColor: _,
            defaultOpacity: m.opacity
          });
        }), Wt(v, 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;
  }(Vt)
);
const RG = PG;
var NG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t;
    }
    return e.prototype.init = function(t) {
      r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Ml(Y(this.getData, this), Y(this.getRawData, this));
    }, e.prototype.getInitialData = function(t, a) {
      return ko(this, {
        generateCoord: "indicator_",
        generateCoordCount: 1 / 0
      });
    }, e.prototype.formatTooltip = function(t, a, n) {
      var i = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(t), u = l === "" ? this.name : l, f = gC(this, t);
      return oe("section", {
        header: u,
        sortBlocks: !0,
        blocks: G(s, function(h) {
          var v = i.get(i.mapDimension(h.dim), t);
          return oe("nameValue", {
            markerType: "subItem",
            markerColor: f,
            name: h.name,
            value: v,
            sortParam: v
          });
        })
      });
    }, e.prototype.getTooltipPosition = function(t) {
      if (t != null) {
        for (var a = this.getData(), n = this.coordinateSystem, i = a.getValues(G(n.dimensions, function(u) {
          return a.mapDimension(u);
        }), t), o = 0, s = i.length; o < s; o++)
          if (!isNaN(i[o])) {
            var l = n.getIndicatorAxes();
            return n.coordToPoint(l[o].dataToCoord(i[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;
  }(Gt)
);
const OG = NG;
var rs = vM.value;
function mu(r, e) {
  return tt({
    show: e
  }, r);
}
var kG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.optionUpdated = function() {
      var t = this.get("boundaryGap"), a = this.get("splitNumber"), n = this.get("scale"), i = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), f = this.get(["axisName", "formatter"]), h = this.get("axisNameGap"), v = this.get("triggerEvent"), c = G(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 d = l;
        p.color != null && (d = tt({
          color: p.color
        }, l));
        var g = ft(rt(p), {
          boundaryGap: t,
          splitNumber: a,
          scale: n,
          axisLine: i,
          axisTick: o,
          // axisType: axisType,
          axisLabel: s,
          // Compatible with 2 and use text
          name: p.text,
          showName: u,
          nameLocation: "end",
          nameGap: h,
          // min: 0,
          nameTextStyle: d,
          triggerEvent: v
        }, !1);
        if ($(f)) {
          var y = g.name;
          g.name = f.replace("{value}", y ?? "");
        } else
          q(f) && (g.name = f(g.name, g));
        var m = new kt(g, null, this.ecModel);
        return te(m, bl.prototype), m.mainType = "radar", m.componentIndex = this.componentIndex, m;
      }, this);
      this._indicatorModels = c;
    }, 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: ft({
        lineStyle: {
          color: "#bbb"
        }
      }, rs.axisLine),
      axisLabel: mu(rs.axisLabel, !1),
      axisTick: mu(rs.axisTick, !1),
      // axisType: 'value',
      splitLine: mu(rs.splitLine, !0),
      splitArea: mu(rs.splitArea, !0),
      // {text, min, max}
      indicator: []
    }, e;
  }(St)
);
const VG = kG;
var BG = ["axisLine", "axisTickLabel", "axisName"], zG = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = this.group;
      i.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t);
    }, e.prototype._buildAxes = function(t) {
      var a = t.coordinateSystem, n = a.getIndicatorAxes(), i = G(n, function(o) {
        var s = o.model.get("showName") ? o.name : "", l = new ma(o.model, {
          axisName: s,
          position: [a.cx, a.cy],
          rotation: o.angle,
          labelDirection: -1,
          tickDirection: -1,
          nameDirection: 1
        });
        return l;
      });
      C(i, function(o) {
        C(BG, o.add, o), this.group.add(o.getGroup());
      }, this);
    }, e.prototype._buildSplitLineAndArea = function(t) {
      var a = t.coordinateSystem, n = a.getIndicatorAxes();
      if (!n.length)
        return;
      var i = t.get("shape"), o = t.getModel("splitLine"), s = t.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), f = o.get("show"), h = s.get("show"), v = l.get("color"), c = u.get("color"), p = z(v) ? v : [v], d = z(c) ? c : [c], g = [], y = [];
      function m(P, R, k) {
        var O = k % R.length;
        return P[O] = P[O] || [], O;
      }
      if (i === "circle")
        for (var _ = n[0].getTicksCoords(), S = a.cx, w = a.cy, x = 0; x < _.length; x++) {
          if (f) {
            var b = m(g, p, x);
            g[b].push(new qr({
              shape: {
                cx: S,
                cy: w,
                r: _[x].coord
              }
            }));
          }
          if (h && x < _.length - 1) {
            var b = m(y, d, x);
            y[b].push(new mh({
              shape: {
                cx: S,
                cy: w,
                r0: _[x].coord,
                r: _[x + 1].coord
              }
            }));
          }
        }
      else
        for (var T, D = G(n, function(P, R) {
          var k = P.getTicksCoords();
          return T = T == null ? k.length - 1 : Math.min(k.length - 1, T), G(k, function(O) {
            return a.coordToPoint(O.coord, R);
          });
        }), A = [], x = 0; x <= T; x++) {
          for (var M = [], I = 0; I < n.length; I++)
            M.push(D[I][x]);
          if (M[0] ? M.push(M[0].slice()) : {}.NODE_ENV !== "production" && console.error("Can't draw value axis " + x), f) {
            var b = m(g, p, x);
            g[b].push(new ze({
              shape: {
                points: M
              }
            }));
          }
          if (h && A) {
            var b = m(y, d, x - 1);
            y[b].push(new Be({
              shape: {
                points: M.concat(A)
              }
            }));
          }
          A = M.slice().reverse();
        }
      var L = l.getLineStyle(), E = u.getAreaStyle();
      C(y, function(P, R) {
        this.group.add(nr(P, {
          style: tt({
            stroke: "none",
            fill: d[R % d.length]
          }, E),
          silent: !0
        }));
      }, this), C(g, function(P, R) {
        this.group.add(nr(P, {
          style: tt({
            fill: "none",
            stroke: p[R % p.length]
          }, L),
          silent: !0
        }));
      }, this);
    }, e.type = "radar", e;
  }($t)
);
const GG = zG;
var FG = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this, t, a, n) || this;
      return i.type = "value", i.angle = 0, i.name = "", i;
    }
    return e;
  }(Mr)
);
const HG = FG;
var WG = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.dimensions = [], this._model = e, this._indicatorAxes = G(e.getIndicatorModels(), function(n, i) {
        var o = "indicator_" + i, s = new HG(
          o,
          new en()
          // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
        );
        return s.name = n.get("name"), s.model = n, n.axis = s, this.dimensions.push(o), s;
      }, this), this.resize(e, a);
    }
    return r.prototype.getIndicatorAxes = function() {
      return this._indicatorAxes;
    }, r.prototype.dataToPoint = function(e, t) {
      var a = this._indicatorAxes[t];
      return this.coordToPoint(a.dataToCoord(e), t);
    }, r.prototype.coordToPoint = function(e, t) {
      var a = this._indicatorAxes[t], n = a.angle, i = this.cx + e * Math.cos(n), o = this.cy - e * Math.sin(n);
      return [i, o];
    }, r.prototype.pointToData = function(e) {
      var t = e[0] - this.cx, a = e[1] - this.cy, n = Math.sqrt(t * t + a * a);
      t /= n, a /= n;
      for (var i = Math.atan2(-a, t), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
        var f = this._indicatorAxes[u], h = Math.abs(i - f.angle);
        h < o && (s = f, l = u, o = h);
      }
      return [l, +(s && s.coordToData(n))];
    }, r.prototype.resize = function(e, t) {
      var a = e.get("center"), n = t.getWidth(), i = t.getHeight(), o = Math.min(n, i) / 2;
      this.cx = H(a[0], n), this.cy = H(a[1], i), this.startAngle = e.get("startAngle") * Math.PI / 180;
      var s = e.get("radius");
      ($(s) || Ct(s)) && (s = [0, s]), this.r0 = H(s[0], o), this.r = H(s[1], o), C(this._indicatorAxes, function(l, u) {
        l.setExtent(this.r0, this.r);
        var f = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
        f = Math.atan2(Math.sin(f), Math.cos(f)), l.angle = f;
      }, this);
    }, r.prototype.update = function(e, t) {
      var a = this._indicatorAxes, n = this._model;
      C(a, 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")) !== n)) {
          var u = s.getData();
          C(a, function(f) {
            f.scale.unionExtentFromData(u, u.mapDimension(f.dim));
          });
        }
      }, this);
      var i = n.get("splitNumber"), o = new en();
      o.setExtent(0, i), o.setInterval(1), C(a, function(s, l) {
        cM(s.scale, s.model, o);
      });
    }, r.prototype.convertToPixel = function(e, t, a) {
      return console.warn("Not implemented."), null;
    }, r.prototype.convertFromPixel = function(e, t, a) {
      return console.warn("Not implemented."), null;
    }, r.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, r.create = function(e, t) {
      var a = [];
      return e.eachComponent("radar", function(n) {
        var i = new r(n, e, t);
        a.push(i), n.coordinateSystem = i;
      }), e.eachSeriesByType("radar", function(n) {
        n.get("coordinateSystem") === "radar" && (n.coordinateSystem = a[n.get("radarIndex") || 0]);
      }), a;
    }, r.dimensions = [], r;
  }()
);
const $G = WG;
function UG(r) {
  r.registerCoordinateSystem("radar", $G), r.registerComponentModel(VG), r.registerComponentView(GG), r.registerVisual({
    seriesType: "radar",
    reset: function(e) {
      var t = e.getData();
      t.each(function(a) {
        t.setItemVisual(a, "legendIcon", "roundRect");
      }), t.setVisual("legendIcon", "roundRect");
    }
  });
}
function YG(r) {
  pt(UG), r.registerChartView(RG), r.registerSeriesModel(OG), r.registerLayout(LG), r.registerProcessor(Al("radar")), r.registerPreprocessor(EG);
}
var Q1 = "\0_ec_interaction_mutex";
function ZG(r, e, t) {
  var a = Sy(r);
  a[e] = t;
}
function XG(r, e, t) {
  var a = Sy(r), n = a[e];
  n === t && (a[e] = null);
}
function J1(r, e) {
  return !!Sy(r)[e];
}
function Sy(r) {
  return r[Q1] || (r[Q1] = {});
}
jr({
  type: "takeGlobalCursor",
  event: "globalCursorTaken",
  update: "update"
}, Xt);
var qG = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this) || this;
      a._zr = t;
      var n = Y(a._mousedownHandler, a), i = Y(a._mousemoveHandler, a), o = Y(a._mouseupHandler, a), s = Y(a._mousewheelHandler, a), l = Y(a._pinchHandler, a);
      return a.enable = function(u, f) {
        this.disable(), this._opt = tt(rt(f) || {}, {
          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") && (t.on("mousedown", n), t.on("mousemove", i), t.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (t.on("mousewheel", s), t.on("pinch", l));
      }, a.disable = function() {
        t.off("mousedown", n), t.off("mousemove", i), t.off("mouseup", o), t.off("mousewheel", s), t.off("pinch", l);
      }, a;
    }
    return e.prototype.isDragging = function() {
      return this._dragging;
    }, e.prototype.isPinching = function() {
      return this._pinching;
    }, e.prototype.setPointerChecker = function(t) {
      this.pointerChecker = t;
    }, e.prototype.dispose = function() {
      this.disable();
    }, e.prototype._mousedownHandler = function(t) {
      if (!bm(t)) {
        for (var a = t.target; a; ) {
          if (a.draggable)
            return;
          a = a.__hostTarget || a.parent;
        }
        var n = t.offsetX, i = t.offsetY;
        this.pointerChecker && this.pointerChecker(t, n, i) && (this._x = n, this._y = i, this._dragging = !0);
      }
    }, e.prototype._mousemoveHandler = function(t) {
      if (!(!this._dragging || !Ku("moveOnMouseMove", t, this._opt) || t.gestureEvent === "pinch" || J1(this._zr, "globalPan"))) {
        var a = t.offsetX, n = t.offsetY, i = this._x, o = this._y, s = a - i, l = n - o;
        this._x = a, this._y = n, this._opt.preventDefaultMouseMove && ca(t.event), SM(this, "pan", "moveOnMouseMove", t, {
          dx: s,
          dy: l,
          oldX: i,
          oldY: o,
          newX: a,
          newY: n,
          isAvailableBehavior: null
        });
      }
    }, e.prototype._mouseupHandler = function(t) {
      bm(t) || (this._dragging = !1);
    }, e.prototype._mousewheelHandler = function(t) {
      var a = Ku("zoomOnMouseWheel", t, this._opt), n = Ku("moveOnMouseWheel", t, this._opt), i = t.wheelDelta, o = Math.abs(i), s = t.offsetX, l = t.offsetY;
      if (!(i === 0 || !a && !n)) {
        if (a) {
          var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, f = i > 0 ? u : 1 / u;
          yc(this, "zoom", "zoomOnMouseWheel", t, {
            scale: f,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
        if (n) {
          var h = Math.abs(i), v = (i > 0 ? 1 : -1) * (h > 3 ? 0.4 : h > 1 ? 0.15 : 0.05);
          yc(this, "scrollMove", "moveOnMouseWheel", t, {
            scrollDelta: v,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
      }
    }, e.prototype._pinchHandler = function(t) {
      if (!J1(this._zr, "globalPan")) {
        var a = t.pinchScale > 1 ? 1.1 : 1 / 1.1;
        yc(this, "zoom", null, t, {
          scale: a,
          originX: t.pinchX,
          originY: t.pinchY,
          isAvailableBehavior: null
        });
      }
    }, e;
  }(fr)
);
function yc(r, e, t, a, n) {
  r.pointerChecker && r.pointerChecker(a, n.originX, n.originY) && (ca(a.event), SM(r, e, t, a, n));
}
function SM(r, e, t, a, n) {
  n.isAvailableBehavior = Y(Ku, null, t, a), r.trigger(e, n);
}
function Ku(r, e, t) {
  var a = t[r];
  return !r || a && (!$(a) || e.event[a + "Key"]);
}
const Il = qG;
function xy(r, e, t) {
  var a = r.target;
  a.x += e, a.y += t, a.dirty();
}
function wy(r, e, t, a) {
  var n = r.target, i = r.zoomLimit, o = r.zoom = r.zoom || 1;
  if (o *= e, i) {
    var s = i.min || 0, l = i.max || 1 / 0;
    o = Math.max(Math.min(l, o), s);
  }
  var u = o / r.zoom;
  r.zoom = o, n.x -= (t - n.x) * (u - 1), n.y -= (a - n.y) * (u - 1), n.scaleX *= u, n.scaleY *= u, n.dirty();
}
var KG = {
  axisPointer: 1,
  tooltip: 1,
  brush: 1
};
function zh(r, e, t) {
  var a = e.getComponentByElement(r.topTarget), n = a && a.coordinateSystem;
  return a && a !== t && !KG.hasOwnProperty(a.mainType) && n && n.model !== t;
}
function xM(r) {
  if ($(r)) {
    var e = new DOMParser();
    r = e.parseFromString(r, "text/xml");
  }
  var t = r;
  for (t.nodeType === 9 && (t = t.firstChild); t.nodeName.toLowerCase() !== "svg" || t.nodeType !== 1; )
    t = t.nextSibling;
  return t;
}
var mc, Bf = {
  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"
}, tS = _t(Bf), zf = {
  "alignment-baseline": "textBaseline",
  "stop-color": "stopColor"
}, eS = _t(zf), jG = function() {
  function r() {
    this._defs = {}, this._root = null;
  }
  return r.prototype.parse = function(e, t) {
    t = t || {};
    var a = xM(e);
    if ({}.NODE_ENV !== "production" && !a)
      throw new Error("Illegal svg");
    this._defsUsePending = [];
    var n = new nt();
    this._root = n;
    var i = [], o = a.getAttribute("viewBox") || "", s = parseFloat(a.getAttribute("width") || t.width), l = parseFloat(a.getAttribute("height") || t.height);
    isNaN(s) && (s = null), isNaN(l) && (l = null), Fe(a, n, null, !0, !1);
    for (var u = a.firstChild; u; )
      this._parseNode(u, n, i, null, !1, !1), u = u.nextSibling;
    tF(this._defs, this._defsUsePending), this._defsUsePending = [];
    var f, h;
    if (o) {
      var v = Gh(o);
      v.length >= 4 && (f = {
        x: parseFloat(v[0] || 0),
        y: parseFloat(v[1] || 0),
        width: parseFloat(v[2]),
        height: parseFloat(v[3])
      });
    }
    if (f && s != null && l != null && (h = bM(f, { x: 0, y: 0, width: s, height: l }), !t.ignoreViewBox)) {
      var c = n;
      n = new nt(), n.add(c), c.scaleX = c.scaleY = h.scale, c.x = h.x, c.y = h.y;
    }
    return !t.ignoreRootClip && s != null && l != null && n.setClipPath(new bt({
      shape: { x: 0, y: 0, width: s, height: l }
    })), {
      root: n,
      width: s,
      height: l,
      viewBoxRect: f,
      viewBoxTransform: h,
      named: i
    };
  }, r.prototype._parseNode = function(e, t, a, n, i, o) {
    var s = e.nodeName.toLowerCase(), l, u = n;
    if (s === "defs" && (i = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
      l = t;
    else {
      if (!i) {
        var f = mc[s];
        if (f && U(mc, s)) {
          l = f.call(this, e, t);
          var h = e.getAttribute("name");
          if (h) {
            var v = {
              name: h,
              namedFrom: null,
              svgNodeTagLower: s,
              el: l
            };
            a.push(v), s === "g" && (u = v);
          } else
            n && a.push({
              name: n.name,
              namedFrom: n,
              svgNodeTagLower: s,
              el: l
            });
          t.add(l);
        }
      }
      var c = rS[s];
      if (c && U(rS, s)) {
        var p = c.call(this, e), d = e.getAttribute("id");
        d && (this._defs[d] = p);
      }
    }
    if (l && l.isGroup)
      for (var g = e.firstChild; g; )
        g.nodeType === 1 ? this._parseNode(g, l, a, u, i, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  }, r.prototype._parseText = function(e, t) {
    var a = new Ws({
      style: {
        text: e.textContent
      },
      silent: !0,
      x: this._textX || 0,
      y: this._textY || 0
    });
    qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), QG(a, t);
    var n = a.style, i = n.fontSize;
    i && i < 9 && (n.fontSize = 9, a.scaleX *= i / 9, a.scaleY *= i / 9);
    var o = (n.fontSize || n.fontFamily) && [
      n.fontStyle,
      n.fontWeight,
      (n.fontSize || 12) + "px",
      n.fontFamily || "sans-serif"
    ].join(" ");
    n.font = o;
    var s = a.getBoundingRect();
    return this._textX += s.width, t.add(a), a;
  }, r.internalField = function() {
    mc = {
      g: function(e, t) {
        var a = new nt();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a;
      },
      rect: function(e, t) {
        var a = new bt();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.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")
        }), a.silent = !0, a;
      },
      circle: function(e, t) {
        var a = new qr();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.setShape({
          cx: parseFloat(e.getAttribute("cx") || "0"),
          cy: parseFloat(e.getAttribute("cy") || "0"),
          r: parseFloat(e.getAttribute("r") || "0")
        }), a.silent = !0, a;
      },
      line: function(e, t) {
        var a = new le();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.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")
        }), a.silent = !0, a;
      },
      ellipse: function(e, t) {
        var a = new Eg();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.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")
        }), a.silent = !0, a;
      },
      polygon: function(e, t) {
        var a = e.getAttribute("points"), n;
        a && (n = iS(a));
        var i = new Be({
          shape: {
            points: n || []
          },
          silent: !0
        });
        return qe(t, i), Fe(e, i, this._defsUsePending, !1, !1), i;
      },
      polyline: function(e, t) {
        var a = e.getAttribute("points"), n;
        a && (n = iS(a));
        var i = new ze({
          shape: {
            points: n || []
          },
          silent: !0
        });
        return qe(t, i), Fe(e, i, this._defsUsePending, !1, !1), i;
      },
      image: function(e, t) {
        var a = new de();
        return qe(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.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")
        }), a.silent = !0, a;
      },
      text: function(e, t) {
        var a = e.getAttribute("x") || "0", n = e.getAttribute("y") || "0", i = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
        this._textX = parseFloat(a) + parseFloat(i), this._textY = parseFloat(n) + parseFloat(o);
        var s = new nt();
        return qe(t, s), Fe(e, s, this._defsUsePending, !1, !0), s;
      },
      tspan: function(e, t) {
        var a = e.getAttribute("x"), n = e.getAttribute("y");
        a != null && (this._textX = parseFloat(a)), n != null && (this._textY = parseFloat(n));
        var i = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new nt();
        return qe(t, s), Fe(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(i), this._textY += parseFloat(o), s;
      },
      path: function(e, t) {
        var a = e.getAttribute("d") || "", n = JT(a);
        return qe(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.silent = !0, n;
      }
    };
  }(), r;
}(), rS = {
  lineargradient: function(r) {
    var e = parseInt(r.getAttribute("x1") || "0", 10), t = parseInt(r.getAttribute("y1") || "0", 10), a = parseInt(r.getAttribute("x2") || "10", 10), n = parseInt(r.getAttribute("y2") || "0", 10), i = new dl(e, t, a, n);
    return aS(r, i), nS(r, i), i;
  },
  radialgradient: function(r) {
    var e = parseInt(r.getAttribute("cx") || "0", 10), t = parseInt(r.getAttribute("cy") || "0", 10), a = parseInt(r.getAttribute("r") || "0", 10), n = new vD(e, t, a);
    return aS(r, n), nS(r, n), n;
  }
};
function aS(r, e) {
  var t = r.getAttribute("gradientUnits");
  t === "userSpaceOnUse" && (e.global = !0);
}
function nS(r, e) {
  for (var t = r.firstChild; t; ) {
    if (t.nodeType === 1 && t.nodeName.toLocaleLowerCase() === "stop") {
      var a = t.getAttribute("offset"), n = void 0;
      a && a.indexOf("%") > 0 ? n = parseInt(a, 10) / 100 : a ? n = parseFloat(a) : n = 0;
      var i = {};
      wM(t, i, i);
      var o = i.stopColor || t.getAttribute("stop-color") || "#000000";
      e.colorStops.push({
        offset: n,
        color: o
      });
    }
    t = t.nextSibling;
  }
}
function qe(r, e) {
  r && r.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), tt(e.__inheritedStyle, r.__inheritedStyle));
}
function iS(r) {
  for (var e = Gh(r), t = [], a = 0; a < e.length; a += 2) {
    var n = parseFloat(e[a]), i = parseFloat(e[a + 1]);
    t.push([n, i]);
  }
  return t;
}
function Fe(r, e, t, a, n) {
  var i = e, o = i.__inheritedStyle = i.__inheritedStyle || {}, s = {};
  r.nodeType === 1 && (aF(r, e), wM(r, o, s), a || nF(r, o, s)), i.style = i.style || {}, o.fill != null && (i.style.fill = oS(i, "fill", o.fill, t)), o.stroke != null && (i.style.stroke = oS(i, "stroke", o.stroke, t)), C([
    "lineWidth",
    "opacity",
    "fillOpacity",
    "strokeOpacity",
    "miterLimit",
    "fontSize"
  ], function(l) {
    o[l] != null && (i.style[l] = parseFloat(o[l]));
  }), C([
    "lineDashOffset",
    "lineCap",
    "lineJoin",
    "fontWeight",
    "fontFamily",
    "fontStyle",
    "textAlign"
  ], function(l) {
    o[l] != null && (i.style[l] = o[l]);
  }), n && (i.__selfStyle = s), o.lineDash && (i.style.lineDash = G(Gh(o.lineDash), function(l) {
    return parseFloat(l);
  })), (o.visibility === "hidden" || o.visibility === "collapse") && (i.invisible = !0), o.display === "none" && (i.ignore = !0);
}
function QG(r, e) {
  var t = e.__selfStyle;
  if (t) {
    var a = t.textBaseline, n = a;
    !a || a === "auto" || a === "baseline" ? n = "alphabetic" : a === "before-edge" || a === "text-before-edge" ? n = "top" : a === "after-edge" || a === "text-after-edge" ? n = "bottom" : (a === "central" || a === "mathematical") && (n = "middle"), r.style.textBaseline = n;
  }
  var i = e.__inheritedStyle;
  if (i) {
    var o = i.textAlign, s = o;
    o && (o === "middle" && (s = "center"), r.style.textAlign = s);
  }
}
var JG = /^url\(\s*#(.*?)\)/;
function oS(r, e, t, a) {
  var n = t && t.match(JG);
  if (n) {
    var i = mr(n[1]);
    a.push([r, e, i]);
    return;
  }
  return t === "none" && (t = null), t;
}
function tF(r, e) {
  for (var t = 0; t < e.length; t++) {
    var a = e[t];
    a[0].style[a[1]] = r[a[2]];
  }
}
var eF = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function Gh(r) {
  return r.match(eF) || [];
}
var rF = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, _c = Math.PI / 180;
function aF(r, e) {
  var t = r.getAttribute("transform");
  if (t) {
    t = t.replace(/,/g, " ");
    var a = [], n = null;
    t.replace(rF, function(h, v, c) {
      return a.push(v, c), "";
    });
    for (var i = a.length - 1; i > 0; i -= 2) {
      var o = a[i], s = a[i - 1], l = Gh(o);
      switch (n = n || lr(), s) {
        case "translate":
          Ur(n, n, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
          break;
        case "scale":
          dg(n, n, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
          break;
        case "rotate":
          yi(n, n, -parseFloat(l[0]) * _c);
          break;
        case "skewX":
          var u = Math.tan(parseFloat(l[0]) * _c);
          la(n, [1, 0, u, 1, 0, 0], n);
          break;
        case "skewY":
          var f = Math.tan(parseFloat(l[0]) * _c);
          la(n, [1, f, 0, 1, 0, 0], n);
          break;
        case "matrix":
          n[0] = parseFloat(l[0]), n[1] = parseFloat(l[1]), n[2] = parseFloat(l[2]), n[3] = parseFloat(l[3]), n[4] = parseFloat(l[4]), n[5] = parseFloat(l[5]);
          break;
      }
    }
    e.setLocalTransform(n);
  }
}
var sS = /([^\s:;]+)\s*:\s*([^:;]+)/g;
function wM(r, e, t) {
  var a = r.getAttribute("style");
  if (a) {
    sS.lastIndex = 0;
    for (var n; (n = sS.exec(a)) != null; ) {
      var i = n[1], o = U(Bf, i) ? Bf[i] : null;
      o && (e[o] = n[2]);
      var s = U(zf, i) ? zf[i] : null;
      s && (t[s] = n[2]);
    }
  }
}
function nF(r, e, t) {
  for (var a = 0; a < tS.length; a++) {
    var n = tS[a], i = r.getAttribute(n);
    i != null && (e[Bf[n]] = i);
  }
  for (var a = 0; a < eS.length; a++) {
    var n = eS[a], i = r.getAttribute(n);
    i != null && (t[zf[n]] = i);
  }
}
function bM(r, e) {
  var t = e.width / r.width, a = e.height / r.height, n = Math.min(t, a);
  return {
    scale: n,
    x: -(r.x + r.width / 2) * n + (e.x + e.width / 2),
    y: -(r.y + r.height / 2) * n + (e.y + e.height / 2)
  };
}
function iF(r, e) {
  var t = new jG();
  return t.parse(r, e);
}
var oF = K([
  "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"
]), sF = (
  /** @class */
  function() {
    function r(e, t) {
      this.type = "geoSVG", this._usedGraphicMap = K(), this._freedGraphics = [], this._mapName = e, this._parsedXML = xM(t);
    }
    return r.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 t = uF(e.named), a = t.regions, n = t.regionsMap;
        this._regions = a, this._regionsMap = n;
      }
      return {
        boundingRect: this._boundingRect,
        regions: this._regions,
        regionsMap: this._regionsMap
      };
    }, r.prototype._buildGraphic = function(e) {
      var t, a;
      try {
        t = e && iF(e, {
          ignoreViewBox: !0,
          ignoreRootClip: !0
        }) || {}, a = t.root, Q(a != null);
      } catch (g) {
        throw new Error(`Invalid svg format
` + g.message);
      }
      var n = new nt();
      n.add(a), n.isGeoSVGGraphicRoot = !0;
      var i = t.width, o = t.height, s = t.viewBoxRect, l = this._boundingRect;
      if (!l) {
        var u = void 0, f = void 0, h = void 0, v = void 0;
        if (i != null ? (u = 0, h = i) : s && (u = s.x, h = s.width), o != null ? (f = 0, v = o) : s && (f = s.y, v = s.height), u == null || f == null) {
          var c = a.getBoundingRect();
          u == null && (u = c.x, h = c.width), f == null && (f = c.y, v = c.height);
        }
        l = this._boundingRect = new ht(u, f, h, v);
      }
      if (s) {
        var p = bM(s, l);
        a.scaleX = a.scaleY = p.scale, a.x = p.x, a.y = p.y;
      }
      n.setClipPath(new bt({
        shape: l.plain()
      }));
      var d = [];
      return C(t.named, function(g) {
        oF.get(g.svgNodeTagLower) != null && (d.push(g), lF(g.el));
      }), {
        root: n,
        boundingRect: l,
        named: d
      };
    }, r.prototype.useGraphic = function(e) {
      var t = this._usedGraphicMap, a = t.get(e);
      return a || (a = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), t.set(e, a), a);
    }, r.prototype.freeGraphic = function(e) {
      var t = this._usedGraphicMap, a = t.get(e);
      a && (t.removeKey(e), this._freedGraphics.push(a));
    }, r;
  }()
);
function lF(r) {
  r.silent = !1, r.isGroup && r.traverse(function(e) {
    e.silent = !1;
  });
}
function uF(r) {
  var e = [], t = K();
  return C(r, function(a) {
    if (a.namedFrom == null) {
      var n = new MB(a.name, a.el);
      e.push(n), t.set(a.name, n);
    }
  }), {
    regions: e,
    regionsMap: t
  };
}
var Md = [126, 25], lS = "南海诸岛", On = [[[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 Pn = 0; Pn < On.length; Pn++)
  for (var ki = 0; ki < On[Pn].length; ki++)
    On[Pn][ki][0] /= 10.5, On[Pn][ki][1] /= -10.5 / 0.75, On[Pn][ki][0] += Md[0], On[Pn][ki][1] += Md[1];
function fF(r, e) {
  if (r === "china") {
    for (var t = 0; t < e.length; t++)
      if (e[t].name === lS)
        return;
    e.push(new xA(lS, G(On, function(a) {
      return {
        type: "polygon",
        exterior: a
      };
    }), Md));
  }
}
var hF = {
  南海诸岛: [32, 80],
  // 全国
  广东: [0, -10],
  香港: [10, 5],
  澳门: [-10, 10],
  // '北京': [-10, 0],
  天津: [5, 5]
};
function vF(r, e) {
  if (r === "china") {
    var t = hF[e.name];
    if (t) {
      var a = e.getCenter();
      a[0] += t[0] / 10.5, a[1] += -t[1] / (10.5 / 0.75), e.setCenter(a);
    }
  }
}
var cF = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
function pF(r, e) {
  r === "china" && e.name === "台湾" && e.geometries.push({
    type: "polygon",
    exterior: cF[0]
  });
}
var dF = "name", gF = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.type = "geoJSON", this._parsedMap = K(), this._mapName = e, this._specialAreas = a, this._geoJSON = mF(t);
    }
    return r.prototype.load = function(e, t) {
      t = t || dF;
      var a = this._parsedMap.get(t);
      if (!a) {
        var n = this._parseToRegions(t);
        a = this._parsedMap.set(t, {
          regions: n,
          boundingRect: yF(n)
        });
      }
      var i = K(), o = [];
      return C(a.regions, function(s) {
        var l = s.name;
        e && U(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), i.set(l, s);
      }), {
        regions: o,
        boundingRect: a.boundingRect || new ht(0, 0, 0, 0),
        regionsMap: i
      };
    }, r.prototype._parseToRegions = function(e) {
      var t = this._mapName, a = this._geoJSON, n;
      try {
        n = a ? LB(a, e) : [];
      } catch (i) {
        throw new Error(`Invalid geoJson format
` + i.message);
      }
      return fF(t, n), C(n, function(i) {
        var o = i.name;
        vF(t, i), pF(t, i);
        var s = this._specialAreas && this._specialAreas[o];
        s && i.transformTo(s.left, s.top, s.width, s.height);
      }, this), n;
    }, r.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
      };
    }, r;
  }()
);
function yF(r) {
  for (var e, t = 0; t < r.length; t++) {
    var a = r[t].getBoundingRect();
    e = e || a.clone(), e.union(a);
  }
  return e;
}
function mF(r) {
  return $(r) ? typeof JSON < "u" && JSON.parse ? JSON.parse(r) : new Function("return (" + r + ");")() : r;
}
var as = K();
const _a = {
  /**
   * 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(r, e, t) {
    if (e.svg) {
      var a = new sF(r, e.svg);
      as.set(r, a);
    } else {
      var n = e.geoJson || e.geoJSON;
      n && !e.features ? t = e.specialAreas : n = e;
      var a = new gF(r, n, t);
      as.set(r, a);
    }
  },
  getGeoResource: function(r) {
    return as.get(r);
  },
  /**
   * Only for exporting to users.
   * **MUST NOT** used internally.
   */
  getMapForUser: function(r) {
    var e = as.get(r);
    return e && e.type === "geoJSON" && e.getMapForUser();
  },
  load: function(r, e, t) {
    var a = as.get(r);
    if (!a) {
      ({}).NODE_ENV !== "production" && console.error("Map " + r + " not exists. The GeoJSON of the map must be provided.");
      return;
    }
    return a.load(e, t);
  }
};
var by = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], _F = K(by), SF = K(by.concat(["g"])), xF = K(by.concat(["g"])), TM = Tt();
function _u(r) {
  var e = r.getItemStyle(), t = r.get("areaColor");
  return t != null && (e.fill = t), e;
}
function uS(r) {
  var e = r.style;
  e && (e.stroke = e.stroke || e.fill, e.fill = null);
}
var wF = (
  /** @class */
  function() {
    function r(e) {
      var t = new nt();
      this.uid = Ao("ec_map_draw"), this._controller = new Il(e.getZr()), this._controllerHost = {
        target: t
      }, this.group = t, t.add(this._regionsGroup = new nt()), t.add(this._svgGroup = new nt());
    }
    return r.prototype.draw = function(e, t, a, n, i) {
      var o = e.mainType === "geo", s = e.getData && e.getData();
      o && t.eachComponent({
        mainType: "series",
        subType: "map"
      }, function(y) {
        !s && y.getHostGeoModel() === e && (s = y.getData());
      });
      var l = e.coordinateSystem, u = this._regionsGroup, f = this.group, h = l.getTransformInfo(), v = h.raw, c = h.roam, p = !u.childAt(0) || i;
      p ? (f.x = c.x, f.y = c.y, f.scaleX = c.scaleX, f.scaleY = c.scaleY, f.dirty()) : Mt(f, c, e);
      var d = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
        api: a,
        geo: l,
        mapOrGeoModel: e,
        data: s,
        isVisualEncodedByVisualMap: d,
        isGeo: o,
        transformInfoRaw: v
      };
      l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, t, a), this._updateMapSelectHandler(e, u, a, n);
    }, r.prototype._buildGeoJSON = function(e) {
      var t = this._regionsGroupByName = K(), a = K(), n = this._regionsGroup, i = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
      function f(c, p) {
        return p && (c = p(c)), c && [c[0] * i.scaleX + i.x, c[1] * i.scaleY + i.y];
      }
      function h(c) {
        for (var p = [], d = !u && l && l.project, g = 0; g < c.length; ++g) {
          var y = f(c[g], d);
          y && p.push(y);
        }
        return p;
      }
      function v(c) {
        return {
          shape: {
            points: h(c)
          }
        };
      }
      n.removeAll(), C(e.geo.regions, function(c) {
        var p = c.name, d = t.get(p), g = a.get(p) || {}, y = g.dataIdx, m = g.regionModel;
        d || (d = t.set(p, new nt()), n.add(d), y = s ? s.indexOfName(p) : null, m = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(y) : null, a.set(p, {
          dataIdx: y,
          regionModel: m
        }));
        var _ = [], S = [];
        C(c.geometries, function(b) {
          if (b.type === "polygon") {
            var T = [b.exterior].concat(b.interiors || []);
            u && (T = dS(T, u)), C(T, function(A) {
              _.push(new Be(v(A)));
            });
          } else {
            var D = b.points;
            u && (D = dS(D, u, !0)), C(D, function(A) {
              S.push(new ze(v(A)));
            });
          }
        });
        var w = f(c.getCenter(), l && l.project);
        function x(b, T) {
          if (b.length) {
            var D = new Rg({
              culling: !0,
              segmentIgnoreThreshold: 1,
              shape: {
                paths: b
              }
            });
            d.add(D), fS(e, D, y, m), hS(e, D, p, m, o, y, w), T && (uS(D), C(D.states, uS));
          }
        }
        x(_), x(S, !0);
      }), t.each(function(c, p) {
        var d = a.get(p), g = d.dataIdx, y = d.regionModel;
        vS(e, c, p, y, o, g), cS(e, c, p, y, o), pS(e, c, p, y, o);
      }, this);
    }, r.prototype._buildSVG = function(e) {
      var t = e.geo.map, a = e.transformInfoRaw;
      this._svgGroup.x = a.x, this._svgGroup.y = a.y, this._svgGroup.scaleX = a.scaleX, this._svgGroup.scaleY = a.scaleY, this._svgResourceChanged(t) && (this._freeSVG(), this._useSVG(t));
      var n = this._svgDispatcherMap = K(), i = !1;
      C(this._svgGraphicRecord.named, function(o) {
        var s = o.name, l = e.mapOrGeoModel, u = e.data, f = o.svgNodeTagLower, h = o.el, v = u ? u.indexOfName(s) : null, c = l.getRegionModel(s);
        if (_F.get(f) != null && h instanceof ur && fS(e, h, v, c), h instanceof ur && (h.culling = !0), h.z2EmphasisLift = 0, !o.namedFrom && (xF.get(f) != null && hS(e, h, s, c, l, v, null), vS(e, h, s, c, l, v), cS(e, h, s, c, l), SF.get(f) != null)) {
          var p = pS(e, h, s, c, l);
          p === "self" && (i = !0);
          var d = n.get(s) || n.set(s, []);
          d.push(h);
        }
      }, this), this._enableBlurEntireSVG(i, e);
    }, r.prototype._enableBlurEntireSVG = function(e, t) {
      if (e && t.isGeo) {
        var a = t.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), n = a.opacity;
        this._svgGraphicRecord.root.traverse(function(i) {
          if (!i.isGroup) {
            vi(i);
            var o = i.ensureState("blur").style || {};
            o.opacity == null && n != null && (o.opacity = n), i.ensureState("emphasis");
          }
        });
      }
    }, r.prototype.remove = function() {
      this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
    }, r.prototype.findHighDownDispatchers = function(e, t) {
      if (e == null)
        return [];
      var a = t.coordinateSystem;
      if (a.resourceType === "geoJSON") {
        var n = this._regionsGroupByName;
        if (n) {
          var i = n.get(e);
          return i ? [i] : [];
        }
      } else if (a.resourceType === "geoSVG")
        return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
    }, r.prototype._svgResourceChanged = function(e) {
      return this._svgMapName !== e;
    }, r.prototype._useSVG = function(e) {
      var t = _a.getGeoResource(e);
      if (t && t.type === "geoSVG") {
        var a = t.useGraphic(this.uid);
        this._svgGroup.add(a.root), this._svgGraphicRecord = a, this._svgMapName = e;
      }
    }, r.prototype._freeSVG = function() {
      var e = this._svgMapName;
      if (e != null) {
        var t = _a.getGeoResource(e);
        t && t.type === "geoSVG" && t.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
      }
    }, r.prototype._updateController = function(e, t, a) {
      var n = e.coordinateSystem, i = this._controller, o = this._controllerHost;
      o.zoomLimit = e.get("scaleLimit"), o.zoom = n.getZoom(), i.enable(e.get("roam") || !1);
      var s = e.mainType;
      function l() {
        var u = {
          type: "geoRoam",
          componentType: s
        };
        return u[s + "Id"] = e.id, u;
      }
      i.off("pan").on("pan", function(u) {
        this._mouseDownFlag = !1, xy(o, u.dx, u.dy), a.dispatchAction(V(l(), {
          dx: u.dx,
          dy: u.dy,
          animation: {
            duration: 0
          }
        }));
      }, this), i.off("zoom").on("zoom", function(u) {
        this._mouseDownFlag = !1, wy(o, u.scale, u.originX, u.originY), a.dispatchAction(V(l(), {
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY,
          animation: {
            duration: 0
          }
        }));
      }, this), i.setPointerChecker(function(u, f, h) {
        return n.containPoint([f, h]) && !zh(u, a, e);
      });
    }, r.prototype.resetForLabelLayout = function() {
      this.group.traverse(function(e) {
        var t = e.getTextContent();
        t && (t.ignore = TM(t).ignore);
      });
    }, r.prototype._updateMapSelectHandler = function(e, t, a, n) {
      var i = this;
      t.off("mousedown"), t.off("click"), e.get("selectedMode") && (t.on("mousedown", function() {
        i._mouseDownFlag = !0;
      }), t.on("click", function(o) {
        i._mouseDownFlag && (i._mouseDownFlag = !1);
      }));
    }, r;
  }()
);
function fS(r, e, t, a) {
  var n = a.getModel("itemStyle"), i = a.getModel(["emphasis", "itemStyle"]), o = a.getModel(["blur", "itemStyle"]), s = a.getModel(["select", "itemStyle"]), l = _u(n), u = _u(i), f = _u(s), h = _u(o), v = r.data;
  if (v) {
    var c = v.getItemVisual(t, "style"), p = v.getItemVisual(t, "decal");
    r.isVisualEncodedByVisualMap && c.fill && (l.fill = c.fill), p && (l.decal = ho(p, r.api));
  }
  e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = f, e.ensureState("blur").style = h, vi(e);
}
function hS(r, e, t, a, n, i, o) {
  var s = r.data, l = r.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), i)), f = s && s.getItemLayout(i);
  if (l || u || f && f.showLabel) {
    var h = l ? t : i, v = void 0;
    (!s || i >= 0) && (v = n);
    var c = o ? {
      normal: {
        align: "center",
        verticalAlign: "middle"
      }
    } : null;
    pe(e, ie(a), {
      labelFetcher: v,
      labelDataIndex: h,
      defaultText: t
    }, c);
    var p = e.getTextContent();
    if (p && (TM(p).ignore = p.ignore, e.textConfig && o)) {
      var d = e.getBoundingRect().clone();
      e.textConfig.layoutRect = d, e.textConfig.position = [(o[0] - d.x) / d.width * 100 + "%", (o[1] - d.y) / d.height * 100 + "%"];
    }
    e.disableLabelAnimation = !0;
  } else
    e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
}
function vS(r, e, t, a, n, i) {
  r.data ? r.data.setItemGraphicEl(i, e) : it(e).eventData = {
    componentType: "geo",
    componentIndex: n.componentIndex,
    geoIndex: n.componentIndex,
    name: t,
    region: a && a.option || {}
  };
}
function cS(r, e, t, a, n) {
  r.data || Do({
    el: e,
    componentModel: n,
    itemName: t,
    // @ts-ignore FIXME:TS fix the "compatible with each other"?
    itemTooltipOption: a.get("tooltip")
  });
}
function pS(r, e, t, a, n) {
  e.highDownSilentOnTouch = !!n.get("selectedMode");
  var i = a.getModel("emphasis"), o = i.get("focus");
  return Wt(e, o, i.get("blurScope"), i.get("disabled")), r.isGeo && wR(e, n, t), o;
}
function dS(r, e, t) {
  var a = [], n;
  function i() {
    n = [];
  }
  function o() {
    n.length && (a.push(n), n = []);
  }
  var s = e({
    polygonStart: i,
    polygonEnd: o,
    lineStart: i,
    lineEnd: o,
    point: function(l, u) {
      isFinite(l) && isFinite(u) && n.push([l, u]);
    },
    sphere: function() {
    }
  });
  return !t && s.polygonStart(), C(r, function(l) {
    s.lineStart();
    for (var u = 0; u < l.length; u++)
      s.point(l[u][0], l[u][1]);
    s.lineEnd();
  }), !t && s.polygonEnd(), a;
}
const DM = wF;
var bF = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      if (!(i && i.type === "mapToggleSelect" && i.from === this.uid)) {
        var o = this.group;
        if (o.removeAll(), !t.getHostGeoModel()) {
          if (this._mapDraw && i && i.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), i && i.type === "geoRoam" && i.componentType === "series" && i.seriesId === t.id) {
            var s = this._mapDraw;
            s && o.add(s.group);
          } else if (t.needsDrawMap) {
            var s = this._mapDraw || new DM(n);
            o.add(s.group), s.draw(t, a, n, this, i), this._mapDraw = s;
          } else
            this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
          t.get("showLegendSymbol") && a.getComponent("legend") && this._renderSymbols(t, a, n);
        }
      }
    }, 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(t, a, n) {
      var i = t.originalData, o = this.group;
      i.each(i.mapDimension("value"), function(s, l) {
        if (!isNaN(s)) {
          var u = i.getItemLayout(l);
          if (!(!u || !u.point)) {
            var f = u.point, h = u.offset, v = new qr({
              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: t.getData().getVisual("style").fill
              },
              shape: {
                cx: f[0] + h * 9,
                cy: f[1],
                r: 3
              },
              silent: !0,
              // Do not overlap the first series, on which labels are displayed.
              z2: 8 + (h ? 0 : bo + 1)
            });
            if (!h) {
              var c = t.mainSeries.getData(), p = i.getName(l), d = c.indexOfName(p), g = i.getItemModel(l), y = g.getModel("label"), m = c.getItemGraphicEl(d);
              pe(v, ie(g), {
                labelFetcher: {
                  getFormattedLabel: function(_, S) {
                    return t.getFormattedLabel(d, S);
                  }
                },
                defaultText: p
              }), v.disableLabelAnimation = !0, y.get("position") || v.setTextConfig({
                position: "bottom"
              }), m.onHoverStateChange = function(_) {
                pf(v, _);
              };
            }
            o.add(v);
          }
        }
      });
    }, e.type = "map", e;
  }(Vt)
);
const TF = bF;
var DF = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.needsDrawMap = !1, t.seriesGroup = [], t.getTooltipPosition = function(a) {
        if (a != null) {
          var n = this.getData().getName(a), i = this.coordinateSystem, o = i.getRegion(n);
          return o && i.dataToPoint(o.getCenter());
        }
      }, t;
    }
    return e.prototype.getInitialData = function(t) {
      for (var a = ko(this, {
        coordDimensions: ["value"],
        encodeDefaulter: ot(Hg, this)
      }), n = K(), i = [], o = 0, s = a.count(); o < s; o++) {
        var l = a.getName(o);
        n.set(l, !0);
      }
      var u = _a.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
      return C(u.regions, function(f) {
        var h = f.name;
        n.get(h) || i.push(h);
      }), a.appendValues([], i), a;
    }, e.prototype.getHostGeoModel = function() {
      var t = this.option.geoIndex;
      return t != null ? this.ecModel.getComponent("geo", t) : null;
    }, e.prototype.getMapType = function() {
      return (this.getHostGeoModel() || this).option.map;
    }, e.prototype.getRawValue = function(t) {
      var a = this.getData();
      return a.get(a.mapDimension("value"), t);
    }, e.prototype.getRegionModel = function(t) {
      var a = this.getData();
      return a.getItemModel(a.indexOfName(t));
    }, e.prototype.formatTooltip = function(t, a, n) {
      for (var i = this.getData(), o = this.getRawValue(t), s = i.getName(t), l = this.seriesGroup, u = [], f = 0; f < l.length; f++) {
        var h = l[f].originalData.indexOfName(s), v = i.mapDimension("value");
        isNaN(l[f].originalData.get(v, h)) || u.push(l[f].name);
      }
      return oe("section", {
        header: u.join(", "),
        noHeader: !u.length,
        blocks: [oe("nameValue", {
          name: s,
          value: o
        })]
      });
    }, e.prototype.setZoom = function(t) {
      this.option.zoom = t;
    }, e.prototype.setCenter = function(t) {
      this.option.center = t;
    }, e.prototype.getLegendIcon = function(t) {
      var a = t.icon || "roundRect", n = Jt(a, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill);
      return n.setStyle(t.itemStyle), n.style.stroke = "none", a.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n;
    }, 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;
  }(Gt)
);
const CF = DF;
function AF(r, e) {
  var t = {};
  return C(r, function(a) {
    a.each(a.mapDimension("value"), function(n, i) {
      var o = "ec-" + a.getName(i);
      t[o] = t[o] || [], isNaN(n) || t[o].push(n);
    });
  }), r[0].map(r[0].mapDimension("value"), function(a, n) {
    for (var i = "ec-" + r[0].getName(n), o = 0, s = 1 / 0, l = -1 / 0, u = t[i].length, f = 0; f < u; f++)
      s = Math.min(s, t[i][f]), l = Math.max(l, t[i][f]), o += t[i][f];
    var h;
    return e === "min" ? h = s : e === "max" ? h = l : e === "average" ? h = o / u : h = o, u === 0 ? NaN : h;
  });
}
function MF(r) {
  var e = {};
  r.eachSeriesByType("map", function(t) {
    var a = t.getHostGeoModel(), n = a ? "o" + a.id : "i" + t.getMapType();
    (e[n] = e[n] || []).push(t);
  }), C(e, function(t, a) {
    for (var n = AF(G(t, function(o) {
      return o.getData();
    }), t[0].get("mapValueCalculation")), i = 0; i < t.length; i++)
      t[i].originalData = t[i].getData();
    for (var i = 0; i < t.length; i++)
      t[i].seriesGroup = t, t[i].needsDrawMap = i === 0 && !t[i].getHostGeoModel(), t[i].setData(n.cloneShallow()), t[i].mainSeries = t[0];
  });
}
function IF(r) {
  var e = {};
  r.eachSeriesByType("map", function(t) {
    var a = t.getMapType();
    if (!(t.getHostGeoModel() || e[a])) {
      var n = {};
      C(t.seriesGroup, function(o) {
        var s = o.coordinateSystem, l = o.originalData;
        o.get("showLegendSymbol") && r.getComponent("legend") && l.each(l.mapDimension("value"), function(u, f) {
          var h = l.getName(f), v = s.getRegion(h);
          if (!(!v || isNaN(u))) {
            var c = n[h] || 0, p = s.dataToPoint(v.getCenter());
            n[h] = c + 1, l.setItemLayout(f, {
              point: p,
              offset: c
            });
          }
        });
      });
      var i = t.getData();
      i.each(function(o) {
        var s = i.getName(o), l = i.getItemLayout(o) || {};
        l.showLabel = !n[s], i.setItemLayout(o, l);
      }), e[a] = !0;
    }
  });
}
var gS = fe, LF = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this) || this;
      return a.type = "view", a.dimensions = ["x", "y"], a._roamTransformable = new na(), a._rawTransformable = new na(), a.name = t, a;
    }
    return e.prototype.setBoundingRect = function(t, a, n, i) {
      return this._rect = new ht(t, a, n, i), this._rect;
    }, e.prototype.getBoundingRect = function() {
      return this._rect;
    }, e.prototype.setViewRect = function(t, a, n, i) {
      this._transformTo(t, a, n, i), this._viewRect = new ht(t, a, n, i);
    }, e.prototype._transformTo = function(t, a, n, i) {
      var o = this.getBoundingRect(), s = this._rawTransformable;
      s.transform = o.calculateTransform(new ht(t, a, n, i));
      var l = s.parent;
      s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
    }, e.prototype.setCenter = function(t, a) {
      t && (this._center = [H(t[0], a.getWidth()), H(t[1], a.getHeight())], this._updateCenterAndZoom());
    }, e.prototype.setZoom = function(t) {
      t = t || 1;
      var a = this.zoomLimit;
      a && (a.max != null && (t = Math.min(a.max, t)), a.min != null && (t = Math.max(a.min, t))), this._zoom = t, this._updateCenterAndZoom();
    }, e.prototype.getDefaultCenter = function() {
      var t = this.getBoundingRect(), a = t.x + t.width / 2, n = t.y + t.height / 2;
      return [a, n];
    }, 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 t = this._rawTransformable.getLocalTransform(), a = this._roamTransformable, n = this.getDefaultCenter(), i = this.getCenter(), o = this.getZoom();
      i = fe([], i, t), n = fe([], n, t), a.originX = i[0], a.originY = i[1], a.x = n[0] - i[0], a.y = n[1] - i[1], a.scaleX = a.scaleY = o, this._updateTransform();
    }, e.prototype._updateTransform = function() {
      var t = this._roamTransformable, a = this._rawTransformable;
      a.parent = t, t.updateTransform(), a.updateTransform(), pg(this.transform || (this.transform = []), a.transform || lr()), this._rawTransform = a.getLocalTransform(), this.invTransform = this.invTransform || [], xo(this.invTransform, this.transform), this.decomposeTransform();
    }, e.prototype.getTransformInfo = function() {
      var t = this._rawTransformable, a = this._roamTransformable, n = new na();
      return n.transform = a.transform, n.decomposeTransform(), {
        roam: {
          x: n.x,
          y: n.y,
          scaleX: n.scaleX,
          scaleY: n.scaleY
        },
        raw: {
          x: t.x,
          y: t.y,
          scaleX: t.scaleX,
          scaleY: t.scaleY
        }
      };
    }, e.prototype.getViewRect = function() {
      return this._viewRect;
    }, e.prototype.getViewRectAfterRoam = function() {
      var t = this.getBoundingRect().clone();
      return t.applyTransform(this.transform), t;
    }, e.prototype.dataToPoint = function(t, a, n) {
      var i = a ? this._rawTransform : this.transform;
      return n = n || [], i ? gS(n, t, i) : be(n, t);
    }, e.prototype.pointToData = function(t) {
      var a = this.invTransform;
      return a ? gS([], t, a) : [t[0], t[1]];
    }, e.prototype.convertToPixel = function(t, a, n) {
      var i = yS(a);
      return i === this ? i.dataToPoint(n) : null;
    }, e.prototype.convertFromPixel = function(t, a, n) {
      var i = yS(a);
      return i === this ? i.pointToData(n) : null;
    }, e.prototype.containPoint = function(t) {
      return this.getViewRectAfterRoam().contain(t[0], t[1]);
    }, e.dimensions = ["x", "y"], e;
  }(na)
);
function yS(r) {
  var e = r.seriesModel;
  return e ? e.coordinateSystem : null;
}
const Ll = LF;
var EF = {
  geoJSON: {
    aspectScale: 0.75,
    invertLongitute: !0
  },
  geoSVG: {
    aspectScale: 1,
    invertLongitute: !1
  }
}, CM = ["lng", "lat"], AM = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this, t) || this;
      i.dimensions = CM, i.type = "geo", i._nameCoordMap = K(), i.map = a;
      var o = n.projection, s = _a.load(a, n.nameMap, n.nameProperty), l = _a.getGeoResource(a), u = i.resourceType = l ? l.type : null, f = i.regions = s.regions, h = EF[l.type];
      i._regionsMap = s.regionsMap, i.regions = s.regions, {}.NODE_ENV !== "production" && o && (u === "geoSVG" && ({}.NODE_ENV !== "production" && Ft("Map " + a + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || ({}.NODE_ENV !== "production" && Ft("project and unproject must be both provided in the projeciton."), o = null)), i.projection = o;
      var v;
      if (o)
        for (var c = 0; c < f.length; c++) {
          var p = f[c].getBoundingRect(o);
          v = v || p.clone(), v.union(p);
        }
      else
        v = s.boundingRect;
      return i.setBoundingRect(v.x, v.y, v.width, v.height), i.aspectScale = o ? 1 : ut(n.aspectScale, h.aspectScale), i._invertLongitute = o ? !1 : h.invertLongitute, i;
    }
    return e.prototype._transformTo = function(t, a, n, i) {
      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 ht(t, a, n, i));
      var u = l.parent;
      l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
    }, e.prototype.getRegion = function(t) {
      return this._regionsMap.get(t);
    }, e.prototype.getRegionByCoord = function(t) {
      for (var a = this.regions, n = 0; n < a.length; n++) {
        var i = a[n];
        if (i.type === "geoJSON" && i.contain(t))
          return a[n];
      }
    }, e.prototype.addGeoCoord = function(t, a) {
      this._nameCoordMap.set(t, a);
    }, e.prototype.getGeoCoord = function(t) {
      var a = this._regionsMap.get(t);
      return this._nameCoordMap.get(t) || a && a.getCenter();
    }, e.prototype.dataToPoint = function(t, a, n) {
      if ($(t) && (t = this.getGeoCoord(t)), t) {
        var i = this.projection;
        return i && (t = i.project(t)), t && this.projectedToPoint(t, a, n);
      }
    }, e.prototype.pointToData = function(t) {
      var a = this.projection;
      return a && (t = a.unproject(t)), t && this.pointToProjected(t);
    }, e.prototype.pointToProjected = function(t) {
      return r.prototype.pointToData.call(this, t);
    }, e.prototype.projectedToPoint = function(t, a, n) {
      return r.prototype.dataToPoint.call(this, t, a, n);
    }, e.prototype.convertToPixel = function(t, a, n) {
      var i = mS(a);
      return i === this ? i.dataToPoint(n) : null;
    }, e.prototype.convertFromPixel = function(t, a, n) {
      var i = mS(a);
      return i === this ? i.pointToData(n) : null;
    }, e;
  }(Ll)
);
te(AM, Ll);
function mS(r) {
  var e = r.geoModel, t = r.seriesModel;
  return e ? e.coordinateSystem : t ? t.coordinateSystem || (t.getReferringComponents("geo", Qt).models[0] || {}).coordinateSystem : null;
}
const _S = AM;
function SS(r, e) {
  var t = r.get("boundingCoords");
  if (t != null) {
    var a = t[0], n = t[1];
    if (!(isFinite(a[0]) && isFinite(a[1]) && isFinite(n[0]) && isFinite(n[1])))
      ({}).NODE_ENV !== "production" && console.error("Invalid boundingCoords");
    else {
      var i = this.projection;
      if (i) {
        var o = a[0], s = a[1], l = n[0], u = n[1];
        a = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0];
        var f = function(x, b, T, D) {
          for (var A = T - x, M = D - b, I = 0; I <= 100; I++) {
            var L = I / 100, E = i.project([x + A * L, b + M * L]);
            Va(a, a, E), Ba(n, n, E);
          }
        };
        f(o, s, l, s), f(l, s, l, u), f(l, u, o, u), f(o, u, l, s);
      }
      this.setBoundingRect(a[0], a[1], n[0] - a[0], n[1] - a[1]);
    }
  }
  var h = this.getBoundingRect(), v = r.get("layoutCenter"), c = r.get("layoutSize"), p = e.getWidth(), d = e.getHeight(), g = h.width / h.height * this.aspectScale, y = !1, m, _;
  v && c && (m = [H(v[0], p), H(v[1], d)], _ = H(c, Math.min(p, d)), !isNaN(m[0]) && !isNaN(m[1]) && !isNaN(_) ? y = !0 : {}.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
  var S;
  if (y)
    S = {}, g > 1 ? (S.width = _, S.height = _ / g) : (S.height = _, S.width = _ * g), S.y = m[1] - S.height / 2, S.x = m[0] - S.width / 2;
  else {
    var w = r.getBoxLayoutParams();
    w.aspect = g, S = re(w, {
      width: p,
      height: d
    });
  }
  this.setViewRect(S.x, S.y, S.width, S.height), this.setCenter(r.get("center"), e), this.setZoom(r.get("zoom"));
}
function PF(r, e) {
  C(e.get("geoCoord"), function(t, a) {
    r.addGeoCoord(a, t);
  });
}
var RF = (
  /** @class */
  function() {
    function r() {
      this.dimensions = CM;
    }
    return r.prototype.create = function(e, t) {
      var a = [];
      function n(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 _S(l + s, l, V({
          nameMap: o.get("nameMap")
        }, n(o)));
        u.zoomLimit = o.get("scaleLimit"), a.push(u), o.coordinateSystem = u, u.model = o, u.resize = SS, u.resize(o, t);
      }), e.eachSeries(function(o) {
        var s = o.get("coordinateSystem");
        if (s === "geo") {
          var l = o.get("geoIndex") || 0;
          o.coordinateSystem = a[l];
        }
      });
      var i = {};
      return e.eachSeriesByType("map", function(o) {
        if (!o.getHostGeoModel()) {
          var s = o.getMapType();
          i[s] = i[s] || [], i[s].push(o);
        }
      }), C(i, function(o, s) {
        var l = G(o, function(f) {
          return f.get("nameMap");
        }), u = new _S(s, s, V({
          nameMap: fg(l)
        }, n(o[0])));
        u.zoomLimit = jt.apply(null, G(o, function(f) {
          return f.get("scaleLimit");
        })), a.push(u), u.resize = SS, u.resize(o[0], t), C(o, function(f) {
          f.coordinateSystem = u, PF(u, f);
        });
      }), a;
    }, r.prototype.getFilledRegions = function(e, t, a, n) {
      for (var i = (e || []).slice(), o = K(), s = 0; s < i.length; s++)
        o.set(i[s].name, i[s]);
      var l = _a.load(t, a, n);
      return C(l.regions, function(u) {
        var f = u.name;
        !o.get(f) && i.push({
          name: f
        });
      }), i;
    }, r;
  }()
), NF = new RF();
const MM = NF;
var OF = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a, n) {
      var i = _a.getGeoResource(t.map);
      if (i && i.type === "geoJSON") {
        var o = t.itemStyle = t.itemStyle || {};
        "color" in o || (o.color = "#eee");
      }
      this.mergeDefaultAndTheme(t, n), ui(t, "label", ["show"]);
    }, e.prototype.optionUpdated = function() {
      var t = this, a = this.option;
      a.regions = MM.getFilledRegions(a.regions, a.map, a.nameMap, a.nameProperty);
      var n = {};
      this._optionModelMap = $r(a.regions || [], function(i, o) {
        var s = o.name;
        return s && (i.set(s, new kt(o, t, t.ecModel)), o.selected && (n[s] = !0)), i;
      }, K()), a.selectedMap || (a.selectedMap = n);
    }, e.prototype.getRegionModel = function(t) {
      return this._optionModelMap.get(t) || new kt(null, this, this.ecModel);
    }, e.prototype.getFormattedLabel = function(t, a) {
      var n = this.getRegionModel(t), i = a === "normal" ? n.get(["label", "formatter"]) : n.get(["emphasis", "label", "formatter"]), o = {
        name: t
      };
      if (q(i))
        return o.status = a, i(o);
      if ($(i))
        return i.replace("{a}", t ?? "");
    }, e.prototype.setZoom = function(t) {
      this.option.zoom = t;
    }, e.prototype.setCenter = function(t) {
      this.option.center = t;
    }, e.prototype.select = function(t) {
      var a = this.option, n = a.selectedMode;
      if (n) {
        n !== "multiple" && (a.selectedMap = null);
        var i = a.selectedMap || (a.selectedMap = {});
        i[t] = !0;
      }
    }, e.prototype.unSelect = function(t) {
      var a = this.option.selectedMap;
      a && (a[t] = !1);
    }, e.prototype.toggleSelected = function(t) {
      this[this.isSelected(t) ? "unSelect" : "select"](t);
    }, e.prototype.isSelected = function(t) {
      var a = this.option.selectedMap;
      return !!(a && a[t]);
    }, 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;
  }(St)
);
const kF = OF;
function xS(r, e) {
  return r.pointToProjected ? r.pointToProjected(e) : r.pointToData(e);
}
function Ty(r, e, t, a) {
  var n = r.getZoom(), i = r.getCenter(), o = e.zoom, s = r.projectedToPoint ? r.projectedToPoint(i) : r.dataToPoint(i);
  if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, r.setCenter(xS(r, s), a)), o != null) {
    if (t) {
      var l = t.min || 0, u = t.max || 1 / 0;
      o = Math.max(Math.min(n * o, u), l) / n;
    }
    r.scaleX *= o, r.scaleY *= o;
    var f = (e.originX - r.x) * (o - 1), h = (e.originY - r.y) * (o - 1);
    r.x -= f, r.y -= h, r.updateTransform(), r.setCenter(xS(r, s), a), r.setZoom(o * n);
  }
  return {
    center: r.getCenter(),
    zoom: r.getZoom()
  };
}
var VF = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.focusBlurEnabled = !0, t;
    }
    return e.prototype.init = function(t, a) {
      this._api = a;
    }, e.prototype.render = function(t, a, n, i) {
      if (this._model = t, !t.get("show")) {
        this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
        return;
      }
      this._mapDraw || (this._mapDraw = new DM(n));
      var o = this._mapDraw;
      o.draw(t, a, n, this, i), o.group.on("click", this._handleRegionClick, this), o.group.silent = t.get("silent"), this.group.add(o.group), this.updateSelectStatus(t, a, n);
    }, e.prototype._handleRegionClick = function(t) {
      var a;
      Xn(t.target, function(n) {
        return (a = it(n).eventData) != null;
      }, !0), a && this._api.dispatchAction({
        type: "geoToggleSelect",
        geoId: this._model.id,
        name: a.name
      });
    }, e.prototype.updateSelectStatus = function(t, a, n) {
      var i = this;
      this._mapDraw.group.traverse(function(o) {
        var s = it(o).eventData;
        if (s)
          return i._model.isSelected(s.name) ? n.enterSelect(o) : n.leaveSelect(o), !0;
      });
    }, e.prototype.findHighDownDispatchers = function(t) {
      return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model);
    }, e.prototype.dispose = function() {
      this._mapDraw && this._mapDraw.remove();
    }, e.type = "geo", e;
  }($t)
);
const BF = VF;
function zF(r, e, t) {
  _a.registerMap(r, e, t);
}
function IM(r) {
  r.registerCoordinateSystem("geo", MM), r.registerComponentModel(kF), r.registerComponentView(BF), r.registerImpl("registerMap", zF), r.registerImpl("getMap", function(t) {
    return _a.getMapForUser(t);
  });
  function e(t, a) {
    a.update = "geo:updateSelectStatus", r.registerAction(a, function(n, i) {
      var o = {}, s = [];
      return i.eachComponent({
        mainType: "geo",
        query: n
      }, function(l) {
        l[t](n.name);
        var u = l.coordinateSystem;
        C(u.regions, function(h) {
          o[h.name] = l.isSelected(h.name) || !1;
        });
        var f = [];
        C(o, function(h, v) {
          o[v] && f.push(v);
        }), s.push({
          geoIndex: l.componentIndex,
          // Use singular, the same naming convention as the event `selectchanged`.
          name: f
        });
      }), {
        selected: o,
        allSelected: s,
        name: n.name
      };
    });
  }
  e("toggleSelected", {
    type: "geoToggleSelect",
    event: "geoselectchanged"
  }), e("select", {
    type: "geoSelect",
    event: "geoselected"
  }), e("unSelect", {
    type: "geoUnSelect",
    event: "geounselected"
  }), r.registerAction({
    type: "geoRoam",
    event: "geoRoam",
    update: "updateTransform"
  }, function(t, a, n) {
    var i = t.componentType || "series";
    a.eachComponent({
      mainType: i,
      query: t
    }, function(o) {
      var s = o.coordinateSystem;
      if (s.type === "geo") {
        var l = Ty(s, t, o.get("scaleLimit"), n);
        o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), i === "series" && C(o.seriesGroup, function(u) {
          u.setCenter(l.center), u.setZoom(l.zoom);
        });
      }
    });
  });
}
function GF(r) {
  pt(IM), r.registerChartView(TF), r.registerSeriesModel(CF), r.registerLayout(IF), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, MF), MC("map", r.registerAction);
}
function FF(r) {
  var e = r;
  e.hierNode = {
    defaultAncestor: null,
    ancestor: e,
    prelim: 0,
    modifier: 0,
    change: 0,
    shift: 0,
    i: 0,
    thread: null
  };
  for (var t = [e], a, n; a = t.pop(); )
    if (n = a.children, a.isExpand && n.length)
      for (var i = n.length, o = i - 1; o >= 0; o--) {
        var s = n[o];
        s.hierNode = {
          defaultAncestor: null,
          ancestor: s,
          prelim: 0,
          modifier: 0,
          change: 0,
          shift: 0,
          i: o,
          thread: null
        }, t.push(s);
      }
}
function HF(r, e) {
  var t = r.isExpand ? r.children : [], a = r.parentNode.children, n = r.hierNode.i ? a[r.hierNode.i - 1] : null;
  if (t.length) {
    UF(r);
    var i = (t[0].hierNode.prelim + t[t.length - 1].hierNode.prelim) / 2;
    n ? (r.hierNode.prelim = n.hierNode.prelim + e(r, n), r.hierNode.modifier = r.hierNode.prelim - i) : r.hierNode.prelim = i;
  } else
    n && (r.hierNode.prelim = n.hierNode.prelim + e(r, n));
  r.parentNode.hierNode.defaultAncestor = YF(r, n, r.parentNode.hierNode.defaultAncestor || a[0], e);
}
function WF(r) {
  var e = r.hierNode.prelim + r.parentNode.hierNode.modifier;
  r.setLayout({
    x: e
  }, !0), r.hierNode.modifier += r.parentNode.hierNode.modifier;
}
function wS(r) {
  return arguments.length ? r : qF;
}
function xs(r, e) {
  return r -= Math.PI / 2, {
    x: e * Math.cos(r),
    y: e * Math.sin(r)
  };
}
function $F(r, e) {
  return re(r.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function UF(r) {
  for (var e = r.children, t = e.length, a = 0, n = 0; --t >= 0; ) {
    var i = e[t];
    i.hierNode.prelim += a, i.hierNode.modifier += a, n += i.hierNode.change, a += i.hierNode.shift + n;
  }
}
function YF(r, e, t, a) {
  if (e) {
    for (var n = r, i = r, o = i.parentNode.children[0], s = e, l = n.hierNode.modifier, u = i.hierNode.modifier, f = o.hierNode.modifier, h = s.hierNode.modifier; s = Sc(s), i = xc(i), s && i; ) {
      n = Sc(n), o = xc(o), n.hierNode.ancestor = r;
      var v = s.hierNode.prelim + h - i.hierNode.prelim - u + a(s, i);
      v > 0 && (XF(ZF(s, r, t), r, v), u += v, l += v), h += s.hierNode.modifier, u += i.hierNode.modifier, l += n.hierNode.modifier, f += o.hierNode.modifier;
    }
    s && !Sc(n) && (n.hierNode.thread = s, n.hierNode.modifier += h - l), i && !xc(o) && (o.hierNode.thread = i, o.hierNode.modifier += u - f, t = r);
  }
  return t;
}
function Sc(r) {
  var e = r.children;
  return e.length && r.isExpand ? e[e.length - 1] : r.hierNode.thread;
}
function xc(r) {
  var e = r.children;
  return e.length && r.isExpand ? e[0] : r.hierNode.thread;
}
function ZF(r, e, t) {
  return r.hierNode.ancestor.parentNode === e.parentNode ? r.hierNode.ancestor : t;
}
function XF(r, e, t) {
  var a = t / (e.hierNode.i - r.hierNode.i);
  e.hierNode.change -= a, e.hierNode.shift += t, e.hierNode.modifier += t, e.hierNode.prelim += t, r.hierNode.change += a;
}
function qF(r, e) {
  return r.parentNode === e.parentNode ? 1 : 2;
}
var KF = (
  /** @class */
  function() {
    function r() {
      this.parentPoint = [], this.childPoints = [];
    }
    return r;
  }()
), jF = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      return r.call(this, t) || this;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new KF();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.childPoints, i = n.length, o = a.parentPoint, s = n[0], l = n[i - 1];
      if (i === 1) {
        t.moveTo(o[0], o[1]), t.lineTo(s[0], s[1]);
        return;
      }
      var u = a.orient, f = u === "TB" || u === "BT" ? 0 : 1, h = 1 - f, v = H(a.forkPosition, 1), c = [];
      c[f] = o[f], c[h] = o[h] + (l[h] - o[h]) * v, t.moveTo(o[0], o[1]), t.lineTo(c[0], c[1]), t.moveTo(s[0], s[1]), c[f] = s[f], t.lineTo(c[0], c[1]), c[f] = l[f], t.lineTo(c[0], c[1]), t.lineTo(l[0], l[1]);
      for (var p = 1; p < i - 1; p++) {
        var d = n[p];
        t.moveTo(d[0], d[1]), c[f] = d[f], t.lineTo(c[0], c[1]);
      }
    }, e;
  }(gt)
), QF = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._mainGroup = new nt(), t;
    }
    return e.prototype.init = function(t, a) {
      this._controller = new Il(a.getZr()), this._controllerHost = {
        target: this.group
      }, this.group.add(this._mainGroup);
    }, e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = t.layoutInfo, s = this._mainGroup, l = t.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(t, n), this._updateController(t, a, n);
      var u = this._data;
      i.diff(u).add(function(f) {
        bS(i, f) && TS(i, f, null, s, t);
      }).update(function(f, h) {
        var v = u.getItemGraphicEl(h);
        if (!bS(i, f)) {
          v && CS(u, h, v, s, t);
          return;
        }
        TS(i, f, v, s, t);
      }).remove(function(f) {
        var h = u.getItemGraphicEl(f);
        h && CS(u, f, h, s, t);
      }).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), t.get("expandAndCollapse") === !0 && i.eachItemGraphicEl(function(f, h) {
        f.off("click").on("click", function() {
          n.dispatchAction({
            type: "treeExpandAndCollapse",
            seriesId: t.id,
            dataIndex: h
          });
        });
      }), this._data = i;
    }, e.prototype._updateViewCoordSys = function(t, a) {
      var n = t.getData(), i = [];
      n.each(function(h) {
        var v = n.getItemLayout(h);
        v && !isNaN(v.x) && !isNaN(v.y) && i.push([+v.x, +v.y]);
      });
      var o = [], s = [];
      dh(i, 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 f = t.coordinateSystem = new Ll();
      f.zoomLimit = t.get("scaleLimit"), f.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), f.setCenter(t.get("center"), a), f.setZoom(t.get("zoom")), this.group.attr({
        x: f.x,
        y: f.y,
        scaleX: f.scaleX,
        scaleY: f.scaleY
      }), this._min = o, this._max = s;
    }, e.prototype._updateController = function(t, a, n) {
      var i = this, o = this._controller, s = this._controllerHost, l = this.group;
      o.setPointerChecker(function(u, f, h) {
        var v = l.getBoundingRect();
        return v.applyTransform(l.transform), v.contain(f, h) && !zh(u, n, t);
      }), o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        xy(s, u.dx, u.dy), n.dispatchAction({
          seriesId: t.id,
          type: "treeRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        wy(s, u.scale, u.originX, u.originY), n.dispatchAction({
          seriesId: t.id,
          type: "treeRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), i._updateNodeAndLinkScale(t), n.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function(t) {
      var a = t.getData(), n = this._getNodeGlobalScale(t);
      a.eachItemGraphicEl(function(i, o) {
        i.setSymbolScale(n);
      });
    }, e.prototype._getNodeGlobalScale = function(t) {
      var a = t.coordinateSystem;
      if (a.type !== "view")
        return 1;
      var n = this._nodeScaleRatio, i = a.scaleX || 1, o = a.getZoom(), s = (o - 1) * n + 1;
      return s / i;
    }, 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;
  }(Vt)
);
function bS(r, e) {
  var t = r.getItemLayout(e);
  return t && !isNaN(t.x) && !isNaN(t.y);
}
function TS(r, e, t, a, n) {
  var i = !t, o = r.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", f = r.tree.root, h = o.parentNode === f ? o : o.parentNode || o, v = r.getItemGraphicEl(h.dataIndex), c = h.getLayout(), p = v ? {
    x: v.__oldX,
    y: v.__oldY,
    rawX: v.__radialOldRawX,
    rawY: v.__radialOldRawY
  } : c, d = o.getLayout();
  i ? (t = new Tl(r, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), t.x = p.x, t.y = p.y) : t.updateData(r, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), t.__radialOldRawX = t.__radialRawX, t.__radialOldRawY = t.__radialRawY, t.__radialRawX = d.rawX, t.__radialRawY = d.rawY, a.add(t), r.setItemGraphicEl(e, t), t.__oldX = t.x, t.__oldY = t.y, Mt(t, {
    x: d.x,
    y: d.y
  }, n);
  var g = t.getSymbolPath();
  if (n.get("layout") === "radial") {
    var y = f.children[0], m = y.getLayout(), _ = y.children.length, S = void 0, w = void 0;
    if (d.x === m.x && o.isExpand === !0 && y.children.length) {
      var x = {
        x: (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2,
        y: (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2
      };
      S = Math.atan2(x.y - m.y, x.x - m.x), S < 0 && (S = Math.PI * 2 + S), w = x.x < m.x, w && (S = S - Math.PI);
    } else
      S = Math.atan2(d.y - m.y, d.x - m.x), S < 0 && (S = Math.PI * 2 + S), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (w = d.x < m.x, w && (S = S - Math.PI)) : (w = d.x > m.x, w || (S = S - Math.PI));
    var b = w ? "left" : "right", T = s.getModel("label"), D = T.get("rotate"), A = D * (Math.PI / 180), M = g.getTextContent();
    M && (g.setTextConfig({
      position: T.get("position") || b,
      rotation: D == null ? -S : A,
      origin: "center"
    }), M.setStyle("verticalAlign", "middle"));
  }
  var I = s.get(["emphasis", "focus"]), L = I === "relative" ? af(o.getAncestorsIndices(), o.getDescendantIndices()) : I === "ancestor" ? o.getAncestorsIndices() : I === "descendant" ? o.getDescendantIndices() : null;
  L && (it(t).focus = L), JF(n, o, f, t, p, c, d, a), t.__edge && (t.onHoverStateChange = function(E) {
    if (E !== "blur") {
      var P = o.parentNode && r.getItemGraphicEl(o.parentNode.dataIndex);
      P && P.hoverState === pl || pf(t.__edge, E);
    }
  });
}
function JF(r, e, t, a, n, i, o, s) {
  var l = e.getModel(), u = r.get("edgeShape"), f = r.get("layout"), h = r.getOrient(), v = r.get(["lineStyle", "curveness"]), c = r.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), d = a.__edge;
  if (u === "curve")
    e.parentNode && e.parentNode !== t && (d || (d = a.__edge = new _h({
      shape: Id(f, h, v, n, n)
    })), Mt(d, {
      shape: Id(f, h, v, i, o)
    }, r));
  else if (u === "polyline") {
    if (f === "orthogonal") {
      if (e !== t && e.children && e.children.length !== 0 && e.isExpand === !0) {
        for (var g = e.children, y = [], m = 0; m < g.length; m++) {
          var _ = g[m].getLayout();
          y.push([_.x, _.y]);
        }
        d || (d = a.__edge = new jF({
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: [[o.x, o.y]],
            orient: h,
            forkPosition: c
          }
        })), Mt(d, {
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: y
          }
        }, r);
      }
    } else if ({}.NODE_ENV !== "production")
      throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  }
  d && !(u === "polyline" && !e.isExpand) && (d.useStyle(tt({
    strokeNoScale: !0,
    fill: null
  }, p)), ce(d, l, "lineStyle"), vi(d), s.add(d));
}
function DS(r, e, t, a, n) {
  var i = e.tree.root, o = LM(i, r), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(r.dataIndex);
  if (u) {
    var f = e.getItemGraphicEl(s.dataIndex), h = f.__edge, v = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? h : void 0), c = a.get("edgeShape"), p = a.get("layout"), d = a.get("orient"), g = a.get(["lineStyle", "curveness"]);
    v && (c === "curve" ? Qa(v, {
      shape: Id(p, d, g, l, l),
      style: {
        opacity: 0
      }
    }, a, {
      cb: function() {
        t.remove(v);
      },
      removeOpt: n
    }) : c === "polyline" && a.get("layout") === "orthogonal" && Qa(v, {
      shape: {
        parentPoint: [l.x, l.y],
        childPoints: [[l.x, l.y]]
      },
      style: {
        opacity: 0
      }
    }, a, {
      cb: function() {
        t.remove(v);
      },
      removeOpt: n
    }));
  }
}
function LM(r, e) {
  for (var t = e.parentNode === r ? e : e.parentNode || e, a; a = t.getLayout(), a == null; )
    t = t.parentNode === r ? t : t.parentNode || t;
  return {
    source: t,
    sourceLayout: a
  };
}
function CS(r, e, t, a, n) {
  var i = r.tree.getNodeByDataIndex(e), o = r.tree.root, s = LM(o, i).sourceLayout, l = {
    duration: n.get("animationDurationUpdate"),
    easing: n.get("animationEasingUpdate")
  };
  Qa(t, {
    x: s.x + 1,
    y: s.y + 1
  }, n, {
    cb: function() {
      a.remove(t), r.setItemGraphicEl(e, null);
    },
    removeOpt: l
  }), t.fadeOut(null, r.hostModel, {
    fadeLabel: !0,
    animation: l
  }), i.children.forEach(function(u) {
    DS(u, r, a, n, l);
  }), DS(i, r, a, n, l);
}
function Id(r, e, t, a, n) {
  var i, o, s, l, u, f, h, v;
  if (r === "radial") {
    u = a.rawX, h = a.rawY, f = n.rawX, v = n.rawY;
    var c = xs(u, h), p = xs(u, h + (v - h) * t), d = xs(f, v + (h - v) * t), g = xs(f, v);
    return {
      x1: c.x || 0,
      y1: c.y || 0,
      x2: g.x || 0,
      y2: g.y || 0,
      cpx1: p.x || 0,
      cpy1: p.y || 0,
      cpx2: d.x || 0,
      cpy2: d.y || 0
    };
  } else
    u = a.x, h = a.y, f = n.x, v = n.y, (e === "LR" || e === "RL") && (i = u + (f - u) * t, o = h, s = f + (u - f) * t, l = v), (e === "TB" || e === "BT") && (i = u, o = h + (v - h) * t, s = f, l = v + (h - v) * t);
  return {
    x1: u,
    y1: h,
    x2: f,
    y2: v,
    cpx1: i,
    cpy1: o,
    cpx2: s,
    cpy2: l
  };
}
const t3 = QF;
var sr = Tt();
function EM(r) {
  var e = r.mainData, t = r.datas;
  t || (t = {
    main: e
  }, r.datasAttr = {
    main: "data"
  }), r.datas = r.mainData = null, PM(e, t, r), C(t, function(a) {
    C(e.TRANSFERABLE_METHODS, function(n) {
      a.wrapMethod(n, ot(e3, r));
    });
  }), e.wrapMethod("cloneShallow", ot(a3, r)), C(e.CHANGABLE_METHODS, function(a) {
    e.wrapMethod(a, ot(r3, r));
  }), Q(t[e.dataType] === e);
}
function e3(r, e) {
  if (o3(this)) {
    var t = V({}, sr(this).datas);
    t[this.dataType] = e, PM(e, t, r);
  } else
    Dy(e, this.dataType, sr(this).mainData, r);
  return e;
}
function r3(r, e) {
  return r.struct && r.struct.update(), e;
}
function a3(r, e) {
  return C(sr(e).datas, function(t, a) {
    t !== e && Dy(t.cloneShallow(), a, e, r);
  }), e;
}
function n3(r) {
  var e = sr(this).mainData;
  return r == null || e == null ? e : sr(e).datas[r];
}
function i3() {
  var r = sr(this).mainData;
  return r == null ? [{
    data: r
  }] : G(_t(sr(r).datas), function(e) {
    return {
      type: e,
      data: sr(r).datas[e]
    };
  });
}
function o3(r) {
  return sr(r).mainData === r;
}
function PM(r, e, t) {
  sr(r).datas = {}, C(e, function(a, n) {
    Dy(a, n, r, t);
  });
}
function Dy(r, e, t, a) {
  sr(t).datas[e] = r, sr(r).mainData = t, r.dataType = e, a.struct && (r[a.structAttr] = a.struct, a.struct[a.datasAttr[e]] = r), r.getLinkedData = n3, r.getLinkedDataAll = i3;
}
var s3 = (
  /** @class */
  function() {
    function r(e, t) {
      this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = t;
    }
    return r.prototype.isRemoved = function() {
      return this.dataIndex < 0;
    }, r.prototype.eachNode = function(e, t, a) {
      q(e) && (a = t, t = e, e = null), e = e || {}, $(e) && (e = {
        order: e
      });
      var n = e.order || "preorder", i = this[e.attr || "children"], o;
      n === "preorder" && (o = t.call(a, this));
      for (var s = 0; !o && s < i.length; s++)
        i[s].eachNode(e, t, a);
      n === "postorder" && t.call(a, this);
    }, r.prototype.updateDepthAndHeight = function(e) {
      var t = 0;
      this.depth = e;
      for (var a = 0; a < this.children.length; a++) {
        var n = this.children[a];
        n.updateDepthAndHeight(e + 1), n.height > t && (t = n.height);
      }
      this.height = t + 1;
    }, r.prototype.getNodeById = function(e) {
      if (this.getId() === e)
        return this;
      for (var t = 0, a = this.children, n = a.length; t < n; t++) {
        var i = a[t].getNodeById(e);
        if (i)
          return i;
      }
    }, r.prototype.contains = function(e) {
      if (e === this)
        return !0;
      for (var t = 0, a = this.children, n = a.length; t < n; t++) {
        var i = a[t].contains(e);
        if (i)
          return i;
      }
    }, r.prototype.getAncestors = function(e) {
      for (var t = [], a = e ? this : this.parentNode; a; )
        t.push(a), a = a.parentNode;
      return t.reverse(), t;
    }, r.prototype.getAncestorsIndices = function() {
      for (var e = [], t = this; t; )
        e.push(t.dataIndex), t = t.parentNode;
      return e.reverse(), e;
    }, r.prototype.getDescendantIndices = function() {
      var e = [];
      return this.eachNode(function(t) {
        e.push(t.dataIndex);
      }), e;
    }, r.prototype.getValue = function(e) {
      var t = this.hostTree.data;
      return t.getStore().get(t.getDimensionIndex(e || "value"), this.dataIndex);
    }, r.prototype.setLayout = function(e, t) {
      this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, t);
    }, r.prototype.getLayout = function() {
      return this.hostTree.data.getItemLayout(this.dataIndex);
    }, r.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var t = this.hostTree, a = t.data.getItemModel(this.dataIndex);
        return a.getModel(e);
      }
    }, r.prototype.getLevelModel = function() {
      return (this.hostTree.levelModels || [])[this.depth];
    }, r.prototype.setVisual = function(e, t) {
      this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, t);
    }, r.prototype.getVisual = function(e) {
      return this.hostTree.data.getItemVisual(this.dataIndex, e);
    }, r.prototype.getRawIndex = function() {
      return this.hostTree.data.getRawIndex(this.dataIndex);
    }, r.prototype.getId = function() {
      return this.hostTree.data.getId(this.dataIndex);
    }, r.prototype.getChildIndex = function() {
      if (this.parentNode) {
        for (var e = this.parentNode.children, t = 0; t < e.length; ++t)
          if (e[t] === this)
            return t;
        return -1;
      }
      return -1;
    }, r.prototype.isAncestorOf = function(e) {
      for (var t = e.parentNode; t; ) {
        if (t === this)
          return !0;
        t = t.parentNode;
      }
      return !1;
    }, r.prototype.isDescendantOf = function(e) {
      return e !== this && e.isAncestorOf(this);
    }, r;
  }()
), l3 = (
  /** @class */
  function() {
    function r(e) {
      this.type = "tree", this._nodes = [], this.hostModel = e;
    }
    return r.prototype.eachNode = function(e, t, a) {
      this.root.eachNode(e, t, a);
    }, r.prototype.getNodeByDataIndex = function(e) {
      var t = this.data.getRawIndex(e);
      return this._nodes[t];
    }, r.prototype.getNodeById = function(e) {
      return this.root.getNodeById(e);
    }, r.prototype.update = function() {
      for (var e = this.data, t = this._nodes, a = 0, n = t.length; a < n; a++)
        t[a].dataIndex = -1;
      for (var a = 0, n = e.count(); a < n; a++)
        t[e.getRawIndex(a)].dataIndex = a;
    }, r.prototype.clearLayouts = function() {
      this.data.clearItemLayouts();
    }, r.createTree = function(e, t, a) {
      var n = new r(t), i = [], o = 1;
      s(e);
      function s(f, h) {
        var v = f.value;
        o = Math.max(o, z(v) ? v.length : 1), i.push(f);
        var c = new s3(ee(f.name, ""), n);
        h ? u3(c, h) : n.root = c, n._nodes.push(c);
        var p = f.children;
        if (p)
          for (var d = 0; d < p.length; d++)
            s(p[d], c);
      }
      n.root.updateDepthAndHeight(0);
      var l = xl(i, {
        coordDimensions: ["value"],
        dimensionsCount: o
      }).dimensions, u = new Ce(l, t);
      return u.initData(i), a && a(u), EM({
        mainData: u,
        struct: n,
        structAttr: "tree"
      }), n.update(), n;
    }, r;
  }()
);
function u3(r, e) {
  var t = e.children;
  r.parentNode !== e && (t.push(r), r.parentNode = e);
}
const Cy = l3;
function al(r, e, t) {
  if (r && ct(e, r.type) >= 0) {
    var a = t.getData().tree.root, n = r.targetNode;
    if ($(n) && (n = a.getNodeById(n)), n && a.contains(n))
      return {
        node: n
      };
    var i = r.targetNodeId;
    if (i != null && (n = a.getNodeById(i)))
      return {
        node: n
      };
  }
}
function RM(r) {
  for (var e = []; r; )
    r = r.parentNode, r && e.push(r);
  return e.reverse();
}
function Ay(r, e) {
  var t = RM(r);
  return ct(t, e) >= 0;
}
function Fh(r, e) {
  for (var t = []; r; ) {
    var a = r.dataIndex;
    t.push({
      name: r.name,
      dataIndex: a,
      value: e.getRawValue(a)
    }), r = r.parentNode;
  }
  return t.reverse(), t;
}
var f3 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.hasSymbolVisual = !0, t.ignoreStyleOnData = !0, t;
    }
    return e.prototype.getInitialData = function(t) {
      var a = {
        name: t.name,
        children: t.data
      }, n = t.leaves || {}, i = new kt(n, this, this.ecModel), o = Cy.createTree(a, this, s);
      function s(h) {
        h.wrapMethod("getItemModel", function(v, c) {
          var p = o.getNodeByDataIndex(c);
          return p && p.children.length && p.isExpand || (v.parentModel = i), v;
        });
      }
      var l = 0;
      o.eachNode("preorder", function(h) {
        h.depth > l && (l = h.depth);
      });
      var u = t.expandAndCollapse, f = u && t.initialTreeDepth >= 0 ? t.initialTreeDepth : l;
      return o.root.eachNode("preorder", function(h) {
        var v = h.hostTree.data.getRawDataItem(h.dataIndex);
        h.isExpand = v && v.collapsed != null ? !v.collapsed : h.depth <= f;
      }), o.data;
    }, e.prototype.getOrient = function() {
      var t = this.get("orient");
      return t === "horizontal" ? t = "LR" : t === "vertical" && (t = "TB"), t;
    }, e.prototype.setZoom = function(t) {
      this.option.zoom = t;
    }, e.prototype.setCenter = function(t) {
      this.option.center = t;
    }, e.prototype.formatTooltip = function(t, a, n) {
      for (var i = this.getData().tree, o = i.root.children[0], s = i.getNodeByDataIndex(t), l = s.getValue(), u = s.name; s && s !== o; )
        u = s.parentNode.name + "." + u, s = s.parentNode;
      return oe("nameValue", {
        name: u,
        value: l,
        noValue: isNaN(l) || l == null
      });
    }, e.prototype.getDataParams = function(t) {
      var a = r.prototype.getDataParams.apply(this, arguments), n = this.getData().tree.getNodeByDataIndex(t);
      return a.treeAncestors = Fh(n, this), a.collapsed = !n.isExpand, a;
    }, 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;
  }(Gt)
);
const h3 = f3;
function v3(r, e, t) {
  for (var a = [r], n = [], i; i = a.pop(); )
    if (n.push(i), i.isExpand) {
      var o = i.children;
      if (o.length)
        for (var s = 0; s < o.length; s++)
          a.push(o[s]);
    }
  for (; i = n.pop(); )
    e(i, t);
}
function ns(r, e) {
  for (var t = [r], a; a = t.pop(); )
    if (e(a), a.isExpand) {
      var n = a.children;
      if (n.length)
        for (var i = n.length - 1; i >= 0; i--)
          t.push(n[i]);
    }
}
function c3(r, e) {
  r.eachSeriesByType("tree", function(t) {
    p3(t, e);
  });
}
function p3(r, e) {
  var t = $F(r, e);
  r.layoutInfo = t;
  var a = r.get("layout"), n = 0, i = 0, o = null;
  a === "radial" ? (n = 2 * Math.PI, i = Math.min(t.height, t.width) / 2, o = wS(function(_, S) {
    return (_.parentNode === S.parentNode ? 1 : 2) / _.depth;
  })) : (n = t.width, i = t.height, o = wS());
  var s = r.getData().tree.root, l = s.children[0];
  if (l) {
    FF(s), v3(l, HF, o), s.hierNode.modifier = -l.hierNode.prelim, ns(l, WF);
    var u = l, f = l, h = l;
    ns(l, function(_) {
      var S = _.getLayout().x;
      S < u.getLayout().x && (u = _), S > f.getLayout().x && (f = _), _.depth > h.depth && (h = _);
    });
    var v = u === f ? 1 : o(u, f) / 2, c = v - u.getLayout().x, p = 0, d = 0, g = 0, y = 0;
    if (a === "radial")
      p = n / (f.getLayout().x + v + c), d = i / (h.depth - 1 || 1), ns(l, function(_) {
        g = (_.getLayout().x + c) * p, y = (_.depth - 1) * d;
        var S = xs(g, y);
        _.setLayout({
          x: S.x,
          y: S.y,
          rawX: g,
          rawY: y
        }, !0);
      });
    else {
      var m = r.getOrient();
      m === "RL" || m === "LR" ? (d = i / (f.getLayout().x + v + c), p = n / (h.depth - 1 || 1), ns(l, function(_) {
        y = (_.getLayout().x + c) * d, g = m === "LR" ? (_.depth - 1) * p : n - (_.depth - 1) * p, _.setLayout({
          x: g,
          y
        }, !0);
      })) : (m === "TB" || m === "BT") && (p = n / (f.getLayout().x + v + c), d = i / (h.depth - 1 || 1), ns(l, function(_) {
        g = (_.getLayout().x + c) * p, y = m === "TB" ? (_.depth - 1) * d : i - (_.depth - 1) * d, _.setLayout({
          x: g,
          y
        }, !0);
      }));
    }
  }
}
function d3(r) {
  r.eachSeriesByType("tree", function(e) {
    var t = e.getData(), a = t.tree;
    a.eachNode(function(n) {
      var i = n.getModel(), o = i.getModel("itemStyle").getItemStyle(), s = t.ensureUniqueItemVisual(n.dataIndex, "style");
      V(s, o);
    });
  });
}
function g3(r) {
  r.registerAction({
    type: "treeExpandAndCollapse",
    event: "treeExpandAndCollapse",
    update: "update"
  }, function(e, t) {
    t.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(a) {
      var n = e.dataIndex, i = a.getData().tree, o = i.getNodeByDataIndex(n);
      o.isExpand = !o.isExpand;
    });
  }), r.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, t, a) {
    t.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(n) {
      var i = n.coordinateSystem, o = Ty(i, e, void 0, a);
      n.setCenter && n.setCenter(o.center), n.setZoom && n.setZoom(o.zoom);
    });
  });
}
function y3(r) {
  r.registerChartView(t3), r.registerSeriesModel(h3), r.registerLayout(c3), r.registerVisual(d3), g3(r);
}
var AS = ["treemapZoomToNode", "treemapRender", "treemapMove"];
function m3(r) {
  for (var e = 0; e < AS.length; e++)
    r.registerAction({
      type: AS[e],
      update: "updateView"
    }, Xt);
  r.registerAction({
    type: "treemapRootToNode",
    update: "updateView"
  }, function(t, a) {
    a.eachComponent({
      mainType: "series",
      subType: "treemap",
      query: t
    }, n);
    function n(i, o) {
      var s = ["treemapZoomToNode", "treemapRootToNode"], l = al(t, s, i);
      if (l) {
        var u = i.getViewRoot();
        u && (t.direction = Ay(u, l.node) ? "rollUp" : "drillDown"), i.resetViewRoot(l.node);
      }
    }
  });
}
function NM(r) {
  var e = r.getData(), t = e.tree, a = {};
  t.eachNode(function(n) {
    for (var i = n; i && i.depth > 1; )
      i = i.parentNode;
    var o = nd(r.ecModel, i.name || i.dataIndex + "", a);
    n.setVisual("decal", o);
  });
}
var _3 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.preventUsingHoverLayer = !0, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      var n = {
        name: t.name,
        children: t.data
      };
      OM(n);
      var i = t.levels || [], o = this.designatedVisualItemStyle = {}, s = new kt({
        itemStyle: o
      }, this, a);
      i = t.levels = S3(i, a);
      var l = G(i || [], function(h) {
        return new kt(h, s, a);
      }, this), u = Cy.createTree(n, this, f);
      function f(h) {
        h.wrapMethod("getItemModel", function(v, c) {
          var p = u.getNodeByDataIndex(c), d = p ? l[p.depth] : null;
          return v.parentModel = d || s, v;
        });
      }
      return u.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.formatTooltip = function(t, a, n) {
      var i = this.getData(), o = this.getRawValue(t), s = i.getName(t);
      return oe("nameValue", {
        name: s,
        value: o
      });
    }, e.prototype.getDataParams = function(t) {
      var a = r.prototype.getDataParams.apply(this, arguments), n = this.getData().tree.getNodeByDataIndex(t);
      return a.treeAncestors = Fh(n, this), a.treePathInfo = a.treeAncestors, a;
    }, e.prototype.setLayoutInfo = function(t) {
      this.layoutInfo = this.layoutInfo || {}, V(this.layoutInfo, t);
    }, e.prototype.mapIdToIndex = function(t) {
      var a = this._idIndexMap;
      a || (a = this._idIndexMap = K(), this._idIndexMapCount = 0);
      var n = a.get(t);
      return n == null && a.set(t, n = this._idIndexMapCount++), n;
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(t) {
      t ? this._viewRoot = t : t = this._viewRoot;
      var a = this.getRawData().tree.root;
      (!t || t !== a && !a.contains(t)) && (this._viewRoot = a);
    }, e.prototype.enableAriaDecal = function() {
      NM(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,
      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;
  }(Gt)
);
function OM(r) {
  var e = 0;
  C(r.children, function(a) {
    OM(a);
    var n = a.value;
    z(n) && (n = n[0]), e += n;
  });
  var t = r.value;
  z(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), z(r.value) ? r.value[0] = t : r.value = t;
}
function S3(r, e) {
  var t = Pt(e.get("color")), a = Pt(e.get(["aria", "decal", "decals"]));
  if (t) {
    r = r || [];
    var n, i;
    C(r, function(s) {
      var l = new kt(s), u = l.get("color"), f = l.get("decal");
      (l.get(["itemStyle", "color"]) || u && u !== "none") && (n = !0), (l.get(["itemStyle", "decal"]) || f && f !== "none") && (i = !0);
    });
    var o = r[0] || (r[0] = {});
    return n || (o.color = t.slice()), !i && a && (o.decal = a.slice()), r;
  }
}
const x3 = _3;
var w3 = 8, MS = 8, wc = 5, b3 = (
  /** @class */
  function() {
    function r(e) {
      this.group = new nt(), e.add(this.group);
    }
    return r.prototype.render = function(e, t, a, n) {
      var i = e.getModel("breadcrumb"), o = this.group;
      if (o.removeAll(), !(!i.get("show") || !a)) {
        var s = i.getModel("itemStyle"), l = i.getModel("emphasis"), u = s.getModel("textStyle"), f = l.getModel(["itemStyle", "textStyle"]), h = {
          pos: {
            left: i.get("left"),
            right: i.get("right"),
            top: i.get("top"),
            bottom: i.get("bottom")
          },
          box: {
            width: t.getWidth(),
            height: t.getHeight()
          },
          emptyItemWidth: i.get("emptyItemWidth"),
          totalWidth: 0,
          renderList: []
        };
        this._prepare(a, h, u), this._renderContent(e, h, s, l, u, f, n), Mh(o, h.pos, h.box);
      }
    }, r.prototype._prepare = function(e, t, a) {
      for (var n = e; n; n = n.parentNode) {
        var i = ee(n.getModel().get("name"), ""), o = a.getTextRect(i), s = Math.max(o.width + w3 * 2, t.emptyItemWidth);
        t.totalWidth += s + MS, t.renderList.push({
          node: n,
          text: i,
          width: s
        });
      }
    }, r.prototype._renderContent = function(e, t, a, n, i, o, s) {
      for (var l = 0, u = t.emptyItemWidth, f = e.get(["breadcrumb", "height"]), h = EN(t.pos, t.box), v = t.totalWidth, c = t.renderList, p = n.getModel("itemStyle").getItemStyle(), d = c.length - 1; d >= 0; d--) {
        var g = c[d], y = g.node, m = g.width, _ = g.text;
        v > h.width && (v -= m - u, m = u, _ = null);
        var S = new Be({
          shape: {
            points: T3(l, 0, m, f, d === c.length - 1, d === 0)
          },
          style: tt(a.getItemStyle(), {
            lineJoin: "bevel"
          }),
          textContent: new Dt({
            style: Ot(i, {
              text: _
            })
          }),
          textConfig: {
            position: "inside"
          },
          z2: bo * 1e4,
          onclick: ot(s, y)
        });
        S.disableLabelAnimation = !0, S.getTextContent().ensureState("emphasis").style = Ot(o, {
          text: _
        }), S.ensureState("emphasis").style = p, Wt(S, n.get("focus"), n.get("blurScope"), n.get("disabled")), this.group.add(S), D3(S, e, y), l += m + MS;
      }
    }, r.prototype.remove = function() {
      this.group.removeAll();
    }, r;
  }()
);
function T3(r, e, t, a, n, i) {
  var o = [[n ? r : r - wc, e], [r + t, e], [r + t, e + a], [n ? r : r - wc, e + a]];
  return !i && o.splice(2, 0, [r + t + wc, e + a / 2]), !n && o.push([r, e + a / 2]), o;
}
function D3(r, e, t) {
  it(r).eventData = {
    componentType: "series",
    componentSubType: "treemap",
    componentIndex: e.componentIndex,
    seriesIndex: e.seriesIndex,
    seriesName: e.name,
    seriesType: "treemap",
    selfType: "breadcrumb",
    nodeData: {
      dataIndex: t && t.dataIndex,
      name: t && t.name
    },
    treePathInfo: t && Fh(t, e)
  };
}
const C3 = b3;
var A3 = (
  /** @class */
  function() {
    function r() {
      this._storage = [], this._elExistsMap = {};
    }
    return r.prototype.add = function(e, t, a, n, i) {
      return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
        el: e,
        target: t,
        duration: a,
        delay: n,
        easing: i
      }), !0);
    }, r.prototype.finished = function(e) {
      return this._finishedCallback = e, this;
    }, r.prototype.start = function() {
      for (var e = this, t = this._storage.length, a = function() {
        t--, t <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
      }, n = 0, i = this._storage.length; n < i; n++) {
        var o = this._storage[n];
        o.el.animateTo(o.target, {
          duration: o.duration,
          delay: o.delay,
          easing: o.easing,
          setToFinal: !0,
          done: a,
          aborted: a
        });
      }
      return this;
    }, r;
  }()
);
function M3() {
  return new A3();
}
var Ld = nt, IS = bt, LS = 3, ES = "label", PS = "upperLabel", I3 = bo * 10, L3 = bo * 2, E3 = bo * 3, kn = hi([
  ["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.
]), RS = function(r) {
  var e = kn(r);
  return e.stroke = e.fill = e.lineWidth = null, e;
}, Gf = Tt(), P3 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._state = "ready", t._storage = is(), t;
    }
    return e.prototype.render = function(t, a, n, i) {
      var o = a.findComponents({
        mainType: "series",
        subType: "treemap",
        query: i
      });
      if (!(ct(o, t) < 0)) {
        this.seriesModel = t, this.api = n, this.ecModel = a;
        var s = ["treemapZoomToNode", "treemapRootToNode"], l = al(i, s, t), u = i && i.type, f = t.layoutInfo, h = !this._oldTree, v = this._storage, c = u === "treemapRootToNode" && l && v ? {
          rootNodeGroup: v.nodeGroup[l.node.getRawIndex()],
          direction: i.direction
        } : null, p = this._giveContainerGroup(f), d = t.get("animation"), g = this._doRender(p, t, c);
        d && !h && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, t, c) : g.renderFinally(), this._resetController(n), this._renderBreadcrumb(t, n, l);
      }
    }, e.prototype._giveContainerGroup = function(t) {
      var a = this._containerGroup;
      return a || (a = this._containerGroup = new Ld(), this._initEvents(a), this.group.add(a)), a.x = t.x, a.y = t.y, a;
    }, e.prototype._doRender = function(t, a, n) {
      var i = a.getData().tree, o = this._oldTree, s = is(), l = is(), u = this._storage, f = [];
      function h(g, y, m, _) {
        return R3(a, l, u, n, s, f, g, y, m, _);
      }
      c(i.root ? [i.root] : [], o && o.root ? [o.root] : [], t, i === o || !o, 0);
      var v = p(u);
      return this._oldTree = i, this._storage = l, {
        lastsForAnimation: s,
        willDeleteEls: v,
        renderFinally: d
      };
      function c(g, y, m, _, S) {
        _ ? (y = g, C(g, function(b, T) {
          !b.isRemoved() && x(T, T);
        })) : new ya(y, g, w, w).add(x).update(x).remove(ot(x, null)).execute();
        function w(b) {
          return b.getId();
        }
        function x(b, T) {
          var D = b != null ? g[b] : null, A = T != null ? y[T] : null, M = h(D, A, m, S);
          M && c(D && D.viewChildren || [], A && A.viewChildren || [], M, _, S + 1);
        }
      }
      function p(g) {
        var y = is();
        return g && C(g, function(m, _) {
          var S = y[_];
          C(m, function(w) {
            w && (S.push(w), Gf(w).willDelete = !0);
          });
        }), y;
      }
      function d() {
        C(v, function(g) {
          C(g, function(y) {
            y.parent && y.parent.remove(y);
          });
        }), C(f, function(g) {
          g.invisible = !0, g.dirty();
        });
      }
    }, e.prototype._doAnimation = function(t, a, n, i) {
      var o = n.get("animationDurationUpdate"), s = n.get("animationEasing"), l = (q(o) ? 0 : o) || 0, u = (q(s) ? null : s) || "cubicOut", f = M3();
      C(a.willDeleteEls, function(h, v) {
        C(h, function(c, p) {
          if (!c.invisible) {
            var d = c.parent, g, y = Gf(d);
            if (i && i.direction === "drillDown")
              g = d === i.rootNodeGroup ? {
                shape: {
                  x: 0,
                  y: 0,
                  width: y.nodeWidth,
                  height: y.nodeHeight
                },
                style: {
                  opacity: 0
                }
              } : {
                style: {
                  opacity: 0
                }
              };
            else {
              var m = 0, _ = 0;
              y.willDelete || (m = y.nodeWidth / 2, _ = y.nodeHeight / 2), g = v === "nodeGroup" ? {
                x: m,
                y: _,
                style: {
                  opacity: 0
                }
              } : {
                shape: {
                  x: m,
                  y: _,
                  width: 0,
                  height: 0
                },
                style: {
                  opacity: 0
                }
              };
            }
            g && f.add(c, g, l, 0, u);
          }
        });
      }), C(this._storage, function(h, v) {
        C(h, function(c, p) {
          var d = a.lastsForAnimation[v][p], g = {};
          d && (c instanceof nt ? d.oldX != null && (g.x = c.x, g.y = c.y, c.x = d.oldX, c.y = d.oldY) : (d.oldShape && (g.shape = V({}, c.shape), c.setShape(d.oldShape)), d.fadein ? (c.setStyle("opacity", 0), g.style = {
            opacity: 1
          }) : c.style.opacity !== 1 && (g.style = {
            opacity: 1
          })), f.add(c, g, l, 0, u));
        });
      }, this), this._state = "animating", f.finished(Y(function() {
        this._state = "ready", a.renderFinally();
      }, this)).start();
    }, e.prototype._resetController = function(t) {
      var a = this._controller;
      a || (a = this._controller = new Il(t.getZr()), a.enable(this.seriesModel.get("roam")), a.on("pan", Y(this._onPan, this)), a.on("zoom", Y(this._onZoom, this)));
      var n = new ht(0, 0, t.getWidth(), t.getHeight());
      a.setPointerChecker(function(i, o, s) {
        return n.contain(o, s);
      });
    }, e.prototype._clearController = function() {
      var t = this._controller;
      t && (t.dispose(), t = null);
    }, e.prototype._onPan = function(t) {
      if (this._state !== "animating" && (Math.abs(t.dx) > LS || Math.abs(t.dy) > LS)) {
        var a = this.seriesModel.getData().tree.root;
        if (!a)
          return;
        var n = a.getLayout();
        if (!n)
          return;
        this.api.dispatchAction({
          type: "treemapMove",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: n.x + t.dx,
            y: n.y + t.dy,
            width: n.width,
            height: n.height
          }
        });
      }
    }, e.prototype._onZoom = function(t) {
      var a = t.originX, n = t.originY;
      if (this._state !== "animating") {
        var i = this.seriesModel.getData().tree.root;
        if (!i)
          return;
        var o = i.getLayout();
        if (!o)
          return;
        var s = new ht(o.x, o.y, o.width, o.height), l = this.seriesModel.layoutInfo;
        a -= l.x, n -= l.y;
        var u = lr();
        Ur(u, u, [-a, -n]), dg(u, u, [t.scale, t.scale]), Ur(u, u, [a, n]), s.applyTransform(u), this.api.dispatchAction({
          type: "treemapRender",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: s.x,
            y: s.y,
            width: s.width,
            height: s.height
          }
        });
      }
    }, e.prototype._initEvents = function(t) {
      var a = this;
      t.on("click", function(n) {
        if (a._state === "ready") {
          var i = a.seriesModel.get("nodeClick", !0);
          if (i) {
            var o = a.findTarget(n.offsetX, n.offsetY);
            if (o) {
              var s = o.node;
              if (s.getLayout().isLeafRoot)
                a._rootToNode(o);
              else if (i === "zoomToNode")
                a._zoomToNode(o);
              else if (i === "link") {
                var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), f = l.get("target", !0) || "blank";
                u && Sf(u, f);
              }
            }
          }
        }
      }, this);
    }, e.prototype._renderBreadcrumb = function(t, a, n) {
      var i = this;
      n || (n = t.get("leafDepth", !0) != null ? {
        node: t.getViewRoot()
      } : this.findTarget(a.getWidth() / 2, a.getHeight() / 2), n || (n = {
        node: t.getData().tree.root
      })), (this._breadcrumb || (this._breadcrumb = new C3(this.group))).render(t, a, n.node, function(o) {
        i._state !== "animating" && (Ay(t.getViewRoot(), o) ? i._rootToNode({
          node: o
        }) : i._zoomToNode({
          node: o
        }));
      });
    }, e.prototype.remove = function() {
      this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = is(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
    }, e.prototype.dispose = function() {
      this._clearController();
    }, e.prototype._zoomToNode = function(t) {
      this.api.dispatchAction({
        type: "treemapZoomToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: t.node
      });
    }, e.prototype._rootToNode = function(t) {
      this.api.dispatchAction({
        type: "treemapRootToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: t.node
      });
    }, e.prototype.findTarget = function(t, a) {
      var n, i = this.seriesModel.getViewRoot();
      return i.eachNode({
        attr: "viewChildren",
        order: "preorder"
      }, function(o) {
        var s = this._storage.background[o.getRawIndex()];
        if (s) {
          var l = s.transformCoordToLocal(t, a), u = s.shape;
          if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
            n = {
              node: o,
              offsetX: l[0],
              offsetY: l[1]
            };
          else
            return !1;
        }
      }, this), n;
    }, e.type = "treemap", e;
  }(Vt)
);
function is() {
  return {
    nodeGroup: [],
    background: [],
    content: []
  };
}
function R3(r, e, t, a, n, i, o, s, l, u) {
  if (!o)
    return;
  var f = o.getLayout(), h = r.getData(), v = o.getModel();
  if (h.setItemGraphicEl(o.dataIndex, null), !f || !f.isInView)
    return;
  var c = f.width, p = f.height, d = f.borderWidth, g = f.invisible, y = o.getRawIndex(), m = s && s.getRawIndex(), _ = o.viewChildren, S = f.upperHeight, w = _ && _.length, x = v.getModel("itemStyle"), b = v.getModel(["emphasis", "itemStyle"]), T = v.getModel(["blur", "itemStyle"]), D = v.getModel(["select", "itemStyle"]), A = x.get("borderRadius") || 0, M = et("nodeGroup", Ld);
  if (!M)
    return;
  if (l.add(M), M.x = f.x || 0, M.y = f.y || 0, M.markRedraw(), Gf(M).nodeWidth = c, Gf(M).nodeHeight = p, f.isAboveViewRoot)
    return M;
  var I = et("background", IS, u, L3);
  I && B(M, I, w && f.upperLabelHeight);
  var L = v.getModel("emphasis"), E = L.get("focus"), P = L.get("blurScope"), R = L.get("disabled"), k = E === "ancestor" ? o.getAncestorsIndices() : E === "descendant" ? o.getDescendantIndices() : E;
  if (w)
    ja(M) && Yn(M, !1), I && (Yn(I, !R), h.setItemGraphicEl(o.dataIndex, I), qp(I, k, P));
  else {
    var O = et("content", IS, u, E3);
    O && F(M, O), I.disableMorphing = !0, I && ja(I) && Yn(I, !1), Yn(M, !R), h.setItemGraphicEl(o.dataIndex, M), qp(M, k, P);
  }
  return M;
  function B(dt, at, mt) {
    var vt = it(at);
    if (vt.dataIndex = o.dataIndex, vt.seriesIndex = r.seriesIndex, at.setShape({
      x: 0,
      y: 0,
      width: c,
      height: p,
      r: A
    }), g)
      W(at);
    else {
      at.invisible = !1;
      var X = o.getVisual("style"), st = X.stroke, zt = RS(x);
      zt.fill = st;
      var xt = kn(b);
      xt.fill = b.get("borderColor");
      var Ut = kn(T);
      Ut.fill = T.get("borderColor");
      var Ht = kn(D);
      if (Ht.fill = D.get("borderColor"), mt) {
        var ge = c - 2 * d;
        Z(
          // PENDING: convert ZRColor to ColorString for text.
          at,
          st,
          X.opacity,
          {
            x: d,
            y: 0,
            width: ge,
            height: S
          }
        );
      } else
        at.removeTextContent();
      at.setStyle(zt), at.ensureState("emphasis").style = xt, at.ensureState("blur").style = Ut, at.ensureState("select").style = Ht, vi(at);
    }
    dt.add(at);
  }
  function F(dt, at) {
    var mt = it(at);
    mt.dataIndex = o.dataIndex, mt.seriesIndex = r.seriesIndex;
    var vt = Math.max(c - 2 * d, 0), X = Math.max(p - 2 * d, 0);
    if (at.culling = !0, at.setShape({
      x: d,
      y: d,
      width: vt,
      height: X,
      r: A
    }), g)
      W(at);
    else {
      at.invisible = !1;
      var st = o.getVisual("style"), zt = st.fill, xt = RS(x);
      xt.fill = zt, xt.decal = st.decal;
      var Ut = kn(b), Ht = kn(T), ge = kn(D);
      Z(at, zt, st.opacity, null), at.setStyle(xt), at.ensureState("emphasis").style = Ut, at.ensureState("blur").style = Ht, at.ensureState("select").style = ge, vi(at);
    }
    dt.add(at);
  }
  function W(dt) {
    !dt.invisible && i.push(dt);
  }
  function Z(dt, at, mt, vt) {
    var X = v.getModel(vt ? PS : ES), st = ee(v.get("name"), null), zt = X.getShallow("show");
    pe(dt, ie(v, vt ? PS : ES), {
      defaultText: zt ? st : null,
      inheritColor: at,
      defaultOpacity: mt,
      labelFetcher: r,
      labelDataIndex: o.dataIndex
    });
    var xt = dt.getTextContent();
    if (xt) {
      var Ut = xt.style, Ht = vg(Ut.padding || 0);
      vt && (dt.setTextConfig({
        layoutRect: vt
      }), xt.disableLabelLayout = !0), xt.beforeUpdate = function() {
        var Qr = Math.max((vt ? vt.width : dt.shape.width) - Ht[1] - Ht[3], 0), Ie = Math.max((vt ? vt.height : dt.shape.height) - Ht[0] - Ht[2], 0);
        (Ut.width !== Qr || Ut.height !== Ie) && xt.setStyle({
          width: Qr,
          height: Ie
        });
      }, Ut.truncateMinChar = 2, Ut.lineOverflow = "truncate", J(Ut, vt, f);
      var ge = xt.getState("emphasis");
      J(ge ? ge.style : null, vt, f);
    }
  }
  function J(dt, at, mt) {
    var vt = dt ? dt.text : null;
    if (!at && mt.isLeafRoot && vt != null) {
      var X = r.get("drillDownIcon", !0);
      dt.text = X ? X + " " + vt : vt;
    }
  }
  function et(dt, at, mt, vt) {
    var X = m != null && t[dt][m], st = n[dt];
    return X ? (t[dt][m] = null, yt(st, X)) : g || (X = new at(), X instanceof ur && (X.z2 = N3(mt, vt)), At(st, X)), e[dt][y] = X;
  }
  function yt(dt, at) {
    var mt = dt[y] = {};
    at instanceof Ld ? (mt.oldX = at.x, mt.oldY = at.y) : mt.oldShape = V({}, at.shape);
  }
  function At(dt, at) {
    var mt = dt[y] = {}, vt = o.parentNode, X = at instanceof nt;
    if (vt && (!a || a.direction === "drillDown")) {
      var st = 0, zt = 0, xt = n.background[vt.getRawIndex()];
      !a && xt && xt.oldShape && (st = xt.oldShape.width, zt = xt.oldShape.height), X ? (mt.oldX = 0, mt.oldY = zt) : mt.oldShape = {
        x: st,
        y: zt,
        width: 0,
        height: 0
      };
    }
    mt.fadein = !X;
  }
}
function N3(r, e) {
  return r * I3 + e;
}
const O3 = P3;
var nl = C, k3 = j, Ff = -1, My = (
  /** @class */
  function() {
    function r(e) {
      var t = e.mappingMethod, a = e.type, n = this.option = rt(e);
      this.type = a, this.mappingMethod = t, this._normalizeData = z3[t];
      var i = r.visualHandlers[a];
      this.applyVisual = i.applyVisual, this.getColorMapper = i.getColorMapper, this._normalizedToVisual = i._normalizedToVisual[t], t === "piecewise" ? (bc(n), V3(n)) : t === "category" ? n.categories ? B3(n) : bc(n, !0) : (Q(t !== "linear" || n.dataExtent), bc(n));
    }
    return r.prototype.mapValueToVisual = function(e) {
      var t = this._normalizeData(e);
      return this._normalizedToVisual(t, e);
    }, r.prototype.getNormalizer = function() {
      return Y(this._normalizeData, this);
    }, r.listVisualTypes = function() {
      return _t(r.visualHandlers);
    }, r.isValidType = function(e) {
      return r.visualHandlers.hasOwnProperty(e);
    }, r.eachVisual = function(e, t, a) {
      j(e) ? C(e, t, a) : t.call(a, e);
    }, r.mapVisual = function(e, t, a) {
      var n, i = z(e) ? [] : j(e) ? {} : (n = !0, null);
      return r.eachVisual(e, function(o, s) {
        var l = t.call(a, o, s);
        n ? i = l : i[s] = l;
      }), i;
    }, r.retrieveVisuals = function(e) {
      var t = {}, a;
      return e && nl(r.visualHandlers, function(n, i) {
        e.hasOwnProperty(i) && (t[i] = e[i], a = !0);
      }), a ? t : null;
    }, r.prepareVisualTypes = function(e) {
      if (z(e))
        e = e.slice();
      else if (k3(e)) {
        var t = [];
        nl(e, function(a, n) {
          t.push(n);
        }), e = t;
      } else
        return [];
      return e.sort(function(a, n) {
        return n === "color" && a !== "color" && a.indexOf("color") === 0 ? 1 : -1;
      }), e;
    }, r.dependsOn = function(e, t) {
      return t === "color" ? !!(e && e.indexOf(t) === 0) : e === t;
    }, r.findPieceIndex = function(e, t, a) {
      for (var n, i = 1 / 0, o = 0, s = t.length; o < s; o++) {
        var l = t[o].value;
        if (l != null) {
          if (l === e || $(l) && l === e + "")
            return o;
          a && v(l, o);
        }
      }
      for (var o = 0, s = t.length; o < s; o++) {
        var u = t[o], f = u.interval, h = u.close;
        if (f) {
          if (f[0] === -1 / 0) {
            if (xu(h[1], e, f[1]))
              return o;
          } else if (f[1] === 1 / 0) {
            if (xu(h[0], f[0], e))
              return o;
          } else if (xu(h[0], f[0], e) && xu(h[1], e, f[1]))
            return o;
          a && v(f[0], o), a && v(f[1], o);
        }
      }
      if (a)
        return e === 1 / 0 ? t.length - 1 : e === -1 / 0 ? 0 : n;
      function v(c, p) {
        var d = Math.abs(c - e);
        d < i && (i = d, n = p);
      }
    }, r.visualHandlers = {
      color: {
        applyVisual: os("color"),
        getColorMapper: function() {
          var e = this.option;
          return Y(e.mappingMethod === "category" ? function(t, a) {
            return !a && (t = this._normalizeData(t)), ws.call(this, t);
          } : function(t, a, n) {
            var i = !!n;
            return !a && (t = this._normalizeData(t)), n = rv(t, e.parsedVisual, n), i ? n : ua(n, "rgba");
          }, this);
        },
        _normalizedToVisual: {
          linear: function(e) {
            return ua(rv(e, this.option.parsedVisual), "rgba");
          },
          category: ws,
          piecewise: function(e, t) {
            var a = Pd.call(this, t);
            return a == null && (a = ua(rv(e, this.option.parsedVisual), "rgba")), a;
          },
          fixed: Vn
        }
      },
      colorHue: Su(function(e, t) {
        return Cs(e, t);
      }),
      colorSaturation: Su(function(e, t) {
        return Cs(e, null, t);
      }),
      colorLightness: Su(function(e, t) {
        return Cs(e, null, null, t);
      }),
      colorAlpha: Su(function(e, t) {
        return sf(e, t);
      }),
      decal: {
        applyVisual: os("decal"),
        _normalizedToVisual: {
          linear: null,
          category: ws,
          piecewise: null,
          fixed: null
        }
      },
      opacity: {
        applyVisual: os("opacity"),
        _normalizedToVisual: Ed([0, 1])
      },
      liftZ: {
        applyVisual: os("liftZ"),
        _normalizedToVisual: {
          linear: Vn,
          category: Vn,
          piecewise: Vn,
          fixed: Vn
        }
      },
      symbol: {
        applyVisual: function(e, t, a) {
          var n = this.mapValueToVisual(e);
          a("symbol", n);
        },
        _normalizedToVisual: {
          linear: NS,
          category: ws,
          piecewise: function(e, t) {
            var a = Pd.call(this, t);
            return a == null && (a = NS.call(this, e)), a;
          },
          fixed: Vn
        }
      },
      symbolSize: {
        applyVisual: os("symbolSize"),
        _normalizedToVisual: Ed([0, 1])
      }
    }, r;
  }()
);
function V3(r) {
  var e = r.pieceList;
  r.hasSpecialVisual = !1, C(e, function(t, a) {
    t.originIndex = a, t.visual != null && (r.hasSpecialVisual = !0);
  });
}
function B3(r) {
  var e = r.categories, t = r.categoryMap = {}, a = r.visual;
  if (nl(e, function(o, s) {
    t[o] = s;
  }), !z(a)) {
    var n = [];
    j(a) ? nl(a, function(o, s) {
      var l = t[s];
      n[l ?? Ff] = o;
    }) : n[Ff] = a, a = kM(r, n);
  }
  for (var i = e.length - 1; i >= 0; i--)
    a[i] == null && (delete t[e[i]], e.pop());
}
function bc(r, e) {
  var t = r.visual, a = [];
  j(t) ? nl(t, function(i) {
    a.push(i);
  }) : t != null && a.push(t);
  var n = {
    color: 1,
    symbol: 1
  };
  !e && a.length === 1 && !n.hasOwnProperty(r.type) && (a[1] = a[0]), kM(r, a);
}
function Su(r) {
  return {
    applyVisual: function(e, t, a) {
      var n = this.mapValueToVisual(e);
      a("color", r(t("color"), n));
    },
    _normalizedToVisual: Ed([0, 1])
  };
}
function NS(r) {
  var e = this.option.visual;
  return e[Math.round(Lt(r, [0, 1], [0, e.length - 1], !0))] || {};
}
function os(r) {
  return function(e, t, a) {
    a(r, this.mapValueToVisual(e));
  };
}
function ws(r) {
  var e = this.option.visual;
  return e[this.option.loop && r !== Ff ? r % e.length : r];
}
function Vn() {
  return this.option.visual[0];
}
function Ed(r) {
  return {
    linear: function(e) {
      return Lt(e, r, this.option.visual, !0);
    },
    category: ws,
    piecewise: function(e, t) {
      var a = Pd.call(this, t);
      return a == null && (a = Lt(e, r, this.option.visual, !0)), a;
    },
    fixed: Vn
  };
}
function Pd(r) {
  var e = this.option, t = e.pieceList;
  if (e.hasSpecialVisual) {
    var a = My.findPieceIndex(r, t), n = t[a];
    if (n && n.visual)
      return n.visual[this.type];
  }
}
function kM(r, e) {
  return r.visual = e, r.type === "color" && (r.parsedVisual = G(e, function(t) {
    var a = $e(t);
    return !a && {}.NODE_ENV !== "production" && Ft("'" + t + "' is an illegal color, fallback to '#000000'", !0), a || [0, 0, 0, 1];
  })), e;
}
var z3 = {
  linear: function(r) {
    return Lt(r, this.option.dataExtent, [0, 1], !0);
  },
  piecewise: function(r) {
    var e = this.option.pieceList, t = My.findPieceIndex(r, e, !0);
    if (t != null)
      return Lt(t, [0, e.length - 1], [0, 1], !0);
  },
  category: function(r) {
    var e = this.option.categories ? this.option.categoryMap[r] : r;
    return e ?? Ff;
  },
  fixed: Xt
};
function xu(r, e, t) {
  return r ? e <= t : e < t;
}
const he = My;
var G3 = "itemStyle", VM = Tt();
const F3 = {
  seriesType: "treemap",
  reset: function(r) {
    var e = r.getData().tree, t = e.root;
    t.isRemoved() || BM(
      t,
      // Visual should calculate from tree root but not view root.
      {},
      r.getViewRoot().getAncestors(),
      r
    );
  }
};
function BM(r, e, t, a) {
  var n = r.getModel(), i = r.getLayout(), o = r.hostTree.data;
  if (!(!i || i.invisible || !i.isInView)) {
    var s = n.getModel(G3), l = H3(s, e, a), u = o.ensureUniqueItemVisual(r.dataIndex, "style"), f = s.get("borderColor"), h = s.get("borderColorSaturation"), v;
    h != null && (v = OS(l), f = W3(h, v)), u.stroke = f;
    var c = r.viewChildren;
    if (!c || !c.length)
      v = OS(l), u.fill = v;
    else {
      var p = $3(r, n, i, s, l, c);
      C(c, function(d, g) {
        if (d.depth >= t.length || d === t[d.depth]) {
          var y = U3(n, l, d, g, p, a);
          BM(d, y, t, a);
        }
      });
    }
  }
}
function H3(r, e, t) {
  var a = V({}, e), n = t.designatedVisualItemStyle;
  return C(["color", "colorAlpha", "colorSaturation"], function(i) {
    n[i] = e[i];
    var o = r.get(i);
    n[i] = null, o != null && (a[i] = o);
  }), a;
}
function OS(r) {
  var e = Tc(r, "color");
  if (e) {
    var t = Tc(r, "colorAlpha"), a = Tc(r, "colorSaturation");
    return a && (e = Cs(e, null, null, a)), t && (e = sf(e, t)), e;
  }
}
function W3(r, e) {
  return e != null ? Cs(e, null, null, r) : null;
}
function Tc(r, e) {
  var t = r[e];
  if (t != null && t !== "none")
    return t;
}
function $3(r, e, t, a, n, i) {
  if (!(!i || !i.length)) {
    var o = Dc(e, "color") || n.color != null && n.color !== "none" && (Dc(e, "colorAlpha") || Dc(e, "colorSaturation"));
    if (o) {
      var s = e.get("visualMin"), l = e.get("visualMax"), u = t.dataExtent.slice();
      s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
      var f = e.get("colorMappingBy"), h = {
        type: o.name,
        dataExtent: u,
        visual: o.range
      };
      h.type === "color" && (f === "index" || f === "id") ? (h.mappingMethod = "category", h.loop = !0) : h.mappingMethod = "linear";
      var v = new he(h);
      return VM(v).drColorMappingBy = f, v;
    }
  }
}
function Dc(r, e) {
  var t = r.get(e);
  return z(t) && t.length ? {
    name: e,
    range: t
  } : null;
}
function U3(r, e, t, a, n, i) {
  var o = V({}, e);
  if (n) {
    var s = n.type, l = s === "color" && VM(n).drColorMappingBy, u = l === "index" ? a : l === "id" ? i.mapIdToIndex(t.getId()) : t.getValue(r.get("visualDimension"));
    o[s] = n.mapValueToVisual(u);
  }
  return o;
}
var il = Math.max, Hf = Math.min, kS = jt, Iy = C, zM = ["itemStyle", "borderWidth"], Y3 = ["itemStyle", "gapWidth"], Z3 = ["upperLabel", "show"], X3 = ["upperLabel", "height"];
const q3 = {
  seriesType: "treemap",
  reset: function(r, e, t, a) {
    var n = t.getWidth(), i = t.getHeight(), o = r.option, s = re(r.getBoxLayoutParams(), {
      width: t.getWidth(),
      height: t.getHeight()
    }), l = o.size || [], u = H(kS(s.width, l[0]), n), f = H(kS(s.height, l[1]), i), h = a && a.type, v = ["treemapZoomToNode", "treemapRootToNode"], c = al(a, v, r), p = h === "treemapRender" || h === "treemapMove" ? a.rootRect : null, d = r.getViewRoot(), g = RM(d);
    if (h !== "treemapMove") {
      var y = h === "treemapZoomToNode" ? eH(r, c, d, u, f) : p ? [p.width, p.height] : [u, f], m = o.sort;
      m && m !== "asc" && m !== "desc" && (m = "desc");
      var _ = {
        squareRatio: o.squareRatio,
        sort: m,
        leafDepth: o.leafDepth
      };
      d.hostTree.clearLayouts();
      var S = {
        x: 0,
        y: 0,
        width: y[0],
        height: y[1],
        area: y[0] * y[1]
      };
      d.setLayout(S), GM(d, _, !1, 0), S = d.getLayout(), Iy(g, function(x, b) {
        var T = (g[b + 1] || d).getValue();
        x.setLayout(V({
          dataExtent: [T, T],
          borderWidth: 0,
          upperHeight: 0
        }, S));
      });
    }
    var w = r.getData().tree.root;
    w.setLayout(rH(s, p, c), !0), r.setLayoutInfo(s), FM(
      w,
      // Transform to base element coordinate system.
      new ht(-s.x, -s.y, n, i),
      g,
      d,
      0
    );
  }
};
function GM(r, e, t, a) {
  var n, i;
  if (!r.isRemoved()) {
    var o = r.getLayout();
    n = o.width, i = o.height;
    var s = r.getModel(), l = s.get(zM), u = s.get(Y3) / 2, f = HM(s), h = Math.max(l, f), v = l - u, c = h - u;
    r.setLayout({
      borderWidth: l,
      upperHeight: h,
      upperLabelHeight: f
    }, !0), n = il(n - 2 * v, 0), i = il(i - v - c, 0);
    var p = n * i, d = K3(r, s, p, e, t, a);
    if (d.length) {
      var g = {
        x: v,
        y: c,
        width: n,
        height: i
      }, y = Hf(n, i), m = 1 / 0, _ = [];
      _.area = 0;
      for (var S = 0, w = d.length; S < w; ) {
        var x = d[S];
        _.push(x), _.area += x.getLayout().area;
        var b = tH(_, y, e.squareRatio);
        b <= m ? (S++, m = b) : (_.area -= _.pop().getLayout().area, VS(_, y, g, u, !1), y = Hf(g.width, g.height), _.length = _.area = 0, m = 1 / 0);
      }
      if (_.length && VS(_, y, g, u, !0), !t) {
        var T = s.get("childrenVisibleMin");
        T != null && p < T && (t = !0);
      }
      for (var S = 0, w = d.length; S < w; S++)
        GM(d[S], e, t, a + 1);
    }
  }
}
function K3(r, e, t, a, n, i) {
  var o = r.children || [], s = a.sort;
  s !== "asc" && s !== "desc" && (s = null);
  var l = a.leafDepth != null && a.leafDepth <= i;
  if (n && !l)
    return r.viewChildren = [];
  o = Et(o, function(c) {
    return !c.isRemoved();
  }), Q3(o, s);
  var u = J3(e, o, s);
  if (u.sum === 0)
    return r.viewChildren = [];
  if (u.sum = j3(e, t, u.sum, s, o), u.sum === 0)
    return r.viewChildren = [];
  for (var f = 0, h = o.length; f < h; f++) {
    var v = o[f].getValue() / u.sum * t;
    o[f].setLayout({
      area: v
    });
  }
  return l && (o.length && r.setLayout({
    isLeafRoot: !0
  }, !0), o.length = 0), r.viewChildren = o, r.setLayout({
    dataExtent: u.dataExtent
  }, !0), o;
}
function j3(r, e, t, a, n) {
  if (!a)
    return t;
  for (var i = r.get("visibleMin"), o = n.length, s = o, l = o - 1; l >= 0; l--) {
    var u = n[a === "asc" ? o - l - 1 : l].getValue();
    u / t * e < i && (s = l, t -= u);
  }
  return a === "asc" ? n.splice(0, o - s) : n.splice(s, o - s), t;
}
function Q3(r, e) {
  return e && r.sort(function(t, a) {
    var n = e === "asc" ? t.getValue() - a.getValue() : a.getValue() - t.getValue();
    return n === 0 ? e === "asc" ? t.dataIndex - a.dataIndex : a.dataIndex - t.dataIndex : n;
  }), r;
}
function J3(r, e, t) {
  for (var a = 0, n = 0, i = e.length; n < i; n++)
    a += e[n].getValue();
  var o = r.get("visualDimension"), s;
  return !e || !e.length ? s = [NaN, NaN] : o === "value" && t ? (s = [e[e.length - 1].getValue(), e[0].getValue()], t === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Iy(e, function(l) {
    var u = l.getValue(o);
    u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  })), {
    sum: a,
    dataExtent: s
  };
}
function tH(r, e, t) {
  for (var a = 0, n = 1 / 0, i = 0, o = void 0, s = r.length; i < s; i++)
    o = r[i].getLayout().area, o && (o < n && (n = o), o > a && (a = o));
  var l = r.area * r.area, u = e * e * t;
  return l ? il(u * a / l, l / (u * n)) : 1 / 0;
}
function VS(r, e, t, a, n) {
  var i = e === t.width ? 0 : 1, o = 1 - i, s = ["x", "y"], l = ["width", "height"], u = t[s[i]], f = e ? r.area / e : 0;
  (n || f > t[l[o]]) && (f = t[l[o]]);
  for (var h = 0, v = r.length; h < v; h++) {
    var c = r[h], p = {}, d = f ? c.getLayout().area / f : 0, g = p[l[o]] = il(f - 2 * a, 0), y = t[s[i]] + t[l[i]] - u, m = h === v - 1 || y < d ? y : d, _ = p[l[i]] = il(m - 2 * a, 0);
    p[s[o]] = t[s[o]] + Hf(a, g / 2), p[s[i]] = u + Hf(a, _ / 2), u += m, c.setLayout(p, !0);
  }
  t[s[o]] += f, t[l[o]] -= f;
}
function eH(r, e, t, a, n) {
  var i = (e || {}).node, o = [a, n];
  if (!i || i === t)
    return o;
  for (var s, l = a * n, u = l * r.option.zoomToNodeRatio; s = i.parentNode; ) {
    for (var f = 0, h = s.children, v = 0, c = h.length; v < c; v++)
      f += h[v].getValue();
    var p = i.getValue();
    if (p === 0)
      return o;
    u *= f / p;
    var d = s.getModel(), g = d.get(zM), y = Math.max(g, HM(d));
    u += 4 * g * g + (3 * g + y) * Math.pow(u, 0.5), u > Ym && (u = Ym), i = s;
  }
  u < l && (u = l);
  var m = Math.pow(u / l, 0.5);
  return [a * m, n * m];
}
function rH(r, e, t) {
  if (e)
    return {
      x: e.x,
      y: e.y
    };
  var a = {
    x: 0,
    y: 0
  };
  if (!t)
    return a;
  var n = t.node, i = n.getLayout();
  if (!i)
    return a;
  for (var o = [i.width / 2, i.height / 2], s = n; s; ) {
    var l = s.getLayout();
    o[0] += l.x, o[1] += l.y, s = s.parentNode;
  }
  return {
    x: r.width / 2 - o[0],
    y: r.height / 2 - o[1]
  };
}
function FM(r, e, t, a, n) {
  var i = r.getLayout(), o = t[n], s = o && o === r;
  if (!(o && !s || n === t.length && r !== a)) {
    r.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(i),
      isAboveViewRoot: s
    }, !0);
    var l = new ht(e.x - i.x, e.y - i.y, e.width, e.height);
    Iy(r.viewChildren || [], function(u) {
      FM(u, l, t, a, n + 1);
    });
  }
}
function HM(r) {
  return r.get(Z3) ? r.get(X3) : 0;
}
function aH(r) {
  r.registerSeriesModel(x3), r.registerChartView(O3), r.registerVisual(F3), r.registerLayout(q3), m3(r);
}
function nH(r) {
  var e = r.findComponents({
    mainType: "legend"
  });
  !e || !e.length || r.eachSeriesByType("graph", function(t) {
    var a = t.getCategoriesData(), n = t.getGraph(), i = n.data, o = a.mapArray(a.getName);
    i.filterSelf(function(s) {
      var l = i.getItemModel(s), u = l.getShallow("category");
      if (u != null) {
        Ct(u) && (u = o[u]);
        for (var f = 0; f < e.length; f++)
          if (!e[f].isSelected(u))
            return !1;
      }
      return !0;
    });
  });
}
function iH(r) {
  var e = {};
  r.eachSeriesByType("graph", function(t) {
    var a = t.getCategoriesData(), n = t.getData(), i = {};
    a.each(function(o) {
      var s = a.getName(o);
      i["ec-" + s] = o;
      var l = a.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
      u.fill || (u.fill = t.getColorFromPalette(s, e)), a.setItemVisual(o, "style", u);
      for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], h = 0; h < f.length; h++) {
        var v = l.getShallow(f[h], !0);
        v != null && a.setItemVisual(o, f[h], v);
      }
    }), a.count() && n.each(function(o) {
      var s = n.getItemModel(o), l = s.getShallow("category");
      if (l != null) {
        $(l) && (l = i["ec-" + l]);
        var u = a.getItemVisual(l, "style"), f = n.ensureUniqueItemVisual(o, "style");
        V(f, u);
        for (var h = ["symbol", "symbolSize", "symbolKeepAspect"], v = 0; v < h.length; v++)
          n.setItemVisual(o, h[v], a.getItemVisual(l, h[v]));
      }
    });
  });
}
function wu(r) {
  return r instanceof Array || (r = [r, r]), r;
}
function oH(r) {
  r.eachSeriesByType("graph", function(e) {
    var t = e.getGraph(), a = e.getEdgeData(), n = wu(e.get("edgeSymbol")), i = wu(e.get("edgeSymbolSize"));
    a.setVisual("fromSymbol", n && n[0]), a.setVisual("toSymbol", n && n[1]), a.setVisual("fromSymbolSize", i && i[0]), a.setVisual("toSymbolSize", i && i[1]), a.setVisual("style", e.getModel("lineStyle").getLineStyle()), a.each(function(o) {
      var s = a.getItemModel(o), l = t.getEdgeByIndex(o), u = wu(s.getShallow("symbol", !0)), f = wu(s.getShallow("symbolSize", !0)), h = s.getModel("lineStyle").getLineStyle(), v = a.ensureUniqueItemVisual(o, "style");
      switch (V(v, h), v.stroke) {
        case "source": {
          var c = l.node1.getVisual("style");
          v.stroke = c && c.fill;
          break;
        }
        case "target": {
          var c = l.node2.getVisual("style");
          v.stroke = c && c.fill;
          break;
        }
      }
      u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), f[0] && l.setVisual("fromSymbolSize", f[0]), f[1] && l.setVisual("toSymbolSize", f[1]);
    });
  });
}
var Rd = "-->", Hh = function(r) {
  return r.get("autoCurveness") || null;
}, WM = function(r, e) {
  var t = Hh(r), a = 20, n = [];
  if (Ct(t))
    a = t;
  else if (z(t)) {
    r.__curvenessList = t;
    return;
  }
  e > a && (a = e);
  var i = a % 2 ? a + 2 : a + 3;
  n = [];
  for (var o = 0; o < i; o++)
    n.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  r.__curvenessList = n;
}, ol = function(r, e, t) {
  var a = [r.id, r.dataIndex].join("."), n = [e.id, e.dataIndex].join(".");
  return [t.uid, a, n].join(Rd);
}, $M = function(r) {
  var e = r.split(Rd);
  return [e[0], e[2], e[1]].join(Rd);
}, sH = function(r, e) {
  var t = ol(r.node1, r.node2, e);
  return e.__edgeMap[t];
}, lH = function(r, e) {
  var t = Nd(ol(r.node1, r.node2, e), e), a = Nd(ol(r.node2, r.node1, e), e);
  return t + a;
}, Nd = function(r, e) {
  var t = e.__edgeMap;
  return t[r] ? t[r].length : 0;
};
function uH(r) {
  Hh(r) && (r.__curvenessList = [], r.__edgeMap = {}, WM(r));
}
function fH(r, e, t, a) {
  if (Hh(t)) {
    var n = ol(r, e, t), i = t.__edgeMap, o = i[$M(n)];
    i[n] && !o ? i[n].isForward = !0 : o && i[n] && (o.isForward = !0, i[n].isForward = !1), i[n] = i[n] || [], i[n].push(a);
  }
}
function Ly(r, e, t, a) {
  var n = Hh(e), i = z(n);
  if (!n)
    return null;
  var o = sH(r, e);
  if (!o)
    return null;
  for (var s = -1, l = 0; l < o.length; l++)
    if (o[l] === t) {
      s = l;
      break;
    }
  var u = lH(r, e);
  WM(e, u), r.lineStyle = r.lineStyle || {};
  var f = ol(r.node1, r.node2, e), h = e.__curvenessList, v = i || u % 2 ? 0 : 1;
  if (o.isForward)
    return h[v + s];
  var c = $M(f), p = Nd(c, e), d = h[s + p + v];
  return a ? i ? n && n[0] === 0 ? (p + v) % 2 ? d : -d : ((p % 2 ? 0 : 1) + v) % 2 ? d : -d : (p + v) % 2 ? d : -d : h[s + p + v];
}
function UM(r) {
  var e = r.coordinateSystem;
  if (!(e && e.type !== "view")) {
    var t = r.getGraph();
    t.eachNode(function(a) {
      var n = a.getModel();
      a.setLayout([+n.get("x"), +n.get("y")]);
    }), Ey(t, r);
  }
}
function Ey(r, e) {
  r.eachEdge(function(t, a) {
    var n = xr(t.getModel().get(["lineStyle", "curveness"]), -Ly(t, e, a, !0), 0), i = sa(t.node1.getLayout()), o = sa(t.node2.getLayout()), s = [i, o];
    +n && s.push([(i[0] + o[0]) / 2 - (i[1] - o[1]) * n, (i[1] + o[1]) / 2 - (o[0] - i[0]) * n]), t.setLayout(s);
  });
}
function hH(r, e) {
  r.eachSeriesByType("graph", function(t) {
    var a = t.get("layout"), n = t.coordinateSystem;
    if (n && n.type !== "view") {
      var i = t.getData(), o = [];
      C(n.dimensions, function(v) {
        o = o.concat(i.mapDimensionsAll(v));
      });
      for (var s = 0; s < i.count(); s++) {
        for (var l = [], u = !1, f = 0; f < o.length; f++) {
          var h = i.get(o[f], s);
          isNaN(h) || (u = !0), l.push(h);
        }
        u ? i.setItemLayout(s, n.dataToPoint(l)) : i.setItemLayout(s, [NaN, NaN]);
      }
      Ey(i.graph, t);
    } else
      (!a || a === "none") && UM(t);
  });
}
function bs(r) {
  var e = r.coordinateSystem;
  if (e.type !== "view")
    return 1;
  var t = r.option.nodeScaleRatio, a = e.scaleX, n = e.getZoom(), i = (n - 1) * t + 1;
  return i / a;
}
function Ts(r) {
  var e = r.getVisual("symbolSize");
  return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
}
var BS = Math.PI, Cc = [];
function Py(r, e, t, a) {
  var n = r.coordinateSystem;
  if (!(n && n.type !== "view")) {
    var i = n.getBoundingRect(), o = r.getData(), s = o.graph, l = i.width / 2 + i.x, u = i.height / 2 + i.y, f = Math.min(i.width, i.height) / 2, h = o.count();
    if (o.setLayout({
      cx: l,
      cy: u
    }), !!h) {
      if (t) {
        var v = n.pointToData(a), c = v[0], p = v[1], d = [c - l, p - u];
        So(d, d), ku(d, d, f), t.setLayout([l + d[0], u + d[1]], !0);
        var g = r.get(["circular", "rotateLabel"]);
        YM(t, g, l, u);
      }
      vH[e](r, s, o, f, l, u, h), s.eachEdge(function(y, m) {
        var _ = xr(y.getModel().get(["lineStyle", "curveness"]), Ly(y, r, m), 0), S = sa(y.node1.getLayout()), w = sa(y.node2.getLayout()), x, b = (S[0] + w[0]) / 2, T = (S[1] + w[1]) / 2;
        +_ && (_ *= 3, x = [l * _ + b * (1 - _), u * _ + T * (1 - _)]), y.setLayout([S, w, x]);
      });
    }
  }
}
var vH = {
  value: function(r, e, t, a, n, i, o) {
    var s = 0, l = t.getSum("value"), u = Math.PI * 2 / (l || o);
    e.eachNode(function(f) {
      var h = f.getValue("value"), v = u * (l ? h : 1) / 2;
      s += v, f.setLayout([a * Math.cos(s) + n, a * Math.sin(s) + i]), s += v;
    });
  },
  symbolSize: function(r, e, t, a, n, i, o) {
    var s = 0;
    Cc.length = o;
    var l = bs(r);
    e.eachNode(function(h) {
      var v = Ts(h);
      isNaN(v) && (v = 2), v < 0 && (v = 0), v *= l;
      var c = Math.asin(v / 2 / a);
      isNaN(c) && (c = BS / 2), Cc[h.dataIndex] = c, s += c * 2;
    });
    var u = (2 * BS - s) / o / 2, f = 0;
    e.eachNode(function(h) {
      var v = u + Cc[h.dataIndex];
      f += v, (!h.getLayout() || !h.getLayout().fixed) && h.setLayout([a * Math.cos(f) + n, a * Math.sin(f) + i]), f += v;
    });
  }
};
function YM(r, e, t, a) {
  var n = r.getGraphicEl();
  if (n) {
    var i = r.getModel(), o = i.get(["label", "rotate"]) || 0, s = n.getSymbolPath();
    if (e) {
      var l = r.getLayout(), u = Math.atan2(l[1] - a, l[0] - t);
      u < 0 && (u = Math.PI * 2 + u);
      var f = l[0] < t;
      f && (u = u - Math.PI);
      var h = f ? "left" : "right";
      s.setTextConfig({
        rotation: -u,
        position: h,
        origin: "center"
      });
      var v = s.ensureState("emphasis");
      V(v.textConfig || (v.textConfig = {}), {
        position: h
      });
    } else
      s.setTextConfig({
        rotation: o *= Math.PI / 180
      });
  }
}
function cH(r) {
  r.eachSeriesByType("graph", function(e) {
    e.get("layout") === "circular" && Py(e, "symbolSize");
  });
}
var Vi = Sp;
function pH(r, e, t) {
  for (var a = r, n = e, i = t.rect, o = i.width, s = i.height, l = [i.x + o / 2, i.y + s / 2], u = t.gravity == null ? 0.1 : t.gravity, f = 0; f < a.length; f++) {
    var h = a[f];
    h.p || (h.p = gi(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), h.pp = sa(h.p), h.edges = null;
  }
  var v = t.friction == null ? 0.6 : t.friction, c = v, p, d;
  return {
    warmUp: function() {
      c = v * 0.8;
    },
    setFixed: function(g) {
      a[g].fixed = !0;
    },
    setUnfixed: function(g) {
      a[g].fixed = !1;
    },
    /**
     * Before step hook
     */
    beforeStep: function(g) {
      p = g;
    },
    /**
     * After step hook
     */
    afterStep: function(g) {
      d = 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(a, n);
      for (var y = [], m = a.length, _ = 0; _ < n.length; _++) {
        var S = n[_];
        if (!S.ignoreForceLayout) {
          var w = S.n1, x = S.n2;
          $n(y, x.p, w.p);
          var b = xp(y) - S.d, T = x.w / (w.w + x.w);
          isNaN(T) && (T = 0), So(y, y), !w.fixed && Vi(w.p, w.p, y, T * b * c), !x.fixed && Vi(x.p, x.p, y, -(1 - T) * b * c);
        }
      }
      for (var _ = 0; _ < m; _++) {
        var D = a[_];
        D.fixed || ($n(y, l, D.p), Vi(D.p, D.p, y, u * c));
      }
      for (var _ = 0; _ < m; _++)
        for (var w = a[_], A = _ + 1; A < m; A++) {
          var x = a[A];
          $n(y, x.p, w.p);
          var b = xp(y);
          b === 0 && (_2(y, Math.random() - 0.5, Math.random() - 0.5), b = 1);
          var M = (w.rep + x.rep) / b / b;
          !w.fixed && Vi(w.pp, w.pp, y, M), !x.fixed && Vi(x.pp, x.pp, y, -M);
        }
      for (var I = [], _ = 0; _ < m; _++) {
        var D = a[_];
        D.fixed || ($n(I, D.p, D.pp), Vi(D.p, D.p, I, c), be(D.pp, D.p));
      }
      c = c * 0.992;
      var L = c < 0.01;
      d && d(a, n, L), g && g(L);
    }
  };
}
function dH(r) {
  r.eachSeriesByType("graph", function(e) {
    var t = e.coordinateSystem;
    if (!(t && t.type !== "view"))
      if (e.get("layout") === "force") {
        var a = e.preservedPoints || {}, n = e.getGraph(), i = n.data, o = n.edgeData, s = e.getModel("force"), l = s.get("initLayout");
        e.preservedPoints ? i.each(function(_) {
          var S = i.getId(_);
          i.setItemLayout(_, a[S] || [NaN, NaN]);
        }) : !l || l === "none" ? UM(e) : l === "circular" && Py(e, "value");
        var u = i.getDataExtent("value"), f = o.getDataExtent("value"), h = s.get("repulsion"), v = s.get("edgeLength"), c = z(h) ? h : [h, h], p = z(v) ? v : [v, v];
        p = [p[1], p[0]];
        var d = i.mapArray("value", function(_, S) {
          var w = i.getItemLayout(S), x = Lt(_, u, c);
          return isNaN(x) && (x = (c[0] + c[1]) / 2), {
            w: x,
            rep: x,
            fixed: i.getItemModel(S).get("fixed"),
            p: !w || isNaN(w[0]) || isNaN(w[1]) ? null : w
          };
        }), g = o.mapArray("value", function(_, S) {
          var w = n.getEdgeByIndex(S), x = Lt(_, f, p);
          isNaN(x) && (x = (p[0] + p[1]) / 2);
          var b = w.getModel(), T = xr(w.getModel().get(["lineStyle", "curveness"]), -Ly(w, e, S, !0), 0);
          return {
            n1: d[w.node1.dataIndex],
            n2: d[w.node2.dataIndex],
            d: x,
            curveness: T,
            ignoreForceLayout: b.get("ignoreForceLayout")
          };
        }), y = t.getBoundingRect(), m = pH(d, g, {
          rect: y,
          gravity: s.get("gravity"),
          friction: s.get("friction")
        });
        m.beforeStep(function(_, S) {
          for (var w = 0, x = _.length; w < x; w++)
            _[w].fixed && be(_[w].p, n.getNodeByIndex(w).getLayout());
        }), m.afterStep(function(_, S, w) {
          for (var x = 0, b = _.length; x < b; x++)
            _[x].fixed || n.getNodeByIndex(x).setLayout(_[x].p), a[i.getId(x)] = _[x].p;
          for (var x = 0, b = S.length; x < b; x++) {
            var T = S[x], D = n.getEdgeByIndex(x), A = T.n1.p, M = T.n2.p, I = D.getLayout();
            I = I ? I.slice() : [], I[0] = I[0] || [], I[1] = I[1] || [], be(I[0], A), be(I[1], M), +T.curveness && (I[2] = [(A[0] + M[0]) / 2 - (A[1] - M[1]) * T.curveness, (A[1] + M[1]) / 2 - (M[0] - A[0]) * T.curveness]), D.setLayout(I);
          }
        }), e.forceLayout = m, e.preservedPoints = a, m.step();
      } else
        e.forceLayout = null;
  });
}
function gH(r, e, t) {
  var a = V(r.getBoxLayoutParams(), {
    aspect: t
  });
  return re(a, {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function yH(r, e) {
  var t = [];
  return r.eachSeriesByType("graph", function(a) {
    var n = a.get("coordinateSystem");
    if (!n || n === "view") {
      var i = a.getData(), o = i.mapArray(function(g) {
        var y = i.getItemModel(g);
        return [+y.get("x"), +y.get("y")];
      }), s = [], l = [];
      dh(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]), f = gH(a, e, u);
      isNaN(u) && (s = [f.x, f.y], l = [f.x + f.width, f.y + f.height]);
      var h = l[0] - s[0], v = l[1] - s[1], c = f.width, p = f.height, d = a.coordinateSystem = new Ll();
      d.zoomLimit = a.get("scaleLimit"), d.setBoundingRect(s[0], s[1], h, v), d.setViewRect(f.x, f.y, c, p), d.setCenter(a.get("center"), e), d.setZoom(a.get("zoom")), t.push(d);
    }
  }), t;
}
var zS = le.prototype, Ac = _h.prototype, ZM = (
  /** @class */
  function() {
    function r() {
      this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
    }
    return r;
  }()
);
(function(r) {
  N(e, r);
  function e() {
    return r !== null && r.apply(this, arguments) || this;
  }
  return e;
})(ZM);
function Mc(r) {
  return isNaN(+r.cpx1) || isNaN(+r.cpy1);
}
var mH = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "ec-line", a;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new ZM();
    }, e.prototype.buildPath = function(t, a) {
      Mc(a) ? zS.buildPath.call(this, t, a) : Ac.buildPath.call(this, t, a);
    }, e.prototype.pointAt = function(t) {
      return Mc(this.shape) ? zS.pointAt.call(this, t) : Ac.pointAt.call(this, t);
    }, e.prototype.tangentAt = function(t) {
      var a = this.shape, n = Mc(a) ? [a.x2 - a.x1, a.y2 - a.y1] : Ac.tangentAt.call(this, t);
      return So(n, n);
    }, e;
  }(gt)
);
const _H = mH;
var Ic = ["fromSymbol", "toSymbol"];
function GS(r) {
  return "_" + r + "Type";
}
function FS(r, e, t) {
  var a = e.getItemVisual(t, r);
  if (!(!a || a === "none")) {
    var n = e.getItemVisual(t, r + "Size"), i = e.getItemVisual(t, r + "Rotate"), o = e.getItemVisual(t, r + "Offset"), s = e.getItemVisual(t, r + "KeepAspect"), l = Sl(n), u = Oo(o || 0, l), f = Jt(a, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
    return f.__specifiedRotation = i == null || isNaN(i) ? void 0 : +i * Math.PI / 180 || 0, f.name = r, f;
  }
}
function SH(r) {
  var e = new _H({
    name: "line",
    subPixelOptimize: !0
  });
  return Od(e.shape, r), e;
}
function Od(r, e) {
  r.x1 = e[0][0], r.y1 = e[0][1], r.x2 = e[1][0], r.y2 = e[1][1], r.percent = 1;
  var t = e[2];
  t ? (r.cpx1 = t[0], r.cpy1 = t[1]) : (r.cpx1 = NaN, r.cpy1 = NaN);
}
var xH = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this) || this;
      return i._createLine(t, a, n), i;
    }
    return e.prototype._createLine = function(t, a, n) {
      var i = t.hostModel, o = t.getItemLayout(a), s = SH(o);
      s.shape.percent = 0, Bt(s, {
        shape: {
          percent: 1
        }
      }, i, a), this.add(s), C(Ic, function(l) {
        var u = FS(l, t, a);
        this.add(u), this[GS(l)] = t.getItemVisual(a, l);
      }, this), this._updateCommonStl(t, a, n);
    }, e.prototype.updateData = function(t, a, n) {
      var i = t.hostModel, o = this.childOfName("line"), s = t.getItemLayout(a), l = {
        shape: {}
      };
      Od(l.shape, s), Mt(o, l, i, a), C(Ic, function(u) {
        var f = t.getItemVisual(a, u), h = GS(u);
        if (this[h] !== f) {
          this.remove(this.childOfName(u));
          var v = FS(u, t, a);
          this.add(v);
        }
        this[h] = f;
      }, this), this._updateCommonStl(t, a, n);
    }, e.prototype.getLinePath = function() {
      return this.childAt(0);
    }, e.prototype._updateCommonStl = function(t, a, n) {
      var i = t.hostModel, o = this.childOfName("line"), s = n && n.emphasisLineStyle, l = n && n.blurLineStyle, u = n && n.selectLineStyle, f = n && n.labelStatesModels, h = n && n.emphasisDisabled, v = n && n.focus, c = n && n.blurScope;
      if (!n || t.hasItemOption) {
        var p = t.getItemModel(a), d = p.getModel("emphasis");
        s = d.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), h = d.get("disabled"), v = d.get("focus"), c = d.get("blurScope"), f = ie(p);
      }
      var g = t.getItemVisual(a, "style"), y = 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, C(Ic, function(x) {
        var b = this.childOfName(x);
        if (b) {
          b.setColor(y), b.style.opacity = g.opacity;
          for (var T = 0; T < Me.length; T++) {
            var D = Me[T], A = o.getState(D);
            if (A) {
              var M = A.style || {}, I = b.ensureState(D), L = I.style || (I.style = {});
              M.stroke != null && (L[b.__isEmptyBrush ? "stroke" : "fill"] = M.stroke), M.opacity != null && (L.opacity = M.opacity);
            }
          }
          b.markRedraw();
        }
      }, this);
      var m = i.getRawValue(a);
      pe(this, f, {
        labelDataIndex: a,
        labelFetcher: {
          getFormattedLabel: function(x, b) {
            return i.getFormattedLabel(x, b, t.dataType);
          }
        },
        inheritColor: y || "#000",
        defaultOpacity: g.opacity,
        defaultText: (m == null ? t.getName(a) : isFinite(m) ? Yt(m) : m) + ""
      });
      var _ = this.getTextContent();
      if (_) {
        var S = f.normal;
        _.__align = _.style.align, _.__verticalAlign = _.style.verticalAlign, _.__position = S.get("position") || "middle";
        var w = S.get("distance");
        z(w) || (w = [w, w]), _.__labelDistance = w;
      }
      this.setTextConfig({
        position: null,
        local: !0,
        inside: !1
        // Can't be inside for stroke element.
      }), Wt(this, v, c, h);
    }, e.prototype.highlight = function() {
      da(this);
    }, e.prototype.downplay = function() {
      ga(this);
    }, e.prototype.updateLayout = function(t, a) {
      this.setLinePoints(t.getItemLayout(a));
    }, e.prototype.setLinePoints = function(t) {
      var a = this.childOfName("line");
      Od(a.shape, t), a.dirty();
    }, e.prototype.beforeUpdate = function() {
      var t = this, a = t.childOfName("fromSymbol"), n = t.childOfName("toSymbol"), i = t.getTextContent();
      if (!a && !n && (!i || i.ignore))
        return;
      for (var o = 1, s = this.parent; s; )
        s.scaleX && (o /= s.scaleX), s = s.parent;
      var l = t.childOfName("line");
      if (!this.__dirty && !l.__dirty)
        return;
      var u = l.shape.percent, f = l.pointAt(0), h = l.pointAt(u), v = $n([], h, f);
      So(v, v);
      function c(A, M) {
        var I = A.__specifiedRotation;
        if (I == null) {
          var L = l.tangentAt(M);
          A.attr("rotation", (M === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(L[1], L[0]));
        } else
          A.attr("rotation", I);
      }
      if (a && (a.setPosition(f), c(a, 0), a.scaleX = a.scaleY = o * u, a.markRedraw()), n && (n.setPosition(h), c(n, 1), n.scaleX = n.scaleY = o * u, n.markRedraw()), i && !i.ignore) {
        i.x = i.y = 0, i.originX = i.originY = 0;
        var p = void 0, d = void 0, g = i.__labelDistance, y = g[0] * o, m = g[1] * o, _ = u / 2, S = l.tangentAt(_), w = [S[1], -S[0]], x = l.pointAt(_);
        w[1] > 0 && (w[0] = -w[0], w[1] = -w[1]);
        var b = S[0] < 0 ? -1 : 1;
        if (i.__position !== "start" && i.__position !== "end") {
          var T = -Math.atan2(S[1], S[0]);
          h[0] < f[0] && (T = Math.PI + T), i.rotation = T;
        }
        var D = void 0;
        switch (i.__position) {
          case "insideStartTop":
          case "insideMiddleTop":
          case "insideEndTop":
          case "middle":
            D = -m, d = "bottom";
            break;
          case "insideStartBottom":
          case "insideMiddleBottom":
          case "insideEndBottom":
            D = m, d = "top";
            break;
          default:
            D = 0, d = "middle";
        }
        switch (i.__position) {
          case "end":
            i.x = v[0] * y + h[0], i.y = v[1] * m + h[1], p = v[0] > 0.8 ? "left" : v[0] < -0.8 ? "right" : "center", d = v[1] > 0.8 ? "top" : v[1] < -0.8 ? "bottom" : "middle";
            break;
          case "start":
            i.x = -v[0] * y + f[0], i.y = -v[1] * m + f[1], p = v[0] > 0.8 ? "right" : v[0] < -0.8 ? "left" : "center", d = v[1] > 0.8 ? "bottom" : v[1] < -0.8 ? "top" : "middle";
            break;
          case "insideStartTop":
          case "insideStart":
          case "insideStartBottom":
            i.x = y * b + f[0], i.y = f[1] + D, p = S[0] < 0 ? "right" : "left", i.originX = -y * b, i.originY = -D;
            break;
          case "insideMiddleTop":
          case "insideMiddle":
          case "insideMiddleBottom":
          case "middle":
            i.x = x[0], i.y = x[1] + D, p = "center", i.originY = -D;
            break;
          case "insideEndTop":
          case "insideEnd":
          case "insideEndBottom":
            i.x = -y * b + h[0], i.y = h[1] + D, p = S[0] >= 0 ? "right" : "left", i.originX = y * b, i.originY = -D;
            break;
        }
        i.scaleX = i.scaleY = o, i.setStyle({
          // Use the user specified text align and baseline first
          verticalAlign: i.__verticalAlign || d,
          align: i.__align || p
        });
      }
    }, e;
  }(nt)
);
const Ry = xH;
var wH = (
  /** @class */
  function() {
    function r(e) {
      this.group = new nt(), this._LineCtor = e || Ry;
    }
    return r.prototype.updateData = function(e) {
      var t = this;
      this._progressiveEls = null;
      var a = this, n = a.group, i = a._lineData;
      a._lineData = e, i || n.removeAll();
      var o = HS(e);
      e.diff(i).add(function(s) {
        t._doAdd(e, s, o);
      }).update(function(s, l) {
        t._doUpdate(i, e, l, s, o);
      }).remove(function(s) {
        n.remove(i.getItemGraphicEl(s));
      }).execute();
    }, r.prototype.updateLayout = function() {
      var e = this._lineData;
      e && e.eachItemGraphicEl(function(t, a) {
        t.updateLayout(e, a);
      }, this);
    }, r.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = HS(e), this._lineData = null, this.group.removeAll();
    }, r.prototype.incrementalUpdate = function(e, t) {
      this._progressiveEls = [];
      function a(s) {
        !s.isGroup && !bH(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
      }
      for (var n = e.start; n < e.end; n++) {
        var i = t.getItemLayout(n);
        if (Lc(i)) {
          var o = new this._LineCtor(t, n, this._seriesScope);
          o.traverse(a), this.group.add(o), t.setItemGraphicEl(n, o), this._progressiveEls.push(o);
        }
      }
    }, r.prototype.remove = function() {
      this.group.removeAll();
    }, r.prototype.eachRendered = function(e) {
      on(this._progressiveEls || this.group, e);
    }, r.prototype._doAdd = function(e, t, a) {
      var n = e.getItemLayout(t);
      if (Lc(n)) {
        var i = new this._LineCtor(e, t, a);
        e.setItemGraphicEl(t, i), this.group.add(i);
      }
    }, r.prototype._doUpdate = function(e, t, a, n, i) {
      var o = e.getItemGraphicEl(a);
      if (!Lc(t.getItemLayout(n))) {
        this.group.remove(o);
        return;
      }
      o ? o.updateData(t, n, i) : o = new this._LineCtor(t, n, i), t.setItemGraphicEl(n, o), this.group.add(o);
    }, r;
  }()
);
function bH(r) {
  return r.animators && r.animators.length > 0;
}
function HS(r) {
  var e = r.hostModel, t = e.getModel("emphasis");
  return {
    lineStyle: e.getModel("lineStyle").getLineStyle(),
    emphasisLineStyle: t.getModel(["lineStyle"]).getLineStyle(),
    blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
    selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
    emphasisDisabled: t.get("disabled"),
    blurScope: t.get("blurScope"),
    focus: t.get("focus"),
    labelStatesModels: ie(e)
  };
}
function WS(r) {
  return isNaN(r[0]) || isNaN(r[1]);
}
function Lc(r) {
  return r && !WS(r[0]) && !WS(r[1]);
}
const Ny = wH;
var Ec = [], Pc = [], Rc = [], Bi = se, Nc = Qn, $S = Math.abs;
function US(r, e, t) {
  for (var a = r[0], n = r[1], i = r[2], o = 1 / 0, s, l = t * t, u = 0.1, f = 0.1; f <= 0.9; f += 0.1) {
    Ec[0] = Bi(a[0], n[0], i[0], f), Ec[1] = Bi(a[1], n[1], i[1], f);
    var h = $S(Nc(Ec, e) - l);
    h < o && (o = h, s = f);
  }
  for (var v = 0; v < 32; v++) {
    var c = s + u;
    Pc[0] = Bi(a[0], n[0], i[0], s), Pc[1] = Bi(a[1], n[1], i[1], s), Rc[0] = Bi(a[0], n[0], i[0], c), Rc[1] = Bi(a[1], n[1], i[1], c);
    var h = Nc(Pc, e) - l;
    if ($S(h) < 0.01)
      break;
    var p = Nc(Rc, e) - l;
    u /= 2, h < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  }
  return s;
}
function Oc(r, e) {
  var t = [], a = Gs, n = [[], [], []], i = [[], []], o = [];
  e /= 2, r.eachEdge(function(s, l) {
    var u = s.getLayout(), f = s.getVisual("fromSymbol"), h = s.getVisual("toSymbol");
    u.__original || (u.__original = [sa(u[0]), sa(u[1])], u[2] && u.__original.push(sa(u[2])));
    var v = u.__original;
    if (u[2] != null) {
      if (be(n[0], v[0]), be(n[1], v[2]), be(n[2], v[1]), f && f !== "none") {
        var c = Ts(s.node1), p = US(n, v[0], c * e);
        a(n[0][0], n[1][0], n[2][0], p, t), n[0][0] = t[3], n[1][0] = t[4], a(n[0][1], n[1][1], n[2][1], p, t), n[0][1] = t[3], n[1][1] = t[4];
      }
      if (h && h !== "none") {
        var c = Ts(s.node2), p = US(n, v[1], c * e);
        a(n[0][0], n[1][0], n[2][0], p, t), n[1][0] = t[1], n[2][0] = t[2], a(n[0][1], n[1][1], n[2][1], p, t), n[1][1] = t[1], n[2][1] = t[2];
      }
      be(u[0], n[0]), be(u[1], n[2]), be(u[2], n[1]);
    } else {
      if (be(i[0], v[0]), be(i[1], v[1]), $n(o, i[1], i[0]), So(o, o), f && f !== "none") {
        var c = Ts(s.node1);
        Sp(i[0], i[0], o, c * e);
      }
      if (h && h !== "none") {
        var c = Ts(s.node2);
        Sp(i[1], i[1], o, -c * e);
      }
      be(u[0], i[0]), be(u[1], i[1]);
    }
  });
}
function YS(r) {
  return r.type === "view";
}
var TH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a) {
      var n = new Dl(), i = new Ny(), o = this.group;
      this._controller = new Il(a.getZr()), this._controllerHost = {
        target: o
      }, o.add(n.group), o.add(i.group), this._symbolDraw = n, this._lineDraw = i, this._firstRender = !0;
    }, e.prototype.render = function(t, a, n) {
      var i = this, o = t.coordinateSystem;
      this._model = t;
      var s = this._symbolDraw, l = this._lineDraw, u = this.group;
      if (YS(o)) {
        var f = {
          x: o.x,
          y: o.y,
          scaleX: o.scaleX,
          scaleY: o.scaleY
        };
        this._firstRender ? u.attr(f) : Mt(u, f, t);
      }
      Oc(t.getGraph(), bs(t));
      var h = t.getData();
      s.updateData(h);
      var v = t.getEdgeData();
      l.updateData(v), this._updateNodeAndLinkScale(), this._updateController(t, a, n), clearTimeout(this._layoutTimeout);
      var c = t.forceLayout, p = t.get(["force", "layoutAnimation"]);
      c && this._startForceLayoutIteration(c, p);
      var d = t.get("layout");
      h.graph.eachNode(function(_) {
        var S = _.dataIndex, w = _.getGraphicEl(), x = _.getModel();
        if (w) {
          w.off("drag").off("dragend");
          var b = x.get("draggable");
          b && w.on("drag", function(D) {
            switch (d) {
              case "force":
                c.warmUp(), !i._layouting && i._startForceLayoutIteration(c, p), c.setFixed(S), h.setItemLayout(S, [w.x, w.y]);
                break;
              case "circular":
                h.setItemLayout(S, [w.x, w.y]), _.setLayout({
                  fixed: !0
                }, !0), Py(t, "symbolSize", _, [D.offsetX, D.offsetY]), i.updateLayout(t);
                break;
              case "none":
              default:
                h.setItemLayout(S, [w.x, w.y]), Ey(t.getGraph(), t), i.updateLayout(t);
                break;
            }
          }).on("dragend", function() {
            c && c.setUnfixed(S);
          }), w.setDraggable(b, !!x.get("cursor"));
          var T = x.get(["emphasis", "focus"]);
          T === "adjacency" && (it(w).focus = _.getAdjacentDataIndices());
        }
      }), h.graph.eachEdge(function(_) {
        var S = _.getGraphicEl(), w = _.getModel().get(["emphasis", "focus"]);
        S && w === "adjacency" && (it(S).focus = {
          edge: [_.dataIndex],
          node: [_.node1.dataIndex, _.node2.dataIndex]
        });
      });
      var g = t.get("layout") === "circular" && t.get(["circular", "rotateLabel"]), y = h.getLayout("cx"), m = h.getLayout("cy");
      h.graph.eachNode(function(_) {
        YM(_, g, y, m);
      }), this._firstRender = !1;
    }, e.prototype.dispose = function() {
      this._controller && this._controller.dispose(), this._controllerHost = null;
    }, e.prototype._startForceLayoutIteration = function(t, a) {
      var n = this;
      (function i() {
        t.step(function(o) {
          n.updateLayout(n._model), (n._layouting = !o) && (a ? n._layoutTimeout = setTimeout(i, 16) : i());
        });
      })();
    }, e.prototype._updateController = function(t, a, n) {
      var i = this, o = this._controller, s = this._controllerHost, l = this.group;
      if (o.setPointerChecker(function(u, f, h) {
        var v = l.getBoundingRect();
        return v.applyTransform(l.transform), v.contain(f, h) && !zh(u, n, t);
      }), !YS(t.coordinateSystem)) {
        o.disable();
        return;
      }
      o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        xy(s, u.dx, u.dy), n.dispatchAction({
          seriesId: t.id,
          type: "graphRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        wy(s, u.scale, u.originX, u.originY), n.dispatchAction({
          seriesId: t.id,
          type: "graphRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), i._updateNodeAndLinkScale(), Oc(t.getGraph(), bs(t)), i._lineDraw.updateLayout(), n.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function() {
      var t = this._model, a = t.getData(), n = bs(t);
      a.eachItemGraphicEl(function(i, o) {
        i && i.setSymbolScale(n);
      });
    }, e.prototype.updateLayout = function(t) {
      Oc(t.getGraph(), bs(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
    }, e.prototype.remove = function(t, a) {
      this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
    }, e.type = "graph", e;
  }(Vt)
);
const DH = TH;
function zi(r) {
  return "_EC_" + r;
}
var CH = (
  /** @class */
  function() {
    function r(e) {
      this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
    }
    return r.prototype.isDirected = function() {
      return this._directed;
    }, r.prototype.addNode = function(e, t) {
      e = e == null ? "" + t : "" + e;
      var a = this._nodesMap;
      if (a[zi(e)]) {
        ({}).NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
        return;
      }
      var n = new Bn(e, t);
      return n.hostGraph = this, this.nodes.push(n), a[zi(e)] = n, n;
    }, r.prototype.getNodeByIndex = function(e) {
      var t = this.data.getRawIndex(e);
      return this.nodes[t];
    }, r.prototype.getNodeById = function(e) {
      return this._nodesMap[zi(e)];
    }, r.prototype.addEdge = function(e, t, a) {
      var n = this._nodesMap, i = this._edgesMap;
      if (Ct(e) && (e = this.nodes[e]), Ct(t) && (t = this.nodes[t]), e instanceof Bn || (e = n[zi(e)]), t instanceof Bn || (t = n[zi(t)]), !(!e || !t)) {
        var o = e.id + "-" + t.id, s = new XM(e, t, a);
        return s.hostGraph = this, this._directed && (e.outEdges.push(s), t.inEdges.push(s)), e.edges.push(s), e !== t && t.edges.push(s), this.edges.push(s), i[o] = s, s;
      }
    }, r.prototype.getEdgeByIndex = function(e) {
      var t = this.edgeData.getRawIndex(e);
      return this.edges[t];
    }, r.prototype.getEdge = function(e, t) {
      e instanceof Bn && (e = e.id), t instanceof Bn && (t = t.id);
      var a = this._edgesMap;
      return this._directed ? a[e + "-" + t] : a[e + "-" + t] || a[t + "-" + e];
    }, r.prototype.eachNode = function(e, t) {
      for (var a = this.nodes, n = a.length, i = 0; i < n; i++)
        a[i].dataIndex >= 0 && e.call(t, a[i], i);
    }, r.prototype.eachEdge = function(e, t) {
      for (var a = this.edges, n = a.length, i = 0; i < n; i++)
        a[i].dataIndex >= 0 && a[i].node1.dataIndex >= 0 && a[i].node2.dataIndex >= 0 && e.call(t, a[i], i);
    }, r.prototype.breadthFirstTraverse = function(e, t, a, n) {
      if (t instanceof Bn || (t = this._nodesMap[zi(t)]), !!t) {
        for (var i = a === "out" ? "outEdges" : a === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
          this.nodes[o].__visited = !1;
        if (!e.call(n, t, null))
          for (var s = [t]; s.length; )
            for (var l = s.shift(), u = l[i], o = 0; o < u.length; o++) {
              var f = u[o], h = f.node1 === l ? f.node2 : f.node1;
              if (!h.__visited) {
                if (e.call(n, h, l))
                  return;
                s.push(h), h.__visited = !0;
              }
            }
      }
    }, r.prototype.update = function() {
      for (var e = this.data, t = this.edgeData, a = this.nodes, n = this.edges, i = 0, o = a.length; i < o; i++)
        a[i].dataIndex = -1;
      for (var i = 0, o = e.count(); i < o; i++)
        a[e.getRawIndex(i)].dataIndex = i;
      t.filterSelf(function(s) {
        var l = n[t.getRawIndex(s)];
        return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
      });
      for (var i = 0, o = n.length; i < o; i++)
        n[i].dataIndex = -1;
      for (var i = 0, o = t.count(); i < o; i++)
        n[t.getRawIndex(i)].dataIndex = i;
    }, r.prototype.clone = function() {
      for (var e = new r(this._directed), t = this.nodes, a = this.edges, n = 0; n < t.length; n++)
        e.addNode(t[n].id, t[n].dataIndex);
      for (var n = 0; n < a.length; n++) {
        var i = a[n];
        e.addEdge(i.node1.id, i.node2.id, i.dataIndex);
      }
      return e;
    }, r;
  }()
), Bn = (
  /** @class */
  function() {
    function r(e, t) {
      this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = t ?? -1;
    }
    return r.prototype.degree = function() {
      return this.edges.length;
    }, r.prototype.inDegree = function() {
      return this.inEdges.length;
    }, r.prototype.outDegree = function() {
      return this.outEdges.length;
    }, r.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var t = this.hostGraph, a = t.data.getItemModel(this.dataIndex);
        return a.getModel(e);
      }
    }, r.prototype.getAdjacentDataIndices = function() {
      for (var e = {
        edge: [],
        node: []
      }, t = 0; t < this.edges.length; t++) {
        var a = this.edges[t];
        a.dataIndex < 0 || (e.edge.push(a.dataIndex), e.node.push(a.node1.dataIndex, a.node2.dataIndex));
      }
      return e;
    }, r;
  }()
), XM = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.dataIndex = -1, this.node1 = e, this.node2 = t, this.dataIndex = a ?? -1;
    }
    return r.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var t = this.hostGraph, a = t.edgeData.getItemModel(this.dataIndex);
        return a.getModel(e);
      }
    }, r.prototype.getAdjacentDataIndices = function() {
      return {
        edge: [this.dataIndex],
        node: [this.node1.dataIndex, this.node2.dataIndex]
      };
    }, r;
  }()
);
function qM(r, e) {
  return {
    /**
     * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
     */
    getValue: function(t) {
      var a = this[r][e];
      return a.getStore().get(a.getDimensionIndex(t || "value"), this.dataIndex);
    },
    // TODO: TYPE stricter type.
    setVisual: function(t, a) {
      this.dataIndex >= 0 && this[r][e].setItemVisual(this.dataIndex, t, a);
    },
    getVisual: function(t) {
      return this[r][e].getItemVisual(this.dataIndex, t);
    },
    setLayout: function(t, a) {
      this.dataIndex >= 0 && this[r][e].setItemLayout(this.dataIndex, t, a);
    },
    getLayout: function() {
      return this[r][e].getItemLayout(this.dataIndex);
    },
    getGraphicEl: function() {
      return this[r][e].getItemGraphicEl(this.dataIndex);
    },
    getRawIndex: function() {
      return this[r][e].getRawIndex(this.dataIndex);
    }
  };
}
te(Bn, qM("hostGraph", "data"));
te(XM, qM("hostGraph", "edgeData"));
const AH = CH;
function KM(r, e, t, a, n) {
  for (var i = new AH(a), o = 0; o < r.length; o++)
    i.addNode(jt(
      // Id, name, dataIndex
      r[o].id,
      r[o].name,
      o
    ), o);
  for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
    var f = e[o], h = f.source, v = f.target;
    i.addEdge(h, v, u) && (l.push(f), s.push(jt(ee(f.id, null), h + " > " + v)), u++);
  }
  var c = t.get("coordinateSystem"), p;
  if (c === "cartesian2d" || c === "polar")
    p = xa(r, t);
  else {
    var d = Po.get(c), g = d ? d.dimensions || [] : [];
    ct(g, "value") < 0 && g.concat(["value"]);
    var y = xl(r, {
      coordDimensions: g,
      encodeDefine: t.getEncode()
    }).dimensions;
    p = new Ce(y, t), p.initData(r);
  }
  var m = new Ce(["value"], t);
  return m.initData(l, s), n && n(p, m), EM({
    mainData: p,
    struct: i,
    structAttr: "graph",
    datas: {
      node: p,
      edge: m
    },
    datasAttr: {
      node: "data",
      edge: "edgeData"
    }
  }), i.update(), i;
}
var MH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t;
    }
    return e.prototype.init = function(t) {
      r.prototype.init.apply(this, arguments);
      var a = this;
      function n() {
        return a._categoriesData;
      }
      this.legendVisualProvider = new Ml(n, n), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData();
    }, e.prototype.mergeOption = function(t) {
      r.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData();
    }, e.prototype.mergeDefaultAndTheme = function(t) {
      r.prototype.mergeDefaultAndTheme.apply(this, arguments), ui(t, "edgeLabel", ["show"]);
    }, e.prototype.getInitialData = function(t, a) {
      var n = t.edges || t.links || [], i = t.data || t.nodes || [], o = this;
      if (i && n) {
        uH(this);
        var s = KM(i, n, this, !0, l);
        return C(s.edges, function(u) {
          fH(u.node1, u.node2, this, u.dataIndex);
        }, this), s.data;
      }
      function l(u, f) {
        u.wrapMethod("getItemModel", function(p) {
          var d = o._categoriesModels, g = p.getShallow("category"), y = d[g];
          return y && (y.parentModel = p.parentModel, p.parentModel = y), p;
        });
        var h = kt.prototype.getModel;
        function v(p, d) {
          var g = h.call(this, p, d);
          return g.resolveParentPath = c, g;
        }
        f.wrapMethod("getItemModel", function(p) {
          return p.resolveParentPath = c, p.getModel = v, p;
        });
        function c(p) {
          if (p && (p[0] === "label" || p[1] === "label")) {
            var d = p.slice();
            return p[0] === "label" ? d[0] = "edgeLabel" : p[1] === "label" && (d[1] = "edgeLabel"), d;
          }
          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(t, a, n) {
      if (n === "edge") {
        var i = this.getData(), o = this.getDataParams(t, n), s = i.graph.getEdgeByIndex(t), l = i.getName(s.node1.dataIndex), u = i.getName(s.node2.dataIndex), f = [];
        return l != null && f.push(l), u != null && f.push(u), oe("nameValue", {
          name: f.join(" > "),
          value: o.value,
          noValue: o.value == null
        });
      }
      var h = mC({
        series: this,
        dataIndex: t,
        multipleSeries: a
      });
      return h;
    }, e.prototype._updateCategoriesData = function() {
      var t = G(this.option.categories || [], function(n) {
        return n.value != null ? n : V({
          value: 0
        }, n);
      }), a = new Ce(["value"], this);
      a.initData(t), this._categoriesData = a, this._categoriesModels = a.mapArray(function(n) {
        return a.getItemModel(n);
      });
    }, e.prototype.setZoom = function(t) {
      this.option.zoom = t;
    }, e.prototype.setCenter = function(t) {
      this.option.center = t;
    }, e.prototype.isAnimationEnabled = function() {
      return r.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;
  }(Gt)
);
const IH = MH;
var LH = {
  type: "graphRoam",
  event: "graphRoam",
  update: "none"
};
function EH(r) {
  r.registerChartView(DH), r.registerSeriesModel(IH), r.registerProcessor(nH), r.registerVisual(iH), r.registerVisual(oH), r.registerLayout(hH), r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT, cH), r.registerLayout(dH), r.registerCoordinateSystem("graphView", {
    dimensions: Ll.dimensions,
    create: yH
  }), r.registerAction({
    type: "focusNodeAdjacency",
    event: "focusNodeAdjacency",
    update: "series:focusNodeAdjacency"
  }, Xt), r.registerAction({
    type: "unfocusNodeAdjacency",
    event: "unfocusNodeAdjacency",
    update: "series:unfocusNodeAdjacency"
  }, Xt), r.registerAction(LH, function(e, t, a) {
    t.eachComponent({
      mainType: "series",
      query: e
    }, function(n) {
      var i = n.coordinateSystem, o = Ty(i, e, void 0, a);
      n.setCenter && n.setCenter(o.center), n.setZoom && n.setZoom(o.zoom);
    });
  });
}
var PH = (
  /** @class */
  function() {
    function r() {
      this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
    }
    return r;
  }()
), RH = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "pointer", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new PH();
    }, e.prototype.buildPath = function(t, a) {
      var n = Math.cos, i = Math.sin, o = a.r, s = a.width, l = a.angle, u = a.x - n(l) * s * (s >= o / 3 ? 1 : 2), f = a.y - i(l) * s * (s >= o / 3 ? 1 : 2);
      l = a.angle - Math.PI / 2, t.moveTo(u, f), t.lineTo(a.x + n(l) * s, a.y + i(l) * s), t.lineTo(a.x + n(a.angle) * o, a.y + i(a.angle) * o), t.lineTo(a.x - n(l) * s, a.y - i(l) * s), t.lineTo(u, f);
    }, e;
  }(gt)
);
const NH = RH;
function OH(r, e) {
  var t = r.get("center"), a = e.getWidth(), n = e.getHeight(), i = Math.min(a, n), o = H(t[0], e.getWidth()), s = H(t[1], e.getHeight()), l = H(r.get("radius"), i / 2);
  return {
    cx: o,
    cy: s,
    r: l
  };
}
function bu(r, e) {
  var t = r == null ? "" : r + "";
  return e && ($(e) ? t = e.replace("{value}", t) : q(e) && (t = e(r))), t;
}
var kH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      this.group.removeAll();
      var i = t.get(["axisLine", "lineStyle", "color"]), o = OH(t, n);
      this._renderMain(t, a, n, i, o), this._data = t.getData();
    }, e.prototype.dispose = function() {
    }, e.prototype._renderMain = function(t, a, n, i, o) {
      var s = this.group, l = t.get("clockwise"), u = -t.get("startAngle") / 180 * Math.PI, f = -t.get("endAngle") / 180 * Math.PI, h = t.getModel("axisLine"), v = h.get("roundCap"), c = v ? Vf : Ve, p = h.get("show"), d = h.getModel("lineStyle"), g = d.get("width"), y = [u, f];
      IT(y, !l), u = y[0], f = y[1];
      for (var m = f - u, _ = u, S = [], w = 0; p && w < i.length; w++) {
        var x = Math.min(Math.max(i[w][0], 0), 1);
        f = u + m * x;
        var b = new c({
          shape: {
            startAngle: _,
            endAngle: f,
            cx: o.cx,
            cy: o.cy,
            clockwise: l,
            r0: o.r - g,
            r: o.r
          },
          silent: !0
        });
        b.setStyle({
          fill: i[w][1]
        }), b.setStyle(d.getLineStyle(
          // Because we use sector to simulate arc
          // so the properties for stroking are useless
          ["color", "width"]
        )), S.push(b), _ = f;
      }
      S.reverse(), C(S, function(D) {
        return s.add(D);
      });
      var T = function(D) {
        if (D <= 0)
          return i[0][1];
        var A;
        for (A = 0; A < i.length; A++)
          if (i[A][0] >= D && (A === 0 ? 0 : i[A - 1][0]) < D)
            return i[A][1];
        return i[A - 1][1];
      };
      this._renderTicks(t, a, n, T, o, u, f, l, g), this._renderTitleAndDetail(t, a, n, T, o), this._renderAnchor(t, o), this._renderPointer(t, a, n, T, o, u, f, l, g);
    }, e.prototype._renderTicks = function(t, a, n, i, o, s, l, u, f) {
      for (var h = this.group, v = o.cx, c = o.cy, p = o.r, d = +t.get("min"), g = +t.get("max"), y = t.getModel("splitLine"), m = t.getModel("axisTick"), _ = t.getModel("axisLabel"), S = t.get("splitNumber"), w = m.get("splitNumber"), x = H(y.get("length"), p), b = H(m.get("length"), p), T = s, D = (l - s) / S, A = D / w, M = y.getModel("lineStyle").getLineStyle(), I = m.getModel("lineStyle").getLineStyle(), L = y.get("distance"), E, P, R = 0; R <= S; R++) {
        if (E = Math.cos(T), P = Math.sin(T), y.get("show")) {
          var k = L ? L + f : f, O = new le({
            shape: {
              x1: E * (p - k) + v,
              y1: P * (p - k) + c,
              x2: E * (p - x - k) + v,
              y2: P * (p - x - k) + c
            },
            style: M,
            silent: !0
          });
          M.stroke === "auto" && O.setStyle({
            stroke: i(R / S)
          }), h.add(O);
        }
        if (_.get("show")) {
          var k = _.get("distance") + L, B = bu(Yt(R / S * (g - d) + d), _.get("formatter")), F = i(R / S), W = E * (p - x - k) + v, Z = P * (p - x - k) + c, J = _.get("rotate"), et = 0;
          J === "radial" ? (et = -T + 2 * Math.PI, et > Math.PI / 2 && (et += Math.PI)) : J === "tangential" ? et = -T - Math.PI / 2 : Ct(J) && (et = J * Math.PI / 180), et === 0 ? h.add(new Dt({
            style: Ot(_, {
              text: B,
              x: W,
              y: Z,
              verticalAlign: P < -0.8 ? "top" : P > 0.8 ? "bottom" : "middle",
              align: E < -0.4 ? "left" : E > 0.4 ? "right" : "center"
            }, {
              inheritColor: F
            }),
            silent: !0
          })) : h.add(new Dt({
            style: Ot(_, {
              text: B,
              x: W,
              y: Z,
              verticalAlign: "middle",
              align: "center"
            }, {
              inheritColor: F
            }),
            silent: !0,
            originX: W,
            originY: Z,
            rotation: et
          }));
        }
        if (m.get("show") && R !== S) {
          var k = m.get("distance");
          k = k ? k + f : f;
          for (var yt = 0; yt <= w; yt++) {
            E = Math.cos(T), P = Math.sin(T);
            var At = new le({
              shape: {
                x1: E * (p - k) + v,
                y1: P * (p - k) + c,
                x2: E * (p - b - k) + v,
                y2: P * (p - b - k) + c
              },
              silent: !0,
              style: I
            });
            I.stroke === "auto" && At.setStyle({
              stroke: i((R + yt / w) / S)
            }), h.add(At), T += A;
          }
          T -= A;
        } else
          T += D;
      }
    }, e.prototype._renderPointer = function(t, a, n, i, o, s, l, u, f) {
      var h = this.group, v = this._data, c = this._progressEls, p = [], d = t.get(["pointer", "show"]), g = t.getModel("progress"), y = g.get("show"), m = t.getData(), _ = m.mapDimension("value"), S = +t.get("min"), w = +t.get("max"), x = [S, w], b = [s, l];
      function T(A, M) {
        var I = m.getItemModel(A), L = I.getModel("pointer"), E = H(L.get("width"), o.r), P = H(L.get("length"), o.r), R = t.get(["pointer", "icon"]), k = L.get("offsetCenter"), O = H(k[0], o.r), B = H(k[1], o.r), F = L.get("keepAspect"), W;
        return R ? W = Jt(R, O - E / 2, B - P, E, P, null, F) : W = new NH({
          shape: {
            angle: -Math.PI / 2,
            width: E,
            r: P,
            x: O,
            y: B
          }
        }), W.rotation = -(M + Math.PI / 2), W.x = o.cx, W.y = o.cy, W;
      }
      function D(A, M) {
        var I = g.get("roundCap"), L = I ? Vf : Ve, E = g.get("overlap"), P = E ? g.get("width") : f / m.count(), R = E ? o.r - P : o.r - (A + 1) * P, k = E ? o.r : o.r - A * P, O = new L({
          shape: {
            startAngle: s,
            endAngle: M,
            cx: o.cx,
            cy: o.cy,
            clockwise: u,
            r0: R,
            r: k
          }
        });
        return E && (O.z2 = w - m.get(_, A) % w), O;
      }
      (y || d) && (m.diff(v).add(function(A) {
        var M = m.get(_, A);
        if (d) {
          var I = T(A, s);
          Bt(I, {
            rotation: -((isNaN(+M) ? b[0] : Lt(M, x, b, !0)) + Math.PI / 2)
          }, t), h.add(I), m.setItemGraphicEl(A, I);
        }
        if (y) {
          var L = D(A, s), E = g.get("clip");
          Bt(L, {
            shape: {
              endAngle: Lt(M, x, b, E)
            }
          }, t), h.add(L), Yp(t.seriesIndex, m.dataType, A, L), p[A] = L;
        }
      }).update(function(A, M) {
        var I = m.get(_, A);
        if (d) {
          var L = v.getItemGraphicEl(M), E = L ? L.rotation : s, P = T(A, E);
          P.rotation = E, Mt(P, {
            rotation: -((isNaN(+I) ? b[0] : Lt(I, x, b, !0)) + Math.PI / 2)
          }, t), h.add(P), m.setItemGraphicEl(A, P);
        }
        if (y) {
          var R = c[M], k = R ? R.shape.endAngle : s, O = D(A, k), B = g.get("clip");
          Mt(O, {
            shape: {
              endAngle: Lt(I, x, b, B)
            }
          }, t), h.add(O), Yp(t.seriesIndex, m.dataType, A, O), p[A] = O;
        }
      }).execute(), m.each(function(A) {
        var M = m.getItemModel(A), I = M.getModel("emphasis"), L = I.get("focus"), E = I.get("blurScope"), P = I.get("disabled");
        if (d) {
          var R = m.getItemGraphicEl(A), k = m.getItemVisual(A, "style"), O = k.fill;
          if (R instanceof de) {
            var B = R.style;
            R.useStyle(V({
              image: B.image,
              x: B.x,
              y: B.y,
              width: B.width,
              height: B.height
            }, k));
          } else
            R.useStyle(k), R.type !== "pointer" && R.setColor(O);
          R.setStyle(M.getModel(["pointer", "itemStyle"]).getItemStyle()), R.style.fill === "auto" && R.setStyle("fill", i(Lt(m.get(_, A), x, [0, 1], !0))), R.z2EmphasisLift = 0, ce(R, M), Wt(R, L, E, P);
        }
        if (y) {
          var F = p[A];
          F.useStyle(m.getItemVisual(A, "style")), F.setStyle(M.getModel(["progress", "itemStyle"]).getItemStyle()), F.z2EmphasisLift = 0, ce(F, M), Wt(F, L, E, P);
        }
      }), this._progressEls = p);
    }, e.prototype._renderAnchor = function(t, a) {
      var n = t.getModel("anchor"), i = n.get("show");
      if (i) {
        var o = n.get("size"), s = n.get("icon"), l = n.get("offsetCenter"), u = n.get("keepAspect"), f = Jt(s, a.cx - o / 2 + H(l[0], a.r), a.cy - o / 2 + H(l[1], a.r), o, o, null, u);
        f.z2 = n.get("showAbove") ? 1 : 0, f.setStyle(n.getModel("itemStyle").getItemStyle()), this.group.add(f);
      }
    }, e.prototype._renderTitleAndDetail = function(t, a, n, i, o) {
      var s = this, l = t.getData(), u = l.mapDimension("value"), f = +t.get("min"), h = +t.get("max"), v = new nt(), c = [], p = [], d = t.isAnimationEnabled(), g = t.get(["pointer", "showAbove"]);
      l.diff(this._data).add(function(y) {
        c[y] = new Dt({
          silent: !0
        }), p[y] = new Dt({
          silent: !0
        });
      }).update(function(y, m) {
        c[y] = s._titleEls[m], p[y] = s._detailEls[m];
      }).execute(), l.each(function(y) {
        var m = l.getItemModel(y), _ = l.get(u, y), S = new nt(), w = i(Lt(_, [f, h], [0, 1], !0)), x = m.getModel("title");
        if (x.get("show")) {
          var b = x.get("offsetCenter"), T = o.cx + H(b[0], o.r), D = o.cy + H(b[1], o.r), A = c[y];
          A.attr({
            z2: g ? 0 : 2,
            style: Ot(x, {
              x: T,
              y: D,
              text: l.getName(y),
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: w
            })
          }), S.add(A);
        }
        var M = m.getModel("detail");
        if (M.get("show")) {
          var I = M.get("offsetCenter"), L = o.cx + H(I[0], o.r), E = o.cy + H(I[1], o.r), P = H(M.get("width"), o.r), R = H(M.get("height"), o.r), k = t.get(["progress", "show"]) ? l.getItemVisual(y, "style").fill : w, A = p[y], O = M.get("formatter");
          A.attr({
            z2: g ? 0 : 2,
            style: Ot(M, {
              x: L,
              y: E,
              text: bu(_, O),
              width: isNaN(P) ? null : P,
              height: isNaN(R) ? null : R,
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: k
            })
          }), xD(A, {
            normal: M
          }, _, function(F) {
            return bu(F, O);
          }), d && wD(A, y, l, t, {
            getFormattedLabel: function(F, W, Z, J, et, yt) {
              return bu(yt ? yt.interpolatedValue : _, O);
            }
          }), S.add(A);
        }
        v.add(S);
      }), this.group.add(v), this._titleEls = c, this._detailEls = p;
    }, e.type = "gauge", e;
  }(Vt)
);
const VH = kH;
var BH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.visualStyleAccessPath = "itemStyle", t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return ko(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;
  }(Gt)
);
const zH = BH;
function GH(r) {
  r.registerChartView(VH), r.registerSeriesModel(zH);
}
var FH = ["itemStyle", "opacity"], HH = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a) {
      var n = r.call(this) || this, i = n, o = new ze(), s = new Dt();
      return i.setTextContent(s), n.setTextGuideLine(o), n.updateData(t, a, !0), n;
    }
    return e.prototype.updateData = function(t, a, n) {
      var i = this, o = t.hostModel, s = t.getItemModel(a), l = t.getItemLayout(a), u = s.getModel("emphasis"), f = s.get(FH);
      f = f ?? 1, n || Cr(i), i.useStyle(t.getItemVisual(a, "style")), i.style.lineJoin = "round", n ? (i.setShape({
        points: l.points
      }), i.style.opacity = 0, Bt(i, {
        style: {
          opacity: f
        }
      }, o, a)) : Mt(i, {
        style: {
          opacity: f
        },
        shape: {
          points: l.points
        }
      }, o, a), ce(i, s), this._updateLabel(t, a), Wt(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(t, a) {
      var n = this, i = this.getTextGuideLine(), o = n.getTextContent(), s = t.hostModel, l = t.getItemModel(a), u = t.getItemLayout(a), f = u.label, h = t.getItemVisual(a, "style"), v = h.fill;
      pe(
        // position will not be used in setLabelStyle
        o,
        ie(l),
        {
          labelFetcher: t.hostModel,
          labelDataIndex: a,
          defaultOpacity: h.opacity,
          defaultText: t.getName(a)
        },
        {
          normal: {
            align: f.textAlign,
            verticalAlign: f.verticalAlign
          }
        }
      ), n.setTextConfig({
        local: !0,
        inside: !!f.inside,
        insideStroke: v,
        // insideFill: 'auto',
        outsideFill: v
      });
      var c = f.linePoints;
      i.setShape({
        points: c
      }), n.textGuideLineConfig = {
        anchor: c ? new lt(c[0][0], c[0][1]) : null
      }, Mt(o, {
        style: {
          x: f.x,
          y: f.y
        }
      }, s, a), o.attr({
        rotation: f.rotation,
        originX: f.x,
        originY: f.y,
        z2: 10
      }), vy(n, cy(l), {
        // Default use item visual color
        stroke: v
      });
    }, e;
  }(Be)
), WH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.ignoreLabelLineUpdate = !0, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this._data, s = this.group;
      i.diff(o).add(function(l) {
        var u = new HH(i, l);
        i.setItemGraphicEl(l, u), s.add(u);
      }).update(function(l, u) {
        var f = o.getItemGraphicEl(u);
        f.updateData(i, l), s.add(f), i.setItemGraphicEl(l, f);
      }).remove(function(l) {
        var u = o.getItemGraphicEl(l);
        Us(u, t, l);
      }).execute(), this._data = i;
    }, e.prototype.remove = function() {
      this.group.removeAll(), this._data = null;
    }, e.prototype.dispose = function() {
    }, e.type = "funnel", e;
  }(Vt)
);
const $H = WH;
var UH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t) {
      r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Ml(Y(this.getData, this), Y(this.getRawData, this)), this._defaultLabelLine(t);
    }, e.prototype.getInitialData = function(t, a) {
      return ko(this, {
        coordDimensions: ["value"],
        encodeDefaulter: ot(Hg, this)
      });
    }, e.prototype._defaultLabelLine = function(t) {
      ui(t, "labelLine", ["show"]);
      var a = t.labelLine, n = t.emphasis.labelLine;
      a.show = a.show && t.label.show, n.show = n.show && t.emphasis.label.show;
    }, e.prototype.getDataParams = function(t) {
      var a = this.getData(), n = r.prototype.getDataParams.call(this, t), i = a.mapDimension("value"), o = a.getSum(i);
      return n.percent = o ? +(a.get(i, t) / o * 100).toFixed(2) : 0, n.$vars.push("percent"), n;
    }, 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;
  }(Gt)
);
const YH = UH;
function ZH(r, e) {
  return re(r.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function XH(r, e) {
  for (var t = r.mapDimension("value"), a = r.mapArray(t, function(l) {
    return l;
  }), n = [], i = e === "ascending", o = 0, s = r.count(); o < s; o++)
    n[o] = o;
  return q(e) ? n.sort(e) : e !== "none" && n.sort(function(l, u) {
    return i ? a[l] - a[u] : a[u] - a[l];
  }), n;
}
function qH(r) {
  var e = r.hostModel, t = e.get("orient");
  r.each(function(a) {
    var n = r.getItemModel(a), i = n.getModel("label"), o = i.get("position"), s = n.getModel("labelLine"), l = r.getItemLayout(a), u = l.points, f = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", h, v, c, p;
    if (f)
      o === "insideLeft" ? (v = (u[0][0] + u[3][0]) / 2 + 5, c = (u[0][1] + u[3][1]) / 2, h = "left") : o === "insideRight" ? (v = (u[1][0] + u[2][0]) / 2 - 5, c = (u[1][1] + u[2][1]) / 2, h = "right") : (v = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, c = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, h = "center"), p = [[v, c], [v, c]];
    else {
      var d = void 0, g = void 0, y = void 0, m = void 0, _ = s.get("length");
      ({}).NODE_ENV !== "production" && (t === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), t === "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" ? (d = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = d - _, v = y - 5, h = "right") : o === "right" ? (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = d + _, v = y + 5, h = "left") : o === "top" ? (d = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = g - _, c = m - 5, h = "center") : o === "bottom" ? (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = g + _, c = m + 5, h = "center") : o === "rightTop" ? (d = t === "horizontal" ? u[3][0] : u[1][0], g = t === "horizontal" ? u[3][1] : u[1][1], t === "horizontal" ? (m = g - _, c = m - 5, h = "center") : (y = d + _, v = y + 5, h = "top")) : o === "rightBottom" ? (d = u[2][0], g = u[2][1], t === "horizontal" ? (m = g + _, c = m + 5, h = "center") : (y = d + _, v = y + 5, h = "bottom")) : o === "leftTop" ? (d = u[0][0], g = t === "horizontal" ? u[0][1] : u[1][1], t === "horizontal" ? (m = g - _, c = m - 5, h = "center") : (y = d - _, v = y - 5, h = "right")) : o === "leftBottom" ? (d = t === "horizontal" ? u[1][0] : u[3][0], g = t === "horizontal" ? u[1][1] : u[2][1], t === "horizontal" ? (m = g + _, c = m + 5, h = "center") : (y = d - _, v = y - 5, h = "right")) : (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, t === "horizontal" ? (m = g + _, c = m + 5, h = "center") : (y = d + _, v = y + 5, h = "left")), t === "horizontal" ? (y = d, v = y) : (m = g, c = m), p = [[d, g], [y, m]];
    }
    l.label = {
      linePoints: p,
      x: v,
      y: c,
      verticalAlign: "middle",
      textAlign: h,
      inside: f
    };
  });
}
function KH(r, e) {
  r.eachSeriesByType("funnel", function(t) {
    var a = t.getData(), n = a.mapDimension("value"), i = t.get("sort"), o = ZH(t, e), s = t.get("orient"), l = o.width, u = o.height, f = XH(a, i), h = o.x, v = o.y, c = s === "horizontal" ? [H(t.get("minSize"), u), H(t.get("maxSize"), u)] : [H(t.get("minSize"), l), H(t.get("maxSize"), l)], p = a.getDataExtent(n), d = t.get("min"), g = t.get("max");
    d == null && (d = Math.min(p[0], 0)), g == null && (g = p[1]);
    var y = t.get("funnelAlign"), m = t.get("gap"), _ = s === "horizontal" ? l : u, S = (_ - m * (a.count() - 1)) / a.count(), w = function(E, P) {
      if (s === "horizontal") {
        var R = a.get(n, E) || 0, k = Lt(R, [d, g], c, !0), O = void 0;
        switch (y) {
          case "top":
            O = v;
            break;
          case "center":
            O = v + (u - k) / 2;
            break;
          case "bottom":
            O = v + (u - k);
            break;
        }
        return [[P, O], [P, O + k]];
      }
      var B = a.get(n, E) || 0, F = Lt(B, [d, g], c, !0), W;
      switch (y) {
        case "left":
          W = h;
          break;
        case "center":
          W = h + (l - F) / 2;
          break;
        case "right":
          W = h + l - F;
          break;
      }
      return [[W, P], [W + F, P]];
    };
    i === "ascending" && (S = -S, m = -m, s === "horizontal" ? h += l : v += u, f = f.reverse());
    for (var x = 0; x < f.length; x++) {
      var b = f[x], T = f[x + 1], D = a.getItemModel(b);
      if (s === "horizontal") {
        var A = D.get(["itemStyle", "width"]);
        A == null ? A = S : (A = H(A, l), i === "ascending" && (A = -A));
        var M = w(b, h), I = w(T, h + A);
        h += A + m, a.setItemLayout(b, {
          points: M.concat(I.slice().reverse())
        });
      } else {
        var L = D.get(["itemStyle", "height"]);
        L == null ? L = S : (L = H(L, u), i === "ascending" && (L = -L));
        var M = w(b, v), I = w(T, v + L);
        v += L + m, a.setItemLayout(b, {
          points: M.concat(I.slice().reverse())
        });
      }
    }
    qH(a);
  });
}
function jH(r) {
  r.registerChartView($H), r.registerSeriesModel(YH), r.registerLayout(KH), r.registerProcessor(Al("funnel"));
}
var QH = 0.3, JH = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._dataGroup = new nt(), t._initialized = !1, t;
    }
    return e.prototype.init = function() {
      this.group.add(this._dataGroup);
    }, e.prototype.render = function(t, a, n, i) {
      this._progressiveEls = null;
      var o = this._dataGroup, s = t.getData(), l = this._data, u = t.coordinateSystem, f = u.dimensions, h = XS(t);
      s.diff(l).add(v).update(c).remove(p).execute();
      function v(g) {
        var y = ZS(s, o, g, f, u);
        kc(y, s, g, h);
      }
      function c(g, y) {
        var m = l.getItemGraphicEl(y), _ = jM(s, g, f, u);
        s.setItemGraphicEl(g, m), Mt(m, {
          shape: {
            points: _
          }
        }, t, g), Cr(m), kc(m, s, g, h);
      }
      function p(g) {
        var y = l.getItemGraphicEl(g);
        o.remove(y);
      }
      if (!this._initialized) {
        this._initialized = !0;
        var d = t4(u, t, function() {
          setTimeout(function() {
            o.removeClipPath();
          });
        });
        o.setClipPath(d);
      }
      this._data = s;
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      this._initialized = !0, this._data = null, this._dataGroup.removeAll();
    }, e.prototype.incrementalRender = function(t, a, n) {
      for (var i = a.getData(), o = a.coordinateSystem, s = o.dimensions, l = XS(a), u = this._progressiveEls = [], f = t.start; f < t.end; f++) {
        var h = ZS(i, this._dataGroup, f, s, o);
        h.incremental = !0, kc(h, i, f, l), u.push(h);
      }
    }, e.prototype.remove = function() {
      this._dataGroup && this._dataGroup.removeAll(), this._data = null;
    }, e.type = "parallel", e;
  }(Vt)
);
function t4(r, e, t) {
  var a = r.model, n = r.getRect(), i = new bt({
    shape: {
      x: n.x,
      y: n.y,
      width: n.width,
      height: n.height
    }
  }), o = a.get("layout") === "horizontal" ? "width" : "height";
  return i.setShape(o, 0), Bt(i, {
    shape: {
      width: n.width,
      height: n.height
    }
  }, e, t), i;
}
function jM(r, e, t, a) {
  for (var n = [], i = 0; i < t.length; i++) {
    var o = t[i], s = r.get(r.mapDimension(o), e);
    e4(s, a.getAxis(o).type) || n.push(a.dataToPoint(s, o));
  }
  return n;
}
function ZS(r, e, t, a, n) {
  var i = jM(r, t, a, n), o = new ze({
    shape: {
      points: i
    },
    // silent: true,
    z2: 10
  });
  return e.add(o), r.setItemGraphicEl(t, o), o;
}
function XS(r) {
  var e = r.get("smooth", !0);
  return e === !0 && (e = QH), e = pa(e), li(e) && (e = 0), {
    smooth: e
  };
}
function kc(r, e, t, a) {
  r.useStyle(e.getItemVisual(t, "style")), r.style.fill = null, r.setShape("smooth", a.smooth);
  var n = e.getItemModel(t), i = n.getModel("emphasis");
  ce(r, n, "lineStyle"), Wt(r, i.get("focus"), i.get("blurScope"), i.get("disabled"));
}
function e4(r, e) {
  return e === "category" ? r == null : r == null || isNaN(r);
}
const r4 = JH;
var a4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return xa(null, this, {
        useEncodeDefaulter: Y(n4, null, this)
      });
    }, e.prototype.getRawIndicesByActiveState = function(t) {
      var a = this.coordinateSystem, n = this.getData(), i = [];
      return a.eachActiveState(n, function(o, s) {
        t === o && i.push(n.getRawIndex(s));
      }), i;
    }, 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;
  }(Gt)
);
function n4(r) {
  var e = r.ecModel.getComponent("parallel", r.get("parallelIndex"));
  if (e) {
    var t = {};
    return C(e.dimensions, function(a) {
      var n = i4(a);
      t[a] = n;
    }), t;
  }
}
function i4(r) {
  return +r.replace("dim", "");
}
const o4 = a4;
var s4 = ["lineStyle", "opacity"], l4 = {
  seriesType: "parallel",
  reset: function(r, e) {
    var t = r.coordinateSystem, a = {
      normal: r.get(["lineStyle", "opacity"]),
      active: r.get("activeOpacity"),
      inactive: r.get("inactiveOpacity")
    };
    return {
      progress: function(n, i) {
        t.eachActiveState(i, function(o, s) {
          var l = a[o];
          if (o === "normal" && i.hasItemOption) {
            var u = i.getItemModel(s).get(s4, !0);
            u != null && (l = u);
          }
          var f = i.ensureUniqueItemVisual(s, "style");
          f.opacity = l;
        }, n.start, n.end);
      }
    };
  }
};
const u4 = l4;
function f4(r) {
  h4(r), v4(r);
}
function h4(r) {
  if (!r.parallel) {
    var e = !1;
    C(r.series, function(t) {
      t && t.type === "parallel" && (e = !0);
    }), e && (r.parallel = [{}]);
  }
}
function v4(r) {
  var e = Pt(r.parallelAxis);
  C(e, function(t) {
    if (j(t)) {
      var a = t.parallelIndex || 0, n = Pt(r.parallel)[a];
      n && n.parallelAxisDefault && ft(t, n.parallelAxisDefault, !1);
    }
  });
}
var c4 = 5, p4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      this._model = t, this._api = n, this._handlers || (this._handlers = {}, C(d4, function(i, o) {
        n.getZr().on(o, this._handlers[o] = Y(i, this));
      }, this)), No(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate");
    }, e.prototype.dispose = function(t, a) {
      Ks(this, "_throttledDispatchExpand"), C(this._handlers, function(n, i) {
        a.getZr().off(i, n);
      }), this._handlers = null;
    }, e.prototype._throttledDispatchExpand = function(t) {
      this._dispatchExpand(t);
    }, e.prototype._dispatchExpand = function(t) {
      t && this._api.dispatchAction(V({
        type: "parallelAxisExpand"
      }, t));
    }, e.type = "parallel", e;
  }($t)
), d4 = {
  mousedown: function(r) {
    Vc(this, "click") && (this._mouseDownPoint = [r.offsetX, r.offsetY]);
  },
  mouseup: function(r) {
    var e = this._mouseDownPoint;
    if (Vc(this, "click") && e) {
      var t = [r.offsetX, r.offsetY], a = Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2);
      if (a > c4)
        return;
      var n = this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]);
      n.behavior !== "none" && this._dispatchExpand({
        axisExpandWindow: n.axisExpandWindow
      });
    }
    this._mouseDownPoint = null;
  },
  mousemove: function(r) {
    if (!(this._mouseDownPoint || !Vc(this, "mousemove"))) {
      var e = this._model, t = e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]), a = t.behavior;
      a === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(a === "none" ? null : {
        axisExpandWindow: t.axisExpandWindow,
        // Jumping uses animation, and sliding suppresses animation.
        animation: a === "jump" ? null : {
          duration: 0
          // Disable animation.
        }
      });
    }
  }
};
function Vc(r, e) {
  var t = r._model;
  return t.get("axisExpandable") && t.get("axisExpandTriggerOn") === e;
}
const g4 = p4;
var y4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function() {
      r.prototype.init.apply(this, arguments), this.mergeOption({});
    }, e.prototype.mergeOption = function(t) {
      var a = this.option;
      t && ft(a, t, !0), this._initDimensions();
    }, e.prototype.contains = function(t, a) {
      var n = t.get("parallelIndex");
      return n != null && a.getComponent("parallel", n) === this;
    }, e.prototype.setAxisExpand = function(t) {
      C(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(a) {
        t.hasOwnProperty(a) && (this.option[a] = t[a]);
      }, this);
    }, e.prototype._initDimensions = function() {
      var t = this.dimensions = [], a = this.parallelAxisIndex = [], n = Et(this.ecModel.queryComponents({
        mainType: "parallelAxis"
      }), function(i) {
        return (i.get("parallelIndex") || 0) === this.componentIndex;
      }, this);
      C(n, function(i) {
        t.push("dim" + i.get("dim")), a.push(i.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;
  }(St)
);
const m4 = y4;
var _4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i, o) {
      var s = r.call(this, t, a, n) || this;
      return s.type = i || "value", s.axisIndex = o, s;
    }
    return e.prototype.isHorizontal = function() {
      return this.coordinateSystem.getModel().get("layout") !== "horizontal";
    }, e;
  }(Mr)
);
const S4 = _4;
function wi(r, e, t, a, n, i) {
  r = r || 0;
  var o = t[1] - t[0];
  if (n != null && (n = Gi(n, [0, o])), i != null && (i = Math.max(i, n ?? 0)), a === "all") {
    var s = Math.abs(e[1] - e[0]);
    s = Gi(s, [0, o]), n = i = Gi(s, [n, i]), a = 0;
  }
  e[0] = Gi(e[0], t), e[1] = Gi(e[1], t);
  var l = Bc(e, a);
  e[a] += r;
  var u = n || 0, f = t.slice();
  l.sign < 0 ? f[0] += u : f[1] -= u, e[a] = Gi(e[a], f);
  var h;
  return h = Bc(e, a), n != null && (h.sign !== l.sign || h.span < n) && (e[1 - a] = e[a] + l.sign * n), h = Bc(e, a), i != null && h.span > i && (e[1 - a] = e[a] + h.sign * i), e;
}
function Bc(r, e) {
  var t = r[e] - r[1 - e];
  return {
    span: Math.abs(t),
    sign: t > 0 ? -1 : t < 0 ? 1 : e ? -1 : 1
  };
}
function Gi(r, e) {
  return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, r));
}
var zc = C, QM = Math.min, JM = Math.max, qS = Math.floor, x4 = Math.ceil, KS = Yt, w4 = Math.PI, b4 = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.type = "parallel", this._axesMap = K(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, t, a);
    }
    return r.prototype._init = function(e, t, a) {
      var n = e.dimensions, i = e.parallelAxisIndex;
      zc(n, function(o, s) {
        var l = i[s], u = t.getComponent("parallelAxis", l), f = this._axesMap.set(o, new S4(o, kh(u), [0, 0], u.get("type"), l)), h = f.type === "category";
        f.onBand = h && u.get("boundaryGap"), f.inverse = u.get("inverse"), u.axis = f, f.model = u, f.coordinateSystem = u.coordinateSystem = this;
      }, this);
    }, r.prototype.update = function(e, t) {
      this._updateAxesFromSeries(this._model, e);
    }, r.prototype.containPoint = function(e) {
      var t = this._makeLayoutInfo(), a = t.axisBase, n = t.layoutBase, i = t.pixelDimIndex, o = e[1 - i], s = e[i];
      return o >= a && o <= a + t.axisLength && s >= n && s <= n + t.layoutLength;
    }, r.prototype.getModel = function() {
      return this._model;
    }, r.prototype._updateAxesFromSeries = function(e, t) {
      t.eachSeries(function(a) {
        if (e.contains(a, t)) {
          var n = a.getData();
          zc(this.dimensions, function(i) {
            var o = this._axesMap.get(i);
            o.scale.unionExtentFromData(n, n.mapDimension(i)), vo(o.scale, o.model);
          }, this);
        }
      }, this);
    }, r.prototype.resize = function(e, t) {
      this._rect = re(e.getBoxLayoutParams(), {
        width: t.getWidth(),
        height: t.getHeight()
      }), this._layoutAxes();
    }, r.prototype.getRect = function() {
      return this._rect;
    }, r.prototype._makeLayoutInfo = function() {
      var e = this._model, t = this._rect, a = ["x", "y"], n = ["width", "height"], i = e.get("layout"), o = i === "horizontal" ? 0 : 1, s = t[n[o]], l = [0, s], u = this.dimensions.length, f = Tu(e.get("axisExpandWidth"), l), h = Tu(e.get("axisExpandCount") || 0, [0, u]), v = e.get("axisExpandable") && u > 3 && u > h && h > 1 && f > 0 && s > 0, c = e.get("axisExpandWindow"), p;
      if (c)
        p = Tu(c[1] - c[0], l), c[1] = c[0] + p;
      else {
        p = Tu(f * (h - 1), l);
        var d = e.get("axisExpandCenter") || qS(u / 2);
        c = [f * d - p / 2], c[1] = c[0] + p;
      }
      var g = (s - p) / (u - h);
      g < 3 && (g = 0);
      var y = [qS(KS(c[0] / f, 1)) + 1, x4(KS(c[1] / f, 1)) - 1], m = g / f * c[0];
      return {
        layout: i,
        pixelDimIndex: o,
        layoutBase: t[a[o]],
        layoutLength: s,
        axisBase: t[a[1 - o]],
        axisLength: t[n[1 - o]],
        axisExpandable: v,
        axisExpandWidth: f,
        axisCollapseWidth: g,
        axisExpandWindow: c,
        axisCount: u,
        winInnerIndices: y,
        axisExpandWindow0Pos: m
      };
    }, r.prototype._layoutAxes = function() {
      var e = this._rect, t = this._axesMap, a = this.dimensions, n = this._makeLayoutInfo(), i = n.layout;
      t.each(function(o) {
        var s = [0, n.axisLength], l = o.inverse ? 1 : 0;
        o.setExtent(s[l], s[1 - l]);
      }), zc(a, function(o, s) {
        var l = (n.axisExpandable ? D4 : T4)(s, n), u = {
          horizontal: {
            x: l.position,
            y: n.axisLength
          },
          vertical: {
            x: 0,
            y: l.position
          }
        }, f = {
          horizontal: w4 / 2,
          vertical: 0
        }, h = [u[i].x + e.x, u[i].y + e.y], v = f[i], c = lr();
        yi(c, c, v), Ur(c, c, h), this._axesLayout[o] = {
          position: h,
          rotation: v,
          transform: c,
          axisNameAvailableWidth: l.axisNameAvailableWidth,
          axisLabelShow: l.axisLabelShow,
          nameTruncateMaxWidth: l.nameTruncateMaxWidth,
          tickDirection: 1,
          labelDirection: 1
        };
      }, this);
    }, r.prototype.getAxis = function(e) {
      return this._axesMap.get(e);
    }, r.prototype.dataToPoint = function(e, t) {
      return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e), t);
    }, r.prototype.eachActiveState = function(e, t, a, n) {
      a == null && (a = 0), n == null && (n = e.count());
      var i = this._axesMap, o = this.dimensions, s = [], l = [];
      C(o, function(g) {
        s.push(e.mapDimension(g)), l.push(i.get(g).model);
      });
      for (var u = this.hasAxisBrushed(), f = a; f < n; f++) {
        var h = void 0;
        if (!u)
          h = "normal";
        else {
          h = "active";
          for (var v = e.getValues(s, f), c = 0, p = o.length; c < p; c++) {
            var d = l[c].getActiveState(v[c]);
            if (d === "inactive") {
              h = "inactive";
              break;
            }
          }
        }
        t(h, f);
      }
    }, r.prototype.hasAxisBrushed = function() {
      for (var e = this.dimensions, t = this._axesMap, a = !1, n = 0, i = e.length; n < i; n++)
        t.get(e[n]).model.getActiveState() !== "normal" && (a = !0);
      return a;
    }, r.prototype.axisCoordToPoint = function(e, t) {
      var a = this._axesLayout[t];
      return br([e, 0], a.transform);
    }, r.prototype.getAxisLayout = function(e) {
      return rt(this._axesLayout[e]);
    }, r.prototype.getSlidedAxisExpandWindow = function(e) {
      var t = this._makeLayoutInfo(), a = t.pixelDimIndex, n = t.axisExpandWindow.slice(), i = n[1] - n[0], o = [0, t.axisExpandWidth * (t.axisCount - 1)];
      if (!this.containPoint(e))
        return {
          behavior: "none",
          axisExpandWindow: n
        };
      var s = e[a] - t.layoutBase - t.axisExpandWindow0Pos, l, u = "slide", f = t.axisCollapseWidth, h = this._model.get("axisExpandSlideTriggerArea"), v = h[0] != null;
      if (f)
        v && f && s < i * h[0] ? (u = "jump", l = s - i * h[2]) : v && f && s > i * (1 - h[0]) ? (u = "jump", l = s - i * (1 - h[2])) : (l = s - i * h[1]) >= 0 && (l = s - i * (1 - h[1])) <= 0 && (l = 0), l *= t.axisExpandWidth / f, l ? wi(l, n, o, "all") : u = "none";
      else {
        var c = n[1] - n[0], p = o[1] * s / c;
        n = [JM(0, p - c / 2)], n[1] = QM(o[1], n[0] + c), n[0] = n[1] - c;
      }
      return {
        axisExpandWindow: n,
        behavior: u
      };
    }, r;
  }()
);
function Tu(r, e) {
  return QM(JM(r, e[0]), e[1]);
}
function T4(r, e) {
  var t = e.layoutLength / (e.axisCount - 1);
  return {
    position: t * r,
    axisNameAvailableWidth: t,
    axisLabelShow: !0
  };
}
function D4(r, e) {
  var t = e.layoutLength, a = e.axisExpandWidth, n = e.axisCount, i = e.axisCollapseWidth, o = e.winInnerIndices, s, l = i, u = !1, f;
  return r < o[0] ? (s = r * i, f = i) : r <= o[1] ? (s = e.axisExpandWindow0Pos + r * a - e.axisExpandWindow[0], l = a, u = !0) : (s = t - (n - 1 - r) * i, f = i), {
    position: s,
    axisNameAvailableWidth: l,
    axisLabelShow: u,
    nameTruncateMaxWidth: f
  };
}
const C4 = b4;
function A4(r, e) {
  var t = [];
  return r.eachComponent("parallel", function(a, n) {
    var i = new C4(a, r, e);
    i.name = "parallel_" + n, i.resize(a, e), a.coordinateSystem = i, i.model = a, t.push(i);
  }), r.eachSeries(function(a) {
    if (a.get("coordinateSystem") === "parallel") {
      var n = a.getReferringComponents("parallel", Qt).models[0];
      a.coordinateSystem = n.coordinateSystem;
    }
  }), t;
}
var M4 = {
  create: A4
};
const I4 = M4;
var tI = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.activeIntervals = [], t;
    }
    return e.prototype.getAreaSelectStyle = function() {
      return hi([
        ["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(t) {
      var a = this.activeIntervals = rt(t);
      if (a)
        for (var n = a.length - 1; n >= 0; n--)
          or(a[n]);
    }, e.prototype.getActiveState = function(t) {
      var a = this.activeIntervals;
      if (!a.length)
        return "normal";
      if (t == null || isNaN(+t))
        return "inactive";
      if (a.length === 1) {
        var n = a[0];
        if (n[0] <= t && t <= n[1])
          return "active";
      } else
        for (var i = 0, o = a.length; i < o; i++)
          if (a[i][0] <= t && t <= a[i][1])
            return "active";
      return "inactive";
    }, e;
  }(St)
);
te(tI, bl);
const jS = tI;
var pi = !0, sl = Math.min, go = Math.max, L4 = Math.pow, E4 = 1e4, P4 = 6, R4 = 6, QS = "globalPan", N4 = {
  w: [0, 0],
  e: [0, 1],
  n: [1, 0],
  s: [1, 1]
}, O4 = {
  w: "ew",
  e: "ew",
  n: "ns",
  s: "ns",
  ne: "nesw",
  sw: "nesw",
  nw: "nwse",
  se: "nwse"
}, JS = {
  brushStyle: {
    lineWidth: 2,
    stroke: "rgba(210,219,238,0.3)",
    fill: "#D2DBEE"
  },
  transformable: !0,
  brushMode: "single",
  removeOnClick: !1
}, k4 = 0, V4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this) || this;
      return a._track = [], a._covers = [], a._handlers = {}, {}.NODE_ENV !== "production" && Q(t), a._zr = t, a.group = new nt(), a._uid = "brushController_" + k4++, C($4, function(n, i) {
        this._handlers[i] = Y(n, this);
      }, a), a;
    }
    return e.prototype.enableBrush = function(t) {
      return {}.NODE_ENV !== "production" && Q(this._mounted), this._brushType && this._doDisableBrush(), t.brushType && this._doEnableBrush(t), this;
    }, e.prototype._doEnableBrush = function(t) {
      var a = this._zr;
      this._enableGlobalPan || ZG(a, QS, this._uid), C(this._handlers, function(n, i) {
        a.on(i, n);
      }), this._brushType = t.brushType, this._brushOption = ft(rt(JS), t, !0);
    }, e.prototype._doDisableBrush = function() {
      var t = this._zr;
      XG(t, QS, this._uid), C(this._handlers, function(a, n) {
        t.off(n, a);
      }), this._brushType = this._brushOption = null;
    }, e.prototype.setPanels = function(t) {
      if (t && t.length) {
        var a = this._panels = {};
        C(t, function(n) {
          a[n.panelId] = rt(n);
        });
      } else
        this._panels = null;
      return this;
    }, e.prototype.mount = function(t) {
      t = t || {}, {}.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = t.enableGlobalPan;
      var a = this.group;
      return this._zr.add(a), a.attr({
        x: t.x || 0,
        y: t.y || 0,
        rotation: t.rotation || 0,
        scaleX: t.scaleX || 1,
        scaleY: t.scaleY || 1
      }), this._transform = a.getLocalTransform(), this;
    }, e.prototype.updateCovers = function(t) {
      ({}).NODE_ENV !== "production" && Q(this._mounted), t = G(t, function(v) {
        return ft(rt(JS), v, !0);
      });
      var a = "\0-brush-index-", n = this._covers, i = this._covers = [], o = this, s = this._creatingCover;
      return new ya(n, t, u, l).add(f).update(f).remove(h).execute(), this;
      function l(v, c) {
        return (v.id != null ? v.id : a + c) + "-" + v.brushType;
      }
      function u(v, c) {
        return l(v.__brushOption, c);
      }
      function f(v, c) {
        var p = t[v];
        if (c != null && n[c] === s)
          i[v] = n[c];
        else {
          var d = i[v] = c != null ? (n[c].__brushOption = p, n[c]) : rI(o, eI(o, p));
          Oy(o, d);
        }
      }
      function h(v) {
        n[v] !== s && o.group.remove(n[v]);
      }
    }, e.prototype.unmount = function() {
      if (!({}.NODE_ENV !== "production" && !this._mounted))
        return this.enableBrush(!1), kd(this), this._zr.remove(this.group), {}.NODE_ENV !== "production" && (this._mounted = !1), this;
    }, e.prototype.dispose = function() {
      this.unmount(), this.off();
    }, e;
  }(fr)
);
function eI(r, e) {
  var t = Wh[e.brushType].createCover(r, e);
  return t.__brushOption = e, nI(t, e), r.group.add(t), t;
}
function rI(r, e) {
  var t = ky(e);
  return t.endCreating && (t.endCreating(r, e), nI(e, e.__brushOption)), e;
}
function aI(r, e) {
  var t = e.__brushOption;
  ky(e).updateCoverShape(r, e, t.range, t);
}
function nI(r, e) {
  var t = e.z;
  t == null && (t = E4), r.traverse(function(a) {
    a.z = t, a.z2 = t;
  });
}
function Oy(r, e) {
  ky(e).updateCommon(r, e), aI(r, e);
}
function ky(r) {
  return Wh[r.__brushOption.brushType];
}
function Vy(r, e, t) {
  var a = r._panels;
  if (!a)
    return pi;
  var n, i = r._transform;
  return C(a, function(o) {
    o.isTargetByCursor(e, t, i) && (n = o);
  }), n;
}
function iI(r, e) {
  var t = r._panels;
  if (!t)
    return pi;
  var a = e.__brushOption.panelId;
  return a != null ? t[a] : pi;
}
function kd(r) {
  var e = r._covers, t = e.length;
  return C(e, function(a) {
    r.group.remove(a);
  }, r), e.length = 0, !!t;
}
function di(r, e) {
  var t = G(r._covers, function(a) {
    var n = a.__brushOption, i = rt(n.range);
    return {
      brushType: n.brushType,
      panelId: n.panelId,
      range: i
    };
  });
  r.trigger("brush", {
    areas: t,
    isEnd: !!e.isEnd,
    removeOnClick: !!e.removeOnClick
  });
}
function B4(r) {
  var e = r._track;
  if (!e.length)
    return !1;
  var t = e[e.length - 1], a = e[0], n = t[0] - a[0], i = t[1] - a[1], o = L4(n * n + i * i, 0.5);
  return o > P4;
}
function oI(r) {
  var e = r.length - 1;
  return e < 0 && (e = 0), [r[0], r[e]];
}
function sI(r, e, t, a) {
  var n = new nt();
  return n.add(new bt({
    name: "main",
    style: By(t),
    silent: !0,
    draggable: !0,
    cursor: "move",
    drift: ot(tx, r, e, n, ["n", "s", "w", "e"]),
    ondragend: ot(di, e, {
      isEnd: !0
    })
  })), C(a, function(i) {
    n.add(new bt({
      name: i.join(""),
      style: {
        opacity: 0
      },
      draggable: !0,
      silent: !0,
      invisible: !0,
      drift: ot(tx, r, e, n, i),
      ondragend: ot(di, e, {
        isEnd: !0
      })
    }));
  }), n;
}
function lI(r, e, t, a) {
  var n = a.brushStyle.lineWidth || 0, i = go(n, R4), o = t[0][0], s = t[1][0], l = o - n / 2, u = s - n / 2, f = t[0][1], h = t[1][1], v = f - i + n / 2, c = h - i + n / 2, p = f - o, d = h - s, g = p + n, y = d + n;
  ea(r, e, "main", o, s, p, d), a.transformable && (ea(r, e, "w", l, u, i, y), ea(r, e, "e", v, u, i, y), ea(r, e, "n", l, u, g, i), ea(r, e, "s", l, c, g, i), ea(r, e, "nw", l, u, i, i), ea(r, e, "ne", v, u, i, i), ea(r, e, "sw", l, c, i, i), ea(r, e, "se", v, c, i, i));
}
function Vd(r, e) {
  var t = e.__brushOption, a = t.transformable, n = e.childAt(0);
  n.useStyle(By(t)), n.attr({
    silent: !a,
    cursor: a ? "move" : "default"
  }), C([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(i) {
    var o = e.childOfName(i.join("")), s = i.length === 1 ? Bd(r, i[0]) : G4(r, i);
    o && o.attr({
      silent: !a,
      invisible: !a,
      cursor: a ? O4[s] + "-resize" : null
    });
  });
}
function ea(r, e, t, a, n, i, o) {
  var s = e.childOfName(t);
  s && s.setShape(H4(zy(r, e, [[a, n], [a + i, n + o]])));
}
function By(r) {
  return tt({
    strokeNoScale: !0
  }, r.brushStyle);
}
function uI(r, e, t, a) {
  var n = [sl(r, t), sl(e, a)], i = [go(r, t), go(e, a)];
  return [
    [n[0], i[0]],
    [n[1], i[1]]
    // y range
  ];
}
function z4(r) {
  return ai(r.group);
}
function Bd(r, e) {
  var t = {
    w: "left",
    e: "right",
    n: "top",
    s: "bottom"
  }, a = {
    left: "w",
    right: "e",
    top: "n",
    bottom: "s"
  }, n = xh(t[e], z4(r));
  return a[n];
}
function G4(r, e) {
  var t = [Bd(r, e[0]), Bd(r, e[1])];
  return (t[0] === "e" || t[0] === "w") && t.reverse(), t.join("");
}
function tx(r, e, t, a, n, i) {
  var o = t.__brushOption, s = r.toRectRange(o.range), l = fI(e, n, i);
  C(a, function(u) {
    var f = N4[u];
    s[f[0]][f[1]] += l[f[0]];
  }), o.range = r.fromRectRange(uI(s[0][0], s[1][0], s[0][1], s[1][1])), Oy(e, t), di(e, {
    isEnd: !1
  });
}
function F4(r, e, t, a) {
  var n = e.__brushOption.range, i = fI(r, t, a);
  C(n, function(o) {
    o[0] += i[0], o[1] += i[1];
  }), Oy(r, e), di(r, {
    isEnd: !1
  });
}
function fI(r, e, t) {
  var a = r.group, n = a.transformCoordToLocal(e, t), i = a.transformCoordToLocal(0, 0);
  return [n[0] - i[0], n[1] - i[1]];
}
function zy(r, e, t) {
  var a = iI(r, e);
  return a && a !== pi ? a.clipPath(t, r._transform) : rt(t);
}
function H4(r) {
  var e = sl(r[0][0], r[1][0]), t = sl(r[0][1], r[1][1]), a = go(r[0][0], r[1][0]), n = go(r[0][1], r[1][1]);
  return {
    x: e,
    y: t,
    width: a - e,
    height: n - t
  };
}
function W4(r, e, t) {
  if (
    // Check active
    !(!r._brushType || U4(r, e.offsetX, e.offsetY))
  ) {
    var a = r._zr, n = r._covers, i = Vy(r, e, t);
    if (!r._dragging)
      for (var o = 0; o < n.length; o++) {
        var s = n[o].__brushOption;
        if (i && (i === pi || s.panelId === i.panelId) && Wh[s.brushType].contain(n[o], t[0], t[1]))
          return;
      }
    i && a.setCursorStyle("crosshair");
  }
}
function zd(r) {
  var e = r.event;
  e.preventDefault && e.preventDefault();
}
function Gd(r, e, t) {
  return r.childOfName("main").contain(e, t);
}
function hI(r, e, t, a) {
  var n = r._creatingCover, i = r._creatingPanel, o = r._brushOption, s;
  if (r._track.push(t.slice()), B4(r) || n) {
    if (i && !n) {
      o.brushMode === "single" && kd(r);
      var l = rt(o);
      l.brushType = ex(l.brushType, i), l.panelId = i === pi ? null : i.panelId, n = r._creatingCover = eI(r, l), r._covers.push(n);
    }
    if (n) {
      var u = Wh[ex(r._brushType, i)], f = n.__brushOption;
      f.range = u.getCreatingRange(zy(r, n, r._track)), a && (rI(r, n), u.updateCommon(r, n)), aI(r, n), s = {
        isEnd: a
      };
    }
  } else
    a && o.brushMode === "single" && o.removeOnClick && Vy(r, e, t) && kd(r) && (s = {
      isEnd: a,
      removeOnClick: !0
    });
  return s;
}
function ex(r, e) {
  return r === "auto" ? ({}.NODE_ENV !== "production" && Q(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : r;
}
var $4 = {
  mousedown: function(r) {
    if (this._dragging)
      rx(this, r);
    else if (!r.target || !r.target.draggable) {
      zd(r);
      var e = this.group.transformCoordToLocal(r.offsetX, r.offsetY);
      this._creatingCover = null;
      var t = this._creatingPanel = Vy(this, r, e);
      t && (this._dragging = !0, this._track = [e.slice()]);
    }
  },
  mousemove: function(r) {
    var e = r.offsetX, t = r.offsetY, a = this.group.transformCoordToLocal(e, t);
    if (W4(this, r, a), this._dragging) {
      zd(r);
      var n = hI(this, r, a, !1);
      n && di(this, n);
    }
  },
  mouseup: function(r) {
    rx(this, r);
  }
};
function rx(r, e) {
  if (r._dragging) {
    zd(e);
    var t = e.offsetX, a = e.offsetY, n = r.group.transformCoordToLocal(t, a), i = hI(r, e, n, !0);
    r._dragging = !1, r._track = [], r._creatingCover = null, i && di(r, i);
  }
}
function U4(r, e, t) {
  var a = r._zr;
  return e < 0 || e > a.getWidth() || t < 0 || t > a.getHeight();
}
var Wh = {
  lineX: ax(0),
  lineY: ax(1),
  rect: {
    createCover: function(r, e) {
      function t(a) {
        return a;
      }
      return sI({
        toRectRange: t,
        fromRectRange: t
      }, r, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
    },
    getCreatingRange: function(r) {
      var e = oI(r);
      return uI(e[1][0], e[1][1], e[0][0], e[0][1]);
    },
    updateCoverShape: function(r, e, t, a) {
      lI(r, e, t, a);
    },
    updateCommon: Vd,
    contain: Gd
  },
  polygon: {
    createCover: function(r, e) {
      var t = new nt();
      return t.add(new ze({
        name: "main",
        style: By(e),
        silent: !0
      })), t;
    },
    getCreatingRange: function(r) {
      return r;
    },
    endCreating: function(r, e) {
      e.remove(e.childAt(0)), e.add(new Be({
        name: "main",
        draggable: !0,
        drift: ot(F4, r, e),
        ondragend: ot(di, r, {
          isEnd: !0
        })
      }));
    },
    updateCoverShape: function(r, e, t, a) {
      e.childAt(0).setShape({
        points: zy(r, e, t)
      });
    },
    updateCommon: Vd,
    contain: Gd
  }
};
function ax(r) {
  return {
    createCover: function(e, t) {
      return sI({
        toRectRange: function(a) {
          var n = [a, [0, 100]];
          return r && n.reverse(), n;
        },
        fromRectRange: function(a) {
          return a[r];
        }
      }, e, t, [[["w"], ["e"]], [["n"], ["s"]]][r]);
    },
    getCreatingRange: function(e) {
      var t = oI(e), a = sl(t[0][r], t[1][r]), n = go(t[0][r], t[1][r]);
      return [a, n];
    },
    updateCoverShape: function(e, t, a, n) {
      var i, o = iI(e, t);
      if (o !== pi && o.getLinearBrushOtherExtent)
        i = o.getLinearBrushOtherExtent(r);
      else {
        var s = e._zr;
        i = [0, [s.getWidth(), s.getHeight()][1 - r]];
      }
      var l = [a, i];
      r && l.reverse(), lI(e, t, l, n);
    },
    updateCommon: Vd,
    contain: Gd
  };
}
const Gy = V4;
function vI(r) {
  return r = Fy(r), function(e) {
    return yD(e, r);
  };
}
function cI(r, e) {
  return r = Fy(r), function(t) {
    var a = e ?? t, n = a ? r.width : r.height, i = a ? r.x : r.y;
    return [i, i + (n || 0)];
  };
}
function pI(r, e, t) {
  var a = Fy(r);
  return function(n, i) {
    return a.contain(i[0], i[1]) && !zh(n, e, t);
  };
}
function Fy(r) {
  return ht.create(r);
}
var Y4 = ["axisLine", "axisTickLabel", "axisName"], Z4 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a) {
      r.prototype.init.apply(this, arguments), (this._brushController = new Gy(a.getZr())).on("brush", Y(this._onBrush, this));
    }, e.prototype.render = function(t, a, n, i) {
      if (!X4(t, a, i)) {
        this.axisModel = t, this.api = n, this.group.removeAll();
        var o = this._axisGroup;
        if (this._axisGroup = new nt(), this.group.add(this._axisGroup), !!t.get("show")) {
          var s = K4(t, a), l = s.coordinateSystem, u = t.getAreaSelectStyle(), f = u.width, h = t.axis.dim, v = l.getAxisLayout(h), c = V({
            strokeContainThreshold: f
          }, v), p = new ma(t, c);
          C(Y4, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(c, u, t, s, f, n), gl(o, this._axisGroup, t);
        }
      }
    }, e.prototype._refreshBrushController = function(t, a, n, i, o, s) {
      var l = n.axis.getExtent(), u = l[1] - l[0], f = Math.min(30, Math.abs(u) * 0.1), h = ht.create({
        x: l[0],
        y: -o / 2,
        width: u,
        height: o
      });
      h.x -= f, h.width += 2 * f, this._brushController.mount({
        enableGlobalPan: !0,
        rotation: t.rotation,
        x: t.position[0],
        y: t.position[1]
      }).setPanels([{
        panelId: "pl",
        clipPath: vI(h),
        isTargetByCursor: pI(h, s, i),
        getLinearBrushOtherExtent: cI(h, 0)
      }]).enableBrush({
        brushType: "lineX",
        brushStyle: a,
        removeOnClick: !0
      }).updateCovers(q4(n));
    }, e.prototype._onBrush = function(t) {
      var a = t.areas, n = this.axisModel, i = n.axis, o = G(a, function(s) {
        return [i.coordToData(s.range[0], !0), i.coordToData(s.range[1], !0)];
      });
      (!n.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({
        type: "axisAreaSelect",
        parallelAxisId: n.id,
        intervals: o
      });
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.type = "parallelAxis", e;
  }($t)
);
function X4(r, e, t) {
  return t && t.type === "axisAreaSelect" && e.findComponents({
    mainType: "parallelAxis",
    query: t
  })[0] === r;
}
function q4(r) {
  var e = r.axis;
  return G(r.activeIntervals, function(t) {
    return {
      brushType: "lineX",
      panelId: "pl",
      range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
    };
  });
}
function K4(r, e) {
  return e.getComponent("parallel", r.get("parallelIndex"));
}
const j4 = Z4;
var Q4 = {
  type: "axisAreaSelect",
  event: "axisAreaSelected"
  // update: 'updateVisual'
};
function J4(r) {
  r.registerAction(Q4, function(e, t) {
    t.eachComponent({
      mainType: "parallelAxis",
      query: e
    }, function(a) {
      a.axis.model.setActiveIntervals(e.intervals);
    });
  }), r.registerAction("parallelAxisExpand", function(e, t) {
    t.eachComponent({
      mainType: "parallel",
      query: e
    }, function(a) {
      a.setAxisExpand(e);
    });
  });
}
var tW = {
  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 dI(r) {
  r.registerComponentView(g4), r.registerComponentModel(m4), r.registerCoordinateSystem("parallel", I4), r.registerPreprocessor(f4), r.registerComponentModel(jS), r.registerComponentView(j4), po(r, "parallel", jS, tW), J4(r);
}
function eW(r) {
  pt(dI), r.registerChartView(r4), r.registerSeriesModel(o4), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, u4);
}
var rW = (
  /** @class */
  function() {
    function r() {
      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 r;
  }()
), aW = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      return r.call(this, t) || this;
    }
    return e.prototype.getDefaultShape = function() {
      return new rW();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.extent;
      t.moveTo(a.x1, a.y1), t.bezierCurveTo(a.cpx1, a.cpy1, a.cpx2, a.cpy2, a.x2, a.y2), a.orient === "vertical" ? (t.lineTo(a.x2 + n, a.y2), t.bezierCurveTo(a.cpx2 + n, a.cpy2, a.cpx1 + n, a.cpy1, a.x1 + n, a.y1)) : (t.lineTo(a.x2, a.y2 + n), t.bezierCurveTo(a.cpx2, a.cpy2 + n, a.cpx1, a.cpy1 + n, a.x1, a.y1 + n)), t.closePath();
    }, e.prototype.highlight = function() {
      da(this);
    }, e.prototype.downplay = function() {
      ga(this);
    }, e;
  }(gt)
), nW = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._focusAdjacencyDisabled = !1, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = this, o = t.getGraph(), s = this.group, l = t.layoutInfo, u = l.width, f = l.height, h = t.getData(), v = t.getData("edge"), c = t.get("orient");
      this._model = t, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
        var d = new aW(), g = it(d);
        g.dataIndex = p.dataIndex, g.seriesIndex = t.seriesIndex, g.dataType = "edge";
        var y = p.getModel(), m = y.getModel("lineStyle"), _ = m.get("curveness"), S = p.node1.getLayout(), w = p.node1.getModel(), x = w.get("localX"), b = w.get("localY"), T = p.node2.getLayout(), D = p.node2.getModel(), A = D.get("localX"), M = D.get("localY"), I = p.getLayout(), L, E, P, R, k, O, B, F;
        switch (d.shape.extent = Math.max(1, I.dy), d.shape.orient = c, c === "vertical" ? (L = (x != null ? x * u : S.x) + I.sy, E = (b != null ? b * f : S.y) + S.dy, P = (A != null ? A * u : T.x) + I.ty, R = M != null ? M * f : T.y, k = L, O = E * (1 - _) + R * _, B = P, F = E * _ + R * (1 - _)) : (L = (x != null ? x * u : S.x) + S.dx, E = (b != null ? b * f : S.y) + I.sy, P = A != null ? A * u : T.x, R = (M != null ? M * f : T.y) + I.ty, k = L * (1 - _) + P * _, O = E, B = L * _ + P * (1 - _), F = R), d.setShape({
          x1: L,
          y1: E,
          x2: P,
          y2: R,
          cpx1: k,
          cpy1: O,
          cpx2: B,
          cpy2: F
        }), d.useStyle(m.getItemStyle()), d.style.fill) {
          case "source":
            d.style.fill = p.node1.getVisual("color"), d.style.decal = p.node1.getVisual("style").decal;
            break;
          case "target":
            d.style.fill = p.node2.getVisual("color"), d.style.decal = p.node2.getVisual("style").decal;
            break;
          case "gradient":
            var W = p.node1.getVisual("color"), Z = p.node2.getVisual("color");
            $(W) && $(Z) && (d.style.fill = new dl(0, 0, +(c === "horizontal"), +(c === "vertical"), [{
              color: W,
              offset: 0
            }, {
              color: Z,
              offset: 1
            }]));
        }
        pe(d, ie(y, "edgeLabel"), {
          labelFetcher: t,
          labelDataIndex: p.dataIndex,
          defaultText: "" + y.get("value")
        }), d.setTextConfig({
          position: "inside"
        });
        var J = y.getModel("emphasis");
        ce(d, y, "lineStyle", function(yt) {
          return yt.getItemStyle();
        }), s.add(d), v.setItemGraphicEl(p.dataIndex, d);
        var et = J.get("focus");
        Wt(d, et === "adjacency" ? p.getAdjacentDataIndices() : et, J.get("blurScope"), J.get("disabled")), it(d).dataType = "edge";
      }), o.eachNode(function(p) {
        var d = p.getLayout(), g = p.getModel(), y = g.get("localX"), m = g.get("localY"), _ = g.getModel("emphasis"), S = new bt({
          shape: {
            x: y != null ? y * u : d.x,
            y: m != null ? m * f : d.y,
            width: d.dx,
            height: d.dy
          },
          style: g.getModel("itemStyle").getItemStyle(),
          z2: 10
        });
        pe(S, ie(g), {
          labelFetcher: t,
          labelDataIndex: p.dataIndex,
          defaultText: p.id
        }), S.disableLabelAnimation = !0, S.setStyle("fill", p.getVisual("color")), S.setStyle("decal", p.getVisual("style").decal), ce(S, g), s.add(S), h.setItemGraphicEl(p.dataIndex, S), it(S).dataType = "node";
        var w = _.get("focus");
        Wt(S, w === "adjacency" ? p.getAdjacentDataIndices() : w, _.get("blurScope"), _.get("disabled"));
      }), h.eachItemGraphicEl(function(p, d) {
        var g = h.getItemModel(d);
        g.get("draggable") && (p.drift = function(y, m) {
          i._focusAdjacencyDisabled = !0, this.shape.x += y, this.shape.y += m, this.dirty(), n.dispatchAction({
            type: "dragNode",
            seriesId: t.id,
            dataIndex: h.getRawIndex(d),
            localX: this.shape.x / u,
            localY: this.shape.y / f
          });
        }, p.ondragend = function() {
          i._focusAdjacencyDisabled = !1;
        }, p.draggable = !0, p.cursor = "move");
      }), !this._data && t.isAnimationEnabled() && s.setClipPath(iW(s.getBoundingRect(), t, function() {
        s.removeClipPath();
      })), this._data = t.getData();
    }, e.prototype.dispose = function() {
    }, e.type = "sankey", e;
  }(Vt)
);
function iW(r, e, t) {
  var a = new bt({
    shape: {
      x: r.x - 10,
      y: r.y - 10,
      width: 0,
      height: r.height + 20
    }
  });
  return Bt(a, {
    shape: {
      width: r.width + 20
    }
  }, e, t), a;
}
const oW = nW;
var sW = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      var n = t.edges || t.links, i = t.data || t.nodes, o = t.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 kt(o[l], this, a);
        else if ({}.NODE_ENV !== "production")
          throw new Error("levels[i].depth is mandatory and should be natural number");
      if (i && n) {
        var u = KM(i, n, this, !0, f);
        return u.data;
      }
      function f(h, v) {
        h.wrapMethod("getItemModel", function(c, p) {
          var d = c.parentModel, g = d.getData().getItemLayout(p);
          if (g) {
            var y = g.depth, m = d.levelModels[y];
            m && (c.parentModel = m);
          }
          return c;
        }), v.wrapMethod("getItemModel", function(c, p) {
          var d = c.parentModel, g = d.getGraph().getEdgeByIndex(p), y = g.node1.getLayout();
          if (y) {
            var m = y.depth, _ = d.levelModels[m];
            _ && (c.parentModel = _);
          }
          return c;
        });
      }
    }, e.prototype.setNodePosition = function(t, a) {
      var n = this.option.data || this.option.nodes, i = n[t];
      i.localX = a[0], i.localY = a[1];
    }, e.prototype.getGraph = function() {
      return this.getData().graph;
    }, e.prototype.getEdgeData = function() {
      return this.getGraph().edgeData;
    }, e.prototype.formatTooltip = function(t, a, n) {
      function i(c) {
        return isNaN(c) || c == null;
      }
      if (n === "edge") {
        var o = this.getDataParams(t, n), s = o.data, l = o.value, u = s.source + " -- " + s.target;
        return oe("nameValue", {
          name: u,
          value: l,
          noValue: i(l)
        });
      } else {
        var f = this.getGraph().getNodeByIndex(t), h = f.getLayout().value, v = this.getDataParams(t, n).data.name;
        return oe("nameValue", {
          name: v != null ? v + "" : null,
          value: h,
          noValue: i(h)
        });
      }
    }, e.prototype.optionUpdated = function() {
    }, e.prototype.getDataParams = function(t, a) {
      var n = r.prototype.getDataParams.call(this, t, a);
      if (n.value == null && a === "node") {
        var i = this.getGraph().getNodeByIndex(t), o = i.getLayout().value;
        n.value = o;
      }
      return n;
    }, 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;
  }(Gt)
);
const lW = sW;
function uW(r, e) {
  r.eachSeriesByType("sankey", function(t) {
    var a = t.get("nodeWidth"), n = t.get("nodeGap"), i = fW(t, e);
    t.layoutInfo = i;
    var o = i.width, s = i.height, l = t.getGraph(), u = l.nodes, f = l.edges;
    vW(u);
    var h = Et(u, function(d) {
      return d.getLayout().value === 0;
    }), v = h.length !== 0 ? 0 : t.get("layoutIterations"), c = t.get("orient"), p = t.get("nodeAlign");
    hW(u, f, a, n, o, s, v, c, p);
  });
}
function fW(r, e) {
  return re(r.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function hW(r, e, t, a, n, i, o, s, l) {
  cW(r, e, t, n, i, s, l), yW(r, e, i, n, a, o, s), CW(r, s);
}
function vW(r) {
  C(r, function(e) {
    var t = Za(e.outEdges, Wf), a = Za(e.inEdges, Wf), n = e.getValue() || 0, i = Math.max(t, a, n);
    e.setLayout({
      value: i
    }, !0);
  });
}
function cW(r, e, t, a, n, i, o) {
  for (var s = [], l = [], u = [], f = [], h = 0, v = 0; v < e.length; v++)
    s[v] = 1;
  for (var v = 0; v < r.length; v++)
    l[v] = r[v].inEdges.length, l[v] === 0 && u.push(r[v]);
  for (var c = -1; u.length; ) {
    for (var p = 0; p < u.length; p++) {
      var d = u[p], g = d.hostGraph.data.getRawDataItem(d.dataIndex), y = g.depth != null && g.depth >= 0;
      y && g.depth > c && (c = g.depth), d.setLayout({
        depth: y ? g.depth : h
      }, !0), i === "vertical" ? d.setLayout({
        dy: t
      }, !0) : d.setLayout({
        dx: t
      }, !0);
      for (var m = 0; m < d.outEdges.length; m++) {
        var _ = d.outEdges[m], S = e.indexOf(_);
        s[S] = 0;
        var w = _.node2, x = r.indexOf(w);
        --l[x] === 0 && f.indexOf(w) < 0 && f.push(w);
      }
    }
    ++h, u = f, f = [];
  }
  for (var v = 0; v < s.length; v++)
    if (s[v] === 1)
      throw new Error("Sankey is a DAG, the original data has cycle!");
  var b = c > h - 1 ? c : h - 1;
  o && o !== "left" && pW(r, o, i, b);
  var T = i === "vertical" ? (n - t) / b : (a - t) / b;
  gW(r, T, i);
}
function gI(r) {
  var e = r.hostGraph.data.getRawDataItem(r.dataIndex);
  return e.depth != null && e.depth >= 0;
}
function pW(r, e, t, a) {
  if (e === "right") {
    for (var n = [], i = r, o = 0; i.length; ) {
      for (var s = 0; s < i.length; s++) {
        var l = i[s];
        l.setLayout({
          skNodeHeight: o
        }, !0);
        for (var u = 0; u < l.inEdges.length; u++) {
          var f = l.inEdges[u];
          n.indexOf(f.node1) < 0 && n.push(f.node1);
        }
      }
      i = n, n = [], ++o;
    }
    C(r, function(h) {
      gI(h) || h.setLayout({
        depth: Math.max(0, a - h.getLayout().skNodeHeight)
      }, !0);
    });
  } else
    e === "justify" && dW(r, a);
}
function dW(r, e) {
  C(r, function(t) {
    !gI(t) && !t.outEdges.length && t.setLayout({
      depth: e
    }, !0);
  });
}
function gW(r, e, t) {
  C(r, function(a) {
    var n = a.getLayout().depth * e;
    t === "vertical" ? a.setLayout({
      y: n
    }, !0) : a.setLayout({
      x: n
    }, !0);
  });
}
function yW(r, e, t, a, n, i, o) {
  var s = mW(r, o);
  _W(s, e, t, a, n, o), Gc(s, n, t, a, o);
  for (var l = 1; i > 0; i--)
    l *= 0.99, SW(s, l, o), Gc(s, n, t, a, o), DW(s, l, o), Gc(s, n, t, a, o);
}
function mW(r, e) {
  var t = [], a = e === "vertical" ? "y" : "x", n = Hp(r, function(i) {
    return i.getLayout()[a];
  });
  return n.keys.sort(function(i, o) {
    return i - o;
  }), C(n.keys, function(i) {
    t.push(n.buckets.get(i));
  }), t;
}
function _W(r, e, t, a, n, i) {
  var o = 1 / 0;
  C(r, function(s) {
    var l = s.length, u = 0;
    C(s, function(h) {
      u += h.getLayout().value;
    });
    var f = i === "vertical" ? (a - (l - 1) * n) / u : (t - (l - 1) * n) / u;
    f < o && (o = f);
  }), C(r, function(s) {
    C(s, function(l, u) {
      var f = l.getLayout().value * o;
      i === "vertical" ? (l.setLayout({
        x: u
      }, !0), l.setLayout({
        dx: f
      }, !0)) : (l.setLayout({
        y: u
      }, !0), l.setLayout({
        dy: f
      }, !0));
    });
  }), C(e, function(s) {
    var l = +s.getValue() * o;
    s.setLayout({
      dy: l
    }, !0);
  });
}
function Gc(r, e, t, a, n) {
  var i = n === "vertical" ? "x" : "y";
  C(r, function(o) {
    o.sort(function(d, g) {
      return d.getLayout()[i] - g.getLayout()[i];
    });
    for (var s, l, u, f = 0, h = o.length, v = n === "vertical" ? "dx" : "dy", c = 0; c < h; c++)
      l = o[c], u = f - l.getLayout()[i], u > 0 && (s = l.getLayout()[i] + u, n === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0)), f = l.getLayout()[i] + l.getLayout()[v] + e;
    var p = n === "vertical" ? a : t;
    if (u = f - e - p, u > 0) {
      s = l.getLayout()[i] - u, n === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0), f = s;
      for (var c = h - 2; c >= 0; --c)
        l = o[c], u = l.getLayout()[i] + l.getLayout()[v] + e - f, u > 0 && (s = l.getLayout()[i] - u, n === "vertical" ? l.setLayout({
          x: s
        }, !0) : l.setLayout({
          y: s
        }, !0)), f = l.getLayout()[i];
    }
  });
}
function SW(r, e, t) {
  C(r.slice().reverse(), function(a) {
    C(a, function(n) {
      if (n.outEdges.length) {
        var i = Za(n.outEdges, xW, t) / Za(n.outEdges, Wf);
        if (isNaN(i)) {
          var o = n.outEdges.length;
          i = o ? Za(n.outEdges, wW, t) / o : 0;
        }
        if (t === "vertical") {
          var s = n.getLayout().x + (i - rn(n, t)) * e;
          n.setLayout({
            x: s
          }, !0);
        } else {
          var l = n.getLayout().y + (i - rn(n, t)) * e;
          n.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function xW(r, e) {
  return rn(r.node2, e) * r.getValue();
}
function wW(r, e) {
  return rn(r.node2, e);
}
function bW(r, e) {
  return rn(r.node1, e) * r.getValue();
}
function TW(r, e) {
  return rn(r.node1, e);
}
function rn(r, e) {
  return e === "vertical" ? r.getLayout().x + r.getLayout().dx / 2 : r.getLayout().y + r.getLayout().dy / 2;
}
function Wf(r) {
  return r.getValue();
}
function Za(r, e, t) {
  for (var a = 0, n = r.length, i = -1; ++i < n; ) {
    var o = +e(r[i], t);
    isNaN(o) || (a += o);
  }
  return a;
}
function DW(r, e, t) {
  C(r, function(a) {
    C(a, function(n) {
      if (n.inEdges.length) {
        var i = Za(n.inEdges, bW, t) / Za(n.inEdges, Wf);
        if (isNaN(i)) {
          var o = n.inEdges.length;
          i = o ? Za(n.inEdges, TW, t) / o : 0;
        }
        if (t === "vertical") {
          var s = n.getLayout().x + (i - rn(n, t)) * e;
          n.setLayout({
            x: s
          }, !0);
        } else {
          var l = n.getLayout().y + (i - rn(n, t)) * e;
          n.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function CW(r, e) {
  var t = e === "vertical" ? "x" : "y";
  C(r, function(a) {
    a.outEdges.sort(function(n, i) {
      return n.node2.getLayout()[t] - i.node2.getLayout()[t];
    }), a.inEdges.sort(function(n, i) {
      return n.node1.getLayout()[t] - i.node1.getLayout()[t];
    });
  }), C(r, function(a) {
    var n = 0, i = 0;
    C(a.outEdges, function(o) {
      o.setLayout({
        sy: n
      }, !0), n += o.getLayout().dy;
    }), C(a.inEdges, function(o) {
      o.setLayout({
        ty: i
      }, !0), i += o.getLayout().dy;
    });
  });
}
function AW(r) {
  r.eachSeriesByType("sankey", function(e) {
    var t = e.getGraph(), a = t.nodes, n = t.edges;
    if (a.length) {
      var i = 1 / 0, o = -1 / 0;
      C(a, function(s) {
        var l = s.getLayout().value;
        l < i && (i = l), l > o && (o = l);
      }), C(a, function(s) {
        var l = new he({
          type: "color",
          mappingMethod: "linear",
          dataExtent: [i, o],
          visual: e.get("color")
        }), u = l.mapValueToVisual(s.getLayout().value), f = s.getModel().get(["itemStyle", "color"]);
        f != null ? (s.setVisual("color", f), s.setVisual("style", {
          fill: f
        })) : (s.setVisual("color", u), s.setVisual("style", {
          fill: u
        }));
      });
    }
    n.length && C(n, function(s) {
      var l = s.getModel().get("lineStyle");
      s.setVisual("style", l);
    });
  });
}
function MW(r) {
  r.registerChartView(oW), r.registerSeriesModel(lW), r.registerLayout(uW), r.registerVisual(AW), r.registerAction({
    type: "dragNode",
    event: "dragnode",
    // here can only use 'update' now, other value is not support in echarts.
    update: "update"
  }, function(e, t) {
    t.eachComponent({
      mainType: "series",
      subType: "sankey",
      query: e
    }, function(a) {
      a.setNodePosition(e.dataIndex, [e.localX, e.localY]);
    });
  });
}
var yI = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.getInitialData = function(e, t) {
      var a, n = t.getComponent("xAxis", this.get("xAxisIndex")), i = t.getComponent("yAxis", this.get("yAxisIndex")), o = n.get("type"), s = i.get("type"), l;
      o === "category" ? (e.layout = "horizontal", a = n.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", a = i.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
      var u = ["x", "y"], f = e.layout === "horizontal" ? 0 : 1, h = this._baseAxisDim = u[f], v = u[1 - f], c = [n, i], p = c[f].get("type"), d = c[1 - f].get("type"), g = e.data;
      if (g && l) {
        var y = [];
        C(g, function(S, w) {
          var x;
          z(S) ? (x = S.slice(), S.unshift(w)) : z(S.value) ? (x = V({}, S), x.value = x.value.slice(), S.value.unshift(w)) : x = S, y.push(x);
        }), e.data = y;
      }
      var m = this.defaultValueDimensions, _ = [{
        name: h,
        type: Ef(p),
        ordinalMeta: a,
        otherDims: {
          tooltip: !1,
          itemName: 0
        },
        dimsDef: ["base"]
      }, {
        name: v,
        type: Ef(d),
        dimsDef: m.slice()
      }];
      return ko(this, {
        coordDimensions: _,
        dimensionsCount: m.length + 1,
        encodeDefaulter: ot(WD, _, this)
      });
    }, r.prototype.getBaseAxis = function() {
      var e = this._baseAxisDim;
      return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
    }, r;
  }()
), mI = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.defaultValueDimensions = [{
        name: "min",
        defaultTooltip: !0
      }, {
        name: "Q1",
        defaultTooltip: !0
      }, {
        name: "median",
        defaultTooltip: !0
      }, {
        name: "Q3",
        defaultTooltip: !0
      }, {
        name: "max",
        defaultTooltip: !0
      }], t.visualDrawType = "stroke", t;
    }
    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;
  }(Gt)
);
te(mI, yI, !0);
const IW = mI;
var LW = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this.group, s = this._data;
      this._data || o.removeAll();
      var l = t.get("layout") === "horizontal" ? 1 : 0;
      i.diff(s).add(function(u) {
        if (i.hasValue(u)) {
          var f = i.getItemLayout(u), h = nx(f, i, u, l, !0);
          i.setItemGraphicEl(u, h), o.add(h);
        }
      }).update(function(u, f) {
        var h = s.getItemGraphicEl(f);
        if (!i.hasValue(u)) {
          o.remove(h);
          return;
        }
        var v = i.getItemLayout(u);
        h ? (Cr(h), _I(v, h, i, u)) : h = nx(v, i, u, l), o.add(h), i.setItemGraphicEl(u, h);
      }).remove(function(u) {
        var f = s.getItemGraphicEl(u);
        f && o.remove(f);
      }).execute(), this._data = i;
    }, e.prototype.remove = function(t) {
      var a = this.group, n = this._data;
      this._data = null, n && n.eachItemGraphicEl(function(i) {
        i && a.remove(i);
      });
    }, e.type = "boxplot", e;
  }(Vt)
), EW = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), PW = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "boxplotBoxPath", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new EW();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.points, i = 0;
      for (t.moveTo(n[i][0], n[i][1]), i++; i < 4; i++)
        t.lineTo(n[i][0], n[i][1]);
      for (t.closePath(); i < n.length; i++)
        t.moveTo(n[i][0], n[i][1]), i++, t.lineTo(n[i][0], n[i][1]);
    }, e;
  }(gt)
);
function nx(r, e, t, a, n) {
  var i = r.ends, o = new PW({
    shape: {
      points: n ? RW(i, a, r) : i
    }
  });
  return _I(r, o, e, t, n), o;
}
function _I(r, e, t, a, n) {
  var i = t.hostModel, o = ml[n ? "initProps" : "updateProps"];
  o(e, {
    shape: {
      points: r.ends
    }
  }, i, a), e.useStyle(t.getItemVisual(a, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  var s = t.getItemModel(a), l = s.getModel("emphasis");
  ce(e, s), Wt(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
}
function RW(r, e, t) {
  return G(r, function(a) {
    return a = a.slice(), a[e] = t.initBaseline, a;
  });
}
const NW = LW;
var Bs = C;
function OW(r) {
  var e = kW(r);
  Bs(e, function(t) {
    var a = t.seriesModels;
    a.length && (VW(t), Bs(a, function(n, i) {
      BW(n, t.boxOffsetList[i], t.boxWidthList[i]);
    }));
  });
}
function kW(r) {
  var e = [], t = [];
  return r.eachSeriesByType("boxplot", function(a) {
    var n = a.getBaseAxis(), i = ct(t, n);
    i < 0 && (i = t.length, t[i] = n, e[i] = {
      axis: n,
      seriesModels: []
    }), e[i].seriesModels.push(a);
  }), e;
}
function VW(r) {
  var e = r.axis, t = r.seriesModels, a = t.length, n = r.boxWidthList = [], i = r.boxOffsetList = [], o = [], s;
  if (e.type === "category")
    s = e.getBandWidth();
  else {
    var l = 0;
    Bs(t, function(p) {
      l = Math.max(l, p.getData().count());
    });
    var u = e.getExtent();
    s = Math.abs(u[1] - u[0]) / l;
  }
  Bs(t, function(p) {
    var d = p.get("boxWidth");
    z(d) || (d = [d, d]), o.push([H(d[0], s) || 0, H(d[1], s) || 0]);
  });
  var f = s * 0.8 - 2, h = f / a * 0.3, v = (f - h * (a - 1)) / a, c = v / 2 - f / 2;
  Bs(t, function(p, d) {
    i.push(c), c += h + v, n.push(Math.min(Math.max(v, o[d][0]), o[d][1]));
  });
}
function BW(r, e, t) {
  var a = r.coordinateSystem, n = r.getData(), i = t / 2, o = r.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = n.mapDimension(l[o]), f = n.mapDimensionsAll(l[s]);
  if (u == null || f.length < 5)
    return;
  for (var h = 0; h < n.count(); h++) {
    var v = n.get(u, h), c = _(v, f[2], h), p = _(v, f[0], h), d = _(v, f[1], h), g = _(v, f[3], h), y = _(v, f[4], h), m = [];
    S(m, d, !1), S(m, g, !0), m.push(p, d, y, g), w(m, p), w(m, y), w(m, c), n.setItemLayout(h, {
      initBaseline: c[s],
      ends: m
    });
  }
  function _(x, b, T) {
    var D = n.get(b, T), A = [];
    A[o] = x, A[s] = D;
    var M;
    return isNaN(x) || isNaN(D) ? M = [NaN, NaN] : (M = a.dataToPoint(A), M[o] += e), M;
  }
  function S(x, b, T) {
    var D = b.slice(), A = b.slice();
    D[o] += i, A[o] -= i, T ? x.push(D, A) : x.push(A, D);
  }
  function w(x, b) {
    var T = b.slice(), D = b.slice();
    T[o] -= i, D[o] += i, x.push(T, D);
  }
}
function zW(r, e) {
  e = e || {};
  for (var t = [], a = [], n = e.boundIQR, i = n === "none" || n === 0, o = 0; o < r.length; o++) {
    var s = or(r[o].slice()), l = pv(s, 0.25), u = pv(s, 0.5), f = pv(s, 0.75), h = s[0], v = s[s.length - 1], c = (n ?? 1.5) * (f - l), p = i ? h : Math.max(h, l - c), d = i ? v : Math.min(v, f + c), g = e.itemNameFormatter, y = q(g) ? g({
      value: o
    }) : $(g) ? g.replace("{value}", o + "") : o + "";
    t.push([y, p, l, u, f, d]);
    for (var m = 0; m < s.length; m++) {
      var _ = s[m];
      if (_ < p || _ > d) {
        var S = [y, _];
        a.push(S);
      }
    }
  }
  return {
    boxData: t,
    outliers: a
  };
}
var GW = {
  type: "echarts:boxplot",
  transform: function(e) {
    var t = e.upstream;
    if (t.sourceFormat !== xe) {
      var a = "";
      ({}).NODE_ENV !== "production" && (a = Ae("source data is not applicable for this boxplot transform. Expect number[][].")), It(a);
    }
    var n = zW(t.getRawData(), e.config);
    return [{
      dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
      data: n.boxData
    }, {
      data: n.outliers
    }];
  }
};
function FW(r) {
  r.registerSeriesModel(IW), r.registerChartView(NW), r.registerLayout(OW), r.registerTransform(GW);
}
var HW = ["color", "borderColor"], WW = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t);
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      this._clear(), this._updateDrawMode(t);
    }, e.prototype.incrementalRender = function(t, a, n, i) {
      this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(t, a) : this._incrementalRenderNormal(t, a);
    }, e.prototype.eachRendered = function(t) {
      on(this._progressiveEls || this.group, t);
    }, e.prototype._updateDrawMode = function(t) {
      var a = t.pipelineContext.large;
      (this._isLargeDraw == null || a !== this._isLargeDraw) && (this._isLargeDraw = a, this._clear());
    }, e.prototype._renderNormal = function(t) {
      var a = t.getData(), n = this._data, i = this.group, o = a.getLayout("isSimpleBox"), s = t.get("clip", !0), l = t.coordinateSystem, u = l.getArea && l.getArea();
      this._data || i.removeAll(), a.diff(n).add(function(f) {
        if (a.hasValue(f)) {
          var h = a.getItemLayout(f);
          if (s && ix(u, h))
            return;
          var v = Fc(h, f, !0);
          Bt(v, {
            shape: {
              points: h.ends
            }
          }, t, f), Hc(v, a, f, o), i.add(v), a.setItemGraphicEl(f, v);
        }
      }).update(function(f, h) {
        var v = n.getItemGraphicEl(h);
        if (!a.hasValue(f)) {
          i.remove(v);
          return;
        }
        var c = a.getItemLayout(f);
        if (s && ix(u, c)) {
          i.remove(v);
          return;
        }
        v ? (Mt(v, {
          shape: {
            points: c.ends
          }
        }, t, f), Cr(v)) : v = Fc(c), Hc(v, a, f, o), i.add(v), a.setItemGraphicEl(f, v);
      }).remove(function(f) {
        var h = n.getItemGraphicEl(f);
        h && i.remove(h);
      }).execute(), this._data = a;
    }, e.prototype._renderLarge = function(t) {
      this._clear(), ox(t, this.group);
      var a = t.get("clip", !0) ? Bh(t.coordinateSystem, !1, t) : null;
      a ? this.group.setClipPath(a) : this.group.removeClipPath();
    }, e.prototype._incrementalRenderNormal = function(t, a) {
      for (var n = a.getData(), i = n.getLayout("isSimpleBox"), o; (o = t.next()) != null; ) {
        var s = n.getItemLayout(o), l = Fc(s);
        Hc(l, n, o, i), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
      }
    }, e.prototype._incrementalRenderLarge = function(t, a) {
      ox(a, this.group, this._progressiveEls, !0);
    }, e.prototype.remove = function(t) {
      this._clear();
    }, e.prototype._clear = function() {
      this.group.removeAll(), this._data = null;
    }, e.type = "candlestick", e;
  }(Vt)
), $W = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), UW = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "normalCandlestickBox", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new $W();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.points;
      this.__simpleBox ? (t.moveTo(n[4][0], n[4][1]), t.lineTo(n[6][0], n[6][1])) : (t.moveTo(n[0][0], n[0][1]), t.lineTo(n[1][0], n[1][1]), t.lineTo(n[2][0], n[2][1]), t.lineTo(n[3][0], n[3][1]), t.closePath(), t.moveTo(n[4][0], n[4][1]), t.lineTo(n[5][0], n[5][1]), t.moveTo(n[6][0], n[6][1]), t.lineTo(n[7][0], n[7][1]));
    }, e;
  }(gt)
);
function Fc(r, e, t) {
  var a = r.ends;
  return new UW({
    shape: {
      points: t ? YW(a, r) : a
    },
    z2: 100
  });
}
function ix(r, e) {
  for (var t = !0, a = 0; a < e.ends.length; a++)
    if (r.contain(e.ends[a][0], e.ends[a][1])) {
      t = !1;
      break;
    }
  return t;
}
function Hc(r, e, t, a) {
  var n = e.getItemModel(t);
  r.useStyle(e.getItemVisual(t, "style")), r.style.strokeNoScale = !0, r.__simpleBox = a, ce(r, n);
}
function YW(r, e) {
  return G(r, function(t) {
    return t = t.slice(), t[1] = e.initBaseline, t;
  });
}
var ZW = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), Wc = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a.type = "largeCandlestickBox", a;
    }
    return e.prototype.getDefaultShape = function() {
      return new ZW();
    }, e.prototype.buildPath = function(t, a) {
      for (var n = a.points, i = 0; i < n.length; )
        if (this.__sign === n[i++]) {
          var o = n[i++];
          t.moveTo(o, n[i++]), t.lineTo(o, n[i++]);
        } else
          i += 3;
    }, e;
  }(gt)
);
function ox(r, e, t, a) {
  var n = r.getData(), i = n.getLayout("largePoints"), o = new Wc({
    shape: {
      points: i
    },
    __sign: 1,
    ignoreCoarsePointer: !0
  });
  e.add(o);
  var s = new Wc({
    shape: {
      points: i
    },
    __sign: -1,
    ignoreCoarsePointer: !0
  });
  e.add(s);
  var l = new Wc({
    shape: {
      points: i
    },
    __sign: 0,
    ignoreCoarsePointer: !0
  });
  e.add(l), $c(1, o, r), $c(-1, s, r), $c(0, l, r), a && (o.incremental = !0, s.incremental = !0), t && t.push(o, s);
}
function $c(r, e, t, a) {
  var n = t.get(["itemStyle", r > 0 ? "borderColor" : "borderColor0"]) || t.get(["itemStyle", r > 0 ? "color" : "color0"]);
  r === 0 && (n = t.get(["itemStyle", "borderColorDoji"]));
  var i = t.getModel("itemStyle").getItemStyle(HW);
  e.useStyle(i), e.style.fill = null, e.style.stroke = n;
}
const XW = WW;
var SI = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.defaultValueDimensions = [{
        name: "open",
        defaultTooltip: !0
      }, {
        name: "close",
        defaultTooltip: !0
      }, {
        name: "lowest",
        defaultTooltip: !0
      }, {
        name: "highest",
        defaultTooltip: !0
      }], t;
    }
    return e.prototype.getShadowDim = function() {
      return "open";
    }, e.prototype.brushSelector = function(t, a, n) {
      var i = a.getItemLayout(t);
      return i && n.rect(i.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;
  }(Gt)
);
te(SI, yI, !0);
const qW = SI;
function KW(r) {
  !r || !z(r.series) || C(r.series, function(e) {
    j(e) && e.type === "k" && (e.type = "candlestick");
  });
}
var jW = ["itemStyle", "borderColor"], QW = ["itemStyle", "borderColor0"], JW = ["itemStyle", "borderColorDoji"], t$ = ["itemStyle", "color"], e$ = ["itemStyle", "color0"], r$ = {
  seriesType: "candlestick",
  plan: Ro(),
  // For legend.
  performRawSeries: !0,
  reset: function(r, e) {
    function t(i, o) {
      return o.get(i > 0 ? t$ : e$);
    }
    function a(i, o) {
      return o.get(i === 0 ? JW : i > 0 ? jW : QW);
    }
    if (!e.isSeriesFiltered(r)) {
      var n = r.pipelineContext.large;
      return !n && {
        progress: function(i, o) {
          for (var s; (s = i.next()) != null; ) {
            var l = o.getItemModel(s), u = o.getItemLayout(s).sign, f = l.getItemStyle();
            f.fill = t(u, l), f.stroke = a(u, l) || f.fill;
            var h = o.ensureUniqueItemVisual(s, "style");
            V(h, f);
          }
        }
      };
    }
  }
};
const a$ = r$;
var n$ = {
  seriesType: "candlestick",
  plan: Ro(),
  reset: function(r) {
    var e = r.coordinateSystem, t = r.getData(), a = i$(r, t), n = 0, i = 1, o = ["x", "y"], s = t.getDimensionIndex(t.mapDimension(o[n])), l = G(t.mapDimensionsAll(o[i]), t.getDimensionIndex, t), u = l[0], f = l[1], h = l[2], v = l[3];
    if (t.setLayout({
      candleWidth: a,
      // The value is experimented visually.
      isSimpleBox: a <= 1.3
    }), s < 0 || l.length < 4)
      return;
    return {
      progress: r.pipelineContext.large ? p : c
    };
    function c(d, g) {
      for (var y, m = g.getStore(); (y = d.next()) != null; ) {
        var _ = m.get(s, y), S = m.get(u, y), w = m.get(f, y), x = m.get(h, y), b = m.get(v, y), T = Math.min(S, w), D = Math.max(S, w), A = k(T, _), M = k(D, _), I = k(x, _), L = k(b, _), E = [];
        O(E, M, 0), O(E, A, 1), E.push(F(L), F(M), F(I), F(A));
        var P = g.getItemModel(y), R = !!P.get(["itemStyle", "borderColorDoji"]);
        g.setItemLayout(y, {
          sign: sx(m, y, S, w, f, R),
          initBaseline: S > w ? M[i] : A[i],
          ends: E,
          brushRect: B(x, b, _)
        });
      }
      function k(W, Z) {
        var J = [];
        return J[n] = Z, J[i] = W, isNaN(Z) || isNaN(W) ? [NaN, NaN] : e.dataToPoint(J);
      }
      function O(W, Z, J) {
        var et = Z.slice(), yt = Z.slice();
        et[n] = Uu(et[n] + a / 2, 1, !1), yt[n] = Uu(yt[n] - a / 2, 1, !0), J ? W.push(et, yt) : W.push(yt, et);
      }
      function B(W, Z, J) {
        var et = k(W, J), yt = k(Z, J);
        return et[n] -= a / 2, yt[n] -= a / 2, {
          x: et[0],
          y: et[1],
          width: a,
          height: yt[1] - et[1]
        };
      }
      function F(W) {
        return W[n] = Uu(W[n], 1), W;
      }
    }
    function p(d, g) {
      for (var y = Fr(d.count * 4), m = 0, _, S = [], w = [], x, b = g.getStore(), T = !!r.get(["itemStyle", "borderColorDoji"]); (x = d.next()) != null; ) {
        var D = b.get(s, x), A = b.get(u, x), M = b.get(f, x), I = b.get(h, x), L = b.get(v, x);
        if (isNaN(D) || isNaN(I) || isNaN(L)) {
          y[m++] = NaN, m += 3;
          continue;
        }
        y[m++] = sx(b, x, A, M, f, T), S[n] = D, S[i] = I, _ = e.dataToPoint(S, null, w), y[m++] = _ ? _[0] : NaN, y[m++] = _ ? _[1] : NaN, S[i] = L, _ = e.dataToPoint(S, null, w), y[m++] = _ ? _[1] : NaN;
      }
      g.setLayout("largePoints", y);
    }
  }
};
function sx(r, e, t, a, n, i) {
  var o;
  return t > a ? o = -1 : t < a ? o = 1 : o = i ? 0 : e > 0 ? r.get(n, e - 1) <= a ? 1 : -1 : (
    // No record of previous, set to be positive
    1
  ), o;
}
function i$(r, e) {
  var t = r.getBaseAxis(), a, n = t.type === "category" ? t.getBandWidth() : (a = t.getExtent(), Math.abs(a[1] - a[0]) / e.count()), i = H(ut(r.get("barMaxWidth"), n), n), o = H(ut(r.get("barMinWidth"), 1), n), s = r.get("barWidth");
  return s != null ? H(s, n) : Math.max(Math.min(n / 2, i), o);
}
const o$ = n$;
function s$(r) {
  r.registerChartView(XW), r.registerSeriesModel(qW), r.registerPreprocessor(KW), r.registerVisual(a$), r.registerLayout(o$);
}
function lx(r, e) {
  var t = e.rippleEffectColor || e.color;
  r.eachChild(function(a) {
    a.attr({
      z: e.z,
      zlevel: e.zlevel,
      style: {
        stroke: e.brushType === "stroke" ? t : null,
        fill: e.brushType === "fill" ? t : null
      }
    });
  });
}
var l$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a) {
      var n = r.call(this) || this, i = new Tl(t, a), o = new nt();
      return n.add(i), n.add(o), n.updateData(t, a), n;
    }
    return e.prototype.stopEffectAnimation = function() {
      this.childAt(1).removeAll();
    }, e.prototype.startEffectAnimation = function(t) {
      for (var a = t.symbolType, n = t.color, i = t.rippleNumber, o = this.childAt(1), s = 0; s < i; s++) {
        var l = Jt(a, -1, -1, 2, 2, n);
        l.attr({
          style: {
            strokeNoScale: !0
          },
          z2: 99,
          silent: !0,
          scaleX: 0.5,
          scaleY: 0.5
        });
        var u = -s / i * t.period + t.effectOffset;
        l.animate("", !0).when(t.period, {
          scaleX: t.rippleScale / 2,
          scaleY: t.rippleScale / 2
        }).delay(u).start(), l.animateStyle(!0).when(t.period, {
          opacity: 0
        }).delay(u).start(), o.add(l);
      }
      lx(o, t);
    }, e.prototype.updateEffectAnimation = function(t) {
      for (var a = this._effectCfg, n = this.childAt(1), i = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < i.length; o++) {
        var s = i[o];
        if (a[s] !== t[s]) {
          this.stopEffectAnimation(), this.startEffectAnimation(t);
          return;
        }
      }
      lx(n, t);
    }, e.prototype.highlight = function() {
      da(this);
    }, e.prototype.downplay = function() {
      ga(this);
    }, e.prototype.getSymbolType = function() {
      var t = this.childAt(0);
      return t && t.getSymbolType();
    }, e.prototype.updateData = function(t, a) {
      var n = this, i = t.hostModel;
      this.childAt(0).updateData(t, a);
      var o = this.childAt(1), s = t.getItemModel(a), l = t.getItemVisual(a, "symbol"), u = Sl(t.getItemVisual(a, "symbolSize")), f = t.getItemVisual(a, "style"), h = f && f.fill, v = s.getModel("emphasis");
      o.setScale(u), o.traverse(function(g) {
        g.setStyle("fill", h);
      });
      var c = Oo(t.getItemVisual(a, "symbolOffset"), u);
      c && (o.x = c[0], o.y = c[1]);
      var p = t.getItemVisual(a, "symbolRotate");
      o.rotation = (p || 0) * Math.PI / 180 || 0;
      var d = {};
      d.showEffectOn = i.get("showEffectOn"), d.rippleScale = s.get(["rippleEffect", "scale"]), d.brushType = s.get(["rippleEffect", "brushType"]), d.period = s.get(["rippleEffect", "period"]) * 1e3, d.effectOffset = a / t.count(), d.z = i.getShallow("z") || 0, d.zlevel = i.getShallow("zlevel") || 0, d.symbolType = l, d.color = h, d.rippleEffectColor = s.get(["rippleEffect", "color"]), d.rippleNumber = s.get(["rippleEffect", "number"]), d.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(d) : this.startEffectAnimation(d), this._effectCfg = d) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
        g === "emphasis" ? d.showEffectOn !== "render" && n.startEffectAnimation(d) : g === "normal" && d.showEffectOn !== "render" && n.stopEffectAnimation();
      }), this._effectCfg = d, Wt(this, v.get("focus"), v.get("blurScope"), v.get("disabled"));
    }, e.prototype.fadeOut = function(t) {
      t && t();
    }, e;
  }(nt)
);
const u$ = l$;
var f$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function() {
      this._symbolDraw = new Dl(u$);
    }, e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this._symbolDraw;
      o.updateData(i, {
        clipShape: this._getClipShape(t)
      }), this.group.add(o.group);
    }, e.prototype._getClipShape = function(t) {
      var a = t.coordinateSystem, n = a && a.getArea && a.getArea();
      return t.get("clip", !0) ? n : null;
    }, e.prototype.updateTransform = function(t, a, n) {
      var i = t.getData();
      this.group.dirty();
      var o = Cl("").reset(t, a, n);
      o.progress && o.progress({
        start: 0,
        end: i.count(),
        count: i.count()
      }, i), this._symbolDraw.updateLayout();
    }, e.prototype._updateGroupTransform = function(t) {
      var a = t.coordinateSystem;
      a && a.getRoamTransform && (this.group.transform = V2(a.getRoamTransform()), this.group.decomposeTransform());
    }, e.prototype.remove = function(t, a) {
      this._symbolDraw && this._symbolDraw.remove(!0);
    }, e.type = "effectScatter", e;
  }(Vt)
);
const h$ = f$;
var v$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return xa(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.brushSelector = function(t, a, n) {
      return n.point(a.getItemLayout(t));
    }, 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;
  }(Gt)
);
const c$ = v$;
function p$(r) {
  r.registerChartView(h$), r.registerSeriesModel(c$), r.registerLayout(Cl("effectScatter"));
}
var d$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this) || this;
      return i.add(i.createLine(t, a, n)), i._updateEffectSymbol(t, a), i;
    }
    return e.prototype.createLine = function(t, a, n) {
      return new Ry(t, a, n);
    }, e.prototype._updateEffectSymbol = function(t, a) {
      var n = t.getItemModel(a), i = n.getModel("effect"), o = i.get("symbolSize"), s = i.get("symbol");
      z(o) || (o = [o, o]);
      var l = t.getItemVisual(a, "style"), u = i.get("color") || l && l.stroke, f = this.childAt(1);
      this._symbolType !== s && (this.remove(f), f = Jt(s, -0.5, -0.5, 1, 1, u), f.z2 = 100, f.culling = !0, this.add(f)), f && (f.setStyle("shadowColor", u), f.setStyle(i.getItemStyle(["color"])), f.scaleX = o[0], f.scaleY = o[1], f.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(t, i, a));
    }, e.prototype._updateEffectAnimation = function(t, a, n) {
      var i = this.childAt(1);
      if (i) {
        var o = t.getItemLayout(n), s = a.get("period") * 1e3, l = a.get("loop"), u = a.get("roundTrip"), f = a.get("constantSpeed"), h = jt(a.get("delay"), function(c) {
          return c / t.count() * s / 3;
        });
        if (i.ignore = !0, this._updateAnimationPoints(i, o), f > 0 && (s = this._getLineLength(i) / f * 1e3), s !== this._period || l !== this._loop || u !== this._roundTrip) {
          i.stopAnimation();
          var v = void 0;
          q(h) ? v = h(n) : v = h, i.__t > 0 && (v = -s * i.__t), this._animateSymbol(i, s, v, l, u);
        }
        this._period = s, this._loop = l, this._roundTrip = u;
      }
    }, e.prototype._animateSymbol = function(t, a, n, i, o) {
      if (a > 0) {
        t.__t = 0;
        var s = this, l = t.animate("", i).when(o ? a * 2 : a, {
          __t: o ? 2 : 1
        }).delay(n).during(function() {
          s._updateSymbolPosition(t);
        });
        i || l.done(function() {
          s.remove(t);
        }), l.start();
      }
    }, e.prototype._getLineLength = function(t) {
      return ka(t.__p1, t.__cp1) + ka(t.__cp1, t.__p2);
    }, e.prototype._updateAnimationPoints = function(t, a) {
      t.__p1 = a[0], t.__p2 = a[1], t.__cp1 = a[2] || [(a[0][0] + a[1][0]) / 2, (a[0][1] + a[1][1]) / 2];
    }, e.prototype.updateData = function(t, a, n) {
      this.childAt(0).updateData(t, a, n), this._updateEffectSymbol(t, a);
    }, e.prototype._updateSymbolPosition = function(t) {
      var a = t.__p1, n = t.__p2, i = t.__cp1, o = t.__t < 1 ? t.__t : 2 - t.__t, s = [t.x, t.y], l = s.slice(), u = se, f = Mp;
      s[0] = u(a[0], i[0], n[0], o), s[1] = u(a[1], i[1], n[1], o);
      var h = t.__t < 1 ? f(a[0], i[0], n[0], o) : f(n[0], i[0], a[0], 1 - o), v = t.__t < 1 ? f(a[1], i[1], n[1], o) : f(n[1], i[1], a[1], 1 - o);
      t.rotation = -Math.atan2(v, h) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (t.__lastT !== void 0 && t.__lastT < t.__t ? (t.scaleY = ka(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : t.__lastT === 1 ? t.scaleY = 2 * ka(a, s) : t.scaleY = this._symbolScale[1]), t.__lastT = t.__t, t.ignore = !1, t.x = s[0], t.y = s[1];
    }, e.prototype.updateLayout = function(t, a) {
      this.childAt(0).updateLayout(t, a);
      var n = t.getItemModel(a).getModel("effect");
      this._updateEffectAnimation(t, n, a);
    }, e;
  }(nt)
);
const xI = d$;
var g$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n) {
      var i = r.call(this) || this;
      return i._createPolyline(t, a, n), i;
    }
    return e.prototype._createPolyline = function(t, a, n) {
      var i = t.getItemLayout(a), o = new ze({
        shape: {
          points: i
        }
      });
      this.add(o), this._updateCommonStl(t, a, n);
    }, e.prototype.updateData = function(t, a, n) {
      var i = t.hostModel, o = this.childAt(0), s = {
        shape: {
          points: t.getItemLayout(a)
        }
      };
      Mt(o, s, i, a), this._updateCommonStl(t, a, n);
    }, e.prototype._updateCommonStl = function(t, a, n) {
      var i = this.childAt(0), o = t.getItemModel(a), s = n && n.emphasisLineStyle, l = n && n.focus, u = n && n.blurScope, f = n && n.emphasisDisabled;
      if (!n || t.hasItemOption) {
        var h = o.getModel("emphasis");
        s = h.getModel("lineStyle").getLineStyle(), f = h.get("disabled"), l = h.get("focus"), u = h.get("blurScope");
      }
      i.useStyle(t.getItemVisual(a, "style")), i.style.fill = null, i.style.strokeNoScale = !0;
      var v = i.ensureState("emphasis");
      v.style = s, Wt(this, l, u, f);
    }, e.prototype.updateLayout = function(t, a) {
      var n = this.childAt(0);
      n.setShape("points", t.getItemLayout(a));
    }, e;
  }(nt)
);
const wI = g$;
var y$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t._lastFrame = 0, t._lastFramePercent = 0, t;
    }
    return e.prototype.createLine = function(t, a, n) {
      return new wI(t, a, n);
    }, e.prototype._updateAnimationPoints = function(t, a) {
      this._points = a;
      for (var n = [0], i = 0, o = 1; o < a.length; o++) {
        var s = a[o - 1], l = a[o];
        i += ka(s, l), n.push(i);
      }
      if (i === 0) {
        this._length = 0;
        return;
      }
      for (var o = 0; o < n.length; o++)
        n[o] /= i;
      this._offsets = n, this._length = i;
    }, e.prototype._getLineLength = function() {
      return this._length;
    }, e.prototype._updateSymbolPosition = function(t) {
      var a = t.__t < 1 ? t.__t : 2 - t.__t, n = this._points, i = this._offsets, o = n.length;
      if (i) {
        var s = this._lastFrame, l;
        if (a < this._lastFramePercent) {
          var u = Math.min(s + 1, o - 1);
          for (l = u; l >= 0 && !(i[l] <= a); l--)
            ;
          l = Math.min(l, o - 2);
        } else {
          for (l = s; l < o && !(i[l] > a); l++)
            ;
          l = Math.min(l - 1, o - 2);
        }
        var f = (a - i[l]) / (i[l + 1] - i[l]), h = n[l], v = n[l + 1];
        t.x = h[0] * (1 - f) + f * v[0], t.y = h[1] * (1 - f) + f * v[1];
        var c = t.__t < 1 ? v[0] - h[0] : h[0] - v[0], p = t.__t < 1 ? v[1] - h[1] : h[1] - v[1];
        t.rotation = -Math.atan2(p, c) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = a, t.ignore = !1;
      }
    }, e;
  }(xI)
);
const m$ = y$;
var _$ = (
  /** @class */
  function() {
    function r() {
      this.polyline = !1, this.curveness = 0, this.segs = [];
    }
    return r;
  }()
), S$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t) {
      var a = r.call(this, t) || this;
      return a._off = 0, a.hoverDataIdx = -1, a;
    }
    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 _$();
    }, e.prototype.buildPath = function(t, a) {
      var n = a.segs, i = a.curveness, o;
      if (a.polyline)
        for (o = this._off; o < n.length; ) {
          var s = n[o++];
          if (s > 0) {
            t.moveTo(n[o++], n[o++]);
            for (var l = 1; l < s; l++)
              t.lineTo(n[o++], n[o++]);
          }
        }
      else
        for (o = this._off; o < n.length; ) {
          var u = n[o++], f = n[o++], h = n[o++], v = n[o++];
          if (t.moveTo(u, f), i > 0) {
            var c = (u + h) / 2 - (f - v) * i, p = (f + v) / 2 - (h - u) * i;
            t.quadraticCurveTo(c, p, h, v);
          } else
            t.lineTo(h, v);
        }
      this.incremental && (this._off = o, this.notClear = !0);
    }, e.prototype.findDataIndex = function(t, a) {
      var n = this.shape, i = n.segs, o = n.curveness, s = this.style.lineWidth;
      if (n.polyline)
        for (var l = 0, u = 0; u < i.length; ) {
          var f = i[u++];
          if (f > 0)
            for (var h = i[u++], v = i[u++], c = 1; c < f; c++) {
              var p = i[u++], d = i[u++];
              if (Na(h, v, p, d, s, t, a))
                return l;
            }
          l++;
        }
      else
        for (var l = 0, u = 0; u < i.length; ) {
          var h = i[u++], v = i[u++], p = i[u++], d = i[u++];
          if (o > 0) {
            var g = (h + p) / 2 - (v - d) * o, y = (v + d) / 2 - (p - h) * o;
            if (LT(h, v, g, y, p, d, s, t, a))
              return l;
          } else if (Na(h, v, p, d, s, t, a))
            return l;
          l++;
        }
      return -1;
    }, e.prototype.contain = function(t, a) {
      var n = this.transformCoordToLocal(t, a), i = this.getBoundingRect();
      if (t = n[0], a = n[1], i.contain(t, a)) {
        var o = this.hoverDataIdx = this.findDataIndex(t, a);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var t = this._rect;
      if (!t) {
        for (var a = this.shape, n = a.segs, i = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < n.length; ) {
          var f = n[u++], h = n[u++];
          i = Math.min(f, i), s = Math.max(f, s), o = Math.min(h, o), l = Math.max(h, l);
        }
        t = this._rect = new ht(i, o, s, l);
      }
      return t;
    }, e;
  }(gt)
), x$ = (
  /** @class */
  function() {
    function r() {
      this.group = new nt();
    }
    return r.prototype.updateData = function(e) {
      this._clear();
      var t = this._create();
      t.setShape({
        segs: e.getLayout("linesPoints")
      }), this._setCommon(t, e);
    }, r.prototype.incrementalPrepareUpdate = function(e) {
      this.group.removeAll(), this._clear();
    }, r.prototype.incrementalUpdate = function(e, t) {
      var a = this._newAdded[0], n = t.getLayout("linesPoints"), i = a && a.shape.segs;
      if (i && i.length < 2e4) {
        var o = i.length, s = new Float32Array(o + n.length);
        s.set(i), s.set(n, o), a.setShape({
          segs: s
        });
      } else {
        this._newAdded = [];
        var l = this._create();
        l.incremental = !0, l.setShape({
          segs: n
        }), this._setCommon(l, t), l.__startIndex = e.start;
      }
    }, r.prototype.remove = function() {
      this._clear();
    }, r.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, r.prototype._create = function() {
      var e = new S$({
        cursor: "default",
        ignoreCoarsePointer: !0
      });
      return this._newAdded.push(e), this.group.add(e), e;
    }, r.prototype._setCommon = function(e, t, a) {
      var n = t.hostModel;
      e.setShape({
        polyline: n.get("polyline"),
        curveness: n.get(["lineStyle", "curveness"])
      }), e.useStyle(n.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
      var i = t.getVisual("style");
      i && i.stroke && e.setStyle("stroke", i.stroke), e.setStyle("fill", null);
      var o = it(e);
      o.seriesIndex = n.seriesIndex, e.on("mousemove", function(s) {
        o.dataIndex = null;
        var l = e.hoverDataIdx;
        l > 0 && (o.dataIndex = l + e.__startIndex);
      });
    }, r.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, r;
  }()
);
const w$ = x$;
var b$ = {
  seriesType: "lines",
  plan: Ro(),
  reset: function(r) {
    var e = r.coordinateSystem;
    if (!e) {
      ({}).NODE_ENV !== "production" && ve("The lines series must have a coordinate system.");
      return;
    }
    var t = r.get("polyline"), a = r.pipelineContext.large;
    return {
      progress: function(n, i) {
        var o = [];
        if (a) {
          var s = void 0, l = n.end - n.start;
          if (t) {
            for (var u = 0, f = n.start; f < n.end; f++)
              u += r.getLineCoordsCount(f);
            s = new Float32Array(l + u * 2);
          } else
            s = new Float32Array(l * 4);
          for (var h = 0, v = [], f = n.start; f < n.end; f++) {
            var c = r.getLineCoords(f, o);
            t && (s[h++] = c);
            for (var p = 0; p < c; p++)
              v = e.dataToPoint(o[p], !1, v), s[h++] = v[0], s[h++] = v[1];
          }
          i.setLayout("linesPoints", s);
        } else
          for (var f = n.start; f < n.end; f++) {
            var d = i.getItemModel(f), c = r.getLineCoords(f, o), g = [];
            if (t)
              for (var y = 0; y < c; y++)
                g.push(e.dataToPoint(o[y]));
            else {
              g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
              var m = d.get(["lineStyle", "curveness"]);
              +m && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * m, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * m]);
            }
            i.setItemLayout(f, g);
          }
      }
    };
  }
};
const bI = b$;
var T$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this._updateLineDraw(i, t), s = t.get("zlevel"), l = t.get(["effect", "trailLength"]), u = n.getZr(), f = u.painter.getType() === "svg";
      f || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !f && u.configLayer(this._lastZlevel, {
        motionBlur: !1
      }), this._showEffect(t) && l > 0 && (f ? {}.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(i);
      var h = t.get("clip", !0) && Bh(t.coordinateSystem, !1, t);
      h ? this.group.setClipPath(h) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      var i = t.getData(), o = this._updateLineDraw(i, t);
      o.incrementalPrepareUpdate(i), this._clearLayer(n), this._finished = !1;
    }, e.prototype.incrementalRender = function(t, a, n) {
      this._lineDraw.incrementalUpdate(t, a.getData()), this._finished = t.end === a.getData().count();
    }, e.prototype.eachRendered = function(t) {
      this._lineDraw && this._lineDraw.eachRendered(t);
    }, e.prototype.updateTransform = function(t, a, n) {
      var i = t.getData(), o = t.pipelineContext;
      if (!this._finished || o.large || o.progressiveRender)
        return {
          update: !0
        };
      var s = bI.reset(t, a, n);
      s.progress && s.progress({
        start: 0,
        end: i.count(),
        count: i.count()
      }, i), this._lineDraw.updateLayout(), this._clearLayer(n);
    }, e.prototype._updateLineDraw = function(t, a) {
      var n = this._lineDraw, i = this._showEffect(a), o = !!a.get("polyline"), s = a.pipelineContext, l = s.large;
      return {}.NODE_ENV !== "production" && i && l && console.warn("Large lines not support effect"), (!n || i !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (n && n.remove(), n = this._lineDraw = l ? new w$() : new Ny(o ? i ? m$ : wI : i ? xI : Ry), this._hasEffet = i, this._isPolyline = o, this._isLargeDraw = l), this.group.add(n.group), n;
    }, e.prototype._showEffect = function(t) {
      return !!t.get(["effect", "show"]);
    }, e.prototype._clearLayer = function(t) {
      var a = t.getZr(), n = a.painter.getType() === "svg";
      !n && this._lastZlevel != null && a.painter.getLayer(this._lastZlevel).clear(!0);
    }, e.prototype.remove = function(t, a) {
      this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(a);
    }, e.prototype.dispose = function(t, a) {
      this.remove(t, a);
    }, e.type = "lines", e;
  }(Vt)
);
const D$ = T$;
var C$ = typeof Uint32Array > "u" ? Array : Uint32Array, A$ = typeof Float64Array > "u" ? Array : Float64Array;
function ux(r) {
  var e = r.data;
  e && e[0] && e[0][0] && e[0][0].coord && ({}.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), r.data = G(e, function(t) {
    var a = [t[0].coord, t[1].coord], n = {
      coords: a
    };
    return t[0].name && (n.fromName = t[0].name), t[1].name && (n.toName = t[1].name), fg([n, t[0], t[1]]);
  }));
}
var M$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t;
    }
    return e.prototype.init = function(t) {
      t.data = t.data || [], ux(t);
      var a = this._processFlatCoordsArray(t.data);
      this._flatCoords = a.flatCoords, this._flatCoordsOffset = a.flatCoordsOffset, a.flatCoords && (t.data = new Float32Array(a.count)), r.prototype.init.apply(this, arguments);
    }, e.prototype.mergeOption = function(t) {
      if (ux(t), t.data) {
        var a = this._processFlatCoordsArray(t.data);
        this._flatCoords = a.flatCoords, this._flatCoordsOffset = a.flatCoordsOffset, a.flatCoords && (t.data = new Float32Array(a.count));
      }
      r.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.appendData = function(t) {
      var a = this._processFlatCoordsArray(t.data);
      a.flatCoords && (this._flatCoords ? (this._flatCoords = af(this._flatCoords, a.flatCoords), this._flatCoordsOffset = af(this._flatCoordsOffset, a.flatCoordsOffset)) : (this._flatCoords = a.flatCoords, this._flatCoordsOffset = a.flatCoordsOffset), t.data = new Float32Array(a.count)), this.getRawData().appendData(t.data);
    }, e.prototype._getCoordsFromItemModel = function(t) {
      var a = this.getData().getItemModel(t), n = a.option instanceof Array ? a.option : a.getShallow("coords");
      if ({}.NODE_ENV !== "production" && !(n instanceof Array && n.length > 0 && n[0] instanceof Array))
        throw new Error("Invalid coords " + JSON.stringify(n) + ". Lines must have 2d coords array in data item.");
      return n;
    }, e.prototype.getLineCoordsCount = function(t) {
      return this._flatCoordsOffset ? this._flatCoordsOffset[t * 2 + 1] : this._getCoordsFromItemModel(t).length;
    }, e.prototype.getLineCoords = function(t, a) {
      if (this._flatCoordsOffset) {
        for (var n = this._flatCoordsOffset[t * 2], i = this._flatCoordsOffset[t * 2 + 1], o = 0; o < i; o++)
          a[o] = a[o] || [], a[o][0] = this._flatCoords[n + o * 2], a[o][1] = this._flatCoords[n + o * 2 + 1];
        return i;
      } else {
        for (var s = this._getCoordsFromItemModel(t), o = 0; o < s.length; o++)
          a[o] = a[o] || [], a[o][0] = s[o][0], a[o][1] = s[o][1];
        return s.length;
      }
    }, e.prototype._processFlatCoordsArray = function(t) {
      var a = 0;
      if (this._flatCoords && (a = this._flatCoords.length), Ct(t[0])) {
        for (var n = t.length, i = new C$(n), o = new A$(n), s = 0, l = 0, u = 0, f = 0; f < n; ) {
          u++;
          var h = t[f++];
          i[l++] = s + a, i[l++] = h;
          for (var v = 0; v < h; v++) {
            var c = t[f++], p = t[f++];
            if (o[s++] = c, o[s++] = p, f > n && {}.NODE_ENV !== "production")
              throw new Error("Invalid data format.");
          }
        }
        return {
          flatCoordsOffset: new Uint32Array(i.buffer, 0, l),
          flatCoords: o,
          count: u
        };
      }
      return {
        flatCoordsOffset: null,
        flatCoords: null,
        count: t.length
      };
    }, e.prototype.getInitialData = function(t, a) {
      if ({}.NODE_ENV !== "production") {
        var n = Po.get(t.coordinateSystem);
        if (!n)
          throw new Error("Unknown coordinate system " + t.coordinateSystem);
      }
      var i = new Ce(["value"], this);
      return i.hasItemOption = !1, i.initData(t.data, [], function(o, s, l, u) {
        if (o instanceof Array)
          return NaN;
        i.hasItemOption = !0;
        var f = o.value;
        if (f != null)
          return f instanceof Array ? f[u] : f;
      }), i;
    }, e.prototype.formatTooltip = function(t, a, n) {
      var i = this.getData(), o = i.getItemModel(t), s = o.get("name");
      if (s)
        return s;
      var l = o.get("fromName"), u = o.get("toName"), f = [];
      return l != null && f.push(l), u != null && f.push(u), oe("nameValue", {
        name: f.join(" > ")
      });
    }, e.prototype.preventIncremental = function() {
      return !!this.get(["effect", "show"]);
    }, e.prototype.getProgressive = function() {
      var t = this.option.progressive;
      return t ?? (this.option.large ? 1e4 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var t = this.option.progressiveThreshold;
      return t ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
    }, e.prototype.getZLevelKey = function() {
      var t = this.getModel("effect"), a = t.get("trailLength");
      return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && a > 0 ? a + "" : "";
    }, 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;
  }(Gt)
);
const I$ = M$;
function Du(r) {
  return r instanceof Array || (r = [r, r]), r;
}
var L$ = {
  seriesType: "lines",
  reset: function(r) {
    var e = Du(r.get("symbol")), t = Du(r.get("symbolSize")), a = r.getData();
    a.setVisual("fromSymbol", e && e[0]), a.setVisual("toSymbol", e && e[1]), a.setVisual("fromSymbolSize", t && t[0]), a.setVisual("toSymbolSize", t && t[1]);
    function n(i, o) {
      var s = i.getItemModel(o), l = Du(s.getShallow("symbol", !0)), u = Du(s.getShallow("symbolSize", !0));
      l[0] && i.setItemVisual(o, "fromSymbol", l[0]), l[1] && i.setItemVisual(o, "toSymbol", l[1]), u[0] && i.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && i.setItemVisual(o, "toSymbolSize", u[1]);
    }
    return {
      dataEach: a.hasItemOption ? n : null
    };
  }
};
const E$ = L$;
function P$(r) {
  r.registerChartView(D$), r.registerSeriesModel(I$), r.registerLayout(bI), r.registerVisual(E$);
}
var R$ = 256, N$ = (
  /** @class */
  function() {
    function r() {
      this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
        inRange: null,
        outOfRange: null
      };
      var e = qa.createCanvas();
      this.canvas = e;
    }
    return r.prototype.update = function(e, t, a, n, i, o) {
      var s = this._getBrush(), l = this._getGradient(i, "inRange"), u = this._getGradient(i, "outOfRange"), f = this.pointSize + this.blurSize, h = this.canvas, v = h.getContext("2d"), c = e.length;
      h.width = t, h.height = a;
      for (var p = 0; p < c; ++p) {
        var d = e[p], g = d[0], y = d[1], m = d[2], _ = n(m);
        v.globalAlpha = _, v.drawImage(s, g - f, y - f);
      }
      if (!h.width || !h.height)
        return h;
      for (var S = v.getImageData(0, 0, h.width, h.height), w = S.data, x = 0, b = w.length, T = this.minOpacity, D = this.maxOpacity, A = D - T; x < b; ) {
        var _ = w[x + 3] / 256, M = Math.floor(_ * (R$ - 1)) * 4;
        if (_ > 0) {
          var I = o(_) ? l : u;
          _ > 0 && (_ = _ * A + T), w[x++] = I[M], w[x++] = I[M + 1], w[x++] = I[M + 2], w[x++] = I[M + 3] * _ * 256;
        } else
          x += 4;
      }
      return v.putImageData(S, 0, 0), h;
    }, r.prototype._getBrush = function() {
      var e = this._brushCanvas || (this._brushCanvas = qa.createCanvas()), t = this.pointSize + this.blurSize, a = t * 2;
      e.width = a, e.height = a;
      var n = e.getContext("2d");
      return n.clearRect(0, 0, a, a), n.shadowOffsetX = a, n.shadowBlur = this.blurSize, n.shadowColor = "#000", n.beginPath(), n.arc(-t, t, this.pointSize, 0, Math.PI * 2, !0), n.closePath(), n.fill(), e;
    }, r.prototype._getGradient = function(e, t) {
      for (var a = this._gradientPixels, n = a[t] || (a[t] = new Uint8ClampedArray(256 * 4)), i = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
        e[t](s / 255, !0, i), n[o++] = i[0], n[o++] = i[1], n[o++] = i[2], n[o++] = i[3];
      return n;
    }, r;
  }()
);
const O$ = N$;
function k$(r, e, t) {
  var a = r[1] - r[0];
  e = G(e, function(o) {
    return {
      interval: [(o.interval[0] - r[0]) / a, (o.interval[1] - r[0]) / a]
    };
  });
  var n = e.length, i = 0;
  return function(o) {
    var s;
    for (s = i; s < n; s++) {
      var l = e[s].interval;
      if (l[0] <= o && o <= l[1]) {
        i = s;
        break;
      }
    }
    if (s === n)
      for (s = i - 1; s >= 0; s--) {
        var l = e[s].interval;
        if (l[0] <= o && o <= l[1]) {
          i = s;
          break;
        }
      }
    return s >= 0 && s < n && t[s];
  };
}
function V$(r, e) {
  var t = r[1] - r[0];
  return e = [(e[0] - r[0]) / t, (e[1] - r[0]) / t], function(a) {
    return a >= e[0] && a <= e[1];
  };
}
function fx(r) {
  var e = r.dimensions;
  return e[0] === "lng" && e[1] === "lat";
}
var B$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i;
      if (a.eachComponent("visualMap", function(s) {
        s.eachTargetSeries(function(l) {
          l === t && (i = s);
        });
      }), {}.NODE_ENV !== "production" && !i)
        throw new Error("Heatmap must use with visualMap");
      this._progressiveEls = null, this.group.removeAll();
      var o = t.coordinateSystem;
      o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(t, n, 0, t.getData().count()) : fx(o) && this._renderOnGeo(o, t, i, n);
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      this.group.removeAll();
    }, e.prototype.incrementalRender = function(t, a, n, i) {
      var o = a.coordinateSystem;
      o && (fx(o) ? this.render(a, n, i) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(a, i, t.start, t.end, !0)));
    }, e.prototype.eachRendered = function(t) {
      on(this._progressiveEls || this.group, t);
    }, e.prototype._renderOnCartesianAndCalendar = function(t, a, n, i, o) {
      var s = t.coordinateSystem, l = Si(s, "cartesian2d"), u, f, h, v;
      if (l) {
        var c = s.getAxis("x"), p = s.getAxis("y");
        if ({}.NODE_ENV !== "production") {
          if (!(c.type === "category" && p.type === "category"))
            throw new Error("Heatmap on cartesian must have two category axes");
          if (!(c.onBand && p.onBand))
            throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
        }
        u = c.getBandWidth() + 0.5, f = p.getBandWidth() + 0.5, h = c.scale.getExtent(), v = p.scale.getExtent();
      }
      for (var d = this.group, g = t.getData(), y = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), m = t.getModel(["blur", "itemStyle"]).getItemStyle(), _ = t.getModel(["select", "itemStyle"]).getItemStyle(), S = t.get(["itemStyle", "borderRadius"]), w = ie(t), x = t.getModel("emphasis"), b = x.get("focus"), T = x.get("blurScope"), D = x.get("disabled"), A = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], M = n; M < i; M++) {
        var I = void 0, L = g.getItemVisual(M, "style");
        if (l) {
          var E = g.get(A[0], M), P = g.get(A[1], M);
          if (isNaN(g.get(A[2], M)) || isNaN(E) || isNaN(P) || E < h[0] || E > h[1] || P < v[0] || P > v[1])
            continue;
          var R = s.dataToPoint([E, P]);
          I = new bt({
            shape: {
              x: R[0] - u / 2,
              y: R[1] - f / 2,
              width: u,
              height: f
            },
            style: L
          });
        } else {
          if (isNaN(g.get(A[1], M)))
            continue;
          I = new bt({
            z2: 1,
            shape: s.dataToRect([g.get(A[0], M)]).contentShape,
            style: L
          });
        }
        if (g.hasItemOption) {
          var k = g.getItemModel(M), O = k.getModel("emphasis");
          y = O.getModel("itemStyle").getItemStyle(), m = k.getModel(["blur", "itemStyle"]).getItemStyle(), _ = k.getModel(["select", "itemStyle"]).getItemStyle(), S = k.get(["itemStyle", "borderRadius"]), b = O.get("focus"), T = O.get("blurScope"), D = O.get("disabled"), w = ie(k);
        }
        I.shape.r = S;
        var B = t.getRawValue(M), F = "-";
        B && B[2] != null && (F = B[2] + ""), pe(I, w, {
          labelFetcher: t,
          labelDataIndex: M,
          defaultOpacity: L.opacity,
          defaultText: F
        }), I.ensureState("emphasis").style = y, I.ensureState("blur").style = m, I.ensureState("select").style = _, Wt(I, b, T, D), I.incremental = o, o && (I.states.emphasis.hoverLayer = !0), d.add(I), g.setItemGraphicEl(M, I), this._progressiveEls && this._progressiveEls.push(I);
      }
    }, e.prototype._renderOnGeo = function(t, a, n, i) {
      var o = n.targetVisuals.inRange, s = n.targetVisuals.outOfRange, l = a.getData(), u = this._hmLayer || this._hmLayer || new O$();
      u.blurSize = a.get("blurSize"), u.pointSize = a.get("pointSize"), u.minOpacity = a.get("minOpacity"), u.maxOpacity = a.get("maxOpacity");
      var f = t.getViewRect().clone(), h = t.getRoamTransform();
      f.applyTransform(h);
      var v = Math.max(f.x, 0), c = Math.max(f.y, 0), p = Math.min(f.width + f.x, i.getWidth()), d = Math.min(f.height + f.y, i.getHeight()), g = p - v, y = d - c, m = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], _ = l.mapArray(m, function(b, T, D) {
        var A = t.dataToPoint([b, T]);
        return A[0] -= v, A[1] -= c, A.push(D), A;
      }), S = n.getExtent(), w = n.type === "visualMap.continuous" ? V$(S, n.option.range) : k$(S, n.getPieceList(), n.option.selected);
      u.update(_, g, y, o.color.getNormalizer(), {
        inRange: o.color.getColorMapper(),
        outOfRange: s.color.getColorMapper()
      }, w);
      var x = new de({
        style: {
          width: g,
          height: y,
          x: v,
          y: c,
          image: u.canvas
        },
        silent: !0
      });
      this.group.add(x);
    }, e.type = "heatmap", e;
  }(Vt)
);
const z$ = B$;
var G$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      return xa(null, this, {
        generateCoord: "value"
      });
    }, e.prototype.preventIncremental = function() {
      var t = Po.get(this.get("coordinateSystem"));
      if (t && t.dimensions)
        return t.dimensions[0] === "lng" && t.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;
  }(Gt)
);
const F$ = G$;
function H$(r) {
  r.registerChartView(z$), r.registerSeriesModel(F$);
}
var W$ = ["itemStyle", "borderWidth"], hx = [{
  xy: "x",
  wh: "width",
  index: 0,
  posDesc: ["left", "right"]
}, {
  xy: "y",
  wh: "height",
  index: 1,
  posDesc: ["top", "bottom"]
}], Uc = new qr(), $$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = this.group, o = t.getData(), s = this._data, l = t.coordinateSystem, u = l.getBaseAxis(), f = u.isHorizontal(), h = l.master.getRect(), v = {
        ecSize: {
          width: n.getWidth(),
          height: n.getHeight()
        },
        seriesModel: t,
        coordSys: l,
        coordSysExtent: [[h.x, h.x + h.width], [h.y, h.y + h.height]],
        isHorizontal: f,
        valueDim: hx[+f],
        categoryDim: hx[1 - +f]
      };
      return o.diff(s).add(function(c) {
        if (o.hasValue(c)) {
          var p = cx(o, c), d = vx(o, c, p, v), g = px(o, v, d);
          o.setItemGraphicEl(c, g), i.add(g), gx(g, v, d);
        }
      }).update(function(c, p) {
        var d = s.getItemGraphicEl(p);
        if (!o.hasValue(c)) {
          i.remove(d);
          return;
        }
        var g = cx(o, c), y = vx(o, c, g, v), m = II(o, y);
        d && m !== d.__pictorialShapeStr && (i.remove(d), o.setItemGraphicEl(c, null), d = null), d ? j$(d, v, y) : d = px(o, v, y, !0), o.setItemGraphicEl(c, d), d.__pictorialSymbolMeta = y, i.add(d), gx(d, v, y);
      }).remove(function(c) {
        var p = s.getItemGraphicEl(c);
        p && dx(s, c, p.__pictorialSymbolMeta.animationModel, p);
      }).execute(), this._data = o, this.group;
    }, e.prototype.remove = function(t, a) {
      var n = this.group, i = this._data;
      t.get("animation") ? i && i.eachItemGraphicEl(function(o) {
        dx(i, it(o).dataIndex, t, o);
      }) : n.removeAll();
    }, e.type = "pictorialBar", e;
  }(Vt)
);
function vx(r, e, t, a) {
  var n = r.getItemLayout(e), i = t.get("symbolRepeat"), o = t.get("symbolClip"), s = t.get("symbolPosition") || "start", l = t.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, f = t.get("symbolPatternSize") || 2, h = t.isAnimationEnabled(), v = {
    dataIndex: e,
    layout: n,
    itemModel: t,
    symbolType: r.getItemVisual(e, "symbol") || "circle",
    style: r.getItemVisual(e, "style"),
    symbolClip: o,
    symbolRepeat: i,
    symbolRepeatDirection: t.get("symbolRepeatDirection"),
    symbolPatternSize: f,
    rotation: u,
    animationModel: h ? t : null,
    hoverScale: h && t.get(["emphasis", "scale"]),
    z2: t.getShallow("z", !0) || 0
  };
  U$(t, i, n, a, v), Y$(r, e, n, i, o, v.boundingLength, v.pxSign, f, a, v), Z$(t, v.symbolScale, u, a, v);
  var c = v.symbolSize, p = Oo(t.get("symbolOffset"), c);
  return X$(t, c, n, i, o, p, s, v.valueLineWidth, v.boundingLength, v.repeatCutLength, a, v), v;
}
function U$(r, e, t, a, n) {
  var i = a.valueDim, o = r.get("symbolBoundingData"), s = a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(t[i.wh] <= 0), f;
  if (z(o)) {
    var h = [Yc(s, o[0]) - l, Yc(s, o[1]) - l];
    h[1] < h[0] && h.reverse(), f = h[u];
  } else
    o != null ? f = Yc(s, o) - l : e ? f = a.coordSysExtent[i.index][u] - l : f = t[i.wh];
  n.boundingLength = f, e && (n.repeatCutLength = t[i.wh]), n.pxSign = f > 0 ? 1 : -1;
}
function Yc(r, e) {
  return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)));
}
function Y$(r, e, t, a, n, i, o, s, l, u) {
  var f = l.valueDim, h = l.categoryDim, v = Math.abs(t[h.wh]), c = r.getItemVisual(e, "symbolSize"), p;
  z(c) ? p = c.slice() : c == null ? p = ["100%", "100%"] : p = [c, c], p[h.index] = H(p[h.index], v), p[f.index] = H(p[f.index], a ? v : Math.abs(i)), u.symbolSize = p;
  var d = u.symbolScale = [p[0] / s, p[1] / s];
  d[f.index] *= (l.isHorizontal ? -1 : 1) * o;
}
function Z$(r, e, t, a, n) {
  var i = r.get(W$) || 0;
  i && (Uc.attr({
    scaleX: e[0],
    scaleY: e[1],
    rotation: t
  }), Uc.updateTransform(), i /= Uc.getLineScale(), i *= e[a.valueDim.index]), n.valueLineWidth = i || 0;
}
function X$(r, e, t, a, n, i, o, s, l, u, f, h) {
  var v = f.categoryDim, c = f.valueDim, p = h.pxSign, d = Math.max(e[c.index] + s, 0), g = d;
  if (a) {
    var y = Math.abs(l), m = jt(r.get("symbolMargin"), "15%") + "", _ = !1;
    m.lastIndexOf("!") === m.length - 1 && (_ = !0, m = m.slice(0, m.length - 1));
    var S = H(m, e[c.index]), w = Math.max(d + S * 2, 0), x = _ ? 0 : S * 2, b = Sg(a), T = b ? a : yx((y + x) / w), D = y - T * d;
    S = D / 2 / (_ ? T : Math.max(T - 1, 1)), w = d + S * 2, x = _ ? 0 : S * 2, !b && a !== "fixed" && (T = u ? yx((Math.abs(u) + x) / w) : 0), g = T * w - x, h.repeatTimes = T, h.symbolMargin = S;
  }
  var A = p * (g / 2), M = h.pathPosition = [];
  M[v.index] = t[v.wh] / 2, M[c.index] = o === "start" ? A : o === "end" ? l - A : l / 2, i && (M[0] += i[0], M[1] += i[1]);
  var I = h.bundlePosition = [];
  I[v.index] = t[v.xy], I[c.index] = t[c.xy];
  var L = h.barRectShape = V({}, t);
  L[c.wh] = p * Math.max(Math.abs(t[c.wh]), Math.abs(M[c.index] + A)), L[v.wh] = t[v.wh];
  var E = h.clipShape = {};
  E[v.xy] = -t[v.xy], E[v.wh] = f.ecSize[v.wh], E[c.xy] = 0, E[c.wh] = t[c.wh];
}
function TI(r) {
  var e = r.symbolPatternSize, t = Jt(
    // Consider texture img, make a big size.
    r.symbolType,
    -e / 2,
    -e / 2,
    e,
    e
  );
  return t.attr({
    culling: !0
  }), t.type !== "image" && t.setStyle({
    strokeNoScale: !0
  }), t;
}
function DI(r, e, t, a) {
  var n = r.__pictorialBundle, i = t.symbolSize, o = t.valueLineWidth, s = t.pathPosition, l = e.valueDim, u = t.repeatTimes || 0, f = 0, h = i[e.valueDim.index] + o + t.symbolMargin * 2;
  for (Hy(r, function(d) {
    d.__pictorialAnimationIndex = f, d.__pictorialRepeatTimes = u, f < u ? oo(d, null, p(f), t, a) : oo(d, null, {
      scaleX: 0,
      scaleY: 0
    }, t, a, function() {
      n.remove(d);
    }), f++;
  }); f < u; f++) {
    var v = TI(t);
    v.__pictorialAnimationIndex = f, v.__pictorialRepeatTimes = u, n.add(v);
    var c = p(f);
    oo(v, {
      x: c.x,
      y: c.y,
      scaleX: 0,
      scaleY: 0
    }, {
      scaleX: c.scaleX,
      scaleY: c.scaleY,
      rotation: c.rotation
    }, t, a);
  }
  function p(d) {
    var g = s.slice(), y = t.pxSign, m = d;
    return (t.symbolRepeatDirection === "start" ? y > 0 : y < 0) && (m = u - 1 - d), g[l.index] = h * (m - u / 2 + 0.5) + s[l.index], {
      x: g[0],
      y: g[1],
      scaleX: t.symbolScale[0],
      scaleY: t.symbolScale[1],
      rotation: t.rotation
    };
  }
}
function CI(r, e, t, a) {
  var n = r.__pictorialBundle, i = r.__pictorialMainPath;
  i ? oo(i, null, {
    x: t.pathPosition[0],
    y: t.pathPosition[1],
    scaleX: t.symbolScale[0],
    scaleY: t.symbolScale[1],
    rotation: t.rotation
  }, t, a) : (i = r.__pictorialMainPath = TI(t), n.add(i), oo(i, {
    x: t.pathPosition[0],
    y: t.pathPosition[1],
    scaleX: 0,
    scaleY: 0,
    rotation: t.rotation
  }, {
    scaleX: t.symbolScale[0],
    scaleY: t.symbolScale[1]
  }, t, a));
}
function AI(r, e, t) {
  var a = V({}, e.barRectShape), n = r.__pictorialBarRect;
  n ? oo(n, null, {
    shape: a
  }, e, t) : (n = r.__pictorialBarRect = new bt({
    z2: 2,
    shape: a,
    silent: !0,
    style: {
      stroke: "transparent",
      fill: "transparent",
      lineWidth: 0
    }
  }), n.disableMorphing = !0, r.add(n));
}
function MI(r, e, t, a) {
  if (t.symbolClip) {
    var n = r.__pictorialClipPath, i = V({}, t.clipShape), o = e.valueDim, s = t.animationModel, l = t.dataIndex;
    if (n)
      Mt(n, {
        shape: i
      }, s, l);
    else {
      i[o.wh] = 0, n = new bt({
        shape: i
      }), r.__pictorialBundle.setClipPath(n), r.__pictorialClipPath = n;
      var u = {};
      u[o.wh] = t.clipShape[o.wh], ml[a ? "updateProps" : "initProps"](n, {
        shape: u
      }, s, l);
    }
  }
}
function cx(r, e) {
  var t = r.getItemModel(e);
  return t.getAnimationDelayParams = q$, t.isAnimationEnabled = K$, t;
}
function q$(r) {
  return {
    index: r.__pictorialAnimationIndex,
    count: r.__pictorialRepeatTimes
  };
}
function K$() {
  return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
}
function px(r, e, t, a) {
  var n = new nt(), i = new nt();
  return n.add(i), n.__pictorialBundle = i, i.x = t.bundlePosition[0], i.y = t.bundlePosition[1], t.symbolRepeat ? DI(n, e, t) : CI(n, e, t), AI(n, t, a), MI(n, e, t, a), n.__pictorialShapeStr = II(r, t), n.__pictorialSymbolMeta = t, n;
}
function j$(r, e, t) {
  var a = t.animationModel, n = t.dataIndex, i = r.__pictorialBundle;
  Mt(i, {
    x: t.bundlePosition[0],
    y: t.bundlePosition[1]
  }, a, n), t.symbolRepeat ? DI(r, e, t, !0) : CI(r, e, t, !0), AI(r, t, !0), MI(r, e, t, !0);
}
function dx(r, e, t, a) {
  var n = a.__pictorialBarRect;
  n && n.removeTextContent();
  var i = [];
  Hy(a, function(o) {
    i.push(o);
  }), a.__pictorialMainPath && i.push(a.__pictorialMainPath), a.__pictorialClipPath && (t = null), C(i, function(o) {
    Qa(o, {
      scaleX: 0,
      scaleY: 0
    }, t, e, function() {
      a.parent && a.parent.remove(a);
    });
  }), r.setItemGraphicEl(e, null);
}
function II(r, e) {
  return [r.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
}
function Hy(r, e, t) {
  C(r.__pictorialBundle.children(), function(a) {
    a !== r.__pictorialBarRect && e.call(t, a);
  });
}
function oo(r, e, t, a, n, i) {
  e && r.attr(e), a.symbolClip && !n ? t && r.attr(t) : t && ml[n ? "updateProps" : "initProps"](r, t, a.animationModel, a.dataIndex, i);
}
function gx(r, e, t) {
  var a = t.dataIndex, n = t.itemModel, i = n.getModel("emphasis"), o = i.getModel("itemStyle").getItemStyle(), s = n.getModel(["blur", "itemStyle"]).getItemStyle(), l = n.getModel(["select", "itemStyle"]).getItemStyle(), u = n.getShallow("cursor"), f = i.get("focus"), h = i.get("blurScope"), v = i.get("scale");
  Hy(r, function(d) {
    if (d instanceof de) {
      var g = d.style;
      d.useStyle(V({
        // TODO other properties like dx, dy ?
        image: g.image,
        x: g.x,
        y: g.y,
        width: g.width,
        height: g.height
      }, t.style));
    } else
      d.useStyle(t.style);
    var y = d.ensureState("emphasis");
    y.style = o, v && (y.scaleX = d.scaleX * 1.1, y.scaleY = d.scaleY * 1.1), d.ensureState("blur").style = s, d.ensureState("select").style = l, u && (d.cursor = u), d.z2 = t.z2;
  });
  var c = e.valueDim.posDesc[+(t.boundingLength > 0)], p = r.__pictorialBarRect;
  pe(p, ie(n), {
    labelFetcher: e.seriesModel,
    labelDataIndex: a,
    defaultText: co(e.seriesModel.getData(), a),
    inheritColor: t.style.fill,
    defaultOpacity: t.style.opacity,
    defaultOutsidePosition: c
  }), Wt(r, f, h, i.get("disabled"));
}
function yx(r) {
  var e = Math.round(r);
  return Math.abs(r - e) < 1e-4 ? e : Math.ceil(r);
}
const Q$ = $$;
var J$ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.hasSymbolVisual = !0, t.defaultSymbol = "roundRect", t;
    }
    return e.prototype.getInitialData = function(t) {
      return t.stack = null, r.prototype.getInitialData.apply(this, arguments);
    }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = sn(kf.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%",
      // 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;
  }(kf)
);
const tU = J$;
function eU(r) {
  r.registerChartView(Q$), r.registerSeriesModel(tU), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, ot(fA, "pictorialBar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, hA("pictorialBar"));
}
var rU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._layers = [], t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = t.getData(), o = this, s = this.group, l = t.getLayerSeries(), u = i.getLayout("layoutInfo"), f = u.rect, h = u.boundaryGap;
      s.x = 0, s.y = f.y + h[0];
      function v(g) {
        return g.name;
      }
      var c = new ya(this._layersSeries || [], l, v, v), p = [];
      c.add(Y(d, this, "add")).update(Y(d, this, "update")).remove(Y(d, this, "remove")).execute();
      function d(g, y, m) {
        var _ = o._layers;
        if (g === "remove") {
          s.remove(_[y]);
          return;
        }
        for (var S = [], w = [], x, b = l[y].indices, T = 0; T < b.length; T++) {
          var D = i.getItemLayout(b[T]), A = D.x, M = D.y0, I = D.y;
          S.push(A, M), w.push(A, M + I), x = i.getItemVisual(b[T], "style");
        }
        var L, E = i.getItemLayout(b[0]), P = t.getModel("label"), R = P.get("margin"), k = t.getModel("emphasis");
        if (g === "add") {
          var O = p[y] = new nt();
          L = new JA({
            shape: {
              points: S,
              stackedOnPoints: w,
              smooth: 0.4,
              stackedOnSmooth: 0.4,
              smoothConstraint: !1
            },
            z2: 0
          }), O.add(L), s.add(O), t.isAnimationEnabled() && L.setClipPath(aU(L.getBoundingRect(), t, function() {
            L.removeClipPath();
          }));
        } else {
          var O = _[m];
          L = O.childAt(0), s.add(O), p[y] = O, Mt(L, {
            shape: {
              points: S,
              stackedOnPoints: w
            }
          }, t), Cr(L);
        }
        pe(L, ie(t), {
          labelDataIndex: b[T - 1],
          defaultText: i.getName(b[T - 1]),
          inheritColor: x.fill
        }, {
          normal: {
            verticalAlign: "middle"
            // align: 'right'
          }
        }), L.setTextConfig({
          position: null,
          local: !0
        });
        var B = L.getTextContent();
        B && (B.x = E.x - R, B.y = E.y0 + E.y / 2), L.useStyle(x), i.setItemGraphicEl(y, L), ce(L, t), Wt(L, k.get("focus"), k.get("blurScope"), k.get("disabled"));
      }
      this._layersSeries = l, this._layers = p;
    }, e.type = "themeRiver", e;
  }(Vt)
);
function aU(r, e, t) {
  var a = new bt({
    shape: {
      x: r.x - 10,
      y: r.y - 10,
      width: 0,
      height: r.height + 20
    }
  });
  return Bt(a, {
    shape: {
      x: r.x - 50,
      width: r.width + 100,
      height: r.height + 20
    }
  }, e, t), a;
}
const nU = rU;
var Zc = 2, iU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t) {
      r.prototype.init.apply(this, arguments), this.legendVisualProvider = new Ml(Y(this.getData, this), Y(this.getRawData, this));
    }, e.prototype.fixData = function(t) {
      var a = t.length, n = {}, i = Hp(t, function(v) {
        return n.hasOwnProperty(v[0] + "") || (n[v[0] + ""] = -1), v[2];
      }), o = [];
      i.buckets.each(function(v, c) {
        o.push({
          name: c,
          dataList: v
        });
      });
      for (var s = o.length, l = 0; l < s; ++l) {
        for (var u = o[l].name, f = 0; f < o[l].dataList.length; ++f) {
          var h = o[l].dataList[f][0] + "";
          n[h] = l;
        }
        for (var h in n)
          n.hasOwnProperty(h) && n[h] !== l && (n[h] = l, t[a] = [h, 0, u], a++);
      }
      return t;
    }, e.prototype.getInitialData = function(t, a) {
      for (var n = this.getReferringComponents("singleAxis", Qt).models[0], i = n.get("type"), o = Et(t.data, function(p) {
        return p[2] !== void 0;
      }), s = this.fixData(o || []), l = [], u = this.nameMap = K(), f = 0, h = 0; h < s.length; ++h)
        l.push(s[h][Zc]), u.get(s[h][Zc]) || (u.set(s[h][Zc], f), f++);
      var v = xl(s, {
        coordDimensions: ["single"],
        dimensionsDefine: [{
          name: "time",
          type: Ef(i)
        }, {
          name: "value",
          type: "float"
        }, {
          name: "name",
          type: "ordinal"
        }],
        encodeDefine: {
          single: 0,
          value: 1,
          itemName: 2
        }
      }).dimensions, c = new Ce(v, this);
      return c.initData(s), c;
    }, e.prototype.getLayerSeries = function() {
      for (var t = this.getData(), a = t.count(), n = [], i = 0; i < a; ++i)
        n[i] = i;
      var o = t.mapDimension("single"), s = Hp(n, function(u) {
        return t.get("name", u);
      }), l = [];
      return s.buckets.each(function(u, f) {
        u.sort(function(h, v) {
          return t.get(o, h) - t.get(o, v);
        }), l.push({
          name: f,
          indices: u
        });
      }), l;
    }, e.prototype.getAxisTooltipData = function(t, a, n) {
      z(t) || (t = t ? [t] : []);
      for (var i = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, f = 0; f < l; ++f) {
        for (var h = Number.MAX_VALUE, v = -1, c = o[f].indices.length, p = 0; p < c; ++p) {
          var d = i.get(t[0], o[f].indices[p]), g = Math.abs(d - a);
          g <= h && (u = d, h = g, v = o[f].indices[p]);
        }
        s.push(v);
      }
      return {
        dataIndices: s,
        nestestValue: u
      };
    }, e.prototype.formatTooltip = function(t, a, n) {
      var i = this.getData(), o = i.getName(t), s = i.get(i.mapDimension("value"), t);
      return oe("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;
  }(Gt)
);
const oU = iU;
function sU(r, e) {
  r.eachSeriesByType("themeRiver", function(t) {
    var a = t.getData(), n = t.coordinateSystem, i = {}, o = n.getRect();
    i.rect = o;
    var s = t.get("boundaryGap"), l = n.getAxis();
    if (i.boundaryGap = s, l.orient === "horizontal") {
      s[0] = H(s[0], o.height), s[1] = H(s[1], o.height);
      var u = o.height - s[0] - s[1];
      mx(a, t, u);
    } else {
      s[0] = H(s[0], o.width), s[1] = H(s[1], o.width);
      var f = o.width - s[0] - s[1];
      mx(a, t, f);
    }
    a.setLayout("layoutInfo", i);
  });
}
function mx(r, e, t) {
  if (r.count())
    for (var a = e.coordinateSystem, n = e.getLayerSeries(), i = r.mapDimension("single"), o = r.mapDimension("value"), s = G(n, function(g) {
      return G(g.indices, function(y) {
        var m = a.dataToPoint(r.get(i, y));
        return m[1] = r.get(o, y), m;
      });
    }), l = lU(s), u = l.y0, f = t / l.max, h = n.length, v = n[0].indices.length, c, p = 0; p < v; ++p) {
      c = u[p] * f, r.setItemLayout(n[0].indices[p], {
        layerIndex: 0,
        x: s[0][p][0],
        y0: c,
        y: s[0][p][1] * f
      });
      for (var d = 1; d < h; ++d)
        c += s[d - 1][p][1] * f, r.setItemLayout(n[d].indices[p], {
          layerIndex: d,
          x: s[d][p][0],
          y0: c,
          y: s[d][p][1] * f
        });
    }
}
function lU(r) {
  for (var e = r.length, t = r[0].length, a = [], n = [], i = 0, o = 0; o < t; ++o) {
    for (var s = 0, l = 0; l < e; ++l)
      s += r[l][o][1];
    s > i && (i = s), a.push(s);
  }
  for (var u = 0; u < t; ++u)
    n[u] = (i - a[u]) / 2;
  i = 0;
  for (var f = 0; f < t; ++f) {
    var h = a[f] + n[f];
    h > i && (i = h);
  }
  return {
    y0: n,
    max: i
  };
}
function uU(r) {
  r.registerChartView(nU), r.registerSeriesModel(oU), r.registerLayout(sU), r.registerProcessor(Al("themeRiver"));
}
var fU = 2, hU = 4, vU = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i) {
      var o = r.call(this) || this;
      o.z2 = fU, o.textConfig = {
        inside: !0
      }, it(o).seriesIndex = a.seriesIndex;
      var s = new Dt({
        z2: hU,
        silent: t.getModel().get(["label", "silent"])
      });
      return o.setTextContent(s), o.updateData(!0, t, a, n, i), o;
    }
    return e.prototype.updateData = function(t, a, n, i, o) {
      this.node = a, a.piece = this, n = n || this._seriesModel, i = i || this._ecModel;
      var s = this;
      it(s).dataIndex = a.dataIndex;
      var l = a.getModel(), u = l.getModel("emphasis"), f = a.getLayout(), h = V({}, f);
      h.label = null;
      var v = a.getVisual("style");
      v.lineJoin = "bevel";
      var c = a.getVisual("decal");
      c && (v.decal = ho(c, o));
      var p = jn(l.getModel("itemStyle"), h, !0);
      V(h, p), C(Me, function(m) {
        var _ = s.ensureState(m), S = l.getModel([m, "itemStyle"]);
        _.style = S.getItemStyle();
        var w = jn(S, h);
        w && (_.shape = w);
      }), t ? (s.setShape(h), s.shape.r = f.r0, Bt(s, {
        shape: {
          r: f.r
        }
      }, n, a.dataIndex)) : (Mt(s, {
        shape: h
      }, n), Cr(s)), s.useStyle(v), this._updateLabel(n);
      var d = l.getShallow("cursor");
      d && s.attr("cursor", d), this._seriesModel = n || this._seriesModel, this._ecModel = i || this._ecModel;
      var g = u.get("focus"), y = g === "ancestor" ? a.getAncestorsIndices() : g === "descendant" ? a.getDescendantIndices() : g;
      Wt(this, y, u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(t) {
      var a = this, n = this.node.getModel(), i = n.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), f = Math.sin(l), h = this, v = h.getTextContent(), c = this.node.dataIndex, p = i.get("minAngle") / 180 * Math.PI, d = i.get("show") && !(p != null && Math.abs(s) < p);
      v.ignore = !d, C($s, function(y) {
        var m = y === "normal" ? n.getModel("label") : n.getModel([y, "label"]), _ = y === "normal", S = _ ? v : v.ensureState(y), w = t.getFormattedLabel(c, y);
        _ && (w = w || a.node.name), S.style = Ot(m, {}, null, y !== "normal", !0), w && (S.style.text = w);
        var x = m.get("show");
        x != null && !_ && (S.ignore = !x);
        var b = g(m, "position"), T = _ ? h : h.states[y], D = T.style.fill;
        T.textConfig = {
          outsideFill: m.get("color") === "inherit" ? D : null,
          inside: b !== "outside"
        };
        var A, M = g(m, "distance") || 0, I = g(m, "align");
        b === "outside" ? (A = o.r + M, I = l > Math.PI / 2 ? "right" : "left") : !I || I === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? A = 0 : A = (o.r + o.r0) / 2, I = "center") : I === "left" ? (A = o.r0 + M, l > Math.PI / 2 && (I = "right")) : I === "right" && (A = o.r - M, l > Math.PI / 2 && (I = "left")), S.style.align = I, S.style.verticalAlign = g(m, "verticalAlign") || "middle", S.x = A * u + o.cx, S.y = A * f + o.cy;
        var L = g(m, "rotate"), E = 0;
        L === "radial" ? (E = ia(-l), E > Math.PI / 2 && E < Math.PI * 1.5 && (E += Math.PI)) : L === "tangential" ? (E = Math.PI / 2 - l, E > Math.PI / 2 ? E -= Math.PI : E < -Math.PI / 2 && (E += Math.PI)) : Ct(L) && (E = L * Math.PI / 180), S.rotation = E;
      });
      function g(y, m) {
        var _ = y.get(m);
        return _ ?? i.get(m);
      }
      v.dirtyStyle();
    }, e;
  }(Ve)
);
const _x = vU;
var Fd = "sunburstRootToNode", Sx = "sunburstHighlight", cU = "sunburstUnhighlight";
function pU(r) {
  r.registerAction({
    type: Fd,
    update: "updateView"
  }, function(e, t) {
    t.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, a);
    function a(n, i) {
      var o = al(e, [Fd], n);
      if (o) {
        var s = n.getViewRoot();
        s && (e.direction = Ay(s, o.node) ? "rollUp" : "drillDown"), n.resetViewRoot(o.node);
      }
    }
  }), r.registerAction({
    type: Sx,
    update: "none"
  }, function(e, t, a) {
    e = V({}, e), t.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, n);
    function n(i) {
      var o = al(e, [Sx], i);
      o && (e.dataIndex = o.node.dataIndex);
    }
    ({}).NODE_ENV !== "production" && Kt("sunburstHighlight", "highlight"), a.dispatchAction(V(e, {
      type: "highlight"
    }));
  }), r.registerAction({
    type: cU,
    update: "updateView"
  }, function(e, t, a) {
    e = V({}, e), {}.NODE_ENV !== "production" && Kt("sunburstUnhighlight", "downplay"), a.dispatchAction(V(e, {
      type: "downplay"
    }));
  });
}
var dU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      var o = this;
      this.seriesModel = t, this.api = n, this.ecModel = a;
      var s = t.getData(), l = s.tree.root, u = t.getViewRoot(), f = this.group, h = t.get("renderLabelForZeroData"), v = [];
      u.eachNode(function(m) {
        v.push(m);
      });
      var c = this._oldChildren || [];
      p(v, c), y(l, u), this._initEvents(), this._oldChildren = v;
      function p(m, _) {
        if (m.length === 0 && _.length === 0)
          return;
        new ya(_, m, S, S).add(w).update(w).remove(ot(w, null)).execute();
        function S(x) {
          return x.getId();
        }
        function w(x, b) {
          var T = x == null ? null : m[x], D = b == null ? null : _[b];
          d(T, D);
        }
      }
      function d(m, _) {
        if (!h && m && !m.getValue() && (m = null), m !== l && _ !== l) {
          if (_ && _.piece)
            m ? (_.piece.updateData(!1, m, t, a, n), s.setItemGraphicEl(m.dataIndex, _.piece)) : g(_);
          else if (m) {
            var S = new _x(m, t, a, n);
            f.add(S), s.setItemGraphicEl(m.dataIndex, S);
          }
        }
      }
      function g(m) {
        m && m.piece && (f.remove(m.piece), m.piece = null);
      }
      function y(m, _) {
        _.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, m, t, a, n) : (o.virtualPiece = new _x(m, t, a, n), f.add(o.virtualPiece)), _.piece.off("click"), o.virtualPiece.on("click", function(S) {
          o._rootToNode(_.parentNode);
        })) : o.virtualPiece && (f.remove(o.virtualPiece), o.virtualPiece = null);
      }
    }, e.prototype._initEvents = function() {
      var t = this;
      this.group.off("click"), this.group.on("click", function(a) {
        var n = !1, i = t.seriesModel.getViewRoot();
        i.eachNode(function(o) {
          if (!n && o.piece && o.piece === a.target) {
            var s = o.getModel().get("nodeClick");
            if (s === "rootToNode")
              t._rootToNode(o);
            else if (s === "link") {
              var l = o.getModel(), u = l.get("link");
              if (u) {
                var f = l.get("target", !0) || "_blank";
                Sf(u, f);
              }
            }
            n = !0;
          }
        });
      });
    }, e.prototype._rootToNode = function(t) {
      t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
        type: Fd,
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: t
      });
    }, e.prototype.containPoint = function(t, a) {
      var n = a.getData(), i = n.getItemLayout(0);
      if (i) {
        var o = t[0] - i.cx, s = t[1] - i.cy, l = Math.sqrt(o * o + s * s);
        return l <= i.r && l >= i.r0;
      }
    }, e.type = "sunburst", e;
  }(Vt)
);
const gU = dU;
var yU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.ignoreStyleOnData = !0, t;
    }
    return e.prototype.getInitialData = function(t, a) {
      var n = {
        name: t.name,
        children: t.data
      };
      LI(n);
      var i = this._levelModels = G(t.levels || [], function(l) {
        return new kt(l, this, a);
      }, this), o = Cy.createTree(n, this, s);
      function s(l) {
        l.wrapMethod("getItemModel", function(u, f) {
          var h = o.getNodeByDataIndex(f), v = i[h.depth];
          return v && (u.parentModel = v), u;
        });
      }
      return o.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.getDataParams = function(t) {
      var a = r.prototype.getDataParams.apply(this, arguments), n = this.getData().tree.getNodeByDataIndex(t);
      return a.treePathInfo = Fh(n, this), a;
    }, e.prototype.getLevelModel = function(t) {
      return this._levelModels && this._levelModels[t.depth];
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(t) {
      t ? this._viewRoot = t : t = this._viewRoot;
      var a = this.getRawData().tree.root;
      (!t || t !== a && !a.contains(t)) && (this._viewRoot = a);
    }, e.prototype.enableAriaDecal = function() {
      NM(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;
  }(Gt)
);
function LI(r) {
  var e = 0;
  C(r.children, function(a) {
    LI(a);
    var n = a.value;
    z(n) && (n = n[0]), e += n;
  });
  var t = r.value;
  z(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), z(r.value) ? r.value[0] = t : r.value = t;
}
const mU = yU;
var xx = Math.PI / 180;
function _U(r, e, t) {
  e.eachSeriesByType(r, function(a) {
    var n = a.get("center"), i = a.get("radius");
    z(i) || (i = [0, i]), z(n) || (n = [n, n]);
    var o = t.getWidth(), s = t.getHeight(), l = Math.min(o, s), u = H(n[0], o), f = H(n[1], s), h = H(i[0], l / 2), v = H(i[1], l / 2), c = -a.get("startAngle") * xx, p = a.get("minAngle") * xx, d = a.getData().tree.root, g = a.getViewRoot(), y = g.depth, m = a.get("sort");
    m != null && EI(g, m);
    var _ = 0;
    C(g.children, function(R) {
      !isNaN(R.getValue()) && _++;
    });
    var S = g.getValue(), w = Math.PI / (S || _) * 2, x = g.depth > 0, b = g.height - (x ? -1 : 1), T = (v - h) / (b || 1), D = a.get("clockwise"), A = a.get("stillShowZeroSum"), M = D ? 1 : -1, I = function(R, k) {
      if (R) {
        var O = k;
        if (R !== d) {
          var B = R.getValue(), F = S === 0 && A ? w : B * w;
          F < p && (F = p), O = k + M * F;
          var W = R.depth - y - (x ? -1 : 1), Z = h + T * W, J = h + T * (W + 1), et = a.getLevelModel(R);
          if (et) {
            var yt = et.get("r0", !0), At = et.get("r", !0), dt = et.get("radius", !0);
            dt != null && (yt = dt[0], At = dt[1]), yt != null && (Z = H(yt, l / 2)), At != null && (J = H(At, l / 2));
          }
          R.setLayout({
            angle: F,
            startAngle: k,
            endAngle: O,
            clockwise: D,
            cx: u,
            cy: f,
            r0: Z,
            r: J
          });
        }
        if (R.children && R.children.length) {
          var at = 0;
          C(R.children, function(mt) {
            at += I(mt, k + at);
          });
        }
        return O - k;
      }
    };
    if (x) {
      var L = h, E = h + T, P = Math.PI * 2;
      d.setLayout({
        angle: P,
        startAngle: c,
        endAngle: c + P,
        clockwise: D,
        cx: u,
        cy: f,
        r0: L,
        r: E
      });
    }
    I(g, c);
  });
}
function EI(r, e) {
  var t = r.children || [];
  r.children = SU(t, e), t.length && C(r.children, function(a) {
    EI(a, e);
  });
}
function SU(r, e) {
  if (q(e)) {
    var t = G(r, function(n, i) {
      var o = n.getValue();
      return {
        params: {
          depth: n.depth,
          height: n.height,
          dataIndex: n.dataIndex,
          getValue: function() {
            return o;
          }
        },
        index: i
      };
    });
    return t.sort(function(n, i) {
      return e(n.params, i.params);
    }), G(t, function(n) {
      return r[n.index];
    });
  } else {
    var a = e === "asc";
    return r.sort(function(n, i) {
      var o = (n.getValue() - i.getValue()) * (a ? 1 : -1);
      return o === 0 ? (n.dataIndex - i.dataIndex) * (a ? -1 : 1) : o;
    });
  }
}
function xU(r) {
  var e = {};
  function t(a, n, i) {
    for (var o = a; o && o.depth > 1; )
      o = o.parentNode;
    var s = n.getColorFromPalette(o.name || o.dataIndex + "", e);
    return a.depth > 1 && $(s) && (s = Ep(s, (a.depth - 1) / (i - 1) * 0.5)), s;
  }
  r.eachSeriesByType("sunburst", function(a) {
    var n = a.getData(), i = n.tree;
    i.eachNode(function(o) {
      var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
      l.fill || (l.fill = t(o, a, i.root.height));
      var u = n.ensureUniqueItemVisual(o.dataIndex, "style");
      V(u, l);
    });
  });
}
function wU(r) {
  r.registerChartView(gU), r.registerSeriesModel(mU), r.registerLayout(ot(_U, "sunburst")), r.registerProcessor(ot(Al, "sunburst")), r.registerVisual(xU), pU(r);
}
var bx = {
  color: "fill",
  borderColor: "stroke"
}, bU = {
  symbol: 1,
  symbolSize: 1,
  symbolKeepAspect: 1,
  legendIcon: 1,
  visualMeta: 1,
  liftZ: 1,
  decal: 1
}, ha = Tt(), TU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.optionUpdated = function() {
      this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
    }, e.prototype.getInitialData = function(t, a) {
      return xa(null, this);
    }, e.prototype.getDataParams = function(t, a, n) {
      var i = r.prototype.getDataParams.call(this, t, a);
      return n && (i.info = ha(n).info), i;
    }, 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;
  }(Gt)
);
const DU = TU;
function CU(r, e) {
  return e = e || [0, 0], G(["x", "y"], function(t, a) {
    var n = this.getAxis(t), i = e[a], o = r[a] / 2;
    return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(i - o) - n.dataToCoord(i + o));
  }, this);
}
function AU(r) {
  var e = r.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(t) {
        return r.dataToPoint(t);
      },
      size: Y(CU, r)
    }
  };
}
function MU(r, e) {
  return e = e || [0, 0], G([0, 1], function(t) {
    var a = e[t], n = r[t] / 2, i = [], o = [];
    return i[t] = a - n, o[t] = a + n, i[1 - t] = o[1 - t] = e[1 - t], Math.abs(this.dataToPoint(i)[t] - this.dataToPoint(o)[t]);
  }, this);
}
function IU(r) {
  var e = r.getBoundingRect();
  return {
    coordSys: {
      type: "geo",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      zoom: r.getZoom()
    },
    api: {
      coord: function(t) {
        return r.dataToPoint(t);
      },
      size: Y(MU, r)
    }
  };
}
function LU(r, e) {
  var t = this.getAxis(), a = e instanceof Array ? e[0] : e, n = (r instanceof Array ? r[0] : r) / 2;
  return t.type === "category" ? t.getBandWidth() : Math.abs(t.dataToCoord(a - n) - t.dataToCoord(a + n));
}
function EU(r) {
  var e = r.getRect();
  return {
    coordSys: {
      type: "singleAxis",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    api: {
      coord: function(t) {
        return r.dataToPoint(t);
      },
      size: Y(LU, r)
    }
  };
}
function PU(r, e) {
  return e = e || [0, 0], G(["Radius", "Angle"], function(t, a) {
    var n = "get" + t + "Axis", i = this[n](), o = e[a], s = r[a] / 2, l = i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(o - s) - i.dataToCoord(o + s));
    return t === "Angle" && (l = l * Math.PI / 180), l;
  }, this);
}
function RU(r) {
  var e = r.getRadiusAxis(), t = r.getAngleAxis(), a = e.getExtent();
  return a[0] > a[1] && a.reverse(), {
    coordSys: {
      type: "polar",
      cx: r.cx,
      cy: r.cy,
      r: a[1],
      r0: a[0]
    },
    api: {
      coord: function(n) {
        var i = e.dataToRadius(n[0]), o = t.dataToAngle(n[1]), s = r.coordToPoint([i, o]);
        return s.push(i, o * Math.PI / 180), s;
      },
      size: Y(PU, r)
    }
  };
}
function NU(r) {
  var e = r.getRect(), t = r.getRangeInfo();
  return {
    coordSys: {
      type: "calendar",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      cellWidth: r.getCellWidth(),
      cellHeight: r.getCellHeight(),
      rangeInfo: {
        start: t.start,
        end: t.end,
        weeks: t.weeks,
        dayCount: t.allDay
      }
    },
    api: {
      coord: function(a, n) {
        return r.dataToPoint(a, n);
      }
    }
  };
}
var Tx = {};
function PI(r, e, t, a) {
  return r && (r.legacy || r.legacy !== !1 && !t && !a && e !== "tspan" && (e === "text" || U(r, "text")));
}
function RI(r, e, t) {
  var a = r, n, i, o;
  if (e === "text")
    o = a;
  else {
    o = {}, U(a, "text") && (o.text = a.text), U(a, "rich") && (o.rich = a.rich), U(a, "textFill") && (o.fill = a.textFill), U(a, "textStroke") && (o.stroke = a.textStroke), U(a, "fontFamily") && (o.fontFamily = a.fontFamily), U(a, "fontSize") && (o.fontSize = a.fontSize), U(a, "fontStyle") && (o.fontStyle = a.fontStyle), U(a, "fontWeight") && (o.fontWeight = a.fontWeight), i = {
      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
    }, n = {};
    var s = U(a, "textPosition");
    t ? n.position = s ? a.textPosition : "inside" : s && (n.position = a.textPosition), U(a, "textPosition") && (n.position = a.textPosition), U(a, "textOffset") && (n.offset = a.textOffset), U(a, "textRotation") && (n.rotation = a.textRotation), U(a, "textDistance") && (n.distance = a.textDistance);
  }
  return Dx(o, r), C(o.rich, function(l) {
    Dx(l, l);
  }), {
    textConfig: n,
    textContent: i
  };
}
function Dx(r, e) {
  e && (e.font = e.textFont || e.font, U(e, "textStrokeWidth") && (r.lineWidth = e.textStrokeWidth), U(e, "textAlign") && (r.align = e.textAlign), U(e, "textVerticalAlign") && (r.verticalAlign = e.textVerticalAlign), U(e, "textLineHeight") && (r.lineHeight = e.textLineHeight), U(e, "textWidth") && (r.width = e.textWidth), U(e, "textHeight") && (r.height = e.textHeight), U(e, "textBackgroundColor") && (r.backgroundColor = e.textBackgroundColor), U(e, "textPadding") && (r.padding = e.textPadding), U(e, "textBorderColor") && (r.borderColor = e.textBorderColor), U(e, "textBorderWidth") && (r.borderWidth = e.textBorderWidth), U(e, "textBorderRadius") && (r.borderRadius = e.textBorderRadius), U(e, "textBoxShadowColor") && (r.shadowColor = e.textBoxShadowColor), U(e, "textBoxShadowBlur") && (r.shadowBlur = e.textBoxShadowBlur), U(e, "textBoxShadowOffsetX") && (r.shadowOffsetX = e.textBoxShadowOffsetX), U(e, "textBoxShadowOffsetY") && (r.shadowOffsetY = e.textBoxShadowOffsetY));
}
function Cx(r, e, t) {
  var a = r;
  a.textPosition = a.textPosition || t.position || "inside", t.offset != null && (a.textOffset = t.offset), t.rotation != null && (a.textRotation = t.rotation), t.distance != null && (a.textDistance = t.distance);
  var n = a.textPosition.indexOf("inside") >= 0, i = r.fill || "#000";
  Ax(a, e);
  var o = a.textFill == null;
  return n ? o && (a.textFill = t.insideFill || "#fff", !a.textStroke && t.insideStroke && (a.textStroke = t.insideStroke), !a.textStroke && (a.textStroke = i), a.textStrokeWidth == null && (a.textStrokeWidth = 2)) : (o && (a.textFill = r.fill || t.outsideFill || "#000"), !a.textStroke && t.outsideStroke && (a.textStroke = t.outsideStroke)), a.text = e.text, a.rich = e.rich, C(e.rich, function(s) {
    Ax(s, s);
  }), a;
}
function Ax(r, e) {
  e && (U(e, "fill") && (r.textFill = e.fill), U(e, "stroke") && (r.textStroke = e.fill), U(e, "lineWidth") && (r.textStrokeWidth = e.lineWidth), U(e, "font") && (r.font = e.font), U(e, "fontStyle") && (r.fontStyle = e.fontStyle), U(e, "fontWeight") && (r.fontWeight = e.fontWeight), U(e, "fontSize") && (r.fontSize = e.fontSize), U(e, "fontFamily") && (r.fontFamily = e.fontFamily), U(e, "align") && (r.textAlign = e.align), U(e, "verticalAlign") && (r.textVerticalAlign = e.verticalAlign), U(e, "lineHeight") && (r.textLineHeight = e.lineHeight), U(e, "width") && (r.textWidth = e.width), U(e, "height") && (r.textHeight = e.height), U(e, "backgroundColor") && (r.textBackgroundColor = e.backgroundColor), U(e, "padding") && (r.textPadding = e.padding), U(e, "borderColor") && (r.textBorderColor = e.borderColor), U(e, "borderWidth") && (r.textBorderWidth = e.borderWidth), U(e, "borderRadius") && (r.textBorderRadius = e.borderRadius), U(e, "shadowColor") && (r.textBoxShadowColor = e.shadowColor), U(e, "shadowBlur") && (r.textBoxShadowBlur = e.shadowBlur), U(e, "shadowOffsetX") && (r.textBoxShadowOffsetX = e.shadowOffsetX), U(e, "shadowOffsetY") && (r.textBoxShadowOffsetY = e.shadowOffsetY), U(e, "textShadowColor") && (r.textShadowColor = e.textShadowColor), U(e, "textShadowBlur") && (r.textShadowBlur = e.textShadowBlur), U(e, "textShadowOffsetX") && (r.textShadowOffsetX = e.textShadowOffsetX), U(e, "textShadowOffsetY") && (r.textShadowOffsetY = e.textShadowOffsetY));
}
function Mx(r, e) {
  if ({}.NODE_ENV !== "production") {
    var t = r + "^_^" + e;
    Tx[t] || (console.warn('[ECharts] DEPRECATED: "' + r + '" has been deprecated. ' + e), Tx[t] = !0);
  }
}
var NI = {
  position: ["x", "y"],
  scale: ["scaleX", "scaleY"],
  origin: ["originX", "originY"]
}, Ix = _t(NI), $f = $r(Yr, function(r, e) {
  return r[e] = 1, r;
}, {}), Lx = Yr.join(", "), Uf = ["", "style", "shape", "extra"], yo = Tt();
function Wy(r, e, t, a, n) {
  var i = r + "Animation", o = To(r, a, n) || {}, s = yo(e).userDuring;
  return o.duration > 0 && (o.during = s ? Y(zU, {
    el: e,
    userDuring: s
  }) : null, o.setToFinal = !0, o.scope = r), V(o, t[i]), o;
}
function ju(r, e, t, a) {
  a = a || {};
  var n = a.dataIndex, i = a.isInit, o = a.clearStyle, s = t.isAnimationEnabled(), l = yo(r), u = e.style;
  l.userDuring = e.during;
  var f = {}, h = {};
  if (FU(r, e, h), Px("shape", e, h), Px("extra", e, h), !i && s && (GU(r, e, f), Ex("shape", r, e, f), Ex("extra", r, e, f), HU(r, e, u, f)), h.style = u, OU(r, h, o), VU(r, e), s)
    if (i) {
      var v = {};
      C(Uf, function(p) {
        var d = p ? e[p] : e;
        d && d.enterFrom && (p && (v[p] = v[p] || {}), V(p ? v[p] : v, d.enterFrom));
      });
      var c = Wy("enter", r, e, t, n);
      c.duration > 0 && r.animateFrom(v, c);
    } else
      kU(r, e, n || 0, t, f);
  OI(r, e), u ? r.dirty() : r.markRedraw();
}
function OI(r, e) {
  for (var t = yo(r).leaveToProps, a = 0; a < Uf.length; a++) {
    var n = Uf[a], i = n ? e[n] : e;
    i && i.leaveTo && (t || (t = yo(r).leaveToProps = {}), n && (t[n] = t[n] || {}), V(n ? t[n] : t, i.leaveTo));
  }
}
function $h(r, e, t, a) {
  if (r) {
    var n = r.parent, i = yo(r).leaveToProps;
    if (i) {
      var o = Wy("update", r, e, t, 0);
      o.done = function() {
        n.remove(r), a && a();
      }, r.animateTo(i, o);
    } else
      n.remove(r), a && a();
  }
}
function si(r) {
  return r === "all";
}
function OU(r, e, t) {
  var a = e.style;
  if (!r.isGroup && a) {
    if (t) {
      r.useStyle({});
      for (var n = r.animators, i = 0; i < n.length; i++) {
        var o = n[i];
        o.targetName === "style" && o.changeTarget(r.style);
      }
    }
    r.setStyle(a);
  }
  e && (e.style = null, e && r.attr(e), e.style = a);
}
function kU(r, e, t, a, n) {
  if (n) {
    var i = Wy("update", r, e, a, t);
    i.duration > 0 && r.animateFrom(n, i);
  }
}
function VU(r, e) {
  U(e, "silent") && (r.silent = e.silent), U(e, "ignore") && (r.ignore = e.ignore), r instanceof ur && U(e, "invisible") && (r.invisible = e.invisible), r instanceof gt && U(e, "autoBatch") && (r.autoBatch = e.autoBatch);
}
var Nr = {}, BU = {
  // Usually other props do not need to be changed in animation during.
  setTransform: function(r, e) {
    return {}.NODE_ENV !== "production" && Q(U($f, r), "Only " + Lx + " available in `setTransform`."), Nr.el[r] = e, this;
  },
  getTransform: function(r) {
    return {}.NODE_ENV !== "production" && Q(U($f, r), "Only " + Lx + " available in `getTransform`."), Nr.el[r];
  },
  setShape: function(r, e) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var t = Nr.el, a = t.shape || (t.shape = {});
    return a[r] = e, t.dirtyShape && t.dirtyShape(), this;
  },
  getShape: function(r) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var e = Nr.el.shape;
    if (e)
      return e[r];
  },
  setStyle: function(r, e) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var t = Nr.el, a = t.style;
    return a && ({}.NODE_ENV !== "production" && li(e) && Ft("style." + r + " must not be assigned with NaN."), a[r] = e, t.dirtyStyle && t.dirtyStyle()), this;
  },
  getStyle: function(r) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var e = Nr.el.style;
    if (e)
      return e[r];
  },
  setExtra: function(r, e) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var t = Nr.el.extra || (Nr.el.extra = {});
    return t[r] = e, this;
  },
  getExtra: function(r) {
    ({}).NODE_ENV !== "production" && Fi(r);
    var e = Nr.el.extra;
    if (e)
      return e[r];
  }
};
function Fi(r) {
  if ({}.NODE_ENV !== "production" && (r === "transition" || r === "enterFrom" || r === "leaveTo"))
    throw new Error('key must not be "' + r + '"');
}
function zU() {
  var r = this, e = r.el;
  if (e) {
    var t = yo(e).userDuring, a = r.userDuring;
    if (t !== a) {
      r.el = r.userDuring = null;
      return;
    }
    Nr.el = e, a(BU);
  }
}
function Ex(r, e, t, a) {
  var n = t[r];
  if (n) {
    var i = e[r], o;
    if (i) {
      var s = t.transition, l = n.transition;
      if (l)
        if (!o && (o = a[r] = {}), si(l))
          V(o, i);
        else
          for (var u = Pt(l), f = 0; f < u.length; f++) {
            var h = u[f], v = i[h];
            o[h] = v;
          }
      else if (si(s) || ct(s, r) >= 0) {
        !o && (o = a[r] = {});
        for (var c = _t(i), f = 0; f < c.length; f++) {
          var h = c[f], v = i[h];
          WU(n[h], v) && (o[h] = v);
        }
      }
    }
  }
}
function Px(r, e, t) {
  var a = e[r];
  if (a)
    for (var n = t[r] = {}, i = _t(a), o = 0; o < i.length; o++) {
      var s = i[o];
      n[s] = As(a[s]);
    }
}
function GU(r, e, t) {
  for (var a = e.transition, n = si(a) ? Yr : Pt(a || []), i = 0; i < n.length; i++) {
    var o = n[i];
    if (!(o === "style" || o === "shape" || o === "extra")) {
      var s = r[o];
      ({}).NODE_ENV !== "production" && kI(o, "el.transition"), t[o] = s;
    }
  }
}
function FU(r, e, t) {
  for (var a = 0; a < Ix.length; a++) {
    var n = Ix[a], i = NI[n], o = e[n];
    o && (t[i[0]] = o[0], t[i[1]] = o[1]);
  }
  for (var a = 0; a < Yr.length; a++) {
    var s = Yr[a];
    e[s] != null && (t[s] = e[s]);
  }
}
function HU(r, e, t, a) {
  if (t) {
    var n = r.style, i;
    if (n) {
      var o = t.transition, s = e.transition;
      if (o && !si(o)) {
        var l = Pt(o);
        !i && (i = a.style = {});
        for (var u = 0; u < l.length; u++) {
          var f = l[u], h = n[f];
          i[f] = h;
        }
      } else if (r.getAnimationStyleProps && (si(s) || si(o) || ct(s, "style") >= 0)) {
        var v = r.getAnimationStyleProps(), c = v ? v.style : null;
        if (c) {
          !i && (i = a.style = {});
          for (var p = _t(t), u = 0; u < p.length; u++) {
            var f = p[u];
            if (c[f]) {
              var h = n[f];
              i[f] = h;
            }
          }
        }
      }
    }
  }
}
function WU(r, e) {
  return Se(r) ? r !== e : r != null && isFinite(r);
}
var kI;
({}).NODE_ENV !== "production" && (kI = function(r, e) {
  U($f, r) || Ft("Prop `" + r + "` is not a permitted in `" + e + "`. Only `" + _t($f).join("`, `") + "` are permitted.");
});
var VI = Tt(), $U = ["percent", "easing", "shape", "style", "extra"];
function BI(r) {
  r.stopAnimation("keyframe"), r.attr(VI(r));
}
function Yf(r, e, t) {
  if (!(!t.isAnimationEnabled() || !e)) {
    if (z(e)) {
      C(e, function(s) {
        Yf(r, s, t);
      });
      return;
    }
    var a = e.keyframes, n = e.duration;
    if (t && n == null) {
      var i = To("enter", t, 0);
      n = i && i.duration;
    }
    if (!(!a || !n)) {
      var o = VI(r);
      C(Uf, function(s) {
        if (!(s && !r[s])) {
          var l, u = !1;
          a.sort(function(f, h) {
            return f.percent - h.percent;
          }), C(a, function(f) {
            var h = r.animators, v = s ? f[s] : f;
            if ({}.NODE_ENV !== "production" && f.percent >= 1 && (u = !0), !!v) {
              var c = _t(v);
              if (s || (c = Et(c, function(g) {
                return ct($U, g) < 0;
              })), !!c.length) {
                l || (l = r.animate(s, e.loop, !0), l.scope = "keyframe");
                for (var p = 0; p < h.length; p++)
                  h[p] !== l && h[p].targetName === l.targetName && h[p].stopTracks(c);
                s && (o[s] = o[s] || {});
                var d = s ? o[s] : o;
                C(c, function(g) {
                  d[g] = ((s ? r[s] : r) || {})[g];
                }), l.whenWithKeys(n * f.percent, v, c, f.easing);
              }
            }
          }), l && ({}.NODE_ENV !== "production" && (u || Ft("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(n).start(e.easing));
        }
      });
    }
  }
}
var va = "emphasis", Wa = "normal", $y = "blur", Uy = "select", an = [Wa, va, $y, Uy], Xc = {
  normal: ["itemStyle"],
  emphasis: [va, "itemStyle"],
  blur: [$y, "itemStyle"],
  select: [Uy, "itemStyle"]
}, qc = {
  normal: ["label"],
  emphasis: [va, "label"],
  blur: [$y, "label"],
  select: [Uy, "label"]
}, UU = ["x", "y"], YU = "e\0\0", Ke = {
  normal: {},
  emphasis: {},
  blur: {},
  select: {}
}, Rx = {
  cartesian2d: AU,
  geo: IU,
  single: EU,
  polar: RU,
  calendar: NU
};
function Zf(r) {
  return r instanceof gt;
}
function Hd(r) {
  return r instanceof ur;
}
function ZU(r, e) {
  e.copyTransform(r), Hd(e) && Hd(r) && (e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel, e.invisible = r.invisible, e.ignore = r.ignore, Zf(e) && Zf(r) && e.setShape(r.shape));
}
var XU = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      this._progressiveEls = null;
      var o = this._data, s = t.getData(), l = this.group, u = Nx(t, s, a, n);
      o || l.removeAll(), s.diff(o).add(function(h) {
        Kc(n, null, h, u(h, i), t, l, s);
      }).remove(function(h) {
        var v = o.getItemGraphicEl(h);
        v && $h(v, ha(v).option, t);
      }).update(function(h, v) {
        var c = o.getItemGraphicEl(v);
        Kc(n, c, h, u(h, i), t, l, s);
      }).execute();
      var f = t.get("clip", !0) ? Bh(t.coordinateSystem, !1, t) : null;
      f ? l.setClipPath(f) : l.removeClipPath(), this._data = s;
    }, e.prototype.incrementalPrepareRender = function(t, a, n) {
      this.group.removeAll(), this._data = null;
    }, e.prototype.incrementalRender = function(t, a, n, i, o) {
      var s = a.getData(), l = Nx(a, s, n, i), u = this._progressiveEls = [];
      function f(c) {
        c.isGroup || (c.incremental = !0, c.ensureState("emphasis").hoverLayer = !0);
      }
      for (var h = t.start; h < t.end; h++) {
        var v = Kc(null, null, h, l(h, o), a, this.group, s);
        v && (v.traverse(f), u.push(v));
      }
    }, e.prototype.eachRendered = function(t) {
      on(this._progressiveEls || this.group, t);
    }, e.prototype.filterForExposedEvent = function(t, a, n, i) {
      var o = a.element;
      if (o == null || n.name === o)
        return !0;
      for (; (n = n.__hostTarget || n.parent) && n !== this.group; )
        if (n.name === o)
          return !0;
      return !1;
    }, e.type = "custom", e;
  }(Vt)
);
const qU = XU;
function Yy(r) {
  var e = r.type, t;
  if (e === "path") {
    var a = r.shape, n = a.width != null && a.height != null ? {
      x: a.x || 0,
      y: a.y || 0,
      width: a.width,
      height: a.height
    } : null, i = FI(a);
    t = Sh(i, null, n, a.layout || "center"), ha(t).customPathData = i;
  } else if (e === "image")
    t = new de({}), ha(t).customImagePath = r.style.image;
  else if (e === "text")
    t = new Dt({});
  else if (e === "group")
    t = new nt();
  else {
    if (e === "compoundPath")
      throw new Error('"compoundPath" is not supported yet.');
    var o = Og(e);
    if (!o) {
      var s = "";
      ({}).NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), It(s);
    }
    t = new o();
  }
  return ha(t).customGraphicType = e, t.name = r.name, t.z2EmphasisLift = 1, t.z2SelectLift = 1, t;
}
function Zy(r, e, t, a, n, i, o) {
  BI(e);
  var s = n && n.normal.cfg;
  s && e.setTextConfig(s), a && a.transition == null && (a.transition = UU);
  var l = a && a.style;
  if (l) {
    if (e.type === "text") {
      var u = l;
      U(u, "textFill") && (u.fill = u.textFill), U(u, "textStroke") && (u.stroke = u.textStroke);
    }
    var f = void 0, h = Zf(e) ? l.decal : null;
    r && h && (h.dirty = !0, f = ho(h, r)), l.__decalPattern = f;
  }
  if (Hd(e) && l) {
    var f = l.__decalPattern;
    f && (l.decal = f);
  }
  ju(e, a, i, {
    dataIndex: t,
    isInit: o,
    clearStyle: !0
  }), Yf(e, a.keyframeAnimation, i);
}
function zI(r, e, t, a, n) {
  var i = e.isGroup ? null : e, o = n && n[r].cfg;
  if (i) {
    var s = i.ensureState(r);
    if (a === !1) {
      var l = i.getState(r);
      l && (l.style = null);
    } else
      s.style = a || null;
    o && (s.textConfig = o), vi(i);
  }
}
function KU(r, e, t) {
  if (!r.isGroup) {
    var a = r, n = t.currentZ, i = t.currentZLevel;
    a.z = n, a.zlevel = i;
    var o = e.z2;
    o != null && (a.z2 = o || 0);
    for (var s = 0; s < an.length; s++)
      jU(a, e, an[s]);
  }
}
function jU(r, e, t) {
  var a = t === Wa, n = a ? e : Xf(e, t), i = n ? n.z2 : null, o;
  i != null && (o = a ? r : r.ensureState(t), o.z2 = i || 0);
}
function Nx(r, e, t, a) {
  var n = r.get("renderItem"), i = r.coordinateSystem, o = {};
  i && ({}.NODE_ENV !== "production" && (Q(n, "series.render is required."), Q(i.prepareCustoms || Rx[i.type], "This coordSys does not support custom series.")), o = i.prepareCustoms ? i.prepareCustoms(i) : Rx[i.type](i));
  for (var s = tt({
    getWidth: a.getWidth,
    getHeight: a.getHeight,
    getZr: a.getZr,
    getDevicePixelRatio: a.getDevicePixelRatio,
    value: S,
    style: x,
    ordinalRawValue: w,
    styleEmphasis: b,
    visual: A,
    barLayout: M,
    currentSeriesIndices: I,
    font: L
  }, 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: r.id,
    seriesName: r.name,
    seriesIndex: r.seriesIndex,
    coordSys: o.coordSys,
    dataInsideLength: e.count(),
    encode: QU(r.getData())
  }, u, f, h = {}, v = {}, c = {}, p = {}, d = 0; d < an.length; d++) {
    var g = an[d];
    c[g] = r.getModel(Xc[g]), p[g] = r.getModel(qc[g]);
  }
  function y(E) {
    return E === u ? f || (f = e.getItemModel(E)) : e.getItemModel(E);
  }
  function m(E, P) {
    return e.hasItemOption ? E === u ? h[P] || (h[P] = y(E).getModel(Xc[P])) : y(E).getModel(Xc[P]) : c[P];
  }
  function _(E, P) {
    return e.hasItemOption ? E === u ? v[P] || (v[P] = y(E).getModel(qc[P])) : y(E).getModel(qc[P]) : p[P];
  }
  return function(E, P) {
    return u = E, f = null, h = {}, v = {}, n && n(tt({
      dataIndexInside: E,
      dataIndex: e.getRawIndex(E),
      // Can be used for optimization when zoom or roam.
      actionType: P ? P.type : null
    }, l), s);
  };
  function S(E, P) {
    return P == null && (P = u), e.getStore().get(e.getDimensionIndex(E || 0), P);
  }
  function w(E, P) {
    P == null && (P = u), E = E || 0;
    var R = e.getDimensionInfo(E);
    if (!R) {
      var k = e.getDimensionIndex(E);
      return k >= 0 ? e.getStore().get(k, P) : void 0;
    }
    var O = e.get(R.name, P), B = R && R.ordinalMeta;
    return B ? B.categories[O] : O;
  }
  function x(E, P) {
    ({}).NODE_ENV !== "production" && Mx("api.style", "Please write literal style directly instead."), P == null && (P = u);
    var R = e.getItemVisual(P, "style"), k = R && R.fill, O = R && R.opacity, B = m(P, Wa).getItemStyle();
    k != null && (B.fill = k), O != null && (B.opacity = O);
    var F = {
      inheritColor: $(k) ? k : "#000"
    }, W = _(P, Wa), Z = Ot(W, null, F, !1, !0);
    Z.text = W.getShallow("show") ? ut(r.getFormattedLabel(P, Wa), co(e, P)) : null;
    var J = mf(W, F, !1);
    return D(E, B), B = Cx(B, Z, J), E && T(B, E), B.legacy = !0, B;
  }
  function b(E, P) {
    ({}).NODE_ENV !== "production" && Mx("api.styleEmphasis", "Please write literal style directly instead."), P == null && (P = u);
    var R = m(P, va).getItemStyle(), k = _(P, va), O = Ot(k, null, null, !0, !0);
    O.text = k.getShallow("show") ? xr(r.getFormattedLabel(P, va), r.getFormattedLabel(P, Wa), co(e, P)) : null;
    var B = mf(k, null, !0);
    return D(E, R), R = Cx(R, O, B), E && T(R, E), R.legacy = !0, R;
  }
  function T(E, P) {
    for (var R in P)
      U(P, R) && (E[R] = P[R]);
  }
  function D(E, P) {
    E && (E.textFill && (P.textFill = E.textFill), E.textPosition && (P.textPosition = E.textPosition));
  }
  function A(E, P) {
    if (P == null && (P = u), U(bx, E)) {
      var R = e.getItemVisual(P, "style");
      return R ? R[bx[E]] : null;
    }
    if (U(bU, E))
      return e.getItemVisual(P, E);
  }
  function M(E) {
    if (i.type === "cartesian2d") {
      var P = i.getBaseAxis();
      return eB(tt({
        axis: P
      }, E));
    }
  }
  function I() {
    return t.getCurrentSeriesIndices();
  }
  function L(E) {
    return SD(E, t);
  }
}
function QU(r) {
  var e = {};
  return C(r.dimensions, function(t) {
    var a = r.getDimensionInfo(t);
    if (!a.isExtraCoord) {
      var n = a.coordDim, i = e[n] = e[n] || [];
      i[a.coordDimIndex] = r.getDimensionIndex(t);
    }
  }), e;
}
function Kc(r, e, t, a, n, i, o) {
  if (!a) {
    i.remove(e);
    return;
  }
  var s = Xy(r, e, t, a, n, i);
  return s && o.setItemGraphicEl(t, s), s && Wt(s, a.focus, a.blurScope, a.emphasisDisabled), s;
}
function Xy(r, e, t, a, n, i) {
  ({}).NODE_ENV !== "production" && Q(a, "should not have an null/undefined element setting");
  var o = -1, s = e;
  e && GI(e, a, n) && (o = ct(i.childrenRef(), e), e = null);
  var l = !e, u = e;
  u ? u.clearStates() : (u = Yy(a), s && ZU(s, u)), a.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), Ke.normal.cfg = Ke.normal.conOpt = Ke.emphasis.cfg = Ke.emphasis.conOpt = Ke.blur.cfg = Ke.blur.conOpt = Ke.select.cfg = Ke.select.conOpt = null, Ke.isLegacy = !1, t6(u, t, a, n, l, Ke), JU(u, t, a, n, l), Zy(r, u, t, a, Ke, n, l), U(a, "info") && (ha(u).info = a.info);
  for (var f = 0; f < an.length; f++) {
    var h = an[f];
    if (h !== Wa) {
      var v = Xf(a, h), c = qy(a, v, h);
      zI(h, u, v, c, Ke);
    }
  }
  return KU(u, a, n), a.type === "group" && e6(r, u, t, a, n), o >= 0 ? i.replaceAt(u, o) : i.add(u), u;
}
function GI(r, e, t) {
  var a = ha(r), n = e.type, i = 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.
    t.isUniversalTransitionEnabled() || n != null && n !== a.customGraphicType || n === "path" && i6(i) && FI(i) !== a.customPathData || n === "image" && U(o, "image") && o.image !== a.customImagePath
  );
}
function JU(r, e, t, a, n) {
  var i = t.clipPath;
  if (i === !1)
    r && r.getClipPath() && r.removeClipPath();
  else if (i) {
    var o = r.getClipPath();
    o && GI(o, i, a) && (o = null), o || (o = Yy(i), {}.NODE_ENV !== "production" && Q(Zf(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), r.setClipPath(o)), Zy(null, o, e, i, null, a, n);
  }
}
function t6(r, e, t, a, n, i) {
  if (!r.isGroup) {
    Ox(t, null, i), Ox(t, va, i);
    var o = i.normal.conOpt, s = i.emphasis.conOpt, l = i.blur.conOpt, u = i.select.conOpt;
    if (o != null || s != null || u != null || l != null) {
      var f = r.getTextContent();
      if (o === !1)
        f && r.removeTextContent();
      else {
        o = i.normal.conOpt = o || {
          type: "text"
        }, f ? f.clearStates() : (f = Yy(o), r.setTextContent(f)), Zy(null, f, e, o, null, a, n);
        for (var h = o && o.style, v = 0; v < an.length; v++) {
          var c = an[v];
          if (c !== Wa) {
            var p = i[c].conOpt;
            zI(c, f, p, qy(o, p, c), null);
          }
        }
        h ? f.dirty() : f.markRedraw();
      }
    }
  }
}
function Ox(r, e, t) {
  var a = e ? Xf(r, e) : r, n = e ? qy(r, a, va) : r.style, i = r.type, o = a ? a.textConfig : null, s = r.textContent, l = s ? e ? Xf(s, e) : s : null;
  if (n && // Because emphasis style has little info to detect legacy,
  // if normal is legacy, emphasis is trade as legacy.
  (t.isLegacy || PI(n, i, !!o, !!l))) {
    t.isLegacy = !0;
    var u = RI(n, i, !e);
    !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  }
  if (!e && l) {
    var f = l;
    !f.type && (f.type = "text"), {}.NODE_ENV !== "production" && Q(f.type === "text", 'textContent.type must be "text"');
  }
  var h = e ? t[e] : t.normal;
  h.cfg = o, h.conOpt = l;
}
function Xf(r, e) {
  return e ? r ? r[e] : null : r;
}
function qy(r, e, t) {
  var a = e && e.style;
  return a == null && t === va && r && (a = r.styleEmphasis), a;
}
function e6(r, e, t, a, n) {
  var i = a.children, o = i ? i.length : 0, s = a.$mergeChildren, l = s === "byName" || a.diffChildrenByName, u = s === !1;
  if (!(!o && !l && !u)) {
    if (l) {
      a6({
        api: r,
        oldChildren: e.children() || [],
        newChildren: i || [],
        dataIndex: t,
        seriesModel: n,
        group: e
      });
      return;
    }
    u && e.removeAll();
    for (var f = 0; f < o; f++) {
      var h = i[f], v = e.childAt(f);
      h ? (h.ignore == null && (h.ignore = !1), Xy(r, v, t, h, n, e)) : ({}.NODE_ENV !== "production" && Q(v, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), v.ignore = !0);
    }
    for (var c = e.childCount() - 1; c >= f; c--) {
      var p = e.childAt(c);
      r6(e, p, n);
    }
  }
}
function r6(r, e, t) {
  e && $h(e, ha(r).option, t);
}
function a6(r) {
  new ya(r.oldChildren, r.newChildren, kx, kx, r).add(Vx).update(Vx).remove(n6).execute();
}
function kx(r, e) {
  var t = r && r.name;
  return t ?? YU + e;
}
function Vx(r, e) {
  var t = this.context, a = r != null ? t.newChildren[r] : null, n = e != null ? t.oldChildren[e] : null;
  Xy(t.api, n, t.dataIndex, a, t.seriesModel, t.group);
}
function n6(r) {
  var e = this.context, t = e.oldChildren[r];
  t && $h(t, ha(t).option, e.seriesModel);
}
function FI(r) {
  return r && (r.pathData || r.d);
}
function i6(r) {
  return r && (U(r, "pathData") || U(r, "d"));
}
function o6(r) {
  r.registerChartView(qU), r.registerSeriesModel(DU);
}
var Hn = Tt(), Bx = rt, jc = Y, s6 = (
  /** @class */
  function() {
    function r() {
      this._dragging = !1, this.animationThreshold = 15;
    }
    return r.prototype.render = function(e, t, a, n) {
      var i = t.get("value"), o = t.get("status");
      if (this._axisModel = e, this._axisPointerModel = t, this._api = a, !(!n && this._lastValue === i && this._lastStatus === o)) {
        this._lastValue = i, 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, i, e, t, a);
        var f = u.graphicKey;
        f !== this._lastGraphicKey && this.clear(a), this._lastGraphicKey = f;
        var h = this._moveAnimation = this.determineAnimation(e, t);
        if (!s)
          s = this._group = new nt(), this.createPointerEl(s, u, e, t), this.createLabelEl(s, u, e, t), a.getZr().add(s);
        else {
          var v = ot(zx, t, h);
          this.updatePointerEl(s, u, v), this.updateLabelEl(s, u, v, t);
        }
        Fx(s, t, !0), this._renderHandle(i);
      }
    }, r.prototype.remove = function(e) {
      this.clear(e);
    }, r.prototype.dispose = function(e) {
      this.clear(e);
    }, r.prototype.determineAnimation = function(e, t) {
      var a = t.get("animation"), n = e.axis, i = n.type === "category", o = t.get("snap");
      if (!o && !i)
        return !1;
      if (a === "auto" || a == null) {
        var s = this.animationThreshold;
        if (i && n.getBandWidth() > s)
          return !0;
        if (o) {
          var l = _y(e).seriesDataCount, u = n.getExtent();
          return Math.abs(u[0] - u[1]) / l > s;
        }
        return !1;
      }
      return a === !0;
    }, r.prototype.makeElOption = function(e, t, a, n, i) {
    }, r.prototype.createPointerEl = function(e, t, a, n) {
      var i = t.pointer;
      if (i) {
        var o = Hn(e).pointerEl = new ml[i.type](Bx(t.pointer));
        e.add(o);
      }
    }, r.prototype.createLabelEl = function(e, t, a, n) {
      if (t.label) {
        var i = Hn(e).labelEl = new Dt(Bx(t.label));
        e.add(i), Gx(i, n);
      }
    }, r.prototype.updatePointerEl = function(e, t, a) {
      var n = Hn(e).pointerEl;
      n && t.pointer && (n.setStyle(t.pointer.style), a(n, {
        shape: t.pointer.shape
      }));
    }, r.prototype.updateLabelEl = function(e, t, a, n) {
      var i = Hn(e).labelEl;
      i && (i.setStyle(t.label.style), a(i, {
        // 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: t.label.x,
        y: t.label.y
      }), Gx(i, n));
    }, r.prototype._renderHandle = function(e) {
      if (!(this._dragging || !this.updateHandleTransform)) {
        var t = this._axisPointerModel, a = this._api.getZr(), n = this._handle, i = t.getModel("handle"), o = t.get("status");
        if (!i.get("show") || !o || o === "hide") {
          n && a.remove(n), this._handle = null;
          return;
        }
        var s;
        this._handle || (s = !0, n = this._handle = yl(i.get("icon"), {
          cursor: "move",
          draggable: !0,
          onmousemove: function(u) {
            ca(u.event);
          },
          onmousedown: jc(this._onHandleDragMove, this, 0, 0),
          drift: jc(this._onHandleDragMove, this),
          ondragend: jc(this._onHandleDragEnd, this)
        }), a.add(n)), Fx(n, t, !1), n.setStyle(i.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
        var l = i.get("size");
        z(l) || (l = [l, l]), n.scaleX = l[0] / 2, n.scaleY = l[1] / 2, No(this, "_doDispatchAxisPointer", i.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
      }
    }, r.prototype._moveHandleToValue = function(e, t) {
      zx(this._axisPointerModel, !t && this._moveAnimation, this._handle, Qc(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
    }, r.prototype._onHandleDragMove = function(e, t) {
      var a = this._handle;
      if (a) {
        this._dragging = !0;
        var n = this.updateHandleTransform(Qc(a), [e, t], this._axisModel, this._axisPointerModel);
        this._payloadInfo = n, a.stopAnimation(), a.attr(Qc(n)), Hn(a).lastProp = null, this._doDispatchAxisPointer();
      }
    }, r.prototype._doDispatchAxisPointer = function() {
      var e = this._handle;
      if (e) {
        var t = this._payloadInfo, a = this._axisModel;
        this._api.dispatchAction({
          type: "updateAxisPointer",
          x: t.cursorPoint[0],
          y: t.cursorPoint[1],
          tooltipOption: t.tooltipOption,
          axesInfo: [{
            axisDim: a.axis.dim,
            axisIndex: a.componentIndex
          }]
        });
      }
    }, r.prototype._onHandleDragEnd = function() {
      this._dragging = !1;
      var e = this._handle;
      if (e) {
        var t = this._axisPointerModel.get("value");
        this._moveHandleToValue(t), this._api.dispatchAction({
          type: "hideTip"
        });
      }
    }, r.prototype.clear = function(e) {
      this._lastValue = null, this._lastStatus = null;
      var t = e.getZr(), a = this._group, n = this._handle;
      t && a && (this._lastGraphicKey = null, a && t.remove(a), n && t.remove(n), this._group = null, this._handle = null, this._payloadInfo = null), Ks(this, "_doDispatchAxisPointer");
    }, r.prototype.doClear = function() {
    }, r.prototype.buildLabel = function(e, t, a) {
      return a = a || 0, {
        x: e[a],
        y: e[1 - a],
        width: t[a],
        height: t[1 - a]
      };
    }, r;
  }()
);
function zx(r, e, t, a) {
  HI(Hn(t).lastProp, a) || (Hn(t).lastProp = a, e ? Mt(t, a, r) : (t.stopAnimation(), t.attr(a)));
}
function HI(r, e) {
  if (j(r) && j(e)) {
    var t = !0;
    return C(e, function(a, n) {
      t = t && HI(r[n], a);
    }), !!t;
  } else
    return r === e;
}
function Gx(r, e) {
  r[e.get(["label", "show"]) ? "show" : "hide"]();
}
function Qc(r) {
  return {
    x: r.x || 0,
    y: r.y || 0,
    rotation: r.rotation || 0
  };
}
function Fx(r, e, t) {
  var a = e.get("z"), n = e.get("zlevel");
  r && r.traverse(function(i) {
    i.type !== "group" && (a != null && (i.z = a), n != null && (i.zlevel = n), i.silent = t);
  });
}
const Ky = s6;
function jy(r) {
  var e = r.get("type"), t = r.getModel(e + "Style"), a;
  return e === "line" ? (a = t.getLineStyle(), a.fill = null) : e === "shadow" && (a = t.getAreaStyle(), a.stroke = null), a;
}
function WI(r, e, t, a, n) {
  var i = t.get("value"), o = $I(i, e.axis, e.ecModel, t.get("seriesDataIndices"), {
    precision: t.get(["label", "precision"]),
    formatter: t.get(["label", "formatter"])
  }), s = t.getModel("label"), l = Mo(s.get("padding") || 0), u = s.getFont(), f = vl(o, u), h = n.position, v = f.width + l[1] + l[3], c = f.height + l[0] + l[2], p = n.align;
  p === "right" && (h[0] -= v), p === "center" && (h[0] -= v / 2);
  var d = n.verticalAlign;
  d === "bottom" && (h[1] -= c), d === "middle" && (h[1] -= c / 2), l6(h, v, c, a);
  var g = s.get("backgroundColor");
  (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), r.label = {
    // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
    x: h[0],
    y: h[1],
    style: Ot(s, {
      text: o,
      font: u,
      fill: s.getTextColor(),
      padding: l,
      backgroundColor: g
    }),
    // Label should be over axisPointer.
    z2: 10
  };
}
function l6(r, e, t, a) {
  var n = a.getWidth(), i = a.getHeight();
  r[0] = Math.min(r[0] + e, n) - e, r[1] = Math.min(r[1] + t, i) - t, r[0] = Math.max(r[0], 0), r[1] = Math.max(r[1], 0);
}
function $I(r, e, t, a, n) {
  r = e.scale.parse(r);
  var i = e.scale.getLabel({
    value: r
  }, {
    // If `precision` is set, width can be fixed (like '12.00500'), which
    // helps to debounce when when moving label.
    precision: n.precision
  }), o = n.formatter;
  if (o) {
    var s = {
      value: fy(e, {
        value: r
      }),
      axisDimension: e.dim,
      axisIndex: e.index,
      seriesData: []
    };
    C(a, function(l) {
      var u = t.getSeriesByIndex(l.seriesIndex), f = l.dataIndexInside, h = u && u.getDataParams(f);
      h && s.seriesData.push(h);
    }), $(o) ? i = o.replace("{value}", i) : q(o) && (i = o(s));
  }
  return i;
}
function Qy(r, e, t) {
  var a = lr();
  return yi(a, a, t.rotation), Ur(a, a, t.position), br([r.dataToCoord(e), (t.labelOffset || 0) + (t.labelDirection || 1) * (t.labelMargin || 0)], a);
}
function UI(r, e, t, a, n, i) {
  var o = ma.innerTextLayout(t.rotation, 0, t.labelDirection);
  t.labelMargin = n.get(["label", "margin"]), WI(e, a, n, i, {
    position: Qy(a.axis, r, t),
    align: o.textAlign,
    verticalAlign: o.textVerticalAlign
  });
}
function Jy(r, e, t) {
  return t = t || 0, {
    x1: r[t],
    y1: r[1 - t],
    x2: e[t],
    y2: e[1 - t]
  };
}
function YI(r, e, t) {
  return t = t || 0, {
    x: r[t],
    y: r[1 - t],
    width: e[t],
    height: e[1 - t]
  };
}
function Hx(r, e, t, a, n, i) {
  return {
    cx: r,
    cy: e,
    r0: t,
    r: a,
    startAngle: n,
    endAngle: i,
    clockwise: !0
  };
}
var u6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(t, a, n, i, o) {
      var s = n.axis, l = s.grid, u = i.get("type"), f = Wx(l, s).getOtherAxis(s).getGlobalExtent(), h = s.toGlobalCoord(s.dataToCoord(a, !0));
      if (u && u !== "none") {
        var v = jy(i), c = f6[u](s, h, f);
        c.style = v, t.graphicKey = c.type, t.pointer = c;
      }
      var p = Dd(l.model, n);
      UI(
        // @ts-ignore
        a,
        t,
        p,
        n,
        i,
        o
      );
    }, e.prototype.getHandleTransform = function(t, a, n) {
      var i = Dd(a.axis.grid.model, a, {
        labelInside: !1
      });
      i.labelMargin = n.get(["handle", "margin"]);
      var o = Qy(a.axis, t, i);
      return {
        x: o[0],
        y: o[1],
        rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(t, a, n, i) {
      var o = n.axis, s = o.grid, l = o.getGlobalExtent(!0), u = Wx(s, o).getOtherAxis(o).getGlobalExtent(), f = o.dim === "x" ? 0 : 1, h = [t.x, t.y];
      h[f] += a[f], h[f] = Math.min(l[1], h[f]), h[f] = Math.max(l[0], h[f]);
      var v = (u[1] + u[0]) / 2, c = [v, v];
      c[f] = h[f];
      var p = [{
        verticalAlign: "middle"
      }, {
        align: "center"
      }];
      return {
        x: h[0],
        y: h[1],
        rotation: t.rotation,
        cursorPoint: c,
        tooltipOption: p[f]
      };
    }, e;
  }(Ky)
);
function Wx(r, e) {
  var t = {};
  return t[e.dim + "AxisIndex"] = e.index, r.getCartesian(t);
}
var f6 = {
  line: function(r, e, t) {
    var a = Jy([e, t[0]], [e, t[1]], $x(r));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: a
    };
  },
  shadow: function(r, e, t) {
    var a = Math.max(1, r.getBandWidth()), n = t[1] - t[0];
    return {
      type: "Rect",
      shape: YI([e - a / 2, t[0]], [a, n], $x(r))
    };
  }
};
function $x(r) {
  return r.dim === "x" ? 0 : 1;
}
const h6 = u6;
var v6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    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,
      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;
  }(St)
);
const c6 = v6;
var oa = Tt(), p6 = C;
function ZI(r, e, t) {
  if (!wt.node) {
    var a = e.getZr();
    oa(a).records || (oa(a).records = {}), d6(a, e);
    var n = oa(a).records[r] || (oa(a).records[r] = {});
    n.handler = t;
  }
}
function d6(r, e) {
  if (oa(r).initialized)
    return;
  oa(r).initialized = !0, t("click", ot(Ux, "click")), t("mousemove", ot(Ux, "mousemove")), t("globalout", y6);
  function t(a, n) {
    r.on(a, function(i) {
      var o = m6(e);
      p6(oa(r).records, function(s) {
        s && n(s, i, o.dispatchAction);
      }), g6(o.pendings, e);
    });
  }
}
function g6(r, e) {
  var t = r.showTip.length, a = r.hideTip.length, n;
  t ? n = r.showTip[t - 1] : a && (n = r.hideTip[a - 1]), n && (n.dispatchAction = null, e.dispatchAction(n));
}
function y6(r, e, t) {
  r.handler("leave", null, t);
}
function Ux(r, e, t, a) {
  e.handler(r, t, a);
}
function m6(r) {
  var e = {
    showTip: [],
    hideTip: []
  }, t = function(a) {
    var n = e[a.type];
    n ? n.push(a) : (a.dispatchAction = t, r.dispatchAction(a));
  };
  return {
    dispatchAction: t,
    pendings: e
  };
}
function Wd(r, e) {
  if (!wt.node) {
    var t = e.getZr(), a = (oa(t).records || {})[r];
    a && (oa(t).records[r] = null);
  }
}
var _6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = a.getComponent("tooltip"), o = t.get("triggerOn") || i && i.get("triggerOn") || "mousemove|click";
      ZI("axisPointer", n, 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(t, a) {
      Wd("axisPointer", a);
    }, e.prototype.dispose = function(t, a) {
      Wd("axisPointer", a);
    }, e.type = "axisPointer", e;
  }($t)
);
const S6 = _6;
function XI(r, e) {
  var t = [], a = r.seriesIndex, n;
  if (a == null || !(n = e.getSeriesByIndex(a)))
    return {
      point: []
    };
  var i = n.getData(), o = fi(i, r);
  if (o == null || o < 0 || z(o))
    return {
      point: []
    };
  var s = i.getItemGraphicEl(o), l = n.coordinateSystem;
  if (n.getTooltipPosition)
    t = n.getTooltipPosition(o) || [];
  else if (l && l.dataToPoint)
    if (r.isStacked) {
      var u = l.getBaseAxis(), f = l.getOtherAxis(u), h = f.dim, v = u.dim, c = h === "x" || h === "radius" ? 1 : 0, p = i.mapDimension(v), d = [];
      d[c] = i.get(p, o), d[1 - c] = i.get(i.getCalculationInfo("stackResultDimension"), o), t = l.dataToPoint(d) || [];
    } else
      t = l.dataToPoint(i.getValues(G(l.dimensions, function(y) {
        return i.mapDimension(y);
      }), o)) || [];
  else if (s) {
    var g = s.getBoundingRect().clone();
    g.applyTransform(s.transform), t = [g.x + g.width / 2, g.y + g.height / 2];
  }
  return {
    point: t,
    el: s
  };
}
var Yx = Tt();
function x6(r, e, t) {
  var a = r.currTrigger, n = [r.x, r.y], i = r, o = r.dispatchAction || Y(t.dispatchAction, t), s = e.getComponent("axisPointer").coordSysAxesInfo;
  if (s) {
    Qu(n) && (n = XI({
      seriesIndex: i.seriesIndex,
      // Do not use dataIndexInside from other ec instance.
      // FIXME: auto detect it?
      dataIndex: i.dataIndex
    }, e).point);
    var l = Qu(n), u = i.axesInfo, f = s.axesInfo, h = a === "leave" || Qu(n), v = {}, c = {}, p = {
      list: [],
      map: {}
    }, d = {
      showPointer: ot(b6, c),
      showTooltip: ot(T6, p)
    };
    C(s.coordSysMap, function(y, m) {
      var _ = l || y.containPoint(n);
      C(s.coordSysAxesInfo[m], function(S, w) {
        var x = S.axis, b = M6(u, S);
        if (!h && _ && (!u || b)) {
          var T = b && b.value;
          T == null && !l && (T = x.pointToData(n)), T != null && Zx(S, T, d, !1, v);
        }
      });
    });
    var g = {};
    return C(f, function(y, m) {
      var _ = y.linkGroup;
      _ && !c[m] && C(_.axesInfo, function(S, w) {
        var x = c[w];
        if (S !== y && x) {
          var b = x.value;
          _.mapper && (b = y.axis.scale.parse(_.mapper(b, Xx(S), Xx(y)))), g[y.key] = b;
        }
      });
    }), C(g, function(y, m) {
      Zx(f[m], y, d, !0, v);
    }), D6(c, f, v), C6(p, n, r, o), A6(f, o, t), v;
  }
}
function Zx(r, e, t, a, n) {
  var i = r.axis;
  if (!(i.scale.isBlank() || !i.containData(e))) {
    if (!r.involveSeries) {
      t.showPointer(r, e);
      return;
    }
    var o = w6(e, r), s = o.payloadBatch, l = o.snapToValue;
    s[0] && n.seriesIndex == null && V(n, s[0]), !a && r.snap && i.containData(l) && l != null && (e = l), t.showPointer(r, e, s), t.showTooltip(r, o, l);
  }
}
function w6(r, e) {
  var t = e.axis, a = t.dim, n = r, i = [], o = Number.MAX_VALUE, s = -1;
  return C(e.seriesModels, function(l, u) {
    var f = l.getData().mapDimensionsAll(a), h, v;
    if (l.getAxisTooltipData) {
      var c = l.getAxisTooltipData(f, r, t);
      v = c.dataIndices, h = c.nestestValue;
    } else {
      if (v = l.getData().indicesOfNearest(
        f[0],
        r,
        // Add a threshold to avoid find the wrong dataIndex
        // when data length is not same.
        // false,
        t.type === "category" ? 0.5 : null
      ), !v.length)
        return;
      h = l.getData().get(f[0], v[0]);
    }
    if (!(h == null || !isFinite(h))) {
      var p = r - h, d = Math.abs(p);
      d <= o && ((d < o || p >= 0 && s < 0) && (o = d, s = p, n = h, i.length = 0), C(v, function(g) {
        i.push({
          seriesIndex: l.seriesIndex,
          dataIndexInside: g,
          dataIndex: l.getData().getRawIndex(g)
        });
      }));
    }
  }), {
    payloadBatch: i,
    snapToValue: n
  };
}
function b6(r, e, t, a) {
  r[e.key] = {
    value: t,
    payloadBatch: a
  };
}
function T6(r, e, t, a) {
  var n = t.payloadBatch, i = e.axis, o = i.model, s = e.axisPointerModel;
  if (!(!e.triggerTooltip || !n.length)) {
    var l = e.coordSys.model, u = rl(l), f = r.map[u];
    f || (f = r.map[u] = {
      coordSysId: l.id,
      coordSysIndex: l.componentIndex,
      coordSysType: l.type,
      coordSysMainType: l.mainType,
      dataByAxis: []
    }, r.list.push(f)), f.dataByAxis.push({
      axisDim: i.dim,
      axisIndex: o.componentIndex,
      axisType: o.type,
      axisId: o.id,
      value: a,
      // 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: n.slice()
    });
  }
}
function D6(r, e, t) {
  var a = t.axesInfo = [];
  C(e, function(n, i) {
    var o = n.axisPointerModel.option, s = r[i];
    s ? (!n.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !n.useHandle && (o.status = "hide"), o.status === "show" && a.push({
      axisDim: n.axis.dim,
      axisIndex: n.axis.model.componentIndex,
      value: o.value
    });
  });
}
function C6(r, e, t, a) {
  if (Qu(e) || !r.list.length) {
    a({
      type: "hideTip"
    });
    return;
  }
  var n = ((r.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  a({
    type: "showTip",
    escapeConnect: !0,
    x: e[0],
    y: e[1],
    tooltipOption: t.tooltipOption,
    position: t.position,
    dataIndexInside: n.dataIndexInside,
    dataIndex: n.dataIndex,
    seriesIndex: n.seriesIndex,
    dataByCoordSys: r.list
  });
}
function A6(r, e, t) {
  var a = t.getZr(), n = "axisPointerLastHighlights", i = Yx(a)[n] || {}, o = Yx(a)[n] = {};
  C(r, function(u, f) {
    var h = u.axisPointerModel.option;
    h.status === "show" && C(h.seriesDataIndices, function(v) {
      var c = v.seriesIndex + " | " + v.dataIndex;
      o[c] = v;
    });
  });
  var s = [], l = [];
  C(i, function(u, f) {
    !o[f] && l.push(u);
  }), C(o, function(u, f) {
    !i[f] && s.push(u);
  }), l.length && t.dispatchAction({
    type: "downplay",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: l
  }), s.length && t.dispatchAction({
    type: "highlight",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: s
  });
}
function M6(r, e) {
  for (var t = 0; t < (r || []).length; t++) {
    var a = r[t];
    if (e.axis.dim === a.axisDim && e.axis.model.componentIndex === a.axisIndex)
      return a;
  }
}
function Xx(r) {
  var e = r.axis.model, t = {}, a = t.axisDim = r.axis.dim;
  return t.axisIndex = t[a + "AxisIndex"] = e.componentIndex, t.axisName = t[a + "AxisName"] = e.name, t.axisId = t[a + "AxisId"] = e.id, t;
}
function Qu(r) {
  return !r || r[0] == null || isNaN(r[0]) || r[1] == null || isNaN(r[1]);
}
function El(r) {
  xi.registerAxisPointerClass("CartesianAxisPointer", h6), r.registerComponentModel(c6), r.registerComponentView(S6), r.registerPreprocessor(function(e) {
    if (e) {
      (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
      var t = e.axisPointer.link;
      t && !z(t) && (e.axisPointer.link = [t]);
    }
  }), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, function(e, t) {
    e.getComponent("axisPointer").coordSysAxesInfo = gG(e, t);
  }), r.registerAction({
    type: "updateAxisPointer",
    event: "updateAxisPointer",
    update: ":updateAxisPointer"
  }, x6);
}
function I6(r) {
  pt(_M), pt(El);
}
var L6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(t, a, n, i, o) {
      var s = n.axis;
      s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
      var l = s.polar, u = l.getOtherAxis(s), f = u.getExtent(), h = s.dataToCoord(a), v = i.get("type");
      if (v && v !== "none") {
        var c = jy(i), p = P6[v](s, l, h, f);
        p.style = c, t.graphicKey = p.type, t.pointer = p;
      }
      var d = i.get(["label", "margin"]), g = E6(a, n, i, l, d);
      WI(t, n, i, o, g);
    }, e;
  }(Ky)
);
function E6(r, e, t, a, n) {
  var i = e.axis, o = i.dataToCoord(r), s = a.getAngleAxis().getExtent()[0];
  s = s / 180 * Math.PI;
  var l = a.getRadiusAxis().getExtent(), u, f, h;
  if (i.dim === "radius") {
    var v = lr();
    yi(v, v, s), Ur(v, v, [a.cx, a.cy]), u = br([o, -n], v);
    var c = e.getModel("axisLabel").get("rotate") || 0, p = ma.innerTextLayout(s, c * Math.PI / 180, -1);
    f = p.textAlign, h = p.textVerticalAlign;
  } else {
    var d = l[1];
    u = a.coordToPoint([d + n, o]);
    var g = a.cx, y = a.cy;
    f = Math.abs(u[0] - g) / d < 0.3 ? "center" : u[0] > g ? "left" : "right", h = Math.abs(u[1] - y) / d < 0.3 ? "middle" : u[1] > y ? "top" : "bottom";
  }
  return {
    position: u,
    align: f,
    verticalAlign: h
  };
}
var P6 = {
  line: function(r, e, t, a) {
    return r.dim === "angle" ? {
      type: "Line",
      shape: Jy(e.coordToPoint([a[0], t]), e.coordToPoint([a[1], t]))
    } : {
      type: "Circle",
      shape: {
        cx: e.cx,
        cy: e.cy,
        r: t
      }
    };
  },
  shadow: function(r, e, t, a) {
    var n = Math.max(1, r.getBandWidth()), i = Math.PI / 180;
    return r.dim === "angle" ? {
      type: "Sector",
      shape: Hx(
        e.cx,
        e.cy,
        a[0],
        a[1],
        // In ECharts y is negative if angle is positive
        (-t - n / 2) * i,
        (-t + n / 2) * i
      )
    } : {
      type: "Sector",
      shape: Hx(e.cx, e.cy, t - n / 2, t + n / 2, 0, Math.PI * 2)
    };
  }
};
const R6 = L6;
var N6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.findAxisModel = function(t) {
      var a, n = this.ecModel;
      return n.eachComponent(t, function(i) {
        i.getCoordSysModel() === this && (a = i);
      }, this), a;
    }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
      // zlevel: 0,
      z: 0,
      center: ["50%", "50%"],
      radius: "80%"
    }, e;
  }(St)
);
const O6 = N6;
var tm = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("polar", Qt).models[0];
    }, e.type = "polarAxis", e;
  }(St)
);
te(tm, bl);
var k6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "angleAxis", e;
  }(tm)
), V6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "radiusAxis", e;
  }(tm)
), em = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a) {
      return r.call(this, "radius", t, a) || this;
    }
    return e.prototype.pointToData = function(t, a) {
      return this.polar.pointToData(t, a)[this.dim === "radius" ? 0 : 1];
    }, e;
  }(Mr)
);
em.prototype.dataToRadius = Mr.prototype.dataToCoord;
em.prototype.radiusToData = Mr.prototype.coordToData;
const B6 = em;
var z6 = Tt(), rm = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a) {
      return r.call(this, "angle", t, a || [0, 360]) || this;
    }
    return e.prototype.pointToData = function(t, a) {
      return this.polar.pointToData(t, a)[this.dim === "radius" ? 0 : 1];
    }, e.prototype.calculateCategoryInterval = function() {
      var t = this, a = t.getLabelModel(), n = t.scale, i = n.getExtent(), o = n.count();
      if (i[1] - i[0] < 1)
        return 0;
      var s = i[0], l = t.dataToCoord(s + 1) - t.dataToCoord(s), u = Math.abs(l), f = vl(s == null ? "" : s + "", a.getFont(), "center", "top"), h = Math.max(f.height, 7), v = h / u;
      isNaN(v) && (v = 1 / 0);
      var c = Math.max(0, Math.floor(v)), p = z6(t.model), d = p.lastAutoInterval, g = p.lastTickCount;
      return d != null && g != null && Math.abs(d - c) <= 1 && Math.abs(g - o) <= 1 && d > c ? c = d : (p.lastTickCount = o, p.lastAutoInterval = c), c;
    }, e;
  }(Mr)
);
rm.prototype.dataToAngle = Mr.prototype.dataToCoord;
rm.prototype.angleToData = Mr.prototype.coordToData;
const G6 = rm;
var qI = ["radius", "angle"], F6 = (
  /** @class */
  function() {
    function r(e) {
      this.dimensions = qI, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new B6(), this._angleAxis = new G6(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
    }
    return r.prototype.containPoint = function(e) {
      var t = this.pointToCoord(e);
      return this._radiusAxis.contain(t[0]) && this._angleAxis.contain(t[1]);
    }, r.prototype.containData = function(e) {
      return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
    }, r.prototype.getAxis = function(e) {
      var t = "_" + e + "Axis";
      return this[t];
    }, r.prototype.getAxes = function() {
      return [this._radiusAxis, this._angleAxis];
    }, r.prototype.getAxesByScale = function(e) {
      var t = [], a = this._angleAxis, n = this._radiusAxis;
      return a.scale.type === e && t.push(a), n.scale.type === e && t.push(n), t;
    }, r.prototype.getAngleAxis = function() {
      return this._angleAxis;
    }, r.prototype.getRadiusAxis = function() {
      return this._radiusAxis;
    }, r.prototype.getOtherAxis = function(e) {
      var t = this._angleAxis;
      return e === t ? this._radiusAxis : t;
    }, r.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
    }, r.prototype.getTooltipAxes = function(e) {
      var t = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
      return {
        baseAxes: [t],
        otherAxes: [this.getOtherAxis(t)]
      };
    }, r.prototype.dataToPoint = function(e, t) {
      return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], t), this._angleAxis.dataToAngle(e[1], t)]);
    }, r.prototype.pointToData = function(e, t) {
      var a = this.pointToCoord(e);
      return [this._radiusAxis.radiusToData(a[0], t), this._angleAxis.angleToData(a[1], t)];
    }, r.prototype.pointToCoord = function(e) {
      var t = e[0] - this.cx, a = e[1] - this.cy, n = this.getAngleAxis(), i = n.getExtent(), o = Math.min(i[0], i[1]), s = Math.max(i[0], i[1]);
      n.inverse ? o = s - 360 : s = o + 360;
      var l = Math.sqrt(t * t + a * a);
      t /= l, a /= l;
      for (var u = Math.atan2(-a, t) / Math.PI * 180, f = u < o ? 1 : -1; u < o || u > s; )
        u += f * 360;
      return [l, u];
    }, r.prototype.coordToPoint = function(e) {
      var t = e[0], a = e[1] / 180 * Math.PI, n = Math.cos(a) * t + this.cx, i = -Math.sin(a) * t + this.cy;
      return [n, i];
    }, r.prototype.getArea = function() {
      var e = this.getAngleAxis(), t = this.getRadiusAxis(), a = t.getExtent().slice();
      a[0] > a[1] && a.reverse();
      var n = e.getExtent(), i = Math.PI / 180;
      return {
        cx: this.cx,
        cy: this.cy,
        r0: a[0],
        r: a[1],
        startAngle: -n[0] * i,
        endAngle: -n[1] * i,
        clockwise: e.inverse,
        contain: function(o, s) {
          var l = o - this.cx, u = s - this.cy, f = l * l + u * u - 1e-4, h = this.r, v = this.r0;
          return f <= h * h && f >= v * v;
        }
      };
    }, r.prototype.convertToPixel = function(e, t, a) {
      var n = qx(t);
      return n === this ? this.dataToPoint(a) : null;
    }, r.prototype.convertFromPixel = function(e, t, a) {
      var n = qx(t);
      return n === this ? this.pointToData(a) : null;
    }, r;
  }()
);
function qx(r) {
  var e = r.seriesModel, t = r.polarModel;
  return t && t.coordinateSystem || e && e.coordinateSystem;
}
const H6 = F6;
function W6(r, e, t) {
  var a = e.get("center"), n = t.getWidth(), i = t.getHeight();
  r.cx = H(a[0], n), r.cy = H(a[1], i);
  var o = r.getRadiusAxis(), s = Math.min(n, i) / 2, l = e.get("radius");
  l == null ? l = [0, "100%"] : z(l) || (l = [0, l]);
  var u = [H(l[0], s), H(l[1], s)];
  o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
}
function $6(r, e) {
  var t = this, a = t.getAngleAxis(), n = t.getRadiusAxis();
  if (a.scale.setExtent(1 / 0, -1 / 0), n.scale.setExtent(1 / 0, -1 / 0), r.eachSeries(function(s) {
    if (s.coordinateSystem === t) {
      var l = s.getData();
      C(Pf(l, "radius"), function(u) {
        n.scale.unionExtentFromData(l, u);
      }), C(Pf(l, "angle"), function(u) {
        a.scale.unionExtentFromData(l, u);
      });
    }
  }), vo(a.scale, a.model), vo(n.scale, n.model), a.type === "category" && !a.onBand) {
    var i = a.getExtent(), o = 360 / a.scale.count();
    a.inverse ? i[1] += o : i[1] -= o, a.setExtent(i[0], i[1]);
  }
}
function U6(r) {
  return r.mainType === "angleAxis";
}
function Kx(r, e) {
  if (r.type = e.get("type"), r.scale = kh(e), r.onBand = e.get("boundaryGap") && r.type === "category", r.inverse = e.get("inverse"), U6(e)) {
    r.inverse = r.inverse !== e.get("clockwise");
    var t = e.get("startAngle");
    r.setExtent(t, t + (r.inverse ? -360 : 360));
  }
  e.axis = r, r.model = e;
}
var Y6 = {
  dimensions: qI,
  create: function(r, e) {
    var t = [];
    return r.eachComponent("polar", function(a, n) {
      var i = new H6(n + "");
      i.update = $6;
      var o = i.getRadiusAxis(), s = i.getAngleAxis(), l = a.findAxisModel("radiusAxis"), u = a.findAxisModel("angleAxis");
      Kx(o, l), Kx(s, u), W6(i, a, e), t.push(i), a.coordinateSystem = i, i.model = a;
    }), r.eachSeries(function(a) {
      if (a.get("coordinateSystem") === "polar") {
        var n = a.getReferringComponents("polar", Qt).models[0];
        if ({}.NODE_ENV !== "production" && !n)
          throw new Error('Polar "' + jt(a.get("polarIndex"), a.get("polarId"), 0) + '" not found');
        a.coordinateSystem = n.coordinateSystem;
      }
    }), t;
  }
};
const Z6 = Y6;
var X6 = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
function Cu(r, e, t) {
  e[1] > e[0] && (e = e.slice().reverse());
  var a = r.coordToPoint([e[0], t]), n = r.coordToPoint([e[1], t]);
  return {
    x1: a[0],
    y1: a[1],
    x2: n[0],
    y2: n[1]
  };
}
function Au(r) {
  var e = r.getRadiusAxis();
  return e.inverse ? 0 : 1;
}
function jx(r) {
  var e = r[0], t = r[r.length - 1];
  e && t && Math.abs(Math.abs(e.coord - t.coord) - 360) < 1e-4 && r.pop();
}
var q6 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t;
    }
    return e.prototype.render = function(t, a) {
      if (this.group.removeAll(), !!t.get("show")) {
        var n = t.axis, i = n.polar, o = i.getRadiusAxis().getExtent(), s = n.getTicksCoords(), l = n.getMinorTicksCoords(), u = G(n.getViewLabels(), function(f) {
          f = rt(f);
          var h = n.scale, v = h.type === "ordinal" ? h.getRawOrdinalNumber(f.tickValue) : f.tickValue;
          return f.coord = n.dataToCoord(v), f;
        });
        jx(u), jx(s), C(X6, function(f) {
          t.get([f, "show"]) && (!n.scale.isBlank() || f === "axisLine") && K6[f](this.group, t, i, s, l, o, u);
        }, this);
      }
    }, e.type = "angleAxis", e;
  }(xi)
), K6 = {
  axisLine: function(r, e, t, a, n, i) {
    var o = e.getModel(["axisLine", "lineStyle"]), s = Au(t), l = s ? 0 : 1, u;
    i[l] === 0 ? u = new qr({
      shape: {
        cx: t.cx,
        cy: t.cy,
        r: i[s]
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }) : u = new mh({
      shape: {
        cx: t.cx,
        cy: t.cy,
        r: i[s],
        r0: i[l]
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }), u.style.fill = null, r.add(u);
  },
  axisTick: function(r, e, t, a, n, i) {
    var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = i[Au(t)], u = G(a, function(f) {
      return new le({
        shape: Cu(t, [l, l + s], f.coord)
      });
    });
    r.add(nr(u, {
      style: tt(o.getModel("lineStyle").getLineStyle(), {
        stroke: e.get(["axisLine", "lineStyle", "color"])
      })
    }));
  },
  minorTick: function(r, e, t, a, n, i) {
    if (n.length) {
      for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = i[Au(t)], f = [], h = 0; h < n.length; h++)
        for (var v = 0; v < n[h].length; v++)
          f.push(new le({
            shape: Cu(t, [u, u + l], n[h][v].coord)
          }));
      r.add(nr(f, {
        style: tt(s.getModel("lineStyle").getLineStyle(), tt(o.getLineStyle(), {
          stroke: e.get(["axisLine", "lineStyle", "color"])
        }))
      }));
    }
  },
  axisLabel: function(r, e, t, a, n, i, o) {
    var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), f = e.get("triggerEvent");
    C(o, function(h, v) {
      var c = l, p = h.tickValue, d = i[Au(t)], g = t.coordToPoint([d + u, h.coord]), y = t.cx, m = t.cy, _ = Math.abs(g[0] - y) / d < 0.3 ? "center" : g[0] > y ? "left" : "right", S = Math.abs(g[1] - m) / d < 0.3 ? "middle" : g[1] > m ? "top" : "bottom";
      if (s && s[p]) {
        var w = s[p];
        j(w) && w.textStyle && (c = new kt(w.textStyle, l, l.ecModel));
      }
      var x = new Dt({
        silent: ma.isLabelSilent(e),
        style: Ot(c, {
          x: g[0],
          y: g[1],
          fill: c.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          text: h.formattedLabel,
          align: _,
          verticalAlign: S
        })
      });
      if (r.add(x), f) {
        var b = ma.makeAxisEventDataBase(e);
        b.targetType = "axisLabel", b.value = h.rawLabel, it(x).eventData = b;
      }
    }, this);
  },
  splitLine: function(r, e, t, a, n, i) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
    l = l instanceof Array ? l : [l];
    for (var f = [], h = 0; h < a.length; h++) {
      var v = u++ % l.length;
      f[v] = f[v] || [], f[v].push(new le({
        shape: Cu(t, i, a[h].coord)
      }));
    }
    for (var h = 0; h < f.length; h++)
      r.add(nr(f[h], {
        style: tt({
          stroke: l[h % l.length]
        }, s.getLineStyle()),
        silent: !0,
        z: e.get("z")
      }));
  },
  minorSplitLine: function(r, e, t, a, n, i) {
    if (n.length) {
      for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < n.length; u++)
        for (var f = 0; f < n[u].length; f++)
          l.push(new le({
            shape: Cu(t, i, n[u][f].coord)
          }));
      r.add(nr(l, {
        style: s.getLineStyle(),
        silent: !0,
        z: e.get("z")
      }));
    }
  },
  splitArea: function(r, e, t, a, n, i) {
    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 f = [], h = Math.PI / 180, v = -a[0].coord * h, c = Math.min(i[0], i[1]), p = Math.max(i[0], i[1]), d = e.get("clockwise"), g = 1, y = a.length; g <= y; g++) {
        var m = g === y ? a[0].coord : a[g].coord, _ = u++ % l.length;
        f[_] = f[_] || [], f[_].push(new Ve({
          shape: {
            cx: t.cx,
            cy: t.cy,
            r0: c,
            r: p,
            startAngle: v,
            endAngle: -m * h,
            clockwise: d
          },
          silent: !0
        })), v = -m * h;
      }
      for (var g = 0; g < f.length; g++)
        r.add(nr(f[g], {
          style: tt({
            fill: l[g % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
};
const j6 = q6;
var Q6 = ["axisLine", "axisTickLabel", "axisName"], J6 = ["splitLine", "splitArea", "minorSplitLine"], t8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t;
    }
    return e.prototype.render = function(t, a) {
      if (this.group.removeAll(), !!t.get("show")) {
        var n = this._axisGroup, i = this._axisGroup = new nt();
        this.group.add(i);
        var o = t.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), f = o.getMinorTicksCoords(), h = l.getExtent()[0], v = o.getExtent(), c = r8(s, t, h), p = new ma(t, c);
        C(Q6, p.add, p), i.add(p.getGroup()), gl(n, i, t), C(J6, function(d) {
          t.get([d, "show"]) && !o.scale.isBlank() && e8[d](this.group, t, s, h, v, u, f);
        }, this);
      }
    }, e.type = "radiusAxis", e;
  }(xi)
), e8 = {
  splitLine: function(r, e, t, a, n, i) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
    l = l instanceof Array ? l : [l];
    for (var f = [], h = 0; h < i.length; h++) {
      var v = u++ % l.length;
      f[v] = f[v] || [], f[v].push(new qr({
        shape: {
          cx: t.cx,
          cy: t.cy,
          // ensure circle radius >= 0
          r: Math.max(i[h].coord, 0)
        }
      }));
    }
    for (var h = 0; h < f.length; h++)
      r.add(nr(f[h], {
        style: tt({
          stroke: l[h % l.length],
          fill: null
        }, s.getLineStyle()),
        silent: !0
      }));
  },
  minorSplitLine: function(r, e, t, a, n, i, o) {
    if (o.length) {
      for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], f = 0; f < o.length; f++)
        for (var h = 0; h < o[f].length; h++)
          u.push(new qr({
            shape: {
              cx: t.cx,
              cy: t.cy,
              r: o[f][h].coord
            }
          }));
      r.add(nr(u, {
        style: tt({
          fill: null
        }, l.getLineStyle()),
        silent: !0
      }));
    }
  },
  splitArea: function(r, e, t, a, n, i) {
    if (i.length) {
      var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
      l = l instanceof Array ? l : [l];
      for (var f = [], h = i[0].coord, v = 1; v < i.length; v++) {
        var c = u++ % l.length;
        f[c] = f[c] || [], f[c].push(new Ve({
          shape: {
            cx: t.cx,
            cy: t.cy,
            r0: h,
            r: i[v].coord,
            startAngle: 0,
            endAngle: Math.PI * 2
          },
          silent: !0
        })), h = i[v].coord;
      }
      for (var v = 0; v < f.length; v++)
        r.add(nr(f[v], {
          style: tt({
            fill: l[v % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
};
function r8(r, e, t) {
  return {
    position: [r.cx, r.cy],
    rotation: t / 180 * Math.PI,
    labelDirection: -1,
    tickDirection: -1,
    nameDirection: 1,
    labelRotate: e.getModel("axisLabel").get("rotate"),
    // Over splitLine and splitArea
    z2: 1
  };
}
const a8 = t8;
function KI(r) {
  return r.get("stack") || "__ec_stack_" + r.seriesIndex;
}
function jI(r, e) {
  return e.dim + r.model.componentIndex;
}
function n8(r, e, t) {
  var a = {}, n = i8(Et(e.getSeriesByType(r), function(i) {
    return !e.isSeriesFiltered(i) && i.coordinateSystem && i.coordinateSystem.type === "polar";
  }));
  e.eachSeriesByType(r, function(i) {
    if (i.coordinateSystem.type === "polar") {
      var o = i.getData(), s = i.coordinateSystem, l = s.getBaseAxis(), u = jI(s, l), f = KI(i), h = n[u][f], v = h.offset, c = h.width, p = s.getOtherAxis(l), d = i.coordinateSystem.cx, g = i.coordinateSystem.cy, y = i.get("barMinHeight") || 0, m = i.get("barMinAngle") || 0;
      a[f] = a[f] || [];
      for (var _ = o.mapDimension(p.dim), S = o.mapDimension(l.dim), w = tn(
        o,
        _
        /* , baseDim */
      ), x = l.dim !== "radius" || !i.get("roundCap", !0), b = p.dataToCoord(0), T = 0, D = o.count(); T < D; T++) {
        var A = o.get(_, T), M = o.get(S, T), I = A >= 0 ? "p" : "n", L = b;
        w && (a[f][M] || (a[f][M] = {
          p: b,
          n: b
          // Negative stack
        }), L = a[f][M][I]);
        var E = void 0, P = void 0, R = void 0, k = void 0;
        if (p.dim === "radius") {
          var O = p.dataToCoord(A) - b, B = l.dataToCoord(M);
          Math.abs(O) < y && (O = (O < 0 ? -1 : 1) * y), E = L, P = L + O, R = B - v, k = R - c, w && (a[f][M][I] = P);
        } else {
          var F = p.dataToCoord(A, x) - b, W = l.dataToCoord(M);
          Math.abs(F) < m && (F = (F < 0 ? -1 : 1) * m), E = W + v, P = E + c, R = L, k = L + F, w && (a[f][M][I] = k);
        }
        o.setItemLayout(T, {
          cx: d,
          cy: g,
          r0: E,
          r: P,
          // Consider that positive angle is anti-clockwise,
          // while positive radian of sector is clockwise
          startAngle: -R * Math.PI / 180,
          endAngle: -k * 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: R >= k
        });
      }
    }
  });
}
function i8(r) {
  var e = {};
  C(r, function(a, n) {
    var i = a.getData(), o = a.coordinateSystem, s = o.getBaseAxis(), l = jI(o, s), u = s.getExtent(), f = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / i.count(), h = e[l] || {
      bandWidth: f,
      remainedWidth: f,
      autoWidthCount: 0,
      categoryGap: "20%",
      gap: "30%",
      stacks: {}
    }, v = h.stacks;
    e[l] = h;
    var c = KI(a);
    v[c] || h.autoWidthCount++, v[c] = v[c] || {
      width: 0,
      maxWidth: 0
    };
    var p = H(a.get("barWidth"), f), d = H(a.get("barMaxWidth"), f), g = a.get("barGap"), y = a.get("barCategoryGap");
    p && !v[c].width && (p = Math.min(h.remainedWidth, p), v[c].width = p, h.remainedWidth -= p), d && (v[c].maxWidth = d), g != null && (h.gap = g), y != null && (h.categoryGap = y);
  });
  var t = {};
  return C(e, function(a, n) {
    t[n] = {};
    var i = a.stacks, o = a.bandWidth, s = H(a.categoryGap, o), l = H(a.gap, 1), u = a.remainedWidth, f = a.autoWidthCount, h = (u - s) / (f + (f - 1) * l);
    h = Math.max(h, 0), C(i, function(d, g) {
      var y = d.maxWidth;
      y && y < h && (y = Math.min(y, u), d.width && (y = Math.min(y, d.width)), u -= y, d.width = y, f--);
    }), h = (u - s) / (f + (f - 1) * l), h = Math.max(h, 0);
    var v = 0, c;
    C(i, function(d, g) {
      d.width || (d.width = h), c = d, v += d.width * (1 + l);
    }), c && (v -= c.width * l);
    var p = -v / 2;
    C(i, function(d, g) {
      t[n][g] = t[n][g] || {
        offset: p,
        width: d.width
      }, p += d.width * (1 + l);
    });
  }), t;
}
var o8 = {
  startAngle: 90,
  clockwise: !0,
  splitNumber: 12,
  axisLabel: {
    rotate: 0
  }
}, s8 = {
  splitNumber: 5
}, l8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "polar", e;
  }($t)
);
function u8(r) {
  pt(El), xi.registerAxisPointerClass("PolarAxisPointer", R6), r.registerCoordinateSystem("polar", Z6), r.registerComponentModel(O6), r.registerComponentView(l8), po(r, "angle", k6, o8), po(r, "radius", V6, s8), r.registerComponentView(j6), r.registerComponentView(a8), r.registerLayout(ot(n8, "bar"));
}
function $d(r, e) {
  e = e || {};
  var t = r.coordinateSystem, a = r.axis, n = {}, i = a.position, o = a.orient, s = t.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]
    }
  };
  n.position = [o === "vertical" ? u.vertical[i] : l[0], o === "horizontal" ? u.horizontal[i] : l[3]];
  var f = {
    horizontal: 0,
    vertical: 1
  };
  n.rotation = Math.PI / 2 * f[o];
  var h = {
    top: -1,
    bottom: 1,
    right: 1,
    left: -1
  };
  n.labelDirection = n.tickDirection = n.nameDirection = h[i], r.get(["axisTick", "inside"]) && (n.tickDirection = -n.tickDirection), jt(e.labelInside, r.get(["axisLabel", "inside"])) && (n.labelDirection = -n.labelDirection);
  var v = e.rotate;
  return v == null && (v = r.get(["axisLabel", "rotate"])), n.labelRotation = i === "top" ? -v : v, n.z2 = 1, n;
}
var f8 = ["axisLine", "axisTickLabel", "axisName"], h8 = ["splitArea", "splitLine"], v8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.axisPointerClass = "SingleAxisPointer", t;
    }
    return e.prototype.render = function(t, a, n, i) {
      var o = this.group;
      o.removeAll();
      var s = this._axisGroup;
      this._axisGroup = new nt();
      var l = $d(t), u = new ma(t, l);
      C(f8, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), C(h8, function(f) {
        t.get([f, "show"]) && c8[f](this, this.group, this._axisGroup, t);
      }, this), gl(s, this._axisGroup, t), r.prototype.render.call(this, t, a, n, i);
    }, e.prototype.remove = function() {
      gM(this);
    }, e.type = "singleAxis", e;
  }(xi)
), c8 = {
  splitLine: function(r, e, t, a) {
    var n = a.axis;
    if (!n.scale.isBlank()) {
      var i = a.getModel("splitLine"), o = i.getModel("lineStyle"), s = o.get("color");
      s = s instanceof Array ? s : [s];
      for (var l = o.get("width"), u = a.coordinateSystem.getRect(), f = n.isHorizontal(), h = [], v = 0, c = n.getTicksCoords({
        tickModel: i
      }), p = [], d = [], g = 0; g < c.length; ++g) {
        var y = n.toGlobalCoord(c[g].coord);
        f ? (p[0] = y, p[1] = u.y, d[0] = y, d[1] = u.y + u.height) : (p[0] = u.x, p[1] = y, d[0] = u.x + u.width, d[1] = y);
        var m = new le({
          shape: {
            x1: p[0],
            y1: p[1],
            x2: d[0],
            y2: d[1]
          },
          silent: !0
        });
        uo(m.shape, l);
        var _ = v++ % s.length;
        h[_] = h[_] || [], h[_].push(m);
      }
      for (var S = o.getLineStyle(["color"]), g = 0; g < h.length; ++g)
        e.add(nr(h[g], {
          style: tt({
            stroke: s[g % s.length]
          }, S),
          silent: !0
        }));
    }
  },
  splitArea: function(r, e, t, a) {
    dM(r, t, a, a);
  }
};
const p8 = v8;
var QI = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    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;
  }(St)
);
te(QI, bl.prototype);
const Jc = QI;
var d8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i, o) {
      var s = r.call(this, t, a, n) || this;
      return s.type = i || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var t = this.position;
      return t === "top" || t === "bottom";
    }, e.prototype.pointToData = function(t, a) {
      return this.coordinateSystem.pointToData(t)[0];
    }, e;
  }(Mr)
);
const g8 = d8;
var JI = ["single"], y8 = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.type = "single", this.dimension = "single", this.dimensions = JI, this.axisPointerEnabled = !0, this.model = e, this._init(e, t, a);
    }
    return r.prototype._init = function(e, t, a) {
      var n = this.dimension, i = new g8(n, kh(e), [0, 0], e.get("type"), e.get("position")), o = i.type === "category";
      i.onBand = o && e.get("boundaryGap"), i.inverse = e.get("inverse"), i.orient = e.get("orient"), e.axis = i, i.model = e, i.coordinateSystem = this, this._axis = i;
    }, r.prototype.update = function(e, t) {
      e.eachSeries(function(a) {
        if (a.coordinateSystem === this) {
          var n = a.getData();
          C(n.mapDimensionsAll(this.dimension), function(i) {
            this._axis.scale.unionExtentFromData(n, i);
          }, this), vo(this._axis.scale, this._axis.model);
        }
      }, this);
    }, r.prototype.resize = function(e, t) {
      this._rect = re({
        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: t.getWidth(),
        height: t.getHeight()
      }), this._adjustAxis();
    }, r.prototype.getRect = function() {
      return this._rect;
    }, r.prototype._adjustAxis = function() {
      var e = this._rect, t = this._axis, a = t.isHorizontal(), n = a ? [0, e.width] : [0, e.height], i = t.inverse ? 1 : 0;
      t.setExtent(n[i], n[1 - i]), this._updateAxisTransform(t, a ? e.x : e.y);
    }, r.prototype._updateAxisTransform = function(e, t) {
      var a = e.getExtent(), n = a[0] + a[1], i = e.isHorizontal();
      e.toGlobalCoord = i ? function(o) {
        return o + t;
      } : function(o) {
        return n - o + t;
      }, e.toLocalCoord = i ? function(o) {
        return o - t;
      } : function(o) {
        return n - o + t;
      };
    }, r.prototype.getAxis = function() {
      return this._axis;
    }, r.prototype.getBaseAxis = function() {
      return this._axis;
    }, r.prototype.getAxes = function() {
      return [this._axis];
    }, r.prototype.getTooltipAxes = function() {
      return {
        baseAxes: [this.getAxis()],
        // Empty otherAxes
        otherAxes: []
      };
    }, r.prototype.containPoint = function(e) {
      var t = this.getRect(), a = this.getAxis(), n = a.orient;
      return n === "horizontal" ? a.contain(a.toLocalCoord(e[0])) && e[1] >= t.y && e[1] <= t.y + t.height : a.contain(a.toLocalCoord(e[1])) && e[0] >= t.y && e[0] <= t.y + t.height;
    }, r.prototype.pointToData = function(e) {
      var t = this.getAxis();
      return [t.coordToData(t.toLocalCoord(e[t.orient === "horizontal" ? 0 : 1]))];
    }, r.prototype.dataToPoint = function(e) {
      var t = this.getAxis(), a = this.getRect(), n = [], i = t.orient === "horizontal" ? 0 : 1;
      return e instanceof Array && (e = e[0]), n[i] = t.toGlobalCoord(t.dataToCoord(+e)), n[1 - i] = i === 0 ? a.y + a.height / 2 : a.x + a.width / 2, n;
    }, r.prototype.convertToPixel = function(e, t, a) {
      var n = Qx(t);
      return n === this ? this.dataToPoint(a) : null;
    }, r.prototype.convertFromPixel = function(e, t, a) {
      var n = Qx(t);
      return n === this ? this.pointToData(a) : null;
    }, r;
  }()
);
function Qx(r) {
  var e = r.seriesModel, t = r.singleAxisModel;
  return t && t.coordinateSystem || e && e.coordinateSystem;
}
function m8(r, e) {
  var t = [];
  return r.eachComponent("singleAxis", function(a, n) {
    var i = new y8(a, r, e);
    i.name = "single_" + n, i.resize(a, e), a.coordinateSystem = i, t.push(i);
  }), r.eachSeries(function(a) {
    if (a.get("coordinateSystem") === "singleAxis") {
      var n = a.getReferringComponents("singleAxis", Qt).models[0];
      a.coordinateSystem = n && n.coordinateSystem;
    }
  }), t;
}
var _8 = {
  create: m8,
  dimensions: JI
};
const S8 = _8;
var Jx = ["x", "y"], x8 = ["width", "height"], w8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(t, a, n, i, o) {
      var s = n.axis, l = s.coordinateSystem, u = tp(l, 1 - qf(s)), f = l.dataToPoint(a)[0], h = i.get("type");
      if (h && h !== "none") {
        var v = jy(i), c = b8[h](s, f, u);
        c.style = v, t.graphicKey = c.type, t.pointer = c;
      }
      var p = $d(n);
      UI(
        // @ts-ignore
        a,
        t,
        p,
        n,
        i,
        o
      );
    }, e.prototype.getHandleTransform = function(t, a, n) {
      var i = $d(a, {
        labelInside: !1
      });
      i.labelMargin = n.get(["handle", "margin"]);
      var o = Qy(a.axis, t, i);
      return {
        x: o[0],
        y: o[1],
        rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(t, a, n, i) {
      var o = n.axis, s = o.coordinateSystem, l = qf(o), u = tp(s, l), f = [t.x, t.y];
      f[l] += a[l], f[l] = Math.min(u[1], f[l]), f[l] = Math.max(u[0], f[l]);
      var h = tp(s, 1 - l), v = (h[1] + h[0]) / 2, c = [v, v];
      return c[l] = f[l], {
        x: f[0],
        y: f[1],
        rotation: t.rotation,
        cursorPoint: c,
        tooltipOption: {
          verticalAlign: "middle"
        }
      };
    }, e;
  }(Ky)
), b8 = {
  line: function(r, e, t) {
    var a = Jy([e, t[0]], [e, t[1]], qf(r));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: a
    };
  },
  shadow: function(r, e, t) {
    var a = r.getBandWidth(), n = t[1] - t[0];
    return {
      type: "Rect",
      shape: YI([e - a / 2, t[0]], [a, n], qf(r))
    };
  }
};
function qf(r) {
  return r.isHorizontal() ? 0 : 1;
}
function tp(r, e) {
  var t = r.getRect();
  return [t[Jx[e]], t[Jx[e]] + t[x8[e]]];
}
const T8 = w8;
var D8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "single", e;
  }($t)
);
function C8(r) {
  pt(El), xi.registerAxisPointerClass("SingleAxisPointer", T8), r.registerComponentView(D8), r.registerComponentView(p8), r.registerComponentModel(Jc), po(r, "single", Jc, Jc.defaultOption), r.registerCoordinateSystem("single", S8);
}
var A8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a, n) {
      var i = Io(t);
      r.prototype.init.apply(this, arguments), tw(t, i);
    }, e.prototype.mergeOption = function(t) {
      r.prototype.mergeOption.apply(this, arguments), tw(this.option, t);
    }, 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;
  }(St)
);
function tw(r, e) {
  var t = r.cellSize, a;
  z(t) ? a = t : a = r.cellSize = [t, t], a.length === 1 && (a[1] = a[0]);
  var n = G([0, 1], function(i) {
    return PN(e, i) && (a[i] = "auto"), a[i] != null && a[i] !== "auto";
  });
  Ja(r, e, {
    type: "box",
    ignoreSize: n
  });
}
const M8 = A8;
var I8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      var i = this.group;
      i.removeAll();
      var o = t.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = a.getLocaleModel();
      this._renderDayRect(t, s, i), this._renderLines(t, s, l, i), this._renderYearText(t, s, l, i), this._renderMonthText(t, u, l, i), this._renderWeekText(t, u, s, l, i);
    }, e.prototype._renderDayRect = function(t, a, n) {
      for (var i = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), s = i.getCellWidth(), l = i.getCellHeight(), u = a.start.time; u <= a.end.time; u = i.getNextNDay(u, 1).time) {
        var f = i.dataToRect([u], !1).tl, h = new bt({
          shape: {
            x: f[0],
            y: f[1],
            width: s,
            height: l
          },
          cursor: "default",
          style: o
        });
        n.add(h);
      }
    }, e.prototype._renderLines = function(t, a, n, i) {
      var o = this, s = t.coordinateSystem, l = t.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = t.get(["splitLine", "show"]), f = l.lineWidth;
      this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
      for (var h = a.start, v = 0; h.time <= a.end.time; v++) {
        p(h.formatedDate), v === 0 && (h = s.getDateInfo(a.start.y + "-" + a.start.m));
        var c = h.date;
        c.setMonth(c.getMonth() + 1), h = s.getDateInfo(c);
      }
      p(s.getNextNDay(a.end.time, 1).formatedDate);
      function p(d) {
        o._firstDayOfMonth.push(s.getDateInfo(d)), o._firstDayPoints.push(s.dataToRect([d], !1).tl);
        var g = o._getLinePointsOfOneWeek(t, d, n);
        o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, i);
      }
      u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, f, n), l, i), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, f, n), l, i);
    }, e.prototype._getEdgesPoints = function(t, a, n) {
      var i = [t[0].slice(), t[t.length - 1].slice()], o = n === "horizontal" ? 0 : 1;
      return i[0][o] = i[0][o] - a / 2, i[1][o] = i[1][o] + a / 2, i;
    }, e.prototype._drawSplitline = function(t, a, n) {
      var i = new ze({
        z2: 20,
        shape: {
          points: t
        },
        style: a
      });
      n.add(i);
    }, e.prototype._getLinePointsOfOneWeek = function(t, a, n) {
      for (var i = t.coordinateSystem, o = i.getDateInfo(a), s = [], l = 0; l < 7; l++) {
        var u = i.getNextNDay(o.time, l), f = i.dataToRect([u.time], !1);
        s[2 * u.day] = f.tl, s[2 * u.day + 1] = f[n === "horizontal" ? "bl" : "tr"];
      }
      return s;
    }, e.prototype._formatterLabel = function(t, a) {
      return $(t) && t ? IN(t, a) : q(t) ? t(a) : a.nameMap;
    }, e.prototype._yearTextPositionControl = function(t, a, n, i, o) {
      var s = a[0], l = a[1], u = ["center", "bottom"];
      i === "bottom" ? (l += o, u = ["center", "top"]) : i === "left" ? s -= o : i === "right" ? (s += o, u = ["center", "top"]) : l -= o;
      var f = 0;
      return (i === "left" || i === "right") && (f = Math.PI / 2), {
        rotation: f,
        x: s,
        y: l,
        style: {
          align: u[0],
          verticalAlign: u[1]
        }
      };
    }, e.prototype._renderYearText = function(t, a, n, i) {
      var o = t.getModel("yearLabel");
      if (o.get("show")) {
        var s = o.get("margin"), l = o.get("position");
        l || (l = n !== "horizontal" ? "top" : "left");
        var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], f = (u[0][0] + u[1][0]) / 2, h = (u[0][1] + u[1][1]) / 2, v = n === "horizontal" ? 0 : 1, c = {
          top: [f, u[v][1]],
          bottom: [f, u[1 - v][1]],
          left: [u[1 - v][0], h],
          right: [u[v][0], h]
        }, p = a.start.y;
        +a.end.y > +a.start.y && (p = p + "-" + a.end.y);
        var d = o.get("formatter"), g = {
          start: a.start.y,
          end: a.end.y,
          nameMap: p
        }, y = this._formatterLabel(d, g), m = new Dt({
          z2: 30,
          style: Ot(o, {
            text: y
          })
        });
        m.attr(this._yearTextPositionControl(m, c[l], n, l, s)), i.add(m);
      }
    }, e.prototype._monthTextPositionControl = function(t, a, n, i, o) {
      var s = "left", l = "top", u = t[0], f = t[1];
      return n === "horizontal" ? (f = f + o, a && (s = "center"), i === "start" && (l = "bottom")) : (u = u + o, a && (l = "middle"), i === "start" && (s = "right")), {
        x: u,
        y: f,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderMonthText = function(t, a, n, i) {
      var o = t.getModel("monthLabel");
      if (o.get("show")) {
        var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), f = o.get("align"), h = [this._tlpoints, this._blpoints];
        (!s || $(s)) && (s && (a = td(s) || a), s = a.get(["time", "monthAbbr"]) || []);
        var v = u === "start" ? 0 : 1, c = n === "horizontal" ? 0 : 1;
        l = u === "start" ? -l : l;
        for (var p = f === "center", d = 0; d < h[v].length - 1; d++) {
          var g = h[v][d].slice(), y = this._firstDayOfMonth[d];
          if (p) {
            var m = this._firstDayPoints[d];
            g[c] = (m[c] + h[0][d + 1][c]) / 2;
          }
          var _ = o.get("formatter"), S = s[+y.m - 1], w = {
            yyyy: y.y,
            yy: (y.y + "").slice(2),
            MM: y.m,
            M: +y.m,
            nameMap: S
          }, x = this._formatterLabel(_, w), b = new Dt({
            z2: 30,
            style: V(Ot(o, {
              text: x
            }), this._monthTextPositionControl(g, p, n, u, l))
          });
          i.add(b);
        }
      }
    }, e.prototype._weekTextPositionControl = function(t, a, n, i, o) {
      var s = "center", l = "middle", u = t[0], f = t[1], h = n === "start";
      return a === "horizontal" ? (u = u + i + (h ? 1 : -1) * o[0] / 2, s = h ? "right" : "left") : (f = f + i + (h ? 1 : -1) * o[1] / 2, l = h ? "bottom" : "top"), {
        x: u,
        y: f,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderWeekText = function(t, a, n, i, o) {
      var s = t.getModel("dayLabel");
      if (s.get("show")) {
        var l = t.coordinateSystem, u = s.get("position"), f = s.get("nameMap"), h = s.get("margin"), v = l.getFirstDayOfWeek();
        if (!f || $(f)) {
          f && (a = td(f) || a);
          var c = a.get(["time", "dayOfWeekShort"]);
          f = c || G(a.get(["time", "dayOfWeekAbbr"]), function(w) {
            return w[0];
          });
        }
        var p = l.getNextNDay(n.end.time, 7 - n.lweek).time, d = [l.getCellWidth(), l.getCellHeight()];
        h = H(h, Math.min(d[1], d[0])), u === "start" && (p = l.getNextNDay(n.start.time, -(7 + n.fweek)).time, h = -h);
        for (var g = 0; g < 7; g++) {
          var y = l.getNextNDay(p, g), m = l.dataToRect([y.time], !1).center, _ = g;
          _ = Math.abs((g + v) % 7);
          var S = new Dt({
            z2: 30,
            style: V(Ot(s, {
              text: f[_]
            }), this._weekTextPositionControl(m, i, u, h, d))
          });
          o.add(S);
        }
      }
    }, e.type = "calendar", e;
  }($t)
);
const L8 = I8;
var ep = 864e5, E8 = (
  /** @class */
  function() {
    function r(e, t, a) {
      this.type = "calendar", this.dimensions = r.dimensions, this.getDimensionsInfo = r.getDimensionsInfo, this._model = e;
    }
    return r.getDimensionsInfo = function() {
      return [{
        name: "time",
        type: "time"
      }, "value"];
    }, r.prototype.getRangeInfo = function() {
      return this._rangeInfo;
    }, r.prototype.getModel = function() {
      return this._model;
    }, r.prototype.getRect = function() {
      return this._rect;
    }, r.prototype.getCellWidth = function() {
      return this._sw;
    }, r.prototype.getCellHeight = function() {
      return this._sh;
    }, r.prototype.getOrient = function() {
      return this._orient;
    }, r.prototype.getFirstDayOfWeek = function() {
      return this._firstDayOfWeek;
    }, r.prototype.getDateInfo = function(e) {
      e = Zr(e);
      var t = e.getFullYear(), a = e.getMonth() + 1, n = a < 10 ? "0" + a : "" + a, i = e.getDate(), o = i < 10 ? "0" + i : "" + i, s = e.getDay();
      return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
        y: t + "",
        m: n,
        d: o,
        day: s,
        time: e.getTime(),
        formatedDate: t + "-" + n + "-" + o,
        date: e
      };
    }, r.prototype.getNextNDay = function(e, t) {
      return t = t || 0, t === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + t), this.getDateInfo(e));
    }, r.prototype.update = function(e, t) {
      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 a = this._rangeInfo.weeks || 1, n = ["width", "height"], i = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [a, 7] : [7, a];
      C([0, 1], function(h) {
        f(i, h) && (o[n[h]] = i[h] * s[h]);
      });
      var l = {
        width: t.getWidth(),
        height: t.getHeight()
      }, u = this._rect = re(o, l);
      C([0, 1], function(h) {
        f(i, h) || (i[h] = u[n[h]] / s[h]);
      });
      function f(h, v) {
        return h[v] != null && h[v] !== "auto";
      }
      this._sw = i[0], this._sh = i[1];
    }, r.prototype.dataToPoint = function(e, t) {
      z(e) && (e = e[0]), t == null && (t = !0);
      var a = this.getDateInfo(e), n = this._rangeInfo, i = a.formatedDate;
      if (t && !(a.time >= n.start.time && a.time < n.end.time + ep))
        return [NaN, NaN];
      var o = a.day, s = this._getRangeInfo([n.start.time, i]).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];
    }, r.prototype.pointToData = function(e) {
      var t = this.pointToDate(e);
      return t && t.time;
    }, r.prototype.dataToRect = function(e, t) {
      var a = this.dataToPoint(e, t);
      return {
        contentShape: {
          x: a[0] - (this._sw - this._lineWidth) / 2,
          y: a[1] - (this._sh - this._lineWidth) / 2,
          width: this._sw - this._lineWidth,
          height: this._sh - this._lineWidth
        },
        center: a,
        tl: [a[0] - this._sw / 2, a[1] - this._sh / 2],
        tr: [a[0] + this._sw / 2, a[1] - this._sh / 2],
        br: [a[0] + this._sw / 2, a[1] + this._sh / 2],
        bl: [a[0] - this._sw / 2, a[1] + this._sh / 2]
      };
    }, r.prototype.pointToDate = function(e) {
      var t = Math.floor((e[0] - this._rect.x) / this._sw) + 1, a = Math.floor((e[1] - this._rect.y) / this._sh) + 1, n = this._rangeInfo.range;
      return this._orient === "vertical" ? this._getDateByWeeksAndDay(a, t - 1, n) : this._getDateByWeeksAndDay(t, a - 1, n);
    }, r.prototype.convertToPixel = function(e, t, a) {
      var n = ew(t);
      return n === this ? n.dataToPoint(a) : null;
    }, r.prototype.convertFromPixel = function(e, t, a) {
      var n = ew(t);
      return n === this ? n.pointToData(a) : null;
    }, r.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, r.prototype._initRangeOption = function() {
      var e = this._model.get("range"), t;
      if (z(e) && e.length === 1 && (e = e[0]), z(e))
        t = e;
      else {
        var a = e.toString();
        if (/^\d{4}$/.test(a) && (t = [a + "-01-01", a + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(a)) {
          var n = this.getDateInfo(a), i = n.date;
          i.setMonth(i.getMonth() + 1);
          var o = this.getNextNDay(i, -1);
          t = [n.formatedDate, o.formatedDate];
        }
        /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(a) && (t = [a, a]);
      }
      if (!t)
        return {}.NODE_ENV !== "production" && Sr("Invalid date range."), e;
      var s = this._getRangeInfo(t);
      return s.start.time > s.end.time && t.reverse(), t;
    }, r.prototype._getRangeInfo = function(e) {
      var t = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], a;
      t[0].time > t[1].time && (a = !0, t.reverse());
      var n = Math.floor(t[1].time / ep) - Math.floor(t[0].time / ep) + 1, i = new Date(t[0].time), o = i.getDate(), s = t[1].date.getDate();
      i.setDate(o + n - 1);
      var l = i.getDate();
      if (l !== s)
        for (var u = i.getTime() - t[1].time > 0 ? 1 : -1; (l = i.getDate()) !== s && (i.getTime() - t[1].time) * u > 0; )
          n -= u, i.setDate(l - u);
      var f = Math.floor((n + t[0].day + 6) / 7), h = a ? -f + 1 : f - 1;
      return a && t.reverse(), {
        range: [t[0].formatedDate, t[1].formatedDate],
        start: t[0],
        end: t[1],
        allDay: n,
        weeks: f,
        // From 0.
        nthWeek: h,
        fweek: t[0].day,
        lweek: t[1].day
      };
    }, r.prototype._getDateByWeeksAndDay = function(e, t, a) {
      var n = this._getRangeInfo(a);
      if (e > n.weeks || e === 0 && t < n.fweek || e === n.weeks && t > n.lweek)
        return null;
      var i = (e - 1) * 7 - n.fweek + t, o = new Date(n.start.time);
      return o.setDate(+n.start.d + i), this.getDateInfo(o);
    }, r.create = function(e, t) {
      var a = [];
      return e.eachComponent("calendar", function(n) {
        var i = new r(n);
        a.push(i), n.coordinateSystem = i;
      }), e.eachSeries(function(n) {
        n.get("coordinateSystem") === "calendar" && (n.coordinateSystem = a[n.get("calendarIndex") || 0]);
      }), a;
    }, r.dimensions = ["time", "value"], r;
  }()
);
function ew(r) {
  var e = r.calendarModel, t = r.seriesModel, a = e ? e.coordinateSystem : t ? t.coordinateSystem : null;
  return a;
}
const P8 = E8;
function R8(r) {
  r.registerComponentModel(M8), r.registerComponentView(L8), r.registerCoordinateSystem("calendar", P8);
}
function N8(r, e) {
  var t = r.existing;
  if (e.id = r.keyInfo.id, !e.type && t && (e.type = t.type), e.parentId == null) {
    var a = e.parentOption;
    a ? e.parentId = a.id : t && (e.parentId = t.parentId);
  }
  e.parentOption = null;
}
function rw(r, e) {
  var t;
  return C(e, function(a) {
    r[a] != null && r[a] !== "auto" && (t = !0);
  }), t;
}
function O8(r, e, t) {
  var a = V({}, t), n = r[e], i = t.$action || "merge";
  if (i === "merge")
    if (n) {
      if ({}.NODE_ENV !== "production") {
        var o = t.type;
        Q(!o || n.type === o, 'Please set $action: "replace" to change `type`');
      }
      ft(n, a, !0), Ja(n, a, {
        ignoreSize: !0
      }), zD(t, n), Mu(t, n), Mu(t, n, "shape"), Mu(t, n, "style"), Mu(t, n, "extra"), t.clipPath = n.clipPath;
    } else
      r[e] = a;
  else
    i === "replace" ? r[e] = a : i === "remove" && n && (r[e] = null);
}
var tL = ["transition", "enterFrom", "leaveTo"], k8 = tL.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
function Mu(r, e, t) {
  if (t && (!r[t] && e[t] && (r[t] = {}), r = r[t], e = e[t]), !(!r || !e))
    for (var a = t ? tL : k8, n = 0; n < a.length; n++) {
      var i = a[n];
      r[i] == null && e[i] != null && (r[i] = e[i]);
    }
}
function V8(r, e) {
  if (r && (r.hv = e.hv = [
    // Rigid body, don't care about `width`.
    rw(e, ["left", "right"]),
    // Rigid body, don't care about `height`.
    rw(e, ["top", "bottom"])
  ], r.type === "group")) {
    var t = r, a = e;
    t.width == null && (t.width = a.width = 0), t.height == null && (t.height = a.height = 0);
  }
}
var B8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.preventAutoZ = !0, t;
    }
    return e.prototype.mergeOption = function(t, a) {
      var n = this.option.elements;
      this.option.elements = null, r.prototype.mergeOption.call(this, t, a), this.option.elements = n;
    }, e.prototype.optionUpdated = function(t, a) {
      var n = this.option, i = (a ? n : t).elements, o = n.elements = a ? [] : n.elements, s = [];
      this._flatten(i, s, null);
      var l = ST(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
      C(l, function(f, h) {
        var v = f.newOption;
        ({}).NODE_ENV !== "production" && Q(j(v) || f.existing, "Empty graphic option definition"), v && (u.push(v), N8(f, v), O8(o, h, v), V8(o[h], v));
      }, this), n.elements = Et(o, function(f) {
        return f && delete f.$action, f != null;
      });
    }, e.prototype._flatten = function(t, a, n) {
      C(t, function(i) {
        if (i) {
          n && (i.parentOption = n), a.push(i);
          var o = i.children;
          o && o.length && this._flatten(o, a, i), delete i.children;
        }
      }, this);
    }, e.prototype.useElOptionsToUpdate = function() {
      var t = this._elOptionsToUpdate;
      return this._elOptionsToUpdate = null, t;
    }, e.type = "graphic", e.defaultOption = {
      elements: []
      // parentId: null
    }, e;
  }(St)
), aw = {
  // Reserved but not supported in graphic component.
  path: null,
  compoundPath: null,
  // Supported in graphic component.
  group: nt,
  image: de,
  text: Dt
}, er = Tt(), z8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function() {
      this._elMap = K();
    }, e.prototype.render = function(t, a, n) {
      t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(t, n);
    }, e.prototype._updateElements = function(t) {
      var a = t.useElOptionsToUpdate();
      if (a) {
        var n = this._elMap, i = this.group, o = t.get("z"), s = t.get("zlevel");
        C(a, function(l) {
          var u = ee(l.id, null), f = u != null ? n.get(u) : null, h = ee(l.parentId, null), v = h != null ? n.get(h) : i, c = l.type, p = l.style;
          c === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
          var d = l.textContent, g = l.textConfig;
          if (p && PI(p, c, !!g, !!d)) {
            var y = RI(p, c, !0);
            !g && y.textConfig && (g = l.textConfig = y.textConfig), !d && y.textContent && (d = y.textContent);
          }
          var m = G8(l);
          ({}).NODE_ENV !== "production" && f && Q(v === f.parent, "Changing parent is not supported.");
          var _ = l.$action || "merge", S = _ === "merge", w = _ === "replace";
          if (S) {
            var x = !f, b = f;
            x ? b = nw(u, v, l.type, n) : (b && (er(b).isNew = !1), BI(b)), b && (ju(b, m, t, {
              isInit: x
            }), iw(b, l, o, s));
          } else if (w) {
            Ju(f, l, n, t);
            var T = nw(u, v, l.type, n);
            T && (ju(T, m, t, {
              isInit: !0
            }), iw(T, l, o, s));
          } else
            _ === "remove" && (OI(f, l), Ju(f, l, n, t));
          var D = n.get(u);
          if (D && d)
            if (S) {
              var A = D.getTextContent();
              A ? A.attr(d) : D.setTextContent(new Dt(d));
            } else
              w && D.setTextContent(new Dt(d));
          if (D) {
            var M = l.clipPath;
            if (M) {
              var I = M.type, L = void 0, x = !1;
              if (S) {
                var E = D.getClipPath();
                x = !E || er(E).type !== I, L = x ? Ud(I) : E;
              } else
                w && (x = !0, L = Ud(I));
              D.setClipPath(L), ju(L, M, t, {
                isInit: x
              }), Yf(L, M.keyframeAnimation, t);
            }
            var P = er(D);
            D.setTextConfig(g), P.option = l, F8(D, t, l), Do({
              el: D,
              componentModel: t,
              itemName: D.name,
              itemTooltipOption: l.tooltip
            }), Yf(D, l.keyframeAnimation, t);
          }
        });
      }
    }, e.prototype._relocate = function(t, a) {
      for (var n = t.option.elements, i = this.group, o = this._elMap, s = a.getWidth(), l = a.getHeight(), u = ["x", "y"], f = 0; f < n.length; f++) {
        var h = n[f], v = ee(h.id, null), c = v != null ? o.get(v) : null;
        if (!(!c || !c.isGroup)) {
          var p = c.parent, d = p === i, g = er(c), y = er(p);
          g.width = H(g.option.width, d ? s : y.width) || 0, g.height = H(g.option.height, d ? l : y.height) || 0;
        }
      }
      for (var f = n.length - 1; f >= 0; f--) {
        var h = n[f], v = ee(h.id, null), c = v != null ? o.get(v) : null;
        if (c) {
          var p = c.parent, y = er(p), m = p === i ? {
            width: s,
            height: l
          } : {
            width: y.width,
            height: y.height
          }, _ = {}, S = Mh(c, h, m, null, {
            hv: h.hv,
            boundingMode: h.bounding
          }, _);
          if (!er(c).isNew && S) {
            for (var w = h.transition, x = {}, b = 0; b < u.length; b++) {
              var T = u[b], D = _[T];
              w && (si(w) || ct(w, T) >= 0) ? x[T] = D : c[T] = D;
            }
            Mt(c, x, t, 0);
          } else
            c.attr(_);
        }
      }
    }, e.prototype._clear = function() {
      var t = this, a = this._elMap;
      a.each(function(n) {
        Ju(n, er(n).option, a, t._lastGraphicModel);
      }), this._elMap = K();
    }, e.prototype.dispose = function() {
      this._clear();
    }, e.type = "graphic", e;
  }($t)
);
function Ud(r) {
  ({}).NODE_ENV !== "production" && Q(r, "graphic type MUST be set");
  var e = U(aw, r) ? aw[r] : Og(r);
  ({}).NODE_ENV !== "production" && Q(e, "graphic type " + r + " can not be found");
  var t = new e({});
  return er(t).type = r, t;
}
function nw(r, e, t, a) {
  var n = Ud(t);
  return e.add(n), a.set(r, n), er(n).id = r, er(n).isNew = !0, n;
}
function Ju(r, e, t, a) {
  var n = r && r.parent;
  n && (r.type === "group" && r.traverse(function(i) {
    Ju(i, e, t, a);
  }), $h(r, e, a), t.removeKey(er(r).id));
}
function iw(r, e, t, a) {
  r.isGroup || C([
    ["cursor", ur.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", a || 0],
    ["z", t || 0],
    // z2 must not be null/undefined, otherwise sort error may occur.
    ["z2", 0]
  ], function(n) {
    var i = n[0];
    U(e, i) ? r[i] = ut(e[i], n[1]) : r[i] == null && (r[i] = n[1]);
  }), C(_t(e), function(n) {
    if (n.indexOf("on") === 0) {
      var i = e[n];
      r[n] = q(i) ? i : null;
    }
  }), U(e, "draggable") && (r.draggable = e.draggable), e.name != null && (r.name = e.name), e.id != null && (r.id = e.id);
}
function G8(r) {
  return r = V({}, r), C(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(BD), function(e) {
    delete r[e];
  }), r;
}
function F8(r, e, t) {
  var a = it(r).eventData;
  !r.silent && !r.ignore && !a && (a = it(r).eventData = {
    componentType: "graphic",
    componentIndex: e.componentIndex,
    name: r.name
  }), a && (a.info = t.info);
}
function H8(r) {
  r.registerComponentModel(B8), r.registerComponentView(z8), r.registerPreprocessor(function(e) {
    var t = e.graphic;
    z(t) ? !t[0] || !t[0].elements ? e.graphic = [{
      elements: t
    }] : e.graphic = [e.graphic[0]] : t && !t.elements && (e.graphic = [{
      elements: [t]
    }]);
  });
}
var ow = ["x", "y", "radius", "angle", "single"], W8 = ["cartesian2d", "polar", "singleAxis"];
function $8(r) {
  var e = r.get("coordinateSystem");
  return ct(W8, e) >= 0;
}
function $a(r) {
  return {}.NODE_ENV !== "production" && Q(r), r + "Axis";
}
function U8(r, e) {
  var t = K(), a = [], n = K();
  r.eachComponent({
    mainType: "dataZoom",
    query: e
  }, function(f) {
    n.get(f.uid) || s(f);
  });
  var i;
  do
    i = !1, r.eachComponent("dataZoom", o);
  while (i);
  function o(f) {
    !n.get(f.uid) && l(f) && (s(f), i = !0);
  }
  function s(f) {
    n.set(f.uid, !0), a.push(f), u(f);
  }
  function l(f) {
    var h = !1;
    return f.eachTargetAxis(function(v, c) {
      var p = t.get(v);
      p && p[c] && (h = !0);
    }), h;
  }
  function u(f) {
    f.eachTargetAxis(function(h, v) {
      (t.get(h) || t.set(h, []))[v] = !0;
    });
  }
  return a;
}
function eL(r) {
  var e = r.ecModel, t = {
    infoList: [],
    infoMap: K()
  };
  return r.eachTargetAxis(function(a, n) {
    var i = e.getComponent($a(a), n);
    if (i) {
      var o = i.getCoordSysModel();
      if (o) {
        var s = o.uid, l = t.infoMap.get(s);
        l || (l = {
          model: o,
          axisModels: []
        }, t.infoList.push(l), t.infoMap.set(s, l)), l.axisModels.push(i);
      }
    }
  }), t;
}
var rp = (
  /** @class */
  function() {
    function r() {
      this.indexList = [], this.indexMap = [];
    }
    return r.prototype.add = function(e) {
      this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
    }, r;
  }()
), Y8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._autoThrottle = !0, t._noTarget = !0, t._rangePropMode = ["percent", "percent"], t;
    }
    return e.prototype.init = function(t, a, n) {
      var i = sw(t);
      this.settledOption = i, this.mergeDefaultAndTheme(t, n), this._doInit(i);
    }, e.prototype.mergeOption = function(t) {
      var a = sw(t);
      ft(this.option, t, !0), ft(this.settledOption, a, !0), this._doInit(a);
    }, e.prototype._doInit = function(t) {
      var a = this.option;
      this._setDefaultThrottle(t), this._updateRangeUse(t);
      var n = this.settledOption;
      C([["start", "startValue"], ["end", "endValue"]], function(i, o) {
        this._rangePropMode[o] === "value" && (a[i[0]] = n[i[0]] = null);
      }, this), this._resetTarget();
    }, e.prototype._resetTarget = function() {
      var t = this.get("orient", !0), a = this._targetAxisInfoMap = K(), n = this._fillSpecifiedTargetAxis(a);
      n ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal", this._fillAutoTargetAxisByOrient(a, this._orient)), this._noTarget = !0, a.each(function(i) {
        i.indexList.length && (this._noTarget = !1);
      }, this);
    }, e.prototype._fillSpecifiedTargetAxis = function(t) {
      var a = !1;
      return C(ow, function(n) {
        var i = this.getReferringComponents($a(n), lP);
        if (i.specified) {
          a = !0;
          var o = new rp();
          C(i.models, function(s) {
            o.add(s.componentIndex);
          }), t.set(n, o);
        }
      }, this), a;
    }, e.prototype._fillAutoTargetAxisByOrient = function(t, a) {
      var n = this.ecModel, i = !0;
      if (i) {
        var o = a === "vertical" ? "y" : "x", s = n.findComponents({
          mainType: o + "Axis"
        });
        l(s, o);
      }
      if (i) {
        var s = n.findComponents({
          mainType: "singleAxis",
          filter: function(f) {
            return f.get("orient", !0) === a;
          }
        });
        l(s, "single");
      }
      function l(u, f) {
        var h = u[0];
        if (h) {
          var v = new rp();
          if (v.add(h.componentIndex), t.set(f, v), i = !1, f === "x" || f === "y") {
            var c = h.getReferringComponents("grid", Qt).models[0];
            c && C(u, function(p) {
              h.componentIndex !== p.componentIndex && c === p.getReferringComponents("grid", Qt).models[0] && v.add(p.componentIndex);
            });
          }
        }
      }
      i && C(ow, function(u) {
        if (i) {
          var f = n.findComponents({
            mainType: $a(u),
            filter: function(v) {
              return v.get("type", !0) === "category";
            }
          });
          if (f[0]) {
            var h = new rp();
            h.add(f[0].componentIndex), t.set(u, h), i = !1;
          }
        }
      }, this);
    }, e.prototype._makeAutoOrientByTargetAxis = function() {
      var t;
      return this.eachTargetAxis(function(a) {
        !t && (t = a);
      }, this), t === "y" ? "vertical" : "horizontal";
    }, e.prototype._setDefaultThrottle = function(t) {
      if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
        var a = this.ecModel.option;
        this.option.throttle = a.animation && a.animationDurationUpdate > 0 ? 100 : 20;
      }
    }, e.prototype._updateRangeUse = function(t) {
      var a = this._rangePropMode, n = this.get("rangeMode");
      C([["start", "startValue"], ["end", "endValue"]], function(i, o) {
        var s = t[i[0]] != null, l = t[i[1]] != null;
        s && !l ? a[o] = "percent" : !s && l ? a[o] = "value" : n ? a[o] = n[o] : s && (a[o] = "percent");
      });
    }, e.prototype.noTarget = function() {
      return this._noTarget;
    }, e.prototype.getFirstTargetAxisModel = function() {
      var t;
      return this.eachTargetAxis(function(a, n) {
        t == null && (t = this.ecModel.getComponent($a(a), n));
      }, this), t;
    }, e.prototype.eachTargetAxis = function(t, a) {
      this._targetAxisInfoMap.each(function(n, i) {
        C(n.indexList, function(o) {
          t.call(a, i, o);
        });
      });
    }, e.prototype.getAxisProxy = function(t, a) {
      var n = this.getAxisModel(t, a);
      if (n)
        return n.__dzAxisProxy;
    }, e.prototype.getAxisModel = function(t, a) {
      ({}).NODE_ENV !== "production" && Q(t && a != null);
      var n = this._targetAxisInfoMap.get(t);
      if (n && n.indexMap[a])
        return this.ecModel.getComponent($a(t), a);
    }, e.prototype.setRawRange = function(t) {
      var a = this.option, n = this.settledOption;
      C([["start", "startValue"], ["end", "endValue"]], function(i) {
        (t[i[0]] != null || t[i[1]] != null) && (a[i[0]] = n[i[0]] = t[i[0]], a[i[1]] = n[i[1]] = t[i[1]]);
      }, this), this._updateRangeUse(t);
    }, e.prototype.setCalculatedRange = function(t) {
      var a = this.option;
      C(["start", "startValue", "end", "endValue"], function(n) {
        a[n] = t[n];
      });
    }, e.prototype.getPercentRange = function() {
      var t = this.findRepresentativeAxisProxy();
      if (t)
        return t.getDataPercentWindow();
    }, e.prototype.getValueRange = function(t, a) {
      if (t == null && a == null) {
        var n = this.findRepresentativeAxisProxy();
        if (n)
          return n.getDataValueWindow();
      } else
        return this.getAxisProxy(t, a).getDataValueWindow();
    }, e.prototype.findRepresentativeAxisProxy = function(t) {
      if (t)
        return t.__dzAxisProxy;
      for (var a, n = this._targetAxisInfoMap.keys(), i = 0; i < n.length; i++)
        for (var o = n[i], 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;
          a || (a = u);
        }
      return a;
    }, e.prototype.getRangePropMode = function() {
      return this._rangePropMode.slice();
    }, e.prototype.getOrient = function() {
      return {}.NODE_ENV !== "production" && Q(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;
  }(St)
);
function sw(r) {
  var e = {};
  return C(["start", "end", "startValue", "endValue", "throttle"], function(t) {
    r.hasOwnProperty(t) && (e[t] = r[t]);
  }), e;
}
const ll = Y8;
var Z8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "dataZoom.select", e;
  }(ll)
);
const X8 = Z8;
var q8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n, i) {
      this.dataZoomModel = t, this.ecModel = a, this.api = n;
    }, e.type = "dataZoom", e;
  }($t)
);
const am = q8;
var K8 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "dataZoom.select", e;
  }(am)
);
const j8 = K8;
var qi = C, lw = or, Q8 = (
  /** @class */
  function() {
    function r(e, t, a, n) {
      this._dimName = e, this._axisIndex = t, this.ecModel = n, this._dataZoomModel = a;
    }
    return r.prototype.hostedBy = function(e) {
      return this._dataZoomModel === e;
    }, r.prototype.getDataValueWindow = function() {
      return this._valueWindow.slice();
    }, r.prototype.getDataPercentWindow = function() {
      return this._percentWindow.slice();
    }, r.prototype.getTargetSeriesModels = function() {
      var e = [];
      return this.ecModel.eachSeries(function(t) {
        if ($8(t)) {
          var a = $a(this._dimName), n = t.getReferringComponents(a, Qt).models[0];
          n && this._axisIndex === n.componentIndex && e.push(t);
        }
      }, this), e;
    }, r.prototype.getAxisModel = function() {
      return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
    }, r.prototype.getMinMaxSpan = function() {
      return rt(this._minMaxSpan);
    }, r.prototype.calculateDataWindow = function(e) {
      var t = this._dataExtent, a = this.getAxisModel(), n = a.axis.scale, i = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
      qi(["start", "end"], function(v, c) {
        var p = e[v], d = e[v + "Value"];
        i[c] === "percent" ? (p == null && (p = o[c]), d = n.parse(Lt(p, o, t))) : (u = !0, d = d == null ? t[c] : n.parse(d), p = Lt(d, t, o)), l[c] = d == null || isNaN(d) ? t[c] : d, s[c] = p == null || isNaN(p) ? o[c] : p;
      }), lw(l), lw(s);
      var f = this._minMaxSpan;
      u ? h(l, s, t, o, !1) : h(s, l, o, t, !0);
      function h(v, c, p, d, g) {
        var y = g ? "Span" : "ValueSpan";
        wi(0, v, p, "all", f["min" + y], f["max" + y]);
        for (var m = 0; m < 2; m++)
          c[m] = Lt(v[m], p, d, !0), g && (c[m] = n.parse(c[m]));
      }
      return {
        valueWindow: l,
        percentWindow: s
      };
    }, r.prototype.reset = function(e) {
      if (e === this._dataZoomModel) {
        var t = this.getTargetSeriesModels();
        this._dataExtent = J8(this, this._dimName, t), this._updateMinMaxSpan();
        var a = this.calculateDataWindow(e.settledOption);
        this._valueWindow = a.valueWindow, this._percentWindow = a.percentWindow, this._setAxisModel();
      }
    }, r.prototype.filterData = function(e, t) {
      if (e !== this._dataZoomModel)
        return;
      var a = this._dimName, n = this.getTargetSeriesModels(), i = e.get("filterMode"), o = this._valueWindow;
      if (i === "none")
        return;
      qi(n, function(l) {
        var u = l.getData(), f = u.mapDimensionsAll(a);
        if (f.length) {
          if (i === "weakFilter") {
            var h = u.getStore(), v = G(f, function(c) {
              return u.getDimensionIndex(c);
            }, u);
            u.filterSelf(function(c) {
              for (var p, d, g, y = 0; y < f.length; y++) {
                var m = h.get(v[y], c), _ = !isNaN(m), S = m < o[0], w = m > o[1];
                if (_ && !S && !w)
                  return !0;
                _ && (g = !0), S && (p = !0), w && (d = !0);
              }
              return g && p && d;
            });
          } else
            qi(f, function(c) {
              if (i === "empty")
                l.setData(u = u.map(c, function(d) {
                  return s(d) ? d : NaN;
                }));
              else {
                var p = {};
                p[c] = o, u.selectRange(p);
              }
            });
          qi(f, function(c) {
            u.setApproximateExtent(o, c);
          });
        }
      });
      function s(l) {
        return l >= o[0] && l <= o[1];
      }
    }, r.prototype._updateMinMaxSpan = function() {
      var e = this._minMaxSpan = {}, t = this._dataZoomModel, a = this._dataExtent;
      qi(["min", "max"], function(n) {
        var i = t.get(n + "Span"), o = t.get(n + "ValueSpan");
        o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? i = Lt(a[0] + o, a, [0, 100], !0) : i != null && (o = Lt(i, [0, 100], a, !0) - a[0]), e[n + "Span"] = i, e[n + "ValueSpan"] = o;
      }, this);
    }, r.prototype._setAxisModel = function() {
      var e = this.getAxisModel(), t = this._percentWindow, a = this._valueWindow;
      if (t) {
        var n = cT(a, [0, 500]);
        n = Math.min(n, 20);
        var i = e.axis.scale.rawExtentInfo;
        t[0] !== 0 && i.setDeterminedMinMax("min", +a[0].toFixed(n)), t[1] !== 100 && i.setDeterminedMinMax("max", +a[1].toFixed(n)), i.freeze();
      }
    }, r;
  }()
);
function J8(r, e, t) {
  var a = [1 / 0, -1 / 0];
  qi(t, function(o) {
    TB(a, o.getData(), e);
  });
  var n = r.getAxisModel(), i = yA(n.axis.scale, n, a).calculate();
  return [i.min, i.max];
}
const tY = Q8;
var eY = {
  // `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(r) {
    function e(n) {
      r.eachComponent("dataZoom", function(i) {
        i.eachTargetAxis(function(o, s) {
          var l = r.getComponent($a(o), s);
          n(o, s, l, i);
        });
      });
    }
    e(function(n, i, o, s) {
      o.__dzAxisProxy = null;
    });
    var t = [];
    e(function(n, i, o, s) {
      o.__dzAxisProxy || (o.__dzAxisProxy = new tY(n, i, s, r), t.push(o.__dzAxisProxy));
    });
    var a = K();
    return C(t, function(n) {
      C(n.getTargetSeriesModels(), function(i) {
        a.set(i.uid, i);
      });
    }), a;
  },
  // 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(r, e) {
    r.eachComponent("dataZoom", function(t) {
      t.eachTargetAxis(function(a, n) {
        t.getAxisProxy(a, n).reset(t);
      }), t.eachTargetAxis(function(a, n) {
        t.getAxisProxy(a, n).filterData(t, e);
      });
    }), r.eachComponent("dataZoom", function(t) {
      var a = t.findRepresentativeAxisProxy();
      if (a) {
        var n = a.getDataPercentWindow(), i = a.getDataValueWindow();
        t.setCalculatedRange({
          start: n[0],
          end: n[1],
          startValue: i[0],
          endValue: i[1]
        });
      }
    });
  }
};
const rY = eY;
function aY(r) {
  r.registerAction("dataZoom", function(e, t) {
    var a = U8(t, e);
    C(a, function(n) {
      n.setRawRange({
        start: e.start,
        end: e.end,
        startValue: e.startValue,
        endValue: e.endValue
      });
    });
  });
}
var uw = !1;
function nm(r) {
  uw || (uw = !0, r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, rY), aY(r), r.registerSubTypeDefaulter("dataZoom", function() {
    return "slider";
  }));
}
function nY(r) {
  r.registerComponentModel(X8), r.registerComponentView(j8), nm(r);
}
var ar = (
  /** @class */
  function() {
    function r() {
    }
    return r;
  }()
), rL = {};
function Ki(r, e) {
  rL[r] = e;
}
function aL(r) {
  return rL[r];
}
var iY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.optionUpdated = function() {
      r.prototype.optionUpdated.apply(this, arguments);
      var t = this.ecModel;
      C(this.option.feature, function(a, n) {
        var i = aL(n);
        i && (i.getDefaultOption && (i.defaultOption = i.getDefaultOption(t)), ft(a, i.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;
  }(St)
);
const oY = iY;
function sY(r, e, t) {
  var a = e.getBoxLayoutParams(), n = e.get("padding"), i = {
    width: t.getWidth(),
    height: t.getHeight()
  }, o = re(a, i, n);
  ni(e.get("orient"), r, e.get("itemGap"), o.width, o.height), Mh(r, a, i, n);
}
function nL(r, e) {
  var t = Mo(e.get("padding")), a = e.getItemStyle(["color", "opacity"]);
  return a.fill = e.get("backgroundColor"), r = new bt({
    shape: {
      x: r.x - t[3],
      y: r.y - t[0],
      width: r.width + t[1] + t[3],
      height: r.height + t[0] + t[2],
      r: e.get("borderRadius")
    },
    style: a,
    silent: !0,
    z2: -1
  }), r;
}
var lY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.render = function(t, a, n, i) {
      var o = this.group;
      if (o.removeAll(), !t.get("show"))
        return;
      var s = +t.get("itemSize"), l = t.get("orient") === "vertical", u = t.get("feature") || {}, f = this._features || (this._features = {}), h = [];
      C(u, function(p, d) {
        h.push(d);
      }), new ya(this._featureNames || [], h).add(v).update(v).remove(ot(v, null)).execute(), this._featureNames = h;
      function v(p, d) {
        var g = h[p], y = h[d], m = u[g], _ = new kt(m, t, t.ecModel), S;
        if (i && i.newTitle != null && i.featureName === g && (m.title = i.newTitle), g && !y) {
          if (uY(g))
            S = {
              onclick: _.option.onclick,
              featureName: g
            };
          else {
            var w = aL(g);
            if (!w)
              return;
            S = new w();
          }
          f[g] = S;
        } else if (S = f[y], !S)
          return;
        S.uid = Ao("toolbox-feature"), S.model = _, S.ecModel = a, S.api = n;
        var x = S instanceof ar;
        if (!g && y) {
          x && S.dispose && S.dispose(a, n);
          return;
        }
        if (!_.get("show") || x && S.unusable) {
          x && S.remove && S.remove(a, n);
          return;
        }
        c(_, S, g), _.setIconStatus = function(b, T) {
          var D = this.option, A = this.iconPaths;
          D.iconStatus = D.iconStatus || {}, D.iconStatus[b] = T, A[b] && (T === "emphasis" ? da : ga)(A[b]);
        }, S instanceof ar && S.render && S.render(_, a, n, i);
      }
      function c(p, d, g) {
        var y = p.getModel("iconStyle"), m = p.getModel(["emphasis", "iconStyle"]), _ = d instanceof ar && d.getIcons ? d.getIcons() : p.get("icon"), S = p.get("title") || {}, w, x;
        $(_) ? (w = {}, w[g] = _) : w = _, $(S) ? (x = {}, x[g] = S) : x = S;
        var b = p.iconPaths = {};
        C(w, function(T, D) {
          var A = yl(T, {}, {
            x: -s / 2,
            y: -s / 2,
            width: s,
            height: s
          });
          A.setStyle(y.getItemStyle());
          var M = A.ensureState("emphasis");
          M.style = m.getItemStyle();
          var I = new Dt({
            style: {
              text: x[D],
              align: m.get("textAlign"),
              borderRadius: m.get("textBorderRadius"),
              padding: m.get("textPadding"),
              fill: null
            },
            ignore: !0
          });
          A.setTextContent(I), Do({
            el: A,
            componentModel: t,
            itemName: D,
            formatterParamsExtra: {
              title: x[D]
            }
          }), A.__title = x[D], A.on("mouseover", function() {
            var L = m.getItemStyle(), E = l ? t.get("right") == null && t.get("left") !== "right" ? "right" : "left" : t.get("bottom") == null && t.get("top") !== "bottom" ? "bottom" : "top";
            I.setStyle({
              fill: m.get("textFill") || L.fill || L.stroke || "#000",
              backgroundColor: m.get("textBackgroundColor")
            }), A.setTextConfig({
              position: m.get("textPosition") || E
            }), I.ignore = !t.get("showTitle"), n.enterEmphasis(this);
          }).on("mouseout", function() {
            p.get(["iconStatus", D]) !== "emphasis" && n.leaveEmphasis(this), I.hide();
          }), (p.get(["iconStatus", D]) === "emphasis" ? da : ga)(A), o.add(A), A.on("click", Y(d.onclick, d, a, n, D)), b[D] = A;
        });
      }
      sY(o, t, n), o.add(nL(o.getBoundingRect(), t)), l || o.eachChild(function(p) {
        var d = p.__title, g = p.ensureState("emphasis"), y = g.textConfig || (g.textConfig = {}), m = p.getTextContent(), _ = m && m.ensureState("emphasis");
        if (_ && !q(_) && d) {
          var S = _.style || (_.style = {}), w = vl(d, Dt.makeFont(S)), x = p.x + o.x, b = p.y + o.y + s, T = !1;
          b + w.height > n.getHeight() && (y.position = "top", T = !0);
          var D = T ? -5 - w.height : s + 10;
          x + w.width / 2 > n.getWidth() ? (y.position = ["100%", D], S.align = "right") : x - w.width / 2 < 0 && (y.position = [0, D], S.align = "left");
        }
      });
    }, e.prototype.updateView = function(t, a, n, i) {
      C(this._features, function(o) {
        o instanceof ar && o.updateView && o.updateView(o.model, a, n, i);
      });
    }, e.prototype.remove = function(t, a) {
      C(this._features, function(n) {
        n instanceof ar && n.remove && n.remove(t, a);
      }), this.group.removeAll();
    }, e.prototype.dispose = function(t, a) {
      C(this._features, function(n) {
        n instanceof ar && n.dispose && n.dispose(t, a);
      });
    }, e.type = "toolbox", e;
  }($t)
);
function uY(r) {
  return r.indexOf("my") === 0;
}
const fY = lY;
var hY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(t, a) {
      var n = this.model, i = n.get("name") || t.get("title.0.text") || "echarts", o = a.getZr().painter.getType() === "svg", s = o ? "svg" : n.get("type", !0) || "png", l = a.getConnectedDataURL({
        type: s,
        backgroundColor: n.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
        connectedBackgroundColor: n.get("connectedBackgroundColor"),
        excludeComponents: n.get("excludeComponents"),
        pixelRatio: n.get("pixelRatio")
      }), u = wt.browser;
      if (q(MouseEvent) && (u.newEdge || !u.ie && !u.edge)) {
        var f = document.createElement("a");
        f.download = i + "." + s, f.target = "_blank", f.href = l;
        var h = new MouseEvent("click", {
          // some micro front-end framework， window maybe is a Proxy
          view: document.defaultView,
          bubbles: !0,
          cancelable: !1
        });
        f.dispatchEvent(h);
      } else if (window.navigator.msSaveOrOpenBlob || o) {
        var v = l.split(","), c = v[0].indexOf("base64") > -1, p = o ? decodeURIComponent(v[1]) : v[1];
        c && (p = window.atob(p));
        var d = i + "." + s;
        if (window.navigator.msSaveOrOpenBlob) {
          for (var g = p.length, y = new Uint8Array(g); g--; )
            y[g] = p.charCodeAt(g);
          var m = new Blob([y]);
          window.navigator.msSaveOrOpenBlob(m, d);
        } else {
          var _ = document.createElement("iframe");
          document.body.appendChild(_);
          var S = _.contentWindow, w = S.document;
          w.open("image/svg+xml", "replace"), w.write(p), w.close(), S.focus(), w.execCommand("SaveAs", !0, d), document.body.removeChild(_);
        }
      } else {
        var x = n.get("lang"), b = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (x && x[0] || "") + '" /></body>', T = window.open();
        T.document.write(b), T.document.title = i;
      }
    }, e.getDefaultOption = function(t) {
      var a = {
        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: t.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: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
      };
      return a;
    }, e;
  }(ar)
);
const vY = hY;
var fw = "__ec_magicType_stack__", cY = [["line", "bar"], ["stack"]], pY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.getIcons = function() {
      var t = this.model, a = t.get("icon"), n = {};
      return C(t.get("type"), function(i) {
        a[i] && (n[i] = a[i]);
      }), n;
    }, e.getDefaultOption = function(t) {
      var a = {
        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: t.getLocaleModel().get(["toolbox", "magicType", "title"]),
        option: {},
        seriesIndex: {}
      };
      return a;
    }, e.prototype.onclick = function(t, a, n) {
      var i = this.model, o = i.get(["seriesIndex", n]);
      if (hw[n]) {
        var s = {
          series: []
        }, l = function(h) {
          var v = h.subType, c = h.id, p = hw[n](v, c, h, i);
          p && (tt(p, h.option), s.series.push(p));
          var d = h.coordinateSystem;
          if (d && d.type === "cartesian2d" && (n === "line" || n === "bar")) {
            var g = d.getAxesByScale("ordinal")[0];
            if (g) {
              var y = g.dim, m = y + "Axis", _ = h.getReferringComponents(m, Qt).models[0], S = _.componentIndex;
              s[m] = s[m] || [];
              for (var w = 0; w <= S; w++)
                s[m][S] = s[m][S] || {};
              s[m][S].boundaryGap = n === "bar";
            }
          }
        };
        C(cY, function(h) {
          ct(h, n) >= 0 && C(h, function(v) {
            i.setIconStatus(v, "normal");
          });
        }), i.setIconStatus(n, "emphasis"), t.eachComponent({
          mainType: "series",
          query: o == null ? null : {
            seriesIndex: o
          }
        }, l);
        var u, f = n;
        n === "stack" && (u = ft({
          stack: i.option.title.tiled,
          tiled: i.option.title.stack
        }, i.option.title), i.get(["iconStatus", n]) !== "emphasis" && (f = "tiled")), a.dispatchAction({
          type: "changeMagicType",
          currentType: f,
          newOption: s,
          newTitle: u,
          featureName: "magicType"
        });
      }
    }, e;
  }(ar)
), hw = {
  line: function(r, e, t, a) {
    if (r === "bar")
      return ft({
        id: e,
        type: "line",
        // Preserve data related option
        data: t.get("data"),
        stack: t.get("stack"),
        markPoint: t.get("markPoint"),
        markLine: t.get("markLine")
      }, a.get(["option", "line"]) || {}, !0);
  },
  bar: function(r, e, t, a) {
    if (r === "line")
      return ft({
        id: e,
        type: "bar",
        // Preserve data related option
        data: t.get("data"),
        stack: t.get("stack"),
        markPoint: t.get("markPoint"),
        markLine: t.get("markLine")
      }, a.get(["option", "bar"]) || {}, !0);
  },
  stack: function(r, e, t, a) {
    var n = t.get("stack") === fw;
    if (r === "line" || r === "bar")
      return a.setIconStatus("stack", n ? "normal" : "emphasis"), ft({
        id: e,
        stack: n ? "" : fw
      }, a.get(["option", "stack"]) || {}, !0);
  }
};
jr({
  type: "changeMagicType",
  event: "magicTypeChanged",
  update: "prepareAndUpdate"
}, function(r, e) {
  e.mergeOption(r.newOption);
});
const dY = pY;
var Uh = new Array(60).join("-"), mo = "	";
function gY(r) {
  var e = {}, t = [], a = [];
  return r.eachRawSeries(function(n) {
    var i = n.coordinateSystem;
    if (i && (i.type === "cartesian2d" || i.type === "polar")) {
      var o = i.getBaseAxis();
      if (o.type === "category") {
        var s = o.dim + "_" + o.index;
        e[s] || (e[s] = {
          categoryAxis: o,
          valueAxis: i.getOtherAxis(o),
          series: []
        }, a.push({
          axisDim: o.dim,
          axisIndex: o.index
        })), e[s].series.push(n);
      } else
        t.push(n);
    } else
      t.push(n);
  }), {
    seriesGroupByCategoryAxis: e,
    other: t,
    meta: a
  };
}
function yY(r) {
  var e = [];
  return C(r, function(t, a) {
    var n = t.categoryAxis, i = t.valueAxis, o = i.dim, s = [" "].concat(G(t.series, function(c) {
      return c.name;
    })), l = [n.model.getCategories()];
    C(t.series, function(c) {
      var p = c.getRawData();
      l.push(c.getRawData().mapArray(p.mapDimension(o), function(d) {
        return d;
      }));
    });
    for (var u = [s.join(mo)], f = 0; f < l[0].length; f++) {
      for (var h = [], v = 0; v < l.length; v++)
        h.push(l[v][f]);
      u.push(h.join(mo));
    }
    e.push(u.join(`
`));
  }), e.join(`

` + Uh + `

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

` + Uh + `

`);
}
function _Y(r) {
  var e = gY(r);
  return {
    value: Et([yY(e.seriesGroupByCategoryAxis), mY(e.other)], function(t) {
      return !!t.replace(/[\n\t\s]/g, "");
    }).join(`

` + Uh + `

`),
    meta: e.meta
  };
}
function Kf(r) {
  return r.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function SY(r) {
  var e = r.slice(0, r.indexOf(`
`));
  if (e.indexOf(mo) >= 0)
    return !0;
}
var Yd = new RegExp("[" + mo + "]+", "g");
function xY(r) {
  for (var e = r.split(/\n+/g), t = Kf(e.shift()).split(Yd), a = [], n = G(t, function(l) {
    return {
      name: l,
      data: []
    };
  }), i = 0; i < e.length; i++) {
    var o = Kf(e[i]).split(Yd);
    a.push(o.shift());
    for (var s = 0; s < o.length; s++)
      n[s] && (n[s].data[i] = o[s]);
  }
  return {
    series: n,
    categories: a
  };
}
function wY(r) {
  for (var e = r.split(/\n+/g), t = Kf(e.shift()), a = [], n = 0; n < e.length; n++) {
    var i = Kf(e[n]);
    if (i) {
      var o = i.split(Yd), s = "", l = void 0, u = !1;
      isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), a[n] = {
        name: s,
        value: []
      }, l = a[n].value) : l = a[n] = [];
      for (var f = 0; f < o.length; f++)
        l.push(+o[f]);
      l.length === 1 && (u ? a[n].value = l[0] : a[n] = l[0]);
    }
  }
  return {
    name: t,
    data: a
  };
}
function bY(r, e) {
  var t = r.split(new RegExp(`
*` + Uh + `
*`, "g")), a = {
    series: []
  };
  return C(t, function(n, i) {
    if (SY(n)) {
      var o = xY(n), s = e[i], l = s.axisDim + "Axis";
      s && (a[l] = a[l] || [], a[l][s.axisIndex] = {
        data: o.categories
      }, a.series = a.series.concat(o.series));
    } else {
      var o = wY(n);
      a.series.push(o);
    }
  }), a;
}
var TY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(t, a) {
      setTimeout(function() {
        a.dispatchAction({
          type: "hideTip"
        });
      });
      var n = a.getDom(), i = this.model;
      this._dom && n.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 = i.get("backgroundColor") || "#fff";
      var s = document.createElement("h4"), l = i.get("lang") || [];
      s.innerHTML = l[0] || i.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = i.get("textColor");
      var u = document.createElement("div"), f = document.createElement("textarea");
      u.style.cssText = "overflow:auto";
      var h = i.get("optionToContent"), v = i.get("contentToOption"), c = _Y(t);
      if (q(h)) {
        var p = h(a.getOption());
        $(p) ? u.innerHTML = p : so(p) && u.appendChild(p);
      } else {
        f.readOnly = i.get("readOnly");
        var d = f.style;
        d.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", d.color = i.get("textColor"), d.borderColor = i.get("textareaBorderColor"), d.backgroundColor = i.get("textareaColor"), f.value = c.value, u.appendChild(f);
      }
      var g = c.meta, y = document.createElement("div");
      y.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
      var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", _ = document.createElement("div"), S = document.createElement("div");
      m += ";background-color:" + i.get("buttonColor"), m += ";color:" + i.get("buttonTextColor");
      var w = this;
      function x() {
        n.removeChild(o), w._dom = null;
      }
      Cp(_, "click", x), Cp(S, "click", function() {
        if (v == null && h != null || v != null && h == null) {
          ({}).NODE_ENV !== "production" && Ft("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), x();
          return;
        }
        var b;
        try {
          q(v) ? b = v(u, a.getOption()) : b = bY(f.value, g);
        } catch (T) {
          throw x(), new Error("Data view format error " + T);
        }
        b && a.dispatchAction({
          type: "changeDataView",
          newOption: b
        }), x();
      }), _.innerHTML = l[1], S.innerHTML = l[2], S.style.cssText = _.style.cssText = m, !i.get("readOnly") && y.appendChild(S), y.appendChild(_), o.appendChild(s), o.appendChild(u), o.appendChild(y), u.style.height = n.clientHeight - 80 + "px", n.appendChild(o), this._dom = o;
    }, e.prototype.remove = function(t, a) {
      this._dom && a.getDom().removeChild(this._dom);
    }, e.prototype.dispose = function(t, a) {
      this.remove(t, a);
    }, e.getDefaultOption = function(t) {
      var a = {
        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: t.getLocaleModel().get(["toolbox", "dataView", "title"]),
        lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]),
        backgroundColor: "#fff",
        textColor: "#000",
        textareaColor: "#fff",
        textareaBorderColor: "#333",
        buttonColor: "#c23531",
        buttonTextColor: "#fff"
      };
      return a;
    }, e;
  }(ar)
);
function DY(r, e) {
  return G(r, function(t, a) {
    var n = e && e[a];
    if (j(n) && !z(n)) {
      var i = j(t) && !z(t);
      i || (t = {
        value: t
      });
      var o = n.name != null && t.name == null;
      return t = tt(t, n), o && delete t.name, t;
    } else
      return t;
  });
}
jr({
  type: "changeDataView",
  event: "dataViewChanged",
  update: "prepareAndUpdate"
}, function(r, e) {
  var t = [];
  C(r.newOption.series, function(a) {
    var n = e.getSeriesByName(a.name)[0];
    if (!n)
      t.push(V({
        // Default is scatter
        type: "scatter"
      }, a));
    else {
      var i = n.get("data");
      t.push({
        name: a.name,
        data: DY(a.data, i)
      });
    }
  }), e.mergeOption(tt({
    series: t
  }, r.newOption));
});
const CY = TY;
var iL = C, oL = Tt();
function AY(r, e) {
  var t = im(r);
  iL(e, function(a, n) {
    for (var i = t.length - 1; i >= 0; i--) {
      var o = t[i];
      if (o[n])
        break;
    }
    if (i < 0) {
      var s = r.queryComponents({
        mainType: "dataZoom",
        subType: "select",
        id: n
      })[0];
      if (s) {
        var l = s.getPercentRange();
        t[0][n] = {
          dataZoomId: n,
          start: l[0],
          end: l[1]
        };
      }
    }
  }), t.push(e);
}
function MY(r) {
  var e = im(r), t = e[e.length - 1];
  e.length > 1 && e.pop();
  var a = {};
  return iL(t, function(n, i) {
    for (var o = e.length - 1; o >= 0; o--)
      if (n = e[o][i], n) {
        a[i] = n;
        break;
      }
  }), a;
}
function IY(r) {
  oL(r).snapshots = null;
}
function LY(r) {
  return im(r).length;
}
function im(r) {
  var e = oL(r);
  return e.snapshots || (e.snapshots = [{}]), e.snapshots;
}
var EY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(t, a) {
      IY(t), a.dispatchAction({
        type: "restore",
        from: this.uid
      });
    }, e.getDefaultOption = function(t) {
      var a = {
        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: t.getLocaleModel().get(["toolbox", "restore", "title"])
      };
      return a;
    }, e;
  }(ar)
);
jr({
  type: "restore",
  event: "restore",
  update: "prepareAndUpdate"
}, function(r, e) {
  e.resetOption("recreate");
});
const PY = EY;
var RY = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], NY = (
  /** @class */
  function() {
    function r(e, t, a) {
      var n = this;
      this._targetInfoList = [];
      var i = vw(t, e);
      C(OY, function(o, s) {
        (!a || !a.include || ct(a.include, s) >= 0) && o(i, n._targetInfoList);
      });
    }
    return r.prototype.setOutputRanges = function(e, t) {
      return this.matchOutputRanges(e, t, function(a, n, i) {
        if ((a.coordRanges || (a.coordRanges = [])).push(n), !a.coordRange) {
          a.coordRange = n;
          var o = ap[a.brushType](0, i, n);
          a.__rangeOffset = {
            offset: gw[a.brushType](o.values, a.range, [1, 1]),
            xyMinMax: o.xyMinMax
          };
        }
      }), e;
    }, r.prototype.matchOutputRanges = function(e, t, a) {
      C(e, function(n) {
        var i = this.findTargetInfo(n, t);
        i && i !== !0 && C(i.coordSyses, function(o) {
          var s = ap[n.brushType](1, o, n.range, !0);
          a(n, s.values, o, t);
        });
      }, this);
    }, r.prototype.setInputRanges = function(e, t) {
      C(e, function(a) {
        var n = this.findTargetInfo(a, t);
        if ({}.NODE_ENV !== "production" && (Q(!n || n === !0 || a.coordRange, "coordRange must be specified when coord index specified."), Q(!n || n !== !0 || a.range, "range must be specified in global brush.")), a.range = a.range || [], n && n !== !0) {
          a.panelId = n.panelId;
          var i = ap[a.brushType](0, n.coordSys, a.coordRange), o = a.__rangeOffset;
          a.range = o ? gw[a.brushType](i.values, o.offset, kY(i.xyMinMax, o.xyMinMax)) : i.values;
        }
      }, this);
    }, r.prototype.makePanelOpts = function(e, t) {
      return G(this._targetInfoList, function(a) {
        var n = a.getPanelRect();
        return {
          panelId: a.panelId,
          defaultBrushType: t ? t(a) : null,
          clipPath: vI(n),
          isTargetByCursor: pI(n, e, a.coordSysModel),
          getLinearBrushOtherExtent: cI(n)
        };
      });
    }, r.prototype.controlSeries = function(e, t, a) {
      var n = this.findTargetInfo(e, a);
      return n === !0 || n && ct(n.coordSyses, t.coordinateSystem) >= 0;
    }, r.prototype.findTargetInfo = function(e, t) {
      for (var a = this._targetInfoList, n = vw(t, e), i = 0; i < a.length; i++) {
        var o = a[i], s = e.panelId;
        if (s) {
          if (o.panelId === s)
            return o;
        } else
          for (var l = 0; l < cw.length; l++)
            if (cw[l](n, o))
              return o;
      }
      return !0;
    }, r;
  }()
);
function Zd(r) {
  return r[0] > r[1] && r.reverse(), r;
}
function vw(r, e) {
  return Is(r, e, {
    includeMainTypes: RY
  });
}
var OY = {
  grid: function(r, e) {
    var t = r.xAxisModels, a = r.yAxisModels, n = r.gridModels, i = K(), o = {}, s = {};
    !t && !a && !n || (C(t, function(l) {
      var u = l.axis.grid.model;
      i.set(u.id, u), o[u.id] = !0;
    }), C(a, function(l) {
      var u = l.axis.grid.model;
      i.set(u.id, u), s[u.id] = !0;
    }), C(n, function(l) {
      i.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
    }), i.each(function(l) {
      var u = l.coordinateSystem, f = [];
      C(u.getCartesians(), function(h, v) {
        (ct(t, h.getAxis("x").model) >= 0 || ct(a, h.getAxis("y").model) >= 0) && f.push(h);
      }), e.push({
        panelId: "grid--" + l.id,
        gridModel: l,
        coordSysModel: l,
        // Use the first one as the representitive coordSys.
        coordSys: f[0],
        coordSyses: f,
        getPanelRect: pw.grid,
        xAxisDeclared: o[l.id],
        yAxisDeclared: s[l.id]
      });
    }));
  },
  geo: function(r, e) {
    C(r.geoModels, function(t) {
      var a = t.coordinateSystem;
      e.push({
        panelId: "geo--" + t.id,
        geoModel: t,
        coordSysModel: t,
        coordSys: a,
        coordSyses: [a],
        getPanelRect: pw.geo
      });
    });
  }
}, cw = [
  // grid
  function(r, e) {
    var t = r.xAxisModel, a = r.yAxisModel, n = r.gridModel;
    return !n && t && (n = t.axis.grid.model), !n && a && (n = a.axis.grid.model), n && n === e.gridModel;
  },
  // geo
  function(r, e) {
    var t = r.geoModel;
    return t && t === e.geoModel;
  }
], pw = {
  grid: function() {
    return this.coordSys.master.getRect().clone();
  },
  geo: function() {
    var r = this.coordSys, e = r.getBoundingRect().clone();
    return e.applyTransform(ai(r)), e;
  }
}, ap = {
  lineX: ot(dw, 0),
  lineY: ot(dw, 1),
  rect: function(r, e, t, a) {
    var n = r ? e.pointToData([t[0][0], t[1][0]], a) : e.dataToPoint([t[0][0], t[1][0]], a), i = r ? e.pointToData([t[0][1], t[1][1]], a) : e.dataToPoint([t[0][1], t[1][1]], a), o = [Zd([n[0], i[0]]), Zd([n[1], i[1]])];
    return {
      values: o,
      xyMinMax: o
    };
  },
  polygon: function(r, e, t, a) {
    var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], i = G(t, function(o) {
      var s = r ? e.pointToData(o, a) : e.dataToPoint(o, a);
      return n[0][0] = Math.min(n[0][0], s[0]), n[1][0] = Math.min(n[1][0], s[1]), n[0][1] = Math.max(n[0][1], s[0]), n[1][1] = Math.max(n[1][1], s[1]), s;
    });
    return {
      values: i,
      xyMinMax: n
    };
  }
};
function dw(r, e, t, a) {
  ({}).NODE_ENV !== "production" && Q(t.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  var n = t.getAxis(["x", "y"][r]), i = Zd(G([0, 1], function(s) {
    return e ? n.coordToData(n.toLocalCoord(a[s]), !0) : n.toGlobalCoord(n.dataToCoord(a[s]));
  })), o = [];
  return o[r] = i, o[1 - r] = [NaN, NaN], {
    values: i,
    xyMinMax: o
  };
}
var gw = {
  lineX: ot(yw, 0),
  lineY: ot(yw, 1),
  rect: function(r, e, t) {
    return [[r[0][0] - t[0] * e[0][0], r[0][1] - t[0] * e[0][1]], [r[1][0] - t[1] * e[1][0], r[1][1] - t[1] * e[1][1]]];
  },
  polygon: function(r, e, t) {
    return G(r, function(a, n) {
      return [a[0] - t[0] * e[n][0], a[1] - t[1] * e[n][1]];
    });
  }
};
function yw(r, e, t, a) {
  return [e[0] - a[r] * t[0], e[1] - a[r] * t[1]];
}
function kY(r, e) {
  var t = mw(r), a = mw(e), n = [t[0] / a[0], t[1] / a[1]];
  return isNaN(n[0]) && (n[0] = 1), isNaN(n[1]) && (n[1] = 1), n;
}
function mw(r) {
  return r ? [r[0][1] - r[0][0], r[1][1] - r[1][0]] : [NaN, NaN];
}
const om = NY;
var Xd = C, VY = aP("toolbox-dataZoom_"), BY = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.render = function(t, a, n, i) {
      this._brushController || (this._brushController = new Gy(n.getZr()), this._brushController.on("brush", Y(this._onBrush, this)).mount()), FY(t, a, this, i, n), GY(t, a);
    }, e.prototype.onclick = function(t, a, n) {
      zY[n].call(this);
    }, e.prototype.remove = function(t, a) {
      this._brushController && this._brushController.unmount();
    }, e.prototype.dispose = function(t, a) {
      this._brushController && this._brushController.dispose();
    }, e.prototype._onBrush = function(t) {
      var a = t.areas;
      if (!t.isEnd || !a.length)
        return;
      var n = {}, i = this.ecModel;
      this._brushController.updateCovers([]);
      var o = new om(sm(this.model), i, {
        include: ["grid"]
      });
      o.matchOutputRanges(a, i, function(u, f, h) {
        if (h.type === "cartesian2d") {
          var v = u.brushType;
          v === "rect" ? (s("x", h, f[0]), s("y", h, f[1])) : s({
            lineX: "x",
            lineY: "y"
          }[v], h, f);
        }
      }), AY(i, n), this._dispatchZoomAction(n);
      function s(u, f, h) {
        var v = f.getAxis(u), c = v.model, p = l(u, c, i), d = p.findRepresentativeAxisProxy(c).getMinMaxSpan();
        (d.minValueSpan != null || d.maxValueSpan != null) && (h = wi(0, h.slice(), v.scale.getExtent(), 0, d.minValueSpan, d.maxValueSpan)), p && (n[p.id] = {
          dataZoomId: p.id,
          startValue: h[0],
          endValue: h[1]
        });
      }
      function l(u, f, h) {
        var v;
        return h.eachComponent({
          mainType: "dataZoom",
          subType: "select"
        }, function(c) {
          var p = c.getAxisModel(u, f.componentIndex);
          p && (v = c);
        }), v;
      }
    }, e.prototype._dispatchZoomAction = function(t) {
      var a = [];
      Xd(t, function(n, i) {
        a.push(rt(n));
      }), a.length && this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        batch: a
      });
    }, e.getDefaultOption = function(t) {
      var a = {
        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: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
        brushStyle: {
          borderWidth: 0,
          color: "rgba(210,219,238,0.2)"
        }
      };
      return a;
    }, e;
  }(ar)
), zY = {
  zoom: function() {
    var r = !this._isZoomActive;
    this.api.dispatchAction({
      type: "takeGlobalCursor",
      key: "dataZoomSelect",
      dataZoomSelectActive: r
    });
  },
  back: function() {
    this._dispatchZoomAction(MY(this.ecModel));
  }
};
function sm(r) {
  var e = {
    xAxisIndex: r.get("xAxisIndex", !0),
    yAxisIndex: r.get("yAxisIndex", !0),
    xAxisId: r.get("xAxisId", !0),
    yAxisId: r.get("yAxisId", !0)
  };
  return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
}
function GY(r, e) {
  r.setIconStatus("back", LY(e) > 1 ? "emphasis" : "normal");
}
function FY(r, e, t, a, n) {
  var i = t._isZoomActive;
  a && a.type === "takeGlobalCursor" && (i = a.key === "dataZoomSelect" ? a.dataZoomSelectActive : !1), t._isZoomActive = i, r.setIconStatus("zoom", i ? "emphasis" : "normal");
  var o = new om(sm(r), e, {
    include: ["grid"]
  }), s = o.makePanelOpts(n, function(l) {
    return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  });
  t._brushController.setPanels(s).enableBrush(i && s.length ? {
    brushType: "auto",
    brushStyle: r.getModel("brushStyle").getItemStyle()
  } : !1);
}
BN("dataZoom", function(r) {
  var e = r.getComponent("toolbox", 0), t = ["feature", "dataZoom"];
  if (!e || e.get(t) == null)
    return;
  var a = e.getModel(t), n = [], i = sm(a), o = Is(r, i);
  Xd(o.xAxisModels, function(l) {
    return s(l, "xAxis", "xAxisIndex");
  }), Xd(o.yAxisModels, function(l) {
    return s(l, "yAxis", "yAxisIndex");
  });
  function s(l, u, f) {
    var h = l.componentIndex, v = {
      type: "select",
      $fromToolbox: !0,
      // Default to be filter
      filterMode: a.get("filterMode", !0) || "filter",
      // Id for merge mapping.
      id: VY + u + h
    };
    v[f] = h, n.push(v);
  }
  return n;
});
const HY = BY;
function WY(r) {
  r.registerComponentModel(oY), r.registerComponentView(fY), Ki("saveAsImage", vY), Ki("magicType", dY), Ki("dataView", CY), Ki("dataZoom", HY), Ki("restore", PY), pt(nY);
}
var $Y = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    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;
  }(St)
);
const UY = $Y;
function sL(r) {
  var e = r.get("confine");
  return e != null ? !!e : r.get("renderMode") === "richText";
}
function lL(r) {
  if (wt.domSupported) {
    for (var e = document.documentElement.style, t = 0, a = r.length; t < a; t++)
      if (r[t] in e)
        return r[t];
  }
}
var uL = lL(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), YY = lL(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
function fL(r, e) {
  if (!r)
    return e;
  e = kD(e, !0);
  var t = r.indexOf(e);
  return r = t === -1 ? e : "-" + r.slice(0, t) + "-" + e, r.toLowerCase();
}
function ZY(r, e) {
  var t = r.currentStyle || document.defaultView && document.defaultView.getComputedStyle(r);
  return t ? e ? t[e] : t : null;
}
var XY = fL(YY, "transition"), lm = fL(uL, "transform"), qY = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (wt.transform3dSupported ? "will-change:transform;" : "");
function KY(r) {
  return r = r === "left" ? "right" : r === "right" ? "left" : r === "top" ? "bottom" : "top", r;
}
function jY(r, e, t) {
  if (!$(t) || t === "inside")
    return "";
  var a = r.get("backgroundColor"), n = r.get("borderWidth");
  e = ci(e);
  var i = KY(t), o = Math.max(Math.round(n) * 1.5, 6), s = "", l = lm + ":", u;
  ct(["left", "right"], i) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = i === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = i === "top" ? 225 : 45) + "deg)");
  var f = u * Math.PI / 180, h = o + n, v = h * Math.abs(Math.cos(f)) + h * Math.abs(Math.sin(f)), c = Math.round(((v - Math.SQRT2 * n) / 2 + Math.SQRT2 * n - (v - h) / 2) * 100) / 100;
  s += ";" + i + ":-" + c + "px";
  var p = e + " solid " + n + "px;", d = ["position:absolute;width:" + o + "px;height:" + o + "px;z-index:-1;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + a + ";"];
  return '<div style="' + d.join("") + '"></div>';
}
function QY(r, e) {
  var t = "cubic-bezier(0.23,1,0.32,1)", a = " " + r / 2 + "s " + t, n = "opacity" + a + ",visibility" + a;
  return e || (a = " " + r + "s " + t, n += wt.transformSupported ? "," + lm + a : ",left" + a + ",top" + a), XY + ":" + n;
}
function _w(r, e, t) {
  var a = r.toFixed(0) + "px", n = e.toFixed(0) + "px";
  if (!wt.transformSupported)
    return t ? "top:" + n + ";left:" + a + ";" : [["top", n], ["left", a]];
  var i = wt.transform3dSupported, o = "translate" + (i ? "3d" : "") + "(" + a + "," + n + (i ? ",0" : "") + ")";
  return t ? "top:0;left:0;" + lm + ":" + o + ";" : [["top", 0], ["left", 0], [uL, o]];
}
function JY(r) {
  var e = [], t = r.get("fontSize"), a = r.getTextColor();
  a && e.push("color:" + a), e.push("font:" + r.getFont()), t && e.push("line-height:" + Math.round(t * 3 / 2) + "px");
  var n = r.get("textShadowColor"), i = r.get("textShadowBlur") || 0, o = r.get("textShadowOffsetX") || 0, s = r.get("textShadowOffsetY") || 0;
  return n && i && e.push("text-shadow:" + o + "px " + s + "px " + i + "px " + n), C(["decoration", "align"], function(l) {
    var u = r.get(l);
    u && e.push("text-" + l + ":" + u);
  }), e.join(";");
}
function t7(r, e, t) {
  var a = [], n = r.get("transitionDuration"), i = r.get("backgroundColor"), o = r.get("shadowBlur"), s = r.get("shadowColor"), l = r.get("shadowOffsetX"), u = r.get("shadowOffsetY"), f = r.getModel("textStyle"), h = yC(r, "html"), v = l + "px " + u + "px " + o + "px " + s;
  return a.push("box-shadow:" + v), e && n && a.push(QY(n, t)), i && a.push("background-color:" + i), C(["width", "color", "radius"], function(c) {
    var p = "border-" + c, d = kD(p), g = r.get(d);
    g != null && a.push(p + ":" + g + (c === "color" ? "" : "px"));
  }), a.push(JY(f)), h != null && a.push("padding:" + Mo(h).join("px ") + "px"), a.join(";") + ";";
}
function Sw(r, e, t, a, n) {
  var i = e && e.painter;
  if (t) {
    var o = i && i.getViewportRoot();
    o && C2(r, o, document.body, a, n);
  } else {
    r[0] = a, r[1] = n;
    var s = i && i.getViewportRootOffset();
    s && (r[0] += s.offsetLeft, r[1] += s.offsetTop);
  }
  r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight();
}
var e7 = (
  /** @class */
  function() {
    function r(e, t, a) {
      if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, wt.wxa)
        return null;
      var n = document.createElement("div");
      n.domBelongToZr = !0, this.el = n;
      var i = this._zr = t.getZr(), o = this._appendToBody = a && a.appendToBody;
      Sw(this._styleCoord, i, o, t.getWidth() / 2, t.getHeight() / 2), o ? document.body.appendChild(n) : e.appendChild(n), this._container = e;
      var s = this;
      n.onmouseenter = function() {
        s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
      }, n.onmousemove = function(l) {
        if (l = l || window.event, !s._enterable) {
          var u = i.handler, f = i.painter.getViewportRoot();
          Qe(f, l, !0), u.dispatch("mousemove", l);
        }
      }, n.onmouseleave = function() {
        s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
      };
    }
    return r.prototype.update = function(e) {
      var t = this._container, a = ZY(t, "position"), n = t.style;
      n.position !== "absolute" && a !== "absolute" && (n.position = "relative");
      var i = e.get("alwaysShowContent");
      i && this._moveIfResized(), this._alwaysShowContent = i, this.el.className = e.get("className") || "";
    }, r.prototype.show = function(e, t) {
      clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
      var a = this.el, n = a.style, i = this._styleCoord;
      a.innerHTML ? n.cssText = qY + t7(e, !this._firstShow, this._longHide) + _w(i[0], i[1], !0) + ("border-color:" + ci(t) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : n.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
    }, r.prototype.setContent = function(e, t, a, n, i) {
      var o = this.el;
      if (e == null) {
        o.innerHTML = "";
        return;
      }
      var s = "";
      if ($(i) && a.get("trigger") === "item" && !sL(a) && (s = jY(a, n, i)), $(e))
        o.innerHTML = e + s;
      else if (e) {
        o.innerHTML = "", z(e) || (e = [e]);
        for (var l = 0; l < e.length; l++)
          so(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);
        }
      }
    }, r.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, r.prototype.getSize = function() {
      var e = this.el;
      return [e.offsetWidth, e.offsetHeight];
    }, r.prototype.moveTo = function(e, t) {
      var a = this._styleCoord;
      if (Sw(a, this._zr, this._appendToBody, e, t), a[0] != null && a[1] != null) {
        var n = this.el.style, i = _w(a[0], a[1]);
        C(i, function(o) {
          n[o[0]] = o[1];
        });
      }
    }, r.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], t = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
    }, r.prototype.hide = function() {
      var e = this, t = this.el.style;
      t.visibility = "hidden", t.opacity = "0", wt.transform3dSupported && (t.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
        return e._longHide = !0;
      }, 500);
    }, r.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Y(this.hide, this), e)) : this.hide());
    }, r.prototype.isShow = function() {
      return this._show;
    }, r.prototype.dispose = function() {
      this.el.parentNode.removeChild(this.el);
    }, r;
  }()
);
const r7 = e7;
var a7 = (
  /** @class */
  function() {
    function r(e) {
      this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), ww(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
    }
    return r.prototype.update = function(e) {
      var t = e.get("alwaysShowContent");
      t && this._moveIfResized(), this._alwaysShowContent = t;
    }, r.prototype.show = function() {
      this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
    }, r.prototype.setContent = function(e, t, a, n, i) {
      var o = this;
      j(e) && It({}.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
      var s = a.getModel("textStyle");
      this.el = new Dt({
        style: {
          rich: t.richTextStyles,
          text: e,
          lineHeight: 22,
          borderWidth: 1,
          borderColor: n,
          textShadowColor: s.get("textShadowColor"),
          fill: a.get(["textStyle", "color"]),
          padding: yC(a, "richText"),
          verticalAlign: "top",
          align: "left"
        },
        z: a.get("z")
      }), C(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
        o.el.style[u] = a.get(u);
      }), C(["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;
      });
    }, r.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, r.prototype.getSize = function() {
      var e = this.el, t = this.el.getBoundingRect(), a = xw(e.style);
      return [t.width + a.left + a.right, t.height + a.top + a.bottom];
    }, r.prototype.moveTo = function(e, t) {
      var a = this.el;
      if (a) {
        var n = this._styleCoord;
        ww(n, this._zr, e, t), e = n[0], t = n[1];
        var i = a.style, o = Ra(i.borderWidth || 0), s = xw(i);
        a.x = e + o + s.left, a.y = t + o + s.top, a.markRedraw();
      }
    }, r.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], t = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
    }, r.prototype.hide = function() {
      this.el && this.el.hide(), this._show = !1;
    }, r.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Y(this.hide, this), e)) : this.hide());
    }, r.prototype.isShow = function() {
      return this._show;
    }, r.prototype.dispose = function() {
      this._zr.remove(this.el);
    }, r;
  }()
);
function Ra(r) {
  return Math.max(0, r);
}
function xw(r) {
  var e = Ra(r.shadowBlur || 0), t = Ra(r.shadowOffsetX || 0), a = Ra(r.shadowOffsetY || 0);
  return {
    left: Ra(e - t),
    right: Ra(e + t),
    top: Ra(e - a),
    bottom: Ra(e + a)
  };
}
function ww(r, e, t, a) {
  r[0] = t, r[1] = a, r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight();
}
const n7 = a7;
var i7 = new bt({
  shape: {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }
}), o7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a) {
      if (!(wt.node || !a.getDom())) {
        var n = t.getComponent("tooltip"), i = this._renderMode = fP(n.get("renderMode"));
        this._tooltipContent = i === "richText" ? new n7(a) : new r7(a.getDom(), a, {
          appendToBody: n.get("appendToBody", !0)
        });
      }
    }, e.prototype.render = function(t, a, n) {
      if (!(wt.node || !n.getDom())) {
        this.group.removeAll(), this._tooltipModel = t, this._ecModel = a, this._api = n;
        var i = this._tooltipContent;
        i.update(t), i.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && t.get("transitionDuration") ? No(this, "_updatePosition", 50, "fixRate") : Ks(this, "_updatePosition");
      }
    }, e.prototype._initGlobalListener = function() {
      var t = this._tooltipModel, a = t.get("triggerOn");
      ZI("itemTooltip", this._api, Y(function(n, i, o) {
        a !== "none" && (a.indexOf(n) >= 0 ? this._tryShow(i, o) : n === "leave" && this._hide(o));
      }, this));
    }, e.prototype._keepShow = function() {
      var t = this._tooltipModel, a = this._ecModel, n = this._api, i = t.get("triggerOn");
      if (this._lastX != null && this._lastY != null && i !== "none" && i !== "click") {
        var o = this;
        clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
          !n.isDisposed() && o.manuallyShowTip(t, a, n, {
            x: o._lastX,
            y: o._lastY,
            dataByCoordSys: o._lastDataByCoordSys
          });
        });
      }
    }, e.prototype.manuallyShowTip = function(t, a, n, i) {
      if (!(i.from === this.uid || wt.node || !n.getDom())) {
        var o = bw(i, n);
        this._ticket = "";
        var s = i.dataByCoordSys, l = f7(i, a, n);
        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: i.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 (i.tooltip && i.x != null && i.y != null) {
          var f = i7;
          f.x = i.x, f.y = i.y, f.update(), it(f).tooltipConfig = {
            name: null,
            option: i.tooltip
          }, this._tryShow({
            offsetX: i.x,
            offsetY: i.y,
            target: f
          }, o);
        } else if (s)
          this._tryShow({
            offsetX: i.x,
            offsetY: i.y,
            position: i.position,
            dataByCoordSys: s,
            tooltipOption: i.tooltipOption
          }, o);
        else if (i.seriesIndex != null) {
          if (this._manuallyAxisShowTip(t, a, n, i))
            return;
          var h = XI(i, a), v = h.point[0], c = h.point[1];
          v != null && c != null && this._tryShow({
            offsetX: v,
            offsetY: c,
            target: h.el,
            position: i.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
          i.x != null && i.y != null && (n.dispatchAction({
            type: "updateAxisPointer",
            x: i.x,
            y: i.y
          }), this._tryShow({
            offsetX: i.x,
            offsetY: i.y,
            position: i.position,
            target: n.getZr().findHover(i.x, i.y).target
          }, o));
      }
    }, e.prototype.manuallyHideTip = function(t, a, n, i) {
      var o = this._tooltipContent;
      this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, i.from !== this.uid && this._hide(bw(i, n));
    }, e.prototype._manuallyAxisShowTip = function(t, a, n, i) {
      var o = i.seriesIndex, s = i.dataIndex, l = a.getComponent("axisPointer").coordSysAxesInfo;
      if (!(o == null || s == null || l == null)) {
        var u = a.getSeriesByIndex(o);
        if (u) {
          var f = u.getData(), h = ss([f.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
          if (h.get("trigger") === "axis")
            return n.dispatchAction({
              type: "updateAxisPointer",
              seriesIndex: o,
              dataIndex: s,
              position: i.position
            }), !0;
        }
      }
    }, e.prototype._tryShow = function(t, a) {
      var n = t.target, i = this._tooltipModel;
      if (i) {
        this._lastX = t.offsetX, this._lastY = t.offsetY;
        var o = t.dataByCoordSys;
        if (o && o.length)
          this._showAxisTooltip(o, t);
        else if (n) {
          this._lastDataByCoordSys = null;
          var s, l;
          Xn(n, function(u) {
            if (it(u).dataIndex != null)
              return s = u, !0;
            if (it(u).tooltipConfig != null)
              return l = u, !0;
          }, !0), s ? this._showSeriesItemTooltip(t, s, a) : l ? this._showComponentItemTooltip(t, l, a) : this._hide(a);
        } else
          this._lastDataByCoordSys = null, this._hide(a);
      }
    }, e.prototype._showOrMove = function(t, a) {
      var n = t.get("showDelay");
      a = Y(a, this), clearTimeout(this._showTimout), n > 0 ? this._showTimout = setTimeout(a, n) : a();
    }, e.prototype._showAxisTooltip = function(t, a) {
      var n = this._ecModel, i = this._tooltipModel, o = [a.offsetX, a.offsetY], s = ss([a.tooltipOption], i), l = this._renderMode, u = [], f = oe("section", {
        blocks: [],
        noHeader: !0
      }), h = [], v = new Fv();
      C(t, function(m) {
        C(m.dataByAxis, function(_) {
          var S = n.getComponent(_.axisDim + "Axis", _.axisIndex), w = _.value;
          if (!(!S || w == null)) {
            var x = $I(w, S.axis, n, _.seriesDataIndices, _.valueLabelOpt), b = oe("section", {
              header: x,
              noHeader: !mr(x),
              sortBlocks: !0,
              blocks: []
            });
            f.blocks.push(b), C(_.seriesDataIndices, function(T) {
              var D = n.getSeriesByIndex(T.seriesIndex), A = T.dataIndexInside, M = D.getDataParams(A);
              if (!(M.dataIndex < 0)) {
                M.axisDim = _.axisDim, M.axisIndex = _.axisIndex, M.axisType = _.axisType, M.axisId = _.axisId, M.axisValue = fy(S.axis, {
                  value: w
                }), M.axisValueLabel = x, M.marker = v.makeTooltipMarker("item", ci(M.color), l);
                var I = o_(D.formatTooltip(A, !0, null)), L = I.frag;
                if (L) {
                  var E = ss([D], i).get("valueFormatter");
                  b.blocks.push(E ? V({
                    valueFormatter: E
                  }, L) : L);
                }
                I.text && h.push(I.text), u.push(M);
              }
            });
          }
        });
      }), f.blocks.reverse(), h.reverse();
      var c = a.position, p = s.get("order"), d = v_(f, v, l, p, n.get("useUTC"), s.get("textStyle"));
      d && h.unshift(d);
      var g = l === "richText" ? `

` : "<br/>", y = h.join(g);
      this._showOrMove(s, function() {
        this._updateContentNotChangedOnAxis(t, u) ? this._updatePosition(s, c, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, y, u, Math.random() + "", o[0], o[1], c, null, v);
      });
    }, e.prototype._showSeriesItemTooltip = function(t, a, n) {
      var i = this._ecModel, o = it(a), s = o.seriesIndex, l = i.getSeriesByIndex(s), u = o.dataModel || l, f = o.dataIndex, h = o.dataType, v = u.getData(h), c = this._renderMode, p = t.positionDefault, d = ss([v.getItemModel(f), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
        position: p
      } : null), g = d.get("trigger");
      if (!(g != null && g !== "item")) {
        var y = u.getDataParams(f, h), m = new Fv();
        y.marker = m.makeTooltipMarker("item", ci(y.color), c);
        var _ = o_(u.formatTooltip(f, !1, h)), S = d.get("order"), w = d.get("valueFormatter"), x = _.frag, b = x ? v_(w ? V({
          valueFormatter: w
        }, x) : x, m, c, S, i.get("useUTC"), d.get("textStyle")) : _.text, T = "item_" + u.name + "_" + f;
        this._showOrMove(d, function() {
          this._showTooltipContent(d, b, y, T, t.offsetX, t.offsetY, t.position, t.target, m);
        }), n({
          type: "showTip",
          dataIndexInside: f,
          dataIndex: v.getRawIndex(f),
          seriesIndex: s,
          from: this.uid
        });
      }
    }, e.prototype._showComponentItemTooltip = function(t, a, n) {
      var i = it(a), o = i.tooltipConfig, s = o.option || {};
      if ($(s)) {
        var l = s;
        s = {
          content: l,
          // Fixed formatter
          formatter: l
        };
      }
      var u = [s], f = this._ecModel.getComponent(i.componentMainType, i.componentIndex);
      f && u.push(f), u.push({
        formatter: s.content
      });
      var h = t.positionDefault, v = ss(u, this._tooltipModel, h ? {
        position: h
      } : null), c = v.get("content"), p = Math.random() + "", d = new Fv();
      this._showOrMove(v, function() {
        var g = rt(v.get("formatterParams") || {});
        this._showTooltipContent(v, c, g, p, t.offsetX, t.offsetY, t.position, a, d);
      }), n({
        type: "showTip",
        from: this.uid
      });
    }, e.prototype._showTooltipContent = function(t, a, n, i, o, s, l, u, f) {
      if (this._ticket = "", !(!t.get("showContent") || !t.get("show"))) {
        var h = this._tooltipContent;
        h.setEnterable(t.get("enterable"));
        var v = t.get("formatter");
        l = l || t.get("position");
        var c = a, p = this._getNearestPoint([o, s], n, t.get("trigger"), t.get("borderColor")), d = p.color;
        if (v)
          if ($(v)) {
            var g = t.ecModel.get("useUTC"), y = z(n) ? n[0] : n, m = y && y.axisType && y.axisType.indexOf("time") >= 0;
            c = v, m && (c = bh(y.axisValue, c, g)), c = VD(c, n, !0);
          } else if (q(v)) {
            var _ = Y(function(S, w) {
              S === this._ticket && (h.setContent(w, f, t, d, l), this._updatePosition(t, l, o, s, h, n, u));
            }, this);
            this._ticket = i, c = v(n, i, _);
          } else
            c = v;
        h.setContent(c, f, t, d, l), h.show(t, d), this._updatePosition(t, l, o, s, h, n, u);
      }
    }, e.prototype._getNearestPoint = function(t, a, n, i) {
      if (n === "axis" || z(a))
        return {
          color: i || (this._renderMode === "html" ? "#fff" : "none")
        };
      if (!z(a))
        return {
          color: i || a.color || a.borderColor
        };
    }, e.prototype._updatePosition = function(t, a, n, i, o, s, l) {
      var u = this._api.getWidth(), f = this._api.getHeight();
      a = a || t.get("position");
      var h = o.getSize(), v = t.get("align"), c = t.get("verticalAlign"), p = l && l.getBoundingRect().clone();
      if (l && p.applyTransform(l.transform), q(a) && (a = a([n, i], s, o.el, p, {
        viewSize: [u, f],
        contentSize: h.slice()
      })), z(a))
        n = H(a[0], u), i = H(a[1], f);
      else if (j(a)) {
        var d = a;
        d.width = h[0], d.height = h[1];
        var g = re(d, {
          width: u,
          height: f
        });
        n = g.x, i = g.y, v = null, c = null;
      } else if ($(a) && l) {
        var y = u7(a, p, h, t.get("borderWidth"));
        n = y[0], i = y[1];
      } else {
        var y = s7(n, i, o, u, f, v ? null : 20, c ? null : 20);
        n = y[0], i = y[1];
      }
      if (v && (n -= Tw(v) ? h[0] / 2 : v === "right" ? h[0] : 0), c && (i -= Tw(c) ? h[1] / 2 : c === "bottom" ? h[1] : 0), sL(t)) {
        var y = l7(n, i, o, u, f);
        n = y[0], i = y[1];
      }
      o.moveTo(n, i);
    }, e.prototype._updateContentNotChangedOnAxis = function(t, a) {
      var n = this._lastDataByCoordSys, i = this._cbParamsList, o = !!n && n.length === t.length;
      return o && C(n, function(s, l) {
        var u = s.dataByAxis || [], f = t[l] || {}, h = f.dataByAxis || [];
        o = o && u.length === h.length, o && C(u, function(v, c) {
          var p = h[c] || {}, d = v.seriesDataIndices || [], g = p.seriesDataIndices || [];
          o = o && v.value === p.value && v.axisType === p.axisType && v.axisId === p.axisId && d.length === g.length, o && C(d, function(y, m) {
            var _ = g[m];
            o = o && y.seriesIndex === _.seriesIndex && y.dataIndex === _.dataIndex;
          }), i && C(v.seriesDataIndices, function(y) {
            var m = y.seriesIndex, _ = a[m], S = i[m];
            _ && S && S.data !== _.data && (o = !1);
          });
        });
      }), this._lastDataByCoordSys = t, this._cbParamsList = a, !!o;
    }, e.prototype._hide = function(t) {
      this._lastDataByCoordSys = null, t({
        type: "hideTip",
        from: this.uid
      });
    }, e.prototype.dispose = function(t, a) {
      wt.node || !a.getDom() || (Ks(this, "_updatePosition"), this._tooltipContent.dispose(), Wd("itemTooltip", a));
    }, e.type = "tooltip", e;
  }($t)
);
function ss(r, e, t) {
  var a = e.ecModel, n;
  t ? (n = new kt(t, a, a), n = new kt(e.option, n, a)) : n = e;
  for (var i = r.length - 1; i >= 0; i--) {
    var o = r[i];
    o && (o instanceof kt && (o = o.get("tooltip", !0)), $(o) && (o = {
      formatter: o
    }), o && (n = new kt(o, n, a)));
  }
  return n;
}
function bw(r, e) {
  return r.dispatchAction || Y(e.dispatchAction, e);
}
function s7(r, e, t, a, n, i, o) {
  var s = t.getSize(), l = s[0], u = s[1];
  return i != null && (r + l + i + 2 > a ? r -= l + i : r += i), o != null && (e + u + o > n ? e -= u + o : e += o), [r, e];
}
function l7(r, e, t, a, n) {
  var i = t.getSize(), o = i[0], s = i[1];
  return r = Math.min(r + o, a) - o, e = Math.min(e + s, n) - s, r = Math.max(r, 0), e = Math.max(e, 0), [r, e];
}
function u7(r, e, t, a) {
  var n = t[0], i = t[1], o = Math.ceil(Math.SQRT2 * a) + 8, s = 0, l = 0, u = e.width, f = e.height;
  switch (r) {
    case "inside":
      s = e.x + u / 2 - n / 2, l = e.y + f / 2 - i / 2;
      break;
    case "top":
      s = e.x + u / 2 - n / 2, l = e.y - i - o;
      break;
    case "bottom":
      s = e.x + u / 2 - n / 2, l = e.y + f + o;
      break;
    case "left":
      s = e.x - n - o, l = e.y + f / 2 - i / 2;
      break;
    case "right":
      s = e.x + u + o, l = e.y + f / 2 - i / 2;
  }
  return [s, l];
}
function Tw(r) {
  return r === "center" || r === "middle";
}
function f7(r, e, t) {
  var a = wg(r).queryOptionMap, n = a.keys()[0];
  if (!(!n || n === "series")) {
    var i = cl(e, n, a.get(n), {
      useDefault: !1,
      enableAll: !1,
      enableNone: !1
    }), o = i.models[0];
    if (o) {
      var s = t.getViewOfComponentModel(o), l;
      if (s.group.traverse(function(u) {
        var f = it(u).tooltipConfig;
        if (f && f.name === r.name)
          return l = u, !0;
      }), l)
        return {
          componentMainType: n,
          componentIndex: o.componentIndex,
          el: l
        };
    }
  }
}
const h7 = o7;
function v7(r) {
  pt(El), r.registerComponentModel(UY), r.registerComponentView(h7), r.registerAction({
    type: "showTip",
    event: "showTip",
    update: "tooltip:manuallyShowTip"
  }, Xt), r.registerAction({
    type: "hideTip",
    event: "hideTip",
    update: "tooltip:manuallyHideTip"
  }, Xt);
}
var c7 = ["rect", "polygon", "keep", "clear"];
function p7(r, e) {
  var t = Pt(r ? r.brush : []);
  if (t.length) {
    var a = [];
    C(t, function(l) {
      var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
      u instanceof Array && (a = a.concat(u));
    });
    var n = r && r.toolbox;
    z(n) && (n = n[0]), n || (n = {
      feature: {}
    }, r.toolbox = [n]);
    var i = n.feature || (n.feature = {}), o = i.brush || (i.brush = {}), s = o.type || (o.type = []);
    s.push.apply(s, a), d7(s), e && !s.length && s.push.apply(s, c7);
  }
}
function d7(r) {
  var e = {};
  C(r, function(t) {
    e[t] = 1;
  }), r.length = 0, C(e, function(t, a) {
    r.push(a);
  });
}
var Dw = C;
function Cw(r) {
  if (r) {
    for (var e in r)
      if (r.hasOwnProperty(e))
        return !0;
  }
}
function qd(r, e, t) {
  var a = {};
  return Dw(e, function(i) {
    var o = a[i] = n();
    Dw(r[i], function(s, l) {
      if (he.isValidType(l)) {
        var u = {
          type: l,
          visual: s
        };
        t && t(u, i), o[l] = new he(u), l === "opacity" && (u = rt(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new he(u));
      }
    });
  }), a;
  function n() {
    var i = function() {
    };
    i.prototype.__hidden = i.prototype;
    var o = new i();
    return o;
  }
}
function hL(r, e, t) {
  var a;
  C(t, function(n) {
    e.hasOwnProperty(n) && Cw(e[n]) && (a = !0);
  }), a && C(t, function(n) {
    e.hasOwnProperty(n) && Cw(e[n]) ? r[n] = rt(e[n]) : delete r[n];
  });
}
function g7(r, e, t, a, n, i) {
  var o = {};
  C(r, function(h) {
    var v = he.prepareVisualTypes(e[h]);
    o[h] = v;
  });
  var s;
  function l(h) {
    return Jg(t, s, h);
  }
  function u(h, v) {
    AC(t, s, h, v);
  }
  i == null ? t.each(f) : t.each([i], f);
  function f(h, v) {
    s = i == null ? h : v;
    var c = t.getRawDataItem(s);
    if (!(c && c.visualMap === !1))
      for (var p = a.call(n, h), d = e[p], g = o[p], y = 0, m = g.length; y < m; y++) {
        var _ = g[y];
        d[_] && d[_].applyVisual(h, l, u);
      }
  }
}
function y7(r, e, t, a) {
  var n = {};
  return C(r, function(i) {
    var o = he.prepareVisualTypes(e[i]);
    n[i] = o;
  }), {
    progress: function(o, s) {
      var l;
      a != null && (l = s.getDimensionIndex(a));
      function u(w) {
        return Jg(s, h, w);
      }
      function f(w, x) {
        AC(s, h, w, x);
      }
      for (var h, v = s.getStore(); (h = o.next()) != null; ) {
        var c = s.getRawDataItem(h);
        if (!(c && c.visualMap === !1))
          for (var p = a != null ? v.get(l, h) : h, d = t(p), g = e[d], y = n[d], m = 0, _ = y.length; m < _; m++) {
            var S = y[m];
            g[S] && g[S].applyVisual(p, u, f);
          }
      }
    }
  };
}
function m7(r) {
  var e = r.brushType, t = {
    point: function(a) {
      return Aw[e].point(a, t, r);
    },
    rect: function(a) {
      return Aw[e].rect(a, t, r);
    }
  };
  return t;
}
var Aw = {
  lineX: Mw(0),
  lineY: Mw(1),
  rect: {
    point: function(r, e, t) {
      return r && t.boundingRect.contain(r[0], r[1]);
    },
    rect: function(r, e, t) {
      return r && t.boundingRect.intersect(r);
    }
  },
  polygon: {
    point: function(r, e, t) {
      return r && t.boundingRect.contain(r[0], r[1]) && Gn(t.range, r[0], r[1]);
    },
    rect: function(r, e, t) {
      var a = t.range;
      if (!r || a.length <= 1)
        return !1;
      var n = r.x, i = r.y, o = r.width, s = r.height, l = a[0];
      if (Gn(a, n, i) || Gn(a, n + o, i) || Gn(a, n, i + s) || Gn(a, n + o, i + s) || ht.create(r).contain(l[0], l[1]) || ys(n, i, n + o, i, a) || ys(n, i, n, i + s, a) || ys(n + o, i, n + o, i + s, a) || ys(n, i + s, n + o, i + s, a))
        return !0;
    }
  }
};
function Mw(r) {
  var e = ["x", "y"], t = ["width", "height"];
  return {
    point: function(a, n, i) {
      if (a) {
        var o = i.range, s = a[r];
        return ls(s, o);
      }
    },
    rect: function(a, n, i) {
      if (a) {
        var o = i.range, s = [a[e[r]], a[e[r]] + a[t[r]]];
        return s[1] < s[0] && s.reverse(), ls(s[0], o) || ls(s[1], o) || ls(o[0], s) || ls(o[1], s);
      }
    }
  };
}
function ls(r, e) {
  return e[0] <= r && r <= e[1];
}
var Iw = ["inBrush", "outOfBrush"], np = "__ecBrushSelect", Kd = "__ecInBrushSelectEvent";
function vL(r) {
  r.eachComponent({
    mainType: "brush"
  }, function(e) {
    var t = e.brushTargetManager = new om(e.option, r);
    t.setInputRanges(e.areas, r);
  });
}
function _7(r, e, t) {
  var a = [], n, i;
  r.eachComponent({
    mainType: "brush"
  }, function(o) {
    t && t.type === "takeGlobalCursor" && o.setBrushOption(t.key === "brush" ? t.brushOption : {
      brushType: !1
    });
  }), vL(r), r.eachComponent({
    mainType: "brush"
  }, function(o, s) {
    var l = {
      brushId: o.id,
      brushIndex: s,
      brushName: o.name,
      areas: rt(o.areas),
      selected: []
    };
    a.push(l);
    var u = o.option, f = u.brushLink, h = [], v = [], c = [], p = !1;
    s || (n = u.throttleType, i = u.throttleDelay);
    var d = G(o.areas, function(w) {
      var x = b7[w.brushType], b = tt({
        boundingRect: x ? x(w) : void 0
      }, w);
      return b.selectors = m7(b), b;
    }), g = qd(o.option, Iw, function(w) {
      w.mappingMethod = "fixed";
    });
    z(f) && C(f, function(w) {
      h[w] = 1;
    });
    function y(w) {
      return f === "all" || !!h[w];
    }
    function m(w) {
      return !!w.length;
    }
    r.eachSeries(function(w, x) {
      var b = c[x] = [];
      w.subType === "parallel" ? _(w, x) : S(w, x, b);
    });
    function _(w, x) {
      var b = w.coordinateSystem;
      p = p || b.hasAxisBrushed(), y(x) && b.eachActiveState(w.getData(), function(T, D) {
        T === "active" && (v[D] = 1);
      });
    }
    function S(w, x, b) {
      if (!(!w.brushSelector || w7(o, x)) && (C(d, function(D) {
        o.brushTargetManager.controlSeries(D, w, r) && b.push(D), p = p || m(b);
      }), y(x) && m(b))) {
        var T = w.getData();
        T.each(function(D) {
          Lw(w, b, T, D) && (v[D] = 1);
        });
      }
    }
    r.eachSeries(function(w, x) {
      var b = {
        seriesId: w.id,
        seriesIndex: x,
        seriesName: w.name,
        dataIndex: []
      };
      l.selected.push(b);
      var T = c[x], D = w.getData(), A = y(x) ? function(M) {
        return v[M] ? (b.dataIndex.push(D.getRawIndex(M)), "inBrush") : "outOfBrush";
      } : function(M) {
        return Lw(w, T, D, M) ? (b.dataIndex.push(D.getRawIndex(M)), "inBrush") : "outOfBrush";
      };
      (y(x) ? p : m(T)) && g7(Iw, g, D, A);
    });
  }), S7(e, n, i, a, t);
}
function S7(r, e, t, a, n) {
  if (n) {
    var i = r.getZr();
    if (!i[Kd]) {
      i[np] || (i[np] = x7);
      var o = No(i, np, t, e);
      o(r, a);
    }
  }
}
function x7(r, e) {
  if (!r.isDisposed()) {
    var t = r.getZr();
    t[Kd] = !0, r.dispatchAction({
      type: "brushSelect",
      batch: e
    }), t[Kd] = !1;
  }
}
function Lw(r, e, t, a) {
  for (var n = 0, i = e.length; n < i; n++) {
    var o = e[n];
    if (r.brushSelector(a, t, o.selectors, o))
      return !0;
  }
}
function w7(r, e) {
  var t = r.option.seriesIndex;
  return t != null && t !== "all" && (z(t) ? ct(t, e) < 0 : e !== t);
}
var b7 = {
  rect: function(r) {
    return Ew(r.range);
  },
  polygon: function(r) {
    for (var e, t = r.range, a = 0, n = t.length; a < n; a++) {
      e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
      var i = t[a];
      i[0] < e[0][0] && (e[0][0] = i[0]), i[0] > e[0][1] && (e[0][1] = i[0]), i[1] < e[1][0] && (e[1][0] = i[1]), i[1] > e[1][1] && (e[1][1] = i[1]);
    }
    return e && Ew(e);
  }
};
function Ew(r) {
  return new ht(r[0][0], r[1][0], r[0][1] - r[0][0], r[1][1] - r[1][0]);
}
var T7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a) {
      this.ecModel = t, this.api = a, this.model, (this._brushController = new Gy(a.getZr())).on("brush", Y(this._onBrush, this)).mount();
    }, e.prototype.render = function(t, a, n, i) {
      this.model = t, this._updateController(t, a, n, i);
    }, e.prototype.updateTransform = function(t, a, n, i) {
      vL(a), this._updateController(t, a, n, i);
    }, e.prototype.updateVisual = function(t, a, n, i) {
      this.updateTransform(t, a, n, i);
    }, e.prototype.updateView = function(t, a, n, i) {
      this._updateController(t, a, n, i);
    }, e.prototype._updateController = function(t, a, n, i) {
      (!i || i.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice());
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.prototype._onBrush = function(t) {
      var a = this.model.id, n = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel);
      (!t.isEnd || t.removeOnClick) && this.api.dispatchAction({
        type: "brush",
        brushId: a,
        areas: rt(n),
        $from: a
      }), t.isEnd && this.api.dispatchAction({
        type: "brushEnd",
        brushId: a,
        areas: rt(n),
        $from: a
      });
    }, e.type = "brush", e;
  }($t)
);
const D7 = T7;
var C7 = "#ddd", A7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.areas = [], t.brushOption = {}, t;
    }
    return e.prototype.optionUpdated = function(t, a) {
      var n = this.option;
      !a && hL(n, t, ["inBrush", "outOfBrush"]);
      var i = n.inBrush = n.inBrush || {};
      n.outOfBrush = n.outOfBrush || {
        color: C7
      }, i.hasOwnProperty("liftZ") || (i.liftZ = 5);
    }, e.prototype.setAreas = function(t) {
      ({}).NODE_ENV !== "production" && (Q(z(t)), C(t, function(a) {
        Q(a.brushType, "Illegal areas");
      })), t && (this.areas = G(t, function(a) {
        return Pw(this.option, a);
      }, this));
    }, e.prototype.setBrushOption = function(t) {
      this.brushOption = Pw(this.option, t), 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;
  }(St)
);
function Pw(r, e) {
  return ft({
    brushType: r.brushType,
    brushMode: r.brushMode,
    transformable: r.transformable,
    brushStyle: new kt(r.brushStyle).getItemStyle(),
    removeOnClick: r.removeOnClick,
    z: r.z
  }, e, !0);
}
const M7 = A7;
var I7 = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], L7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      return r !== null && r.apply(this, arguments) || this;
    }
    return e.prototype.render = function(t, a, n) {
      var i, o, s;
      a.eachComponent({
        mainType: "brush"
      }, function(l) {
        i = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
      }), this._brushType = i, this._brushMode = o, C(t.get("type", !0), function(l) {
        t.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === i) ? "emphasis" : "normal");
      });
    }, e.prototype.updateView = function(t, a, n) {
      this.render(t, a, n);
    }, e.prototype.getIcons = function() {
      var t = this.model, a = t.get("icon", !0), n = {};
      return C(t.get("type", !0), function(i) {
        a[i] && (n[i] = a[i]);
      }), n;
    }, e.prototype.onclick = function(t, a, n) {
      var i = this._brushType, o = this._brushMode;
      n === "clear" ? (a.dispatchAction({
        type: "axisAreaSelect",
        intervals: []
      }), a.dispatchAction({
        type: "brush",
        command: "clear",
        // Clear all areas of all brush components.
        areas: []
      })) : a.dispatchAction({
        type: "takeGlobalCursor",
        key: "brush",
        brushOption: {
          brushType: n === "keep" ? i : i === n ? !1 : n,
          brushMode: n === "keep" ? o === "multiple" ? "single" : "multiple" : o
        }
      });
    }, e.getDefaultOption = function(t) {
      var a = {
        show: !0,
        type: I7.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: t.getLocaleModel().get(["toolbox", "brush", "title"])
      };
      return a;
    }, e;
  }(ar)
);
const E7 = L7;
function P7(r) {
  r.registerComponentView(D7), r.registerComponentModel(M7), r.registerPreprocessor(p7), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, _7), r.registerAction({
    type: "brush",
    event: "brush",
    update: "updateVisual"
  }, function(e, t) {
    t.eachComponent({
      mainType: "brush",
      query: e
    }, function(a) {
      a.setAreas(e.areas);
    });
  }), r.registerAction({
    type: "brushSelect",
    event: "brushSelected",
    update: "none"
  }, Xt), r.registerAction({
    type: "brushEnd",
    event: "brushEnd",
    update: "none"
  }, Xt), Ki("brush", E7);
}
var R7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, t;
    }
    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;
  }(St)
), N7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.render = function(t, a, n) {
      if (this.group.removeAll(), !!t.get("show")) {
        var i = this.group, o = t.getModel("textStyle"), s = t.getModel("subtextStyle"), l = t.get("textAlign"), u = ut(t.get("textBaseline"), t.get("textVerticalAlign")), f = new Dt({
          style: Ot(o, {
            text: t.get("text"),
            fill: o.getTextColor()
          }, {
            disableBox: !0
          }),
          z2: 10
        }), h = f.getBoundingRect(), v = t.get("subtext"), c = new Dt({
          style: Ot(s, {
            text: v,
            fill: s.getTextColor(),
            y: h.height + t.get("itemGap"),
            verticalAlign: "top"
          }, {
            disableBox: !0
          }),
          z2: 10
        }), p = t.get("link"), d = t.get("sublink"), g = t.get("triggerEvent", !0);
        f.silent = !p && !g, c.silent = !d && !g, p && f.on("click", function() {
          Sf(p, "_" + t.get("target"));
        }), d && c.on("click", function() {
          Sf(d, "_" + t.get("subtarget"));
        }), it(f).eventData = it(c).eventData = g ? {
          componentType: "title",
          componentIndex: t.componentIndex
        } : null, i.add(f), v && i.add(c);
        var y = i.getBoundingRect(), m = t.getBoxLayoutParams();
        m.width = y.width, m.height = y.height;
        var _ = re(m, {
          width: n.getWidth(),
          height: n.getHeight()
        }, t.get("padding"));
        l || (l = t.get("left") || t.get("right"), l === "middle" && (l = "center"), l === "right" ? _.x += _.width : l === "center" && (_.x += _.width / 2)), u || (u = t.get("top") || t.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? _.y += _.height : u === "middle" && (_.y += _.height / 2), u = u || "top"), i.x = _.x, i.y = _.y, i.markRedraw();
        var S = {
          align: l,
          verticalAlign: u
        };
        f.setStyle(S), c.setStyle(S), y = i.getBoundingRect();
        var w = _.margin, x = t.getItemStyle(["color", "opacity"]);
        x.fill = t.get("backgroundColor");
        var b = new bt({
          shape: {
            x: y.x - w[3],
            y: y.y - w[0],
            width: y.width + w[1] + w[3],
            height: y.height + w[0] + w[2],
            r: t.get("borderRadius")
          },
          style: x,
          subPixelOptimize: !0,
          silent: !0
        });
        i.add(b);
      }
    }, e.type = "title", e;
  }($t)
);
function O7(r) {
  r.registerComponentModel(R7), r.registerComponentView(N7);
}
var k7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.layoutMode = "box", t;
    }
    return e.prototype.init = function(t, a, n) {
      this.mergeDefaultAndTheme(t, n), this._initData();
    }, e.prototype.mergeOption = function(t) {
      r.prototype.mergeOption.apply(this, arguments), this._initData();
    }, e.prototype.setCurrentIndex = function(t) {
      t == null && (t = this.option.currentIndex);
      var a = this._data.count();
      this.option.loop ? t = (t % a + a) % a : (t >= a && (t = a - 1), t < 0 && (t = 0)), this.option.currentIndex = t;
    }, e.prototype.getCurrentIndex = function() {
      return this.option.currentIndex;
    }, e.prototype.isIndexMax = function() {
      return this.getCurrentIndex() >= this._data.count() - 1;
    }, e.prototype.setPlayState = function(t) {
      this.option.autoPlay = !!t;
    }, e.prototype.getPlayState = function() {
      return !!this.option.autoPlay;
    }, e.prototype._initData = function() {
      var t = this.option, a = t.data || [], n = t.axisType, i = this._names = [], o;
      n === "category" ? (o = [], C(a, function(u, f) {
        var h = ee(wo(u), ""), v;
        j(u) ? (v = rt(u), v.value = f) : v = f, o.push(v), i.push(h);
      })) : o = a;
      var s = {
        category: "ordinal",
        time: "time",
        value: "number"
      }[n] || "number", l = this._data = new Ce([{
        name: "value",
        type: s
      }], this);
      l.initData(o, i);
    }, 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;
  }(St)
);
const Rw = k7;
var cL = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "timeline.slider", e.defaultOption = sn(Rw.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;
  }(Rw)
);
te(cL, Xg.prototype);
const V7 = cL;
var B7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "timeline", e;
  }($t)
);
const z7 = B7;
var G7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e(t, a, n, i) {
      var o = r.call(this, t, a, n) || this;
      return o.type = i || "value", o;
    }
    return e.prototype.getLabelModel = function() {
      return this.model.getModel("label");
    }, e.prototype.isHorizontal = function() {
      return this.model.get("orient") === "horizontal";
    }, e;
  }(Mr)
);
const F7 = G7;
var ip = Math.PI, Nw = Tt(), H7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function(t, a) {
      this.api = a;
    }, e.prototype.render = function(t, a, n) {
      if (this.model = t, this.api = n, this.ecModel = a, this.group.removeAll(), t.get("show", !0)) {
        var i = this._layout(t, n), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(i, t);
        t.formatTooltip = function(u) {
          var f = l.scale.getLabel({
            value: u
          });
          return oe("nameValue", {
            noName: !0,
            value: f
          });
        }, C(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
          this["_render" + u](i, o, l, t);
        }, this), this._renderAxisLabel(i, s, l, t), this._position(i, t);
      }
      this._doPlayStop(), this._updateTicksStatus();
    }, e.prototype.remove = function() {
      this._clearTimer(), this.group.removeAll();
    }, e.prototype.dispose = function() {
      this._clearTimer();
    }, e.prototype._layout = function(t, a) {
      var n = t.get(["label", "position"]), i = t.get("orient"), o = $7(t, a), s;
      n == null || n === "auto" ? s = i === "horizontal" ? o.y + o.height / 2 < a.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < a.getWidth() / 2 ? "+" : "-" : $(n) ? s = {
        horizontal: {
          top: "-",
          bottom: "+"
        },
        vertical: {
          left: "-",
          right: "+"
        }
      }[i][n] : s = n;
      var l = {
        horizontal: "center",
        vertical: s >= 0 || s === "+" ? "left" : "right"
      }, u = {
        horizontal: s >= 0 || s === "+" ? "top" : "bottom",
        vertical: "middle"
      }, f = {
        horizontal: 0,
        vertical: ip / 2
      }, h = i === "vertical" ? o.height : o.width, v = t.getModel("controlStyle"), c = v.get("show", !0), p = c ? v.get("itemSize") : 0, d = c ? v.get("itemGap") : 0, g = p + d, y = t.get(["label", "rotate"]) || 0;
      y = y * ip / 180;
      var m, _, S, w = v.get("position", !0), x = c && v.get("showPlayBtn", !0), b = c && v.get("showPrevBtn", !0), T = c && v.get("showNextBtn", !0), D = 0, A = h;
      w === "left" || w === "bottom" ? (x && (m = [0, 0], D += g), b && (_ = [D, 0], D += g), T && (S = [A - p, 0], A -= g)) : (x && (m = [A - p, 0], A -= g), b && (_ = [0, 0], D += g), T && (S = [A - p, 0], A -= g));
      var M = [D, A];
      return t.get("inverse") && M.reverse(), {
        viewRect: o,
        mainLength: h,
        orient: i,
        rotation: f[i],
        labelRotation: y,
        labelPosOpt: s,
        labelAlign: t.get(["label", "align"]) || l[i],
        labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || u[i],
        // Based on mainGroup.
        playPosition: m,
        prevBtnPosition: _,
        nextBtnPosition: S,
        axisExtent: M,
        controlSize: p,
        controlGap: d
      };
    }, e.prototype._position = function(t, a) {
      var n = this._mainGroup, i = this._labelGroup, o = t.viewRect;
      if (t.orient === "vertical") {
        var s = lr(), l = o.x, u = o.y + o.height;
        Ur(s, s, [-l, -u]), yi(s, s, -ip / 2), Ur(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
      }
      var f = m(o), h = m(n.getBoundingRect()), v = m(i.getBoundingRect()), c = [n.x, n.y], p = [i.x, i.y];
      p[0] = c[0] = f[0][0];
      var d = t.labelPosOpt;
      if (d == null || $(d)) {
        var g = d === "+" ? 0 : 1;
        _(c, h, f, 1, g), _(p, v, f, 1, 1 - g);
      } else {
        var g = d >= 0 ? 0 : 1;
        _(c, h, f, 1, g), p[1] = c[1] + d;
      }
      n.setPosition(c), i.setPosition(p), n.rotation = i.rotation = t.rotation, y(n), y(i);
      function y(S) {
        S.originX = f[0][0] - S.x, S.originY = f[1][0] - S.y;
      }
      function m(S) {
        return [[S.x, S.x + S.width], [S.y, S.y + S.height]];
      }
      function _(S, w, x, b, T) {
        S[b] += x[b][T] - w[b][T];
      }
    }, e.prototype._createAxis = function(t, a) {
      var n = a.getData(), i = a.get("axisType"), o = W7(a, i);
      o.getTicks = function() {
        return n.mapArray(["value"], function(u) {
          return {
            value: u
          };
        });
      };
      var s = n.getDataExtent("value");
      o.setExtent(s[0], s[1]), o.calcNiceTicks();
      var l = new F7("value", o, t.axisExtent, i);
      return l.model = a, l;
    }, e.prototype._createGroup = function(t) {
      var a = this[t] = new nt();
      return this.group.add(a), a;
    }, e.prototype._renderAxisLine = function(t, a, n, i) {
      var o = n.getExtent();
      if (i.get(["lineStyle", "show"])) {
        var s = new le({
          shape: {
            x1: o[0],
            y1: 0,
            x2: o[1],
            y2: 0
          },
          style: V({
            lineCap: "round"
          }, i.getModel("lineStyle").getLineStyle()),
          silent: !0,
          z2: 1
        });
        a.add(s);
        var l = this._progressLine = new le({
          shape: {
            x1: o[0],
            x2: this._currentPointer ? this._currentPointer.x : o[0],
            y1: 0,
            y2: 0
          },
          style: tt({
            lineCap: "round",
            lineWidth: s.style.lineWidth
          }, i.getModel(["progress", "lineStyle"]).getLineStyle()),
          silent: !0,
          z2: 1
        });
        a.add(l);
      }
    }, e.prototype._renderAxisTick = function(t, a, n, i) {
      var o = this, s = i.getData(), l = n.scale.getTicks();
      this._tickSymbols = [], C(l, function(u) {
        var f = n.dataToCoord(u.value), h = s.getItemModel(u.value), v = h.getModel("itemStyle"), c = h.getModel(["emphasis", "itemStyle"]), p = h.getModel(["progress", "itemStyle"]), d = {
          x: f,
          y: 0,
          onclick: Y(o._changeTimeline, o, u.value)
        }, g = Ow(h, v, a, d);
        g.ensureState("emphasis").style = c.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), ri(g);
        var y = it(g);
        h.get("tooltip") ? (y.dataIndex = u.value, y.dataModel = i) : y.dataIndex = y.dataModel = null, o._tickSymbols.push(g);
      });
    }, e.prototype._renderAxisLabel = function(t, a, n, i) {
      var o = this, s = n.getLabelModel();
      if (s.get("show")) {
        var l = i.getData(), u = n.getViewLabels();
        this._tickLabels = [], C(u, function(f) {
          var h = f.tickValue, v = l.getItemModel(h), c = v.getModel("label"), p = v.getModel(["emphasis", "label"]), d = v.getModel(["progress", "label"]), g = n.dataToCoord(f.tickValue), y = new Dt({
            x: g,
            y: 0,
            rotation: t.labelRotation - t.rotation,
            onclick: Y(o._changeTimeline, o, h),
            silent: !1,
            style: Ot(c, {
              text: f.formattedLabel,
              align: t.labelAlign,
              verticalAlign: t.labelBaseline
            })
          });
          y.ensureState("emphasis").style = Ot(p), y.ensureState("progress").style = Ot(d), a.add(y), ri(y), Nw(y).dataIndex = h, o._tickLabels.push(y);
        });
      }
    }, e.prototype._renderControl = function(t, a, n, i) {
      var o = t.controlSize, s = t.rotation, l = i.getModel("controlStyle").getItemStyle(), u = i.getModel(["emphasis", "controlStyle"]).getItemStyle(), f = i.getPlayState(), h = i.get("inverse", !0);
      v(t.nextBtnPosition, "next", Y(this._changeTimeline, this, h ? "-" : "+")), v(t.prevBtnPosition, "prev", Y(this._changeTimeline, this, h ? "+" : "-")), v(t.playPosition, f ? "stop" : "play", Y(this._handlePlayClick, this, !f), !0);
      function v(c, p, d, g) {
        if (c) {
          var y = Tr(ut(i.get(["controlStyle", p + "BtnSize"]), o), o), m = [0, -y / 2, y, y], _ = U7(i, p + "Icon", m, {
            x: c[0],
            y: c[1],
            originX: o / 2,
            originY: 0,
            rotation: g ? -s : 0,
            rectHover: !0,
            style: l,
            onclick: d
          });
          _.ensureState("emphasis").style = u, a.add(_), ri(_);
        }
      }
    }, e.prototype._renderCurrentPointer = function(t, a, n, i) {
      var o = i.getData(), s = i.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, f = {
        onCreate: function(h) {
          h.draggable = !0, h.drift = Y(u._handlePointerDrag, u), h.ondragend = Y(u._handlePointerDragend, u), kw(h, u._progressLine, s, n, i, !0);
        },
        onUpdate: function(h) {
          kw(h, u._progressLine, s, n, i);
        }
      };
      this._currentPointer = Ow(l, l, this._mainGroup, {}, this._currentPointer, f);
    }, e.prototype._handlePlayClick = function(t) {
      this._clearTimer(), this.api.dispatchAction({
        type: "timelinePlayChange",
        playState: t,
        from: this.uid
      });
    }, e.prototype._handlePointerDrag = function(t, a, n) {
      this._clearTimer(), this._pointerChangeTimeline([n.offsetX, n.offsetY]);
    }, e.prototype._handlePointerDragend = function(t) {
      this._pointerChangeTimeline([t.offsetX, t.offsetY], !0);
    }, e.prototype._pointerChangeTimeline = function(t, a) {
      var n = this._toAxisCoord(t)[0], i = this._axis, o = or(i.getExtent().slice());
      n > o[1] && (n = o[1]), n < o[0] && (n = o[0]), this._currentPointer.x = n, this._currentPointer.markRedraw();
      var s = this._progressLine;
      s && (s.shape.x2 = n, s.dirty());
      var l = this._findNearestTick(n), u = this.model;
      (a || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
    }, e.prototype._doPlayStop = function() {
      var t = this;
      this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
        var a = t.model;
        t._changeTimeline(a.getCurrentIndex() + (a.get("rewind", !0) ? -1 : 1));
      }, this.model.get("playInterval")));
    }, e.prototype._toAxisCoord = function(t) {
      var a = this._mainGroup.getLocalTransform();
      return br(t, a, !0);
    }, e.prototype._findNearestTick = function(t) {
      var a = this.model.getData(), n = 1 / 0, i, o = this._axis;
      return a.each(["value"], function(s, l) {
        var u = o.dataToCoord(s), f = Math.abs(u - t);
        f < n && (n = f, i = l);
      }), i;
    }, e.prototype._clearTimer = function() {
      this._timer && (clearTimeout(this._timer), this._timer = null);
    }, e.prototype._changeTimeline = function(t) {
      var a = this.model.getCurrentIndex();
      t === "+" ? t = a + 1 : t === "-" && (t = a - 1), this.api.dispatchAction({
        type: "timelineChange",
        currentIndex: t,
        from: this.uid
      });
    }, e.prototype._updateTicksStatus = function() {
      var t = this.model.getCurrentIndex(), a = this._tickSymbols, n = this._tickLabels;
      if (a)
        for (var i = 0; i < a.length; i++)
          a && a[i] && a[i].toggleState("progress", i < t);
      if (n)
        for (var i = 0; i < n.length; i++)
          n && n[i] && n[i].toggleState("progress", Nw(n[i]).dataIndex <= t);
    }, e.type = "timeline.slider", e;
  }(z7)
);
function W7(r, e) {
  if (e = e || r.get("type"), e)
    switch (e) {
      case "category":
        return new oy({
          ordinalMeta: r.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new dA({
          locale: r.ecModel.getLocaleModel(),
          useUTC: r.ecModel.get("useUTC")
        });
      default:
        return new en();
    }
}
function $7(r, e) {
  return re(r.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  }, r.get("padding"));
}
function U7(r, e, t, a) {
  var n = a.style, i = yl(r.get(["controlStyle", e]), a || {}, new ht(t[0], t[1], t[2], t[3]));
  return n && i.setStyle(n), i;
}
function Ow(r, e, t, a, n, i) {
  var o = e.get("color");
  if (n)
    n.setColor(o), t.add(n), i && i.onUpdate(n);
  else {
    var s = r.get("symbol");
    n = Jt(s, -1, -1, 2, 2, o), n.setStyle("strokeNoScale", !0), t.add(n), i && i.onCreate(n);
  }
  var l = e.getItemStyle(["color"]);
  n.setStyle(l), a = ft({
    rectHover: !0,
    z2: 100
  }, a, !0);
  var u = Sl(r.get("symbolSize"));
  a.scaleX = u[0] / 2, a.scaleY = u[1] / 2;
  var f = Oo(r.get("symbolOffset"), u);
  f && (a.x = (a.x || 0) + f[0], a.y = (a.y || 0) + f[1]);
  var h = r.get("symbolRotate");
  return a.rotation = (h || 0) * Math.PI / 180 || 0, n.attr(a), n.updateTransform(), n;
}
function kw(r, e, t, a, n, i) {
  if (!r.dragging) {
    var o = n.getModel("checkpointStyle"), s = a.dataToCoord(n.getData().get("value", t));
    if (i || !o.get("animation", !0))
      r.attr({
        x: s,
        y: 0
      }), e && e.attr({
        shape: {
          x2: s
        }
      });
    else {
      var l = {
        duration: o.get("animationDuration", !0),
        easing: o.get("animationEasing", !0)
      };
      r.stopAnimation(null, !0), r.animateTo({
        x: s,
        y: 0
      }, l), e && e.animateTo({
        shape: {
          x2: s
        }
      }, l);
    }
  }
}
const Y7 = H7;
function Z7(r) {
  r.registerAction({
    type: "timelineChange",
    event: "timelineChanged",
    update: "prepareAndUpdate"
  }, function(e, t, a) {
    var n = t.getComponent("timeline");
    return n && e.currentIndex != null && (n.setCurrentIndex(e.currentIndex), !n.get("loop", !0) && n.isIndexMax() && n.getPlayState() && (n.setPlayState(!1), a.dispatchAction({
      type: "timelinePlayChange",
      playState: !1,
      from: e.from
    }))), t.resetOption("timeline", {
      replaceMerge: n.get("replaceMerge", !0)
    }), tt({
      currentIndex: n.option.currentIndex
    }, e);
  }), r.registerAction({
    type: "timelinePlayChange",
    event: "timelinePlayChanged",
    update: "update"
  }, function(e, t) {
    var a = t.getComponent("timeline");
    a && e.playState != null && a.setPlayState(e.playState);
  });
}
function X7(r) {
  var e = r && r.timeline;
  z(e) || (e = e ? [e] : []), C(e, function(t) {
    t && q7(t);
  });
}
function q7(r) {
  var e = r.type, t = {
    number: "value",
    time: "time"
  };
  if (t[e] && (r.axisType = t[e], delete r.type), Vw(r), Wn(r, "controlPosition")) {
    var a = r.controlStyle || (r.controlStyle = {});
    Wn(a, "position") || (a.position = r.controlPosition), a.position === "none" && !Wn(a, "show") && (a.show = !1, delete a.position), delete r.controlPosition;
  }
  C(r.data || [], function(n) {
    j(n) && !z(n) && (!Wn(n, "value") && Wn(n, "name") && (n.value = n.name), Vw(n));
  });
}
function Vw(r) {
  var e = r.itemStyle || (r.itemStyle = {}), t = e.emphasis || (e.emphasis = {}), a = r.label || r.label || {}, n = a.normal || (a.normal = {}), i = {
    normal: 1,
    emphasis: 1
  };
  C(a, function(o, s) {
    !i[s] && !Wn(n, s) && (n[s] = o);
  }), t.label && !Wn(a, "emphasis") && (a.emphasis = t.label, delete t.label);
}
function Wn(r, e) {
  return r.hasOwnProperty(e);
}
function K7(r) {
  r.registerComponentModel(V7), r.registerComponentView(Y7), r.registerSubTypeDefaulter("timeline", function() {
    return "slider";
  }), Z7(r), r.registerPreprocessor(X7);
}
function um(r, e) {
  if (!r)
    return !1;
  for (var t = z(r) ? r : [r], a = 0; a < t.length; a++)
    if (t[a] && t[a][e])
      return !0;
  return !1;
}
function Iu(r) {
  ui(r, "label", ["show"]);
}
var Lu = Tt(), pL = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.createdBySelf = !1, t;
    }
    return e.prototype.init = function(t, a, n) {
      if ({}.NODE_ENV !== "production" && this.type === "marker")
        throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
      this.mergeDefaultAndTheme(t, n), this._mergeOption(t, n, !1, !0);
    }, e.prototype.isAnimationEnabled = function() {
      if (wt.node)
        return !1;
      var t = this.__hostSeries;
      return this.getShallow("animation") && t && t.isAnimationEnabled();
    }, e.prototype.mergeOption = function(t, a) {
      this._mergeOption(t, a, !1, !1);
    }, e.prototype._mergeOption = function(t, a, n, i) {
      var o = this.mainType;
      n || a.eachSeries(function(s) {
        var l = s.get(this.mainType, !0), u = Lu(s)[o];
        if (!l || !l.data) {
          Lu(s)[o] = null;
          return;
        }
        u ? u._mergeOption(l, a, !0) : (i && Iu(l), C(l.data, function(f) {
          f instanceof Array ? (Iu(f[0]), Iu(f[1])) : Iu(f);
        }), u = this.createMarkerModelFromSeries(l, this, a), V(u, {
          mainType: this.mainType,
          // Use the same series index and name
          seriesIndex: s.seriesIndex,
          name: s.name,
          createdBySelf: !0
        }), u.__hostSeries = s), Lu(s)[o] = u;
      }, this);
    }, e.prototype.formatTooltip = function(t, a, n) {
      var i = this.getData(), o = this.getRawValue(t), s = i.getName(t);
      return oe("section", {
        header: this.name,
        blocks: [oe("nameValue", {
          name: s,
          value: o,
          noName: !s,
          noValue: o == null
        })]
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.setData = function(t) {
      this._data = t;
    }, e.getMarkerModelFromSeries = function(t, a) {
      return Lu(t)[a];
    }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  }(St)
);
te(pL, Xg.prototype);
const nn = pL;
var j7 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.createMarkerModelFromSeries = function(t, a, n) {
      return new e(t, a, n);
    }, 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;
  }(nn)
);
const Q7 = j7;
function jd(r) {
  return !(isNaN(parseFloat(r.x)) && isNaN(parseFloat(r.y)));
}
function J7(r) {
  return !isNaN(parseFloat(r.x)) && !isNaN(parseFloat(r.y));
}
function Eu(r, e, t, a, n, i) {
  var o = [], s = tn(
    e,
    a
    /* , otherDataDim */
  ), l = s ? e.getCalculationInfo("stackResultDimension") : a, u = fm(e, l, r), f = e.indicesOfNearest(l, u)[0];
  o[n] = e.get(t, f), o[i] = e.get(l, f);
  var h = e.get(a, f), v = zr(e.get(a, f));
  return v = Math.min(v, 20), v >= 0 && (o[i] = +o[i].toFixed(v)), [o, h];
}
var op = {
  min: ot(Eu, "min"),
  max: ot(Eu, "max"),
  average: ot(Eu, "average"),
  median: ot(Eu, "median")
};
function ul(r, e) {
  if (e) {
    var t = r.getData(), a = r.coordinateSystem, n = a && a.dimensions;
    if (!J7(e) && !z(e.coord) && z(n)) {
      var i = dL(e, t, a, r);
      if (e = rt(e), e.type && op[e.type] && i.baseAxis && i.valueAxis) {
        var o = ct(n, i.baseAxis.dim), s = ct(n, i.valueAxis.dim), l = op[e.type](t, i.baseDataDim, i.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 || !z(n))
      e.coord = [];
    else
      for (var u = e.coord, f = 0; f < 2; f++)
        op[u[f]] && (u[f] = fm(t, t.mapDimension(n[f]), u[f]));
    return e;
  }
}
function dL(r, e, t, a) {
  var n = {};
  return r.valueIndex != null || r.valueDim != null ? (n.valueDataDim = r.valueIndex != null ? e.getDimension(r.valueIndex) : r.valueDim, n.valueAxis = t.getAxis(t9(a, n.valueDataDim)), n.baseAxis = t.getOtherAxis(n.valueAxis), n.baseDataDim = e.mapDimension(n.baseAxis.dim)) : (n.baseAxis = a.getBaseAxis(), n.valueAxis = t.getOtherAxis(n.baseAxis), n.baseDataDim = e.mapDimension(n.baseAxis.dim), n.valueDataDim = e.mapDimension(n.valueAxis.dim)), n;
}
function t9(r, e) {
  var t = r.getData().getDimensionInfo(e);
  return t && t.coordDim;
}
function fl(r, e) {
  return r && r.containData && e.coord && !jd(e) ? r.containData(e.coord) : !0;
}
function e9(r, e, t) {
  return r && r.containZone && e.coord && t.coord && !jd(e) && !jd(t) ? r.containZone(e.coord, t.coord) : !0;
}
function gL(r, e) {
  return r ? function(t, a, n, i) {
    var o = i < 2 ? t.coord && t.coord[i] : t.value;
    return Ya(o, e[i]);
  } : function(t, a, n, i) {
    return Ya(t.value, e[i]);
  };
}
function fm(r, e, t) {
  if (t === "average") {
    var a = 0, n = 0;
    return r.each(e, function(i, o) {
      isNaN(i) || (a += i, n++);
    }), a / n;
  } else
    return t === "median" ? r.getMedian(e) : r.getDataExtent(e)[t === "max" ? 1 : 0];
}
var sp = Tt(), r9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.init = function() {
      this.markerGroupMap = K();
    }, e.prototype.render = function(t, a, n) {
      var i = this, o = this.markerGroupMap;
      o.each(function(s) {
        sp(s).keep = !1;
      }), a.eachSeries(function(s) {
        var l = nn.getMarkerModelFromSeries(s, i.type);
        l && i.renderSeries(s, l, a, n);
      }), o.each(function(s) {
        !sp(s).keep && i.group.remove(s.group);
      });
    }, e.prototype.markKeep = function(t) {
      sp(t).keep = !0;
    }, e.prototype.toggleBlurSeries = function(t, a) {
      var n = this;
      C(t, function(i) {
        var o = nn.getMarkerModelFromSeries(i, n.type);
        if (o) {
          var s = o.getData();
          s.eachItemGraphicEl(function(l) {
            l && (a ? $T(l) : Mg(l));
          });
        }
      });
    }, e.type = "marker", e;
  }($t)
);
const hm = r9;
function Bw(r, e, t) {
  var a = e.coordinateSystem;
  r.each(function(n) {
    var i = r.getItemModel(n), o, s = H(i.get("x"), t.getWidth()), l = H(i.get("y"), t.getHeight());
    if (!isNaN(s) && !isNaN(l))
      o = [s, l];
    else if (e.getMarkerPosition)
      o = e.getMarkerPosition(r.getValues(r.dimensions, n));
    else if (a) {
      var u = r.get(a.dimensions[0], n), f = r.get(a.dimensions[1], n);
      o = a.dataToPoint([u, f]);
    }
    isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), r.setItemLayout(n, o);
  });
}
var a9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.updateTransform = function(t, a, n) {
      a.eachSeries(function(i) {
        var o = nn.getMarkerModelFromSeries(i, "markPoint");
        o && (Bw(o.getData(), i, n), this.markerGroupMap.get(i.id).updateLayout());
      }, this);
    }, e.prototype.renderSeries = function(t, a, n, i) {
      var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, new Dl()), h = n9(o, t, a);
      a.setData(h), Bw(a.getData(), t, i), h.each(function(v) {
        var c = h.getItemModel(v), p = c.getShallow("symbol"), d = c.getShallow("symbolSize"), g = c.getShallow("symbolRotate"), y = c.getShallow("symbolOffset"), m = c.getShallow("symbolKeepAspect");
        if (q(p) || q(d) || q(g) || q(y)) {
          var _ = a.getRawValue(v), S = a.getDataParams(v);
          q(p) && (p = p(_, S)), q(d) && (d = d(_, S)), q(g) && (g = g(_, S)), q(y) && (y = y(_, S));
        }
        var w = c.getModel("itemStyle").getItemStyle(), x = _l(l, "color");
        w.fill || (w.fill = x), h.setItemVisual(v, {
          symbol: p,
          symbolSize: d,
          symbolRotate: g,
          symbolOffset: y,
          symbolKeepAspect: m,
          style: w
        });
      }), f.updateData(h), this.group.add(f.group), h.eachItemGraphicEl(function(v) {
        v.traverse(function(c) {
          it(c).dataModel = a;
        });
      }), this.markKeep(f), f.group.silent = a.get("silent") || t.get("silent");
    }, e.type = "markPoint", e;
  }(hm)
);
function n9(r, e, t) {
  var a;
  r ? a = G(r && r.dimensions, function(s) {
    var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
    return V(V({}, l), {
      name: s,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : a = [{
    name: "value",
    type: "float"
  }];
  var n = new Ce(a, t), i = G(t.get("data"), ot(ul, e));
  r && (i = Et(i, ot(fl, r)));
  var o = gL(!!r, a);
  return n.initData(i, null, o), n;
}
const i9 = a9;
function o9(r) {
  r.registerComponentModel(Q7), r.registerComponentView(i9), r.registerPreprocessor(function(e) {
    um(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  });
}
var s9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.createMarkerModelFromSeries = function(t, a, n) {
      return new e(t, a, n);
    }, 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;
  }(nn)
);
const l9 = s9;
var Pu = Tt(), u9 = function(r, e, t, a) {
  var n = r.getData(), i;
  if (z(a))
    i = a;
  else {
    var o = a.type;
    if (o === "min" || o === "max" || o === "average" || o === "median" || a.xAxis != null || a.yAxis != null) {
      var s = void 0, l = void 0;
      if (a.yAxis != null || a.xAxis != null)
        s = e.getAxis(a.yAxis != null ? "y" : "x"), l = jt(a.yAxis, a.xAxis);
      else {
        var u = dL(a, n, e, r);
        s = u.valueAxis;
        var f = eA(n, u.valueDataDim);
        l = fm(n, f, o);
      }
      var h = s.dim === "x" ? 0 : 1, v = 1 - h, c = rt(a), p = {
        coord: []
      };
      c.type = null, c.coord = [], c.coord[v] = -1 / 0, p.coord[v] = 1 / 0;
      var d = t.get("precision");
      d >= 0 && Ct(l) && (l = +l.toFixed(Math.min(d, 20))), c.coord[h] = p.coord[h] = l, i = [c, p, {
        type: o,
        valueIndex: a.valueIndex,
        // Force to use the value of calculated value.
        value: l
      }];
    } else
      ({}).NODE_ENV !== "production" && Sr("Invalid markLine data."), i = [];
  }
  var g = [ul(r, i[0]), ul(r, i[1]), V({}, i[2])];
  return g[2].type = g[2].type || null, ft(g[2], g[0]), ft(g[2], g[1]), g;
};
function jf(r) {
  return !isNaN(r) && !isFinite(r);
}
function zw(r, e, t, a) {
  var n = 1 - r, i = a.dimensions[r];
  return jf(e[n]) && jf(t[n]) && e[r] === t[r] && a.getAxis(i).containData(e[r]);
}
function f9(r, e) {
  if (r.type === "cartesian2d") {
    var t = e[0].coord, a = e[1].coord;
    if (t && a && (zw(1, t, a, r) || zw(0, t, a, r)))
      return !0;
  }
  return fl(r, e[0]) && fl(r, e[1]);
}
function lp(r, e, t, a, n) {
  var i = a.coordinateSystem, o = r.getItemModel(e), s, l = H(o.get("x"), n.getWidth()), u = H(o.get("y"), n.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (a.getMarkerPosition)
      s = a.getMarkerPosition(r.getValues(r.dimensions, e));
    else {
      var f = i.dimensions, h = r.get(f[0], e), v = r.get(f[1], e);
      s = i.dataToPoint([h, v]);
    }
    if (Si(i, "cartesian2d")) {
      var c = i.getAxis("x"), p = i.getAxis("y"), f = i.dimensions;
      jf(r.get(f[0], e)) ? s[0] = c.toGlobalCoord(c.getExtent()[t ? 0 : 1]) : jf(r.get(f[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[t ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  r.setItemLayout(e, s);
}
var h9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.updateTransform = function(t, a, n) {
      a.eachSeries(function(i) {
        var o = nn.getMarkerModelFromSeries(i, "markLine");
        if (o) {
          var s = o.getData(), l = Pu(o).from, u = Pu(o).to;
          l.each(function(f) {
            lp(l, f, !0, i, n), lp(u, f, !1, i, n);
          }), s.each(function(f) {
            s.setItemLayout(f, [l.getItemLayout(f), u.getItemLayout(f)]);
          }), this.markerGroupMap.get(i.id).updateLayout();
        }
      }, this);
    }, e.prototype.renderSeries = function(t, a, n, i) {
      var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, new Ny());
      this.group.add(f.group);
      var h = v9(o, t, a), v = h.from, c = h.to, p = h.line;
      Pu(a).from = v, Pu(a).to = c, a.setData(p);
      var d = a.get("symbol"), g = a.get("symbolSize"), y = a.get("symbolRotate"), m = a.get("symbolOffset");
      z(d) || (d = [d, d]), z(g) || (g = [g, g]), z(y) || (y = [y, y]), z(m) || (m = [m, m]), h.from.each(function(S) {
        _(v, S, !0), _(c, S, !1);
      }), p.each(function(S) {
        var w = p.getItemModel(S).getModel("lineStyle").getLineStyle();
        p.setItemLayout(S, [v.getItemLayout(S), c.getItemLayout(S)]), w.stroke == null && (w.stroke = v.getItemVisual(S, "style").fill), p.setItemVisual(S, {
          fromSymbolKeepAspect: v.getItemVisual(S, "symbolKeepAspect"),
          fromSymbolOffset: v.getItemVisual(S, "symbolOffset"),
          fromSymbolRotate: v.getItemVisual(S, "symbolRotate"),
          fromSymbolSize: v.getItemVisual(S, "symbolSize"),
          fromSymbol: v.getItemVisual(S, "symbol"),
          toSymbolKeepAspect: c.getItemVisual(S, "symbolKeepAspect"),
          toSymbolOffset: c.getItemVisual(S, "symbolOffset"),
          toSymbolRotate: c.getItemVisual(S, "symbolRotate"),
          toSymbolSize: c.getItemVisual(S, "symbolSize"),
          toSymbol: c.getItemVisual(S, "symbol"),
          style: w
        });
      }), f.updateData(p), h.line.eachItemGraphicEl(function(S) {
        it(S).dataModel = a, S.traverse(function(w) {
          it(w).dataModel = a;
        });
      });
      function _(S, w, x) {
        var b = S.getItemModel(w);
        lp(S, w, x, t, i);
        var T = b.getModel("itemStyle").getItemStyle();
        T.fill == null && (T.fill = _l(l, "color")), S.setItemVisual(w, {
          symbolKeepAspect: b.get("symbolKeepAspect"),
          // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
          symbolOffset: ut(b.get("symbolOffset", !0), m[x ? 0 : 1]),
          symbolRotate: ut(b.get("symbolRotate", !0), y[x ? 0 : 1]),
          // TODO: when 2d array is supported, it should ignore parent
          symbolSize: ut(b.get("symbolSize"), g[x ? 0 : 1]),
          symbol: ut(b.get("symbol", !0), d[x ? 0 : 1]),
          style: T
        });
      }
      this.markKeep(f), f.group.silent = a.get("silent") || t.get("silent");
    }, e.type = "markLine", e;
  }(hm)
);
function v9(r, e, t) {
  var a;
  r ? a = G(r && r.dimensions, function(u) {
    var f = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
    return V(V({}, f), {
      name: u,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : a = [{
    name: "value",
    type: "float"
  }];
  var n = new Ce(a, t), i = new Ce(a, t), o = new Ce([], t), s = G(t.get("data"), ot(u9, e, r, t));
  r && (s = Et(s, ot(f9, r)));
  var l = gL(!!r, a);
  return n.initData(G(s, function(u) {
    return u[0];
  }), null, l), i.initData(G(s, function(u) {
    return u[1];
  }), null, l), o.initData(G(s, function(u) {
    return u[2];
  })), o.hasItemOption = !0, {
    from: n,
    to: i,
    line: o
  };
}
const c9 = h9;
function p9(r) {
  r.registerComponentModel(l9), r.registerComponentView(c9), r.registerPreprocessor(function(e) {
    um(e.series, "markLine") && (e.markLine = e.markLine || {});
  });
}
var d9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.createMarkerModelFromSeries = function(t, a, n) {
      return new e(t, a, n);
    }, 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;
  }(nn)
);
const g9 = d9;
var Ru = Tt(), y9 = function(r, e, t, a) {
  var n = a[0], i = a[1];
  if (!(!n || !i)) {
    var o = ul(r, n), s = ul(r, i), l = o.coord, u = s.coord;
    l[0] = jt(l[0], -1 / 0), l[1] = jt(l[1], -1 / 0), u[0] = jt(u[0], 1 / 0), u[1] = jt(u[1], 1 / 0);
    var f = fg([{}, o, s]);
    return f.coord = [o.coord, s.coord], f.x0 = o.x, f.y0 = o.y, f.x1 = s.x, f.y1 = s.y, f;
  }
};
function Qf(r) {
  return !isNaN(r) && !isFinite(r);
}
function Gw(r, e, t, a) {
  var n = 1 - r;
  return Qf(e[n]) && Qf(t[n]);
}
function m9(r, e) {
  var t = e.coord[0], a = e.coord[1], n = {
    coord: t,
    x: e.x0,
    y: e.y0
  }, i = {
    coord: a,
    x: e.x1,
    y: e.y1
  };
  return Si(r, "cartesian2d") ? t && a && (Gw(1, t, a) || Gw(0, t, a)) ? !0 : e9(r, n, i) : fl(r, n) || fl(r, i);
}
function Fw(r, e, t, a, n) {
  var i = a.coordinateSystem, o = r.getItemModel(e), s, l = H(o.get(t[0]), n.getWidth()), u = H(o.get(t[1]), n.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (a.getMarkerPosition) {
      var f = r.getValues(["x0", "y0"], e), h = r.getValues(["x1", "y1"], e), v = i.clampData(f), c = i.clampData(h), p = [];
      t[0] === "x0" ? p[0] = v[0] > c[0] ? h[0] : f[0] : p[0] = v[0] > c[0] ? f[0] : h[0], t[1] === "y0" ? p[1] = v[1] > c[1] ? h[1] : f[1] : p[1] = v[1] > c[1] ? f[1] : h[1], s = a.getMarkerPosition(p, t, !0);
    } else {
      var d = r.get(t[0], e), g = r.get(t[1], e), y = [d, g];
      i.clampData && i.clampData(y, y), s = i.dataToPoint(y, !0);
    }
    if (Si(i, "cartesian2d")) {
      var m = i.getAxis("x"), _ = i.getAxis("y"), d = r.get(t[0], e), g = r.get(t[1], e);
      Qf(d) ? s[0] = m.toGlobalCoord(m.getExtent()[t[0] === "x0" ? 0 : 1]) : Qf(g) && (s[1] = _.toGlobalCoord(_.getExtent()[t[1] === "y0" ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  return s;
}
var Hw = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], _9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.updateTransform = function(t, a, n) {
      a.eachSeries(function(i) {
        var o = nn.getMarkerModelFromSeries(i, "markArea");
        if (o) {
          var s = o.getData();
          s.each(function(l) {
            var u = G(Hw, function(h) {
              return Fw(s, l, h, i, n);
            });
            s.setItemLayout(l, u);
            var f = s.getItemGraphicEl(l);
            f.setShape("points", u);
          });
        }
      }, this);
    }, e.prototype.renderSeries = function(t, a, n, i) {
      var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, {
        group: new nt()
      });
      this.group.add(f.group), this.markKeep(f);
      var h = S9(o, t, a);
      a.setData(h), h.each(function(v) {
        var c = G(Hw, function(T) {
          return Fw(h, v, T, t, i);
        }), p = o.getAxis("x").scale, d = o.getAxis("y").scale, g = p.getExtent(), y = d.getExtent(), m = [p.parse(h.get("x0", v)), p.parse(h.get("x1", v))], _ = [d.parse(h.get("y0", v)), d.parse(h.get("y1", v))];
        or(m), or(_);
        var S = !(g[0] > m[1] || g[1] < m[0] || y[0] > _[1] || y[1] < _[0]), w = !S;
        h.setItemLayout(v, {
          points: c,
          allClipped: w
        });
        var x = h.getItemModel(v).getModel("itemStyle").getItemStyle(), b = _l(l, "color");
        x.fill || (x.fill = b, $(x.fill) && (x.fill = sf(x.fill, 0.4))), x.stroke || (x.stroke = b), h.setItemVisual(v, "style", x);
      }), h.diff(Ru(f).data).add(function(v) {
        var c = h.getItemLayout(v);
        if (!c.allClipped) {
          var p = new Be({
            shape: {
              points: c.points
            }
          });
          h.setItemGraphicEl(v, p), f.group.add(p);
        }
      }).update(function(v, c) {
        var p = Ru(f).data.getItemGraphicEl(c), d = h.getItemLayout(v);
        d.allClipped ? p && f.group.remove(p) : (p ? Mt(p, {
          shape: {
            points: d.points
          }
        }, a, v) : p = new Be({
          shape: {
            points: d.points
          }
        }), h.setItemGraphicEl(v, p), f.group.add(p));
      }).remove(function(v) {
        var c = Ru(f).data.getItemGraphicEl(v);
        f.group.remove(c);
      }).execute(), h.eachItemGraphicEl(function(v, c) {
        var p = h.getItemModel(c), d = h.getItemVisual(c, "style");
        v.useStyle(h.getItemVisual(c, "style")), pe(v, ie(p), {
          labelFetcher: a,
          labelDataIndex: c,
          defaultText: h.getName(c) || "",
          inheritColor: $(d.fill) ? sf(d.fill, 1) : "#000"
        }), ce(v, p), Wt(v, null, null, p.get(["emphasis", "disabled"])), it(v).dataModel = a;
      }), Ru(f).data = h, f.group.silent = a.get("silent") || t.get("silent");
    }, e.type = "markArea", e;
  }(hm)
);
function S9(r, e, t) {
  var a, n, i = ["x0", "y0", "x1", "y1"];
  if (r) {
    var o = G(r && r.dimensions, function(u) {
      var f = e.getData(), h = f.getDimensionInfo(f.mapDimension(u)) || {};
      return V(V({}, h), {
        name: u,
        // DON'T use ordinalMeta to parse and collect ordinal.
        ordinalMeta: null
      });
    });
    n = G(i, function(u, f) {
      return {
        name: u,
        type: o[f % 2].type
      };
    }), a = new Ce(n, t);
  } else
    n = [{
      name: "value",
      type: "float"
    }], a = new Ce(n, t);
  var s = G(t.get("data"), ot(y9, e, r, t));
  r && (s = Et(s, ot(m9, r)));
  var l = r ? function(u, f, h, v) {
    var c = u.coord[Math.floor(v / 2)][v % 2];
    return Ya(c, n[v]);
  } : function(u, f, h, v) {
    return Ya(u.value, n[v]);
  };
  return a.initData(s, null, l), a.hasItemOption = !0, a;
}
const x9 = _9;
function w9(r) {
  r.registerComponentModel(g9), r.registerComponentView(x9), r.registerPreprocessor(function(e) {
    um(e.series, "markArea") && (e.markArea = e.markArea || {});
  });
}
var b9 = function(r, e) {
  if (e === "all")
    return {
      type: "all",
      title: r.getLocaleModel().get(["legend", "selector", "all"])
    };
  if (e === "inverse")
    return {
      type: "inverse",
      title: r.getLocaleModel().get(["legend", "selector", "inverse"])
    };
}, T9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.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
      }, t;
    }
    return e.prototype.init = function(t, a, n) {
      this.mergeDefaultAndTheme(t, n), t.selected = t.selected || {}, this._updateSelector(t);
    }, e.prototype.mergeOption = function(t, a) {
      r.prototype.mergeOption.call(this, t, a), this._updateSelector(t);
    }, e.prototype._updateSelector = function(t) {
      var a = t.selector, n = this.ecModel;
      a === !0 && (a = t.selector = ["all", "inverse"]), z(a) && C(a, function(i, o) {
        $(i) && (i = {
          type: i
        }), a[o] = ft(i, b9(n, i.type));
      });
    }, e.prototype.optionUpdated = function() {
      this._updateData(this.ecModel);
      var t = this._data;
      if (t[0] && this.get("selectedMode") === "single") {
        for (var a = !1, n = 0; n < t.length; n++) {
          var i = t[n].get("name");
          if (this.isSelected(i)) {
            this.select(i), a = !0;
            break;
          }
        }
        !a && this.select(t[0].get("name"));
      }
    }, e.prototype._updateData = function(t) {
      var a = [], n = [];
      t.eachRawSeries(function(l) {
        var u = l.name;
        n.push(u);
        var f;
        if (l.legendVisualProvider) {
          var h = l.legendVisualProvider, v = h.getAllNames();
          t.isSeriesFiltered(l) || (n = n.concat(v)), v.length ? a = a.concat(v) : f = !0;
        } else
          f = !0;
        f && xg(l) && a.push(l.name);
      }), this._availableNames = n;
      var i = this.get("data") || a, o = K(), s = G(i, function(l) {
        return ($(l) || Ct(l)) && (l = {
          name: l
        }), o.get(l.name) ? null : (o.set(l.name, !0), new kt(l, this, this.ecModel));
      }, this);
      this._data = Et(s, function(l) {
        return !!l;
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.select = function(t) {
      var a = this.option.selected, n = this.get("selectedMode");
      if (n === "single") {
        var i = this._data;
        C(i, function(o) {
          a[o.get("name")] = !1;
        });
      }
      a[t] = !0;
    }, e.prototype.unSelect = function(t) {
      this.get("selectedMode") !== "single" && (this.option.selected[t] = !1);
    }, e.prototype.toggleSelected = function(t) {
      var a = this.option.selected;
      a.hasOwnProperty(t) || (a[t] = !0), this[a[t] ? "unSelect" : "select"](t);
    }, e.prototype.allSelect = function() {
      var t = this._data, a = this.option.selected;
      C(t, function(n) {
        a[n.get("name", !0)] = !0;
      });
    }, e.prototype.inverseSelect = function() {
      var t = this._data, a = this.option.selected;
      C(t, function(n) {
        var i = n.get("name", !0);
        a.hasOwnProperty(i) || (a[i] = !0), a[i] = !a[i];
      });
    }, e.prototype.isSelected = function(t) {
      var a = this.option.selected;
      return !(a.hasOwnProperty(t) && !a[t]) && ct(this._availableNames, t) >= 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;
  }(St)
);
const Qd = T9;
var Hi = ot, Jd = C, Nu = nt, D9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.newlineDisabled = !1, t;
    }
    return e.prototype.init = function() {
      this.group.add(this._contentGroup = new Nu()), this.group.add(this._selectorGroup = new Nu()), this._isFirstRender = !0;
    }, e.prototype.getContentGroup = function() {
      return this._contentGroup;
    }, e.prototype.getSelectorGroup = function() {
      return this._selectorGroup;
    }, e.prototype.render = function(t, a, n) {
      var i = this._isFirstRender;
      if (this._isFirstRender = !1, this.resetInner(), !!t.get("show", !0)) {
        var o = t.get("align"), s = t.get("orient");
        (!o || o === "auto") && (o = t.get("left") === "right" && s === "vertical" ? "right" : "left");
        var l = t.get("selector", !0), u = t.get("selectorPosition", !0);
        l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, t, a, n, l, s, u);
        var f = t.getBoxLayoutParams(), h = {
          width: n.getWidth(),
          height: n.getHeight()
        }, v = t.get("padding"), c = re(f, h, v), p = this.layoutInner(t, o, c, i, l, u), d = re(tt({
          width: p.width,
          height: p.height
        }, f), h, v);
        this.group.x = d.x - p.x, this.group.y = d.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = nL(p, t));
      }
    }, e.prototype.resetInner = function() {
      this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
    }, e.prototype.renderInner = function(t, a, n, i, o, s, l) {
      var u = this.getContentGroup(), f = K(), h = a.get("selectedMode"), v = [];
      n.eachRawSeries(function(c) {
        !c.get("legendHoverLink") && v.push(c.id);
      }), Jd(a.getData(), function(c, p) {
        var d = c.get("name");
        if (!this.newlineDisabled && (d === "" || d === `
`)) {
          var g = new Nu();
          g.newline = !0, u.add(g);
          return;
        }
        var y = n.getSeriesByName(d)[0];
        if (!f.get(d)) {
          if (y) {
            var m = y.getData(), _ = m.getVisual("legendLineStyle") || {}, S = m.getVisual("legendIcon"), w = m.getVisual("style"), x = this._createItem(y, d, p, c, a, t, _, w, S, h, i);
            x.on("click", Hi(Ww, d, null, i, v)).on("mouseover", Hi(tg, y.name, null, i, v)).on("mouseout", Hi(eg, y.name, null, i, v)), f.set(d, !0);
          } else
            n.eachRawSeries(function(b) {
              if (!f.get(d) && b.legendVisualProvider) {
                var T = b.legendVisualProvider;
                if (!T.containName(d))
                  return;
                var D = T.indexOfName(d), A = T.getItemVisual(D, "style"), M = T.getItemVisual(D, "legendIcon"), I = $e(A.fill);
                I && I[3] === 0 && (I[3] = 0.2, A = V(V({}, A), {
                  fill: ua(I, "rgba")
                }));
                var L = this._createItem(b, d, p, c, a, t, {}, A, M, h, i);
                L.on("click", Hi(Ww, null, d, i, v)).on("mouseover", Hi(tg, null, d, i, v)).on("mouseout", Hi(eg, null, d, i, v)), f.set(d, !0);
              }
            }, this);
          ({}).NODE_ENV !== "production" && (f.get(d) || console.warn(d + " series not exists. Legend data should be same with series name or data name."));
        }
      }, this), o && this._createSelector(o, a, i, s, l);
    }, e.prototype._createSelector = function(t, a, n, i, o) {
      var s = this.getSelectorGroup();
      Jd(t, function(u) {
        var f = u.type, h = new Dt({
          style: {
            x: 0,
            y: 0,
            align: "center",
            verticalAlign: "middle"
          },
          onclick: function() {
            n.dispatchAction({
              type: f === "all" ? "legendAllSelect" : "legendInverseSelect"
            });
          }
        });
        s.add(h);
        var v = a.getModel("selectorLabel"), c = a.getModel(["emphasis", "selectorLabel"]);
        pe(h, {
          normal: v,
          emphasis: c
        }, {
          defaultText: u.title
        }), ri(h);
      });
    }, e.prototype._createItem = function(t, a, n, i, o, s, l, u, f, h, v) {
      var c = t.visualDrawType, p = o.get("itemWidth"), d = o.get("itemHeight"), g = o.isSelected(a), y = i.get("symbolRotate"), m = i.get("symbolKeepAspect"), _ = i.get("icon");
      f = _ || f || "roundRect";
      var S = C9(f, i, l, u, c, g, v), w = new Nu(), x = i.getModel("textStyle");
      if (q(t.getLegendIcon) && (!_ || _ === "inherit"))
        w.add(t.getLegendIcon({
          itemWidth: p,
          itemHeight: d,
          icon: f,
          iconRotate: y,
          itemStyle: S.itemStyle,
          lineStyle: S.lineStyle,
          symbolKeepAspect: m
        }));
      else {
        var b = _ === "inherit" && t.getData().getVisual("symbol") ? y === "inherit" ? t.getData().getVisual("symbolRotate") : y : 0;
        w.add(A9({
          itemWidth: p,
          itemHeight: d,
          icon: f,
          iconRotate: b,
          itemStyle: S.itemStyle,
          lineStyle: S.lineStyle,
          symbolKeepAspect: m
        }));
      }
      var T = s === "left" ? p + 5 : -5, D = s, A = o.get("formatter"), M = a;
      $(A) && A ? M = A.replace("{name}", a ?? "") : q(A) && (M = A(a));
      var I = i.get("inactiveColor");
      w.add(new Dt({
        style: Ot(x, {
          text: M,
          x: T,
          y: d / 2,
          fill: g ? x.getTextColor() : I,
          align: D,
          verticalAlign: "middle"
        })
      }));
      var L = new bt({
        shape: w.getBoundingRect(),
        invisible: !0
      }), E = i.getModel("tooltip");
      return E.get("show") && Do({
        el: L,
        componentModel: o,
        itemName: a,
        itemTooltipOption: E.option
      }), w.add(L), w.eachChild(function(P) {
        P.silent = !0;
      }), L.silent = !h, this.getContentGroup().add(w), ri(w), w.__legendDataIndex = n, w;
    }, e.prototype.layoutInner = function(t, a, n, i, o, s) {
      var l = this.getContentGroup(), u = this.getSelectorGroup();
      ni(t.get("orient"), l, t.get("itemGap"), n.width, n.height);
      var f = l.getBoundingRect(), h = [-f.x, -f.y];
      if (u.markRedraw(), l.markRedraw(), o) {
        ni(
          // Buttons in selectorGroup always layout horizontally
          "horizontal",
          u,
          t.get("selectorItemGap", !0)
        );
        var v = u.getBoundingRect(), c = [-v.x, -v.y], p = t.get("selectorButtonGap", !0), d = t.getOrient().index, g = d === 0 ? "width" : "height", y = d === 0 ? "height" : "width", m = d === 0 ? "y" : "x";
        s === "end" ? c[d] += f[g] + p : h[d] += v[g] + p, c[1 - d] += f[y] / 2 - v[y] / 2, u.x = c[0], u.y = c[1], l.x = h[0], l.y = h[1];
        var _ = {
          x: 0,
          y: 0
        };
        return _[g] = f[g] + p + v[g], _[y] = Math.max(f[y], v[y]), _[m] = Math.min(0, v[m] + c[1 - d]), _;
      } else
        return l.x = h[0], l.y = h[1], this.group.getBoundingRect();
    }, e.prototype.remove = function() {
      this.getContentGroup().removeAll(), this._isFirstRender = !0;
    }, e.type = "legend.plain", e;
  }($t)
);
function C9(r, e, t, a, n, i, o) {
  function s(g, y) {
    g.lineWidth === "auto" && (g.lineWidth = y.lineWidth > 0 ? 2 : 0), Jd(g, function(m, _) {
      g[_] === "inherit" && (g[_] = y[_]);
    });
  }
  var l = e.getModel("itemStyle"), u = l.getItemStyle(), f = r.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", h = l.getShallow("decal");
  u.decal = !h || h === "inherit" ? a.decal : ho(h, o), u.fill === "inherit" && (u.fill = a[n]), u.stroke === "inherit" && (u.stroke = a[f]), u.opacity === "inherit" && (u.opacity = (n === "fill" ? a : t).opacity), s(u, a);
  var v = e.getModel("lineStyle"), c = v.getLineStyle();
  if (s(c, t), u.fill === "auto" && (u.fill = a.fill), u.stroke === "auto" && (u.stroke = a.fill), c.stroke === "auto" && (c.stroke = a.fill), !i) {
    var p = e.get("inactiveBorderWidth"), d = u[f];
    u.lineWidth = p === "auto" ? a.lineWidth > 0 && d ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), c.stroke = v.get("inactiveColor"), c.lineWidth = v.get("inactiveWidth");
  }
  return {
    itemStyle: u,
    lineStyle: c
  };
}
function A9(r) {
  var e = r.icon || "roundRect", t = Jt(e, 0, 0, r.itemWidth, r.itemHeight, r.itemStyle.fill, r.symbolKeepAspect);
  return t.setStyle(r.itemStyle), t.rotation = (r.iconRotate || 0) * Math.PI / 180, t.setOrigin([r.itemWidth / 2, r.itemHeight / 2]), e.indexOf("empty") > -1 && (t.style.stroke = t.style.fill, t.style.fill = "#fff", t.style.lineWidth = 2), t;
}
function Ww(r, e, t, a) {
  eg(r, e, t, a), t.dispatchAction({
    type: "legendToggleSelect",
    name: r ?? e
  }), tg(r, e, t, a);
}
function yL(r) {
  for (var e = r.getZr().storage.getDisplayList(), t, a = 0, n = e.length; a < n && !(t = e[a].states.emphasis); )
    a++;
  return t && t.hoverLayer;
}
function tg(r, e, t, a) {
  yL(t) || t.dispatchAction({
    type: "highlight",
    seriesName: r,
    name: e,
    excludeSeriesId: a
  });
}
function eg(r, e, t, a) {
  yL(t) || t.dispatchAction({
    type: "downplay",
    seriesName: r,
    name: e,
    excludeSeriesId: a
  });
}
const mL = D9;
function M9(r) {
  var e = r.findComponents({
    mainType: "legend"
  });
  e && e.length && r.filterSeries(function(t) {
    for (var a = 0; a < e.length; a++)
      if (!e[a].isSelected(t.name))
        return !1;
    return !0;
  });
}
function us(r, e, t) {
  var a = {}, n = r === "toggleSelected", i;
  return t.eachComponent("legend", function(o) {
    n && i != null ? o[i ? "select" : "unSelect"](e.name) : r === "allSelect" || r === "inverseSelect" ? o[r]() : (o[r](e.name), i = o.isSelected(e.name));
    var s = o.getData();
    C(s, function(l) {
      var u = l.get("name");
      if (!(u === `
` || u === "")) {
        var f = o.isSelected(u);
        a.hasOwnProperty(u) ? a[u] = a[u] && f : a[u] = f;
      }
    });
  }), r === "allSelect" || r === "inverseSelect" ? {
    selected: a
  } : {
    name: e.name,
    selected: a
  };
}
function I9(r) {
  r.registerAction("legendToggleSelect", "legendselectchanged", ot(us, "toggleSelected")), r.registerAction("legendAllSelect", "legendselectall", ot(us, "allSelect")), r.registerAction("legendInverseSelect", "legendinverseselect", ot(us, "inverseSelect")), r.registerAction("legendSelect", "legendselected", ot(us, "select")), r.registerAction("legendUnSelect", "legendunselected", ot(us, "unSelect"));
}
function _L(r) {
  r.registerComponentModel(Qd), r.registerComponentView(mL), r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER, M9), r.registerSubTypeDefaulter("legend", function() {
    return "plain";
  }), I9(r);
}
var L9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.setScrollDataIndex = function(t) {
      this.option.scrollDataIndex = t;
    }, e.prototype.init = function(t, a, n) {
      var i = Io(t);
      r.prototype.init.call(this, t, a, n), $w(this, t, i);
    }, e.prototype.mergeOption = function(t, a) {
      r.prototype.mergeOption.call(this, t, a), $w(this, this.option, t);
    }, e.type = "legend.scroll", e.defaultOption = sn(Qd.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;
  }(Qd)
);
function $w(r, e, t) {
  var a = r.getOrient(), n = [1, 1];
  n[a.index] = 0, Ja(e, t, {
    type: "box",
    ignoreSize: !!n
  });
}
const E9 = L9;
var Uw = nt, up = ["width", "height"], fp = ["x", "y"], P9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.newlineDisabled = !0, t._currentIndex = 0, t;
    }
    return e.prototype.init = function() {
      r.prototype.init.call(this), this.group.add(this._containerGroup = new Uw()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new Uw());
    }, e.prototype.resetInner = function() {
      r.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
    }, e.prototype.renderInner = function(t, a, n, i, o, s, l) {
      var u = this;
      r.prototype.renderInner.call(this, t, a, n, i, o, s, l);
      var f = this._controllerGroup, h = a.get("pageIconSize", !0), v = z(h) ? h : [h, h];
      p("pagePrev", 0);
      var c = a.getModel("pageTextStyle");
      f.add(new Dt({
        name: "pageText",
        style: {
          // Placeholder to calculate a proper layout.
          text: "xx/xx",
          fill: c.getTextColor(),
          font: c.getFont(),
          verticalAlign: "middle",
          align: "center"
        },
        silent: !0
      })), p("pageNext", 1);
      function p(d, g) {
        var y = d + "DataIndex", m = yl(a.get("pageIcons", !0)[a.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: Y(u._pageGo, u, y, a, i)
        }, {
          x: -v[0] / 2,
          y: -v[1] / 2,
          width: v[0],
          height: v[1]
        });
        m.name = d, f.add(m);
      }
    }, e.prototype.layoutInner = function(t, a, n, i, o, s) {
      var l = this.getSelectorGroup(), u = t.getOrient().index, f = up[u], h = fp[u], v = up[1 - u], c = fp[1 - u];
      o && ni(
        // Buttons in selectorGroup always layout horizontally
        "horizontal",
        l,
        t.get("selectorItemGap", !0)
      );
      var p = t.get("selectorButtonGap", !0), d = l.getBoundingRect(), g = [-d.x, -d.y], y = rt(n);
      o && (y[f] = n[f] - d[f] - p);
      var m = this._layoutContentAndController(t, i, y, u, f, v, c, h);
      if (o) {
        if (s === "end")
          g[u] += m[f] + p;
        else {
          var _ = d[f] + p;
          g[u] -= _, m[h] -= _;
        }
        m[f] += d[f] + p, g[1 - u] += m[c] + m[v] / 2 - d[v] / 2, m[v] = Math.max(m[v], d[v]), m[c] = Math.min(m[c], d[c] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
      }
      return m;
    }, e.prototype._layoutContentAndController = function(t, a, n, i, o, s, l, u) {
      var f = this.getContentGroup(), h = this._containerGroup, v = this._controllerGroup;
      ni(t.get("orient"), f, t.get("itemGap"), i ? n.width : null, i ? null : n.height), ni(
        // Buttons in controller are layout always horizontally.
        "horizontal",
        v,
        t.get("pageButtonItemGap", !0)
      );
      var c = f.getBoundingRect(), p = v.getBoundingRect(), d = this._showController = c[o] > n[o], g = [-c.x, -c.y];
      a || (g[i] = f[u]);
      var y = [0, 0], m = [-p.x, -p.y], _ = ut(t.get("pageButtonGap", !0), t.get("itemGap", !0));
      if (d) {
        var S = t.get("pageButtonPosition", !0);
        S === "end" ? m[i] += n[o] - p[o] : y[i] += p[o] + _;
      }
      m[1 - i] += c[s] / 2 - p[s] / 2, f.setPosition(g), h.setPosition(y), v.setPosition(m);
      var w = {
        x: 0,
        y: 0
      };
      if (w[o] = d ? n[o] : c[o], w[s] = Math.max(c[s], p[s]), w[l] = Math.min(0, p[l] + m[1 - i]), h.__rectSize = n[o], d) {
        var x = {
          x: 0,
          y: 0
        };
        x[o] = Math.max(n[o] - p[o] - _, 0), x[s] = w[s], h.setClipPath(new bt({
          shape: x
        })), h.__rectSize = x[o];
      } else
        v.eachChild(function(T) {
          T.attr({
            invisible: !0,
            silent: !0
          });
        });
      var b = this._getPageInfo(t);
      return b.pageIndex != null && Mt(
        f,
        {
          x: b.contentPosition[0],
          y: b.contentPosition[1]
        },
        // When switch from "show controller" to "not show controller", view should be
        // updated immediately without animation, otherwise causes weird effect.
        d ? t : null
      ), this._updatePageInfoView(t, b), w;
    }, e.prototype._pageGo = function(t, a, n) {
      var i = this._getPageInfo(a)[t];
      i != null && n.dispatchAction({
        type: "legendScroll",
        scrollDataIndex: i,
        legendId: a.id
      });
    }, e.prototype._updatePageInfoView = function(t, a) {
      var n = this._controllerGroup;
      C(["pagePrev", "pageNext"], function(f) {
        var h = f + "DataIndex", v = a[h] != null, c = n.childOfName(f);
        c && (c.setStyle("fill", v ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), c.cursor = v ? "pointer" : "default");
      });
      var i = n.childOfName("pageText"), o = t.get("pageFormatter"), s = a.pageIndex, l = s != null ? s + 1 : 0, u = a.pageCount;
      i && o && i.setStyle("text", $(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
        current: l,
        total: u
      }));
    }, e.prototype._getPageInfo = function(t) {
      var a = t.get("scrollDataIndex", !0), n = this.getContentGroup(), i = this._containerGroup.__rectSize, o = t.getOrient().index, s = up[o], l = fp[o], u = this._findTargetItemIndex(a), f = n.children(), h = f[u], v = f.length, c = v ? 1 : 0, p = {
        contentPosition: [n.x, n.y],
        pageCount: c,
        pageIndex: c - 1,
        pagePrevDataIndex: null,
        pageNextDataIndex: null
      };
      if (!h)
        return p;
      var d = S(h);
      p.contentPosition[o] = -d.s;
      for (var g = u + 1, y = d, m = d, _ = null; g <= v; ++g)
        _ = S(f[g]), // Half of the last item is out of the window.
        (!_ && m.e > y.s + i || // If the current item does not intersect with the window, the new page
        // can be started at the current item or the last item.
        _ && !w(_, y.s)) && (m.i > y.i ? y = m : y = _, y && (p.pageNextDataIndex == null && (p.pageNextDataIndex = y.i), ++p.pageCount)), m = _;
      for (var g = u - 1, y = d, m = d, _ = null; g >= -1; --g)
        _ = S(f[g]), // If the the end item does not intersect with the window started
        // from the current item, a page can be settled.
        (!_ || !w(m, _.s)) && // e.g., when page size is smaller than item size.
        y.i < m.i && (m = y, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = y.i), ++p.pageCount, ++p.pageIndex), y = _;
      return p;
      function S(x) {
        if (x) {
          var b = x.getBoundingRect(), T = b[l] + x[l];
          return {
            s: T,
            e: T + b[s],
            i: x.__legendDataIndex
          };
        }
      }
      function w(x, b) {
        return x.e >= b && x.s <= b + i;
      }
    }, e.prototype._findTargetItemIndex = function(t) {
      if (!this._showController)
        return 0;
      var a, n = this.getContentGroup(), i;
      return n.eachChild(function(o, s) {
        var l = o.__legendDataIndex;
        i == null && l != null && (i = s), l === t && (a = s);
      }), a ?? i;
    }, e.type = "legend.scroll", e;
  }(mL)
);
const R9 = P9;
function N9(r) {
  r.registerAction("legendScroll", "legendscroll", function(e, t) {
    var a = e.scrollDataIndex;
    a != null && t.eachComponent({
      mainType: "legend",
      subType: "scroll",
      query: e
    }, function(n) {
      n.setScrollDataIndex(a);
    });
  });
}
function O9(r) {
  pt(_L), r.registerComponentModel(E9), r.registerComponentView(R9), N9(r);
}
function k9(r) {
  pt(_L), pt(O9);
}
var V9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "dataZoom.inside", e.defaultOption = sn(ll.defaultOption, {
      disabled: !1,
      zoomLock: !1,
      zoomOnMouseWheel: !0,
      moveOnMouseMove: !0,
      moveOnMouseWheel: !1,
      preventDefaultMouseMove: !0
    }), e;
  }(ll)
);
const B9 = V9;
var vm = Tt();
function z9(r, e, t) {
  vm(r).coordSysRecordMap.each(function(a) {
    var n = a.dataZoomInfoMap.get(e.uid);
    n && (n.getRange = t);
  });
}
function G9(r, e) {
  for (var t = vm(r).coordSysRecordMap, a = t.keys(), n = 0; n < a.length; n++) {
    var i = a[n], o = t.get(i), s = o.dataZoomInfoMap;
    if (s) {
      var l = e.uid, u = s.get(l);
      u && (s.removeKey(l), s.keys().length || SL(t, o));
    }
  }
}
function SL(r, e) {
  if (e) {
    r.removeKey(e.model.uid);
    var t = e.controller;
    t && t.dispose();
  }
}
function F9(r, e) {
  var t = {
    model: e,
    containsPoint: ot(W9, e),
    dispatchAction: ot(H9, r),
    dataZoomInfoMap: null,
    controller: null
  }, a = t.controller = new Il(r.getZr());
  return C(["pan", "zoom", "scrollMove"], function(n) {
    a.on(n, function(i) {
      var o = [];
      t.dataZoomInfoMap.each(function(s) {
        if (i.isAvailableBehavior(s.model.option)) {
          var l = (s.getRange || {})[n], u = l && l(s.dzReferCoordSysInfo, t.model.mainType, t.controller, i);
          !s.model.get("disabled", !0) && u && o.push({
            dataZoomId: s.model.id,
            start: u[0],
            end: u[1]
          });
        }
      }), o.length && t.dispatchAction(o);
    });
  }), t;
}
function H9(r, e) {
  r.isDisposed() || r.dispatchAction({
    type: "dataZoom",
    animation: {
      easing: "cubicOut",
      duration: 100
    },
    batch: e
  });
}
function W9(r, e, t, a) {
  return r.coordinateSystem.containPoint([t, a]);
}
function $9(r) {
  var e, t = "type_", a = {
    type_true: 2,
    type_move: 1,
    type_false: 0,
    type_undefined: -1
  }, n = !0;
  return r.each(function(i) {
    var o = i.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
    a[t + s] > a[t + e] && (e = s), n = n && 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: !!n
    }
  };
}
function U9(r) {
  r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, function(e, t) {
    var a = vm(t), n = a.coordSysRecordMap || (a.coordSysRecordMap = K());
    n.each(function(i) {
      i.dataZoomInfoMap = null;
    }), e.eachComponent({
      mainType: "dataZoom",
      subType: "inside"
    }, function(i) {
      var o = eL(i);
      C(o.infoList, function(s) {
        var l = s.model.uid, u = n.get(l) || n.set(l, F9(t, s.model)), f = u.dataZoomInfoMap || (u.dataZoomInfoMap = K());
        f.set(i.uid, {
          dzReferCoordSysInfo: s,
          model: i,
          getRange: null
        });
      });
    }), n.each(function(i) {
      var o = i.controller, s, l = i.dataZoomInfoMap;
      if (l) {
        var u = l.keys()[0];
        u != null && (s = l.get(u));
      }
      if (!s) {
        SL(n, i);
        return;
      }
      var f = $9(l);
      o.enable(f.controlType, f.opt), o.setPointerChecker(i.containsPoint), No(i, "dispatchAction", s.model.get("throttle", !0), "fixRate");
    });
  });
}
var Y9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "dataZoom.inside", t;
    }
    return e.prototype.render = function(t, a, n) {
      if (r.prototype.render.apply(this, arguments), t.noTarget()) {
        this._clear();
        return;
      }
      this.range = t.getPercentRange(), z9(n, t, {
        pan: Y(hp.pan, this),
        zoom: Y(hp.zoom, this),
        scrollMove: Y(hp.scrollMove, this)
      });
    }, e.prototype.dispose = function() {
      this._clear(), r.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      G9(this.api, this.dataZoomModel), this.range = null;
    }, e.type = "dataZoom.inside", e;
  }(am)
), hp = {
  zoom: function(r, e, t, a) {
    var n = this.range, i = n.slice(), o = r.axisModels[0];
    if (o) {
      var s = vp[e](null, [a.originX, a.originY], o, t, r), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (i[1] - i[0]) + i[0], u = Math.max(1 / a.scale, 0);
      i[0] = (i[0] - l) * u + l, i[1] = (i[1] - l) * u + l;
      var f = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
      if (wi(0, i, [0, 100], 0, f.minSpan, f.maxSpan), this.range = i, n[0] !== i[0] || n[1] !== i[1])
        return i;
    }
  },
  pan: Yw(function(r, e, t, a, n, i) {
    var o = vp[a]([i.oldX, i.oldY], [i.newX, i.newY], e, n, t);
    return o.signal * (r[1] - r[0]) * o.pixel / o.pixelLength;
  }),
  scrollMove: Yw(function(r, e, t, a, n, i) {
    var o = vp[a]([0, 0], [i.scrollDelta, i.scrollDelta], e, n, t);
    return o.signal * (r[1] - r[0]) * i.scrollDelta;
  })
};
function Yw(r) {
  return function(e, t, a, n) {
    var i = this.range, o = i.slice(), s = e.axisModels[0];
    if (s) {
      var l = r(o, s, e, t, a, n);
      if (wi(l, o, [0, 100], "all"), this.range = o, i[0] !== o[0] || i[1] !== o[1])
        return o;
    }
  };
}
var vp = {
  grid: function(r, e, t, a, n) {
    var i = t.axis, o = {}, s = n.model.coordinateSystem.getRect();
    return r = r || [0, 0], i.dim === "x" ? (o.pixel = e[0] - r[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = i.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = i.inverse ? -1 : 1), o;
  },
  polar: function(r, e, t, a, n) {
    var i = t.axis, o = {}, s = n.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
    return r = r ? s.pointToCoord(r) : [0, 0], e = s.pointToCoord(e), t.mainType === "radiusAxis" ? (o.pixel = e[0] - r[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = i.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = i.inverse ? -1 : 1), o;
  },
  singleAxis: function(r, e, t, a, n) {
    var i = t.axis, o = n.model.coordinateSystem.getRect(), s = {};
    return r = r || [0, 0], i.orient === "horizontal" ? (s.pixel = e[0] - r[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = i.inverse ? 1 : -1) : (s.pixel = e[1] - r[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = i.inverse ? -1 : 1), s;
  }
};
const Z9 = Y9;
function xL(r) {
  nm(r), r.registerComponentModel(B9), r.registerComponentView(Z9), U9(r);
}
var X9 = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = sn(ll.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;
  }(ll)
);
const q9 = X9;
var fs = bt, Zw = 7, K9 = 1, cp = 30, j9 = 7, hs = "horizontal", Xw = "vertical", Q9 = 5, J9 = ["line", "bar", "candlestick", "scatter"], tZ = {
  easing: "cubicOut",
  duration: 100,
  delay: 0
}, eZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._displayables = {}, t;
    }
    return e.prototype.init = function(t, a) {
      this.api = a, this._onBrush = Y(this._onBrush, this), this._onBrushEnd = Y(this._onBrushEnd, this);
    }, e.prototype.render = function(t, a, n, i) {
      if (r.prototype.render.apply(this, arguments), No(this, "_dispatchZoomAction", t.get("throttle"), "fixRate"), this._orient = t.getOrient(), t.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      if (t.noTarget()) {
        this._clear(), this.group.removeAll();
        return;
      }
      (!i || i.type !== "dataZoom" || i.from !== this.uid) && this._buildView(), this._updateView();
    }, e.prototype.dispose = function() {
      this._clear(), r.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      Ks(this, "_dispatchZoomAction");
      var t = this.api.getZr();
      t.off("mousemove", this._onBrush), t.off("mouseup", this._onBrushEnd);
    }, e.prototype._buildView = function() {
      var t = this.group;
      t.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
      var a = this._displayables.sliderGroup = new nt();
      this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(a), this._positionGroup();
    }, e.prototype._resetLocation = function() {
      var t = this.dataZoomModel, a = this.api, n = t.get("brushSelect"), i = n ? j9 : 0, o = this._findCoordRect(), s = {
        width: a.getWidth(),
        height: a.getHeight()
      }, l = this._orient === hs ? {
        // 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 - cp - Zw - i,
        width: o.width,
        height: cp
      } : {
        right: Zw,
        top: o.y,
        width: cp,
        height: o.height
      }, u = Io(t.option);
      C(["right", "top", "width", "height"], function(h) {
        u[h] === "ph" && (u[h] = l[h]);
      });
      var f = re(u, s);
      this._location = {
        x: f.x,
        y: f.y
      }, this._size = [f.width, f.height], this._orient === Xw && this._size.reverse();
    }, e.prototype._positionGroup = function() {
      var t = this.group, a = this._location, n = this._orient, i = this.dataZoomModel.getFirstTargetAxisModel(), o = i && i.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
      s.attr(n === hs && !o ? {
        scaleY: l ? 1 : -1,
        scaleX: 1
      } : n === hs && o ? {
        scaleY: l ? 1 : -1,
        scaleX: -1
      } : n === Xw && !o ? {
        scaleY: l ? -1 : 1,
        scaleX: 1,
        rotation: Math.PI / 2
      } : {
        scaleY: l ? -1 : 1,
        scaleX: -1,
        rotation: Math.PI / 2
      });
      var u = t.getBoundingRect([s]);
      t.x = a.x - u.x, t.y = a.y - u.y, t.markRedraw();
    }, e.prototype._getViewExtent = function() {
      return [0, this._size[0]];
    }, e.prototype._renderBackground = function() {
      var t = this.dataZoomModel, a = this._size, n = this._displayables.sliderGroup, i = t.get("brushSelect");
      n.add(new fs({
        silent: !0,
        shape: {
          x: 0,
          y: 0,
          width: a[0],
          height: a[1]
        },
        style: {
          fill: t.get("backgroundColor")
        },
        z2: -40
      }));
      var o = new fs({
        shape: {
          x: 0,
          y: 0,
          width: a[0],
          height: a[1]
        },
        style: {
          fill: "transparent"
        },
        z2: 0,
        onclick: Y(this._onClickPanel, this)
      }), s = this.api.getZr();
      i ? (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)), n.add(o);
    }, e.prototype._renderDataShadow = function() {
      var t = this._dataShadowInfo = this._prepareDataShadowInfo();
      if (this._displayables.dataShadowSegs = [], !t)
        return;
      var a = this._size, n = this._shadowSize || [], i = t.series, o = i.getRawData(), s = i.getShadowDim && i.getShadowDim(), l = s && o.getDimensionInfo(s) ? i.getShadowDim() : t.otherDim;
      if (l == null)
        return;
      var u = this._shadowPolygonPts, f = this._shadowPolylinePts;
      if (o !== this._shadowData || l !== this._shadowDim || a[0] !== n[0] || a[1] !== n[1]) {
        var h = o.getDataExtent(l), v = (h[1] - h[0]) * 0.3;
        h = [h[0] - v, h[1] + v];
        var c = [0, a[1]], p = [0, a[0]], d = [[a[0], 0], [0, 0]], g = [], y = p[1] / (o.count() - 1), m = 0, _ = Math.round(o.count() / a[0]), S;
        o.each([l], function(D, A) {
          if (_ > 0 && A % _) {
            m += y;
            return;
          }
          var M = D == null || isNaN(D) || D === "", I = M ? 0 : Lt(D, h, c, !0);
          M && !S && A ? (d.push([d[d.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !M && S && (d.push([m, 0]), g.push([m, 0])), d.push([m, I]), g.push([m, I]), m += y, S = M;
        }), u = this._shadowPolygonPts = d, f = this._shadowPolylinePts = g;
      }
      this._shadowData = o, this._shadowDim = l, this._shadowSize = [a[0], a[1]];
      var w = this.dataZoomModel;
      function x(D) {
        var A = w.getModel(D ? "selectedDataBackground" : "dataBackground"), M = new nt(), I = new Be({
          shape: {
            points: u
          },
          segmentIgnoreThreshold: 1,
          style: A.getModel("areaStyle").getAreaStyle(),
          silent: !0,
          z2: -20
        }), L = new ze({
          shape: {
            points: f
          },
          segmentIgnoreThreshold: 1,
          style: A.getModel("lineStyle").getLineStyle(),
          silent: !0,
          z2: -19
        });
        return M.add(I), M.add(L), M;
      }
      for (var b = 0; b < 3; b++) {
        var T = x(b === 1);
        this._displayables.sliderGroup.add(T), this._displayables.dataShadowSegs.push(T);
      }
    }, e.prototype._prepareDataShadowInfo = function() {
      var t = this.dataZoomModel, a = t.get("showDataShadow");
      if (a !== !1) {
        var n, i = this.ecModel;
        return t.eachTargetAxis(function(o, s) {
          var l = t.getAxisProxy(o, s).getTargetSeriesModels();
          C(l, function(u) {
            if (!n && !(a !== !0 && ct(J9, u.get("type")) < 0)) {
              var f = i.getComponent($a(o), s).axis, h = rZ(o), v, c = u.coordinateSystem;
              h != null && c.getOtherAxis && (v = c.getOtherAxis(f).inverse), h = u.getData().mapDimension(h), n = {
                thisAxis: f,
                series: u,
                thisDim: o,
                otherDim: h,
                otherAxisInverse: v
              };
            }
          }, this);
        }, this), n;
      }
    }, e.prototype._renderHandle = function() {
      var t = this.group, a = this._displayables, n = a.handles = [null, null], i = a.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, f = l.get("borderRadius") || 0, h = l.get("brushSelect"), v = a.filler = new fs({
        silent: h,
        style: {
          fill: l.get("fillerColor")
        },
        textConfig: {
          position: "inside"
        }
      });
      o.add(v), o.add(new fs({
        silent: !0,
        subPixelOptimize: !0,
        shape: {
          x: 0,
          y: 0,
          width: s[0],
          height: s[1],
          r: f
        },
        style: {
          // deprecated option
          stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
          lineWidth: K9,
          fill: "rgba(0,0,0,0)"
        }
      })), C([0, 1], function(_) {
        var S = l.get("handleIcon");
        !Tf[S] && S.indexOf("path://") < 0 && S.indexOf("image://") < 0 && (S = "path://" + S, {}.NODE_ENV !== "production" && Dr("handleIcon now needs 'path://' prefix when using a path string"));
        var w = Jt(S, -1, 0, 2, 2, null, !0);
        w.attr({
          cursor: qw(this._orient),
          draggable: !0,
          drift: Y(this._onDragMove, this, _),
          ondragend: Y(this._onDragEnd, this),
          onmouseover: Y(this._showDataInfo, this, !0),
          onmouseout: Y(this._showDataInfo, this, !1),
          z2: 5
        });
        var x = w.getBoundingRect(), b = l.get("handleSize");
        this._handleHeight = H(b, this._size[1]), this._handleWidth = x.width / x.height * this._handleHeight, w.setStyle(l.getModel("handleStyle").getItemStyle()), w.style.strokeNoScale = !0, w.rectHover = !0, w.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), ri(w);
        var T = l.get("handleColor");
        T != null && (w.style.fill = T), o.add(n[_] = w);
        var D = l.getModel("textStyle");
        t.add(i[_] = new Dt({
          silent: !0,
          invisible: !0,
          style: Ot(D, {
            x: 0,
            y: 0,
            text: "",
            verticalAlign: "middle",
            align: "center",
            fill: D.getTextColor(),
            font: D.getFont()
          }),
          z2: 10
        }));
      }, this);
      var c = v;
      if (h) {
        var p = H(l.get("moveHandleSize"), s[1]), d = a.moveHandle = new bt({
          style: l.getModel("moveHandleStyle").getItemStyle(),
          silent: !0,
          shape: {
            r: [0, 0, 2, 2],
            y: s[1] - 0.5,
            height: p
          }
        }), g = p * 0.8, y = a.moveHandleIcon = Jt(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
        y.silent = !0, y.y = s[1] + p / 2 - 0.5, d.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
        var m = Math.min(s[1] / 2, Math.max(p, 10));
        c = a.moveZone = new bt({
          invisible: !0,
          shape: {
            y: s[1] - m,
            height: p + m
          }
        }), c.on("mouseover", function() {
          u.enterEmphasis(d);
        }).on("mouseout", function() {
          u.leaveEmphasis(d);
        }), o.add(d), o.add(y), o.add(c);
      }
      c.attr({
        draggable: !0,
        cursor: qw(this._orient),
        drift: Y(this._onDragMove, this, "all"),
        ondragstart: Y(this._showDataInfo, this, !0),
        ondragend: Y(this._onDragEnd, this),
        onmouseover: Y(this._showDataInfo, this, !0),
        onmouseout: Y(this._showDataInfo, this, !1)
      });
    }, e.prototype._resetInterval = function() {
      var t = this._range = this.dataZoomModel.getPercentRange(), a = this._getViewExtent();
      this._handleEnds = [Lt(t[0], [0, 100], a, !0), Lt(t[1], [0, 100], a, !0)];
    }, e.prototype._updateInterval = function(t, a) {
      var n = this.dataZoomModel, i = this._handleEnds, o = this._getViewExtent(), s = n.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
      wi(a, i, o, n.get("zoomLock") ? "all" : t, s.minSpan != null ? Lt(s.minSpan, l, o, !0) : null, s.maxSpan != null ? Lt(s.maxSpan, l, o, !0) : null);
      var u = this._range, f = this._range = or([Lt(i[0], o, l, !0), Lt(i[1], o, l, !0)]);
      return !u || u[0] !== f[0] || u[1] !== f[1];
    }, e.prototype._updateView = function(t) {
      var a = this._displayables, n = this._handleEnds, i = or(n.slice()), o = this._size;
      C([0, 1], function(c) {
        var p = a.handles[c], d = this._handleHeight;
        p.attr({
          scaleX: d / 2,
          scaleY: d / 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: n[c] + (c ? -1 : 1),
          y: o[1] / 2 - d / 2
        });
      }, this), a.filler.setShape({
        x: i[0],
        y: 0,
        width: i[1] - i[0],
        height: o[1]
      });
      var s = {
        x: i[0],
        width: i[1] - i[0]
      };
      a.moveHandle && (a.moveHandle.setShape(s), a.moveZone.setShape(s), a.moveZone.getBoundingRect(), a.moveHandleIcon && a.moveHandleIcon.attr("x", s.x + s.width / 2));
      for (var l = a.dataShadowSegs, u = [0, i[0], i[1], o[0]], f = 0; f < l.length; f++) {
        var h = l[f], v = h.getClipPath();
        v || (v = new bt(), h.setClipPath(v)), v.setShape({
          x: u[f],
          y: 0,
          width: u[f + 1] - u[f],
          height: o[1]
        });
      }
      this._updateDataInfo(t);
    }, e.prototype._updateDataInfo = function(t) {
      var a = this.dataZoomModel, n = this._displayables, i = n.handleLabels, o = this._orient, s = ["", ""];
      if (a.get("showDetail")) {
        var l = a.findRepresentativeAxisProxy();
        if (l) {
          var u = l.getAxisModel().axis, f = this._range, h = t ? l.calculateDataWindow({
            start: f[0],
            end: f[1]
          }).valueWindow : l.getDataValueWindow();
          s = [this._formatLabel(h[0], u), this._formatLabel(h[1], u)];
        }
      }
      var v = or(this._handleEnds.slice());
      c.call(this, 0), c.call(this, 1);
      function c(p) {
        var d = ai(n.handles[p].parent, this.group), g = xh(p === 0 ? "right" : "left", d), y = this._handleWidth / 2 + Q9, m = br([v[p] + (p === 0 ? -y : y), this._size[1] / 2], d);
        i[p].setStyle({
          x: m[0],
          y: m[1],
          verticalAlign: o === hs ? "middle" : g,
          align: o === hs ? g : "center",
          text: s[p]
        });
      }
    }, e.prototype._formatLabel = function(t, a) {
      var n = this.dataZoomModel, i = n.get("labelFormatter"), o = n.get("labelPrecision");
      (o == null || o === "auto") && (o = a.getPixelPrecision());
      var s = t == null || isNaN(t) ? "" : a.type === "category" || a.type === "time" ? a.scale.getLabel({
        value: Math.round(t)
      }) : t.toFixed(Math.min(o, 20));
      return q(i) ? i(t, s) : $(i) ? i.replace("{value}", s) : s;
    }, e.prototype._showDataInfo = function(t) {
      t = this._dragging || t;
      var a = this._displayables, n = a.handleLabels;
      n[0].attr("invisible", !t), n[1].attr("invisible", !t), a.moveHandle && this.api[t ? "enterEmphasis" : "leaveEmphasis"](a.moveHandle, 1);
    }, e.prototype._onDragMove = function(t, a, n, i) {
      this._dragging = !0, ca(i.event);
      var o = this._displayables.sliderGroup.getLocalTransform(), s = br([a, n], o, !0), l = this._updateInterval(t, 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 t = this.dataZoomModel.get("realtime");
      !t && this._dispatchZoomAction(!1);
    }, e.prototype._onClickPanel = function(t) {
      var a = this._size, n = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY);
      if (!(n[0] < 0 || n[0] > a[0] || n[1] < 0 || n[1] > a[1])) {
        var i = this._handleEnds, o = (i[0] + i[1]) / 2, s = this._updateInterval("all", n[0] - o);
        this._updateView(), s && this._dispatchZoomAction(!1);
      }
    }, e.prototype._onBrushStart = function(t) {
      var a = t.offsetX, n = t.offsetY;
      this._brushStart = new lt(a, n), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
    }, e.prototype._onBrushEnd = function(t) {
      if (this._brushing) {
        var a = this._displayables.brushRect;
        if (this._brushing = !1, !!a) {
          a.attr("ignore", !0);
          var n = a.shape, i = +/* @__PURE__ */ new Date();
          if (!(i - this._brushStartTime < 200 && Math.abs(n.width) < 5)) {
            var o = this._getViewExtent(), s = [0, 100];
            this._range = or([Lt(n.x, o, s, !0), Lt(n.x + n.width, o, s, !0)]), this._handleEnds = [n.x, n.x + n.width], this._updateView(), this._dispatchZoomAction(!1);
          }
        }
      }
    }, e.prototype._onBrush = function(t) {
      this._brushing && (ca(t.event), this._updateBrushRect(t.offsetX, t.offsetY));
    }, e.prototype._updateBrushRect = function(t, a) {
      var n = this._displayables, i = this.dataZoomModel, o = n.brushRect;
      o || (o = n.brushRect = new fs({
        silent: !0,
        style: i.getModel("brushStyle").getItemStyle()
      }), n.sliderGroup.add(o)), o.attr("ignore", !1);
      var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(t, a), f = l.transformCoordToLocal(s.x, s.y), h = this._size;
      u[0] = Math.max(Math.min(h[0], u[0]), 0), o.setShape({
        x: f[0],
        y: 0,
        width: u[0] - f[0],
        height: h[1]
      });
    }, e.prototype._dispatchZoomAction = function(t) {
      var a = this._range;
      this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        dataZoomId: this.dataZoomModel.id,
        animation: t ? tZ : null,
        start: a[0],
        end: a[1]
      });
    }, e.prototype._findCoordRect = function() {
      var t, a = eL(this.dataZoomModel).infoList;
      if (!t && a.length) {
        var n = a[0].model.coordinateSystem;
        t = n.getRect && n.getRect();
      }
      if (!t) {
        var i = this.api.getWidth(), o = this.api.getHeight();
        t = {
          x: i * 0.2,
          y: o * 0.2,
          width: i * 0.6,
          height: o * 0.6
        };
      }
      return t;
    }, e.type = "dataZoom.slider", e;
  }(am)
);
function rZ(r) {
  var e = {
    x: "y",
    y: "x",
    radius: "angle",
    angle: "radius"
  };
  return e[r];
}
function qw(r) {
  return r === "vertical" ? "ns-resize" : "ew-resize";
}
const aZ = eZ;
function wL(r) {
  r.registerComponentModel(q9), r.registerComponentView(aZ), nm(r);
}
function nZ(r) {
  pt(xL), pt(wL);
}
var iZ = {
  /**
   * @public
   */
  get: function(r, e, t) {
    var a = rt((oZ[r] || {})[e]);
    return t && z(a) ? a[a.length - 1] : a;
  }
}, oZ = {
  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]
  }
};
const bL = iZ;
var Kw = he.mapVisual, sZ = he.eachVisual, lZ = z, jw = C, uZ = or, fZ = Lt, hZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.stateList = ["inRange", "outOfRange"], t.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], t.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, t.dataBound = [-1 / 0, 1 / 0], t.targetVisuals = {}, t.controllerVisuals = {}, t;
    }
    return e.prototype.init = function(t, a, n) {
      this.mergeDefaultAndTheme(t, n);
    }, e.prototype.optionUpdated = function(t, a) {
      var n = this.option;
      !a && hL(n, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
    }, e.prototype.resetVisual = function(t) {
      var a = this.stateList;
      t = Y(t, this), this.controllerVisuals = qd(this.option.controller, a, t), this.targetVisuals = qd(this.option.target, a, t);
    }, e.prototype.getItemSymbol = function() {
      return null;
    }, e.prototype.getTargetSeriesIndices = function() {
      var t = this.option.seriesIndex, a = [];
      return t == null || t === "all" ? this.ecModel.eachSeries(function(n, i) {
        a.push(i);
      }) : a = Pt(t), a;
    }, e.prototype.eachTargetSeries = function(t, a) {
      C(this.getTargetSeriesIndices(), function(n) {
        var i = this.ecModel.getSeriesByIndex(n);
        i && t.call(a, i);
      }, this);
    }, e.prototype.isTargetSeries = function(t) {
      var a = !1;
      return this.eachTargetSeries(function(n) {
        n === t && (a = !0);
      }), a;
    }, e.prototype.formatValueText = function(t, a, n) {
      var i = this.option, o = i.precision, s = this.dataBound, l = i.formatter, u;
      n = n || ["<", ">"], z(t) && (t = t.slice(), u = !0);
      var f = a ? t : u ? [h(t[0]), h(t[1])] : h(t);
      if ($(l))
        return l.replace("{value}", u ? f[0] : f).replace("{value2}", u ? f[1] : f);
      if (q(l))
        return u ? l(t[0], t[1]) : l(t);
      if (u)
        return t[0] === s[0] ? n[0] + " " + f[1] : t[1] === s[1] ? n[1] + " " + f[0] : f[0] + " - " + f[1];
      return f;
      function h(v) {
        return v === s[0] ? "min" : v === s[1] ? "max" : (+v).toFixed(Math.min(o, 20));
      }
    }, e.prototype.resetExtent = function() {
      var t = this.option, a = uZ([t.min, t.max]);
      this._dataExtent = a;
    }, e.prototype.getDataDimensionIndex = function(t) {
      var a = this.option.dimension;
      if (a != null)
        return t.getDimensionIndex(a);
      for (var n = t.dimensions, i = n.length - 1; i >= 0; i--) {
        var o = n[i], s = t.getDimensionInfo(o);
        if (!s.isCalculationCoord)
          return s.storeDimIndex;
      }
    }, e.prototype.getExtent = function() {
      return this._dataExtent.slice();
    }, e.prototype.completeVisualOption = function() {
      var t = this.ecModel, a = this.option, n = {
        inRange: a.inRange,
        outOfRange: a.outOfRange
      }, i = a.target || (a.target = {}), o = a.controller || (a.controller = {});
      ft(i, n), ft(o, n);
      var s = this.isCategory();
      l.call(this, i), l.call(this, o), u.call(this, i, "inRange", "outOfRange"), f.call(this, o);
      function l(h) {
        lZ(a.color) && !h.inRange && (h.inRange = {
          color: a.color.slice().reverse()
        }), h.inRange = h.inRange || {
          color: t.get("gradientColor")
        };
      }
      function u(h, v, c) {
        var p = h[v], d = h[c];
        p && !d && (d = h[c] = {}, jw(p, function(g, y) {
          if (he.isValidType(y)) {
            var m = bL.get(y, "inactive", s);
            m != null && (d[y] = m, y === "color" && !d.hasOwnProperty("opacity") && !d.hasOwnProperty("colorAlpha") && (d.opacity = [0, 0]));
          }
        }));
      }
      function f(h) {
        var v = (h.inRange || {}).symbol || (h.outOfRange || {}).symbol, c = (h.inRange || {}).symbolSize || (h.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), d = this.getItemSymbol(), g = d || "roundRect";
        jw(this.stateList, function(y) {
          var m = this.itemSize, _ = h[y];
          _ || (_ = h[y] = {
            color: s ? p : [p]
          }), _.symbol == null && (_.symbol = v && rt(v) || (s ? g : [g])), _.symbolSize == null && (_.symbolSize = c && rt(c) || (s ? m[0] : [m[0], m[0]])), _.symbol = Kw(_.symbol, function(x) {
            return x === "none" ? g : x;
          });
          var S = _.symbolSize;
          if (S != null) {
            var w = -1 / 0;
            sZ(S, function(x) {
              x > w && (w = x);
            }), _.symbolSize = Kw(S, function(x) {
              return fZ(x, [0, w], [0, m[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(t) {
    }, e.prototype.getSelected = function() {
      return null;
    }, e.prototype.getValueState = function(t) {
      return null;
    }, e.prototype.getVisualMeta = function(t) {
      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;
  }(St)
);
const Jf = hZ;
var Qw = [20, 140], vZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.optionUpdated = function(t, a) {
      r.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(n) {
        n.mappingMethod = "linear", n.dataExtent = this.getExtent();
      }), this._resetRange();
    }, e.prototype.resetItemSize = function() {
      r.prototype.resetItemSize.apply(this, arguments);
      var t = this.itemSize;
      (t[0] == null || isNaN(t[0])) && (t[0] = Qw[0]), (t[1] == null || isNaN(t[1])) && (t[1] = Qw[1]);
    }, e.prototype._resetRange = function() {
      var t = this.getExtent(), a = this.option.range;
      !a || a.auto ? (t.auto = 1, this.option.range = t) : z(a) && (a[0] > a[1] && a.reverse(), a[0] = Math.max(a[0], t[0]), a[1] = Math.min(a[1], t[1]));
    }, e.prototype.completeVisualOption = function() {
      r.prototype.completeVisualOption.apply(this, arguments), C(this.stateList, function(t) {
        var a = this.option.controller[t].symbolSize;
        a && a[0] !== a[1] && (a[0] = a[1] / 3);
      }, this);
    }, e.prototype.setSelected = function(t) {
      this.option.range = t.slice(), this._resetRange();
    }, e.prototype.getSelected = function() {
      var t = this.getExtent(), a = or((this.get("range") || []).slice());
      return a[0] > t[1] && (a[0] = t[1]), a[1] > t[1] && (a[1] = t[1]), a[0] < t[0] && (a[0] = t[0]), a[1] < t[0] && (a[1] = t[0]), a;
    }, e.prototype.getValueState = function(t) {
      var a = this.option.range, n = this.getExtent();
      return (a[0] <= n[0] || a[0] <= t) && (a[1] >= n[1] || t <= a[1]) ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(t) {
      var a = [];
      return this.eachTargetSeries(function(n) {
        var i = [], o = n.getData();
        o.each(this.getDataDimensionIndex(o), function(s, l) {
          t[0] <= s && s <= t[1] && i.push(l);
        }, this), a.push({
          seriesId: n.id,
          dataIndex: i
        });
      }, this), a;
    }, e.prototype.getVisualMeta = function(t) {
      var a = Jw(this, "outOfRange", this.getExtent()), n = Jw(this, "inRange", this.option.range.slice()), i = [];
      function o(c, p) {
        i.push({
          value: c,
          color: t(c, p)
        });
      }
      for (var s = 0, l = 0, u = n.length, f = a.length; l < f && (!n.length || a[l] <= n[0]); l++)
        a[l] < n[s] && o(a[l], "outOfRange");
      for (var h = 1; s < u; s++, h = 0)
        h && i.length && o(n[s], "outOfRange"), o(n[s], "inRange");
      for (var h = 1; l < f; l++)
        (!n.length || n[n.length - 1] < a[l]) && (h && (i.length && o(i[i.length - 1].value, "outOfRange"), h = 0), o(a[l], "outOfRange"));
      var v = i.length;
      return {
        stops: i,
        outerColors: [v ? i[0].color : "transparent", v ? i[v - 1].color : "transparent"]
      };
    }, e.type = "visualMap.continuous", e.defaultOption = sn(Jf.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;
  }(Jf)
);
function Jw(r, e, t) {
  if (t[0] === t[1])
    return t.slice();
  for (var a = 200, n = (t[1] - t[0]) / a, i = t[0], o = [], s = 0; s <= a && i < t[1]; s++)
    o.push(i), i += n;
  return o.push(t[1]), o;
}
const cZ = vZ;
var pZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t.autoPositionValues = {
        left: 1,
        right: 1,
        top: 1,
        bottom: 1
      }, t;
    }
    return e.prototype.init = function(t, a) {
      this.ecModel = t, this.api = a;
    }, e.prototype.render = function(t, a, n, i) {
      if (this.visualMapModel = t, t.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      this.doRender(t, a, n, i);
    }, e.prototype.renderBackground = function(t) {
      var a = this.visualMapModel, n = Mo(a.get("padding") || 0), i = t.getBoundingRect();
      t.add(new bt({
        z2: -1,
        silent: !0,
        shape: {
          x: i.x - n[3],
          y: i.y - n[0],
          width: i.width + n[3] + n[1],
          height: i.height + n[0] + n[2]
        },
        style: {
          fill: a.get("backgroundColor"),
          stroke: a.get("borderColor"),
          lineWidth: a.get("borderWidth")
        }
      }));
    }, e.prototype.getControllerVisual = function(t, a, n) {
      n = n || {};
      var i = n.forceState, o = this.visualMapModel, s = {};
      if (a === "color") {
        var l = o.get("contentColor");
        s.color = l;
      }
      function u(c) {
        return s[c];
      }
      function f(c, p) {
        s[c] = p;
      }
      var h = o.controllerVisuals[i || o.getValueState(t)], v = he.prepareVisualTypes(h);
      return C(v, function(c) {
        var p = h[c];
        n.convertOpacityToAlpha && c === "opacity" && (c = "colorAlpha", p = h.__alphaForOpacity), he.dependsOn(c, a) && p && p.applyVisual(t, u, f);
      }), s[a];
    }, e.prototype.positionGroup = function(t) {
      var a = this.visualMapModel, n = this.api;
      Mh(t, a.getBoxLayoutParams(), {
        width: n.getWidth(),
        height: n.getHeight()
      });
    }, e.prototype.doRender = function(t, a, n, i) {
    }, e.type = "visualMap", e;
  }($t)
);
const TL = pZ;
var tb = [["left", "right", "width"], ["top", "bottom", "height"]];
function DL(r, e, t) {
  var a = r.option, n = a.align;
  if (n != null && n !== "auto")
    return n;
  for (var i = {
    width: e.getWidth(),
    height: e.getHeight()
  }, o = a.orient === "horizontal" ? 1 : 0, s = tb[o], l = [0, null, 10], u = {}, f = 0; f < 3; f++)
    u[tb[1 - o][f]] = l[f], u[s[f]] = f === 2 ? t[0] : a[s[f]];
  var h = [["x", "width", 3], ["y", "height", 0]][o], v = re(u, i, a.padding);
  return s[(v.margin[h[2]] || 0) + v[h[0]] + v[h[1]] * 0.5 < i[h[1]] * 0.5 ? 0 : 1];
}
function tf(r, e) {
  return C(r || [], function(t) {
    t.dataIndex != null && (t.dataIndexInside = t.dataIndex, t.dataIndex = null), t.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  }), r;
}
var Or = Lt, dZ = C, eb = Math.min, pp = Math.max, gZ = 12, yZ = 6, mZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._shapes = {}, t._dataInterval = [], t._handleEnds = [], t._hoverLinkDataIndices = [], t;
    }
    return e.prototype.doRender = function(t, a, n, i) {
      this._api = n, (!i || i.type !== "selectDataRange" || i.from !== this.uid) && this._buildView();
    }, e.prototype._buildView = function() {
      this.group.removeAll();
      var t = this.visualMapModel, a = this.group;
      this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(a);
      var n = t.get("text");
      this._renderEndsText(a, n, 0), this._renderEndsText(a, n, 1), this._updateView(!0), this.renderBackground(a), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(a);
    }, e.prototype._renderEndsText = function(t, a, n) {
      if (a) {
        var i = a[1 - n];
        i = i != null ? i + "" : "";
        var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, f = this._applyTransform([l[0] / 2, n === 0 ? -s : l[1] + s], u), h = this._applyTransform(n === 0 ? "bottom" : "top", u), v = this._orient, c = this.visualMapModel.textStyleModel;
        this.group.add(new Dt({
          style: Ot(c, {
            x: f[0],
            y: f[1],
            verticalAlign: v === "horizontal" ? "middle" : h,
            align: v === "horizontal" ? h : "center",
            text: i
          })
        }));
      }
    }, e.prototype._renderBar = function(t) {
      var a = this.visualMapModel, n = this._shapes, i = a.itemSize, o = this._orient, s = this._useHandle, l = DL(a, this.api, i), u = n.mainGroup = this._createBarGroup(l), f = new nt();
      u.add(f), f.add(n.outOfRange = rb()), f.add(n.inRange = rb(null, s ? nb(this._orient) : null, Y(this._dragHandle, this, "all", !1), Y(this._dragHandle, this, "all", !0))), f.setClipPath(new bt({
        shape: {
          x: 0,
          y: 0,
          width: i[0],
          height: i[1],
          r: 3
        }
      }));
      var h = a.textStyleModel.getTextRect("国"), v = pp(h.width, h.height);
      s && (n.handleThumbs = [], n.handleLabels = [], n.handleLabelPoints = [], this._createHandle(a, u, 0, i, v, o), this._createHandle(a, u, 1, i, v, o)), this._createIndicator(a, u, i, v, o), t.add(u);
    }, e.prototype._createHandle = function(t, a, n, i, o, s) {
      var l = Y(this._dragHandle, this, n, !1), u = Y(this._dragHandle, this, n, !0), f = Tr(t.get("handleSize"), i[0]), h = Jt(t.get("handleIcon"), -f / 2, -f / 2, f, f, null, !0), v = nb(this._orient);
      h.attr({
        cursor: v,
        draggable: !0,
        drift: l,
        ondragend: u,
        onmousemove: function(y) {
          ca(y.event);
        }
      }), h.x = i[0] / 2, h.useStyle(t.getModel("handleStyle").getItemStyle()), h.setStyle({
        strokeNoScale: !0,
        strokeFirst: !0
      }), h.style.lineWidth *= 2, h.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), Yn(h, !0), a.add(h);
      var c = this.visualMapModel.textStyleModel, p = new Dt({
        cursor: v,
        draggable: !0,
        drift: l,
        onmousemove: function(y) {
          ca(y.event);
        },
        ondragend: u,
        style: Ot(c, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      p.ensureState("blur").style = {
        opacity: 0.1
      }, p.stateTransition = {
        duration: 200
      }, this.group.add(p);
      var d = [f, 0], g = this._shapes;
      g.handleThumbs[n] = h, g.handleLabelPoints[n] = d, g.handleLabels[n] = p;
    }, e.prototype._createIndicator = function(t, a, n, i, o) {
      var s = Tr(t.get("indicatorSize"), n[0]), l = Jt(t.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
      l.attr({
        cursor: "move",
        invisible: !0,
        silent: !0,
        x: n[0] / 2
      });
      var u = t.getModel("indicatorStyle").getItemStyle();
      if (l instanceof de) {
        var f = l.style;
        l.useStyle(V({
          // TODO other properties like x, y ?
          image: f.image,
          x: f.x,
          y: f.y,
          width: f.width,
          height: f.height
        }, u));
      } else
        l.useStyle(u);
      a.add(l);
      var h = this.visualMapModel.textStyleModel, v = new Dt({
        silent: !0,
        invisible: !0,
        style: Ot(h, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      this.group.add(v);
      var c = [(o === "horizontal" ? i / 2 : yZ) + n[0] / 2, 0], p = this._shapes;
      p.indicator = l, p.indicatorLabel = v, p.indicatorLabelPoint = c, this._firstShowIndicator = !0;
    }, e.prototype._dragHandle = function(t, a, n, i) {
      if (this._useHandle) {
        if (this._dragging = !a, !a) {
          var o = this._applyTransform([n, i], this._shapes.mainGroup, !0);
          this._updateInterval(t, o[1]), this._hideIndicator(), this._updateView();
        }
        a === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
          type: "selectDataRange",
          from: this.uid,
          visualMapId: this.visualMapModel.id,
          selected: this._dataInterval.slice()
        }), a ? !this._hovering && this._clearHoverLinkToSeries() : ab(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1);
      }
    }, e.prototype._resetInterval = function() {
      var t = this.visualMapModel, a = this._dataInterval = t.getSelected(), n = t.getExtent(), i = [0, t.itemSize[1]];
      this._handleEnds = [Or(a[0], n, i, !0), Or(a[1], n, i, !0)];
    }, e.prototype._updateInterval = function(t, a) {
      a = a || 0;
      var n = this.visualMapModel, i = this._handleEnds, o = [0, n.itemSize[1]];
      wi(
        a,
        i,
        o,
        t,
        // cross is forbidden
        0
      );
      var s = n.getExtent();
      this._dataInterval = [Or(i[0], o, s, !0), Or(i[1], o, s, !0)];
    }, e.prototype._updateView = function(t) {
      var a = this.visualMapModel, n = a.getExtent(), i = this._shapes, o = [0, a.itemSize[1]], s = t ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, n, s, "inRange"), u = this._createBarVisual(n, n, o, "outOfRange");
      i.inRange.setStyle({
        fill: l.barColor
        // opacity: visualInRange.opacity
      }).setShape("points", l.barPoints), i.outOfRange.setStyle({
        fill: u.barColor
        // opacity: visualOutOfRange.opacity
      }).setShape("points", u.barPoints), this._updateHandle(s, l);
    }, e.prototype._createBarVisual = function(t, a, n, i) {
      var o = {
        forceState: i,
        convertOpacityToAlpha: !0
      }, s = this._makeColorGradient(t, o), l = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)], u = this._createBarPoints(n, l);
      return {
        barColor: new dl(0, 0, 0, 1, s),
        barPoints: u,
        handlesColor: [s[0].color, s[s.length - 1].color]
      };
    }, e.prototype._makeColorGradient = function(t, a) {
      var n = 100, i = [], o = (t[1] - t[0]) / n;
      i.push({
        color: this.getControllerVisual(t[0], "color", a),
        offset: 0
      });
      for (var s = 1; s < n; s++) {
        var l = t[0] + o * s;
        if (l > t[1])
          break;
        i.push({
          color: this.getControllerVisual(l, "color", a),
          offset: s / n
        });
      }
      return i.push({
        color: this.getControllerVisual(t[1], "color", a),
        offset: 1
      }), i;
    }, e.prototype._createBarPoints = function(t, a) {
      var n = this.visualMapModel.itemSize;
      return [[n[0] - a[0], t[0]], [n[0], t[0]], [n[0], t[1]], [n[0] - a[1], t[1]]];
    }, e.prototype._createBarGroup = function(t) {
      var a = this._orient, n = this.visualMapModel.get("inverse");
      return new nt(a === "horizontal" && !n ? {
        scaleX: t === "bottom" ? 1 : -1,
        rotation: Math.PI / 2
      } : a === "horizontal" && n ? {
        scaleX: t === "bottom" ? -1 : 1,
        rotation: -Math.PI / 2
      } : a === "vertical" && !n ? {
        scaleX: t === "left" ? 1 : -1,
        scaleY: -1
      } : {
        scaleX: t === "left" ? 1 : -1
      });
    }, e.prototype._updateHandle = function(t, a) {
      if (this._useHandle) {
        var n = this._shapes, i = this.visualMapModel, o = n.handleThumbs, s = n.handleLabels, l = i.itemSize, u = i.getExtent();
        dZ([0, 1], function(f) {
          var h = o[f];
          h.setStyle("fill", a.handlesColor[f]), h.y = t[f];
          var v = Or(t[f], [0, l[1]], u, !0), c = this.getControllerVisual(v, "symbolSize");
          h.scaleX = h.scaleY = c / l[0], h.x = l[0] - c / 2;
          var p = br(n.handleLabelPoints[f], ai(h, this.group));
          s[f].setStyle({
            x: p[0],
            y: p[1],
            text: i.formatValueText(this._dataInterval[f]),
            verticalAlign: "middle",
            align: this._orient === "vertical" ? this._applyTransform("left", n.mainGroup) : "center"
          });
        }, this);
      }
    }, e.prototype._showIndicator = function(t, a, n, i) {
      var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], f = this._shapes, h = f.indicator;
      if (h) {
        h.attr("invisible", !1);
        var v = {
          convertOpacityToAlpha: !0
        }, c = this.getControllerVisual(t, "color", v), p = this.getControllerVisual(t, "symbolSize"), d = Or(t, s, u, !0), g = l[0] - p / 2, y = {
          x: h.x,
          y: h.y
        };
        h.y = d, h.x = g;
        var m = br(f.indicatorLabelPoint, ai(h, this.group)), _ = f.indicatorLabel;
        _.attr("invisible", !1);
        var S = this._applyTransform("left", f.mainGroup), w = this._orient, x = w === "horizontal";
        _.setStyle({
          text: (n || "") + o.formatValueText(a),
          verticalAlign: x ? S : "middle",
          align: x ? "center" : S
        });
        var b = {
          x: g,
          y: d,
          style: {
            fill: c
          }
        }, T = {
          style: {
            x: m[0],
            y: m[1]
          }
        };
        if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
          var D = {
            duration: 100,
            easing: "cubicInOut",
            additive: !0
          };
          h.x = y.x, h.y = y.y, h.animateTo(b, D), _.animateTo(T, D);
        } else
          h.attr(b), _.attr(T);
        this._firstShowIndicator = !1;
        var A = this._shapes.handleLabels;
        if (A)
          for (var M = 0; M < A.length; M++)
            this._api.enterBlur(A[M]);
      }
    }, e.prototype._enableHoverLinkToSeries = function() {
      var t = this;
      this._shapes.mainGroup.on("mousemove", function(a) {
        if (t._hovering = !0, !t._dragging) {
          var n = t.visualMapModel.itemSize, i = t._applyTransform([a.offsetX, a.offsetY], t._shapes.mainGroup, !0, !0);
          i[1] = eb(pp(0, i[1]), n[1]), t._doHoverLinkToSeries(i[1], 0 <= i[0] && i[0] <= n[0]);
        }
      }).on("mouseout", function() {
        t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries();
      });
    }, e.prototype._enableHoverLinkFromSeries = function() {
      var t = this.api.getZr();
      this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
    }, e.prototype._doHoverLinkToSeries = function(t, a) {
      var n = this.visualMapModel, i = n.itemSize;
      if (n.option.hoverLink) {
        var o = [0, i[1]], s = n.getExtent();
        t = eb(pp(o[0], t), o[1]);
        var l = _Z(n, s, o), u = [t - l, t + l], f = Or(t, o, s, !0), h = [Or(u[0], o, s, !0), Or(u[1], o, s, !0)];
        u[0] < o[0] && (h[0] = -1 / 0), u[1] > o[1] && (h[1] = 1 / 0), a && (h[0] === -1 / 0 ? this._showIndicator(f, h[1], "< ", l) : h[1] === 1 / 0 ? this._showIndicator(f, h[0], "> ", l) : this._showIndicator(f, f, "≈ ", l));
        var v = this._hoverLinkDataIndices, c = [];
        (a || ab(n)) && (c = this._hoverLinkDataIndices = n.findTargetDataIndices(h));
        var p = oP(v, c);
        this._dispatchHighDown("downplay", tf(p[0], n)), this._dispatchHighDown("highlight", tf(p[1], n));
      }
    }, e.prototype._hoverLinkFromSeriesMouseOver = function(t) {
      var a;
      if (Xn(t.target, function(l) {
        var u = it(l);
        if (u.dataIndex != null)
          return a = u, !0;
      }, !0), !!a) {
        var n = this.ecModel.getSeriesByIndex(a.seriesIndex), i = this.visualMapModel;
        if (i.isTargetSeries(n)) {
          var o = n.getData(a.dataType), s = o.getStore().get(i.getDataDimensionIndex(o), a.dataIndex);
          isNaN(s) || this._showIndicator(s, s);
        }
      }
    }, e.prototype._hideIndicator = function() {
      var t = this._shapes;
      t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
      var a = this._shapes.handleLabels;
      if (a)
        for (var n = 0; n < a.length; n++)
          this._api.leaveBlur(a[n]);
    }, e.prototype._clearHoverLinkToSeries = function() {
      this._hideIndicator();
      var t = this._hoverLinkDataIndices;
      this._dispatchHighDown("downplay", tf(t, this.visualMapModel)), t.length = 0;
    }, e.prototype._clearHoverLinkFromSeries = function() {
      this._hideIndicator();
      var t = this.api.getZr();
      t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator);
    }, e.prototype._applyTransform = function(t, a, n, i) {
      var o = ai(a, i ? null : this.group);
      return z(t) ? br(t, o, n) : xh(t, o, n);
    }, e.prototype._dispatchHighDown = function(t, a) {
      a && a.length && this.api.dispatchAction({
        type: t,
        batch: a
      });
    }, e.prototype.dispose = function() {
      this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
    }, e.prototype.remove = function() {
      this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
    }, e.type = "visualMap.continuous", e;
  }(TL)
);
function rb(r, e, t, a) {
  return new Be({
    shape: {
      points: r
    },
    draggable: !!t,
    cursor: e,
    drift: t,
    onmousemove: function(n) {
      ca(n.event);
    },
    ondragend: a
  });
}
function _Z(r, e, t) {
  var a = gZ / 2, n = r.get("hoverLinkDataSize");
  return n && (a = Or(n, e, t, !0) / 2), a;
}
function ab(r) {
  var e = r.get("hoverLinkOnHandle");
  return !!(e ?? r.get("realtime"));
}
function nb(r) {
  return r === "vertical" ? "ns-resize" : "ew-resize";
}
const SZ = mZ;
var xZ = {
  type: "selectDataRange",
  event: "dataRangeSelected",
  // FIXME use updateView appears wrong
  update: "update"
}, wZ = function(r, e) {
  e.eachComponent({
    mainType: "visualMap",
    query: r
  }, function(t) {
    t.setSelected(r.selected);
  });
}, bZ = [
  {
    createOnAllSeries: !0,
    reset: function(r, e) {
      var t = [];
      return e.eachComponent("visualMap", function(a) {
        var n = r.pipelineContext;
        !a.isTargetSeries(r) || n && n.large || t.push(y7(a.stateList, a.targetVisuals, Y(a.getValueState, a), a.getDataDimensionIndex(r.getData())));
      }), t;
    }
  },
  // Only support color.
  {
    createOnAllSeries: !0,
    reset: function(r, e) {
      var t = r.getData(), a = [];
      e.eachComponent("visualMap", function(n) {
        if (n.isTargetSeries(r)) {
          var i = n.getVisualMeta(Y(TZ, null, r, n)) || {
            stops: [],
            outerColors: []
          }, o = n.getDataDimensionIndex(t);
          o >= 0 && (i.dimension = o, a.push(i));
        }
      }), r.getData().setVisual("visualMeta", a);
    }
  }
];
function TZ(r, e, t, a) {
  for (var n = e.targetVisuals[a], i = he.prepareVisualTypes(n), o = {
    color: _l(r.getData(), "color")
    // default color.
  }, s = 0, l = i.length; s < l; s++) {
    var u = i[s], f = n[u === "opacity" ? "__alphaForOpacity" : u];
    f && f.applyVisual(t, h, v);
  }
  return o.color;
  function h(c) {
    return o[c];
  }
  function v(c, p) {
    o[c] = p;
  }
}
var ib = C;
function DZ(r) {
  var e = r && r.visualMap;
  z(e) || (e = e ? [e] : []), ib(e, function(t) {
    if (t) {
      Wi(t, "splitList") && !Wi(t, "pieces") && (t.pieces = t.splitList, delete t.splitList);
      var a = t.pieces;
      a && z(a) && ib(a, function(n) {
        j(n) && (Wi(n, "start") && !Wi(n, "min") && (n.min = n.start), Wi(n, "end") && !Wi(n, "max") && (n.max = n.end));
      });
    }
  });
}
function Wi(r, e) {
  return r && r.hasOwnProperty && r.hasOwnProperty(e);
}
var ob = !1;
function CL(r) {
  ob || (ob = !0, r.registerSubTypeDefaulter("visualMap", function(e) {
    return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  }), r.registerAction(xZ, wZ), C(bZ, function(e) {
    r.registerVisual(r.PRIORITY.VISUAL.COMPONENT, e);
  }), r.registerPreprocessor(DZ));
}
function AL(r) {
  r.registerComponentModel(cZ), r.registerComponentView(SZ), CL(r);
}
var CZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t._pieceList = [], t;
    }
    return e.prototype.optionUpdated = function(t, a) {
      r.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
      var n = this._mode = this._determineMode();
      this._pieceList = [], AZ[this._mode].call(this, this._pieceList), this._resetSelected(t, a);
      var i = this.option.categories;
      this.resetVisual(function(o, s) {
        n === "categories" ? (o.mappingMethod = "category", o.categories = rt(i)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = G(this._pieceList, function(l) {
          return l = rt(l), s !== "inRange" && (l.visual = null), l;
        }));
      });
    }, e.prototype.completeVisualOption = function() {
      var t = this.option, a = {}, n = he.listVisualTypes(), i = this.isCategory();
      C(t.pieces, function(s) {
        C(n, function(l) {
          s.hasOwnProperty(l) && (a[l] = 1);
        });
      }), C(a, function(s, l) {
        var u = !1;
        C(this.stateList, function(f) {
          u = u || o(t, f, l) || o(t.target, f, l);
        }, this), !u && C(this.stateList, function(f) {
          (t[f] || (t[f] = {}))[l] = bL.get(l, f === "inRange" ? "active" : "inactive", i);
        });
      }, this);
      function o(s, l, u) {
        return s && s[l] && s[l].hasOwnProperty(u);
      }
      r.prototype.completeVisualOption.apply(this, arguments);
    }, e.prototype._resetSelected = function(t, a) {
      var n = this.option, i = this._pieceList, o = (a ? n : t).selected || {};
      if (n.selected = o, C(i, function(l, u) {
        var f = this.getSelectedMapKey(l);
        o.hasOwnProperty(f) || (o[f] = !0);
      }, this), n.selectedMode === "single") {
        var s = !1;
        C(i, function(l, u) {
          var f = this.getSelectedMapKey(l);
          o[f] && (s ? o[f] = !1 : s = !0);
        }, this);
      }
    }, e.prototype.getItemSymbol = function() {
      return this.get("itemSymbol");
    }, e.prototype.getSelectedMapKey = function(t) {
      return this._mode === "categories" ? t.value + "" : t.index + "";
    }, e.prototype.getPieceList = function() {
      return this._pieceList;
    }, e.prototype._determineMode = function() {
      var t = this.option;
      return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
    }, e.prototype.setSelected = function(t) {
      this.option.selected = rt(t);
    }, e.prototype.getValueState = function(t) {
      var a = he.findPieceIndex(t, this._pieceList);
      return a != null && this.option.selected[this.getSelectedMapKey(this._pieceList[a])] ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(t) {
      var a = [], n = this._pieceList;
      return this.eachTargetSeries(function(i) {
        var o = [], s = i.getData();
        s.each(this.getDataDimensionIndex(s), function(l, u) {
          var f = he.findPieceIndex(l, n);
          f === t && o.push(u);
        }, this), a.push({
          seriesId: i.id,
          dataIndex: o
        });
      }, this), a;
    }, e.prototype.getRepresentValue = function(t) {
      var a;
      if (this.isCategory())
        a = t.value;
      else if (t.value != null)
        a = t.value;
      else {
        var n = t.interval || [];
        a = n[0] === -1 / 0 && n[1] === 1 / 0 ? 0 : (n[0] + n[1]) / 2;
      }
      return a;
    }, e.prototype.getVisualMeta = function(t) {
      if (this.isCategory())
        return;
      var a = [], n = ["", ""], i = this;
      function o(f, h) {
        var v = i.getRepresentValue({
          interval: f
        });
        h || (h = i.getValueState(v));
        var c = t(v, h);
        f[0] === -1 / 0 ? n[0] = c : f[1] === 1 / 0 ? n[1] = c : a.push({
          value: f[0],
          color: c
        }, {
          value: f[1],
          color: c
        });
      }
      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 C(s, function(f) {
        var h = f.interval;
        h && (h[0] > u && o([u, h[0]], "outOfRange"), o(h.slice()), u = h[1]);
      }, this), {
        stops: a,
        outerColors: n
      };
    }, e.type = "visualMap.piecewise", e.defaultOption = sn(Jf.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;
  }(Jf)
), AZ = {
  splitNumber: function(r) {
    var e = this.option, t = Math.min(e.precision, 20), a = this.getExtent(), n = e.splitNumber;
    n = Math.max(parseInt(n, 10), 1), e.splitNumber = n;
    for (var i = (a[1] - a[0]) / n; +i.toFixed(t) !== i && t < 5; )
      t++;
    e.precision = t, i = +i.toFixed(t), e.minOpen && r.push({
      interval: [-1 / 0, a[0]],
      close: [0, 0]
    });
    for (var o = 0, s = a[0]; o < n; s += i, o++) {
      var l = o === n - 1 ? a[1] : s + i;
      r.push({
        interval: [s, l],
        close: [1, 1]
      });
    }
    e.maxOpen && r.push({
      interval: [a[1], 1 / 0],
      close: [0, 0]
    }), Zm(r), C(r, function(u, f) {
      u.index = f, u.text = this.formatValueText(u.interval);
    }, this);
  },
  categories: function(r) {
    var e = this.option;
    C(e.categories, function(t) {
      r.push({
        text: this.formatValueText(t, !0),
        value: t
      });
    }, this), sb(e, r);
  },
  pieces: function(r) {
    var e = this.option;
    C(e.pieces, function(t, a) {
      j(t) || (t = {
        value: t
      });
      var n = {
        text: "",
        index: a
      };
      if (t.label != null && (n.text = t.label), t.hasOwnProperty("value")) {
        var i = n.value = t.value;
        n.interval = [i, i], n.close = [1, 1];
      } else {
        for (var o = n.interval = [], s = n.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], f = [], h = 0; h < 2; h++) {
          for (var v = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], c = 0; c < 3 && o[h] == null; c++)
            o[h] = t[v[c]], s[h] = l[c], f[h] = c === 2;
          o[h] == null && (o[h] = u[h]);
        }
        f[0] && o[1] === 1 / 0 && (s[0] = 0), f[1] && o[0] === -1 / 0 && (s[1] = 0), {}.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + a + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (n.value = o[0]);
      }
      n.visual = he.retrieveVisuals(t), r.push(n);
    }, this), sb(e, r), Zm(r), C(r, function(t) {
      var a = t.close, n = [["<", "≤"][a[1]], [">", "≥"][a[0]]];
      t.text = t.text || this.formatValueText(t.value != null ? t.value : t.interval, !1, n);
    }, this);
  }
};
function sb(r, e) {
  var t = r.inverse;
  (r.orient === "vertical" ? !t : t) && e.reverse();
}
const MZ = CZ;
var IZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = e.type, t;
    }
    return e.prototype.doRender = function() {
      var t = this.group;
      t.removeAll();
      var a = this.visualMapModel, n = a.get("textGap"), i = a.textStyleModel, o = i.getFont(), s = i.getTextColor(), l = this._getItemAlign(), u = a.itemSize, f = this._getViewData(), h = f.endsText, v = jt(a.get("showLabel", !0), !h);
      h && this._renderEndsText(t, h[0], u, v, l), C(f.viewPieceList, function(c) {
        var p = c.piece, d = new nt();
        d.onclick = Y(this._onItemClick, this, p), this._enableHoverLink(d, c.indexInModelPieceList);
        var g = a.getRepresentValue(p);
        if (this._createItemSymbol(d, g, [0, 0, u[0], u[1]]), v) {
          var y = this.visualMapModel.getValueState(g);
          d.add(new Dt({
            style: {
              x: l === "right" ? -n : u[0] + n,
              y: u[1] / 2,
              text: p.text,
              verticalAlign: "middle",
              align: l,
              font: o,
              fill: s,
              opacity: y === "outOfRange" ? 0.5 : 1
            }
          }));
        }
        t.add(d);
      }, this), h && this._renderEndsText(t, h[1], u, v, l), ni(a.get("orient"), t, a.get("itemGap")), this.renderBackground(t), this.positionGroup(t);
    }, e.prototype._enableHoverLink = function(t, a) {
      var n = this;
      t.on("mouseover", function() {
        return i("highlight");
      }).on("mouseout", function() {
        return i("downplay");
      });
      var i = function(o) {
        var s = n.visualMapModel;
        s.option.hoverLink && n.api.dispatchAction({
          type: o,
          batch: tf(s.findTargetDataIndices(a), s)
        });
      };
    }, e.prototype._getItemAlign = function() {
      var t = this.visualMapModel, a = t.option;
      if (a.orient === "vertical")
        return DL(t, this.api, t.itemSize);
      var n = a.align;
      return (!n || n === "auto") && (n = "left"), n;
    }, e.prototype._renderEndsText = function(t, a, n, i, o) {
      if (a) {
        var s = new nt(), l = this.visualMapModel.textStyleModel;
        s.add(new Dt({
          style: Ot(l, {
            x: i ? o === "right" ? n[0] : 0 : n[0] / 2,
            y: n[1] / 2,
            verticalAlign: "middle",
            align: i ? o : "center",
            text: a
          })
        })), t.add(s);
      }
    }, e.prototype._getViewData = function() {
      var t = this.visualMapModel, a = G(t.getPieceList(), function(s, l) {
        return {
          piece: s,
          indexInModelPieceList: l
        };
      }), n = t.get("text"), i = t.get("orient"), o = t.get("inverse");
      return (i === "horizontal" ? o : !o) ? a.reverse() : n && (n = n.slice().reverse()), {
        viewPieceList: a,
        endsText: n
      };
    }, e.prototype._createItemSymbol = function(t, a, n) {
      t.add(Jt(
        // symbol will be string
        this.getControllerVisual(a, "symbol"),
        n[0],
        n[1],
        n[2],
        n[3],
        // color will be string
        this.getControllerVisual(a, "color")
      ));
    }, e.prototype._onItemClick = function(t) {
      var a = this.visualMapModel, n = a.option, i = n.selectedMode;
      if (i) {
        var o = rt(n.selected), s = a.getSelectedMapKey(t);
        i === "single" || i === !0 ? (o[s] = !0, C(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;
  }(TL)
);
const LZ = IZ;
function ML(r) {
  r.registerComponentModel(MZ), r.registerComponentView(LZ), CL(r);
}
function EZ(r) {
  pt(AL), pt(ML);
}
var PZ = {
  label: {
    enabled: !0
  },
  decal: {
    show: !1
  }
}, lb = Tt(), RZ = {};
function NZ(r, e) {
  var t = r.getModel("aria");
  if (!t.get("enabled"))
    return;
  var a = rt(PZ);
  ft(a.label, r.getLocaleModel().get("aria"), !1), ft(t.option, a, !1), n(), i();
  function n() {
    var u = t.getModel("decal"), f = u.get("show");
    if (f) {
      var h = K();
      r.eachSeries(function(v) {
        if (!v.isColorBySeries()) {
          var c = h.get(v.type);
          c || (c = {}, h.set(v.type, c)), lb(v).scope = c;
        }
      }), r.eachRawSeries(function(v) {
        if (r.isSeriesFiltered(v))
          return;
        if (q(v.enableAriaDecal)) {
          v.enableAriaDecal();
          return;
        }
        var c = v.getData();
        if (v.isColorBySeries()) {
          var m = nd(v.ecModel, v.name, RZ, r.getSeriesCount()), _ = c.getVisual("decal");
          c.setVisual("decal", S(_, m));
        } else {
          var p = v.getRawData(), d = {}, g = lb(v).scope;
          c.each(function(w) {
            var x = c.getRawIndex(w);
            d[x] = w;
          });
          var y = p.count();
          p.each(function(w) {
            var x = d[w], b = p.getName(w) || w + "", T = nd(v.ecModel, b, g, y), D = c.getItemVisual(x, "decal");
            c.setItemVisual(x, "decal", S(D, T));
          });
        }
        function S(w, x) {
          var b = w ? V(V({}, x), w) : x;
          return b.dirty = !0, b;
        }
      });
    }
  }
  function i() {
    var u = r.getLocaleModel().get("aria"), f = t.getModel("label");
    if (f.option = tt(f.option, u), !!f.get("enabled")) {
      var h = e.getZr().dom;
      if (f.get("description")) {
        h.setAttribute("aria-label", f.get("description"));
        return;
      }
      var v = r.getSeriesCount(), c = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, d = Math.min(v, p), g;
      if (!(v < 1)) {
        var y = s();
        if (y) {
          var m = f.get(["general", "withTitle"]);
          g = o(m, {
            title: y
          });
        } else
          g = f.get(["general", "withoutTitle"]);
        var _ = [], S = v > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
        g += o(S, {
          seriesCount: v
        }), r.eachSeries(function(T, D) {
          if (D < d) {
            var A = void 0, M = T.get("name"), I = M ? "withName" : "withoutName";
            A = v > 1 ? f.get(["series", "multiple", I]) : f.get(["series", "single", I]), A = o(A, {
              seriesId: T.seriesIndex,
              seriesName: T.get("name"),
              seriesType: l(T.subType)
            });
            var L = T.getData();
            if (L.count() > c) {
              var E = f.get(["data", "partialData"]);
              A += o(E, {
                displayCnt: c
              });
            } else
              A += f.get(["data", "allData"]);
            for (var P = f.get(["data", "separator", "middle"]), R = f.get(["data", "separator", "end"]), k = [], O = 0; O < L.count(); O++)
              if (O < c) {
                var B = L.getName(O), F = L.getValues(O), W = f.get(["data", B ? "withName" : "withoutName"]);
                k.push(o(W, {
                  name: B,
                  value: F.join(P)
                }));
              }
            A += k.join(P) + R, _.push(A);
          }
        });
        var w = f.getModel(["series", "multiple", "separator"]), x = w.get("middle"), b = w.get("end");
        g += _.join(x) + b, h.setAttribute("aria-label", g);
      }
    }
  }
  function o(u, f) {
    if (!$(u))
      return u;
    var h = u;
    return C(f, function(v, c) {
      h = h.replace(new RegExp("\\{\\s*" + c + "\\s*\\}", "g"), v);
    }), h;
  }
  function s() {
    var u = r.get("title");
    return u && u.length && (u = u[0]), u && u.text;
  }
  function l(u) {
    return r.getLocaleModel().get(["series", "typeNames"])[u] || "自定义图";
  }
}
function OZ(r) {
  if (!(!r || !r.aria)) {
    var e = r.aria;
    e.show != null && (e.enabled = e.show), e.label = e.label || {}, C(["description", "general", "series", "data"], function(t) {
      e[t] != null && (e.label[t] = e[t]);
    });
  }
}
function kZ(r) {
  r.registerPreprocessor(OZ), r.registerVisual(r.PRIORITY.VISUAL.ARIA, NZ);
}
var ub = {
  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',
}, VZ = (
  /** @class */
  function() {
    function r(e) {
      var t = this._condVal = $(e) ? new RegExp(e) : Rb(e) ? e : null;
      if (t == null) {
        var a = "";
        ({}).NODE_ENV !== "production" && (a = Ae("Illegal regexp", e, "in")), It(a);
      }
    }
    return r.prototype.evaluate = function(e) {
      var t = typeof e;
      return $(t) ? this._condVal.test(e) : Ct(t) ? this._condVal.test(e + "") : !1;
    }, r;
  }()
), BZ = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.evaluate = function() {
      return this.value;
    }, r;
  }()
), zZ = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.evaluate = function() {
      for (var e = this.children, t = 0; t < e.length; t++)
        if (!e[t].evaluate())
          return !1;
      return !0;
    }, r;
  }()
), GZ = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.evaluate = function() {
      for (var e = this.children, t = 0; t < e.length; t++)
        if (e[t].evaluate())
          return !0;
      return !1;
    }, r;
  }()
), FZ = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.evaluate = function() {
      return !this.child.evaluate();
    }, r;
  }()
), HZ = (
  /** @class */
  function() {
    function r() {
    }
    return r.prototype.evaluate = function() {
      for (var e = !!this.valueParser, t = this.getValue, a = t(this.valueGetterParam), n = e ? this.valueParser(a) : null, i = 0; i < this.subCondList.length; i++)
        if (!this.subCondList[i].evaluate(e ? n : a))
          return !1;
      return !0;
    }, r;
  }()
);
function cm(r, e) {
  if (r === !0 || r === !1) {
    var t = new BZ();
    return t.value = r, t;
  }
  var a = "";
  return IL(r) || ({}.NODE_ENV !== "production" && (a = Ae("Illegal config. Expect a plain object but actually", r)), It(a)), r.and ? fb("and", r, e) : r.or ? fb("or", r, e) : r.not ? WZ(r, e) : $Z(r, e);
}
function fb(r, e, t) {
  var a = e[r], n = "";
  ({}).NODE_ENV !== "production" && (n = Ae('"and"/"or" condition should only be `' + r + ": [...]` and must not be empty array.", "Illegal condition:", e)), z(a) || It(n), a.length || It(n);
  var i = r === "and" ? new zZ() : new GZ();
  return i.children = G(a, function(o) {
    return cm(o, t);
  }), i.children.length || It(n), i;
}
function WZ(r, e) {
  var t = r.not, a = "";
  ({}).NODE_ENV !== "production" && (a = Ae('"not" condition should only be `not: {}`.', "Illegal condition:", r)), IL(t) || It(a);
  var n = new FZ();
  return n.child = cm(t, e), n.child || It(a), n;
}
function $Z(r, e) {
  for (var t = "", a = e.prepareGetValue(r), n = [], i = _t(r), o = r.parser, s = o ? nC(o) : null, l = 0; l < i.length; l++) {
    var u = i[l];
    if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
      var f = U(ub, u) ? ub[u] : u, h = r[u], v = s ? s(h) : h, c = TO(f, v) || f === "reg" && new VZ(v);
      c || ({}.NODE_ENV !== "production" && (t = Ae('Illegal relational operation: "' + u + '" in condition:', r)), It(t)), n.push(c);
    }
  }
  n.length || ({}.NODE_ENV !== "production" && (t = Ae("Relational condition must have at least one operator.", "Illegal condition:", r)), It(t));
  var p = new HZ();
  return p.valueGetterParam = a, p.valueParser = s, p.getValue = e.getValue, p.subCondList = n, p;
}
function IL(r) {
  return j(r) && !Se(r);
}
var UZ = (
  /** @class */
  function() {
    function r(e, t) {
      this._cond = cm(e, t);
    }
    return r.prototype.evaluate = function() {
      return this._cond.evaluate();
    }, r;
  }()
);
function YZ(r, e) {
  return new UZ(r, e);
}
var ZZ = {
  type: "echarts:filter",
  // PENDING: enhance to filter by index rather than create new data
  transform: function(r) {
    for (var e = r.upstream, t, a = YZ(r.config, {
      valueGetterAttrMap: K({
        dimension: !0
      }),
      prepareGetValue: function(s) {
        var l = "", u = s.dimension;
        U(s, "dimension") || ({}.NODE_ENV !== "production" && (l = Ae('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), It(l));
        var f = e.getDimensionInfo(u);
        return f || ({}.NODE_ENV !== "production" && (l = Ae("Can not find dimension info via: " + u + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal condition:", s, `.
`)), It(l)), {
          dimIdx: f.index
        };
      },
      getValue: function(s) {
        return e.retrieveValueFromItem(t, s.dimIdx);
      }
    }), n = [], i = 0, o = e.count(); i < o; i++)
      t = e.getRawDataItem(i), a.evaluate() && n.push(t);
    return {
      data: n
    };
  }
}, rg = "";
({}).NODE_ENV !== "production" && (rg = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
var XZ = {
  type: "echarts:sort",
  transform: function(r) {
    var e = r.upstream, t = r.config, a = "", n = Pt(t);
    n.length || ({}.NODE_ENV !== "production" && (a = "Empty `config` in sort transform."), It(a));
    var i = [];
    C(n, function(f) {
      var h = f.dimension, v = f.order, c = f.parser, p = f.incomparable;
      if (h == null && ({}.NODE_ENV !== "production" && (a = 'Sort transform config must has "dimension" specified.' + rg), It(a)), v !== "asc" && v !== "desc" && ({}.NODE_ENV !== "production" && (a = 'Sort transform config must has "order" specified.' + rg), It(a)), p && p !== "min" && p !== "max") {
        var d = "";
        ({}).NODE_ENV !== "production" && (d = 'incomparable must be "min" or "max" rather than "' + p + '".'), It(d);
      }
      if (v !== "asc" && v !== "desc") {
        var g = "";
        ({}).NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + v + '".'), It(g);
      }
      var y = e.getDimensionInfo(h);
      y || ({}.NODE_ENV !== "production" && (a = Ae("Can not find dimension info via: " + h + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal config:", f, `.
`)), It(a));
      var m = c ? nC(c) : null;
      c && !m && ({}.NODE_ENV !== "production" && (a = Ae("Invalid parser name " + c + `.
`, "Illegal config:", f, `.
`)), It(a)), i.push({
        dimIdx: y.index,
        parser: m,
        comparator: new oC(v, p)
      });
    });
    var o = e.sourceFormat;
    o !== xe && o !== vr && ({}.NODE_ENV !== "production" && (a = 'sourceFormat "' + o + '" is not supported yet'), It(a));
    for (var s = [], l = 0, u = e.count(); l < u; l++)
      s.push(e.getRawDataItem(l));
    return s.sort(function(f, h) {
      for (var v = 0; v < i.length; v++) {
        var c = i[v], p = e.retrieveValueFromItem(f, c.dimIdx), d = e.retrieveValueFromItem(h, c.dimIdx);
        c.parser && (p = c.parser(p), d = c.parser(d));
        var g = c.comparator.evaluate(p, d);
        if (g !== 0)
          return g;
      }
      return 0;
    }), {
      data: s
    };
  }
};
function qZ(r) {
  r.registerTransform(ZZ), r.registerTransform(XZ);
}
var KZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "dataset", t;
    }
    return e.prototype.init = function(t, a, n) {
      r.prototype.init.call(this, t, a, n), this._sourceManager = new fC(this), f_(this);
    }, e.prototype.mergeOption = function(t, a) {
      r.prototype.mergeOption.call(this, t, a), f_(this);
    }, e.prototype.optionUpdated = function() {
      this._sourceManager.dirty();
    }, e.prototype.getSourceManager = function() {
      return this._sourceManager;
    }, e.type = "dataset", e.defaultOption = {
      seriesLayoutBy: Wr
    }, e;
  }(St)
), jZ = (
  /** @class */
  function(r) {
    N(e, r);
    function e() {
      var t = r !== null && r.apply(this, arguments) || this;
      return t.type = "dataset", t;
    }
    return e.type = "dataset", e;
  }($t)
);
function QZ(r) {
  r.registerComponentModel(KZ), r.registerComponentView(jZ);
}
var Rr = Xr.CMD;
function to(r, e) {
  return Math.abs(r - e) < 1e-5;
}
function ag(r) {
  var e = r.data, t = r.len(), a = [], n, i = 0, o = 0, s = 0, l = 0;
  function u(L, E) {
    n && n.length > 2 && a.push(n), n = [L, E];
  }
  function f(L, E, P, R) {
    to(L, P) && to(E, R) || n.push(L, E, P, R, P, R);
  }
  function h(L, E, P, R, k, O) {
    var B = Math.abs(E - L), F = Math.tan(B / 4) * 4 / 3, W = E < L ? -1 : 1, Z = Math.cos(L), J = Math.sin(L), et = Math.cos(E), yt = Math.sin(E), At = Z * k + P, dt = J * O + R, at = et * k + P, mt = yt * O + R, vt = k * F * W, X = O * F * W;
    n.push(At - vt * J, dt + X * Z, at + vt * yt, mt - X * et, at, mt);
  }
  for (var v, c, p, d, g = 0; g < t; ) {
    var y = e[g++], m = g === 1;
    switch (m && (i = e[g], o = e[g + 1], s = i, l = o, (y === Rr.L || y === Rr.C || y === Rr.Q) && (n = [s, l])), y) {
      case Rr.M:
        i = s = e[g++], o = l = e[g++], u(s, l);
        break;
      case Rr.L:
        v = e[g++], c = e[g++], f(i, o, v, c), i = v, o = c;
        break;
      case Rr.C:
        n.push(e[g++], e[g++], e[g++], e[g++], i = e[g++], o = e[g++]);
        break;
      case Rr.Q:
        v = e[g++], c = e[g++], p = e[g++], d = e[g++], n.push(i + 2 / 3 * (v - i), o + 2 / 3 * (c - o), p + 2 / 3 * (v - p), d + 2 / 3 * (c - d), p, d), i = p, o = d;
        break;
      case Rr.A:
        var _ = e[g++], S = e[g++], w = e[g++], x = e[g++], b = e[g++], T = e[g++] + b;
        g += 1;
        var D = !e[g++];
        v = Math.cos(b) * w + _, c = Math.sin(b) * x + S, m ? (s = v, l = c, u(s, l)) : f(i, o, v, c), i = Math.cos(T) * w + _, o = Math.sin(T) * x + S;
        for (var A = (D ? -1 : 1) * Math.PI / 2, M = b; D ? M > T : M < T; M += A) {
          var I = D ? Math.max(M + A, T) : Math.min(M + A, T);
          h(M, I, _, S, w, x);
        }
        break;
      case Rr.R:
        s = i = e[g++], l = o = e[g++], v = s + e[g++], c = l + e[g++], u(v, l), f(v, l, v, c), f(v, c, s, c), f(s, c, s, l), f(s, l, v, l);
        break;
      case Rr.Z:
        n && f(i, o, s, l), i = s, o = l;
        break;
    }
  }
  return n && n.length > 2 && a.push(n), a;
}
function ng(r, e, t, a, n, i, o, s, l, u) {
  if (to(r, t) && to(e, a) && to(n, o) && to(i, s)) {
    l.push(o, s);
    return;
  }
  var f = 2 / u, h = f * f, v = o - r, c = s - e, p = Math.sqrt(v * v + c * c);
  v /= p, c /= p;
  var d = t - r, g = a - e, y = n - o, m = i - s, _ = d * d + g * g, S = y * y + m * m;
  if (_ < h && S < h) {
    l.push(o, s);
    return;
  }
  var w = v * d + c * g, x = -v * y - c * m, b = _ - w * w, T = S - x * x;
  if (b < h && w >= 0 && T < h && x >= 0) {
    l.push(o, s);
    return;
  }
  var D = [], A = [];
  Ka(r, t, n, o, 0.5, D), Ka(e, a, i, s, 0.5, A), ng(D[0], A[0], D[1], A[1], D[2], A[2], D[3], A[3], l, u), ng(D[4], A[4], D[5], A[5], D[6], A[6], D[7], A[7], l, u);
}
function JZ(r, e) {
  var t = ag(r), a = [];
  e = e || 1;
  for (var n = 0; n < t.length; n++) {
    var i = t[n], o = [], s = i[0], l = i[1];
    o.push(s, l);
    for (var u = 2; u < i.length; ) {
      var f = i[u++], h = i[u++], v = i[u++], c = i[u++], p = i[u++], d = i[u++];
      ng(s, l, f, h, v, c, p, d, o, e), s = p, l = d;
    }
    a.push(o);
  }
  return a;
}
function LL(r, e, t) {
  var a = r[e], n = r[1 - e], i = Math.abs(a / n), o = Math.ceil(Math.sqrt(i * t)), s = Math.floor(t / o);
  s === 0 && (s = 1, o = t);
  for (var l = [], u = 0; u < o; u++)
    l.push(s);
  var f = o * s, h = t - f;
  if (h > 0)
    for (var u = 0; u < h; u++)
      l[u % o] += 1;
  return l;
}
function hb(r, e, t) {
  for (var a = r.r0, n = r.r, i = r.startAngle, o = r.endAngle, s = Math.abs(o - i), l = s * n, u = n - a, f = l > Math.abs(u), h = LL([l, u], f ? 0 : 1, e), v = (f ? s : u) / h.length, c = 0; c < h.length; c++)
    for (var p = (f ? u : s) / h[c], d = 0; d < h[c]; d++) {
      var g = {};
      f ? (g.startAngle = i + v * c, g.endAngle = i + v * (c + 1), g.r0 = a + p * d, g.r = a + p * (d + 1)) : (g.startAngle = i + p * d, g.endAngle = i + p * (d + 1), g.r0 = a + v * c, g.r = a + v * (c + 1)), g.clockwise = r.clockwise, g.cx = r.cx, g.cy = r.cy, t.push(g);
    }
}
function tX(r, e, t) {
  for (var a = r.width, n = r.height, i = a > n, o = LL([a, n], i ? 0 : 1, e), s = i ? "width" : "height", l = i ? "height" : "width", u = i ? "x" : "y", f = i ? "y" : "x", h = r[s] / o.length, v = 0; v < o.length; v++)
    for (var c = r[l] / o[v], p = 0; p < o[v]; p++) {
      var d = {};
      d[u] = v * h, d[f] = p * c, d[s] = h, d[l] = c, d.x += r.x, d.y += r.y, t.push(d);
    }
}
function vb(r, e, t, a) {
  return r * a - t * e;
}
function eX(r, e, t, a, n, i, o, s) {
  var l = t - r, u = a - e, f = o - n, h = s - i, v = vb(f, h, l, u);
  if (Math.abs(v) < 1e-6)
    return null;
  var c = r - n, p = e - i, d = vb(c, p, f, h) / v;
  return d < 0 || d > 1 ? null : new lt(d * l + r, d * u + e);
}
function rX(r, e, t) {
  var a = new lt();
  lt.sub(a, t, e), a.normalize();
  var n = new lt();
  lt.sub(n, r, e);
  var i = n.dot(a);
  return i;
}
function $i(r, e) {
  var t = r[r.length - 1];
  t && t[0] === e[0] && t[1] === e[1] || r.push(e);
}
function aX(r, e, t) {
  for (var a = r.length, n = [], i = 0; i < a; i++) {
    var o = r[i], s = r[(i + 1) % a], l = eX(o[0], o[1], s[0], s[1], e.x, e.y, t.x, t.y);
    l && n.push({
      projPt: rX(l, e, t),
      pt: l,
      idx: i
    });
  }
  if (n.length < 2)
    return [{ points: r }, { points: r }];
  n.sort(function(g, y) {
    return g.projPt - y.projPt;
  });
  var u = n[0], f = n[n.length - 1];
  if (f.idx < u.idx) {
    var h = u;
    u = f, f = h;
  }
  for (var v = [u.pt.x, u.pt.y], c = [f.pt.x, f.pt.y], p = [v], d = [c], i = u.idx + 1; i <= f.idx; i++)
    $i(p, r[i].slice());
  $i(p, c), $i(p, v);
  for (var i = f.idx + 1; i <= u.idx + a; i++)
    $i(d, r[i % a].slice());
  return $i(d, v), $i(d, c), [{
    points: p
  }, {
    points: d
  }];
}
function cb(r) {
  var e = r.points, t = [], a = [];
  dh(e, t, a);
  var n = new ht(t[0], t[1], a[0] - t[0], a[1] - t[1]), i = n.width, o = n.height, s = n.x, l = n.y, u = new lt(), f = new lt();
  return i > o ? (u.x = f.x = s + i / 2, u.y = l, f.y = l + o) : (u.y = f.y = l + o / 2, u.x = s, f.x = s + i), aX(e, u, f);
}
function th(r, e, t, a) {
  if (t === 1)
    a.push(e);
  else {
    var n = Math.floor(t / 2), i = r(e);
    th(r, i[0], n, a), th(r, i[1], t - n, a);
  }
  return a;
}
function nX(r, e) {
  for (var t = [], a = 0; a < e; a++)
    t.push(Lg(r));
  return t;
}
function iX(r, e) {
  e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel;
}
function oX(r) {
  for (var e = [], t = 0; t < r.length; )
    e.push([r[t++], r[t++]]);
  return e;
}
function sX(r, e) {
  var t = [], a = r.shape, n;
  switch (r.type) {
    case "rect":
      tX(a, e, t), n = bt;
      break;
    case "sector":
      hb(a, e, t), n = Ve;
      break;
    case "circle":
      hb({
        r0: 0,
        r: a.r,
        startAngle: 0,
        endAngle: Math.PI * 2,
        cx: a.cx,
        cy: a.cy
      }, e, t), n = Ve;
      break;
    default:
      var i = r.getComputedTransform(), o = i ? Math.sqrt(Math.max(i[0] * i[0] + i[1] * i[1], i[2] * i[2] + i[3] * i[3])) : 1, s = G(JZ(r.getUpdatedPathProxy(), o), function(y) {
        return oX(y);
      }), l = s.length;
      if (l === 0)
        th(cb, {
          points: s[0]
        }, e, t);
      else if (l === e)
        for (var u = 0; u < l; u++)
          t.push({
            points: s[u]
          });
      else {
        var f = 0, h = G(s, function(y) {
          var m = [], _ = [];
          dh(y, m, _);
          var S = (_[1] - m[1]) * (_[0] - m[0]);
          return f += S, { poly: y, area: S };
        });
        h.sort(function(y, m) {
          return m.area - y.area;
        });
        for (var v = e, u = 0; u < l; u++) {
          var c = h[u];
          if (v <= 0)
            break;
          var p = u === l - 1 ? v : Math.ceil(c.area / f * e);
          p < 0 || (th(cb, {
            points: c.poly
          }, p, t), v -= p);
        }
      }
      n = Be;
      break;
  }
  if (!n)
    return nX(r, e);
  for (var d = [], u = 0; u < t.length; u++) {
    var g = new n();
    g.setShape(t[u]), iX(r, g), d.push(g);
  }
  return d;
}
function lX(r, e) {
  var t = r.length, a = e.length;
  if (t === a)
    return [r, e];
  for (var n = [], i = [], o = t < a ? r : e, s = Math.min(t, a), l = Math.abs(a - t) / 6, u = (s - 2) / 6, f = Math.ceil(l / u) + 1, h = [o[0], o[1]], v = l, c = 2; c < s; ) {
    var p = o[c - 2], d = o[c - 1], g = o[c++], y = o[c++], m = o[c++], _ = o[c++], S = o[c++], w = o[c++];
    if (v <= 0) {
      h.push(g, y, m, _, S, w);
      continue;
    }
    for (var x = Math.min(v, f - 1) + 1, b = 1; b <= x; b++) {
      var T = b / x;
      Ka(p, g, m, S, T, n), Ka(d, y, _, w, T, i), p = n[3], d = i[3], h.push(n[1], i[1], n[2], i[2], p, d), g = n[5], y = i[5], m = n[6], _ = i[6];
    }
    v -= x - 1;
  }
  return o === r ? [h, e] : [r, h];
}
function pb(r, e) {
  for (var t = r.length, a = r[t - 2], n = r[t - 1], i = [], o = 0; o < e.length; )
    i[o++] = a, i[o++] = n;
  return i;
}
function uX(r, e) {
  for (var t, a, n, i = [], o = [], s = 0; s < Math.max(r.length, e.length); s++) {
    var l = r[s], u = e[s], f = void 0, h = void 0;
    l ? u ? (t = lX(l, u), f = t[0], h = t[1], a = f, n = h) : (h = pb(n || l, l), f = l) : (f = pb(a || u, u), h = u), i.push(f), o.push(h);
  }
  return [i, o];
}
function db(r) {
  for (var e = 0, t = 0, a = 0, n = r.length, i = 0, o = n - 2; i < n; o = i, i += 2) {
    var s = r[o], l = r[o + 1], u = r[i], f = r[i + 1], h = s * f - u * l;
    e += h, t += (s + u) * h, a += (l + f) * h;
  }
  return e === 0 ? [r[0] || 0, r[1] || 0] : [t / e / 3, a / e / 3, e];
}
function fX(r, e, t, a) {
  for (var n = (r.length - 2) / 6, i = 1 / 0, o = 0, s = r.length, l = s - 2, u = 0; u < n; u++) {
    for (var f = u * 6, h = 0, v = 0; v < s; v += 2) {
      var c = v === 0 ? f : (f + v - 2) % l + 2, p = r[c] - t[0], d = r[c + 1] - t[1], g = e[v] - a[0], y = e[v + 1] - a[1], m = g - p, _ = y - d;
      h += m * m + _ * _;
    }
    h < i && (i = h, o = u);
  }
  return o;
}
function hX(r) {
  for (var e = [], t = r.length, a = 0; a < t; a += 2)
    e[a] = r[t - a - 2], e[a + 1] = r[t - a - 1];
  return e;
}
function vX(r, e, t, a) {
  for (var n = [], i, o = 0; o < r.length; o++) {
    var s = r[o], l = e[o], u = db(s), f = db(l);
    i == null && (i = u[2] < 0 != f[2] < 0);
    var h = [], v = [], c = 0, p = 1 / 0, d = [], g = s.length;
    i && (s = hX(s));
    for (var y = fX(s, l, u, f) * 6, m = g - 2, _ = 0; _ < m; _ += 2) {
      var S = (y + _) % m + 2;
      h[_ + 2] = s[S] - u[0], h[_ + 3] = s[S + 1] - u[1];
    }
    if (h[0] = s[y] - u[0], h[1] = s[y + 1] - u[1], t > 0)
      for (var w = a / t, x = -a / 2; x <= a / 2; x += w) {
        for (var b = Math.sin(x), T = Math.cos(x), D = 0, _ = 0; _ < s.length; _ += 2) {
          var A = h[_], M = h[_ + 1], I = l[_] - f[0], L = l[_ + 1] - f[1], E = I * T - L * b, P = I * b + L * T;
          d[_] = E, d[_ + 1] = P;
          var R = E - A, k = P - M;
          D += R * R + k * k;
        }
        if (D < p) {
          p = D, c = x;
          for (var O = 0; O < d.length; O++)
            v[O] = d[O];
        }
      }
    else
      for (var B = 0; B < g; B += 2)
        v[B] = l[B] - f[0], v[B + 1] = l[B + 1] - f[1];
    n.push({
      from: h,
      to: v,
      fromCp: u,
      toCp: f,
      rotation: -c
    });
  }
  return n;
}
function eh(r) {
  return r.__isCombineMorphing;
}
var EL = "__mOriginal_";
function rh(r, e, t) {
  var a = EL + e, n = r[a] || r[e];
  r[a] || (r[a] = r[e]);
  var i = t.replace, o = t.after, s = t.before;
  r[e] = function() {
    var l = arguments, u;
    return s && s.apply(this, l), i ? u = i.apply(this, l) : u = n.apply(this, l), o && o.apply(this, l), u;
  };
}
function zs(r, e) {
  var t = EL + e;
  r[t] && (r[e] = r[t], r[t] = null);
}
function gb(r, e) {
  for (var t = 0; t < r.length; t++)
    for (var a = r[t], n = 0; n < a.length; ) {
      var i = a[n], o = a[n + 1];
      a[n++] = e[0] * i + e[2] * o + e[4], a[n++] = e[1] * i + e[3] * o + e[5];
    }
}
function PL(r, e) {
  var t = r.getUpdatedPathProxy(), a = e.getUpdatedPathProxy(), n = uX(ag(t), ag(a)), i = n[0], o = n[1], s = r.getComputedTransform(), l = e.getComputedTransform();
  function u() {
    this.transform = null;
  }
  s && gb(i, s), l && gb(o, l), rh(e, "updateTransform", { replace: u }), e.transform = null;
  var f = vX(i, o, 10, Math.PI), h = [];
  rh(e, "buildPath", { replace: function(v) {
    for (var c = e.__morphT, p = 1 - c, d = [], g = 0; g < f.length; g++) {
      var y = f[g], m = y.from, _ = y.to, S = y.rotation * c, w = y.fromCp, x = y.toCp, b = Math.sin(S), T = Math.cos(S);
      Vu(d, w, x, c);
      for (var D = 0; D < m.length; D += 2) {
        var A = m[D], M = m[D + 1], I = _[D], L = _[D + 1], E = A * p + I * c, P = M * p + L * c;
        h[D] = E * T - P * b + d[0], h[D + 1] = E * b + P * T + d[1];
      }
      var R = h[0], k = h[1];
      v.moveTo(R, k);
      for (var D = 2; D < m.length; ) {
        var I = h[D++], L = h[D++], O = h[D++], B = h[D++], F = h[D++], W = h[D++];
        R === I && k === L && O === F && B === W ? v.lineTo(F, W) : v.bezierCurveTo(I, L, O, B, F, W), R = F, k = W;
      }
    }
  } });
}
function pm(r, e, t) {
  if (!r || !e)
    return e;
  var a = t.done, n = t.during;
  PL(r, e), e.__morphT = 0;
  function i() {
    zs(e, "buildPath"), zs(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  }
  return e.animateTo({
    __morphT: 1
  }, tt({
    during: function(o) {
      e.dirtyShape(), n && n(o);
    },
    done: function() {
      i(), a && a();
    }
  }, t)), e;
}
function cX(r, e, t, a, n, i) {
  var o = 16;
  r = n === t ? 0 : Math.round(32767 * (r - t) / (n - t)), e = i === a ? 0 : Math.round(32767 * (e - a) / (i - a));
  for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
    var f = 0, h = 0;
    (r & u) > 0 && (f = 1), (e & u) > 0 && (h = 1), s += u * u * (3 * f ^ h), h === 0 && (f === 1 && (r = u - 1 - r, e = u - 1 - e), l = r, r = e, e = l);
  }
  return s;
}
function ah(r) {
  var e = 1 / 0, t = 1 / 0, a = -1 / 0, n = -1 / 0, i = G(r, function(s) {
    var l = s.getBoundingRect(), u = s.getComputedTransform(), f = l.x + l.width / 2 + (u ? u[4] : 0), h = l.y + l.height / 2 + (u ? u[5] : 0);
    return e = Math.min(f, e), t = Math.min(h, t), a = Math.max(f, a), n = Math.max(h, n), [f, h];
  }), o = G(i, function(s, l) {
    return {
      cp: s,
      z: cX(s[0], s[1], e, t, a, n),
      path: r[l]
    };
  });
  return o.sort(function(s, l) {
    return s.z - l.z;
  }).map(function(s) {
    return s.path;
  });
}
function RL(r) {
  return sX(r.path, r.count);
}
function ig() {
  return {
    fromIndividuals: [],
    toIndividuals: [],
    count: 0
  };
}
function pX(r, e, t) {
  var a = [];
  function n(w) {
    for (var x = 0; x < w.length; x++) {
      var b = w[x];
      eh(b) ? n(b.childrenRef()) : b instanceof gt && a.push(b);
    }
  }
  n(r);
  var i = a.length;
  if (!i)
    return ig();
  var o = t.dividePath || RL, s = o({
    path: e,
    count: i
  });
  if (s.length !== i)
    return console.error("Invalid morphing: unmatched splitted path"), ig();
  a = ah(a), s = ah(s);
  for (var l = t.done, u = t.during, f = t.individualDelay, h = new na(), v = 0; v < i; v++) {
    var c = a[v], p = s[v];
    p.parent = e, p.copyTransform(h), f || PL(c, p);
  }
  e.__isCombineMorphing = !0, e.childrenRef = function() {
    return s;
  };
  function d(w) {
    for (var x = 0; x < s.length; x++)
      s[x].addSelfToZr(w);
  }
  rh(e, "addSelfToZr", {
    after: function(w) {
      d(w);
    }
  }), rh(e, "removeSelfFromZr", {
    after: function(w) {
      for (var x = 0; x < s.length; x++)
        s[x].removeSelfFromZr(w);
    }
  });
  function g() {
    e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, zs(e, "addSelfToZr"), zs(e, "removeSelfFromZr");
  }
  var y = s.length;
  if (f)
    for (var m = y, _ = function() {
      m--, m === 0 && (g(), l && l());
    }, v = 0; v < y; v++) {
      var S = f ? tt({
        delay: (t.delay || 0) + f(v, y, a[v], s[v]),
        done: _
      }, t) : t;
      pm(a[v], s[v], S);
    }
  else
    e.__morphT = 0, e.animateTo({
      __morphT: 1
    }, tt({
      during: function(w) {
        for (var x = 0; x < y; x++) {
          var b = s[x];
          b.__morphT = e.__morphT, b.dirtyShape();
        }
        u && u(w);
      },
      done: function() {
        g();
        for (var w = 0; w < r.length; w++)
          zs(r[w], "updateTransform");
        l && l();
      }
    }, t));
  return e.__zr && d(e.__zr), {
    fromIndividuals: a,
    toIndividuals: s,
    count: y
  };
}
function dX(r, e, t) {
  var a = e.length, n = [], i = t.dividePath || RL;
  function o(c) {
    for (var p = 0; p < c.length; p++) {
      var d = c[p];
      eh(d) ? o(d.childrenRef()) : d instanceof gt && n.push(d);
    }
  }
  if (eh(r)) {
    o(r.childrenRef());
    var s = n.length;
    if (s < a)
      for (var l = 0, u = s; u < a; u++)
        n.push(Lg(n[l++ % s]));
    n.length = a;
  } else {
    n = i({ path: r, count: a });
    for (var f = r.getComputedTransform(), u = 0; u < n.length; u++)
      n[u].setLocalTransform(f);
    if (n.length !== a)
      return console.error("Invalid morphing: unmatched splitted path"), ig();
  }
  n = ah(n), e = ah(e);
  for (var h = t.individualDelay, u = 0; u < a; u++) {
    var v = h ? tt({
      delay: (t.delay || 0) + h(u, a, n[u], e[u])
    }, t) : t;
    pm(n[u], e[u], v);
  }
  return {
    fromIndividuals: n,
    toIndividuals: e,
    count: e.length
  };
}
function yb(r) {
  return z(r[0]);
}
function mb(r, e) {
  for (var t = [], a = r.length, n = 0; n < a; n++)
    t.push({
      one: r[n],
      many: []
    });
  for (var n = 0; n < e.length; n++) {
    var i = e[n].length, o = void 0;
    for (o = 0; o < i; o++)
      t[o % a].many.push(e[n][o]);
  }
  for (var s = 0, n = a - 1; n >= 0; n--)
    if (!t[n].many.length) {
      var l = t[s].many;
      if (l.length <= 1)
        if (s)
          s = 0;
        else
          return t;
      var i = l.length, u = Math.ceil(i / 2);
      t[n].many = l.slice(u, i), t[s].many = l.slice(0, u), s++;
    }
  return t;
}
var gX = {
  clone: function(r) {
    for (var e = [], t = 1 - Math.pow(1 - r.path.style.opacity, 1 / r.count), a = 0; a < r.count; a++) {
      var n = Lg(r.path);
      n.setStyle("opacity", t), e.push(n);
    }
    return e;
  },
  // Use the default divider
  split: null
};
function dp(r, e, t, a, n, i) {
  if (!r.length || !e.length)
    return;
  var o = To("update", a, n);
  if (!(o && o.duration > 0))
    return;
  var s = a.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, f;
  yb(r) && (u = r, f = e), yb(e) && (u = e, f = r);
  function h(y, m, _, S, w) {
    var x = y.many, b = y.one;
    if (x.length === 1 && !w) {
      var T = m ? x[0] : b, D = m ? b : x[0];
      if (eh(T))
        h({
          many: [T],
          one: D
        }, !0, _, S, !0);
      else {
        var A = s ? tt({
          delay: s(_, S)
        }, l) : l;
        pm(T, D, A), i(T, D, T, D, A);
      }
    } else
      for (var M = tt({
        dividePath: gX[t],
        individualDelay: s && function(k, O, B, F) {
          return s(k + _, S);
        }
      }, l), I = m ? pX(x, b, M) : dX(b, x, M), L = I.fromIndividuals, E = I.toIndividuals, P = L.length, R = 0; R < P; R++) {
        var A = s ? tt({
          delay: s(R, P)
        }, l) : l;
        i(L[R], E[R], m ? x[R] : y.one, m ? y.one : x[R], A);
      }
  }
  for (var v = u ? u === r : r.length > e.length, c = u ? mb(f, u) : mb(v ? e : r, [v ? r : e]), p = 0, d = 0; d < c.length; d++)
    p += c[d].many.length;
  for (var g = 0, d = 0; d < c.length; d++)
    h(c[d], v, g, p), g += c[d].many.length;
}
function zn(r) {
  if (!r)
    return [];
  if (z(r)) {
    for (var e = [], t = 0; t < r.length; t++)
      e.push(zn(r[t]));
    return e;
  }
  var a = [];
  return r.traverse(function(n) {
    n instanceof gt && !n.disableMorphing && !n.invisible && !n.ignore && a.push(n);
  }), a;
}
var NL = 1e4, yX = Tt();
function mX(r) {
  for (var e = r.dimensions, t = 0; t < e.length; t++) {
    var a = r.getDimensionInfo(e[t]);
    if (a && a.otherDims.itemGroupId === 0)
      return e[t];
  }
}
function _b(r) {
  var e = [];
  return C(r, function(t) {
    var a = t.data;
    if (a.count() > NL) {
      ({}).NODE_ENV !== "production" && Ft("Universal transition is disabled on large data > 10k.");
      return;
    }
    for (var n = a.getIndices(), i = mX(a), o = 0; o < n.length; o++)
      e.push({
        dataGroupId: t.dataGroupId,
        data: a,
        dim: t.dim || i,
        divide: t.divide,
        dataIndex: o
      });
  }), e;
}
function gp(r, e, t) {
  r.traverse(function(a) {
    a instanceof gt && Bt(a, {
      style: {
        opacity: 0
      }
    }, e, {
      dataIndex: t,
      isFrom: !0
    });
  });
}
function yp(r) {
  if (r.parent) {
    var e = r.getComputedTransform();
    r.setLocalTransform(e), r.parent.remove(r);
  }
}
function Ui(r) {
  r.stopAnimation(), r.isGroup && r.traverse(function(e) {
    e.stopAnimation();
  });
}
function _X(r, e, t) {
  var a = To("update", t, e);
  a && r.traverse(function(n) {
    if (n instanceof ur) {
      var i = eN(n);
      i && n.animateFrom({
        style: i
      }, a);
    }
  });
}
function SX(r, e) {
  var t = r.length;
  if (t !== e.length)
    return !1;
  for (var a = 0; a < t; a++) {
    var n = r[a], i = e[a];
    if (n.data.getId(n.dataIndex) !== i.data.getId(i.dataIndex))
      return !1;
  }
  return !0;
}
function OL(r, e, t) {
  var a = _b(r), n = _b(e);
  function i(y, m, _, S, w) {
    (_ || y) && m.animateFrom({
      style: _ && _ !== y ? (
        // dividingMethod like clone may override the style(opacity)
        // So extend it to raw style.
        V(V({}, _.style), y.style)
      ) : y.style
    }, w);
  }
  function o(y) {
    for (var m = 0; m < y.length; m++)
      if (y[m].dim)
        return y[m].dim;
  }
  var s = o(a), l = o(n), u = !1;
  function f(y, m) {
    return function(_) {
      var S = _.data, w = _.dataIndex;
      if (m)
        return S.getId(w);
      var x = _.dataGroupId, b = y ? s || l : l || s, T = b && S.getDimensionInfo(b), D = T && T.ordinalMeta;
      if (T) {
        var A = S.get(T.name, w);
        return D && D.categories[A] || A + "";
      }
      var M = S.getRawDataItem(w);
      return M && M.groupId ? M.groupId + "" : x || S.getId(w);
    };
  }
  var h = SX(a, n), v = {};
  if (!h)
    for (var c = 0; c < n.length; c++) {
      var p = n[c], d = p.data.getItemGraphicEl(p.dataIndex);
      d && (v[d.id] = !0);
    }
  function g(y, m) {
    var _ = a[m], S = n[y], w = S.data.hostModel, x = _.data.getItemGraphicEl(_.dataIndex), b = S.data.getItemGraphicEl(S.dataIndex);
    if (x === b) {
      b && _X(b, S.dataIndex, w);
      return;
    }
    // We can't use the elements that already being morphed
    x && v[x.id] || b && (Ui(b), x ? (Ui(x), yp(x), u = !0, dp(zn(x), zn(b), S.divide, w, y, i)) : gp(b, w, y));
  }
  new ya(a, n, f(!0, h), f(!1, h), null, "multiple").update(g).updateManyToOne(function(y, m) {
    var _ = n[y], S = _.data, w = S.hostModel, x = S.getItemGraphicEl(_.dataIndex), b = Et(G(m, function(T) {
      return a[T].data.getItemGraphicEl(a[T].dataIndex);
    }), function(T) {
      return T && T !== x && !v[T.id];
    });
    x && (Ui(x), b.length ? (C(b, function(T) {
      Ui(T), yp(T);
    }), u = !0, dp(zn(b), zn(x), _.divide, w, y, i)) : gp(x, w, _.dataIndex));
  }).updateOneToMany(function(y, m) {
    var _ = a[m], S = _.data.getItemGraphicEl(_.dataIndex);
    if (!(S && v[S.id])) {
      var w = Et(G(y, function(b) {
        return n[b].data.getItemGraphicEl(n[b].dataIndex);
      }), function(b) {
        return b && b !== S;
      }), x = n[y[0]].data.hostModel;
      w.length && (C(w, function(b) {
        return Ui(b);
      }), S ? (Ui(S), yp(S), u = !0, dp(
        zn(S),
        zn(w),
        _.divide,
        // Use divide on old.
        x,
        y[0],
        i
      )) : C(w, function(b) {
        return gp(b, x, y[0]);
      }));
    }
  }).updateManyToMany(function(y, m) {
    new ya(m, y, function(_) {
      return a[_].data.getId(a[_].dataIndex);
    }, function(_) {
      return n[_].data.getId(n[_].dataIndex);
    }).update(function(_, S) {
      g(y[_], m[S]);
    }).execute();
  }).execute(), u && C(e, function(y) {
    var m = y.data, _ = m.hostModel, S = _ && t.getViewOfSeriesModel(_), w = To("update", _, 0);
    S && _.isAnimationEnabled() && w && w.duration > 0 && S.group.traverse(function(x) {
      x instanceof gt && !x.animators.length && x.animateFrom({
        style: {
          opacity: 0
        }
      }, w);
    });
  });
}
function Sb(r) {
  var e = r.getModel("universalTransition").get("seriesKey");
  return e || r.id;
}
function xb(r) {
  return z(r) ? r.sort().join(",") : r;
}
function Oa(r) {
  if (r.hostModel)
    return r.hostModel.getModel("universalTransition").get("divideShape");
}
function xX(r, e) {
  var t = K(), a = K(), n = K();
  C(r.oldSeries, function(o, s) {
    var l = r.oldDataGroupIds[s], u = r.oldData[s], f = Sb(o), h = xb(f);
    a.set(h, {
      dataGroupId: l,
      data: u
    }), z(f) && C(f, function(v) {
      n.set(v, {
        key: h,
        dataGroupId: l,
        data: u
      });
    });
  });
  function i(o) {
    t.get(o) && Ft("Duplicated seriesKey in universalTransition " + o);
  }
  return C(e.updatedSeries, function(o) {
    if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
      var s = o.get("dataGroupId"), l = o.getData(), u = Sb(o), f = xb(u), h = a.get(f);
      if (h)
        ({}).NODE_ENV !== "production" && i(f), t.set(f, {
          oldSeries: [{
            dataGroupId: h.dataGroupId,
            divide: Oa(h.data),
            data: h.data
          }],
          newSeries: [{
            dataGroupId: s,
            divide: Oa(l),
            data: l
          }]
        });
      else if (z(u)) {
        ({}).NODE_ENV !== "production" && i(f);
        var v = [];
        C(u, function(d) {
          var g = a.get(d);
          g.data && v.push({
            dataGroupId: g.dataGroupId,
            divide: Oa(g.data),
            data: g.data
          });
        }), v.length && t.set(f, {
          oldSeries: v,
          newSeries: [{
            dataGroupId: s,
            data: l,
            divide: Oa(l)
          }]
        });
      } else {
        var c = n.get(u);
        if (c) {
          var p = t.get(c.key);
          p || (p = {
            oldSeries: [{
              dataGroupId: c.dataGroupId,
              data: c.data,
              divide: Oa(c.data)
            }],
            newSeries: []
          }, t.set(c.key, p)), p.newSeries.push({
            dataGroupId: s,
            data: l,
            divide: Oa(l)
          });
        }
      }
    }
  }), t;
}
function wb(r, e) {
  for (var t = 0; t < r.length; t++) {
    var a = e.seriesIndex != null && e.seriesIndex === r[t].seriesIndex || e.seriesId != null && e.seriesId === r[t].id;
    if (a)
      return t;
  }
}
function wX(r, e, t, a) {
  var n = [], i = [];
  C(Pt(r.from), function(o) {
    var s = wb(e.oldSeries, o);
    s >= 0 && n.push({
      dataGroupId: e.oldDataGroupIds[s],
      data: e.oldData[s],
      // TODO can specify divideShape in transition.
      divide: Oa(e.oldData[s]),
      dim: o.dimension
    });
  }), C(Pt(r.to), function(o) {
    var s = wb(t.updatedSeries, o);
    if (s >= 0) {
      var l = t.updatedSeries[s].getData();
      i.push({
        dataGroupId: e.oldDataGroupIds[s],
        data: l,
        divide: Oa(l),
        dim: o.dimension
      });
    }
  }), n.length > 0 && i.length > 0 && OL(n, i, a);
}
function bX(r) {
  r.registerUpdateLifecycle("series:beforeupdate", function(e, t, a) {
    C(Pt(a.seriesTransition), function(n) {
      C(Pt(n.to), function(i) {
        for (var o = a.updatedSeries, s = 0; s < o.length; s++)
          (i.seriesIndex != null && i.seriesIndex === o[s].seriesIndex || i.seriesId != null && i.seriesId === o[s].id) && (o[s][Xu] = !0);
      });
    });
  }), r.registerUpdateLifecycle("series:transition", function(e, t, a) {
    var n = yX(t);
    if (n.oldSeries && a.updatedSeries && a.optionChanged) {
      var i = a.seriesTransition;
      if (i)
        C(Pt(i), function(c) {
          wX(c, n, a, t);
        });
      else {
        var o = xX(n, a);
        C(o.keys(), function(c) {
          var p = o.get(c);
          OL(p.oldSeries, p.newSeries, t);
        });
      }
      C(a.updatedSeries, function(c) {
        c[Xu] && (c[Xu] = !1);
      });
    }
    for (var s = e.getSeries(), l = n.oldSeries = [], u = n.oldDataGroupIds = [], f = n.oldData = [], h = 0; h < s.length; h++) {
      var v = s[h].getData();
      v.count() < NL && (l.push(s[h]), u.push(s[h].get("dataGroupId")), f.push(v));
    }
  });
}
pt([Fz]);
pt([Nz]);
pt([h5, I5, H5, IG, YG, GF, y3, aH, EH, GH, jH, eW, MW, FW, s$, p$, P$, H$, eU, uU, wU, o6]);
pt(I6);
pt(u8);
pt(IM);
pt(C8);
pt(dI);
pt(R8);
pt(H8);
pt(WY);
pt(v7);
pt(El);
pt(P7);
pt(O7);
pt(K7);
pt(o9);
pt(p9);
pt(w9);
pt(k9);
pt(nZ);
pt(xL);
pt(wL);
pt(EZ);
pt(AL);
pt(ML);
pt(kZ);
pt(qZ);
pt(QZ);
pt(bX);
pt(tz);
const TX = { class: "echart-container relative w-full h-full" }, CX = /* @__PURE__ */ GL({
  __name: "ECharts",
  props: {
    options: null,
    theme: null
  },
  emits: ["chartClick"],
  setup(r, { expose: e, emit: t }) {
    const a = r, n = Tb(null);
    FL(() => {
      gV(n.value);
    });
    let i = null;
    Db(() => {
      i = dV(n.value, a.theme), i.setOption(a.options), og(() => a.options, (s) => {
        i == null || i.setOption(s);
      }), i.on("click", "series", (s) => {
        t("chartClick", s);
      }), ZL("resize", () => {
        i == null || i.resize();
      }), JL(n, () => {
        i == null || i.resize();
      });
    });
    function o(s, l) {
      i == null || i.setOption(s, l);
    }
    return e({
      updateOptions: o
    }), (s, l) => (HL(), WL("div", TX, [
      $L("div", {
        class: "echart w-full h-full",
        style: { "min-height": "30vh", "min-width": "50rem" },
        ref_key: "chartDiv",
        ref: n
      }, null, 512)
    ]));
  }
});
export {
  CX as default
};