import { defineComponent as te, computed as L, openBlock as pe, createElementBlock as Qe, normalizeStyle as Sr, toDisplayString as Bi, Fragment as wt, isVNode as nu, Comment as QG, Text as TS, reactive as tn, getCurrentInstance as vn, onMounted as it, onUpdated as ep, onUnmounted as nl, watch as se, inject as Ge, provide as pt, ref as U, unref as B, shallowRef as ae, watchEffect as ht, onBeforeUnmount as yt, triggerRef as zle, createVNode as M, h as jg, Transition as co, withDirectives as bi, resolveDirective as Vle, cloneVNode as Ns, render as sf, nextTick as Tt, toRef as Nn, withModifiers as lf, vShow as Bs, onBeforeMount as HG, Teleport as PS, createTextVNode as Kt, isRef as tp, toRefs as $S, toRaw as qo, onBeforeUpdate as GG, TransitionGroup as JM, onActivated as Fle, getCurrentScope as jG, onScopeDispose as f0, createElementVNode as He, warn as Wle, mergeProps as _n, renderSlot as zn, useAttrs as Qle, useSlots as ZG, createCommentVNode as _t, normalizeClass as Ye, createBlock as je, withCtx as we, resolveDynamicComponent as Ec, readonly as Hle, onDeactivated as Gle, vModelRadio as UG, renderList as ag, withKeys as Y4, pushScopeId as AS, popScopeId as ES, resolveComponent as cl } from "vue";
var Ri = /* @__PURE__ */ ((t) => (t[t.STATIC = 0] = "STATIC", t[t.API = 1] = "API", t))(Ri || {});
const eI = {
  text: {
    type: String,
    required: !0
  },
  width: {
    type: Number
  },
  height: {
    type: Number
  },
  fontSize: {
    type: Number
  },
  fontWeight: {
    type: [Number, String]
  },
  color: {
    type: String
  },
  backgroundColor: {
    type: String
  },
  textAlign: {
    type: String
  },
  direction: {
    type: String
  }
}, jle = {
  container: {
    style: {
      background: {
        type: "none"
      }
    },
    props: {
      width: 300,
      height: 80
    }
  },
  props: {
    text: "标题内容",
    fontSize: 24,
    color: "#fff",
    fontWeight: "bold",
    textAlign: "left",
    direction: "horizontal"
  }
};
function Zle(t) {
  const e = {};
  for (const n in t)
    if (typeof t[n] == "object")
      switch (n) {
        case "background":
          t[n].type === "none" && (e[n] = "none"), t[n].type === "color" && (e[n] = t[n].color), t[n].type === "image" && (e[n + "-image"] = `url(${t[n].image}) no-repeat center center`, e[n + "-size"] = t[n].fillType);
          break;
        case "border":
          t[n].type === "none" ? e[n] = "none" : e[n] = `${t[n].width}px ${t[n].type} ${t[n].color}`;
          break;
        case "borderRadius":
          t[n].type === "all" ? e[n] = `${t[n].value}${t[n].unit}` : e[n] = `${t[n].topLeft}${t[n].unit} ${t[n].topRight}${t[n].unit} ${t[n].bottomLeft}${t[n].unit} ${t[n].bottomRight}${t[n].unit}`;
          break;
        case "boxShadow":
          t[n].enabled && (e[n] = `${t[n].offsetX}px ${t[n].offsetY}px ${t[n].blurRadius}px ${t[n].spreadRadius}px ${t[n].color} ${t[n].inset ? "inset" : ""}`);
          break;
        case "backdropFilter":
          t[n].enabled && (e[n] = `blur(${t[n].blur}px)`);
          break;
      }
    else typeof t[n] == "number" ? e[n] = t[n] + "px" : typeof t[n] == "string" && (e[n] = t[n]);
  return e;
}
const Zg = /* @__PURE__ */ te({
  __name: "index",
  props: eI,
  setup(t) {
    const e = t, n = L(() => {
      const r = Zle(e), i = {};
      return r.color.length > 9 && (i.backgroundImage = r.color, i.webkitBackgroundClip = "text", i.webkitTextFillColor = "transparent"), {
        ...i,
        ...r,
        width: "100%",
        height: "100%",
        lineHeight: e.height + "px"
      };
    });
    return (r, i) => (pe(), Qe("div", {
      class: "cus-title",
      style: Sr(n.value)
    }, Bi(r.text), 5));
  }
});
function Ug(t) {
  "@babel/helpers - typeof";
  return Ug = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
    return typeof e;
  } : function(e) {
    return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  }, Ug(t);
}
function Ule(t, e) {
  if (Ug(t) != "object" || !t) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (Ug(r) != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Xle(t) {
  var e = Ule(t, "string");
  return Ug(e) == "symbol" ? e : e + "";
}
function Yle(t, e, n) {
  return (e = Xle(e)) in t ? Object.defineProperty(t, e, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = n, t;
}
function q4(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e && (r = r.filter(function(i) {
      return Object.getOwnPropertyDescriptor(t, i).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function j(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2 ? q4(Object(n), !0).forEach(function(r) {
      Yle(t, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : q4(Object(n)).forEach(function(r) {
      Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return t;
}
function I() {
  return I = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n) ({}).hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }, I.apply(null, arguments);
}
const qle = (t) => typeof t == "function", Kle = Array.isArray, Jle = (t) => typeof t == "string", eue = (t) => t !== null && typeof t == "object", tue = /^on[^a-z]/, nue = (t) => tue.test(t), XG = (t) => {
  const e = /* @__PURE__ */ Object.create(null);
  return (n) => e[n] || (e[n] = t(n));
}, rue = /-(\w)/g, tI = XG((t) => t.replace(rue, (e, n) => n ? n.toUpperCase() : "")), iue = /\B([A-Z])/g, aue = XG((t) => t.replace(iue, "-$1").toLowerCase()), oue = Object.prototype.hasOwnProperty, K4 = (t, e) => oue.call(t, e);
function sue(t, e, n, r) {
  const i = t[n];
  if (i != null) {
    const a = K4(i, "default");
    if (a && r === void 0) {
      const o = i.default;
      r = i.type !== Function && qle(o) ? o() : o;
    }
    i.type === Boolean && (!K4(e, n) && !a ? r = !1 : r === "" && (r = !0));
  }
  return r;
}
function lue(t) {
  return Object.keys(t).reduce((e, n) => ((n.startsWith("data-") || n.startsWith("aria-")) && (e[n] = t[n]), e), {});
}
function Wp(t) {
  return typeof t == "number" ? `${t}px` : t;
}
function Ld(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
  return typeof t == "function" ? t(e) : t ?? n;
}
function uue(t) {
  let e;
  const n = new Promise((i) => {
    e = t(() => {
      i(!0);
    });
  }), r = () => {
    e == null || e();
  };
  return r.then = (i, a) => n.then(i, a), r.promise = n, r;
}
function ye() {
  const t = [];
  for (let e = 0; e < arguments.length; e++) {
    const n = e < 0 || arguments.length <= e ? void 0 : arguments[e];
    if (n) {
      if (Jle(n))
        t.push(n);
      else if (Kle(n))
        for (let r = 0; r < n.length; r++) {
          const i = ye(n[r]);
          i && t.push(i);
        }
      else if (eue(n))
        for (const r in n)
          n[r] && t.push(r);
    }
  }
  return t.join(" ");
}
var YG = function() {
  if (typeof Map < "u")
    return Map;
  function t(e, n) {
    var r = -1;
    return e.some(function(i, a) {
      return i[0] === n ? (r = a, !0) : !1;
    }), r;
  }
  return (
    /** @class */
    function() {
      function e() {
        this.__entries__ = [];
      }
      return Object.defineProperty(e.prototype, "size", {
        /**
         * @returns {boolean}
         */
        get: function() {
          return this.__entries__.length;
        },
        enumerable: !0,
        configurable: !0
      }), e.prototype.get = function(n) {
        var r = t(this.__entries__, n), i = this.__entries__[r];
        return i && i[1];
      }, e.prototype.set = function(n, r) {
        var i = t(this.__entries__, n);
        ~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
      }, e.prototype.delete = function(n) {
        var r = this.__entries__, i = t(r, n);
        ~i && r.splice(i, 1);
      }, e.prototype.has = function(n) {
        return !!~t(this.__entries__, n);
      }, e.prototype.clear = function() {
        this.__entries__.splice(0);
      }, e.prototype.forEach = function(n, r) {
        r === void 0 && (r = null);
        for (var i = 0, a = this.__entries__; i < a.length; i++) {
          var o = a[i];
          n.call(r, o[1], o[0]);
        }
      }, e;
    }()
  );
}(), n2 = typeof window < "u" && typeof document < "u" && window.document === document, h1 = function() {
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
}(), cue = function() {
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(h1) : function(t) {
    return setTimeout(function() {
      return t(Date.now());
    }, 1e3 / 60);
  };
}(), fue = 2;
function due(t, e) {
  var n = !1, r = !1, i = 0;
  function a() {
    n && (n = !1, t()), r && s();
  }
  function o() {
    cue(a);
  }
  function s() {
    var l = Date.now();
    if (n) {
      if (l - i < fue)
        return;
      r = !0;
    } else
      n = !0, r = !1, setTimeout(o, e);
    i = l;
  }
  return s;
}
var hue = 20, pue = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], vue = typeof MutationObserver < "u", gue = (
  /** @class */
  function() {
    function t() {
      this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = due(this.refresh.bind(this), hue);
    }
    return t.prototype.addObserver = function(e) {
      ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
    }, t.prototype.removeObserver = function(e) {
      var n = this.observers_, r = n.indexOf(e);
      ~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
    }, t.prototype.refresh = function() {
      var e = this.updateObservers_();
      e && this.refresh();
    }, t.prototype.updateObservers_ = function() {
      var e = this.observers_.filter(function(n) {
        return n.gatherActive(), n.hasActive();
      });
      return e.forEach(function(n) {
        return n.broadcastActive();
      }), e.length > 0;
    }, t.prototype.connect_ = function() {
      !n2 || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), vue ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
        attributes: !0,
        childList: !0,
        characterData: !0,
        subtree: !0
      })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
    }, t.prototype.disconnect_ = function() {
      !n2 || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
    }, t.prototype.onTransitionEnd_ = function(e) {
      var n = e.propertyName, r = n === void 0 ? "" : n, i = pue.some(function(a) {
        return !!~r.indexOf(a);
      });
      i && this.refresh();
    }, t.getInstance = function() {
      return this.instance_ || (this.instance_ = new t()), this.instance_;
    }, t.instance_ = null, t;
  }()
), qG = function(t, e) {
  for (var n = 0, r = Object.keys(e); n < r.length; n++) {
    var i = r[n];
    Object.defineProperty(t, i, {
      value: e[i],
      enumerable: !1,
      writable: !1,
      configurable: !0
    });
  }
  return t;
}, hh = function(t) {
  var e = t && t.ownerDocument && t.ownerDocument.defaultView;
  return e || h1;
}, KG = MS(0, 0, 0, 0);
function p1(t) {
  return parseFloat(t) || 0;
}
function J4(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return e.reduce(function(r, i) {
    var a = t["border-" + i + "-width"];
    return r + p1(a);
  }, 0);
}
function mue(t) {
  for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
    var a = i[r], o = t["padding-" + a];
    n[a] = p1(o);
  }
  return n;
}
function yue(t) {
  var e = t.getBBox();
  return MS(0, 0, e.width, e.height);
}
function bue(t) {
  var e = t.clientWidth, n = t.clientHeight;
  if (!e && !n)
    return KG;
  var r = hh(t).getComputedStyle(t), i = mue(r), a = i.left + i.right, o = i.top + i.bottom, s = p1(r.width), l = p1(r.height);
  if (r.boxSizing === "border-box" && (Math.round(s + a) !== e && (s -= J4(r, "left", "right") + a), Math.round(l + o) !== n && (l -= J4(r, "top", "bottom") + o)), !Oue(t)) {
    var u = Math.round(s + a) - e, c = Math.round(l + o) - n;
    Math.abs(u) !== 1 && (s -= u), Math.abs(c) !== 1 && (l -= c);
  }
  return MS(i.left, i.top, s, l);
}
var _ue = /* @__PURE__ */ function() {
  return typeof SVGGraphicsElement < "u" ? function(t) {
    return t instanceof hh(t).SVGGraphicsElement;
  } : function(t) {
    return t instanceof hh(t).SVGElement && typeof t.getBBox == "function";
  };
}();
function Oue(t) {
  return t === hh(t).document.documentElement;
}
function Sue(t) {
  return n2 ? _ue(t) ? yue(t) : bue(t) : KG;
}
function xue(t) {
  var e = t.x, n = t.y, r = t.width, i = t.height, a = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, o = Object.create(a.prototype);
  return qG(o, {
    x: e,
    y: n,
    width: r,
    height: i,
    top: n,
    right: e + r,
    bottom: i + n,
    left: e
  }), o;
}
function MS(t, e, n, r) {
  return { x: t, y: e, width: n, height: r };
}
var wue = (
  /** @class */
  function() {
    function t(e) {
      this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = MS(0, 0, 0, 0), this.target = e;
    }
    return t.prototype.isActive = function() {
      var e = Sue(this.target);
      return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
    }, t.prototype.broadcastRect = function() {
      var e = this.contentRect_;
      return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
    }, t;
  }()
), Cue = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e, n) {
      var r = xue(n);
      qG(this, { target: e, contentRect: r });
    }
    return t;
  }()
), Tue = (
  /** @class */
  function() {
    function t(e, n, r) {
      if (this.activeObservations_ = [], this.observations_ = new YG(), typeof e != "function")
        throw new TypeError("The callback provided as parameter 1 is not a function.");
      this.callback_ = e, this.controller_ = n, this.callbackCtx_ = r;
    }
    return t.prototype.observe = function(e) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(e instanceof hh(e).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(e) || (n.set(e, new wue(e)), this.controller_.addObserver(this), this.controller_.refresh());
      }
    }, t.prototype.unobserve = function(e) {
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      if (!(typeof Element > "u" || !(Element instanceof Object))) {
        if (!(e instanceof hh(e).Element))
          throw new TypeError('parameter 1 is not of type "Element".');
        var n = this.observations_;
        n.has(e) && (n.delete(e), n.size || this.controller_.removeObserver(this));
      }
    }, t.prototype.disconnect = function() {
      this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
    }, t.prototype.gatherActive = function() {
      var e = this;
      this.clearActive(), this.observations_.forEach(function(n) {
        n.isActive() && e.activeObservations_.push(n);
      });
    }, t.prototype.broadcastActive = function() {
      if (this.hasActive()) {
        var e = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
          return new Cue(r.target, r.broadcastRect());
        });
        this.callback_.call(e, n, e), this.clearActive();
      }
    }, t.prototype.clearActive = function() {
      this.activeObservations_.splice(0);
    }, t.prototype.hasActive = function() {
      return this.activeObservations_.length > 0;
    }, t;
  }()
), JG = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new YG(), ej = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      if (!(this instanceof t))
        throw new TypeError("Cannot call a class as a function.");
      if (!arguments.length)
        throw new TypeError("1 argument required, but only 0 present.");
      var n = gue.getInstance(), r = new Tue(e, n, this);
      JG.set(this, r);
    }
    return t;
  }()
);
[
  "observe",
  "unobserve",
  "disconnect"
].forEach(function(t) {
  ej.prototype[t] = function() {
    var e;
    return (e = JG.get(this))[t].apply(e, arguments);
  };
});
var tj = function() {
  return typeof h1.ResizeObserver < "u" ? h1.ResizeObserver : ej;
}();
const r2 = (t) => t != null && t !== "", sr = (t, e) => {
  const n = I({}, t);
  return Object.keys(e).forEach((r) => {
    const i = n[r];
    if (i)
      i.type || i.default ? i.default = e[r] : i.def ? i.def(e[r]) : n[r] = {
        type: i,
        default: e[r]
      };
    else
      throw new Error(`not have ${r} prop`);
  }), n;
}, Pue = (t) => {
  const e = Object.keys(t), n = {}, r = {}, i = {};
  for (let a = 0, o = e.length; a < o; a++) {
    const s = e[a];
    nue(s) ? (n[s[2].toLowerCase() + s.slice(3)] = t[s], r[s] = t[s]) : i[s] = t[s];
  }
  return {
    onEvents: r,
    events: n,
    extraAttrs: i
  };
}, $ue = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = {}, r = /;(?![^(]*\))/g, i = /:(.+)/;
  return typeof t == "object" ? t : (t.split(r).forEach(function(a) {
    if (a) {
      const o = a.split(i);
      if (o.length > 1) {
        const s = e ? tI(o[0].trim()) : o[0].trim();
        n[s] = o[1].trim();
      }
    }
  }), n);
}, v1 = (t, e) => t[e] !== void 0, nj = Symbol("skipFlatten"), Yn = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  const n = Array.isArray(t) ? t : [t], r = [];
  return n.forEach((i) => {
    Array.isArray(i) ? r.push(...Yn(i, e)) : i && i.type === wt ? i.key === nj ? r.push(i) : r.push(...Yn(i.children, e)) : i && nu(i) ? e && !nI(i) ? r.push(i) : e || r.push(i) : r2(i) && r.push(i);
  }), r;
}, rj = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  if (nu(t))
    return t.type === wt ? e === "default" ? Yn(t.children) : [] : t.children && t.children[e] ? Yn(t.children[e](n)) : [];
  {
    const r = t.$slots[e] && t.$slots[e](n);
    return Yn(r);
  }
}, Cs = (t) => {
  var e;
  let n = ((e = t == null ? void 0 : t.vnode) === null || e === void 0 ? void 0 : e.el) || t && (t.$el || t);
  for (; n && !n.tagName; )
    n = n.nextSibling;
  return n;
}, Aue = (t) => {
  const e = {};
  if (t.$ && t.$.vnode) {
    const n = t.$.vnode.props || {};
    Object.keys(t.$props).forEach((r) => {
      const i = t.$props[r], a = aue(r);
      (i !== void 0 || a in n) && (e[r] = i);
    });
  } else if (nu(t) && typeof t.type == "object") {
    const n = t.props || {}, r = {};
    Object.keys(n).forEach((a) => {
      r[tI(a)] = n[a];
    });
    const i = t.type.props || {};
    Object.keys(i).forEach((a) => {
      const o = sue(i, r, a, r[a]);
      (o !== void 0 || a in r) && (e[a] = o);
    });
  }
  return e;
}, Eue = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default", n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i;
  if (t.$) {
    const a = t[e];
    if (a !== void 0)
      return typeof a == "function" && r ? a(n) : a;
    i = t.$slots[e], i = r && i ? i(n) : i;
  } else if (nu(t)) {
    const a = t.props && t.props[e];
    if (a !== void 0 && t.props !== null)
      return typeof a == "function" && r ? a(n) : a;
    t.type === wt ? i = t.children : t.children && t.children[e] && (i = t.children[e], i = r && i ? i(n) : i);
  }
  return Array.isArray(i) && (i = Yn(i), i = i.length === 1 ? i[0] : i, i = i.length === 0 ? void 0 : i), i;
};
function e8() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n = {};
  return t.$ ? n = I(I({}, n), t.$attrs) : n = I(I({}, n), t.props), Pue(n)[e ? "onEvents" : "events"];
}
function Mue(t, e) {
  let r = ((nu(t) ? t.props : t.$attrs) || {}).style || {};
  return typeof r == "string" && (r = $ue(r, e)), r;
}
function Iue(t) {
  return t.length === 1 && t[0].type === wt;
}
function nI(t) {
  return t && (t.type === QG || t.type === wt && t.children.length === 0 || t.type === TS && t.children.trim() === "");
}
function os() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  const e = [];
  return t.forEach((n) => {
    Array.isArray(n) ? e.push(...n) : (n == null ? void 0 : n.type) === wt ? e.push(...os(n.children)) : e.push(n);
  }), e.filter((n) => !nI(n));
}
function Ui(t) {
  return Array.isArray(t) && t.length === 1 && (t = t[0]), t && t.__v_isVNode && typeof t.type != "symbol";
}
function IS(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
  var r, i;
  return (r = e[n]) !== null && r !== void 0 ? r : (i = t[n]) === null || i === void 0 ? void 0 : i.call(t);
}
const ph = te({
  compatConfig: {
    MODE: 3
  },
  name: "ResizeObserver",
  props: {
    disabled: Boolean,
    onResize: Function
  },
  emits: ["resize"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = tn({
      width: 0,
      height: 0,
      offsetHeight: 0,
      offsetWidth: 0
    });
    let i = null, a = null;
    const o = () => {
      a && (a.disconnect(), a = null);
    }, s = (c) => {
      const {
        onResize: f
      } = t, d = c[0].target, {
        width: h,
        height: p
      } = d.getBoundingClientRect(), {
        offsetWidth: v,
        offsetHeight: g
      } = d, m = Math.floor(h), y = Math.floor(p);
      if (r.width !== m || r.height !== y || r.offsetWidth !== v || r.offsetHeight !== g) {
        const b = {
          width: m,
          height: y,
          offsetWidth: v,
          offsetHeight: g
        };
        I(r, b), f && Promise.resolve().then(() => {
          f(I(I({}, b), {
            offsetWidth: v,
            offsetHeight: g
          }), d);
        });
      }
    }, l = vn(), u = () => {
      const {
        disabled: c
      } = t;
      if (c) {
        o();
        return;
      }
      const f = Cs(l);
      f !== i && (o(), i = f), !a && f && (a = new tj(s), a.observe(f));
    };
    return it(() => {
      u();
    }), ep(() => {
      u();
    }), nl(() => {
      o();
    }), se(() => t.disabled, () => {
      u();
    }, {
      flush: "post"
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
let ij = (t) => setTimeout(t, 16), aj = (t) => clearTimeout(t);
typeof window < "u" && "requestAnimationFrame" in window && (ij = (t) => window.requestAnimationFrame(t), aj = (t) => window.cancelAnimationFrame(t));
let t8 = 0;
const rI = /* @__PURE__ */ new Map();
function oj(t) {
  rI.delete(t);
}
function xt(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
  t8 += 1;
  const n = t8;
  function r(i) {
    if (i === 0)
      oj(n), t();
    else {
      const a = ij(() => {
        r(i - 1);
      });
      rI.set(n, a);
    }
  }
  return r(e), n;
}
xt.cancel = (t) => {
  const e = rI.get(t);
  return oj(e), aj(e);
};
const ru = function() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  return e;
}, np = (t) => {
  const e = t;
  return e.install = function(n) {
    n.component(e.displayName || e.name, t);
  }, t;
};
function g1() {
  return {
    type: [Function, Array]
  };
}
function $t(t) {
  return {
    type: Object,
    default: t
  };
}
function nt(t) {
  return {
    type: Boolean,
    default: t
  };
}
function tt(t) {
  return {
    type: Function,
    default: t
  };
}
function fa(t, e) {
  return {
    validator: () => !0,
    default: t
  };
}
function uf(t) {
  return {
    type: Array,
    default: t
  };
}
function hn(t) {
  return {
    type: String,
    default: t
  };
}
function gn(t, e) {
  return t ? {
    type: t,
    default: e
  } : fa(e);
}
let pr = !1;
try {
  const t = Object.defineProperty({}, "passive", {
    get() {
      pr = !0;
    }
  });
  window.addEventListener("testPassive", null, t), window.removeEventListener("testPassive", null, t);
} catch {
}
function vr(t, e, n, r) {
  if (t && t.addEventListener) {
    let i = r;
    i === void 0 && pr && (e === "touchstart" || e === "touchmove" || e === "wheel") && (i = {
      passive: !1
    }), t.addEventListener(e, n, i);
  }
  return {
    remove: () => {
      t && t.removeEventListener && t.removeEventListener(e, n);
    }
  };
}
const iI = "anticon", sj = Symbol("GlobalFormContextKey"), Due = (t) => {
  pt(sj, t);
}, Rue = () => Ge(sj, {
  validateMessages: L(() => {
  })
}), kue = () => ({
  iconPrefixCls: String,
  getTargetContainer: {
    type: Function
  },
  getPopupContainer: {
    type: Function
  },
  prefixCls: String,
  getPrefixCls: {
    type: Function
  },
  renderEmpty: {
    type: Function
  },
  transformCellText: {
    type: Function
  },
  csp: $t(),
  input: $t(),
  autoInsertSpaceInButton: {
    type: Boolean,
    default: void 0
  },
  locale: $t(),
  pageHeader: $t(),
  componentSize: {
    type: String
  },
  componentDisabled: {
    type: Boolean,
    default: void 0
  },
  direction: {
    type: String,
    default: "ltr"
  },
  space: $t(),
  virtual: {
    type: Boolean,
    default: void 0
  },
  dropdownMatchSelectWidth: {
    type: [Number, Boolean],
    default: !0
  },
  form: $t(),
  pagination: $t(),
  theme: $t(),
  select: $t(),
  wave: $t()
}), aI = Symbol("configProvider"), lj = {
  getPrefixCls: (t, e) => e || (t ? `ant-${t}` : "ant"),
  iconPrefixCls: L(() => iI),
  getPopupContainer: L(() => () => document.body),
  direction: L(() => "ltr")
}, DS = () => Ge(aI, lj), Lue = (t) => pt(aI, t), uj = Symbol("DisabledContextKey"), Ko = () => Ge(uj, U(void 0)), cj = (t) => {
  const e = Ko();
  return pt(uj, L(() => {
    var n;
    return (n = t.value) !== null && n !== void 0 ? n : e.value;
  })), t;
}, Nue = {
  // Options.jsx
  items_per_page: "/ page",
  jump_to: "Go to",
  jump_to_confirm: "confirm",
  page: "",
  // Pagination.jsx
  prev_page: "Previous Page",
  next_page: "Next Page",
  prev_5: "Previous 5 Pages",
  next_5: "Next 5 Pages",
  prev_3: "Previous 3 Pages",
  next_3: "Next 3 Pages"
}, Bue = {
  locale: "en_US",
  today: "Today",
  now: "Now",
  backToToday: "Back to today",
  ok: "Ok",
  clear: "Clear",
  month: "Month",
  year: "Year",
  timeSelect: "select time",
  dateSelect: "select date",
  weekSelect: "Choose a week",
  monthSelect: "Choose a month",
  yearSelect: "Choose a year",
  decadeSelect: "Choose a decade",
  yearFormat: "YYYY",
  dateFormat: "M/D/YYYY",
  dayFormat: "D",
  dateTimeFormat: "M/D/YYYY HH:mm:ss",
  monthBeforeYear: !0,
  previousMonth: "Previous month (PageUp)",
  nextMonth: "Next month (PageDown)",
  previousYear: "Last year (Control + left)",
  nextYear: "Next year (Control + right)",
  previousDecade: "Last decade",
  nextDecade: "Next decade",
  previousCentury: "Last century",
  nextCentury: "Next century"
}, fj = {
  placeholder: "Select time",
  rangePlaceholder: ["Start time", "End time"]
}, n8 = {
  lang: I({
    placeholder: "Select date",
    yearPlaceholder: "Select year",
    quarterPlaceholder: "Select quarter",
    monthPlaceholder: "Select month",
    weekPlaceholder: "Select week",
    rangePlaceholder: ["Start date", "End date"],
    rangeYearPlaceholder: ["Start year", "End year"],
    rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
    rangeMonthPlaceholder: ["Start month", "End month"],
    rangeWeekPlaceholder: ["Start week", "End week"]
  }, Bue),
  timePickerLocale: I({}, fj)
}, Ti = "${label} is not a valid ${type}", zs = {
  locale: "en",
  Pagination: Nue,
  DatePicker: n8,
  TimePicker: fj,
  Calendar: n8,
  global: {
    placeholder: "Please select"
  },
  Table: {
    filterTitle: "Filter menu",
    filterConfirm: "OK",
    filterReset: "Reset",
    filterEmptyText: "No filters",
    filterCheckall: "Select all items",
    filterSearchPlaceholder: "Search in filters",
    emptyText: "No data",
    selectAll: "Select current page",
    selectInvert: "Invert current page",
    selectNone: "Clear all data",
    selectionAll: "Select all data",
    sortTitle: "Sort",
    expand: "Expand row",
    collapse: "Collapse row",
    triggerDesc: "Click to sort descending",
    triggerAsc: "Click to sort ascending",
    cancelSort: "Click to cancel sorting"
  },
  Tour: {
    Next: "Next",
    Previous: "Previous",
    Finish: "Finish"
  },
  Modal: {
    okText: "OK",
    cancelText: "Cancel",
    justOkText: "OK"
  },
  Popconfirm: {
    okText: "OK",
    cancelText: "Cancel"
  },
  Transfer: {
    titles: ["", ""],
    searchPlaceholder: "Search here",
    itemUnit: "item",
    itemsUnit: "items",
    remove: "Remove",
    selectCurrent: "Select current page",
    removeCurrent: "Remove current page",
    selectAll: "Select all data",
    removeAll: "Remove all data",
    selectInvert: "Invert current page"
  },
  Upload: {
    uploading: "Uploading...",
    removeFile: "Remove file",
    uploadError: "Upload error",
    previewFile: "Preview file",
    downloadFile: "Download file"
  },
  Empty: {
    description: "No data"
  },
  Icon: {
    icon: "icon"
  },
  Text: {
    edit: "Edit",
    copy: "Copy",
    copied: "Copied",
    expand: "Expand"
  },
  PageHeader: {
    back: "Back"
  },
  Form: {
    optional: "(optional)",
    defaultValidateMessages: {
      default: "Field validation error for ${label}",
      required: "Please enter ${label}",
      enum: "${label} must be one of [${enum}]",
      whitespace: "${label} cannot be a blank character",
      date: {
        format: "${label} date format is invalid",
        parse: "${label} cannot be converted to a date",
        invalid: "${label} is an invalid date"
      },
      types: {
        string: Ti,
        method: Ti,
        array: Ti,
        object: Ti,
        number: Ti,
        date: Ti,
        boolean: Ti,
        integer: Ti,
        float: Ti,
        regexp: Ti,
        email: Ti,
        url: Ti,
        hex: Ti
      },
      string: {
        len: "${label} must be ${len} characters",
        min: "${label} must be at least ${min} characters",
        max: "${label} must be up to ${max} characters",
        range: "${label} must be between ${min}-${max} characters"
      },
      number: {
        len: "${label} must be equal to ${len}",
        min: "${label} must be minimum ${min}",
        max: "${label} must be maximum ${max}",
        range: "${label} must be between ${min}-${max}"
      },
      array: {
        len: "Must be ${len} ${label}",
        min: "At least ${min} ${label}",
        max: "At most ${max} ${label}",
        range: "The amount of ${label} must be between ${min}-${max}"
      },
      pattern: {
        mismatch: "${label} does not match the pattern ${pattern}"
      }
    }
  },
  Image: {
    preview: "Preview"
  },
  QRCode: {
    expired: "QR code expired",
    refresh: "Refresh",
    scanned: "Scanned"
  }
}, dj = te({
  compatConfig: {
    MODE: 3
  },
  name: "LocaleReceiver",
  props: {
    componentName: String,
    defaultLocale: {
      type: [Object, Function]
    },
    children: {
      type: Function
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = Ge("localeData", {}), i = L(() => {
      const {
        componentName: o = "global",
        defaultLocale: s
      } = t, l = s || zs[o || "global"], {
        antLocale: u
      } = r, c = o && u ? u[o] : {};
      return I(I({}, typeof l == "function" ? l() : l), c || {});
    }), a = L(() => {
      const {
        antLocale: o
      } = r, s = o && o.locale;
      return o && o.exist && !s ? zs.locale : s;
    });
    return () => {
      const o = t.children || n.default, {
        antLocale: s
      } = r;
      return o == null ? void 0 : o(i.value, a.value, s);
    };
  }
});
function RS(t, e, n) {
  const r = Ge("localeData", {});
  return [L(() => {
    const {
      antLocale: a
    } = r, o = B(e) || zs[t || "global"], s = t && a ? a[t] : {};
    return I(I(I({}, typeof o == "function" ? o() : o), s || {}), B(n) || {});
  })];
}
function oI(t) {
  for (var e = 0, n, r = 0, i = t.length; i >= 4; ++r, i -= 4)
    n = t.charCodeAt(r) & 255 | (t.charCodeAt(++r) & 255) << 8 | (t.charCodeAt(++r) & 255) << 16 | (t.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, e = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  switch (i) {
    case 3:
      e ^= (t.charCodeAt(r + 2) & 255) << 16;
    case 2:
      e ^= (t.charCodeAt(r + 1) & 255) << 8;
    case 1:
      e ^= t.charCodeAt(r) & 255, e = /* Math.imul(h, m): */
      (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
  }
  return e ^= e >>> 13, e = /* Math.imul(h, m): */
  (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
}
const r8 = "%";
class zue {
  constructor(e) {
    this.cache = /* @__PURE__ */ new Map(), this.instanceId = e;
  }
  get(e) {
    return this.cache.get(Array.isArray(e) ? e.join(r8) : e) || null;
  }
  update(e, n) {
    const r = Array.isArray(e) ? e.join(r8) : e, i = this.cache.get(r), a = n(i);
    a === null ? this.cache.delete(r) : this.cache.set(r, a);
  }
}
const hj = "data-token-hash", Hc = "data-css-hash", Vue = "data-cache-path", Nd = "__cssinjs_instance__";
function Xg() {
  const t = Math.random().toString(12).slice(2);
  if (typeof document < "u" && document.head && document.body) {
    const e = document.body.querySelectorAll(`style[${Hc}]`) || [], {
      firstChild: n
    } = document.head;
    Array.from(e).forEach((i) => {
      i[Nd] = i[Nd] || t, i[Nd] === t && document.head.insertBefore(i, n);
    });
    const r = {};
    Array.from(document.querySelectorAll(`style[${Hc}]`)).forEach((i) => {
      var a;
      const o = i.getAttribute(Hc);
      r[o] ? i[Nd] === t && ((a = i.parentNode) === null || a === void 0 || a.removeChild(i)) : r[o] = !0;
    });
  }
  return new zue(t);
}
const pj = Symbol("StyleContextKey"), Fue = () => {
  var t, e, n;
  const r = vn();
  let i;
  if (r && r.appContext) {
    const a = (n = (e = (t = r.appContext) === null || t === void 0 ? void 0 : t.config) === null || e === void 0 ? void 0 : e.globalProperties) === null || n === void 0 ? void 0 : n.__ANTDV_CSSINJS_CACHE__;
    a ? i = a : (i = Xg(), r.appContext.config.globalProperties && (r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = i));
  } else
    i = Xg();
  return i;
}, vj = {
  cache: Xg(),
  defaultCache: !0,
  hashPriority: "low"
}, kS = () => {
  const t = Fue();
  return Ge(pj, ae(I(I({}, vj), {
    cache: t
  })));
}, Wue = (t) => {
  const e = kS(), n = ae(I(I({}, vj), {
    cache: Xg()
  }));
  return se([() => B(t), e], () => {
    const r = I({}, e.value), i = B(t);
    Object.keys(i).forEach((o) => {
      const s = i[o];
      i[o] !== void 0 && (r[o] = s);
    });
    const {
      cache: a
    } = i;
    r.cache = r.cache || Xg(), r.defaultCache = !a && e.value.defaultCache, n.value = r;
  }, {
    immediate: !0
  }), pt(pj, n), n;
}, Que = () => ({
  autoClear: nt(),
  /** @private Test only. Not work in production. */
  mock: hn(),
  /**
   * Only set when you need ssr to extract style on you own.
   * If not provided, it will auto create <style /> on the end of Provider in server side.
   */
  cache: $t(),
  /** Tell children that this context is default generated context */
  defaultCache: nt(),
  /** Use `:where` selector to reduce hashId css selector priority */
  hashPriority: hn(),
  /** Tell cssinjs where to inject style in */
  container: gn(),
  /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
  ssrInline: nt(),
  /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
  transformers: uf(),
  /**
   * Linters to lint css before inject in document.
   * Styles will be linted after transforming.
   * Please note that `linters` do not support dynamic update.
   */
  linters: uf()
});
np(te({
  name: "AStyleProvider",
  inheritAttrs: !1,
  props: Que(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Wue(t), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}));
function Hue() {
  return !1;
}
let i2 = !1;
function Gue() {
  return i2;
}
const jue = process.env.NODE_ENV === "production" ? Hue : Gue;
if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && module.hot && typeof window < "u") {
  const t = window;
  if (typeof t.webpackHotUpdate == "function") {
    const e = t.webpackHotUpdate;
    t.webpackHotUpdate = function() {
      return i2 = !0, setTimeout(() => {
        i2 = !1;
      }, 0), e(...arguments);
    };
  }
}
function gj(t, e, n, r) {
  const i = kS(), a = ae(""), o = ae();
  ht(() => {
    a.value = [t, ...e.value].join("%");
  });
  const s = jue(), l = (u) => {
    i.value.cache.update(u, (c) => {
      const [f = 0, d] = c || [];
      return f - 1 === 0 ? (r == null || r(d, !1), null) : [f - 1, d];
    });
  };
  return se(a, (u, c) => {
    c && l(c), i.value.cache.update(u, (f) => {
      const [d = 0, h] = f || [];
      let p = h;
      process.env.NODE_ENV !== "production" && h && s && (r == null || r(p, s), p = null);
      const v = p || n();
      return [d + 1, v];
    }), o.value = i.value.cache.get(a.value)[1];
  }, {
    immediate: !0
  }), yt(() => {
    l(a.value);
  }), o;
}
function wa() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function $l(t, e) {
  return t && t.contains ? t.contains(e) : !1;
}
const i8 = "data-vc-order", Zue = "vc-util-key", a2 = /* @__PURE__ */ new Map();
function mj() {
  let {
    mark: t
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return t ? t.startsWith("data-") ? t : `data-${t}` : Zue;
}
function LS(t) {
  return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
}
function Uue(t) {
  return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
}
function yj(t) {
  return Array.from((a2.get(t) || t).children).filter((e) => e.tagName === "STYLE");
}
function bj(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!wa())
    return null;
  const {
    csp: n,
    prepend: r
  } = e, i = document.createElement("style");
  i.setAttribute(i8, Uue(r)), n != null && n.nonce && (i.nonce = n == null ? void 0 : n.nonce), i.innerHTML = t;
  const a = LS(e), {
    firstChild: o
  } = a;
  if (r) {
    if (r === "queue") {
      const s = yj(a).filter((l) => ["prepend", "prependQueue"].includes(l.getAttribute(i8)));
      if (s.length)
        return a.insertBefore(i, s[s.length - 1].nextSibling), i;
    }
    a.insertBefore(i, o);
  } else
    a.appendChild(i);
  return i;
}
function _j(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = LS(e);
  return yj(n).find((r) => r.getAttribute(mj(e)) === t);
}
function m1(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const n = _j(t, e);
  n && LS(e).removeChild(n);
}
function Xue(t, e) {
  const n = a2.get(t);
  if (!n || !$l(document, n)) {
    const r = bj("", e), {
      parentNode: i
    } = r;
    a2.set(t, i), t.removeChild(r);
  }
}
function Yg(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  var r, i, a;
  const o = LS(n);
  Xue(o, n);
  const s = _j(e, n);
  if (s)
    return !((r = n.csp) === null || r === void 0) && r.nonce && s.nonce !== ((i = n.csp) === null || i === void 0 ? void 0 : i.nonce) && (s.nonce = (a = n.csp) === null || a === void 0 ? void 0 : a.nonce), s.innerHTML !== t && (s.innerHTML = t), s;
  const l = bj(t, n);
  return l.setAttribute(mj(n), e), l;
}
function Yue(t, e) {
  if (t.length !== e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (t[n] !== e[n])
      return !1;
  return !0;
}
class vh {
  constructor() {
    this.cache = /* @__PURE__ */ new Map(), this.keys = [], this.cacheCallTimes = 0;
  }
  size() {
    return this.keys.length;
  }
  internalGet(e) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, r = {
      map: this.cache
    };
    return e.forEach((i) => {
      var a;
      r ? r = (a = r == null ? void 0 : r.map) === null || a === void 0 ? void 0 : a.get(i) : r = void 0;
    }), r != null && r.value && n && (r.value[1] = this.cacheCallTimes++), r == null ? void 0 : r.value;
  }
  get(e) {
    var n;
    return (n = this.internalGet(e, !0)) === null || n === void 0 ? void 0 : n[0];
  }
  has(e) {
    return !!this.internalGet(e);
  }
  set(e, n) {
    if (!this.has(e)) {
      if (this.size() + 1 > vh.MAX_CACHE_SIZE + vh.MAX_CACHE_OFFSET) {
        const [i] = this.keys.reduce((a, o) => {
          const [, s] = a;
          return this.internalGet(o)[1] < s ? [o, this.internalGet(o)[1]] : a;
        }, [this.keys[0], this.cacheCallTimes]);
        this.delete(i);
      }
      this.keys.push(e);
    }
    let r = this.cache;
    e.forEach((i, a) => {
      if (a === e.length - 1)
        r.set(i, {
          value: [n, this.cacheCallTimes++]
        });
      else {
        const o = r.get(i);
        o ? o.map || (o.map = /* @__PURE__ */ new Map()) : r.set(i, {
          map: /* @__PURE__ */ new Map()
        }), r = r.get(i).map;
      }
    });
  }
  deleteByPath(e, n) {
    var r;
    const i = e.get(n[0]);
    if (n.length === 1)
      return i.map ? e.set(n[0], {
        map: i.map
      }) : e.delete(n[0]), (r = i.value) === null || r === void 0 ? void 0 : r[0];
    const a = this.deleteByPath(i.map, n.slice(1));
    return (!i.map || i.map.size === 0) && !i.value && e.delete(n[0]), a;
  }
  delete(e) {
    if (this.has(e))
      return this.keys = this.keys.filter((n) => !Yue(n, e)), this.deleteByPath(this.cache, e);
  }
}
vh.MAX_CACHE_SIZE = 20;
vh.MAX_CACHE_OFFSET = 5;
let o2 = {};
function cf(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error(`Warning: ${e}`);
}
function que(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.warn(`Note: ${e}`);
}
function Kue() {
  o2 = {};
}
function Oj(t, e, n) {
  !e && !o2[n] && (t(!1, n), o2[n] = !0);
}
function oa(t, e) {
  Oj(cf, t, e);
}
function a8(t, e) {
  Oj(que, t, e);
}
function Jue() {
}
let Xr = Jue;
process.env.NODE_ENV !== "production" && (Xr = (t, e, n) => {
  oa(t, `[ant-design-vue: ${e}] ${n}`), process.env.NODE_ENV === "test" && Kue();
});
let o8 = 0;
class Sj {
  constructor(e) {
    this.derivatives = Array.isArray(e) ? e : [e], this.id = o8, e.length === 0 && Xr(e.length > 0, "[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."), o8 += 1;
  }
  getDerivativeToken(e) {
    return this.derivatives.reduce((n, r) => r(e, n), void 0);
  }
}
const qw = new vh();
function xj(t) {
  const e = Array.isArray(t) ? t : [t];
  return qw.has(e) || qw.set(e, new Sj(e)), qw.get(e);
}
const s8 = /* @__PURE__ */ new WeakMap();
function y1(t) {
  let e = s8.get(t) || "";
  return e || (Object.keys(t).forEach((n) => {
    const r = t[n];
    e += n, r instanceof Sj ? e += r.id : r && typeof r == "object" ? e += y1(r) : e += r;
  }), s8.set(t, e)), e;
}
function ece(t, e) {
  return oI(`${e}_${y1(t)}`);
}
const og = `random-${Date.now()}-${Math.random()}`.replace(/\./g, ""), wj = "_bAmBoO_";
function tce(t, e, n) {
  var r, i;
  if (wa()) {
    Yg(t, og);
    const a = document.createElement("div");
    a.style.position = "fixed", a.style.left = "0", a.style.top = "0", e == null || e(a), document.body.appendChild(a), process.env.NODE_ENV !== "production" && (a.innerHTML = "Test", a.style.zIndex = "9999999");
    const o = n ? n(a) : (r = getComputedStyle(a).content) === null || r === void 0 ? void 0 : r.includes(wj);
    return (i = a.parentNode) === null || i === void 0 || i.removeChild(a), m1(og), o;
  }
  return !1;
}
let Kw;
function nce() {
  return Kw === void 0 && (Kw = tce(`@layer ${og} { .${og} { content: "${wj}"!important; } }`, (t) => {
    t.className = og;
  })), Kw;
}
const l8 = {}, rce = process.env.NODE_ENV === "production", ice = process.env.NODE_ENV === "prerender", ace = !rce && !ice ? "css-dev-only-do-not-override" : "css", bc = /* @__PURE__ */ new Map();
function oce(t) {
  bc.set(t, (bc.get(t) || 0) + 1);
}
function sce(t, e) {
  typeof document < "u" && document.querySelectorAll(`style[${hj}="${t}"]`).forEach((r) => {
    var i;
    r[Nd] === e && ((i = r.parentNode) === null || i === void 0 || i.removeChild(r));
  });
}
const lce = 0;
function uce(t, e) {
  bc.set(t, (bc.get(t) || 0) - 1);
  const n = Array.from(bc.keys()), r = n.filter((i) => (bc.get(i) || 0) <= 0);
  n.length - r.length > lce && r.forEach((i) => {
    sce(i, e), bc.delete(i);
  });
}
const cce = (t, e, n, r) => {
  const i = n.getDerivativeToken(t);
  let a = I(I({}, i), e);
  return r && (a = r(a)), a;
};
function fce(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : U({});
  const r = kS(), i = L(() => I({}, ...e.value)), a = L(() => y1(i.value)), o = L(() => y1(n.value.override || l8));
  return gj("token", L(() => [n.value.salt || "", t.value.id, a.value, o.value]), () => {
    const {
      salt: l = "",
      override: u = l8,
      formatToken: c,
      getComputedToken: f
    } = n.value, d = f ? f(i.value, u, t.value) : cce(i.value, u, t.value, c), h = ece(d, l);
    d._tokenKey = h, oce(h);
    const p = `${ace}-${oI(h)}`;
    return d._hashId = p, [d, p];
  }, (l) => {
    var u;
    uce(l[0]._tokenKey, (u = r.value) === null || u === void 0 ? void 0 : u.cache.instanceId);
  });
}
var dce = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, Cj = "comm", Tj = "rule", Pj = "decl", hce = "@import", pce = "@keyframes", vce = "@layer", $j = Math.abs, sI = String.fromCharCode;
function Aj(t) {
  return t.trim();
}
function y_(t, e, n) {
  return t.replace(e, n);
}
function gce(t, e, n) {
  return t.indexOf(e, n);
}
function qg(t, e) {
  return t.charCodeAt(e) | 0;
}
function Kg(t, e, n) {
  return t.slice(e, n);
}
function Ss(t) {
  return t.length;
}
function mce(t) {
  return t.length;
}
function gy(t, e) {
  return e.push(t), t;
}
var NS = 1, gh = 1, Ej = 0, Ca = 0, Bn = 0, rp = "";
function lI(t, e, n, r, i, a, o, s) {
  return { value: t, root: e, parent: n, type: r, props: i, children: a, line: NS, column: gh, length: o, return: "", siblings: s };
}
function yce() {
  return Bn;
}
function bce() {
  return Bn = Ca > 0 ? qg(rp, --Ca) : 0, gh--, Bn === 10 && (gh = 1, NS--), Bn;
}
function qa() {
  return Bn = Ca < Ej ? qg(rp, Ca++) : 0, gh++, Bn === 10 && (gh = 1, NS++), Bn;
}
function Gc() {
  return qg(rp, Ca);
}
function b_() {
  return Ca;
}
function BS(t, e) {
  return Kg(rp, t, e);
}
function s2(t) {
  switch (t) {
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    case 59:
    case 123:
    case 125:
      return 4;
    case 58:
      return 3;
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function _ce(t) {
  return NS = gh = 1, Ej = Ss(rp = t), Ca = 0, [];
}
function Oce(t) {
  return rp = "", t;
}
function Jw(t) {
  return Aj(BS(Ca - 1, l2(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
}
function Sce(t) {
  for (; (Bn = Gc()) && Bn < 33; )
    qa();
  return s2(t) > 2 || s2(Bn) > 3 ? "" : " ";
}
function xce(t, e) {
  for (; --e && qa() && !(Bn < 48 || Bn > 102 || Bn > 57 && Bn < 65 || Bn > 70 && Bn < 97); )
    ;
  return BS(t, b_() + (e < 6 && Gc() == 32 && qa() == 32));
}
function l2(t) {
  for (; qa(); )
    switch (Bn) {
      case t:
        return Ca;
      case 34:
      case 39:
        t !== 34 && t !== 39 && l2(Bn);
        break;
      case 40:
        t === 41 && l2(t);
        break;
      case 92:
        qa();
        break;
    }
  return Ca;
}
function wce(t, e) {
  for (; qa() && t + Bn !== 57; )
    if (t + Bn === 84 && Gc() === 47)
      break;
  return "/*" + BS(e, Ca - 1) + "*" + sI(t === 47 ? t : qa());
}
function Cce(t) {
  for (; !s2(Gc()); )
    qa();
  return BS(t, Ca);
}
function Tce(t) {
  return Oce(__("", null, null, null, [""], t = _ce(t), 0, [0], t));
}
function __(t, e, n, r, i, a, o, s, l) {
  for (var u = 0, c = 0, f = o, d = 0, h = 0, p = 0, v = 1, g = 1, m = 1, y = 0, b = "", _ = i, O = a, S = r, x = b; g; )
    switch (p = y, y = qa()) {
      case 40:
        if (p != 108 && qg(x, f - 1) == 58) {
          gce(x += y_(Jw(y), "&", "&\f"), "&\f", $j(u ? s[u - 1] : 0)) != -1 && (m = -1);
          break;
        }
      case 34:
      case 39:
      case 91:
        x += Jw(y);
        break;
      case 9:
      case 10:
      case 13:
      case 32:
        x += Sce(p);
        break;
      case 92:
        x += xce(b_() - 1, 7);
        continue;
      case 47:
        switch (Gc()) {
          case 42:
          case 47:
            gy(Pce(wce(qa(), b_()), e, n, l), l);
            break;
          default:
            x += "/";
        }
        break;
      case 123 * v:
        s[u++] = Ss(x) * m;
      case 125 * v:
      case 59:
      case 0:
        switch (y) {
          case 0:
          case 125:
            g = 0;
          case 59 + c:
            m == -1 && (x = y_(x, /\f/g, "")), h > 0 && Ss(x) - f && gy(h > 32 ? c8(x + ";", r, n, f - 1, l) : c8(y_(x, " ", "") + ";", r, n, f - 2, l), l);
            break;
          case 59:
            x += ";";
          default:
            if (gy(S = u8(x, e, n, u, c, i, s, b, _ = [], O = [], f, a), a), y === 123)
              if (c === 0)
                __(x, e, S, S, _, a, f, s, O);
              else
                switch (d === 99 && qg(x, 3) === 110 ? 100 : d) {
                  case 100:
                  case 108:
                  case 109:
                  case 115:
                    __(t, S, S, r && gy(u8(t, S, S, 0, 0, i, s, b, i, _ = [], f, O), O), i, O, f, s, r ? _ : O);
                    break;
                  default:
                    __(x, S, S, S, [""], O, 0, s, O);
                }
        }
        u = c = h = 0, v = m = 1, b = x = "", f = o;
        break;
      case 58:
        f = 1 + Ss(x), h = p;
      default:
        if (v < 1) {
          if (y == 123)
            --v;
          else if (y == 125 && v++ == 0 && bce() == 125)
            continue;
        }
        switch (x += sI(y), y * v) {
          case 38:
            m = c > 0 ? 1 : (x += "\f", -1);
            break;
          case 44:
            s[u++] = (Ss(x) - 1) * m, m = 1;
            break;
          case 64:
            Gc() === 45 && (x += Jw(qa())), d = Gc(), c = f = Ss(b = x += Cce(b_())), y++;
            break;
          case 45:
            p === 45 && Ss(x) == 2 && (v = 0);
        }
    }
  return a;
}
function u8(t, e, n, r, i, a, o, s, l, u, c, f) {
  for (var d = i - 1, h = i === 0 ? a : [""], p = mce(h), v = 0, g = 0, m = 0; v < r; ++v)
    for (var y = 0, b = Kg(t, d + 1, d = $j(g = o[v])), _ = t; y < p; ++y)
      (_ = Aj(g > 0 ? h[y] + " " + b : y_(b, /&\f/g, h[y]))) && (l[m++] = _);
  return lI(t, e, n, i === 0 ? Tj : s, l, u, c, f);
}
function Pce(t, e, n, r) {
  return lI(t, e, n, Cj, sI(yce()), Kg(t, 2, -2), 0, r);
}
function c8(t, e, n, r, i) {
  return lI(t, e, n, Pj, Kg(t, 0, r), Kg(t, r + 1, -1), r, i);
}
function u2(t, e) {
  for (var n = "", r = 0; r < t.length; r++)
    n += e(t[r], r, t, e) || "";
  return n;
}
function $ce(t, e, n, r) {
  switch (t.type) {
    case vce:
      if (t.children.length) break;
    case hce:
    case Pj:
      return t.return = t.return || t.value;
    case Cj:
      return "";
    case pce:
      return t.return = t.value + "{" + u2(t.children, r) + "}";
    case Tj:
      if (!Ss(t.value = t.props.join(","))) return "";
  }
  return Ss(n = u2(t.children, r)) ? t.return = t.value + "{" + n + "}" : "";
}
function Mj(t, e) {
  const {
    path: n,
    parentSelectors: r
  } = e;
  oa(!1, `[Ant Design Vue CSS-in-JS] ${n ? `Error in '${n}': ` : ""}${t}${r.length ? ` Selector info: ${r.join(" -> ")}` : ""}`);
}
const Ace = (t, e, n) => {
  if (t === "content") {
    const r = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
    (typeof e != "string" || ["normal", "none", "initial", "inherit", "unset"].indexOf(e) === -1 && !r.test(e) && (e.charAt(0) !== e.charAt(e.length - 1) || e.charAt(0) !== '"' && e.charAt(0) !== "'")) && Mj(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`, n);
  }
}, Ece = (t, e, n) => {
  t === "animation" && n.hashId && e !== "none" && Mj(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`, n);
}, f8 = "data-ant-cssinjs-cache-path", Mce = "_FILE_STYLE__";
let jc, Ij = !0;
function Ice() {
  var t;
  if (!jc && (jc = {}, wa())) {
    const e = document.createElement("div");
    e.className = f8, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
    let n = getComputedStyle(e).content || "";
    n = n.replace(/^"/, "").replace(/"$/, ""), n.split(";").forEach((i) => {
      const [a, o] = i.split(":");
      jc[a] = o;
    });
    const r = document.querySelector(`style[${f8}]`);
    r && (Ij = !1, (t = r.parentNode) === null || t === void 0 || t.removeChild(r)), document.body.removeChild(e);
  }
}
function Dce(t) {
  return Ice(), !!jc[t];
}
function Rce(t) {
  const e = jc[t];
  let n = null;
  if (e && wa())
    if (Ij)
      n = Mce;
    else {
      const r = document.querySelector(`style[${Hc}="${jc[t]}"]`);
      r ? n = r.innerHTML : delete jc[t];
    }
  return [n, e];
}
const d8 = wa(), Dj = "_skip_check_", Rj = "_multi_value_";
function h8(t) {
  return u2(Tce(t), $ce).replace(/\{%%%\:[^;];}/g, ";");
}
function kce(t) {
  return typeof t == "object" && t && (Dj in t || Rj in t);
}
function Lce(t, e, n) {
  if (!e)
    return t;
  const r = `.${e}`, i = n === "low" ? `:where(${r})` : r;
  return t.split(",").map((o) => {
    var s;
    const l = o.trim().split(/\s+/);
    let u = l[0] || "";
    const c = ((s = u.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
    return u = `${c}${i}${u.slice(c.length)}`, [u, ...l.slice(1)].join(" ");
  }).join(",");
}
const c2 = /* @__PURE__ */ new Set();
process.env.NODE_ENV;
const f2 = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
    root: n,
    injectHash: r,
    parentSelectors: i
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
    root: !0,
    parentSelectors: []
  };
  const {
    hashId: a,
    layer: o,
    path: s,
    hashPriority: l,
    transformers: u = [],
    linters: c = []
  } = e;
  let f = "", d = {};
  function h(g) {
    const m = g.getName(a);
    if (!d[m]) {
      const [y] = f2(g.style, e, {
        root: !1,
        parentSelectors: i
      });
      d[m] = `@keyframes ${g.getName(a)}${y}`;
    }
  }
  function p(g) {
    let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    return g.forEach((y) => {
      Array.isArray(y) ? p(y, m) : y && m.push(y);
    }), m;
  }
  if (p(Array.isArray(t) ? t : [t]).forEach((g) => {
    const m = typeof g == "string" && !n ? {} : g;
    if (typeof m == "string")
      f += `${m}
`;
    else if (m._keyframe)
      h(m);
    else {
      const y = u.reduce((b, _) => {
        var O;
        return ((O = _ == null ? void 0 : _.visit) === null || O === void 0 ? void 0 : O.call(_, b)) || b;
      }, m);
      Object.keys(y).forEach((b) => {
        var _;
        const O = y[b];
        if (typeof O == "object" && O && (b !== "animationName" || !O._keyframe) && !kce(O)) {
          let S = !1, x = b.trim(), C = !1;
          (n || r) && a ? x.startsWith("@") ? S = !0 : x = Lce(b, a, l) : n && !a && (x === "&" || x === "") && (x = "", C = !0);
          const [T, w] = f2(O, e, {
            root: C,
            injectHash: S,
            parentSelectors: [...i, x]
          });
          d = I(I({}, d), w), f += `${x}${T}`;
        } else {
          let S = function(C, T) {
            process.env.NODE_ENV !== "production" && (typeof O != "object" || !(O != null && O[Dj])) && [Ace, Ece, ...c].forEach(($) => $(C, T, {
              path: s,
              hashId: a,
              parentSelectors: i
            }));
            const w = C.replace(/[A-Z]/g, ($) => `-${$.toLowerCase()}`);
            let P = T;
            !dce[C] && typeof P == "number" && P !== 0 && (P = `${P}px`), C === "animationName" && (T != null && T._keyframe) && (h(T), P = T.getName(a)), f += `${w}:${P};`;
          };
          const x = (_ = O == null ? void 0 : O.value) !== null && _ !== void 0 ? _ : O;
          typeof O == "object" && (O != null && O[Rj]) && Array.isArray(x) ? x.forEach((C) => {
            S(b, C);
          }) : S(b, x);
        }
      });
    }
  }), !n)
    f = `{${f}}`;
  else if (o && nce()) {
    const g = o.split(",");
    f = `@layer ${g[g.length - 1].trim()} {${f}}`, g.length > 1 && (f = `@layer ${o}{%%%:%}${f}`);
  }
  return [f, d];
};
function Nce(t, e) {
  return oI(`${t.join("%")}${e}`);
}
function d2(t, e) {
  const n = kS(), r = L(() => t.value.token._tokenKey), i = L(() => [r.value, ...t.value.path]);
  let a = d8;
  return process.env.NODE_ENV !== "production" && n.value.mock !== void 0 && (a = n.value.mock === "client"), gj(
    "style",
    i,
    // Create cache if needed
    () => {
      const {
        path: o,
        hashId: s,
        layer: l,
        nonce: u,
        clientOnly: c,
        order: f = 0
      } = t.value, d = i.value.join("|");
      if (Dce(d)) {
        const [x, C] = Rce(d);
        if (x)
          return [x, r.value, C, {}, c, f];
      }
      const h = e(), {
        hashPriority: p,
        container: v,
        transformers: g,
        linters: m,
        cache: y
      } = n.value, [b, _] = f2(h, {
        hashId: s,
        hashPriority: p,
        layer: l,
        path: o.join("-"),
        transformers: g,
        linters: m
      }), O = h8(b), S = Nce(i.value, O);
      if (a) {
        const x = {
          mark: Hc,
          prepend: "queue",
          attachTo: v,
          priority: f
        }, C = typeof u == "function" ? u() : u;
        C && (x.csp = {
          nonce: C
        });
        const T = Yg(O, S, x);
        T[Nd] = y.instanceId, T.setAttribute(hj, r.value), process.env.NODE_ENV !== "production" && T.setAttribute(Vue, i.value.join("|")), Object.keys(_).forEach((w) => {
          c2.has(w) || (c2.add(w), Yg(h8(_[w]), `_effect-${w}`, {
            mark: Hc,
            prepend: "queue",
            attachTo: v
          }));
        });
      }
      return [O, r.value, S, _, c, f];
    },
    // Remove cache if no need
    (o, s) => {
      let [, , l] = o;
      (s || n.value.autoClear) && d8 && m1(l, {
        mark: Hc
      });
    }
  ), (o) => o;
}
class Ot {
  constructor(e, n) {
    this._keyframe = !0, this.name = e, this.style = n;
  }
  getName() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
    return e ? `${e}-${this.name}` : this.name;
  }
}
const Bce = "4.2.3", b1 = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function Or(t, e) {
  zce(t) && (t = "100%");
  var n = Vce(t);
  return t = e === 360 ? t : Math.min(e, Math.max(0, parseFloat(t))), n && (t = parseInt(String(t * e), 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : (e === 360 ? t = (t < 0 ? t % e + e : t % e) / parseFloat(String(e)) : t = t % e / parseFloat(String(e)), t);
}
function my(t) {
  return Math.min(1, Math.max(0, t));
}
function zce(t) {
  return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
}
function Vce(t) {
  return typeof t == "string" && t.indexOf("%") !== -1;
}
function kj(t) {
  return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
}
function yy(t) {
  return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
}
function Mc(t) {
  return t.length === 1 ? "0" + t : String(t);
}
function Fce(t, e, n) {
  return {
    r: Or(t, 255) * 255,
    g: Or(e, 255) * 255,
    b: Or(n, 255) * 255
  };
}
function p8(t, e, n) {
  t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = 0, s = (r + i) / 2;
  if (r === i)
    o = 0, a = 0;
  else {
    var l = r - i;
    switch (o = s > 0.5 ? l / (2 - r - i) : l / (r + i), r) {
      case t:
        a = (e - n) / l + (e < n ? 6 : 0);
        break;
      case e:
        a = (n - t) / l + 2;
        break;
      case n:
        a = (t - e) / l + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: o, l: s };
}
function eC(t, e, n) {
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * (6 * n) : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
function Wce(t, e, n) {
  var r, i, a;
  if (t = Or(t, 360), e = Or(e, 100), n = Or(n, 100), e === 0)
    i = n, a = n, r = n;
  else {
    var o = n < 0.5 ? n * (1 + e) : n + e - n * e, s = 2 * n - o;
    r = eC(s, o, t + 1 / 3), i = eC(s, o, t), a = eC(s, o, t - 1 / 3);
  }
  return { r: r * 255, g: i * 255, b: a * 255 };
}
function h2(t, e, n) {
  t = Or(t, 255), e = Or(e, 255), n = Or(n, 255);
  var r = Math.max(t, e, n), i = Math.min(t, e, n), a = 0, o = r, s = r - i, l = r === 0 ? 0 : s / r;
  if (r === i)
    a = 0;
  else {
    switch (r) {
      case t:
        a = (e - n) / s + (e < n ? 6 : 0);
        break;
      case e:
        a = (n - t) / s + 2;
        break;
      case n:
        a = (t - e) / s + 4;
        break;
    }
    a /= 6;
  }
  return { h: a, s: l, v: o };
}
function Qce(t, e, n) {
  t = Or(t, 360) * 6, e = Or(e, 100), n = Or(n, 100);
  var r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  return { r: u * 255, g: c * 255, b: f * 255 };
}
function p2(t, e, n, r) {
  var i = [
    Mc(Math.round(t).toString(16)),
    Mc(Math.round(e).toString(16)),
    Mc(Math.round(n).toString(16))
  ];
  return r && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function Hce(t, e, n, r, i) {
  var a = [
    Mc(Math.round(t).toString(16)),
    Mc(Math.round(e).toString(16)),
    Mc(Math.round(n).toString(16)),
    Mc(Gce(r))
  ];
  return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
}
function Gce(t) {
  return Math.round(parseFloat(t) * 255).toString(16);
}
function v8(t) {
  return Mi(t) / 255;
}
function Mi(t) {
  return parseInt(t, 16);
}
function jce(t) {
  return {
    r: t >> 16,
    g: (t & 65280) >> 8,
    b: t & 255
  };
}
var v2 = {
  aliceblue: "#f0f8ff",
  antiquewhite: "#faebd7",
  aqua: "#00ffff",
  aquamarine: "#7fffd4",
  azure: "#f0ffff",
  beige: "#f5f5dc",
  bisque: "#ffe4c4",
  black: "#000000",
  blanchedalmond: "#ffebcd",
  blue: "#0000ff",
  blueviolet: "#8a2be2",
  brown: "#a52a2a",
  burlywood: "#deb887",
  cadetblue: "#5f9ea0",
  chartreuse: "#7fff00",
  chocolate: "#d2691e",
  coral: "#ff7f50",
  cornflowerblue: "#6495ed",
  cornsilk: "#fff8dc",
  crimson: "#dc143c",
  cyan: "#00ffff",
  darkblue: "#00008b",
  darkcyan: "#008b8b",
  darkgoldenrod: "#b8860b",
  darkgray: "#a9a9a9",
  darkgreen: "#006400",
  darkgrey: "#a9a9a9",
  darkkhaki: "#bdb76b",
  darkmagenta: "#8b008b",
  darkolivegreen: "#556b2f",
  darkorange: "#ff8c00",
  darkorchid: "#9932cc",
  darkred: "#8b0000",
  darksalmon: "#e9967a",
  darkseagreen: "#8fbc8f",
  darkslateblue: "#483d8b",
  darkslategray: "#2f4f4f",
  darkslategrey: "#2f4f4f",
  darkturquoise: "#00ced1",
  darkviolet: "#9400d3",
  deeppink: "#ff1493",
  deepskyblue: "#00bfff",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1e90ff",
  firebrick: "#b22222",
  floralwhite: "#fffaf0",
  forestgreen: "#228b22",
  fuchsia: "#ff00ff",
  gainsboro: "#dcdcdc",
  ghostwhite: "#f8f8ff",
  goldenrod: "#daa520",
  gold: "#ffd700",
  gray: "#808080",
  green: "#008000",
  greenyellow: "#adff2f",
  grey: "#808080",
  honeydew: "#f0fff0",
  hotpink: "#ff69b4",
  indianred: "#cd5c5c",
  indigo: "#4b0082",
  ivory: "#fffff0",
  khaki: "#f0e68c",
  lavenderblush: "#fff0f5",
  lavender: "#e6e6fa",
  lawngreen: "#7cfc00",
  lemonchiffon: "#fffacd",
  lightblue: "#add8e6",
  lightcoral: "#f08080",
  lightcyan: "#e0ffff",
  lightgoldenrodyellow: "#fafad2",
  lightgray: "#d3d3d3",
  lightgreen: "#90ee90",
  lightgrey: "#d3d3d3",
  lightpink: "#ffb6c1",
  lightsalmon: "#ffa07a",
  lightseagreen: "#20b2aa",
  lightskyblue: "#87cefa",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#b0c4de",
  lightyellow: "#ffffe0",
  lime: "#00ff00",
  limegreen: "#32cd32",
  linen: "#faf0e6",
  magenta: "#ff00ff",
  maroon: "#800000",
  mediumaquamarine: "#66cdaa",
  mediumblue: "#0000cd",
  mediumorchid: "#ba55d3",
  mediumpurple: "#9370db",
  mediumseagreen: "#3cb371",
  mediumslateblue: "#7b68ee",
  mediumspringgreen: "#00fa9a",
  mediumturquoise: "#48d1cc",
  mediumvioletred: "#c71585",
  midnightblue: "#191970",
  mintcream: "#f5fffa",
  mistyrose: "#ffe4e1",
  moccasin: "#ffe4b5",
  navajowhite: "#ffdead",
  navy: "#000080",
  oldlace: "#fdf5e6",
  olive: "#808000",
  olivedrab: "#6b8e23",
  orange: "#ffa500",
  orangered: "#ff4500",
  orchid: "#da70d6",
  palegoldenrod: "#eee8aa",
  palegreen: "#98fb98",
  paleturquoise: "#afeeee",
  palevioletred: "#db7093",
  papayawhip: "#ffefd5",
  peachpuff: "#ffdab9",
  peru: "#cd853f",
  pink: "#ffc0cb",
  plum: "#dda0dd",
  powderblue: "#b0e0e6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#ff0000",
  rosybrown: "#bc8f8f",
  royalblue: "#4169e1",
  saddlebrown: "#8b4513",
  salmon: "#fa8072",
  sandybrown: "#f4a460",
  seagreen: "#2e8b57",
  seashell: "#fff5ee",
  sienna: "#a0522d",
  silver: "#c0c0c0",
  skyblue: "#87ceeb",
  slateblue: "#6a5acd",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#fffafa",
  springgreen: "#00ff7f",
  steelblue: "#4682b4",
  tan: "#d2b48c",
  teal: "#008080",
  thistle: "#d8bfd8",
  tomato: "#ff6347",
  turquoise: "#40e0d0",
  violet: "#ee82ee",
  wheat: "#f5deb3",
  white: "#ffffff",
  whitesmoke: "#f5f5f5",
  yellow: "#ffff00",
  yellowgreen: "#9acd32"
};
function Cd(t) {
  var e = { r: 0, g: 0, b: 0 }, n = 1, r = null, i = null, a = null, o = !1, s = !1;
  return typeof t == "string" && (t = Xce(t)), typeof t == "object" && (ps(t.r) && ps(t.g) && ps(t.b) ? (e = Fce(t.r, t.g, t.b), o = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : ps(t.h) && ps(t.s) && ps(t.v) ? (r = yy(t.s), i = yy(t.v), e = Qce(t.h, r, i), o = !0, s = "hsv") : ps(t.h) && ps(t.s) && ps(t.l) && (r = yy(t.s), a = yy(t.l), e = Wce(t.h, r, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (n = t.a)), n = kj(n), {
    ok: o,
    format: t.format || s,
    r: Math.min(255, Math.max(e.r, 0)),
    g: Math.min(255, Math.max(e.g, 0)),
    b: Math.min(255, Math.max(e.b, 0)),
    a: n
  };
}
var Zce = "[-\\+]?\\d+%?", Uce = "[-\\+]?\\d*\\.\\d+%?", Il = "(?:".concat(Uce, ")|(?:").concat(Zce, ")"), tC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), nC = "[\\s|\\(]+(".concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")[,|\\s]+(").concat(Il, ")\\s*\\)?"), Qa = {
  CSS_UNIT: new RegExp(Il),
  rgb: new RegExp("rgb" + tC),
  rgba: new RegExp("rgba" + nC),
  hsl: new RegExp("hsl" + tC),
  hsla: new RegExp("hsla" + nC),
  hsv: new RegExp("hsv" + tC),
  hsva: new RegExp("hsva" + nC),
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function Xce(t) {
  if (t = t.trim().toLowerCase(), t.length === 0)
    return !1;
  var e = !1;
  if (v2[t])
    t = v2[t], e = !0;
  else if (t === "transparent")
    return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  var n = Qa.rgb.exec(t);
  return n ? { r: n[1], g: n[2], b: n[3] } : (n = Qa.rgba.exec(t), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Qa.hsl.exec(t), n ? { h: n[1], s: n[2], l: n[3] } : (n = Qa.hsla.exec(t), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Qa.hsv.exec(t), n ? { h: n[1], s: n[2], v: n[3] } : (n = Qa.hsva.exec(t), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Qa.hex8.exec(t), n ? {
    r: Mi(n[1]),
    g: Mi(n[2]),
    b: Mi(n[3]),
    a: v8(n[4]),
    format: e ? "name" : "hex8"
  } : (n = Qa.hex6.exec(t), n ? {
    r: Mi(n[1]),
    g: Mi(n[2]),
    b: Mi(n[3]),
    format: e ? "name" : "hex"
  } : (n = Qa.hex4.exec(t), n ? {
    r: Mi(n[1] + n[1]),
    g: Mi(n[2] + n[2]),
    b: Mi(n[3] + n[3]),
    a: v8(n[4] + n[4]),
    format: e ? "name" : "hex8"
  } : (n = Qa.hex3.exec(t), n ? {
    r: Mi(n[1] + n[1]),
    g: Mi(n[2] + n[2]),
    b: Mi(n[3] + n[3]),
    format: e ? "name" : "hex"
  } : !1)))))))));
}
function ps(t) {
  return !!Qa.CSS_UNIT.exec(String(t));
}
var en = (
  /** @class */
  function() {
    function t(e, n) {
      e === void 0 && (e = ""), n === void 0 && (n = {});
      var r;
      if (e instanceof t)
        return e;
      typeof e == "number" && (e = jce(e)), this.originalInput = e;
      var i = Cd(e);
      this.originalInput = e, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
    }
    return t.prototype.isDark = function() {
      return this.getBrightness() < 128;
    }, t.prototype.isLight = function() {
      return !this.isDark();
    }, t.prototype.getBrightness = function() {
      var e = this.toRgb();
      return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
    }, t.prototype.getLuminance = function() {
      var e = this.toRgb(), n, r, i, a = e.r / 255, o = e.g / 255, s = e.b / 255;
      return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? r = o / 12.92 : r = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * i;
    }, t.prototype.getAlpha = function() {
      return this.a;
    }, t.prototype.setAlpha = function(e) {
      return this.a = kj(e), this.roundA = Math.round(100 * this.a) / 100, this;
    }, t.prototype.isMonochrome = function() {
      var e = this.toHsl().s;
      return e === 0;
    }, t.prototype.toHsv = function() {
      var e = h2(this.r, this.g, this.b);
      return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
    }, t.prototype.toHsvString = function() {
      var e = h2(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.v * 100);
      return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, t.prototype.toHsl = function() {
      var e = p8(this.r, this.g, this.b);
      return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
    }, t.prototype.toHslString = function() {
      var e = p8(this.r, this.g, this.b), n = Math.round(e.h * 360), r = Math.round(e.s * 100), i = Math.round(e.l * 100);
      return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(i, "%, ").concat(this.roundA, ")");
    }, t.prototype.toHex = function(e) {
      return e === void 0 && (e = !1), p2(this.r, this.g, this.b, e);
    }, t.prototype.toHexString = function(e) {
      return e === void 0 && (e = !1), "#" + this.toHex(e);
    }, t.prototype.toHex8 = function(e) {
      return e === void 0 && (e = !1), Hce(this.r, this.g, this.b, this.a, e);
    }, t.prototype.toHex8String = function(e) {
      return e === void 0 && (e = !1), "#" + this.toHex8(e);
    }, t.prototype.toHexShortString = function(e) {
      return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
    }, t.prototype.toRgb = function() {
      return {
        r: Math.round(this.r),
        g: Math.round(this.g),
        b: Math.round(this.b),
        a: this.a
      };
    }, t.prototype.toRgbString = function() {
      var e = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
      return this.a === 1 ? "rgb(".concat(e, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(e, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
    }, t.prototype.toPercentageRgb = function() {
      var e = function(n) {
        return "".concat(Math.round(Or(n, 255) * 100), "%");
      };
      return {
        r: e(this.r),
        g: e(this.g),
        b: e(this.b),
        a: this.a
      };
    }, t.prototype.toPercentageRgbString = function() {
      var e = function(n) {
        return Math.round(Or(n, 255) * 100);
      };
      return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
    }, t.prototype.toName = function() {
      if (this.a === 0)
        return "transparent";
      if (this.a < 1)
        return !1;
      for (var e = "#" + p2(this.r, this.g, this.b, !1), n = 0, r = Object.entries(v2); n < r.length; n++) {
        var i = r[n], a = i[0], o = i[1];
        if (e === o)
          return a;
      }
      return !1;
    }, t.prototype.toString = function(e) {
      var n = !!e;
      e = e ?? this.format;
      var r = !1, i = this.a < 1 && this.a >= 0, a = !n && i && (e.startsWith("hex") || e === "name");
      return a ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (r = this.toRgbString()), e === "prgb" && (r = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (r = this.toHexString()), e === "hex3" && (r = this.toHexString(!0)), e === "hex4" && (r = this.toHex8String(!0)), e === "hex8" && (r = this.toHex8String()), e === "name" && (r = this.toName()), e === "hsl" && (r = this.toHslString()), e === "hsv" && (r = this.toHsvString()), r || this.toHexString());
    }, t.prototype.toNumber = function() {
      return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
    }, t.prototype.clone = function() {
      return new t(this.toString());
    }, t.prototype.lighten = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.l += e / 100, n.l = my(n.l), new t(n);
    }, t.prototype.brighten = function(e) {
      e === void 0 && (e = 10);
      var n = this.toRgb();
      return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(e / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(e / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(e / 100)))), new t(n);
    }, t.prototype.darken = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.l -= e / 100, n.l = my(n.l), new t(n);
    }, t.prototype.tint = function(e) {
      return e === void 0 && (e = 10), this.mix("white", e);
    }, t.prototype.shade = function(e) {
      return e === void 0 && (e = 10), this.mix("black", e);
    }, t.prototype.desaturate = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.s -= e / 100, n.s = my(n.s), new t(n);
    }, t.prototype.saturate = function(e) {
      e === void 0 && (e = 10);
      var n = this.toHsl();
      return n.s += e / 100, n.s = my(n.s), new t(n);
    }, t.prototype.greyscale = function() {
      return this.desaturate(100);
    }, t.prototype.spin = function(e) {
      var n = this.toHsl(), r = (n.h + e) % 360;
      return n.h = r < 0 ? 360 + r : r, new t(n);
    }, t.prototype.mix = function(e, n) {
      n === void 0 && (n = 50);
      var r = this.toRgb(), i = new t(e).toRgb(), a = n / 100, o = {
        r: (i.r - r.r) * a + r.r,
        g: (i.g - r.g) * a + r.g,
        b: (i.b - r.b) * a + r.b,
        a: (i.a - r.a) * a + r.a
      };
      return new t(o);
    }, t.prototype.analogous = function(e, n) {
      e === void 0 && (e = 6), n === void 0 && (n = 30);
      var r = this.toHsl(), i = 360 / n, a = [this];
      for (r.h = (r.h - (i * e >> 1) + 720) % 360; --e; )
        r.h = (r.h + i) % 360, a.push(new t(r));
      return a;
    }, t.prototype.complement = function() {
      var e = this.toHsl();
      return e.h = (e.h + 180) % 360, new t(e);
    }, t.prototype.monochromatic = function(e) {
      e === void 0 && (e = 6);
      for (var n = this.toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / e; e--; )
        o.push(new t({ h: r, s: i, v: a })), a = (a + s) % 1;
      return o;
    }, t.prototype.splitcomplement = function() {
      var e = this.toHsl(), n = e.h;
      return [
        this,
        new t({ h: (n + 72) % 360, s: e.s, l: e.l }),
        new t({ h: (n + 216) % 360, s: e.s, l: e.l })
      ];
    }, t.prototype.onBackground = function(e) {
      var n = this.toRgb(), r = new t(e).toRgb(), i = n.a + r.a * (1 - n.a);
      return new t({
        r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
        g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
        b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
        a: i
      });
    }, t.prototype.triad = function() {
      return this.polyad(3);
    }, t.prototype.tetrad = function() {
      return this.polyad(4);
    }, t.prototype.polyad = function(e) {
      for (var n = this.toHsl(), r = n.h, i = [this], a = 360 / e, o = 1; o < e; o++)
        i.push(new t({ h: (r + o * a) % 360, s: n.s, l: n.l }));
      return i;
    }, t.prototype.equals = function(e) {
      return this.toRgbString() === new t(e).toRgbString();
    }, t;
  }()
), by = 2, g8 = 0.16, Yce = 0.05, qce = 0.05, Kce = 0.15, Lj = 5, Nj = 4, Jce = [{
  index: 7,
  opacity: 0.15
}, {
  index: 6,
  opacity: 0.25
}, {
  index: 5,
  opacity: 0.3
}, {
  index: 5,
  opacity: 0.45
}, {
  index: 5,
  opacity: 0.65
}, {
  index: 5,
  opacity: 0.85
}, {
  index: 4,
  opacity: 0.9
}, {
  index: 3,
  opacity: 0.95
}, {
  index: 2,
  opacity: 0.97
}, {
  index: 1,
  opacity: 0.98
}];
function m8(t) {
  var e = t.r, n = t.g, r = t.b, i = h2(e, n, r);
  return {
    h: i.h * 360,
    s: i.s,
    v: i.v
  };
}
function _y(t) {
  var e = t.r, n = t.g, r = t.b;
  return "#".concat(p2(e, n, r, !1));
}
function efe(t, e, n) {
  var r = n / 100, i = {
    r: (e.r - t.r) * r + t.r,
    g: (e.g - t.g) * r + t.g,
    b: (e.b - t.b) * r + t.b
  };
  return i;
}
function y8(t, e, n) {
  var r;
  return Math.round(t.h) >= 60 && Math.round(t.h) <= 240 ? r = n ? Math.round(t.h) - by * e : Math.round(t.h) + by * e : r = n ? Math.round(t.h) + by * e : Math.round(t.h) - by * e, r < 0 ? r += 360 : r >= 360 && (r -= 360), r;
}
function b8(t, e, n) {
  if (t.h === 0 && t.s === 0)
    return t.s;
  var r;
  return n ? r = t.s - g8 * e : e === Nj ? r = t.s + g8 : r = t.s + Yce * e, r > 1 && (r = 1), n && e === Lj && r > 0.1 && (r = 0.1), r < 0.06 && (r = 0.06), Number(r.toFixed(2));
}
function _8(t, e, n) {
  var r;
  return n ? r = t.v + qce * e : r = t.v - Kce * e, r > 1 && (r = 1), Number(r.toFixed(2));
}
function ff(t) {
  for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = [], r = Cd(t), i = Lj; i > 0; i -= 1) {
    var a = m8(r), o = _y(Cd({
      h: y8(a, i, !0),
      s: b8(a, i, !0),
      v: _8(a, i, !0)
    }));
    n.push(o);
  }
  n.push(_y(r));
  for (var s = 1; s <= Nj; s += 1) {
    var l = m8(r), u = _y(Cd({
      h: y8(l, s),
      s: b8(l, s),
      v: _8(l, s)
    }));
    n.push(u);
  }
  return e.theme === "dark" ? Jce.map(function(c) {
    var f = c.index, d = c.opacity, h = _y(efe(Cd(e.backgroundColor || "#141414"), Cd(n[f]), d * 100));
    return h;
  }) : n;
}
var rC = {
  red: "#F5222D",
  volcano: "#FA541C",
  orange: "#FA8C16",
  gold: "#FAAD14",
  yellow: "#FADB14",
  lime: "#A0D911",
  green: "#52C41A",
  cyan: "#13C2C2",
  blue: "#1890FF",
  geekblue: "#2F54EB",
  purple: "#722ED1",
  magenta: "#EB2F96",
  grey: "#666666"
}, O_ = {}, iC = {};
Object.keys(rC).forEach(function(t) {
  O_[t] = ff(rC[t]), O_[t].primary = O_[t][5], iC[t] = ff(rC[t], {
    theme: "dark",
    backgroundColor: "#141414"
  }), iC[t].primary = iC[t][5];
});
var tfe = O_.blue;
const nfe = (t) => {
  const {
    controlHeight: e
  } = t;
  return {
    controlHeightSM: e * 0.75,
    controlHeightXS: e * 0.5,
    controlHeightLG: e * 1.25
  };
};
function rfe(t) {
  const {
    sizeUnit: e,
    sizeStep: n
  } = t;
  return {
    sizeXXL: e * (n + 8),
    sizeXL: e * (n + 4),
    sizeLG: e * (n + 2),
    sizeMD: e * (n + 1),
    sizeMS: e * n,
    size: e * n,
    sizeSM: e * (n - 1),
    sizeXS: e * (n - 2),
    sizeXXS: e * (n - 3)
    // 4
  };
}
const Bj = {
  blue: "#1677ff",
  purple: "#722ED1",
  cyan: "#13C2C2",
  green: "#52C41A",
  magenta: "#EB2F96",
  pink: "#eb2f96",
  red: "#F5222D",
  orange: "#FA8C16",
  yellow: "#FADB14",
  volcano: "#FA541C",
  geekblue: "#2F54EB",
  gold: "#FAAD14",
  lime: "#A0D911"
}, zS = I(I({}, Bj), {
  // Color
  colorPrimary: "#1677ff",
  colorSuccess: "#52c41a",
  colorWarning: "#faad14",
  colorError: "#ff4d4f",
  colorInfo: "#1677ff",
  colorTextBase: "",
  colorBgBase: "",
  // Font
  fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
  fontSize: 14,
  // Line
  lineWidth: 1,
  lineType: "solid",
  // Motion
  motionUnit: 0.1,
  motionBase: 0,
  motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
  motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
  motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
  motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
  motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
  motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
  motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
  motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
  // Radius
  borderRadius: 6,
  // Size
  sizeUnit: 4,
  sizeStep: 4,
  sizePopupArrow: 16,
  // Control Base
  controlHeight: 32,
  // zIndex
  zIndexBase: 0,
  zIndexPopupBase: 1e3,
  // Image
  opacityImage: 1,
  // Wireframe
  wireframe: !1
});
function ife(t, e) {
  let {
    generateColorPalettes: n,
    generateNeutralColorPalettes: r
  } = e;
  const {
    colorSuccess: i,
    colorWarning: a,
    colorError: o,
    colorInfo: s,
    colorPrimary: l,
    colorBgBase: u,
    colorTextBase: c
  } = t, f = n(l), d = n(i), h = n(a), p = n(o), v = n(s), g = r(u, c);
  return I(I({}, g), {
    colorPrimaryBg: f[1],
    colorPrimaryBgHover: f[2],
    colorPrimaryBorder: f[3],
    colorPrimaryBorderHover: f[4],
    colorPrimaryHover: f[5],
    colorPrimary: f[6],
    colorPrimaryActive: f[7],
    colorPrimaryTextHover: f[8],
    colorPrimaryText: f[9],
    colorPrimaryTextActive: f[10],
    colorSuccessBg: d[1],
    colorSuccessBgHover: d[2],
    colorSuccessBorder: d[3],
    colorSuccessBorderHover: d[4],
    colorSuccessHover: d[4],
    colorSuccess: d[6],
    colorSuccessActive: d[7],
    colorSuccessTextHover: d[8],
    colorSuccessText: d[9],
    colorSuccessTextActive: d[10],
    colorErrorBg: p[1],
    colorErrorBgHover: p[2],
    colorErrorBorder: p[3],
    colorErrorBorderHover: p[4],
    colorErrorHover: p[5],
    colorError: p[6],
    colorErrorActive: p[7],
    colorErrorTextHover: p[8],
    colorErrorText: p[9],
    colorErrorTextActive: p[10],
    colorWarningBg: h[1],
    colorWarningBgHover: h[2],
    colorWarningBorder: h[3],
    colorWarningBorderHover: h[4],
    colorWarningHover: h[4],
    colorWarning: h[6],
    colorWarningActive: h[7],
    colorWarningTextHover: h[8],
    colorWarningText: h[9],
    colorWarningTextActive: h[10],
    colorInfoBg: v[1],
    colorInfoBgHover: v[2],
    colorInfoBorder: v[3],
    colorInfoBorderHover: v[4],
    colorInfoHover: v[4],
    colorInfo: v[6],
    colorInfoActive: v[7],
    colorInfoTextHover: v[8],
    colorInfoText: v[9],
    colorInfoTextActive: v[10],
    colorBgMask: new en("#000").setAlpha(0.45).toRgbString(),
    colorWhite: "#fff"
  });
}
const afe = (t) => {
  let e = t, n = t, r = t, i = t;
  return t < 6 && t >= 5 ? e = t + 1 : t < 16 && t >= 6 ? e = t + 2 : t >= 16 && (e = 16), t < 7 && t >= 5 ? n = 4 : t < 8 && t >= 7 ? n = 5 : t < 14 && t >= 8 ? n = 6 : t < 16 && t >= 14 ? n = 7 : t >= 16 && (n = 8), t < 6 && t >= 2 ? r = 1 : t >= 6 && (r = 2), t > 4 && t < 8 ? i = 4 : t >= 8 && (i = 6), {
    borderRadius: t > 16 ? 16 : t,
    borderRadiusXS: r,
    borderRadiusSM: n,
    borderRadiusLG: e,
    borderRadiusOuter: i
  };
};
function ofe(t) {
  const {
    motionUnit: e,
    motionBase: n,
    borderRadius: r,
    lineWidth: i
  } = t;
  return I({
    // motion
    motionDurationFast: `${(n + e).toFixed(1)}s`,
    motionDurationMid: `${(n + e * 2).toFixed(1)}s`,
    motionDurationSlow: `${(n + e * 3).toFixed(1)}s`,
    // line
    lineWidthBold: i + 1
  }, afe(r));
}
const vs = (t, e) => new en(t).setAlpha(e).toRgbString(), Qp = (t, e) => new en(t).darken(e).toHexString(), sfe = (t) => {
  const e = ff(t);
  return {
    1: e[0],
    2: e[1],
    3: e[2],
    4: e[3],
    5: e[4],
    6: e[5],
    7: e[6],
    8: e[4],
    9: e[5],
    10: e[6]
    // 8: colors[7],
    // 9: colors[8],
    // 10: colors[9],
  };
}, lfe = (t, e) => {
  const n = t || "#fff", r = e || "#000";
  return {
    colorBgBase: n,
    colorTextBase: r,
    colorText: vs(r, 0.88),
    colorTextSecondary: vs(r, 0.65),
    colorTextTertiary: vs(r, 0.45),
    colorTextQuaternary: vs(r, 0.25),
    colorFill: vs(r, 0.15),
    colorFillSecondary: vs(r, 0.06),
    colorFillTertiary: vs(r, 0.04),
    colorFillQuaternary: vs(r, 0.02),
    colorBgLayout: Qp(n, 4),
    colorBgContainer: Qp(n, 0),
    colorBgElevated: Qp(n, 0),
    colorBgSpotlight: vs(r, 0.85),
    colorBorder: Qp(n, 15),
    colorBorderSecondary: Qp(n, 6)
  };
};
function ufe(t) {
  const e = new Array(10).fill(null).map((n, r) => {
    const i = r - 1, a = t * Math.pow(2.71828, i / 5), o = r > 1 ? Math.floor(a) : Math.ceil(a);
    return Math.floor(o / 2) * 2;
  });
  return e[1] = t, e.map((n) => {
    const r = n + 8;
    return {
      size: n,
      lineHeight: r / n
    };
  });
}
const cfe = (t) => {
  const e = ufe(t), n = e.map((i) => i.size), r = e.map((i) => i.lineHeight);
  return {
    fontSizeSM: n[0],
    fontSize: n[1],
    fontSizeLG: n[2],
    fontSizeXL: n[3],
    fontSizeHeading1: n[6],
    fontSizeHeading2: n[5],
    fontSizeHeading3: n[4],
    fontSizeHeading4: n[3],
    fontSizeHeading5: n[2],
    lineHeight: r[1],
    lineHeightLG: r[2],
    lineHeightSM: r[0],
    lineHeightHeading1: r[6],
    lineHeightHeading2: r[5],
    lineHeightHeading3: r[4],
    lineHeightHeading4: r[3],
    lineHeightHeading5: r[2]
  };
};
function ffe(t) {
  const e = Object.keys(Bj).map((n) => {
    const r = ff(t[n]);
    return new Array(10).fill(1).reduce((i, a, o) => (i[`${n}-${o + 1}`] = r[o], i), {});
  }).reduce((n, r) => (n = I(I({}, n), r), n), {});
  return I(I(I(I(I(I(I({}, t), e), ife(t, {
    generateColorPalettes: sfe,
    generateNeutralColorPalettes: lfe
  })), cfe(t.fontSize)), rfe(t)), nfe(t)), ofe(t));
}
function aC(t) {
  return t >= 0 && t <= 255;
}
function Oy(t, e) {
  const {
    r: n,
    g: r,
    b: i,
    a
  } = new en(t).toRgb();
  if (a < 1)
    return t;
  const {
    r: o,
    g: s,
    b: l
  } = new en(e).toRgb();
  for (let u = 0.01; u <= 1; u += 0.01) {
    const c = Math.round((n - o * (1 - u)) / u), f = Math.round((r - s * (1 - u)) / u), d = Math.round((i - l * (1 - u)) / u);
    if (aC(c) && aC(f) && aC(d))
      return new en({
        r: c,
        g: f,
        b: d,
        a: Math.round(u * 100) / 100
      }).toRgbString();
  }
  return new en({
    r: n,
    g: r,
    b: i,
    a: 1
  }).toRgbString();
}
var dfe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function hfe(t) {
  const {
    override: e
  } = t, n = dfe(t, ["override"]), r = I({}, e);
  Object.keys(zS).forEach((h) => {
    delete r[h];
  });
  const i = I(I({}, n), r), a = 480, o = 576, s = 768, l = 992, u = 1200, c = 1600, f = 2e3;
  return I(I(I({}, i), {
    colorLink: i.colorInfoText,
    colorLinkHover: i.colorInfoHover,
    colorLinkActive: i.colorInfoActive,
    // ============== Background ============== //
    colorFillContent: i.colorFillSecondary,
    colorFillContentHover: i.colorFill,
    colorFillAlter: i.colorFillQuaternary,
    colorBgContainerDisabled: i.colorFillTertiary,
    // ============== Split ============== //
    colorBorderBg: i.colorBgContainer,
    colorSplit: Oy(i.colorBorderSecondary, i.colorBgContainer),
    // ============== Text ============== //
    colorTextPlaceholder: i.colorTextQuaternary,
    colorTextDisabled: i.colorTextQuaternary,
    colorTextHeading: i.colorText,
    colorTextLabel: i.colorTextSecondary,
    colorTextDescription: i.colorTextTertiary,
    colorTextLightSolid: i.colorWhite,
    colorHighlight: i.colorError,
    colorBgTextHover: i.colorFillSecondary,
    colorBgTextActive: i.colorFill,
    colorIcon: i.colorTextTertiary,
    colorIconHover: i.colorText,
    colorErrorOutline: Oy(i.colorErrorBg, i.colorBgContainer),
    colorWarningOutline: Oy(i.colorWarningBg, i.colorBgContainer),
    // Font
    fontSizeIcon: i.fontSizeSM,
    // Control
    lineWidth: i.lineWidth,
    controlOutlineWidth: i.lineWidth * 2,
    // Checkbox size and expand icon size
    controlInteractiveSize: i.controlHeight / 2,
    controlItemBgHover: i.colorFillTertiary,
    controlItemBgActive: i.colorPrimaryBg,
    controlItemBgActiveHover: i.colorPrimaryBgHover,
    controlItemBgActiveDisabled: i.colorFill,
    controlTmpOutline: i.colorFillQuaternary,
    controlOutline: Oy(i.colorPrimaryBg, i.colorBgContainer),
    lineType: i.lineType,
    borderRadius: i.borderRadius,
    borderRadiusXS: i.borderRadiusXS,
    borderRadiusSM: i.borderRadiusSM,
    borderRadiusLG: i.borderRadiusLG,
    fontWeightStrong: 600,
    opacityLoading: 0.65,
    linkDecoration: "none",
    linkHoverDecoration: "none",
    linkFocusDecoration: "none",
    controlPaddingHorizontal: 12,
    controlPaddingHorizontalSM: 8,
    paddingXXS: i.sizeXXS,
    paddingXS: i.sizeXS,
    paddingSM: i.sizeSM,
    padding: i.size,
    paddingMD: i.sizeMD,
    paddingLG: i.sizeLG,
    paddingXL: i.sizeXL,
    paddingContentHorizontalLG: i.sizeLG,
    paddingContentVerticalLG: i.sizeMS,
    paddingContentHorizontal: i.sizeMS,
    paddingContentVertical: i.sizeSM,
    paddingContentHorizontalSM: i.size,
    paddingContentVerticalSM: i.sizeXS,
    marginXXS: i.sizeXXS,
    marginXS: i.sizeXS,
    marginSM: i.sizeSM,
    margin: i.size,
    marginMD: i.sizeMD,
    marginLG: i.sizeLG,
    marginXL: i.sizeXL,
    marginXXL: i.sizeXXL,
    boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
    screenXS: a,
    screenXSMin: a,
    screenXSMax: o - 1,
    screenSM: o,
    screenSMMin: o,
    screenSMMax: s - 1,
    screenMD: s,
    screenMDMin: s,
    screenMDMax: l - 1,
    screenLG: l,
    screenLGMin: l,
    screenLGMax: u - 1,
    screenXL: u,
    screenXLMin: u,
    screenXLMax: c - 1,
    screenXXL: c,
    screenXXLMin: c,
    screenXXLMax: f - 1,
    screenXXXL: f,
    screenXXXLMin: f,
    // FIXME: component box-shadow, should be removed
    boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
    boxShadowCard: `
      0 1px 2px -2px ${new en("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new en("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new en("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
    boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
    boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
    boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
  }), r);
}
const pfe = (t, e, n, r, i) => {
  const a = t / 2, o = 0, s = a, l = n * 1 / Math.sqrt(2), u = a - n * (1 - 1 / Math.sqrt(2)), c = a - e * (1 / Math.sqrt(2)), f = n * (Math.sqrt(2) - 1) + e * (1 / Math.sqrt(2)), d = 2 * a - c, h = f, p = 2 * a - l, v = u, g = 2 * a - o, m = s, y = a * Math.sqrt(2) + n * (Math.sqrt(2) - 2), b = n * (Math.sqrt(2) - 1);
  return {
    pointerEvents: "none",
    width: t,
    height: t,
    overflow: "hidden",
    "&::after": {
      content: '""',
      position: "absolute",
      width: y,
      height: y,
      bottom: 0,
      insetInline: 0,
      margin: "auto",
      borderRadius: {
        _skip_check_: !0,
        value: `0 0 ${e}px 0`
      },
      transform: "translateY(50%) rotate(-135deg)",
      boxShadow: i,
      zIndex: 0,
      background: "transparent"
    },
    "&::before": {
      position: "absolute",
      bottom: 0,
      insetInlineStart: 0,
      width: t,
      height: t / 2,
      background: r,
      clipPath: {
        _multi_value_: !0,
        value: [`polygon(${b}px 100%, 50% ${b}px, ${2 * a - b}px 100%, ${b}px 100%)`, `path('M ${o} ${s} A ${n} ${n} 0 0 0 ${l} ${u} L ${c} ${f} A ${e} ${e} 0 0 1 ${d} ${h} L ${p} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`]
      },
      content: '""'
    }
  };
};
function vfe(t, e) {
  return b1.reduce((n, r) => {
    const i = t[`${r}-1`], a = t[`${r}-3`], o = t[`${r}-6`], s = t[`${r}-7`];
    return I(I({}, n), e(r, {
      lightColor: i,
      lightBorderColor: a,
      darkColor: o,
      textColor: s
    }));
  }, {});
}
const mh = {
  overflow: "hidden",
  whiteSpace: "nowrap",
  textOverflow: "ellipsis"
}, nn = (t) => ({
  boxSizing: "border-box",
  margin: 0,
  padding: 0,
  color: t.colorText,
  fontSize: t.fontSize,
  // font-variant: @font-variant-base;
  lineHeight: t.lineHeight,
  listStyle: "none",
  // font-feature-settings: @font-feature-settings-base;
  fontFamily: t.fontFamily
}), ip = () => ({
  display: "inline-flex",
  alignItems: "center",
  color: "inherit",
  fontStyle: "normal",
  lineHeight: 0,
  textAlign: "center",
  textTransform: "none",
  // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
  verticalAlign: "-0.125em",
  textRendering: "optimizeLegibility",
  "-webkit-font-smoothing": "antialiased",
  "-moz-osx-font-smoothing": "grayscale",
  "> *": {
    lineHeight: 1
  },
  svg: {
    display: "inline-block"
  }
}), _1 = () => ({
  // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
  "&::before": {
    display: "table",
    content: '""'
  },
  "&::after": {
    // https://github.com/ant-design/ant-design/issues/21864
    display: "table",
    clear: "both",
    content: '""'
  }
}), gfe = (t) => ({
  a: {
    color: t.colorLink,
    textDecoration: t.linkDecoration,
    backgroundColor: "transparent",
    outline: "none",
    cursor: "pointer",
    transition: `color ${t.motionDurationSlow}`,
    "-webkit-text-decoration-skip": "objects",
    "&:hover": {
      color: t.colorLinkHover
    },
    "&:active": {
      color: t.colorLinkActive
    },
    "&:active,\n  &:hover": {
      textDecoration: t.linkHoverDecoration,
      outline: 0
    },
    // https://github.com/ant-design/ant-design/issues/22503
    "&:focus": {
      textDecoration: t.linkFocusDecoration,
      outline: 0
    },
    "&[disabled]": {
      color: t.colorTextDisabled,
      cursor: "not-allowed"
    }
  }
}), mfe = (t, e) => {
  const {
    fontFamily: n,
    fontSize: r
  } = t, i = `[class^="${e}"], [class*=" ${e}"]`;
  return {
    [i]: {
      fontFamily: n,
      fontSize: r,
      boxSizing: "border-box",
      "&::before, &::after": {
        boxSizing: "border-box"
      },
      [i]: {
        boxSizing: "border-box",
        "&::before, &::after": {
          boxSizing: "border-box"
        }
      }
    }
  };
}, d0 = (t) => ({
  outline: `${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,
  outlineOffset: 1,
  transition: "outline-offset 0s, outline 0s"
}), VS = (t) => ({
  "&:focus-visible": I({}, d0(t))
});
function Sn(t, e, n) {
  return (r) => {
    const i = L(() => r == null ? void 0 : r.value), [a, o, s] = ap(), {
      getPrefixCls: l,
      iconPrefixCls: u
    } = DS(), c = L(() => l()), f = L(() => ({
      theme: a.value,
      token: o.value,
      hashId: s.value,
      path: ["Shared", c.value]
    }));
    d2(f, () => [{
      // Link
      "&": gfe(o.value)
    }]);
    const d = L(() => ({
      theme: a.value,
      token: o.value,
      hashId: s.value,
      path: [t, i.value, u.value]
    }));
    return [d2(d, () => {
      const {
        token: h,
        flush: p
      } = bfe(o.value), v = typeof n == "function" ? n(h) : n, g = I(I({}, v), o.value[t]), m = `.${i.value}`, y = Bt(h, {
        componentCls: m,
        prefixCls: i.value,
        iconCls: `.${u.value}`,
        antCls: `.${c.value}`
      }, g), b = e(y, {
        hashId: s.value,
        prefixCls: i.value,
        rootPrefixCls: c.value,
        iconPrefixCls: u.value,
        overrideComponentToken: o.value[t]
      });
      return p(t, g), [mfe(o.value, i.value), b];
    }), s];
  };
}
const zj = process.env.NODE_ENV !== "production" || typeof CSSINJS_STATISTIC < "u";
let g2 = !0;
function Bt() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  if (!zj)
    return I({}, ...e);
  g2 = !1;
  const r = {};
  return e.forEach((i) => {
    Object.keys(i).forEach((o) => {
      Object.defineProperty(r, o, {
        configurable: !0,
        enumerable: !0,
        get: () => i[o]
      });
    });
  }), g2 = !0, r;
}
function yfe() {
}
function bfe(t) {
  let e, n = t, r = yfe;
  return zj && (e = /* @__PURE__ */ new Set(), n = new Proxy(t, {
    get(i, a) {
      return g2 && e.add(a), i[a];
    }
  }), r = (i, a) => {
    Array.from(e);
  }), {
    token: n,
    keys: e,
    flush: r
  };
}
const _fe = xj(ffe), Vj = {
  token: zS,
  hashed: !0
}, Fj = Symbol("DesignTokenContext"), m2 = ae(), Ofe = (t) => {
  pt(Fj, t), se(t, () => {
    m2.value = B(t), zle(m2);
  }, {
    immediate: !0,
    deep: !0
  });
}, Sfe = te({
  props: {
    value: $t()
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return Ofe(L(() => t.value)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function ap() {
  const t = Ge(Fj, L(() => m2.value || Vj)), e = L(() => `${Bce}-${t.value.hashed || ""}`), n = L(() => t.value.theme || _fe), r = fce(n, L(() => [zS, t.value.token]), L(() => ({
    salt: e.value,
    override: I({
      override: t.value.token
    }, t.value.components),
    formatToken: hfe
  })));
  return [n, L(() => r.value[0]), L(() => t.value.hashed ? r.value[1] : "")];
}
const Wj = te({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, t] = ap(), e = L(() => new en(t.value.colorBgBase).toHsl().l < 0.5 ? {
      opacity: 0.65
    } : {});
    return () => M("svg", {
      style: e.value,
      width: "184",
      height: "152",
      viewBox: "0 0 184 152",
      xmlns: "http://www.w3.org/2000/svg"
    }, [M("g", {
      fill: "none",
      "fill-rule": "evenodd"
    }, [M("g", {
      transform: "translate(24 31.67)"
    }, [M("ellipse", {
      "fill-opacity": ".8",
      fill: "#F5F5F7",
      cx: "67.797",
      cy: "106.89",
      rx: "67.797",
      ry: "12.668"
    }, null), M("path", {
      d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
      fill: "#AEB8C2"
    }, null), M("path", {
      d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
      fill: "url(#linearGradient-1)",
      transform: "translate(13.56)"
    }, null), M("path", {
      d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
      fill: "#F5F5F7"
    }, null), M("path", {
      d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
      fill: "#DCE0E6"
    }, null)]), M("path", {
      d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
      fill: "#DCE0E6"
    }, null), M("g", {
      transform: "translate(149.65 15.383)",
      fill: "#FFF"
    }, [M("ellipse", {
      cx: "20.654",
      cy: "3.167",
      rx: "2.849",
      ry: "2.815"
    }, null), M("path", {
      d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
    }, null)])])]);
  }
});
Wj.PRESENTED_IMAGE_DEFAULT = !0;
const Qj = te({
  compatConfig: {
    MODE: 3
  },
  setup() {
    const [, t] = ap(), e = L(() => {
      const {
        colorFill: n,
        colorFillTertiary: r,
        colorFillQuaternary: i,
        colorBgContainer: a
      } = t.value;
      return {
        borderColor: new en(n).onBackground(a).toHexString(),
        shadowColor: new en(r).onBackground(a).toHexString(),
        contentColor: new en(i).onBackground(a).toHexString()
      };
    });
    return () => M("svg", {
      width: "64",
      height: "41",
      viewBox: "0 0 64 41",
      xmlns: "http://www.w3.org/2000/svg"
    }, [M("g", {
      transform: "translate(0 1)",
      fill: "none",
      "fill-rule": "evenodd"
    }, [M("ellipse", {
      fill: e.value.shadowColor,
      cx: "32",
      cy: "33",
      rx: "32",
      ry: "7"
    }, null), M("g", {
      "fill-rule": "nonzero",
      stroke: e.value.borderColor
    }, [M("path", {
      d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
    }, null), M("path", {
      d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
      fill: e.value.contentColor
    }, null)])])]);
  }
});
Qj.PRESENTED_IMAGE_SIMPLE = !0;
const xfe = (t) => {
  const {
    componentCls: e,
    margin: n,
    marginXS: r,
    marginXL: i,
    fontSize: a,
    lineHeight: o
  } = t;
  return {
    [e]: {
      marginInline: r,
      fontSize: a,
      lineHeight: o,
      textAlign: "center",
      // 原来 &-image 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${e}-image`]: {
        height: t.emptyImgHeight,
        marginBottom: r,
        opacity: t.opacityImage,
        img: {
          height: "100%"
        },
        svg: {
          height: "100%",
          margin: "auto"
        }
      },
      // 原来 &-footer 没有父子结构，现在为了外层承担我们的hashId，改成父子结果
      [`${e}-footer`]: {
        marginTop: n
      },
      "&-normal": {
        marginBlock: i,
        color: t.colorTextDisabled,
        [`${e}-image`]: {
          height: t.emptyImgHeightMD
        }
      },
      "&-small": {
        marginBlock: r,
        color: t.colorTextDisabled,
        [`${e}-image`]: {
          height: t.emptyImgHeightSM
        }
      }
    }
  };
}, wfe = Sn("Empty", (t) => {
  const {
    componentCls: e,
    controlHeightLG: n
  } = t, r = Bt(t, {
    emptyImgCls: `${e}-img`,
    emptyImgHeight: n * 2.5,
    emptyImgHeightMD: n,
    emptyImgHeightSM: n * 0.875
  });
  return [xfe(r)];
});
var Cfe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Hj = M(Wj, null, null), Gj = M(Qj, null, null), Tfe = () => ({
  prefixCls: String,
  imageStyle: $t(),
  image: fa(),
  description: fa()
}), uI = te({
  name: "AEmpty",
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: Tfe(),
  setup(t, e) {
    let {
      slots: n = {},
      attrs: r
    } = e;
    const {
      direction: i,
      prefixCls: a
    } = It("empty", t), [o, s] = wfe(a);
    return () => {
      var l, u;
      const c = a.value, f = I(I({}, t), r), {
        image: d = ((l = n.image) === null || l === void 0 ? void 0 : l.call(n)) || Hj,
        description: h = ((u = n.description) === null || u === void 0 ? void 0 : u.call(n)) || void 0,
        imageStyle: p,
        class: v = ""
      } = f, g = Cfe(f, ["image", "description", "imageStyle", "class"]);
      return o(M(dj, {
        componentName: "Empty",
        children: (m) => {
          const y = typeof h < "u" ? h : m.description, b = typeof y == "string" ? y : "empty";
          let _ = null;
          return typeof d == "string" ? _ = M("img", {
            alt: b,
            src: d
          }, null) : _ = d, M("div", j({
            class: ye(c, v, s.value, {
              [`${c}-normal`]: d === Gj,
              [`${c}-rtl`]: i.value === "rtl"
            })
          }, g), [M("div", {
            class: `${c}-image`,
            style: p
          }, [_]), y && M("p", {
            class: `${c}-description`
          }, [y]), n.default && M("div", {
            class: `${c}-footer`
          }, [os(n.default())])]);
        }
      }, null));
    };
  }
});
uI.PRESENTED_IMAGE_DEFAULT = Hj;
uI.PRESENTED_IMAGE_SIMPLE = Gj;
const Hp = np(uI), cI = (t) => {
  const {
    prefixCls: e
  } = It("empty", t);
  return ((r) => {
    switch (r) {
      case "Table":
      case "List":
        return M(Hp, {
          image: Hp.PRESENTED_IMAGE_SIMPLE
        }, null);
      case "Select":
      case "TreeSelect":
      case "Cascader":
      case "Transfer":
      case "Mentions":
        return M(Hp, {
          image: Hp.PRESENTED_IMAGE_SIMPLE,
          class: `${e.value}-small`
        }, null);
      default:
        return M(Hp, null, null);
    }
  })(t.componentName);
};
function Pfe(t) {
  return M(cI, {
    componentName: t
  }, null);
}
const jj = Symbol("SizeContextKey"), Zj = () => Ge(jj, U(void 0)), Uj = (t) => {
  const e = Zj();
  return pt(jj, L(() => t.value || e.value)), t;
}, It = (t, e) => {
  const n = Zj(), r = Ko(), i = Ge(aI, I(I({}, lj), {
    renderEmpty: (x) => jg(cI, {
      componentName: x
    })
  })), a = L(() => i.getPrefixCls(t, e.prefixCls)), o = L(() => {
    var x, C;
    return (x = e.direction) !== null && x !== void 0 ? x : (C = i.direction) === null || C === void 0 ? void 0 : C.value;
  }), s = L(() => {
    var x;
    return (x = e.iconPrefixCls) !== null && x !== void 0 ? x : i.iconPrefixCls.value;
  }), l = L(() => i.getPrefixCls()), u = L(() => {
    var x;
    return (x = i.autoInsertSpaceInButton) === null || x === void 0 ? void 0 : x.value;
  }), c = i.renderEmpty, f = i.space, d = i.pageHeader, h = i.form, p = L(() => {
    var x, C;
    return (x = e.getTargetContainer) !== null && x !== void 0 ? x : (C = i.getTargetContainer) === null || C === void 0 ? void 0 : C.value;
  }), v = L(() => {
    var x, C, T;
    return (C = (x = e.getContainer) !== null && x !== void 0 ? x : e.getPopupContainer) !== null && C !== void 0 ? C : (T = i.getPopupContainer) === null || T === void 0 ? void 0 : T.value;
  }), g = L(() => {
    var x, C;
    return (x = e.dropdownMatchSelectWidth) !== null && x !== void 0 ? x : (C = i.dropdownMatchSelectWidth) === null || C === void 0 ? void 0 : C.value;
  }), m = L(() => {
    var x;
    return (e.virtual === void 0 ? ((x = i.virtual) === null || x === void 0 ? void 0 : x.value) !== !1 : e.virtual !== !1) && g.value !== !1;
  }), y = L(() => e.size || n.value), b = L(() => {
    var x, C, T;
    return (x = e.autocomplete) !== null && x !== void 0 ? x : (T = (C = i.input) === null || C === void 0 ? void 0 : C.value) === null || T === void 0 ? void 0 : T.autocomplete;
  }), _ = L(() => {
    var x;
    return (x = e.disabled) !== null && x !== void 0 ? x : r.value;
  }), O = L(() => {
    var x;
    return (x = e.csp) !== null && x !== void 0 ? x : i.csp;
  }), S = L(() => {
    var x, C;
    return (x = e.wave) !== null && x !== void 0 ? x : (C = i.wave) === null || C === void 0 ? void 0 : C.value;
  });
  return {
    configProvider: i,
    prefixCls: a,
    direction: o,
    size: y,
    getTargetContainer: p,
    getPopupContainer: v,
    space: f,
    pageHeader: d,
    form: h,
    autoInsertSpaceInButton: u,
    renderEmpty: c,
    virtual: m,
    dropdownMatchSelectWidth: g,
    rootPrefixCls: l,
    getPrefixCls: i.getPrefixCls,
    autocomplete: b,
    csp: O,
    iconPrefixCls: s,
    disabled: _,
    select: i.select,
    wave: S
  };
};
function or(t, e) {
  const n = I({}, t);
  for (let r = 0; r < e.length; r += 1) {
    const i = e[r];
    delete n[i];
  }
  return n;
}
function O8(t) {
  return typeof t == "object" && t != null && t.nodeType === 1;
}
function S8(t, e) {
  return (!e || t !== "hidden") && t !== "visible" && t !== "clip";
}
function oC(t, e) {
  if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
    var n = getComputedStyle(t, null);
    return S8(n.overflowY, e) || S8(n.overflowX, e) || function(r) {
      var i = function(a) {
        if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
        try {
          return a.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      }(r);
      return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
    }(t);
  }
  return !1;
}
function Sy(t, e, n, r, i, a, o, s) {
  return a < t && o > e || a > t && o < e ? 0 : a <= t && s <= n || o >= e && s >= n ? a - t - r : o > e && s < n || a < t && s > n ? o - e + i : 0;
}
var x8 = function(t, e) {
  var n = window, r = e.scrollMode, i = e.block, a = e.inline, o = e.boundary, s = e.skipOverflowHiddenElements, l = typeof o == "function" ? o : function(de) {
    return de !== o;
  };
  if (!O8(t)) throw new TypeError("Invalid target");
  for (var u, c, f = document.scrollingElement || document.documentElement, d = [], h = t; O8(h) && l(h); ) {
    if ((h = (c = (u = h).parentElement) == null ? u.getRootNode().host || null : c) === f) {
      d.push(h);
      break;
    }
    h != null && h === document.body && oC(h) && !oC(document.documentElement) || h != null && oC(h, s) && d.push(h);
  }
  for (var p = n.visualViewport ? n.visualViewport.width : innerWidth, v = n.visualViewport ? n.visualViewport.height : innerHeight, g = window.scrollX || pageXOffset, m = window.scrollY || pageYOffset, y = t.getBoundingClientRect(), b = y.height, _ = y.width, O = y.top, S = y.right, x = y.bottom, C = y.left, T = i === "start" || i === "nearest" ? O : i === "end" ? x : O + b / 2, w = a === "center" ? C + _ / 2 : a === "end" ? S : C, P = [], $ = 0; $ < d.length; $++) {
    var A = d[$], D = A.getBoundingClientRect(), E = D.height, R = D.width, N = D.top, V = D.right, z = D.bottom, W = D.left;
    if (r === "if-needed" && O >= 0 && C >= 0 && x <= v && S <= p && O >= N && x <= z && C >= W && S <= V) return P;
    var F = getComputedStyle(A), Q = parseInt(F.borderLeftWidth, 10), Z = parseInt(F.borderTopWidth, 10), ne = parseInt(F.borderRightWidth, 10), ee = parseInt(F.borderBottomWidth, 10), oe = 0, K = 0, ie = "offsetWidth" in A ? A.offsetWidth - A.clientWidth - Q - ne : 0, X = "offsetHeight" in A ? A.offsetHeight - A.clientHeight - Z - ee : 0, H = "offsetWidth" in A ? A.offsetWidth === 0 ? 0 : R / A.offsetWidth : 0, G = "offsetHeight" in A ? A.offsetHeight === 0 ? 0 : E / A.offsetHeight : 0;
    if (f === A) oe = i === "start" ? T : i === "end" ? T - v : i === "nearest" ? Sy(m, m + v, v, Z, ee, m + T, m + T + b, b) : T - v / 2, K = a === "start" ? w : a === "center" ? w - p / 2 : a === "end" ? w - p : Sy(g, g + p, p, Q, ne, g + w, g + w + _, _), oe = Math.max(0, oe + m), K = Math.max(0, K + g);
    else {
      oe = i === "start" ? T - N - Z : i === "end" ? T - z + ee + X : i === "nearest" ? Sy(N, z, E, Z, ee + X, T, T + b, b) : T - (N + E / 2) + X / 2, K = a === "start" ? w - W - Q : a === "center" ? w - (W + R / 2) + ie / 2 : a === "end" ? w - V + ne + ie : Sy(W, V, R, Q, ne + ie, w, w + _, _);
      var re = A.scrollLeft, fe = A.scrollTop;
      T += fe - (oe = Math.max(0, Math.min(fe + oe / G, A.scrollHeight - E / G + X))), w += re - (K = Math.max(0, Math.min(re + K / H, A.scrollWidth - R / H + ie)));
    }
    P.push({ el: A, top: oe, left: K });
  }
  return P;
};
function Xj(t) {
  return t === Object(t) && Object.keys(t).length !== 0;
}
function $fe(t, e) {
  e === void 0 && (e = "auto");
  var n = "scrollBehavior" in document.body.style;
  t.forEach(function(r) {
    var i = r.el, a = r.top, o = r.left;
    i.scroll && n ? i.scroll({
      top: a,
      left: o,
      behavior: e
    }) : (i.scrollTop = a, i.scrollLeft = o);
  });
}
function Afe(t) {
  return t === !1 ? {
    block: "end",
    inline: "nearest"
  } : Xj(t) ? t : {
    block: "start",
    inline: "nearest"
  };
}
function Efe(t, e) {
  var n = t.isConnected || t.ownerDocument.documentElement.contains(t);
  if (Xj(e) && typeof e.behavior == "function")
    return e.behavior(n ? x8(t, e) : []);
  if (n) {
    var r = Afe(e);
    return $fe(x8(t, r), r.behavior);
  }
}
function Mfe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
  }
}
function Yj(t, e, n) {
  return n && Mfe(t, n), t;
}
function S_() {
  return (S_ = Object.assign || function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }).apply(this, arguments);
}
function qj(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
}
function Kj(t, e) {
  if (t == null) return {};
  var n, r, i = {}, a = Object.keys(t);
  for (r = 0; r < a.length; r++) e.indexOf(n = a[r]) >= 0 || (i[n] = t[n]);
  return i;
}
function w8(t) {
  return ((e = t) != null && typeof e == "object" && Array.isArray(e) === !1) == 1 && Object.prototype.toString.call(t) === "[object Object]";
  var e;
}
var Jj = Object.prototype, eZ = Jj.toString, Ife = Jj.hasOwnProperty, tZ = /^\s*function (\w+)/;
function C8(t) {
  var e, n = (e = t == null ? void 0 : t.type) !== null && e !== void 0 ? e : t;
  if (n) {
    var r = n.toString().match(tZ);
    return r ? r[1] : "";
  }
  return "";
}
var df = function(t) {
  var e, n;
  return w8(t) !== !1 && typeof (e = t.constructor) == "function" && w8(n = e.prototype) !== !1 && n.hasOwnProperty("isPrototypeOf") !== !1;
}, nZ = function(t) {
  return t;
}, Rr = nZ;
if (process.env.NODE_ENV !== "production") {
  var Dfe = typeof console < "u";
  Rr = Dfe ? function(t) {
    console.warn("[VueTypes warn]: " + t);
  } : nZ;
}
var Jg = function(t, e) {
  return Ife.call(t, e);
}, Rfe = Number.isInteger || function(t) {
  return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
}, yh = Array.isArray || function(t) {
  return eZ.call(t) === "[object Array]";
}, bh = function(t) {
  return eZ.call(t) === "[object Function]";
}, O1 = function(t) {
  return df(t) && Jg(t, "_vueTypes_name");
}, rZ = function(t) {
  return df(t) && (Jg(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(e) {
    return Jg(t, e);
  }));
};
function fI(t, e) {
  return Object.defineProperty(t.bind(e), "__original", { value: t });
}
function Af(t, e, n) {
  var r;
  n === void 0 && (n = !1);
  var i = !0, a = "";
  r = df(t) ? t : { type: t };
  var o = O1(r) ? r._vueTypes_name + " - " : "";
  if (rZ(r) && r.type !== null) {
    if (r.type === void 0 || r.type === !0 || !r.required && e === void 0) return i;
    yh(r.type) ? (i = r.type.some(function(f) {
      return Af(f, e, !0) === !0;
    }), a = r.type.map(function(f) {
      return C8(f);
    }).join(" or ")) : i = (a = C8(r)) === "Array" ? yh(e) : a === "Object" ? df(e) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(f) {
      if (f == null) return "";
      var d = f.constructor.toString().match(tZ);
      return d ? d[1] : "";
    }(e) === a : e instanceof r.type;
  }
  if (!i) {
    var s = o + 'value "' + e + '" should be of type "' + a + '"';
    return n === !1 ? (Rr(s), !1) : s;
  }
  if (Jg(r, "validator") && bh(r.validator)) {
    var l = Rr, u = [];
    if (Rr = function(f) {
      u.push(f);
    }, i = r.validator(e), Rr = l, !i) {
      var c = (u.length > 1 ? "* " : "") + u.join(`
* `);
      return u.length = 0, n === !1 ? (Rr(c), i) : c;
    }
  }
  return i;
}
function Xi(t, e) {
  var n = Object.defineProperties(e, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get: function() {
    return this.required = !0, this;
  } }, def: { value: function(i) {
    return i !== void 0 || this.default ? bh(i) || Af(this, i, !0) === !0 ? (this.default = yh(i) ? function() {
      return [].concat(i);
    } : df(i) ? function() {
      return Object.assign({}, i);
    } : i, this) : (Rr(this._vueTypes_name + ' - invalid default value: "' + i + '"'), this) : this;
  } } }), r = n.validator;
  return bh(r) && (n.validator = fI(r, n)), n;
}
function Jo(t, e) {
  var n = Xi(t, e);
  return Object.defineProperty(n, "validate", { value: function(r) {
    return bh(this.validator) && Rr(this._vueTypes_name + ` - calling .validate() will overwrite the current custom validator function. Validator info:
` + JSON.stringify(this)), this.validator = fI(r, this), this;
  } });
}
function T8(t, e, n) {
  var r, i, a = (r = e, i = {}, Object.getOwnPropertyNames(r).forEach(function(f) {
    i[f] = Object.getOwnPropertyDescriptor(r, f);
  }), Object.defineProperties({}, i));
  if (a._vueTypes_name = t, !df(n)) return a;
  var o, s, l = n.validator, u = Kj(n, ["validator"]);
  if (bh(l)) {
    var c = a.validator;
    c && (c = (s = (o = c).__original) !== null && s !== void 0 ? s : o), a.validator = fI(c ? function(f) {
      return c.call(this, f) && l.call(this, f);
    } : l, a);
  }
  return Object.assign(a, u);
}
function FS(t) {
  return t.replace(/^(?!\s*$)/gm, "  ");
}
var kfe = function() {
  return Jo("any", {});
}, Lfe = function() {
  return Jo("function", { type: Function });
}, Nfe = function() {
  return Jo("boolean", { type: Boolean });
}, Bfe = function() {
  return Jo("string", { type: String });
}, zfe = function() {
  return Jo("number", { type: Number });
}, Vfe = function() {
  return Jo("array", { type: Array });
}, Ffe = function() {
  return Jo("object", { type: Object });
}, Wfe = function() {
  return Xi("integer", { type: Number, validator: function(t) {
    return Rfe(t);
  } });
}, Qfe = function() {
  return Xi("symbol", { validator: function(t) {
    return typeof t == "symbol";
  } });
};
function Hfe(t, e) {
  if (e === void 0 && (e = "custom validation failed"), typeof t != "function") throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return Xi(t.name || "<<anonymous function>>", { validator: function(n) {
    var r = t(n);
    return r || Rr(this._vueTypes_name + " - " + e), r;
  } });
}
function Gfe(t) {
  if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  var e = 'oneOf - value should be one of "' + t.join('", "') + '".', n = t.reduce(function(r, i) {
    if (i != null) {
      var a = i.constructor;
      r.indexOf(a) === -1 && r.push(a);
    }
    return r;
  }, []);
  return Xi("oneOf", { type: n.length > 0 ? n : void 0, validator: function(r) {
    var i = t.indexOf(r) !== -1;
    return i || Rr(e), i;
  } });
}
function jfe(t) {
  if (!yh(t)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
  for (var e = !1, n = [], r = 0; r < t.length; r += 1) {
    var i = t[r];
    if (rZ(i)) {
      if (O1(i) && i._vueTypes_name === "oneOf") {
        n = n.concat(i.type);
        continue;
      }
      if (bh(i.validator) && (e = !0), i.type !== !0 && i.type) {
        n = n.concat(i.type);
        continue;
      }
    }
    n.push(i);
  }
  return n = n.filter(function(a, o) {
    return n.indexOf(a) === o;
  }), Xi("oneOfType", e ? { type: n, validator: function(a) {
    var o = [], s = t.some(function(l) {
      var u = Af(O1(l) && l._vueTypes_name === "oneOf" ? l.type || null : l, a, !0);
      return typeof u == "string" && o.push(u), u === !0;
    });
    return s || Rr("oneOfType - provided value does not match any of the " + o.length + ` passed-in validators:
` + FS(o.join(`
`))), s;
  } } : { type: n });
}
function Zfe(t) {
  return Xi("arrayOf", { type: Array, validator: function(e) {
    var n, r = e.every(function(i) {
      return (n = Af(t, i, !0)) === !0;
    });
    return r || Rr(`arrayOf - value validation error:
` + FS(n)), r;
  } });
}
function Ufe(t) {
  return Xi("instanceOf", { type: t });
}
function Xfe(t) {
  return Xi("objectOf", { type: Object, validator: function(e) {
    var n, r = Object.keys(e).every(function(i) {
      return (n = Af(t, e[i], !0)) === !0;
    });
    return r || Rr(`objectOf - value validation error:
` + FS(n)), r;
  } });
}
function Yfe(t) {
  var e = Object.keys(t), n = e.filter(function(i) {
    var a;
    return !!(!((a = t[i]) === null || a === void 0) && a.required);
  }), r = Xi("shape", { type: Object, validator: function(i) {
    var a = this;
    if (!df(i)) return !1;
    var o = Object.keys(i);
    if (n.length > 0 && n.some(function(l) {
      return o.indexOf(l) === -1;
    })) {
      var s = n.filter(function(l) {
        return o.indexOf(l) === -1;
      });
      return Rr(s.length === 1 ? 'shape - required property "' + s[0] + '" is not defined.' : 'shape - required properties "' + s.join('", "') + '" are not defined.'), !1;
    }
    return o.every(function(l) {
      if (e.indexOf(l) === -1) return a._vueTypes_isLoose === !0 || (Rr('shape - shape definition does not include a "' + l + '" property. Allowed keys: "' + e.join('", "') + '".'), !1);
      var u = Af(t[l], i[l], !0);
      return typeof u == "string" && Rr('shape - "' + l + `" property validation error:
 ` + FS(u)), u === !0;
    });
  } });
  return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get: function() {
    return this._vueTypes_isLoose = !0, this;
  } }), r;
}
var Po = function() {
  function t() {
  }
  return t.extend = function(e) {
    var n = this;
    if (yh(e)) return e.forEach(function(f) {
      return n.extend(f);
    }), this;
    var r = e.name, i = e.validate, a = i !== void 0 && i, o = e.getter, s = o !== void 0 && o, l = Kj(e, ["name", "validate", "getter"]);
    if (Jg(this, r)) throw new TypeError('[VueTypes error]: Type "' + r + '" already defined');
    var u, c = l.type;
    return O1(c) ? (delete l.type, Object.defineProperty(this, r, s ? { get: function() {
      return T8(r, c, l);
    } } : { value: function() {
      var f, d = T8(r, c, l);
      return d.validator && (d.validator = (f = d.validator).bind.apply(f, [d].concat([].slice.call(arguments)))), d;
    } })) : (u = s ? { get: function() {
      var f = Object.assign({}, l);
      return a ? Jo(r, f) : Xi(r, f);
    }, enumerable: !0 } : { value: function() {
      var f, d, h = Object.assign({}, l);
      return f = a ? Jo(r, h) : Xi(r, h), h.validator && (f.validator = (d = h.validator).bind.apply(d, [f].concat([].slice.call(arguments)))), f;
    }, enumerable: !0 }, Object.defineProperty(this, r, u));
  }, Yj(t, null, [{ key: "any", get: function() {
    return kfe();
  } }, { key: "func", get: function() {
    return Lfe().def(this.defaults.func);
  } }, { key: "bool", get: function() {
    return Nfe().def(this.defaults.bool);
  } }, { key: "string", get: function() {
    return Bfe().def(this.defaults.string);
  } }, { key: "number", get: function() {
    return zfe().def(this.defaults.number);
  } }, { key: "array", get: function() {
    return Vfe().def(this.defaults.array);
  } }, { key: "object", get: function() {
    return Ffe().def(this.defaults.object);
  } }, { key: "integer", get: function() {
    return Wfe().def(this.defaults.integer);
  } }, { key: "symbol", get: function() {
    return Qfe();
  } }]), t;
}();
function iZ(t) {
  var e;
  return t === void 0 && (t = { func: function() {
  }, bool: !0, string: "", number: 0, array: function() {
    return [];
  }, object: function() {
    return {};
  }, integer: 0 }), (e = function(n) {
    function r() {
      return n.apply(this, arguments) || this;
    }
    return qj(r, n), Yj(r, null, [{ key: "sensibleDefaults", get: function() {
      return S_({}, this.defaults);
    }, set: function(i) {
      this.defaults = i !== !1 ? S_({}, i !== !0 ? i : t) : {};
    } }]), r;
  }(Po)).defaults = S_({}, t), e;
}
Po.defaults = {}, Po.custom = Hfe, Po.oneOf = Gfe, Po.instanceOf = Ufe, Po.oneOfType = jfe, Po.arrayOf = Zfe, Po.objectOf = Xfe, Po.shape = Yfe, Po.utils = { validate: function(t, e) {
  return Af(e, t, !0) === !0;
}, toType: function(t, e, n) {
  return n === void 0 && (n = !1), n ? Jo(t, e) : Xi(t, e);
} };
(function(t) {
  function e() {
    return t.apply(this, arguments) || this;
  }
  return qj(e, t), e;
})(iZ());
const Y = iZ({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  array: void 0,
  object: void 0,
  integer: void 0
});
Y.extend([{
  name: "looseBool",
  getter: !0,
  type: Boolean,
  default: void 0
}, {
  name: "style",
  getter: !0,
  type: [String, Object],
  default: void 0
}, {
  name: "VueNode",
  getter: !0,
  type: null
}]);
function qfe(t) {
  return t.default = void 0, t;
}
const Qi = (t, e, n) => {
  oa(t, `[ant-design-vue: ${e}] ${n}`);
};
function P8(t, e) {
  const {
    key: n
  } = t;
  let r;
  return "value" in t && ({
    value: r
  } = t), n ?? (r !== void 0 ? r : `rc-index-key-${e}`);
}
function aZ(t, e) {
  const {
    label: n,
    value: r,
    options: i
  } = t || {};
  return {
    label: n || (e ? "children" : "label"),
    value: r || "value",
    options: i || "options"
  };
}
function Kfe(t) {
  let {
    fieldNames: e,
    childrenAsData: n
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const r = [], {
    label: i,
    value: a,
    options: o
  } = aZ(e, !1);
  function s(l, u) {
    l.forEach((c) => {
      const f = c[i];
      if (u || !(o in c)) {
        const d = c[a];
        r.push({
          key: P8(c, r.length),
          groupOption: u,
          data: c,
          label: f,
          value: d
        });
      } else {
        let d = f;
        d === void 0 && n && (d = c.label), r.push({
          key: P8(c, r.length),
          group: !0,
          data: c,
          label: d
        }), s(c[o], !0);
      }
    });
  }
  return s(t, !1), r;
}
function y2(t) {
  const e = I({}, t);
  return "props" in e || Object.defineProperty(e, "props", {
    get() {
      return cf(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), e;
    }
  }), e;
}
function Jfe(t, e) {
  if (!e || !e.length)
    return null;
  let n = !1;
  function r(a, o) {
    let [s, ...l] = o;
    if (!s)
      return [a];
    const u = a.split(s);
    return n = n || u.length > 1, u.reduce((c, f) => [...c, ...r(f, l)], []).filter((c) => c);
  }
  const i = r(t, e);
  return n ? i : null;
}
function ede() {
  return "";
}
function tde(t) {
  return t ? t.ownerDocument : window.document;
}
function oZ() {
}
const nde = () => ({
  action: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def([]),
  showAction: Y.any.def([]),
  hideAction: Y.any.def([]),
  getPopupClassNameFromAlign: Y.any.def(ede),
  onPopupVisibleChange: Function,
  afterPopupVisibleChange: Y.func.def(oZ),
  popup: Y.any,
  arrow: Y.bool.def(!0),
  popupStyle: {
    type: Object,
    default: void 0
  },
  prefixCls: Y.string.def("rc-trigger-popup"),
  popupClassName: Y.string.def(""),
  popupPlacement: String,
  builtinPlacements: Y.object,
  popupTransitionName: String,
  popupAnimation: Y.any,
  mouseEnterDelay: Y.number.def(0),
  mouseLeaveDelay: Y.number.def(0.1),
  zIndex: Number,
  focusDelay: Y.number.def(0),
  blurDelay: Y.number.def(0.15),
  getPopupContainer: Function,
  getDocument: Y.func.def(tde),
  forceRender: {
    type: Boolean,
    default: void 0
  },
  destroyPopupOnHide: {
    type: Boolean,
    default: !1
  },
  mask: {
    type: Boolean,
    default: !1
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  // onPopupAlign: PropTypes.func.def(noop),
  popupAlign: Y.object.def(() => ({})),
  popupVisible: {
    type: Boolean,
    default: void 0
  },
  defaultPopupVisible: {
    type: Boolean,
    default: !1
  },
  maskTransitionName: String,
  maskAnimation: String,
  stretch: String,
  alignPoint: {
    type: Boolean,
    default: void 0
  },
  autoDestroy: {
    type: Boolean,
    default: !1
  },
  mobile: Object,
  getTriggerDOMNode: Function
}), dI = {
  visible: Boolean,
  prefixCls: String,
  zIndex: Number,
  destroyPopupOnHide: Boolean,
  forceRender: Boolean,
  arrow: {
    type: Boolean,
    default: !0
  },
  // Legacy Motion
  animation: [String, Object],
  transitionName: String,
  // Measure
  stretch: {
    type: String
  },
  // Align
  align: {
    type: Object
  },
  point: {
    type: Object
  },
  getRootDomNode: {
    type: Function
  },
  getClassNameFromAlign: {
    type: Function
  },
  onAlign: {
    type: Function
  },
  onMouseenter: {
    type: Function
  },
  onMouseleave: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onTouchstart: {
    type: Function
  }
}, rde = I(I({}, dI), {
  mobile: {
    type: Object
  }
}), ide = I(I({}, dI), {
  mask: Boolean,
  mobile: {
    type: Object
  },
  maskAnimation: String,
  maskTransitionName: String
});
function hI(t) {
  let {
    prefixCls: e,
    animation: n,
    transitionName: r
  } = t;
  return n ? {
    name: `${e}-${n}`
  } : r ? {
    name: r
  } : {};
}
function sZ(t) {
  const {
    prefixCls: e,
    visible: n,
    zIndex: r,
    mask: i,
    maskAnimation: a,
    maskTransitionName: o
  } = t;
  if (!i)
    return null;
  let s = {};
  return (o || a) && (s = hI({
    prefixCls: e,
    transitionName: o,
    animation: a
  })), M(co, j({
    appear: !0
  }, s), {
    default: () => [bi(M("div", {
      style: {
        zIndex: r
      },
      class: `${e}-mask`
    }, null), [[Vle("if"), n]])]
  });
}
sZ.displayName = "Mask";
const ade = te({
  compatConfig: {
    MODE: 3
  },
  name: "MobilePopupInner",
  inheritAttrs: !1,
  props: rde,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = U();
    return n({
      forceAlign: () => {
      },
      getElement: () => i.value
    }), () => {
      var a;
      const {
        zIndex: o,
        visible: s,
        prefixCls: l,
        mobile: {
          popupClassName: u,
          popupStyle: c,
          popupMotion: f = {},
          popupRender: d
        } = {}
      } = t, h = I({
        zIndex: o
      }, c);
      let p = Yn((a = r.default) === null || a === void 0 ? void 0 : a.call(r));
      p.length > 1 && (p = M("div", {
        class: `${l}-content`
      }, [p])), d && (p = d(p));
      const v = ye(l, u);
      return M(co, j({
        ref: i
      }, f), {
        default: () => [s ? M("div", {
          class: v,
          style: h
        }, [p]) : null]
      });
    };
  }
});
var ode = function(t, e, n, r) {
  function i(a) {
    return a instanceof n ? a : new n(function(o) {
      o(a);
    });
  }
  return new (n || (n = Promise))(function(a, o) {
    function s(c) {
      try {
        u(r.next(c));
      } catch (f) {
        o(f);
      }
    }
    function l(c) {
      try {
        u(r.throw(c));
      } catch (f) {
        o(f);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(s, l);
    }
    u((r = r.apply(t, e || [])).next());
  });
};
const $8 = ["measure", "align", null, "motion"], sde = (t, e) => {
  const n = ae(null), r = ae(), i = ae(!1);
  function a(l) {
    i.value || (n.value = l);
  }
  function o() {
    xt.cancel(r.value);
  }
  function s(l) {
    o(), r.value = xt(() => {
      let u = n.value;
      switch (n.value) {
        case "align":
          u = "motion";
          break;
        case "motion":
          u = "stable";
          break;
      }
      a(u), l == null || l();
    });
  }
  return se(t, () => {
    a("measure");
  }, {
    immediate: !0,
    flush: "post"
  }), it(() => {
    se(n, () => {
      switch (n.value) {
        case "measure":
          e();
          break;
      }
      n.value && (r.value = xt(() => ode(void 0, void 0, void 0, function* () {
        const l = $8.indexOf(n.value), u = $8[l + 1];
        u && l !== -1 && a(u);
      })));
    }, {
      immediate: !0,
      flush: "post"
    });
  }), yt(() => {
    i.value = !0, o();
  }), [n, s];
}, lde = (t) => {
  const e = ae({
    width: 0,
    height: 0
  });
  function n(i) {
    e.value = {
      width: i.offsetWidth,
      height: i.offsetHeight
    };
  }
  return [L(() => {
    const i = {};
    if (t.value) {
      const {
        width: a,
        height: o
      } = e.value;
      t.value.indexOf("height") !== -1 && o ? i.height = `${o}px` : t.value.indexOf("minHeight") !== -1 && o && (i.minHeight = `${o}px`), t.value.indexOf("width") !== -1 && a ? i.width = `${a}px` : t.value.indexOf("minWidth") !== -1 && a && (i.minWidth = `${a}px`);
    }
    return i;
  }), n];
};
function A8(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e && (r = r.filter(function(i) {
      return Object.getOwnPropertyDescriptor(t, i).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function E8(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2 ? A8(Object(n), !0).forEach(function(r) {
      ude(t, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : A8(Object(n)).forEach(function(r) {
      Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return t;
}
function b2(t) {
  "@babel/helpers - typeof";
  return b2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
    return typeof e;
  } : function(e) {
    return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  }, b2(t);
}
function ude(t, e, n) {
  return e in t ? Object.defineProperty(t, e, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = n, t;
}
var Gp, cde = {
  Webkit: "-webkit-",
  Moz: "-moz-",
  // IE did it wrong again ...
  ms: "-ms-",
  O: "-o-"
};
function S1() {
  if (Gp !== void 0)
    return Gp;
  Gp = "";
  var t = document.createElement("p").style, e = "Transform";
  for (var n in cde)
    n + e in t && (Gp = n);
  return Gp;
}
function lZ() {
  return S1() ? "".concat(S1(), "TransitionProperty") : "transitionProperty";
}
function WS() {
  return S1() ? "".concat(S1(), "Transform") : "transform";
}
function M8(t, e) {
  var n = lZ();
  n && (t.style[n] = e, n !== "transitionProperty" && (t.style.transitionProperty = e));
}
function sC(t, e) {
  var n = WS();
  n && (t.style[n] = e, n !== "transform" && (t.style.transform = e));
}
function fde(t) {
  return t.style.transitionProperty || t.style[lZ()];
}
function dde(t) {
  var e = window.getComputedStyle(t, null), n = e.getPropertyValue("transform") || e.getPropertyValue(WS());
  if (n && n !== "none") {
    var r = n.replace(/[^0-9\-.,]/g, "").split(",");
    return {
      x: parseFloat(r[12] || r[4], 0),
      y: parseFloat(r[13] || r[5], 0)
    };
  }
  return {
    x: 0,
    y: 0
  };
}
var hde = /matrix\((.*)\)/, pde = /matrix3d\((.*)\)/;
function vde(t, e) {
  var n = window.getComputedStyle(t, null), r = n.getPropertyValue("transform") || n.getPropertyValue(WS());
  if (r && r !== "none") {
    var i, a = r.match(hde);
    if (a)
      a = a[1], i = a.split(",").map(function(s) {
        return parseFloat(s, 10);
      }), i[4] = e.x, i[5] = e.y, sC(t, "matrix(".concat(i.join(","), ")"));
    else {
      var o = r.match(pde)[1];
      i = o.split(",").map(function(s) {
        return parseFloat(s, 10);
      }), i[12] = e.x, i[13] = e.y, sC(t, "matrix3d(".concat(i.join(","), ")"));
    }
  } else
    sC(t, "translateX(".concat(e.x, "px) translateY(").concat(e.y, "px) translateZ(0)"));
}
var gde = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, h0;
function I8(t) {
  var e = t.style.display;
  t.style.display = "none", t.offsetHeight, t.style.display = e;
}
function jd(t, e, n) {
  var r = n;
  if (b2(e) === "object") {
    for (var i in e)
      e.hasOwnProperty(i) && jd(t, i, e[i]);
    return;
  }
  if (typeof r < "u") {
    typeof r == "number" && (r = "".concat(r, "px")), t.style[e] = r;
    return;
  }
  return h0(t, e);
}
function mde(t) {
  var e, n, r, i = t.ownerDocument, a = i.body, o = i && i.documentElement;
  return e = t.getBoundingClientRect(), n = Math.floor(e.left), r = Math.floor(e.top), n -= o.clientLeft || a.clientLeft || 0, r -= o.clientTop || a.clientTop || 0, {
    left: n,
    top: r
  };
}
function uZ(t, e) {
  var n = t["page".concat(e ? "Y" : "X", "Offset")], r = "scroll".concat(e ? "Top" : "Left");
  if (typeof n != "number") {
    var i = t.document;
    n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  }
  return n;
}
function cZ(t) {
  return uZ(t);
}
function fZ(t) {
  return uZ(t, !0);
}
function em(t) {
  var e = mde(t), n = t.ownerDocument, r = n.defaultView || n.parentWindow;
  return e.left += cZ(r), e.top += fZ(r), e;
}
function pI(t) {
  return t != null && t == t.window;
}
function dZ(t) {
  return pI(t) ? t.document : t.nodeType === 9 ? t : t.ownerDocument;
}
function yde(t, e, n) {
  var r = n, i = "", a = dZ(t);
  return r = r || a.defaultView.getComputedStyle(t, null), r && (i = r.getPropertyValue(e) || r[e]), i;
}
var bde = new RegExp("^(".concat(gde, ")(?!px)[a-z%]+$"), "i"), _de = /^(top|right|bottom|left)$/, lC = "currentStyle", uC = "runtimeStyle", Du = "left", Ode = "px";
function Sde(t, e) {
  var n = t[lC] && t[lC][e];
  if (bde.test(n) && !_de.test(e)) {
    var r = t.style, i = r[Du], a = t[uC][Du];
    t[uC][Du] = t[lC][Du], r[Du] = e === "fontSize" ? "1em" : n || 0, n = r.pixelLeft + Ode, r[Du] = i, t[uC][Du] = a;
  }
  return n === "" ? "auto" : n;
}
typeof window < "u" && (h0 = window.getComputedStyle ? yde : Sde);
function xy(t, e) {
  return t === "left" ? e.useCssRight ? "right" : t : e.useCssBottom ? "bottom" : t;
}
function D8(t) {
  if (t === "left")
    return "right";
  if (t === "right")
    return "left";
  if (t === "top")
    return "bottom";
  if (t === "bottom")
    return "top";
}
function R8(t, e, n) {
  jd(t, "position") === "static" && (t.style.position = "relative");
  var r = -999, i = -999, a = xy("left", n), o = xy("top", n), s = D8(a), l = D8(o);
  a !== "left" && (r = 999), o !== "top" && (i = 999);
  var u = "", c = em(t);
  ("left" in e || "top" in e) && (u = fde(t) || "", M8(t, "none")), "left" in e && (t.style[s] = "", t.style[a] = "".concat(r, "px")), "top" in e && (t.style[l] = "", t.style[o] = "".concat(i, "px")), I8(t);
  var f = em(t), d = {};
  for (var h in e)
    if (e.hasOwnProperty(h)) {
      var p = xy(h, n), v = h === "left" ? r : i, g = c[h] - f[h];
      p === h ? d[p] = v + g : d[p] = v - g;
    }
  jd(t, d), I8(t), ("left" in e || "top" in e) && M8(t, u);
  var m = {};
  for (var y in e)
    if (e.hasOwnProperty(y)) {
      var b = xy(y, n), _ = e[y] - c[y];
      y === b ? m[b] = d[b] + _ : m[b] = d[b] - _;
    }
  jd(t, m);
}
function xde(t, e) {
  var n = em(t), r = dde(t), i = {
    x: r.x,
    y: r.y
  };
  "left" in e && (i.x = r.x + e.left - n.left), "top" in e && (i.y = r.y + e.top - n.top), vde(t, i);
}
function wde(t, e, n) {
  if (n.ignoreShake) {
    var r = em(t), i = r.left.toFixed(0), a = r.top.toFixed(0), o = e.left.toFixed(0), s = e.top.toFixed(0);
    if (i === o && a === s)
      return;
  }
  n.useCssRight || n.useCssBottom ? R8(t, e, n) : n.useCssTransform && WS() in document.body.style ? xde(t, e) : R8(t, e, n);
}
function vI(t, e) {
  for (var n = 0; n < t.length; n++)
    e(t[n]);
}
function hZ(t) {
  return h0(t, "boxSizing") === "border-box";
}
var Cde = ["margin", "border", "padding"], _2 = -1, Tde = 2, O2 = 1, Pde = 0;
function $de(t, e, n) {
  var r = {}, i = t.style, a;
  for (a in e)
    e.hasOwnProperty(a) && (r[a] = i[a], i[a] = e[a]);
  n.call(t);
  for (a in e)
    e.hasOwnProperty(a) && (i[a] = r[a]);
}
function Lv(t, e, n) {
  var r = 0, i, a, o;
  for (a = 0; a < e.length; a++)
    if (i = e[a], i)
      for (o = 0; o < n.length; o++) {
        var s = void 0;
        i === "border" ? s = "".concat(i).concat(n[o], "Width") : s = i + n[o], r += parseFloat(h0(t, s)) || 0;
      }
  return r;
}
var zo = {
  getParent: function(e) {
    var n = e;
    do
      n.nodeType === 11 && n.host ? n = n.host : n = n.parentNode;
    while (n && n.nodeType !== 1 && n.nodeType !== 9);
    return n;
  }
};
vI(["Width", "Height"], function(t) {
  zo["doc".concat(t)] = function(e) {
    var n = e.document;
    return Math.max(
      // firefox chrome documentElement.scrollHeight< body.scrollHeight
      // ie standard mode : documentElement.scrollHeight> body.scrollHeight
      n.documentElement["scroll".concat(t)],
      // quirks : documentElement.scrollHeight 最大等于可视窗口多一点？
      n.body["scroll".concat(t)],
      zo["viewport".concat(t)](n)
    );
  }, zo["viewport".concat(t)] = function(e) {
    var n = "client".concat(t), r = e.document, i = r.body, a = r.documentElement, o = a[n];
    return r.compatMode === "CSS1Compat" && o || i && i[n] || o;
  };
});
function k8(t, e, n) {
  var r = n;
  if (pI(t))
    return e === "width" ? zo.viewportWidth(t) : zo.viewportHeight(t);
  if (t.nodeType === 9)
    return e === "width" ? zo.docWidth(t) : zo.docHeight(t);
  var i = e === "width" ? ["Left", "Right"] : ["Top", "Bottom"], a = Math.floor(e === "width" ? t.getBoundingClientRect().width : t.getBoundingClientRect().height), o = hZ(t), s = 0;
  (a == null || a <= 0) && (a = void 0, s = h0(t, e), (s == null || Number(s) < 0) && (s = t.style[e] || 0), s = Math.floor(parseFloat(s)) || 0), r === void 0 && (r = o ? O2 : _2);
  var l = a !== void 0 || o, u = a || s;
  return r === _2 ? l ? u - Lv(t, ["border", "padding"], i) : s : l ? r === O2 ? u : u + (r === Tde ? -Lv(t, ["border"], i) : Lv(t, ["margin"], i)) : s + Lv(t, Cde.slice(r), i);
}
var Ade = {
  position: "absolute",
  visibility: "hidden",
  display: "block"
};
function L8() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  var r, i = e[0];
  return i.offsetWidth !== 0 ? r = k8.apply(void 0, e) : $de(i, Ade, function() {
    r = k8.apply(void 0, e);
  }), r;
}
vI(["width", "height"], function(t) {
  var e = t.charAt(0).toUpperCase() + t.slice(1);
  zo["outer".concat(e)] = function(r, i) {
    return r && L8(r, t, i ? Pde : O2);
  };
  var n = t === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
  zo[t] = function(r, i) {
    var a = i;
    if (a !== void 0) {
      if (r) {
        var o = hZ(r);
        return o && (a += Lv(r, ["padding", "border"], n)), jd(r, t, a);
      }
      return;
    }
    return r && L8(r, t, _2);
  };
});
function pZ(t, e) {
  for (var n in e)
    e.hasOwnProperty(n) && (t[n] = e[n]);
  return t;
}
var ft = {
  getWindow: function(e) {
    if (e && e.document && e.setTimeout)
      return e;
    var n = e.ownerDocument || e;
    return n.defaultView || n.parentWindow;
  },
  getDocument: dZ,
  offset: function(e, n, r) {
    if (typeof n < "u")
      wde(e, n, r || {});
    else
      return em(e);
  },
  isWindow: pI,
  each: vI,
  css: jd,
  clone: function(e) {
    var n, r = {};
    for (n in e)
      e.hasOwnProperty(n) && (r[n] = e[n]);
    var i = e.overflow;
    if (i)
      for (n in e)
        e.hasOwnProperty(n) && (r.overflow[n] = e.overflow[n]);
    return r;
  },
  mix: pZ,
  getWindowScrollLeft: function(e) {
    return cZ(e);
  },
  getWindowScrollTop: function(e) {
    return fZ(e);
  },
  merge: function() {
    for (var e = {}, n = 0; n < arguments.length; n++)
      ft.mix(e, n < 0 || arguments.length <= n ? void 0 : arguments[n]);
    return e;
  },
  viewportWidth: 0,
  viewportHeight: 0
};
pZ(ft, zo);
var cC = ft.getParent;
function S2(t) {
  if (ft.isWindow(t) || t.nodeType === 9)
    return null;
  var e = ft.getDocument(t), n = e.body, r, i = ft.css(t, "position"), a = i === "fixed" || i === "absolute";
  if (!a)
    return t.nodeName.toLowerCase() === "html" ? null : cC(t);
  for (r = cC(t); r && r !== n && r.nodeType !== 9; r = cC(r))
    if (i = ft.css(r, "position"), i !== "static")
      return r;
  return null;
}
var N8 = ft.getParent;
function Ede(t) {
  if (ft.isWindow(t) || t.nodeType === 9)
    return !1;
  var e = ft.getDocument(t), n = e.body, r = null;
  for (
    r = N8(t);
    // 修复元素位于 document.documentElement 下导致崩溃问题
    r && r !== n && r !== e;
    r = N8(r)
  ) {
    var i = ft.css(r, "position");
    if (i === "fixed")
      return !0;
  }
  return !1;
}
function gI(t, e) {
  for (var n = {
    left: 0,
    right: 1 / 0,
    top: 0,
    bottom: 1 / 0
  }, r = S2(t), i = ft.getDocument(t), a = i.defaultView || i.parentWindow, o = i.body, s = i.documentElement; r; ) {
    if ((navigator.userAgent.indexOf("MSIE") === -1 || r.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
    // viewport. In some browsers, el.offsetParent may be
    // document.documentElement, so check for that too.
    r !== o && r !== s && ft.css(r, "overflow") !== "visible") {
      var l = ft.offset(r);
      l.left += r.clientLeft, l.top += r.clientTop, n.top = Math.max(n.top, l.top), n.right = Math.min(
        n.right,
        // consider area without scrollBar
        l.left + r.clientWidth
      ), n.bottom = Math.min(n.bottom, l.top + r.clientHeight), n.left = Math.max(n.left, l.left);
    } else if (r === o || r === s)
      break;
    r = S2(r);
  }
  var u = null;
  if (!ft.isWindow(t) && t.nodeType !== 9) {
    u = t.style.position;
    var c = ft.css(t, "position");
    c === "absolute" && (t.style.position = "fixed");
  }
  var f = ft.getWindowScrollLeft(a), d = ft.getWindowScrollTop(a), h = ft.viewportWidth(a), p = ft.viewportHeight(a), v = s.scrollWidth, g = s.scrollHeight, m = window.getComputedStyle(o);
  if (m.overflowX === "hidden" && (v = a.innerWidth), m.overflowY === "hidden" && (g = a.innerHeight), t.style && (t.style.position = u), e || Ede(t))
    n.left = Math.max(n.left, f), n.top = Math.max(n.top, d), n.right = Math.min(n.right, f + h), n.bottom = Math.min(n.bottom, d + p);
  else {
    var y = Math.max(v, f + h);
    n.right = Math.min(n.right, y);
    var b = Math.max(g, d + p);
    n.bottom = Math.min(n.bottom, b);
  }
  return n.top >= 0 && n.left >= 0 && n.bottom > n.top && n.right > n.left ? n : null;
}
function Mde(t, e, n, r) {
  var i = ft.clone(t), a = {
    width: e.width,
    height: e.height
  };
  return r.adjustX && i.left < n.left && (i.left = n.left), r.resizeWidth && i.left >= n.left && i.left + a.width > n.right && (a.width -= i.left + a.width - n.right), r.adjustX && i.left + a.width > n.right && (i.left = Math.max(n.right - a.width, n.left)), r.adjustY && i.top < n.top && (i.top = n.top), r.resizeHeight && i.top >= n.top && i.top + a.height > n.bottom && (a.height -= i.top + a.height - n.bottom), r.adjustY && i.top + a.height > n.bottom && (i.top = Math.max(n.bottom - a.height, n.top)), ft.mix(i, a);
}
function mI(t) {
  var e, n, r;
  if (!ft.isWindow(t) && t.nodeType !== 9)
    e = ft.offset(t), n = ft.outerWidth(t), r = ft.outerHeight(t);
  else {
    var i = ft.getWindow(t);
    e = {
      left: ft.getWindowScrollLeft(i),
      top: ft.getWindowScrollTop(i)
    }, n = ft.viewportWidth(i), r = ft.viewportHeight(i);
  }
  return e.width = n, e.height = r, e;
}
function B8(t, e) {
  var n = e.charAt(0), r = e.charAt(1), i = t.width, a = t.height, o = t.left, s = t.top;
  return n === "c" ? s += a / 2 : n === "b" && (s += a), r === "c" ? o += i / 2 : r === "r" && (o += i), {
    left: o,
    top: s
  };
}
function wy(t, e, n, r, i) {
  var a = B8(e, n[1]), o = B8(t, n[0]), s = [o.left - a.left, o.top - a.top];
  return {
    left: Math.round(t.left - s[0] + r[0] - i[0]),
    top: Math.round(t.top - s[1] + r[1] - i[1])
  };
}
function z8(t, e, n) {
  return t.left < n.left || t.left + e.width > n.right;
}
function V8(t, e, n) {
  return t.top < n.top || t.top + e.height > n.bottom;
}
function Ide(t, e, n) {
  return t.left > n.right || t.left + e.width < n.left;
}
function Dde(t, e, n) {
  return t.top > n.bottom || t.top + e.height < n.top;
}
function Cy(t, e, n) {
  var r = [];
  return ft.each(t, function(i) {
    r.push(i.replace(e, function(a) {
      return n[a];
    }));
  }), r;
}
function Ty(t, e) {
  return t[e] = -t[e], t;
}
function F8(t, e) {
  var n;
  return /%$/.test(t) ? n = parseInt(t.substring(0, t.length - 1), 10) / 100 * e : n = parseInt(t, 10), n || 0;
}
function W8(t, e) {
  t[0] = F8(t[0], e.width), t[1] = F8(t[1], e.height);
}
function vZ(t, e, n, r) {
  var i = n.points, a = n.offset || [0, 0], o = n.targetOffset || [0, 0], s = n.overflow, l = n.source || t;
  a = [].concat(a), o = [].concat(o), s = s || {};
  var u = {}, c = 0, f = !!(s && s.alwaysByViewport), d = gI(l, f), h = mI(l);
  W8(a, h), W8(o, e);
  var p = wy(h, e, i, a, o), v = ft.merge(h, p);
  if (d && (s.adjustX || s.adjustY) && r) {
    if (s.adjustX && z8(p, h, d)) {
      var g = Cy(i, /[lr]/gi, {
        l: "r",
        r: "l"
      }), m = Ty(a, 0), y = Ty(o, 0), b = wy(h, e, g, m, y);
      Ide(b, h, d) || (c = 1, i = g, a = m, o = y);
    }
    if (s.adjustY && V8(p, h, d)) {
      var _ = Cy(i, /[tb]/gi, {
        t: "b",
        b: "t"
      }), O = Ty(a, 1), S = Ty(o, 1), x = wy(h, e, _, O, S);
      Dde(x, h, d) || (c = 1, i = _, a = O, o = S);
    }
    c && (p = wy(h, e, i, a, o), ft.mix(v, p));
    var C = z8(p, h, d), T = V8(p, h, d);
    if (C || T) {
      var w = i;
      C && (w = Cy(i, /[lr]/gi, {
        l: "r",
        r: "l"
      })), T && (w = Cy(i, /[tb]/gi, {
        t: "b",
        b: "t"
      })), i = w, a = n.offset || [0, 0], o = n.targetOffset || [0, 0];
    }
    u.adjustX = s.adjustX && C, u.adjustY = s.adjustY && T, (u.adjustX || u.adjustY) && (v = Mde(p, h, d, u));
  }
  return v.width !== h.width && ft.css(l, "width", ft.width(l) + v.width - h.width), v.height !== h.height && ft.css(l, "height", ft.height(l) + v.height - h.height), ft.offset(l, {
    left: v.left,
    top: v.top
  }, {
    useCssRight: n.useCssRight,
    useCssBottom: n.useCssBottom,
    useCssTransform: n.useCssTransform,
    ignoreShake: n.ignoreShake
  }), {
    points: i,
    offset: a,
    targetOffset: o,
    overflow: u
  };
}
function Rde(t, e) {
  var n = gI(t, e), r = mI(t);
  return !n || r.left + r.width <= n.left || r.top + r.height <= n.top || r.left >= n.right || r.top >= n.bottom;
}
function yI(t, e, n) {
  var r = n.target || e, i = mI(r), a = !Rde(r, n.overflow && n.overflow.alwaysByViewport);
  return vZ(t, i, n, a);
}
yI.__getOffsetParent = S2;
yI.__getVisibleRectForElement = gI;
function kde(t, e, n) {
  var r, i, a = ft.getDocument(t), o = a.defaultView || a.parentWindow, s = ft.getWindowScrollLeft(o), l = ft.getWindowScrollTop(o), u = ft.viewportWidth(o), c = ft.viewportHeight(o);
  "pageX" in e ? r = e.pageX : r = s + e.clientX, "pageY" in e ? i = e.pageY : i = l + e.clientY;
  var f = {
    left: r,
    top: i,
    width: 0,
    height: 0
  }, d = r >= 0 && r <= s + u && i >= 0 && i <= l + c, h = [n.points[0], "cc"];
  return vZ(t, f, E8(E8({}, n), {}, {
    points: h
  }), d);
}
function Pn(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, i = t;
  if (Array.isArray(t) && (i = os(t)[0]), !i)
    return null;
  const a = Ns(i, e, r);
  return a.props = n ? I(I({}, a.props), e) : a.props, Xr(typeof a.props.class != "object", "class must be string"), a;
}
function Lde(t, e, n) {
  sf(Ns(t, I({}, e)), n);
}
const gZ = (t) => {
  if (!t)
    return !1;
  if (t.offsetParent)
    return !0;
  if (t.getBBox) {
    const e = t.getBBox();
    if (e.width || e.height)
      return !0;
  }
  if (t.getBoundingClientRect) {
    const e = t.getBoundingClientRect();
    if (e.width || e.height)
      return !0;
  }
  return !1;
};
function Nde(t, e) {
  return t === e ? !0 : !t || !e ? !1 : "pageX" in e && "pageY" in e ? t.pageX === e.pageX && t.pageY === e.pageY : "clientX" in e && "clientY" in e ? t.clientX === e.clientX && t.clientY === e.clientY : !1;
}
function Bde(t, e) {
  t !== document.activeElement && $l(e, t) && typeof t.focus == "function" && t.focus();
}
function Q8(t, e) {
  let n = null, r = null;
  function i(o) {
    let [{
      target: s
    }] = o;
    if (!document.documentElement.contains(s)) return;
    const {
      width: l,
      height: u
    } = s.getBoundingClientRect(), c = Math.floor(l), f = Math.floor(u);
    (n !== c || r !== f) && Promise.resolve().then(() => {
      e({
        width: c,
        height: f
      });
    }), n = c, r = f;
  }
  const a = new tj(i);
  return t && a.observe(t), () => {
    a.disconnect();
  };
}
const zde = (t, e) => {
  let n = !1, r = null;
  function i() {
    clearTimeout(r);
  }
  function a(o) {
    if (!n || o === !0) {
      if (t() === !1)
        return;
      n = !0, i(), r = setTimeout(() => {
        n = !1;
      }, e.value);
    } else
      i(), r = setTimeout(() => {
        n = !1, a();
      }, e.value);
  }
  return [a, () => {
    n = !1, i();
  }];
};
function Vde() {
  this.__data__ = [], this.size = 0;
}
function p0(t, e) {
  return t === e || t !== t && e !== e;
}
function QS(t, e) {
  for (var n = t.length; n--; )
    if (p0(t[n][0], e))
      return n;
  return -1;
}
var Fde = Array.prototype, Wde = Fde.splice;
function Qde(t) {
  var e = this.__data__, n = QS(e, t);
  if (n < 0)
    return !1;
  var r = e.length - 1;
  return n == r ? e.pop() : Wde.call(e, n, 1), --this.size, !0;
}
function Hde(t) {
  var e = this.__data__, n = QS(e, t);
  return n < 0 ? void 0 : e[n][1];
}
function Gde(t) {
  return QS(this.__data__, t) > -1;
}
function jde(t, e) {
  var n = this.__data__, r = QS(n, t);
  return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
}
function rl(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
rl.prototype.clear = Vde;
rl.prototype.delete = Qde;
rl.prototype.get = Hde;
rl.prototype.has = Gde;
rl.prototype.set = jde;
function Zde() {
  this.__data__ = new rl(), this.size = 0;
}
function Ude(t) {
  var e = this.__data__, n = e.delete(t);
  return this.size = e.size, n;
}
function Xde(t) {
  return this.__data__.get(t);
}
function Yde(t) {
  return this.__data__.has(t);
}
var mZ = typeof global == "object" && global && global.Object === Object && global, qde = typeof self == "object" && self && self.Object === Object && self, fo = mZ || qde || Function("return this")(), Ta = fo.Symbol, yZ = Object.prototype, Kde = yZ.hasOwnProperty, Jde = yZ.toString, jp = Ta ? Ta.toStringTag : void 0;
function ehe(t) {
  var e = Kde.call(t, jp), n = t[jp];
  try {
    t[jp] = void 0;
    var r = !0;
  } catch {
  }
  var i = Jde.call(t);
  return r && (e ? t[jp] = n : delete t[jp]), i;
}
var the = Object.prototype, nhe = the.toString;
function rhe(t) {
  return nhe.call(t);
}
var ihe = "[object Null]", ahe = "[object Undefined]", H8 = Ta ? Ta.toStringTag : void 0;
function bu(t) {
  return t == null ? t === void 0 ? ahe : ihe : H8 && H8 in Object(t) ? ehe(t) : rhe(t);
}
function xr(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var ohe = "[object AsyncFunction]", she = "[object Function]", lhe = "[object GeneratorFunction]", uhe = "[object Proxy]";
function bI(t) {
  if (!xr(t))
    return !1;
  var e = bu(t);
  return e == she || e == lhe || e == ohe || e == uhe;
}
var fC = fo["__core-js_shared__"], G8 = function() {
  var t = /[^.]+$/.exec(fC && fC.keys && fC.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function che(t) {
  return !!G8 && G8 in t;
}
var fhe = Function.prototype, dhe = fhe.toString;
function Ef(t) {
  if (t != null) {
    try {
      return dhe.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var hhe = /[\\^$.*+?()[\]{}|]/g, phe = /^\[object .+?Constructor\]$/, vhe = Function.prototype, ghe = Object.prototype, mhe = vhe.toString, yhe = ghe.hasOwnProperty, bhe = RegExp(
  "^" + mhe.call(yhe).replace(hhe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function _he(t) {
  if (!xr(t) || che(t))
    return !1;
  var e = bI(t) ? bhe : phe;
  return e.test(Ef(t));
}
function Ohe(t, e) {
  return t == null ? void 0 : t[e];
}
function Mf(t, e) {
  var n = Ohe(t, e);
  return _he(n) ? n : void 0;
}
var tm = Mf(fo, "Map"), nm = Mf(Object, "create");
function She() {
  this.__data__ = nm ? nm(null) : {}, this.size = 0;
}
function xhe(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var whe = "__lodash_hash_undefined__", Che = Object.prototype, The = Che.hasOwnProperty;
function Phe(t) {
  var e = this.__data__;
  if (nm) {
    var n = e[t];
    return n === whe ? void 0 : n;
  }
  return The.call(e, t) ? e[t] : void 0;
}
var $he = Object.prototype, Ahe = $he.hasOwnProperty;
function Ehe(t) {
  var e = this.__data__;
  return nm ? e[t] !== void 0 : Ahe.call(e, t);
}
var Mhe = "__lodash_hash_undefined__";
function Ihe(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = nm && e === void 0 ? Mhe : e, this;
}
function hf(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
hf.prototype.clear = She;
hf.prototype.delete = xhe;
hf.prototype.get = Phe;
hf.prototype.has = Ehe;
hf.prototype.set = Ihe;
function Dhe() {
  this.size = 0, this.__data__ = {
    hash: new hf(),
    map: new (tm || rl)(),
    string: new hf()
  };
}
function Rhe(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
function HS(t, e) {
  var n = t.__data__;
  return Rhe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
function khe(t) {
  var e = HS(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
function Lhe(t) {
  return HS(this, t).get(t);
}
function Nhe(t) {
  return HS(this, t).has(t);
}
function Bhe(t, e) {
  var n = HS(this, t), r = n.size;
  return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
}
function il(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
il.prototype.clear = Dhe;
il.prototype.delete = khe;
il.prototype.get = Lhe;
il.prototype.has = Nhe;
il.prototype.set = Bhe;
var zhe = 200;
function Vhe(t, e) {
  var n = this.__data__;
  if (n instanceof rl) {
    var r = n.__data__;
    if (!tm || r.length < zhe - 1)
      return r.push([t, e]), this.size = ++n.size, this;
    n = this.__data__ = new il(r);
  }
  return n.set(t, e), this.size = n.size, this;
}
function Ka(t) {
  var e = this.__data__ = new rl(t);
  this.size = e.size;
}
Ka.prototype.clear = Zde;
Ka.prototype.delete = Ude;
Ka.prototype.get = Xde;
Ka.prototype.has = Yde;
Ka.prototype.set = Vhe;
var Fhe = "__lodash_hash_undefined__";
function Whe(t) {
  return this.__data__.set(t, Fhe), this;
}
function Qhe(t) {
  return this.__data__.has(t);
}
function _h(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.__data__ = new il(); ++e < n; )
    this.add(t[e]);
}
_h.prototype.add = _h.prototype.push = Whe;
_h.prototype.has = Qhe;
function Hhe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r; )
    if (e(t[n], n, t))
      return !0;
  return !1;
}
function x1(t, e) {
  return t.has(e);
}
var Ghe = 1, jhe = 2;
function bZ(t, e, n, r, i, a) {
  var o = n & Ghe, s = t.length, l = e.length;
  if (s != l && !(o && l > s))
    return !1;
  var u = a.get(t), c = a.get(e);
  if (u && c)
    return u == e && c == t;
  var f = -1, d = !0, h = n & jhe ? new _h() : void 0;
  for (a.set(t, e), a.set(e, t); ++f < s; ) {
    var p = t[f], v = e[f];
    if (r)
      var g = o ? r(v, p, f, e, t, a) : r(p, v, f, t, e, a);
    if (g !== void 0) {
      if (g)
        continue;
      d = !1;
      break;
    }
    if (h) {
      if (!Hhe(e, function(m, y) {
        if (!x1(h, y) && (p === m || i(p, m, n, r, a)))
          return h.push(y);
      })) {
        d = !1;
        break;
      }
    } else if (!(p === v || i(p, v, n, r, a))) {
      d = !1;
      break;
    }
  }
  return a.delete(t), a.delete(e), d;
}
var w1 = fo.Uint8Array;
function Zhe(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(r, i) {
    n[++e] = [i, r];
  }), n;
}
function _I(t) {
  var e = -1, n = Array(t.size);
  return t.forEach(function(r) {
    n[++e] = r;
  }), n;
}
var Uhe = 1, Xhe = 2, Yhe = "[object Boolean]", qhe = "[object Date]", Khe = "[object Error]", Jhe = "[object Map]", epe = "[object Number]", tpe = "[object RegExp]", npe = "[object Set]", rpe = "[object String]", ipe = "[object Symbol]", ape = "[object ArrayBuffer]", ope = "[object DataView]", j8 = Ta ? Ta.prototype : void 0, dC = j8 ? j8.valueOf : void 0;
function spe(t, e, n, r, i, a, o) {
  switch (n) {
    case ope:
      if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
        return !1;
      t = t.buffer, e = e.buffer;
    case ape:
      return !(t.byteLength != e.byteLength || !a(new w1(t), new w1(e)));
    case Yhe:
    case qhe:
    case epe:
      return p0(+t, +e);
    case Khe:
      return t.name == e.name && t.message == e.message;
    case tpe:
    case rpe:
      return t == e + "";
    case Jhe:
      var s = Zhe;
    case npe:
      var l = r & Uhe;
      if (s || (s = _I), t.size != e.size && !l)
        return !1;
      var u = o.get(t);
      if (u)
        return u == e;
      r |= Xhe, o.set(t, e);
      var c = bZ(s(t), s(e), r, i, a, o);
      return o.delete(t), c;
    case ipe:
      if (dC)
        return dC.call(t) == dC.call(e);
  }
  return !1;
}
function OI(t, e) {
  for (var n = -1, r = e.length, i = t.length; ++n < r; )
    t[i + n] = e[n];
  return t;
}
var wi = Array.isArray;
function _Z(t, e, n) {
  var r = e(t);
  return wi(t) ? r : OI(r, n(t));
}
function lpe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
    var o = t[n];
    e(o, n, t) && (a[i++] = o);
  }
  return a;
}
function OZ() {
  return [];
}
var upe = Object.prototype, cpe = upe.propertyIsEnumerable, Z8 = Object.getOwnPropertySymbols, SI = Z8 ? function(t) {
  return t == null ? [] : (t = Object(t), lpe(Z8(t), function(e) {
    return cpe.call(t, e);
  }));
} : OZ;
function fpe(t, e) {
  for (var n = -1, r = Array(t); ++n < t; )
    r[n] = e(n);
  return r;
}
function no(t) {
  return t != null && typeof t == "object";
}
var dpe = "[object Arguments]";
function U8(t) {
  return no(t) && bu(t) == dpe;
}
var SZ = Object.prototype, hpe = SZ.hasOwnProperty, ppe = SZ.propertyIsEnumerable, Oh = U8(/* @__PURE__ */ function() {
  return arguments;
}()) ? U8 : function(t) {
  return no(t) && hpe.call(t, "callee") && !ppe.call(t, "callee");
};
function vpe() {
  return !1;
}
var xZ = typeof exports == "object" && exports && !exports.nodeType && exports, X8 = xZ && typeof module == "object" && module && !module.nodeType && module, gpe = X8 && X8.exports === xZ, Y8 = gpe ? fo.Buffer : void 0, mpe = Y8 ? Y8.isBuffer : void 0, Sh = mpe || vpe, ype = 9007199254740991, bpe = /^(?:0|[1-9]\d*)$/;
function GS(t, e) {
  var n = typeof t;
  return e = e ?? ype, !!e && (n == "number" || n != "symbol" && bpe.test(t)) && t > -1 && t % 1 == 0 && t < e;
}
var _pe = 9007199254740991;
function xI(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= _pe;
}
var Ope = "[object Arguments]", Spe = "[object Array]", xpe = "[object Boolean]", wpe = "[object Date]", Cpe = "[object Error]", Tpe = "[object Function]", Ppe = "[object Map]", $pe = "[object Number]", Ape = "[object Object]", Epe = "[object RegExp]", Mpe = "[object Set]", Ipe = "[object String]", Dpe = "[object WeakMap]", Rpe = "[object ArrayBuffer]", kpe = "[object DataView]", Lpe = "[object Float32Array]", Npe = "[object Float64Array]", Bpe = "[object Int8Array]", zpe = "[object Int16Array]", Vpe = "[object Int32Array]", Fpe = "[object Uint8Array]", Wpe = "[object Uint8ClampedArray]", Qpe = "[object Uint16Array]", Hpe = "[object Uint32Array]", ln = {};
ln[Lpe] = ln[Npe] = ln[Bpe] = ln[zpe] = ln[Vpe] = ln[Fpe] = ln[Wpe] = ln[Qpe] = ln[Hpe] = !0;
ln[Ope] = ln[Spe] = ln[Rpe] = ln[xpe] = ln[kpe] = ln[wpe] = ln[Cpe] = ln[Tpe] = ln[Ppe] = ln[$pe] = ln[Ape] = ln[Epe] = ln[Mpe] = ln[Ipe] = ln[Dpe] = !1;
function Gpe(t) {
  return no(t) && xI(t.length) && !!ln[bu(t)];
}
function jS(t) {
  return function(e) {
    return t(e);
  };
}
var wZ = typeof exports == "object" && exports && !exports.nodeType && exports, sg = wZ && typeof module == "object" && module && !module.nodeType && module, jpe = sg && sg.exports === wZ, hC = jpe && mZ.process, xh = function() {
  try {
    var t = sg && sg.require && sg.require("util").types;
    return t || hC && hC.binding && hC.binding("util");
  } catch {
  }
}(), q8 = xh && xh.isTypedArray, ZS = q8 ? jS(q8) : Gpe, Zpe = Object.prototype, Upe = Zpe.hasOwnProperty;
function CZ(t, e) {
  var n = wi(t), r = !n && Oh(t), i = !n && !r && Sh(t), a = !n && !r && !i && ZS(t), o = n || r || i || a, s = o ? fpe(t.length, String) : [], l = s.length;
  for (var u in t)
    (e || Upe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    GS(u, l))) && s.push(u);
  return s;
}
var Xpe = Object.prototype;
function US(t) {
  var e = t && t.constructor, n = typeof e == "function" && e.prototype || Xpe;
  return t === n;
}
function TZ(t, e) {
  return function(n) {
    return t(e(n));
  };
}
var Ype = TZ(Object.keys, Object), qpe = Object.prototype, Kpe = qpe.hasOwnProperty;
function PZ(t) {
  if (!US(t))
    return Ype(t);
  var e = [];
  for (var n in Object(t))
    Kpe.call(t, n) && n != "constructor" && e.push(n);
  return e;
}
function op(t) {
  return t != null && xI(t.length) && !bI(t);
}
function v0(t) {
  return op(t) ? CZ(t) : PZ(t);
}
function x2(t) {
  return _Z(t, v0, SI);
}
var Jpe = 1, eve = Object.prototype, tve = eve.hasOwnProperty;
function nve(t, e, n, r, i, a) {
  var o = n & Jpe, s = x2(t), l = s.length, u = x2(e), c = u.length;
  if (l != c && !o)
    return !1;
  for (var f = l; f--; ) {
    var d = s[f];
    if (!(o ? d in e : tve.call(e, d)))
      return !1;
  }
  var h = a.get(t), p = a.get(e);
  if (h && p)
    return h == e && p == t;
  var v = !0;
  a.set(t, e), a.set(e, t);
  for (var g = o; ++f < l; ) {
    d = s[f];
    var m = t[d], y = e[d];
    if (r)
      var b = o ? r(y, m, d, e, t, a) : r(m, y, d, t, e, a);
    if (!(b === void 0 ? m === y || i(m, y, n, r, a) : b)) {
      v = !1;
      break;
    }
    g || (g = d == "constructor");
  }
  if (v && !g) {
    var _ = t.constructor, O = e.constructor;
    _ != O && "constructor" in t && "constructor" in e && !(typeof _ == "function" && _ instanceof _ && typeof O == "function" && O instanceof O) && (v = !1);
  }
  return a.delete(t), a.delete(e), v;
}
var w2 = Mf(fo, "DataView"), C2 = Mf(fo, "Promise"), Zd = Mf(fo, "Set"), T2 = Mf(fo, "WeakMap"), K8 = "[object Map]", rve = "[object Object]", J8 = "[object Promise]", eN = "[object Set]", tN = "[object WeakMap]", nN = "[object DataView]", ive = Ef(w2), ave = Ef(tm), ove = Ef(C2), sve = Ef(Zd), lve = Ef(T2), da = bu;
(w2 && da(new w2(new ArrayBuffer(1))) != nN || tm && da(new tm()) != K8 || C2 && da(C2.resolve()) != J8 || Zd && da(new Zd()) != eN || T2 && da(new T2()) != tN) && (da = function(t) {
  var e = bu(t), n = e == rve ? t.constructor : void 0, r = n ? Ef(n) : "";
  if (r)
    switch (r) {
      case ive:
        return nN;
      case ave:
        return K8;
      case ove:
        return J8;
      case sve:
        return eN;
      case lve:
        return tN;
    }
  return e;
});
var uve = 1, rN = "[object Arguments]", iN = "[object Array]", Py = "[object Object]", cve = Object.prototype, aN = cve.hasOwnProperty;
function fve(t, e, n, r, i, a) {
  var o = wi(t), s = wi(e), l = o ? iN : da(t), u = s ? iN : da(e);
  l = l == rN ? Py : l, u = u == rN ? Py : u;
  var c = l == Py, f = u == Py, d = l == u;
  if (d && Sh(t)) {
    if (!Sh(e))
      return !1;
    o = !0, c = !1;
  }
  if (d && !c)
    return a || (a = new Ka()), o || ZS(t) ? bZ(t, e, n, r, i, a) : spe(t, e, l, n, r, i, a);
  if (!(n & uve)) {
    var h = c && aN.call(t, "__wrapped__"), p = f && aN.call(e, "__wrapped__");
    if (h || p) {
      var v = h ? t.value() : t, g = p ? e.value() : e;
      return a || (a = new Ka()), i(v, g, n, r, a);
    }
  }
  return d ? (a || (a = new Ka()), nve(t, e, n, r, i, a)) : !1;
}
function XS(t, e, n, r, i) {
  return t === e ? !0 : t == null || e == null || !no(t) && !no(e) ? t !== t && e !== e : fve(t, e, n, r, XS, i);
}
function YS(t, e) {
  return XS(t, e);
}
const dve = {
  align: Object,
  target: [Object, Function],
  onAlign: Function,
  monitorBufferTime: Number,
  monitorWindowResize: Boolean,
  disabled: Boolean
};
function oN(t) {
  return typeof t != "function" ? null : t();
}
function sN(t) {
  return typeof t != "object" || !t ? null : t;
}
const hve = te({
  compatConfig: {
    MODE: 3
  },
  name: "Align",
  props: dve,
  emits: ["align"],
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = U({}), a = U(), [o, s] = zde(() => {
      const {
        disabled: d,
        target: h,
        align: p,
        onAlign: v
      } = t;
      if (!d && h && a.value) {
        const g = a.value;
        let m;
        const y = oN(h), b = sN(h);
        i.value.element = y, i.value.point = b, i.value.align = p;
        const {
          activeElement: _
        } = document;
        return y && gZ(y) ? m = yI(g, y, p) : b && (m = kde(g, b, p)), Bde(_, g), v && m && v(g, m), !0;
      }
      return !1;
    }, L(() => t.monitorBufferTime)), l = U({
      cancel: () => {
      }
    }), u = U({
      cancel: () => {
      }
    }), c = () => {
      const d = t.target, h = oN(d), p = sN(d);
      a.value !== u.value.element && (u.value.cancel(), u.value.element = a.value, u.value.cancel = Q8(a.value, o)), (i.value.element !== h || !Nde(i.value.point, p) || !YS(i.value.align, t.align)) && (o(), l.value.element !== h && (l.value.cancel(), l.value.element = h, l.value.cancel = Q8(h, o)));
    };
    it(() => {
      Tt(() => {
        c();
      });
    }), ep(() => {
      Tt(() => {
        c();
      });
    }), se(() => t.disabled, (d) => {
      d ? s() : o();
    }, {
      immediate: !0,
      flush: "post"
    });
    const f = U(null);
    return se(() => t.monitorWindowResize, (d) => {
      d ? f.value || (f.value = vr(window, "resize", o)) : f.value && (f.value.remove(), f.value = null);
    }, {
      flush: "post"
    }), nl(() => {
      l.value.cancel(), u.value.cancel(), f.value && f.value.remove(), s();
    }), n({
      forceAlign: () => o(!0)
    }), () => {
      const d = r == null ? void 0 : r.default();
      return d ? Pn(d[0], {
        ref: a
      }, !0, !0) : null;
    };
  }
});
ru("bottomLeft", "bottomRight", "topLeft", "topRight");
const pve = (t) => t !== void 0 && (t === "topLeft" || t === "topRight") ? "slide-down" : "slide-up", g0 = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(t ? {
    name: t,
    appear: !0,
    // type: 'animation',
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    // appearActiveClass: `antdv-base-transtion`,
    // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
    enterFromClass: `${t}-enter ${t}-enter-prepare ${t}-enter-start`,
    enterActiveClass: `${t}-enter ${t}-enter-prepare`,
    enterToClass: `${t}-enter ${t}-enter-active`,
    leaveFromClass: ` ${t}-leave`,
    leaveActiveClass: `${t}-leave ${t}-leave-active`,
    leaveToClass: `${t}-leave ${t}-leave-active`
  } : {
    css: !1
  }, e);
}, wI = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return I(t ? {
    name: t,
    appear: !0,
    // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
    appearActiveClass: `${t}`,
    appearToClass: `${t}-appear ${t}-appear-active`,
    enterFromClass: `${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,
    enterActiveClass: `${t}`,
    enterToClass: `${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,
    leaveActiveClass: `${t} ${t}-leave`,
    leaveToClass: `${t}-leave-active`
  } : {
    css: !1
  }, e);
}, es = (t, e, n) => n !== void 0 ? n : `${t}-${e}`, vve = te({
  compatConfig: {
    MODE: 3
  },
  name: "PopupInner",
  inheritAttrs: !1,
  props: dI,
  emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
  setup(t, e) {
    let {
      expose: n,
      attrs: r,
      slots: i
    } = e;
    const a = ae(), o = ae(), s = ae(), [l, u] = lde(Nn(t, "stretch")), c = () => {
      t.stretch && u(t.getRootDomNode());
    }, f = ae(!1);
    let d;
    se(() => t.visible, (S) => {
      clearTimeout(d), S ? d = setTimeout(() => {
        f.value = t.visible;
      }) : f.value = !1;
    }, {
      immediate: !0
    });
    const [h, p] = sde(f, c), v = ae(), g = () => t.point ? t.point : t.getRootDomNode, m = () => {
      var S;
      (S = a.value) === null || S === void 0 || S.forceAlign();
    }, y = (S, x) => {
      var C;
      const T = t.getClassNameFromAlign(x), w = s.value;
      s.value !== T && (s.value = T), h.value === "align" && (w !== T ? Promise.resolve().then(() => {
        m();
      }) : p(() => {
        var P;
        (P = v.value) === null || P === void 0 || P.call(v);
      }), (C = t.onAlign) === null || C === void 0 || C.call(t, S, x));
    }, b = L(() => {
      const S = typeof t.animation == "object" ? t.animation : hI(t);
      return ["onAfterEnter", "onAfterLeave"].forEach((x) => {
        const C = S[x];
        S[x] = (T) => {
          p(), h.value = "stable", C == null || C(T);
        };
      }), S;
    }), _ = () => new Promise((S) => {
      v.value = S;
    });
    se([b, h], () => {
      !b.value && h.value === "motion" && p();
    }, {
      immediate: !0
    }), n({
      forceAlign: m,
      getElement: () => o.value.$el || o.value
    });
    const O = L(() => {
      var S;
      return !(!((S = t.align) === null || S === void 0) && S.points && (h.value === "align" || h.value === "stable"));
    });
    return () => {
      var S;
      const {
        zIndex: x,
        align: C,
        prefixCls: T,
        destroyPopupOnHide: w,
        onMouseenter: P,
        onMouseleave: $,
        onTouchstart: A = () => {
        },
        onMousedown: D
      } = t, E = h.value, R = [I(I({}, l.value), {
        zIndex: x,
        opacity: E === "motion" || E === "stable" || !f.value ? null : 0,
        // pointerEvents: statusValue === 'stable' ? null : 'none',
        pointerEvents: !f.value && E !== "stable" ? "none" : null
      }), r.style];
      let N = Yn((S = i.default) === null || S === void 0 ? void 0 : S.call(i, {
        visible: t.visible
      }));
      N.length > 1 && (N = M("div", {
        class: `${T}-content`
      }, [N]));
      const V = ye(T, r.class, s.value, !t.arrow && `${T}-arrow-hidden`), W = f.value || !t.visible ? g0(b.value.name, b.value) : {};
      return M(co, j(j({
        ref: o
      }, W), {}, {
        onBeforeEnter: _
      }), {
        default: () => !w || t.visible ? bi(M(hve, {
          target: g(),
          key: "popup",
          ref: a,
          monitorWindowResize: !0,
          disabled: O.value,
          align: C,
          onAlign: y
        }, {
          default: () => M("div", {
            class: V,
            onMouseenter: P,
            onMouseleave: $,
            onMousedown: lf(D, ["capture"]),
            [pr ? "onTouchstartPassive" : "onTouchstart"]: lf(A, ["capture"]),
            style: R
          }, [N])
        }), [[Bs, f.value]]) : null
      });
    };
  }
}), gve = te({
  compatConfig: {
    MODE: 3
  },
  name: "Popup",
  inheritAttrs: !1,
  props: ide,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      expose: i
    } = e;
    const a = ae(!1), o = ae(!1), s = ae(), l = ae();
    return se([() => t.visible, () => t.mobile], () => {
      a.value = t.visible, t.visible && t.mobile && (o.value = !0);
    }, {
      immediate: !0,
      flush: "post"
    }), i({
      forceAlign: () => {
        var u;
        (u = s.value) === null || u === void 0 || u.forceAlign();
      },
      getElement: () => {
        var u;
        return (u = s.value) === null || u === void 0 ? void 0 : u.getElement();
      }
    }), () => {
      const u = I(I(I({}, t), n), {
        visible: a.value
      }), c = o.value ? M(ade, j(j({}, u), {}, {
        mobile: t.mobile,
        ref: s
      }), {
        default: r.default
      }) : M(vve, j(j({}, u), {}, {
        ref: s
      }), {
        default: r.default
      });
      return M("div", {
        ref: l
      }, [M(sZ, u, null), c]);
    };
  }
});
function mve(t, e, n) {
  return n ? t[0] === e[0] : t[0] === e[0] && t[1] === e[1];
}
function lN(t, e, n) {
  const r = t[e] || {};
  return I(I({}, r), n);
}
function yve(t, e, n, r) {
  const {
    points: i
  } = n, a = Object.keys(t);
  for (let o = 0; o < a.length; o += 1) {
    const s = a[o];
    if (mve(t[s].points, i, r))
      return `${e}-placement-${s}`;
  }
  return "";
}
const qS = {
  methods: {
    setState() {
      let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0, n = typeof t == "function" ? t(this.$data, this.$props) : t;
      if (this.getDerivedStateFromProps) {
        const r = this.getDerivedStateFromProps(Aue(this), I(I({}, this.$data), n));
        if (r === null)
          return;
        n = I(I({}, n), r || {});
      }
      I(this.$data, n), this._.isMounted && this.$forceUpdate(), Tt(() => {
        e && e();
      });
    },
    __emit() {
      const t = [].slice.call(arguments, 0);
      let e = t[0];
      e = `on${e[0].toUpperCase()}${e.substring(1)}`;
      const n = this.$props[e] || this.$attrs[e];
      if (t.length && n)
        if (Array.isArray(n))
          for (let r = 0, i = n.length; r < i; r++)
            n[r](...t.slice(1));
        else
          n(...t.slice(1));
    }
  }
}, $Z = Symbol("PortalContextKey"), CI = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    inTriggerContext: !0
  };
  pt($Z, {
    inTriggerContext: e.inTriggerContext,
    shouldRender: L(() => {
      const {
        sPopupVisible: n,
        popupRef: r,
        forceRender: i,
        autoDestroy: a
      } = t || {};
      let o = !1;
      return (n || r || i) && (o = !0), !n && a && (o = !1), o;
    })
  });
}, bve = () => {
  CI({}, {
    inTriggerContext: !1
  });
  const t = Ge($Z, {
    shouldRender: L(() => !1),
    inTriggerContext: !1
  });
  return {
    shouldRender: L(() => t.shouldRender.value || t.inTriggerContext === !1)
  };
}, AZ = te({
  compatConfig: {
    MODE: 3
  },
  name: "Portal",
  inheritAttrs: !1,
  props: {
    getContainer: Y.func.isRequired,
    didUpdate: Function
  },
  setup(t, e) {
    let {
      slots: n
    } = e, r = !0, i;
    const {
      shouldRender: a
    } = bve();
    function o() {
      a.value && (i = t.getContainer());
    }
    HG(() => {
      r = !1, o();
    }), it(() => {
      i || o();
    });
    const s = se(a, () => {
      a.value && !i && (i = t.getContainer()), i && s();
    });
    return ep(() => {
      Tt(() => {
        var l;
        a.value && ((l = t.didUpdate) === null || l === void 0 || l.call(t, t));
      });
    }), () => {
      var l;
      return a.value ? r ? (l = n.default) === null || l === void 0 ? void 0 : l.call(n) : i ? M(PS, {
        to: i
      }, n) : null : null;
    };
  }
});
let pC;
function _ve(t) {
  if (typeof document > "u")
    return 0;
  if (pC === void 0) {
    const e = document.createElement("div");
    e.style.width = "100%", e.style.height = "200px";
    const n = document.createElement("div"), r = n.style;
    r.position = "absolute", r.top = "0", r.left = "0", r.pointerEvents = "none", r.visibility = "hidden", r.width = "200px", r.height = "150px", r.overflow = "hidden", n.appendChild(e), document.body.appendChild(n);
    const i = e.offsetWidth;
    n.style.overflow = "scroll";
    let a = e.offsetWidth;
    i === a && (a = n.clientWidth), document.body.removeChild(n), pC = i - a;
  }
  return pC;
}
const Ove = `vc-util-locker-${Date.now()}`;
let uN = 0;
function Sve() {
  return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
function xve(t) {
  const e = L(() => !!t && !!t.value);
  uN += 1;
  const n = `${Ove}_${uN}`;
  ht((r) => {
    if (wa()) {
      if (e.value) {
        const i = _ve(), a = Sve();
        Yg(`
html body {
  overflow-y: hidden;
  ${a ? `width: calc(100% - ${i}px);` : ""}
}`, n);
      } else
        m1(n);
      r(() => {
        m1(n);
      });
    }
  }, {
    flush: "post"
  });
}
let Ru = 0;
const x_ = wa(), cN = (t) => {
  if (!x_)
    return null;
  if (t) {
    if (typeof t == "string")
      return document.querySelectorAll(t)[0];
    if (typeof t == "function")
      return t();
    if (typeof t == "object" && t instanceof window.HTMLElement)
      return t;
  }
  return document.body;
}, EZ = te({
  compatConfig: {
    MODE: 3
  },
  name: "PortalWrapper",
  inheritAttrs: !1,
  props: {
    wrapperClassName: String,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getContainer: Y.any,
    visible: {
      type: Boolean,
      default: void 0
    },
    autoLock: nt(),
    didUpdate: Function
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ae(), i = ae(), a = ae(), o = ae(1), s = wa() && document.createElement("div"), l = () => {
      var h, p;
      r.value === s && ((p = (h = r.value) === null || h === void 0 ? void 0 : h.parentNode) === null || p === void 0 || p.removeChild(r.value)), r.value = null;
    };
    let u = null;
    const c = function() {
      return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) || r.value && !r.value.parentNode ? (u = cN(t.getContainer), u ? (u.appendChild(r.value), !0) : !1) : !0;
    }, f = () => x_ ? (r.value || (r.value = s, c(!0)), d(), r.value) : null, d = () => {
      const {
        wrapperClassName: h
      } = t;
      r.value && h && h !== r.value.className && (r.value.className = h);
    };
    return ep(() => {
      d(), c();
    }), xve(L(() => t.autoLock && t.visible && wa() && (r.value === document.body || r.value === s))), it(() => {
      let h = !1;
      se([() => t.visible, () => t.getContainer], (p, v) => {
        let [g, m] = p, [y, b] = v;
        x_ && (u = cN(t.getContainer), u === document.body && (g && !y ? Ru += 1 : h && (Ru -= 1))), h && (typeof m == "function" && typeof b == "function" ? m.toString() !== b.toString() : m !== b) && l(), h = !0;
      }, {
        immediate: !0,
        flush: "post"
      }), Tt(() => {
        c() || (a.value = xt(() => {
          o.value += 1;
        }));
      });
    }), yt(() => {
      const {
        visible: h
      } = t;
      x_ && u === document.body && (Ru = h && Ru ? Ru - 1 : Ru), l(), xt.cancel(a.value);
    }), () => {
      const {
        forceRender: h,
        visible: p
      } = t;
      let v = null;
      const g = {
        getOpenCount: () => Ru,
        getContainer: f
      };
      return o.value && (h || p || i.value) && (v = M(AZ, {
        getContainer: f,
        ref: i,
        didUpdate: t.didUpdate
      }, {
        default: () => {
          var m;
          return (m = n.default) === null || m === void 0 ? void 0 : m.call(n, g);
        }
      })), v;
    };
  }
}), wve = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"], KS = te({
  compatConfig: {
    MODE: 3
  },
  name: "Trigger",
  mixins: [qS],
  inheritAttrs: !1,
  props: nde(),
  setup(t) {
    const e = L(() => {
      const {
        popupPlacement: i,
        popupAlign: a,
        builtinPlacements: o
      } = t;
      return i && o ? lN(o, i, a) : a;
    }), n = ae(null), r = (i) => {
      n.value = i;
    };
    return {
      vcTriggerContext: Ge("vcTriggerContext", {}),
      popupRef: n,
      setPopupRef: r,
      triggerRef: ae(null),
      align: e,
      focusTime: null,
      clickOutsideHandler: null,
      contextmenuOutsideHandler1: null,
      contextmenuOutsideHandler2: null,
      touchOutsideHandler: null,
      attachId: null,
      delayTimer: null,
      hasPopupMouseDown: !1,
      preClickTime: null,
      preTouchTime: null,
      mouseDownTimeout: null,
      childOriginEvents: {}
    };
  },
  data() {
    const t = this.$props;
    let e;
    return this.popupVisible !== void 0 ? e = !!t.popupVisible : e = !!t.defaultPopupVisible, wve.forEach((n) => {
      this[`fire${n}`] = (r) => {
        this.fireEvents(n, r);
      };
    }), {
      prevPopupVisible: e,
      sPopupVisible: e,
      point: null
    };
  },
  watch: {
    popupVisible(t) {
      t !== void 0 && (this.prevPopupVisible = this.sPopupVisible, this.sPopupVisible = t);
    }
  },
  created() {
    pt("vcTriggerContext", {
      onPopupMouseDown: this.onPopupMouseDown,
      onPopupMouseenter: this.onPopupMouseenter,
      onPopupMouseleave: this.onPopupMouseleave
    }), CI(this);
  },
  deactivated() {
    this.setPopupVisible(!1);
  },
  mounted() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  updated() {
    this.$nextTick(() => {
      this.updatedCal();
    });
  },
  beforeUnmount() {
    this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), xt.cancel(this.attachId);
  },
  methods: {
    updatedCal() {
      const t = this.$props;
      if (this.$data.sPopupVisible) {
        let n;
        !this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow()) && (n = t.getDocument(this.getRootDomNode()), this.clickOutsideHandler = vr(n, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (n = n || t.getDocument(this.getRootDomNode()), this.touchOutsideHandler = vr(n, "touchstart", this.onDocumentClick, pr ? {
          passive: !1
        } : !1)), !this.contextmenuOutsideHandler1 && this.isContextmenuToShow() && (n = n || t.getDocument(this.getRootDomNode()), this.contextmenuOutsideHandler1 = vr(n, "scroll", this.onContextmenuClose)), !this.contextmenuOutsideHandler2 && this.isContextmenuToShow() && (this.contextmenuOutsideHandler2 = vr(window, "blur", this.onContextmenuClose));
      } else
        this.clearOutsideHandler();
    },
    onMouseenter(t) {
      const {
        mouseEnterDelay: e
      } = this.$props;
      this.fireEvents("onMouseenter", t), this.delaySetPopupVisible(!0, e, e ? null : t);
    },
    onMouseMove(t) {
      this.fireEvents("onMousemove", t), this.setPoint(t);
    },
    onMouseleave(t) {
      this.fireEvents("onMouseleave", t), this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
    },
    onPopupMouseenter() {
      const {
        vcTriggerContext: t = {}
      } = this;
      t.onPopupMouseenter && t.onPopupMouseenter(), this.clearDelayTimer();
    },
    onPopupMouseleave(t) {
      var e;
      if (t && t.relatedTarget && !t.relatedTarget.setTimeout && $l((e = this.popupRef) === null || e === void 0 ? void 0 : e.getElement(), t.relatedTarget))
        return;
      this.isMouseLeaveToHide() && this.delaySetPopupVisible(!1, this.$props.mouseLeaveDelay);
      const {
        vcTriggerContext: n = {}
      } = this;
      n.onPopupMouseleave && n.onPopupMouseleave(t);
    },
    onFocus(t) {
      this.fireEvents("onFocus", t), this.clearDelayTimer(), this.isFocusToShow() && (this.focusTime = Date.now(), this.delaySetPopupVisible(!0, this.$props.focusDelay));
    },
    onMousedown(t) {
      this.fireEvents("onMousedown", t), this.preClickTime = Date.now();
    },
    onTouchstart(t) {
      this.fireEvents("onTouchstart", t), this.preTouchTime = Date.now();
    },
    onBlur(t) {
      $l(t.target, t.relatedTarget || document.activeElement) || (this.fireEvents("onBlur", t), this.clearDelayTimer(), this.isBlurToHide() && this.delaySetPopupVisible(!1, this.$props.blurDelay));
    },
    onContextmenu(t) {
      t.preventDefault(), this.fireEvents("onContextmenu", t), this.setPopupVisible(!0, t);
    },
    onContextmenuClose() {
      this.isContextmenuToShow() && this.close();
    },
    onClick(t) {
      if (this.fireEvents("onClick", t), this.focusTime) {
        let n;
        if (this.preClickTime && this.preTouchTime ? n = Math.min(this.preClickTime, this.preTouchTime) : this.preClickTime ? n = this.preClickTime : this.preTouchTime && (n = this.preTouchTime), Math.abs(n - this.focusTime) < 20)
          return;
        this.focusTime = 0;
      }
      this.preClickTime = 0, this.preTouchTime = 0, this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && t && t.preventDefault && t.preventDefault(), t && t.domEvent && t.domEvent.preventDefault();
      const e = !this.$data.sPopupVisible;
      (this.isClickToHide() && !e || e && this.isClickToShow()) && this.setPopupVisible(!this.$data.sPopupVisible, t);
    },
    onPopupMouseDown() {
      const {
        vcTriggerContext: t = {}
      } = this;
      this.hasPopupMouseDown = !0, clearTimeout(this.mouseDownTimeout), this.mouseDownTimeout = setTimeout(() => {
        this.hasPopupMouseDown = !1;
      }, 0), t.onPopupMouseDown && t.onPopupMouseDown(...arguments);
    },
    onDocumentClick(t) {
      if (this.$props.mask && !this.$props.maskClosable)
        return;
      const e = t.target, n = this.getRootDomNode(), r = this.getPopupDomNode();
      // mousedown on the target should also close popup when action is contextMenu.
      // https://github.com/ant-design/ant-design/issues/29853
      (!$l(n, e) || this.isContextMenuOnly()) && !$l(r, e) && !this.hasPopupMouseDown && this.delaySetPopupVisible(!1, 0.1);
    },
    getPopupDomNode() {
      var t;
      return ((t = this.popupRef) === null || t === void 0 ? void 0 : t.getElement()) || null;
    },
    getRootDomNode() {
      var t, e, n, r;
      const {
        getTriggerDOMNode: i
      } = this.$props;
      if (i) {
        const a = ((e = (t = this.triggerRef) === null || t === void 0 ? void 0 : t.$el) === null || e === void 0 ? void 0 : e.nodeName) === "#comment" ? null : Cs(this.triggerRef);
        return Cs(i(a));
      }
      try {
        const a = ((r = (n = this.triggerRef) === null || n === void 0 ? void 0 : n.$el) === null || r === void 0 ? void 0 : r.nodeName) === "#comment" ? null : Cs(this.triggerRef);
        if (a)
          return a;
      } catch {
      }
      return Cs(this);
    },
    handleGetPopupClassFromAlign(t) {
      const e = [], n = this.$props, {
        popupPlacement: r,
        builtinPlacements: i,
        prefixCls: a,
        alignPoint: o,
        getPopupClassNameFromAlign: s
      } = n;
      return r && i && e.push(yve(i, a, t, o)), s && e.push(s(t)), e.join(" ");
    },
    getPopupAlign() {
      const t = this.$props, {
        popupPlacement: e,
        popupAlign: n,
        builtinPlacements: r
      } = t;
      return e && r ? lN(r, e, n) : n;
    },
    getComponent() {
      const t = {};
      this.isMouseEnterToShow() && (t.onMouseenter = this.onPopupMouseenter), this.isMouseLeaveToHide() && (t.onMouseleave = this.onPopupMouseleave), t.onMousedown = this.onPopupMouseDown, t[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
      const {
        handleGetPopupClassFromAlign: e,
        getRootDomNode: n,
        $attrs: r
      } = this, {
        prefixCls: i,
        destroyPopupOnHide: a,
        popupClassName: o,
        popupAnimation: s,
        popupTransitionName: l,
        popupStyle: u,
        mask: c,
        maskAnimation: f,
        maskTransitionName: d,
        zIndex: h,
        stretch: p,
        alignPoint: v,
        mobile: g,
        arrow: m,
        forceRender: y
      } = this.$props, {
        sPopupVisible: b,
        point: _
      } = this.$data, O = I(I({
        prefixCls: i,
        arrow: m,
        destroyPopupOnHide: a,
        visible: b,
        point: v ? _ : null,
        align: this.align,
        animation: s,
        getClassNameFromAlign: e,
        stretch: p,
        getRootDomNode: n,
        mask: c,
        zIndex: h,
        transitionName: l,
        maskAnimation: f,
        maskTransitionName: d,
        class: o,
        style: u,
        onAlign: r.onPopupAlign || oZ
      }, t), {
        ref: this.setPopupRef,
        mobile: g,
        forceRender: y
      });
      return M(gve, O, {
        default: this.$slots.popup || (() => Eue(this, "popup"))
      });
    },
    attachParent(t) {
      xt.cancel(this.attachId);
      const {
        getPopupContainer: e,
        getDocument: n
      } = this.$props, r = this.getRootDomNode();
      let i;
      e ? (r || e.length === 0) && (i = e(r)) : i = n(this.getRootDomNode()).body, i ? i.appendChild(t) : this.attachId = xt(() => {
        this.attachParent(t);
      });
    },
    getContainer() {
      const {
        $props: t
      } = this, {
        getDocument: e
      } = t, n = e(this.getRootDomNode()).createElement("div");
      return n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "100%", this.attachParent(n), n;
    },
    setPopupVisible(t, e) {
      const {
        alignPoint: n,
        sPopupVisible: r,
        onPopupVisibleChange: i
      } = this;
      this.clearDelayTimer(), r !== t && (v1(this, "popupVisible") || this.setState({
        sPopupVisible: t,
        prevPopupVisible: r
      }), i && i(t)), n && e && t && this.setPoint(e);
    },
    setPoint(t) {
      const {
        alignPoint: e
      } = this.$props;
      !e || !t || this.setState({
        point: {
          pageX: t.pageX,
          pageY: t.pageY
        }
      });
    },
    handlePortalUpdate() {
      this.prevPopupVisible !== this.sPopupVisible && this.afterPopupVisibleChange(this.sPopupVisible);
    },
    delaySetPopupVisible(t, e, n) {
      const r = e * 1e3;
      if (this.clearDelayTimer(), r) {
        const i = n ? {
          pageX: n.pageX,
          pageY: n.pageY
        } : null;
        this.delayTimer = setTimeout(() => {
          this.setPopupVisible(t, i), this.clearDelayTimer();
        }, r);
      } else
        this.setPopupVisible(t, n);
    },
    clearDelayTimer() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    },
    clearOutsideHandler() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextmenuOutsideHandler1 && (this.contextmenuOutsideHandler1.remove(), this.contextmenuOutsideHandler1 = null), this.contextmenuOutsideHandler2 && (this.contextmenuOutsideHandler2.remove(), this.contextmenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    },
    createTwoChains(t) {
      let e = () => {
      };
      const n = e8(this);
      return this.childOriginEvents[t] && n[t] ? this[`fire${t}`] : (e = this.childOriginEvents[t] || n[t] || e, e);
    },
    isClickToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
    },
    isContextMenuOnly() {
      const {
        action: t
      } = this.$props;
      return t === "contextmenu" || t.length === 1 && t[0] === "contextmenu";
    },
    isContextmenuToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("contextmenu") !== -1 || e.indexOf("contextmenu") !== -1;
    },
    isClickToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("click") !== -1 || e.indexOf("click") !== -1;
    },
    isMouseEnterToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("hover") !== -1 || e.indexOf("mouseenter") !== -1;
    },
    isMouseLeaveToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("hover") !== -1 || e.indexOf("mouseleave") !== -1;
    },
    isFocusToShow() {
      const {
        action: t,
        showAction: e
      } = this.$props;
      return t.indexOf("focus") !== -1 || e.indexOf("focus") !== -1;
    },
    isBlurToHide() {
      const {
        action: t,
        hideAction: e
      } = this.$props;
      return t.indexOf("focus") !== -1 || e.indexOf("blur") !== -1;
    },
    forcePopupAlign() {
      var t;
      this.$data.sPopupVisible && ((t = this.popupRef) === null || t === void 0 || t.forceAlign());
    },
    fireEvents(t, e) {
      this.childOriginEvents[t] && this.childOriginEvents[t](e);
      const n = this.$props[t] || this.$attrs[t];
      n && n(e);
    },
    close() {
      this.setPopupVisible(!1);
    }
  },
  render() {
    const {
      $attrs: t
    } = this, e = os(rj(this)), {
      alignPoint: n,
      getPopupContainer: r
    } = this.$props, i = e[0];
    this.childOriginEvents = e8(i);
    const a = {
      key: "trigger"
    };
    this.isContextmenuToShow() ? a.onContextmenu = this.onContextmenu : a.onContextmenu = this.createTwoChains("onContextmenu"), this.isClickToHide() || this.isClickToShow() ? (a.onClick = this.onClick, a.onMousedown = this.onMousedown, a[pr ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart) : (a.onClick = this.createTwoChains("onClick"), a.onMousedown = this.createTwoChains("onMousedown"), a[pr ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart")), this.isMouseEnterToShow() ? (a.onMouseenter = this.onMouseenter, n && (a.onMousemove = this.onMouseMove)) : a.onMouseenter = this.createTwoChains("onMouseenter"), this.isMouseLeaveToHide() ? a.onMouseleave = this.onMouseleave : a.onMouseleave = this.createTwoChains("onMouseleave"), this.isFocusToShow() || this.isBlurToHide() ? (a.onFocus = this.onFocus, a.onBlur = this.onBlur) : (a.onFocus = this.createTwoChains("onFocus"), a.onBlur = (u) => {
      u && (!u.relatedTarget || !$l(u.target, u.relatedTarget)) && this.createTwoChains("onBlur")(u);
    });
    const o = ye(i && i.props && i.props.class, t.class);
    o && (a.class = o);
    const s = Pn(i, I(I({}, a), {
      ref: "triggerRef"
    }), !0, !0), l = M(EZ, {
      key: "portal",
      getContainer: r && (() => r(this.getRootDomNode())),
      didUpdate: this.handlePortalUpdate,
      visible: this.$data.sPopupVisible
    }, {
      default: this.getComponent
    });
    return M(wt, null, [s, l]);
  }
});
var Cve = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Tve = (t) => {
  const e = t === !0 ? 0 : 1;
  return {
    bottomLeft: {
      points: ["tl", "bl"],
      offset: [0, 4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    bottomRight: {
      points: ["tr", "br"],
      offset: [0, 4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    topLeft: {
      points: ["bl", "tl"],
      offset: [0, -4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    },
    topRight: {
      points: ["br", "tr"],
      offset: [0, -4],
      overflow: {
        adjustX: e,
        adjustY: 1
      }
    }
  };
}, Pve = te({
  name: "SelectTrigger",
  inheritAttrs: !1,
  props: {
    dropdownAlign: Object,
    visible: {
      type: Boolean,
      default: void 0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    dropdownClassName: String,
    dropdownStyle: Y.object,
    placement: String,
    empty: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    popupClassName: String,
    animation: String,
    transitionName: String,
    getPopupContainer: Function,
    dropdownRender: Function,
    containerWidth: Number,
    dropdownMatchSelectWidth: Y.oneOfType([Number, Boolean]).def(!0),
    popupElement: Y.any,
    direction: String,
    getTriggerDOMNode: Function,
    onPopupVisibleChange: Function,
    onPopupMouseEnter: Function,
    onPopupFocusin: Function,
    onPopupFocusout: Function
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    const a = L(() => {
      const {
        dropdownMatchSelectWidth: s
      } = t;
      return Tve(s);
    }), o = U();
    return i({
      getPopupElement: () => o.value
    }), () => {
      const s = I(I({}, t), r), {
        empty: l = !1
      } = s, u = Cve(s, ["empty"]), {
        visible: c,
        dropdownAlign: f,
        prefixCls: d,
        popupElement: h,
        dropdownClassName: p,
        dropdownStyle: v,
        direction: g = "ltr",
        placement: m,
        dropdownMatchSelectWidth: y,
        containerWidth: b,
        dropdownRender: _,
        animation: O,
        transitionName: S,
        getPopupContainer: x,
        getTriggerDOMNode: C,
        onPopupVisibleChange: T,
        onPopupMouseEnter: w,
        onPopupFocusin: P,
        onPopupFocusout: $
      } = u, A = `${d}-dropdown`;
      let D = h;
      _ && (D = _({
        menuNode: h,
        props: t
      }));
      const E = O ? `${A}-${O}` : S, R = I({
        minWidth: `${b}px`
      }, v);
      return typeof y == "number" ? R.width = `${y}px` : y && (R.width = `${b}px`), M(KS, j(j({}, t), {}, {
        showAction: T ? ["click"] : [],
        hideAction: T ? ["click"] : [],
        popupPlacement: m || (g === "rtl" ? "bottomRight" : "bottomLeft"),
        builtinPlacements: a.value,
        prefixCls: A,
        popupTransitionName: E,
        popupAlign: f,
        popupVisible: c,
        getPopupContainer: x,
        popupClassName: ye(p, {
          [`${A}-empty`]: l
        }),
        popupStyle: R,
        getTriggerDOMNode: C,
        onPopupVisibleChange: T
      }), {
        default: n.default,
        popup: () => M("div", {
          ref: o,
          onMouseenter: w,
          onFocusin: P,
          onFocusout: $
        }, [D])
      });
    };
  }
}), ge = {
  /**
   * MAC_ENTER
   */
  MAC_ENTER: 3,
  /**
   * BACKSPACE
   */
  BACKSPACE: 8,
  /**
   * TAB
   */
  TAB: 9,
  /**
   * NUMLOCK on FF/Safari Mac
   */
  NUM_CENTER: 12,
  /**
   * ENTER
   */
  ENTER: 13,
  /**
   * SHIFT
   */
  SHIFT: 16,
  /**
   * CTRL
   */
  CTRL: 17,
  /**
   * ALT
   */
  ALT: 18,
  /**
   * PAUSE
   */
  PAUSE: 19,
  /**
   * CAPS_LOCK
   */
  CAPS_LOCK: 20,
  /**
   * ESC
   */
  ESC: 27,
  /**
   * SPACE
   */
  SPACE: 32,
  /**
   * PAGE_UP
   */
  PAGE_UP: 33,
  /**
   * PAGE_DOWN
   */
  PAGE_DOWN: 34,
  /**
   * END
   */
  END: 35,
  /**
   * HOME
   */
  HOME: 36,
  /**
   * LEFT
   */
  LEFT: 37,
  /**
   * UP
   */
  UP: 38,
  /**
   * RIGHT
   */
  RIGHT: 39,
  /**
   * DOWN
   */
  DOWN: 40,
  /**
   * PRINT_SCREEN
   */
  PRINT_SCREEN: 44,
  /**
   * INSERT
   */
  INSERT: 45,
  /**
   * DELETE
   */
  DELETE: 46,
  /**
   * ZERO
   */
  ZERO: 48,
  /**
   * ONE
   */
  ONE: 49,
  /**
   * TWO
   */
  TWO: 50,
  /**
   * THREE
   */
  THREE: 51,
  /**
   * FOUR
   */
  FOUR: 52,
  /**
   * FIVE
   */
  FIVE: 53,
  /**
   * SIX
   */
  SIX: 54,
  /**
   * SEVEN
   */
  SEVEN: 55,
  /**
   * EIGHT
   */
  EIGHT: 56,
  /**
   * NINE
   */
  NINE: 57,
  /**
   * QUESTION_MARK
   */
  QUESTION_MARK: 63,
  /**
   * A
   */
  A: 65,
  /**
   * B
   */
  B: 66,
  /**
   * C
   */
  C: 67,
  /**
   * D
   */
  D: 68,
  /**
   * E
   */
  E: 69,
  /**
   * F
   */
  F: 70,
  /**
   * G
   */
  G: 71,
  /**
   * H
   */
  H: 72,
  /**
   * I
   */
  I: 73,
  /**
   * J
   */
  J: 74,
  /**
   * K
   */
  K: 75,
  /**
   * L
   */
  L: 76,
  /**
   * M
   */
  M: 77,
  /**
   * N
   */
  N: 78,
  /**
   * O
   */
  O: 79,
  /**
   * P
   */
  P: 80,
  /**
   * Q
   */
  Q: 81,
  /**
   * R
   */
  R: 82,
  /**
   * S
   */
  S: 83,
  /**
   * T
   */
  T: 84,
  /**
   * U
   */
  U: 85,
  /**
   * V
   */
  V: 86,
  /**
   * W
   */
  W: 87,
  /**
   * X
   */
  X: 88,
  /**
   * Y
   */
  Y: 89,
  /**
   * Z
   */
  Z: 90,
  /**
   * META
   */
  META: 91,
  /**
   * WIN_KEY_RIGHT
   */
  WIN_KEY_RIGHT: 92,
  /**
   * CONTEXT_MENU
   */
  CONTEXT_MENU: 93,
  /**
   * NUM_ZERO
   */
  NUM_ZERO: 96,
  /**
   * NUM_ONE
   */
  NUM_ONE: 97,
  /**
   * NUM_TWO
   */
  NUM_TWO: 98,
  /**
   * NUM_THREE
   */
  NUM_THREE: 99,
  /**
   * NUM_FOUR
   */
  NUM_FOUR: 100,
  /**
   * NUM_FIVE
   */
  NUM_FIVE: 101,
  /**
   * NUM_SIX
   */
  NUM_SIX: 102,
  /**
   * NUM_SEVEN
   */
  NUM_SEVEN: 103,
  /**
   * NUM_EIGHT
   */
  NUM_EIGHT: 104,
  /**
   * NUM_NINE
   */
  NUM_NINE: 105,
  /**
   * NUM_MULTIPLY
   */
  NUM_MULTIPLY: 106,
  /**
   * NUM_PLUS
   */
  NUM_PLUS: 107,
  /**
   * NUM_MINUS
   */
  NUM_MINUS: 109,
  /**
   * NUM_PERIOD
   */
  NUM_PERIOD: 110,
  /**
   * NUM_DIVISION
   */
  NUM_DIVISION: 111,
  /**
   * F1
   */
  F1: 112,
  /**
   * F2
   */
  F2: 113,
  /**
   * F3
   */
  F3: 114,
  /**
   * F4
   */
  F4: 115,
  /**
   * F5
   */
  F5: 116,
  /**
   * F6
   */
  F6: 117,
  /**
   * F7
   */
  F7: 118,
  /**
   * F8
   */
  F8: 119,
  /**
   * F9
   */
  F9: 120,
  /**
   * F10
   */
  F10: 121,
  /**
   * F11
   */
  F11: 122,
  /**
   * F12
   */
  F12: 123,
  /**
   * NUMLOCK
   */
  NUMLOCK: 144,
  /**
   * SEMICOLON
   */
  SEMICOLON: 186,
  /**
   * DASH
   */
  DASH: 189,
  /**
   * EQUALS
   */
  EQUALS: 187,
  /**
   * COMMA
   */
  COMMA: 188,
  /**
   * PERIOD
   */
  PERIOD: 190,
  /**
   * SLASH
   */
  SLASH: 191,
  /**
   * APOSTROPHE
   */
  APOSTROPHE: 192,
  /**
   * SINGLE_QUOTE
   */
  SINGLE_QUOTE: 222,
  /**
   * OPEN_SQUARE_BRACKET
   */
  OPEN_SQUARE_BRACKET: 219,
  /**
   * BACKSLASH
   */
  BACKSLASH: 220,
  /**
   * CLOSE_SQUARE_BRACKET
   */
  CLOSE_SQUARE_BRACKET: 221,
  /**
   * WIN_KEY
   */
  WIN_KEY: 224,
  /**
   * MAC_FF_META
   */
  MAC_FF_META: 224,
  /**
   * WIN_IME
   */
  WIN_IME: 229,
  // ======================== Function ========================
  /**
   * whether text and modified key is entered at the same time.
   */
  isTextModifyingKeyEvent: function(e) {
    const {
      keyCode: n
    } = e;
    if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text
    n >= ge.F1 && n <= ge.F12)
      return !1;
    switch (n) {
      case ge.ALT:
      case ge.CAPS_LOCK:
      case ge.CONTEXT_MENU:
      case ge.CTRL:
      case ge.DOWN:
      case ge.END:
      case ge.ESC:
      case ge.HOME:
      case ge.INSERT:
      case ge.LEFT:
      case ge.MAC_FF_META:
      case ge.META:
      case ge.NUMLOCK:
      case ge.NUM_CENTER:
      case ge.PAGE_DOWN:
      case ge.PAGE_UP:
      case ge.PAUSE:
      case ge.PRINT_SCREEN:
      case ge.RIGHT:
      case ge.SHIFT:
      case ge.UP:
      case ge.WIN_KEY:
      case ge.WIN_KEY_RIGHT:
        return !1;
      default:
        return !0;
    }
  },
  /**
   * whether character is entered.
   */
  isCharacterKey: function(e) {
    if (e >= ge.ZERO && e <= ge.NINE || e >= ge.NUM_ZERO && e <= ge.NUM_MULTIPLY || e >= ge.A && e <= ge.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0)
      return !0;
    switch (e) {
      case ge.SPACE:
      case ge.QUESTION_MARK:
      case ge.NUM_PLUS:
      case ge.NUM_MINUS:
      case ge.NUM_PERIOD:
      case ge.NUM_DIVISION:
      case ge.SEMICOLON:
      case ge.DASH:
      case ge.EQUALS:
      case ge.COMMA:
      case ge.PERIOD:
      case ge.SLASH:
      case ge.APOSTROPHE:
      case ge.SINGLE_QUOTE:
      case ge.OPEN_SQUARE_BRACKET:
      case ge.BACKSLASH:
      case ge.CLOSE_SQUARE_BRACKET:
        return !0;
      default:
        return !1;
    }
  }
}, pf = (t, e) => {
  let {
    slots: n
  } = e;
  var r;
  const {
    class: i,
    customizeIcon: a,
    customizeIconProps: o,
    onMousedown: s,
    onClick: l
  } = t;
  let u;
  return typeof a == "function" ? u = a(o) : u = nu(a) ? Ns(a) : a, M("span", {
    class: i,
    onMousedown: (c) => {
      c.preventDefault(), s && s(c);
    },
    style: {
      userSelect: "none",
      WebkitUserSelect: "none"
    },
    unselectable: "on",
    onClick: l,
    "aria-hidden": !0
  }, [u !== void 0 ? u : M("span", {
    class: i.split(/\s+/).map((c) => `${c}-icon`)
  }, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
};
pf.inheritAttrs = !1;
pf.displayName = "TransBtn";
pf.props = {
  class: String,
  customizeIcon: Y.any,
  customizeIconProps: Y.any,
  onMousedown: Function,
  onClick: Function
};
var $ve = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Ave = te({
  compatConfig: {
    MODE: 3
  },
  // inheritAttrs: false,
  props: {
    disabled: Y.looseBool,
    type: Y.string,
    value: Y.any,
    tag: {
      type: String,
      default: "input"
    },
    size: Y.string,
    onChange: Function,
    onInput: Function,
    onBlur: Function,
    onFocus: Function,
    onKeydown: Function,
    onCompositionstart: Function,
    onCompositionend: Function,
    onKeyup: Function,
    onPaste: Function,
    onMousedown: Function
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = ae(null);
    return n({
      focus: () => {
        r.value && r.value.focus();
      },
      blur: () => {
        r.value && r.value.blur();
      },
      input: r,
      setSelectionRange: (l, u, c) => {
        var f;
        (f = r.value) === null || f === void 0 || f.setSelectionRange(l, u, c);
      },
      select: () => {
        var l;
        (l = r.value) === null || l === void 0 || l.select();
      },
      getSelectionStart: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.selectionStart;
      },
      getSelectionEnd: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.selectionEnd;
      },
      getScrollTop: () => {
        var l;
        return (l = r.value) === null || l === void 0 ? void 0 : l.scrollTop;
      }
    }), () => {
      const {
        tag: l,
        value: u
      } = t, c = $ve(t, ["tag", "value"]);
      return M(l, j(j({}, c), {}, {
        ref: r,
        value: u
      }), null);
    };
  }
});
function Eve() {
  const t = document.documentElement.clientWidth, e = window.innerHeight || document.documentElement.clientHeight;
  return {
    width: t,
    height: e
  };
}
function MZ(t) {
  const e = t.getBoundingClientRect(), n = document.documentElement;
  return {
    left: e.left + (window.scrollX || n.scrollLeft) - (n.clientLeft || document.body.clientLeft || 0),
    top: e.top + (window.scrollY || n.scrollTop) - (n.clientTop || document.body.clientTop || 0)
  };
}
function Mve(t) {
  return Object.keys(t).reduce((e, n) => {
    const r = t[n];
    return typeof r > "u" || r === null || (e += `${n}: ${t[n]};`), e;
  }, "");
}
var Ive = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const TI = te({
  compatConfig: {
    MODE: 3
  },
  inheritAttrs: !1,
  props: {
    disabled: Y.looseBool,
    type: Y.string,
    value: Y.any,
    lazy: Y.bool.def(!0),
    tag: {
      type: String,
      default: "input"
    },
    size: Y.string,
    style: Y.oneOfType([String, Object]),
    class: Y.string
  },
  emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
  setup(t, e) {
    let {
      emit: n,
      attrs: r,
      expose: i
    } = e;
    const a = ae(null), o = U(), s = U(!1);
    se([() => t.value, s], () => {
      s.value || (o.value = t.value);
    }, {
      immediate: !0
    });
    const l = (x) => {
      n("change", x);
    }, u = (x) => {
      s.value = !0, x.target.composing = !0, n("compositionstart", x);
    }, c = (x) => {
      s.value = !1, x.target.composing = !1, n("compositionend", x);
      const C = document.createEvent("HTMLEvents");
      C.initEvent("input", !0, !0), x.target.dispatchEvent(C), l(x);
    }, f = (x) => {
      if (s.value && t.lazy) {
        o.value = x.target.value;
        return;
      }
      n("input", x);
    }, d = (x) => {
      n("blur", x);
    }, h = (x) => {
      n("focus", x);
    }, p = () => {
      a.value && a.value.focus();
    }, v = () => {
      a.value && a.value.blur();
    }, g = (x) => {
      n("keydown", x);
    }, m = (x) => {
      n("keyup", x);
    }, y = (x, C, T) => {
      var w;
      (w = a.value) === null || w === void 0 || w.setSelectionRange(x, C, T);
    }, b = () => {
      var x;
      (x = a.value) === null || x === void 0 || x.select();
    };
    i({
      focus: p,
      blur: v,
      input: L(() => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.input;
      }),
      setSelectionRange: y,
      select: b,
      getSelectionStart: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionStart();
      },
      getSelectionEnd: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getSelectionEnd();
      },
      getScrollTop: () => {
        var x;
        return (x = a.value) === null || x === void 0 ? void 0 : x.getScrollTop();
      }
    });
    const _ = (x) => {
      n("mousedown", x);
    }, O = (x) => {
      n("paste", x);
    }, S = L(() => t.style && typeof t.style != "string" ? Mve(t.style) : t.style);
    return () => {
      const x = Ive(t, ["style", "lazy"]);
      return M(Ave, j(j(j({}, x), r), {}, {
        style: S.value,
        onInput: f,
        onChange: l,
        onBlur: d,
        onFocus: h,
        ref: a,
        value: o.value,
        onCompositionstart: u,
        onCompositionend: c,
        onKeyup: m,
        onKeydown: g,
        onPaste: O,
        onMousedown: _
      }), null);
    };
  }
}), Dve = {
  inputRef: Y.any,
  prefixCls: String,
  id: String,
  inputElement: Y.VueNode,
  disabled: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  editable: {
    type: Boolean,
    default: void 0
  },
  activeDescendantId: String,
  value: String,
  open: {
    type: Boolean,
    default: void 0
  },
  tabindex: Y.oneOfType([Y.number, Y.string]),
  /** Pass accessibility props to input */
  attrs: Y.object,
  onKeydown: {
    type: Function
  },
  onMousedown: {
    type: Function
  },
  onChange: {
    type: Function
  },
  onPaste: {
    type: Function
  },
  onCompositionstart: {
    type: Function
  },
  onCompositionend: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  onBlur: {
    type: Function
  }
}, IZ = te({
  compatConfig: {
    MODE: 3
  },
  name: "SelectInput",
  inheritAttrs: !1,
  props: Dve,
  setup(t) {
    let e = null;
    const n = Ge("VCSelectContainerEvent");
    return () => {
      var r;
      const {
        prefixCls: i,
        id: a,
        inputElement: o,
        disabled: s,
        tabindex: l,
        autofocus: u,
        autocomplete: c,
        editable: f,
        activeDescendantId: d,
        value: h,
        onKeydown: p,
        onMousedown: v,
        onChange: g,
        onPaste: m,
        onCompositionstart: y,
        onCompositionend: b,
        onFocus: _,
        onBlur: O,
        open: S,
        inputRef: x,
        attrs: C
      } = t;
      let T = o || M(TI, null, null);
      const w = T.props || {}, {
        onKeydown: P,
        onInput: $,
        onFocus: A,
        onBlur: D,
        onMousedown: E,
        onCompositionstart: R,
        onCompositionend: N,
        style: V
      } = w;
      return T = Pn(T, I(I(I(I(I({
        type: "search"
      }, w), {
        id: a,
        ref: x,
        disabled: s,
        tabindex: l,
        lazy: !1,
        autocomplete: c || "off",
        autofocus: u,
        class: ye(`${i}-selection-search-input`, (r = T == null ? void 0 : T.props) === null || r === void 0 ? void 0 : r.class),
        role: "combobox",
        "aria-expanded": S,
        "aria-haspopup": "listbox",
        "aria-owns": `${a}_list`,
        "aria-autocomplete": "list",
        "aria-controls": `${a}_list`,
        "aria-activedescendant": d
      }), C), {
        value: f ? h : "",
        readonly: !f,
        unselectable: f ? null : "on",
        style: I(I({}, V), {
          opacity: f ? null : 0
        }),
        onKeydown: (z) => {
          p(z), P && P(z);
        },
        onMousedown: (z) => {
          v(z), E && E(z);
        },
        onInput: (z) => {
          g(z), $ && $(z);
        },
        onCompositionstart(z) {
          y(z), R && R(z);
        },
        onCompositionend(z) {
          b(z), N && N(z);
        },
        onPaste: m,
        onFocus: function() {
          clearTimeout(e), A && A(arguments.length <= 0 ? void 0 : arguments[0]), _ && _(arguments.length <= 0 ? void 0 : arguments[0]), n == null || n.focus(arguments.length <= 0 ? void 0 : arguments[0]);
        },
        onBlur: function() {
          for (var z = arguments.length, W = new Array(z), F = 0; F < z; F++)
            W[F] = arguments[F];
          e = setTimeout(() => {
            D && D(W[0]), O && O(W[0]), n == null || n.blur(W[0]);
          }, 100);
        }
      }), T.type === "textarea" ? {} : {
        type: "search"
      }), !0, !0), T;
    };
  }
}), Rve = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`, kve = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, fN = `${Rve} ${kve}`.split(/[\s\n]+/), Lve = "aria-", Nve = "data-";
function dN(t, e) {
  return t.indexOf(e) === 0;
}
function JS(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n;
  e === !1 ? n = {
    aria: !0,
    data: !0,
    attr: !0
  } : e === !0 ? n = {
    aria: !0
  } : n = I({}, e);
  const r = {};
  return Object.keys(t).forEach((i) => {
    // Aria
    (n.aria && (i === "role" || dN(i, Lve)) || // Data
    n.data && dN(i, Nve) || // Attr
    n.attr && (fN.includes(i) || fN.includes(i.toLowerCase()))) && (r[i] = t[i]);
  }), r;
}
const DZ = Symbol("OverflowContextProviderKey"), P2 = te({
  compatConfig: {
    MODE: 3
  },
  name: "OverflowContextProvider",
  inheritAttrs: !1,
  props: {
    value: {
      type: Object
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return pt(DZ, L(() => t.value)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), Bve = () => Ge(DZ, L(() => null));
var zve = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Zf = void 0, w_ = te({
  compatConfig: {
    MODE: 3
  },
  name: "Item",
  props: {
    prefixCls: String,
    item: Y.any,
    renderItem: Function,
    responsive: Boolean,
    itemKey: {
      type: [String, Number]
    },
    registerSize: Function,
    display: Boolean,
    order: Number,
    component: Y.any,
    invalidate: Boolean
  },
  setup(t, e) {
    let {
      slots: n,
      expose: r
    } = e;
    const i = L(() => t.responsive && !t.display), a = U();
    r({
      itemNodeRef: a
    });
    function o(s) {
      t.registerSize(t.itemKey, s);
    }
    return nl(() => {
      o(null);
    }), () => {
      var s;
      const {
        prefixCls: l,
        invalidate: u,
        item: c,
        renderItem: f,
        responsive: d,
        registerSize: h,
        itemKey: p,
        display: v,
        order: g,
        component: m = "div"
      } = t, y = zve(t, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), b = (s = n.default) === null || s === void 0 ? void 0 : s.call(n), _ = f && c !== Zf ? f(c) : b;
      let O;
      u || (O = {
        opacity: i.value ? 0 : 1,
        height: i.value ? 0 : Zf,
        overflowY: i.value ? "hidden" : Zf,
        order: d ? g : Zf,
        pointerEvents: i.value ? "none" : Zf,
        position: i.value ? "absolute" : Zf
      });
      const S = {};
      return i.value && (S["aria-hidden"] = !0), M(ph, {
        disabled: !d,
        onResize: (x) => {
          let {
            offsetWidth: C
          } = x;
          o(C);
        }
      }, {
        default: () => M(m, j(j(j({
          class: ye(!u && l),
          style: O
        }, S), y), {}, {
          ref: a
        }), {
          default: () => [_]
        })
      });
    };
  }
});
var vC = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Vve = te({
  compatConfig: {
    MODE: 3
  },
  name: "RawItem",
  inheritAttrs: !1,
  props: {
    component: Y.any,
    title: Y.any,
    id: String,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onClick: {
      type: Function
    },
    onKeydown: {
      type: Function
    },
    onFocus: {
      type: Function
    },
    role: String,
    tabindex: Number
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = Bve();
    return () => {
      var a;
      if (!i.value) {
        const {
          component: f = "div"
        } = t, d = vC(t, ["component"]);
        return M(f, j(j({}, d), r), {
          default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
        });
      }
      const o = i.value, {
        className: s
      } = o, l = vC(o, ["className"]), {
        class: u
      } = r, c = vC(r, ["class"]);
      return M(P2, {
        value: null
      }, {
        default: () => [M(w_, j(j(j({
          class: ye(s, u)
        }, l), c), t), n)]
      });
    };
  }
});
var Fve = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const RZ = "responsive", kZ = "invalidate";
function Wve(t) {
  return `+ ${t.length} ...`;
}
const Qve = () => ({
  id: String,
  prefixCls: String,
  data: Array,
  itemKey: [String, Number, Function],
  /** Used for `responsive`. It will limit render node to avoid perf issue */
  itemWidth: {
    type: Number,
    default: 10
  },
  renderItem: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawItem: Function,
  maxCount: [Number, String],
  renderRest: Function,
  /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
  renderRawRest: Function,
  suffix: Y.any,
  component: String,
  itemComponent: Y.any,
  /** @private This API may be refactor since not well design */
  onVisibleChange: Function,
  /** When set to `full`, ssr will render full items by default and remove at client side */
  ssr: String,
  onMousedown: Function
}), Ms = te({
  name: "Overflow",
  inheritAttrs: !1,
  props: Qve(),
  emits: ["visibleChange"],
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      slots: i
    } = e;
    const a = L(() => t.ssr === "full"), o = ae(null), s = L(() => o.value || 0), l = ae(/* @__PURE__ */ new Map()), u = ae(0), c = ae(0), f = ae(0), d = ae(null), h = ae(null), p = L(() => h.value === null && a.value ? Number.MAX_SAFE_INTEGER : h.value || 0), v = ae(!1), g = L(() => `${t.prefixCls}-item`), m = L(() => Math.max(u.value, c.value)), y = L(() => !!(t.data.length && t.maxCount === RZ)), b = L(() => t.maxCount === kZ), _ = L(() => y.value || typeof t.maxCount == "number" && t.data.length > t.maxCount), O = L(() => {
      let E = t.data;
      return y.value ? o.value === null && a.value ? E = t.data : E = t.data.slice(0, Math.min(t.data.length, s.value / t.itemWidth)) : typeof t.maxCount == "number" && (E = t.data.slice(0, t.maxCount)), E;
    }), S = L(() => y.value ? t.data.slice(p.value + 1) : t.data.slice(O.value.length)), x = (E, R) => {
      var N;
      return typeof t.itemKey == "function" ? t.itemKey(E) : (N = t.itemKey && (E == null ? void 0 : E[t.itemKey])) !== null && N !== void 0 ? N : R;
    }, C = L(() => t.renderItem || ((E) => E)), T = (E, R) => {
      h.value = E, R || (v.value = E < t.data.length - 1, r("visibleChange", E));
    }, w = (E, R) => {
      o.value = R.clientWidth;
    }, P = (E, R) => {
      const N = new Map(l.value);
      R === null ? N.delete(E) : N.set(E, R), l.value = N;
    }, $ = (E, R) => {
      u.value = c.value, c.value = R;
    }, A = (E, R) => {
      f.value = R;
    }, D = (E) => l.value.get(x(O.value[E], E));
    return se([s, l, c, f, () => t.itemKey, O], () => {
      if (s.value && m.value && O.value) {
        let E = f.value;
        const R = O.value.length, N = R - 1;
        if (!R) {
          T(0), d.value = null;
          return;
        }
        for (let V = 0; V < R; V += 1) {
          const z = D(V);
          if (z === void 0) {
            T(V - 1, !0);
            break;
          }
          if (E += z, // Only one means `totalWidth` is the final width
          N === 0 && E <= s.value || // Last two width will be the final width
          V === N - 1 && E + D(N) <= s.value) {
            T(N), d.value = null;
            break;
          } else if (E + m.value > s.value) {
            T(V - 1), d.value = E - z - f.value + c.value;
            break;
          }
        }
        t.suffix && D(0) + f.value > s.value && (d.value = null);
      }
    }), () => {
      const E = v.value && !!S.value.length, {
        itemComponent: R,
        renderRawItem: N,
        renderRawRest: V,
        renderRest: z,
        prefixCls: W = "rc-overflow",
        suffix: F,
        component: Q = "div",
        id: Z,
        onMousedown: ne
      } = t, {
        class: ee,
        style: oe
      } = n, K = Fve(n, ["class", "style"]);
      let ie = {};
      d.value !== null && y.value && (ie = {
        position: "absolute",
        left: `${d.value}px`,
        top: 0
      });
      const X = {
        prefixCls: g.value,
        responsive: y.value,
        component: R,
        invalidate: b.value
      }, H = N ? (de, Ee) => {
        const $e = x(de, Ee);
        return M(P2, {
          key: $e,
          value: I(I({}, X), {
            order: Ee,
            item: de,
            itemKey: $e,
            registerSize: P,
            display: Ee <= p.value
          })
        }, {
          default: () => [N(de, Ee)]
        });
      } : (de, Ee) => {
        const $e = x(de, Ee);
        return M(w_, j(j({}, X), {}, {
          order: Ee,
          key: $e,
          item: de,
          renderItem: C.value,
          itemKey: $e,
          registerSize: P,
          display: Ee <= p.value
        }), null);
      };
      let G = () => null;
      const re = {
        order: E ? p.value : Number.MAX_SAFE_INTEGER,
        className: `${g.value} ${g.value}-rest`,
        registerSize: $,
        display: E
      };
      if (V)
        V && (G = () => M(P2, {
          value: I(I({}, X), re)
        }, {
          default: () => [V(S.value)]
        }));
      else {
        const de = z || Wve;
        G = () => M(w_, j(j({}, X), re), {
          default: () => typeof de == "function" ? de(S.value) : de
        });
      }
      const fe = () => {
        var de;
        return M(Q, j({
          id: Z,
          class: ye(!b.value && W, ee),
          style: oe,
          onMousedown: ne
        }, K), {
          default: () => [O.value.map(H), _.value ? G() : null, F && M(w_, j(j({}, X), {}, {
            order: p.value,
            class: `${g.value}-suffix`,
            registerSize: A,
            display: !0,
            style: ie
          }), {
            default: () => F
          }), (de = i.default) === null || de === void 0 ? void 0 : de.call(i)]
        });
      };
      return M(ph, {
        disabled: !y.value,
        onResize: w
      }, {
        default: fe
      });
    };
  }
});
Ms.Item = Vve;
Ms.RESPONSIVE = RZ;
Ms.INVALIDATE = kZ;
const Hve = Symbol("TreeSelectLegacyContextPropsKey");
function PI() {
  return Ge(Hve, {});
}
const Gve = {
  id: String,
  prefixCls: String,
  values: Y.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: Y.any,
  placeholder: Y.any,
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: Y.oneOfType([Y.number, Y.string]),
  compositionStatus: Boolean,
  removeIcon: Y.any,
  choiceTransitionName: String,
  maxTagCount: Y.oneOfType([Y.number, Y.string]),
  maxTagTextLength: Number,
  maxTagPlaceholder: Y.any.def(() => (t) => `+ ${t.length} ...`),
  tagRender: Function,
  onToggleOpen: {
    type: Function
  },
  onRemove: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, hN = (t) => {
  t.preventDefault(), t.stopPropagation();
}, jve = te({
  name: "MultipleSelectSelector",
  inheritAttrs: !1,
  props: Gve,
  setup(t) {
    const e = ae(), n = ae(0), r = ae(!1), i = PI(), a = L(() => `${t.prefixCls}-selection`), o = L(() => t.open || t.mode === "tags" ? t.searchValue : ""), s = L(() => t.mode === "tags" || t.showSearch && (t.open || r.value)), l = U("");
    ht(() => {
      l.value = o.value;
    }), it(() => {
      se(l, () => {
        n.value = e.value.scrollWidth;
      }, {
        flush: "post",
        immediate: !0
      });
    });
    function u(p, v, g, m, y) {
      return M("span", {
        class: ye(`${a.value}-item`, {
          [`${a.value}-item-disabled`]: g
        }),
        title: typeof p == "string" || typeof p == "number" ? p.toString() : void 0
      }, [M("span", {
        class: `${a.value}-item-content`
      }, [v]), m && M(pf, {
        class: `${a.value}-item-remove`,
        onMousedown: hN,
        onClick: y,
        customizeIcon: t.removeIcon
      }, {
        default: () => [Kt("×")]
      })]);
    }
    function c(p, v, g, m, y, b) {
      var _;
      const O = (x) => {
        hN(x), t.onToggleOpen(!open);
      };
      let S = b;
      return i.keyEntities && (S = ((_ = i.keyEntities[p]) === null || _ === void 0 ? void 0 : _.node) || {}), M("span", {
        key: p,
        onMousedown: O
      }, [t.tagRender({
        label: v,
        value: p,
        disabled: g,
        closable: m,
        onClose: y,
        option: S
      })]);
    }
    function f(p) {
      const {
        disabled: v,
        label: g,
        value: m,
        option: y
      } = p, b = !t.disabled && !v;
      let _ = g;
      if (typeof t.maxTagTextLength == "number" && (typeof g == "string" || typeof g == "number")) {
        const S = String(_);
        S.length > t.maxTagTextLength && (_ = `${S.slice(0, t.maxTagTextLength)}...`);
      }
      const O = (S) => {
        var x;
        S && S.stopPropagation(), (x = t.onRemove) === null || x === void 0 || x.call(t, p);
      };
      return typeof t.tagRender == "function" ? c(m, _, v, b, O, y) : u(g, _, v, b, O);
    }
    function d(p) {
      const {
        maxTagPlaceholder: v = (m) => `+ ${m.length} ...`
      } = t, g = typeof v == "function" ? v(p) : v;
      return u(g, g, !1);
    }
    const h = (p) => {
      const v = p.target.composing;
      l.value = p.target.value, v || t.onInputChange(p);
    };
    return () => {
      const {
        id: p,
        prefixCls: v,
        values: g,
        open: m,
        inputRef: y,
        placeholder: b,
        disabled: _,
        autofocus: O,
        autocomplete: S,
        activeDescendantId: x,
        tabindex: C,
        compositionStatus: T,
        onInputPaste: w,
        onInputKeyDown: P,
        onInputMouseDown: $,
        onInputCompositionStart: A,
        onInputCompositionEnd: D
      } = t, E = M("div", {
        class: `${a.value}-search`,
        style: {
          width: n.value + "px"
        },
        key: "input"
      }, [M(IZ, {
        inputRef: y,
        open: m,
        prefixCls: v,
        id: p,
        inputElement: null,
        disabled: _,
        autofocus: O,
        autocomplete: S,
        editable: s.value,
        activeDescendantId: x,
        value: l.value,
        onKeydown: P,
        onMousedown: $,
        onChange: h,
        onPaste: w,
        onCompositionstart: A,
        onCompositionend: D,
        tabindex: C,
        attrs: JS(t, !0),
        onFocus: () => r.value = !0,
        onBlur: () => r.value = !1
      }, null), M("span", {
        ref: e,
        class: `${a.value}-search-mirror`,
        "aria-hidden": !0
      }, [l.value, Kt(" ")])]), R = M(Ms, {
        prefixCls: `${a.value}-overflow`,
        data: g,
        renderItem: f,
        renderRest: d,
        suffix: E,
        itemKey: "key",
        maxCount: t.maxTagCount,
        key: "overflow"
      }, null);
      return M(wt, null, [R, !g.length && !o.value && !T && M("span", {
        class: `${a.value}-placeholder`
      }, [b])]);
    };
  }
}), Zve = {
  inputElement: Y.any,
  id: String,
  prefixCls: String,
  values: Y.array,
  open: {
    type: Boolean,
    default: void 0
  },
  searchValue: String,
  inputRef: Y.any,
  placeholder: Y.any,
  compositionStatus: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  mode: String,
  showSearch: {
    type: Boolean,
    default: void 0
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  autocomplete: String,
  activeDescendantId: String,
  tabindex: Y.oneOfType([Y.number, Y.string]),
  activeValue: String,
  backfill: {
    type: Boolean,
    default: void 0
  },
  optionLabelRender: Function,
  onInputChange: Function,
  onInputPaste: Function,
  onInputKeyDown: Function,
  onInputMouseDown: Function,
  onInputCompositionStart: Function,
  onInputCompositionEnd: Function
}, $I = te({
  name: "SingleSelector",
  setup(t) {
    const e = ae(!1), n = L(() => t.mode === "combobox"), r = L(() => n.value || t.showSearch), i = L(() => {
      let c = t.searchValue || "";
      return n.value && t.activeValue && !e.value && (c = t.activeValue), c;
    }), a = PI();
    se([n, () => t.activeValue], () => {
      n.value && (e.value = !1);
    }, {
      immediate: !0
    });
    const o = L(() => t.mode !== "combobox" && !t.open && !t.showSearch ? !1 : !!i.value || t.compositionStatus), s = L(() => {
      const c = t.values[0];
      return c && (typeof c.label == "string" || typeof c.label == "number") ? c.label.toString() : void 0;
    }), l = () => {
      if (t.values[0])
        return null;
      const c = o.value ? {
        visibility: "hidden"
      } : void 0;
      return M("span", {
        class: `${t.prefixCls}-selection-placeholder`,
        style: c
      }, [t.placeholder]);
    }, u = (c) => {
      c.target.composing || (e.value = !0, t.onInputChange(c));
    };
    return () => {
      var c, f, d, h;
      const {
        inputElement: p,
        prefixCls: v,
        id: g,
        values: m,
        inputRef: y,
        disabled: b,
        autofocus: _,
        autocomplete: O,
        activeDescendantId: S,
        open: x,
        tabindex: C,
        optionLabelRender: T,
        onInputKeyDown: w,
        onInputMouseDown: P,
        onInputPaste: $,
        onInputCompositionStart: A,
        onInputCompositionEnd: D
      } = t, E = m[0];
      let R = null;
      if (E && a.customSlots) {
        const N = (c = E.key) !== null && c !== void 0 ? c : E.value, V = ((f = a.keyEntities[N]) === null || f === void 0 ? void 0 : f.node) || {};
        R = a.customSlots[(d = V.slots) === null || d === void 0 ? void 0 : d.title] || a.customSlots.title || E.label, typeof R == "function" && (R = R(V));
      } else
        R = T && E ? T(E.option) : E == null ? void 0 : E.label;
      return M(wt, null, [M("span", {
        class: `${v}-selection-search`
      }, [M(IZ, {
        inputRef: y,
        prefixCls: v,
        id: g,
        open: x,
        inputElement: p,
        disabled: b,
        autofocus: _,
        autocomplete: O,
        editable: r.value,
        activeDescendantId: S,
        value: i.value,
        onKeydown: w,
        onMousedown: P,
        onChange: u,
        onPaste: $,
        onCompositionstart: A,
        onCompositionend: D,
        tabindex: C,
        attrs: JS(t, !0)
      }, null)]), !n.value && E && !o.value && M("span", {
        class: `${v}-selection-item`,
        title: s.value
      }, [M(wt, {
        key: (h = E.key) !== null && h !== void 0 ? h : E.value
      }, [R])]), l()]);
    };
  }
});
$I.props = Zve;
$I.inheritAttrs = !1;
function Uve(t) {
  return ![
    // System function button
    ge.ESC,
    ge.SHIFT,
    ge.BACKSPACE,
    ge.TAB,
    ge.WIN_KEY,
    ge.ALT,
    ge.META,
    ge.WIN_KEY_RIGHT,
    ge.CTRL,
    ge.SEMICOLON,
    ge.EQUALS,
    ge.CAPS_LOCK,
    ge.CONTEXT_MENU,
    // F1-F12
    ge.F1,
    ge.F2,
    ge.F3,
    ge.F4,
    ge.F5,
    ge.F6,
    ge.F7,
    ge.F8,
    ge.F9,
    ge.F10,
    ge.F11,
    ge.F12
  ].includes(t);
}
function LZ() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, e = null, n;
  yt(() => {
    clearTimeout(n);
  });
  function r(i) {
    (i || e === null) && (e = i), clearTimeout(n), n = setTimeout(() => {
      e = null;
    }, t);
  }
  return [() => e, r];
}
function rm() {
  const t = (e) => {
    t.current = e;
  };
  return t;
}
const Xve = te({
  name: "Selector",
  inheritAttrs: !1,
  props: {
    id: String,
    prefixCls: String,
    showSearch: {
      type: Boolean,
      default: void 0
    },
    open: {
      type: Boolean,
      default: void 0
    },
    /** Display in the Selector value, it's not same as `value` prop */
    values: Y.array,
    multiple: {
      type: Boolean,
      default: void 0
    },
    mode: String,
    searchValue: String,
    activeValue: String,
    inputElement: Y.any,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    activeDescendantId: String,
    tabindex: Y.oneOfType([Y.number, Y.string]),
    disabled: {
      type: Boolean,
      default: void 0
    },
    placeholder: Y.any,
    removeIcon: Y.any,
    // Tags
    maxTagCount: Y.oneOfType([Y.number, Y.string]),
    maxTagTextLength: Number,
    maxTagPlaceholder: Y.any,
    tagRender: Function,
    optionLabelRender: Function,
    /** Check if `tokenSeparators` contains `\n` or `\r\n` */
    tokenWithEnter: {
      type: Boolean,
      default: void 0
    },
    // Motion
    choiceTransitionName: String,
    onToggleOpen: {
      type: Function
    },
    /** `onSearch` returns go next step boolean to check if need do toggle open */
    onSearch: Function,
    onSearchSubmit: Function,
    onRemove: Function,
    onInputKeyDown: {
      type: Function
    },
    /**
     * @private get real dom for trigger align.
     * This may be removed after React provides replacement of `findDOMNode`
     */
    domRef: Function
  },
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = rm(), i = U(!1), [a, o] = LZ(0), s = (m) => {
      const {
        which: y
      } = m;
      (y === ge.UP || y === ge.DOWN) && m.preventDefault(), t.onInputKeyDown && t.onInputKeyDown(m), y === ge.ENTER && t.mode === "tags" && !i.value && !t.open && t.onSearchSubmit(m.target.value), Uve(y) && t.onToggleOpen(!0);
    }, l = () => {
      o(!0);
    };
    let u = null;
    const c = (m) => {
      t.onSearch(m, !0, i.value) !== !1 && t.onToggleOpen(!0);
    }, f = () => {
      i.value = !0;
    }, d = (m) => {
      i.value = !1, t.mode !== "combobox" && c(m.target.value);
    }, h = (m) => {
      let {
        target: {
          value: y
        }
      } = m;
      if (t.tokenWithEnter && u && /[\r\n]/.test(u)) {
        const b = u.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
        y = y.replace(b, u);
      }
      u = null, c(y);
    }, p = (m) => {
      const {
        clipboardData: y
      } = m;
      u = y.getData("text");
    }, v = (m) => {
      let {
        target: y
      } = m;
      y !== r.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
        r.current.focus();
      }) : r.current.focus());
    }, g = (m) => {
      const y = a();
      m.target !== r.current && !y && m.preventDefault(), (t.mode !== "combobox" && (!t.showSearch || !y) || !t.open) && (t.open && t.onSearch("", !0, !1), t.onToggleOpen());
    };
    return n({
      focus: () => {
        r.current.focus();
      },
      blur: () => {
        r.current.blur();
      }
    }), () => {
      const {
        prefixCls: m,
        domRef: y,
        mode: b
      } = t, _ = {
        inputRef: r,
        onInputKeyDown: s,
        onInputMouseDown: l,
        onInputChange: h,
        onInputPaste: p,
        compositionStatus: i.value,
        onInputCompositionStart: f,
        onInputCompositionEnd: d
      }, O = b === "multiple" || b === "tags" ? M(jve, j(j({}, t), _), null) : M($I, j(j({}, t), _), null);
      return M("div", {
        ref: y,
        class: `${m}-selector`,
        onClick: v,
        onMousedown: g
      }, [O]);
    };
  }
});
function Yve(t, e, n) {
  function r(i) {
    var a, o, s;
    let l = i.target;
    l.shadowRoot && i.composed && (l = i.composedPath()[0] || l);
    const u = [(a = t[0]) === null || a === void 0 ? void 0 : a.value, (s = (o = t[1]) === null || o === void 0 ? void 0 : o.value) === null || s === void 0 ? void 0 : s.getPopupElement()];
    e.value && u.every((c) => c && !c.contains(l) && c !== l) && n(!1);
  }
  it(() => {
    window.addEventListener("mousedown", r);
  }), yt(() => {
    window.removeEventListener("mousedown", r);
  });
}
function qve() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
  const e = ae(!1);
  let n;
  const r = () => {
    clearTimeout(n);
  };
  return it(() => {
    r();
  }), [e, (a, o) => {
    r(), n = setTimeout(() => {
      e.value = a, o && o();
    }, t);
  }, r];
}
const NZ = Symbol("BaseSelectContextKey");
function Kve(t) {
  return pt(NZ, t);
}
function Jve() {
  return Ge(NZ, {});
}
const AI = () => {
  if (typeof navigator > "u" || typeof window > "u")
    return !1;
  const t = navigator.userAgent || navigator.vendor || window.opera;
  return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t == null ? void 0 : t.substring(0, 4));
};
function BZ(t) {
  if (!tp(t)) return tn(t);
  const e = new Proxy({}, {
    get(n, r, i) {
      return Reflect.get(t.value, r, i);
    },
    set(n, r, i) {
      return t.value[r] = i, !0;
    },
    deleteProperty(n, r) {
      return Reflect.deleteProperty(t.value, r);
    },
    has(n, r) {
      return Reflect.has(t.value, r);
    },
    ownKeys() {
      return Object.keys(t.value);
    },
    getOwnPropertyDescriptor() {
      return {
        enumerable: !0,
        configurable: !0
      };
    }
  });
  return tn(e);
}
var ege = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const tge = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], nge = () => ({
  prefixCls: String,
  id: String,
  omitDomProps: Array,
  // >>> Value
  displayValues: Array,
  onDisplayValuesChange: Function,
  // >>> Active
  /** Current dropdown list active item string value */
  activeValue: String,
  /** Link search input with target element */
  activeDescendantId: String,
  onActiveValueChange: Function,
  // >>> Search
  searchValue: String,
  /** Trigger onSearch, return false to prevent trigger open event */
  onSearch: Function,
  /** Trigger when search text match the `tokenSeparators`. Will provide split content */
  onSearchSplit: Function,
  maxLength: Number,
  OptionList: Y.any,
  /** Tell if provided `options` is empty */
  emptyOptions: Boolean
}), zZ = () => ({
  showSearch: {
    type: Boolean,
    default: void 0
  },
  tagRender: {
    type: Function
  },
  optionLabelRender: {
    type: Function
  },
  direction: {
    type: String
  },
  // MISC
  tabindex: Number,
  autofocus: Boolean,
  notFoundContent: Y.any,
  placeholder: Y.any,
  onClear: Function,
  choiceTransitionName: String,
  // >>> Mode
  mode: String,
  // >>> Status
  disabled: {
    type: Boolean,
    default: void 0
  },
  loading: {
    type: Boolean,
    default: void 0
  },
  // >>> Open
  open: {
    type: Boolean,
    default: void 0
  },
  defaultOpen: {
    type: Boolean,
    default: void 0
  },
  onDropdownVisibleChange: {
    type: Function
  },
  // >>> Customize Input
  /** @private Internal usage. Do not use in your production. */
  getInputElement: {
    type: Function
  },
  /** @private Internal usage. Do not use in your production. */
  getRawInputElement: {
    type: Function
  },
  // >>> Selector
  maxTagTextLength: Number,
  maxTagCount: {
    type: [String, Number]
  },
  maxTagPlaceholder: Y.any,
  // >>> Search
  tokenSeparators: {
    type: Array
  },
  // >>> Icons
  allowClear: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: void 0
  },
  inputIcon: Y.any,
  /** Clear all icon */
  clearIcon: Y.any,
  /** Selector remove icon */
  removeIcon: Y.any,
  // >>> Dropdown
  animation: String,
  transitionName: String,
  dropdownStyle: {
    type: Object
  },
  dropdownClassName: String,
  dropdownMatchSelectWidth: {
    type: [Boolean, Number],
    default: void 0
  },
  dropdownRender: {
    type: Function
  },
  dropdownAlign: Object,
  placement: {
    type: String
  },
  getPopupContainer: {
    type: Function
  },
  // >>> Focus
  showAction: {
    type: Array
  },
  onBlur: {
    type: Function
  },
  onFocus: {
    type: Function
  },
  // >>> Rest Events
  onKeyup: Function,
  onKeydown: Function,
  onMousedown: Function,
  onPopupScroll: Function,
  onInputKeyDown: Function,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function
}), rge = () => I(I({}, nge()), zZ());
function EI(t) {
  return t === "tags" || t === "multiple";
}
const ige = te({
  compatConfig: {
    MODE: 3
  },
  name: "BaseSelect",
  inheritAttrs: !1,
  props: sr(rge(), {
    showAction: [],
    notFoundContent: "Not Found"
  }),
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      slots: i
    } = e;
    const a = L(() => EI(t.mode)), o = L(() => t.showSearch !== void 0 ? t.showSearch : a.value || t.mode === "combobox"), s = ae(!1);
    it(() => {
      s.value = AI();
    });
    const l = PI(), u = ae(null), c = rm(), f = ae(null), d = ae(null), h = ae(null), p = U(!1), [v, g, m] = qve();
    r({
      focus: () => {
        var H;
        (H = d.value) === null || H === void 0 || H.focus();
      },
      blur: () => {
        var H;
        (H = d.value) === null || H === void 0 || H.blur();
      },
      scrollTo: (H) => {
        var G;
        return (G = h.value) === null || G === void 0 ? void 0 : G.scrollTo(H);
      }
    });
    const _ = L(() => {
      var H;
      if (t.mode !== "combobox")
        return t.searchValue;
      const G = (H = t.displayValues[0]) === null || H === void 0 ? void 0 : H.value;
      return typeof G == "string" || typeof G == "number" ? String(G) : "";
    }), O = t.open !== void 0 ? t.open : t.defaultOpen, S = ae(O), x = ae(O), C = (H) => {
      S.value = t.open !== void 0 ? t.open : H, x.value = S.value;
    };
    se(() => t.open, () => {
      C(t.open);
    });
    const T = L(() => !t.notFoundContent && t.emptyOptions);
    ht(() => {
      x.value = S.value, (t.disabled || T.value && x.value && t.mode === "combobox") && (x.value = !1);
    });
    const w = L(() => T.value ? !1 : x.value), P = (H) => {
      const G = H !== void 0 ? H : !x.value;
      x.value !== G && !t.disabled && (C(G), t.onDropdownVisibleChange && t.onDropdownVisibleChange(G));
    }, $ = L(() => (t.tokenSeparators || []).some((H) => [`
`, `\r
`].includes(H))), A = (H, G, re) => {
      var fe, de;
      let Ee = !0, $e = H;
      (fe = t.onActiveValueChange) === null || fe === void 0 || fe.call(t, null);
      const Se = re ? null : Jfe(H, t.tokenSeparators);
      return t.mode !== "combobox" && Se && ($e = "", (de = t.onSearchSplit) === null || de === void 0 || de.call(t, Se), P(!1), Ee = !1), t.onSearch && _.value !== $e && t.onSearch($e, {
        source: G ? "typing" : "effect"
      }), Ee;
    }, D = (H) => {
      var G;
      !H || !H.trim() || (G = t.onSearch) === null || G === void 0 || G.call(t, H, {
        source: "submit"
      });
    };
    se(x, () => {
      !x.value && !a.value && t.mode !== "combobox" && A("", !1, !1);
    }, {
      immediate: !0,
      flush: "post"
    }), se(() => t.disabled, () => {
      S.value && t.disabled && C(!1), t.disabled && !p.value && g(!1);
    }, {
      immediate: !0
    });
    const [E, R] = LZ(), N = function(H) {
      var G;
      const re = E(), {
        which: fe
      } = H;
      if (fe === ge.ENTER && (t.mode !== "combobox" && H.preventDefault(), x.value || P(!0)), R(!!_.value), fe === ge.BACKSPACE && !re && a.value && !_.value && t.displayValues.length) {
        const Se = [...t.displayValues];
        let be = null;
        for (let he = Se.length - 1; he >= 0; he -= 1) {
          const Te = Se[he];
          if (!Te.disabled) {
            Se.splice(he, 1), be = Te;
            break;
          }
        }
        be && t.onDisplayValuesChange(Se, {
          type: "remove",
          values: [be]
        });
      }
      for (var de = arguments.length, Ee = new Array(de > 1 ? de - 1 : 0), $e = 1; $e < de; $e++)
        Ee[$e - 1] = arguments[$e];
      x.value && h.value && h.value.onKeydown(H, ...Ee), (G = t.onKeydown) === null || G === void 0 || G.call(t, H, ...Ee);
    }, V = function(H) {
      for (var G = arguments.length, re = new Array(G > 1 ? G - 1 : 0), fe = 1; fe < G; fe++)
        re[fe - 1] = arguments[fe];
      x.value && h.value && h.value.onKeyup(H, ...re), t.onKeyup && t.onKeyup(H, ...re);
    }, z = (H) => {
      const G = t.displayValues.filter((re) => re !== H);
      t.onDisplayValuesChange(G, {
        type: "remove",
        values: [H]
      });
    }, W = ae(!1), F = function() {
      g(!0), t.disabled || (t.onFocus && !W.value && t.onFocus(...arguments), t.showAction && t.showAction.includes("focus") && P(!0)), W.value = !0;
    }, Q = U(!1), Z = function() {
      if (Q.value || (p.value = !0, g(!1, () => {
        W.value = !1, p.value = !1, P(!1);
      }), t.disabled))
        return;
      const H = _.value;
      H && (t.mode === "tags" ? t.onSearch(H, {
        source: "submit"
      }) : t.mode === "multiple" && t.onSearch("", {
        source: "blur"
      })), t.onBlur && t.onBlur(...arguments);
    }, ne = () => {
      Q.value = !0;
    }, ee = () => {
      Q.value = !1;
    };
    pt("VCSelectContainerEvent", {
      focus: F,
      blur: Z
    });
    const oe = [];
    it(() => {
      oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
    }), yt(() => {
      oe.forEach((H) => clearTimeout(H)), oe.splice(0, oe.length);
    });
    const K = function(H) {
      var G, re;
      const {
        target: fe
      } = H, de = (G = f.value) === null || G === void 0 ? void 0 : G.getPopupElement();
      if (de && de.contains(fe)) {
        const be = setTimeout(() => {
          var he;
          const Te = oe.indexOf(be);
          Te !== -1 && oe.splice(Te, 1), m(), !s.value && !de.contains(document.activeElement) && ((he = d.value) === null || he === void 0 || he.focus());
        });
        oe.push(be);
      }
      for (var Ee = arguments.length, $e = new Array(Ee > 1 ? Ee - 1 : 0), Se = 1; Se < Ee; Se++)
        $e[Se - 1] = arguments[Se];
      (re = t.onMousedown) === null || re === void 0 || re.call(t, H, ...$e);
    }, ie = ae(null), X = () => {
    };
    return it(() => {
      se(w, () => {
        var H;
        if (w.value) {
          const G = Math.ceil((H = u.value) === null || H === void 0 ? void 0 : H.offsetWidth);
          ie.value !== G && !Number.isNaN(G) && (ie.value = G);
        }
      }, {
        immediate: !0,
        flush: "post"
      });
    }), Yve([u, f], w, P), Kve(BZ(I(I({}, $S(t)), {
      open: x,
      triggerOpen: w,
      showSearch: o,
      multiple: a,
      toggleOpen: P
    }))), () => {
      const H = I(I({}, t), n), {
        prefixCls: G,
        id: re,
        open: fe,
        defaultOpen: de,
        mode: Ee,
        // Search related
        showSearch: $e,
        searchValue: Se,
        onSearch: be,
        // Icons
        allowClear: he,
        clearIcon: Te,
        showArrow: ze,
        inputIcon: ut,
        // Others
        disabled: ct,
        loading: Dt,
        getInputElement: ve,
        getPopupContainer: Xe,
        placement: Rt,
        // Dropdown
        animation: An,
        transitionName: sn,
        dropdownStyle: $r,
        dropdownClassName: Va,
        dropdownMatchSelectWidth: Bp,
        dropdownRender: zp,
        dropdownAlign: py,
        showAction: Hw,
        direction: Gf,
        // Tags
        tokenSeparators: Gw,
        tagRender: Vp,
        optionLabelRender: jw,
        // Events
        onPopupScroll: jf,
        onDropdownVisibleChange: F4,
        onFocus: upt,
        onBlur: cpt,
        onKeyup: fpt,
        onKeydown: dpt,
        onMousedown: hpt,
        onClear: Zw,
        omitDomProps: Uw,
        getRawInputElement: W4,
        displayValues: vy,
        onDisplayValuesChange: Ale,
        emptyOptions: Ele,
        activeDescendantId: Mle,
        activeValue: Ile,
        OptionList: Dle
      } = H, Rle = ege(H, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), Q4 = Ee === "combobox" && ve && ve() || null, Fp = typeof W4 == "function" && W4(), Xw = I({}, Rle);
      let H4;
      Fp && (H4 = (Iu) => {
        P(Iu);
      }), tge.forEach((Iu) => {
        delete Xw[Iu];
      }), Uw == null || Uw.forEach((Iu) => {
        delete Xw[Iu];
      });
      const G4 = ze !== void 0 ? ze : Dt || !a.value && Ee !== "combobox";
      let j4;
      G4 && (j4 = M(pf, {
        class: ye(`${G}-arrow`, {
          [`${G}-arrow-loading`]: Dt
        }),
        customizeIcon: ut,
        customizeIconProps: {
          loading: Dt,
          searchValue: _.value,
          open: x.value,
          focused: v.value,
          showSearch: o.value
        }
      }, null));
      let Z4;
      const kle = () => {
        Zw == null || Zw(), Ale([], {
          type: "clear",
          values: vy
        }), A("", !1, !1);
      };
      !ct && he && (vy.length || _.value) && (Z4 = M(pf, {
        class: `${G}-clear`,
        onMousedown: kle,
        customizeIcon: Te
      }, {
        default: () => [Kt("×")]
      }));
      const Lle = M(Dle, {
        ref: h
      }, I(I({}, l.customSlots), {
        option: i.option
      })), Nle = ye(G, n.class, {
        [`${G}-focused`]: v.value,
        [`${G}-multiple`]: a.value,
        [`${G}-single`]: !a.value,
        [`${G}-allow-clear`]: he,
        [`${G}-show-arrow`]: G4,
        [`${G}-disabled`]: ct,
        [`${G}-loading`]: Dt,
        [`${G}-open`]: x.value,
        [`${G}-customize-input`]: Q4,
        [`${G}-show-search`]: o.value
      }), U4 = M(Pve, {
        ref: f,
        disabled: ct,
        prefixCls: G,
        visible: w.value,
        popupElement: Lle,
        containerWidth: ie.value,
        animation: An,
        transitionName: sn,
        dropdownStyle: $r,
        dropdownClassName: Va,
        direction: Gf,
        dropdownMatchSelectWidth: Bp,
        dropdownRender: zp,
        dropdownAlign: py,
        placement: Rt,
        getPopupContainer: Xe,
        empty: Ele,
        getTriggerDOMNode: () => c.current,
        onPopupVisibleChange: H4,
        onPopupMouseEnter: X,
        onPopupFocusin: ne,
        onPopupFocusout: ee
      }, {
        default: () => Fp ? Ui(Fp) && Pn(Fp, {
          ref: c
        }, !1, !0) : M(Xve, j(j({}, t), {}, {
          domRef: c,
          prefixCls: G,
          inputElement: Q4,
          ref: d,
          id: re,
          showSearch: o.value,
          mode: Ee,
          activeDescendantId: Mle,
          tagRender: Vp,
          optionLabelRender: jw,
          values: vy,
          open: x.value,
          onToggleOpen: P,
          activeValue: Ile,
          searchValue: _.value,
          onSearch: A,
          onSearchSubmit: D,
          onRemove: z,
          tokenWithEnter: $.value
        }), null)
      });
      let Yw;
      return Fp ? Yw = U4 : Yw = M("div", j(j({}, Xw), {}, {
        class: Nle,
        ref: u,
        onMousedown: K,
        onKeydown: N,
        onKeyup: V
      }), [v.value && !x.value && M("span", {
        style: {
          width: 0,
          height: 0,
          position: "absolute",
          overflow: "hidden",
          opacity: 0
        },
        "aria-live": "polite"
      }, [`${vy.map((Iu) => {
        let {
          label: X4,
          value: Ble
        } = Iu;
        return ["number", "string"].includes(typeof X4) ? X4 : Ble;
      }).join(", ")}`]), U4, j4, Z4]), Yw;
    };
  }
}), ex = (t, e) => {
  let {
    height: n,
    offset: r,
    prefixCls: i,
    onInnerResize: a
  } = t, {
    slots: o
  } = e;
  var s;
  let l = {}, u = {
    display: "flex",
    flexDirection: "column"
  };
  return r !== void 0 && (l = {
    height: `${n}px`,
    position: "relative",
    overflow: "hidden"
  }, u = I(I({}, u), {
    transform: `translateY(${r}px)`,
    position: "absolute",
    left: 0,
    right: 0,
    top: 0
  })), M("div", {
    style: l
  }, [M(ph, {
    onResize: (c) => {
      let {
        offsetHeight: f
      } = c;
      f && a && a();
    }
  }, {
    default: () => [M("div", {
      style: u,
      class: ye({
        [`${i}-holder-inner`]: i
      })
    }, [(s = o.default) === null || s === void 0 ? void 0 : s.call(o)])]
  })]);
};
ex.displayName = "Filter";
ex.inheritAttrs = !1;
ex.props = {
  prefixCls: String,
  /** Virtual filler height. Should be `count * itemMinHeight` */
  height: Number,
  /** Set offset of visible items. Should be the top of start item position */
  offset: Number,
  onInnerResize: Function
};
const VZ = (t, e) => {
  let {
    setRef: n
  } = t, {
    slots: r
  } = e;
  var i;
  const a = Yn((i = r.default) === null || i === void 0 ? void 0 : i.call(r));
  return a && a.length ? Ns(a[0], {
    ref: n
  }) : a;
};
VZ.props = {
  setRef: {
    type: Function,
    default: () => {
    }
  }
};
const age = 20;
function pN(t) {
  return "touches" in t ? t.touches[0].pageY : t.pageY;
}
const oge = te({
  compatConfig: {
    MODE: 3
  },
  name: "ScrollBar",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    scrollTop: Number,
    scrollHeight: Number,
    height: Number,
    count: Number,
    onScroll: {
      type: Function
    },
    onStartMove: {
      type: Function
    },
    onStopMove: {
      type: Function
    }
  },
  setup() {
    return {
      moveRaf: null,
      scrollbarRef: rm(),
      thumbRef: rm(),
      visibleTimeout: null,
      state: tn({
        dragging: !1,
        pageY: null,
        startTop: null,
        visible: !1
      })
    };
  },
  watch: {
    scrollTop: {
      handler() {
        this.delayHidden();
      },
      flush: "post"
    }
  },
  mounted() {
    var t, e;
    (t = this.scrollbarRef.current) === null || t === void 0 || t.addEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
      passive: !1
    } : !1), (e = this.thumbRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onMouseDown, pr ? {
      passive: !1
    } : !1);
  },
  beforeUnmount() {
    this.removeEvents(), clearTimeout(this.visibleTimeout);
  },
  methods: {
    delayHidden() {
      clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
        this.state.visible = !1;
      }, 2e3);
    },
    onScrollbarTouchStart(t) {
      t.preventDefault();
    },
    onContainerMouseDown(t) {
      t.stopPropagation(), t.preventDefault();
    },
    // ======================= Clean =======================
    patchEvents() {
      window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, pr ? {
        passive: !1
      } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
    },
    removeEvents() {
      window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, pr ? {
        passive: !1
      } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, pr ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, pr ? {
        passive: !1
      } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), xt.cancel(this.moveRaf);
    },
    // ======================= Thumb =======================
    onMouseDown(t) {
      const {
        onStartMove: e
      } = this.$props;
      I(this.state, {
        dragging: !0,
        pageY: pN(t),
        startTop: this.getTop()
      }), e(), this.patchEvents(), t.stopPropagation(), t.preventDefault();
    },
    onMouseMove(t) {
      const {
        dragging: e,
        pageY: n,
        startTop: r
      } = this.state, {
        onScroll: i
      } = this.$props;
      if (xt.cancel(this.moveRaf), e) {
        const a = pN(t) - n, o = r + a, s = this.getEnableScrollRange(), l = this.getEnableHeightRange(), u = l ? o / l : 0, c = Math.ceil(u * s);
        this.moveRaf = xt(() => {
          i(c);
        });
      }
    },
    onMouseUp() {
      const {
        onStopMove: t
      } = this.$props;
      this.state.dragging = !1, t(), this.removeEvents();
    },
    // ===================== Calculate =====================
    getSpinHeight() {
      const {
        height: t,
        scrollHeight: e
      } = this.$props;
      let n = t / e * 100;
      return n = Math.max(n, age), n = Math.min(n, t / 2), Math.floor(n);
    },
    getEnableScrollRange() {
      const {
        scrollHeight: t,
        height: e
      } = this.$props;
      return t - e || 0;
    },
    getEnableHeightRange() {
      const {
        height: t
      } = this.$props, e = this.getSpinHeight();
      return t - e || 0;
    },
    getTop() {
      const {
        scrollTop: t
      } = this.$props, e = this.getEnableScrollRange(), n = this.getEnableHeightRange();
      return t === 0 || e === 0 ? 0 : t / e * n;
    },
    // Not show scrollbar when height is large than scrollHeight
    showScroll() {
      const {
        height: t,
        scrollHeight: e
      } = this.$props;
      return e > t;
    }
  },
  render() {
    const {
      dragging: t,
      visible: e
    } = this.state, {
      prefixCls: n
    } = this.$props, r = this.getSpinHeight() + "px", i = this.getTop() + "px", a = this.showScroll(), o = a && e;
    return M("div", {
      ref: this.scrollbarRef,
      class: ye(`${n}-scrollbar`, {
        [`${n}-scrollbar-show`]: a
      }),
      style: {
        width: "8px",
        top: 0,
        bottom: 0,
        right: 0,
        position: "absolute",
        display: o ? void 0 : "none"
      },
      onMousedown: this.onContainerMouseDown,
      onMousemove: this.delayHidden
    }, [M("div", {
      ref: this.thumbRef,
      class: ye(`${n}-scrollbar-thumb`, {
        [`${n}-scrollbar-thumb-moving`]: t
      }),
      style: {
        width: "100%",
        height: r,
        top: i,
        left: 0,
        position: "absolute",
        background: "rgba(0, 0, 0, 0.5)",
        borderRadius: "99px",
        cursor: "pointer",
        userSelect: "none"
      },
      onMousedown: this.onMouseDown
    }, null)]);
  }
});
function sge(t, e, n, r) {
  const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = U(Symbol("update"));
  se(t, () => {
    o.value = Symbol("update");
  });
  let s;
  function l() {
    xt.cancel(s);
  }
  function u() {
    l(), s = xt(() => {
      i.forEach((f, d) => {
        if (f && f.offsetParent) {
          const {
            offsetHeight: h
          } = f;
          a.get(d) !== h && (o.value = Symbol("update"), a.set(d, f.offsetHeight));
        }
      });
    });
  }
  function c(f, d) {
    const h = e(f);
    i.get(h), d ? (i.set(h, d.$el || d), u()) : i.delete(h);
  }
  return nl(() => {
    l();
  }), [c, u, a, o];
}
function lge(t, e, n, r, i, a, o, s) {
  let l;
  return (u) => {
    if (u == null) {
      s();
      return;
    }
    xt.cancel(l);
    const c = e.value, f = r.itemHeight;
    if (typeof u == "number")
      o(u);
    else if (u && typeof u == "object") {
      let d;
      const {
        align: h
      } = u;
      "index" in u ? {
        index: d
      } = u : d = c.findIndex((g) => i(g) === u.key);
      const {
        offset: p = 0
      } = u, v = (g, m) => {
        if (g < 0 || !t.value) return;
        const y = t.value.clientHeight;
        let b = !1, _ = m;
        if (y) {
          const O = m || h;
          let S = 0, x = 0, C = 0;
          const T = Math.min(c.length, d);
          for (let $ = 0; $ <= T; $ += 1) {
            const A = i(c[$]);
            x = S;
            const D = n.get(A);
            C = x + (D === void 0 ? f : D), S = C, $ === d && D === void 0 && (b = !0);
          }
          const w = t.value.scrollTop;
          let P = null;
          switch (O) {
            case "top":
              P = x - p;
              break;
            case "bottom":
              P = C - y + p;
              break;
            default: {
              const $ = w + y;
              x < w ? _ = "top" : C > $ && (_ = "bottom");
            }
          }
          P !== null && P !== w && o(P);
        }
        l = xt(() => {
          b && a(), v(g - 1, _);
        }, 2);
      };
      v(5);
    }
  };
}
const uge = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), FZ = (t, e) => {
  let n = !1, r = null;
  function i() {
    clearTimeout(r), n = !0, r = setTimeout(() => {
      n = !1;
    }, 50);
  }
  return function(a) {
    let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
    const s = (
      // Pass origin wheel when on the top
      a < 0 && t.value || // Pass origin wheel when on the bottom
      a > 0 && e.value
    );
    return o && s ? (clearTimeout(r), n = !1) : (!s || n) && i(), !n && s;
  };
};
function cge(t, e, n, r) {
  let i = 0, a = null, o = null, s = !1;
  const l = FZ(e, n);
  function u(f) {
    if (!t.value) return;
    xt.cancel(a);
    const {
      deltaY: d
    } = f;
    i += d, o = d, !l(d) && (uge || f.preventDefault(), a = xt(() => {
      r(i * (s ? 10 : 1)), i = 0;
    }));
  }
  function c(f) {
    t.value && (s = f.detail === o);
  }
  return [u, c];
}
const fge = 14 / 15;
function dge(t, e, n) {
  let r = !1, i = 0, a = null, o = null;
  const s = () => {
    a && (a.removeEventListener("touchmove", l), a.removeEventListener("touchend", u));
  }, l = (d) => {
    if (r) {
      const h = Math.ceil(d.touches[0].pageY);
      let p = i - h;
      i = h, n(p) && d.preventDefault(), clearInterval(o), o = setInterval(() => {
        p *= fge, (!n(p, !0) || Math.abs(p) <= 0.1) && clearInterval(o);
      }, 16);
    }
  }, u = () => {
    r = !1, s();
  }, c = (d) => {
    s(), d.touches.length === 1 && !r && (r = !0, i = Math.ceil(d.touches[0].pageY), a = d.target, a.addEventListener("touchmove", l, {
      passive: !1
    }), a.addEventListener("touchend", u));
  }, f = () => {
  };
  it(() => {
    document.addEventListener("touchmove", f, {
      passive: !1
    }), se(t, (d) => {
      e.value.removeEventListener("touchstart", c), s(), clearInterval(o), d && e.value.addEventListener("touchstart", c, {
        passive: !1
      });
    }, {
      immediate: !0
    });
  }), yt(() => {
    document.removeEventListener("touchmove", f);
  });
}
var hge = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const pge = [], vge = {
  overflowY: "auto",
  overflowAnchor: "none"
};
function gge(t, e, n, r, i, a) {
  let {
    getKey: o
  } = a;
  return t.slice(e, n + 1).map((s, l) => {
    const u = e + l, c = i(s, u, {
      // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
    }), f = o(s);
    return M(VZ, {
      key: f,
      setRef: (d) => r(s, d)
    }, {
      default: () => [c]
    });
  });
}
const mge = te({
  compatConfig: {
    MODE: 3
  },
  name: "List",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    data: Y.array,
    height: Number,
    itemHeight: Number,
    /** If not match virtual scroll condition, Set List still use height of container. */
    fullHeight: {
      type: Boolean,
      default: void 0
    },
    itemKey: {
      type: [String, Number, Function],
      required: !0
    },
    component: {
      type: [String, Object]
    },
    /** Set `false` will always use real scroll instead of virtual one */
    virtual: {
      type: Boolean,
      default: void 0
    },
    children: Function,
    onScroll: Function,
    onMousedown: Function,
    onMouseenter: Function,
    onVisibleChange: Function
  },
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = L(() => {
      const {
        height: z,
        itemHeight: W,
        virtual: F
      } = t;
      return !!(F !== !1 && z && W);
    }), i = L(() => {
      const {
        height: z,
        itemHeight: W,
        data: F
      } = t;
      return r.value && F && W * F.length > z;
    }), a = tn({
      scrollTop: 0,
      scrollMoving: !1
    }), o = L(() => t.data || pge), s = ae([]);
    se(o, () => {
      s.value = qo(o.value).slice();
    }, {
      immediate: !0
    });
    const l = ae((z) => {
    });
    se(() => t.itemKey, (z) => {
      typeof z == "function" ? l.value = z : l.value = (W) => W == null ? void 0 : W[z];
    }, {
      immediate: !0
    });
    const u = ae(), c = ae(), f = ae(), d = (z) => l.value(z), h = {
      getKey: d
    };
    function p(z) {
      let W;
      typeof z == "function" ? W = z(a.scrollTop) : W = z;
      const F = S(W);
      u.value && (u.value.scrollTop = F), a.scrollTop = F;
    }
    const [v, g, m, y] = sge(s, d), b = tn({
      scrollHeight: void 0,
      start: 0,
      end: 0,
      offset: void 0
    }), _ = ae(0);
    it(() => {
      Tt(() => {
        var z;
        _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
      });
    }), ep(() => {
      Tt(() => {
        var z;
        _.value = ((z = c.value) === null || z === void 0 ? void 0 : z.offsetHeight) || 0;
      });
    }), se([r, s], () => {
      r.value || I(b, {
        scrollHeight: void 0,
        start: 0,
        end: s.value.length - 1,
        offset: void 0
      });
    }, {
      immediate: !0
    }), se([r, s, _, i], () => {
      r.value && !i.value && I(b, {
        scrollHeight: _.value,
        start: 0,
        end: s.value.length - 1,
        offset: void 0
      }), u.value && (a.scrollTop = u.value.scrollTop);
    }, {
      immediate: !0
    }), se([i, r, () => a.scrollTop, s, y, () => t.height, _], () => {
      if (!r.value || !i.value)
        return;
      let z = 0, W, F, Q;
      const Z = s.value.length, ne = s.value, ee = a.scrollTop, {
        itemHeight: oe,
        height: K
      } = t, ie = ee + K;
      for (let X = 0; X < Z; X += 1) {
        const H = ne[X], G = d(H);
        let re = m.get(G);
        re === void 0 && (re = oe);
        const fe = z + re;
        W === void 0 && fe >= ee && (W = X, F = z), Q === void 0 && fe > ie && (Q = X), z = fe;
      }
      W === void 0 && (W = 0, F = 0, Q = Math.ceil(K / oe)), Q === void 0 && (Q = Z - 1), Q = Math.min(Q + 1, Z), I(b, {
        scrollHeight: z,
        start: W,
        end: Q,
        offset: F
      });
    }, {
      immediate: !0
    });
    const O = L(() => b.scrollHeight - t.height);
    function S(z) {
      let W = z;
      return Number.isNaN(O.value) || (W = Math.min(W, O.value)), W = Math.max(W, 0), W;
    }
    const x = L(() => a.scrollTop <= 0), C = L(() => a.scrollTop >= O.value), T = FZ(x, C);
    function w(z) {
      p(z);
    }
    function P(z) {
      var W;
      const {
        scrollTop: F
      } = z.currentTarget;
      F !== a.scrollTop && p(F), (W = t.onScroll) === null || W === void 0 || W.call(t, z);
    }
    const [$, A] = cge(r, x, C, (z) => {
      p((W) => W + z);
    });
    dge(r, u, (z, W) => T(z, W) ? !1 : ($({
      preventDefault() {
      },
      deltaY: z
    }), !0));
    function D(z) {
      r.value && z.preventDefault();
    }
    const E = () => {
      u.value && (u.value.removeEventListener("wheel", $, pr ? {
        passive: !1
      } : !1), u.value.removeEventListener("DOMMouseScroll", A), u.value.removeEventListener("MozMousePixelScroll", D));
    };
    ht(() => {
      Tt(() => {
        u.value && (E(), u.value.addEventListener("wheel", $, pr ? {
          passive: !1
        } : !1), u.value.addEventListener("DOMMouseScroll", A), u.value.addEventListener("MozMousePixelScroll", D));
      });
    }), yt(() => {
      E();
    });
    const R = lge(u, s, m, t, d, g, p, () => {
      var z;
      (z = f.value) === null || z === void 0 || z.delayHidden();
    });
    n({
      scrollTo: R
    });
    const N = L(() => {
      let z = null;
      return t.height && (z = I({
        [t.fullHeight ? "height" : "maxHeight"]: t.height + "px"
      }, vge), r.value && (z.overflowY = "hidden", a.scrollMoving && (z.pointerEvents = "none"))), z;
    });
    return se([() => b.start, () => b.end, s], () => {
      if (t.onVisibleChange) {
        const z = s.value.slice(b.start, b.end + 1);
        t.onVisibleChange(z, s.value);
      }
    }, {
      flush: "post"
    }), {
      state: a,
      mergedData: s,
      componentStyle: N,
      onFallbackScroll: P,
      onScrollBar: w,
      componentRef: u,
      useVirtual: r,
      calRes: b,
      collectHeight: g,
      setInstance: v,
      sharedConfig: h,
      scrollBarRef: f,
      fillerInnerRef: c,
      delayHideScrollBar: () => {
        var z;
        (z = f.value) === null || z === void 0 || z.delayHidden();
      }
    };
  },
  render() {
    const t = I(I({}, this.$props), this.$attrs), {
      prefixCls: e = "rc-virtual-list",
      height: n,
      itemHeight: r,
      // eslint-disable-next-line no-unused-vars
      fullHeight: i,
      data: a,
      itemKey: o,
      virtual: s,
      component: l = "div",
      onScroll: u,
      children: c = this.$slots.default,
      style: f,
      class: d
    } = t, h = hge(t, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), p = ye(e, d), {
      scrollTop: v
    } = this.state, {
      scrollHeight: g,
      offset: m,
      start: y,
      end: b
    } = this.calRes, {
      componentStyle: _,
      onFallbackScroll: O,
      onScrollBar: S,
      useVirtual: x,
      collectHeight: C,
      sharedConfig: T,
      setInstance: w,
      mergedData: P,
      delayHideScrollBar: $
    } = this;
    return M("div", j({
      style: I(I({}, f), {
        position: "relative"
      }),
      class: p
    }, h), [M(l, {
      class: `${e}-holder`,
      style: _,
      ref: "componentRef",
      onScroll: O,
      onMouseenter: $
    }, {
      default: () => [M(ex, {
        prefixCls: e,
        height: g,
        offset: m,
        onInnerResize: C,
        ref: "fillerInnerRef"
      }, {
        default: () => gge(P, y, b, w, c, T)
      })]
    }), x && M(oge, {
      ref: "scrollBarRef",
      prefixCls: e,
      scrollTop: v,
      height: n,
      scrollHeight: g,
      count: P.length,
      onScroll: S,
      onStartMove: () => {
        this.state.scrollMoving = !0;
      },
      onStopMove: () => {
        this.state.scrollMoving = !1;
      }
    }, null)]);
  }
});
function yge(t, e, n) {
  const r = U(t());
  return se(e, (i, a) => {
    n ? n(i, a) && (r.value = t()) : r.value = t();
  }), r;
}
function bge() {
  return /(mac\sos|macintosh)/i.test(navigator.appVersion);
}
const WZ = Symbol("SelectContextKey");
function _ge(t) {
  return pt(WZ, t);
}
function Oge() {
  return Ge(WZ, {});
}
var Sge = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function vN(t) {
  return typeof t == "string" || typeof t == "number";
}
const xge = te({
  compatConfig: {
    MODE: 3
  },
  name: "OptionList",
  inheritAttrs: !1,
  setup(t, e) {
    let {
      expose: n,
      slots: r
    } = e;
    const i = Jve(), a = Oge(), o = L(() => `${i.prefixCls}-item`), s = yge(() => a.flattenOptions, [() => i.open, () => a.flattenOptions], (O) => O[0]), l = rm(), u = (O) => {
      O.preventDefault();
    }, c = (O) => {
      l.current && l.current.scrollTo(typeof O == "number" ? {
        index: O
      } : O);
    }, f = function(O) {
      let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      const x = s.value.length;
      for (let C = 0; C < x; C += 1) {
        const T = (O + C * S + x) % x, {
          group: w,
          data: P
        } = s.value[T];
        if (!w && !P.disabled)
          return T;
      }
      return -1;
    }, d = tn({
      activeIndex: f(0)
    }), h = function(O) {
      let S = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      d.activeIndex = O;
      const x = {
        source: S ? "keyboard" : "mouse"
      }, C = s.value[O];
      if (!C) {
        a.onActiveValue(null, -1, x);
        return;
      }
      a.onActiveValue(C.value, O, x);
    };
    se([() => s.value.length, () => i.searchValue], () => {
      h(a.defaultActiveFirstOption !== !1 ? f(0) : -1);
    }, {
      immediate: !0
    });
    const p = (O) => a.rawValues.has(O) && i.mode !== "combobox";
    se([() => i.open, () => i.searchValue], () => {
      if (!i.multiple && i.open && a.rawValues.size === 1) {
        const O = Array.from(a.rawValues)[0], S = qo(s.value).findIndex((x) => {
          let {
            data: C
          } = x;
          return C[a.fieldNames.value] === O;
        });
        S !== -1 && (h(S), Tt(() => {
          c(S);
        }));
      }
      i.open && Tt(() => {
        var O;
        (O = l.current) === null || O === void 0 || O.scrollTo(void 0);
      });
    }, {
      immediate: !0,
      flush: "post"
    });
    const v = (O) => {
      O !== void 0 && a.onSelect(O, {
        selected: !a.rawValues.has(O)
      }), i.multiple || i.toggleOpen(!1);
    }, g = (O) => typeof O.label == "function" ? O.label() : O.label;
    function m(O) {
      const S = s.value[O];
      if (!S) return null;
      const x = S.data || {}, {
        value: C
      } = x, {
        group: T
      } = S, w = JS(x, !0), P = g(S);
      return S ? M("div", j(j({
        "aria-label": typeof P == "string" && !T ? P : null
      }, w), {}, {
        key: O,
        role: T ? "presentation" : "option",
        id: `${i.id}_list_${O}`,
        "aria-selected": p(C)
      }), [C]) : null;
    }
    return n({
      onKeydown: (O) => {
        const {
          which: S,
          ctrlKey: x
        } = O;
        switch (S) {
          case ge.N:
          case ge.P:
          case ge.UP:
          case ge.DOWN: {
            let C = 0;
            if (S === ge.UP ? C = -1 : S === ge.DOWN ? C = 1 : bge() && x && (S === ge.N ? C = 1 : S === ge.P && (C = -1)), C !== 0) {
              const T = f(d.activeIndex + C, C);
              c(T), h(T, !0);
            }
            break;
          }
          case ge.ENTER: {
            const C = s.value[d.activeIndex];
            C && !C.data.disabled ? v(C.value) : v(void 0), i.open && O.preventDefault();
            break;
          }
          case ge.ESC:
            i.toggleOpen(!1), i.open && O.stopPropagation();
        }
      },
      onKeyup: () => {
      },
      scrollTo: (O) => {
        c(O);
      }
    }), () => {
      const {
        id: O,
        notFoundContent: S,
        onPopupScroll: x
      } = i, {
        menuItemSelectedIcon: C,
        fieldNames: T,
        virtual: w,
        listHeight: P,
        listItemHeight: $
      } = a, A = r.option, {
        activeIndex: D
      } = d, E = Object.keys(T).map((R) => T[R]);
      return s.value.length === 0 ? M("div", {
        role: "listbox",
        id: `${O}_list`,
        class: `${o.value}-empty`,
        onMousedown: u
      }, [S]) : M(wt, null, [M("div", {
        role: "listbox",
        id: `${O}_list`,
        style: {
          height: 0,
          width: 0,
          overflow: "hidden"
        }
      }, [m(D - 1), m(D), m(D + 1)]), M(mge, {
        itemKey: "key",
        ref: l,
        data: s.value,
        height: P,
        itemHeight: $,
        fullHeight: !1,
        onMousedown: u,
        onScroll: x,
        virtual: w
      }, {
        default: (R, N) => {
          var V;
          const {
            group: z,
            groupOption: W,
            data: F,
            value: Q
          } = R, {
            key: Z
          } = F, ne = typeof R.label == "function" ? R.label() : R.label;
          if (z) {
            const Te = (V = F.title) !== null && V !== void 0 ? V : vN(ne) && ne;
            return M("div", {
              class: ye(o.value, `${o.value}-group`),
              title: Te
            }, [A ? A(F) : ne !== void 0 ? ne : Z]);
          }
          const {
            disabled: ee,
            title: oe,
            children: K,
            style: ie,
            class: X,
            className: H
          } = F, G = Sge(F, ["disabled", "title", "children", "style", "class", "className"]), re = or(G, E), fe = p(Q), de = `${o.value}-option`, Ee = ye(o.value, de, X, H, {
            [`${de}-grouped`]: W,
            [`${de}-active`]: D === N && !ee,
            [`${de}-disabled`]: ee,
            [`${de}-selected`]: fe
          }), $e = g(R), Se = !C || typeof C == "function" || fe, be = typeof $e == "number" ? $e : $e || Q;
          let he = vN(be) ? be.toString() : void 0;
          return oe !== void 0 && (he = oe), M("div", j(j({}, re), {}, {
            "aria-selected": fe,
            class: Ee,
            title: he,
            onMousemove: (Te) => {
              G.onMousemove && G.onMousemove(Te), !(D === N || ee) && h(N);
            },
            onClick: (Te) => {
              ee || v(Q), G.onClick && G.onClick(Te);
            },
            style: ie
          }), [M("div", {
            class: `${de}-content`
          }, [A ? A(F) : be]), Ui(C) || fe, Se && M(pf, {
            class: `${o.value}-option-state`,
            customizeIcon: C,
            customizeIconProps: {
              isSelected: fe
            }
          }, {
            default: () => [fe ? "✓" : null]
          })]);
        }
      })]);
    };
  }
});
var wge = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function Cge(t) {
  const e = t, {
    key: n,
    children: r
  } = e, i = e.props, {
    value: a,
    disabled: o
  } = i, s = wge(i, ["value", "disabled"]), l = r == null ? void 0 : r.default;
  return I({
    key: n,
    value: a !== void 0 ? a : n,
    children: l,
    disabled: o || o === ""
  }, s);
}
function MI(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  return Yn(t).map((r, i) => {
    var a;
    if (!Ui(r) || !r.type)
      return null;
    const {
      type: {
        isSelectOptGroup: o
      },
      key: s,
      children: l,
      props: u
    } = r;
    if (e || !o)
      return Cge(r);
    const c = l && l.default ? l.default() : void 0, f = (u == null ? void 0 : u.label) || ((a = l.label) === null || a === void 0 ? void 0 : a.call(l)) || s;
    return I(I({
      key: `__RC_SELECT_GRP__${s === null ? i : String(s)}__`
    }, u), {
      label: f,
      options: MI(c || [])
    });
  }).filter((r) => r);
}
function Tge(t, e, n) {
  const r = ae(), i = ae(), a = ae(), o = ae([]);
  return se([t, e], () => {
    t.value ? o.value = qo(t.value).slice() : o.value = MI(e.value);
  }, {
    immediate: !0,
    deep: !0
  }), ht(() => {
    const s = o.value, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), c = n.value;
    function f(d) {
      let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
      for (let p = 0; p < d.length; p += 1) {
        const v = d[p];
        !v[c.options] || h ? (l.set(v[c.value], v), u.set(v[c.label], v)) : f(v[c.options], !0);
      }
    }
    f(s), r.value = s, i.value = l, a.value = u;
  }), {
    options: r,
    valueOptions: i,
    labelOptions: a
  };
}
let gN = 0;
const Pge = process.env.NODE_ENV !== "test" && wa();
function $ge() {
  let t;
  return Pge ? (t = gN, gN += 1) : t = "TEST_OR_SSR", t;
}
function Age() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : U("");
  const e = `rc_select_${$ge()}`;
  return t.value || e;
}
function II(t) {
  return Array.isArray(t) ? t : t !== void 0 ? [t] : [];
}
const Ege = typeof window < "u" && window.document && window.document.documentElement;
process.env.NODE_ENV;
function Mge(t) {
  const {
    mode: e,
    options: n,
    children: r,
    backfill: i,
    allowClear: a,
    placeholder: o,
    getInputElement: s,
    showSearch: l,
    onSearch: u,
    defaultOpen: c,
    autofocus: f,
    labelInValue: d,
    value: h,
    inputValue: p,
    optionLabelProp: v
  } = t, g = EI(e), m = l !== void 0 ? l : g || e === "combobox", y = n || MI(r);
  if (oa(e !== "tags" || y.every((b) => !b.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), oa(e !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), oa(e === "combobox" || !i, "`backfill` only works with `combobox` mode."), oa(e === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), a8(e !== "combobox" || !s || !a || !o, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), u && !m && e !== "combobox" && e !== "tags" && oa(!1, "`onSearch` should work with `showSearch` instead of use alone."), a8(!c || f, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), h != null) {
    const b = II(h);
    oa(!d || b.every((_) => typeof _ == "object" && ("key" in _ || "value" in _)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), oa(!g || Array.isArray(h), "`value` should be array when `mode` is `multiple` or `tags`");
  }
  if (r) {
    let b = null;
    r.some((_) => {
      var O;
      if (!Ui(_) || !_.type)
        return !1;
      const {
        type: S
      } = _;
      return S.isSelectOption ? !1 : S.isSelectOptGroup ? !(((O = _.children) === null || O === void 0 ? void 0 : O.default()) || []).every((T) => !Ui(T) || !_.type || T.type.isSelectOption ? !0 : (b = T.type, !1)) : (b = S, !0);
    }), b && oa(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${b.displayName || b.name || b}\`.`), oa(p === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
  }
}
function gC(t, e) {
  return II(t).join("").toUpperCase().includes(e);
}
const Ige = (t, e, n, r, i) => L(() => {
  const a = n.value, o = i == null ? void 0 : i.value, s = r == null ? void 0 : r.value;
  if (!a || s === !1)
    return t.value;
  const {
    options: l,
    label: u,
    value: c
  } = e.value, f = [], d = typeof s == "function", h = a.toUpperCase(), p = d ? s : (g, m) => o ? gC(m[o], h) : m[l] ? gC(m[u !== "children" ? u : "label"], h) : gC(m[c], h), v = d ? (g) => y2(g) : (g) => g;
  return t.value.forEach((g) => {
    if (g[l]) {
      if (p(a, v(g)))
        f.push(g);
      else {
        const y = g[l].filter((b) => p(a, v(b)));
        y.length && f.push(I(I({}, g), {
          [l]: y
        }));
      }
      return;
    }
    p(a, v(g)) && f.push(g);
  }), f;
}), Dge = (t, e) => {
  const n = ae({
    values: /* @__PURE__ */ new Map(),
    options: /* @__PURE__ */ new Map()
  });
  return [L(() => {
    const {
      values: a,
      options: o
    } = n.value, s = t.value.map((c) => {
      var f;
      return c.label === void 0 ? I(I({}, c), {
        label: (f = a.get(c.value)) === null || f === void 0 ? void 0 : f.label
      }) : c;
    }), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
    return s.forEach((c) => {
      l.set(c.value, c), u.set(c.value, e.value.get(c.value) || o.get(c.value));
    }), n.value.values = l, n.value.options = u, s;
  }), (a) => e.value.get(a) || n.value.options.get(a)];
};
function wh(t, e) {
  const {
    defaultValue: n,
    value: r = U()
  } = e || {};
  let i = typeof t == "function" ? t() : t;
  r.value !== void 0 && (i = B(r)), n !== void 0 && (i = typeof n == "function" ? n() : n);
  const a = U(i), o = U(i);
  ht(() => {
    let l = r.value !== void 0 ? r.value : a.value;
    e.postState && (l = e.postState(l)), o.value = l;
  });
  function s(l) {
    const u = o.value;
    a.value = l, qo(o.value) !== l && e.onChange && e.onChange(l, u);
  }
  return se(r, () => {
    a.value = r.value;
  }), [o, s];
}
function fn(t) {
  const e = typeof t == "function" ? t() : t, n = U(e);
  function r(i) {
    n.value = i;
  }
  return [n, r];
}
const Rge = ["inputValue"];
function QZ() {
  return I(I({}, zZ()), {
    prefixCls: String,
    id: String,
    backfill: {
      type: Boolean,
      default: void 0
    },
    // >>> Field Names
    fieldNames: Object,
    // >>> Search
    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    onSearch: Function,
    autoClearSearchValue: {
      type: Boolean,
      default: void 0
    },
    // >>> Select
    onSelect: Function,
    onDeselect: Function,
    // >>> Options
    /**
     * In Select, `false` means do nothing.
     * In TreeSelect, `false` will highlight match item.
     * It's by design.
     */
    filterOption: {
      type: [Boolean, Function],
      default: void 0
    },
    filterSort: Function,
    optionFilterProp: String,
    optionLabelProp: String,
    options: Array,
    defaultActiveFirstOption: {
      type: Boolean,
      default: void 0
    },
    virtual: {
      type: Boolean,
      default: void 0
    },
    listHeight: Number,
    listItemHeight: Number,
    // >>> Icon
    menuItemSelectedIcon: Y.any,
    mode: String,
    labelInValue: {
      type: Boolean,
      default: void 0
    },
    value: Y.any,
    defaultValue: Y.any,
    onChange: Function,
    children: Array
  });
}
function kge(t) {
  return !t || typeof t != "object";
}
const Lge = te({
  compatConfig: {
    MODE: 3
  },
  name: "VcSelect",
  inheritAttrs: !1,
  props: sr(QZ(), {
    prefixCls: "vc-select",
    autoClearSearchValue: !0,
    listHeight: 200,
    listItemHeight: 20,
    dropdownMatchSelectWidth: !0
  }),
  setup(t, e) {
    let {
      expose: n,
      attrs: r,
      slots: i
    } = e;
    const a = Age(Nn(t, "id")), o = L(() => EI(t.mode)), s = L(() => !!(!t.options && t.children)), l = L(() => t.filterOption === void 0 && t.mode === "combobox" ? !1 : t.filterOption), u = L(() => aZ(t.fieldNames, s.value)), [c, f] = wh("", {
      value: L(() => t.searchValue !== void 0 ? t.searchValue : t.inputValue),
      postState: (X) => X || ""
    }), d = Tge(Nn(t, "options"), Nn(t, "children"), u), {
      valueOptions: h,
      labelOptions: p,
      options: v
    } = d, g = (X) => II(X).map((G) => {
      var re, fe;
      let de, Ee, $e, Se;
      kge(G) ? de = G : ($e = G.key, Ee = G.label, de = (re = G.value) !== null && re !== void 0 ? re : $e);
      const be = h.value.get(de);
      return be && (Ee === void 0 && (Ee = be == null ? void 0 : be[t.optionLabelProp || u.value.label]), $e === void 0 && ($e = (fe = be == null ? void 0 : be.key) !== null && fe !== void 0 ? fe : de), Se = be == null ? void 0 : be.disabled), {
        label: Ee,
        value: de,
        key: $e,
        disabled: Se,
        option: be
      };
    }), [m, y] = wh(t.defaultValue, {
      value: Nn(t, "value")
    }), b = L(() => {
      var X;
      const H = g(m.value);
      return t.mode === "combobox" && !(!((X = H[0]) === null || X === void 0) && X.value) ? [] : H;
    }), [_, O] = Dge(b, h), S = L(() => {
      if (!t.mode && _.value.length === 1) {
        const X = _.value[0];
        if (X.value === null && (X.label === null || X.label === void 0))
          return [];
      }
      return _.value.map((X) => {
        var H;
        return I(I({}, X), {
          label: (H = typeof X.label == "function" ? X.label() : X.label) !== null && H !== void 0 ? H : X.value
        });
      });
    }), x = L(() => new Set(_.value.map((X) => X.value)));
    ht(() => {
      var X;
      if (t.mode === "combobox") {
        const H = (X = _.value[0]) === null || X === void 0 ? void 0 : X.value;
        H != null && f(String(H));
      }
    }, {
      flush: "post"
    });
    const C = (X, H) => {
      const G = H ?? X;
      return {
        [u.value.value]: X,
        [u.value.label]: G
      };
    }, T = ae();
    ht(() => {
      if (t.mode !== "tags") {
        T.value = v.value;
        return;
      }
      const X = v.value.slice(), H = (G) => h.value.has(G);
      [..._.value].sort((G, re) => G.value < re.value ? -1 : 1).forEach((G) => {
        const re = G.value;
        H(re) || X.push(C(re, G.label));
      }), T.value = X;
    });
    const w = Ige(T, u, c, l, Nn(t, "optionFilterProp")), P = L(() => t.mode !== "tags" || !c.value || w.value.some((X) => X[t.optionFilterProp || "value"] === c.value) ? w.value : [C(c.value), ...w.value]), $ = L(() => t.filterSort ? [...P.value].sort((X, H) => t.filterSort(X, H)) : P.value), A = L(() => Kfe($.value, {
      fieldNames: u.value,
      childrenAsData: s.value
    })), D = (X) => {
      const H = g(X);
      if (y(H), t.onChange && // Trigger event only when value changed
      (H.length !== _.value.length || H.some((G, re) => {
        var fe;
        return ((fe = _.value[re]) === null || fe === void 0 ? void 0 : fe.value) !== (G == null ? void 0 : G.value);
      }))) {
        const G = t.labelInValue ? H.map((fe) => I(I({}, fe), {
          originLabel: fe.label,
          label: typeof fe.label == "function" ? fe.label() : fe.label
        })) : H.map((fe) => fe.value), re = H.map((fe) => y2(O(fe.value)));
        t.onChange(
          // Value
          o.value ? G : G[0],
          // Option
          o.value ? re : re[0]
        );
      }
    }, [E, R] = fn(null), [N, V] = fn(0), z = L(() => t.defaultActiveFirstOption !== void 0 ? t.defaultActiveFirstOption : t.mode !== "combobox"), W = function(X, H) {
      let {
        source: G = "keyboard"
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      V(H), t.backfill && t.mode === "combobox" && X !== null && G === "keyboard" && R(String(X));
    }, F = (X, H) => {
      const G = () => {
        var re;
        const fe = O(X), de = fe == null ? void 0 : fe[u.value.label];
        return [t.labelInValue ? {
          label: typeof de == "function" ? de() : de,
          originLabel: de,
          value: X,
          key: (re = fe == null ? void 0 : fe.key) !== null && re !== void 0 ? re : X
        } : X, y2(fe)];
      };
      if (H && t.onSelect) {
        const [re, fe] = G();
        t.onSelect(re, fe);
      } else if (!H && t.onDeselect) {
        const [re, fe] = G();
        t.onDeselect(re, fe);
      }
    }, Q = (X, H) => {
      let G;
      const re = o.value ? H.selected : !0;
      re ? G = o.value ? [..._.value, X] : [X] : G = _.value.filter((fe) => fe.value !== X), D(G), F(X, re), t.mode === "combobox" ? R("") : (!o.value || t.autoClearSearchValue) && (f(""), R(""));
    }, Z = (X, H) => {
      D(X), (H.type === "remove" || H.type === "clear") && H.values.forEach((G) => {
        F(G.value, !1);
      });
    }, ne = (X, H) => {
      var G;
      if (f(X), R(null), H.source === "submit") {
        const re = (X || "").trim();
        if (re) {
          const fe = Array.from(/* @__PURE__ */ new Set([...x.value, re]));
          D(fe), F(re, !0), f("");
        }
        return;
      }
      H.source !== "blur" && (t.mode === "combobox" && D(X), (G = t.onSearch) === null || G === void 0 || G.call(t, X));
    }, ee = (X) => {
      let H = X;
      t.mode !== "tags" && (H = X.map((re) => {
        const fe = p.value.get(re);
        return fe == null ? void 0 : fe.value;
      }).filter((re) => re !== void 0));
      const G = Array.from(/* @__PURE__ */ new Set([...x.value, ...H]));
      D(G), G.forEach((re) => {
        F(re, !0);
      });
    }, oe = L(() => t.virtual !== !1 && t.dropdownMatchSelectWidth !== !1);
    _ge(BZ(I(I({}, d), {
      flattenOptions: A,
      onActiveValue: W,
      defaultActiveFirstOption: z,
      onSelect: Q,
      menuItemSelectedIcon: Nn(t, "menuItemSelectedIcon"),
      rawValues: x,
      fieldNames: u,
      virtual: oe,
      listHeight: Nn(t, "listHeight"),
      listItemHeight: Nn(t, "listItemHeight"),
      childrenAsData: s
    }))), process.env.NODE_ENV !== "production" && ht(() => {
      Mge(t);
    }, {
      flush: "post"
    });
    const K = U();
    n({
      focus() {
        var X;
        (X = K.value) === null || X === void 0 || X.focus();
      },
      blur() {
        var X;
        (X = K.value) === null || X === void 0 || X.blur();
      },
      scrollTo(X) {
        var H;
        (H = K.value) === null || H === void 0 || H.scrollTo(X);
      }
    });
    const ie = L(() => or(t, [
      "id",
      "mode",
      "prefixCls",
      "backfill",
      "fieldNames",
      // Search
      "inputValue",
      "searchValue",
      "onSearch",
      "autoClearSearchValue",
      // Select
      "onSelect",
      "onDeselect",
      "dropdownMatchSelectWidth",
      // Options
      "filterOption",
      "filterSort",
      "optionFilterProp",
      "optionLabelProp",
      "options",
      "children",
      "defaultActiveFirstOption",
      "menuItemSelectedIcon",
      "virtual",
      "listHeight",
      "listItemHeight",
      // Value
      "value",
      "defaultValue",
      "labelInValue",
      "onChange"
    ]));
    return () => M(ige, j(j(j({}, ie.value), r), {}, {
      id: a,
      prefixCls: t.prefixCls,
      ref: K,
      omitDomProps: Rge,
      mode: t.mode,
      displayValues: S.value,
      onDisplayValuesChange: Z,
      searchValue: c.value,
      onSearch: ne,
      onSearchSplit: ee,
      dropdownMatchSelectWidth: t.dropdownMatchSelectWidth,
      OptionList: xge,
      emptyOptions: !A.value.length,
      activeValue: E.value,
      activeDescendantId: `${a}_list_${N.value}`
    }), i);
  }
}), DI = () => null;
DI.isSelectOption = !0;
DI.displayName = "ASelectOption";
const RI = () => null;
RI.isSelectOptGroup = !0;
RI.displayName = "ASelectOptGroup";
var Nge = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, Bge = Symbol("iconContext"), HZ = function() {
  return Ge(Bge, {
    prefixCls: U("anticon"),
    rootClassName: U(""),
    csp: U()
  });
};
function kI() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
function zge(t, e) {
  return t && t.contains ? t.contains(e) : !1;
}
var mN = "data-vc-order", Vge = "vc-icon-key", $2 = /* @__PURE__ */ new Map();
function GZ() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.mark;
  return e ? e.startsWith("data-") ? e : "data-".concat(e) : Vge;
}
function LI(t) {
  if (t.attachTo)
    return t.attachTo;
  var e = document.querySelector("head");
  return e || document.body;
}
function Fge(t) {
  return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
}
function jZ(t) {
  return Array.from(($2.get(t) || t).children).filter(function(e) {
    return e.tagName === "STYLE";
  });
}
function ZZ(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  if (!kI())
    return null;
  var n = e.csp, r = e.prepend, i = document.createElement("style");
  i.setAttribute(mN, Fge(r)), n && n.nonce && (i.nonce = n.nonce), i.innerHTML = t;
  var a = LI(e), o = a.firstChild;
  if (r) {
    if (r === "queue") {
      var s = jZ(a).filter(function(l) {
        return ["prepend", "prependQueue"].includes(l.getAttribute(mN));
      });
      if (s.length)
        return a.insertBefore(i, s[s.length - 1].nextSibling), i;
    }
    a.insertBefore(i, o);
  } else
    a.appendChild(i);
  return i;
}
function Wge(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = LI(e);
  return jZ(n).find(function(r) {
    return r.getAttribute(GZ(e)) === t;
  });
}
function Qge(t, e) {
  var n = $2.get(t);
  if (!n || !zge(document, n)) {
    var r = ZZ("", e), i = r.parentNode;
    $2.set(t, i), t.removeChild(r);
  }
}
function Hge(t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = LI(n);
  Qge(r, n);
  var i = Wge(e, n);
  if (i)
    return n.csp && n.csp.nonce && i.nonce !== n.csp.nonce && (i.nonce = n.csp.nonce), i.innerHTML !== t && (i.innerHTML = t), i;
  var a = ZZ(t, n);
  return a.setAttribute(GZ(n), e), a;
}
function yN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Gge(t, i, n[i]);
    });
  }
  return t;
}
function Gge(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
function jge(t, e) {
  process.env.NODE_ENV !== "production" && !t && console !== void 0 && console.error("Warning: ".concat(e));
}
function Zge(t, e) {
  jge(t, "[@ant-design/icons-vue] ".concat(e));
}
function bN(t) {
  return typeof t == "object" && typeof t.name == "string" && typeof t.theme == "string" && (typeof t.icon == "object" || typeof t.icon == "function");
}
function A2(t, e, n) {
  return n ? jg(t.tag, yN({
    key: e
  }, n, t.attrs), (t.children || []).map(function(r, i) {
    return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  })) : jg(t.tag, yN({
    key: e
  }, t.attrs), (t.children || []).map(function(r, i) {
    return A2(r, "".concat(e, "-").concat(t.tag, "-").concat(i));
  }));
}
function UZ(t) {
  return ff(t)[0];
}
function XZ(t) {
  return t ? Array.isArray(t) ? t : [t] : [];
}
var Uge = `
.anticon {
  display: inline-block;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

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

.anticon[tabindex] {
  cursor: pointer;
}

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

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

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`;
function YZ(t) {
  return t && t.getRootNode && t.getRootNode();
}
function Xge(t) {
  return kI() ? YZ(t) instanceof ShadowRoot : !1;
}
function Yge(t) {
  return Xge(t) ? YZ(t) : null;
}
var qge = function() {
  var e = HZ(), n = e.prefixCls, r = e.csp, i = vn(), a = Uge;
  n && (a = a.replace(/anticon/g, n.value)), Tt(function() {
    if (kI()) {
      var o = i.vnode.el, s = Yge(o);
      Hge(a, "@ant-design-vue-icons", {
        prepend: !0,
        csp: r.value,
        attachTo: s
      });
    }
  });
}, Kge = ["icon", "primaryColor", "secondaryColor"];
function Jge(t, e) {
  if (t == null) return {};
  var n = eme(t, e), r, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(t);
    for (i = 0; i < a.length; i++)
      r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  }
  return n;
}
function eme(t, e) {
  if (t == null) return {};
  var n = {}, r = Object.keys(t), i, a;
  for (a = 0; a < r.length; a++)
    i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  return n;
}
function C_(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      tme(t, i, n[i]);
    });
  }
  return t;
}
function tme(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var lg = tn({
  primaryColor: "#333",
  secondaryColor: "#E6E6E6",
  calculated: !1
});
function nme(t) {
  var e = t.primaryColor, n = t.secondaryColor;
  lg.primaryColor = e, lg.secondaryColor = n || UZ(e), lg.calculated = !!n;
}
function rme() {
  return C_({}, lg);
}
var _u = function(e, n) {
  var r = C_({}, e, n.attrs), i = r.icon, a = r.primaryColor, o = r.secondaryColor, s = Jge(r, Kge), l = lg;
  if (a && (l = {
    primaryColor: a,
    secondaryColor: o || UZ(a)
  }), Zge(bN(i), "icon should be icon definiton, but got ".concat(i)), !bN(i))
    return null;
  var u = i;
  return u && typeof u.icon == "function" && (u = C_({}, u, {
    icon: u.icon(l.primaryColor, l.secondaryColor)
  })), A2(u.icon, "svg-".concat(u.name), C_({}, s, {
    "data-icon": u.name,
    width: "1em",
    height: "1em",
    fill: "currentColor",
    "aria-hidden": "true"
  }));
};
_u.props = {
  icon: Object,
  primaryColor: String,
  secondaryColor: String,
  focusable: String
};
_u.inheritAttrs = !1;
_u.displayName = "IconBase";
_u.getTwoToneColors = rme;
_u.setTwoToneColors = nme;
function ime(t, e) {
  return lme(t) || sme(t, e) || ome(t, e) || ame();
}
function ame() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function ome(t, e) {
  if (t) {
    if (typeof t == "string") return _N(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _N(t, e);
  }
}
function _N(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++)
    r[n] = t[n];
  return r;
}
function sme(t, e) {
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  if (n != null) {
    var r = [], i = !0, a = !1, o, s;
    try {
      for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
        ;
    } catch (l) {
      a = !0, s = l;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw s;
      }
    }
    return r;
  }
}
function lme(t) {
  if (Array.isArray(t)) return t;
}
function qZ(t) {
  var e = XZ(t), n = ime(e, 2), r = n[0], i = n[1];
  return _u.setTwoToneColors({
    primaryColor: r,
    secondaryColor: i
  });
}
function ume() {
  var t = _u.getTwoToneColors();
  return t.calculated ? [t.primaryColor, t.secondaryColor] : t.primaryColor;
}
var cme = te({
  name: "InsertStyles",
  setup: function() {
    return qge(), function() {
      return null;
    };
  }
}), fme = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
function dme(t, e) {
  return gme(t) || vme(t, e) || pme(t, e) || hme();
}
function hme() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function pme(t, e) {
  if (t) {
    if (typeof t == "string") return ON(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ON(t, e);
  }
}
function ON(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++)
    r[n] = t[n];
  return r;
}
function vme(t, e) {
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
  if (n != null) {
    var r = [], i = !0, a = !1, o, s;
    try {
      for (n = n.call(t); !(i = (o = n.next()).done) && (r.push(o.value), !(e && r.length === e)); i = !0)
        ;
    } catch (l) {
      a = !0, s = l;
    } finally {
      try {
        !i && n.return != null && n.return();
      } finally {
        if (a) throw s;
      }
    }
    return r;
  }
}
function gme(t) {
  if (Array.isArray(t)) return t;
}
function SN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Nv(t, i, n[i]);
    });
  }
  return t;
}
function Nv(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
function mme(t, e) {
  if (t == null) return {};
  var n = yme(t, e), r, i;
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(t);
    for (i = 0; i < a.length; i++)
      r = a[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (n[r] = t[r]);
  }
  return n;
}
function yme(t, e) {
  if (t == null) return {};
  var n = {}, r = Object.keys(t), i, a;
  for (a = 0; a < r.length; a++)
    i = r[a], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
  return n;
}
qZ(tfe.primary);
var lt = function(e, n) {
  var r, i = SN({}, e, n.attrs), a = i.class, o = i.icon, s = i.spin, l = i.rotate, u = i.tabindex, c = i.twoToneColor, f = i.onClick, d = mme(i, fme), h = HZ(), p = h.prefixCls, v = h.rootClassName, g = (r = {}, Nv(r, v.value, !!v.value), Nv(r, p.value, !0), Nv(r, "".concat(p.value, "-").concat(o.name), !!o.name), Nv(r, "".concat(p.value, "-spin"), !!s || o.name === "loading"), r), m = u;
  m === void 0 && f && (m = -1);
  var y = l ? {
    msTransform: "rotate(".concat(l, "deg)"),
    transform: "rotate(".concat(l, "deg)")
  } : void 0, b = XZ(c), _ = dme(b, 2), O = _[0], S = _[1];
  return M("span", SN({
    role: "img",
    "aria-label": o.name
  }, d, {
    onClick: f,
    class: [g, a],
    tabindex: m
  }), [M(_u, {
    icon: o,
    primaryColor: O,
    secondaryColor: S,
    style: y
  }, null), M(cme, null, null)]);
};
lt.props = {
  spin: Boolean,
  rotate: Number,
  icon: Object,
  twoToneColor: [String, Array]
};
lt.displayName = "AntdIcon";
lt.inheritAttrs = !1;
lt.getTwoToneColor = ume;
lt.setTwoToneColor = qZ;
function xN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      bme(t, i, n[i]);
    });
  }
  return t;
}
function bme(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var tx = function(e, n) {
  var r = xN({}, e, n.attrs);
  return M(lt, xN({}, r, {
    icon: Nge
  }), null);
};
tx.displayName = "DownOutlined";
tx.inheritAttrs = !1;
var _me = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, name: "loading", theme: "outlined" };
function wN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Ome(t, i, n[i]);
    });
  }
  return t;
}
function Ome(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var ts = function(e, n) {
  var r = wN({}, e, n.attrs);
  return M(lt, wN({}, r, {
    icon: _me
  }), null);
};
ts.displayName = "LoadingOutlined";
ts.inheritAttrs = !1;
var Sme = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
function CN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      xme(t, i, n[i]);
    });
  }
  return t;
}
function xme(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var NI = function(e, n) {
  var r = CN({}, e, n.attrs);
  return M(lt, CN({}, r, {
    icon: Sme
  }), null);
};
NI.displayName = "CheckOutlined";
NI.inheritAttrs = !1;
var wme = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" };
function TN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Cme(t, i, n[i]);
    });
  }
  return t;
}
function Cme(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var al = function(e, n) {
  var r = TN({}, e, n.attrs);
  return M(lt, TN({}, r, {
    icon: wme
  }), null);
};
al.displayName = "CloseOutlined";
al.inheritAttrs = !1;
var Tme = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
function PN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Pme(t, i, n[i]);
    });
  }
  return t;
}
function Pme(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Da = function(e, n) {
  var r = PN({}, e, n.attrs);
  return M(lt, PN({}, r, {
    icon: Tme
  }), null);
};
Da.displayName = "CloseCircleFilled";
Da.inheritAttrs = !1;
var $me = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, name: "search", theme: "outlined" };
function $N(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Ame(t, i, n[i]);
    });
  }
  return t;
}
function Ame(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var nx = function(e, n) {
  var r = $N({}, e, n.attrs);
  return M(lt, $N({}, r, {
    icon: $me
  }), null);
};
nx.displayName = "SearchOutlined";
nx.inheritAttrs = !1;
function Eme(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  const {
    loading: n,
    multiple: r,
    prefixCls: i,
    hasFeedback: a,
    feedbackIcon: o,
    showArrow: s
  } = t, l = t.suffixIcon || e.suffixIcon && e.suffixIcon(), u = t.clearIcon || e.clearIcon && e.clearIcon(), c = t.menuItemSelectedIcon || e.menuItemSelectedIcon && e.menuItemSelectedIcon(), f = t.removeIcon || e.removeIcon && e.removeIcon(), d = u ?? M(Da, null, null), h = (m) => M(wt, null, [s !== !1 && m, a && o]);
  let p = null;
  if (l !== void 0)
    p = h(l);
  else if (n)
    p = h(M(ts, {
      spin: !0
    }, null));
  else {
    const m = `${i}-suffix`;
    p = (y) => {
      let {
        open: b,
        showSearch: _
      } = y;
      return h(b && _ ? M(nx, {
        class: m
      }, null) : M(tx, {
        class: m
      }, null));
    };
  }
  let v = null;
  c !== void 0 ? v = c : r ? v = M(NI, null, null) : v = null;
  let g = null;
  return f !== void 0 ? g = f : g = M(al, null, null), {
    clearIcon: d,
    suffixIcon: p,
    itemIcon: v,
    removeIcon: g
  };
}
function BI(t) {
  const e = Symbol("contextKey");
  return {
    useProvide: (i, a) => {
      const o = tn({});
      return pt(e, o), ht(() => {
        I(o, i, a || {});
      }), o;
    },
    useInject: () => Ge(e, t) || {}
  };
}
const C1 = Symbol("ContextProps"), T1 = Symbol("InternalContextProps"), Mme = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : L(() => !0);
  const n = U(/* @__PURE__ */ new Map()), r = (o, s) => {
    n.value.set(o, s), n.value = new Map(n.value);
  }, i = (o) => {
    n.value.delete(o), n.value = new Map(n.value);
  }, a = vn();
  se([e, n], () => {
    if (process.env.NODE_ENV !== "production" && e.value && n.value.size > 1) {
      Qi(!1, "Form.Item", `FormItem can only collect one field item, you haved set ${[...n.value.values()].map((s) => `\`${s.name}\``).join(", ")} ${n.value.size} field items.
        You can set not need to be collected fields into \`a-form-item-rest\``);
      let o = a;
      for (; o.parent; )
        console.warn("at", o.type), o = o.parent;
    }
  }), pt(C1, t), pt(T1, {
    addFormItemField: r,
    removeFormItemField: i
  });
}, E2 = {
  id: L(() => {
  }),
  onFieldBlur: () => {
  },
  onFieldChange: () => {
  },
  clearValidate: () => {
  }
}, M2 = {
  addFormItemField: () => {
  },
  removeFormItemField: () => {
  }
}, ss = () => {
  const t = Ge(T1, M2), e = Symbol("FormItemFieldKey"), n = vn();
  return t.addFormItemField(e, n.type), yt(() => {
    t.removeFormItemField(e);
  }), pt(T1, M2), pt(C1, E2), Ge(C1, E2);
}, im = te({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItemRest",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return pt(T1, M2), pt(C1, E2), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), ro = BI({}), P1 = te({
  name: "NoFormStatus",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return ro.useProvide({}), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
function Is(t, e, n) {
  return ye({
    [`${t}-status-success`]: e === "success",
    [`${t}-status-warning`]: e === "warning",
    [`${t}-status-error`]: e === "error",
    [`${t}-status-validating`]: e === "validating",
    [`${t}-has-feedback`]: n
  });
}
const m0 = (t, e) => e || t, Ime = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      display: "inline-flex",
      "&-block": {
        display: "flex",
        width: "100%"
      },
      "&-vertical": {
        flexDirection: "column"
      }
    }
  };
}, Dme = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      display: "inline-flex",
      "&-rtl": {
        direction: "rtl"
      },
      "&-vertical": {
        flexDirection: "column"
      },
      "&-align": {
        flexDirection: "column",
        "&-center": {
          alignItems: "center"
        },
        "&-start": {
          alignItems: "flex-start"
        },
        "&-end": {
          alignItems: "flex-end"
        },
        "&-baseline": {
          alignItems: "baseline"
        }
      },
      [`${e}-item`]: {
        "&:empty": {
          display: "none"
        }
      }
    }
  };
}, Rme = Sn("Space", (t) => [Dme(t), Ime(t)]);
var kme = "[object Symbol]";
function rx(t) {
  return typeof t == "symbol" || no(t) && bu(t) == kme;
}
function ix(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = Array(r); ++n < r; )
    i[n] = e(t[n], n, t);
  return i;
}
var Lme = 1 / 0, AN = Ta ? Ta.prototype : void 0, EN = AN ? AN.toString : void 0;
function KZ(t) {
  if (typeof t == "string")
    return t;
  if (wi(t))
    return ix(t, KZ) + "";
  if (rx(t))
    return EN ? EN.call(t) : "";
  var e = t + "";
  return e == "0" && 1 / t == -Lme ? "-0" : e;
}
var Nme = /\s/;
function Bme(t) {
  for (var e = t.length; e-- && Nme.test(t.charAt(e)); )
    ;
  return e;
}
var zme = /^\s+/;
function Vme(t) {
  return t && t.slice(0, Bme(t) + 1).replace(zme, "");
}
var MN = NaN, Fme = /^[-+]0x[0-9a-f]+$/i, Wme = /^0b[01]+$/i, Qme = /^0o[0-7]+$/i, Hme = parseInt;
function I2(t) {
  if (typeof t == "number")
    return t;
  if (rx(t))
    return MN;
  if (xr(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = xr(e) ? e + "" : e;
  }
  if (typeof t != "string")
    return t === 0 ? t : +t;
  t = Vme(t);
  var n = Wme.test(t);
  return n || Qme.test(t) ? Hme(t.slice(2), n ? 2 : 8) : Fme.test(t) ? MN : +t;
}
var IN = 1 / 0, Gme = 17976931348623157e292;
function jme(t) {
  if (!t)
    return t === 0 ? t : 0;
  if (t = I2(t), t === IN || t === -IN) {
    var e = t < 0 ? -1 : 1;
    return e * Gme;
  }
  return t === t ? t : 0;
}
function Zme(t) {
  var e = jme(t), n = e % 1;
  return e === e ? n ? e - n : e : 0;
}
function zI(t) {
  return t;
}
var DN = Object.create, Ume = /* @__PURE__ */ function() {
  function t() {
  }
  return function(e) {
    if (!xr(e))
      return {};
    if (DN)
      return DN(e);
    t.prototype = e;
    var n = new t();
    return t.prototype = void 0, n;
  };
}();
function JZ(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
function Xme() {
}
function eU(t, e) {
  var n = -1, r = t.length;
  for (e || (e = Array(r)); ++n < r; )
    e[n] = t[n];
  return e;
}
var Yme = 800, qme = 16, Kme = Date.now;
function Jme(t) {
  var e = 0, n = 0;
  return function() {
    var r = Kme(), i = qme - (r - n);
    if (n = r, i > 0) {
      if (++e >= Yme)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
function e0e(t) {
  return function() {
    return t;
  };
}
var $1 = function() {
  try {
    var t = Mf(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), t0e = $1 ? function(t, e) {
  return $1(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: e0e(e),
    writable: !0
  });
} : zI, tU = Jme(t0e);
function n0e(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
    ;
  return t;
}
function nU(t, e, n, r) {
  for (var i = t.length, a = n + -1; ++a < i; )
    if (e(t[a], a, t))
      return a;
  return -1;
}
function r0e(t) {
  return t !== t;
}
function i0e(t, e, n) {
  for (var r = n - 1, i = t.length; ++r < i; )
    if (t[r] === e)
      return r;
  return -1;
}
function a0e(t, e, n) {
  return e === e ? i0e(t, e, n) : nU(t, r0e, n);
}
function rU(t, e) {
  var n = t == null ? 0 : t.length;
  return !!n && a0e(t, e, 0) > -1;
}
function VI(t, e, n) {
  e == "__proto__" && $1 ? $1(t, e, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : t[e] = n;
}
var o0e = Object.prototype, s0e = o0e.hasOwnProperty;
function FI(t, e, n) {
  var r = t[e];
  (!(s0e.call(t, e) && p0(r, n)) || n === void 0 && !(e in t)) && VI(t, e, n);
}
function sp(t, e, n, r) {
  var i = !n;
  n || (n = {});
  for (var a = -1, o = e.length; ++a < o; ) {
    var s = e[a], l = void 0;
    l === void 0 && (l = t[s]), i ? VI(n, s, l) : FI(n, s, l);
  }
  return n;
}
var RN = Math.max;
function iU(t, e, n) {
  return e = RN(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var r = arguments, i = -1, a = RN(r.length - e, 0), o = Array(a); ++i < a; )
      o[i] = r[e + i];
    i = -1;
    for (var s = Array(e + 1); ++i < e; )
      s[i] = r[i];
    return s[e] = n(o), JZ(t, this, s);
  };
}
function WI(t, e) {
  return tU(iU(t, e, zI), t + "");
}
function l0e(t, e, n) {
  if (!xr(n))
    return !1;
  var r = typeof e;
  return (r == "number" ? op(n) && GS(e, n.length) : r == "string" && e in n) ? p0(n[e], t) : !1;
}
function u0e(t) {
  return WI(function(e, n) {
    var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
    for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && l0e(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
      var s = n[r];
      s && t(e, s, r, a);
    }
    return e;
  });
}
function c0e(t) {
  var e = [];
  if (t != null)
    for (var n in Object(t))
      e.push(n);
  return e;
}
var f0e = Object.prototype, d0e = f0e.hasOwnProperty;
function h0e(t) {
  if (!xr(t))
    return c0e(t);
  var e = US(t), n = [];
  for (var r in t)
    r == "constructor" && (e || !d0e.call(t, r)) || n.push(r);
  return n;
}
function y0(t) {
  return op(t) ? CZ(t, !0) : h0e(t);
}
var p0e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, v0e = /^\w*$/;
function QI(t, e) {
  if (wi(t))
    return !1;
  var n = typeof t;
  return n == "number" || n == "symbol" || n == "boolean" || t == null || rx(t) ? !0 : v0e.test(t) || !p0e.test(t) || e != null && t in Object(e);
}
var g0e = "Expected a function";
function HI(t, e) {
  if (typeof t != "function" || e != null && typeof e != "function")
    throw new TypeError(g0e);
  var n = function() {
    var r = arguments, i = e ? e.apply(this, r) : r[0], a = n.cache;
    if (a.has(i))
      return a.get(i);
    var o = t.apply(this, r);
    return n.cache = a.set(i, o) || a, o;
  };
  return n.cache = new (HI.Cache || il)(), n;
}
HI.Cache = il;
var m0e = 500;
function y0e(t) {
  var e = HI(t, function(r) {
    return n.size === m0e && n.clear(), r;
  }), n = e.cache;
  return e;
}
var b0e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _0e = /\\(\\)?/g, O0e = y0e(function(t) {
  var e = [];
  return t.charCodeAt(0) === 46 && e.push(""), t.replace(b0e, function(n, r, i, a) {
    e.push(i ? a.replace(_0e, "$1") : r || n);
  }), e;
});
function S0e(t) {
  return t == null ? "" : KZ(t);
}
function lp(t, e) {
  return wi(t) ? t : QI(t, e) ? [t] : O0e(S0e(t));
}
var x0e = 1 / 0;
function up(t) {
  if (typeof t == "string" || rx(t))
    return t;
  var e = t + "";
  return e == "0" && 1 / t == -x0e ? "-0" : e;
}
function ax(t, e) {
  e = lp(e, t);
  for (var n = 0, r = e.length; t != null && n < r; )
    t = t[up(e[n++])];
  return n && n == r ? t : void 0;
}
function kt(t, e, n) {
  var r = t == null ? void 0 : ax(t, e);
  return r === void 0 ? n : r;
}
var kN = Ta ? Ta.isConcatSpreadable : void 0;
function w0e(t) {
  return wi(t) || Oh(t) || !!(kN && t && t[kN]);
}
function C0e(t, e, n, r, i) {
  var a = -1, o = t.length;
  for (n || (n = w0e), i || (i = []); ++a < o; ) {
    var s = t[a];
    n(s) ? OI(i, s) : i[i.length] = s;
  }
  return i;
}
function T0e(t) {
  var e = t == null ? 0 : t.length;
  return e ? C0e(t) : [];
}
function aU(t) {
  return tU(iU(t, void 0, T0e), t + "");
}
var GI = TZ(Object.getPrototypeOf, Object), P0e = "[object Object]", $0e = Function.prototype, A0e = Object.prototype, oU = $0e.toString, E0e = A0e.hasOwnProperty, M0e = oU.call(Object);
function jI(t) {
  if (!no(t) || bu(t) != P0e)
    return !1;
  var e = GI(t);
  if (e === null)
    return !0;
  var n = E0e.call(e, "constructor") && e.constructor;
  return typeof n == "function" && n instanceof n && oU.call(n) == M0e;
}
function I0e(t, e, n) {
  var r = -1, i = t.length;
  e < 0 && (e = -e > i ? 0 : i + e), n = n > i ? i : n, n < 0 && (n += i), i = e > n ? 0 : n - e >>> 0, e >>>= 0;
  for (var a = Array(i); ++r < i; )
    a[r] = t[r + e];
  return a;
}
function D0e(t, e) {
  return t && sp(e, v0(e), t);
}
function R0e(t, e) {
  return t && sp(e, y0(e), t);
}
var sU = typeof exports == "object" && exports && !exports.nodeType && exports, LN = sU && typeof module == "object" && module && !module.nodeType && module, k0e = LN && LN.exports === sU, NN = k0e ? fo.Buffer : void 0, BN = NN ? NN.allocUnsafe : void 0;
function lU(t, e) {
  if (e)
    return t.slice();
  var n = t.length, r = BN ? BN(n) : new t.constructor(n);
  return t.copy(r), r;
}
function L0e(t, e) {
  return sp(t, SI(t), e);
}
var N0e = Object.getOwnPropertySymbols, uU = N0e ? function(t) {
  for (var e = []; t; )
    OI(e, SI(t)), t = GI(t);
  return e;
} : OZ;
function B0e(t, e) {
  return sp(t, uU(t), e);
}
function cU(t) {
  return _Z(t, y0, uU);
}
var z0e = Object.prototype, V0e = z0e.hasOwnProperty;
function F0e(t) {
  var e = t.length, n = new t.constructor(e);
  return e && typeof t[0] == "string" && V0e.call(t, "index") && (n.index = t.index, n.input = t.input), n;
}
function ZI(t) {
  var e = new t.constructor(t.byteLength);
  return new w1(e).set(new w1(t)), e;
}
function W0e(t, e) {
  var n = e ? ZI(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.byteLength);
}
var Q0e = /\w*$/;
function H0e(t) {
  var e = new t.constructor(t.source, Q0e.exec(t));
  return e.lastIndex = t.lastIndex, e;
}
var zN = Ta ? Ta.prototype : void 0, VN = zN ? zN.valueOf : void 0;
function G0e(t) {
  return VN ? Object(VN.call(t)) : {};
}
function fU(t, e) {
  var n = e ? ZI(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.length);
}
var j0e = "[object Boolean]", Z0e = "[object Date]", U0e = "[object Map]", X0e = "[object Number]", Y0e = "[object RegExp]", q0e = "[object Set]", K0e = "[object String]", J0e = "[object Symbol]", eye = "[object ArrayBuffer]", tye = "[object DataView]", nye = "[object Float32Array]", rye = "[object Float64Array]", iye = "[object Int8Array]", aye = "[object Int16Array]", oye = "[object Int32Array]", sye = "[object Uint8Array]", lye = "[object Uint8ClampedArray]", uye = "[object Uint16Array]", cye = "[object Uint32Array]";
function fye(t, e, n) {
  var r = t.constructor;
  switch (e) {
    case eye:
      return ZI(t);
    case j0e:
    case Z0e:
      return new r(+t);
    case tye:
      return W0e(t, n);
    case nye:
    case rye:
    case iye:
    case aye:
    case oye:
    case sye:
    case lye:
    case uye:
    case cye:
      return fU(t, n);
    case U0e:
      return new r();
    case X0e:
    case K0e:
      return new r(t);
    case Y0e:
      return H0e(t);
    case q0e:
      return new r();
    case J0e:
      return G0e(t);
  }
}
function dU(t) {
  return typeof t.constructor == "function" && !US(t) ? Ume(GI(t)) : {};
}
var dye = "[object Map]";
function hye(t) {
  return no(t) && da(t) == dye;
}
var FN = xh && xh.isMap, pye = FN ? jS(FN) : hye, vye = "[object Set]";
function gye(t) {
  return no(t) && da(t) == vye;
}
var WN = xh && xh.isSet, mye = WN ? jS(WN) : gye, yye = 1, bye = 2, _ye = 4, hU = "[object Arguments]", Oye = "[object Array]", Sye = "[object Boolean]", xye = "[object Date]", wye = "[object Error]", pU = "[object Function]", Cye = "[object GeneratorFunction]", Tye = "[object Map]", Pye = "[object Number]", vU = "[object Object]", $ye = "[object RegExp]", Aye = "[object Set]", Eye = "[object String]", Mye = "[object Symbol]", Iye = "[object WeakMap]", Dye = "[object ArrayBuffer]", Rye = "[object DataView]", kye = "[object Float32Array]", Lye = "[object Float64Array]", Nye = "[object Int8Array]", Bye = "[object Int16Array]", zye = "[object Int32Array]", Vye = "[object Uint8Array]", Fye = "[object Uint8ClampedArray]", Wye = "[object Uint16Array]", Qye = "[object Uint32Array]", rn = {};
rn[hU] = rn[Oye] = rn[Dye] = rn[Rye] = rn[Sye] = rn[xye] = rn[kye] = rn[Lye] = rn[Nye] = rn[Bye] = rn[zye] = rn[Tye] = rn[Pye] = rn[vU] = rn[$ye] = rn[Aye] = rn[Eye] = rn[Mye] = rn[Vye] = rn[Fye] = rn[Wye] = rn[Qye] = !0;
rn[wye] = rn[pU] = rn[Iye] = !1;
function ug(t, e, n, r, i, a) {
  var o, s = e & yye, l = e & bye, u = e & _ye;
  if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
    return o;
  if (!xr(t))
    return t;
  var c = wi(t);
  if (c) {
    if (o = F0e(t), !s)
      return eU(t, o);
  } else {
    var f = da(t), d = f == pU || f == Cye;
    if (Sh(t))
      return lU(t, s);
    if (f == vU || f == hU || d && !i) {
      if (o = l || d ? {} : dU(t), !s)
        return l ? B0e(t, R0e(o, t)) : L0e(t, D0e(o, t));
    } else {
      if (!rn[f])
        return i ? t : {};
      o = fye(t, f, s);
    }
  }
  a || (a = new Ka());
  var h = a.get(t);
  if (h)
    return h;
  a.set(t, o), mye(t) ? t.forEach(function(g) {
    o.add(ug(g, e, n, g, t, a));
  }) : pye(t) && t.forEach(function(g, m) {
    o.set(m, ug(g, e, n, m, t, a));
  });
  var p = u ? l ? cU : x2 : l ? y0 : v0, v = c ? void 0 : p(t);
  return n0e(v || t, function(g, m) {
    v && (m = g, g = t[m]), FI(o, m, ug(g, e, n, m, t, a));
  }), o;
}
var Hye = 1, Gye = 4;
function Zc(t) {
  return ug(t, Hye | Gye);
}
var jye = 1, Zye = 2;
function Uye(t, e, n, r) {
  var i = n.length, a = i;
  if (t == null)
    return !a;
  for (t = Object(t); i--; ) {
    var o = n[i];
    if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
      return !1;
  }
  for (; ++i < a; ) {
    o = n[i];
    var s = o[0], l = t[s], u = o[1];
    if (o[2]) {
      if (l === void 0 && !(s in t))
        return !1;
    } else {
      var c = new Ka(), f;
      if (!(f === void 0 ? XS(u, l, jye | Zye, r, c) : f))
        return !1;
    }
  }
  return !0;
}
function gU(t) {
  return t === t && !xr(t);
}
function Xye(t) {
  for (var e = v0(t), n = e.length; n--; ) {
    var r = e[n], i = t[r];
    e[n] = [r, i, gU(i)];
  }
  return e;
}
function mU(t, e) {
  return function(n) {
    return n == null ? !1 : n[t] === e && (e !== void 0 || t in Object(n));
  };
}
function Yye(t) {
  var e = Xye(t);
  return e.length == 1 && e[0][2] ? mU(e[0][0], e[0][1]) : function(n) {
    return n === t || Uye(n, t, e);
  };
}
function qye(t, e) {
  return t != null && e in Object(t);
}
function Kye(t, e, n) {
  e = lp(e, t);
  for (var r = -1, i = e.length, a = !1; ++r < i; ) {
    var o = up(e[r]);
    if (!(a = t != null && n(t, o)))
      break;
    t = t[o];
  }
  return a || ++r != i ? a : (i = t == null ? 0 : t.length, !!i && xI(i) && GS(o, i) && (wi(t) || Oh(t)));
}
function yU(t, e) {
  return t != null && Kye(t, e, qye);
}
var Jye = 1, ebe = 2;
function tbe(t, e) {
  return QI(t) && gU(e) ? mU(up(t), e) : function(n) {
    var r = kt(n, t);
    return r === void 0 && r === e ? yU(n, t) : XS(e, r, Jye | ebe);
  };
}
function nbe(t) {
  return function(e) {
    return e == null ? void 0 : e[t];
  };
}
function rbe(t) {
  return function(e) {
    return ax(e, t);
  };
}
function ibe(t) {
  return QI(t) ? nbe(up(t)) : rbe(t);
}
function bU(t) {
  return typeof t == "function" ? t : t == null ? zI : typeof t == "object" ? wi(t) ? tbe(t[0], t[1]) : Yye(t) : ibe(t);
}
function abe(t) {
  return function(e, n, r) {
    for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
      var l = o[++i];
      if (n(a[l], l, a) === !1)
        break;
    }
    return e;
  };
}
var obe = abe(), mC = function() {
  return fo.Date.now();
}, sbe = "Expected a function", lbe = Math.max, ube = Math.min;
function UI(t, e, n) {
  var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  if (typeof t != "function")
    throw new TypeError(sbe);
  e = I2(e) || 0, xr(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? lbe(I2(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  function h(S) {
    var x = r, C = i;
    return r = i = void 0, u = S, o = t.apply(C, x), o;
  }
  function p(S) {
    return u = S, s = setTimeout(m, e), c ? h(S) : o;
  }
  function v(S) {
    var x = S - l, C = S - u, T = e - x;
    return f ? ube(T, a - C) : T;
  }
  function g(S) {
    var x = S - l, C = S - u;
    return l === void 0 || x >= e || x < 0 || f && C >= a;
  }
  function m() {
    var S = mC();
    if (g(S))
      return y(S);
    s = setTimeout(m, v(S));
  }
  function y(S) {
    return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  }
  function b() {
    s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  }
  function _() {
    return s === void 0 ? o : y(mC());
  }
  function O() {
    var S = mC(), x = g(S);
    if (r = arguments, i = this, l = S, x) {
      if (s === void 0)
        return p(l);
      if (f)
        return clearTimeout(s), s = setTimeout(m, e), h(l);
    }
    return s === void 0 && (s = setTimeout(m, e)), o;
  }
  return O.cancel = b, O.flush = _, O;
}
function D2(t, e, n) {
  (n !== void 0 && !p0(t[e], n) || n === void 0 && !(e in t)) && VI(t, e, n);
}
function _U(t) {
  return no(t) && op(t);
}
function R2(t, e) {
  if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
    return t[e];
}
function cbe(t) {
  return sp(t, y0(t));
}
function fbe(t, e, n, r, i, a, o) {
  var s = R2(t, n), l = R2(e, n), u = o.get(l);
  if (u) {
    D2(t, n, u);
    return;
  }
  var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  if (f) {
    var d = wi(l), h = !d && Sh(l), p = !d && !h && ZS(l);
    c = l, d || h || p ? wi(s) ? c = s : _U(s) ? c = eU(s) : h ? (f = !1, c = lU(l, !0)) : p ? (f = !1, c = fU(l, !0)) : c = [] : jI(l) || Oh(l) ? (c = s, Oh(s) ? c = cbe(s) : (!xr(s) || bI(s)) && (c = dU(l))) : f = !1;
  }
  f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), D2(t, n, c);
}
function XI(t, e, n, r, i) {
  t !== e && obe(e, function(a, o) {
    if (i || (i = new Ka()), xr(a))
      fbe(t, e, o, n, XI, r, i);
    else {
      var s = r ? r(R2(t, o), a, o + "", t, e, i) : void 0;
      s === void 0 && (s = a), D2(t, o, s);
    }
  }, y0);
}
function OU(t, e, n, r, i, a) {
  return xr(t) && xr(e) && (a.set(e, t), XI(t, e, void 0, OU, a), a.delete(e)), t;
}
var dbe = u0e(function(t, e, n, r) {
  XI(t, e, n, r);
}), SU = WI(function(t) {
  return t.push(void 0, OU), JZ(dbe, void 0, t);
});
function hbe(t) {
  var e = t == null ? 0 : t.length;
  return e ? t[e - 1] : void 0;
}
function pbe(t) {
  return function(e, n, r) {
    var i = Object(e);
    if (!op(e)) {
      var a = bU(n);
      e = v0(e), n = function(s) {
        return a(i[s], s, i);
      };
    }
    var o = t(e, n, r);
    return o > -1 ? i[a ? e[o] : o] : void 0;
  };
}
var vbe = Math.max;
function gbe(t, e, n) {
  var r = t == null ? 0 : t.length;
  if (!r)
    return -1;
  var i = n == null ? 0 : Zme(n);
  return i < 0 && (i = vbe(r + i, 0)), nU(t, bU(e), i);
}
var mbe = pbe(gbe);
function A1(t) {
  for (var e = -1, n = t == null ? 0 : t.length, r = {}; ++e < n; ) {
    var i = t[e];
    r[i[0]] = i[1];
  }
  return r;
}
var ybe = Math.min;
function bbe(t, e, n) {
  for (var r = rU, i = t[0].length, a = t.length, o = a, s = Array(a), l = 1 / 0, u = []; o--; ) {
    var c = t[o];
    o && e && (c = ix(c, jS(e))), l = ybe(c.length, l), s[o] = i >= 120 && c.length >= 120 ? new _h(o && c) : void 0;
  }
  c = t[0];
  var f = -1, d = s[0];
  e:
    for (; ++f < i && u.length < l; ) {
      var h = c[f], p = h;
      if (h = h !== 0 ? h : 0, !(d ? x1(d, p) : r(u, p))) {
        for (o = a; --o; ) {
          var v = s[o];
          if (!(v ? x1(v, p) : r(t[o], p)))
            continue e;
        }
        d && d.push(p), u.push(h);
      }
    }
  return u;
}
function _be(t) {
  return _U(t) ? t : [];
}
var Obe = WI(function(t) {
  var e = ix(t, _be);
  return e.length && e[0] === t[0] ? bbe(e) : [];
});
function Sbe(t, e) {
  return e.length < 2 ? t : ax(t, I0e(e, 0, -1));
}
var xbe = "[object Map]", wbe = "[object Set]", Cbe = Object.prototype, Tbe = Cbe.hasOwnProperty;
function xU(t) {
  if (t == null)
    return !0;
  if (op(t) && (wi(t) || typeof t == "string" || typeof t.splice == "function" || Sh(t) || ZS(t) || Oh(t)))
    return !t.length;
  var e = da(t);
  if (e == xbe || e == wbe)
    return !t.size;
  if (US(t))
    return !PZ(t).length;
  for (var n in t)
    if (Tbe.call(t, n))
      return !1;
  return !0;
}
var Pbe = "[object Number]";
function $be(t) {
  return typeof t == "number" || no(t) && bu(t) == Pbe;
}
function Gl(t) {
  return t == null;
}
function Abe(t) {
  return t === void 0;
}
function Ebe(t, e) {
  return e = lp(e, t), t = Sbe(t, e), t == null || delete t[up(hbe(e))];
}
function Mbe(t) {
  return jI(t) ? void 0 : t;
}
var Ibe = 1, Dbe = 2, Rbe = 4, wU = aU(function(t, e) {
  var n = {};
  if (t == null)
    return n;
  var r = !1;
  e = ix(e, function(a) {
    return a = lp(a, t), r || (r = a.length > 1), a;
  }), sp(t, cU(t), n), r && (n = ug(n, Ibe | Dbe | Rbe, Mbe));
  for (var i = e.length; i--; )
    Ebe(n, e[i]);
  return n;
});
function CU(t, e, n, r) {
  if (!xr(t))
    return t;
  e = lp(e, t);
  for (var i = -1, a = e.length, o = a - 1, s = t; s != null && ++i < a; ) {
    var l = up(e[i]), u = n;
    if (l === "__proto__" || l === "constructor" || l === "prototype")
      return t;
    if (i != o) {
      var c = s[l];
      u = void 0, u === void 0 && (u = xr(c) ? c : GS(e[i + 1]) ? [] : {});
    }
    FI(s, l, u), s = s[l];
  }
  return t;
}
function kbe(t, e, n) {
  for (var r = -1, i = e.length, a = {}; ++r < i; ) {
    var o = e[r], s = ax(t, o);
    n(s, o) && CU(a, lp(o, t), s);
  }
  return a;
}
function Lbe(t, e) {
  return kbe(t, e, function(n, r) {
    return yU(t, r);
  });
}
var am = aU(function(t, e) {
  return t == null ? {} : Lbe(t, e);
});
function YI(t, e, n) {
  return t == null ? t : CU(t, e, n);
}
var Nbe = "Expected a function";
function Bbe(t, e, n) {
  var r = !0, i = !0;
  if (typeof t != "function")
    throw new TypeError(Nbe);
  return xr(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), UI(t, e, {
    leading: r,
    maxWait: e,
    trailing: i
  });
}
var zbe = 1 / 0, Vbe = Zd && 1 / _I(new Zd([, -0]))[1] == zbe ? function(t) {
  return new Zd(t);
} : Xme, Fbe = 200;
function Wbe(t, e, n) {
  var r = -1, i = rU, a = t.length, o = !0, s = [], l = s;
  if (a >= Fbe) {
    var u = Vbe(t);
    if (u)
      return _I(u);
    o = !1, i = x1, l = new _h();
  } else
    l = s;
  e:
    for (; ++r < a; ) {
      var c = t[r], f = c;
      if (c = c !== 0 ? c : 0, o && f === f) {
        for (var d = l.length; d--; )
          if (l[d] === f)
            continue e;
        s.push(c);
      } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
    }
  return s;
}
function yC(t) {
  return t && t.length ? Wbe(t) : [];
}
const Qbe = () => ({
  compactSize: String,
  compactDirection: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  isFirstItem: nt(),
  isLastItem: nt()
}), ox = BI(null), sx = (t, e) => {
  const n = ox.useInject(), r = L(() => {
    if (!n || xU(n)) return "";
    const {
      compactDirection: i,
      isFirstItem: a,
      isLastItem: o
    } = n, s = i === "vertical" ? "-vertical-" : "-";
    return ye({
      [`${t.value}-compact${s}item`]: !0,
      [`${t.value}-compact${s}first-item`]: a,
      [`${t.value}-compact${s}last-item`]: o,
      [`${t.value}-compact${s}item-rtl`]: e.value === "rtl"
    });
  });
  return {
    compactSize: L(() => n == null ? void 0 : n.compactSize),
    compactDirection: L(() => n == null ? void 0 : n.compactDirection),
    compactItemClassnames: r
  };
}, E1 = te({
  name: "NoCompactStyle",
  setup(t, e) {
    let {
      slots: n
    } = e;
    return ox.useProvide(null), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), Hbe = () => ({
  prefixCls: String,
  size: {
    type: String
  },
  direction: Y.oneOf(ru("horizontal", "vertical")).def("horizontal"),
  align: Y.oneOf(ru("start", "end", "center", "baseline")),
  block: {
    type: Boolean,
    default: void 0
  }
}), Gbe = te({
  name: "CompactItem",
  props: Qbe(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    return ox.useProvide(t), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
te({
  name: "ASpaceCompact",
  inheritAttrs: !1,
  props: Hbe(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = It("space-compact", t), o = ox.useInject(), [s, l] = Rme(i), u = L(() => ye(i.value, l.value, {
      [`${i.value}-rtl`]: a.value === "rtl",
      [`${i.value}-block`]: t.block,
      [`${i.value}-vertical`]: t.direction === "vertical"
    }));
    return () => {
      var c;
      const f = Yn(((c = r.default) === null || c === void 0 ? void 0 : c.call(r)) || []);
      return f.length === 0 ? null : s(M("div", j(j({}, n), {}, {
        class: [u.value, n.class]
      }), [f.map((d, h) => {
        var p;
        const v = d && d.key || `${i.value}-item-${h}`, g = !o || xU(o);
        return M(Gbe, {
          key: v,
          compactSize: (p = t.size) !== null && p !== void 0 ? p : "middle",
          compactDirection: t.direction,
          isFirstItem: h === 0 && (g || (o == null ? void 0 : o.isFirstItem)),
          isLastItem: h === f.length - 1 && (g || (o == null ? void 0 : o.isLastItem))
        }, {
          default: () => [d]
        });
      })]));
    };
  }
});
const jbe = (t) => ({
  animationDuration: t,
  animationFillMode: "both"
}), Zbe = (t) => ({
  animationDuration: t,
  animationFillMode: "both"
}), lx = function(t, e, n, r) {
  const a = (arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1) ? "&" : "";
  return {
    [`
      ${a}${t}-enter,
      ${a}${t}-appear
    `]: I(I({}, jbe(r)), {
      animationPlayState: "paused"
    }),
    [`${a}${t}-leave`]: I(I({}, Zbe(r)), {
      animationPlayState: "paused"
    }),
    [`
      ${a}${t}-enter${t}-enter-active,
      ${a}${t}-appear${t}-appear-active
    `]: {
      animationName: e,
      animationPlayState: "running"
    },
    [`${a}${t}-leave${t}-leave-active`]: {
      animationName: n,
      animationPlayState: "running",
      pointerEvents: "none"
    }
  };
}, Ube = new Ot("antFadeIn", {
  "0%": {
    opacity: 0
  },
  "100%": {
    opacity: 1
  }
}), Xbe = new Ot("antFadeOut", {
  "0%": {
    opacity: 1
  },
  "100%": {
    opacity: 0
  }
}), TU = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const {
    antCls: n
  } = t, r = `${n}-fade`, i = e ? "&" : "";
  return [lx(r, Ube, Xbe, t.motionDurationMid, e), {
    [`
        ${i}${r}-enter,
        ${i}${r}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: "linear"
    },
    [`${i}${r}-leave`]: {
      animationTimingFunction: "linear"
    }
  }];
}, Ybe = new Ot("antMoveDownIn", {
  "0%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), qbe = new Ot("antMoveDownOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, 100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), Kbe = new Ot("antMoveLeftIn", {
  "0%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), Jbe = new Ot("antMoveLeftOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(-100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), e_e = new Ot("antMoveRightIn", {
  "0%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), t_e = new Ot("antMoveRightOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(100%, 0, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), n_e = new Ot("antMoveUpIn", {
  "0%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  },
  "100%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  }
}), r_e = new Ot("antMoveUpOut", {
  "0%": {
    transform: "translate3d(0, 0, 0)",
    transformOrigin: "0 0",
    opacity: 1
  },
  "100%": {
    transform: "translate3d(0, -100%, 0)",
    transformOrigin: "0 0",
    opacity: 0
  }
}), i_e = {
  "move-up": {
    inKeyframes: n_e,
    outKeyframes: r_e
  },
  "move-down": {
    inKeyframes: Ybe,
    outKeyframes: qbe
  },
  "move-left": {
    inKeyframes: Kbe,
    outKeyframes: Jbe
  },
  "move-right": {
    inKeyframes: e_e,
    outKeyframes: t_e
  }
}, QN = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = i_e[e];
  return [lx(r, i, a, t.motionDurationMid), {
    [`
        ${r}-enter,
        ${r}-appear
      `]: {
      opacity: 0,
      animationTimingFunction: t.motionEaseOutCirc
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInOutCirc
    }
  }];
}, PU = new Ot("antSlideUpIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), $U = new Ot("antSlideUpOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), AU = new Ot("antSlideDownIn", {
  "0%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  }
}), EU = new Ot("antSlideDownOut", {
  "0%": {
    transform: "scaleY(1)",
    transformOrigin: "100% 100%",
    opacity: 1
  },
  "100%": {
    transform: "scaleY(0.8)",
    transformOrigin: "100% 100%",
    opacity: 0
  }
}), a_e = new Ot("antSlideLeftIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  }
}), o_e = new Ot("antSlideLeftOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "0% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "0% 0%",
    opacity: 0
  }
}), s_e = new Ot("antSlideRightIn", {
  "0%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  }
}), l_e = new Ot("antSlideRightOut", {
  "0%": {
    transform: "scaleX(1)",
    transformOrigin: "100% 0%",
    opacity: 1
  },
  "100%": {
    transform: "scaleX(0.8)",
    transformOrigin: "100% 0%",
    opacity: 0
  }
}), u_e = {
  "slide-up": {
    inKeyframes: PU,
    outKeyframes: $U
  },
  "slide-down": {
    inKeyframes: AU,
    outKeyframes: EU
  },
  "slide-left": {
    inKeyframes: a_e,
    outKeyframes: o_e
  },
  "slide-right": {
    inKeyframes: s_e,
    outKeyframes: l_e
  }
}, Ch = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = u_e[e];
  return [lx(r, i, a, t.motionDurationMid), {
    [`
      ${r}-enter,
      ${r}-appear
    `]: {
      transform: "scale(0)",
      transformOrigin: "0% 0%",
      opacity: 0,
      animationTimingFunction: t.motionEaseOutQuint
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInQuint
    }
  }];
}, qI = new Ot("antZoomIn", {
  "0%": {
    transform: "scale(0.2)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), c_e = new Ot("antZoomOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.2)",
    opacity: 0
  }
}), HN = new Ot("antZoomBigIn", {
  "0%": {
    transform: "scale(0.8)",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    opacity: 1
  }
}), GN = new Ot("antZoomBigOut", {
  "0%": {
    transform: "scale(1)"
  },
  "100%": {
    transform: "scale(0.8)",
    opacity: 0
  }
}), f_e = new Ot("antZoomUpIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  }
}), d_e = new Ot("antZoomUpOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 0%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 0%",
    opacity: 0
  }
}), h_e = new Ot("antZoomLeftIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  }
}), p_e = new Ot("antZoomLeftOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "0% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "0% 50%",
    opacity: 0
  }
}), v_e = new Ot("antZoomRightIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  }
}), g_e = new Ot("antZoomRightOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "100% 50%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "100% 50%",
    opacity: 0
  }
}), m_e = new Ot("antZoomDownIn", {
  "0%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  },
  "100%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  }
}), y_e = new Ot("antZoomDownOut", {
  "0%": {
    transform: "scale(1)",
    transformOrigin: "50% 100%"
  },
  "100%": {
    transform: "scale(0.8)",
    transformOrigin: "50% 100%",
    opacity: 0
  }
}), b_e = {
  zoom: {
    inKeyframes: qI,
    outKeyframes: c_e
  },
  "zoom-big": {
    inKeyframes: HN,
    outKeyframes: GN
  },
  "zoom-big-fast": {
    inKeyframes: HN,
    outKeyframes: GN
  },
  "zoom-left": {
    inKeyframes: h_e,
    outKeyframes: p_e
  },
  "zoom-right": {
    inKeyframes: v_e,
    outKeyframes: g_e
  },
  "zoom-up": {
    inKeyframes: f_e,
    outKeyframes: d_e
  },
  "zoom-down": {
    inKeyframes: m_e,
    outKeyframes: y_e
  }
}, ux = (t, e) => {
  const {
    antCls: n
  } = t, r = `${n}-${e}`, {
    inKeyframes: i,
    outKeyframes: a
  } = b_e[e];
  return [lx(r, i, a, e === "zoom-big-fast" ? t.motionDurationFast : t.motionDurationMid), {
    [`
        ${r}-enter,
        ${r}-appear
      `]: {
      transform: "scale(0)",
      opacity: 0,
      animationTimingFunction: t.motionEaseOutCirc,
      "&-prepare": {
        transform: "none"
      }
    },
    [`${r}-leave`]: {
      animationTimingFunction: t.motionEaseInOutCirc
    }
  }];
}, KI = (t) => ({
  [t.componentCls]: {
    // For common/openAnimation
    [`${t.antCls}-motion-collapse-legacy`]: {
      overflow: "hidden",
      "&-active": {
        transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
      }
    },
    [`${t.antCls}-motion-collapse`]: {
      overflow: "hidden",
      transition: `height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`
    }
  }
}), jN = (t) => {
  const {
    controlPaddingHorizontal: e
  } = t;
  return {
    position: "relative",
    display: "block",
    minHeight: t.controlHeight,
    padding: `${(t.controlHeight - t.fontSize * t.lineHeight) / 2}px ${e}px`,
    color: t.colorText,
    fontWeight: "normal",
    fontSize: t.fontSize,
    lineHeight: t.lineHeight,
    boxSizing: "border-box"
  };
}, __e = (t) => {
  const {
    antCls: e,
    componentCls: n
  } = t, r = `${n}-item`;
  return [
    {
      [`${n}-dropdown`]: I(I({}, nn(t)), {
        position: "absolute",
        top: -9999,
        zIndex: t.zIndexPopup,
        boxSizing: "border-box",
        padding: t.paddingXXS,
        overflow: "hidden",
        fontSize: t.fontSize,
        // Fix select render lag of long text in chrome
        // https://github.com/ant-design/ant-design/issues/11456
        // https://github.com/ant-design/ant-design/issues/11843
        fontVariant: "initial",
        backgroundColor: t.colorBgElevated,
        borderRadius: t.borderRadiusLG,
        outline: "none",
        boxShadow: t.boxShadowSecondary,
        [`
            &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
            &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft
          `]: {
          animationName: PU
        },
        [`
            &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft,
            &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft
          `]: {
          animationName: AU
        },
        [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]: {
          animationName: $U
        },
        [`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]: {
          animationName: EU
        },
        "&-hidden": {
          display: "none"
        },
        "&-empty": {
          color: t.colorTextDisabled
        },
        // ========================= Options =========================
        [`${r}-empty`]: I(I({}, jN(t)), {
          color: t.colorTextDisabled
        }),
        [`${r}`]: I(I({}, jN(t)), {
          cursor: "pointer",
          transition: `background ${t.motionDurationSlow} ease`,
          borderRadius: t.borderRadiusSM,
          // =========== Group ============
          "&-group": {
            color: t.colorTextDescription,
            fontSize: t.fontSizeSM,
            cursor: "default"
          },
          // =========== Option ===========
          "&-option": {
            display: "flex",
            "&-content": I({
              flex: "auto"
            }, mh),
            "&-state": {
              flex: "none"
            },
            [`&-active:not(${r}-option-disabled)`]: {
              backgroundColor: t.controlItemBgHover
            },
            [`&-selected:not(${r}-option-disabled)`]: {
              color: t.colorText,
              fontWeight: t.fontWeightStrong,
              backgroundColor: t.controlItemBgActive,
              [`${r}-option-state`]: {
                color: t.colorPrimary
              }
            },
            "&-disabled": {
              [`&${r}-option-selected`]: {
                backgroundColor: t.colorBgContainerDisabled
              },
              color: t.colorTextDisabled,
              cursor: "not-allowed"
            },
            "&-grouped": {
              paddingInlineStart: t.controlPaddingHorizontal * 2
            }
          }
        }),
        // =========================== RTL ===========================
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Follow code may reuse in other components
    Ch(t, "slide-up"),
    Ch(t, "slide-down"),
    QN(t, "move-up"),
    QN(t, "move-down")
  ];
}, Uf = 2;
function MU(t) {
  let {
    controlHeightSM: e,
    controlHeight: n,
    lineWidth: r
  } = t;
  const i = (n - e) / 2 - r, a = Math.ceil(i / 2);
  return [i, a];
}
function bC(t, e) {
  const {
    componentCls: n,
    iconCls: r
  } = t, i = `${n}-selection-overflow`, a = t.controlHeightSM, [o] = MU(t), s = e ? `${n}-${e}` : "";
  return {
    [`${n}-multiple${s}`]: {
      fontSize: t.fontSize,
      /**
       * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
       * may update to redesign with its align logic.
       */
      // =========================== Overflow ===========================
      [i]: {
        position: "relative",
        display: "flex",
        flex: "auto",
        flexWrap: "wrap",
        maxWidth: "100%",
        "&-item": {
          flex: "none",
          alignSelf: "center",
          maxWidth: "100%",
          display: "inline-flex"
        }
      },
      // ========================= Selector =========================
      [`${n}-selector`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        // Multiple is little different that horizontal is follow the vertical
        padding: `${o - Uf}px ${Uf * 2}px`,
        borderRadius: t.borderRadius,
        [`${n}-show-search&`]: {
          cursor: "text"
        },
        [`${n}-disabled&`]: {
          background: t.colorBgContainerDisabled,
          cursor: "not-allowed"
        },
        "&:after": {
          display: "inline-block",
          width: 0,
          margin: `${Uf}px 0`,
          lineHeight: `${a}px`,
          content: '"\\a0"'
        }
      },
      [`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]: {
        paddingInlineEnd: t.fontSizeIcon + t.controlPaddingHorizontal
      },
      // ======================== Selections ========================
      [`${n}-selection-item`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        boxSizing: "border-box",
        maxWidth: "100%",
        height: a,
        marginTop: Uf,
        marginBottom: Uf,
        lineHeight: `${a - t.lineWidth * 2}px`,
        background: t.colorFillSecondary,
        border: `${t.lineWidth}px solid ${t.colorSplit}`,
        borderRadius: t.borderRadiusSM,
        cursor: "default",
        transition: `font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,
        userSelect: "none",
        marginInlineEnd: Uf * 2,
        paddingInlineStart: t.paddingXS,
        paddingInlineEnd: t.paddingXS / 2,
        [`${n}-disabled&`]: {
          color: t.colorTextDisabled,
          borderColor: t.colorBorder,
          cursor: "not-allowed"
        },
        // It's ok not to do this, but 24px makes bottom narrow in view should adjust
        "&-content": {
          display: "inline-block",
          marginInlineEnd: t.paddingXS / 2,
          overflow: "hidden",
          whiteSpace: "pre",
          textOverflow: "ellipsis"
        },
        "&-remove": I(I({}, ip()), {
          display: "inline-block",
          color: t.colorIcon,
          fontWeight: "bold",
          fontSize: 10,
          lineHeight: "inherit",
          cursor: "pointer",
          [`> ${r}`]: {
            verticalAlign: "-0.2em"
          },
          "&:hover": {
            color: t.colorIconHover
          }
        })
      },
      // ========================== Input ==========================
      [`${i}-item + ${i}-item`]: {
        [`${n}-selection-search`]: {
          marginInlineStart: 0
        }
      },
      [`${n}-selection-search`]: {
        display: "inline-flex",
        position: "relative",
        maxWidth: "100%",
        marginInlineStart: t.inputPaddingHorizontalBase - o,
        "\n          &-input,\n          &-mirror\n        ": {
          height: a,
          fontFamily: t.fontFamily,
          lineHeight: `${a}px`,
          transition: `all ${t.motionDurationSlow}`
        },
        "&-input": {
          width: "100%",
          minWidth: 4.1
          // fix search cursor missing
        },
        "&-mirror": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          insetInlineEnd: "auto",
          zIndex: 999,
          whiteSpace: "pre",
          visibility: "hidden"
        }
      },
      // ======================= Placeholder =======================
      [`${n}-selection-placeholder `]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: t.inputPaddingHorizontalBase,
        insetInlineEnd: t.inputPaddingHorizontalBase,
        transform: "translateY(-50%)",
        transition: `all ${t.motionDurationSlow}`
      }
    }
  };
}
function O_e(t) {
  const {
    componentCls: e
  } = t, n = Bt(t, {
    controlHeight: t.controlHeightSM,
    controlHeightSM: t.controlHeightXS,
    borderRadius: t.borderRadiusSM,
    borderRadiusSM: t.borderRadiusXS
  }), [, r] = MU(t);
  return [
    bC(t),
    // ======================== Small ========================
    // Shared
    bC(n, "sm"),
    // Padding
    {
      [`${e}-multiple${e}-sm`]: {
        [`${e}-selection-placeholder`]: {
          insetInlineStart: t.controlPaddingHorizontalSM - t.lineWidth,
          insetInlineEnd: "auto"
        },
        // https://github.com/ant-design/ant-design/issues/29559
        [`${e}-selection-search`]: {
          marginInlineStart: r
        }
      }
    },
    // ======================== Large ========================
    // Shared
    bC(Bt(t, {
      fontSize: t.fontSizeLG,
      controlHeight: t.controlHeightLG,
      controlHeightSM: t.controlHeight,
      borderRadius: t.borderRadiusLG,
      borderRadiusSM: t.borderRadius
    }), "lg")
  ];
}
function _C(t, e) {
  const {
    componentCls: n,
    inputPaddingHorizontalBase: r,
    borderRadius: i
  } = t, a = t.controlHeight - t.lineWidth * 2, o = Math.ceil(t.fontSize * 1.25), s = e ? `${n}-${e}` : "";
  return {
    [`${n}-single${s}`]: {
      fontSize: t.fontSize,
      // ========================= Selector =========================
      [`${n}-selector`]: I(I({}, nn(t)), {
        display: "flex",
        borderRadius: i,
        [`${n}-selection-search`]: {
          position: "absolute",
          top: 0,
          insetInlineStart: r,
          insetInlineEnd: r,
          bottom: 0,
          "&-input": {
            width: "100%"
          }
        },
        [`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]: {
          padding: 0,
          lineHeight: `${a}px`,
          transition: `all ${t.motionDurationSlow}`,
          // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
          "@supports (-moz-appearance: meterbar)": {
            lineHeight: `${a}px`
          }
        },
        [`${n}-selection-item`]: {
          position: "relative",
          userSelect: "none"
        },
        [`${n}-selection-placeholder`]: {
          transition: "none",
          pointerEvents: "none"
        },
        // For common baseline align
        [[
          "&:after",
          /* For '' value baseline align */
          `${n}-selection-item:after`,
          /* For undefined value baseline align */
          `${n}-selection-placeholder:after`
        ].join(",")]: {
          display: "inline-block",
          width: 0,
          visibility: "hidden",
          content: '"\\a0"'
        }
      }),
      [`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-placeholder
      `]: {
        paddingInlineEnd: o
      },
      // Opacity selection if open
      [`&${n}-open ${n}-selection-item`]: {
        color: t.colorTextPlaceholder
      },
      // ========================== Input ==========================
      // We only change the style of non-customize input which is only support by `combobox` mode.
      // Not customize
      [`&:not(${n}-customize-input)`]: {
        [`${n}-selector`]: {
          width: "100%",
          height: t.controlHeight,
          padding: `0 ${r}px`,
          [`${n}-selection-search-input`]: {
            height: a
          },
          "&:after": {
            lineHeight: `${a}px`
          }
        }
      },
      [`&${n}-customize-input`]: {
        [`${n}-selector`]: {
          "&:after": {
            display: "none"
          },
          [`${n}-selection-search`]: {
            position: "static",
            width: "100%"
          },
          [`${n}-selection-placeholder`]: {
            position: "absolute",
            insetInlineStart: 0,
            insetInlineEnd: 0,
            padding: `0 ${r}px`,
            "&:after": {
              display: "none"
            }
          }
        }
      }
    }
  };
}
function S_e(t) {
  const {
    componentCls: e
  } = t, n = t.controlPaddingHorizontalSM - t.lineWidth;
  return [
    _C(t),
    // ======================== Small ========================
    // Shared
    _C(Bt(t, {
      controlHeight: t.controlHeightSM,
      borderRadius: t.borderRadiusSM
    }), "sm"),
    // padding
    {
      [`${e}-single${e}-sm`]: {
        [`&:not(${e}-customize-input)`]: {
          [`${e}-selection-search`]: {
            insetInlineStart: n,
            insetInlineEnd: n
          },
          [`${e}-selector`]: {
            padding: `0 ${n}px`
          },
          // With arrow should provides `padding-right` to show the arrow
          [`&${e}-show-arrow ${e}-selection-search`]: {
            insetInlineEnd: n + t.fontSize * 1.5
          },
          [`
            &${e}-show-arrow ${e}-selection-item,
            &${e}-show-arrow ${e}-selection-placeholder
          `]: {
            paddingInlineEnd: t.fontSize * 1.5
          }
        }
      }
    },
    // ======================== Large ========================
    // Shared
    _C(Bt(t, {
      controlHeight: t.controlHeightLG,
      fontSize: t.fontSizeLG,
      borderRadius: t.borderRadiusLG
    }), "lg")
  ];
}
function x_e(t, e, n) {
  const {
    focusElCls: r,
    focus: i,
    borderElCls: a
  } = n, o = a ? "> *" : "", s = ["hover", i ? "focus" : null, "active"].filter(Boolean).map((l) => `&:${l} ${o}`).join(",");
  return {
    [`&-item:not(${e}-last-item)`]: {
      marginInlineEnd: -t.lineWidth
    },
    "&-item": I(I({
      [s]: {
        zIndex: 2
      }
    }, r ? {
      [`&${r}`]: {
        zIndex: 2
      }
    } : {}), {
      [`&[disabled] ${o}`]: {
        zIndex: 0
      }
    })
  };
}
function w_e(t, e, n) {
  const {
    borderElCls: r
  } = n, i = r ? `> ${r}` : "";
  return {
    [`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]: {
      borderRadius: 0
    },
    [`&-item:not(${e}-last-item)${e}-first-item`]: {
      [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`&-item:not(${e}-first-item)${e}-last-item`]: {
      [`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    }
  };
}
function cx(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
    focus: !0
  };
  const {
    componentCls: n
  } = t, r = `${n}-compact`;
  return {
    [r]: I(I({}, x_e(t, r, e)), w_e(n, r, e))
  };
}
const C_e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    position: "relative",
    backgroundColor: t.colorBgContainer,
    border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
    transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
    input: {
      cursor: "pointer"
    },
    [`${e}-show-search&`]: {
      cursor: "text",
      input: {
        cursor: "auto",
        color: "inherit"
      }
    },
    [`${e}-disabled&`]: {
      color: t.colorTextDisabled,
      background: t.colorBgContainerDisabled,
      cursor: "not-allowed",
      [`${e}-multiple&`]: {
        background: t.colorBgContainerDisabled
      },
      input: {
        cursor: "not-allowed"
      }
    }
  };
}, OC = function(t, e) {
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
  const {
    componentCls: r,
    borderHoverColor: i,
    outlineColor: a,
    antCls: o
  } = e, s = n ? {
    [`${r}-selector`]: {
      borderColor: i
    }
  } : {};
  return {
    [t]: {
      [`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]: I(I({}, s), {
        [`${r}-focused& ${r}-selector`]: {
          borderColor: i,
          boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${a}`,
          borderInlineEndWidth: `${e.controlLineWidth}px !important`,
          outline: 0
        },
        [`&:hover ${r}-selector`]: {
          borderColor: i,
          borderInlineEndWidth: `${e.controlLineWidth}px !important`
        }
      })
    }
  };
}, T_e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-selection-search-input`]: {
      margin: 0,
      padding: 0,
      background: "transparent",
      border: "none",
      outline: "none",
      appearance: "none",
      "&::-webkit-search-cancel-button": {
        display: "none",
        "-webkit-appearance": "none"
      }
    }
  };
}, P_e = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontalBase: n,
    iconCls: r
  } = t;
  return {
    [e]: I(I({}, nn(t)), {
      position: "relative",
      display: "inline-block",
      cursor: "pointer",
      [`&:not(${e}-customize-input) ${e}-selector`]: I(I({}, C_e(t)), T_e(t)),
      // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
      //   ...genHoverStyle(token),
      // },
      // ======================== Selection ========================
      [`${e}-selection-item`]: I({
        flex: 1,
        fontWeight: "normal"
      }, mh),
      // ======================= Placeholder =======================
      [`${e}-selection-placeholder`]: I(I({}, mh), {
        flex: 1,
        color: t.colorTextPlaceholder,
        pointerEvents: "none"
      }),
      // ========================== Arrow ==========================
      [`${e}-arrow`]: I(I({}, ip()), {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        height: t.fontSizeIcon,
        marginTop: -t.fontSizeIcon / 2,
        color: t.colorTextQuaternary,
        fontSize: t.fontSizeIcon,
        lineHeight: 1,
        textAlign: "center",
        pointerEvents: "none",
        display: "flex",
        alignItems: "center",
        [r]: {
          verticalAlign: "top",
          transition: `transform ${t.motionDurationSlow}`,
          "> svg": {
            verticalAlign: "top"
          },
          [`&:not(${e}-suffix)`]: {
            pointerEvents: "auto"
          }
        },
        [`${e}-disabled &`]: {
          cursor: "not-allowed"
        },
        "> *:not(:last-child)": {
          marginInlineEnd: 8
          // FIXME: magic
        }
      }),
      // ========================== Clear ==========================
      [`${e}-clear`]: {
        position: "absolute",
        top: "50%",
        insetInlineStart: "auto",
        insetInlineEnd: n,
        zIndex: 1,
        display: "inline-block",
        width: t.fontSizeIcon,
        height: t.fontSizeIcon,
        marginTop: -t.fontSizeIcon / 2,
        color: t.colorTextQuaternary,
        fontSize: t.fontSizeIcon,
        fontStyle: "normal",
        lineHeight: 1,
        textAlign: "center",
        textTransform: "none",
        background: t.colorBgContainer,
        cursor: "pointer",
        opacity: 0,
        transition: `color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,
        textRendering: "auto",
        "&:before": {
          display: "block"
        },
        "&:hover": {
          color: t.colorTextTertiary
        }
      },
      "&:hover": {
        [`${e}-clear`]: {
          opacity: 1
        }
      }
    }),
    // ========================= Feedback ==========================
    [`${e}-has-feedback`]: {
      [`${e}-clear`]: {
        insetInlineEnd: n + t.fontSize + t.paddingXXS
      }
    }
  };
}, $_e = (t) => {
  const {
    componentCls: e
  } = t;
  return [
    {
      [e]: {
        // ==================== BorderLess ====================
        [`&-borderless ${e}-selector`]: {
          backgroundColor: "transparent !important",
          borderColor: "transparent !important",
          boxShadow: "none !important"
        },
        // ==================== In Form ====================
        [`&${e}-in-form-item`]: {
          width: "100%"
        }
      }
    },
    // =====================================================
    // ==                       LTR                       ==
    // =====================================================
    // Base
    P_e(t),
    // Single
    S_e(t),
    // Multiple
    O_e(t),
    // Dropdown
    __e(t),
    // =====================================================
    // ==                       RTL                       ==
    // =====================================================
    {
      [`${e}-rtl`]: {
        direction: "rtl"
      }
    },
    // =====================================================
    // ==                     Status                      ==
    // =====================================================
    OC(e, Bt(t, {
      borderHoverColor: t.colorPrimaryHover,
      outlineColor: t.controlOutline
    })),
    OC(`${e}-status-error`, Bt(t, {
      borderHoverColor: t.colorErrorHover,
      outlineColor: t.colorErrorOutline
    }), !0),
    OC(`${e}-status-warning`, Bt(t, {
      borderHoverColor: t.colorWarningHover,
      outlineColor: t.colorWarningOutline
    }), !0),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    cx(t, {
      borderElCls: `${e}-selector`,
      focusElCls: `${e}-focused`
    })
  ];
}, A_e = Sn("Select", (t, e) => {
  let {
    rootPrefixCls: n
  } = e;
  const r = Bt(t, {
    rootPrefixCls: n,
    inputPaddingHorizontalBase: t.paddingSM - 1
  });
  return [$_e(r)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50
})), E_e = () => I(I({}, or(QZ(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
  value: gn([Array, Object, String, Number]),
  defaultValue: gn([Array, Object, String, Number]),
  notFoundContent: Y.any,
  suffixIcon: Y.any,
  itemIcon: Y.any,
  size: hn(),
  mode: hn(),
  bordered: nt(!0),
  transitionName: String,
  choiceTransitionName: hn(""),
  popupClassName: String,
  /** @deprecated Please use `popupClassName` instead */
  dropdownClassName: String,
  placement: hn(),
  status: hn(),
  "onUpdate:value": tt()
}), ZN = "SECRET_COMBOBOX_MODE_DO_NOT_USE", ci = te({
  compatConfig: {
    MODE: 3
  },
  name: "ASelect",
  Option: DI,
  OptGroup: RI,
  inheritAttrs: !1,
  props: sr(E_e(), {
    listHeight: 256,
    listItemHeight: 24
  }),
  SECRET_COMBOBOX_MODE_DO_NOT_USE: ZN,
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      slots: i,
      expose: a
    } = e;
    const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), c = () => {
      var Q;
      (Q = o.value) === null || Q === void 0 || Q.focus();
    }, f = () => {
      var Q;
      (Q = o.value) === null || Q === void 0 || Q.blur();
    }, d = (Q) => {
      var Z;
      (Z = o.value) === null || Z === void 0 || Z.scrollTo(Q);
    }, h = L(() => {
      const {
        mode: Q
      } = t;
      if (Q !== "combobox")
        return Q === ZN ? "combobox" : Q;
    });
    process.env.NODE_ENV !== "production" && Qi(!t.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
    const {
      prefixCls: p,
      direction: v,
      configProvider: g,
      renderEmpty: m,
      size: y,
      getPrefixCls: b,
      getPopupContainer: _,
      disabled: O,
      select: S
    } = It("select", t), {
      compactSize: x,
      compactItemClassnames: C
    } = sx(p, v), T = L(() => x.value || y.value), w = Ko(), P = L(() => {
      var Q;
      return (Q = O.value) !== null && Q !== void 0 ? Q : w.value;
    }), [$, A] = A_e(p), D = L(() => b()), E = L(() => t.placement !== void 0 ? t.placement : v.value === "rtl" ? "bottomRight" : "bottomLeft"), R = L(() => es(D.value, pve(E.value), t.transitionName)), N = L(() => ye({
      [`${p.value}-lg`]: T.value === "large",
      [`${p.value}-sm`]: T.value === "small",
      [`${p.value}-rtl`]: v.value === "rtl",
      [`${p.value}-borderless`]: !t.bordered,
      [`${p.value}-in-form-item`]: l.isFormItemInput
    }, Is(p.value, u.value, l.hasFeedback), C.value, A.value)), V = function() {
      for (var Q = arguments.length, Z = new Array(Q), ne = 0; ne < Q; ne++)
        Z[ne] = arguments[ne];
      r("update:value", Z[0]), r("change", ...Z), s.onFieldChange();
    }, z = (Q) => {
      r("blur", Q), s.onFieldBlur();
    };
    a({
      blur: f,
      focus: c,
      scrollTo: d
    });
    const W = L(() => h.value === "multiple" || h.value === "tags"), F = L(() => t.showArrow !== void 0 ? t.showArrow : t.loading || !(W.value || h.value === "combobox"));
    return () => {
      var Q, Z, ne, ee;
      const {
        notFoundContent: oe,
        listHeight: K = 256,
        listItemHeight: ie = 24,
        popupClassName: X,
        dropdownClassName: H,
        virtual: G,
        dropdownMatchSelectWidth: re,
        id: fe = s.id.value,
        placeholder: de = (Q = i.placeholder) === null || Q === void 0 ? void 0 : Q.call(i),
        showArrow: Ee
      } = t, {
        hasFeedback: $e,
        feedbackIcon: Se
      } = l;
      let be;
      oe !== void 0 ? be = oe : i.notFoundContent ? be = i.notFoundContent() : h.value === "combobox" ? be = null : be = (m == null ? void 0 : m("Select")) || M(cI, {
        componentName: "Select"
      }, null);
      const {
        suffixIcon: he,
        itemIcon: Te,
        removeIcon: ze,
        clearIcon: ut
      } = Eme(I(I({}, t), {
        multiple: W.value,
        prefixCls: p.value,
        hasFeedback: $e,
        feedbackIcon: Se,
        showArrow: F.value
      }), i), ct = or(t, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Dt = ye(X || H, {
        [`${p.value}-dropdown-${v.value}`]: v.value === "rtl"
      }, A.value);
      return $(M(Lge, j(j(j({
        ref: o,
        virtual: G,
        dropdownMatchSelectWidth: re
      }, ct), n), {}, {
        showSearch: (Z = t.showSearch) !== null && Z !== void 0 ? Z : (ne = S == null ? void 0 : S.value) === null || ne === void 0 ? void 0 : ne.showSearch,
        placeholder: de,
        listHeight: K,
        listItemHeight: ie,
        mode: h.value,
        prefixCls: p.value,
        direction: v.value,
        inputIcon: he,
        menuItemSelectedIcon: Te,
        removeIcon: ze,
        clearIcon: ut,
        notFoundContent: be,
        class: [N.value, n.class],
        getPopupContainer: _ == null ? void 0 : _.value,
        dropdownClassName: Dt,
        onChange: V,
        onBlur: z,
        id: fe,
        dropdownRender: ct.dropdownRender || i.dropdownRender,
        transitionName: R.value,
        children: (ee = i.default) === null || ee === void 0 ? void 0 : ee.call(i),
        tagRender: t.tagRender || i.tagRender,
        optionLabelRender: i.optionLabel,
        maxTagPlaceholder: t.maxTagPlaceholder || i.maxTagPlaceholder,
        showArrow: $e || Ee,
        disabled: P.value
      }), {
        option: i.option
      }));
    };
  }
});
ci.install = function(t) {
  return t.component(ci.name, ci), t.component(ci.Option.displayName, ci.Option), t.component(ci.OptGroup.displayName, ci.OptGroup), t;
};
const M1 = ci.Option;
ci.OptGroup;
var M_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, name: "check-circle", theme: "outlined" };
function UN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      I_e(t, i, n[i]);
    });
  }
  return t;
}
function I_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var JI = function(e, n) {
  var r = UN({}, e, n.attrs);
  return M(lt, UN({}, r, {
    icon: M_e
  }), null);
};
JI.displayName = "CheckCircleOutlined";
JI.inheritAttrs = !1;
var D_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, name: "exclamation-circle", theme: "outlined" };
function XN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      R_e(t, i, n[i]);
    });
  }
  return t;
}
function R_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var eD = function(e, n) {
  var r = XN({}, e, n.attrs);
  return M(lt, XN({}, r, {
    icon: D_e
  }), null);
};
eD.displayName = "ExclamationCircleOutlined";
eD.inheritAttrs = !1;
var k_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, name: "info-circle", theme: "outlined" };
function YN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      L_e(t, i, n[i]);
    });
  }
  return t;
}
function L_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var fx = function(e, n) {
  var r = YN({}, e, n.attrs);
  return M(lt, YN({}, r, {
    icon: k_e
  }), null);
};
fx.displayName = "InfoCircleOutlined";
fx.inheritAttrs = !1;
var N_e = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, name: "close-circle", theme: "outlined" };
function qN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      B_e(t, i, n[i]);
    });
  }
  return t;
}
function B_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var tD = function(e, n) {
  var r = qN({}, e, n.attrs);
  return M(lt, qN({}, r, {
    icon: N_e
  }), null);
};
tD.displayName = "CloseCircleOutlined";
tD.inheritAttrs = !1;
var z_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
function KN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      V_e(t, i, n[i]);
    });
  }
  return t;
}
function V_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Ou = function(e, n) {
  var r = KN({}, e, n.attrs);
  return M(lt, KN({}, r, {
    icon: z_e
  }), null);
};
Ou.displayName = "CheckCircleFilled";
Ou.inheritAttrs = !1;
var F_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" };
function JN(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      W_e(t, i, n[i]);
    });
  }
  return t;
}
function W_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var Su = function(e, n) {
  var r = JN({}, e, n.attrs);
  return M(lt, JN({}, r, {
    icon: F_e
  }), null);
};
Su.displayName = "ExclamationCircleFilled";
Su.inheritAttrs = !1;
var Q_e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" };
function e5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      H_e(t, i, n[i]);
    });
  }
  return t;
}
function H_e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var If = function(e, n) {
  var r = e5({}, e, n.attrs);
  return M(lt, e5({}, r, {
    icon: Q_e
  }), null);
};
If.displayName = "InfoCircleFilled";
If.inheritAttrs = !1;
const $y = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], G_e = (t) => ({
  xs: `(max-width: ${t.screenXSMax}px)`,
  sm: `(min-width: ${t.screenSM}px)`,
  md: `(min-width: ${t.screenMD}px)`,
  lg: `(min-width: ${t.screenLG}px)`,
  xl: `(min-width: ${t.screenXL}px)`,
  xxl: `(min-width: ${t.screenXXL}px)`,
  xxxl: `{min-width: ${t.screenXXXL}px}`
});
function j_e() {
  const [, t] = ap();
  return L(() => {
    const e = G_e(t.value), n = /* @__PURE__ */ new Map();
    let r = -1, i = {};
    return {
      matchHandlers: {},
      dispatch(a) {
        return i = a, n.forEach((o) => o(i)), n.size >= 1;
      },
      subscribe(a) {
        return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
      },
      unsubscribe(a) {
        n.delete(a), n.size || this.unregister();
      },
      unregister() {
        Object.keys(e).forEach((a) => {
          const o = e[a], s = this.matchHandlers[o];
          s == null || s.mql.removeListener(s == null ? void 0 : s.listener);
        }), n.clear();
      },
      register() {
        Object.keys(e).forEach((a) => {
          const o = e[a], s = (u) => {
            let {
              matches: c
            } = u;
            this.dispatch(I(I({}, i), {
              [a]: c
            }));
          }, l = window.matchMedia(o);
          l.addListener(s), this.matchHandlers[o] = {
            mql: l,
            listener: s
          }, s(l);
        });
      },
      responsiveMap: e
    };
  });
}
const qi = {
  adjustX: 1,
  adjustY: 1
}, Ki = [0, 0], IU = {
  left: {
    points: ["cr", "cl"],
    overflow: qi,
    offset: [-4, 0],
    targetOffset: Ki
  },
  right: {
    points: ["cl", "cr"],
    overflow: qi,
    offset: [4, 0],
    targetOffset: Ki
  },
  top: {
    points: ["bc", "tc"],
    overflow: qi,
    offset: [0, -4],
    targetOffset: Ki
  },
  bottom: {
    points: ["tc", "bc"],
    overflow: qi,
    offset: [0, 4],
    targetOffset: Ki
  },
  topLeft: {
    points: ["bl", "tl"],
    overflow: qi,
    offset: [0, -4],
    targetOffset: Ki
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: qi,
    offset: [-4, 0],
    targetOffset: Ki
  },
  topRight: {
    points: ["br", "tr"],
    overflow: qi,
    offset: [0, -4],
    targetOffset: Ki
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: qi,
    offset: [4, 0],
    targetOffset: Ki
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: qi,
    offset: [0, 4],
    targetOffset: Ki
  },
  rightBottom: {
    points: ["bl", "br"],
    overflow: qi,
    offset: [4, 0],
    targetOffset: Ki
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: qi,
    offset: [0, 4],
    targetOffset: Ki
  },
  leftBottom: {
    points: ["br", "bl"],
    overflow: qi,
    offset: [-4, 0],
    targetOffset: Ki
  }
}, Z_e = {
  prefixCls: String,
  id: String,
  overlayInnerStyle: Y.any
}, U_e = te({
  compatConfig: {
    MODE: 3
  },
  name: "TooltipContent",
  props: Z_e,
  setup(t, e) {
    let {
      slots: n
    } = e;
    return () => {
      var r;
      return M("div", {
        class: `${t.prefixCls}-inner`,
        id: t.id,
        role: "tooltip",
        style: t.overlayInnerStyle
      }, [(r = n.overlay) === null || r === void 0 ? void 0 : r.call(n)]);
    };
  }
});
var X_e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function t5() {
}
const Y_e = te({
  compatConfig: {
    MODE: 3
  },
  name: "Tooltip",
  inheritAttrs: !1,
  props: {
    trigger: Y.any.def(["hover"]),
    defaultVisible: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    placement: Y.string.def("right"),
    transitionName: String,
    animation: Y.any,
    afterVisibleChange: Y.func.def(() => {
    }),
    overlayStyle: {
      type: Object,
      default: void 0
    },
    overlayClassName: String,
    prefixCls: Y.string.def("rc-tooltip"),
    mouseEnterDelay: Y.number.def(0.1),
    mouseLeaveDelay: Y.number.def(0.1),
    getPopupContainer: Function,
    destroyTooltipOnHide: {
      type: Boolean,
      default: !1
    },
    align: Y.object.def(() => ({})),
    arrowContent: Y.any.def(null),
    tipId: String,
    builtinPlacements: Y.object,
    overlayInnerStyle: {
      type: Object,
      default: void 0
    },
    popupVisible: {
      type: Boolean,
      default: void 0
    },
    onVisibleChange: Function,
    onPopupAlign: Function,
    arrow: {
      type: Boolean,
      default: !0
    }
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    const a = ae(), o = () => {
      const {
        prefixCls: c,
        tipId: f,
        overlayInnerStyle: d
      } = t;
      return [t.arrow ? M("div", {
        class: `${c}-arrow`,
        key: "arrow"
      }, [IS(n, t, "arrowContent")]) : null, M(U_e, {
        key: "content",
        prefixCls: c,
        id: f,
        overlayInnerStyle: d
      }, {
        overlay: n.overlay
      })];
    };
    i({
      getPopupDomNode: () => a.value.getPopupDomNode(),
      triggerDOM: a,
      forcePopupAlign: () => {
        var c;
        return (c = a.value) === null || c === void 0 ? void 0 : c.forcePopupAlign();
      }
    });
    const l = ae(!1), u = ae(!1);
    return ht(() => {
      const {
        destroyTooltipOnHide: c
      } = t;
      if (typeof c == "boolean")
        l.value = c;
      else if (c && typeof c == "object") {
        const {
          keepParent: f
        } = c;
        l.value = f === !0, u.value = f === !1;
      }
    }), () => {
      const {
        overlayClassName: c,
        trigger: f,
        mouseEnterDelay: d,
        mouseLeaveDelay: h,
        overlayStyle: p,
        prefixCls: v,
        afterVisibleChange: g,
        transitionName: m,
        animation: y,
        placement: b,
        align: _,
        destroyTooltipOnHide: O,
        defaultVisible: S
      } = t, x = X_e(t, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]), C = I({}, x);
      t.visible !== void 0 && (C.popupVisible = t.visible);
      const T = I(I(I({
        popupClassName: c,
        prefixCls: v,
        action: f,
        builtinPlacements: IU,
        popupPlacement: b,
        popupAlign: _,
        afterPopupVisibleChange: g,
        popupTransitionName: m,
        popupAnimation: y,
        defaultPopupVisible: S,
        destroyPopupOnHide: l.value,
        autoDestroy: u.value,
        mouseLeaveDelay: h,
        popupStyle: p,
        mouseEnterDelay: d
      }, C), r), {
        onPopupVisibleChange: t.onVisibleChange || t5,
        onPopupAlign: t.onPopupAlign || t5,
        ref: a,
        arrow: !!t.arrow,
        popup: o()
      });
      return M(KS, T, {
        default: n.default
      });
    };
  }
}), q_e = () => ({
  trigger: [String, Array],
  open: {
    type: Boolean,
    default: void 0
  },
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  placement: String,
  color: String,
  transitionName: String,
  overlayStyle: $t(),
  overlayInnerStyle: $t(),
  overlayClassName: String,
  openClassName: String,
  prefixCls: String,
  mouseEnterDelay: Number,
  mouseLeaveDelay: Number,
  getPopupContainer: Function,
  /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
  arrowPointAtCenter: {
    type: Boolean,
    default: void 0
  },
  arrow: {
    type: [Boolean, Object],
    default: !0
  },
  autoAdjustOverflow: {
    type: [Boolean, Object],
    default: void 0
  },
  destroyTooltipOnHide: {
    type: Boolean,
    default: void 0
  },
  align: $t(),
  builtinPlacements: $t(),
  children: Array,
  /** @deprecated Please use `onOpenChange` instead. */
  onVisibleChange: Function,
  /** @deprecated Please use `onUpdate:open` instead. */
  "onUpdate:visible": Function,
  onOpenChange: Function,
  "onUpdate:open": Function
}), K_e = {
  adjustX: 1,
  adjustY: 1
}, n5 = {
  adjustX: 0,
  adjustY: 0
}, J_e = [0, 0];
function r5(t) {
  return typeof t == "boolean" ? t ? K_e : n5 : I(I({}, n5), t);
}
function e1e(t) {
  const {
    arrowWidth: e = 4,
    horizontalArrowShift: n = 16,
    verticalArrowShift: r = 8,
    autoAdjustOverflow: i,
    arrowPointAtCenter: a
  } = t, o = {
    left: {
      points: ["cr", "cl"],
      offset: [-4, 0]
    },
    right: {
      points: ["cl", "cr"],
      offset: [4, 0]
    },
    top: {
      points: ["bc", "tc"],
      offset: [0, -4]
    },
    bottom: {
      points: ["tc", "bc"],
      offset: [0, 4]
    },
    topLeft: {
      points: ["bl", "tc"],
      offset: [-(n + e), -4]
    },
    leftTop: {
      points: ["tr", "cl"],
      offset: [-4, -(r + e)]
    },
    topRight: {
      points: ["br", "tc"],
      offset: [n + e, -4]
    },
    rightTop: {
      points: ["tl", "cr"],
      offset: [4, -(r + e)]
    },
    bottomRight: {
      points: ["tr", "bc"],
      offset: [n + e, 4]
    },
    rightBottom: {
      points: ["bl", "cr"],
      offset: [4, r + e]
    },
    bottomLeft: {
      points: ["tl", "bc"],
      offset: [-(n + e), 4]
    },
    leftBottom: {
      points: ["br", "cl"],
      offset: [-4, r + e]
    }
  };
  return Object.keys(o).forEach((s) => {
    o[s] = a ? I(I({}, o[s]), {
      overflow: r5(i),
      targetOffset: J_e
    }) : I(I({}, IU[s]), {
      overflow: r5(i)
    }), o[s].ignoreShake = !0;
  }), o;
}
function DU() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  for (let e = 0, n = t.length; e < n; e++)
    if (t[e] !== void 0)
      return t[e];
}
const t1e = b1.map((t) => `${t}-inverse`);
function n1e(t) {
  return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [...t1e, ...b1].includes(t) : b1.includes(t);
}
function r1e(t, e) {
  const n = n1e(e), r = ye({
    [`${t}-${e}`]: e && n
  }), i = {}, a = {};
  return e && !n && (i.background = e, a["--antd-arrow-background-color"] = e), {
    className: r,
    overlayStyle: i,
    arrowStyle: a
  };
}
function Ay(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  return t.map((n) => `${e}${n}`).join(",");
}
const RU = 8;
function i1e(t) {
  const e = RU, {
    sizePopupArrow: n,
    contentRadius: r,
    borderRadiusOuter: i,
    limitVerticalRadius: a
  } = t, o = n / 2 - Math.ceil(i * (Math.sqrt(2) - 1)), s = (r > 12 ? r + 2 : 12) - o, l = a ? e - o : s;
  return {
    dropdownArrowOffset: s,
    dropdownArrowOffsetVertical: l
  };
}
function a1e(t, e) {
  const {
    componentCls: n,
    sizePopupArrow: r,
    marginXXS: i,
    borderRadiusXS: a,
    borderRadiusOuter: o,
    boxShadowPopoverArrow: s
  } = t, {
    colorBg: l,
    showArrowCls: u,
    contentRadius: c = t.borderRadiusLG,
    limitVerticalRadius: f
  } = e, {
    dropdownArrowOffsetVertical: d,
    dropdownArrowOffset: h
  } = i1e({
    sizePopupArrow: r,
    contentRadius: c,
    borderRadiusOuter: o,
    limitVerticalRadius: f
  }), p = r / 2 + i;
  return {
    [n]: {
      // ============================ Basic ============================
      [`${n}-arrow`]: [I(I({
        position: "absolute",
        zIndex: 1,
        display: "block"
      }, pfe(r, a, o, l, s)), {
        "&:before": {
          background: l
        }
      })],
      // ========================== Placement ==========================
      // Here handle the arrow position and rotate stuff
      // >>>>> Top
      [[`&-placement-top ${n}-arrow`, `&-placement-topLeft ${n}-arrow`, `&-placement-topRight ${n}-arrow`].join(",")]: {
        bottom: 0,
        transform: "translateY(100%) rotate(180deg)"
      },
      [`&-placement-top ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(100%) rotate(180deg)"
      },
      [`&-placement-topLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: h
        }
      },
      [`&-placement-topRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: h
        }
      },
      // >>>>> Bottom
      [[`&-placement-bottom ${n}-arrow`, `&-placement-bottomLeft ${n}-arrow`, `&-placement-bottomRight ${n}-arrow`].join(",")]: {
        top: 0,
        transform: "translateY(-100%)"
      },
      [`&-placement-bottom ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%) translateY(-100%)"
      },
      [`&-placement-bottomLeft ${n}-arrow`]: {
        left: {
          _skip_check_: !0,
          value: h
        }
      },
      [`&-placement-bottomRight ${n}-arrow`]: {
        right: {
          _skip_check_: !0,
          value: h
        }
      },
      // >>>>> Left
      [[`&-placement-left ${n}-arrow`, `&-placement-leftTop ${n}-arrow`, `&-placement-leftBottom ${n}-arrow`].join(",")]: {
        right: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(100%) rotate(90deg)"
      },
      [`&-placement-left ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(100%) rotate(90deg)"
      },
      [`&-placement-leftTop ${n}-arrow`]: {
        top: d
      },
      [`&-placement-leftBottom ${n}-arrow`]: {
        bottom: d
      },
      // >>>>> Right
      [[`&-placement-right ${n}-arrow`, `&-placement-rightTop ${n}-arrow`, `&-placement-rightBottom ${n}-arrow`].join(",")]: {
        left: {
          _skip_check_: !0,
          value: 0
        },
        transform: "translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-right ${n}-arrow`]: {
        top: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
      },
      [`&-placement-rightTop ${n}-arrow`]: {
        top: d
      },
      [`&-placement-rightBottom ${n}-arrow`]: {
        bottom: d
      },
      // =========================== Offset ============================
      // Offset the popover to account for the dropdown arrow
      // >>>>> Top
      [Ay(["&-placement-topLeft", "&-placement-top", "&-placement-topRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingBottom: p
      },
      // >>>>> Bottom
      [Ay(["&-placement-bottomLeft", "&-placement-bottom", "&-placement-bottomRight"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingTop: p
      },
      // >>>>> Left
      [Ay(["&-placement-leftTop", "&-placement-left", "&-placement-leftBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingRight: {
          _skip_check_: !0,
          value: p
        }
      },
      // >>>>> Right
      [Ay(["&-placement-rightTop", "&-placement-right", "&-placement-rightBottom"].map((v) => v += ":not(&-arrow-hidden)"), u)]: {
        paddingLeft: {
          _skip_check_: !0,
          value: p
        }
      }
    }
  };
}
const o1e = (t) => {
  const {
    componentCls: e,
    // ant-tooltip
    tooltipMaxWidth: n,
    tooltipColor: r,
    tooltipBg: i,
    tooltipBorderRadius: a,
    zIndexPopup: o,
    controlHeight: s,
    boxShadowSecondary: l,
    paddingSM: u,
    paddingXS: c,
    tooltipRadiusOuter: f
  } = t;
  return [
    {
      [e]: I(I(I(I({}, nn(t)), {
        position: "absolute",
        zIndex: o,
        display: "block",
        "&": [{
          width: "max-content"
        }, {
          width: "intrinsic"
        }],
        maxWidth: n,
        visibility: "visible",
        "&-hidden": {
          display: "none"
        },
        "--antd-arrow-background-color": i,
        // Wrapper for the tooltip content
        [`${e}-inner`]: {
          minWidth: s,
          minHeight: s,
          padding: `${u / 2}px ${c}px`,
          color: r,
          textAlign: "start",
          textDecoration: "none",
          wordWrap: "break-word",
          backgroundColor: i,
          borderRadius: a,
          boxShadow: l
        },
        // Limit left and right placement radius
        [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
          [`${e}-inner`]: {
            borderRadius: Math.min(a, RU)
          }
        },
        [`${e}-content`]: {
          position: "relative"
        }
      }), vfe(t, (d, h) => {
        let {
          darkColor: p
        } = h;
        return {
          [`&${e}-${d}`]: {
            [`${e}-inner`]: {
              backgroundColor: p
            },
            [`${e}-arrow`]: {
              "--antd-arrow-background-color": p
            }
          }
        };
      })), {
        // RTL
        "&-rtl": {
          direction: "rtl"
        }
      })
    },
    // Arrow Style
    a1e(Bt(t, {
      borderRadiusOuter: f
    }), {
      colorBg: "var(--antd-arrow-background-color)",
      showArrowCls: "",
      contentRadius: a,
      limitVerticalRadius: !0
    }),
    // Pure Render
    {
      [`${e}-pure`]: {
        position: "relative",
        maxWidth: "none"
      }
    }
  ];
}, s1e = (t, e) => Sn("Tooltip", (r) => {
  if ((e == null ? void 0 : e.value) === !1)
    return [];
  const {
    borderRadius: i,
    colorTextLightSolid: a,
    colorBgDefault: o,
    borderRadiusOuter: s
  } = r, l = Bt(r, {
    // default variables
    tooltipMaxWidth: 250,
    tooltipColor: a,
    tooltipBorderRadius: i,
    tooltipBg: o,
    tooltipRadiusOuter: s > 4 ? 4 : s
  });
  return [o1e(l), ux(r, "zoom-big-fast")];
}, (r) => {
  let {
    zIndexPopupBase: i,
    colorBgSpotlight: a
  } = r;
  return {
    zIndexPopup: i + 70,
    colorBgDefault: a
  };
})(t), l1e = (t, e) => {
  const n = {}, r = I({}, t);
  return e.forEach((i) => {
    t && i in t && (n[i] = t[i], delete r[i]);
  }), {
    picked: n,
    omitted: r
  };
}, kU = () => I(I({}, q_e()), {
  title: Y.any
}), u1e = te({
  compatConfig: {
    MODE: 3
  },
  name: "ATooltip",
  inheritAttrs: !1,
  props: sr(kU(), {
    trigger: "hover",
    align: {},
    placement: "top",
    mouseEnterDelay: 0.1,
    mouseLeaveDelay: 0.1,
    arrowPointAtCenter: !1,
    autoAdjustOverflow: !0
  }),
  slots: Object,
  // emits: ['update:visible', 'visibleChange'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i,
      expose: a
    } = e;
    process.env.NODE_ENV !== "production" && [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((w) => {
      let [P, $] = w;
      Xr(t[P] === void 0, "Tooltip", `\`${P}\` is deprecated, please use \`${$}\` instead.`);
    });
    const {
      prefixCls: o,
      getPopupContainer: s,
      direction: l,
      rootPrefixCls: u
    } = It("tooltip", t), c = L(() => {
      var w;
      return (w = t.open) !== null && w !== void 0 ? w : t.visible;
    }), f = U(DU([t.open, t.visible])), d = U();
    let h;
    se(c, (w) => {
      xt.cancel(h), h = xt(() => {
        f.value = !!w;
      });
    });
    const p = () => {
      var w;
      const P = (w = t.title) !== null && w !== void 0 ? w : n.title;
      return !P && P !== 0;
    }, v = (w) => {
      const P = p();
      c.value === void 0 && (f.value = P ? !1 : w), P || (r("update:visible", w), r("visibleChange", w), r("update:open", w), r("openChange", w));
    };
    a({
      getPopupDomNode: () => d.value.getPopupDomNode(),
      open: f,
      forcePopupAlign: () => {
        var w;
        return (w = d.value) === null || w === void 0 ? void 0 : w.forcePopupAlign();
      }
    });
    const m = L(() => {
      var w;
      const {
        builtinPlacements: P,
        autoAdjustOverflow: $,
        arrow: A,
        arrowPointAtCenter: D
      } = t;
      let E = D;
      return typeof A == "object" && (E = (w = A.pointAtCenter) !== null && w !== void 0 ? w : D), P || e1e({
        arrowPointAtCenter: E,
        autoAdjustOverflow: $
      });
    }), y = (w) => w || w === "", b = (w) => {
      const P = w.type;
      if (typeof P == "object" && w.props && ((P.__ANT_BUTTON === !0 || P === "button") && y(w.props.disabled) || P.__ANT_SWITCH === !0 && (y(w.props.disabled) || y(w.props.loading)) || P.__ANT_RADIO === !0 && y(w.props.disabled))) {
        const {
          picked: $,
          omitted: A
        } = l1e(Mue(w), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]), D = I(I({
          display: "inline-block"
        }, $), {
          cursor: "not-allowed",
          lineHeight: 1,
          width: w.props && w.props.block ? "100%" : void 0
        }), E = I(I({}, A), {
          pointerEvents: "none"
        }), R = Pn(w, {
          style: E
        }, !0);
        return M("span", {
          style: D,
          class: `${o.value}-disabled-compatible-wrapper`
        }, [R]);
      }
      return w;
    }, _ = () => {
      var w, P;
      return (w = t.title) !== null && w !== void 0 ? w : (P = n.title) === null || P === void 0 ? void 0 : P.call(n);
    }, O = (w, P) => {
      const $ = m.value, A = Object.keys($).find((D) => {
        var E, R;
        return $[D].points[0] === ((E = P.points) === null || E === void 0 ? void 0 : E[0]) && $[D].points[1] === ((R = P.points) === null || R === void 0 ? void 0 : R[1]);
      });
      if (A) {
        const D = w.getBoundingClientRect(), E = {
          top: "50%",
          left: "50%"
        };
        A.indexOf("top") >= 0 || A.indexOf("Bottom") >= 0 ? E.top = `${D.height - P.offset[1]}px` : (A.indexOf("Top") >= 0 || A.indexOf("bottom") >= 0) && (E.top = `${-P.offset[1]}px`), A.indexOf("left") >= 0 || A.indexOf("Right") >= 0 ? E.left = `${D.width - P.offset[0]}px` : (A.indexOf("right") >= 0 || A.indexOf("Left") >= 0) && (E.left = `${-P.offset[0]}px`), w.style.transformOrigin = `${E.left} ${E.top}`;
      }
    }, S = L(() => r1e(o.value, t.color)), x = L(() => i["data-popover-inject"]), [C, T] = s1e(o, L(() => !x.value));
    return () => {
      var w, P;
      const {
        openClassName: $,
        overlayClassName: A,
        overlayStyle: D,
        overlayInnerStyle: E
      } = t;
      let R = (P = os((w = n.default) === null || w === void 0 ? void 0 : w.call(n))) !== null && P !== void 0 ? P : null;
      R = R.length === 1 ? R[0] : R;
      let N = f.value;
      if (c.value === void 0 && p() && (N = !1), !R)
        return null;
      const V = b(Ui(R) && !Iue(R) ? R : M("span", null, [R])), z = ye({
        [$ || `${o.value}-open`]: !0,
        [V.props && V.props.class]: V.props && V.props.class
      }), W = ye(A, {
        [`${o.value}-rtl`]: l.value === "rtl"
      }, S.value.className, T.value), F = I(I({}, S.value.overlayStyle), E), Q = S.value.arrowStyle, Z = I(I(I({}, i), t), {
        prefixCls: o.value,
        arrow: !!t.arrow,
        getPopupContainer: s == null ? void 0 : s.value,
        builtinPlacements: m.value,
        visible: N,
        ref: d,
        overlayClassName: W,
        overlayStyle: I(I({}, Q), D),
        overlayInnerStyle: F,
        onVisibleChange: v,
        onPopupAlign: O,
        transitionName: es(u.value, "zoom-big-fast", t.transitionName)
      });
      return C(M(Y_e, Z, {
        default: () => [f.value ? Pn(V, {
          class: z
        }) : V],
        arrowContent: () => M("span", {
          class: `${o.value}-arrow-content`
        }, null),
        overlay: _
      }));
    };
  }
}), dx = np(u1e), Xf = {
  adjustX: 1,
  adjustY: 1
}, Yf = [0, 0], c1e = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Xf,
    offset: [0, -4],
    targetOffset: Yf
  },
  topCenter: {
    points: ["bc", "tc"],
    overflow: Xf,
    offset: [0, -4],
    targetOffset: Yf
  },
  topRight: {
    points: ["br", "tr"],
    overflow: Xf,
    offset: [0, -4],
    targetOffset: Yf
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Xf,
    offset: [0, 4],
    targetOffset: Yf
  },
  bottomCenter: {
    points: ["tc", "bc"],
    overflow: Xf,
    offset: [0, 4],
    targetOffset: Yf
  },
  bottomRight: {
    points: ["tr", "br"],
    overflow: Xf,
    offset: [0, 4],
    targetOffset: Yf
  }
};
var f1e = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const d1e = te({
  compatConfig: {
    MODE: 3
  },
  props: {
    minOverlayWidthMatchTrigger: {
      type: Boolean,
      default: void 0
    },
    arrow: {
      type: Boolean,
      default: !1
    },
    prefixCls: Y.string.def("rc-dropdown"),
    transitionName: String,
    overlayClassName: Y.string.def(""),
    openClassName: String,
    animation: Y.any,
    align: Y.object,
    overlayStyle: {
      type: Object,
      default: void 0
    },
    placement: Y.string.def("bottomLeft"),
    overlay: Y.any,
    trigger: Y.oneOfType([Y.string, Y.arrayOf(Y.string)]).def("hover"),
    alignPoint: {
      type: Boolean,
      default: void 0
    },
    showAction: Y.array,
    hideAction: Y.array,
    getPopupContainer: Function,
    visible: {
      type: Boolean,
      default: void 0
    },
    defaultVisible: {
      type: Boolean,
      default: !1
    },
    mouseEnterDelay: Y.number.def(0.15),
    mouseLeaveDelay: Y.number.def(0.1)
  },
  emits: ["visibleChange", "overlayClick"],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      expose: i
    } = e;
    const a = U(!!t.visible);
    se(() => t.visible, (h) => {
      h !== void 0 && (a.value = h);
    });
    const o = U();
    i({
      triggerRef: o
    });
    const s = (h) => {
      t.visible === void 0 && (a.value = !1), r("overlayClick", h);
    }, l = (h) => {
      t.visible === void 0 && (a.value = h), r("visibleChange", h);
    }, u = () => {
      var h;
      const p = (h = n.overlay) === null || h === void 0 ? void 0 : h.call(n), v = {
        prefixCls: `${t.prefixCls}-menu`,
        onClick: s
      };
      return M(wt, {
        key: nj
      }, [t.arrow && M("div", {
        class: `${t.prefixCls}-arrow`
      }, null), Pn(p, v, !1)]);
    }, c = L(() => {
      const {
        minOverlayWidthMatchTrigger: h = !t.alignPoint
      } = t;
      return h;
    }), f = () => {
      var h;
      const p = (h = n.default) === null || h === void 0 ? void 0 : h.call(n);
      return a.value && p ? Pn(p[0], {
        class: t.openClassName || `${t.prefixCls}-open`
      }, !1) : p;
    }, d = L(() => !t.hideAction && t.trigger.indexOf("contextmenu") !== -1 ? ["click"] : t.hideAction);
    return () => {
      const {
        prefixCls: h,
        arrow: p,
        showAction: v,
        overlayStyle: g,
        trigger: m,
        placement: y,
        align: b,
        getPopupContainer: _,
        transitionName: O,
        animation: S,
        overlayClassName: x
      } = t, C = f1e(t, ["prefixCls", "arrow", "showAction", "overlayStyle", "trigger", "placement", "align", "getPopupContainer", "transitionName", "animation", "overlayClassName"]);
      return M(KS, j(j({}, C), {}, {
        prefixCls: h,
        ref: o,
        popupClassName: ye(x, {
          [`${h}-show-arrow`]: p
        }),
        popupStyle: g,
        builtinPlacements: c1e,
        action: m,
        showAction: v,
        hideAction: d.value || [],
        popupPlacement: y,
        popupAlign: b,
        popupTransitionName: O,
        popupAnimation: S,
        popupVisible: a.value,
        stretch: c.value ? "minWidth" : "",
        onPopupVisibleChange: l,
        getPopupContainer: _
      }), {
        popup: u,
        default: f
      });
    };
  }
}), h1e = (t) => {
  const {
    componentCls: e,
    colorPrimary: n
  } = t;
  return {
    [e]: {
      position: "absolute",
      background: "transparent",
      pointerEvents: "none",
      boxSizing: "border-box",
      color: `var(--wave-color, ${n})`,
      boxShadow: "0 0 0 0 currentcolor",
      opacity: 0.2,
      // =================== Motion ===================
      "&.wave-motion-appear": {
        transition: [`box-shadow 0.4s ${t.motionEaseOutCirc}`, `opacity 2s ${t.motionEaseOutCirc}`].join(","),
        "&-active": {
          boxShadow: "0 0 0 6px currentcolor",
          opacity: 0
        }
      }
    }
  };
}, p1e = Sn("Wave", (t) => [h1e(t)]);
function v1e(t) {
  const e = (t || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
  return e && e[1] && e[2] && e[3] ? !(e[1] === e[2] && e[2] === e[3]) : !0;
}
function SC(t) {
  return t && t !== "#fff" && t !== "#ffffff" && t !== "rgb(255, 255, 255)" && t !== "rgba(255, 255, 255, 1)" && v1e(t) && !/rgba\((?:\d*, ){3}0\)/.test(t) && // any transparent rgba color
  t !== "transparent";
}
function g1e(t) {
  const {
    borderTopColor: e,
    borderColor: n,
    backgroundColor: r
  } = getComputedStyle(t);
  return SC(e) ? e : SC(n) ? n : SC(r) ? r : null;
}
function xC(t) {
  return Number.isNaN(t) ? 0 : t;
}
const m1e = te({
  props: {
    target: $t(),
    className: String
  },
  setup(t) {
    const e = ae(null), [n, r] = fn(null), [i, a] = fn([]), [o, s] = fn(0), [l, u] = fn(0), [c, f] = fn(0), [d, h] = fn(0), [p, v] = fn(!1);
    function g() {
      const {
        target: x
      } = t, C = getComputedStyle(x);
      r(g1e(x));
      const T = C.position === "static", {
        borderLeftWidth: w,
        borderTopWidth: P
      } = C;
      s(T ? x.offsetLeft : xC(-parseFloat(w))), u(T ? x.offsetTop : xC(-parseFloat(P))), f(x.offsetWidth), h(x.offsetHeight);
      const {
        borderTopLeftRadius: $,
        borderTopRightRadius: A,
        borderBottomLeftRadius: D,
        borderBottomRightRadius: E
      } = C;
      a([$, A, E, D].map((R) => xC(parseFloat(R))));
    }
    let m, y, b;
    const _ = () => {
      clearTimeout(b), xt.cancel(y), m == null || m.disconnect();
    }, O = () => {
      var x;
      const C = (x = e.value) === null || x === void 0 ? void 0 : x.parentElement;
      C && (sf(null, C), C.parentElement && C.parentElement.removeChild(C));
    };
    it(() => {
      _(), b = setTimeout(() => {
        O();
      }, 5e3);
      const {
        target: x
      } = t;
      x && (y = xt(() => {
        g(), v(!0);
      }), typeof ResizeObserver < "u" && (m = new ResizeObserver(g), m.observe(x)));
    }), yt(() => {
      _();
    });
    const S = (x) => {
      x.propertyName === "opacity" && O();
    };
    return () => {
      if (!p.value)
        return null;
      const x = {
        left: `${o.value}px`,
        top: `${l.value}px`,
        width: `${c.value}px`,
        height: `${d.value}px`,
        borderRadius: i.value.map((C) => `${C}px`).join(" ")
      };
      return n && (x["--wave-color"] = n.value), M(co, {
        appear: !0,
        name: "wave-motion",
        appearFromClass: "wave-motion-appear",
        appearActiveClass: "wave-motion-appear",
        appearToClass: "wave-motion-appear wave-motion-appear-active"
      }, {
        default: () => [M("div", {
          ref: e,
          class: t.className,
          style: x,
          onTransitionend: S
        }, null)]
      });
    };
  }
});
function y1e(t, e) {
  const n = document.createElement("div");
  n.style.position = "absolute", n.style.left = "0px", n.style.top = "0px", t == null || t.insertBefore(n, t == null ? void 0 : t.firstChild), sf(M(m1e, {
    target: t,
    className: e
  }, null), n);
}
function b1e(t, e, n) {
  function r() {
    var i;
    const a = Cs(t);
    !((i = n == null ? void 0 : n.value) === null || i === void 0) && i.disabled || !a || y1e(a, e.value);
  }
  return r;
}
const _1e = te({
  compatConfig: {
    MODE: 3
  },
  name: "Wave",
  props: {
    disabled: Boolean
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = vn(), {
      prefixCls: i,
      wave: a
    } = It("wave", t), [, o] = p1e(i), s = b1e(r, L(() => ye(i.value, o.value)), a);
    let l;
    const u = () => {
      Cs(r).removeEventListener("click", l, !0);
    };
    return it(() => {
      se(() => t.disabled, () => {
        u(), Tt(() => {
          const c = Cs(r);
          c == null || c.removeEventListener("click", l, !0), !(!c || c.nodeType !== 1 || t.disabled) && (l = (f) => {
            f.target.tagName === "INPUT" || !gZ(f.target) || // No need wave
            !c.getAttribute || c.getAttribute("disabled") || c.disabled || c.className.includes("disabled") || c.className.includes("-leave") || s();
          }, c.addEventListener("click", l, !0));
        });
      }, {
        immediate: !0,
        flush: "post"
      });
    }), yt(() => {
      u();
    }), () => {
      var c;
      return (c = n.default) === null || c === void 0 ? void 0 : c.call(n)[0];
    };
  }
});
function LU(t) {
  return t === "danger" ? {
    danger: !0
  } : {
    type: t
  };
}
const O1e = () => ({
  prefixCls: String,
  type: String,
  htmlType: {
    type: String,
    default: "button"
  },
  shape: {
    type: String
  },
  size: {
    type: String
  },
  loading: {
    type: [Boolean, Object],
    default: () => !1
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  ghost: {
    type: Boolean,
    default: void 0
  },
  block: {
    type: Boolean,
    default: void 0
  },
  danger: {
    type: Boolean,
    default: void 0
  },
  icon: Y.any,
  href: String,
  target: String,
  title: String,
  onClick: g1(),
  onMousedown: g1()
}), i5 = (t) => {
  t && (t.style.width = "0px", t.style.opacity = "0", t.style.transform = "scale(0)");
}, a5 = (t) => {
  Tt(() => {
    t && (t.style.width = `${t.scrollWidth}px`, t.style.opacity = "1", t.style.transform = "scale(1)");
  });
}, o5 = (t) => {
  t && t.style && (t.style.width = null, t.style.opacity = null, t.style.transform = null);
}, S1e = te({
  compatConfig: {
    MODE: 3
  },
  name: "LoadingIcon",
  props: {
    prefixCls: String,
    loading: [Boolean, Object],
    existIcon: Boolean
  },
  setup(t) {
    return () => {
      const {
        existIcon: e,
        prefixCls: n,
        loading: r
      } = t;
      if (e)
        return M("span", {
          class: `${n}-loading-icon`
        }, [M(ts, null, null)]);
      const i = !!r;
      return M(co, {
        name: `${n}-loading-icon-motion`,
        onBeforeEnter: i5,
        onEnter: a5,
        onAfterEnter: o5,
        onBeforeLeave: a5,
        onLeave: (a) => {
          setTimeout(() => {
            i5(a);
          });
        },
        onAfterLeave: o5
      }, {
        default: () => [i ? M("span", {
          class: `${n}-loading-icon`
        }, [M(ts, null, null)]) : null]
      });
    };
  }
}), s5 = (t, e) => ({
  // Border
  [`> span, > ${t}`]: {
    "&:not(:last-child)": {
      [`&, & > ${t}`]: {
        "&:not(:disabled)": {
          borderInlineEndColor: e
        }
      }
    },
    "&:not(:first-child)": {
      [`&, & > ${t}`]: {
        "&:not(:disabled)": {
          borderInlineStartColor: e
        }
      }
    }
  }
}), x1e = (t) => {
  const {
    componentCls: e,
    fontSize: n,
    lineWidth: r,
    colorPrimaryHover: i,
    colorErrorHover: a
  } = t;
  return {
    [`${e}-group`]: [
      {
        position: "relative",
        display: "inline-flex",
        // Border
        [`> span, > ${e}`]: {
          "&:not(:last-child)": {
            [`&, & > ${e}`]: {
              borderStartEndRadius: 0,
              borderEndEndRadius: 0
            }
          },
          "&:not(:first-child)": {
            marginInlineStart: -r,
            [`&, & > ${e}`]: {
              borderStartStartRadius: 0,
              borderEndStartRadius: 0
            }
          }
        },
        [e]: {
          position: "relative",
          zIndex: 1,
          "&:hover,\n          &:focus,\n          &:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        },
        [`${e}-icon-only`]: {
          fontSize: n
        }
      },
      // Border Color
      s5(`${e}-primary`, i),
      s5(`${e}-danger`, a)
    ]
  };
};
function w1e(t, e) {
  return {
    // border collapse
    [`&-item:not(${e}-last-item)`]: {
      marginBottom: -t.lineWidth
    },
    "&-item": {
      "&:hover,&:focus,&:active": {
        zIndex: 2
      },
      "&[disabled]": {
        zIndex: 0
      }
    }
  };
}
function C1e(t, e) {
  return {
    [`&-item:not(${e}-first-item):not(${e}-last-item)`]: {
      borderRadius: 0
    },
    [`&-item${e}-first-item:not(${e}-last-item)`]: {
      [`&, &${t}-sm, &${t}-lg`]: {
        borderEndEndRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&-item${e}-last-item:not(${e}-first-item)`]: {
      [`&, &${t}-sm, &${t}-lg`]: {
        borderStartStartRadius: 0,
        borderStartEndRadius: 0
      }
    }
  };
}
function T1e(t) {
  const e = `${t.componentCls}-compact-vertical`;
  return {
    [e]: I(I({}, w1e(t, e)), C1e(t.componentCls, e))
  };
}
const P1e = (t) => {
  const {
    componentCls: e,
    iconCls: n
  } = t;
  return {
    [e]: {
      outline: "none",
      position: "relative",
      display: "inline-block",
      fontWeight: 400,
      whiteSpace: "nowrap",
      textAlign: "center",
      backgroundImage: "none",
      backgroundColor: "transparent",
      border: `${t.lineWidth}px ${t.lineType} transparent`,
      cursor: "pointer",
      transition: `all ${t.motionDurationMid} ${t.motionEaseInOut}`,
      userSelect: "none",
      touchAction: "manipulation",
      lineHeight: t.lineHeight,
      color: t.colorText,
      "> span": {
        display: "inline-block"
      },
      // Leave a space between icon and text.
      [`> ${n} + span, > span + ${n}`]: {
        marginInlineStart: t.marginXS
      },
      "> a": {
        color: "currentColor"
      },
      "&:not(:disabled)": I({}, VS(t)),
      // make `btn-icon-only` not too narrow
      [`&-icon-only${e}-compact-item`]: {
        flex: "none"
      },
      // Special styles for Primary Button
      [`&-compact-item${e}-primary`]: {
        [`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]: {
          position: "relative",
          "&:before": {
            position: "absolute",
            top: -t.lineWidth,
            insetInlineStart: -t.lineWidth,
            display: "inline-block",
            width: t.lineWidth,
            height: `calc(100% + ${t.lineWidth * 2}px)`,
            backgroundColor: t.colorPrimaryHover,
            content: '""'
          }
        }
      },
      // Special styles for Primary Button
      "&-compact-vertical-item": {
        [`&${e}-primary`]: {
          [`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]: {
            position: "relative",
            "&:before": {
              position: "absolute",
              top: -t.lineWidth,
              insetInlineStart: -t.lineWidth,
              display: "inline-block",
              width: `calc(100% + ${t.lineWidth * 2}px)`,
              height: t.lineWidth,
              backgroundColor: t.colorPrimaryHover,
              content: '""'
            }
          }
        }
      }
    }
  };
}, Vs = (t, e) => ({
  "&:not(:disabled)": {
    "&:hover": t,
    "&:active": e
  }
}), $1e = (t) => ({
  minWidth: t.controlHeight,
  paddingInlineStart: 0,
  paddingInlineEnd: 0,
  borderRadius: "50%"
}), A1e = (t) => ({
  borderRadius: t.controlHeight,
  paddingInlineStart: t.controlHeight / 2,
  paddingInlineEnd: t.controlHeight / 2
}), k2 = (t) => ({
  cursor: "not-allowed",
  borderColor: t.colorBorder,
  color: t.colorTextDisabled,
  backgroundColor: t.colorBgContainerDisabled,
  boxShadow: "none"
}), I1 = (t, e, n, r, i, a, o) => ({
  [`&${t}-background-ghost`]: I(I({
    color: e || void 0,
    backgroundColor: "transparent",
    borderColor: n || void 0,
    boxShadow: "none"
  }, Vs(I({
    backgroundColor: "transparent"
  }, a), I({
    backgroundColor: "transparent"
  }, o))), {
    "&:disabled": {
      cursor: "not-allowed",
      color: r || void 0,
      borderColor: i || void 0
    }
  })
}), nD = (t) => ({
  "&:disabled": I({}, k2(t))
}), NU = (t) => I({}, nD(t)), D1 = (t) => ({
  "&:disabled": {
    cursor: "not-allowed",
    color: t.colorTextDisabled
  }
}), BU = (t) => I(I(I(I(I({}, NU(t)), {
  backgroundColor: t.colorBgContainer,
  borderColor: t.colorBorder,
  boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`
}), Vs({
  color: t.colorPrimaryHover,
  borderColor: t.colorPrimaryHover
}, {
  color: t.colorPrimaryActive,
  borderColor: t.colorPrimaryActive
})), I1(t.componentCls, t.colorBgContainer, t.colorBgContainer, t.colorTextDisabled, t.colorBorder)), {
  [`&${t.componentCls}-dangerous`]: I(I(I({
    color: t.colorError,
    borderColor: t.colorError
  }, Vs({
    color: t.colorErrorHover,
    borderColor: t.colorErrorBorderHover
  }, {
    color: t.colorErrorActive,
    borderColor: t.colorErrorActive
  })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder)), nD(t))
}), E1e = (t) => I(I(I(I(I({}, NU(t)), {
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimary,
  boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`
}), Vs({
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimaryHover
}, {
  color: t.colorTextLightSolid,
  backgroundColor: t.colorPrimaryActive
})), I1(t.componentCls, t.colorPrimary, t.colorPrimary, t.colorTextDisabled, t.colorBorder, {
  color: t.colorPrimaryHover,
  borderColor: t.colorPrimaryHover
}, {
  color: t.colorPrimaryActive,
  borderColor: t.colorPrimaryActive
})), {
  [`&${t.componentCls}-dangerous`]: I(I(I({
    backgroundColor: t.colorError,
    boxShadow: `0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`
  }, Vs({
    backgroundColor: t.colorErrorHover
  }, {
    backgroundColor: t.colorErrorActive
  })), I1(t.componentCls, t.colorError, t.colorError, t.colorTextDisabled, t.colorBorder, {
    color: t.colorErrorHover,
    borderColor: t.colorErrorHover
  }, {
    color: t.colorErrorActive,
    borderColor: t.colorErrorActive
  })), nD(t))
}), M1e = (t) => I(I({}, BU(t)), {
  borderStyle: "dashed"
}), I1e = (t) => I(I(I({
  color: t.colorLink
}, Vs({
  color: t.colorLinkHover
}, {
  color: t.colorLinkActive
})), D1(t)), {
  [`&${t.componentCls}-dangerous`]: I(I({
    color: t.colorError
  }, Vs({
    color: t.colorErrorHover
  }, {
    color: t.colorErrorActive
  })), D1(t))
}), D1e = (t) => I(I(I({}, Vs({
  color: t.colorText,
  backgroundColor: t.colorBgTextHover
}, {
  color: t.colorText,
  backgroundColor: t.colorBgTextActive
})), D1(t)), {
  [`&${t.componentCls}-dangerous`]: I(I({
    color: t.colorError
  }, D1(t)), Vs({
    color: t.colorErrorHover,
    backgroundColor: t.colorErrorBg
  }, {
    color: t.colorErrorHover,
    backgroundColor: t.colorErrorBg
  }))
}), R1e = (t) => I(I({}, k2(t)), {
  [`&${t.componentCls}:hover`]: I({}, k2(t))
}), k1e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-default`]: BU(t),
    [`${e}-primary`]: E1e(t),
    [`${e}-dashed`]: M1e(t),
    [`${e}-link`]: I1e(t),
    [`${e}-text`]: D1e(t),
    [`${e}-disabled`]: R1e(t)
  };
}, rD = function(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
  const {
    componentCls: n,
    iconCls: r,
    controlHeight: i,
    fontSize: a,
    lineHeight: o,
    lineWidth: s,
    borderRadius: l,
    buttonPaddingHorizontal: u
  } = t, c = Math.max(0, (i - a * o) / 2 - s), f = u - s, d = `${n}-icon-only`;
  return [
    // Size
    {
      [`${n}${e}`]: {
        fontSize: a,
        height: i,
        padding: `${c}px ${f}px`,
        borderRadius: l,
        [`&${d}`]: {
          width: i,
          paddingInlineStart: 0,
          paddingInlineEnd: 0,
          [`&${n}-round`]: {
            width: "auto"
          },
          "> span": {
            transform: "scale(1.143)"
            // 14px -> 16px
          }
        },
        // Loading
        [`&${n}-loading`]: {
          opacity: t.opacityLoading,
          cursor: "default"
        },
        [`${n}-loading-icon`]: {
          transition: `width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`
        },
        [`&:not(${d}) ${n}-loading-icon > ${r}`]: {
          marginInlineEnd: t.marginXS
        }
      }
    },
    // Shape - patch prefixCls again to override solid border radius style
    {
      [`${n}${n}-circle${e}`]: $1e(t)
    },
    {
      [`${n}${n}-round${e}`]: A1e(t)
    }
  ];
}, L1e = (t) => rD(t), N1e = (t) => {
  const e = Bt(t, {
    controlHeight: t.controlHeightSM,
    padding: t.paddingXS,
    buttonPaddingHorizontal: 8,
    borderRadius: t.borderRadiusSM
  });
  return rD(e, `${t.componentCls}-sm`);
}, B1e = (t) => {
  const e = Bt(t, {
    controlHeight: t.controlHeightLG,
    fontSize: t.fontSizeLG,
    borderRadius: t.borderRadiusLG
  });
  return rD(e, `${t.componentCls}-lg`);
}, z1e = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [e]: {
      [`&${e}-block`]: {
        width: "100%"
      }
    }
  };
}, V1e = Sn("Button", (t) => {
  const {
    controlTmpOutline: e,
    paddingContentHorizontal: n
  } = t, r = Bt(t, {
    colorOutlineDefault: e,
    buttonPaddingHorizontal: n
  });
  return [
    // Shared
    P1e(r),
    // Size
    N1e(r),
    L1e(r),
    B1e(r),
    // Block
    z1e(r),
    // Group (type, ghost, danger, disabled, loading)
    k1e(r),
    // Button Group
    x1e(r),
    // Space Compact
    cx(t, {
      focus: !1
    }),
    T1e(t)
  ];
}), F1e = () => ({
  prefixCls: String,
  size: {
    type: String
  }
}), zU = BI(), L2 = te({
  compatConfig: {
    MODE: 3
  },
  name: "AButtonGroup",
  props: F1e(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const {
      prefixCls: r,
      direction: i
    } = It("btn-group", t), [, , a] = ap();
    zU.useProvide(tn({
      size: L(() => t.size)
    }));
    const o = L(() => {
      const {
        size: s
      } = t;
      let l = "";
      switch (s) {
        case "large":
          l = "lg";
          break;
        case "small":
          l = "sm";
          break;
        case "middle":
        case void 0:
          break;
        default:
          Qi(!s, "Button.Group", "Invalid prop `size`.");
      }
      return {
        [`${r.value}`]: !0,
        [`${r.value}-${l}`]: l,
        [`${r.value}-rtl`]: i.value === "rtl",
        [a.value]: !0
      };
    });
    return () => {
      var s;
      return M("div", {
        class: o.value
      }, [Yn((s = n.default) === null || s === void 0 ? void 0 : s.call(n))]);
    };
  }
}), l5 = /^[\u4e00-\u9fa5]{2}$/, u5 = l5.test.bind(l5);
function Ey(t) {
  return t === "text" || t === "link";
}
const Ur = te({
  compatConfig: {
    MODE: 3
  },
  name: "AButton",
  inheritAttrs: !1,
  __ANT_BUTTON: !0,
  props: sr(O1e(), {
    type: "default"
  }),
  slots: Object,
  // emits: ['click', 'mousedown'],
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i,
      expose: a
    } = e;
    const {
      prefixCls: o,
      autoInsertSpaceInButton: s,
      direction: l,
      size: u
    } = It("btn", t), [c, f] = V1e(o), d = zU.useInject(), h = Ko(), p = L(() => {
      var E;
      return (E = t.disabled) !== null && E !== void 0 ? E : h.value;
    }), v = ae(null), g = ae(void 0);
    let m = !1;
    const y = ae(!1), b = ae(!1), _ = L(() => s.value !== !1), {
      compactSize: O,
      compactItemClassnames: S
    } = sx(o, l), x = L(() => typeof t.loading == "object" && t.loading.delay ? t.loading.delay || !0 : !!t.loading);
    se(x, (E) => {
      clearTimeout(g.value), typeof x.value == "number" ? g.value = setTimeout(() => {
        y.value = E;
      }, x.value) : y.value = E;
    }, {
      immediate: !0
    });
    const C = L(() => {
      const {
        type: E,
        shape: R = "default",
        ghost: N,
        block: V,
        danger: z
      } = t, W = o.value, F = {
        large: "lg",
        small: "sm",
        middle: void 0
      }, Q = O.value || (d == null ? void 0 : d.size) || u.value, Z = Q && F[Q] || "";
      return [S.value, {
        [f.value]: !0,
        [`${W}`]: !0,
        [`${W}-${R}`]: R !== "default" && R,
        [`${W}-${E}`]: E,
        [`${W}-${Z}`]: Z,
        [`${W}-loading`]: y.value,
        [`${W}-background-ghost`]: N && !Ey(E),
        [`${W}-two-chinese-chars`]: b.value && _.value,
        [`${W}-block`]: V,
        [`${W}-dangerous`]: !!z,
        [`${W}-rtl`]: l.value === "rtl"
      }];
    }), T = () => {
      const E = v.value;
      if (!E || s.value === !1)
        return;
      const R = E.textContent;
      m && u5(R) ? b.value || (b.value = !0) : b.value && (b.value = !1);
    }, w = (E) => {
      if (y.value || p.value) {
        E.preventDefault();
        return;
      }
      i("click", E);
    }, P = (E) => {
      i("mousedown", E);
    }, $ = (E, R) => {
      const N = R ? " " : "";
      if (E.type === TS) {
        let V = E.children.trim();
        return u5(V) && (V = V.split("").join(N)), M("span", null, [V]);
      }
      return E;
    };
    return ht(() => {
      Qi(!(t.ghost && Ey(t.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
    }), it(T), ep(T), yt(() => {
      g.value && clearTimeout(g.value);
    }), a({
      focus: () => {
        var E;
        (E = v.value) === null || E === void 0 || E.focus();
      },
      blur: () => {
        var E;
        (E = v.value) === null || E === void 0 || E.blur();
      }
    }), () => {
      var E, R;
      const {
        icon: N = (E = n.icon) === null || E === void 0 ? void 0 : E.call(n)
      } = t, V = Yn((R = n.default) === null || R === void 0 ? void 0 : R.call(n));
      m = V.length === 1 && !N && !Ey(t.type);
      const {
        type: z,
        htmlType: W,
        href: F,
        title: Q,
        target: Z
      } = t, ne = y.value ? "loading" : N, ee = I(I({}, r), {
        title: Q,
        disabled: p.value,
        class: [C.value, r.class, {
          [`${o.value}-icon-only`]: V.length === 0 && !!ne
        }],
        onClick: w,
        onMousedown: P
      });
      p.value || delete ee.disabled;
      const oe = N && !y.value ? N : M(S1e, {
        existIcon: !!N,
        prefixCls: o.value,
        loading: !!y.value
      }, null), K = V.map((X) => $(X, m && _.value));
      if (F !== void 0)
        return c(M("a", j(j({}, ee), {}, {
          href: F,
          target: Z,
          ref: v
        }), [oe, K]));
      let ie = M("button", j(j({}, ee), {}, {
        ref: v,
        type: W
      }), [oe, K]);
      if (!Ey(z)) {
        const X = /* @__PURE__ */ function() {
          return ie;
        }();
        ie = M(_1e, {
          ref: "wave",
          disabled: !!y.value
        }, {
          default: () => [X]
        });
      }
      return c(ie);
    };
  }
});
Ur.Group = L2;
Ur.install = function(t) {
  return t.component(Ur.name, Ur), t.component(L2.name, L2), t;
};
var W1e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" };
function c5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Q1e(t, i, n[i]);
    });
  }
  return t;
}
function Q1e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var hx = function(e, n) {
  var r = c5({}, e, n.attrs);
  return M(lt, c5({}, r, {
    icon: W1e
  }), null);
};
hx.displayName = "EllipsisOutlined";
hx.inheritAttrs = !1;
var H1e = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" };
function f5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      G1e(t, i, n[i]);
    });
  }
  return t;
}
function G1e(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var px = function(e, n) {
  var r = f5({}, e, n.attrs);
  return M(lt, f5({}, r, {
    icon: H1e
  }), null);
};
px.displayName = "RightOutlined";
px.inheritAttrs = !1;
const VU = Symbol("OverrideContextKey"), FU = () => Ge(VU, void 0), j1e = (t) => {
  var e, n, r;
  const {
    prefixCls: i,
    mode: a,
    selectable: o,
    validator: s,
    onClick: l,
    expandIcon: u
  } = FU() || {};
  pt(VU, {
    prefixCls: L(() => {
      var c, f;
      return (f = (c = t.prefixCls) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : i == null ? void 0 : i.value;
    }),
    mode: L(() => {
      var c, f;
      return (f = (c = t.mode) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : a == null ? void 0 : a.value;
    }),
    selectable: L(() => {
      var c, f;
      return (f = (c = t.selectable) === null || c === void 0 ? void 0 : c.value) !== null && f !== void 0 ? f : o == null ? void 0 : o.value;
    }),
    validator: (e = t.validator) !== null && e !== void 0 ? e : s,
    onClick: (n = t.onClick) !== null && n !== void 0 ? n : l,
    expandIcon: (r = t.expandIcon) !== null && r !== void 0 ? r : u == null ? void 0 : u.value
  });
};
function Z1e(t, e, n, r) {
  let i;
  if (i !== void 0)
    return !!i;
  if (t === e)
    return !0;
  if (typeof t != "object" || !t || typeof e != "object" || !e)
    return !1;
  const a = Object.keys(t), o = Object.keys(e);
  if (a.length !== o.length)
    return !1;
  const s = Object.prototype.hasOwnProperty.bind(e);
  for (let l = 0; l < a.length; l++) {
    const u = a[l];
    if (!s(u))
      return !1;
    const c = t[u], f = e[u];
    if (i = void 0, i === !1 || i === void 0 && c !== f)
      return !1;
  }
  return !0;
}
function Zp(t, e) {
  return Z1e(qo(t), qo(e));
}
const WU = Symbol("menuContextKey"), QU = (t) => {
  pt(WU, t);
}, ol = () => Ge(WU), HU = Symbol("ForceRenderKey"), U1e = (t) => {
  pt(HU, t);
}, GU = () => Ge(HU, !1), jU = Symbol("menuFirstLevelContextKey"), ZU = (t) => {
  pt(jU, t);
}, X1e = () => Ge(jU, !0), R1 = te({
  compatConfig: {
    MODE: 3
  },
  name: "MenuContextProvider",
  inheritAttrs: !1,
  props: {
    mode: {
      type: String,
      default: void 0
    },
    overflowDisabled: {
      type: Boolean,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ol(), i = I({}, r);
    return t.mode !== void 0 && (i.mode = Nn(t, "mode")), t.overflowDisabled !== void 0 && (i.overflowDisabled = Nn(t, "overflowDisabled")), QU(i), () => {
      var a;
      return (a = n.default) === null || a === void 0 ? void 0 : a.call(n);
    };
  }
}), Y1e = QU, q1e = Symbol("siderCollapsed"), My = "$$__vc-menu-more__key", UU = Symbol("KeyPathContext"), iD = () => Ge(UU, {
  parentEventKeys: L(() => []),
  parentKeys: L(() => []),
  parentInfo: {}
}), K1e = (t, e, n) => {
  const {
    parentEventKeys: r,
    parentKeys: i
  } = iD(), a = L(() => [...r.value, t]), o = L(() => [...i.value, e]);
  return pt(UU, {
    parentEventKeys: a,
    parentKeys: o,
    parentInfo: n
  }), o;
}, XU = Symbol("measure"), d5 = te({
  compatConfig: {
    MODE: 3
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return pt(XU, !0), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
}), aD = () => Ge(XU, !1), J1e = K1e;
function YU(t) {
  const {
    mode: e,
    rtl: n,
    inlineIndent: r
  } = ol();
  return L(() => e.value !== "inline" ? null : n.value ? {
    paddingRight: `${t.value * r.value}px`
  } : {
    paddingLeft: `${t.value * r.value}px`
  });
}
let eOe = 0;
const tOe = () => ({
  id: String,
  role: String,
  disabled: Boolean,
  danger: Boolean,
  title: {
    type: [String, Boolean],
    default: void 0
  },
  icon: Y.any,
  onMouseenter: Function,
  onMouseleave: Function,
  onClick: Function,
  onKeydown: Function,
  onFocus: Function,
  // Internal user prop
  originItemValue: $t()
}), Th = te({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItem",
  inheritAttrs: !1,
  props: tOe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const a = vn(), o = aD(), s = typeof a.vnode.key == "symbol" ? String(a.vnode.key) : a.vnode.key;
    Qi(typeof a.vnode.key != "symbol", "MenuItem", `MenuItem \`:key="${String(s)}"\` not support Symbol type`);
    const l = `menu_item_${++eOe}_$$_${s}`, {
      parentEventKeys: u,
      parentKeys: c
    } = iD(), {
      prefixCls: f,
      activeKeys: d,
      disabled: h,
      changeActiveKeys: p,
      rtl: v,
      inlineCollapsed: g,
      siderCollapsed: m,
      onItemClick: y,
      selectedKeys: b,
      registerMenuInfo: _,
      unRegisterMenuInfo: O
    } = ol(), S = X1e(), x = ae(!1), C = L(() => [...c.value, s]);
    _(l, {
      eventKey: l,
      key: s,
      parentEventKeys: u,
      parentKeys: c,
      isLeaf: !0
    }), yt(() => {
      O(l);
    }), se(d, () => {
      x.value = !!d.value.find((F) => F === s);
    }, {
      immediate: !0
    });
    const w = L(() => h.value || t.disabled), P = L(() => b.value.includes(s)), $ = L(() => {
      const F = `${f.value}-item`;
      return {
        [`${F}`]: !0,
        [`${F}-danger`]: t.danger,
        [`${F}-active`]: x.value,
        [`${F}-selected`]: P.value,
        [`${F}-disabled`]: w.value
      };
    }), A = (F) => ({
      key: s,
      eventKey: l,
      keyPath: C.value,
      eventKeyPath: [...u.value, l],
      domEvent: F,
      item: I(I({}, t), i)
    }), D = (F) => {
      if (w.value)
        return;
      const Q = A(F);
      r("click", F), y(Q);
    }, E = (F) => {
      w.value || (p(C.value), r("mouseenter", F));
    }, R = (F) => {
      w.value || (p([]), r("mouseleave", F));
    }, N = (F) => {
      if (r("keydown", F), F.which === ge.ENTER) {
        const Q = A(F);
        r("click", F), y(Q);
      }
    }, V = (F) => {
      p(C.value), r("focus", F);
    }, z = (F, Q) => {
      const Z = M("span", {
        class: `${f.value}-title-content`
      }, [Q]);
      return (!F || Ui(Q) && Q.type === "span") && Q && g.value && S && typeof Q == "string" ? M("div", {
        class: `${f.value}-inline-collapsed-noicon`
      }, [Q.charAt(0)]) : Z;
    }, W = YU(L(() => C.value.length));
    return () => {
      var F, Q, Z, ne, ee;
      if (o) return null;
      const oe = (F = t.title) !== null && F !== void 0 ? F : (Q = n.title) === null || Q === void 0 ? void 0 : Q.call(n), K = Yn((Z = n.default) === null || Z === void 0 ? void 0 : Z.call(n)), ie = K.length;
      let X = oe;
      typeof oe > "u" ? X = S && ie ? K : "" : oe === !1 && (X = "");
      const H = {
        title: X
      };
      !m.value && !g.value && (H.title = null, H.open = !1);
      const G = {};
      t.role === "option" && (G["aria-selected"] = P.value);
      const re = (ne = t.icon) !== null && ne !== void 0 ? ne : (ee = n.icon) === null || ee === void 0 ? void 0 : ee.call(n, t);
      return M(dx, j(j({}, H), {}, {
        placement: v.value ? "left" : "right",
        overlayClassName: `${f.value}-inline-collapsed-tooltip`
      }), {
        default: () => [M(Ms.Item, j(j(j({
          component: "li"
        }, i), {}, {
          id: t.id,
          style: I(I({}, i.style || {}), W.value),
          class: [$.value, {
            [`${i.class}`]: !!i.class,
            [`${f.value}-item-only-child`]: (re ? ie + 1 : ie) === 1
          }],
          role: t.role || "menuitem",
          tabindex: t.disabled ? null : -1,
          "data-menu-id": s,
          "aria-disabled": t.disabled
        }, G), {}, {
          onMouseenter: E,
          onMouseleave: R,
          onClick: D,
          onKeydown: N,
          onFocus: V,
          title: typeof oe == "string" ? oe : void 0
        }), {
          default: () => [Pn(typeof re == "function" ? re(t.originItemValue) : re, {
            class: `${f.value}-item-icon`
          }, !1), z(re, K)]
        })]
      });
    };
  }
}), Dl = {
  adjustX: 1,
  adjustY: 1
}, nOe = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Dl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Dl,
    offset: [0, 7]
  },
  leftTop: {
    points: ["tr", "tl"],
    overflow: Dl,
    offset: [-4, 0]
  },
  rightTop: {
    points: ["tl", "tr"],
    overflow: Dl,
    offset: [4, 0]
  }
}, rOe = {
  topLeft: {
    points: ["bl", "tl"],
    overflow: Dl,
    offset: [0, -7]
  },
  bottomLeft: {
    points: ["tl", "bl"],
    overflow: Dl,
    offset: [0, 7]
  },
  rightTop: {
    points: ["tr", "tl"],
    overflow: Dl,
    offset: [-4, 0]
  },
  leftTop: {
    points: ["tl", "tr"],
    overflow: Dl,
    offset: [4, 0]
  }
}, iOe = {
  horizontal: "bottomLeft",
  vertical: "rightTop",
  "vertical-left": "rightTop",
  "vertical-right": "leftTop"
}, h5 = te({
  compatConfig: {
    MODE: 3
  },
  name: "PopupTrigger",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    mode: String,
    visible: Boolean,
    // popup: React.ReactNode;
    popupClassName: String,
    popupOffset: Array,
    disabled: Boolean,
    onVisibleChange: Function
  },
  slots: Object,
  emits: ["visibleChange"],
  setup(t, e) {
    let {
      slots: n,
      emit: r
    } = e;
    const i = ae(!1), {
      getPopupContainer: a,
      rtl: o,
      subMenuOpenDelay: s,
      subMenuCloseDelay: l,
      builtinPlacements: u,
      triggerSubMenuAction: c,
      forceSubMenuRender: f,
      motion: d,
      defaultMotions: h,
      rootClassName: p
    } = ol(), v = GU(), g = L(() => o.value ? I(I({}, rOe), u.value) : I(I({}, nOe), u.value)), m = L(() => iOe[t.mode]), y = ae();
    se(() => t.visible, (O) => {
      xt.cancel(y.value), y.value = xt(() => {
        i.value = O;
      });
    }, {
      immediate: !0
    }), yt(() => {
      xt.cancel(y.value);
    });
    const b = (O) => {
      r("visibleChange", O);
    }, _ = L(() => {
      var O, S;
      const x = d.value || ((O = h.value) === null || O === void 0 ? void 0 : O[t.mode]) || ((S = h.value) === null || S === void 0 ? void 0 : S.other), C = typeof x == "function" ? x() : x;
      return C ? g0(C.name, {
        css: !0
      }) : void 0;
    });
    return () => {
      const {
        prefixCls: O,
        popupClassName: S,
        mode: x,
        popupOffset: C,
        disabled: T
      } = t;
      return M(KS, {
        prefixCls: O,
        popupClassName: ye(`${O}-popup`, {
          [`${O}-rtl`]: o.value
        }, S, p.value),
        stretch: x === "horizontal" ? "minWidth" : null,
        getPopupContainer: a.value,
        builtinPlacements: g.value,
        popupPlacement: m.value,
        popupVisible: i.value,
        popupAlign: C && {
          offset: C
        },
        action: T ? [] : [c.value],
        mouseEnterDelay: s.value,
        mouseLeaveDelay: l.value,
        onPopupVisibleChange: b,
        forceRender: v || f.value,
        popupAnimation: _.value
      }, {
        popup: n.popup,
        default: n.default
      });
    };
  }
}), oD = (t, e) => {
  let {
    slots: n,
    attrs: r
  } = e;
  var i;
  const {
    prefixCls: a,
    mode: o
  } = ol();
  return M("ul", j(j({}, r), {}, {
    class: ye(a.value, `${a.value}-sub`, `${a.value}-${o.value === "inline" ? "inline" : "vertical"}`),
    "data-menu-list": !0
  }), [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]);
};
oD.displayName = "SubMenuList";
const aOe = te({
  compatConfig: {
    MODE: 3
  },
  name: "InlineSubMenuList",
  inheritAttrs: !1,
  props: {
    id: String,
    open: Boolean,
    keyPath: Array
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = L(() => "inline"), {
      motion: i,
      mode: a,
      defaultMotions: o
    } = ol(), s = L(() => a.value === r.value), l = U(!s.value), u = L(() => s.value ? t.open : !1);
    se(a, () => {
      s.value && (l.value = !1);
    }, {
      flush: "post"
    });
    const c = L(() => {
      var f, d;
      const h = i.value || ((f = o.value) === null || f === void 0 ? void 0 : f[r.value]) || ((d = o.value) === null || d === void 0 ? void 0 : d.other), p = typeof h == "function" ? h() : h;
      return I(I({}, p), {
        appear: t.keyPath.length <= 1
      });
    });
    return () => {
      var f;
      return l.value ? null : M(R1, {
        mode: r.value
      }, {
        default: () => [M(co, c.value, {
          default: () => [bi(M(oD, {
            id: t.id
          }, {
            default: () => [(f = n.default) === null || f === void 0 ? void 0 : f.call(n)]
          }), [[Bs, u.value]])]
        })]
      });
    };
  }
});
let p5 = 0;
const oOe = () => ({
  icon: Y.any,
  title: Y.any,
  disabled: Boolean,
  level: Number,
  popupClassName: String,
  popupOffset: Array,
  internalPopupClose: Boolean,
  eventKey: String,
  expandIcon: Function,
  theme: String,
  onMouseenter: Function,
  onMouseleave: Function,
  onTitleClick: Function,
  // Internal user prop
  originItemValue: $t()
}), Ph = te({
  compatConfig: {
    MODE: 3
  },
  name: "ASubMenu",
  inheritAttrs: !1,
  props: oOe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i
    } = e;
    var a, o;
    ZU(!1);
    const s = aD(), l = vn(), u = typeof l.vnode.key == "symbol" ? String(l.vnode.key) : l.vnode.key;
    Qi(typeof l.vnode.key != "symbol", "SubMenu", `SubMenu \`:key="${String(u)}"\` not support Symbol type`);
    const c = r2(u) ? u : `sub_menu_${++p5}_$$_not_set_key`, f = (a = t.eventKey) !== null && a !== void 0 ? a : r2(u) ? `sub_menu_${++p5}_$$_${u}` : c, {
      parentEventKeys: d,
      parentInfo: h,
      parentKeys: p
    } = iD(), v = L(() => [...p.value, c]), g = ae([]), m = {
      eventKey: f,
      key: c,
      parentEventKeys: d,
      childrenEventKeys: g,
      parentKeys: p
    };
    (o = h.childrenEventKeys) === null || o === void 0 || o.value.push(f), yt(() => {
      var he;
      h.childrenEventKeys && (h.childrenEventKeys.value = (he = h.childrenEventKeys) === null || he === void 0 ? void 0 : he.value.filter((Te) => Te != f));
    }), J1e(f, c, m);
    const {
      prefixCls: y,
      activeKeys: b,
      disabled: _,
      changeActiveKeys: O,
      mode: S,
      inlineCollapsed: x,
      openKeys: C,
      overflowDisabled: T,
      onOpenChange: w,
      registerMenuInfo: P,
      unRegisterMenuInfo: $,
      selectedSubMenuKeys: A,
      expandIcon: D,
      theme: E
    } = ol(), R = u != null, N = !s && (GU() || !R);
    U1e(N), (s && R || !s && !R || N) && (P(f, m), yt(() => {
      $(f);
    }));
    const V = L(() => `${y.value}-submenu`), z = L(() => _.value || t.disabled), W = ae(), F = ae(), Q = L(() => C.value.includes(c)), Z = L(() => !T.value && Q.value), ne = L(() => A.value.includes(c)), ee = ae(!1);
    se(b, () => {
      ee.value = !!b.value.find((he) => he === c);
    }, {
      immediate: !0
    });
    const oe = (he) => {
      z.value || (i("titleClick", he, c), S.value === "inline" && w(c, !Q.value));
    }, K = (he) => {
      z.value || (O(v.value), i("mouseenter", he));
    }, ie = (he) => {
      z.value || (O([]), i("mouseleave", he));
    }, X = YU(L(() => v.value.length)), H = (he) => {
      S.value !== "inline" && w(c, he);
    }, G = () => {
      O(v.value);
    }, re = f && `${f}-popup`, fe = L(() => ye(y.value, `${y.value}-${t.theme || E.value}`, t.popupClassName)), de = (he, Te) => {
      if (!Te)
        return x.value && !p.value.length && he && typeof he == "string" ? M("div", {
          class: `${y.value}-inline-collapsed-noicon`
        }, [he.charAt(0)]) : M("span", {
          class: `${y.value}-title-content`
        }, [he]);
      const ze = Ui(he) && he.type === "span";
      return M(wt, null, [Pn(typeof Te == "function" ? Te(t.originItemValue) : Te, {
        class: `${y.value}-item-icon`
      }, !1), ze ? he : M("span", {
        class: `${y.value}-title-content`
      }, [he])]);
    }, Ee = L(() => S.value !== "inline" && v.value.length > 1 ? "vertical" : S.value), $e = L(() => S.value === "horizontal" ? "vertical" : S.value), Se = L(() => Ee.value === "horizontal" ? "vertical" : Ee.value), be = () => {
      var he, Te;
      const ze = V.value, ut = (he = t.icon) !== null && he !== void 0 ? he : (Te = n.icon) === null || Te === void 0 ? void 0 : Te.call(n, t), ct = t.expandIcon || n.expandIcon || D.value, Dt = de(IS(n, t, "title"), ut);
      return M("div", {
        style: X.value,
        class: `${ze}-title`,
        tabindex: z.value ? null : -1,
        ref: W,
        title: typeof Dt == "string" ? Dt : null,
        "data-menu-id": c,
        "aria-expanded": Z.value,
        "aria-haspopup": !0,
        "aria-controls": re,
        "aria-disabled": z.value,
        onClick: oe,
        onFocus: G
      }, [Dt, S.value !== "horizontal" && ct ? ct(I(I({}, t), {
        isOpen: Z.value
      })) : M("i", {
        class: `${ze}-arrow`
      }, null)]);
    };
    return () => {
      var he;
      if (s)
        return R ? (he = n.default) === null || he === void 0 ? void 0 : he.call(n) : null;
      const Te = V.value;
      let ze = () => null;
      if (!T.value && S.value !== "inline") {
        const ut = S.value === "horizontal" ? [0, 8] : [10, 0];
        ze = () => M(h5, {
          mode: Ee.value,
          prefixCls: Te,
          visible: !t.internalPopupClose && Z.value,
          popupClassName: fe.value,
          popupOffset: t.popupOffset || ut,
          disabled: z.value,
          onVisibleChange: H
        }, {
          default: () => [be()],
          popup: () => M(R1, {
            mode: Se.value
          }, {
            default: () => [M(oD, {
              id: re,
              ref: F
            }, {
              default: n.default
            })]
          })
        });
      } else
        ze = () => M(h5, null, {
          default: be
        });
      return M(R1, {
        mode: $e.value
      }, {
        default: () => [M(Ms.Item, j(j({
          component: "li"
        }, r), {}, {
          role: "none",
          class: ye(Te, `${Te}-${S.value}`, r.class, {
            [`${Te}-open`]: Z.value,
            [`${Te}-active`]: ee.value,
            [`${Te}-selected`]: ne.value,
            [`${Te}-disabled`]: z.value
          }),
          onMouseenter: K,
          onMouseleave: ie,
          "data-submenu-id": c
        }), {
          default: () => M(wt, null, [ze(), !T.value && M(aOe, {
            id: re,
            open: Z.value,
            keyPath: v.value
          }, {
            default: n.default
          })])
        })]
      });
    };
  }
});
function qU(t, e) {
  return t.classList ? t.classList.contains(e) : ` ${t.className} `.indexOf(` ${e} `) > -1;
}
function v5(t, e) {
  t.classList ? t.classList.add(e) : qU(t, e) || (t.className = `${t.className} ${e}`);
}
function g5(t, e) {
  if (t.classList)
    t.classList.remove(e);
  else if (qU(t, e)) {
    const n = t.className;
    t.className = ` ${n} `.replace(` ${e} `, " ");
  }
}
const sD = function() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return {
    name: t,
    appear: e,
    css: !0,
    onBeforeEnter: (n) => {
      n.style.height = "0px", n.style.opacity = "0", v5(n, t);
    },
    onEnter: (n) => {
      Tt(() => {
        n.style.height = `${n.scrollHeight}px`, n.style.opacity = "1";
      });
    },
    onAfterEnter: (n) => {
      n && (g5(n, t), n.style.height = null, n.style.opacity = null);
    },
    onBeforeLeave: (n) => {
      v5(n, t), n.style.height = `${n.offsetHeight}px`, n.style.opacity = null;
    },
    onLeave: (n) => {
      setTimeout(() => {
        n.style.height = "0px", n.style.opacity = "0";
      });
    },
    onAfterLeave: (n) => {
      n && (g5(n, t), n.style && (n.style.height = null, n.style.opacity = null));
    }
  };
}, sOe = () => ({
  title: Y.any,
  // Internal user prop
  originItemValue: $t()
}), k1 = te({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuItemGroup",
  inheritAttrs: !1,
  props: sOe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i
    } = ol(), a = L(() => `${i.value}-item-group`), o = aD();
    return () => {
      var s, l;
      return o ? (s = n.default) === null || s === void 0 ? void 0 : s.call(n) : M("li", j(j({}, r), {}, {
        onClick: (u) => u.stopPropagation(),
        class: a.value
      }), [M("div", {
        title: typeof t.title == "string" ? t.title : void 0,
        class: `${a.value}-title`
      }, [IS(n, t, "title")]), M("ul", {
        class: `${a.value}-list`
      }, [(l = n.default) === null || l === void 0 ? void 0 : l.call(n)])]);
    };
  }
}), lOe = () => ({
  prefixCls: String,
  dashed: Boolean
}), L1 = te({
  compatConfig: {
    MODE: 3
  },
  name: "AMenuDivider",
  props: lOe(),
  setup(t) {
    const {
      prefixCls: e
    } = ol(), n = L(() => ({
      [`${e.value}-item-divider`]: !0,
      [`${e.value}-item-divider-dashed`]: !!t.dashed
    }));
    return () => M("li", {
      class: n.value
    }, null);
  }
});
var uOe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function N2(t, e, n) {
  return (t || []).map((r, i) => {
    if (r && typeof r == "object") {
      const a = r, {
        label: o,
        children: s,
        key: l,
        type: u
      } = a, c = uOe(a, ["label", "children", "key", "type"]), f = l ?? `tmp-${i}`, d = n ? n.parentKeys.slice() : [], h = [], p = {
        eventKey: f,
        key: f,
        parentEventKeys: U(d),
        parentKeys: U(d),
        childrenEventKeys: U(h),
        isLeaf: !1
      };
      if (s || u === "group") {
        if (u === "group") {
          const g = N2(s, e, n);
          return M(k1, j(j({
            key: f
          }, c), {}, {
            title: o,
            originItemValue: r
          }), {
            default: () => [g]
          });
        }
        e.set(f, p), n && n.childrenEventKeys.push(f);
        const v = N2(s, e, {
          childrenEventKeys: h,
          parentKeys: [].concat(d, f)
        });
        return M(Ph, j(j({
          key: f
        }, c), {}, {
          title: o,
          originItemValue: r
        }), {
          default: () => [v]
        });
      }
      return u === "divider" ? M(L1, j({
        key: f
      }, c), null) : (p.isLeaf = !0, e.set(f, p), M(Th, j(j({
        key: f
      }, c), {}, {
        originItemValue: r
      }), {
        default: () => [o]
      }));
    }
    return null;
  }).filter((r) => r);
}
function cOe(t) {
  const e = ae([]), n = ae(!1), r = ae(/* @__PURE__ */ new Map());
  return se(() => t.items, () => {
    const i = /* @__PURE__ */ new Map();
    n.value = !1, t.items ? (n.value = !0, e.value = N2(t.items, i)) : e.value = void 0, r.value = i;
  }, {
    immediate: !0,
    deep: !0
  }), {
    itemsNodes: e,
    store: r,
    hasItmes: n
  };
}
const fOe = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n,
    menuHorizontalHeight: r,
    colorSplit: i,
    lineWidth: a,
    lineType: o,
    menuItemPaddingInline: s
  } = t;
  return {
    [`${e}-horizontal`]: {
      lineHeight: `${r}px`,
      border: 0,
      borderBottom: `${a}px ${o} ${i}`,
      boxShadow: "none",
      "&::after": {
        display: "block",
        clear: "both",
        height: 0,
        content: '"\\20"'
      },
      // ======================= Item =======================
      [`${e}-item, ${e}-submenu`]: {
        position: "relative",
        display: "inline-block",
        verticalAlign: "bottom",
        paddingInline: s
      },
      [`> ${e}-item:hover,
        > ${e}-item-active,
        > ${e}-submenu ${e}-submenu-title:hover`]: {
        backgroundColor: "transparent"
      },
      [`${e}-item, ${e}-submenu-title`]: {
        transition: [`border-color ${n}`, `background ${n}`].join(",")
      },
      // ===================== Sub Menu =====================
      [`${e}-submenu-arrow`]: {
        display: "none"
      }
    }
  };
}, dOe = (t) => {
  let {
    componentCls: e,
    menuArrowOffset: n
  } = t;
  return {
    [`${e}-rtl`]: {
      direction: "rtl"
    },
    [`${e}-submenu-rtl`]: {
      transformOrigin: "100% 0"
    },
    // Vertical Arrow
    [`${e}-rtl${e}-vertical,
    ${e}-submenu-rtl ${e}-vertical`]: {
      [`${e}-submenu-arrow`]: {
        "&::before": {
          transform: `rotate(-45deg) translateY(-${n})`
        },
        "&::after": {
          transform: `rotate(45deg) translateY(${n})`
        }
      }
    }
  };
}, m5 = (t) => I({}, d0(t)), y5 = (t, e) => {
  const {
    componentCls: n,
    colorItemText: r,
    colorItemTextSelected: i,
    colorGroupTitle: a,
    colorItemBg: o,
    colorSubItemBg: s,
    colorItemBgSelected: l,
    colorActiveBarHeight: u,
    colorActiveBarWidth: c,
    colorActiveBarBorderSize: f,
    motionDurationSlow: d,
    motionEaseInOut: h,
    motionEaseOut: p,
    menuItemPaddingInline: v,
    motionDurationMid: g,
    colorItemTextHover: m,
    lineType: y,
    colorSplit: b,
    // Disabled
    colorItemTextDisabled: _,
    // Danger
    colorDangerItemText: O,
    colorDangerItemTextHover: S,
    colorDangerItemTextSelected: x,
    colorDangerItemBgActive: C,
    colorDangerItemBgSelected: T,
    colorItemBgHover: w,
    menuSubMenuBg: P,
    // Horizontal
    colorItemTextSelectedHorizontal: $,
    colorItemBgSelectedHorizontal: A
  } = t;
  return {
    [`${n}-${e}`]: {
      color: r,
      background: o,
      [`&${n}-root:focus-visible`]: I({}, m5(t)),
      // ======================== Item ========================
      [`${n}-item-group-title`]: {
        color: a
      },
      [`${n}-submenu-selected`]: {
        [`> ${n}-submenu-title`]: {
          color: i
        }
      },
      // Disabled
      [`${n}-item-disabled, ${n}-submenu-disabled`]: {
        color: `${_} !important`
      },
      // Hover
      [`${n}-item:hover, ${n}-submenu-title:hover`]: {
        [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
          color: m
        }
      },
      [`&:not(${n}-horizontal)`]: {
        [`${n}-item:not(${n}-item-selected)`]: {
          "&:hover": {
            backgroundColor: w
          },
          "&:active": {
            backgroundColor: l
          }
        },
        [`${n}-submenu-title`]: {
          "&:hover": {
            backgroundColor: w
          },
          "&:active": {
            backgroundColor: l
          }
        }
      },
      // Danger - only Item has
      [`${n}-item-danger`]: {
        color: O,
        [`&${n}-item:hover`]: {
          [`&:not(${n}-item-selected):not(${n}-submenu-selected)`]: {
            color: S
          }
        },
        [`&${n}-item:active`]: {
          background: C
        }
      },
      [`${n}-item a`]: {
        "&, &:hover": {
          color: "inherit"
        }
      },
      [`${n}-item-selected`]: {
        color: i,
        // Danger
        [`&${n}-item-danger`]: {
          color: x
        },
        "a, a:hover": {
          color: "inherit"
        }
      },
      [`& ${n}-item-selected`]: {
        backgroundColor: l,
        // Danger
        [`&${n}-item-danger`]: {
          backgroundColor: T
        }
      },
      [`${n}-item, ${n}-submenu-title`]: {
        [`&:not(${n}-item-disabled):focus-visible`]: I({}, m5(t))
      },
      [`&${n}-submenu > ${n}`]: {
        backgroundColor: P
      },
      [`&${n}-popup > ${n}`]: {
        backgroundColor: o
      },
      // ====================== Horizontal ======================
      [`&${n}-horizontal`]: I(I({}, e === "dark" ? {
        borderBottom: 0
      } : {}), {
        [`> ${n}-item, > ${n}-submenu`]: {
          top: f,
          marginTop: -f,
          marginBottom: 0,
          borderRadius: 0,
          "&::after": {
            position: "absolute",
            insetInline: v,
            bottom: 0,
            borderBottom: `${u}px solid transparent`,
            transition: `border-color ${d} ${h}`,
            content: '""'
          },
          "&:hover, &-active, &-open": {
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: $
            }
          },
          "&-selected": {
            color: $,
            backgroundColor: A,
            "&::after": {
              borderBottomWidth: u,
              borderBottomColor: $
            }
          }
        }
      }),
      // ================== Inline & Vertical ===================
      //
      [`&${n}-root`]: {
        [`&${n}-inline, &${n}-vertical`]: {
          borderInlineEnd: `${f}px ${y} ${b}`
        }
      },
      // ======================== Inline ========================
      [`&${n}-inline`]: {
        // Sub
        [`${n}-sub${n}-inline`]: {
          background: s
        },
        // Item
        [`${n}-item, ${n}-submenu-title`]: f && c ? {
          width: `calc(100% + ${f}px)`
        } : {},
        [`${n}-item`]: {
          position: "relative",
          "&::after": {
            position: "absolute",
            insetBlock: 0,
            insetInlineEnd: 0,
            borderInlineEnd: `${c}px solid ${i}`,
            transform: "scaleY(0.0001)",
            opacity: 0,
            transition: [`transform ${g} ${p}`, `opacity ${g} ${p}`].join(","),
            content: '""'
          },
          // Danger
          [`&${n}-item-danger`]: {
            "&::after": {
              borderInlineEndColor: x
            }
          }
        },
        [`${n}-selected, ${n}-item-selected`]: {
          "&::after": {
            transform: "scaleY(1)",
            opacity: 1,
            transition: [`transform ${g} ${h}`, `opacity ${g} ${h}`].join(",")
          }
        }
      }
    }
  };
}, b5 = (t) => {
  const {
    componentCls: e,
    menuItemHeight: n,
    itemMarginInline: r,
    padding: i,
    menuArrowSize: a,
    marginXS: o,
    marginXXS: s
  } = t, l = i + a + o;
  return {
    [`${e}-item`]: {
      position: "relative"
    },
    [`${e}-item, ${e}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`,
      paddingInline: i,
      overflow: "hidden",
      textOverflow: "ellipsis",
      marginInline: r,
      marginBlock: s,
      width: `calc(100% - ${r * 2}px)`
    },
    // disable margin collapsed
    [`${e}-submenu`]: {
      paddingBottom: 0.02
    },
    [`> ${e}-item,
            > ${e}-submenu > ${e}-submenu-title`]: {
      height: n,
      lineHeight: `${n}px`
    },
    [`${e}-item-group-list ${e}-submenu-title,
            ${e}-submenu-title`]: {
      paddingInlineEnd: l
    }
  };
}, hOe = (t) => {
  const {
    componentCls: e,
    iconCls: n,
    menuItemHeight: r,
    colorTextLightSolid: i,
    dropdownWidth: a,
    controlHeightLG: o,
    motionDurationMid: s,
    motionEaseOut: l,
    paddingXL: u,
    fontSizeSM: c,
    fontSizeLG: f,
    motionDurationSlow: d,
    paddingXS: h,
    boxShadowSecondary: p
  } = t, v = {
    height: r,
    lineHeight: `${r}px`,
    listStylePosition: "inside",
    listStyleType: "disc"
  };
  return [
    {
      [e]: {
        "&-inline, &-vertical": I({
          [`&${e}-root`]: {
            boxShadow: "none"
          }
        }, b5(t))
      },
      [`${e}-submenu-popup`]: {
        [`${e}-vertical`]: I(I({}, b5(t)), {
          boxShadow: p
        })
      }
    },
    // Vertical only
    {
      [`${e}-submenu-popup ${e}-vertical${e}-sub`]: {
        minWidth: a,
        maxHeight: `calc(100vh - ${o * 2.5}px)`,
        padding: "0",
        overflow: "hidden",
        borderInlineEnd: 0,
        // https://github.com/ant-design/ant-design/issues/22244
        // https://github.com/ant-design/ant-design/issues/26812
        "&:not([class*='-active'])": {
          overflowX: "hidden",
          overflowY: "auto"
        }
      }
    },
    // Inline Only
    {
      [`${e}-inline`]: {
        width: "100%",
        // Motion enhance for first level
        [`&${e}-root`]: {
          [`${e}-item, ${e}-submenu-title`]: {
            display: "flex",
            alignItems: "center",
            transition: [`border-color ${d}`, `background ${d}`, `padding ${s} ${l}`].join(","),
            [`> ${e}-title-content`]: {
              flex: "auto",
              minWidth: 0,
              overflow: "hidden",
              textOverflow: "ellipsis"
            },
            "> *": {
              flex: "none"
            }
          }
        },
        // >>>>> Sub
        [`${e}-sub${e}-inline`]: {
          padding: 0,
          border: 0,
          borderRadius: 0,
          boxShadow: "none",
          [`& > ${e}-submenu > ${e}-submenu-title`]: v,
          [`& ${e}-item-group-title`]: {
            paddingInlineStart: u
          }
        },
        // >>>>> Item
        [`${e}-item`]: v
      }
    },
    // Inline Collapse Only
    {
      [`${e}-inline-collapsed`]: {
        width: r * 2,
        [`&${e}-root`]: {
          [`${e}-item, ${e}-submenu ${e}-submenu-title`]: {
            [`> ${e}-inline-collapsed-noicon`]: {
              fontSize: f,
              textAlign: "center"
            }
          }
        },
        [`> ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
          > ${e}-submenu > ${e}-submenu-title`]: {
          insetInlineStart: 0,
          paddingInline: `calc(50% - ${c}px)`,
          textOverflow: "clip",
          [`
            ${e}-submenu-arrow,
            ${e}-submenu-expand-icon
          `]: {
            opacity: 0
          },
          [`${e}-item-icon, ${n}`]: {
            margin: 0,
            fontSize: f,
            lineHeight: `${r}px`,
            "+ span": {
              display: "inline-block",
              opacity: 0
            }
          }
        },
        [`${e}-item-icon, ${n}`]: {
          display: "inline-block"
        },
        "&-tooltip": {
          pointerEvents: "none",
          [`${e}-item-icon, ${n}`]: {
            display: "none"
          },
          "a, a:hover": {
            color: i
          }
        },
        [`${e}-item-group-title`]: I(I({}, mh), {
          paddingInline: h
        })
      }
    }
  ];
}, _5 = (t) => {
  const {
    componentCls: e,
    fontSize: n,
    motionDurationSlow: r,
    motionDurationMid: i,
    motionEaseInOut: a,
    motionEaseOut: o,
    iconCls: s,
    controlHeightSM: l
  } = t;
  return {
    // >>>>> Item
    [`${e}-item, ${e}-submenu-title`]: {
      position: "relative",
      display: "block",
      margin: 0,
      whiteSpace: "nowrap",
      cursor: "pointer",
      transition: [`border-color ${r}`, `background ${r}`, `padding ${r} ${a}`].join(","),
      [`${e}-item-icon, ${s}`]: {
        minWidth: n,
        fontSize: n,
        transition: [`font-size ${i} ${o}`, `margin ${r} ${a}`, `color ${r}`].join(","),
        "+ span": {
          marginInlineStart: l - n,
          opacity: 1,
          transition: [`opacity ${r} ${a}`, `margin ${r}`, `color ${r}`].join(",")
        }
      },
      [`${e}-item-icon`]: I({}, ip()),
      [`&${e}-item-only-child`]: {
        [`> ${s}, > ${e}-item-icon`]: {
          marginInlineEnd: 0
        }
      }
    },
    // Disabled state sets text to gray and nukes hover/tab effects
    [`${e}-item-disabled, ${e}-submenu-disabled`]: {
      background: "none !important",
      cursor: "not-allowed",
      "&::after": {
        borderColor: "transparent !important"
      },
      a: {
        color: "inherit !important"
      },
      [`> ${e}-submenu-title`]: {
        color: "inherit !important",
        cursor: "not-allowed"
      }
    }
  };
}, O5 = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n,
    motionEaseInOut: r,
    borderRadius: i,
    menuArrowSize: a,
    menuArrowOffset: o
  } = t;
  return {
    [`${e}-submenu`]: {
      "&-expand-icon, &-arrow": {
        position: "absolute",
        top: "50%",
        insetInlineEnd: t.margin,
        width: a,
        color: "currentcolor",
        transform: "translateY(-50%)",
        transition: `transform ${n} ${r}, opacity ${n}`
      },
      "&-arrow": {
        // →
        "&::before, &::after": {
          position: "absolute",
          width: a * 0.6,
          height: a * 0.15,
          backgroundColor: "currentcolor",
          borderRadius: i,
          transition: [`background ${n} ${r}`, `transform ${n} ${r}`, `top ${n} ${r}`, `color ${n} ${r}`].join(","),
          content: '""'
        },
        "&::before": {
          transform: `rotate(45deg) translateY(-${o})`
        },
        "&::after": {
          transform: `rotate(-45deg) translateY(${o})`
        }
      }
    }
  };
}, pOe = (t) => {
  const {
    antCls: e,
    componentCls: n,
    fontSize: r,
    motionDurationSlow: i,
    motionDurationMid: a,
    motionEaseInOut: o,
    lineHeight: s,
    paddingXS: l,
    padding: u,
    colorSplit: c,
    lineWidth: f,
    zIndexPopup: d,
    borderRadiusLG: h,
    radiusSubMenuItem: p,
    menuArrowSize: v,
    menuArrowOffset: g,
    lineType: m,
    menuPanelMaskInset: y
  } = t;
  return [
    // Misc
    {
      "": {
        [`${n}`]: I(I({}, _1()), {
          // Hidden
          "&-hidden": {
            display: "none"
          }
        })
      },
      [`${n}-submenu-hidden`]: {
        display: "none"
      }
    },
    {
      [n]: I(I(I(I(I(I(I({}, nn(t)), _1()), {
        marginBottom: 0,
        paddingInlineStart: 0,
        // Override default ul/ol
        fontSize: r,
        lineHeight: 0,
        listStyle: "none",
        outline: "none",
        transition: `width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,
        "ul, ol": {
          margin: 0,
          padding: 0,
          listStyle: "none"
        },
        // Overflow ellipsis
        "&-overflow": {
          display: "flex",
          [`${n}-item`]: {
            flex: "none"
          }
        },
        [`${n}-item, ${n}-submenu, ${n}-submenu-title`]: {
          borderRadius: t.radiusItem
        },
        [`${n}-item-group-title`]: {
          padding: `${l}px ${u}px`,
          fontSize: r,
          lineHeight: s,
          transition: `all ${i}`
        },
        [`&-horizontal ${n}-submenu`]: {
          transition: [`border-color ${i} ${o}`, `background ${i} ${o}`].join(",")
        },
        [`${n}-submenu, ${n}-submenu-inline`]: {
          transition: [`border-color ${i} ${o}`, `background ${i} ${o}`, `padding ${a} ${o}`].join(",")
        },
        [`${n}-submenu ${n}-sub`]: {
          cursor: "initial",
          transition: [`background ${i} ${o}`, `padding ${i} ${o}`].join(",")
        },
        [`${n}-title-content`]: {
          transition: `color ${i}`
        },
        [`${n}-item a`]: {
          "&::before": {
            position: "absolute",
            inset: 0,
            backgroundColor: "transparent",
            content: '""'
          }
        },
        // Removed a Badge related style seems it's safe
        // https://github.com/ant-design/ant-design/issues/19809
        // >>>>> Divider
        [`${n}-item-divider`]: {
          overflow: "hidden",
          lineHeight: 0,
          borderColor: c,
          borderStyle: m,
          borderWidth: 0,
          borderTopWidth: f,
          marginBlock: f,
          padding: 0,
          "&-dashed": {
            borderStyle: "dashed"
          }
        }
      }), _5(t)), {
        [`${n}-item-group`]: {
          [`${n}-item-group-list`]: {
            margin: 0,
            padding: 0,
            [`${n}-item, ${n}-submenu-title`]: {
              paddingInline: `${r * 2}px ${u}px`
            }
          }
        },
        // ======================= Sub Menu =======================
        "&-submenu": {
          "&-popup": {
            position: "absolute",
            zIndex: d,
            background: "transparent",
            borderRadius: h,
            boxShadow: "none",
            transformOrigin: "0 0",
            // https://github.com/ant-design/ant-design/issues/13955
            "&::before": {
              position: "absolute",
              inset: `${y}px 0 0`,
              zIndex: -1,
              width: "100%",
              height: "100%",
              opacity: 0,
              content: '""'
            }
          },
          // https://github.com/ant-design/ant-design/issues/13955
          "&-placement-rightTop::before": {
            top: 0,
            insetInlineStart: y
          },
          [`> ${n}`]: I(I(I({
            borderRadius: h
          }, _5(t)), O5(t)), {
            [`${n}-item, ${n}-submenu > ${n}-submenu-title`]: {
              borderRadius: p
            },
            [`${n}-submenu-title::after`]: {
              transition: `transform ${i} ${o}`
            }
          })
        }
      }), O5(t)), {
        [`&-inline-collapsed ${n}-submenu-arrow,
        &-inline ${n}-submenu-arrow`]: {
          // ↓
          "&::before": {
            transform: `rotate(-45deg) translateX(${g})`
          },
          "&::after": {
            transform: `rotate(45deg) translateX(-${g})`
          }
        },
        [`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]: {
          // ↑
          transform: `translateY(-${v * 0.2}px)`,
          "&::after": {
            transform: `rotate(-45deg) translateX(-${g})`
          },
          "&::before": {
            transform: `rotate(45deg) translateX(${g})`
          }
        }
      })
    },
    // Integration with header element so menu items have the same height
    {
      [`${e}-layout-header`]: {
        [n]: {
          lineHeight: "inherit"
        }
      }
    }
  ];
}, vOe = (t, e) => Sn("Menu", (r, i) => {
  let {
    overrideComponentToken: a
  } = i;
  if ((e == null ? void 0 : e.value) === !1)
    return [];
  const {
    colorBgElevated: o,
    colorPrimary: s,
    colorError: l,
    colorErrorHover: u,
    colorTextLightSolid: c
  } = r, {
    controlHeightLG: f,
    fontSize: d
  } = r, h = d / 7 * 5, p = Bt(r, {
    menuItemHeight: f,
    menuItemPaddingInline: r.margin,
    menuArrowSize: h,
    menuHorizontalHeight: f * 1.15,
    menuArrowOffset: `${h * 0.25}px`,
    menuPanelMaskInset: -7,
    menuSubMenuBg: o
  }), v = new en(c).setAlpha(0.65).toRgbString(), g = Bt(p, {
    colorItemText: v,
    colorItemTextHover: c,
    colorGroupTitle: v,
    colorItemTextSelected: c,
    colorItemBg: "#001529",
    colorSubItemBg: "#000c17",
    colorItemBgActive: "transparent",
    colorItemBgSelected: s,
    colorActiveBarWidth: 0,
    colorActiveBarHeight: 0,
    colorActiveBarBorderSize: 0,
    // Disabled
    colorItemTextDisabled: new en(c).setAlpha(0.25).toRgbString(),
    // Danger
    colorDangerItemText: l,
    colorDangerItemTextHover: u,
    colorDangerItemTextSelected: c,
    colorDangerItemBgActive: l,
    colorDangerItemBgSelected: l,
    menuSubMenuBg: "#001529",
    // Horizontal
    colorItemTextSelectedHorizontal: c,
    colorItemBgSelectedHorizontal: s
  }, I({}, a));
  return [
    // Basic
    pOe(p),
    // Horizontal
    fOe(p),
    // Vertical
    hOe(p),
    // Theme
    y5(p, "light"),
    y5(g, "dark"),
    // RTL
    dOe(p),
    // Motion
    KI(p),
    Ch(p, "slide-up"),
    Ch(p, "slide-down"),
    ux(p, "zoom-big")
  ];
}, (r) => {
  const {
    colorPrimary: i,
    colorError: a,
    colorTextDisabled: o,
    colorErrorBg: s,
    colorText: l,
    colorTextDescription: u,
    colorBgContainer: c,
    colorFillAlter: f,
    colorFillContent: d,
    lineWidth: h,
    lineWidthBold: p,
    controlItemBgActive: v,
    colorBgTextHover: g
  } = r;
  return {
    dropdownWidth: 160,
    zIndexPopup: r.zIndexPopupBase + 50,
    radiusItem: r.borderRadiusLG,
    radiusSubMenuItem: r.borderRadiusSM,
    colorItemText: l,
    colorItemTextHover: l,
    colorItemTextHoverHorizontal: i,
    colorGroupTitle: u,
    colorItemTextSelected: i,
    colorItemTextSelectedHorizontal: i,
    colorItemBg: c,
    colorItemBgHover: g,
    colorItemBgActive: d,
    colorSubItemBg: f,
    colorItemBgSelected: v,
    colorItemBgSelectedHorizontal: "transparent",
    colorActiveBarWidth: 0,
    colorActiveBarHeight: p,
    colorActiveBarBorderSize: h,
    // Disabled
    colorItemTextDisabled: o,
    // Danger
    colorDangerItemText: a,
    colorDangerItemTextHover: a,
    colorDangerItemTextSelected: a,
    colorDangerItemBgActive: s,
    colorDangerItemBgSelected: s,
    itemMarginInline: r.marginXXS
  };
})(t), gOe = () => ({
  id: String,
  prefixCls: String,
  // donot use items, now only support inner use
  items: Array,
  disabled: Boolean,
  inlineCollapsed: Boolean,
  disabledOverflow: Boolean,
  forceSubMenuRender: Boolean,
  openKeys: Array,
  selectedKeys: Array,
  activeKey: String,
  selectable: {
    type: Boolean,
    default: !0
  },
  multiple: {
    type: Boolean,
    default: !1
  },
  tabindex: {
    type: [Number, String]
  },
  motion: Object,
  role: String,
  theme: {
    type: String,
    default: "light"
  },
  mode: {
    type: String,
    default: "vertical"
  },
  inlineIndent: {
    type: Number,
    default: 24
  },
  subMenuOpenDelay: {
    type: Number,
    default: 0
  },
  subMenuCloseDelay: {
    type: Number,
    default: 0.1
  },
  builtinPlacements: {
    type: Object
  },
  triggerSubMenuAction: {
    type: String,
    default: "hover"
  },
  getPopupContainer: Function,
  expandIcon: Function,
  onOpenChange: Function,
  onSelect: Function,
  onDeselect: Function,
  onClick: [Function, Array],
  onFocus: Function,
  onBlur: Function,
  onMousedown: Function,
  "onUpdate:openKeys": Function,
  "onUpdate:selectedKeys": Function,
  "onUpdate:activeKey": Function
}), S5 = [], jl = te({
  compatConfig: {
    MODE: 3
  },
  name: "AMenu",
  inheritAttrs: !1,
  props: gOe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const {
      direction: a,
      getPrefixCls: o
    } = It("menu", t), s = FU(), l = L(() => {
      var K;
      return o("menu", t.prefixCls || ((K = s == null ? void 0 : s.prefixCls) === null || K === void 0 ? void 0 : K.value));
    }), [u, c] = vOe(l, L(() => !s)), f = ae(/* @__PURE__ */ new Map()), d = Ge(q1e, U(void 0)), h = L(() => d.value !== void 0 ? d.value : t.inlineCollapsed), {
      itemsNodes: p
    } = cOe(t), v = ae(!1);
    it(() => {
      v.value = !0;
    }), ht(() => {
      Qi(!(t.inlineCollapsed === !0 && t.mode !== "inline"), "Menu", "`inlineCollapsed` should only be used when `mode` is inline."), Qi(!(d.value !== void 0 && t.inlineCollapsed === !0), "Menu", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.");
    });
    const g = U([]), m = U([]), y = U({});
    se(f, () => {
      const K = {};
      for (const ie of f.value.values())
        K[ie.key] = ie;
      y.value = K;
    }, {
      flush: "post"
    }), ht(() => {
      if (t.activeKey !== void 0) {
        let K = [];
        const ie = t.activeKey ? y.value[t.activeKey] : void 0;
        ie && t.activeKey !== void 0 ? K = yC([].concat(B(ie.parentKeys), t.activeKey)) : K = [], Zp(g.value, K) || (g.value = K);
      }
    }), se(() => t.selectedKeys, (K) => {
      K && (m.value = K.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    const b = U([]);
    se([y, m], () => {
      let K = [];
      m.value.forEach((ie) => {
        const X = y.value[ie];
        X && (K = K.concat(B(X.parentKeys)));
      }), K = yC(K), Zp(b.value, K) || (b.value = K);
    }, {
      immediate: !0
    });
    const _ = (K) => {
      if (t.selectable) {
        const {
          key: ie
        } = K, X = m.value.includes(ie);
        let H;
        t.multiple ? X ? H = m.value.filter((re) => re !== ie) : H = [...m.value, ie] : H = [ie];
        const G = I(I({}, K), {
          selectedKeys: H
        });
        Zp(H, m.value) || (t.selectedKeys === void 0 && (m.value = H), r("update:selectedKeys", H), X && t.multiple ? r("deselect", G) : r("select", G));
      }
      w.value !== "inline" && !t.multiple && O.value.length && A(S5);
    }, O = U([]);
    se(() => t.openKeys, function() {
      let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : O.value;
      Zp(O.value, K) || (O.value = K.slice());
    }, {
      immediate: !0,
      deep: !0
    });
    let S;
    const x = (K) => {
      clearTimeout(S), S = setTimeout(() => {
        t.activeKey === void 0 && (g.value = K), r("update:activeKey", K[K.length - 1]);
      });
    }, C = L(() => !!t.disabled), T = L(() => a.value === "rtl"), w = U("vertical"), P = ae(!1);
    ht(() => {
      var K;
      (t.mode === "inline" || t.mode === "vertical") && h.value ? (w.value = "vertical", P.value = h.value) : (w.value = t.mode, P.value = !1), !((K = s == null ? void 0 : s.mode) === null || K === void 0) && K.value && (w.value = s.mode.value);
    });
    const $ = L(() => w.value === "inline"), A = (K) => {
      O.value = K, r("update:openKeys", K), r("openChange", K);
    }, D = U(O.value), E = ae(!1);
    se(O, () => {
      $.value && (D.value = O.value);
    }, {
      immediate: !0
    }), se($, () => {
      if (!E.value) {
        E.value = !0;
        return;
      }
      $.value ? O.value = D.value : A(S5);
    }, {
      immediate: !0
    });
    const R = L(() => ({
      [`${l.value}`]: !0,
      [`${l.value}-root`]: !0,
      [`${l.value}-${w.value}`]: !0,
      [`${l.value}-inline-collapsed`]: P.value,
      [`${l.value}-rtl`]: T.value,
      [`${l.value}-${t.theme}`]: !0
    })), N = L(() => o()), V = L(() => ({
      horizontal: {
        name: `${N.value}-slide-up`
      },
      inline: sD(`${N.value}-motion-collapse`),
      other: {
        name: `${N.value}-zoom-big`
      }
    }));
    ZU(!0);
    const z = function() {
      let K = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const ie = [], X = f.value;
      return K.forEach((H) => {
        const {
          key: G,
          childrenEventKeys: re
        } = X.get(H);
        ie.push(G, ...z(B(re)));
      }), ie;
    }, W = (K) => {
      var ie;
      r("click", K), _(K), (ie = s == null ? void 0 : s.onClick) === null || ie === void 0 || ie.call(s);
    }, F = (K, ie) => {
      var X;
      const H = ((X = y.value[K]) === null || X === void 0 ? void 0 : X.childrenEventKeys) || [];
      let G = O.value.filter((re) => re !== K);
      if (ie)
        G.push(K);
      else if (w.value !== "inline") {
        const re = z(B(H));
        G = yC(G.filter((fe) => !re.includes(fe)));
      }
      Zp(O, G) || A(G);
    }, Q = (K, ie) => {
      f.value.set(K, ie), f.value = new Map(f.value);
    }, Z = (K) => {
      f.value.delete(K), f.value = new Map(f.value);
    }, ne = U(0), ee = L(() => {
      var K;
      return t.expandIcon || n.expandIcon || !((K = s == null ? void 0 : s.expandIcon) === null || K === void 0) && K.value ? (ie) => {
        let X = t.expandIcon || n.expandIcon;
        return X = typeof X == "function" ? X(ie) : X, Pn(X, {
          class: `${l.value}-submenu-expand-icon`
        }, !1);
      } : null;
    });
    Y1e({
      prefixCls: l,
      activeKeys: g,
      openKeys: O,
      selectedKeys: m,
      changeActiveKeys: x,
      disabled: C,
      rtl: T,
      mode: w,
      inlineIndent: L(() => t.inlineIndent),
      subMenuCloseDelay: L(() => t.subMenuCloseDelay),
      subMenuOpenDelay: L(() => t.subMenuOpenDelay),
      builtinPlacements: L(() => t.builtinPlacements),
      triggerSubMenuAction: L(() => t.triggerSubMenuAction),
      getPopupContainer: L(() => t.getPopupContainer),
      inlineCollapsed: P,
      theme: L(() => t.theme),
      siderCollapsed: d,
      defaultMotions: L(() => v.value ? V.value : null),
      motion: L(() => v.value ? t.motion : null),
      overflowDisabled: ae(void 0),
      onOpenChange: F,
      onItemClick: W,
      registerMenuInfo: Q,
      unRegisterMenuInfo: Z,
      selectedSubMenuKeys: b,
      expandIcon: ee,
      forceSubMenuRender: L(() => t.forceSubMenuRender),
      rootClassName: c
    });
    const oe = () => {
      var K;
      return p.value || Yn((K = n.default) === null || K === void 0 ? void 0 : K.call(n));
    };
    return () => {
      var K;
      const ie = oe(), X = ne.value >= ie.length - 1 || w.value !== "horizontal" || t.disabledOverflow, H = (re) => w.value !== "horizontal" || t.disabledOverflow ? re : (
        // Need wrap for overflow dropdown that do not response for open
        re.map((fe, de) => (
          // Always wrap provider to avoid sub node re-mount
          M(R1, {
            key: fe.key,
            overflowDisabled: de > ne.value
          }, {
            default: () => fe
          })
        ))
      ), G = ((K = n.overflowedIndicator) === null || K === void 0 ? void 0 : K.call(n)) || M(hx, null, null);
      return u(M(Ms, j(j({}, i), {}, {
        onMousedown: t.onMousedown,
        prefixCls: `${l.value}-overflow`,
        component: "ul",
        itemComponent: Th,
        class: [R.value, i.class, c.value],
        role: "menu",
        id: t.id,
        data: H(ie),
        renderRawItem: (re) => re,
        renderRawRest: (re) => {
          const fe = re.length, de = fe ? ie.slice(-fe) : null;
          return M(wt, null, [M(Ph, {
            eventKey: My,
            key: My,
            title: G,
            disabled: X,
            internalPopupClose: fe === 0
          }, {
            default: () => de
          }), M(d5, null, {
            default: () => [M(Ph, {
              eventKey: My,
              key: My,
              title: G,
              disabled: X,
              internalPopupClose: fe === 0
            }, {
              default: () => de
            })]
          })]);
        },
        maxCount: w.value !== "horizontal" || t.disabledOverflow ? Ms.INVALIDATE : Ms.RESPONSIVE,
        ssr: "full",
        "data-menu-list": !0,
        onVisibleChange: (re) => {
          ne.value = re;
        }
      }), {
        default: () => [M(PS, {
          to: "body"
        }, {
          default: () => [M("div", {
            style: {
              display: "none"
            },
            "aria-hidden": !0
          }, [M(d5, null, {
            default: () => [H(oe())]
          })])]
        })]
      }));
    };
  }
});
jl.install = function(t) {
  return t.component(jl.name, jl), t.component(Th.name, Th), t.component(Ph.name, Ph), t.component(L1.name, L1), t.component(k1.name, k1), t;
};
jl.Item = Th;
jl.Divider = L1;
jl.SubMenu = Ph;
jl.ItemGroup = k1;
var Iy = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function vx(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var mOe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const yOe = {
  prefixCls: String,
  name: String,
  id: String,
  type: String,
  defaultChecked: {
    type: [Boolean, Number],
    default: void 0
  },
  checked: {
    type: [Boolean, Number],
    default: void 0
  },
  disabled: Boolean,
  tabindex: {
    type: [Number, String]
  },
  readonly: Boolean,
  autofocus: Boolean,
  value: Y.any,
  required: Boolean
}, KU = te({
  compatConfig: {
    MODE: 3
  },
  name: "Checkbox",
  inheritAttrs: !1,
  props: sr(yOe, {
    prefixCls: "rc-checkbox",
    type: "checkbox",
    defaultChecked: !1
  }),
  emits: ["click", "change"],
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e;
    const a = U(t.checked === void 0 ? t.defaultChecked : t.checked), o = U();
    se(() => t.checked, () => {
      a.value = t.checked;
    }), i({
      focus() {
        var c;
        (c = o.value) === null || c === void 0 || c.focus();
      },
      blur() {
        var c;
        (c = o.value) === null || c === void 0 || c.blur();
      }
    });
    const s = U(), l = (c) => {
      if (t.disabled)
        return;
      t.checked === void 0 && (a.value = c.target.checked), c.shiftKey = s.value;
      const f = {
        target: I(I({}, t), {
          checked: c.target.checked
        }),
        stopPropagation() {
          c.stopPropagation();
        },
        preventDefault() {
          c.preventDefault();
        },
        nativeEvent: c
      };
      t.checked !== void 0 && (o.value.checked = !!t.checked), r("change", f), s.value = !1;
    }, u = (c) => {
      r("click", c), s.value = c.shiftKey;
    };
    return () => {
      const {
        prefixCls: c,
        name: f,
        id: d,
        type: h,
        disabled: p,
        readonly: v,
        tabindex: g,
        autofocus: m,
        value: y,
        required: b
      } = t, _ = mOe(t, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]), {
        class: O,
        onFocus: S,
        onBlur: x,
        onKeydown: C,
        onKeypress: T,
        onKeyup: w
      } = n, P = I(I({}, _), n), $ = Object.keys(P).reduce((E, R) => ((R.startsWith("data-") || R.startsWith("aria-") || R === "role") && (E[R] = P[R]), E), {}), A = ye(c, O, {
        [`${c}-checked`]: a.value,
        [`${c}-disabled`]: p
      }), D = I(I({
        name: f,
        id: d,
        type: h,
        readonly: v,
        disabled: p,
        tabindex: g,
        class: `${c}-input`,
        checked: !!a.value,
        autofocus: m,
        value: y
      }, $), {
        onChange: l,
        onClick: u,
        onFocus: S,
        onBlur: x,
        onKeydown: C,
        onKeypress: T,
        onKeyup: w,
        required: b
      });
      return M("span", {
        class: A
      }, [M("input", j({
        ref: o
      }, D), null), M("span", {
        class: `${c}-inner`
      }, null)]);
    };
  }
}), JU = Symbol("radioGroupContextKey"), bOe = (t) => {
  pt(JU, t);
}, _Oe = () => Ge(JU, void 0), eX = Symbol("radioOptionTypeContextKey"), OOe = (t) => {
  pt(eX, t);
}, SOe = () => Ge(eX, void 0), xOe = new Ot("antRadioEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), wOe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-group`;
  return {
    [r]: I(I({}, nn(t)), {
      display: "inline-block",
      fontSize: 0,
      // RTL
      [`&${r}-rtl`]: {
        direction: "rtl"
      },
      [`${n}-badge ${n}-badge-count`]: {
        zIndex: 1
      },
      [`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]: {
        borderInlineStart: "none"
      }
    })
  };
}, COe = (t) => {
  const {
    componentCls: e,
    radioWrapperMarginRight: n,
    radioCheckedColor: r,
    radioSize: i,
    motionDurationSlow: a,
    motionDurationMid: o,
    motionEaseInOut: s,
    motionEaseInOutCirc: l,
    radioButtonBg: u,
    colorBorder: c,
    lineWidth: f,
    radioDotSize: d,
    colorBgContainerDisabled: h,
    colorTextDisabled: p,
    paddingXS: v,
    radioDotDisabledColor: g,
    lineType: m,
    radioDotDisabledSize: y,
    wireframe: b,
    colorWhite: _
  } = t, O = `${e}-inner`;
  return {
    [`${e}-wrapper`]: I(I({}, nn(t)), {
      position: "relative",
      display: "inline-flex",
      alignItems: "baseline",
      marginInlineStart: 0,
      marginInlineEnd: n,
      cursor: "pointer",
      // RTL
      [`&${e}-wrapper-rtl`]: {
        direction: "rtl"
      },
      "&-disabled": {
        cursor: "not-allowed",
        color: t.colorTextDisabled
      },
      "&::after": {
        display: "inline-block",
        width: 0,
        overflow: "hidden",
        content: '"\\a0"'
      },
      // hashId 在 wrapper 上，只能铺平
      [`${e}-checked::after`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        width: "100%",
        height: "100%",
        border: `${f}px ${m} ${r}`,
        borderRadius: "50%",
        visibility: "hidden",
        animationName: xOe,
        animationDuration: a,
        animationTimingFunction: s,
        animationFillMode: "both",
        content: '""'
      },
      [e]: I(I({}, nn(t)), {
        position: "relative",
        display: "inline-block",
        outline: "none",
        cursor: "pointer",
        alignSelf: "center"
      }),
      [`${e}-wrapper:hover &,
        &:hover ${O}`]: {
        borderColor: r
      },
      [`${e}-input:focus-visible + ${O}`]: I({}, d0(t)),
      [`${e}:hover::after, ${e}-wrapper:hover &::after`]: {
        visibility: "visible"
      },
      [`${e}-inner`]: {
        "&::after": {
          boxSizing: "border-box",
          position: "absolute",
          insetBlockStart: "50%",
          insetInlineStart: "50%",
          display: "block",
          width: i,
          height: i,
          marginBlockStart: i / -2,
          marginInlineStart: i / -2,
          backgroundColor: b ? r : _,
          borderBlockStart: 0,
          borderInlineStart: 0,
          borderRadius: i,
          transform: "scale(0)",
          opacity: 0,
          transition: `all ${a} ${l}`,
          content: '""'
        },
        boxSizing: "border-box",
        position: "relative",
        insetBlockStart: 0,
        insetInlineStart: 0,
        display: "block",
        width: i,
        height: i,
        backgroundColor: u,
        borderColor: c,
        borderStyle: "solid",
        borderWidth: f,
        borderRadius: "50%",
        transition: `all ${o}`
      },
      [`${e}-input`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        insetBlockEnd: 0,
        insetInlineStart: 0,
        zIndex: 1,
        cursor: "pointer",
        opacity: 0
      },
      // 选中状态
      [`${e}-checked`]: {
        [O]: {
          borderColor: r,
          backgroundColor: b ? u : r,
          "&::after": {
            transform: `scale(${d / i})`,
            opacity: 1,
            transition: `all ${a} ${l}`
          }
        }
      },
      [`${e}-disabled`]: {
        cursor: "not-allowed",
        [O]: {
          backgroundColor: h,
          borderColor: c,
          cursor: "not-allowed",
          "&::after": {
            backgroundColor: g
          }
        },
        [`${e}-input`]: {
          cursor: "not-allowed"
        },
        [`${e}-disabled + span`]: {
          color: p,
          cursor: "not-allowed"
        },
        [`&${e}-checked`]: {
          [O]: {
            "&::after": {
              transform: `scale(${y / i})`
            }
          }
        }
      },
      [`span${e} + *`]: {
        paddingInlineStart: v,
        paddingInlineEnd: v
      }
    })
  };
}, TOe = (t) => {
  const {
    radioButtonColor: e,
    controlHeight: n,
    componentCls: r,
    lineWidth: i,
    lineType: a,
    colorBorder: o,
    motionDurationSlow: s,
    motionDurationMid: l,
    radioButtonPaddingHorizontal: u,
    fontSize: c,
    radioButtonBg: f,
    fontSizeLG: d,
    controlHeightLG: h,
    controlHeightSM: p,
    paddingXS: v,
    borderRadius: g,
    borderRadiusSM: m,
    borderRadiusLG: y,
    radioCheckedColor: b,
    radioButtonCheckedBg: _,
    radioButtonHoverColor: O,
    radioButtonActiveColor: S,
    radioSolidCheckedColor: x,
    colorTextDisabled: C,
    colorBgContainerDisabled: T,
    radioDisabledButtonCheckedColor: w,
    radioDisabledButtonCheckedBg: P
  } = t;
  return {
    [`${r}-button-wrapper`]: {
      position: "relative",
      display: "inline-block",
      height: n,
      margin: 0,
      paddingInline: u,
      paddingBlock: 0,
      color: e,
      fontSize: c,
      lineHeight: `${n - i * 2}px`,
      background: f,
      border: `${i}px ${a} ${o}`,
      // strange align fix for chrome but works
      // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
      borderBlockStartWidth: i + 0.02,
      borderInlineStartWidth: 0,
      borderInlineEndWidth: i,
      cursor: "pointer",
      transition: [`color ${l}`, `background ${l}`, `border-color ${l}`, `box-shadow ${l}`].join(","),
      a: {
        color: e
      },
      [`> ${r}-button`]: {
        position: "absolute",
        insetBlockStart: 0,
        insetInlineStart: 0,
        zIndex: -1,
        width: "100%",
        height: "100%"
      },
      "&:not(:first-child)": {
        "&::before": {
          position: "absolute",
          insetBlockStart: -i,
          insetInlineStart: -i,
          display: "block",
          boxSizing: "content-box",
          width: 1,
          height: "100%",
          paddingBlock: i,
          paddingInline: 0,
          backgroundColor: o,
          transition: `background-color ${s}`,
          content: '""'
        }
      },
      "&:first-child": {
        borderInlineStart: `${i}px ${a} ${o}`,
        borderStartStartRadius: g,
        borderEndStartRadius: g
      },
      "&:last-child": {
        borderStartEndRadius: g,
        borderEndEndRadius: g
      },
      "&:first-child:last-child": {
        borderRadius: g
      },
      [`${r}-group-large &`]: {
        height: h,
        fontSize: d,
        lineHeight: `${h - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: y,
          borderEndStartRadius: y
        },
        "&:last-child": {
          borderStartEndRadius: y,
          borderEndEndRadius: y
        }
      },
      [`${r}-group-small &`]: {
        height: p,
        paddingInline: v - i,
        paddingBlock: 0,
        lineHeight: `${p - i * 2}px`,
        "&:first-child": {
          borderStartStartRadius: m,
          borderEndStartRadius: m
        },
        "&:last-child": {
          borderStartEndRadius: m,
          borderEndEndRadius: m
        }
      },
      "&:hover": {
        position: "relative",
        color: b
      },
      "&:has(:focus-visible)": I({}, d0(t)),
      [`${r}-inner, input[type='checkbox'], input[type='radio']`]: {
        width: 0,
        height: 0,
        opacity: 0,
        pointerEvents: "none"
      },
      [`&-checked:not(${r}-button-wrapper-disabled)`]: {
        zIndex: 1,
        color: b,
        background: _,
        borderColor: b,
        "&::before": {
          backgroundColor: b
        },
        "&:first-child": {
          borderColor: b
        },
        "&:hover": {
          color: O,
          borderColor: O,
          "&::before": {
            backgroundColor: O
          }
        },
        "&:active": {
          color: S,
          borderColor: S,
          "&::before": {
            backgroundColor: S
          }
        }
      },
      [`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]: {
        color: x,
        background: b,
        borderColor: b,
        "&:hover": {
          color: x,
          background: O,
          borderColor: O
        },
        "&:active": {
          color: x,
          background: S,
          borderColor: S
        }
      },
      "&-disabled": {
        color: C,
        backgroundColor: T,
        borderColor: o,
        cursor: "not-allowed",
        "&:first-child, &:hover": {
          color: C,
          backgroundColor: T,
          borderColor: o
        }
      },
      [`&-disabled${r}-button-wrapper-checked`]: {
        color: w,
        backgroundColor: P,
        borderColor: o,
        boxShadow: "none"
      }
    }
  };
}, tX = Sn("Radio", (t) => {
  const {
    padding: e,
    lineWidth: n,
    controlItemBgActiveDisabled: r,
    colorTextDisabled: i,
    colorBgContainer: a,
    fontSizeLG: o,
    controlOutline: s,
    colorPrimaryHover: l,
    colorPrimaryActive: u,
    colorText: c,
    colorPrimary: f,
    marginXS: d,
    controlOutlineWidth: h,
    colorTextLightSolid: p,
    wireframe: v
  } = t, g = `0 0 0 ${h}px ${s}`, m = g, y = o, b = 4, _ = y - b * 2, O = v ? _ : y - (b + n) * 2, S = f, x = c, C = l, T = u, w = e - n, A = Bt(t, {
    radioFocusShadow: g,
    radioButtonFocusShadow: m,
    radioSize: y,
    radioDotSize: O,
    radioDotDisabledSize: _,
    radioCheckedColor: S,
    radioDotDisabledColor: i,
    radioSolidCheckedColor: p,
    radioButtonBg: a,
    radioButtonCheckedBg: a,
    radioButtonColor: x,
    radioButtonHoverColor: C,
    radioButtonActiveColor: T,
    radioButtonPaddingHorizontal: w,
    radioDisabledButtonCheckedBg: r,
    radioDisabledButtonCheckedColor: i,
    radioWrapperMarginRight: d
  });
  return [wOe(A), COe(A), TOe(A)];
});
var POe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const nX = () => ({
  prefixCls: String,
  checked: nt(),
  disabled: nt(),
  isGroup: nt(),
  value: Y.any,
  name: String,
  id: String,
  autofocus: nt(),
  onChange: tt(),
  onFocus: tt(),
  onBlur: tt(),
  onClick: tt(),
  "onUpdate:checked": tt(),
  "onUpdate:value": tt()
}), fi = te({
  compatConfig: {
    MODE: 3
  },
  name: "ARadio",
  inheritAttrs: !1,
  props: nX(),
  setup(t, e) {
    let {
      emit: n,
      expose: r,
      slots: i,
      attrs: a
    } = e;
    const o = ss(), s = ro.useInject(), l = SOe(), u = _Oe(), c = Ko(), f = L(() => {
      var C;
      return (C = v.value) !== null && C !== void 0 ? C : c.value;
    }), d = U(), {
      prefixCls: h,
      direction: p,
      disabled: v
    } = It("radio", t), g = L(() => (u == null ? void 0 : u.optionType.value) === "button" || l === "button" ? `${h.value}-button` : h.value), m = Ko(), [y, b] = tX(h);
    r({
      focus: () => {
        d.value.focus();
      },
      blur: () => {
        d.value.blur();
      }
    });
    const S = (C) => {
      const T = C.target.checked;
      n("update:checked", T), n("update:value", T), n("change", C), o.onFieldChange();
    }, x = (C) => {
      n("change", C), u && u.onChange && u.onChange(C);
    };
    return () => {
      var C;
      const T = u, {
        prefixCls: w,
        id: P = o.id.value
      } = t, $ = POe(t, ["prefixCls", "id"]), A = I(I({
        prefixCls: g.value,
        id: P
      }, or($, ["onUpdate:checked", "onUpdate:value"])), {
        disabled: (C = v.value) !== null && C !== void 0 ? C : m.value
      });
      T ? (A.name = T.name.value, A.onChange = x, A.checked = t.value === T.value.value, A.disabled = f.value || T.disabled.value) : A.onChange = S;
      const D = ye({
        [`${g.value}-wrapper`]: !0,
        [`${g.value}-wrapper-checked`]: A.checked,
        [`${g.value}-wrapper-disabled`]: A.disabled,
        [`${g.value}-wrapper-rtl`]: p.value === "rtl",
        [`${g.value}-wrapper-in-form-item`]: s.isFormItemInput
      }, a.class, b.value);
      return y(M("label", j(j({}, a), {}, {
        class: D
      }), [M(KU, j(j({}, A), {}, {
        type: "radio",
        ref: d
      }), null), i.default && M("span", null, [i.default()])]));
    };
  }
}), $Oe = () => ({
  prefixCls: String,
  value: Y.any,
  size: hn(),
  options: uf(),
  disabled: nt(),
  name: String,
  buttonStyle: hn("outline"),
  id: String,
  optionType: hn("default"),
  onChange: tt(),
  "onUpdate:value": tt()
}), vf = te({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioGroup",
  inheritAttrs: !1,
  props: $Oe(),
  // emits: ['update:value', 'change'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    const a = ss(), {
      prefixCls: o,
      direction: s,
      size: l
    } = It("radio", t), [u, c] = tX(o), f = U(t.value), d = U(!1);
    return se(() => t.value, (p) => {
      f.value = p, d.value = !1;
    }), bOe({
      onChange: (p) => {
        const v = f.value, {
          value: g
        } = p.target;
        "value" in t || (f.value = g), !d.value && g !== v && (d.value = !0, r("update:value", g), r("change", p), a.onFieldChange()), Tt(() => {
          d.value = !1;
        });
      },
      value: f,
      disabled: L(() => t.disabled),
      name: L(() => t.name),
      optionType: L(() => t.optionType)
    }), () => {
      var p;
      const {
        options: v,
        buttonStyle: g,
        id: m = a.id.value
      } = t, y = `${o.value}-group`, b = ye(y, `${y}-${g}`, {
        [`${y}-${l.value}`]: l.value,
        [`${y}-rtl`]: s.value === "rtl"
      }, i.class, c.value);
      let _ = null;
      return v && v.length > 0 ? _ = v.map((O) => {
        if (typeof O == "string" || typeof O == "number")
          return M(fi, {
            key: O,
            prefixCls: o.value,
            disabled: t.disabled,
            value: O,
            checked: f.value === O
          }, {
            default: () => [O]
          });
        const {
          value: S,
          disabled: x,
          label: C
        } = O;
        return M(fi, {
          key: `radio-group-value-options-${S}`,
          prefixCls: o.value,
          disabled: x || t.disabled,
          value: S,
          checked: f.value === S
        }, {
          default: () => [C]
        });
      }) : _ = (p = n.default) === null || p === void 0 ? void 0 : p.call(n), u(M("div", j(j({}, i), {}, {
        class: b,
        id: m
      }), [_]));
    };
  }
}), Io = te({
  compatConfig: {
    MODE: 3
  },
  name: "ARadioButton",
  inheritAttrs: !1,
  props: nX(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i
    } = It("radio", t);
    return OOe("button"), () => {
      var a;
      return M(fi, j(j(j({}, r), t), {}, {
        prefixCls: i.value
      }), {
        default: () => [(a = n.default) === null || a === void 0 ? void 0 : a.call(n)]
      });
    };
  }
});
fi.Group = vf;
fi.Button = Io;
fi.install = function(t) {
  return t.component(fi.name, fi), t.component(fi.Group.name, fi.Group), t.component(fi.Button.name, fi.Button), t;
};
const rX = (t) => ({
  // Firefox
  "&::-moz-placeholder": {
    opacity: 1
  },
  "&::placeholder": {
    color: t,
    userSelect: "none"
    // https://github.com/ant-design/ant-design/pull/32639
  },
  "&:placeholder-shown": {
    textOverflow: "ellipsis"
  }
}), b0 = (t) => ({
  borderColor: t.inputBorderHoverColor,
  borderInlineEndWidth: t.lineWidth
}), N1 = (t) => ({
  borderColor: t.inputBorderHoverColor,
  boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,
  borderInlineEndWidth: t.lineWidth,
  outline: 0
}), iX = (t) => ({
  color: t.colorTextDisabled,
  backgroundColor: t.colorBgContainerDisabled,
  borderColor: t.colorBorder,
  boxShadow: "none",
  cursor: "not-allowed",
  opacity: 1,
  "&:hover": I({}, b0(Bt(t, {
    inputBorderHoverColor: t.colorBorder
  })))
}), aX = (t) => {
  const {
    inputPaddingVerticalLG: e,
    fontSizeLG: n,
    lineHeightLG: r,
    borderRadiusLG: i,
    inputPaddingHorizontalLG: a
  } = t;
  return {
    padding: `${e}px ${a}px`,
    fontSize: n,
    lineHeight: r,
    borderRadius: i
  };
}, oX = (t) => ({
  padding: `${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM - 1}px`,
  borderRadius: t.borderRadiusSM
}), gx = (t, e) => {
  const {
    componentCls: n,
    colorError: r,
    colorWarning: i,
    colorErrorOutline: a,
    colorWarningOutline: o,
    colorErrorBorderHover: s,
    colorWarningBorderHover: l
  } = t;
  return {
    [`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]: {
      borderColor: r,
      "&:hover": {
        borderColor: s
      },
      "&:focus, &-focused": I({}, N1(Bt(t, {
        inputBorderActiveColor: r,
        inputBorderHoverColor: r,
        controlOutline: a
      }))),
      [`${n}-prefix`]: {
        color: r
      }
    },
    [`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]: {
      borderColor: i,
      "&:hover": {
        borderColor: l
      },
      "&:focus, &-focused": I({}, N1(Bt(t, {
        inputBorderActiveColor: i,
        inputBorderHoverColor: i,
        controlOutline: o
      }))),
      [`${n}-prefix`]: {
        color: i
      }
    }
  };
}, mx = (t) => I(I({
  position: "relative",
  display: "inline-block",
  width: "100%",
  minWidth: 0,
  padding: `${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,
  color: t.colorText,
  fontSize: t.fontSize,
  lineHeight: t.lineHeight,
  backgroundColor: t.colorBgContainer,
  backgroundImage: "none",
  borderWidth: t.lineWidth,
  borderStyle: t.lineType,
  borderColor: t.colorBorder,
  borderRadius: t.borderRadius,
  transition: `all ${t.motionDurationMid}`
}, rX(t.colorTextPlaceholder)), {
  "&:hover": I({}, b0(t)),
  "&:focus, &-focused": I({}, N1(t)),
  "&-disabled, &[disabled]": I({}, iX(t)),
  "&-borderless": {
    "&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
      backgroundColor: "transparent",
      border: "none",
      boxShadow: "none"
    }
  },
  // Reset height for `textarea`s
  "textarea&": {
    maxWidth: "100%",
    height: "auto",
    minHeight: t.controlHeight,
    lineHeight: t.lineHeight,
    verticalAlign: "bottom",
    transition: `all ${t.motionDurationSlow}, height 0s`,
    resize: "vertical"
  },
  // Size
  "&-lg": I({}, aX(t)),
  "&-sm": I({}, oX(t)),
  // RTL
  "&-rtl": {
    direction: "rtl"
  },
  "&-textarea-rtl": {
    direction: "rtl"
  }
}), sX = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t;
  return {
    position: "relative",
    display: "table",
    width: "100%",
    borderCollapse: "separate",
    borderSpacing: 0,
    // Undo padding and float of grid classes
    "&[class*='col-']": {
      paddingInlineEnd: t.paddingXS,
      "&:last-child": {
        paddingInlineEnd: 0
      }
    },
    // Sizing options
    [`&-lg ${e}, &-lg > ${e}-group-addon`]: I({}, aX(t)),
    [`&-sm ${e}, &-sm > ${e}-group-addon`]: I({}, oX(t)),
    [`> ${e}`]: {
      display: "table-cell",
      "&:not(:first-child):not(:last-child)": {
        borderRadius: 0
      }
    },
    [`${e}-group`]: {
      "&-addon, &-wrap": {
        display: "table-cell",
        width: 1,
        whiteSpace: "nowrap",
        verticalAlign: "middle",
        "&:not(:first-child):not(:last-child)": {
          borderRadius: 0
        }
      },
      "&-wrap > *": {
        display: "block !important"
      },
      "&-addon": {
        position: "relative",
        padding: `0 ${t.inputPaddingHorizontal}px`,
        color: t.colorText,
        fontWeight: "normal",
        fontSize: t.fontSize,
        textAlign: "center",
        backgroundColor: t.colorFillAlter,
        border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
        borderRadius: t.borderRadius,
        transition: `all ${t.motionDurationSlow}`,
        lineHeight: 1,
        // Reset Select's style in addon
        [`${n}-select`]: {
          margin: `-${t.inputPaddingVertical + 1}px -${t.inputPaddingHorizontal}px`,
          [`&${n}-select-single:not(${n}-select-customize-input)`]: {
            [`${n}-select-selector`]: {
              backgroundColor: "inherit",
              border: `${t.lineWidth}px ${t.lineType} transparent`,
              boxShadow: "none"
            }
          },
          "&-open, &-focused": {
            [`${n}-select-selector`]: {
              color: t.colorPrimary
            }
          }
        },
        // https://github.com/ant-design/ant-design/issues/31333
        [`${n}-cascader-picker`]: {
          margin: `-9px -${t.inputPaddingHorizontal}px`,
          backgroundColor: "transparent",
          [`${n}-cascader-input`]: {
            textAlign: "start",
            border: 0,
            boxShadow: "none"
          }
        }
      },
      "&-addon:first-child": {
        borderInlineEnd: 0
      },
      "&-addon:last-child": {
        borderInlineStart: 0
      }
    },
    [`${e}`]: {
      float: "inline-start",
      width: "100%",
      marginBottom: 0,
      textAlign: "inherit",
      "&:focus": {
        zIndex: 1,
        borderInlineEndWidth: 1
      },
      "&:hover": {
        zIndex: 1,
        borderInlineEndWidth: 1,
        [`${e}-search-with-button &`]: {
          zIndex: 0
        }
      }
    },
    // Reset rounded corners
    [`> ${e}:first-child, ${e}-group-addon:first-child`]: {
      borderStartEndRadius: 0,
      borderEndEndRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${e}-affix-wrapper`]: {
      [`&:not(:first-child) ${e}`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      },
      [`&:not(:last-child) ${e}`]: {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0
      }
    },
    [`> ${e}:last-child, ${e}-group-addon:last-child`]: {
      borderStartStartRadius: 0,
      borderEndStartRadius: 0,
      // Reset Select's style in addon
      [`${n}-select ${n}-select-selector`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`${e}-affix-wrapper`]: {
      "&:not(:last-child)": {
        borderStartEndRadius: 0,
        borderEndEndRadius: 0,
        [`${e}-search &`]: {
          borderStartStartRadius: t.borderRadius,
          borderEndStartRadius: t.borderRadius
        }
      },
      [`&:not(:first-child), ${e}-search &:not(:first-child)`]: {
        borderStartStartRadius: 0,
        borderEndStartRadius: 0
      }
    },
    [`&${e}-group-compact`]: I(I({
      display: "block"
    }, _1()), {
      [`${e}-group-addon, ${e}-group-wrap, > ${e}`]: {
        "&:not(:first-child):not(:last-child)": {
          borderInlineEndWidth: t.lineWidth,
          "&:hover": {
            zIndex: 1
          },
          "&:focus": {
            zIndex: 1
          }
        }
      },
      "& > *": {
        display: "inline-block",
        float: "none",
        verticalAlign: "top",
        borderRadius: 0
      },
      [`& > ${e}-affix-wrapper`]: {
        display: "inline-flex"
      },
      [`& > ${n}-picker-range`]: {
        display: "inline-flex"
      },
      "& > *:not(:last-child)": {
        marginInlineEnd: -t.lineWidth,
        borderInlineEndWidth: t.lineWidth
      },
      // Undo float for .ant-input-group .ant-input
      [`${e}`]: {
        float: "none"
      },
      // reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
      [`& > ${n}-select > ${n}-select-selector,
      & > ${n}-select-auto-complete ${e},
      & > ${n}-cascader-picker ${e},
      & > ${e}-group-wrapper ${e}`]: {
        borderInlineEndWidth: t.lineWidth,
        borderRadius: 0,
        "&:hover": {
          zIndex: 1
        },
        "&:focus": {
          zIndex: 1
        }
      },
      [`& > ${n}-select-focused`]: {
        zIndex: 1
      },
      // update z-index for arrow icon
      [`& > ${n}-select > ${n}-select-arrow`]: {
        zIndex: 1
        // https://github.com/ant-design/ant-design/issues/20371
      },
      [`& > *:first-child,
      & > ${n}-select:first-child > ${n}-select-selector,
      & > ${n}-select-auto-complete:first-child ${e},
      & > ${n}-cascader-picker:first-child ${e}`]: {
        borderStartStartRadius: t.borderRadius,
        borderEndStartRadius: t.borderRadius
      },
      [`& > *:last-child,
      & > ${n}-select:last-child > ${n}-select-selector,
      & > ${n}-cascader-picker:last-child ${e},
      & > ${n}-cascader-picker-focused:last-child ${e}`]: {
        borderInlineEndWidth: t.lineWidth,
        borderStartEndRadius: t.borderRadius,
        borderEndEndRadius: t.borderRadius
      },
      // https://github.com/ant-design/ant-design/issues/12493
      [`& > ${n}-select-auto-complete ${e}`]: {
        verticalAlign: "top"
      },
      [`${e}-group-wrapper + ${e}-group-wrapper`]: {
        marginInlineStart: -t.lineWidth,
        [`${e}-affix-wrapper`]: {
          borderRadius: 0
        }
      },
      [`${e}-group-wrapper:not(:last-child)`]: {
        [`&${e}-search > ${e}-group`]: {
          [`& > ${e}-group-addon > ${e}-search-button`]: {
            borderRadius: 0
          },
          [`& > ${e}`]: {
            borderStartStartRadius: t.borderRadius,
            borderStartEndRadius: 0,
            borderEndEndRadius: 0,
            borderEndStartRadius: t.borderRadius
          }
        }
      }
    }),
    [`&&-sm ${n}-btn`]: {
      fontSize: t.fontSizeSM,
      height: t.controlHeightSM,
      lineHeight: "normal"
    },
    [`&&-lg ${n}-btn`]: {
      fontSize: t.fontSizeLG,
      height: t.controlHeightLG,
      lineHeight: "normal"
    },
    // Fix https://github.com/ant-design/ant-design/issues/5754
    [`&&-lg ${n}-select-single ${n}-select-selector`]: {
      height: `${t.controlHeightLG}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${t.controlHeightLG - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${t.controlHeightLG}px`
      }
    },
    [`&&-sm ${n}-select-single ${n}-select-selector`]: {
      height: `${t.controlHeightSM}px`,
      [`${n}-select-selection-item, ${n}-select-selection-placeholder`]: {
        // -2 is for the border size & override default
        lineHeight: `${t.controlHeightSM - 2}px`
      },
      [`${n}-select-selection-search-input`]: {
        height: `${t.controlHeightSM}px`
      }
    }
  };
}, AOe = (t) => {
  const {
    componentCls: e,
    controlHeightSM: n,
    lineWidth: r
  } = t, a = (n - r * 2 - 16) / 2;
  return {
    [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
      '&[type="color"]': {
        height: t.controlHeight,
        [`&${e}-lg`]: {
          height: t.controlHeightLG
        },
        [`&${e}-sm`]: {
          height: n,
          paddingTop: a,
          paddingBottom: a
        }
      }
    })
  };
}, EOe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // ========================= Input =========================
    [`${e}-clear-icon`]: {
      margin: 0,
      color: t.colorTextQuaternary,
      fontSize: t.fontSizeIcon,
      verticalAlign: -1,
      // https://github.com/ant-design/ant-design/pull/18151
      // https://codesandbox.io/s/wizardly-sun-u10br
      cursor: "pointer",
      transition: `color ${t.motionDurationSlow}`,
      "&:hover": {
        color: t.colorTextTertiary
      },
      "&:active": {
        color: t.colorText
      },
      "&-hidden": {
        visibility: "hidden"
      },
      "&-has-suffix": {
        margin: `0 ${t.inputAffixPadding}px`
      }
    },
    // ======================= TextArea ========================
    "&-textarea-with-clear-btn": {
      padding: "0 !important",
      border: "0 !important",
      [`${e}-clear-icon`]: {
        position: "absolute",
        insetBlockStart: t.paddingXS,
        insetInlineEnd: t.paddingXS,
        zIndex: 1
      }
    }
  };
}, MOe = (t) => {
  const {
    componentCls: e,
    inputAffixPadding: n,
    colorTextDescription: r,
    motionDurationSlow: i,
    colorIcon: a,
    colorIconHover: o,
    iconCls: s
  } = t;
  return {
    [`${e}-affix-wrapper`]: I(I(I(I(I({}, mx(t)), {
      display: "inline-flex",
      [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
        zIndex: 1,
        [`${e}-search-with-button &`]: {
          zIndex: 0
        }
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${e}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> input${e}`]: {
        padding: 0,
        fontSize: "inherit",
        border: "none",
        borderRadius: 0,
        outline: "none",
        "&:focus": {
          boxShadow: "none !important"
        }
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${e}`]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          "> *:not(:last-child)": {
            marginInlineEnd: t.paddingXS
          }
        },
        "&-show-count-suffix": {
          color: r
        },
        "&-show-count-has-suffix": {
          marginInlineEnd: t.paddingXXS
        },
        "&-prefix": {
          marginInlineEnd: n
        },
        "&-suffix": {
          marginInlineStart: n
        }
      }
    }), EOe(t)), {
      // password
      [`${s}${e}-password-icon`]: {
        color: a,
        cursor: "pointer",
        transition: `all ${i}`,
        "&:hover": {
          color: o
        }
      }
    }), gx(t, `${e}-affix-wrapper`))
  };
}, IOe = (t) => {
  const {
    componentCls: e,
    colorError: n,
    colorSuccess: r,
    borderRadiusLG: i,
    borderRadiusSM: a
  } = t;
  return {
    [`${e}-group`]: I(I(I({}, nn(t)), sX(t)), {
      "&-rtl": {
        direction: "rtl"
      },
      "&-wrapper": {
        display: "inline-block",
        width: "100%",
        textAlign: "start",
        verticalAlign: "top",
        "&-rtl": {
          direction: "rtl"
        },
        // Size
        "&-lg": {
          [`${e}-group-addon`]: {
            borderRadius: i
          }
        },
        "&-sm": {
          [`${e}-group-addon`]: {
            borderRadius: a
          }
        },
        // Status
        "&-status-error": {
          [`${e}-group-addon`]: {
            color: n,
            borderColor: n
          }
        },
        "&-status-warning": {
          [`${e}-group-addon:last-child`]: {
            color: r,
            borderColor: r
          }
        }
      }
    })
  };
}, DOe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-search`;
  return {
    [r]: {
      [`${e}`]: {
        "&:hover, &:focus": {
          borderColor: t.colorPrimaryHover,
          [`+ ${e}-group-addon ${r}-button:not(${n}-btn-primary)`]: {
            borderInlineStartColor: t.colorPrimaryHover
          }
        }
      },
      [`${e}-affix-wrapper`]: {
        borderRadius: 0
      },
      // fix slight height diff in Firefox:
      // https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
      [`${e}-lg`]: {
        lineHeight: t.lineHeightLG - 2e-4
      },
      [`> ${e}-group`]: {
        [`> ${e}-group-addon:last-child`]: {
          insetInlineStart: -1,
          padding: 0,
          border: 0,
          [`${r}-button`]: {
            paddingTop: 0,
            paddingBottom: 0,
            borderStartStartRadius: 0,
            borderStartEndRadius: t.borderRadius,
            borderEndEndRadius: t.borderRadius,
            borderEndStartRadius: 0
          },
          [`${r}-button:not(${n}-btn-primary)`]: {
            color: t.colorTextDescription,
            "&:hover": {
              color: t.colorPrimaryHover
            },
            "&:active": {
              color: t.colorPrimaryActive
            },
            [`&${n}-btn-loading::before`]: {
              insetInlineStart: 0,
              insetInlineEnd: 0,
              insetBlockStart: 0,
              insetBlockEnd: 0
            }
          }
        }
      },
      [`${r}-button`]: {
        height: t.controlHeight,
        "&:hover, &:focus": {
          zIndex: 1
        }
      },
      [`&-large ${r}-button`]: {
        height: t.controlHeightLG
      },
      [`&-small ${r}-button`]: {
        height: t.controlHeightSM
      },
      "&-rtl": {
        direction: "rtl"
      },
      // ===================== Compact Item Customized Styles =====================
      [`&${e}-compact-item`]: {
        [`&:not(${e}-compact-last-item)`]: {
          [`${e}-group-addon`]: {
            [`${e}-search-button`]: {
              marginInlineEnd: -t.lineWidth,
              borderRadius: 0
            }
          }
        },
        [`&:not(${e}-compact-first-item)`]: {
          [`${e},${e}-affix-wrapper`]: {
            borderRadius: 0
          }
        },
        [`> ${e}-group-addon ${e}-search-button,
        > ${e},
        ${e}-affix-wrapper`]: {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          }
        },
        [`> ${e}-affix-wrapper-focused`]: {
          zIndex: 2
        }
      }
    }
  };
};
function lX(t) {
  return Bt(t, {
    inputAffixPadding: t.paddingXXS,
    inputPaddingVertical: Math.max(Math.round((t.controlHeight - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 3),
    inputPaddingVerticalLG: Math.ceil((t.controlHeightLG - t.fontSizeLG * t.lineHeightLG) / 2 * 10) / 10 - t.lineWidth,
    inputPaddingVerticalSM: Math.max(Math.round((t.controlHeightSM - t.fontSize * t.lineHeight) / 2 * 10) / 10 - t.lineWidth, 0),
    inputPaddingHorizontal: t.paddingSM - t.lineWidth,
    inputPaddingHorizontalSM: t.paddingXS - t.lineWidth,
    inputPaddingHorizontalLG: t.controlPaddingHorizontal - t.lineWidth,
    inputBorderHoverColor: t.colorPrimaryHover,
    inputBorderActiveColor: t.colorPrimaryHover
  });
}
const ROe = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontal: n,
    paddingLG: r
  } = t, i = `${e}-textarea`;
  return {
    [i]: {
      position: "relative",
      [`${i}-suffix`]: {
        position: "absolute",
        top: 0,
        insetInlineEnd: n,
        bottom: 0,
        zIndex: 1,
        display: "inline-flex",
        alignItems: "center",
        margin: "auto"
      },
      "&-status-error,\n        &-status-warning,\n        &-status-success,\n        &-status-validating": {
        [`&${i}-has-feedback`]: {
          [`${e}`]: {
            paddingInlineEnd: r
          }
        }
      },
      "&-show-count": {
        // https://github.com/ant-design/ant-design/issues/33049
        [`> ${e}`]: {
          height: "100%"
        },
        "&::after": {
          color: t.colorTextDescription,
          whiteSpace: "nowrap",
          content: "attr(data-count)",
          pointerEvents: "none",
          float: "right"
        }
      },
      "&-rtl": {
        "&::after": {
          float: "left"
        }
      }
    }
  };
}, lD = Sn("Input", (t) => {
  const e = lX(t);
  return [
    AOe(e),
    ROe(e),
    MOe(e),
    IOe(e),
    DOe(e),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    cx(e)
  ];
});
function kOe(t) {
  const e = ae(), n = ae(!1);
  function r() {
    for (var i = arguments.length, a = new Array(i), o = 0; o < i; o++)
      a[o] = arguments[o];
    n.value || (xt.cancel(e.value), e.value = xt(() => {
      t(...a);
    }));
  }
  return yt(() => {
    n.value = !0, xt.cancel(e.value);
  }), r;
}
function LOe(t) {
  const e = ae([]), n = ae(typeof t == "function" ? t() : t), r = kOe(() => {
    let a = n.value;
    e.value.forEach((o) => {
      a = o(a);
    }), e.value = [], n.value = a;
  });
  function i(a) {
    e.value.push(a), r();
  }
  return [n, i];
}
const NOe = te({
  compatConfig: {
    MODE: 3
  },
  name: "TabNode",
  props: {
    id: {
      type: String
    },
    prefixCls: {
      type: String
    },
    tab: {
      type: Object
    },
    active: {
      type: Boolean
    },
    closable: {
      type: Boolean
    },
    editable: {
      type: Object
    },
    onClick: {
      type: Function
    },
    onResize: {
      type: Function
    },
    renderWrapper: {
      type: Function
    },
    removeAriaLabel: {
      type: String
    },
    // onRemove: { type: Function as PropType<() => void> },
    onFocus: {
      type: Function
    }
  },
  emits: ["click", "resize", "remove", "focus"],
  setup(t, e) {
    let {
      expose: n,
      attrs: r
    } = e;
    const i = U();
    function a(l) {
      var u;
      !((u = t.tab) === null || u === void 0) && u.disabled || t.onClick(l);
    }
    n({
      domRef: i
    });
    function o(l) {
      var u;
      l.preventDefault(), l.stopPropagation(), t.editable.onEdit("remove", {
        key: (u = t.tab) === null || u === void 0 ? void 0 : u.key,
        event: l
      });
    }
    const s = L(() => {
      var l;
      return t.editable && t.closable !== !1 && !(!((l = t.tab) === null || l === void 0) && l.disabled);
    });
    return () => {
      var l;
      const {
        prefixCls: u,
        id: c,
        active: f,
        tab: {
          key: d,
          tab: h,
          disabled: p,
          closeIcon: v
        },
        renderWrapper: g,
        removeAriaLabel: m,
        editable: y,
        onFocus: b
      } = t, _ = `${u}-tab`, O = M("div", {
        key: d,
        ref: i,
        class: ye(_, {
          [`${_}-with-remove`]: s.value,
          [`${_}-active`]: f,
          [`${_}-disabled`]: p
        }),
        style: r.style,
        onClick: a
      }, [M("div", {
        role: "tab",
        "aria-selected": f,
        id: c && `${c}-tab-${d}`,
        class: `${_}-btn`,
        "aria-controls": c && `${c}-panel-${d}`,
        "aria-disabled": p,
        tabindex: p ? null : 0,
        onClick: (S) => {
          S.stopPropagation(), a(S);
        },
        onKeydown: (S) => {
          [ge.SPACE, ge.ENTER].includes(S.which) && (S.preventDefault(), a(S));
        },
        onFocus: b
      }, [typeof h == "function" ? h() : h]), s.value && M("button", {
        type: "button",
        "aria-label": m || "remove",
        tabindex: 0,
        class: `${_}-remove`,
        onClick: (S) => {
          S.stopPropagation(), o(S);
        }
      }, [(v == null ? void 0 : v()) || ((l = y.removeIcon) === null || l === void 0 ? void 0 : l.call(y)) || "×"])]);
      return g ? g(O) : O;
    };
  }
}), x5 = {
  width: 0,
  height: 0,
  left: 0,
  top: 0
};
function BOe(t, e) {
  const n = U(/* @__PURE__ */ new Map());
  return ht(() => {
    var r, i;
    const a = /* @__PURE__ */ new Map(), o = t.value, s = e.value.get((r = o[0]) === null || r === void 0 ? void 0 : r.key) || x5, l = s.left + s.width;
    for (let u = 0; u < o.length; u += 1) {
      const {
        key: c
      } = o[u];
      let f = e.value.get(c);
      f || (f = e.value.get((i = o[u - 1]) === null || i === void 0 ? void 0 : i.key) || x5);
      const d = a.get(c) || I({}, f);
      d.right = l - d.left - d.width, a.set(c, d);
    }
    n.value = new Map(a);
  }), n;
}
const uX = te({
  compatConfig: {
    MODE: 3
  },
  name: "AddButton",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    editable: {
      type: Object
    },
    locale: {
      type: Object,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      expose: n,
      attrs: r
    } = e;
    const i = U();
    return n({
      domRef: i
    }), () => {
      const {
        prefixCls: a,
        editable: o,
        locale: s
      } = t;
      return !o || o.showAdd === !1 ? null : M("button", {
        ref: i,
        type: "button",
        class: `${a}-nav-add`,
        style: r.style,
        "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab",
        onClick: (l) => {
          o.onEdit("add", {
            event: l
          });
        }
      }, [o.addIcon ? o.addIcon() : "+"]);
    };
  }
}), zOe = {
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  tabs: {
    type: Object
  },
  rtl: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  activeKey: {
    type: [String, Number]
  },
  mobile: {
    type: Boolean
  },
  moreIcon: Y.any,
  moreTransitionName: {
    type: String
  },
  editable: {
    type: Object
  },
  locale: {
    type: Object,
    default: void 0
  },
  removeAriaLabel: String,
  onTabClick: {
    type: Function
  },
  popupClassName: String,
  getPopupContainer: tt()
}, VOe = te({
  compatConfig: {
    MODE: 3
  },
  name: "OperationNode",
  inheritAttrs: !1,
  props: zOe,
  emits: ["tabClick"],
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const [i, a] = fn(!1), [o, s] = fn(null), l = (h) => {
      const p = t.tabs.filter((m) => !m.disabled);
      let v = p.findIndex((m) => m.key === o.value) || 0;
      const g = p.length;
      for (let m = 0; m < g; m += 1) {
        v = (v + h + g) % g;
        const y = p[v];
        if (!y.disabled) {
          s(y.key);
          return;
        }
      }
    }, u = (h) => {
      const {
        which: p
      } = h;
      if (!i.value) {
        [ge.DOWN, ge.SPACE, ge.ENTER].includes(p) && (a(!0), h.preventDefault());
        return;
      }
      switch (p) {
        case ge.UP:
          l(-1), h.preventDefault();
          break;
        case ge.DOWN:
          l(1), h.preventDefault();
          break;
        case ge.ESC:
          a(!1);
          break;
        case ge.SPACE:
        case ge.ENTER:
          o.value !== null && t.onTabClick(o.value, h);
          break;
      }
    }, c = L(() => `${t.id}-more-popup`), f = L(() => o.value !== null ? `${c.value}-${o.value}` : null), d = (h, p) => {
      h.preventDefault(), h.stopPropagation(), t.editable.onEdit("remove", {
        key: p,
        event: h
      });
    };
    return it(() => {
      se(o, () => {
        const h = document.getElementById(f.value);
        h && h.scrollIntoView && h.scrollIntoView(!1);
      }, {
        flush: "post",
        immediate: !0
      });
    }), se(i, () => {
      i.value || s(null);
    }), j1e({}), () => {
      var h;
      const {
        prefixCls: p,
        id: v,
        tabs: g,
        locale: m,
        mobile: y,
        moreIcon: b = ((h = r.moreIcon) === null || h === void 0 ? void 0 : h.call(r)) || M(hx, null, null),
        moreTransitionName: _,
        editable: O,
        tabBarGutter: S,
        rtl: x,
        onTabClick: C,
        popupClassName: T
      } = t;
      if (!g.length) return null;
      const w = `${p}-dropdown`, P = m == null ? void 0 : m.dropdownAriaLabel, $ = {
        [x ? "marginRight" : "marginLeft"]: S
      };
      g.length || ($.visibility = "hidden", $.order = 1);
      const A = ye({
        [`${w}-rtl`]: x,
        [`${T}`]: !0
      }), D = y ? null : M(d1e, {
        prefixCls: w,
        trigger: ["hover"],
        visible: i.value,
        transitionName: _,
        onVisibleChange: a,
        overlayClassName: A,
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        getPopupContainer: t.getPopupContainer
      }, {
        overlay: () => M(jl, {
          onClick: (E) => {
            let {
              key: R,
              domEvent: N
            } = E;
            C(R, N), a(!1);
          },
          id: c.value,
          tabindex: -1,
          role: "listbox",
          "aria-activedescendant": f.value,
          selectedKeys: [o.value],
          "aria-label": P !== void 0 ? P : "expanded dropdown"
        }, {
          default: () => [g.map((E) => {
            var R, N;
            const V = O && E.closable !== !1 && !E.disabled;
            return M(Th, {
              key: E.key,
              id: `${c.value}-${E.key}`,
              role: "option",
              "aria-controls": v && `${v}-panel-${E.key}`,
              disabled: E.disabled
            }, {
              default: () => [M("span", null, [typeof E.tab == "function" ? E.tab() : E.tab]), V && M("button", {
                type: "button",
                "aria-label": t.removeAriaLabel || "remove",
                tabindex: 0,
                class: `${w}-menu-item-remove`,
                onClick: (z) => {
                  z.stopPropagation(), d(z, E.key);
                }
              }, [((R = E.closeIcon) === null || R === void 0 ? void 0 : R.call(E)) || ((N = O.removeIcon) === null || N === void 0 ? void 0 : N.call(O)) || "×"])]
            });
          })]
        }),
        default: () => M("button", {
          type: "button",
          class: `${p}-nav-more`,
          style: $,
          tabindex: -1,
          "aria-hidden": "true",
          "aria-haspopup": "listbox",
          "aria-controls": c.value,
          id: `${v}-more`,
          "aria-expanded": i.value,
          onKeydown: u
        }, [b])
      });
      return M("div", {
        class: ye(`${p}-nav-operations`, n.class),
        style: n.style
      }, [D, M(uX, {
        prefixCls: p,
        locale: m,
        editable: O
      }, null)]);
    };
  }
}), cX = Symbol("tabsContextKey"), fX = (t) => {
  pt(cX, t);
}, dX = () => Ge(cX, {
  tabs: U([]),
  prefixCls: U()
});
te({
  compatConfig: {
    MODE: 3
  },
  name: "TabsContextProvider",
  inheritAttrs: !1,
  props: {
    tabs: {
      type: Object,
      default: void 0
    },
    prefixCls: {
      type: String,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    return fX($S(t)), () => {
      var r;
      return (r = n.default) === null || r === void 0 ? void 0 : r.call(n);
    };
  }
});
const FOe = 0.1, w5 = 0.01, T_ = 20, C5 = Math.pow(0.995, T_);
function WOe(t, e) {
  const [n, r] = fn(), [i, a] = fn(0), [o, s] = fn(0), [l, u] = fn(), c = U();
  function f(O) {
    const {
      screenX: S,
      screenY: x
    } = O.touches[0];
    r({
      x: S,
      y: x
    }), clearInterval(c.value);
  }
  function d(O) {
    if (!n.value) return;
    O.preventDefault();
    const {
      screenX: S,
      screenY: x
    } = O.touches[0], C = S - n.value.x, T = x - n.value.y;
    e(C, T), r({
      x: S,
      y: x
    });
    const w = Date.now();
    s(w - i.value), a(w), u({
      x: C,
      y: T
    });
  }
  function h() {
    if (!n.value) return;
    const O = l.value;
    if (r(null), u(null), O) {
      const S = O.x / o.value, x = O.y / o.value, C = Math.abs(S), T = Math.abs(x);
      if (Math.max(C, T) < FOe) return;
      let w = S, P = x;
      c.value = setInterval(() => {
        if (Math.abs(w) < w5 && Math.abs(P) < w5) {
          clearInterval(c.value);
          return;
        }
        w *= C5, P *= C5, e(w * T_, P * T_);
      }, T_);
    }
  }
  const p = U();
  function v(O) {
    const {
      deltaX: S,
      deltaY: x
    } = O;
    let C = 0;
    const T = Math.abs(S), w = Math.abs(x);
    T === w ? C = p.value === "x" ? S : x : T > w ? (C = S, p.value = "x") : (C = x, p.value = "y"), e(-C, -C) && O.preventDefault();
  }
  const g = U({
    onTouchStart: f,
    onTouchMove: d,
    onTouchEnd: h,
    onWheel: v
  });
  function m(O) {
    g.value.onTouchStart(O);
  }
  function y(O) {
    g.value.onTouchMove(O);
  }
  function b(O) {
    g.value.onTouchEnd(O);
  }
  function _(O) {
    g.value.onWheel(O);
  }
  it(() => {
    var O, S;
    document.addEventListener("touchmove", y, {
      passive: !1
    }), document.addEventListener("touchend", b, {
      passive: !1
    }), (O = t.value) === null || O === void 0 || O.addEventListener("touchstart", m, {
      passive: !1
    }), (S = t.value) === null || S === void 0 || S.addEventListener("wheel", _, {
      passive: !1
    });
  }), yt(() => {
    document.removeEventListener("touchmove", y), document.removeEventListener("touchend", b);
  });
}
function T5(t, e) {
  const n = U(t);
  function r(i) {
    const a = typeof i == "function" ? i(n.value) : i;
    a !== n.value && e(a, n.value), n.value = a;
  }
  return [n, r];
}
const QOe = () => {
  const t = U(/* @__PURE__ */ new Map()), e = (n) => (r) => {
    t.value.set(n, r);
  };
  return GG(() => {
    t.value = /* @__PURE__ */ new Map();
  }), [e, t];
}, P5 = {
  width: 0,
  height: 0,
  left: 0,
  top: 0,
  right: 0
}, HOe = () => ({
  id: {
    type: String
  },
  tabPosition: {
    type: String
  },
  activeKey: {
    type: [String, Number]
  },
  rtl: {
    type: Boolean
  },
  animated: $t(),
  editable: $t(),
  moreIcon: Y.any,
  moreTransitionName: {
    type: String
  },
  mobile: {
    type: Boolean
  },
  tabBarGutter: {
    type: Number
  },
  renderTabBar: {
    type: Function
  },
  locale: $t(),
  popupClassName: String,
  getPopupContainer: tt(),
  onTabClick: {
    type: Function
  },
  onTabScroll: {
    type: Function
  }
}), GOe = (t, e) => {
  const {
    offsetWidth: n,
    offsetHeight: r,
    offsetTop: i,
    offsetLeft: a
  } = t, {
    width: o,
    height: s,
    x: l,
    y: u
  } = t.getBoundingClientRect();
  return Math.abs(o - n) < 1 ? [o, s, l - e.x, u - e.y] : [n, r, a, i];
}, $5 = te({
  compatConfig: {
    MODE: 3
  },
  name: "TabNavList",
  inheritAttrs: !1,
  props: HOe(),
  slots: Object,
  emits: ["tabClick", "tabScroll"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      tabs: i,
      prefixCls: a
    } = dX(), o = ae(), s = ae(), l = ae(), u = ae(), [c, f] = QOe(), d = L(() => t.tabPosition === "top" || t.tabPosition === "bottom"), [h, p] = T5(0, (be, he) => {
      d.value && t.onTabScroll && t.onTabScroll({
        direction: be > he ? "left" : "right"
      });
    }), [v, g] = T5(0, (be, he) => {
      !d.value && t.onTabScroll && t.onTabScroll({
        direction: be > he ? "top" : "bottom"
      });
    }), [m, y] = fn(0), [b, _] = fn(0), [O, S] = fn(null), [x, C] = fn(null), [T, w] = fn(0), [P, $] = fn(0), [A, D] = LOe(/* @__PURE__ */ new Map()), E = BOe(i, A), R = L(() => `${a.value}-nav-operations-hidden`), N = ae(0), V = ae(0);
    ht(() => {
      d.value ? t.rtl ? (N.value = 0, V.value = Math.max(0, m.value - O.value)) : (N.value = Math.min(0, O.value - m.value), V.value = 0) : (N.value = Math.min(0, x.value - b.value), V.value = 0);
    });
    const z = (be) => be < N.value ? N.value : be > V.value ? V.value : be, W = ae(), [F, Q] = fn(), Z = () => {
      Q(Date.now());
    }, ne = () => {
      clearTimeout(W.value);
    }, ee = (be, he) => {
      be((Te) => z(Te + he));
    };
    WOe(o, (be, he) => {
      if (d.value) {
        if (O.value >= m.value)
          return !1;
        ee(p, be);
      } else {
        if (x.value >= b.value)
          return !1;
        ee(g, he);
      }
      return ne(), Z(), !0;
    }), se(F, () => {
      ne(), F.value && (W.value = setTimeout(() => {
        Q(0);
      }, 100));
    });
    const oe = function() {
      let be = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.activeKey;
      const he = E.value.get(be) || {
        width: 0,
        height: 0,
        left: 0,
        right: 0,
        top: 0
      };
      if (d.value) {
        let Te = h.value;
        t.rtl ? he.right < h.value ? Te = he.right : he.right + he.width > h.value + O.value && (Te = he.right + he.width - O.value) : he.left < -h.value ? Te = -he.left : he.left + he.width > -h.value + O.value && (Te = -(he.left + he.width - O.value)), g(0), p(z(Te));
      } else {
        let Te = v.value;
        he.top < -v.value ? Te = -he.top : he.top + he.height > -v.value + x.value && (Te = -(he.top + he.height - x.value)), p(0), g(z(Te));
      }
    }, K = ae(0), ie = ae(0);
    ht(() => {
      let be, he, Te, ze, ut, ct;
      const Dt = E.value;
      ["top", "bottom"].includes(t.tabPosition) ? (be = "width", ze = O.value, ut = m.value, ct = T.value, he = t.rtl ? "right" : "left", Te = Math.abs(h.value)) : (be = "height", ze = x.value, ut = m.value, ct = P.value, he = "top", Te = -v.value);
      let ve = ze;
      ut + ct > ze && ut < ze && (ve = ze - ct);
      const Xe = i.value;
      if (!Xe.length)
        return [K.value, ie.value] = [0, 0];
      const Rt = Xe.length;
      let An = Rt;
      for (let $r = 0; $r < Rt; $r += 1) {
        const Va = Dt.get(Xe[$r].key) || P5;
        if (Va[he] + Va[be] > Te + ve) {
          An = $r - 1;
          break;
        }
      }
      let sn = 0;
      for (let $r = Rt - 1; $r >= 0; $r -= 1)
        if ((Dt.get(Xe[$r].key) || P5)[he] < Te) {
          sn = $r + 1;
          break;
        }
      return [K.value, ie.value] = [sn, An];
    });
    const X = () => {
      D(() => {
        var be;
        const he = /* @__PURE__ */ new Map(), Te = (be = s.value) === null || be === void 0 ? void 0 : be.getBoundingClientRect();
        return i.value.forEach((ze) => {
          let {
            key: ut
          } = ze;
          const ct = f.value.get(ut), Dt = (ct == null ? void 0 : ct.$el) || ct;
          if (Dt) {
            const [ve, Xe, Rt, An] = GOe(Dt, Te);
            he.set(ut, {
              width: ve,
              height: Xe,
              left: Rt,
              top: An
            });
          }
        }), he;
      });
    };
    se(() => i.value.map((be) => be.key).join("%%"), () => {
      X();
    }, {
      flush: "post"
    });
    const H = () => {
      var be, he, Te, ze, ut;
      const ct = ((be = o.value) === null || be === void 0 ? void 0 : be.offsetWidth) || 0, Dt = ((he = o.value) === null || he === void 0 ? void 0 : he.offsetHeight) || 0, ve = ((Te = u.value) === null || Te === void 0 ? void 0 : Te.$el) || {}, Xe = ve.offsetWidth || 0, Rt = ve.offsetHeight || 0;
      S(ct), C(Dt), w(Xe), $(Rt);
      const An = (((ze = s.value) === null || ze === void 0 ? void 0 : ze.offsetWidth) || 0) - Xe, sn = (((ut = s.value) === null || ut === void 0 ? void 0 : ut.offsetHeight) || 0) - Rt;
      y(An), _(sn), X();
    }, G = L(() => [...i.value.slice(0, K.value), ...i.value.slice(ie.value + 1)]), [re, fe] = fn(), de = L(() => E.value.get(t.activeKey)), Ee = ae(), $e = () => {
      xt.cancel(Ee.value);
    };
    se([de, d, () => t.rtl], () => {
      const be = {};
      de.value && (d.value ? (t.rtl ? be.right = Wp(de.value.right) : be.left = Wp(de.value.left), be.width = Wp(de.value.width)) : (be.top = Wp(de.value.top), be.height = Wp(de.value.height))), $e(), Ee.value = xt(() => {
        fe(be);
      });
    }), se([() => t.activeKey, de, E, d], () => {
      oe();
    }, {
      flush: "post"
    }), se([() => t.rtl, () => t.tabBarGutter, () => t.activeKey, () => i.value], () => {
      H();
    }, {
      flush: "post"
    });
    const Se = (be) => {
      let {
        position: he,
        prefixCls: Te,
        extra: ze
      } = be;
      if (!ze) return null;
      const ut = ze == null ? void 0 : ze({
        position: he
      });
      return ut ? M("div", {
        class: `${Te}-extra-content`
      }, [ut]) : null;
    };
    return yt(() => {
      ne(), $e();
    }), () => {
      const {
        id: be,
        animated: he,
        activeKey: Te,
        rtl: ze,
        editable: ut,
        locale: ct,
        tabPosition: Dt,
        tabBarGutter: ve,
        onTabClick: Xe
      } = t, {
        class: Rt,
        style: An
      } = n, sn = a.value, $r = !!G.value.length, Va = `${sn}-nav-wrap`;
      let Bp, zp, py, Hw;
      d.value ? ze ? (zp = h.value > 0, Bp = h.value + O.value < m.value) : (Bp = h.value < 0, zp = -h.value + O.value < m.value) : (py = v.value < 0, Hw = -v.value + x.value < b.value);
      const Gf = {};
      Dt === "top" || Dt === "bottom" ? Gf[ze ? "marginRight" : "marginLeft"] = typeof ve == "number" ? `${ve}px` : ve : Gf.marginTop = typeof ve == "number" ? `${ve}px` : ve;
      const Gw = i.value.map((Vp, jw) => {
        const {
          key: jf
        } = Vp;
        return M(NOe, {
          id: be,
          prefixCls: sn,
          key: jf,
          tab: Vp,
          style: jw === 0 ? void 0 : Gf,
          closable: Vp.closable,
          editable: ut,
          active: jf === Te,
          removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
          ref: c(jf),
          onClick: (F4) => {
            Xe(jf, F4);
          },
          onFocus: () => {
            oe(jf), Z(), o.value && (ze || (o.value.scrollLeft = 0), o.value.scrollTop = 0);
          }
        }, r);
      });
      return M("div", {
        role: "tablist",
        class: ye(`${sn}-nav`, Rt),
        style: An,
        onKeydown: () => {
          Z();
        }
      }, [M(Se, {
        position: "left",
        prefixCls: sn,
        extra: r.leftExtra
      }, null), M(ph, {
        onResize: H
      }, {
        default: () => [M("div", {
          class: ye(Va, {
            [`${Va}-ping-left`]: Bp,
            [`${Va}-ping-right`]: zp,
            [`${Va}-ping-top`]: py,
            [`${Va}-ping-bottom`]: Hw
          }),
          ref: o
        }, [M(ph, {
          onResize: H
        }, {
          default: () => [M("div", {
            ref: s,
            class: `${sn}-nav-list`,
            style: {
              transform: `translate(${h.value}px, ${v.value}px)`,
              transition: F.value ? "none" : void 0
            }
          }, [Gw, M(uX, {
            ref: u,
            prefixCls: sn,
            locale: ct,
            editable: ut,
            style: I(I({}, Gw.length === 0 ? void 0 : Gf), {
              visibility: $r ? "hidden" : null
            })
          }, null), M("div", {
            class: ye(`${sn}-ink-bar`, {
              [`${sn}-ink-bar-animated`]: he.inkBar
            }),
            style: re.value
          }, null)])]
        })])]
      }), M(VOe, j(j({}, t), {}, {
        removeAriaLabel: ct == null ? void 0 : ct.removeAriaLabel,
        ref: l,
        prefixCls: sn,
        tabs: G.value,
        class: !$r && R.value
      }), am(r, ["moreIcon"])), M(Se, {
        position: "right",
        prefixCls: sn,
        extra: r.rightExtra
      }, null), M(Se, {
        position: "right",
        prefixCls: sn,
        extra: r.tabBarExtraContent
      }, null)]);
    };
  }
}), jOe = te({
  compatConfig: {
    MODE: 3
  },
  name: "TabPanelList",
  inheritAttrs: !1,
  props: {
    activeKey: {
      type: [String, Number]
    },
    id: {
      type: String
    },
    rtl: {
      type: Boolean
    },
    animated: {
      type: Object,
      default: void 0
    },
    tabPosition: {
      type: String
    },
    destroyInactiveTabPane: {
      type: Boolean
    }
  },
  setup(t) {
    const {
      tabs: e,
      prefixCls: n
    } = dX();
    return () => {
      const {
        id: r,
        activeKey: i,
        animated: a,
        tabPosition: o,
        rtl: s,
        destroyInactiveTabPane: l
      } = t, u = a.tabPane, c = n.value, f = e.value.findIndex((d) => d.key === i);
      return M("div", {
        class: `${c}-content-holder`
      }, [M("div", {
        class: [`${c}-content`, `${c}-content-${o}`, {
          [`${c}-content-animated`]: u
        }],
        style: f && u ? {
          [s ? "marginRight" : "marginLeft"]: `-${f}00%`
        } : null
      }, [e.value.map((d) => Pn(d.node, {
        key: d.key,
        prefixCls: c,
        tabKey: d.key,
        id: r,
        animated: u,
        active: d.key === i,
        destroyInactiveTabPane: l
      }))])]);
    };
  }
});
var ZOe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" };
function A5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      UOe(t, i, n[i]);
    });
  }
  return t;
}
function UOe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var yx = function(e, n) {
  var r = A5({}, e, n.attrs);
  return M(lt, A5({}, r, {
    icon: ZOe
  }), null);
};
yx.displayName = "PlusOutlined";
yx.inheritAttrs = !1;
const XOe = (t) => {
  const {
    componentCls: e,
    motionDurationSlow: n
  } = t;
  return [
    {
      [e]: {
        [`${e}-switch`]: {
          "&-appear, &-enter": {
            transition: "none",
            "&-start": {
              opacity: 0
            },
            "&-active": {
              opacity: 1,
              transition: `opacity ${n}`
            }
          },
          "&-leave": {
            position: "absolute",
            transition: "none",
            inset: 0,
            "&-start": {
              opacity: 1
            },
            "&-active": {
              opacity: 0,
              transition: `opacity ${n}`
            }
          }
        }
      }
    },
    // Follow code may reuse in other components
    [Ch(t, "slide-up"), Ch(t, "slide-down")]
  ];
}, YOe = (t) => {
  const {
    componentCls: e,
    tabsCardHorizontalPadding: n,
    tabsCardHeadBackground: r,
    tabsCardGutter: i,
    colorSplit: a
  } = t;
  return {
    [`${e}-card`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-tab`]: {
          margin: 0,
          padding: n,
          background: r,
          border: `${t.lineWidth}px ${t.lineType} ${a}`,
          transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`
        },
        [`${e}-tab-active`]: {
          color: t.colorPrimary,
          background: t.colorBgContainer
        },
        [`${e}-ink-bar`]: {
          visibility: "hidden"
        }
      },
      // ========================== Top & Bottom ==========================
      [`&${e}-top, &${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginLeft: {
              _skip_check_: !0,
              value: `${i}px`
            }
          }
        }
      },
      [`&${e}-top`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`
          },
          [`${e}-tab-active`]: {
            borderBottomColor: t.colorBgContainer
          }
        }
      },
      [`&${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`
          },
          [`${e}-tab-active`]: {
            borderTopColor: t.colorBgContainer
          }
        }
      },
      // ========================== Left & Right ==========================
      [`&${e}-left, &${e}-right`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginTop: `${i}px`
          }
        }
      },
      [`&${e}-left`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`
            }
          },
          [`${e}-tab-active`]: {
            borderRightColor: {
              _skip_check_: !0,
              value: t.colorBgContainer
            }
          }
        }
      },
      [`&${e}-right`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`
            }
          },
          [`${e}-tab-active`]: {
            borderLeftColor: {
              _skip_check_: !0,
              value: t.colorBgContainer
            }
          }
        }
      }
    }
  };
}, qOe = (t) => {
  const {
    componentCls: e,
    tabsHoverColor: n,
    dropdownEdgeChildVerticalPadding: r
  } = t;
  return {
    [`${e}-dropdown`]: I(I({}, nn(t)), {
      position: "absolute",
      top: -9999,
      left: {
        _skip_check_: !0,
        value: -9999
      },
      zIndex: t.zIndexPopup,
      display: "block",
      "&-hidden": {
        display: "none"
      },
      [`${e}-dropdown-menu`]: {
        maxHeight: t.tabsDropdownHeight,
        margin: 0,
        padding: `${r}px 0`,
        overflowX: "hidden",
        overflowY: "auto",
        textAlign: {
          _skip_check_: !0,
          value: "left"
        },
        listStyleType: "none",
        backgroundColor: t.colorBgContainer,
        backgroundClip: "padding-box",
        borderRadius: t.borderRadiusLG,
        outline: "none",
        boxShadow: t.boxShadowSecondary,
        "&-item": I(I({}, mh), {
          display: "flex",
          alignItems: "center",
          minWidth: t.tabsDropdownWidth,
          margin: 0,
          padding: `${t.paddingXXS}px ${t.paddingSM}px`,
          color: t.colorText,
          fontWeight: "normal",
          fontSize: t.fontSize,
          lineHeight: t.lineHeight,
          cursor: "pointer",
          transition: `all ${t.motionDurationSlow}`,
          "> span": {
            flex: 1,
            whiteSpace: "nowrap"
          },
          "&-remove": {
            flex: "none",
            marginLeft: {
              _skip_check_: !0,
              value: t.marginSM
            },
            color: t.colorTextDescription,
            fontSize: t.fontSizeSM,
            background: "transparent",
            border: 0,
            cursor: "pointer",
            "&:hover": {
              color: n
            }
          },
          "&:hover": {
            background: t.controlItemBgHover
          },
          "&-disabled": {
            "&, &:hover": {
              color: t.colorTextDisabled,
              background: "transparent",
              cursor: "not-allowed"
            }
          }
        })
      }
    })
  };
}, KOe = (t) => {
  const {
    componentCls: e,
    margin: n,
    colorSplit: r
  } = t;
  return {
    // ========================== Top & Bottom ==========================
    [`${e}-top, ${e}-bottom`]: {
      flexDirection: "column",
      [`> ${e}-nav, > div > ${e}-nav`]: {
        margin: `0 0 ${n}px 0`,
        "&::before": {
          position: "absolute",
          right: {
            _skip_check_: !0,
            value: 0
          },
          left: {
            _skip_check_: !0,
            value: 0
          },
          borderBottom: `${t.lineWidth}px ${t.lineType} ${r}`,
          content: "''"
        },
        [`${e}-ink-bar`]: {
          height: t.lineWidthBold,
          "&-animated": {
            transition: `width ${t.motionDurationSlow}, left ${t.motionDurationSlow},
            right ${t.motionDurationSlow}`
          }
        },
        [`${e}-nav-wrap`]: {
          "&::before, &::after": {
            top: 0,
            bottom: 0,
            width: t.controlHeight
          },
          "&::before": {
            left: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: t.boxShadowTabsOverflowLeft
          },
          "&::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            boxShadow: t.boxShadowTabsOverflowRight
          },
          [`&${e}-nav-wrap-ping-left::before`]: {
            opacity: 1
          },
          [`&${e}-nav-wrap-ping-right::after`]: {
            opacity: 1
          }
        }
      }
    },
    [`${e}-top`]: {
      [`> ${e}-nav,
        > div > ${e}-nav`]: {
        "&::before": {
          bottom: 0
        },
        [`${e}-ink-bar`]: {
          bottom: 0
        }
      }
    },
    [`${e}-bottom`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        order: 1,
        marginTop: `${n}px`,
        marginBottom: 0,
        "&::before": {
          top: 0
        },
        [`${e}-ink-bar`]: {
          top: 0
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        order: 0
      }
    },
    // ========================== Left & Right ==========================
    [`${e}-left, ${e}-right`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        flexDirection: "column",
        minWidth: t.controlHeight * 1.25,
        // >>>>>>>>>>> Tab
        [`${e}-tab`]: {
          padding: `${t.paddingXS}px ${t.paddingLG}px`,
          textAlign: "center"
        },
        [`${e}-tab + ${e}-tab`]: {
          margin: `${t.margin}px 0 0 0`
        },
        // >>>>>>>>>>> Nav
        [`${e}-nav-wrap`]: {
          flexDirection: "column",
          "&::before, &::after": {
            right: {
              _skip_check_: !0,
              value: 0
            },
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: t.controlHeight
          },
          "&::before": {
            top: 0,
            boxShadow: t.boxShadowTabsOverflowTop
          },
          "&::after": {
            bottom: 0,
            boxShadow: t.boxShadowTabsOverflowBottom
          },
          [`&${e}-nav-wrap-ping-top::before`]: {
            opacity: 1
          },
          [`&${e}-nav-wrap-ping-bottom::after`]: {
            opacity: 1
          }
        },
        // >>>>>>>>>>> Ink Bar
        [`${e}-ink-bar`]: {
          width: t.lineWidthBold,
          "&-animated": {
            transition: `height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`
          }
        },
        [`${e}-nav-list, ${e}-nav-operations`]: {
          flex: "1 0 auto",
          flexDirection: "column"
        }
      }
    },
    [`${e}-left`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-ink-bar`]: {
          right: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        marginLeft: {
          _skip_check_: !0,
          value: `-${t.lineWidth}px`
        },
        borderLeft: {
          _skip_check_: !0,
          value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
        },
        [`> ${e}-content > ${e}-tabpane`]: {
          paddingLeft: {
            _skip_check_: !0,
            value: t.paddingLG
          }
        }
      }
    },
    [`${e}-right`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        order: 1,
        [`${e}-ink-bar`]: {
          left: {
            _skip_check_: !0,
            value: 0
          }
        }
      },
      [`> ${e}-content-holder, > div > ${e}-content-holder`]: {
        order: 0,
        marginRight: {
          _skip_check_: !0,
          value: -t.lineWidth
        },
        borderRight: {
          _skip_check_: !0,
          value: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
        },
        [`> ${e}-content > ${e}-tabpane`]: {
          paddingRight: {
            _skip_check_: !0,
            value: t.paddingLG
          }
        }
      }
    }
  };
}, JOe = (t) => {
  const {
    componentCls: e,
    padding: n
  } = t;
  return {
    [e]: {
      "&-small": {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXS}px 0`,
            fontSize: t.fontSize
          }
        }
      },
      "&-large": {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${n}px 0`,
            fontSize: t.fontSizeLG
          }
        }
      }
    },
    [`${e}-card`]: {
      [`&${e}-small`]: {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXXS * 1.5}px ${n}px`
          }
        },
        [`&${e}-bottom`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: `0 0 ${t.borderRadius}px ${t.borderRadius}px`
          }
        },
        [`&${e}-top`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: `${t.borderRadius}px ${t.borderRadius}px 0 0`
          }
        },
        [`&${e}-right`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `0 ${t.borderRadius}px ${t.borderRadius}px 0`
            }
          }
        },
        [`&${e}-left`]: {
          [`> ${e}-nav ${e}-tab`]: {
            borderRadius: {
              _skip_check_: !0,
              value: `${t.borderRadius}px 0 0 ${t.borderRadius}px`
            }
          }
        }
      },
      [`&${e}-large`]: {
        [`> ${e}-nav`]: {
          [`${e}-tab`]: {
            padding: `${t.paddingXS}px ${n}px ${t.paddingXXS * 1.5}px`
          }
        }
      }
    }
  };
}, eSe = (t) => {
  const {
    componentCls: e,
    tabsActiveColor: n,
    tabsHoverColor: r,
    iconCls: i,
    tabsHorizontalGutter: a
  } = t, o = `${e}-tab`;
  return {
    [o]: {
      position: "relative",
      display: "inline-flex",
      alignItems: "center",
      padding: `${t.paddingSM}px 0`,
      fontSize: `${t.fontSize}px`,
      background: "transparent",
      border: 0,
      outline: "none",
      cursor: "pointer",
      "&-btn, &-remove": I({
        "&:focus:not(:focus-visible), &:active": {
          color: n
        }
      }, VS(t)),
      "&-btn": {
        outline: "none",
        transition: "all 0.3s"
      },
      "&-remove": {
        flex: "none",
        marginRight: {
          _skip_check_: !0,
          value: -t.marginXXS
        },
        marginLeft: {
          _skip_check_: !0,
          value: t.marginXS
        },
        color: t.colorTextDescription,
        fontSize: t.fontSizeSM,
        background: "transparent",
        border: "none",
        outline: "none",
        cursor: "pointer",
        transition: `all ${t.motionDurationSlow}`,
        "&:hover": {
          color: t.colorTextHeading
        }
      },
      "&:hover": {
        color: r
      },
      [`&${o}-active ${o}-btn`]: {
        color: t.colorPrimary,
        textShadow: t.tabsActiveTextShadow
      },
      [`&${o}-disabled`]: {
        color: t.colorTextDisabled,
        cursor: "not-allowed"
      },
      [`&${o}-disabled ${o}-btn, &${o}-disabled ${e}-remove`]: {
        "&:focus, &:active": {
          color: t.colorTextDisabled
        }
      },
      [`& ${o}-remove ${i}`]: {
        margin: 0
      },
      [i]: {
        marginRight: {
          _skip_check_: !0,
          value: t.marginSM
        }
      }
    },
    [`${o} + ${o}`]: {
      margin: {
        _skip_check_: !0,
        value: `0 0 0 ${a}px`
      }
    }
  };
}, tSe = (t) => {
  const {
    componentCls: e,
    tabsHorizontalGutter: n,
    iconCls: r,
    tabsCardGutter: i
  } = t;
  return {
    [`${e}-rtl`]: {
      direction: "rtl",
      [`${e}-nav`]: {
        [`${e}-tab`]: {
          margin: {
            _skip_check_: !0,
            value: `0 0 0 ${n}px`
          },
          [`${e}-tab:last-of-type`]: {
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          },
          [r]: {
            marginRight: {
              _skip_check_: !0,
              value: 0
            },
            marginLeft: {
              _skip_check_: !0,
              value: `${t.marginSM}px`
            }
          },
          [`${e}-tab-remove`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${t.marginXS}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: `-${t.marginXXS}px`
            },
            [r]: {
              margin: 0
            }
          }
        }
      },
      [`&${e}-left`]: {
        [`> ${e}-nav`]: {
          order: 1
        },
        [`> ${e}-content-holder`]: {
          order: 0
        }
      },
      [`&${e}-right`]: {
        [`> ${e}-nav`]: {
          order: 0
        },
        [`> ${e}-content-holder`]: {
          order: 1
        }
      },
      // ====================== Card ======================
      [`&${e}-card${e}-top, &${e}-card${e}-bottom`]: {
        [`> ${e}-nav, > div > ${e}-nav`]: {
          [`${e}-tab + ${e}-tab`]: {
            marginRight: {
              _skip_check_: !0,
              value: `${i}px`
            },
            marginLeft: {
              _skip_check_: !0,
              value: 0
            }
          }
        }
      }
    },
    [`${e}-dropdown-rtl`]: {
      direction: "rtl"
    },
    [`${e}-menu-item`]: {
      [`${e}-dropdown-rtl`]: {
        textAlign: {
          _skip_check_: !0,
          value: "right"
        }
      }
    }
  };
}, nSe = (t) => {
  const {
    componentCls: e,
    tabsCardHorizontalPadding: n,
    tabsCardHeight: r,
    tabsCardGutter: i,
    tabsHoverColor: a,
    tabsActiveColor: o,
    colorSplit: s
  } = t;
  return {
    [e]: I(I(I(I({}, nn(t)), {
      display: "flex",
      // ========================== Navigation ==========================
      [`> ${e}-nav, > div > ${e}-nav`]: {
        position: "relative",
        display: "flex",
        flex: "none",
        alignItems: "center",
        [`${e}-nav-wrap`]: {
          position: "relative",
          display: "flex",
          flex: "auto",
          alignSelf: "stretch",
          overflow: "hidden",
          whiteSpace: "nowrap",
          transform: "translate(0)",
          // >>>>> Ping shadow
          "&::before, &::after": {
            position: "absolute",
            zIndex: 1,
            opacity: 0,
            transition: `opacity ${t.motionDurationSlow}`,
            content: "''",
            pointerEvents: "none"
          }
        },
        [`${e}-nav-list`]: {
          position: "relative",
          display: "flex",
          transition: `opacity ${t.motionDurationSlow}`
        },
        // >>>>>>>> Operations
        [`${e}-nav-operations`]: {
          display: "flex",
          alignSelf: "stretch"
        },
        [`${e}-nav-operations-hidden`]: {
          position: "absolute",
          visibility: "hidden",
          pointerEvents: "none"
        },
        [`${e}-nav-more`]: {
          position: "relative",
          padding: n,
          background: "transparent",
          border: 0,
          "&::after": {
            position: "absolute",
            right: {
              _skip_check_: !0,
              value: 0
            },
            bottom: 0,
            left: {
              _skip_check_: !0,
              value: 0
            },
            height: t.controlHeightLG / 8,
            transform: "translateY(100%)",
            content: "''"
          }
        },
        [`${e}-nav-add`]: I({
          minWidth: `${r}px`,
          marginLeft: {
            _skip_check_: !0,
            value: `${i}px`
          },
          padding: `0 ${t.paddingXS}px`,
          background: "transparent",
          border: `${t.lineWidth}px ${t.lineType} ${s}`,
          borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
          outline: "none",
          cursor: "pointer",
          color: t.colorText,
          transition: `all ${t.motionDurationSlow} ${t.motionEaseInOut}`,
          "&:hover": {
            color: a
          },
          "&:active, &:focus:not(:focus-visible)": {
            color: o
          }
        }, VS(t))
      },
      [`${e}-extra-content`]: {
        flex: "none"
      },
      // ============================ InkBar ============================
      [`${e}-ink-bar`]: {
        position: "absolute",
        background: t.colorPrimary,
        pointerEvents: "none"
      }
    }), eSe(t)), {
      // =========================== TabPanes ===========================
      [`${e}-content`]: {
        position: "relative",
        display: "flex",
        width: "100%",
        "&-animated": {
          transition: "margin 0.3s"
        }
      },
      [`${e}-content-holder`]: {
        flex: "auto",
        minWidth: 0,
        minHeight: 0
      },
      [`${e}-tabpane`]: {
        outline: "none",
        flex: "none",
        width: "100%"
      }
    }),
    [`${e}-centered`]: {
      [`> ${e}-nav, > div > ${e}-nav`]: {
        [`${e}-nav-wrap`]: {
          [`&:not([class*='${e}-nav-wrap-ping'])`]: {
            justifyContent: "center"
          }
        }
      }
    }
  };
}, rSe = Sn("Tabs", (t) => {
  const e = t.controlHeightLG, n = Bt(t, {
    tabsHoverColor: t.colorPrimaryHover,
    tabsActiveColor: t.colorPrimaryActive,
    tabsCardHorizontalPadding: `${(e - Math.round(t.fontSize * t.lineHeight)) / 2 - t.lineWidth}px ${t.padding}px`,
    tabsCardHeight: e,
    tabsCardGutter: t.marginXXS / 2,
    tabsHorizontalGutter: 32,
    tabsCardHeadBackground: t.colorFillAlter,
    dropdownEdgeChildVerticalPadding: t.paddingXXS,
    tabsActiveTextShadow: "0 0 0.25px currentcolor",
    tabsDropdownHeight: 200,
    tabsDropdownWidth: 120
  });
  return [JOe(n), tSe(n), KOe(n), qOe(n), YOe(n), nSe(n), XOe(n)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50
}));
let E5 = 0;
const hX = () => ({
  prefixCls: {
    type: String
  },
  id: {
    type: String
  },
  popupClassName: String,
  getPopupContainer: tt(),
  activeKey: {
    type: [String, Number]
  },
  defaultActiveKey: {
    type: [String, Number]
  },
  direction: hn(),
  animated: gn([Boolean, Object]),
  renderTabBar: tt(),
  tabBarGutter: {
    type: Number
  },
  tabBarStyle: $t(),
  tabPosition: hn(),
  destroyInactiveTabPane: nt(),
  hideAdd: Boolean,
  type: hn(),
  size: hn(),
  centered: Boolean,
  onEdit: tt(),
  onChange: tt(),
  onTabClick: tt(),
  onTabScroll: tt(),
  "onUpdate:activeKey": tt(),
  // Accessibility
  locale: $t(),
  onPrevClick: tt(),
  onNextClick: tt(),
  tabBarExtraContent: Y.any
});
function iSe(t) {
  return t.map((e) => {
    if (Ui(e)) {
      const n = I({}, e.props || {});
      for (const [d, h] of Object.entries(n))
        delete n[d], n[tI(d)] = h;
      const r = e.children || {}, i = e.key !== void 0 ? e.key : void 0, {
        tab: a = r.tab,
        disabled: o,
        forceRender: s,
        closable: l,
        animated: u,
        active: c,
        destroyInactiveTabPane: f
      } = n;
      return I(I({
        key: i
      }, n), {
        node: e,
        closeIcon: r.closeIcon,
        tab: a,
        disabled: o === "" || o,
        forceRender: s === "" || s,
        closable: l === "" || l,
        animated: u === "" || u,
        active: c === "" || c,
        destroyInactiveTabPane: f === "" || f
      });
    }
    return null;
  }).filter((e) => e);
}
const aSe = te({
  compatConfig: {
    MODE: 3
  },
  name: "InternalTabs",
  inheritAttrs: !1,
  props: I(I({}, sr(hX(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  })), {
    tabs: uf()
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    Qi(t.onPrevClick === void 0 && t.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), Qi(t.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), Qi(r.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");
    const {
      prefixCls: i,
      direction: a,
      size: o,
      rootPrefixCls: s,
      getPopupContainer: l
    } = It("tabs", t), [u, c] = rSe(i), f = L(() => a.value === "rtl"), d = L(() => {
      const {
        animated: x,
        tabPosition: C
      } = t;
      return x === !1 || ["left", "right"].includes(C) ? {
        inkBar: !1,
        tabPane: !1
      } : x === !0 ? {
        inkBar: !0,
        tabPane: !0
      } : I({
        inkBar: !0,
        tabPane: !1
      }, typeof x == "object" ? x : {});
    }), [h, p] = fn(!1);
    it(() => {
      p(AI());
    });
    const [v, g] = wh(() => {
      var x;
      return (x = t.tabs[0]) === null || x === void 0 ? void 0 : x.key;
    }, {
      value: L(() => t.activeKey),
      defaultValue: t.defaultActiveKey
    }), [m, y] = fn(() => t.tabs.findIndex((x) => x.key === v.value));
    ht(() => {
      var x;
      let C = t.tabs.findIndex((T) => T.key === v.value);
      C === -1 && (C = Math.max(0, Math.min(m.value, t.tabs.length - 1)), g((x = t.tabs[C]) === null || x === void 0 ? void 0 : x.key)), y(C);
    });
    const [b, _] = wh(null, {
      value: L(() => t.id)
    }), O = L(() => h.value && !["left", "right"].includes(t.tabPosition) ? "top" : t.tabPosition);
    it(() => {
      t.id || (_(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : E5}`), E5 += 1);
    });
    const S = (x, C) => {
      var T, w;
      (T = t.onTabClick) === null || T === void 0 || T.call(t, x, C);
      const P = x !== v.value;
      g(x), P && ((w = t.onChange) === null || w === void 0 || w.call(t, x));
    };
    return fX({
      tabs: L(() => t.tabs),
      prefixCls: i
    }), () => {
      const {
        id: x,
        type: C,
        tabBarGutter: T,
        tabBarStyle: w,
        locale: P,
        destroyInactiveTabPane: $,
        renderTabBar: A = r.renderTabBar,
        onTabScroll: D,
        hideAdd: E,
        centered: R
      } = t, N = {
        id: b.value,
        activeKey: v.value,
        animated: d.value,
        tabPosition: O.value,
        rtl: f.value,
        mobile: h.value
      };
      let V;
      C === "editable-card" && (V = {
        onEdit: (Q, Z) => {
          let {
            key: ne,
            event: ee
          } = Z;
          var oe;
          (oe = t.onEdit) === null || oe === void 0 || oe.call(t, Q === "add" ? ee : ne, Q);
        },
        removeIcon: () => M(al, null, null),
        addIcon: r.addIcon ? r.addIcon : () => M(yx, null, null),
        showAdd: E !== !0
      });
      let z;
      const W = I(I({}, N), {
        moreTransitionName: `${s.value}-slide-up`,
        editable: V,
        locale: P,
        tabBarGutter: T,
        onTabClick: S,
        onTabScroll: D,
        style: w,
        getPopupContainer: l.value,
        popupClassName: ye(t.popupClassName, c.value)
      });
      A ? z = A(I(I({}, W), {
        DefaultTabBar: $5
      })) : z = M($5, W, am(r, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"]));
      const F = i.value;
      return u(M("div", j(j({}, n), {}, {
        id: x,
        class: ye(F, `${F}-${O.value}`, {
          [c.value]: !0,
          [`${F}-${o.value}`]: o.value,
          [`${F}-card`]: ["card", "editable-card"].includes(C),
          [`${F}-editable-card`]: C === "editable-card",
          [`${F}-centered`]: R,
          [`${F}-mobile`]: h.value,
          [`${F}-editable`]: C === "editable-card",
          [`${F}-rtl`]: f.value
        }, n.class)
      }), [z, M(jOe, j(j({
        destroyInactiveTabPane: $
      }, N), {}, {
        animated: d.value
      }), null)]));
    };
  }
}), Uc = te({
  compatConfig: {
    MODE: 3
  },
  name: "ATabs",
  inheritAttrs: !1,
  props: sr(hX(), {
    tabPosition: "top",
    animated: {
      inkBar: !0,
      tabPane: !1
    }
  }),
  slots: Object,
  // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'],
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = (o) => {
      i("update:activeKey", o), i("change", o);
    };
    return () => {
      var o;
      const s = iSe(Yn((o = r.default) === null || o === void 0 ? void 0 : o.call(r)));
      return M(aSe, j(j(j({}, or(t, ["onUpdate:activeKey"])), n), {}, {
        onChange: a,
        tabs: s
      }), r);
    };
  }
}), oSe = () => ({
  tab: Y.any,
  disabled: {
    type: Boolean
  },
  forceRender: {
    type: Boolean
  },
  closable: {
    type: Boolean
  },
  animated: {
    type: Boolean
  },
  active: {
    type: Boolean
  },
  destroyInactiveTabPane: {
    type: Boolean
  },
  // Pass by TabPaneList
  prefixCls: {
    type: String
  },
  tabKey: {
    type: [String, Number]
  },
  id: {
    type: String
  }
  // closeIcon: PropTypes.any,
}), Fs = te({
  compatConfig: {
    MODE: 3
  },
  name: "ATabPane",
  inheritAttrs: !1,
  __ANT_TAB_PANE: !0,
  props: oSe(),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = U(t.forceRender);
    se([() => t.active, () => t.destroyInactiveTabPane], () => {
      t.active ? i.value = !0 : t.destroyInactiveTabPane && (i.value = !1);
    }, {
      immediate: !0
    });
    const a = L(() => t.active ? {} : t.animated ? {
      visibility: "hidden",
      height: 0,
      overflowY: "hidden"
    } : {
      display: "none"
    });
    return () => {
      var o;
      const {
        prefixCls: s,
        forceRender: l,
        id: u,
        active: c,
        tabKey: f
      } = t;
      return M("div", {
        id: u && `${u}-panel-${f}`,
        role: "tabpanel",
        tabindex: c ? 0 : -1,
        "aria-labelledby": u && `${u}-tab-${f}`,
        "aria-hidden": !c,
        style: [a.value, n.style],
        class: [`${s}-tabpane`, c && `${s}-tabpane-active`, n.class]
      }, [(c || i.value || l) && ((o = r.default) === null || o === void 0 ? void 0 : o.call(r))]);
    };
  }
});
Uc.TabPane = Fs;
Uc.install = function(t) {
  return t.component(Uc.name, Uc), t.component(Fs.name, Fs), t;
};
const sSe = () => ({
  prefixCls: String,
  activeKey: gn([Array, Number, String]),
  defaultActiveKey: gn([Array, Number, String]),
  accordion: nt(),
  destroyInactivePanel: nt(),
  bordered: nt(),
  expandIcon: tt(),
  openAnimation: Y.object,
  expandIconPosition: hn(),
  collapsible: hn(),
  ghost: nt(),
  onChange: tt(),
  "onUpdate:activeKey": tt()
}), pX = () => ({
  openAnimation: Y.object,
  prefixCls: String,
  header: Y.any,
  headerClass: String,
  showArrow: nt(),
  isActive: nt(),
  destroyInactivePanel: nt(),
  /** @deprecated Use `collapsible="disabled"` instead */
  disabled: nt(),
  accordion: nt(),
  forceRender: nt(),
  expandIcon: tt(),
  extra: Y.any,
  panelKey: gn(),
  collapsible: hn(),
  role: String,
  onItemClick: tt()
}), lSe = (t) => {
  const {
    componentCls: e,
    collapseContentBg: n,
    padding: r,
    collapseContentPaddingHorizontal: i,
    collapseHeaderBg: a,
    collapseHeaderPadding: o,
    collapsePanelBorderRadius: s,
    lineWidth: l,
    lineType: u,
    colorBorder: c,
    colorText: f,
    colorTextHeading: d,
    colorTextDisabled: h,
    fontSize: p,
    lineHeight: v,
    marginSM: g,
    paddingSM: m,
    motionDurationSlow: y,
    fontSizeIcon: b
  } = t, _ = `${l}px ${u} ${c}`;
  return {
    [e]: I(I({}, nn(t)), {
      backgroundColor: a,
      border: _,
      borderBottom: 0,
      borderRadius: `${s}px`,
      "&-rtl": {
        direction: "rtl"
      },
      [`& > ${e}-item`]: {
        borderBottom: _,
        "&:last-child": {
          [`
            &,
            & > ${e}-header`]: {
            borderRadius: `0 0 ${s}px ${s}px`
          }
        },
        [`> ${e}-header`]: {
          position: "relative",
          display: "flex",
          flexWrap: "nowrap",
          alignItems: "flex-start",
          padding: o,
          color: d,
          lineHeight: v,
          cursor: "pointer",
          transition: `all ${y}, visibility 0s`,
          [`> ${e}-header-text`]: {
            flex: "auto"
          },
          "&:focus": {
            outline: "none"
          },
          // >>>>> Arrow
          [`${e}-expand-icon`]: {
            height: p * v,
            display: "flex",
            alignItems: "center",
            paddingInlineEnd: g
          },
          [`${e}-arrow`]: I(I({}, ip()), {
            fontSize: b,
            svg: {
              transition: `transform ${y}`
            }
          }),
          // >>>>> Text
          [`${e}-header-text`]: {
            marginInlineEnd: "auto"
          }
        },
        [`${e}-header-collapsible-only`]: {
          cursor: "default",
          [`${e}-header-text`]: {
            flex: "none",
            cursor: "pointer"
          },
          [`${e}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`${e}-icon-collapsible-only`]: {
          cursor: "default",
          [`${e}-expand-icon`]: {
            cursor: "pointer"
          }
        },
        [`&${e}-no-arrow`]: {
          [`> ${e}-header`]: {
            paddingInlineStart: m
          }
        }
      },
      [`${e}-content`]: {
        color: f,
        backgroundColor: n,
        borderTop: _,
        [`& > ${e}-content-box`]: {
          padding: `${r}px ${i}px`
        },
        "&-hidden": {
          display: "none"
        }
      },
      [`${e}-item:last-child`]: {
        [`> ${e}-content`]: {
          borderRadius: `0 0 ${s}px ${s}px`
        }
      },
      [`& ${e}-item-disabled > ${e}-header`]: {
        "\n          &,\n          & > .arrow\n        ": {
          color: h,
          cursor: "not-allowed"
        }
      },
      // ========================== Icon Position ==========================
      [`&${e}-icon-position-end`]: {
        [`& > ${e}-item`]: {
          [`> ${e}-header`]: {
            [`${e}-expand-icon`]: {
              order: 1,
              paddingInlineEnd: 0,
              paddingInlineStart: g
            }
          }
        }
      }
    })
  };
}, uSe = (t) => {
  const {
    componentCls: e
  } = t, n = `> ${e}-item > ${e}-header ${e}-arrow svg`;
  return {
    [`${e}-rtl`]: {
      [n]: {
        transform: "rotate(180deg)"
      }
    }
  };
}, cSe = (t) => {
  const {
    componentCls: e,
    collapseHeaderBg: n,
    paddingXXS: r,
    colorBorder: i
  } = t;
  return {
    [`${e}-borderless`]: {
      backgroundColor: n,
      border: 0,
      [`> ${e}-item`]: {
        borderBottom: `1px solid ${i}`
      },
      [`
        > ${e}-item:last-child,
        > ${e}-item:last-child ${e}-header
      `]: {
        borderRadius: 0
      },
      [`> ${e}-item:last-child`]: {
        borderBottom: 0
      },
      [`> ${e}-item > ${e}-content`]: {
        backgroundColor: "transparent",
        borderTop: 0
      },
      [`> ${e}-item > ${e}-content > ${e}-content-box`]: {
        paddingTop: r
      }
    }
  };
}, fSe = (t) => {
  const {
    componentCls: e,
    paddingSM: n
  } = t;
  return {
    [`${e}-ghost`]: {
      backgroundColor: "transparent",
      border: 0,
      [`> ${e}-item`]: {
        borderBottom: 0,
        [`> ${e}-content`]: {
          backgroundColor: "transparent",
          border: 0,
          [`> ${e}-content-box`]: {
            paddingBlock: n
          }
        }
      }
    }
  };
}, dSe = Sn("Collapse", (t) => {
  const e = Bt(t, {
    collapseContentBg: t.colorBgContainer,
    collapseHeaderBg: t.colorFillAlter,
    collapseHeaderPadding: `${t.paddingSM}px ${t.padding}px`,
    collapsePanelBorderRadius: t.borderRadiusLG,
    collapseContentPaddingHorizontal: 16
    // Fixed value
  });
  return [lSe(e), cSe(e), fSe(e), uSe(e), KI(e)];
});
function M5(t) {
  let e = t;
  if (!Array.isArray(e)) {
    const n = typeof e;
    e = n === "number" || n === "string" ? [e] : [];
  }
  return e.map((n) => String(n));
}
const cg = te({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapse",
  inheritAttrs: !1,
  props: sr(sSe(), {
    accordion: !1,
    destroyInactivePanel: !1,
    bordered: !0,
    expandIconPosition: "start"
  }),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = U(M5(DU([t.activeKey, t.defaultActiveKey])));
    se(() => t.activeKey, () => {
      a.value = M5(t.activeKey);
    }, {
      deep: !0
    });
    const {
      prefixCls: o,
      direction: s,
      rootPrefixCls: l
    } = It("collapse", t), [u, c] = dSe(o), f = L(() => {
      const {
        expandIconPosition: m
      } = t;
      return m !== void 0 ? m : s.value === "rtl" ? "end" : "start";
    }), d = (m) => {
      const {
        expandIcon: y = r.expandIcon
      } = t, b = y ? y(m) : M(px, {
        rotate: m.isActive ? 90 : void 0
      }, null);
      return M("div", {
        class: [`${o.value}-expand-icon`, c.value],
        onClick: () => ["header", "icon"].includes(t.collapsible) && p(m.panelKey)
      }, [Ui(Array.isArray(y) ? b[0] : b) ? Pn(b, {
        class: `${o.value}-arrow`
      }, !1) : b]);
    }, h = (m) => {
      t.activeKey === void 0 && (a.value = m);
      const y = t.accordion ? m[0] : m;
      i("update:activeKey", y), i("change", y);
    }, p = (m) => {
      let y = a.value;
      if (t.accordion)
        y = y[0] === m ? [] : [m];
      else {
        y = [...y];
        const b = y.indexOf(m);
        b > -1 ? y.splice(b, 1) : y.push(m);
      }
      h(y);
    }, v = (m, y) => {
      var b, _, O;
      if (nI(m)) return;
      const S = a.value, {
        accordion: x,
        destroyInactivePanel: C,
        collapsible: T,
        openAnimation: w
      } = t, P = w || sD(`${l.value}-motion-collapse`), $ = String((b = m.key) !== null && b !== void 0 ? b : y), {
        header: A = (O = (_ = m.children) === null || _ === void 0 ? void 0 : _.header) === null || O === void 0 ? void 0 : O.call(_),
        headerClass: D,
        collapsible: E,
        disabled: R
      } = m.props || {};
      let N = !1;
      x ? N = S[0] === $ : N = S.indexOf($) > -1;
      let V = E ?? T;
      (R || R === "") && (V = "disabled");
      const z = {
        key: $,
        panelKey: $,
        header: A,
        headerClass: D,
        isActive: N,
        prefixCls: o.value,
        destroyInactivePanel: C,
        openAnimation: P,
        accordion: x,
        onItemClick: V === "disabled" ? null : p,
        expandIcon: d,
        collapsible: V
      };
      return Pn(m, z);
    }, g = () => {
      var m;
      return Yn((m = r.default) === null || m === void 0 ? void 0 : m.call(r)).map(v);
    };
    return () => {
      const {
        accordion: m,
        bordered: y,
        ghost: b
      } = t, _ = ye(o.value, {
        [`${o.value}-borderless`]: !y,
        [`${o.value}-icon-position-${f.value}`]: !0,
        [`${o.value}-rtl`]: s.value === "rtl",
        [`${o.value}-ghost`]: !!b,
        [n.class]: !!n.class
      }, c.value);
      return u(M("div", j(j({
        class: _
      }, lue(n)), {}, {
        style: n.style,
        role: m ? "tablist" : null
      }), [g()]));
    };
  }
}), hSe = te({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: pX(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ae(!1);
    return ht(() => {
      (t.isActive || t.forceRender) && (r.value = !0);
    }), () => {
      var i;
      if (!r.value) return null;
      const {
        prefixCls: a,
        isActive: o,
        role: s
      } = t;
      return M("div", {
        class: ye(`${a}-content`, {
          [`${a}-content-active`]: o,
          [`${a}-content-inactive`]: !o
        }),
        role: s
      }, [M("div", {
        class: `${a}-content-box`
      }, [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)])]);
    };
  }
}), B1 = te({
  compatConfig: {
    MODE: 3
  },
  name: "ACollapsePanel",
  inheritAttrs: !1,
  props: sr(pX(), {
    showArrow: !0,
    isActive: !1,
    onItemClick() {
    },
    headerClass: "",
    forceRender: !1
  }),
  slots: Object,
  // emits: ['itemClick'],
  setup(t, e) {
    let {
      slots: n,
      emit: r,
      attrs: i
    } = e;
    Qi(t.disabled === void 0, "Collapse.Panel", '`disabled` is deprecated. Please use `collapsible="disabled"` instead.');
    const {
      prefixCls: a
    } = It("collapse", t), o = () => {
      r("itemClick", t.panelKey);
    }, s = (l) => {
      (l.key === "Enter" || l.keyCode === 13 || l.which === 13) && o();
    };
    return () => {
      var l, u;
      const {
        header: c = (l = n.header) === null || l === void 0 ? void 0 : l.call(n),
        headerClass: f,
        isActive: d,
        showArrow: h,
        destroyInactivePanel: p,
        accordion: v,
        forceRender: g,
        openAnimation: m,
        expandIcon: y = n.expandIcon,
        extra: b = (u = n.extra) === null || u === void 0 ? void 0 : u.call(n),
        collapsible: _
      } = t, O = _ === "disabled", S = a.value, x = ye(`${S}-header`, {
        [f]: f,
        [`${S}-header-collapsible-only`]: _ === "header",
        [`${S}-icon-collapsible-only`]: _ === "icon"
      }), C = ye({
        [`${S}-item`]: !0,
        [`${S}-item-active`]: d,
        [`${S}-item-disabled`]: O,
        [`${S}-no-arrow`]: !h,
        [`${i.class}`]: !!i.class
      });
      let T = M("i", {
        class: "arrow"
      }, null);
      h && typeof y == "function" && (T = y(t));
      const w = bi(M(hSe, {
        prefixCls: S,
        isActive: d,
        forceRender: g,
        role: v ? "tabpanel" : null
      }, {
        default: n.default
      }), [[Bs, d]]), P = I({
        appear: !1,
        css: !1
      }, m);
      return M("div", j(j({}, i), {}, {
        class: C
      }), [M("div", {
        class: x,
        onClick: () => !["header", "icon"].includes(_) && o(),
        role: v ? "tab" : "button",
        tabindex: O ? -1 : 0,
        "aria-expanded": d,
        onKeypress: s
      }, [h && T, M("span", {
        onClick: () => _ === "header" && o(),
        class: `${S}-header-text`
      }, [c]), b && M("div", {
        class: `${S}-extra`
      }, [b])]), M(co, P, {
        default: () => [!p || d ? w : null]
      })]);
    };
  }
});
cg.Panel = B1;
cg.install = function(t) {
  return t.component(cg.name, cg), t.component(B1.name, B1), t;
};
var pSe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" };
function I5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      vSe(t, i, n[i]);
    });
  }
  return t;
}
function vSe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var uD = function(e, n) {
  var r = I5({}, e, n.attrs);
  return M(lt, I5({}, r, {
    icon: pSe
  }), null);
};
uD.displayName = "LeftOutlined";
uD.inheritAttrs = !1;
const vX = () => wa() && window.document.documentElement;
let Dy;
const gSe = () => {
  if (!vX())
    return !1;
  if (Dy !== void 0)
    return Dy;
  const t = document.createElement("div");
  return t.style.display = "flex", t.style.flexDirection = "column", t.style.rowGap = "1px", t.appendChild(document.createElement("div")), t.appendChild(document.createElement("div")), document.body.appendChild(t), Dy = t.scrollHeight === 1, document.body.removeChild(t), Dy;
}, mSe = () => {
  const t = ae(!1);
  return it(() => {
    t.value = gSe();
  }), t;
}, gX = Symbol("rowContextKey"), ySe = (t) => {
  pt(gX, t);
}, bSe = () => Ge(gX, {
  gutter: L(() => {
  }),
  wrap: L(() => {
  }),
  supportFlexGap: L(() => {
  })
}), _Se = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // Grid system
    [e]: {
      display: "flex",
      flexFlow: "row wrap",
      minWidth: 0,
      "&::before, &::after": {
        display: "flex"
      },
      "&-no-wrap": {
        flexWrap: "nowrap"
      },
      // The origin of the X-axis
      "&-start": {
        justifyContent: "flex-start"
      },
      // The center of the X-axis
      "&-center": {
        justifyContent: "center"
      },
      // The opposite of the X-axis
      "&-end": {
        justifyContent: "flex-end"
      },
      "&-space-between": {
        justifyContent: "space-between"
      },
      "&-space-around ": {
        justifyContent: "space-around"
      },
      "&-space-evenly ": {
        justifyContent: "space-evenly"
      },
      // Align at the top
      "&-top": {
        alignItems: "flex-start"
      },
      // Align at the center
      "&-middle": {
        alignItems: "center"
      },
      "&-bottom": {
        alignItems: "flex-end"
      }
    }
  };
}, OSe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // Grid system
    [e]: {
      position: "relative",
      maxWidth: "100%",
      // Prevent columns from collapsing when empty
      minHeight: 1
    }
  };
}, SSe = (t, e) => {
  const {
    componentCls: n,
    gridColumns: r
  } = t, i = {};
  for (let a = r; a >= 0; a--)
    a === 0 ? (i[`${n}${e}-${a}`] = {
      display: "none"
    }, i[`${n}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${e}-push-${a}`] = {
      insetInlineStart: "auto"
    }, i[`${n}${e}-pull-${a}`] = {
      insetInlineEnd: "auto"
    }, i[`${n}${e}-offset-${a}`] = {
      marginInlineEnd: 0
    }, i[`${n}${e}-order-${a}`] = {
      order: 0
    }) : (i[`${n}${e}-${a}`] = {
      display: "block",
      flex: `0 0 ${a / r * 100}%`,
      maxWidth: `${a / r * 100}%`
    }, i[`${n}${e}-push-${a}`] = {
      insetInlineStart: `${a / r * 100}%`
    }, i[`${n}${e}-pull-${a}`] = {
      insetInlineEnd: `${a / r * 100}%`
    }, i[`${n}${e}-offset-${a}`] = {
      marginInlineStart: `${a / r * 100}%`
    }, i[`${n}${e}-order-${a}`] = {
      order: a
    });
  return i;
}, B2 = (t, e) => SSe(t, e), xSe = (t, e, n) => ({
  [`@media (min-width: ${e}px)`]: I({}, B2(t, n))
}), wSe = Sn("Grid", (t) => [_Se(t)]), CSe = Sn("Grid", (t) => {
  const e = Bt(t, {
    gridColumns: 24
    // Row is divided into 24 parts in Grid
  }), n = {
    "-sm": e.screenSMMin,
    "-md": e.screenMDMin,
    "-lg": e.screenLGMin,
    "-xl": e.screenXLMin,
    "-xxl": e.screenXXLMin
  };
  return [OSe(e), B2(e, ""), B2(e, "-xs"), Object.keys(n).map((r) => xSe(e, n[r], r)).reduce((r, i) => I(I({}, r), i), {})];
}), TSe = () => ({
  align: gn([String, Object]),
  justify: gn([String, Object]),
  prefixCls: String,
  gutter: gn([Number, Array, Object], 0),
  wrap: {
    type: Boolean,
    default: void 0
  }
}), PSe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ARow",
  inheritAttrs: !1,
  props: TSe(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = It("row", t), [o, s] = wSe(i);
    let l;
    const u = j_e(), c = U({
      xs: !0,
      sm: !0,
      md: !0,
      lg: !0,
      xl: !0,
      xxl: !0
    }), f = U({
      xs: !1,
      sm: !1,
      md: !1,
      lg: !1,
      xl: !1,
      xxl: !1
    }), d = (b) => L(() => {
      if (typeof t[b] == "string")
        return t[b];
      if (typeof t[b] != "object")
        return "";
      for (let _ = 0; _ < $y.length; _++) {
        const O = $y[_];
        if (!f.value[O]) continue;
        const S = t[b][O];
        if (S !== void 0)
          return S;
      }
      return "";
    }), h = d("align"), p = d("justify"), v = mSe();
    it(() => {
      l = u.value.subscribe((b) => {
        f.value = b;
        const _ = t.gutter || 0;
        (!Array.isArray(_) && typeof _ == "object" || Array.isArray(_) && (typeof _[0] == "object" || typeof _[1] == "object")) && (c.value = b);
      });
    }), yt(() => {
      u.value.unsubscribe(l);
    });
    const g = L(() => {
      const b = [void 0, void 0], {
        gutter: _ = 0
      } = t;
      return (Array.isArray(_) ? _ : [_, void 0]).forEach((S, x) => {
        if (typeof S == "object")
          for (let C = 0; C < $y.length; C++) {
            const T = $y[C];
            if (c.value[T] && S[T] !== void 0) {
              b[x] = S[T];
              break;
            }
          }
        else
          b[x] = S;
      }), b;
    });
    ySe({
      gutter: g,
      supportFlexGap: v,
      wrap: L(() => t.wrap)
    });
    const m = L(() => ye(i.value, {
      [`${i.value}-no-wrap`]: t.wrap === !1,
      [`${i.value}-${p.value}`]: p.value,
      [`${i.value}-${h.value}`]: h.value,
      [`${i.value}-rtl`]: a.value === "rtl"
    }, r.class, s.value)), y = L(() => {
      const b = g.value, _ = {}, O = b[0] != null && b[0] > 0 ? `${b[0] / -2}px` : void 0, S = b[1] != null && b[1] > 0 ? `${b[1] / -2}px` : void 0;
      return O && (_.marginLeft = O, _.marginRight = O), v.value ? _.rowGap = `${b[1]}px` : S && (_.marginTop = S, _.marginBottom = S), _;
    });
    return () => {
      var b;
      return o(M("div", j(j({}, r), {}, {
        class: m.value,
        style: I(I({}, y.value), r.style)
      }), [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)]));
    };
  }
});
function Ic() {
  return Ic = Object.assign ? Object.assign.bind() : function(t) {
    for (var e = 1; e < arguments.length; e++) {
      var n = arguments[e];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
    }
    return t;
  }, Ic.apply(this, arguments);
}
function $Se(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, om(t, e);
}
function z2(t) {
  return z2 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, z2(t);
}
function om(t, e) {
  return om = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
    return r.__proto__ = i, r;
  }, om(t, e);
}
function ASe() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function P_(t, e, n) {
  return ASe() ? P_ = Reflect.construct.bind() : P_ = function(i, a, o) {
    var s = [null];
    s.push.apply(s, a);
    var l = Function.bind.apply(i, s), u = new l();
    return o && om(u, o.prototype), u;
  }, P_.apply(null, arguments);
}
function ESe(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function V2(t) {
  var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return V2 = function(r) {
    if (r === null || !ESe(r)) return r;
    if (typeof r != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof e < "u") {
      if (e.has(r)) return e.get(r);
      e.set(r, i);
    }
    function i() {
      return P_(r, arguments, z2(this).constructor);
    }
    return i.prototype = Object.create(r.prototype, {
      constructor: {
        value: i,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), om(i, r);
  }, V2(t);
}
var MSe = /%[sdj%]/g, mX = function() {
};
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (mX = function(e, n) {
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
    return typeof r == "string";
  }) && console.warn(e, n);
});
function F2(t) {
  if (!t || !t.length) return null;
  var e = {};
  return t.forEach(function(n) {
    var r = n.field;
    e[r] = e[r] || [], e[r].push(n);
  }), e;
}
function zi(t) {
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
    n[r - 1] = arguments[r];
  var i = 0, a = n.length;
  if (typeof t == "function")
    return t.apply(null, n);
  if (typeof t == "string") {
    var o = t.replace(MSe, function(s) {
      if (s === "%%")
        return "%";
      if (i >= a)
        return s;
      switch (s) {
        case "%s":
          return String(n[i++]);
        case "%d":
          return Number(n[i++]);
        case "%j":
          try {
            return JSON.stringify(n[i++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return s;
      }
    });
    return o;
  }
  return t;
}
function ISe(t) {
  return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
}
function Kn(t, e) {
  return !!(t == null || e === "array" && Array.isArray(t) && !t.length || ISe(e) && typeof t == "string" && !t);
}
function DSe(t, e, n) {
  var r = [], i = 0, a = t.length;
  function o(s) {
    r.push.apply(r, s || []), i++, i === a && n(r);
  }
  t.forEach(function(s) {
    e(s, o);
  });
}
function D5(t, e, n) {
  var r = 0, i = t.length;
  function a(o) {
    if (o && o.length) {
      n(o);
      return;
    }
    var s = r;
    r = r + 1, s < i ? e(t[s], a) : n([]);
  }
  a([]);
}
function RSe(t) {
  var e = [];
  return Object.keys(t).forEach(function(n) {
    e.push.apply(e, t[n] || []);
  }), e;
}
var R5 = /* @__PURE__ */ function(t) {
  $Se(e, t);
  function e(n, r) {
    var i;
    return i = t.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
  }
  return e;
}(/* @__PURE__ */ V2(Error));
function kSe(t, e, n, r, i) {
  if (e.first) {
    var a = new Promise(function(d, h) {
      var p = function(m) {
        return r(m), m.length ? h(new R5(m, F2(m))) : d(i);
      }, v = RSe(t);
      D5(v, n, p);
    });
    return a.catch(function(d) {
      return d;
    }), a;
  }
  var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], s = Object.keys(t), l = s.length, u = 0, c = [], f = new Promise(function(d, h) {
    var p = function(g) {
      if (c.push.apply(c, g), u++, u === l)
        return r(c), c.length ? h(new R5(c, F2(c))) : d(i);
    };
    s.length || (r(c), d(i)), s.forEach(function(v) {
      var g = t[v];
      o.indexOf(v) !== -1 ? D5(g, n, p) : DSe(g, n, p);
    });
  });
  return f.catch(function(d) {
    return d;
  }), f;
}
function LSe(t) {
  return !!(t && t.message !== void 0);
}
function NSe(t, e) {
  for (var n = t, r = 0; r < e.length; r++) {
    if (n == null)
      return n;
    n = n[e[r]];
  }
  return n;
}
function k5(t, e) {
  return function(n) {
    var r;
    return t.fullFields ? r = NSe(e, t.fullFields) : r = e[n.field || t.fullField], LSe(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: r,
      field: n.field || t.fullField
    };
  };
}
function L5(t, e) {
  if (e) {
    for (var n in e)
      if (e.hasOwnProperty(n)) {
        var r = e[n];
        typeof r == "object" && typeof t[n] == "object" ? t[n] = Ic({}, t[n], r) : t[n] = r;
      }
  }
  return t;
}
var yX = function(e, n, r, i, a, o) {
  e.required && (!r.hasOwnProperty(e.field) || Kn(n, o || e.type)) && i.push(zi(a.messages.required, e.fullField));
}, BSe = function(e, n, r, i, a) {
  (/^\s+$/.test(n) || n === "") && i.push(zi(a.messages.whitespace, e.fullField));
}, Ry, zSe = function() {
  if (Ry)
    return Ry;
  var t = "[a-fA-F\\d:]", e = function(_) {
    return _ && _.includeBoundaries ? "(?:(?<=\\s|^)(?=" + t + ")|(?<=" + t + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", i = (`
(?:
(?:` + r + ":){7}(?:" + r + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + r + ":){6}(?:" + n + "|:" + r + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), o = new RegExp("^" + n + "$"), s = new RegExp("^" + i + "$"), l = function(_) {
    return _ && _.exact ? a : new RegExp("(?:" + e(_) + n + e(_) + ")|(?:" + e(_) + i + e(_) + ")", "g");
  };
  l.v4 = function(b) {
    return b && b.exact ? o : new RegExp("" + e(b) + n + e(b), "g");
  }, l.v6 = function(b) {
    return b && b.exact ? s : new RegExp("" + e(b) + i + e(b), "g");
  };
  var u = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", f = l.v4().source, d = l.v6().source, h = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", v = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', y = "(?:" + u + "|www\\.)" + c + "(?:localhost|" + f + "|" + d + "|" + h + p + v + ")" + g + m;
  return Ry = new RegExp("(?:^" + y + "$)", "i"), Ry;
}, N5 = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, Bv = {
  integer: function(e) {
    return Bv.number(e) && parseInt(e, 10) === e;
  },
  float: function(e) {
    return Bv.number(e) && !Bv.integer(e);
  },
  array: function(e) {
    return Array.isArray(e);
  },
  regexp: function(e) {
    if (e instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(e);
    } catch {
      return !1;
    }
  },
  date: function(e) {
    return typeof e.getTime == "function" && typeof e.getMonth == "function" && typeof e.getYear == "function" && !isNaN(e.getTime());
  },
  number: function(e) {
    return isNaN(e) ? !1 : typeof e == "number";
  },
  object: function(e) {
    return typeof e == "object" && !Bv.array(e);
  },
  method: function(e) {
    return typeof e == "function";
  },
  email: function(e) {
    return typeof e == "string" && e.length <= 320 && !!e.match(N5.email);
  },
  url: function(e) {
    return typeof e == "string" && e.length <= 2048 && !!e.match(zSe());
  },
  hex: function(e) {
    return typeof e == "string" && !!e.match(N5.hex);
  }
}, VSe = function(e, n, r, i, a) {
  if (e.required && n === void 0) {
    yX(e, n, r, i, a);
    return;
  }
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
  o.indexOf(s) > -1 ? Bv[s](n) || i.push(zi(a.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && i.push(zi(a.messages.types[s], e.fullField, e.type));
}, FSe = function(e, n, r, i, a) {
  var o = typeof e.len == "number", s = typeof e.min == "number", l = typeof e.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, f = null, d = typeof n == "number", h = typeof n == "string", p = Array.isArray(n);
  if (d ? f = "number" : h ? f = "string" : p && (f = "array"), !f)
    return !1;
  p && (c = n.length), h && (c = n.replace(u, "_").length), o ? c !== e.len && i.push(zi(a.messages[f].len, e.fullField, e.len)) : s && !l && c < e.min ? i.push(zi(a.messages[f].min, e.fullField, e.min)) : l && !s && c > e.max ? i.push(zi(a.messages[f].max, e.fullField, e.max)) : s && l && (c < e.min || c > e.max) && i.push(zi(a.messages[f].range, e.fullField, e.min, e.max));
}, qf = "enum", WSe = function(e, n, r, i, a) {
  e[qf] = Array.isArray(e[qf]) ? e[qf] : [], e[qf].indexOf(n) === -1 && i.push(zi(a.messages[qf], e.fullField, e[qf].join(", ")));
}, QSe = function(e, n, r, i, a) {
  if (e.pattern) {
    if (e.pattern instanceof RegExp)
      e.pattern.lastIndex = 0, e.pattern.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
    else if (typeof e.pattern == "string") {
      var o = new RegExp(e.pattern);
      o.test(n) || i.push(zi(a.messages.pattern.mismatch, e.fullField, n, e.pattern));
    }
  }
}, Mt = {
  required: yX,
  whitespace: BSe,
  type: VSe,
  range: FSe,
  enum: WSe,
  pattern: QSe
}, HSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n, "string") && !e.required)
      return r();
    Mt.required(e, n, i, o, a, "string"), Kn(n, "string") || (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a), Mt.pattern(e, n, i, o, a), e.whitespace === !0 && Mt.whitespace(e, n, i, o, a));
  }
  r(o);
}, GSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  }
  r(o);
}, jSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (n === "" && (n = void 0), Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  }
  r(o);
}, ZSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  }
  r(o);
}, USe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), Kn(n) || Mt.type(e, n, i, o, a);
  }
  r(o);
}, XSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  }
  r(o);
}, YSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  }
  r(o);
}, qSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (n == null && !e.required)
      return r();
    Mt.required(e, n, i, o, a, "array"), n != null && (Mt.type(e, n, i, o, a), Mt.range(e, n, i, o, a));
  }
  r(o);
}, KSe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && Mt.type(e, n, i, o, a);
  }
  r(o);
}, JSe = "enum", exe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a), n !== void 0 && Mt[JSe](e, n, i, o, a);
  }
  r(o);
}, txe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n, "string") && !e.required)
      return r();
    Mt.required(e, n, i, o, a), Kn(n, "string") || Mt.pattern(e, n, i, o, a);
  }
  r(o);
}, nxe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n, "date") && !e.required)
      return r();
    if (Mt.required(e, n, i, o, a), !Kn(n, "date")) {
      var l;
      n instanceof Date ? l = n : l = new Date(n), Mt.type(e, l, i, o, a), l && Mt.range(e, l.getTime(), i, o, a);
    }
  }
  r(o);
}, rxe = function(e, n, r, i, a) {
  var o = [], s = Array.isArray(n) ? "array" : typeof n;
  Mt.required(e, n, i, o, a, s), r(o);
}, wC = function(e, n, r, i, a) {
  var o = e.type, s = [], l = e.required || !e.required && i.hasOwnProperty(e.field);
  if (l) {
    if (Kn(n, o) && !e.required)
      return r();
    Mt.required(e, n, i, s, a, o), Kn(n, o) || Mt.type(e, n, i, s, a);
  }
  r(s);
}, ixe = function(e, n, r, i, a) {
  var o = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
  if (s) {
    if (Kn(n) && !e.required)
      return r();
    Mt.required(e, n, i, o, a);
  }
  r(o);
}, fg = {
  string: HSe,
  method: GSe,
  number: jSe,
  boolean: ZSe,
  regexp: USe,
  integer: XSe,
  float: YSe,
  array: qSe,
  object: KSe,
  enum: exe,
  pattern: txe,
  date: nxe,
  url: wC,
  hex: wC,
  email: wC,
  required: rxe,
  any: ixe
};
function W2() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var e = JSON.parse(JSON.stringify(this));
      return e.clone = this.clone, e;
    }
  };
}
var Q2 = W2(), _0 = /* @__PURE__ */ function() {
  function t(n) {
    this.rules = null, this._messages = Q2, this.define(n);
  }
  var e = t.prototype;
  return e.define = function(r) {
    var i = this;
    if (!r)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof r != "object" || Array.isArray(r))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(r).forEach(function(a) {
      var o = r[a];
      i.rules[a] = Array.isArray(o) ? o : [o];
    });
  }, e.messages = function(r) {
    return r && (this._messages = L5(W2(), r)), this._messages;
  }, e.validate = function(r, i, a) {
    var o = this;
    i === void 0 && (i = {}), a === void 0 && (a = function() {
    });
    var s = r, l = i, u = a;
    if (typeof l == "function" && (u = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
      return u && u(null, s), Promise.resolve(s);
    function c(v) {
      var g = [], m = {};
      function y(_) {
        if (Array.isArray(_)) {
          var O;
          g = (O = g).concat.apply(O, _);
        } else
          g.push(_);
      }
      for (var b = 0; b < v.length; b++)
        y(v[b]);
      g.length ? (m = F2(g), u(g, m)) : u(null, s);
    }
    if (l.messages) {
      var f = this.messages();
      f === Q2 && (f = W2()), L5(f, l.messages), l.messages = f;
    } else
      l.messages = this.messages();
    var d = {}, h = l.keys || Object.keys(this.rules);
    h.forEach(function(v) {
      var g = o.rules[v], m = s[v];
      g.forEach(function(y) {
        var b = y;
        typeof b.transform == "function" && (s === r && (s = Ic({}, s)), m = s[v] = b.transform(m)), typeof b == "function" ? b = {
          validator: b
        } : b = Ic({}, b), b.validator = o.getValidationMethod(b), b.validator && (b.field = v, b.fullField = b.fullField || v, b.type = o.getType(b), d[v] = d[v] || [], d[v].push({
          rule: b,
          value: m,
          source: s,
          field: v
        }));
      });
    });
    var p = {};
    return kSe(d, l, function(v, g) {
      var m = v.rule, y = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
      y = y && (m.required || !m.required && v.value), m.field = v.field;
      function b(S, x) {
        return Ic({}, x, {
          fullField: m.fullField + "." + S,
          fullFields: m.fullFields ? [].concat(m.fullFields, [S]) : [S]
        });
      }
      function _(S) {
        S === void 0 && (S = []);
        var x = Array.isArray(S) ? S : [S];
        !l.suppressWarning && x.length && t.warning("async-validator:", x), x.length && m.message !== void 0 && (x = [].concat(m.message));
        var C = x.map(k5(m, s));
        if (l.first && C.length)
          return p[m.field] = 1, g(C);
        if (!y)
          g(C);
        else {
          if (m.required && !v.value)
            return m.message !== void 0 ? C = [].concat(m.message).map(k5(m, s)) : l.error && (C = [l.error(m, zi(l.messages.required, m.field))]), g(C);
          var T = {};
          m.defaultField && Object.keys(v.value).map(function($) {
            T[$] = m.defaultField;
          }), T = Ic({}, T, v.rule.fields);
          var w = {};
          Object.keys(T).forEach(function($) {
            var A = T[$], D = Array.isArray(A) ? A : [A];
            w[$] = D.map(b.bind(null, $));
          });
          var P = new t(w);
          P.messages(l.messages), v.rule.options && (v.rule.options.messages = l.messages, v.rule.options.error = l.error), P.validate(v.value, v.rule.options || l, function($) {
            var A = [];
            C && C.length && A.push.apply(A, C), $ && $.length && A.push.apply(A, $), g(A.length ? A : null);
          });
        }
      }
      var O;
      if (m.asyncValidator)
        O = m.asyncValidator(m, v.value, _, v.source, l);
      else if (m.validator) {
        try {
          O = m.validator(m, v.value, _, v.source, l);
        } catch (S) {
          console.error == null || console.error(S), l.suppressValidatorError || setTimeout(function() {
            throw S;
          }, 0), _(S.message);
        }
        O === !0 ? _() : O === !1 ? _(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : O instanceof Array ? _(O) : O instanceof Error && _(O.message);
      }
      O && O.then && O.then(function() {
        return _();
      }, function(S) {
        return _(S);
      });
    }, function(v) {
      c(v);
    }, s);
  }, e.getType = function(r) {
    if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !fg.hasOwnProperty(r.type))
      throw new Error(zi("Unknown rule type %s", r.type));
    return r.type || "string";
  }, e.getValidationMethod = function(r) {
    if (typeof r.validator == "function")
      return r.validator;
    var i = Object.keys(r), a = i.indexOf("message");
    return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? fg.required : fg[this.getType(r)] || void 0;
  }, t;
}();
_0.register = function(e, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  fg[e] = n;
};
_0.warning = mX;
_0.messages = Q2;
_0.validators = fg;
function Zl(t) {
  return t == null ? [] : Array.isArray(t) ? t : [t];
}
function bX(t, e) {
  let n = t;
  for (let r = 0; r < e.length; r += 1) {
    if (n == null)
      return;
    n = n[e[r]];
  }
  return n;
}
function _X(t, e, n, r) {
  if (!e.length)
    return n;
  const [i, ...a] = e;
  let o;
  return !t && typeof i == "number" ? o = [] : Array.isArray(t) ? o = [...t] : o = I({}, t), r && n === void 0 && a.length === 1 ? delete o[i][a[0]] : o[i] = _X(o[i], a, n, r), o;
}
function axe(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return e.length && r && n === void 0 && !bX(t, e.slice(0, -1)) ? t : _X(t, e, n, r);
}
function H2(t) {
  return Zl(t);
}
function oxe(t, e) {
  return bX(t, e);
}
function sxe(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  return axe(t, e, n, r);
}
function lxe(t, e) {
  return t && t.some((n) => cxe(n, e));
}
function B5(t) {
  return typeof t == "object" && t !== null && Object.getPrototypeOf(t) === Object.prototype;
}
function OX(t, e) {
  const n = Array.isArray(t) ? [...t] : I({}, t);
  return e && Object.keys(e).forEach((r) => {
    const i = n[r], a = e[r], o = B5(i) && B5(a);
    n[r] = o ? OX(i, a || {}) : a;
  }), n;
}
function uxe(t) {
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
    n[r - 1] = arguments[r];
  return n.reduce((i, a) => OX(i, a), t);
}
function z5(t, e) {
  let n = {};
  return e.forEach((r) => {
    const i = oxe(t, r);
    n = sxe(n, r, i);
  }), n;
}
function cxe(t, e) {
  return !t || !e || t.length !== e.length ? !1 : t.every((n, r) => e[r] === n);
}
const Pi = "'${name}' is not a valid ${type}", bx = {
  default: "Validation error on field '${name}'",
  required: "'${name}' is required",
  enum: "'${name}' must be one of [${enum}]",
  whitespace: "'${name}' cannot be empty",
  date: {
    format: "'${name}' is invalid for format date",
    parse: "'${name}' could not be parsed as date",
    invalid: "'${name}' is invalid date"
  },
  types: {
    string: Pi,
    method: Pi,
    array: Pi,
    object: Pi,
    number: Pi,
    date: Pi,
    boolean: Pi,
    integer: Pi,
    float: Pi,
    regexp: Pi,
    email: Pi,
    url: Pi,
    hex: Pi
  },
  string: {
    len: "'${name}' must be exactly ${len} characters",
    min: "'${name}' must be at least ${min} characters",
    max: "'${name}' cannot be longer than ${max} characters",
    range: "'${name}' must be between ${min} and ${max} characters"
  },
  number: {
    len: "'${name}' must equal ${len}",
    min: "'${name}' cannot be less than ${min}",
    max: "'${name}' cannot be greater than ${max}",
    range: "'${name}' must be between ${min} and ${max}"
  },
  array: {
    len: "'${name}' must be exactly ${len} in length",
    min: "'${name}' cannot be less than ${min} in length",
    max: "'${name}' cannot be greater than ${max} in length",
    range: "'${name}' must be between ${min} and ${max} in length"
  },
  pattern: {
    mismatch: "'${name}' does not match pattern ${pattern}"
  }
};
var _x = function(t, e, n, r) {
  function i(a) {
    return a instanceof n ? a : new n(function(o) {
      o(a);
    });
  }
  return new (n || (n = Promise))(function(a, o) {
    function s(c) {
      try {
        u(r.next(c));
      } catch (f) {
        o(f);
      }
    }
    function l(c) {
      try {
        u(r.throw(c));
      } catch (f) {
        o(f);
      }
    }
    function u(c) {
      c.done ? a(c.value) : i(c.value).then(s, l);
    }
    u((r = r.apply(t, e || [])).next());
  });
};
const fxe = _0;
function dxe(t, e) {
  return t.replace(/\$\{\w+\}/g, (n) => {
    const r = n.slice(2, -1);
    return e[r];
  });
}
function G2(t, e, n, r, i) {
  return _x(this, void 0, void 0, function* () {
    const a = I({}, n);
    delete a.ruleIndex, delete a.trigger;
    let o = null;
    a && a.type === "array" && a.defaultField && (o = a.defaultField, delete a.defaultField);
    const s = new fxe({
      [t]: [a]
    }), l = uxe({}, bx, r.validateMessages);
    s.messages(l);
    let u = [];
    try {
      yield Promise.resolve(s.validate({
        [t]: e
      }, I({}, r)));
    } catch (d) {
      d.errors ? u = d.errors.map((h, p) => {
        let {
          message: v
        } = h;
        return (
          // Wrap VueNode with `key`
          Ui(v) ? Ns(v, {
            key: `error_${p}`
          }) : v
        );
      }) : (console.error(d), u = [l.default()]);
    }
    if (!u.length && o)
      return (yield Promise.all(e.map((h, p) => G2(`${t}.${p}`, h, o, r, i)))).reduce((h, p) => [...h, ...p], []);
    const c = I(I(I({}, n), {
      name: t,
      enum: (n.enum || []).join(", ")
    }), i);
    return u.map((d) => typeof d == "string" ? dxe(d, c) : d);
  });
}
function SX(t, e, n, r, i, a) {
  const o = t.join("."), s = n.map((u, c) => {
    const f = u.validator, d = I(I({}, u), {
      ruleIndex: c
    });
    return f && (d.validator = (h, p, v) => {
      let g = !1;
      const y = f(h, p, function() {
        for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
          _[O] = arguments[O];
        Promise.resolve().then(() => {
          cf(!g, "Your validator function has already return a promise. `callback` will be ignored."), g || v(..._);
        });
      });
      g = y && typeof y.then == "function" && typeof y.catch == "function", cf(g, "`callback` is deprecated. Please return a promise instead."), g && y.then(() => {
        v();
      }).catch((b) => {
        v(b || " ");
      });
    }), d;
  }).sort((u, c) => {
    let {
      warningOnly: f,
      ruleIndex: d
    } = u, {
      warningOnly: h,
      ruleIndex: p
    } = c;
    return !!f == !!h ? d - p : f ? 1 : -1;
  });
  let l;
  if (i === !0)
    l = new Promise((u, c) => _x(this, void 0, void 0, function* () {
      for (let f = 0; f < s.length; f += 1) {
        const d = s[f], h = yield G2(o, e, d, r, a);
        if (h.length) {
          c([{
            errors: h,
            rule: d
          }]);
          return;
        }
      }
      u([]);
    }));
  else {
    const u = s.map((c) => G2(o, e, c, r, a).then((f) => ({
      errors: f,
      rule: c
    })));
    l = (i ? pxe(u) : hxe(u)).then((c) => Promise.reject(c));
  }
  return l.catch((u) => u), l;
}
function hxe(t) {
  return _x(this, void 0, void 0, function* () {
    return Promise.all(t).then((e) => [].concat(...e));
  });
}
function pxe(t) {
  return _x(this, void 0, void 0, function* () {
    let e = 0;
    return new Promise((n) => {
      t.forEach((r) => {
        r.then((i) => {
          i.errors.length && n([i]), e += 1, e === t.length && n([]);
        });
      });
    });
  });
}
const xX = Symbol("formContextKey"), wX = (t) => {
  pt(xX, t);
}, cD = () => Ge(xX, {
  name: L(() => {
  }),
  labelAlign: L(() => "right"),
  vertical: L(() => !1),
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  addField: (t, e) => {
  },
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  removeField: (t) => {
  },
  model: L(() => {
  }),
  rules: L(() => {
  }),
  colon: L(() => {
  }),
  labelWrap: L(() => {
  }),
  labelCol: L(() => {
  }),
  requiredMark: L(() => !1),
  validateTrigger: L(() => {
  }),
  onValidate: () => {
  },
  validateMessages: L(() => bx)
}), CX = Symbol("formItemPrefixContextKey"), vxe = (t) => {
  pt(CX, t);
}, gxe = () => Ge(CX, {
  prefixCls: L(() => "")
});
function mxe(t) {
  return typeof t == "number" ? `${t} ${t} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(t) ? `0 0 ${t}` : t;
}
const yxe = () => ({
  span: [String, Number],
  order: [String, Number],
  offset: [String, Number],
  push: [String, Number],
  pull: [String, Number],
  xs: {
    type: [String, Number, Object],
    default: void 0
  },
  sm: {
    type: [String, Number, Object],
    default: void 0
  },
  md: {
    type: [String, Number, Object],
    default: void 0
  },
  lg: {
    type: [String, Number, Object],
    default: void 0
  },
  xl: {
    type: [String, Number, Object],
    default: void 0
  },
  xxl: {
    type: [String, Number, Object],
    default: void 0
  },
  prefixCls: String,
  flex: [String, Number]
}), bxe = ["xs", "sm", "md", "lg", "xl", "xxl"], TX = te({
  compatConfig: {
    MODE: 3
  },
  name: "ACol",
  inheritAttrs: !1,
  props: yxe(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      gutter: i,
      supportFlexGap: a,
      wrap: o
    } = bSe(), {
      prefixCls: s,
      direction: l
    } = It("col", t), [u, c] = CSe(s), f = L(() => {
      const {
        span: h,
        order: p,
        offset: v,
        push: g,
        pull: m
      } = t, y = s.value;
      let b = {};
      return bxe.forEach((_) => {
        let O = {};
        const S = t[_];
        typeof S == "number" ? O.span = S : typeof S == "object" && (O = S || {}), b = I(I({}, b), {
          [`${y}-${_}-${O.span}`]: O.span !== void 0,
          [`${y}-${_}-order-${O.order}`]: O.order || O.order === 0,
          [`${y}-${_}-offset-${O.offset}`]: O.offset || O.offset === 0,
          [`${y}-${_}-push-${O.push}`]: O.push || O.push === 0,
          [`${y}-${_}-pull-${O.pull}`]: O.pull || O.pull === 0,
          [`${y}-rtl`]: l.value === "rtl"
        });
      }), ye(y, {
        [`${y}-${h}`]: h !== void 0,
        [`${y}-order-${p}`]: p,
        [`${y}-offset-${v}`]: v,
        [`${y}-push-${g}`]: g,
        [`${y}-pull-${m}`]: m
      }, b, r.class, c.value);
    }), d = L(() => {
      const {
        flex: h
      } = t, p = i.value, v = {};
      if (p && p[0] > 0) {
        const g = `${p[0] / 2}px`;
        v.paddingLeft = g, v.paddingRight = g;
      }
      if (p && p[1] > 0 && !a.value) {
        const g = `${p[1] / 2}px`;
        v.paddingTop = g, v.paddingBottom = g;
      }
      return h && (v.flex = mxe(h), o.value === !1 && !v.minWidth && (v.minWidth = 0)), v;
    });
    return () => {
      var h;
      return u(M("div", j(j({}, r), {}, {
        class: f.value,
        style: [d.value, r.style]
      }), [(h = n.default) === null || h === void 0 ? void 0 : h.call(n)]));
    };
  }
});
var _xe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" };
function V5(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      Oxe(t, i, n[i]);
    });
  }
  return t;
}
function Oxe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var fD = function(e, n) {
  var r = V5({}, e, n.attrs);
  return M(lt, V5({}, r, {
    icon: _xe
  }), null);
};
fD.displayName = "QuestionCircleOutlined";
fD.inheritAttrs = !1;
const dD = (t, e) => {
  let {
    slots: n,
    emit: r,
    attrs: i
  } = e;
  var a, o, s, l, u;
  const {
    prefixCls: c,
    htmlFor: f,
    labelCol: d,
    labelAlign: h,
    colon: p,
    required: v,
    requiredMark: g
  } = I(I({}, t), i), [m] = RS("Form"), y = (a = t.label) !== null && a !== void 0 ? a : (o = n.label) === null || o === void 0 ? void 0 : o.call(n);
  if (!y) return null;
  const {
    vertical: b,
    labelAlign: _,
    labelCol: O,
    labelWrap: S,
    colon: x
  } = cD(), C = d || (O == null ? void 0 : O.value) || {}, T = h || (_ == null ? void 0 : _.value), w = `${c}-item-label`, P = ye(w, T === "left" && `${w}-left`, C.class, {
    [`${w}-wrap`]: !!S.value
  });
  let $ = y;
  const A = p === !0 || (x == null ? void 0 : x.value) !== !1 && p !== !1;
  if (A && !b.value && typeof y == "string" && y.trim() !== "" && ($ = y.replace(/[:|：]\s*$/, "")), t.tooltip || n.tooltip) {
    const R = M("span", {
      class: `${c}-item-tooltip`
    }, [M(dx, {
      title: t.tooltip
    }, {
      default: () => [M(fD, null, null)]
    })]);
    $ = M(wt, null, [$, n.tooltip ? (s = n.tooltip) === null || s === void 0 ? void 0 : s.call(n, {
      class: `${c}-item-tooltip`
    }) : R]);
  }
  g === "optional" && !v && ($ = M(wt, null, [$, M("span", {
    class: `${c}-item-optional`
  }, [((l = m.value) === null || l === void 0 ? void 0 : l.optional) || ((u = zs.Form) === null || u === void 0 ? void 0 : u.optional)])]));
  const E = ye({
    [`${c}-item-required`]: v,
    [`${c}-item-required-mark-optional`]: g === "optional",
    [`${c}-item-no-colon`]: !A
  });
  return M(TX, j(j({}, C), {}, {
    class: P
  }), {
    default: () => [M("label", {
      for: f,
      class: E,
      title: typeof y == "string" ? y : "",
      onClick: (R) => r("click", R)
    }, [$])]
  });
};
dD.displayName = "FormItemLabel";
dD.inheritAttrs = !1;
const Sxe = (t) => {
  const {
    componentCls: e
  } = t, n = `${e}-show-help`, r = `${e}-show-help-item`;
  return {
    [n]: {
      // Explain holder
      transition: `opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,
      "&-appear, &-enter": {
        opacity: 0,
        "&-active": {
          opacity: 1
        }
      },
      "&-leave": {
        opacity: 1,
        "&-active": {
          opacity: 0
        }
      },
      // Explain
      [r]: {
        overflow: "hidden",
        transition: `height ${t.motionDurationSlow} ${t.motionEaseInOut},
                     opacity ${t.motionDurationSlow} ${t.motionEaseInOut},
                     transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,
        [`&${r}-appear, &${r}-enter`]: {
          transform: "translateY(-5px)",
          opacity: 0,
          "&-active": {
            transform: "translateY(0)",
            opacity: 1
          }
        },
        [`&${r}-leave-active`]: {
          transform: "translateY(-5px)"
        }
      }
    }
  };
}, xxe = (t) => ({
  legend: {
    display: "block",
    width: "100%",
    marginBottom: t.marginLG,
    padding: 0,
    color: t.colorTextDescription,
    fontSize: t.fontSizeLG,
    lineHeight: "inherit",
    border: 0,
    borderBottom: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`
  },
  label: {
    fontSize: t.fontSize
  },
  'input[type="search"]': {
    boxSizing: "border-box"
  },
  // Position radios and checkboxes better
  'input[type="radio"], input[type="checkbox"]': {
    lineHeight: "normal"
  },
  'input[type="file"]': {
    display: "block"
  },
  // Make range inputs behave like textual form controls
  'input[type="range"]': {
    display: "block",
    width: "100%"
  },
  // Make multiple select elements height not fixed
  "select[multiple], select[size]": {
    height: "auto"
  },
  // Focus for file, radio, and checkbox
  "input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus": {
    outline: 0,
    boxShadow: `0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`
  },
  // Adjust output element
  output: {
    display: "block",
    paddingTop: 15,
    color: t.colorText,
    fontSize: t.fontSize,
    lineHeight: t.lineHeight
  }
}), F5 = (t, e) => {
  const {
    formItemCls: n
  } = t;
  return {
    [n]: {
      [`${n}-label > label`]: {
        height: e
      },
      [`${n}-control-input`]: {
        minHeight: e
      }
    }
  };
}, wxe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [t.componentCls]: I(I(I({}, nn(t)), xxe(t)), {
      [`${e}-text`]: {
        display: "inline-block",
        paddingInlineEnd: t.paddingSM
      },
      // ================================================================
      // =                             Size                             =
      // ================================================================
      "&-small": I({}, F5(t, t.controlHeightSM)),
      "&-large": I({}, F5(t, t.controlHeightLG))
    })
  };
}, Cxe = (t) => {
  const {
    formItemCls: e,
    iconCls: n,
    componentCls: r,
    rootPrefixCls: i
  } = t;
  return {
    [e]: I(I({}, nn(t)), {
      marginBottom: t.marginLG,
      verticalAlign: "top",
      "&-with-help": {
        transition: "none"
      },
      [`&-hidden,
        &-hidden.${i}-row`]: {
        // https://github.com/ant-design/ant-design/issues/26141
        display: "none"
      },
      "&-has-warning": {
        [`${e}-split`]: {
          color: t.colorError
        }
      },
      "&-has-error": {
        [`${e}-split`]: {
          color: t.colorWarning
        }
      },
      // ==============================================================
      // =                            Label                           =
      // ==============================================================
      [`${e}-label`]: {
        display: "inline-block",
        flexGrow: 0,
        overflow: "hidden",
        whiteSpace: "nowrap",
        textAlign: "end",
        verticalAlign: "middle",
        "&-left": {
          textAlign: "start"
        },
        "&-wrap": {
          overflow: "unset",
          lineHeight: `${t.lineHeight} - 0.25em`,
          whiteSpace: "unset"
        },
        "> label": {
          position: "relative",
          display: "inline-flex",
          alignItems: "center",
          maxWidth: "100%",
          height: t.controlHeight,
          color: t.colorTextHeading,
          fontSize: t.fontSize,
          [`> ${n}`]: {
            fontSize: t.fontSize,
            verticalAlign: "top"
          },
          // Required mark
          [`&${e}-required:not(${e}-required-mark-optional)::before`]: {
            display: "inline-block",
            marginInlineEnd: t.marginXXS,
            color: t.colorError,
            fontSize: t.fontSize,
            fontFamily: "SimSun, sans-serif",
            lineHeight: 1,
            content: '"*"',
            [`${r}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${e}-optional`]: {
            display: "inline-block",
            marginInlineStart: t.marginXXS,
            color: t.colorTextDescription,
            [`${r}-hide-required-mark &`]: {
              display: "none"
            }
          },
          // Optional mark
          [`${e}-tooltip`]: {
            color: t.colorTextDescription,
            cursor: "help",
            writingMode: "horizontal-tb",
            marginInlineStart: t.marginXXS
          },
          "&::after": {
            content: '":"',
            position: "relative",
            marginBlock: 0,
            marginInlineStart: t.marginXXS / 2,
            marginInlineEnd: t.marginXS
          },
          [`&${e}-no-colon::after`]: {
            content: '" "'
          }
        }
      },
      // ==============================================================
      // =                            Input                           =
      // ==============================================================
      [`${e}-control`]: {
        display: "flex",
        flexDirection: "column",
        flexGrow: 1,
        [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
          width: "100%"
        },
        "&-input": {
          position: "relative",
          display: "flex",
          alignItems: "center",
          minHeight: t.controlHeight,
          "&-content": {
            flex: "auto",
            maxWidth: "100%"
          }
        }
      },
      // ==============================================================
      // =                           Explain                          =
      // ==============================================================
      [e]: {
        "&-explain, &-extra": {
          clear: "both",
          color: t.colorTextDescription,
          fontSize: t.fontSize,
          lineHeight: t.lineHeight
        },
        "&-explain-connected": {
          width: "100%"
        },
        "&-extra": {
          minHeight: t.controlHeightSM,
          transition: `color ${t.motionDurationMid} ${t.motionEaseOut}`
          // sync input color transition
        },
        "&-explain": {
          "&-error": {
            color: t.colorError
          },
          "&-warning": {
            color: t.colorWarning
          }
        }
      },
      [`&-with-help ${e}-explain`]: {
        height: "auto",
        opacity: 1
      },
      // ==============================================================
      // =                        Feedback Icon                       =
      // ==============================================================
      [`${e}-feedback-icon`]: {
        fontSize: t.fontSize,
        textAlign: "center",
        visibility: "visible",
        animationName: qI,
        animationDuration: t.motionDurationMid,
        animationTimingFunction: t.motionEaseOutBack,
        pointerEvents: "none",
        "&-success": {
          color: t.colorSuccess
        },
        "&-error": {
          color: t.colorError
        },
        "&-warning": {
          color: t.colorWarning
        },
        "&-validating": {
          color: t.colorPrimary
        }
      }
    })
  };
}, Txe = (t) => {
  const {
    componentCls: e,
    formItemCls: n,
    rootPrefixCls: r
  } = t;
  return {
    [`${e}-horizontal`]: {
      [`${n}-label`]: {
        flexGrow: 0
      },
      [`${n}-control`]: {
        flex: "1 1 0",
        // https://github.com/ant-design/ant-design/issues/32777
        // https://github.com/ant-design/ant-design/issues/33773
        minWidth: 0
      },
      // https://github.com/ant-design/ant-design/issues/32980
      [`${n}-label.${r}-col-24 + ${n}-control`]: {
        minWidth: "unset"
      }
    }
  };
}, Pxe = (t) => {
  const {
    componentCls: e,
    formItemCls: n
  } = t;
  return {
    [`${e}-inline`]: {
      display: "flex",
      flexWrap: "wrap",
      [n]: {
        flex: "none",
        flexWrap: "nowrap",
        marginInlineEnd: t.margin,
        marginBottom: 0,
        "&-with-help": {
          marginBottom: t.marginLG
        },
        [`> ${n}-label,
        > ${n}-control`]: {
          display: "inline-block",
          verticalAlign: "top"
        },
        [`> ${n}-label`]: {
          flex: "none"
        },
        [`${e}-text`]: {
          display: "inline-block"
        },
        [`${n}-has-feedback`]: {
          display: "inline-block"
        }
      }
    }
  };
}, Td = (t) => ({
  margin: 0,
  padding: `0 0 ${t.paddingXS}px`,
  whiteSpace: "initial",
  textAlign: "start",
  "> label": {
    margin: 0,
    "&::after": {
      display: "none"
    }
  }
}), $xe = (t) => {
  const {
    componentCls: e,
    formItemCls: n
  } = t;
  return {
    [`${n} ${n}-label`]: Td(t),
    [e]: {
      [n]: {
        flexWrap: "wrap",
        [`${n}-label,
          ${n}-control`]: {
          flex: "0 0 100%",
          maxWidth: "100%"
        }
      }
    }
  };
}, Axe = (t) => {
  const {
    componentCls: e,
    formItemCls: n,
    rootPrefixCls: r
  } = t;
  return {
    [`${e}-vertical`]: {
      [n]: {
        "&-row": {
          flexDirection: "column"
        },
        "&-label > label": {
          height: "auto"
        },
        [`${e}-item-control`]: {
          width: "100%"
        }
      }
    },
    [`${e}-vertical ${n}-label,
      .${r}-col-24${n}-label,
      .${r}-col-xl-24${n}-label`]: Td(t),
    [`@media (max-width: ${t.screenXSMax}px)`]: [$xe(t), {
      [e]: {
        [`.${r}-col-xs-24${n}-label`]: Td(t)
      }
    }],
    [`@media (max-width: ${t.screenSMMax}px)`]: {
      [e]: {
        [`.${r}-col-sm-24${n}-label`]: Td(t)
      }
    },
    [`@media (max-width: ${t.screenMDMax}px)`]: {
      [e]: {
        [`.${r}-col-md-24${n}-label`]: Td(t)
      }
    },
    [`@media (max-width: ${t.screenLGMax}px)`]: {
      [e]: {
        [`.${r}-col-lg-24${n}-label`]: Td(t)
      }
    }
  };
}, hD = Sn("Form", (t, e) => {
  let {
    rootPrefixCls: n
  } = e;
  const r = Bt(t, {
    formItemCls: `${t.componentCls}-item`,
    rootPrefixCls: n
  });
  return [wxe(r), Cxe(r), Sxe(r), Txe(r), Pxe(r), Axe(r), KI(r), qI];
}), Exe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ErrorList",
  inheritAttrs: !1,
  props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
  setup(t, e) {
    let {
      attrs: n
    } = e;
    const {
      prefixCls: r,
      status: i
    } = gxe(), a = L(() => `${r.value}-item-explain`), o = L(() => !!(t.errors && t.errors.length)), s = U(i.value), [, l] = hD(r);
    return se([o, i], () => {
      o.value && (s.value = i.value);
    }), () => {
      var u, c;
      const f = sD(`${r.value}-show-help-item`), d = wI(`${r.value}-show-help-item`, f);
      return d.role = "alert", d.class = [l.value, a.value, n.class, `${r.value}-show-help`], M(co, j(j({}, g0(`${r.value}-show-help`)), {}, {
        onAfterEnter: () => t.onErrorVisibleChanged(!0),
        onAfterLeave: () => t.onErrorVisibleChanged(!1)
      }), {
        default: () => [bi(M(JM, j(j({}, d), {}, {
          tag: "div"
        }), {
          default: () => [(c = t.errors) === null || c === void 0 ? void 0 : c.map((h, p) => M("div", {
            key: p,
            class: s.value ? `${a.value}-${s.value}` : ""
          }, [h]))]
        }), [[Bs, !!(!((u = t.errors) === null || u === void 0) && u.length)]])]
      });
    };
  }
}), Mxe = te({
  compatConfig: {
    MODE: 3
  },
  slots: Object,
  inheritAttrs: !1,
  props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = cD(), {
      wrapperCol: i
    } = r, a = I({}, r);
    return delete a.labelCol, delete a.wrapperCol, wX(a), vxe({
      prefixCls: L(() => t.prefixCls),
      status: L(() => t.status)
    }), () => {
      var o, s, l;
      const {
        prefixCls: u,
        wrapperCol: c,
        marginBottom: f,
        onErrorVisibleChanged: d,
        help: h = (o = n.help) === null || o === void 0 ? void 0 : o.call(n),
        errors: p = os((s = n.errors) === null || s === void 0 ? void 0 : s.call(n)),
        // hasFeedback,
        // status,
        extra: v = (l = n.extra) === null || l === void 0 ? void 0 : l.call(n)
      } = t, g = `${u}-item`, m = c || (i == null ? void 0 : i.value) || {}, y = ye(`${g}-control`, m.class);
      return M(TX, j(j({}, m), {}, {
        class: y
      }), {
        default: () => {
          var b;
          return M(wt, null, [M("div", {
            class: `${g}-control-input`
          }, [M("div", {
            class: `${g}-control-input-content`
          }, [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)])]), f !== null || p.length ? M("div", {
            style: {
              display: "flex",
              flexWrap: "nowrap"
            }
          }, [M(Exe, {
            errors: p,
            help: h,
            class: `${g}-explain-connected`,
            onErrorVisibleChanged: d
          }, null), !!f && M("div", {
            style: {
              width: 0,
              height: `${f}px`
            }
          }, null)]) : null, v ? M("div", {
            class: `${g}-extra`
          }, [v]) : null]);
        }
      });
    };
  }
});
function Ixe(t) {
  const e = ae(t.value.slice());
  let n = null;
  return ht(() => {
    clearTimeout(n), n = setTimeout(() => {
      e.value = t.value;
    }, t.value.length ? 0 : 10);
  }), e;
}
ru("success", "warning", "error", "validating", "");
const Dxe = {
  success: Ou,
  warning: Su,
  error: Da,
  validating: ts
};
function CC(t, e, n) {
  let r = t;
  const i = e;
  let a = 0;
  try {
    for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
      const s = i[a];
      if (s in r)
        r = r[s];
      else {
        if (n)
          throw Error("please transfer a valid name path to form item!");
        break;
      }
    }
    if (n && !r)
      throw Error("please transfer a valid name path to form item!");
  } catch {
    console.error("please transfer a valid name path to form item!");
  }
  return {
    o: r,
    k: i[a],
    v: r ? r[i[a]] : void 0
  };
}
const Rxe = () => ({
  htmlFor: String,
  prefixCls: String,
  label: Y.any,
  help: Y.any,
  extra: Y.any,
  labelCol: {
    type: Object
  },
  wrapperCol: {
    type: Object
  },
  hasFeedback: {
    type: Boolean,
    default: !1
  },
  colon: {
    type: Boolean,
    default: void 0
  },
  labelAlign: String,
  prop: {
    type: [String, Number, Array]
  },
  name: {
    type: [String, Number, Array]
  },
  rules: [Array, Object],
  autoLink: {
    type: Boolean,
    default: !0
  },
  required: {
    type: Boolean,
    default: void 0
  },
  validateFirst: {
    type: Boolean,
    default: void 0
  },
  validateStatus: Y.oneOf(ru("", "success", "warning", "error", "validating")),
  validateTrigger: {
    type: [String, Array]
  },
  messageVariables: {
    type: Object
  },
  hidden: Boolean,
  noStyle: Boolean,
  tooltip: String
});
let kxe = 0;
const Lxe = "form_item", PX = te({
  compatConfig: {
    MODE: 3
  },
  name: "AFormItem",
  inheritAttrs: !1,
  __ANT_NEW_FORM_ITEM: !0,
  props: Rxe(),
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i
    } = e;
    cf(t.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
    const a = `form-item-${++kxe}`, {
      prefixCls: o
    } = It("form", t), [s, l] = hD(o), u = ae(), c = cD(), f = L(() => t.name || t.prop), d = ae([]), h = ae(!1), p = ae(), v = L(() => {
      const ee = f.value;
      return H2(ee);
    }), g = L(() => {
      if (v.value.length) {
        const ee = c.name.value, oe = v.value.join("_");
        return ee ? `${ee}_${oe}` : `${Lxe}_${oe}`;
      } else
        return;
    }), m = () => {
      const ee = c.model.value;
      if (!(!ee || !f.value))
        return CC(ee, v.value, !0).v;
    }, y = L(() => m()), b = ae(Zc(y.value)), _ = L(() => {
      let ee = t.validateTrigger !== void 0 ? t.validateTrigger : c.validateTrigger.value;
      return ee = ee === void 0 ? "change" : ee, Zl(ee);
    }), O = L(() => {
      let ee = c.rules.value;
      const oe = t.rules, K = t.required !== void 0 ? {
        required: !!t.required,
        trigger: _.value
      } : [], ie = CC(ee, v.value);
      ee = ee ? ie.o[ie.k] || ie.v : [];
      const X = [].concat(oe || ee || []);
      return mbe(X, (H) => H.required) ? X : X.concat(K);
    }), S = L(() => {
      const ee = O.value;
      let oe = !1;
      return ee && ee.length && ee.every((K) => K.required ? (oe = !0, !1) : !0), oe || t.required;
    }), x = ae();
    ht(() => {
      x.value = t.validateStatus;
    });
    const C = L(() => {
      let ee = {};
      return typeof t.label == "string" ? ee.label = t.label : t.name && (ee.label = String(t.name)), t.messageVariables && (ee = I(I({}, ee), t.messageVariables)), ee;
    }), T = (ee) => {
      if (v.value.length === 0)
        return;
      const {
        validateFirst: oe = !1
      } = t, {
        triggerName: K
      } = ee || {};
      let ie = O.value;
      if (K && (ie = ie.filter((H) => {
        const {
          trigger: G
        } = H;
        return !G && !_.value.length ? !0 : Zl(G || _.value).includes(K);
      })), !ie.length)
        return Promise.resolve();
      const X = SX(v.value, y.value, ie, I({
        validateMessages: c.validateMessages.value
      }, ee), oe, C.value);
      return x.value = "validating", d.value = [], X.catch((H) => H).then(function() {
        let H = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        if (x.value === "validating") {
          const G = H.filter((re) => re && re.errors.length);
          x.value = G.length ? "error" : "success", d.value = G.map((re) => re.errors), c.onValidate(f.value, !d.value.length, d.value.length ? qo(d.value[0]) : null);
        }
      }), X;
    }, w = () => {
      T({
        triggerName: "blur"
      });
    }, P = () => {
      if (h.value) {
        h.value = !1;
        return;
      }
      T({
        triggerName: "change"
      });
    }, $ = () => {
      x.value = t.validateStatus, h.value = !1, d.value = [];
    }, A = () => {
      var ee;
      x.value = t.validateStatus, h.value = !0, d.value = [];
      const oe = c.model.value || {}, K = y.value, ie = CC(oe, v.value, !0);
      Array.isArray(K) ? ie.o[ie.k] = [].concat((ee = b.value) !== null && ee !== void 0 ? ee : []) : ie.o[ie.k] = b.value, Tt(() => {
        h.value = !1;
      });
    }, D = L(() => t.htmlFor === void 0 ? g.value : t.htmlFor), E = () => {
      const ee = D.value;
      if (!ee || !p.value)
        return;
      const oe = p.value.$el.querySelector(`[id="${ee}"]`);
      oe && oe.focus && oe.focus();
    };
    i({
      onFieldBlur: w,
      onFieldChange: P,
      clearValidate: $,
      resetField: A
    }), Mme({
      id: g,
      onFieldBlur: () => {
        t.autoLink && w();
      },
      onFieldChange: () => {
        t.autoLink && P();
      },
      clearValidate: $
    }, L(() => !!(t.autoLink && c.model.value && f.value)));
    let R = !1;
    se(f, (ee) => {
      ee ? R || (R = !0, c.addField(a, {
        fieldValue: y,
        fieldId: g,
        fieldName: f,
        resetField: A,
        clearValidate: $,
        namePath: v,
        validateRules: T,
        rules: O
      })) : (R = !1, c.removeField(a));
    }, {
      immediate: !0
    }), yt(() => {
      c.removeField(a);
    });
    const N = Ixe(d), V = L(() => t.validateStatus !== void 0 ? t.validateStatus : N.value.length ? "error" : x.value), z = L(() => ({
      [`${o.value}-item`]: !0,
      [l.value]: !0,
      // Status
      [`${o.value}-item-has-feedback`]: V.value && t.hasFeedback,
      [`${o.value}-item-has-success`]: V.value === "success",
      [`${o.value}-item-has-warning`]: V.value === "warning",
      [`${o.value}-item-has-error`]: V.value === "error",
      [`${o.value}-item-is-validating`]: V.value === "validating",
      [`${o.value}-item-hidden`]: t.hidden
    })), W = tn({});
    ro.useProvide(W), ht(() => {
      let ee;
      if (t.hasFeedback) {
        const oe = V.value && Dxe[V.value];
        ee = oe ? M("span", {
          class: ye(`${o.value}-item-feedback-icon`, `${o.value}-item-feedback-icon-${V.value}`)
        }, [M(oe, null, null)]) : null;
      }
      I(W, {
        status: V.value,
        hasFeedback: t.hasFeedback,
        feedbackIcon: ee,
        isFormItemInput: !0
      });
    });
    const F = ae(null), Q = ae(!1), Z = () => {
      if (u.value) {
        const ee = getComputedStyle(u.value);
        F.value = parseInt(ee.marginBottom, 10);
      }
    };
    it(() => {
      se(Q, () => {
        Q.value && Z();
      }, {
        flush: "post",
        immediate: !0
      });
    });
    const ne = (ee) => {
      ee || (F.value = null);
    };
    return () => {
      var ee, oe;
      if (t.noStyle) return (ee = n.default) === null || ee === void 0 ? void 0 : ee.call(n);
      const K = (oe = t.help) !== null && oe !== void 0 ? oe : n.help ? os(n.help()) : null, ie = !!(K != null && Array.isArray(K) && K.length || N.value.length);
      return Q.value = ie, s(M("div", {
        class: [z.value, ie ? `${o.value}-item-with-help` : "", r.class],
        ref: u
      }, [M(PSe, j(j({}, r), {}, {
        class: `${o.value}-item-row`,
        key: "row"
      }), {
        default: () => {
          var X, H;
          return M(wt, null, [M(dD, j(j({}, t), {}, {
            htmlFor: D.value,
            required: S.value,
            requiredMark: c.requiredMark.value,
            prefixCls: o.value,
            onClick: E,
            label: t.label
          }), {
            label: n.label,
            tooltip: n.tooltip
          }), M(Mxe, j(j({}, t), {}, {
            errors: K != null ? Zl(K) : N.value,
            marginBottom: F.value,
            prefixCls: o.value,
            status: V.value,
            ref: p,
            help: K,
            extra: (X = t.extra) !== null && X !== void 0 ? X : (H = n.extra) === null || H === void 0 ? void 0 : H.call(n),
            onErrorVisibleChanged: ne
          }), {
            default: n.default
          })]);
        }
      }), !!F.value && M("div", {
        class: `${o.value}-margin-offset`,
        style: {
          marginBottom: `-${F.value}px`
        }
      }, null)]));
    };
  }
});
function $X(t) {
  let e = !1, n = t.length;
  const r = [];
  return t.length ? new Promise((i, a) => {
    t.forEach((o, s) => {
      o.catch((l) => (e = !0, l)).then((l) => {
        n -= 1, r[s] = l, !(n > 0) && (e && a(r), i(r));
      });
    });
  }) : Promise.resolve([]);
}
function W5(t) {
  let e = !1;
  return t && t.length && t.every((n) => n.required ? (e = !0, !1) : !0), e;
}
function Q5(t) {
  return t == null ? [] : Array.isArray(t) ? t : [t];
}
function TC(t, e, n) {
  let r = t;
  e = e.replace(/\[(\w+)\]/g, ".$1"), e = e.replace(/^\./, "");
  const i = e.split(".");
  let a = 0;
  for (let o = i.length; a < o - 1 && !(!r && !n); ++a) {
    const s = i[a];
    if (s in r)
      r = r[s];
    else {
      if (n)
        throw new Error("please transfer a valid name path to validate!");
      break;
    }
  }
  return {
    o: r,
    k: i[a],
    v: r ? r[i[a]] : null,
    isValid: r && i[a] in r
  };
}
function Nxe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : U({}), n = arguments.length > 2 ? arguments[2] : void 0;
  const r = Zc(B(t)), i = tn({}), a = ae([]), o = (b) => {
    I(B(t), I(I({}, Zc(r)), b)), Tt(() => {
      Object.keys(i).forEach((_) => {
        i[_] = {
          autoLink: !1,
          required: W5(B(e)[_])
        };
      });
    });
  }, s = function() {
    let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ = arguments.length > 1 ? arguments[1] : void 0;
    return _.length ? b.filter((O) => {
      const S = Q5(O.trigger || "change");
      return Obe(S, _).length;
    }) : b;
  };
  let l = null;
  const u = function(b) {
    let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, O = arguments.length > 2 ? arguments[2] : void 0;
    const S = [], x = {};
    for (let w = 0; w < b.length; w++) {
      const P = b[w], $ = TC(B(t), P, O);
      if (!$.isValid) continue;
      x[P] = $.v;
      const A = s(B(e)[P], Q5(_ && _.trigger));
      A.length && S.push(c(P, $.v, A, _ || {}).then(() => ({
        name: P,
        errors: [],
        warnings: []
      })).catch((D) => {
        const E = [], R = [];
        return D.forEach((N) => {
          let {
            rule: {
              warningOnly: V
            },
            errors: z
          } = N;
          V ? R.push(...z) : E.push(...z);
        }), E.length ? Promise.reject({
          name: P,
          errors: E,
          warnings: R
        }) : {
          name: P,
          errors: E,
          warnings: R
        };
      }));
    }
    const C = $X(S);
    l = C;
    const T = C.then(() => l === C ? Promise.resolve(x) : Promise.reject([])).catch((w) => {
      const P = w.filter(($) => $ && $.errors.length);
      return P.length ? Promise.reject({
        values: x,
        errorFields: P,
        outOfDate: l !== C
      }) : Promise.resolve(x);
    });
    return T.catch((w) => w), T;
  }, c = function(b, _, O) {
    let S = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
    const x = SX([b], _, O, I({
      validateMessages: bx
    }, S), !!S.validateFirst);
    return i[b] ? (i[b].validateStatus = "validating", x.catch((C) => C).then(function() {
      let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      var T;
      if (i[b].validateStatus === "validating") {
        const w = C.filter((P) => P && P.errors.length);
        i[b].validateStatus = w.length ? "error" : "success", i[b].help = w.length ? w.map((P) => P.errors) : null, (T = n == null ? void 0 : n.onValidate) === null || T === void 0 || T.call(n, b, !w.length, w.length ? qo(i[b].help[0]) : null);
      }
    }), x) : x.catch((C) => C);
  }, f = (b, _) => {
    let O = [], S = !0;
    b ? Array.isArray(b) ? O = b : O = [b] : (S = !1, O = a.value);
    const x = u(O, _ || {}, S);
    return x.catch((C) => C), x;
  }, d = (b) => {
    let _ = [];
    b ? Array.isArray(b) ? _ = b : _ = [b] : _ = a.value, _.forEach((O) => {
      i[O] && I(i[O], {
        validateStatus: "",
        help: null
      });
    });
  }, h = (b) => {
    const _ = {
      autoLink: !1
    }, O = [], S = Array.isArray(b) ? b : [b];
    for (let x = 0; x < S.length; x++) {
      const C = S[x];
      (C == null ? void 0 : C.validateStatus) === "error" && (_.validateStatus = "error", C.help && O.push(C.help)), _.required = _.required || (C == null ? void 0 : C.required);
    }
    return _.help = O, _;
  };
  let p = r, v = !0;
  const g = (b) => {
    const _ = [];
    a.value.forEach((O) => {
      const S = TC(b, O, !1), x = TC(p, O, !1);
      (v && (n == null ? void 0 : n.immediate) && S.isValid || !YS(S.v, x.v)) && _.push(O);
    }), f(_, {
      trigger: "change"
    }), v = !1, p = Zc(qo(b));
  }, m = n == null ? void 0 : n.debounce;
  let y = !0;
  return se(e, () => {
    a.value = e ? Object.keys(B(e)) : [], !y && n && n.validateOnRuleChange && f(), y = !1;
  }, {
    deep: !0,
    immediate: !0
  }), se(a, () => {
    const b = {};
    a.value.forEach((_) => {
      b[_] = I({}, i[_], {
        autoLink: !1,
        required: W5(B(e)[_])
      }), delete i[_];
    });
    for (const _ in i)
      Object.prototype.hasOwnProperty.call(i, _) && delete i[_];
    I(i, b);
  }, {
    immediate: !0
  }), se(t, m && m.wait ? UI(g, m.wait, wU(m, ["wait"])) : g, {
    immediate: n && !!n.immediate,
    deep: !0
  }), {
    modelRef: t,
    rulesRef: e,
    initialModel: r,
    validateInfos: i,
    resetFields: o,
    validate: f,
    validateField: c,
    mergeValidateInfo: h,
    clearValidate: d
  };
}
const Bxe = () => ({
  layout: Y.oneOf(ru("horizontal", "inline", "vertical")),
  labelCol: $t(),
  wrapperCol: $t(),
  colon: nt(),
  labelAlign: hn(),
  labelWrap: nt(),
  prefixCls: String,
  requiredMark: gn([String, Boolean]),
  /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
  hideRequiredMark: nt(),
  model: Y.object,
  rules: $t(),
  validateMessages: $t(),
  validateOnRuleChange: nt(),
  // 提交失败自动滚动到第一个错误字段
  scrollToFirstError: fa(),
  onSubmit: tt(),
  name: String,
  validateTrigger: gn([String, Array]),
  size: hn(),
  disabled: nt(),
  onValuesChange: tt(),
  onFieldsChange: tt(),
  onFinish: tt(),
  onFinishFailed: tt(),
  onValidate: tt()
});
function zxe(t, e) {
  return YS(Zl(t), Zl(e));
}
const dr = te({
  compatConfig: {
    MODE: 3
  },
  name: "AForm",
  inheritAttrs: !1,
  props: sr(Bxe(), {
    layout: "horizontal",
    hideRequiredMark: !1,
    colon: !0
  }),
  Item: PX,
  useForm: Nxe,
  // emits: ['finishFailed', 'submit', 'finish', 'validate'],
  setup(t, e) {
    let {
      emit: n,
      slots: r,
      expose: i,
      attrs: a
    } = e;
    const {
      prefixCls: o,
      direction: s,
      form: l,
      size: u,
      disabled: c
    } = It("form", t), f = L(() => t.requiredMark === "" || t.requiredMark), d = L(() => {
      var N;
      return f.value !== void 0 ? f.value : l && ((N = l.value) === null || N === void 0 ? void 0 : N.requiredMark) !== void 0 ? l.value.requiredMark : !t.hideRequiredMark;
    });
    Uj(u), cj(c);
    const h = L(() => {
      var N, V;
      return (N = t.colon) !== null && N !== void 0 ? N : (V = l.value) === null || V === void 0 ? void 0 : V.colon;
    }), {
      validateMessages: p
    } = Rue(), v = L(() => I(I(I({}, bx), p.value), t.validateMessages)), [g, m] = hD(o), y = L(() => ye(o.value, {
      [`${o.value}-${t.layout}`]: !0,
      [`${o.value}-hide-required-mark`]: d.value === !1,
      [`${o.value}-rtl`]: s.value === "rtl",
      [`${o.value}-${u.value}`]: u.value
    }, m.value)), b = U(), _ = {}, O = (N, V) => {
      _[N] = V;
    }, S = (N) => {
      delete _[N];
    }, x = (N) => {
      const V = !!N, z = V ? Zl(N).map(H2) : [];
      return V ? Object.values(_).filter((W) => z.findIndex((F) => zxe(F, W.fieldName.value)) > -1) : Object.values(_);
    }, C = (N) => {
      if (!t.model) {
        Xr(!1, "Form", "model is required for resetFields to work.");
        return;
      }
      x(N).forEach((V) => {
        V.resetField();
      });
    }, T = (N) => {
      x(N).forEach((V) => {
        V.clearValidate();
      });
    }, w = (N) => {
      const {
        scrollToFirstError: V
      } = t;
      if (n("finishFailed", N), V && N.errorFields.length) {
        let z = {};
        typeof V == "object" && (z = V), $(N.errorFields[0].name, z);
      }
    }, P = function() {
      return E(...arguments);
    }, $ = function(N) {
      let V = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const z = x(N ? [N] : void 0);
      if (z.length) {
        const W = z[0].fieldId.value, F = W ? document.getElementById(W) : null;
        F && Efe(F, I({
          scrollMode: "if-needed",
          block: "nearest"
        }, V));
      }
    }, A = function() {
      let N = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
      if (N === !0) {
        const V = [];
        return Object.values(_).forEach((z) => {
          let {
            namePath: W
          } = z;
          V.push(W.value);
        }), z5(t.model, V);
      } else
        return z5(t.model, N);
    }, D = (N, V) => {
      if (Xr(!(N instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !t.model)
        return Xr(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
      const z = !!N, W = z ? Zl(N).map(H2) : [], F = [];
      Object.values(_).forEach((ne) => {
        var ee;
        if (z || W.push(ne.namePath.value), !(!((ee = ne.rules) === null || ee === void 0) && ee.value.length))
          return;
        const oe = ne.namePath.value;
        if (!z || lxe(W, oe)) {
          const K = ne.validateRules(I({
            validateMessages: v.value
          }, V));
          F.push(K.then(() => ({
            name: oe,
            errors: [],
            warnings: []
          })).catch((ie) => {
            const X = [], H = [];
            return ie.forEach((G) => {
              let {
                rule: {
                  warningOnly: re
                },
                errors: fe
              } = G;
              re ? H.push(...fe) : X.push(...fe);
            }), X.length ? Promise.reject({
              name: oe,
              errors: X,
              warnings: H
            }) : {
              name: oe,
              errors: X,
              warnings: H
            };
          }));
        }
      });
      const Q = $X(F);
      b.value = Q;
      const Z = Q.then(() => b.value === Q ? Promise.resolve(A(W)) : Promise.reject([])).catch((ne) => {
        const ee = ne.filter((oe) => oe && oe.errors.length);
        return Promise.reject({
          values: A(W),
          errorFields: ee,
          outOfDate: b.value !== Q
        });
      });
      return Z.catch((ne) => ne), Z;
    }, E = function() {
      return D(...arguments);
    }, R = (N) => {
      N.preventDefault(), N.stopPropagation(), n("submit", N), t.model && D().then((z) => {
        n("finish", z);
      }).catch((z) => {
        w(z);
      });
    };
    return i({
      resetFields: C,
      clearValidate: T,
      validateFields: D,
      getFieldsValue: A,
      validate: P,
      scrollToField: $
    }), wX({
      model: L(() => t.model),
      name: L(() => t.name),
      labelAlign: L(() => t.labelAlign),
      labelCol: L(() => t.labelCol),
      labelWrap: L(() => t.labelWrap),
      wrapperCol: L(() => t.wrapperCol),
      vertical: L(() => t.layout === "vertical"),
      colon: h,
      requiredMark: d,
      validateTrigger: L(() => t.validateTrigger),
      rules: L(() => t.rules),
      addField: O,
      removeField: S,
      onValidate: (N, V, z) => {
        n("validate", N, V, z);
      },
      validateMessages: v
    }), se(() => t.rules, () => {
      t.validateOnRuleChange && D();
    }), () => {
      var N;
      return g(M("form", j(j({}, a), {}, {
        onSubmit: R,
        class: [y.value, a.class]
      }), [(N = r.default) === null || N === void 0 ? void 0 : N.call(r)]));
    };
  }
});
dr.useInjectFormItemContext = ss;
dr.ItemRest = im;
dr.install = function(t) {
  return t.component(dr.name, dr), t.component(dr.Item.name, dr.Item), t.component(im.name, im), t;
};
const Vxe = new Ot("antCheckboxEffect", {
  "0%": {
    transform: "scale(1)",
    opacity: 0.5
  },
  "100%": {
    transform: "scale(1.6)",
    opacity: 0
  }
}), Fxe = (t) => {
  const {
    checkboxCls: e
  } = t, n = `${e}-wrapper`;
  return [
    // ===================== Basic =====================
    {
      // Group
      [`${e}-group`]: I(I({}, nn(t)), {
        display: "inline-flex",
        flexWrap: "wrap",
        columnGap: t.marginXS,
        // Group > Grid
        [`> ${t.antCls}-row`]: {
          flex: 1
        }
      }),
      // Wrapper
      [n]: I(I({}, nn(t)), {
        display: "inline-flex",
        alignItems: "baseline",
        cursor: "pointer",
        // Fix checkbox & radio in flex align #30260
        "&:after": {
          display: "inline-block",
          width: 0,
          overflow: "hidden",
          content: "'\\a0'"
        },
        // Checkbox near checkbox
        [`& + ${n}`]: {
          marginInlineStart: 0
        },
        [`&${n}-in-form-item`]: {
          'input[type="checkbox"]': {
            width: 14,
            height: 14
            // FIXME: magic
          }
        }
      }),
      // Wrapper > Checkbox
      [e]: I(I({}, nn(t)), {
        position: "relative",
        whiteSpace: "nowrap",
        lineHeight: 1,
        cursor: "pointer",
        // To make alignment right when `controlHeight` is changed
        // Ref: https://github.com/ant-design/ant-design/issues/41564
        alignSelf: "center",
        // Wrapper > Checkbox > input
        [`${e}-input`]: {
          position: "absolute",
          // Since baseline align will get additional space offset,
          // we need to move input to top to make it align with text.
          // Ref: https://github.com/ant-design/ant-design/issues/38926#issuecomment-1486137799
          inset: 0,
          zIndex: 1,
          cursor: "pointer",
          opacity: 0,
          margin: 0,
          [`&:focus-visible + ${e}-inner`]: I({}, d0(t))
        },
        // Wrapper > Checkbox > inner
        [`${e}-inner`]: {
          boxSizing: "border-box",
          position: "relative",
          top: 0,
          insetInlineStart: 0,
          display: "block",
          width: t.checkboxSize,
          height: t.checkboxSize,
          direction: "ltr",
          backgroundColor: t.colorBgContainer,
          border: `${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,
          borderRadius: t.borderRadiusSM,
          borderCollapse: "separate",
          transition: `all ${t.motionDurationSlow}`,
          "&:after": {
            boxSizing: "border-box",
            position: "absolute",
            top: "50%",
            insetInlineStart: "21.5%",
            display: "table",
            width: t.checkboxSize / 14 * 5,
            height: t.checkboxSize / 14 * 8,
            border: `${t.lineWidthBold}px solid ${t.colorWhite}`,
            borderTop: 0,
            borderInlineStart: 0,
            transform: "rotate(45deg) scale(0) translate(-50%,-50%)",
            opacity: 0,
            content: '""',
            transition: `all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`
          }
        },
        // Wrapper > Checkbox + Text
        "& + span": {
          paddingInlineStart: t.paddingXS,
          paddingInlineEnd: t.paddingXS
        }
      })
    },
    // ================= Indeterminate =================
    {
      [e]: {
        "&-indeterminate": {
          // Wrapper > Checkbox > inner
          [`${e}-inner`]: {
            "&:after": {
              top: "50%",
              insetInlineStart: "50%",
              width: t.fontSizeLG / 2,
              height: t.fontSizeLG / 2,
              backgroundColor: t.colorPrimary,
              border: 0,
              transform: "translate(-50%, -50%) scale(1)",
              opacity: 1,
              content: '""'
            }
          }
        }
      }
    },
    // ===================== Hover =====================
    {
      // Wrapper
      [`${n}:hover ${e}:after`]: {
        visibility: "visible"
      },
      // Wrapper & Wrapper > Checkbox
      [`
        ${n}:not(${n}-disabled),
        ${e}:not(${e}-disabled)
      `]: {
        [`&:hover ${e}-inner`]: {
          borderColor: t.colorPrimary
        }
      },
      [`${n}:not(${n}-disabled)`]: {
        [`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]: {
          backgroundColor: t.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${e}-checked:not(${e}-disabled):after`]: {
          borderColor: t.colorPrimaryHover
        }
      }
    },
    // ==================== Checked ====================
    {
      // Wrapper > Checkbox
      [`${e}-checked`]: {
        [`${e}-inner`]: {
          backgroundColor: t.colorPrimary,
          borderColor: t.colorPrimary,
          "&:after": {
            opacity: 1,
            transform: "rotate(45deg) scale(1) translate(-50%,-50%)",
            transition: `all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`
          }
        },
        // Checked Effect
        "&:after": {
          position: "absolute",
          top: 0,
          insetInlineStart: 0,
          width: "100%",
          height: "100%",
          borderRadius: t.borderRadiusSM,
          visibility: "hidden",
          border: `${t.lineWidthBold}px solid ${t.colorPrimary}`,
          animationName: Vxe,
          animationDuration: t.motionDurationSlow,
          animationTimingFunction: "ease-in-out",
          animationFillMode: "backwards",
          content: '""',
          transition: `all ${t.motionDurationSlow}`
        }
      },
      [`
        ${n}-checked:not(${n}-disabled),
        ${e}-checked:not(${e}-disabled)
      `]: {
        [`&:hover ${e}-inner`]: {
          backgroundColor: t.colorPrimaryHover,
          borderColor: "transparent"
        },
        [`&:hover ${e}:after`]: {
          borderColor: t.colorPrimaryHover
        }
      }
    },
    // ==================== Disable ====================
    {
      // Wrapper
      [`${n}-disabled`]: {
        cursor: "not-allowed"
      },
      // Wrapper > Checkbox
      [`${e}-disabled`]: {
        // Wrapper > Checkbox > input
        [`&, ${e}-input`]: {
          cursor: "not-allowed",
          // Disabled for native input to enable Tooltip event handler
          // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
          pointerEvents: "none"
        },
        // Wrapper > Checkbox > inner
        [`${e}-inner`]: {
          background: t.colorBgContainerDisabled,
          borderColor: t.colorBorder,
          "&:after": {
            borderColor: t.colorTextDisabled
          }
        },
        "&:after": {
          display: "none"
        },
        "& + span": {
          color: t.colorTextDisabled
        },
        [`&${e}-indeterminate ${e}-inner::after`]: {
          background: t.colorTextDisabled
        }
      }
    }
  ];
};
function Wxe(t, e) {
  const n = Bt(e, {
    checkboxCls: `.${t}`,
    checkboxSize: e.controlInteractiveSize
  });
  return [Fxe(n)];
}
const AX = Sn("Checkbox", (t, e) => {
  let {
    prefixCls: n
  } = e;
  return [Wxe(n, t)];
}), Qxe = () => ({
  name: String,
  prefixCls: String,
  options: uf([]),
  disabled: Boolean,
  id: String
}), Hxe = () => I(I({}, Qxe()), {
  defaultValue: uf(),
  value: uf(),
  onChange: tt(),
  "onUpdate:value": tt()
}), Gxe = () => ({
  prefixCls: String,
  defaultChecked: nt(),
  checked: nt(),
  disabled: nt(),
  isGroup: nt(),
  value: Y.any,
  name: String,
  id: String,
  indeterminate: nt(),
  type: hn("checkbox"),
  autofocus: nt(),
  onChange: tt(),
  "onUpdate:checked": tt(),
  onClick: tt(),
  skipGroup: nt(!1)
}), jxe = () => I(I({}, Gxe()), {
  indeterminate: nt(!1)
}), EX = Symbol("CheckboxGroupContext");
var H5 = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const dg = te({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckbox",
  inheritAttrs: !1,
  __ANT_CHECKBOX: !0,
  props: jxe(),
  // emits: ['change', 'update:checked'],
  setup(t, e) {
    let {
      emit: n,
      attrs: r,
      slots: i,
      expose: a
    } = e;
    const o = ss(), s = ro.useInject(), {
      prefixCls: l,
      direction: u,
      disabled: c
    } = It("checkbox", t), f = Ko(), [d, h] = AX(l), p = Ge(EX, void 0), v = Symbol("checkboxUniId"), g = L(() => (p == null ? void 0 : p.disabled.value) || c.value);
    ht(() => {
      !t.skipGroup && p && p.registerValue(v, t.value);
    }), yt(() => {
      p && p.cancelValue(v);
    }), it(() => {
      Xr(!!(t.checked !== void 0 || p || t.value === void 0), "Checkbox", "`value` is not validate prop, do you mean `checked`?");
    });
    const m = (O) => {
      const S = O.target.checked;
      n("update:checked", S), n("change", O), o.onFieldChange();
    }, y = U();
    return a({
      focus: () => {
        var O;
        (O = y.value) === null || O === void 0 || O.focus();
      },
      blur: () => {
        var O;
        (O = y.value) === null || O === void 0 || O.blur();
      }
    }), () => {
      var O;
      const S = Yn((O = i.default) === null || O === void 0 ? void 0 : O.call(i)), {
        indeterminate: x,
        skipGroup: C,
        id: T = o.id.value
      } = t, w = H5(t, ["indeterminate", "skipGroup", "id"]), {
        onMouseenter: P,
        onMouseleave: $,
        onInput: A,
        class: D,
        style: E
      } = r, R = H5(r, ["onMouseenter", "onMouseleave", "onInput", "class", "style"]), N = I(I(I(I({}, w), {
        id: T,
        prefixCls: l.value
      }), R), {
        disabled: g.value
      });
      p && !C ? (N.onChange = function() {
        for (var F = arguments.length, Q = new Array(F), Z = 0; Z < F; Z++)
          Q[Z] = arguments[Z];
        n("change", ...Q), p.toggleOption({
          label: S,
          value: t.value
        });
      }, N.name = p.name.value, N.checked = p.mergedValue.value.includes(t.value), N.disabled = g.value || f.value, N.indeterminate = x) : N.onChange = m;
      const V = ye({
        [`${l.value}-wrapper`]: !0,
        [`${l.value}-rtl`]: u.value === "rtl",
        [`${l.value}-wrapper-checked`]: N.checked,
        [`${l.value}-wrapper-disabled`]: N.disabled,
        [`${l.value}-wrapper-in-form-item`]: s.isFormItemInput
      }, D, h.value), z = ye({
        [`${l.value}-indeterminate`]: x
      }, h.value);
      return d(M("label", {
        class: V,
        style: E,
        onMouseenter: P,
        onMouseleave: $
      }, [M(KU, j(j({
        "aria-checked": x ? "mixed" : void 0
      }, N), {}, {
        class: z,
        ref: y
      }), null), S.length ? M("span", null, [S]) : null]));
    };
  }
}), z1 = te({
  compatConfig: {
    MODE: 3
  },
  name: "ACheckboxGroup",
  inheritAttrs: !1,
  props: Hxe(),
  // emits: ['change', 'update:value'],
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      emit: i,
      expose: a
    } = e;
    const o = ss(), {
      prefixCls: s,
      direction: l
    } = It("checkbox", t), u = L(() => `${s.value}-group`), [c, f] = AX(u), d = U((t.value === void 0 ? t.defaultValue : t.value) || []);
    se(() => t.value, () => {
      d.value = t.value || [];
    });
    const h = L(() => t.options.map((_) => typeof _ == "string" || typeof _ == "number" ? {
      label: _,
      value: _
    } : _)), p = U(Symbol()), v = U(/* @__PURE__ */ new Map()), g = (_) => {
      v.value.delete(_), p.value = Symbol();
    }, m = (_, O) => {
      v.value.set(_, O), p.value = Symbol();
    }, y = U(/* @__PURE__ */ new Map());
    return se(p, () => {
      const _ = /* @__PURE__ */ new Map();
      for (const O of v.value.values())
        _.set(O, !0);
      y.value = _;
    }), pt(EX, {
      cancelValue: g,
      registerValue: m,
      toggleOption: (_) => {
        const O = d.value.indexOf(_.value), S = [...d.value];
        O === -1 ? S.push(_.value) : S.splice(O, 1), t.value === void 0 && (d.value = S);
        const x = S.filter((C) => y.value.has(C)).sort((C, T) => {
          const w = h.value.findIndex(($) => $.value === C), P = h.value.findIndex(($) => $.value === T);
          return w - P;
        });
        i("update:value", x), i("change", x), o.onFieldChange();
      },
      mergedValue: d,
      name: L(() => t.name),
      disabled: L(() => t.disabled)
    }), a({
      mergedValue: d
    }), () => {
      var _;
      const {
        id: O = o.id.value
      } = t;
      let S = null;
      return h.value && h.value.length > 0 && (S = h.value.map((x) => {
        var C;
        return M(dg, {
          prefixCls: s.value,
          key: x.value.toString(),
          disabled: "disabled" in x ? x.disabled : t.disabled,
          indeterminate: x.indeterminate,
          value: x.value,
          checked: d.value.indexOf(x.value) !== -1,
          onChange: x.onChange,
          class: `${u.value}-item`
        }, {
          default: () => [n.label !== void 0 ? (C = n.label) === null || C === void 0 ? void 0 : C.call(n, x) : x.label]
        });
      })), c(M("div", j(j({}, r), {}, {
        class: [u.value, {
          [`${u.value}-rtl`]: l.value === "rtl"
        }, r.class, f.value],
        id: O
      }), [S || ((_ = n.default) === null || _ === void 0 ? void 0 : _.call(n))]));
    };
  }
});
dg.Group = z1;
dg.install = function(t) {
  return t.component(dg.name, dg), t.component(z1.name, z1), t;
};
let $_ = I({}, zs.Modal);
function Zxe(t) {
  t ? $_ = I(I({}, $_), t) : $_ = I({}, zs.Modal);
}
function Uxe() {
  return $_;
}
const j2 = "internalMark", A_ = te({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(t, e) {
    let {
      slots: n
    } = e;
    Xr(t.ANT_MARK__ === j2, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const r = tn({
      antLocale: I(I({}, t.locale), {
        exist: !0
      }),
      ANT_MARK__: j2
    });
    return pt("localeData", r), se(() => t.locale, (i) => {
      Zxe(i && i.Modal), r.antLocale = I(I({}, i), {
        exist: !0
      });
    }, {
      immediate: !0
    }), () => {
      var i;
      return (i = n.default) === null || i === void 0 ? void 0 : i.call(n);
    };
  }
});
A_.install = function(t) {
  return t.component(A_.name, A_), t;
};
const Xxe = np(A_), Ox = te({
  name: "Notice",
  inheritAttrs: !1,
  props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e, i, a = !1;
    const o = L(() => t.duration === void 0 ? 4.5 : t.duration), s = () => {
      o.value && !a && (i = setTimeout(() => {
        u();
      }, o.value * 1e3));
    }, l = () => {
      i && (clearTimeout(i), i = null);
    }, u = (f) => {
      f && f.stopPropagation(), l();
      const {
        onClose: d,
        noticeKey: h
      } = t;
      d && d(h);
    }, c = () => {
      l(), s();
    };
    return it(() => {
      s();
    }), nl(() => {
      a = !0, l();
    }), se([o, () => t.updateMark, () => t.visible], (f, d) => {
      let [h, p, v] = f, [g, m, y] = d;
      (h !== g || p !== m || v !== y && y) && c();
    }, {
      flush: "post"
    }), () => {
      var f, d;
      const {
        prefixCls: h,
        closable: p,
        closeIcon: v = (f = r.closeIcon) === null || f === void 0 ? void 0 : f.call(r),
        onClick: g,
        holder: m
      } = t, {
        class: y,
        style: b
      } = n, _ = `${h}-notice`, O = Object.keys(n).reduce((x, C) => ((C.startsWith("data-") || C.startsWith("aria-") || C === "role") && (x[C] = n[C]), x), {}), S = M("div", j({
        class: ye(_, y, {
          [`${_}-closable`]: p
        }),
        style: b,
        onMouseenter: l,
        onMouseleave: s,
        onClick: g
      }, O), [M("div", {
        class: `${_}-content`
      }, [(d = r.default) === null || d === void 0 ? void 0 : d.call(r)]), p ? M("a", {
        tabindex: 0,
        onClick: u,
        class: `${_}-close`
      }, [v || M("span", {
        class: `${_}-close-x`
      }, null)]) : null]);
      return m ? M(PS, {
        to: m
      }, {
        default: () => S
      }) : S;
    };
  }
});
var Yxe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
let G5 = 0;
const qxe = Date.now();
function j5() {
  const t = G5;
  return G5 += 1, `rcNotification_${qxe}_${t}`;
}
const V1 = te({
  name: "Notification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      slots: i
    } = e;
    const a = /* @__PURE__ */ new Map(), o = U([]), s = L(() => {
      const {
        prefixCls: c,
        animation: f = "fade"
      } = t;
      let d = t.transitionName;
      return !d && f && (d = `${c}-${f}`), wI(d);
    }), l = (c, f) => {
      const d = c.key || j5(), h = I(I({}, c), {
        key: d
      }), {
        maxCount: p
      } = t, v = o.value.map((m) => m.notice.key).indexOf(d), g = o.value.concat();
      v !== -1 ? g.splice(v, 1, {
        notice: h,
        holderCallback: f
      }) : (p && o.value.length >= p && (h.key = g[0].notice.key, h.updateMark = j5(), h.userPassKey = d, g.shift()), g.push({
        notice: h,
        holderCallback: f
      })), o.value = g;
    }, u = (c) => {
      o.value = o.value.filter((f) => {
        let {
          notice: {
            key: d,
            userPassKey: h
          }
        } = f;
        return (h || d) !== c;
      });
    };
    return r({
      add: l,
      remove: u,
      notices: o
    }), () => {
      var c;
      const {
        prefixCls: f,
        closeIcon: d = (c = i.closeIcon) === null || c === void 0 ? void 0 : c.call(i, {
          prefixCls: f
        })
      } = t, h = o.value.map((v, g) => {
        let {
          notice: m,
          holderCallback: y
        } = v;
        const b = g === o.value.length - 1 ? m.updateMark : void 0, {
          key: _,
          userPassKey: O
        } = m, {
          content: S
        } = m, x = I(I(I({
          prefixCls: f,
          closeIcon: typeof d == "function" ? d({
            prefixCls: f
          }) : d
        }, m), m.props), {
          key: _,
          noticeKey: O || _,
          updateMark: b,
          onClose: (C) => {
            var T;
            u(C), (T = m.onClose) === null || T === void 0 || T.call(m);
          },
          onClick: m.onClick
        });
        return y ? M("div", {
          key: _,
          class: `${f}-hook-holder`,
          ref: (C) => {
            typeof _ > "u" || (C ? (a.set(_, C), y(C, x)) : a.delete(_));
          }
        }, null) : M(Ox, j(j({}, x), {}, {
          class: ye(x.class, t.hashId)
        }), {
          default: () => [typeof S == "function" ? S({
            prefixCls: f
          }) : S]
        });
      }), p = {
        [f]: 1,
        [n.class]: !!n.class,
        [t.hashId]: !0
      };
      return M("div", {
        class: p,
        style: n.style || {
          top: "65px",
          left: "50%"
        }
      }, [M(JM, j({
        tag: "div"
      }, s.value), {
        default: () => [h]
      })]);
    };
  }
});
V1.newInstance = function(e, n) {
  const r = e || {}, {
    name: i = "notification",
    getContainer: a,
    appContext: o,
    prefixCls: s,
    rootPrefixCls: l,
    transitionName: u,
    hasTransitionName: c,
    useStyle: f
  } = r, d = Yxe(r, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]), h = document.createElement("div");
  a ? a().appendChild(h) : document.body.appendChild(h);
  const p = te({
    compatConfig: {
      MODE: 3
    },
    name: "NotificationWrapper",
    setup(g, m) {
      let {
        attrs: y
      } = m;
      const b = ae(), _ = L(() => hr.getPrefixCls(i, s)), [, O] = f(_);
      return it(() => {
        n({
          notice(S) {
            var x;
            (x = b.value) === null || x === void 0 || x.add(S);
          },
          removeNotice(S) {
            var x;
            (x = b.value) === null || x === void 0 || x.remove(S);
          },
          destroy() {
            sf(null, h), h.parentNode && h.parentNode.removeChild(h);
          },
          component: b
        });
      }), () => {
        const S = hr, x = S.getRootPrefixCls(l, _.value), C = c ? u : `${_.value}-${u}`;
        return M(Xd, j(j({}, S), {}, {
          prefixCls: x
        }), {
          default: () => [M(V1, j(j({
            ref: b
          }, y), {}, {
            prefixCls: _.value,
            transitionName: C,
            hashId: O.value
          }), null)]
        });
      };
    }
  }), v = M(p, d);
  v.appContext = o || v.appContext, sf(v, h);
};
let Z5 = 0;
const Kxe = Date.now();
function U5() {
  const t = Z5;
  return Z5 += 1, `rcNotification_${Kxe}_${t}`;
}
const Jxe = te({
  name: "HookNotification",
  inheritAttrs: !1,
  props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = /* @__PURE__ */ new Map(), a = L(() => t.notices), o = L(() => {
      let c = t.transitionName;
      if (!c && t.animation)
        switch (typeof t.animation) {
          case "string":
            c = t.animation;
            break;
          case "function":
            c = t.animation().name;
            break;
          case "object":
            c = t.animation.name;
            break;
          default:
            c = `${t.prefixCls}-fade`;
            break;
        }
      return wI(c);
    }), s = (c) => t.remove(c), l = U({});
    se(a, () => {
      const c = {};
      Object.keys(l.value).forEach((f) => {
        c[f] = [];
      }), t.notices.forEach((f) => {
        const {
          placement: d = "topRight"
        } = f.notice;
        d && (c[d] = c[d] || [], c[d].push(f));
      }), l.value = c;
    });
    const u = L(() => Object.keys(l.value));
    return () => {
      var c;
      const {
        prefixCls: f,
        closeIcon: d = (c = r.closeIcon) === null || c === void 0 ? void 0 : c.call(r, {
          prefixCls: f
        })
      } = t, h = u.value.map((p) => {
        var v, g;
        const m = l.value[p], y = (v = t.getClassName) === null || v === void 0 ? void 0 : v.call(t, p), b = (g = t.getStyles) === null || g === void 0 ? void 0 : g.call(t, p), _ = m.map((x, C) => {
          let {
            notice: T,
            holderCallback: w
          } = x;
          const P = C === a.value.length - 1 ? T.updateMark : void 0, {
            key: $,
            userPassKey: A
          } = T, {
            content: D
          } = T, E = I(I(I({
            prefixCls: f,
            closeIcon: typeof d == "function" ? d({
              prefixCls: f
            }) : d
          }, T), T.props), {
            key: $,
            noticeKey: A || $,
            updateMark: P,
            onClose: (R) => {
              var N;
              s(R), (N = T.onClose) === null || N === void 0 || N.call(T);
            },
            onClick: T.onClick
          });
          return w ? M("div", {
            key: $,
            class: `${f}-hook-holder`,
            ref: (R) => {
              typeof $ > "u" || (R ? (i.set($, R), w(R, E)) : i.delete($));
            }
          }, null) : M(Ox, j(j({}, E), {}, {
            class: ye(E.class, t.hashId)
          }), {
            default: () => [typeof D == "function" ? D({
              prefixCls: f
            }) : D]
          });
        }), O = {
          [f]: 1,
          [`${f}-${p}`]: 1,
          [n.class]: !!n.class,
          [t.hashId]: !0,
          [y]: !!y
        };
        function S() {
          var x;
          m.length > 0 || (Reflect.deleteProperty(l.value, p), (x = t.onAllRemoved) === null || x === void 0 || x.call(t));
        }
        return M("div", {
          key: p,
          class: O,
          style: n.style || b || {
            top: "65px",
            left: "50%"
          }
        }, [M(JM, j(j({
          tag: "div"
        }, o.value), {}, {
          onAfterLeave: S
        }), {
          default: () => [_]
        })]);
      });
      return M(AZ, {
        getContainer: t.getContainer
      }, {
        default: () => [h]
      });
    };
  }
}), ewe = Jxe;
var twe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const nwe = () => document.body;
let X5 = 0;
function rwe() {
  const t = {};
  for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
    n[r] = arguments[r];
  return n.forEach((i) => {
    i && Object.keys(i).forEach((a) => {
      const o = i[a];
      o !== void 0 && (t[a] = o);
    });
  }), t;
}
function MX() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  const {
    getContainer: e = nwe,
    motion: n,
    prefixCls: r,
    maxCount: i,
    getClassName: a,
    getStyles: o,
    onAllRemoved: s
  } = t, l = twe(t, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]), u = ae([]), c = ae(), f = (m, y) => {
    const b = m.key || U5(), _ = I(I({}, m), {
      key: b
    }), O = u.value.map((x) => x.notice.key).indexOf(b), S = u.value.concat();
    O !== -1 ? S.splice(O, 1, {
      notice: _,
      holderCallback: y
    }) : (i && u.value.length >= i && (_.key = S[0].notice.key, _.updateMark = U5(), _.userPassKey = b, S.shift()), S.push({
      notice: _,
      holderCallback: y
    })), u.value = S;
  }, d = (m) => {
    u.value = u.value.filter((y) => {
      let {
        notice: {
          key: b,
          userPassKey: _
        }
      } = y;
      return (_ || b) !== m;
    });
  }, h = () => {
    u.value = [];
  }, p = () => M(ewe, {
    ref: c,
    prefixCls: r,
    maxCount: i,
    notices: u.value,
    remove: d,
    getClassName: a,
    getStyles: o,
    animation: n,
    hashId: t.hashId,
    onAllRemoved: s,
    getContainer: e
  }, null), v = ae([]), g = {
    open: (m) => {
      const y = rwe(l, m);
      (y.key === null || y.key === void 0) && (y.key = `vc-notification-${X5}`, X5 += 1), v.value = [...v.value, {
        type: "open",
        config: y
      }];
    },
    close: (m) => {
      v.value = [...v.value, {
        type: "close",
        key: m
      }];
    },
    destroy: () => {
      v.value = [...v.value, {
        type: "destroy"
      }];
    }
  };
  return se(v, () => {
    v.value.length && (v.value.forEach((m) => {
      switch (m.type) {
        case "open":
          f(m.config);
          break;
        case "close":
          d(m.key);
          break;
        case "destroy":
          h();
          break;
      }
    }), v.value = []);
  }), [g, p];
}
const iwe = (t) => {
  const {
    componentCls: e,
    iconCls: n,
    boxShadowSecondary: r,
    colorBgElevated: i,
    colorSuccess: a,
    colorError: o,
    colorWarning: s,
    colorInfo: l,
    fontSizeLG: u,
    motionEaseInOutCirc: c,
    motionDurationSlow: f,
    marginXS: d,
    paddingXS: h,
    borderRadiusLG: p,
    zIndexPopup: v,
    // Custom token
    messageNoticeContentPadding: g
  } = t, m = new Ot("MessageMoveIn", {
    "0%": {
      padding: 0,
      transform: "translateY(-100%)",
      opacity: 0
    },
    "100%": {
      padding: h,
      transform: "translateY(0)",
      opacity: 1
    }
  }), y = new Ot("MessageMoveOut", {
    "0%": {
      maxHeight: t.height,
      padding: h,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      padding: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [e]: I(I({}, nn(t)), {
        position: "fixed",
        top: d,
        left: "50%",
        transform: "translateX(-50%)",
        width: "100%",
        pointerEvents: "none",
        zIndex: v,
        [`${e}-move-up`]: {
          animationFillMode: "forwards"
        },
        [`
        ${e}-move-up-appear,
        ${e}-move-up-enter
      `]: {
          animationName: m,
          animationDuration: f,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`
        ${e}-move-up-appear${e}-move-up-appear-active,
        ${e}-move-up-enter${e}-move-up-enter-active
      `]: {
          animationPlayState: "running"
        },
        [`${e}-move-up-leave`]: {
          animationName: y,
          animationDuration: f,
          animationPlayState: "paused",
          animationTimingFunction: c
        },
        [`${e}-move-up-leave${e}-move-up-leave-active`]: {
          animationPlayState: "running"
        },
        "&-rtl": {
          direction: "rtl",
          span: {
            direction: "rtl"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [`${e}-notice`]: {
        padding: h,
        textAlign: "center",
        [n]: {
          verticalAlign: "text-bottom",
          marginInlineEnd: d,
          fontSize: u
        },
        [`${e}-notice-content`]: {
          display: "inline-block",
          padding: g,
          background: i,
          borderRadius: p,
          boxShadow: r,
          pointerEvents: "all"
        },
        [`${e}-success ${n}`]: {
          color: a
        },
        [`${e}-error ${n}`]: {
          color: o
        },
        [`${e}-warning ${n}`]: {
          color: s
        },
        [`
        ${e}-info ${n},
        ${e}-loading ${n}`]: {
          color: l
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${e}-notice-pure-panel`]: {
        padding: 0,
        textAlign: "start"
      }
    }
  ];
}, pD = Sn("Message", (t) => {
  const e = Bt(t, {
    messageNoticeContentPadding: `${(t.controlHeightLG - t.fontSize * t.lineHeight) / 2}px ${t.paddingSM}px`
  });
  return [iwe(e)];
}, (t) => ({
  height: 150,
  zIndexPopup: t.zIndexPopupBase + 10
})), awe = {
  info: M(If, null, null),
  success: M(Ou, null, null),
  error: M(Da, null, null),
  warning: M(Su, null, null),
  loading: M(ts, null, null)
}, IX = te({
  name: "PureContent",
  inheritAttrs: !1,
  props: ["prefixCls", "type", "icon"],
  setup(t, e) {
    let {
      slots: n
    } = e;
    return () => {
      var r;
      return M("div", {
        class: ye(`${t.prefixCls}-custom-content`, `${t.prefixCls}-${t.type}`)
      }, [t.icon || awe[t.type], M("span", null, [(r = n.default) === null || r === void 0 ? void 0 : r.call(n)])]);
    };
  }
});
te({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    var i;
    const {
      getPrefixCls: a
    } = DS(), o = L(() => t.prefixCls || a("message")), [, s] = pD(o);
    return M(Ox, j(j({}, r), {}, {
      prefixCls: o.value,
      class: ye(s.value, `${o.value}-notice-pure-panel`),
      noticeKey: "pure",
      duration: null
    }), {
      default: () => [M(IX, {
        prefixCls: o.value,
        type: t.type,
        icon: t.icon
      }, {
        default: () => [(i = n.default) === null || i === void 0 ? void 0 : i.call(n)]
      })]
    });
  }
});
var owe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const swe = 8, lwe = 3, uwe = te({
  name: "Holder",
  inheritAttrs: !1,
  props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    var r, i;
    const {
      getPrefixCls: a,
      getPopupContainer: o
    } = It("message", t), s = L(() => a("message", t.prefixCls)), [, l] = pD(s), u = () => {
      var v;
      const g = (v = t.top) !== null && v !== void 0 ? v : swe;
      return {
        left: "50%",
        transform: "translateX(-50%)",
        top: typeof g == "number" ? `${g}px` : g
      };
    }, c = () => ye(l.value, t.rtl ? `${s.value}-rtl` : ""), f = () => {
      var v;
      return hI({
        prefixCls: s.value,
        animation: (v = t.animation) !== null && v !== void 0 ? v : "move-up",
        transitionName: t.transitionName
      });
    }, d = M("span", {
      class: `${s.value}-close-x`
    }, [M(al, {
      class: `${s.value}-close-icon`
    }, null)]), [h, p] = MX({
      //@ts-ignore
      getStyles: u,
      prefixCls: s.value,
      getClassName: c,
      motion: f,
      closable: !1,
      closeIcon: d,
      duration: (r = t.duration) !== null && r !== void 0 ? r : lwe,
      getContainer: (i = t.staticGetContainer) !== null && i !== void 0 ? i : o.value,
      maxCount: t.maxCount,
      onAllRemoved: t.onAllRemoved
    });
    return n(I(I({}, h), {
      prefixCls: s,
      hashId: l
    })), p;
  }
});
let Y5 = 0;
function cwe(t) {
  const e = ae(null), n = Symbol("messageHolderKey"), r = (l) => {
    var u;
    (u = e.value) === null || u === void 0 || u.close(l);
  }, i = (l) => {
    if (!e.value) {
      const O = () => {
      };
      return O.then = () => {
      }, O;
    }
    const {
      open: u,
      prefixCls: c,
      hashId: f
    } = e.value, d = `${c}-notice`, {
      content: h,
      icon: p,
      type: v,
      key: g,
      class: m,
      onClose: y
    } = l, b = owe(l, ["content", "icon", "type", "key", "class", "onClose"]);
    let _ = g;
    return _ == null && (Y5 += 1, _ = `antd-message-${Y5}`), uue((O) => (u(I(I({}, b), {
      key: _,
      content: () => M(IX, {
        prefixCls: c,
        type: v,
        icon: typeof p == "function" ? p() : p
      }, {
        default: () => [typeof h == "function" ? h() : h]
      }),
      placement: "top",
      // @ts-ignore
      class: ye(v && `${d}-${v}`, f, m),
      onClose: () => {
        y == null || y(), O();
      }
    })), () => {
      r(_);
    }));
  }, o = {
    open: i,
    destroy: (l) => {
      var u;
      l !== void 0 ? r(l) : (u = e.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["info", "success", "warning", "error", "loading"].forEach((l) => {
    const u = (c, f, d) => {
      let h;
      c && typeof c == "object" && "content" in c ? h = c : h = {
        content: c
      };
      let p, v;
      typeof f == "function" ? v = f : (p = f, v = d);
      const g = I(I({
        onClose: v,
        duration: p
      }, h), {
        type: l
      });
      return i(g);
    };
    o[l] = u;
  }), [o, () => M(uwe, j(j({
    key: n
  }, t), {}, {
    ref: e
  }), null)];
}
function fwe(t) {
  return cwe(t);
}
let DX = 3, RX, Zr, dwe = 1, kX = "", LX = "move-up", NX = !1, BX = () => document.body, zX, VX = !1;
function hwe() {
  return dwe++;
}
function pwe(t) {
  t.top !== void 0 && (RX = t.top, Zr = null), t.duration !== void 0 && (DX = t.duration), t.prefixCls !== void 0 && (kX = t.prefixCls), t.getContainer !== void 0 && (BX = t.getContainer, Zr = null), t.transitionName !== void 0 && (LX = t.transitionName, Zr = null, NX = !0), t.maxCount !== void 0 && (zX = t.maxCount, Zr = null), t.rtl !== void 0 && (VX = t.rtl);
}
function vwe(t, e) {
  if (Zr) {
    e(Zr);
    return;
  }
  V1.newInstance({
    appContext: t.appContext,
    prefixCls: t.prefixCls || kX,
    rootPrefixCls: t.rootPrefixCls,
    transitionName: LX,
    hasTransitionName: NX,
    style: {
      top: RX
    },
    getContainer: BX || t.getPopupContainer,
    maxCount: zX,
    name: "message",
    useStyle: pD
  }, (n) => {
    if (Zr) {
      e(Zr);
      return;
    }
    Zr = n, e(n);
  });
}
const FX = {
  info: If,
  success: Ou,
  error: Da,
  warning: Su,
  loading: ts
}, gwe = Object.keys(FX);
function mwe(t) {
  const e = t.duration !== void 0 ? t.duration : DX, n = t.key || hwe(), r = new Promise((a) => {
    const o = () => (typeof t.onClose == "function" && t.onClose(), a(!0));
    vwe(t, (s) => {
      s.notice({
        key: n,
        duration: e,
        style: t.style || {},
        class: t.class,
        content: (l) => {
          let {
            prefixCls: u
          } = l;
          const c = FX[t.type], f = c ? M(c, null, null) : "", d = ye(`${u}-custom-content`, {
            [`${u}-${t.type}`]: t.type,
            [`${u}-rtl`]: VX === !0
          });
          return M("div", {
            class: d
          }, [typeof t.icon == "function" ? t.icon() : t.icon || f, M("span", null, [typeof t.content == "function" ? t.content() : t.content])]);
        },
        onClose: o,
        onClick: t.onClick
      });
    });
  }), i = () => {
    Zr && Zr.removeNotice(n);
  };
  return i.then = (a, o) => r.then(a, o), i.promise = r, i;
}
function ywe(t) {
  return Object.prototype.toString.call(t) === "[object Object]" && !!t.content;
}
const $h = {
  open: mwe,
  config: pwe,
  destroy(t) {
    if (Zr)
      if (t) {
        const {
          removeNotice: e
        } = Zr;
        e(t);
      } else {
        const {
          destroy: e
        } = Zr;
        e(), Zr = null;
      }
  }
};
function bwe(t, e) {
  t[e] = (n, r, i) => ywe(n) ? t.open(I(I({}, n), {
    type: e
  })) : (typeof r == "function" && (i = r, r = void 0), t.open({
    content: n,
    duration: r,
    type: e,
    onClose: i
  }));
}
gwe.forEach((t) => bwe($h, t));
$h.warn = $h.warning;
$h.useMessage = fwe;
const _we = (t) => {
  const {
    componentCls: e,
    width: n,
    notificationMarginEdge: r
  } = t, i = new Ot("antNotificationTopFadeIn", {
    "0%": {
      marginTop: "-100%",
      opacity: 0
    },
    "100%": {
      marginTop: 0,
      opacity: 1
    }
  }), a = new Ot("antNotificationBottomFadeIn", {
    "0%": {
      marginBottom: "-100%",
      opacity: 0
    },
    "100%": {
      marginBottom: 0,
      opacity: 1
    }
  }), o = new Ot("antNotificationLeftFadeIn", {
    "0%": {
      right: {
        _skip_check_: !0,
        value: n
      },
      opacity: 0
    },
    "100%": {
      right: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  });
  return {
    [`&${e}-top, &${e}-bottom`]: {
      marginInline: 0
    },
    [`&${e}-top`]: {
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: i
      }
    },
    [`&${e}-bottom`]: {
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: a
      }
    },
    [`&${e}-topLeft, &${e}-bottomLeft`]: {
      marginInlineEnd: 0,
      marginInlineStart: r,
      [`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]: {
        animationName: o
      }
    }
  };
}, Owe = (t) => {
  const {
    iconCls: e,
    componentCls: n,
    // .ant-notification
    boxShadowSecondary: r,
    fontSizeLG: i,
    notificationMarginBottom: a,
    borderRadiusLG: o,
    colorSuccess: s,
    colorInfo: l,
    colorWarning: u,
    colorError: c,
    colorTextHeading: f,
    notificationBg: d,
    notificationPadding: h,
    notificationMarginEdge: p,
    motionDurationMid: v,
    motionEaseInOut: g,
    fontSize: m,
    lineHeight: y,
    width: b,
    notificationIconSize: _
  } = t, O = `${n}-notice`, S = new Ot("antNotificationFadeIn", {
    "0%": {
      left: {
        _skip_check_: !0,
        value: b
      },
      opacity: 0
    },
    "100%": {
      left: {
        _skip_check_: !0,
        value: 0
      },
      opacity: 1
    }
  }), x = new Ot("antNotificationFadeOut", {
    "0%": {
      maxHeight: t.animationMaxHeight,
      marginBottom: a,
      opacity: 1
    },
    "100%": {
      maxHeight: 0,
      marginBottom: 0,
      paddingTop: 0,
      paddingBottom: 0,
      opacity: 0
    }
  });
  return [
    // ============================ Holder ============================
    {
      [n]: I(I(I(I({}, nn(t)), {
        position: "fixed",
        zIndex: t.zIndexPopup,
        marginInlineEnd: p,
        [`${n}-hook-holder`]: {
          position: "relative"
        },
        [`&${n}-top, &${n}-bottom`]: {
          [`${n}-notice`]: {
            marginInline: "auto auto"
          }
        },
        [`&${n}-topLeft, &${n}-bottomLeft`]: {
          [`${n}-notice`]: {
            marginInlineEnd: "auto",
            marginInlineStart: 0
          }
        },
        //  animation
        [`${n}-fade-enter, ${n}-fade-appear`]: {
          animationDuration: t.motionDurationMid,
          animationTimingFunction: g,
          animationFillMode: "both",
          opacity: 0,
          animationPlayState: "paused"
        },
        [`${n}-fade-leave`]: {
          animationTimingFunction: g,
          animationFillMode: "both",
          animationDuration: v,
          animationPlayState: "paused"
        },
        [`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]: {
          animationName: S,
          animationPlayState: "running"
        },
        [`${n}-fade-leave${n}-fade-leave-active`]: {
          animationName: x,
          animationPlayState: "running"
        }
      }), _we(t)), {
        // RTL
        "&-rtl": {
          direction: "rtl",
          [`${n}-notice-btn`]: {
            float: "left"
          }
        }
      })
    },
    // ============================ Notice ============================
    {
      [O]: {
        position: "relative",
        width: b,
        maxWidth: `calc(100vw - ${p * 2}px)`,
        marginBottom: a,
        marginInlineStart: "auto",
        padding: h,
        overflow: "hidden",
        lineHeight: y,
        wordWrap: "break-word",
        background: d,
        borderRadius: o,
        boxShadow: r,
        [`${n}-close-icon`]: {
          fontSize: m,
          cursor: "pointer"
        },
        [`${O}-message`]: {
          marginBottom: t.marginXS,
          color: f,
          fontSize: i,
          lineHeight: t.lineHeightLG
        },
        [`${O}-description`]: {
          fontSize: m
        },
        [`&${O}-closable ${O}-message`]: {
          paddingInlineEnd: t.paddingLG
        },
        [`${O}-with-icon ${O}-message`]: {
          marginBottom: t.marginXS,
          marginInlineStart: t.marginSM + _,
          fontSize: i
        },
        [`${O}-with-icon ${O}-description`]: {
          marginInlineStart: t.marginSM + _,
          fontSize: m
        },
        // Icon & color style in different selector level
        // https://github.com/ant-design/ant-design/issues/16503
        // https://github.com/ant-design/ant-design/issues/15512
        [`${O}-icon`]: {
          position: "absolute",
          fontSize: _,
          lineHeight: 0,
          // icon-font
          [`&-success${e}`]: {
            color: s
          },
          [`&-info${e}`]: {
            color: l
          },
          [`&-warning${e}`]: {
            color: u
          },
          [`&-error${e}`]: {
            color: c
          }
        },
        [`${O}-close`]: {
          position: "absolute",
          top: t.notificationPaddingVertical,
          insetInlineEnd: t.notificationPaddingHorizontal,
          color: t.colorIcon,
          outline: "none",
          width: t.notificationCloseButtonSize,
          height: t.notificationCloseButtonSize,
          borderRadius: t.borderRadiusSM,
          transition: `background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          "&:hover": {
            color: t.colorIconHover,
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContent
          }
        },
        [`${O}-btn`]: {
          float: "right",
          marginTop: t.marginSM
        }
      }
    },
    // ============================= Pure =============================
    {
      [`${O}-pure-panel`]: {
        margin: 0
      }
    }
  ];
}, vD = Sn("Notification", (t) => {
  const e = t.paddingMD, n = t.paddingLG, r = Bt(t, {
    // default.less variables
    notificationBg: t.colorBgElevated,
    notificationPaddingVertical: e,
    notificationPaddingHorizontal: n,
    // index.less variables
    notificationPadding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,
    notificationMarginBottom: t.margin,
    notificationMarginEdge: t.marginLG,
    animationMaxHeight: 150,
    notificationIconSize: t.fontSizeLG * t.lineHeightLG,
    notificationCloseButtonSize: t.controlHeightLG * 0.55
  });
  return [Owe(r)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 50,
  width: 384
}));
function WX(t, e) {
  return e || M("span", {
    class: `${t}-close-x`
  }, [M(al, {
    class: `${t}-close-icon`
  }, null)]);
}
M(If, null, null), M(Ou, null, null), M(Da, null, null), M(Su, null, null), M(ts, null, null);
const Swe = {
  success: Ou,
  info: If,
  error: Da,
  warning: Su
};
function QX(t) {
  let {
    prefixCls: e,
    icon: n,
    type: r,
    message: i,
    description: a,
    btn: o
  } = t, s = null;
  if (n)
    s = M("span", {
      class: `${e}-icon`
    }, [Ld(n)]);
  else if (r) {
    const l = Swe[r];
    s = M(l, {
      class: `${e}-icon ${e}-icon-${r}`
    }, null);
  }
  return M("div", {
    class: ye({
      [`${e}-with-icon`]: s
    }),
    role: "alert"
  }, [s, M("div", {
    class: `${e}-message`
  }, [i]), M("div", {
    class: `${e}-description`
  }, [a]), o && M("div", {
    class: `${e}-btn`
  }, [o])]);
}
te({
  name: "PurePanel",
  inheritAttrs: !1,
  props: ["prefixCls", "icon", "type", "message", "description", "btn", "closeIcon"],
  setup(t) {
    const {
      getPrefixCls: e
    } = It("notification", t), n = L(() => t.prefixCls || e("notification")), r = L(() => `${n.value}-notice`), [, i] = vD(n);
    return () => M(Ox, j(j({}, t), {}, {
      prefixCls: n.value,
      class: ye(i.value, `${r.value}-pure-panel`),
      noticeKey: "pure",
      duration: null,
      closable: t.closable,
      closeIcon: WX(n.value, t.closeIcon)
    }), {
      default: () => [M(QX, {
        prefixCls: r.value,
        icon: t.icon,
        type: t.type,
        message: t.message,
        description: t.description,
        btn: t.btn
      }, null)]
    });
  }
});
function HX(t, e, n) {
  let r;
  switch (e = typeof e == "number" ? `${e}px` : e, n = typeof n == "number" ? `${n}px` : n, t) {
    case "top":
      r = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: e,
        bottom: "auto"
      };
      break;
    case "topLeft":
      r = {
        left: 0,
        top: e,
        bottom: "auto"
      };
      break;
    case "topRight":
      r = {
        right: 0,
        top: e,
        bottom: "auto"
      };
      break;
    case "bottom":
      r = {
        left: "50%",
        transform: "translateX(-50%)",
        right: "auto",
        top: "auto",
        bottom: n
      };
      break;
    case "bottomLeft":
      r = {
        left: 0,
        top: "auto",
        bottom: n
      };
      break;
    default:
      r = {
        right: 0,
        top: "auto",
        bottom: n
      };
      break;
  }
  return r;
}
function xwe(t) {
  return {
    name: `${t}-fade`
  };
}
var wwe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const q5 = 24, Cwe = 4.5, Twe = te({
  name: "Holder",
  inheritAttrs: !1,
  props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
  setup(t, e) {
    let {
      expose: n
    } = e;
    const {
      getPrefixCls: r,
      getPopupContainer: i
    } = It("notification", t), a = L(() => t.prefixCls || r("notification")), o = (d) => {
      var h, p;
      return HX(d, (h = t.top) !== null && h !== void 0 ? h : q5, (p = t.bottom) !== null && p !== void 0 ? p : q5);
    }, [, s] = vD(a), l = () => ye(s.value, {
      [`${a.value}-rtl`]: t.rtl
    }), u = () => xwe(a.value), [c, f] = MX({
      prefixCls: a.value,
      getStyles: o,
      getClassName: l,
      motion: u,
      closable: !0,
      closeIcon: WX(a.value),
      duration: Cwe,
      getContainer: () => {
        var d, h;
        return ((d = t.getPopupContainer) === null || d === void 0 ? void 0 : d.call(t)) || ((h = i.value) === null || h === void 0 ? void 0 : h.call(i)) || document.body;
      },
      maxCount: t.maxCount,
      hashId: s.value,
      onAllRemoved: t.onAllRemoved
    });
    return n(I(I({}, c), {
      prefixCls: a.value,
      hashId: s
    })), f;
  }
});
function Pwe(t) {
  const e = ae(null), n = Symbol("notificationHolderKey"), r = (s) => {
    if (!e.value)
      return;
    const {
      open: l,
      prefixCls: u,
      hashId: c
    } = e.value, f = `${u}-notice`, {
      message: d,
      description: h,
      icon: p,
      type: v,
      btn: g,
      class: m
    } = s, y = wwe(s, ["message", "description", "icon", "type", "btn", "class"]);
    return l(I(I({
      placement: "topRight"
    }, y), {
      content: () => M(QX, {
        prefixCls: f,
        icon: typeof p == "function" ? p() : p,
        type: v,
        message: typeof d == "function" ? d() : d,
        description: typeof h == "function" ? h() : h,
        btn: typeof g == "function" ? g() : g
      }, null),
      // @ts-ignore
      class: ye(v && `${f}-${v}`, c, m)
    }));
  }, a = {
    open: r,
    destroy: (s) => {
      var l, u;
      s !== void 0 ? (l = e.value) === null || l === void 0 || l.close(s) : (u = e.value) === null || u === void 0 || u.destroy();
    }
  };
  return ["success", "info", "warning", "error"].forEach((s) => {
    a[s] = (l) => r(I(I({}, l), {
      type: s
    }));
  }), [a, () => M(Twe, j(j({
    key: n
  }, t), {}, {
    ref: e
  }), null)];
}
function $we(t) {
  return Pwe(t);
}
const _c = {};
let GX = 4.5, jX = "24px", ZX = "24px", Z2 = "", UX = "topRight", XX = () => document.body, YX = null, U2 = !1, qX;
function Awe(t) {
  const {
    duration: e,
    placement: n,
    bottom: r,
    top: i,
    getContainer: a,
    closeIcon: o,
    prefixCls: s
  } = t;
  s !== void 0 && (Z2 = s), e !== void 0 && (GX = e), n !== void 0 && (UX = n), r !== void 0 && (ZX = typeof r == "number" ? `${r}px` : r), i !== void 0 && (jX = typeof i == "number" ? `${i}px` : i), a !== void 0 && (XX = a), o !== void 0 && (YX = o), t.rtl !== void 0 && (U2 = t.rtl), t.maxCount !== void 0 && (qX = t.maxCount);
}
function Ewe(t, e) {
  let {
    prefixCls: n,
    placement: r = UX,
    getContainer: i = XX,
    top: a,
    bottom: o,
    closeIcon: s = YX,
    appContext: l
  } = t;
  const {
    getPrefixCls: u
  } = Wwe(), c = u("notification", n || Z2), f = `${c}-${r}-${U2}`, d = _c[f];
  if (d) {
    Promise.resolve(d).then((p) => {
      e(p);
    });
    return;
  }
  const h = ye(`${c}-${r}`, {
    [`${c}-rtl`]: U2 === !0
  });
  V1.newInstance({
    name: "notification",
    prefixCls: n || Z2,
    useStyle: vD,
    class: h,
    style: HX(r, a ?? jX, o ?? ZX),
    appContext: l,
    getContainer: i,
    closeIcon: (p) => {
      let {
        prefixCls: v
      } = p;
      return M("span", {
        class: `${v}-close-x`
      }, [Ld(s, {}, M(al, {
        class: `${v}-close-icon`
      }, null))]);
    },
    maxCount: qX,
    hasTransitionName: !0
  }, (p) => {
    _c[f] = p, e(p);
  });
}
const Mwe = {
  success: JI,
  info: fx,
  error: tD,
  warning: eD
};
function Iwe(t) {
  const {
    icon: e,
    type: n,
    description: r,
    message: i,
    btn: a
  } = t, o = t.duration === void 0 ? GX : t.duration;
  Ewe(t, (s) => {
    s.notice({
      content: (l) => {
        let {
          prefixCls: u
        } = l;
        const c = `${u}-notice`;
        let f = null;
        if (e)
          f = () => M("span", {
            class: `${c}-icon`
          }, [Ld(e)]);
        else if (n) {
          const d = Mwe[n];
          f = () => M(d, {
            class: `${c}-icon ${c}-icon-${n}`
          }, null);
        }
        return M("div", {
          class: f ? `${c}-with-icon` : ""
        }, [f && f(), M("div", {
          class: `${c}-message`
        }, [!r && f ? M("span", {
          class: `${c}-message-single-line-auto-margin`
        }, null) : null, Ld(i)]), M("div", {
          class: `${c}-description`
        }, [Ld(r)]), a ? M("span", {
          class: `${c}-btn`
        }, [Ld(a)]) : null]);
      },
      duration: o,
      closable: !0,
      onClose: t.onClose,
      onClick: t.onClick,
      key: t.key,
      style: t.style || {},
      class: t.class
    });
  });
}
const Ah = {
  open: Iwe,
  close(t) {
    Object.keys(_c).forEach((e) => Promise.resolve(_c[e]).then((n) => {
      n.removeNotice(t);
    }));
  },
  config: Awe,
  destroy() {
    Object.keys(_c).forEach((t) => {
      Promise.resolve(_c[t]).then((e) => {
        e.destroy();
      }), delete _c[t];
    });
  }
}, Dwe = ["success", "info", "warning", "error"];
Dwe.forEach((t) => {
  Ah[t] = (e) => Ah.open(I(I({}, e), {
    type: t
  }));
});
Ah.warn = Ah.warning;
Ah.useNotification = $we;
const Rwe = `-ant-${Date.now()}-${Math.random()}`;
function kwe(t, e) {
  const n = {}, r = (o, s) => {
    let l = o.clone();
    return l = (s == null ? void 0 : s(l)) || l, l.toRgbString();
  }, i = (o, s) => {
    const l = new en(o), u = ff(l.toRgbString());
    n[`${s}-color`] = r(l), n[`${s}-color-disabled`] = u[1], n[`${s}-color-hover`] = u[4], n[`${s}-color-active`] = u[6], n[`${s}-color-outline`] = l.clone().setAlpha(0.2).toRgbString(), n[`${s}-color-deprecated-bg`] = u[0], n[`${s}-color-deprecated-border`] = u[2];
  };
  if (e.primaryColor) {
    i(e.primaryColor, "primary");
    const o = new en(e.primaryColor), s = ff(o.toRgbString());
    s.forEach((u, c) => {
      n[`primary-${c + 1}`] = u;
    }), n["primary-color-deprecated-l-35"] = r(o, (u) => u.lighten(35)), n["primary-color-deprecated-l-20"] = r(o, (u) => u.lighten(20)), n["primary-color-deprecated-t-20"] = r(o, (u) => u.tint(20)), n["primary-color-deprecated-t-50"] = r(o, (u) => u.tint(50)), n["primary-color-deprecated-f-12"] = r(o, (u) => u.setAlpha(u.getAlpha() * 0.12));
    const l = new en(s[0]);
    n["primary-color-active-deprecated-f-30"] = r(l, (u) => u.setAlpha(u.getAlpha() * 0.3)), n["primary-color-active-deprecated-d-02"] = r(l, (u) => u.darken(2));
  }
  return e.successColor && i(e.successColor, "success"), e.warningColor && i(e.warningColor, "warning"), e.errorColor && i(e.errorColor, "error"), e.infoColor && i(e.infoColor, "info"), `
  :root {
    ${Object.keys(n).map((o) => `--${t}-${o}: ${n[o]};`).join(`
`)}
  }
  `.trim();
}
function Lwe(t, e) {
  const n = kwe(t, e);
  wa() ? Yg(n, `${Rwe}-dynamic-theme`) : Xr(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
}
const Nwe = (t) => {
  const [e, n] = ap();
  return d2(L(() => ({
    theme: e.value,
    token: n.value,
    hashId: "",
    path: ["ant-design-icons", t.value]
  })), () => [{
    [`.${t.value}`]: I(I({}, ip()), {
      [`.${t.value} .${t.value}-icon`]: {
        display: "block"
      }
    })
  }]);
};
function Bwe(t, e) {
  const n = L(() => (t == null ? void 0 : t.value) || {}), r = L(() => n.value.inherit === !1 || !(e != null && e.value) ? Vj : e.value);
  return L(() => {
    if (!(t != null && t.value))
      return e == null ? void 0 : e.value;
    const a = I({}, r.value.components);
    return Object.keys(t.value.components || {}).forEach((o) => {
      a[o] = I(I({}, a[o]), t.value.components[o]);
    }), I(I(I({}, r.value), n.value), {
      token: I(I({}, r.value.token), n.value.token),
      components: a
    });
  });
}
var zwe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Vwe = "ant";
function Ud() {
  return hr.prefixCls || Vwe;
}
function KX() {
  return hr.iconPrefixCls || iI;
}
const gD = tn({}), hr = tn({});
ht(() => {
  I(hr, gD), hr.prefixCls = Ud(), hr.iconPrefixCls = KX(), hr.getPrefixCls = (t, e) => e || (t ? `${hr.prefixCls}-${t}` : hr.prefixCls), hr.getRootPrefixCls = () => hr.prefixCls ? hr.prefixCls : Ud();
});
let PC;
const Fwe = (t) => {
  PC && PC(), PC = ht(() => {
    I(gD, tn(t)), I(hr, tn(t));
  }), t.theme && Lwe(Ud(), t.theme);
}, Wwe = () => ({
  getPrefixCls: (t, e) => e || (t ? `${Ud()}-${t}` : Ud()),
  getIconPrefixCls: KX,
  getRootPrefixCls: () => hr.prefixCls ? hr.prefixCls : Ud()
}), Xd = te({
  compatConfig: {
    MODE: 3
  },
  name: "AConfigProvider",
  inheritAttrs: !1,
  props: kue(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = DS(), i = (E, R) => {
      const {
        prefixCls: N = "ant"
      } = t;
      if (R) return R;
      const V = N || r.getPrefixCls("");
      return E ? `${V}-${E}` : V;
    }, a = L(() => t.iconPrefixCls || r.iconPrefixCls.value || iI), o = L(() => a.value !== r.iconPrefixCls.value), s = L(() => {
      var E;
      return t.csp || ((E = r.csp) === null || E === void 0 ? void 0 : E.value);
    }), l = Nwe(a), u = Bwe(L(() => t.theme), L(() => {
      var E;
      return (E = r.theme) === null || E === void 0 ? void 0 : E.value;
    })), c = (E) => (t.renderEmpty || n.renderEmpty || r.renderEmpty || Pfe)(E), f = L(() => {
      var E, R;
      return (E = t.autoInsertSpaceInButton) !== null && E !== void 0 ? E : (R = r.autoInsertSpaceInButton) === null || R === void 0 ? void 0 : R.value;
    }), d = L(() => {
      var E;
      return t.locale || ((E = r.locale) === null || E === void 0 ? void 0 : E.value);
    });
    se(d, () => {
      gD.locale = d.value;
    }, {
      immediate: !0
    });
    const h = L(() => {
      var E;
      return t.direction || ((E = r.direction) === null || E === void 0 ? void 0 : E.value);
    }), p = L(() => {
      var E, R;
      return (E = t.space) !== null && E !== void 0 ? E : (R = r.space) === null || R === void 0 ? void 0 : R.value;
    }), v = L(() => {
      var E, R;
      return (E = t.virtual) !== null && E !== void 0 ? E : (R = r.virtual) === null || R === void 0 ? void 0 : R.value;
    }), g = L(() => {
      var E, R;
      return (E = t.dropdownMatchSelectWidth) !== null && E !== void 0 ? E : (R = r.dropdownMatchSelectWidth) === null || R === void 0 ? void 0 : R.value;
    }), m = L(() => {
      var E;
      return t.getTargetContainer !== void 0 ? t.getTargetContainer : (E = r.getTargetContainer) === null || E === void 0 ? void 0 : E.value;
    }), y = L(() => {
      var E;
      return t.getPopupContainer !== void 0 ? t.getPopupContainer : (E = r.getPopupContainer) === null || E === void 0 ? void 0 : E.value;
    }), b = L(() => {
      var E;
      return t.pageHeader !== void 0 ? t.pageHeader : (E = r.pageHeader) === null || E === void 0 ? void 0 : E.value;
    }), _ = L(() => {
      var E;
      return t.input !== void 0 ? t.input : (E = r.input) === null || E === void 0 ? void 0 : E.value;
    }), O = L(() => {
      var E;
      return t.pagination !== void 0 ? t.pagination : (E = r.pagination) === null || E === void 0 ? void 0 : E.value;
    }), S = L(() => {
      var E;
      return t.form !== void 0 ? t.form : (E = r.form) === null || E === void 0 ? void 0 : E.value;
    }), x = L(() => {
      var E;
      return t.select !== void 0 ? t.select : (E = r.select) === null || E === void 0 ? void 0 : E.value;
    }), C = L(() => t.componentSize), T = L(() => t.componentDisabled), w = L(() => {
      var E, R;
      return (E = t.wave) !== null && E !== void 0 ? E : (R = r.wave) === null || R === void 0 ? void 0 : R.value;
    }), P = {
      csp: s,
      autoInsertSpaceInButton: f,
      locale: d,
      direction: h,
      space: p,
      virtual: v,
      dropdownMatchSelectWidth: g,
      getPrefixCls: i,
      iconPrefixCls: a,
      theme: L(() => {
        var E, R;
        return (E = u.value) !== null && E !== void 0 ? E : (R = r.theme) === null || R === void 0 ? void 0 : R.value;
      }),
      renderEmpty: c,
      getTargetContainer: m,
      getPopupContainer: y,
      pageHeader: b,
      input: _,
      pagination: O,
      form: S,
      select: x,
      componentSize: C,
      componentDisabled: T,
      transformCellText: L(() => t.transformCellText),
      wave: w
    }, $ = L(() => {
      const E = u.value || {}, {
        algorithm: R,
        token: N
      } = E, V = zwe(E, ["algorithm", "token"]), z = R && (!Array.isArray(R) || R.length > 0) ? xj(R) : void 0;
      return I(I({}, V), {
        theme: z,
        token: I(I({}, zS), N)
      });
    }), A = L(() => {
      var E, R;
      let N = {};
      return d.value && (N = ((E = d.value.Form) === null || E === void 0 ? void 0 : E.defaultValidateMessages) || ((R = zs.Form) === null || R === void 0 ? void 0 : R.defaultValidateMessages) || {}), t.form && t.form.validateMessages && (N = I(I({}, N), t.form.validateMessages)), N;
    });
    Lue(P), Due({
      validateMessages: A
    }), Uj(C), cj(T);
    const D = (E) => {
      var R, N;
      let V = o.value ? l((R = n.default) === null || R === void 0 ? void 0 : R.call(n)) : (N = n.default) === null || N === void 0 ? void 0 : N.call(n);
      if (t.theme) {
        const z = /* @__PURE__ */ function() {
          return V;
        }();
        V = M(Sfe, {
          value: $.value
        }, {
          default: () => [z]
        });
      }
      return M(Xxe, {
        locale: d.value || E,
        ANT_MARK__: j2
      }, {
        default: () => [V]
      });
    };
    return ht(() => {
      h.value && ($h.config({
        rtl: h.value === "rtl"
      }), Ah.config({
        rtl: h.value === "rtl"
      }));
    }), () => M(dj, {
      children: (E, R, N) => D(N)
    }, null);
  }
});
Xd.config = Fwe;
Xd.install = function(t) {
  t.component(Xd.name, Xd);
};
const Qwe = (t) => {
  const {
    componentCls: e,
    sizePaddingEdgeHorizontal: n,
    colorSplit: r,
    lineWidth: i
  } = t;
  return {
    [e]: I(I({}, nn(t)), {
      borderBlockStart: `${i}px solid ${r}`,
      // vertical
      "&-vertical": {
        position: "relative",
        top: "-0.06em",
        display: "inline-block",
        height: "0.9em",
        margin: `0 ${t.dividerVerticalGutterMargin}px`,
        verticalAlign: "middle",
        borderTop: 0,
        borderInlineStart: `${i}px solid ${r}`
      },
      "&-horizontal": {
        display: "flex",
        clear: "both",
        width: "100%",
        minWidth: "100%",
        margin: `${t.dividerHorizontalGutterMargin}px 0`
      },
      [`&-horizontal${e}-with-text`]: {
        display: "flex",
        alignItems: "center",
        margin: `${t.dividerHorizontalWithTextGutterMargin}px 0`,
        color: t.colorTextHeading,
        fontWeight: 500,
        fontSize: t.fontSizeLG,
        whiteSpace: "nowrap",
        textAlign: "center",
        borderBlockStart: `0 ${r}`,
        "&::before, &::after": {
          position: "relative",
          width: "50%",
          borderBlockStart: `${i}px solid transparent`,
          // Chrome not accept `inherit` in `border-top`
          borderBlockStartColor: "inherit",
          borderBlockEnd: 0,
          transform: "translateY(50%)",
          content: "''"
        }
      },
      [`&-horizontal${e}-with-text-left`]: {
        "&::before": {
          width: "5%"
        },
        "&::after": {
          width: "95%"
        }
      },
      [`&-horizontal${e}-with-text-right`]: {
        "&::before": {
          width: "95%"
        },
        "&::after": {
          width: "5%"
        }
      },
      [`${e}-inner-text`]: {
        display: "inline-block",
        padding: "0 1em"
      },
      "&-dashed": {
        background: "none",
        borderColor: r,
        borderStyle: "dashed",
        borderWidth: `${i}px 0 0`
      },
      [`&-horizontal${e}-with-text${e}-dashed`]: {
        "&::before, &::after": {
          borderStyle: "dashed none none"
        }
      },
      [`&-vertical${e}-dashed`]: {
        borderInlineStartWidth: i,
        borderInlineEnd: 0,
        borderBlockStart: 0,
        borderBlockEnd: 0
      },
      [`&-plain${e}-with-text`]: {
        color: t.colorText,
        fontWeight: "normal",
        fontSize: t.fontSize
      },
      [`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]: {
        "&::before": {
          width: 0
        },
        "&::after": {
          width: "100%"
        },
        [`${e}-inner-text`]: {
          paddingInlineStart: n
        }
      },
      [`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]: {
        "&::before": {
          width: "100%"
        },
        "&::after": {
          width: 0
        },
        [`${e}-inner-text`]: {
          paddingInlineEnd: n
        }
      }
    })
  };
}, Hwe = Sn("Divider", (t) => {
  const e = Bt(t, {
    dividerVerticalGutterMargin: t.marginXS,
    dividerHorizontalWithTextGutterMargin: t.margin,
    dividerHorizontalGutterMargin: t.marginLG
  });
  return [Qwe(e)];
}, {
  sizePaddingEdgeHorizontal: 0
}), Gwe = () => ({
  prefixCls: String,
  type: {
    type: String,
    default: "horizontal"
  },
  dashed: {
    type: Boolean,
    default: !1
  },
  orientation: {
    type: String,
    default: "center"
  },
  plain: {
    type: Boolean,
    default: !1
  },
  orientationMargin: [String, Number]
}), jwe = te({
  name: "ADivider",
  inheritAttrs: !1,
  compatConfig: {
    MODE: 3
  },
  props: Gwe(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a
    } = It("divider", t), [o, s] = Hwe(i), l = L(() => t.orientation === "left" && t.orientationMargin != null), u = L(() => t.orientation === "right" && t.orientationMargin != null), c = L(() => {
      const {
        type: h,
        dashed: p,
        plain: v
      } = t, g = i.value;
      return {
        [g]: !0,
        [s.value]: !!s.value,
        [`${g}-${h}`]: !0,
        [`${g}-dashed`]: !!p,
        [`${g}-plain`]: !!v,
        [`${g}-rtl`]: a.value === "rtl",
        [`${g}-no-default-orientation-margin-left`]: l.value,
        [`${g}-no-default-orientation-margin-right`]: u.value
      };
    }), f = L(() => {
      const h = typeof t.orientationMargin == "number" ? `${t.orientationMargin}px` : t.orientationMargin;
      return I(I({}, l.value && {
        marginLeft: h
      }), u.value && {
        marginRight: h
      });
    }), d = L(() => t.orientation.length > 0 ? "-" + t.orientation : t.orientation);
    return () => {
      var h;
      const p = Yn((h = n.default) === null || h === void 0 ? void 0 : h.call(n));
      return o(M("div", j(j({}, r), {}, {
        class: [c.value, p.length ? `${i.value}-with-text ${i.value}-with-text${d.value}` : "", r.class],
        role: "separator"
      }), [p.length ? M("span", {
        class: `${i.value}-inner-text`,
        style: f.value
      }, [p]) : null]));
    };
  }
}), Zwe = np(jwe), hg = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
function mD(t) {
  return hg(t.prefix) || hg(t.suffix) || hg(t.allowClear);
}
function E_(t) {
  return hg(t.addonBefore) || hg(t.addonAfter);
}
function X2(t) {
  return typeof t > "u" || t === null ? "" : String(t);
}
function pg(t, e, n, r) {
  if (!n)
    return;
  const i = e;
  if (e.type === "click") {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    });
    const a = t.cloneNode(!0);
    i.target = a, i.currentTarget = a, a.value = "", n(i);
    return;
  }
  if (r !== void 0) {
    Object.defineProperty(i, "target", {
      writable: !0
    }), Object.defineProperty(i, "currentTarget", {
      writable: !0
    }), i.target = t, i.currentTarget = t, t.value = r, n(i);
    return;
  }
  n(i);
}
function JX(t, e) {
  if (!t) return;
  t.focus(e);
  const {
    cursor: n
  } = e || {};
  if (n) {
    const r = t.value.length;
    switch (n) {
      case "start":
        t.setSelectionRange(0, 0);
        break;
      case "end":
        t.setSelectionRange(r, r);
        break;
      default:
        t.setSelectionRange(0, r);
    }
  }
}
const Uwe = () => ({
  addonBefore: Y.any,
  addonAfter: Y.any,
  prefix: Y.any,
  suffix: Y.any,
  clearIcon: Y.any,
  affixWrapperClassName: String,
  groupClassName: String,
  wrapperClassName: String,
  inputClassName: String,
  allowClear: {
    type: Boolean,
    default: void 0
  }
}), eY = () => I(I({}, Uwe()), {
  value: {
    type: [String, Number, Symbol],
    default: void 0
  },
  defaultValue: {
    type: [String, Number, Symbol],
    default: void 0
  },
  inputElement: Y.any,
  prefixCls: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  focused: {
    type: Boolean,
    default: void 0
  },
  triggerFocus: Function,
  readonly: {
    type: Boolean,
    default: void 0
  },
  handleReset: Function,
  hidden: {
    type: Boolean,
    default: void 0
  }
}), tY = () => I(I({}, eY()), {
  id: String,
  placeholder: {
    type: [String, Number]
  },
  autocomplete: String,
  type: hn("text"),
  name: String,
  size: {
    type: String
  },
  autofocus: {
    type: Boolean,
    default: void 0
  },
  lazy: {
    type: Boolean,
    default: !0
  },
  maxlength: Number,
  loading: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  showCount: {
    type: [Boolean, Object]
  },
  htmlSize: Number,
  onPressEnter: Function,
  onKeydown: Function,
  onKeyup: Function,
  onFocus: Function,
  onBlur: Function,
  onChange: Function,
  onInput: Function,
  "onUpdate:value": Function,
  onCompositionstart: Function,
  onCompositionend: Function,
  valueModifiers: Object,
  hidden: {
    type: Boolean,
    default: void 0
  },
  status: String
}), Xwe = te({
  name: "BaseInput",
  inheritAttrs: !1,
  props: eY(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = U(), a = (s) => {
      var l;
      if (!((l = i.value) === null || l === void 0) && l.contains(s.target)) {
        const {
          triggerFocus: u
        } = t;
        u == null || u();
      }
    }, o = () => {
      var s;
      const {
        allowClear: l,
        value: u,
        disabled: c,
        readonly: f,
        handleReset: d,
        suffix: h = n.suffix,
        prefixCls: p
      } = t;
      if (!l)
        return null;
      const v = !c && !f && u, g = `${p}-clear-icon`, m = ((s = n.clearIcon) === null || s === void 0 ? void 0 : s.call(n)) || "*";
      return M("span", {
        onClick: d,
        onMousedown: (y) => y.preventDefault(),
        class: ye({
          [`${g}-hidden`]: !v,
          [`${g}-has-suffix`]: !!h
        }, g),
        role: "button",
        tabindex: -1
      }, [m]);
    };
    return () => {
      var s, l;
      const {
        focused: u,
        value: c,
        disabled: f,
        allowClear: d,
        readonly: h,
        hidden: p,
        prefixCls: v,
        prefix: g = (s = n.prefix) === null || s === void 0 ? void 0 : s.call(n),
        suffix: m = (l = n.suffix) === null || l === void 0 ? void 0 : l.call(n),
        addonAfter: y = n.addonAfter,
        addonBefore: b = n.addonBefore,
        inputElement: _,
        affixWrapperClassName: O,
        wrapperClassName: S,
        groupClassName: x
      } = t;
      let C = Pn(_, {
        value: c,
        hidden: p
      });
      if (mD({
        prefix: g,
        suffix: m,
        allowClear: d
      })) {
        const T = `${v}-affix-wrapper`, w = ye(T, {
          [`${T}-disabled`]: f,
          [`${T}-focused`]: u,
          [`${T}-readonly`]: h,
          [`${T}-input-with-clear-btn`]: m && d && c
        }, !E_({
          addonAfter: y,
          addonBefore: b
        }) && r.class, O), P = (m || d) && M("span", {
          class: `${v}-suffix`
        }, [o(), m]);
        C = M("span", {
          class: w,
          style: r.style,
          hidden: !E_({
            addonAfter: y,
            addonBefore: b
          }) && p,
          onMousedown: a,
          ref: i
        }, [g && M("span", {
          class: `${v}-prefix`
        }, [g]), Pn(_, {
          style: null,
          value: c,
          hidden: null
        }), P]);
      }
      if (E_({
        addonAfter: y,
        addonBefore: b
      })) {
        const T = `${v}-group`, w = `${T}-addon`, P = ye(`${v}-wrapper`, T, S), $ = ye(`${v}-group-wrapper`, r.class, x);
        return M("span", {
          class: $,
          style: r.style,
          hidden: p
        }, [M("span", {
          class: P
        }, [b && M("span", {
          class: w
        }, [b]), Pn(C, {
          style: null,
          hidden: null
        }), y && M("span", {
          class: w
        }, [y])])]);
      }
      return C;
    };
  }
});
var Ywe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const qwe = te({
  name: "VCInput",
  inheritAttrs: !1,
  props: tY(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ae(t.value === void 0 ? t.defaultValue : t.value), s = ae(!1), l = ae(), u = ae();
    se(() => t.value, () => {
      o.value = t.value;
    }), se(() => t.disabled, () => {
      t.disabled && (s.value = !1);
    });
    const c = (x) => {
      l.value && JX(l.value.input, x);
    }, f = () => {
      var x;
      (x = l.value.input) === null || x === void 0 || x.blur();
    }, d = (x, C, T) => {
      var w;
      (w = l.value.input) === null || w === void 0 || w.setSelectionRange(x, C, T);
    }, h = () => {
      var x;
      (x = l.value.input) === null || x === void 0 || x.select();
    };
    i({
      focus: c,
      blur: f,
      input: L(() => {
        var x;
        return (x = l.value.input) === null || x === void 0 ? void 0 : x.input;
      }),
      stateValue: o,
      setSelectionRange: d,
      select: h
    });
    const p = (x) => {
      a("change", x);
    }, v = (x, C) => {
      o.value !== x && (t.value === void 0 ? o.value = x : Tt(() => {
        var T;
        l.value.input.value !== o.value && ((T = u.value) === null || T === void 0 || T.$forceUpdate());
      }), Tt(() => {
        C && C();
      }));
    }, g = (x) => {
      const {
        value: C
      } = x.target;
      if (o.value === C) return;
      const T = x.target.value;
      pg(l.value.input, x, p), v(T);
    }, m = (x) => {
      x.keyCode === 13 && a("pressEnter", x), a("keydown", x);
    }, y = (x) => {
      s.value = !0, a("focus", x);
    }, b = (x) => {
      s.value = !1, a("blur", x);
    }, _ = (x) => {
      pg(l.value.input, x, p), v("", () => {
        c();
      });
    }, O = () => {
      var x, C;
      const {
        addonBefore: T = n.addonBefore,
        addonAfter: w = n.addonAfter,
        disabled: P,
        valueModifiers: $ = {},
        htmlSize: A,
        autocomplete: D,
        prefixCls: E,
        inputClassName: R,
        prefix: N = (x = n.prefix) === null || x === void 0 ? void 0 : x.call(n),
        suffix: V = (C = n.suffix) === null || C === void 0 ? void 0 : C.call(n),
        allowClear: z,
        type: W = "text"
      } = t, F = or(t, [
        "prefixCls",
        "onPressEnter",
        "addonBefore",
        "addonAfter",
        "prefix",
        "suffix",
        "allowClear",
        // Input elements must be either controlled or uncontrolled,
        // specify either the value prop, or the defaultValue prop, but not both.
        "defaultValue",
        "size",
        "bordered",
        "htmlSize",
        "lazy",
        "showCount",
        "valueModifiers",
        "showCount",
        "affixWrapperClassName",
        "groupClassName",
        "inputClassName",
        "wrapperClassName"
      ]), Q = I(I(I({}, F), r), {
        autocomplete: D,
        onChange: g,
        onInput: g,
        onFocus: y,
        onBlur: b,
        onKeydown: m,
        class: ye(E, {
          [`${E}-disabled`]: P
        }, R, !E_({
          addonAfter: w,
          addonBefore: T
        }) && !mD({
          prefix: N,
          suffix: V,
          allowClear: z
        }) && r.class),
        ref: l,
        key: "ant-input",
        size: A,
        type: W,
        lazy: t.lazy
      });
      return $.lazy && delete Q.onInput, Q.autofocus || delete Q.autofocus, M(TI, or(Q, ["size"]), null);
    }, S = () => {
      var x;
      const {
        maxlength: C,
        suffix: T = (x = n.suffix) === null || x === void 0 ? void 0 : x.call(n),
        showCount: w,
        prefixCls: P
      } = t, $ = Number(C) > 0;
      if (T || w) {
        const A = [...X2(o.value)].length, D = typeof w == "object" ? w.formatter({
          count: A,
          maxlength: C
        }) : `${A}${$ ? ` / ${C}` : ""}`;
        return M(wt, null, [!!w && M("span", {
          class: ye(`${P}-show-count-suffix`, {
            [`${P}-show-count-has-suffix`]: !!T
          })
        }, [D]), T]);
      }
      return null;
    };
    return it(() => {
      process.env.NODE_ENV === "test" && t.autofocus && c();
    }), () => {
      const {
        prefixCls: x,
        disabled: C
      } = t, T = Ywe(t, ["prefixCls", "disabled"]);
      return M(Xwe, j(j(j({}, T), r), {}, {
        ref: u,
        prefixCls: x,
        inputElement: O(),
        handleReset: _,
        value: X2(o.value),
        focused: s.value,
        triggerFocus: c,
        suffix: S(),
        disabled: C
      }), n);
    };
  }
}), Sx = () => or(tY(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), nY = () => I(I({}, or(Sx(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
  rows: Number,
  autosize: {
    type: [Boolean, Object],
    default: void 0
  },
  autoSize: {
    type: [Boolean, Object],
    default: void 0
  },
  onResize: {
    type: Function
  },
  onCompositionstart: g1(),
  onCompositionend: g1(),
  valueModifiers: Object
});
var Kwe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const Hn = te({
  compatConfig: {
    MODE: 3
  },
  name: "AInput",
  inheritAttrs: !1,
  props: Sx(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = U(), s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
      direction: c,
      prefixCls: f,
      size: d,
      autocomplete: h
    } = It("input", t), {
      compactSize: p,
      compactItemClassnames: v
    } = sx(f, c), g = L(() => p.value || d.value), [m, y] = lD(f), b = Ko();
    i({
      focus: (A) => {
        var D;
        (D = o.value) === null || D === void 0 || D.focus(A);
      },
      blur: () => {
        var A;
        (A = o.value) === null || A === void 0 || A.blur();
      },
      input: o,
      setSelectionRange: (A, D, E) => {
        var R;
        (R = o.value) === null || R === void 0 || R.setSelectionRange(A, D, E);
      },
      select: () => {
        var A;
        (A = o.value) === null || A === void 0 || A.select();
      }
    });
    const C = U([]), T = () => {
      C.value.push(setTimeout(() => {
        var A, D, E, R;
        !((A = o.value) === null || A === void 0) && A.input && ((D = o.value) === null || D === void 0 ? void 0 : D.input.getAttribute("type")) === "password" && (!((E = o.value) === null || E === void 0) && E.input.hasAttribute("value")) && ((R = o.value) === null || R === void 0 || R.input.removeAttribute("value"));
      }));
    };
    it(() => {
      T();
    }), GG(() => {
      C.value.forEach((A) => clearTimeout(A));
    }), yt(() => {
      C.value.forEach((A) => clearTimeout(A));
    });
    const w = (A) => {
      T(), a("blur", A), s.onFieldBlur();
    }, P = (A) => {
      T(), a("focus", A);
    }, $ = (A) => {
      a("update:value", A.target.value), a("change", A), a("input", A), s.onFieldChange();
    };
    return () => {
      var A, D, E, R, N, V;
      const {
        hasFeedback: z,
        feedbackIcon: W
      } = l, {
        allowClear: F,
        bordered: Q = !0,
        prefix: Z = (A = n.prefix) === null || A === void 0 ? void 0 : A.call(n),
        suffix: ne = (D = n.suffix) === null || D === void 0 ? void 0 : D.call(n),
        addonAfter: ee = (E = n.addonAfter) === null || E === void 0 ? void 0 : E.call(n),
        addonBefore: oe = (R = n.addonBefore) === null || R === void 0 ? void 0 : R.call(n),
        id: K = (N = s.id) === null || N === void 0 ? void 0 : N.value
      } = t, ie = Kwe(t, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), X = (z || ne) && M(wt, null, [ne, z && W]), H = f.value, G = mD({
        prefix: Z,
        suffix: ne
      }) || !!z, re = n.clearIcon || (() => M(Da, null, null));
      return m(M(qwe, j(j(j({}, r), or(ie, ["onUpdate:value", "onChange", "onInput"])), {}, {
        onChange: $,
        id: K,
        disabled: (V = t.disabled) !== null && V !== void 0 ? V : b.value,
        ref: o,
        prefixCls: H,
        autocomplete: h.value,
        onBlur: w,
        onFocus: P,
        prefix: Z,
        suffix: X,
        allowClear: F,
        addonAfter: ee && M(E1, null, {
          default: () => [M(P1, null, {
            default: () => [ee]
          })]
        }),
        addonBefore: oe && M(E1, null, {
          default: () => [M(P1, null, {
            default: () => [oe]
          })]
        }),
        class: [r.class, v.value],
        inputClassName: ye({
          [`${H}-sm`]: g.value === "small",
          [`${H}-lg`]: g.value === "large",
          [`${H}-rtl`]: c.value === "rtl",
          [`${H}-borderless`]: !Q
        }, !G && Is(H, u.value), y.value),
        affixWrapperClassName: ye({
          [`${H}-affix-wrapper-sm`]: g.value === "small",
          [`${H}-affix-wrapper-lg`]: g.value === "large",
          [`${H}-affix-wrapper-rtl`]: c.value === "rtl",
          [`${H}-affix-wrapper-borderless`]: !Q
        }, Is(`${H}-affix-wrapper`, u.value, z), y.value),
        wrapperClassName: ye({
          [`${H}-group-rtl`]: c.value === "rtl"
        }, y.value),
        groupClassName: ye({
          [`${H}-group-wrapper-sm`]: g.value === "small",
          [`${H}-group-wrapper-lg`]: g.value === "large",
          [`${H}-group-wrapper-rtl`]: c.value === "rtl"
        }, Is(`${H}-group-wrapper`, u.value, z), y.value)
      }), I(I({}, n), {
        clearIcon: re
      })));
    };
  }
}), Jwe = te({
  compatConfig: {
    MODE: 3
  },
  name: "AInputGroup",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    size: {
      type: String
    },
    compact: {
      type: Boolean,
      default: void 0
    }
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      direction: a,
      getPrefixCls: o
    } = It("input-group", t), s = ro.useInject();
    ro.useProvide(s, {
      isFormItemInput: !1
    });
    const l = L(() => o("input")), [u, c] = lD(l), f = L(() => {
      const d = i.value;
      return {
        [`${d}`]: !0,
        [c.value]: !0,
        [`${d}-lg`]: t.size === "large",
        [`${d}-sm`]: t.size === "small",
        [`${d}-compact`]: t.compact,
        [`${d}-rtl`]: a.value === "rtl"
      };
    });
    return () => {
      var d;
      return u(M("span", j(j({}, r), {}, {
        class: ye(f.value, r.class)
      }), [(d = n.default) === null || d === void 0 ? void 0 : d.call(n)]));
    };
  }
});
var eCe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const tCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "AInputSearch",
  inheritAttrs: !1,
  props: I(I({}, Sx()), {
    inputPrefixCls: String,
    // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
    enterButton: Y.any,
    onSearch: {
      type: Function
    }
  }),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ae(), s = ae(!1);
    i({
      focus: () => {
        var O;
        (O = o.value) === null || O === void 0 || O.focus();
      },
      blur: () => {
        var O;
        (O = o.value) === null || O === void 0 || O.blur();
      }
    });
    const c = (O) => {
      a("update:value", O.target.value), O && O.target && O.type === "click" && a("search", O.target.value, O), a("change", O);
    }, f = (O) => {
      var S;
      document.activeElement === ((S = o.value) === null || S === void 0 ? void 0 : S.input) && O.preventDefault();
    }, d = (O) => {
      var S, x;
      a("search", (x = (S = o.value) === null || S === void 0 ? void 0 : S.input) === null || x === void 0 ? void 0 : x.stateValue, O);
    }, h = (O) => {
      s.value || t.loading || d(O);
    }, p = (O) => {
      s.value = !0, a("compositionstart", O);
    }, v = (O) => {
      s.value = !1, a("compositionend", O);
    }, {
      prefixCls: g,
      getPrefixCls: m,
      direction: y,
      size: b
    } = It("input-search", t), _ = L(() => m("input", t.inputPrefixCls));
    return () => {
      var O, S, x, C;
      const {
        disabled: T,
        loading: w,
        addonAfter: P = (O = n.addonAfter) === null || O === void 0 ? void 0 : O.call(n),
        suffix: $ = (S = n.suffix) === null || S === void 0 ? void 0 : S.call(n)
      } = t, A = eCe(t, ["disabled", "loading", "addonAfter", "suffix"]);
      let {
        enterButton: D = (C = (x = n.enterButton) === null || x === void 0 ? void 0 : x.call(n)) !== null && C !== void 0 ? C : !1
      } = t;
      D = D || D === "";
      const E = typeof D == "boolean" ? M(nx, null, null) : null, R = `${g.value}-button`, N = Array.isArray(D) ? D[0] : D;
      let V;
      const z = N.type && jI(N.type) && N.type.__ANT_BUTTON;
      if (z || N.tagName === "button")
        V = Pn(N, I({
          onMousedown: f,
          onClick: d,
          key: "enterButton"
        }, z ? {
          class: R,
          size: b.value
        } : {}), !1);
      else {
        const F = E && !D;
        V = M(Ur, {
          class: R,
          type: D ? "primary" : void 0,
          size: b.value,
          disabled: T,
          key: "enterButton",
          onMousedown: f,
          onClick: d,
          loading: w,
          icon: F ? E : null
        }, {
          default: () => [F ? null : E || D]
        });
      }
      P && (V = [V, P]);
      const W = ye(g.value, {
        [`${g.value}-rtl`]: y.value === "rtl",
        [`${g.value}-${b.value}`]: !!b.value,
        [`${g.value}-with-button`]: !!D
      }, r.class);
      return M(Hn, j(j(j({
        ref: o
      }, or(A, ["onUpdate:value", "onSearch", "enterButton"])), r), {}, {
        onPressEnter: h,
        onCompositionstart: p,
        onCompositionend: v,
        size: b.value,
        prefixCls: _.value,
        addonAfter: V,
        suffix: $,
        onChange: c,
        class: W,
        disabled: T
      }), n);
    };
  }
}), K5 = (t) => t != null && (Array.isArray(t) ? os(t).length : !0);
function nCe(t) {
  return K5(t.addonBefore) || K5(t.addonAfter);
}
const rCe = ["text", "input"], iCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ClearableLabeledInput",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    inputType: Y.oneOf(ru("text", "input")),
    value: fa(),
    defaultValue: fa(),
    allowClear: {
      type: Boolean,
      default: void 0
    },
    element: fa(),
    handleReset: Function,
    disabled: {
      type: Boolean,
      default: void 0
    },
    direction: {
      type: String
    },
    size: {
      type: String
    },
    suffix: fa(),
    prefix: fa(),
    addonBefore: fa(),
    addonAfter: fa(),
    readonly: {
      type: Boolean,
      default: void 0
    },
    focused: {
      type: Boolean,
      default: void 0
    },
    bordered: {
      type: Boolean,
      default: !0
    },
    triggerFocus: {
      type: Function
    },
    hidden: Boolean,
    status: String,
    hashId: String
  },
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const i = ro.useInject(), a = (s) => {
      const {
        value: l,
        disabled: u,
        readonly: c,
        handleReset: f,
        suffix: d = n.suffix
      } = t, h = !u && !c && l, p = `${s}-clear-icon`;
      return M(Da, {
        onClick: f,
        onMousedown: (v) => v.preventDefault(),
        class: ye({
          [`${p}-hidden`]: !h,
          [`${p}-has-suffix`]: !!d
        }, p),
        role: "button"
      }, null);
    }, o = (s, l) => {
      const {
        value: u,
        allowClear: c,
        direction: f,
        bordered: d,
        hidden: h,
        status: p,
        addonAfter: v = n.addonAfter,
        addonBefore: g = n.addonBefore,
        hashId: m
      } = t, {
        status: y,
        hasFeedback: b
      } = i;
      if (!c)
        return Pn(l, {
          value: u,
          disabled: t.disabled
        });
      const _ = ye(`${s}-affix-wrapper`, `${s}-affix-wrapper-textarea-with-clear-btn`, Is(`${s}-affix-wrapper`, m0(y, p), b), {
        [`${s}-affix-wrapper-rtl`]: f === "rtl",
        [`${s}-affix-wrapper-borderless`]: !d,
        // className will go to addon wrapper
        [`${r.class}`]: !nCe({
          addonAfter: v,
          addonBefore: g
        }) && r.class
      }, m);
      return M("span", {
        class: _,
        style: r.style,
        hidden: h
      }, [Pn(l, {
        style: null,
        value: u,
        disabled: t.disabled
      }), a(s)]);
    };
    return () => {
      var s;
      const {
        prefixCls: l,
        inputType: u,
        element: c = (s = n.element) === null || s === void 0 ? void 0 : s.call(n)
      } = t;
      return u === rCe[0] ? o(l, c) : null;
    };
  }
}), aCe = `
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`, oCe = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], $C = {};
let Ji;
function sCe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
  const n = t.getAttribute("id") || t.getAttribute("data-reactid") || t.getAttribute("name");
  if (e && $C[n])
    return $C[n];
  const r = window.getComputedStyle(t), i = r.getPropertyValue("box-sizing") || r.getPropertyValue("-moz-box-sizing") || r.getPropertyValue("-webkit-box-sizing"), a = parseFloat(r.getPropertyValue("padding-bottom")) + parseFloat(r.getPropertyValue("padding-top")), o = parseFloat(r.getPropertyValue("border-bottom-width")) + parseFloat(r.getPropertyValue("border-top-width")), l = {
    sizingStyle: oCe.map((u) => `${u}:${r.getPropertyValue(u)}`).join(";"),
    paddingSize: a,
    borderSize: o,
    boxSizing: i
  };
  return e && n && ($C[n] = l), l;
}
function lCe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
  Ji || (Ji = document.createElement("textarea"), Ji.setAttribute("tab-index", "-1"), Ji.setAttribute("aria-hidden", "true"), document.body.appendChild(Ji)), t.getAttribute("wrap") ? Ji.setAttribute("wrap", t.getAttribute("wrap")) : Ji.removeAttribute("wrap");
  const {
    paddingSize: i,
    borderSize: a,
    boxSizing: o,
    sizingStyle: s
  } = sCe(t, e);
  Ji.setAttribute("style", `${s};${aCe}`), Ji.value = t.value || t.placeholder || "";
  let l, u, c, f = Ji.scrollHeight;
  if (o === "border-box" ? f += a : o === "content-box" && (f -= i), n !== null || r !== null) {
    Ji.value = " ";
    const h = Ji.scrollHeight - i;
    n !== null && (l = h * n, o === "border-box" && (l = l + i + a), f = Math.max(l, f)), r !== null && (u = h * r, o === "border-box" && (u = u + i + a), c = f > u ? "" : "hidden", f = Math.min(u, f));
  }
  const d = {
    height: `${f}px`,
    overflowY: c,
    resize: "none"
  };
  return l && (d.minHeight = `${l}px`), u && (d.maxHeight = `${u}px`), d;
}
const AC = 0, EC = 1, MC = 2, uCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ResizableTextArea",
  inheritAttrs: !1,
  props: nY(),
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e, a, o;
    const s = U(), l = U({}), u = U(MC);
    yt(() => {
      xt.cancel(a), xt.cancel(o);
    });
    const c = () => {
      try {
        if (s.value && document.activeElement === s.value.input) {
          const S = s.value.getSelectionStart(), x = s.value.getSelectionEnd(), C = s.value.getScrollTop();
          s.value.setSelectionRange(S, x), s.value.setScrollTop(C);
        }
      } catch {
      }
    }, f = U(), d = U();
    ht(() => {
      const S = t.autoSize || t.autosize;
      S ? (f.value = S.minRows, d.value = S.maxRows) : (f.value = void 0, d.value = void 0);
    });
    const h = L(() => !!(t.autoSize || t.autosize)), p = () => {
      u.value = AC;
    };
    se([() => t.value, f, d, h], () => {
      h.value && p();
    }, {
      immediate: !0
    });
    const v = U();
    se([u, s], () => {
      if (s.value)
        if (u.value === AC)
          u.value = EC;
        else if (u.value === EC) {
          const S = lCe(s.value.input, !1, f.value, d.value);
          u.value = MC, v.value = S;
        } else
          c();
    }, {
      immediate: !0,
      flush: "post"
    });
    const g = vn(), m = U(), y = () => {
      xt.cancel(m.value);
    }, b = (S) => {
      u.value === MC && (r("resize", S), h.value && (y(), m.value = xt(() => {
        p();
      })));
    };
    yt(() => {
      y();
    }), i({
      resizeTextarea: () => {
        p();
      },
      textArea: L(() => {
        var S;
        return (S = s.value) === null || S === void 0 ? void 0 : S.input;
      }),
      instance: g
    }), Xr(t.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
    const O = () => {
      const {
        prefixCls: S,
        disabled: x
      } = t, C = or(t, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), T = ye(S, n.class, {
        [`${S}-disabled`]: x
      }), w = h.value ? v.value : null, P = [n.style, l.value, w], $ = I(I(I({}, C), n), {
        style: P,
        class: T
      });
      return (u.value === AC || u.value === EC) && P.push({
        overflowX: "hidden",
        overflowY: "hidden"
      }), $.autofocus || delete $.autofocus, $.rows === 0 && delete $.rows, M(ph, {
        onResize: b,
        disabled: !h.value
      }, {
        default: () => [M(TI, j(j({}, $), {}, {
          ref: s,
          tag: "textarea"
        }), null)]
      });
    };
    return () => O();
  }
});
function rY(t, e) {
  return [...t || ""].slice(0, e).join("");
}
function J5(t, e, n, r) {
  let i = n;
  return t ? i = rY(n, r) : [...e || ""].length < n.length && [...n || ""].length > r && (i = e), i;
}
const cCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ATextarea",
  inheritAttrs: !1,
  props: nY(),
  setup(t, e) {
    let {
      attrs: n,
      expose: r,
      emit: i
    } = e;
    var a;
    const o = ss(), s = ro.useInject(), l = L(() => m0(s.status, t.status)), u = ae((a = t.value) !== null && a !== void 0 ? a : t.defaultValue), c = ae(), f = ae(""), {
      prefixCls: d,
      size: h,
      direction: p
    } = It("input", t), [v, g] = lD(d), m = Ko(), y = L(() => t.showCount === "" || t.showCount || !1), b = L(() => Number(t.maxlength) > 0), _ = ae(!1), O = ae(), S = ae(0), x = (z) => {
      _.value = !0, O.value = f.value, S.value = z.currentTarget.selectionStart, i("compositionstart", z);
    }, C = (z) => {
      var W;
      _.value = !1;
      let F = z.currentTarget.value;
      if (b.value) {
        const Q = S.value >= t.maxlength + 1 || S.value === ((W = O.value) === null || W === void 0 ? void 0 : W.length);
        F = J5(Q, O.value, F, t.maxlength);
      }
      F !== f.value && ($(F), pg(z.currentTarget, z, E, F)), i("compositionend", z);
    }, T = vn();
    se(() => t.value, () => {
      var z;
      "value" in T.vnode.props, u.value = (z = t.value) !== null && z !== void 0 ? z : "";
    });
    const w = (z) => {
      var W;
      JX((W = c.value) === null || W === void 0 ? void 0 : W.textArea, z);
    }, P = () => {
      var z, W;
      (W = (z = c.value) === null || z === void 0 ? void 0 : z.textArea) === null || W === void 0 || W.blur();
    }, $ = (z, W) => {
      u.value !== z && (t.value === void 0 ? u.value = z : Tt(() => {
        var F, Q, Z;
        c.value.textArea.value !== f.value && ((Z = (F = c.value) === null || F === void 0 ? void 0 : (Q = F.instance).update) === null || Z === void 0 || Z.call(Q));
      }), Tt(() => {
        W && W();
      }));
    }, A = (z) => {
      z.keyCode === 13 && i("pressEnter", z), i("keydown", z);
    }, D = (z) => {
      const {
        onBlur: W
      } = t;
      W == null || W(z), o.onFieldBlur();
    }, E = (z) => {
      i("update:value", z.target.value), i("change", z), i("input", z), o.onFieldChange();
    }, R = (z) => {
      pg(c.value.textArea, z, E), $("", () => {
        w();
      });
    }, N = (z) => {
      let W = z.target.value;
      if (u.value !== W) {
        if (b.value) {
          const F = z.target, Q = F.selectionStart >= t.maxlength + 1 || F.selectionStart === W.length || !F.selectionStart;
          W = J5(Q, f.value, W, t.maxlength);
        }
        pg(z.currentTarget, z, E, W), $(W);
      }
    }, V = () => {
      var z, W;
      const {
        class: F
      } = n, {
        bordered: Q = !0
      } = t, Z = I(I(I({}, or(t, ["allowClear"])), n), {
        class: [{
          [`${d.value}-borderless`]: !Q,
          [`${F}`]: F && !y.value,
          [`${d.value}-sm`]: h.value === "small",
          [`${d.value}-lg`]: h.value === "large"
        }, Is(d.value, l.value), g.value],
        disabled: m.value,
        showCount: null,
        prefixCls: d.value,
        onInput: N,
        onChange: N,
        onBlur: D,
        onKeydown: A,
        onCompositionstart: x,
        onCompositionend: C
      });
      return !((z = t.valueModifiers) === null || z === void 0) && z.lazy && delete Z.onInput, M(uCe, j(j({}, Z), {}, {
        id: (W = Z == null ? void 0 : Z.id) !== null && W !== void 0 ? W : o.id.value,
        ref: c,
        maxlength: t.maxlength,
        lazy: t.lazy
      }), null);
    };
    return r({
      focus: w,
      blur: P,
      resizableTextArea: c
    }), ht(() => {
      let z = X2(u.value);
      !_.value && b.value && (t.value === null || t.value === void 0) && (z = rY(z, t.maxlength)), f.value = z;
    }), () => {
      var z;
      const {
        maxlength: W,
        bordered: F = !0,
        hidden: Q
      } = t, {
        style: Z,
        class: ne
      } = n, ee = I(I(I({}, t), n), {
        prefixCls: d.value,
        inputType: "text",
        handleReset: R,
        direction: p.value,
        bordered: F,
        style: y.value ? void 0 : Z,
        hashId: g.value,
        disabled: (z = t.disabled) !== null && z !== void 0 ? z : m.value
      });
      let oe = M(iCe, j(j({}, ee), {}, {
        value: f.value,
        status: t.status
      }), {
        element: V
      });
      if (y.value || s.hasFeedback) {
        const K = [...f.value].length;
        let ie = "";
        typeof y.value == "object" ? ie = y.value.formatter({
          value: f.value,
          count: K,
          maxlength: W
        }) : ie = `${K}${b.value ? ` / ${W}` : ""}`, oe = M("div", {
          hidden: Q,
          class: ye(`${d.value}-textarea`, {
            [`${d.value}-textarea-rtl`]: p.value === "rtl",
            [`${d.value}-textarea-show-count`]: y.value,
            [`${d.value}-textarea-in-form-item`]: s.isFormItemInput
          }, `${d.value}-textarea-show-count`, ne, g.value),
          style: Z,
          "data-count": typeof ie != "object" ? ie : void 0
        }, [oe, s.hasFeedback && M("span", {
          class: `${d.value}-textarea-suffix`
        }, [s.feedbackIcon])]);
      }
      return v(oe);
    };
  }
});
var fCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
function e3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      dCe(t, i, n[i]);
    });
  }
  return t;
}
function dCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var xx = function(e, n) {
  var r = e3({}, e, n.attrs);
  return M(lt, e3({}, r, {
    icon: fCe
  }), null);
};
xx.displayName = "EyeOutlined";
xx.inheritAttrs = !1;
var hCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
function t3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      pCe(t, i, n[i]);
    });
  }
  return t;
}
function pCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var yD = function(e, n) {
  var r = t3({}, e, n.attrs);
  return M(lt, t3({}, r, {
    icon: hCe
  }), null);
};
yD.displayName = "EyeInvisibleOutlined";
yD.inheritAttrs = !1;
var vCe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const gCe = {
  click: "onClick",
  hover: "onMouseover"
}, mCe = (t) => t ? M(xx, null, null) : M(yD, null, null), yCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "AInputPassword",
  inheritAttrs: !1,
  props: I(I({}, Sx()), {
    prefixCls: String,
    inputPrefixCls: String,
    action: {
      type: String,
      default: "click"
    },
    visibilityToggle: {
      type: Boolean,
      default: !0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    "onUpdate:visible": Function,
    iconRender: Function
  }),
  setup(t, e) {
    let {
      slots: n,
      attrs: r,
      expose: i,
      emit: a
    } = e;
    const o = ae(!1), s = () => {
      const {
        disabled: g
      } = t;
      g || (o.value = !o.value, a("update:visible", o.value));
    };
    ht(() => {
      t.visible !== void 0 && (o.value = !!t.visible);
    });
    const l = ae();
    i({
      focus: () => {
        var g;
        (g = l.value) === null || g === void 0 || g.focus();
      },
      blur: () => {
        var g;
        (g = l.value) === null || g === void 0 || g.blur();
      }
    });
    const f = (g) => {
      const {
        action: m,
        iconRender: y = n.iconRender || mCe
      } = t, b = gCe[m] || "", _ = y(o.value), O = {
        [b]: s,
        class: `${g}-icon`,
        key: "passwordIcon",
        onMousedown: (S) => {
          S.preventDefault();
        },
        onMouseup: (S) => {
          S.preventDefault();
        }
      };
      return Pn(Ui(_) ? _ : M("span", null, [_]), O);
    }, {
      prefixCls: d,
      getPrefixCls: h
    } = It("input-password", t), p = L(() => h("input", t.inputPrefixCls)), v = () => {
      const {
        size: g,
        visibilityToggle: m
      } = t, y = vCe(t, ["size", "visibilityToggle"]), b = m && f(d.value), _ = ye(d.value, r.class, {
        [`${d.value}-${g}`]: !!g
      }), O = I(I(I({}, or(y, ["suffix", "iconRender", "action"])), r), {
        type: o.value ? "text" : "password",
        class: _,
        prefixCls: p.value,
        suffix: b
      });
      return g && (O.size = g), M(Hn, j({
        ref: l
      }, O), n);
    };
    return () => v();
  }
});
Hn.Group = Jwe;
Hn.Search = tCe;
Hn.TextArea = cCe;
Hn.Password = yCe;
Hn.install = function(t) {
  return t.component(Hn.name, Hn), t.component(Hn.Group.name, Hn.Group), t.component(Hn.Search.name, Hn.Search), t.component(Hn.TextArea.name, Hn.TextArea), t.component(Hn.Password.name, Hn.Password), t;
};
function Cx() {
  return {
    keyboard: {
      type: Boolean,
      default: void 0
    },
    mask: {
      type: Boolean,
      default: void 0
    },
    afterClose: Function,
    closable: {
      type: Boolean,
      default: void 0
    },
    maskClosable: {
      type: Boolean,
      default: void 0
    },
    visible: {
      type: Boolean,
      default: void 0
    },
    destroyOnClose: {
      type: Boolean,
      default: void 0
    },
    mousePosition: Y.shape({
      x: Number,
      y: Number
    }).loose,
    title: Y.any,
    footer: Y.any,
    transitionName: String,
    maskTransitionName: String,
    animation: Y.any,
    maskAnimation: Y.any,
    wrapStyle: {
      type: Object,
      default: void 0
    },
    bodyStyle: {
      type: Object,
      default: void 0
    },
    maskStyle: {
      type: Object,
      default: void 0
    },
    prefixCls: String,
    wrapClassName: String,
    rootClassName: String,
    width: [String, Number],
    height: [String, Number],
    zIndex: Number,
    bodyProps: Y.any,
    maskProps: Y.any,
    wrapProps: Y.any,
    getContainer: Y.any,
    dialogStyle: {
      type: Object,
      default: void 0
    },
    dialogClass: String,
    closeIcon: Y.any,
    forceRender: {
      type: Boolean,
      default: void 0
    },
    getOpenCount: Function,
    // https://github.com/ant-design/ant-design/issues/19771
    // https://github.com/react-component/dialog/issues/95
    focusTriggerAfterClose: {
      type: Boolean,
      default: void 0
    },
    onClose: Function,
    modalRender: Function
  };
}
function n3(t, e, n) {
  let r = e;
  return !r && n && (r = `${t}-${n}`), r;
}
let r3 = -1;
function bCe() {
  return r3 += 1, r3;
}
function i3(t, e) {
  let n = t[`page${e ? "Y" : "X"}Offset`];
  const r = `scroll${e ? "Top" : "Left"}`;
  if (typeof n != "number") {
    const i = t.document;
    n = i.documentElement[r], typeof n != "number" && (n = i.body[r]);
  }
  return n;
}
function _Ce(t) {
  const e = t.getBoundingClientRect(), n = {
    left: e.left,
    top: e.top
  }, r = t.ownerDocument, i = r.defaultView || r.parentWindow;
  return n.left += i3(i), n.top += i3(i, !0), n;
}
const a3 = {
  width: 0,
  height: 0,
  overflow: "hidden",
  outline: "none"
}, OCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "DialogContent",
  inheritAttrs: !1,
  props: I(I({}, Cx()), {
    motionName: String,
    ariaId: String,
    onVisibleChanged: Function,
    onMousedown: Function,
    onMouseup: Function
  }),
  setup(t, e) {
    let {
      expose: n,
      slots: r,
      attrs: i
    } = e;
    const a = U(), o = U(), s = U();
    n({
      focus: () => {
        var d;
        (d = a.value) === null || d === void 0 || d.focus();
      },
      changeActive: (d) => {
        const {
          activeElement: h
        } = document;
        d && h === o.value ? a.value.focus() : !d && h === a.value && o.value.focus();
      }
    });
    const l = U(), u = L(() => {
      const {
        width: d,
        height: h
      } = t, p = {};
      return d !== void 0 && (p.width = typeof d == "number" ? `${d}px` : d), h !== void 0 && (p.height = typeof h == "number" ? `${h}px` : h), l.value && (p.transformOrigin = l.value), p;
    }), c = () => {
      Tt(() => {
        if (s.value) {
          const d = _Ce(s.value);
          l.value = t.mousePosition ? `${t.mousePosition.x - d.left}px ${t.mousePosition.y - d.top}px` : "";
        }
      });
    }, f = (d) => {
      t.onVisibleChanged(d);
    };
    return () => {
      var d, h, p, v;
      const {
        prefixCls: g,
        footer: m = (d = r.footer) === null || d === void 0 ? void 0 : d.call(r),
        title: y = (h = r.title) === null || h === void 0 ? void 0 : h.call(r),
        ariaId: b,
        closable: _,
        closeIcon: O = (p = r.closeIcon) === null || p === void 0 ? void 0 : p.call(r),
        onClose: S,
        bodyStyle: x,
        bodyProps: C,
        onMousedown: T,
        onMouseup: w,
        visible: P,
        modalRender: $ = r.modalRender,
        destroyOnClose: A,
        motionName: D
      } = t;
      let E;
      m && (E = M("div", {
        class: `${g}-footer`
      }, [m]));
      let R;
      y && (R = M("div", {
        class: `${g}-header`
      }, [M("div", {
        class: `${g}-title`,
        id: b
      }, [y])]));
      let N;
      _ && (N = M("button", {
        type: "button",
        onClick: S,
        "aria-label": "Close",
        class: `${g}-close`
      }, [O || M("span", {
        class: `${g}-close-x`
      }, null)]));
      const V = M("div", {
        class: `${g}-content`
      }, [N, R, M("div", j({
        class: `${g}-body`,
        style: x
      }, C), [(v = r.default) === null || v === void 0 ? void 0 : v.call(r)]), E]), z = g0(D);
      return M(co, j(j({}, z), {}, {
        onBeforeEnter: c,
        onAfterEnter: () => f(!0),
        onAfterLeave: () => f(!1)
      }), {
        default: () => [P || !A ? bi(M("div", j(j({}, i), {}, {
          ref: s,
          key: "dialog-element",
          role: "document",
          style: [u.value, i.style],
          class: [g, i.class],
          onMousedown: T,
          onMouseup: w
        }), [M("div", {
          tabindex: 0,
          ref: a,
          style: a3,
          "aria-hidden": "true"
        }, null), $ ? $({
          originVNode: V
        }) : V, M("div", {
          tabindex: 0,
          ref: o,
          style: a3,
          "aria-hidden": "true"
        }, null)]), [[Bs, P]]) : null]
      });
    };
  }
}), SCe = te({
  compatConfig: {
    MODE: 3
  },
  name: "DialogMask",
  props: {
    prefixCls: String,
    visible: Boolean,
    motionName: String,
    maskProps: Object
  },
  setup(t, e) {
    return () => {
      const {
        prefixCls: n,
        visible: r,
        maskProps: i,
        motionName: a
      } = t, o = g0(a);
      return M(co, o, {
        default: () => [bi(M("div", j({
          class: `${n}-mask`
        }, i), null), [[Bs, r]])]
      });
    };
  }
}), o3 = te({
  compatConfig: {
    MODE: 3
  },
  name: "VcDialog",
  inheritAttrs: !1,
  props: sr(I(I({}, Cx()), {
    getOpenCount: Function,
    scrollLocker: Object
  }), {
    mask: !0,
    visible: !1,
    keyboard: !0,
    closable: !0,
    maskClosable: !0,
    destroyOnClose: !1,
    prefixCls: "rc-dialog",
    getOpenCount: () => null,
    focusTriggerAfterClose: !0
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = ae(), a = ae(), o = ae(), s = ae(t.visible), l = ae(`vcDialogTitle${bCe()}`), u = (m) => {
      var y, b;
      if (m)
        $l(a.value, document.activeElement) || (i.value = document.activeElement, (y = o.value) === null || y === void 0 || y.focus());
      else {
        const _ = s.value;
        if (s.value = !1, t.mask && i.value && t.focusTriggerAfterClose) {
          try {
            i.value.focus({
              preventScroll: !0
            });
          } catch {
          }
          i.value = null;
        }
        _ && ((b = t.afterClose) === null || b === void 0 || b.call(t));
      }
    }, c = (m) => {
      var y;
      (y = t.onClose) === null || y === void 0 || y.call(t, m);
    }, f = ae(!1), d = ae(), h = () => {
      clearTimeout(d.value), f.value = !0;
    }, p = () => {
      d.value = setTimeout(() => {
        f.value = !1;
      });
    }, v = (m) => {
      if (!t.maskClosable) return null;
      f.value ? f.value = !1 : a.value === m.target && c(m);
    }, g = (m) => {
      if (t.keyboard && m.keyCode === ge.ESC) {
        m.stopPropagation(), c(m);
        return;
      }
      t.visible && m.keyCode === ge.TAB && o.value.changeActive(!m.shiftKey);
    };
    return se(() => t.visible, () => {
      t.visible && (s.value = !0);
    }, {
      flush: "post"
    }), yt(() => {
      var m;
      clearTimeout(d.value), (m = t.scrollLocker) === null || m === void 0 || m.unLock();
    }), ht(() => {
      var m, y;
      (m = t.scrollLocker) === null || m === void 0 || m.unLock(), s.value && ((y = t.scrollLocker) === null || y === void 0 || y.lock());
    }), () => {
      const {
        prefixCls: m,
        mask: y,
        visible: b,
        maskTransitionName: _,
        maskAnimation: O,
        zIndex: S,
        wrapClassName: x,
        rootClassName: C,
        wrapStyle: T,
        closable: w,
        maskProps: P,
        maskStyle: $,
        transitionName: A,
        animation: D,
        wrapProps: E,
        title: R = r.title
      } = t, {
        style: N,
        class: V
      } = n;
      return M("div", j({
        class: [`${m}-root`, C]
      }, JS(t, {
        data: !0
      })), [M(SCe, {
        prefixCls: m,
        visible: y && b,
        motionName: n3(m, _, O),
        style: I({
          zIndex: S
        }, $),
        maskProps: P
      }, null), M("div", j({
        tabIndex: -1,
        onKeydown: g,
        class: ye(`${m}-wrap`, x),
        ref: a,
        onClick: v,
        role: "dialog",
        "aria-labelledby": R ? l.value : null,
        style: I(I({
          zIndex: S
        }, T), {
          display: s.value ? null : "none"
        })
      }, E), [M(OCe, j(j({}, or(t, ["scrollLocker"])), {}, {
        style: N,
        class: V,
        onMousedown: h,
        onMouseup: p,
        ref: o,
        closable: w,
        ariaId: l.value,
        prefixCls: m,
        visible: b,
        onClose: c,
        onVisibleChanged: u,
        motionName: n3(m, A, D)
      }), r)])]);
    };
  }
}), xCe = Cx(), iY = te({
  compatConfig: {
    MODE: 3
  },
  name: "DialogWrap",
  inheritAttrs: !1,
  props: sr(xCe, {
    visible: !1
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = U(t.visible);
    return CI({}, {
      inTriggerContext: !1
    }), se(() => t.visible, () => {
      t.visible && (i.value = !0);
    }, {
      flush: "post"
    }), () => {
      const {
        visible: a,
        getContainer: o,
        forceRender: s,
        destroyOnClose: l = !1,
        afterClose: u
      } = t;
      let c = I(I(I({}, t), n), {
        ref: "_component",
        key: "dialog"
      });
      return o === !1 ? M(o3, j(j({}, c), {}, {
        getOpenCount: () => 2
      }), r) : !s && l && !i.value ? null : M(EZ, {
        autoLock: !0,
        visible: a,
        forceRender: s,
        getContainer: o
      }, {
        default: (f) => (c = I(I(I({}, c), f), {
          afterClose: () => {
            u == null || u(), i.value = !1;
          }
        }), M(o3, c, r))
      });
    };
  }
});
function wCe(t) {
  const e = U(null), n = tn(I({}, t)), r = U([]), i = (a) => {
    e.value === null && (r.value = [], e.value = xt(() => {
      let o;
      r.value.forEach((s) => {
        o = I(I({}, o), s);
      }), I(n, o), e.value = null;
    })), r.value.push(a);
  };
  return it(() => {
    e.value && xt.cancel(e.value);
  }), [n, i];
}
function s3(t, e, n, r) {
  const i = e + n, a = (n - r) / 2;
  if (n > r) {
    if (e > 0)
      return {
        [t]: a
      };
    if (e < 0 && i < r)
      return {
        [t]: -a
      };
  } else if (e < 0 || i > r)
    return {
      [t]: e < 0 ? a : -a
    };
  return {};
}
function CCe(t, e, n, r) {
  const {
    width: i,
    height: a
  } = Eve();
  let o = null;
  return t <= i && e <= a ? o = {
    x: 0,
    y: 0
  } : (t > i || e > a) && (o = I(I({}, s3("x", n, t, i)), s3("y", r, e, a))), o;
}
var TCe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const l3 = Symbol("previewGroupContext"), bD = {
  provide: (t) => {
    pt(l3, t);
  },
  inject: () => Ge(l3, {
    isPreviewGroup: ae(!1),
    previewUrls: L(() => /* @__PURE__ */ new Map()),
    setPreviewUrls: () => {
    },
    current: U(null),
    setCurrent: () => {
    },
    setShowPreview: () => {
    },
    setMousePosition: () => {
    },
    registerImage: null,
    rootClassName: ""
  })
}, PCe = () => ({
  previewPrefixCls: String,
  preview: {
    type: [Boolean, Object],
    default: !0
  },
  icons: {
    type: Object,
    default: () => ({})
  }
}), $Ce = te({
  compatConfig: {
    MODE: 3
  },
  name: "PreviewGroup",
  inheritAttrs: !1,
  props: PCe(),
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = L(() => {
      const O = {
        visible: void 0,
        onVisibleChange: () => {
        },
        getContainer: void 0,
        current: 0
      };
      return typeof t.preview == "object" ? lY(t.preview, O) : O;
    }), i = tn(/* @__PURE__ */ new Map()), a = U(), o = L(() => r.value.visible), s = L(() => r.value.getContainer), l = (O, S) => {
      var x, C;
      (C = (x = r.value).onVisibleChange) === null || C === void 0 || C.call(x, O, S);
    }, [u, c] = wh(!!o.value, {
      value: o,
      onChange: l
    }), f = U(null), d = L(() => o.value !== void 0), h = L(() => Array.from(i.keys())), p = L(() => h.value[r.value.current]), v = L(() => new Map(Array.from(i).filter((O) => {
      let [, {
        canPreview: S
      }] = O;
      return !!S;
    }).map((O) => {
      let [S, {
        url: x
      }] = O;
      return [S, x];
    }))), g = function(O, S) {
      let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
      i.set(O, {
        url: S,
        canPreview: x
      });
    }, m = (O) => {
      a.value = O;
    }, y = (O) => {
      f.value = O;
    }, b = function(O, S) {
      let x = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
      const C = () => {
        i.delete(O);
      };
      return i.set(O, {
        url: S,
        canPreview: x
      }), C;
    }, _ = (O) => {
      O == null || O.stopPropagation(), c(!1), y(null);
    };
    return se(p, (O) => {
      m(O);
    }, {
      immediate: !0,
      flush: "post"
    }), ht(() => {
      u.value && d.value && m(p.value);
    }, {
      flush: "post"
    }), bD.provide({
      isPreviewGroup: ae(!0),
      previewUrls: v,
      setPreviewUrls: g,
      current: a,
      setCurrent: m,
      setShowPreview: c,
      setMousePosition: y,
      registerImage: b
    }), () => {
      const O = TCe(r.value, []);
      return M(wt, null, [n.default && n.default(), M(oY, j(j({}, O), {}, {
        "ria-hidden": !u.value,
        visible: u.value,
        prefixCls: t.previewPrefixCls,
        onClose: _,
        mousePosition: f.value,
        src: v.value.get(a.value),
        icons: t.icons,
        getContainer: s.value
      }), null)]);
    };
  }
}), aY = $Ce, ku = {
  x: 0,
  y: 0
}, ACe = I(I({}, Cx()), {
  src: String,
  alt: String,
  rootClassName: String,
  icons: {
    type: Object,
    default: () => ({})
  }
}), oY = te({
  compatConfig: {
    MODE: 3
  },
  name: "Preview",
  inheritAttrs: !1,
  props: ACe,
  emits: ["close", "afterClose"],
  setup(t, e) {
    let {
      emit: n,
      attrs: r
    } = e;
    const {
      rotateLeft: i,
      rotateRight: a,
      zoomIn: o,
      zoomOut: s,
      close: l,
      left: u,
      right: c,
      flipX: f,
      flipY: d
    } = tn(t.icons), h = ae(1), p = ae(0), v = tn({
      x: 1,
      y: 1
    }), [g, m] = wCe(ku), y = () => n("close"), b = ae(), _ = tn({
      originX: 0,
      originY: 0,
      deltaX: 0,
      deltaY: 0
    }), O = ae(!1), S = bD.inject(), {
      previewUrls: x,
      current: C,
      isPreviewGroup: T,
      setCurrent: w
    } = S, P = L(() => x.value.size), $ = L(() => Array.from(x.value.keys())), A = L(() => $.value.indexOf(C.value)), D = L(() => T.value ? x.value.get(C.value) : t.src), E = L(() => T.value && P.value > 1), R = ae({
      wheelDirection: 0
    }), N = () => {
      h.value = 1, p.value = 0, v.x = 1, v.y = 1, m(ku), n("afterClose");
    }, V = (Se) => {
      Se ? h.value += 0.5 : h.value++, m(ku);
    }, z = (Se) => {
      h.value > 1 && (Se ? h.value -= 0.5 : h.value--), m(ku);
    }, W = () => {
      p.value += 90;
    }, F = () => {
      p.value -= 90;
    }, Q = () => {
      v.x = -v.x;
    }, Z = () => {
      v.y = -v.y;
    }, ne = (Se) => {
      Se.preventDefault(), Se.stopPropagation(), A.value > 0 && w($.value[A.value - 1]);
    }, ee = (Se) => {
      Se.preventDefault(), Se.stopPropagation(), A.value < P.value - 1 && w($.value[A.value + 1]);
    }, oe = ye({
      [`${t.prefixCls}-moving`]: O.value
    }), K = `${t.prefixCls}-operations-operation`, ie = `${t.prefixCls}-operations-icon`, X = [{
      icon: l,
      onClick: y,
      type: "close"
    }, {
      icon: o,
      onClick: () => V(),
      type: "zoomIn"
    }, {
      icon: s,
      onClick: () => z(),
      type: "zoomOut",
      disabled: L(() => h.value === 1)
    }, {
      icon: a,
      onClick: W,
      type: "rotateRight"
    }, {
      icon: i,
      onClick: F,
      type: "rotateLeft"
    }, {
      icon: f,
      onClick: Q,
      type: "flipX"
    }, {
      icon: d,
      onClick: Z,
      type: "flipY"
    }], H = () => {
      if (t.visible && O.value) {
        const Se = b.value.offsetWidth * h.value, be = b.value.offsetHeight * h.value, {
          left: he,
          top: Te
        } = MZ(b.value), ze = p.value % 180 !== 0;
        O.value = !1;
        const ut = CCe(ze ? be : Se, ze ? Se : be, he, Te);
        ut && m(I({}, ut));
      }
    }, G = (Se) => {
      Se.button === 0 && (Se.preventDefault(), Se.stopPropagation(), _.deltaX = Se.pageX - g.x, _.deltaY = Se.pageY - g.y, _.originX = g.x, _.originY = g.y, O.value = !0);
    }, re = (Se) => {
      t.visible && O.value && m({
        x: Se.pageX - _.deltaX,
        y: Se.pageY - _.deltaY
      });
    }, fe = (Se) => {
      if (!t.visible) return;
      Se.preventDefault();
      const be = Se.deltaY;
      R.value = {
        wheelDirection: be
      };
    }, de = (Se) => {
      !t.visible || !E.value || (Se.preventDefault(), Se.keyCode === ge.LEFT ? A.value > 0 && w($.value[A.value - 1]) : Se.keyCode === ge.RIGHT && A.value < P.value - 1 && w($.value[A.value + 1]));
    }, Ee = () => {
      t.visible && (h.value !== 1 && (h.value = 1), (g.x !== ku.x || g.y !== ku.y) && m(ku));
    };
    let $e = () => {
    };
    return it(() => {
      se([() => t.visible, O], () => {
        $e();
        let Se, be;
        const he = vr(window, "mouseup", H, !1), Te = vr(window, "mousemove", re, !1), ze = vr(window, "wheel", fe, {
          passive: !1
        }), ut = vr(window, "keydown", de, !1);
        try {
          window.top !== window.self && (Se = vr(window.top, "mouseup", H, !1), be = vr(window.top, "mousemove", re, !1));
        } catch (ct) {
          cf(!1, `[vc-image] ${ct}`);
        }
        $e = () => {
          he.remove(), Te.remove(), ze.remove(), ut.remove(), Se && Se.remove(), be && be.remove();
        };
      }, {
        flush: "post",
        immediate: !0
      }), se([R], () => {
        const {
          wheelDirection: Se
        } = R.value;
        Se > 0 ? z(!0) : Se < 0 && V(!0);
      });
    }), nl(() => {
      $e();
    }), () => {
      const {
        visible: Se,
        prefixCls: be,
        rootClassName: he
      } = t;
      return M(iY, j(j({}, r), {}, {
        transitionName: t.transitionName,
        maskTransitionName: t.maskTransitionName,
        closable: !1,
        keyboard: !0,
        prefixCls: be,
        onClose: y,
        afterClose: N,
        visible: Se,
        wrapClassName: oe,
        rootClassName: he,
        getContainer: t.getContainer
      }), {
        default: () => [M("div", {
          class: [`${t.prefixCls}-operations-wrapper`, he]
        }, [M("ul", {
          class: `${t.prefixCls}-operations`
        }, [X.map((Te) => {
          let {
            icon: ze,
            onClick: ut,
            type: ct,
            disabled: Dt
          } = Te;
          return M("li", {
            class: ye(K, {
              [`${t.prefixCls}-operations-operation-disabled`]: Dt && (Dt == null ? void 0 : Dt.value)
            }),
            onClick: ut,
            key: ct
          }, [Ns(ze, {
            class: ie
          })]);
        })])]), M("div", {
          class: `${t.prefixCls}-img-wrapper`,
          style: {
            transform: `translate3d(${g.x}px, ${g.y}px, 0)`
          }
        }, [M("img", {
          onMousedown: G,
          onDblclick: Ee,
          ref: b,
          class: `${t.prefixCls}-img`,
          src: D.value,
          alt: t.alt,
          style: {
            transform: `scale3d(${v.x * h.value}, ${v.y * h.value}, 1) rotate(${p.value}deg)`
          }
        }, null)]), E.value && M("div", {
          class: ye(`${t.prefixCls}-switch-left`, {
            [`${t.prefixCls}-switch-left-disabled`]: A.value <= 0
          }),
          onClick: ne
        }, [u]), E.value && M("div", {
          class: ye(`${t.prefixCls}-switch-right`, {
            [`${t.prefixCls}-switch-right-disabled`]: A.value >= P.value - 1
          }),
          onClick: ee
        }, [c])]
      });
    };
  }
});
var ECe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const sY = () => ({
  src: String,
  wrapperClassName: String,
  wrapperStyle: {
    type: Object,
    default: void 0
  },
  rootClassName: String,
  prefixCls: String,
  previewPrefixCls: String,
  previewMask: {
    type: [Boolean, Function],
    default: void 0
  },
  placeholder: Y.any,
  fallback: String,
  preview: {
    type: [Boolean, Object],
    default: !0
  },
  onClick: {
    type: Function
  },
  onError: {
    type: Function
  }
}), lY = (t, e) => {
  const n = I({}, t);
  return Object.keys(e).forEach((r) => {
    t[r] === void 0 && (n[r] = e[r]);
  }), n;
};
let MCe = 0;
const uY = te({
  compatConfig: {
    MODE: 3
  },
  name: "VcImage",
  inheritAttrs: !1,
  props: sY(),
  emits: ["click", "error"],
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i
    } = e;
    const a = L(() => t.prefixCls), o = L(() => `${a.value}-preview`), s = L(() => {
      const V = {
        visible: void 0,
        onVisibleChange: () => {
        },
        getContainer: void 0
      };
      return typeof t.preview == "object" ? lY(t.preview, V) : V;
    }), l = L(() => {
      var V;
      return (V = s.value.src) !== null && V !== void 0 ? V : t.src;
    }), u = L(() => t.placeholder && t.placeholder !== !0 || r.placeholder), c = L(() => s.value.visible), f = L(() => s.value.getContainer), d = L(() => c.value !== void 0), h = (V, z) => {
      var W, F;
      (F = (W = s.value).onVisibleChange) === null || F === void 0 || F.call(W, V, z);
    }, [p, v] = wh(!!c.value, {
      value: c,
      onChange: h
    }), g = U(u.value ? "loading" : "normal");
    se(() => t.src, () => {
      g.value = u.value ? "loading" : "normal";
    });
    const m = U(null), y = L(() => g.value === "error"), b = bD.inject(), {
      isPreviewGroup: _,
      setCurrent: O,
      setShowPreview: S,
      setMousePosition: x,
      registerImage: C
    } = b, T = U(MCe++), w = L(() => t.preview && !y.value), P = () => {
      g.value = "normal";
    }, $ = (V) => {
      g.value = "error", i("error", V);
    }, A = (V) => {
      if (!d.value) {
        const {
          left: z,
          top: W
        } = MZ(V.target);
        _.value ? (O(T.value), x({
          x: z,
          y: W
        })) : m.value = {
          x: z,
          y: W
        };
      }
      _.value ? S(!0) : v(!0), i("click", V);
    }, D = () => {
      v(!1), d.value || (m.value = null);
    }, E = U(null);
    se(() => E, () => {
      g.value === "loading" && E.value.complete && (E.value.naturalWidth || E.value.naturalHeight) && P();
    });
    let R = () => {
    };
    it(() => {
      se([l, w], () => {
        if (R(), !_.value)
          return () => {
          };
        R = C(T.value, l.value, w.value), w.value || R();
      }, {
        flush: "post",
        immediate: !0
      });
    }), nl(() => {
      R();
    });
    const N = (V) => $be(V) ? V + "px" : V;
    return () => {
      const {
        prefixCls: V,
        wrapperClassName: z,
        fallback: W,
        src: F,
        placeholder: Q,
        wrapperStyle: Z,
        rootClassName: ne
      } = t, {
        width: ee,
        height: oe,
        crossorigin: K,
        decoding: ie,
        alt: X,
        sizes: H,
        srcset: G,
        usemap: re,
        class: fe,
        style: de
      } = n, Ee = s.value, {
        icons: $e,
        maskClassName: Se
      } = Ee, be = ECe(Ee, ["icons", "maskClassName"]), he = ye(V, z, ne, {
        [`${V}-error`]: y.value
      }), Te = y.value && W ? W : l.value, ze = {
        crossorigin: K,
        decoding: ie,
        alt: X,
        sizes: H,
        srcset: G,
        usemap: re,
        width: ee,
        height: oe,
        class: ye(`${V}-img`, {
          [`${V}-img-placeholder`]: Q === !0
        }, fe),
        style: I({
          height: N(oe)
        }, de)
      };
      return M(wt, null, [M("div", {
        class: he,
        onClick: w.value ? A : (ut) => {
          i("click", ut);
        },
        style: I({
          width: N(ee),
          height: N(oe)
        }, Z)
      }, [M("img", j(j(j({}, ze), y.value && W ? {
        src: W
      } : {
        onLoad: P,
        onError: $,
        src: F
      }), {}, {
        ref: E
      }), null), g.value === "loading" && M("div", {
        "aria-hidden": "true",
        class: `${V}-placeholder`
      }, [Q || r.placeholder && r.placeholder()]), r.previewMask && w.value && M("div", {
        class: [`${V}-mask`, Se]
      }, [r.previewMask()])]), !_.value && w.value && M(oY, j(j({}, be), {}, {
        "aria-hidden": !p.value,
        visible: p.value,
        prefixCls: o.value,
        onClose: D,
        mousePosition: m.value,
        src: Te,
        alt: X,
        getContainer: f.value,
        icons: $e,
        rootClassName: ne
      }), null)]);
    };
  }
});
uY.PreviewGroup = aY;
const ICe = uY;
var DCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" } }, { tag: "path", attrs: { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" } }] }, name: "rotate-left", theme: "outlined" };
function u3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      RCe(t, i, n[i]);
    });
  }
  return t;
}
function RCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var _D = function(e, n) {
  var r = u3({}, e, n.attrs);
  return M(lt, u3({}, r, {
    icon: DCe
  }), null);
};
_D.displayName = "RotateLeftOutlined";
_D.inheritAttrs = !1;
var kCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" } }, { tag: "path", attrs: { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" } }] }, name: "rotate-right", theme: "outlined" };
function c3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      LCe(t, i, n[i]);
    });
  }
  return t;
}
function LCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var OD = function(e, n) {
  var r = c3({}, e, n.attrs);
  return M(lt, c3({}, r, {
    icon: kCe
  }), null);
};
OD.displayName = "RotateRightOutlined";
OD.inheritAttrs = !1;
var NCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-in", theme: "outlined" };
function f3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      BCe(t, i, n[i]);
    });
  }
  return t;
}
function BCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var SD = function(e, n) {
  var r = f3({}, e, n.attrs);
  return M(lt, f3({}, r, {
    icon: NCe
  }), null);
};
SD.displayName = "ZoomInOutlined";
SD.inheritAttrs = !1;
var zCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z" } }] }, name: "zoom-out", theme: "outlined" };
function d3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      VCe(t, i, n[i]);
    });
  }
  return t;
}
function VCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var xD = function(e, n) {
  var r = d3({}, e, n.attrs);
  return M(lt, d3({}, r, {
    icon: zCe
  }), null);
};
xD.displayName = "ZoomOutOutlined";
xD.inheritAttrs = !1;
var FCe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "swap", theme: "outlined" };
function h3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      WCe(t, i, n[i]);
    });
  }
  return t;
}
function WCe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var F1 = function(e, n) {
  var r = h3({}, e, n.attrs);
  return M(lt, h3({}, r, {
    icon: FCe
  }), null);
};
F1.displayName = "SwapOutlined";
F1.inheritAttrs = !1;
function p3(t) {
  return {
    position: t,
    top: 0,
    insetInlineEnd: 0,
    bottom: 0,
    insetInlineStart: 0
  };
}
const cY = (t) => {
  const {
    componentCls: e
  } = t;
  return [{
    [`${e}-root`]: {
      [`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]: {
        // reset scale avoid mousePosition bug
        transform: "none",
        opacity: 0,
        animationDuration: t.motionDurationSlow,
        // https://github.com/ant-design/ant-design/issues/11777
        userSelect: "none"
      },
      [`${e}${t.antCls}-zoom-leave ${e}-content`]: {
        pointerEvents: "none"
      },
      [`${e}-mask`]: I(I({}, p3("fixed")), {
        zIndex: t.zIndexPopupBase,
        height: "100%",
        backgroundColor: t.colorBgMask,
        [`${e}-hidden`]: {
          display: "none"
        }
      }),
      [`${e}-wrap`]: I(I({}, p3("fixed")), {
        overflow: "auto",
        outline: 0,
        WebkitOverflowScrolling: "touch"
      })
    }
  }, {
    [`${e}-root`]: TU(t)
  }];
}, QCe = (t) => {
  const {
    componentCls: e
  } = t;
  return [
    // ======================== Root =========================
    {
      [`${e}-root`]: {
        [`${e}-wrap`]: {
          zIndex: t.zIndexPopupBase,
          position: "fixed",
          inset: 0,
          overflow: "auto",
          outline: 0,
          WebkitOverflowScrolling: "touch"
        },
        [`${e}-wrap-rtl`]: {
          direction: "rtl"
        },
        [`${e}-centered`]: {
          textAlign: "center",
          "&::before": {
            display: "inline-block",
            width: 0,
            height: "100%",
            verticalAlign: "middle",
            content: '""'
          },
          [e]: {
            top: 0,
            display: "inline-block",
            paddingBottom: 0,
            textAlign: "start",
            verticalAlign: "middle"
          }
        },
        [`@media (max-width: ${t.screenSMMax})`]: {
          [e]: {
            maxWidth: "calc(100vw - 16px)",
            margin: `${t.marginXS} auto`
          },
          [`${e}-centered`]: {
            [e]: {
              flex: 1
            }
          }
        }
      }
    },
    // ======================== Modal ========================
    {
      [e]: I(I({}, nn(t)), {
        pointerEvents: "none",
        position: "relative",
        top: 100,
        width: "auto",
        maxWidth: `calc(100vw - ${t.margin * 2}px)`,
        margin: "0 auto",
        paddingBottom: t.paddingLG,
        [`${e}-title`]: {
          margin: 0,
          color: t.modalHeadingColor,
          fontWeight: t.fontWeightStrong,
          fontSize: t.modalHeaderTitleFontSize,
          lineHeight: t.modalHeaderTitleLineHeight,
          wordWrap: "break-word"
        },
        [`${e}-content`]: {
          position: "relative",
          backgroundColor: t.modalContentBg,
          backgroundClip: "padding-box",
          border: 0,
          borderRadius: t.borderRadiusLG,
          boxShadow: t.boxShadowSecondary,
          pointerEvents: "auto",
          padding: `${t.paddingMD}px ${t.paddingContentHorizontalLG}px`
        },
        [`${e}-close`]: I({
          position: "absolute",
          top: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
          insetInlineEnd: (t.modalHeaderCloseSize - t.modalCloseBtnSize) / 2,
          zIndex: t.zIndexPopupBase + 10,
          padding: 0,
          color: t.modalCloseColor,
          fontWeight: t.fontWeightStrong,
          lineHeight: 1,
          textDecoration: "none",
          background: "transparent",
          borderRadius: t.borderRadiusSM,
          width: t.modalConfirmIconSize,
          height: t.modalConfirmIconSize,
          border: 0,
          outline: 0,
          cursor: "pointer",
          transition: `color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,
          "&-x": {
            display: "block",
            fontSize: t.fontSizeLG,
            fontStyle: "normal",
            lineHeight: `${t.modalCloseBtnSize}px`,
            textAlign: "center",
            textTransform: "none",
            textRendering: "auto"
          },
          "&:hover": {
            color: t.modalIconHoverColor,
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContent,
            textDecoration: "none"
          },
          "&:active": {
            backgroundColor: t.wireframe ? "transparent" : t.colorFillContentHover
          }
        }, VS(t)),
        [`${e}-header`]: {
          color: t.colorText,
          background: t.modalHeaderBg,
          borderRadius: `${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,
          marginBottom: t.marginXS
        },
        [`${e}-body`]: {
          fontSize: t.fontSize,
          lineHeight: t.lineHeight,
          wordWrap: "break-word"
        },
        [`${e}-footer`]: {
          textAlign: "end",
          background: t.modalFooterBg,
          marginTop: t.marginSM,
          [`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]: {
            marginBottom: 0,
            marginInlineStart: t.marginXS
          }
        },
        [`${e}-open`]: {
          overflow: "hidden"
        }
      })
    },
    // ======================== Pure =========================
    {
      [`${e}-pure-panel`]: {
        top: "auto",
        padding: 0,
        display: "flex",
        flexDirection: "column",
        [`${e}-content,
          ${e}-body,
          ${e}-confirm-body-wrapper`]: {
          display: "flex",
          flexDirection: "column",
          flex: "auto"
        },
        [`${e}-confirm-body`]: {
          marginBottom: "auto"
        }
      }
    }
  ];
}, HCe = (t) => {
  const {
    componentCls: e
  } = t, n = `${e}-confirm`;
  return {
    [n]: {
      "&-rtl": {
        direction: "rtl"
      },
      [`${t.antCls}-modal-header`]: {
        display: "none"
      },
      [`${n}-body-wrapper`]: I({}, _1()),
      [`${n}-body`]: {
        display: "flex",
        flexWrap: "wrap",
        alignItems: "center",
        [`${n}-title`]: {
          flex: "0 0 100%",
          display: "block",
          // create BFC to avoid
          // https://user-images.githubusercontent.com/507615/37702510-ba844e06-2d2d-11e8-9b67-8e19be57f445.png
          overflow: "hidden",
          color: t.colorTextHeading,
          fontWeight: t.fontWeightStrong,
          fontSize: t.modalHeaderTitleFontSize,
          lineHeight: t.modalHeaderTitleLineHeight,
          [`+ ${n}-content`]: {
            marginBlockStart: t.marginXS,
            flexBasis: "100%",
            maxWidth: `calc(100% - ${t.modalConfirmIconSize + t.marginSM}px)`
          }
        },
        [`${n}-content`]: {
          color: t.colorText,
          fontSize: t.fontSize
        },
        [`> ${t.iconCls}`]: {
          flex: "none",
          marginInlineEnd: t.marginSM,
          fontSize: t.modalConfirmIconSize,
          [`+ ${n}-title`]: {
            flex: 1
          },
          // `content` after `icon` should set marginLeft
          [`+ ${n}-title + ${n}-content`]: {
            marginInlineStart: t.modalConfirmIconSize + t.marginSM
          }
        }
      },
      [`${n}-btns`]: {
        textAlign: "end",
        marginTop: t.marginSM,
        [`${t.antCls}-btn + ${t.antCls}-btn`]: {
          marginBottom: 0,
          marginInlineStart: t.marginXS
        }
      }
    },
    [`${n}-error ${n}-body > ${t.iconCls}`]: {
      color: t.colorError
    },
    [`${n}-warning ${n}-body > ${t.iconCls},
        ${n}-confirm ${n}-body > ${t.iconCls}`]: {
      color: t.colorWarning
    },
    [`${n}-info ${n}-body > ${t.iconCls}`]: {
      color: t.colorInfo
    },
    [`${n}-success ${n}-body > ${t.iconCls}`]: {
      color: t.colorSuccess
    },
    // https://github.com/ant-design/ant-design/issues/37329
    [`${e}-zoom-leave ${e}-btns`]: {
      pointerEvents: "none"
    }
  };
}, GCe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-root`]: {
      [`${e}-wrap-rtl`]: {
        direction: "rtl",
        [`${e}-confirm-body`]: {
          direction: "rtl"
        }
      }
    }
  };
}, jCe = (t) => {
  const {
    componentCls: e,
    antCls: n
  } = t, r = `${e}-confirm`;
  return {
    [e]: {
      [`${e}-content`]: {
        padding: 0
      },
      [`${e}-header`]: {
        padding: t.modalHeaderPadding,
        borderBottom: `${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,
        marginBottom: 0
      },
      [`${e}-body`]: {
        padding: t.modalBodyPadding
      },
      [`${e}-footer`]: {
        padding: `${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,
        borderTop: `${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,
        borderRadius: `0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,
        marginTop: 0
      }
    },
    [r]: {
      [`${n}-modal-body`]: {
        padding: `${t.padding * 2}px ${t.padding * 2}px ${t.paddingLG}px`
      },
      [`${r}-body`]: {
        [`> ${t.iconCls}`]: {
          marginInlineEnd: t.margin,
          // `content` after `icon` should set marginLeft
          [`+ ${r}-title + ${r}-content`]: {
            marginInlineStart: t.modalConfirmIconSize + t.margin
          }
        }
      },
      [`${r}-btns`]: {
        marginTop: t.marginLG
      }
    }
  };
}, ZCe = Sn("Modal", (t) => {
  const e = t.padding, n = t.fontSizeHeading5, r = t.lineHeightHeading5, i = Bt(t, {
    modalBodyPadding: t.paddingLG,
    modalHeaderBg: t.colorBgElevated,
    modalHeaderPadding: `${e}px ${t.paddingLG}px`,
    modalHeaderBorderWidth: t.lineWidth,
    modalHeaderBorderStyle: t.lineType,
    modalHeaderTitleLineHeight: r,
    modalHeaderTitleFontSize: n,
    modalHeaderBorderColorSplit: t.colorSplit,
    modalHeaderCloseSize: r * n + e * 2,
    modalContentBg: t.colorBgElevated,
    modalHeadingColor: t.colorTextHeading,
    modalCloseColor: t.colorTextDescription,
    modalFooterBg: "transparent",
    modalFooterBorderColorSplit: t.colorSplit,
    modalFooterBorderStyle: t.lineType,
    modalFooterPaddingVertical: t.paddingXS,
    modalFooterPaddingHorizontal: t.padding,
    modalFooterBorderWidth: t.lineWidth,
    modalConfirmTitleFontSize: t.fontSizeLG,
    modalIconHoverColor: t.colorIconHover,
    modalConfirmIconSize: t.fontSize * t.lineHeight,
    modalCloseBtnSize: t.controlHeightLG * 0.55
  });
  return [QCe(i), HCe(i), GCe(i), cY(i), t.wireframe && jCe(i), ux(i, "zoom")];
}), Y2 = (t) => ({
  position: t || "absolute",
  inset: 0
}), UCe = (t) => {
  const {
    iconCls: e,
    motionDurationSlow: n,
    paddingXXS: r,
    marginXXS: i,
    prefixCls: a
  } = t;
  return {
    position: "absolute",
    inset: 0,
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: "#fff",
    background: new en("#000").setAlpha(0.5).toRgbString(),
    cursor: "pointer",
    opacity: 0,
    transition: `opacity ${n}`,
    [`.${a}-mask-info`]: I(I({}, mh), {
      padding: `0 ${r}px`,
      [e]: {
        marginInlineEnd: i,
        svg: {
          verticalAlign: "baseline"
        }
      }
    })
  };
}, XCe = (t) => {
  const {
    previewCls: e,
    modalMaskBg: n,
    paddingSM: r,
    previewOperationColorDisabled: i,
    motionDurationSlow: a
  } = t, o = new en(n).setAlpha(0.1), s = o.clone().setAlpha(0.2);
  return {
    [`${e}-operations`]: I(I({}, nn(t)), {
      display: "flex",
      flexDirection: "row-reverse",
      alignItems: "center",
      color: t.previewOperationColor,
      listStyle: "none",
      background: o.toRgbString(),
      pointerEvents: "auto",
      "&-operation": {
        marginInlineStart: r,
        padding: r,
        cursor: "pointer",
        transition: `all ${a}`,
        userSelect: "none",
        "&:hover": {
          background: s.toRgbString()
        },
        "&-disabled": {
          color: i,
          pointerEvents: "none"
        },
        "&:last-of-type": {
          marginInlineStart: 0
        }
      },
      "&-progress": {
        position: "absolute",
        left: {
          _skip_check_: !0,
          value: "50%"
        },
        transform: "translateX(-50%)"
      },
      "&-icon": {
        fontSize: t.previewOperationSize
      }
    })
  };
}, YCe = (t) => {
  const {
    modalMaskBg: e,
    iconCls: n,
    previewOperationColorDisabled: r,
    previewCls: i,
    zIndexPopup: a,
    motionDurationSlow: o
  } = t, s = new en(e).setAlpha(0.1), l = s.clone().setAlpha(0.2);
  return {
    [`${i}-switch-left, ${i}-switch-right`]: {
      position: "fixed",
      insetBlockStart: "50%",
      zIndex: a + 1,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: t.imagePreviewSwitchSize,
      height: t.imagePreviewSwitchSize,
      marginTop: -t.imagePreviewSwitchSize / 2,
      color: t.previewOperationColor,
      background: s.toRgbString(),
      borderRadius: "50%",
      transform: "translateY(-50%)",
      cursor: "pointer",
      transition: `all ${o}`,
      pointerEvents: "auto",
      userSelect: "none",
      "&:hover": {
        background: l.toRgbString()
      },
      "&-disabled": {
        "&, &:hover": {
          color: r,
          background: "transparent",
          cursor: "not-allowed",
          [`> ${n}`]: {
            cursor: "not-allowed"
          }
        }
      },
      [`> ${n}`]: {
        fontSize: t.previewOperationSize
      }
    },
    [`${i}-switch-left`]: {
      insetInlineStart: t.marginSM
    },
    [`${i}-switch-right`]: {
      insetInlineEnd: t.marginSM
    }
  };
}, qCe = (t) => {
  const {
    motionEaseOut: e,
    previewCls: n,
    motionDurationSlow: r,
    componentCls: i
  } = t;
  return [
    {
      [`${i}-preview-root`]: {
        [n]: {
          height: "100%",
          textAlign: "center",
          pointerEvents: "none"
        },
        [`${n}-body`]: I(I({}, Y2()), {
          overflow: "hidden"
        }),
        [`${n}-img`]: {
          maxWidth: "100%",
          maxHeight: "100%",
          verticalAlign: "middle",
          transform: "scale3d(1, 1, 1)",
          cursor: "grab",
          transition: `transform ${r} ${e} 0s`,
          userSelect: "none",
          pointerEvents: "auto",
          "&-wrapper": I(I({}, Y2()), {
            transition: `transform ${r} ${e} 0s`,
            // https://github.com/ant-design/ant-design/issues/39913
            // TailwindCSS will reset img default style.
            // Let's set back.
            display: "flex",
            justifyContent: "center",
            alignItems: "center",
            "&::before": {
              display: "inline-block",
              width: 1,
              height: "50%",
              marginInlineEnd: -1,
              content: '""'
            }
          })
        },
        [`${n}-moving`]: {
          [`${n}-preview-img`]: {
            cursor: "grabbing",
            "&-wrapper": {
              transitionDuration: "0s"
            }
          }
        }
      }
    },
    // Override
    {
      [`${i}-preview-root`]: {
        [`${n}-wrap`]: {
          zIndex: t.zIndexPopup
        }
      }
    },
    // Preview operations & switch
    {
      [`${i}-preview-operations-wrapper`]: {
        position: "fixed",
        insetBlockStart: 0,
        insetInlineEnd: 0,
        zIndex: t.zIndexPopup + 1,
        width: "100%"
      },
      "&": [XCe(t), YCe(t)]
    }
  ];
}, KCe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    // ============================== image ==============================
    [e]: {
      position: "relative",
      display: "inline-block",
      [`${e}-img`]: {
        width: "100%",
        height: "auto",
        verticalAlign: "middle"
      },
      [`${e}-img-placeholder`]: {
        backgroundColor: t.colorBgContainerDisabled,
        backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",
        backgroundRepeat: "no-repeat",
        backgroundPosition: "center center",
        backgroundSize: "30%"
      },
      [`${e}-mask`]: I({}, UCe(t)),
      [`${e}-mask:hover`]: {
        opacity: 1
      },
      [`${e}-placeholder`]: I({}, Y2())
    }
  };
}, JCe = (t) => {
  const {
    previewCls: e
  } = t;
  return {
    [`${e}-root`]: ux(t, "zoom"),
    "&": TU(t, !0)
  };
}, fY = Sn("Image", (t) => {
  const e = `${t.componentCls}-preview`, n = Bt(t, {
    previewCls: e,
    modalMaskBg: new en("#000").setAlpha(0.45).toRgbString(),
    imagePreviewSwitchSize: t.controlHeightLG
  });
  return [KCe(n), qCe(n), cY(Bt(n, {
    componentCls: e
  })), JCe(n)];
}, (t) => ({
  zIndexPopup: t.zIndexPopupBase + 80,
  previewOperationColor: new en(t.colorTextLightSolid).toRgbString(),
  previewOperationColorDisabled: new en(t.colorTextLightSolid).setAlpha(0.25).toRgbString(),
  previewOperationSize: t.fontSizeIcon * 1.5
  // FIXME: fontSizeIconLG
})), dY = {
  rotateLeft: M(_D, null, null),
  rotateRight: M(OD, null, null),
  zoomIn: M(SD, null, null),
  zoomOut: M(xD, null, null),
  close: M(al, null, null),
  left: M(uD, null, null),
  right: M(px, null, null),
  flipX: M(F1, null, null),
  flipY: M(F1, {
    rotate: 90
  }, null)
}, eTe = () => ({
  previewPrefixCls: String,
  preview: fa()
}), tTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "AImagePreviewGroup",
  inheritAttrs: !1,
  props: eTe(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      rootPrefixCls: a
    } = It("image", t), o = L(() => `${i.value}-preview`), [s, l] = fY(i), u = L(() => {
      const {
        preview: c
      } = t;
      if (c === !1)
        return c;
      const f = typeof c == "object" ? c : {};
      return I(I({}, f), {
        rootClassName: l.value,
        transitionName: es(a.value, "zoom", f.transitionName),
        maskTransitionName: es(a.value, "fade", f.maskTransitionName)
      });
    });
    return () => s(M(aY, j(j({}, I(I({}, n), t)), {}, {
      preview: u.value,
      icons: dY,
      previewPrefixCls: o.value
    }), r));
  }
}), nTe = tTe, Al = te({
  name: "AImage",
  inheritAttrs: !1,
  props: sY(),
  setup(t, e) {
    let {
      slots: n,
      attrs: r
    } = e;
    const {
      prefixCls: i,
      rootPrefixCls: a,
      configProvider: o
    } = It("image", t), [s, l] = fY(i), u = L(() => {
      const {
        preview: c
      } = t;
      if (c === !1)
        return c;
      const f = typeof c == "object" ? c : {};
      return I(I({
        icons: dY
      }, f), {
        transitionName: es(a.value, "zoom", f.transitionName),
        maskTransitionName: es(a.value, "fade", f.maskTransitionName)
      });
    });
    return () => {
      var c, f;
      const d = ((f = (c = o.locale) === null || c === void 0 ? void 0 : c.value) === null || f === void 0 ? void 0 : f.Image) || zs.Image, h = () => M("div", {
        class: `${i.value}-mask-info`
      }, [M(xx, null, null), d == null ? void 0 : d.preview]), {
        previewMask: p = n.previewMask || h
      } = t;
      return s(M(ICe, j(j({}, I(I(I({}, r), t), {
        prefixCls: i.value
      })), {}, {
        preview: u.value,
        rootClassName: ye(t.rootClassName, l.value)
      }), I(I({}, n), {
        previewMask: typeof p == "function" ? p : null
      })));
    };
  }
});
Al.PreviewGroup = nTe;
Al.install = function(t) {
  return t.component(Al.name, Al), t.component(Al.PreviewGroup.name, Al.PreviewGroup), t;
};
var rTe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
function v3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      iTe(t, i, n[i]);
    });
  }
  return t;
}
function iTe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var wD = function(e, n) {
  var r = v3({}, e, n.attrs);
  return M(lt, v3({}, r, {
    icon: rTe
  }), null);
};
wD.displayName = "UpOutlined";
wD.inheritAttrs = !1;
function q2() {
  return typeof BigInt == "function";
}
function vg(t) {
  let e = t.trim(), n = e.startsWith("-");
  n && (e = e.slice(1)), e = e.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), e.startsWith(".") && (e = `0${e}`);
  const r = e || "0", i = r.split("."), a = i[0] || "0", o = i[1] || "0";
  a === "0" && o === "0" && (n = !1);
  const s = n ? "-" : "";
  return {
    negative: n,
    negativeStr: s,
    trimStr: r,
    integerStr: a,
    decimalStr: o,
    fullStr: `${s}${r}`
  };
}
function CD(t) {
  const e = String(t);
  return !Number.isNaN(Number(e)) && e.includes("e");
}
function sm(t) {
  const e = String(t);
  if (CD(t)) {
    let n = Number(e.slice(e.indexOf("e-") + 2));
    const r = e.match(/\.(\d+)/);
    return r != null && r[1] && (n += r[1].length), n;
  }
  return e.includes(".") && PD(e) ? e.length - e.indexOf(".") - 1 : 0;
}
function TD(t) {
  let e = String(t);
  if (CD(t)) {
    if (t > Number.MAX_SAFE_INTEGER)
      return String(q2() ? BigInt(t).toString() : Number.MAX_SAFE_INTEGER);
    if (t < Number.MIN_SAFE_INTEGER)
      return String(q2() ? BigInt(t).toString() : Number.MIN_SAFE_INTEGER);
    e = t.toFixed(sm(e));
  }
  return vg(e).fullStr;
}
function PD(t) {
  return typeof t == "number" ? !Number.isNaN(t) : t ? (
    // Normal type: 11.28
    /^\s*-?\d+(\.\d+)?\s*$/.test(t) || // Pre-number: 1.
    /^\s*-?\d+\.\s*$/.test(t) || // Post-number: .1
    /^\s*-?\.\d+\s*$/.test(t)
  ) : !1;
}
function hY(t) {
  return !t && t !== 0 && !Number.isNaN(t) || !String(t).trim();
}
class Oc {
  constructor(e) {
    if (this.origin = "", hY(e)) {
      this.empty = !0;
      return;
    }
    this.origin = String(e), this.number = Number(e);
  }
  negate() {
    return new Oc(-this.toNumber());
  }
  add(e) {
    if (this.isInvalidate())
      return new Oc(e);
    const n = Number(e);
    if (Number.isNaN(n))
      return this;
    const r = this.number + n;
    if (r > Number.MAX_SAFE_INTEGER)
      return new Oc(Number.MAX_SAFE_INTEGER);
    if (r < Number.MIN_SAFE_INTEGER)
      return new Oc(Number.MIN_SAFE_INTEGER);
    const i = Math.max(sm(this.number), sm(n));
    return new Oc(r.toFixed(i));
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return Number.isNaN(this.number);
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(e) {
    return this.toNumber() === (e == null ? void 0 : e.toNumber());
  }
  lessEquals(e) {
    return this.add(e.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.number;
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : TD(this.number) : this.origin;
  }
}
class Bd {
  constructor(e) {
    if (this.origin = "", hY(e)) {
      this.empty = !0;
      return;
    }
    if (this.origin = String(e), e === "-" || Number.isNaN(e)) {
      this.nan = !0;
      return;
    }
    let n = e;
    if (CD(n) && (n = Number(n)), n = typeof n == "string" ? n : TD(n), PD(n)) {
      const r = vg(n);
      this.negative = r.negative;
      const i = r.trimStr.split(".");
      this.integer = BigInt(i[0]);
      const a = i[1] || "0";
      this.decimal = BigInt(a), this.decimalLen = a.length;
    } else
      this.nan = !0;
  }
  getMark() {
    return this.negative ? "-" : "";
  }
  getIntegerStr() {
    return this.integer.toString();
  }
  getDecimalStr() {
    return this.decimal.toString().padStart(this.decimalLen, "0");
  }
  /**
   * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000
   * This is used for add function only.
   */
  alignDecimal(e) {
    const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e, "0")}`;
    return BigInt(n);
  }
  negate() {
    const e = new Bd(this.toString());
    return e.negative = !e.negative, e;
  }
  add(e) {
    if (this.isInvalidate())
      return new Bd(e);
    const n = new Bd(e);
    if (n.isInvalidate())
      return this;
    const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), i = this.alignDecimal(r), a = n.alignDecimal(r), o = (i + a).toString(), {
      negativeStr: s,
      trimStr: l
    } = vg(o), u = `${s}${l.padStart(r + 1, "0")}`;
    return new Bd(`${u.slice(0, -r)}.${u.slice(-r)}`);
  }
  isEmpty() {
    return this.empty;
  }
  isNaN() {
    return this.nan;
  }
  isInvalidate() {
    return this.isEmpty() || this.isNaN();
  }
  equals(e) {
    return this.toString() === (e == null ? void 0 : e.toString());
  }
  lessEquals(e) {
    return this.add(e.negate().toString()).toNumber() <= 0;
  }
  toNumber() {
    return this.isNaN() ? NaN : Number(this.toString());
  }
  toString() {
    return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : vg(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
  }
}
function Mo(t) {
  return q2() ? new Bd(t) : new Oc(t);
}
function K2(t, e, n) {
  let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
  if (t === "")
    return "";
  const {
    negativeStr: i,
    integerStr: a,
    decimalStr: o
  } = vg(t), s = `${e}${o}`, l = `${i}${a}`;
  if (n >= 0) {
    const u = Number(o[n]);
    if (u >= 5 && !r) {
      const c = Mo(t).add(`${i}0.${"0".repeat(n)}${10 - u}`);
      return K2(c.toString(), e, n, r);
    }
    return n === 0 ? l : `${l}${e}${o.padEnd(n, "0").slice(0, n)}`;
  }
  return s === ".0" ? l : `${l}${s}`;
}
const aTe = 200, oTe = 600, sTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "StepHandler",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    upDisabled: Boolean,
    downDisabled: Boolean,
    onStep: tt()
  },
  slots: Object,
  setup(t, e) {
    let {
      slots: n,
      emit: r
    } = e;
    const i = U(), a = (s, l) => {
      s.preventDefault(), r("step", l);
      function u() {
        r("step", l), i.value = setTimeout(u, aTe);
      }
      i.value = setTimeout(u, oTe);
    }, o = () => {
      clearTimeout(i.value);
    };
    return yt(() => {
      o();
    }), () => {
      if (AI())
        return null;
      const {
        prefixCls: s,
        upDisabled: l,
        downDisabled: u
      } = t, c = `${s}-handler`, f = ye(c, `${c}-up`, {
        [`${c}-up-disabled`]: l
      }), d = ye(c, `${c}-down`, {
        [`${c}-down-disabled`]: u
      }), h = {
        unselectable: "on",
        role: "button",
        onMouseup: o,
        onMouseleave: o
      }, {
        upNode: p,
        downNode: v
      } = n;
      return M("div", {
        class: `${c}-wrap`
      }, [M("span", j(j({}, h), {}, {
        onMousedown: (g) => {
          a(g, !0);
        },
        "aria-label": "Increase Value",
        "aria-disabled": l,
        class: f
      }), [(p == null ? void 0 : p()) || M("span", {
        unselectable: "on",
        class: `${s}-handler-up-inner`
      }, null)]), M("span", j(j({}, h), {}, {
        onMousedown: (g) => {
          a(g, !1);
        },
        "aria-label": "Decrease Value",
        "aria-disabled": u,
        class: d
      }), [(v == null ? void 0 : v()) || M("span", {
        unselectable: "on",
        class: `${s}-handler-down-inner`
      }, null)])]);
    };
  }
});
function lTe(t, e) {
  const n = U(null);
  function r() {
    try {
      const {
        selectionStart: a,
        selectionEnd: o,
        value: s
      } = t.value, l = s.substring(0, a), u = s.substring(o);
      n.value = {
        start: a,
        end: o,
        value: s,
        beforeTxt: l,
        afterTxt: u
      };
    } catch {
    }
  }
  function i() {
    if (t.value && n.value && e.value)
      try {
        const {
          value: a
        } = t.value, {
          beforeTxt: o,
          afterTxt: s,
          start: l
        } = n.value;
        let u = a.length;
        if (a.endsWith(s))
          u = a.length - n.value.afterTxt.length;
        else if (a.startsWith(o))
          u = o.length;
        else {
          const c = o[l - 1], f = a.indexOf(c, l - 1);
          f !== -1 && (u = f + 1);
        }
        t.value.setSelectionRange(u, u);
      } catch (a) {
        cf(!1, `Something warning of cursor restore. Please fire issue about this: ${a.message}`);
      }
  }
  return [r, i];
}
const uTe = () => {
  const t = ae(0), e = () => {
    xt.cancel(t.value);
  };
  return yt(() => {
    e();
  }), (n) => {
    e(), t.value = xt(() => {
      n();
    });
  };
};
var cTe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const g3 = (t, e) => t || e.isEmpty() ? e.toString() : e.toNumber(), m3 = (t) => {
  const e = Mo(t);
  return e.isInvalidate() ? null : e;
}, pY = () => ({
  /** value will show as string */
  stringMode: nt(),
  defaultValue: gn([String, Number]),
  value: gn([String, Number]),
  prefixCls: hn(),
  min: gn([String, Number]),
  max: gn([String, Number]),
  step: gn([String, Number], 1),
  tabindex: Number,
  controls: nt(!0),
  readonly: nt(),
  disabled: nt(),
  autofocus: nt(),
  keyboard: nt(!0),
  /** Parse display value to validate number */
  parser: tt(),
  /** Transform `value` to display value show in input */
  formatter: tt(),
  /** Syntactic sugar of `formatter`. Config precision of display. */
  precision: Number,
  /** Syntactic sugar of `formatter`. Config decimal separator of display. */
  decimalSeparator: String,
  onInput: tt(),
  onChange: tt(),
  onPressEnter: tt(),
  onStep: tt(),
  onBlur: tt(),
  onFocus: tt()
}), fTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "InnerInputNumber",
  inheritAttrs: !1,
  props: I(I({}, pY()), {
    lazy: Boolean
  }),
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i,
      expose: a
    } = e;
    const o = ae(), s = ae(!1), l = ae(!1), u = ae(!1), c = ae(Mo(t.value));
    function f(F) {
      t.value === void 0 && (c.value = F);
    }
    const d = (F, Q) => {
      if (!Q)
        return t.precision >= 0 ? t.precision : Math.max(sm(F), sm(t.step));
    }, h = (F) => {
      const Q = String(F);
      if (t.parser)
        return t.parser(Q);
      let Z = Q;
      return t.decimalSeparator && (Z = Z.replace(t.decimalSeparator, ".")), Z.replace(/[^\w.-]+/g, "");
    }, p = ae(""), v = (F, Q) => {
      if (t.formatter)
        return t.formatter(F, {
          userTyping: Q,
          input: String(p.value)
        });
      let Z = typeof F == "number" ? TD(F) : F;
      if (!Q) {
        const ne = d(Z, Q);
        if (PD(Z) && (t.decimalSeparator || ne >= 0)) {
          const ee = t.decimalSeparator || ".";
          Z = K2(Z, ee, ne);
        }
      }
      return Z;
    }, g = (() => {
      const F = t.value;
      return c.value.isInvalidate() && ["string", "number"].includes(typeof F) ? Number.isNaN(F) ? "" : F : v(c.value.toString(), !1);
    })();
    p.value = g;
    function m(F, Q) {
      p.value = v(
        // Invalidate number is sometime passed by external control, we should let it go
        // Otherwise is controlled by internal interactive logic which check by userTyping
        // You can ref 'show limited value when input is not focused' test for more info.
        F.isInvalidate() ? F.toString(!1) : F.toString(!Q),
        Q
      );
    }
    const y = L(() => m3(t.max)), b = L(() => m3(t.min)), _ = L(() => !y.value || !c.value || c.value.isInvalidate() ? !1 : y.value.lessEquals(c.value)), O = L(() => !b.value || !c.value || c.value.isInvalidate() ? !1 : c.value.lessEquals(b.value)), [S, x] = lTe(o, s), C = (F) => y.value && !F.lessEquals(y.value) ? y.value : b.value && !b.value.lessEquals(F) ? b.value : null, T = (F) => !C(F), w = (F, Q) => {
      var Z;
      let ne = F, ee = T(ne) || ne.isEmpty();
      if (!ne.isEmpty() && !Q && (ne = C(ne) || ne, ee = !0), !t.readonly && !t.disabled && ee) {
        const oe = ne.toString(), K = d(oe, Q);
        return K >= 0 && (ne = Mo(K2(oe, ".", K))), ne.equals(c.value) || (f(ne), (Z = t.onChange) === null || Z === void 0 || Z.call(t, ne.isEmpty() ? null : g3(t.stringMode, ne)), t.value === void 0 && m(ne, Q)), ne;
      }
      return c.value;
    }, P = uTe(), $ = (F) => {
      var Q;
      if (S(), p.value = F, !u.value) {
        const Z = h(F), ne = Mo(Z);
        ne.isNaN() || w(ne, !0);
      }
      (Q = t.onInput) === null || Q === void 0 || Q.call(t, F), P(() => {
        let Z = F;
        t.parser || (Z = F.replace(/。/g, ".")), Z !== F && $(Z);
      });
    }, A = () => {
      u.value = !0;
    }, D = () => {
      u.value = !1, $(o.value.value);
    }, E = (F) => {
      $(F.target.value);
    }, R = (F) => {
      var Q, Z;
      if (F && _.value || !F && O.value)
        return;
      l.value = !1;
      let ne = Mo(t.step);
      F || (ne = ne.negate());
      const ee = (c.value || Mo(0)).add(ne.toString()), oe = w(ee, !1);
      (Q = t.onStep) === null || Q === void 0 || Q.call(t, g3(t.stringMode, oe), {
        offset: t.step,
        type: F ? "up" : "down"
      }), (Z = o.value) === null || Z === void 0 || Z.focus();
    }, N = (F) => {
      const Q = Mo(h(p.value));
      let Z = Q;
      Q.isNaN() ? Z = c.value : Z = w(Q, F), t.value !== void 0 ? m(c.value, !1) : Z.isNaN() || m(Z, !1);
    }, V = (F) => {
      var Q;
      const {
        which: Z
      } = F;
      l.value = !0, Z === ge.ENTER && (u.value || (l.value = !1), N(!1), (Q = t.onPressEnter) === null || Q === void 0 || Q.call(t, F)), t.keyboard !== !1 && !u.value && [ge.UP, ge.DOWN].includes(Z) && (R(ge.UP === Z), F.preventDefault());
    }, z = () => {
      l.value = !1;
    }, W = (F) => {
      N(!1), s.value = !1, l.value = !1, i("blur", F);
    };
    return se(() => t.precision, () => {
      c.value.isInvalidate() || m(c.value, !1);
    }, {
      flush: "post"
    }), se(() => t.value, () => {
      const F = Mo(t.value);
      c.value = F;
      const Q = Mo(h(p.value));
      (!F.equals(Q) || !l.value || t.formatter) && m(F, l.value);
    }, {
      flush: "post"
    }), se(p, () => {
      t.formatter && x();
    }, {
      flush: "post"
    }), se(() => t.disabled, (F) => {
      F && (s.value = !1);
    }), a({
      focus: () => {
        var F;
        (F = o.value) === null || F === void 0 || F.focus();
      },
      blur: () => {
        var F;
        (F = o.value) === null || F === void 0 || F.blur();
      }
    }), () => {
      const F = I(I({}, n), t), {
        prefixCls: Q = "rc-input-number",
        min: Z,
        max: ne,
        step: ee = 1,
        defaultValue: oe,
        value: K,
        disabled: ie,
        readonly: X,
        keyboard: H,
        controls: G = !0,
        autofocus: re,
        stringMode: fe,
        parser: de,
        formatter: Ee,
        precision: $e,
        decimalSeparator: Se,
        onChange: be,
        onInput: he,
        onPressEnter: Te,
        onStep: ze,
        lazy: ut,
        class: ct,
        style: Dt
      } = F, ve = cTe(F, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
        upHandler: Xe,
        downHandler: Rt
      } = r, An = `${Q}-input`, sn = {};
      return ut ? sn.onChange = E : sn.onInput = E, M("div", {
        class: ye(Q, ct, {
          [`${Q}-focused`]: s.value,
          [`${Q}-disabled`]: ie,
          [`${Q}-readonly`]: X,
          [`${Q}-not-a-number`]: c.value.isNaN(),
          [`${Q}-out-of-range`]: !c.value.isInvalidate() && !T(c.value)
        }),
        style: Dt,
        onKeydown: V,
        onKeyup: z
      }, [G && M(sTe, {
        prefixCls: Q,
        upDisabled: _.value,
        downDisabled: O.value,
        onStep: R
      }, {
        upNode: Xe,
        downNode: Rt
      }), M("div", {
        class: `${An}-wrap`
      }, [M("input", j(j(j({
        autofocus: re,
        autocomplete: "off",
        role: "spinbutton",
        "aria-valuemin": Z,
        "aria-valuemax": ne,
        "aria-valuenow": c.value.isInvalidate() ? null : c.value.toString(),
        step: ee
      }, ve), {}, {
        ref: o,
        class: An,
        value: p.value,
        disabled: ie,
        readonly: X,
        onFocus: ($r) => {
          s.value = !0, i("focus", $r);
        }
      }, sn), {}, {
        onBlur: W,
        onCompositionstart: A,
        onCompositionend: D
      }), null)])]);
    };
  }
});
function IC(t) {
  return t != null;
}
const dTe = (t) => {
  const {
    componentCls: e,
    lineWidth: n,
    lineType: r,
    colorBorder: i,
    borderRadius: a,
    fontSizeLG: o,
    controlHeightLG: s,
    controlHeightSM: l,
    colorError: u,
    inputPaddingHorizontalSM: c,
    colorTextDescription: f,
    motionDurationMid: d,
    colorPrimary: h,
    controlHeight: p,
    inputPaddingHorizontal: v,
    colorBgContainer: g,
    colorTextDisabled: m,
    borderRadiusSM: y,
    borderRadiusLG: b,
    controlWidth: _,
    handleVisible: O
  } = t;
  return [
    {
      [e]: I(I(I(I({}, nn(t)), mx(t)), gx(t, e)), {
        display: "inline-block",
        width: _,
        margin: 0,
        padding: 0,
        border: `${n}px ${r} ${i}`,
        borderRadius: a,
        "&-rtl": {
          direction: "rtl",
          [`${e}-input`]: {
            direction: "rtl"
          }
        },
        "&-lg": {
          padding: 0,
          fontSize: o,
          borderRadius: b,
          [`input${e}-input`]: {
            height: s - 2 * n
          }
        },
        "&-sm": {
          padding: 0,
          borderRadius: y,
          [`input${e}-input`]: {
            height: l - 2 * n,
            padding: `0 ${c}px`
          }
        },
        "&:hover": I({}, b0(t)),
        "&-focused": I({}, N1(t)),
        "&-disabled": I(I({}, iX(t)), {
          [`${e}-input`]: {
            cursor: "not-allowed"
          }
        }),
        // ===================== Out Of Range =====================
        "&-out-of-range": {
          input: {
            color: u
          }
        },
        // Style for input-group: input with label, with button or dropdown...
        "&-group": I(I(I({}, nn(t)), sX(t)), {
          "&-wrapper": {
            display: "inline-block",
            textAlign: "start",
            verticalAlign: "top",
            [`${e}-affix-wrapper`]: {
              width: "100%"
            },
            // Size
            "&-lg": {
              [`${e}-group-addon`]: {
                borderRadius: b
              }
            },
            "&-sm": {
              [`${e}-group-addon`]: {
                borderRadius: y
              }
            }
          }
        }),
        [e]: {
          "&-input": I(I({
            width: "100%",
            height: p - 2 * n,
            padding: `0 ${v}px`,
            textAlign: "start",
            backgroundColor: "transparent",
            border: 0,
            borderRadius: a,
            outline: 0,
            transition: `all ${d} linear`,
            appearance: "textfield",
            color: t.colorText,
            fontSize: "inherit",
            verticalAlign: "top"
          }, rX(t.colorTextPlaceholder)), {
            '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
              margin: 0,
              /* stylelint-disable-next-line property-no-vendor-prefix */
              webkitAppearance: "none",
              appearance: "none"
            }
          })
        }
      })
    },
    // Handler
    {
      [e]: {
        [`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]: {
          opacity: 1
        },
        [`${e}-handler-wrap`]: {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          width: t.handleWidth,
          height: "100%",
          background: g,
          borderStartStartRadius: 0,
          borderStartEndRadius: a,
          borderEndEndRadius: a,
          borderEndStartRadius: 0,
          opacity: O === !0 ? 1 : 0,
          display: "flex",
          flexDirection: "column",
          alignItems: "stretch",
          transition: `opacity ${d} linear ${d}`,
          // Fix input number inside Menu makes icon too large
          // We arise the selector priority by nest selector here
          // https://github.com/ant-design/ant-design/issues/14367
          [`${e}-handler`]: {
            display: "flex",
            alignItems: "center",
            justifyContent: "center",
            flex: "auto",
            height: "40%",
            [`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]: {
              marginInlineEnd: 0,
              fontSize: t.handleFontSize
            }
          }
        },
        [`${e}-handler`]: {
          height: "50%",
          overflow: "hidden",
          color: f,
          fontWeight: "bold",
          lineHeight: 0,
          textAlign: "center",
          cursor: "pointer",
          borderInlineStart: `${n}px ${r} ${i}`,
          transition: `all ${d} linear`,
          "&:active": {
            background: t.colorFillAlter
          },
          // Hover
          "&:hover": {
            height: "60%",
            [`
              ${e}-handler-up-inner,
              ${e}-handler-down-inner
            `]: {
              color: h
            }
          },
          "&-up-inner, &-down-inner": I(I({}, ip()), {
            color: f,
            transition: `all ${d} linear`,
            userSelect: "none"
          })
        },
        [`${e}-handler-up`]: {
          borderStartEndRadius: a
        },
        [`${e}-handler-down`]: {
          borderBlockStart: `${n}px ${r} ${i}`,
          borderEndEndRadius: a
        },
        // Disabled
        "&-disabled, &-readonly": {
          [`${e}-handler-wrap`]: {
            display: "none"
          }
        },
        [`
          ${e}-handler-up-disabled,
          ${e}-handler-down-disabled
        `]: {
          cursor: "not-allowed"
        },
        [`
          ${e}-handler-up-disabled:hover &-handler-up-inner,
          ${e}-handler-down-disabled:hover &-handler-down-inner
        `]: {
          color: m
        }
      }
    },
    // Border-less
    {
      [`${e}-borderless`]: {
        borderColor: "transparent",
        boxShadow: "none",
        [`${e}-handler-down`]: {
          borderBlockStartWidth: 0
        }
      }
    }
  ];
}, hTe = (t) => {
  const {
    componentCls: e,
    inputPaddingHorizontal: n,
    inputAffixPadding: r,
    controlWidth: i,
    borderRadiusLG: a,
    borderRadiusSM: o
  } = t;
  return {
    [`${e}-affix-wrapper`]: I(I(I({}, mx(t)), gx(t, `${e}-affix-wrapper`)), {
      // or number handler will cover form status
      position: "relative",
      display: "inline-flex",
      width: i,
      padding: 0,
      paddingInlineStart: n,
      "&-lg": {
        borderRadius: a
      },
      "&-sm": {
        borderRadius: o
      },
      [`&:not(${e}-affix-wrapper-disabled):hover`]: I(I({}, b0(t)), {
        zIndex: 1
      }),
      "&-focused, &:focus": {
        zIndex: 1
      },
      "&-disabled": {
        [`${e}[disabled]`]: {
          background: "transparent"
        }
      },
      [`> div${e}`]: {
        width: "100%",
        border: "none",
        outline: "none",
        [`&${e}-focused`]: {
          boxShadow: "none !important"
        }
      },
      [`input${e}-input`]: {
        padding: 0
      },
      "&::before": {
        width: 0,
        visibility: "hidden",
        content: '"\\a0"'
      },
      [`${e}-handler-wrap`]: {
        zIndex: 2
      },
      [e]: {
        "&-prefix, &-suffix": {
          display: "flex",
          flex: "none",
          alignItems: "center",
          pointerEvents: "none"
        },
        "&-prefix": {
          marginInlineEnd: r
        },
        "&-suffix": {
          position: "absolute",
          insetBlockStart: 0,
          insetInlineEnd: 0,
          zIndex: 1,
          height: "100%",
          marginInlineEnd: n,
          marginInlineStart: r
        }
      }
    })
  };
}, pTe = Sn("InputNumber", (t) => {
  const e = lX(t);
  return [
    dTe(e),
    hTe(e),
    // =====================================================
    // ==             Space Compact                       ==
    // =====================================================
    cx(e)
  ];
}, (t) => ({
  controlWidth: 90,
  handleWidth: t.controlHeightSM - t.lineWidth * 2,
  handleFontSize: t.fontSize / 2,
  handleVisible: "auto"
}));
var vTe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const y3 = pY(), gTe = () => I(I({}, y3), {
  size: hn(),
  bordered: nt(!0),
  placeholder: String,
  name: String,
  id: String,
  type: String,
  addonBefore: Y.any,
  addonAfter: Y.any,
  prefix: Y.any,
  "onUpdate:value": y3.onChange,
  valueModifiers: Object,
  status: hn()
}), DC = te({
  compatConfig: {
    MODE: 3
  },
  name: "AInputNumber",
  inheritAttrs: !1,
  props: gTe(),
  // emits: ['focus', 'blur', 'change', 'input', 'update:value'],
  slots: Object,
  setup(t, e) {
    let {
      emit: n,
      expose: r,
      attrs: i,
      slots: a
    } = e;
    var o;
    const s = ss(), l = ro.useInject(), u = L(() => m0(l.status, t.status)), {
      prefixCls: c,
      size: f,
      direction: d,
      disabled: h
    } = It("input-number", t), {
      compactSize: p,
      compactItemClassnames: v
    } = sx(c, d), g = Ko(), m = L(() => {
      var A;
      return (A = h.value) !== null && A !== void 0 ? A : g.value;
    }), [y, b] = pTe(c), _ = L(() => p.value || f.value), O = ae((o = t.value) !== null && o !== void 0 ? o : t.defaultValue), S = ae(!1);
    se(() => t.value, () => {
      O.value = t.value;
    });
    const x = ae(null), C = () => {
      var A;
      (A = x.value) === null || A === void 0 || A.focus();
    };
    r({
      focus: C,
      blur: () => {
        var A;
        (A = x.value) === null || A === void 0 || A.blur();
      }
    });
    const w = (A) => {
      t.value === void 0 && (O.value = A), n("update:value", A), n("change", A), s.onFieldChange();
    }, P = (A) => {
      S.value = !1, n("blur", A), s.onFieldBlur();
    }, $ = (A) => {
      S.value = !0, n("focus", A);
    };
    return () => {
      var A, D, E, R;
      const {
        hasFeedback: N,
        isFormItemInput: V,
        feedbackIcon: z
      } = l, W = (A = t.id) !== null && A !== void 0 ? A : s.id.value, F = I(I(I({}, i), t), {
        id: W,
        disabled: m.value
      }), {
        class: Q,
        bordered: Z,
        readonly: ne,
        style: ee,
        addonBefore: oe = (D = a.addonBefore) === null || D === void 0 ? void 0 : D.call(a),
        addonAfter: K = (E = a.addonAfter) === null || E === void 0 ? void 0 : E.call(a),
        prefix: ie = (R = a.prefix) === null || R === void 0 ? void 0 : R.call(a),
        valueModifiers: X = {}
      } = F, H = vTe(F, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), G = c.value, re = ye({
        [`${G}-lg`]: _.value === "large",
        [`${G}-sm`]: _.value === "small",
        [`${G}-rtl`]: d.value === "rtl",
        [`${G}-readonly`]: ne,
        [`${G}-borderless`]: !Z,
        [`${G}-in-form-item`]: V
      }, Is(G, u.value), Q, v.value, b.value);
      let fe = M(fTe, j(j({}, or(H, ["size", "defaultValue"])), {}, {
        ref: x,
        lazy: !!X.lazy,
        value: O.value,
        class: re,
        prefixCls: G,
        readonly: ne,
        onChange: w,
        onBlur: P,
        onFocus: $
      }), {
        upHandler: a.upIcon ? () => M("span", {
          class: `${G}-handler-up-inner`
        }, [a.upIcon()]) : () => M(wD, {
          class: `${G}-handler-up-inner`
        }, null),
        downHandler: a.downIcon ? () => M("span", {
          class: `${G}-handler-down-inner`
        }, [a.downIcon()]) : () => M(tx, {
          class: `${G}-handler-down-inner`
        }, null)
      });
      const de = IC(oe) || IC(K), Ee = IC(ie);
      if (Ee || N) {
        const $e = ye(`${G}-affix-wrapper`, Is(`${G}-affix-wrapper`, u.value, N), {
          [`${G}-affix-wrapper-focused`]: S.value,
          [`${G}-affix-wrapper-disabled`]: m.value,
          [`${G}-affix-wrapper-sm`]: _.value === "small",
          [`${G}-affix-wrapper-lg`]: _.value === "large",
          [`${G}-affix-wrapper-rtl`]: d.value === "rtl",
          [`${G}-affix-wrapper-readonly`]: ne,
          [`${G}-affix-wrapper-borderless`]: !Z,
          // className will go to addon wrapper
          [`${Q}`]: !de && Q
        }, b.value);
        fe = M("div", {
          class: $e,
          style: ee,
          onClick: C
        }, [Ee && M("span", {
          class: `${G}-prefix`
        }, [ie]), fe, N && M("span", {
          class: `${G}-suffix`
        }, [z])]);
      }
      if (de) {
        const $e = `${G}-group`, Se = `${$e}-addon`, be = oe ? M("div", {
          class: Se
        }, [oe]) : null, he = K ? M("div", {
          class: Se
        }, [K]) : null, Te = ye(`${G}-wrapper`, $e, {
          [`${$e}-rtl`]: d.value === "rtl"
        }, b.value), ze = ye(`${G}-group-wrapper`, {
          [`${G}-group-wrapper-sm`]: _.value === "small",
          [`${G}-group-wrapper-lg`]: _.value === "large",
          [`${G}-group-wrapper-rtl`]: d.value === "rtl"
        }, Is(`${c}-group-wrapper`, u.value, N), Q, b.value);
        fe = M("div", {
          class: ze,
          style: ee
        }, [M("div", {
          class: Te
        }, [be && M(E1, null, {
          default: () => [M(P1, null, {
            default: () => [be]
          })]
        }), fe, he && M(E1, null, {
          default: () => [M(P1, null, {
            default: () => [he]
          })]
        })])]);
      }
      return y(Pn(fe, {
        style: ee
      }));
    };
  }
}), O0 = I(DC, {
  install: (t) => (t.component(DC.name, DC), t)
});
function mTe(t, e, n) {
  var r = n || {}, i = r.noTrailing, a = i === void 0 ? !1 : i, o = r.noLeading, s = o === void 0 ? !1 : o, l = r.debounceMode, u = l === void 0 ? void 0 : l, c, f = !1, d = 0;
  function h() {
    c && clearTimeout(c);
  }
  function p(g) {
    var m = g || {}, y = m.upcomingOnly, b = y === void 0 ? !1 : y;
    h(), f = !b;
  }
  function v() {
    for (var g = arguments.length, m = new Array(g), y = 0; y < g; y++)
      m[y] = arguments[y];
    var b = this, _ = Date.now() - d;
    if (f)
      return;
    function O() {
      d = Date.now(), e.apply(b, m);
    }
    function S() {
      c = void 0;
    }
    !s && u && !c && O(), h(), u === void 0 && _ > t ? s ? (d = Date.now(), a || (c = setTimeout(u ? S : O, t))) : O() : a !== !0 && (c = setTimeout(u ? S : O, u === void 0 ? t - _ : t));
  }
  return v.cancel = p, v;
}
function yTe(t, e, n) {
  var r = {}, i = r.atBegin, a = i === void 0 ? !1 : i;
  return mTe(t, e, {
    debounceMode: a !== !1
  });
}
const bTe = new Ot("antSpinMove", {
  to: {
    opacity: 1
  }
}), _Te = new Ot("antRotate", {
  to: {
    transform: "rotate(405deg)"
  }
}), OTe = (t) => ({
  [`${t.componentCls}`]: I(I({}, nn(t)), {
    position: "absolute",
    display: "none",
    color: t.colorPrimary,
    textAlign: "center",
    verticalAlign: "middle",
    opacity: 0,
    transition: `transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,
    "&-spinning": {
      position: "static",
      display: "inline-block",
      opacity: 1
    },
    "&-nested-loading": {
      position: "relative",
      [`> div > ${t.componentCls}`]: {
        position: "absolute",
        top: 0,
        insetInlineStart: 0,
        zIndex: 4,
        display: "block",
        width: "100%",
        height: "100%",
        maxHeight: t.contentHeight,
        [`${t.componentCls}-dot`]: {
          position: "absolute",
          top: "50%",
          insetInlineStart: "50%",
          margin: -t.spinDotSize / 2
        },
        [`${t.componentCls}-text`]: {
          position: "absolute",
          top: "50%",
          width: "100%",
          paddingTop: (t.spinDotSize - t.fontSize) / 2 + 2,
          textShadow: `0 1px 2px ${t.colorBgContainer}`
          // FIXME: shadow
        },
        [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
          marginTop: -(t.spinDotSize / 2) - 10
        },
        "&-sm": {
          [`${t.componentCls}-dot`]: {
            margin: -t.spinDotSizeSM / 2
          },
          [`${t.componentCls}-text`]: {
            paddingTop: (t.spinDotSizeSM - t.fontSize) / 2 + 2
          },
          [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
            marginTop: -(t.spinDotSizeSM / 2) - 10
          }
        },
        "&-lg": {
          [`${t.componentCls}-dot`]: {
            margin: -(t.spinDotSizeLG / 2)
          },
          [`${t.componentCls}-text`]: {
            paddingTop: (t.spinDotSizeLG - t.fontSize) / 2 + 2
          },
          [`&${t.componentCls}-show-text ${t.componentCls}-dot`]: {
            marginTop: -(t.spinDotSizeLG / 2) - 10
          }
        }
      },
      [`${t.componentCls}-container`]: {
        position: "relative",
        transition: `opacity ${t.motionDurationSlow}`,
        "&::after": {
          position: "absolute",
          top: 0,
          insetInlineEnd: 0,
          bottom: 0,
          insetInlineStart: 0,
          zIndex: 10,
          width: "100%",
          height: "100%",
          background: t.colorBgContainer,
          opacity: 0,
          transition: `all ${t.motionDurationSlow}`,
          content: '""',
          pointerEvents: "none"
        }
      },
      [`${t.componentCls}-blur`]: {
        clear: "both",
        opacity: 0.5,
        userSelect: "none",
        pointerEvents: "none",
        "&::after": {
          opacity: 0.4,
          pointerEvents: "auto"
        }
      }
    },
    // tip
    // ------------------------------
    "&-tip": {
      color: t.spinDotDefault
    },
    // dots
    // ------------------------------
    [`${t.componentCls}-dot`]: {
      position: "relative",
      display: "inline-block",
      fontSize: t.spinDotSize,
      width: "1em",
      height: "1em",
      "&-item": {
        position: "absolute",
        display: "block",
        width: (t.spinDotSize - t.marginXXS / 2) / 2,
        height: (t.spinDotSize - t.marginXXS / 2) / 2,
        backgroundColor: t.colorPrimary,
        borderRadius: "100%",
        transform: "scale(0.75)",
        transformOrigin: "50% 50%",
        opacity: 0.3,
        animationName: bTe,
        animationDuration: "1s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear",
        animationDirection: "alternate",
        "&:nth-child(1)": {
          top: 0,
          insetInlineStart: 0
        },
        "&:nth-child(2)": {
          top: 0,
          insetInlineEnd: 0,
          animationDelay: "0.4s"
        },
        "&:nth-child(3)": {
          insetInlineEnd: 0,
          bottom: 0,
          animationDelay: "0.8s"
        },
        "&:nth-child(4)": {
          bottom: 0,
          insetInlineStart: 0,
          animationDelay: "1.2s"
        }
      },
      "&-spin": {
        transform: "rotate(45deg)",
        animationName: _Te,
        animationDuration: "1.2s",
        animationIterationCount: "infinite",
        animationTimingFunction: "linear"
      }
    },
    // Sizes
    // ------------------------------
    // small
    [`&-sm ${t.componentCls}-dot`]: {
      fontSize: t.spinDotSizeSM,
      i: {
        width: (t.spinDotSizeSM - t.marginXXS / 2) / 2,
        height: (t.spinDotSizeSM - t.marginXXS / 2) / 2
      }
    },
    // large
    [`&-lg ${t.componentCls}-dot`]: {
      fontSize: t.spinDotSizeLG,
      i: {
        width: (t.spinDotSizeLG - t.marginXXS) / 2,
        height: (t.spinDotSizeLG - t.marginXXS) / 2
      }
    },
    [`&${t.componentCls}-show-text ${t.componentCls}-text`]: {
      display: "block"
    }
  })
}), STe = Sn("Spin", (t) => {
  const e = Bt(t, {
    spinDotDefault: t.colorTextDescription,
    spinDotSize: t.controlHeightLG / 2,
    spinDotSizeSM: t.controlHeightLG * 0.35,
    spinDotSizeLG: t.controlHeight
  });
  return [OTe(e)];
}, {
  contentHeight: 400
});
var xTe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const wTe = () => ({
  prefixCls: String,
  spinning: {
    type: Boolean,
    default: void 0
  },
  size: String,
  wrapperClassName: String,
  tip: Y.any,
  delay: Number,
  indicator: Y.any
});
let M_ = null;
function CTe(t, e) {
  return !!t && !!e && !isNaN(Number(e));
}
function TTe(t) {
  const e = t.indicator;
  M_ = typeof e == "function" ? e : () => M(e, null, null);
}
const gg = te({
  compatConfig: {
    MODE: 3
  },
  name: "ASpin",
  inheritAttrs: !1,
  props: sr(wTe(), {
    size: "default",
    spinning: !0,
    wrapperClassName: ""
  }),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const {
      prefixCls: i,
      size: a,
      direction: o
    } = It("spin", t), [s, l] = STe(i), u = ae(t.spinning && !CTe(t.spinning, t.delay));
    let c;
    return se([() => t.spinning, () => t.delay], () => {
      c == null || c.cancel(), c = yTe(t.delay, () => {
        u.value = t.spinning;
      }), c == null || c();
    }, {
      immediate: !0,
      flush: "post"
    }), yt(() => {
      c == null || c.cancel();
    }), () => {
      var f, d;
      const {
        class: h
      } = n, p = xTe(n, ["class"]), {
        tip: v = (f = r.tip) === null || f === void 0 ? void 0 : f.call(r)
      } = t, g = (d = r.default) === null || d === void 0 ? void 0 : d.call(r), m = {
        [l.value]: !0,
        [i.value]: !0,
        [`${i.value}-sm`]: a.value === "small",
        [`${i.value}-lg`]: a.value === "large",
        [`${i.value}-spinning`]: u.value,
        [`${i.value}-show-text`]: !!v,
        [`${i.value}-rtl`]: o.value === "rtl",
        [h]: !!h
      };
      function y(_) {
        const O = `${_}-dot`;
        let S = IS(r, t, "indicator");
        return S === null ? null : (Array.isArray(S) && (S = S.length === 1 ? S[0] : S), nu(S) ? Ns(S, {
          class: O
        }) : M_ && nu(M_()) ? Ns(M_(), {
          class: O
        }) : M("span", {
          class: `${O} ${_}-dot-spin`
        }, [M("i", {
          class: `${_}-dot-item`
        }, null), M("i", {
          class: `${_}-dot-item`
        }, null), M("i", {
          class: `${_}-dot-item`
        }, null), M("i", {
          class: `${_}-dot-item`
        }, null)]));
      }
      const b = M("div", j(j({}, p), {}, {
        class: m,
        "aria-live": "polite",
        "aria-busy": u.value
      }), [y(i.value), v ? M("div", {
        class: `${i.value}-text`
      }, [v]) : null]);
      if (g && os(g).length) {
        const _ = {
          [`${i.value}-container`]: !0,
          [`${i.value}-blur`]: u.value
        };
        return s(M("div", {
          class: [`${i.value}-nested-loading`, t.wrapperClassName, l.value]
        }, [u.value && M("div", {
          key: "loading"
        }, [b]), M("div", {
          class: _,
          key: "container"
        }, [g])]));
      }
      return s(b);
    };
  }
});
gg.setDefaultIndicator = TTe;
gg.install = function(t) {
  return t.component(gg.name, gg), t;
};
var PTe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
let J2;
const $Te = (t) => {
  J2 = {
    x: t.pageX,
    y: t.pageY
  }, setTimeout(() => J2 = null, 100);
};
vX() && vr(document.documentElement, "click", $Te, !0);
const ATe = () => ({
  prefixCls: String,
  /** @deprecated Please use `open` instead. */
  visible: {
    type: Boolean,
    default: void 0
  },
  open: {
    type: Boolean,
    default: void 0
  },
  confirmLoading: {
    type: Boolean,
    default: void 0
  },
  title: Y.any,
  closable: {
    type: Boolean,
    default: void 0
  },
  closeIcon: Y.any,
  onOk: Function,
  onCancel: Function,
  "onUpdate:visible": Function,
  "onUpdate:open": Function,
  onChange: Function,
  afterClose: Function,
  centered: {
    type: Boolean,
    default: void 0
  },
  width: [String, Number],
  footer: Y.any,
  okText: Y.any,
  okType: String,
  cancelText: Y.any,
  icon: Y.any,
  maskClosable: {
    type: Boolean,
    default: void 0
  },
  forceRender: {
    type: Boolean,
    default: void 0
  },
  okButtonProps: $t(),
  cancelButtonProps: $t(),
  destroyOnClose: {
    type: Boolean,
    default: void 0
  },
  wrapClassName: String,
  maskTransitionName: String,
  transitionName: String,
  getContainer: {
    type: [String, Function, Boolean, Object],
    default: void 0
  },
  zIndex: Number,
  bodyStyle: $t(),
  maskStyle: $t(),
  mask: {
    type: Boolean,
    default: void 0
  },
  keyboard: {
    type: Boolean,
    default: void 0
  },
  wrapProps: Object,
  focusTriggerAfterClose: {
    type: Boolean,
    default: void 0
  },
  modalRender: Function,
  mousePosition: $t()
}), Hi = te({
  compatConfig: {
    MODE: 3
  },
  name: "AModal",
  inheritAttrs: !1,
  props: sr(ATe(), {
    width: 520,
    confirmLoading: !1,
    okType: "primary"
  }),
  setup(t, e) {
    let {
      emit: n,
      slots: r,
      attrs: i
    } = e;
    const [a] = RS("Modal"), {
      prefixCls: o,
      rootPrefixCls: s,
      direction: l,
      getPopupContainer: u
    } = It("modal", t), [c, f] = ZCe(o);
    Xr(t.visible === void 0, "Modal", "`visible` will be removed in next major version, please use `open` instead.");
    const d = (v) => {
      n("update:visible", !1), n("update:open", !1), n("cancel", v), n("change", !1);
    }, h = (v) => {
      n("ok", v);
    }, p = () => {
      var v, g;
      const {
        okText: m = (v = r.okText) === null || v === void 0 ? void 0 : v.call(r),
        okType: y,
        cancelText: b = (g = r.cancelText) === null || g === void 0 ? void 0 : g.call(r),
        confirmLoading: _
      } = t;
      return M(wt, null, [M(Ur, j({
        onClick: d
      }, t.cancelButtonProps), {
        default: () => [b || a.value.cancelText]
      }), M(Ur, j(j({}, LU(y)), {}, {
        loading: _,
        onClick: h
      }, t.okButtonProps), {
        default: () => [m || a.value.okText]
      })]);
    };
    return () => {
      var v, g;
      const {
        prefixCls: m,
        visible: y,
        open: b,
        wrapClassName: _,
        centered: O,
        getContainer: S,
        closeIcon: x = (v = r.closeIcon) === null || v === void 0 ? void 0 : v.call(r),
        focusTriggerAfterClose: C = !0
      } = t, T = PTe(t, ["prefixCls", "visible", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "focusTriggerAfterClose"]), w = ye(_, {
        [`${o.value}-centered`]: !!O,
        [`${o.value}-wrap-rtl`]: l.value === "rtl"
      });
      return c(M(iY, j(j(j({}, T), i), {}, {
        rootClassName: f.value,
        class: ye(f.value, i.class),
        getContainer: S || (u == null ? void 0 : u.value),
        prefixCls: o.value,
        wrapClassName: w,
        visible: b ?? y,
        onClose: d,
        focusTriggerAfterClose: C,
        transitionName: es(s.value, "zoom", t.transitionName),
        maskTransitionName: es(s.value, "fade", t.maskTransitionName),
        mousePosition: (g = T.mousePosition) !== null && g !== void 0 ? g : J2
      }), I(I({}, r), {
        footer: r.footer || p,
        closeIcon: () => M("span", {
          class: `${o.value}-close-x`
        }, [x || M(al, {
          class: `${o.value}-close-icon`
        }, null)])
      })));
    };
  }
}), ETe = () => {
  const t = ae(!1);
  return yt(() => {
    t.value = !0;
  }), t;
}, MTe = {
  type: {
    type: String
  },
  actionFn: Function,
  close: Function,
  autofocus: Boolean,
  prefixCls: String,
  buttonProps: $t(),
  emitEvent: Boolean,
  quitOnNullishReturnValue: Boolean
};
function b3(t) {
  return !!(t && t.then);
}
const _3 = te({
  compatConfig: {
    MODE: 3
  },
  name: "ActionButton",
  props: MTe,
  setup(t, e) {
    let {
      slots: n
    } = e;
    const r = ae(!1), i = ae(), a = ae(!1);
    let o;
    const s = ETe();
    it(() => {
      t.autofocus && (o = setTimeout(() => {
        var f, d;
        return (d = (f = Cs(i.value)) === null || f === void 0 ? void 0 : f.focus) === null || d === void 0 ? void 0 : d.call(f);
      }));
    }), yt(() => {
      clearTimeout(o);
    });
    const l = function() {
      for (var f, d = arguments.length, h = new Array(d), p = 0; p < d; p++)
        h[p] = arguments[p];
      (f = t.close) === null || f === void 0 || f.call(t, ...h);
    }, u = (f) => {
      b3(f) && (a.value = !0, f.then(function() {
        s.value || (a.value = !1), l(...arguments), r.value = !1;
      }, (d) => (s.value || (a.value = !1), r.value = !1, Promise.reject(d))));
    }, c = (f) => {
      const {
        actionFn: d
      } = t;
      if (r.value)
        return;
      if (r.value = !0, !d) {
        l();
        return;
      }
      let h;
      if (t.emitEvent) {
        if (h = d(f), t.quitOnNullishReturnValue && !b3(h)) {
          r.value = !1, l(f);
          return;
        }
      } else if (d.length)
        h = d(t.close), r.value = !1;
      else if (h = d(), !h) {
        l();
        return;
      }
      u(h);
    };
    return () => {
      const {
        type: f,
        prefixCls: d,
        buttonProps: h
      } = t;
      return M(Ur, j(j(j({}, LU(f)), {}, {
        onClick: c,
        loading: a.value,
        prefixCls: d
      }, h), {}, {
        ref: i
      }), n);
    };
  }
});
function Kf(t) {
  return typeof t == "function" ? t() : t;
}
const vY = te({
  name: "ConfirmDialog",
  inheritAttrs: !1,
  props: ["icon", "onCancel", "onOk", "close", "closable", "zIndex", "afterClose", "visible", "open", "keyboard", "centered", "getContainer", "maskStyle", "okButtonProps", "cancelButtonProps", "okType", "prefixCls", "okCancel", "width", "mask", "maskClosable", "okText", "cancelText", "autoFocusButton", "transitionName", "maskTransitionName", "type", "title", "content", "direction", "rootPrefixCls", "bodyStyle", "closeIcon", "modalRender", "focusTriggerAfterClose", "wrapClassName", "confirmPrefixCls", "footer"],
  setup(t, e) {
    let {
      attrs: n
    } = e;
    const [r] = RS("Modal");
    return process.env.NODE_ENV !== "production" && Xr(t.visible === void 0, "Modal", "`visible` is deprecated, please use `open` instead."), () => {
      const {
        icon: i,
        onCancel: a,
        onOk: o,
        close: s,
        okText: l,
        closable: u = !1,
        zIndex: c,
        afterClose: f,
        keyboard: d,
        centered: h,
        getContainer: p,
        maskStyle: v,
        okButtonProps: g,
        cancelButtonProps: m,
        okCancel: y,
        width: b = 416,
        mask: _ = !0,
        maskClosable: O = !1,
        type: S,
        open: x,
        title: C,
        content: T,
        direction: w,
        closeIcon: P,
        modalRender: $,
        focusTriggerAfterClose: A,
        rootPrefixCls: D,
        bodyStyle: E,
        wrapClassName: R,
        footer: N
      } = t;
      let V = i;
      if (!i && i !== null)
        switch (S) {
          case "info":
            V = M(If, null, null);
            break;
          case "success":
            V = M(Ou, null, null);
            break;
          case "error":
            V = M(Da, null, null);
            break;
          default:
            V = M(Su, null, null);
        }
      const z = t.okType || "primary", W = t.prefixCls || "ant-modal", F = `${W}-confirm`, Q = n.style || {}, Z = y ?? S === "confirm", ne = t.autoFocusButton === null ? !1 : t.autoFocusButton || "ok", ee = `${W}-confirm`, oe = ye(ee, `${ee}-${t.type}`, {
        [`${ee}-rtl`]: w === "rtl"
      }, n.class), K = r.value, ie = Z && M(_3, {
        actionFn: a,
        close: s,
        autofocus: ne === "cancel",
        buttonProps: m,
        prefixCls: `${D}-btn`
      }, {
        default: () => [Kf(t.cancelText) || K.cancelText]
      });
      return M(Hi, {
        prefixCls: W,
        class: oe,
        wrapClassName: ye({
          [`${ee}-centered`]: !!h
        }, R),
        onCancel: (X) => s == null ? void 0 : s({
          triggerCancel: !0
        }, X),
        open: x,
        title: "",
        footer: "",
        transitionName: es(D, "zoom", t.transitionName),
        maskTransitionName: es(D, "fade", t.maskTransitionName),
        mask: _,
        maskClosable: O,
        maskStyle: v,
        style: Q,
        bodyStyle: E,
        width: b,
        zIndex: c,
        afterClose: f,
        keyboard: d,
        centered: h,
        getContainer: p,
        closable: u,
        closeIcon: P,
        modalRender: $,
        focusTriggerAfterClose: A
      }, {
        default: () => [M("div", {
          class: `${F}-body-wrapper`
        }, [M("div", {
          class: `${F}-body`
        }, [Kf(V), C === void 0 ? null : M("span", {
          class: `${F}-title`
        }, [Kf(C)]), M("div", {
          class: `${F}-content`
        }, [Kf(T)])]), N !== void 0 ? Kf(N) : M("div", {
          class: `${F}-btns`
        }, [ie, M(_3, {
          type: z,
          actionFn: o,
          close: s,
          autofocus: ne === "ok",
          buttonProps: g,
          prefixCls: `${D}-btn`
        }, {
          default: () => [Kf(l) || (Z ? K.okText : K.justOkText)]
        })])])]
      });
    };
  }
}), Dc = [], S0 = (t) => {
  const e = document.createDocumentFragment();
  let n = I(I({}, or(t, ["parentContext", "appContext"])), {
    close: a,
    open: !0
  }), r = null;
  function i() {
    r && (sf(null, e), r = null);
    for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
      c[f] = arguments[f];
    const d = c.some((h) => h && h.triggerCancel);
    t.onCancel && d && t.onCancel(() => {
    }, ...c.slice(1));
    for (let h = 0; h < Dc.length; h++)
      if (Dc[h] === a) {
        Dc.splice(h, 1);
        break;
      }
  }
  function a() {
    for (var u = arguments.length, c = new Array(u), f = 0; f < u; f++)
      c[f] = arguments[f];
    n = I(I({}, n), {
      open: !1,
      afterClose: () => {
        typeof t.afterClose == "function" && t.afterClose(), i.apply(this, c);
      }
    }), n.visible && delete n.visible, o(n);
  }
  function o(u) {
    typeof u == "function" ? n = u(n) : n = I(I({}, n), u), r && Lde(r, n, e);
  }
  const s = (u) => {
    const c = hr, f = c.prefixCls, d = u.prefixCls || `${f}-modal`, h = c.iconPrefixCls, p = Uxe();
    return M(Xd, j(j({}, c), {}, {
      prefixCls: f
    }), {
      default: () => [M(vY, j(j({}, u), {}, {
        rootPrefixCls: f,
        prefixCls: d,
        iconPrefixCls: h,
        locale: p,
        cancelText: u.cancelText || p.cancelText
      }), null)]
    });
  };
  function l(u) {
    const c = M(s, I({}, u));
    return c.appContext = t.parentContext || t.appContext || c.appContext, sf(c, e), c;
  }
  return r = l(n), Dc.push(a), {
    destroy: a,
    update: o
  };
};
function gY(t) {
  return I(I({}, t), {
    type: "warning"
  });
}
function mY(t) {
  return I(I({}, t), {
    type: "info"
  });
}
function yY(t) {
  return I(I({}, t), {
    type: "success"
  });
}
function bY(t) {
  return I(I({}, t), {
    type: "error"
  });
}
function _Y(t) {
  return I(I({}, t), {
    type: "confirm"
  });
}
const ITe = () => ({
  config: Object,
  afterClose: Function,
  destroyAction: Function,
  open: Boolean
}), DTe = te({
  name: "HookModal",
  inheritAttrs: !1,
  props: sr(ITe(), {
    config: {
      width: 520,
      okType: "primary"
    }
  }),
  setup(t, e) {
    let {
      expose: n
    } = e;
    var r;
    const i = L(() => t.open), a = L(() => t.config), {
      direction: o,
      getPrefixCls: s
    } = DS(), l = s("modal"), u = s(), c = () => {
      var p, v;
      t == null || t.afterClose(), (v = (p = a.value).afterClose) === null || v === void 0 || v.call(p);
    }, f = function() {
      t.destroyAction(...arguments);
    };
    n({
      destroy: f
    });
    const d = (r = a.value.okCancel) !== null && r !== void 0 ? r : a.value.type === "confirm", [h] = RS("Modal", zs.Modal);
    return () => M(vY, j(j({
      prefixCls: l,
      rootPrefixCls: u
    }, a.value), {}, {
      close: f,
      open: i.value,
      afterClose: c,
      okText: a.value.okText || (d ? h == null ? void 0 : h.value.okText : h == null ? void 0 : h.value.justOkText),
      direction: a.value.direction || o.value,
      cancelText: a.value.cancelText || (h == null ? void 0 : h.value.cancelText)
    }), null);
  }
});
let O3 = 0;
const RTe = te({
  name: "ElementsHolder",
  inheritAttrs: !1,
  setup(t, e) {
    let {
      expose: n
    } = e;
    const r = ae([]);
    return n({
      addModal: (a) => (r.value.push(a), r.value = r.value.slice(), () => {
        r.value = r.value.filter((o) => o !== a);
      })
    }), () => r.value.map((a) => a());
  }
});
function kTe() {
  const t = ae(null), e = ae([]);
  se(e, () => {
    e.value.length && ([...e.value].forEach((o) => {
      o();
    }), e.value = []);
  }, {
    immediate: !0
  });
  const n = (a) => function(s) {
    var l;
    O3 += 1;
    const u = ae(!0), c = ae(null), f = ae(B(s)), d = ae({});
    se(() => s, (b) => {
      g(I(I({}, tp(b) ? b.value : b), d.value));
    });
    const h = function() {
      u.value = !1;
      for (var b = arguments.length, _ = new Array(b), O = 0; O < b; O++)
        _[O] = arguments[O];
      const S = _.some((x) => x && x.triggerCancel);
      f.value.onCancel && S && f.value.onCancel(() => {
      }, ..._.slice(1));
    };
    let p;
    const v = () => M(DTe, {
      key: `modal-${O3}`,
      config: a(f.value),
      ref: c,
      open: u.value,
      destroyAction: h,
      afterClose: () => {
        p == null || p();
      }
    }, null);
    p = (l = t.value) === null || l === void 0 ? void 0 : l.addModal(v), p && Dc.push(p);
    const g = (b) => {
      f.value = I(I({}, f.value), b);
    };
    return {
      destroy: () => {
        c.value ? h() : e.value = [...e.value, h];
      },
      update: (b) => {
        d.value = b, c.value ? g(b) : e.value = [...e.value, () => g(b)];
      }
    };
  }, r = L(() => ({
    info: n(mY),
    success: n(yY),
    error: n(bY),
    warning: n(gY),
    confirm: n(_Y)
  })), i = Symbol("modalHolderKey");
  return [r.value, () => M(RTe, {
    key: i,
    ref: t
  }, null)];
}
function OY(t) {
  return S0(gY(t));
}
Hi.useModal = kTe;
Hi.info = function(e) {
  return S0(mY(e));
};
Hi.success = function(e) {
  return S0(yY(e));
};
Hi.error = function(e) {
  return S0(bY(e));
};
Hi.warning = OY;
Hi.warn = OY;
Hi.confirm = function(e) {
  return S0(_Y(e));
};
Hi.destroyAll = function() {
  for (; Dc.length; ) {
    const e = Dc.pop();
    e && e();
  }
};
Hi.install = function(t) {
  return t.component(Hi.name, Hi), t;
};
const $D = (t, e) => {
  let {
    attrs: n
  } = e;
  const {
    included: r,
    vertical: i,
    style: a,
    class: o
  } = n;
  let {
    length: s,
    offset: l,
    reverse: u
  } = n;
  s < 0 && (u = !u, s = Math.abs(s), l = 100 - l);
  const c = i ? {
    [u ? "top" : "bottom"]: `${l}%`,
    [u ? "bottom" : "top"]: "auto",
    height: `${s}%`
  } : {
    [u ? "right" : "left"]: `${l}%`,
    [u ? "left" : "right"]: "auto",
    width: `${s}%`
  }, f = I(I({}, a), c);
  return r ? M("div", {
    class: o,
    style: f
  }, null) : null;
};
$D.inheritAttrs = !1;
const LTe = (t, e, n, r, i, a) => {
  Xr(n ? r > 0 : !0, "Slider", "`Slider[step]` should be a positive number in order to make Slider[dots] work.");
  const o = Object.keys(e).map(parseFloat).sort((s, l) => s - l);
  if (n && r)
    for (let s = i; s <= a; s += r)
      o.indexOf(s) === -1 && o.push(s);
  return o;
}, SY = (t, e) => {
  let {
    attrs: n
  } = e;
  const {
    prefixCls: r,
    vertical: i,
    reverse: a,
    marks: o,
    dots: s,
    step: l,
    included: u,
    lowerBound: c,
    upperBound: f,
    max: d,
    min: h,
    dotStyle: p,
    activeDotStyle: v
  } = n, g = d - h, m = LTe(i, o, s, l, h, d).map((y) => {
    const b = `${Math.abs(y - h) / g * 100}%`, _ = !u && y === f || u && y <= f && y >= c;
    let O = i ? I(I({}, p), {
      [a ? "top" : "bottom"]: b
    }) : I(I({}, p), {
      [a ? "right" : "left"]: b
    });
    _ && (O = I(I({}, O), v));
    const S = ye({
      [`${r}-dot`]: !0,
      [`${r}-dot-active`]: _,
      [`${r}-dot-reverse`]: a
    });
    return M("span", {
      class: S,
      style: O,
      key: y
    }, null);
  });
  return M("div", {
    class: `${r}-step`
  }, [m]);
};
SY.inheritAttrs = !1;
const xY = (t, e) => {
  let {
    attrs: n,
    slots: r
  } = e;
  const {
    class: i,
    vertical: a,
    reverse: o,
    marks: s,
    included: l,
    upperBound: u,
    lowerBound: c,
    max: f,
    min: d,
    onClickLabel: h
  } = n, p = Object.keys(s), v = r.mark, g = f - d, m = p.map(parseFloat).sort((y, b) => y - b).map((y) => {
    const b = typeof s[y] == "function" ? s[y]() : s[y], _ = typeof b == "object" && !Ui(b);
    let O = _ ? b.label : b;
    if (!O && O !== 0)
      return null;
    v && (O = v({
      point: y,
      label: O
    }));
    const S = !l && y === u || l && y <= u && y >= c, x = ye({
      [`${i}-text`]: !0,
      [`${i}-text-active`]: S
    }), C = {
      marginBottom: "-50%",
      [o ? "top" : "bottom"]: `${(y - d) / g * 100}%`
    }, T = {
      transform: `translateX(${o ? "50%" : "-50%"})`,
      msTransform: `translateX(${o ? "50%" : "-50%"})`,
      [o ? "right" : "left"]: `${(y - d) / g * 100}%`
    }, w = a ? C : T, P = _ ? I(I({}, w), b.style) : w, $ = {
      [pr ? "onTouchstartPassive" : "onTouchstart"]: (A) => h(A, y)
    };
    return M("span", j({
      class: x,
      style: P,
      key: y,
      onMousedown: (A) => h(A, y)
    }, $), [O]);
  });
  return M("div", {
    class: i
  }, [m]);
};
xY.inheritAttrs = !1;
const wY = te({
  compatConfig: {
    MODE: 3
  },
  name: "Handle",
  inheritAttrs: !1,
  props: {
    prefixCls: String,
    vertical: {
      type: Boolean,
      default: void 0
    },
    offset: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    value: Number,
    tabindex: Y.oneOfType([Y.number, Y.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    ariaLabel: String,
    ariaLabelledBy: String,
    ariaValueTextFormatter: Function,
    onMouseenter: {
      type: Function
    },
    onMouseleave: {
      type: Function
    },
    onMousedown: {
      type: Function
    }
  },
  setup(t, e) {
    let {
      attrs: n,
      emit: r,
      expose: i
    } = e;
    const a = ae(!1), o = ae(), s = () => {
      document.activeElement === o.value && (a.value = !0);
    }, l = (g) => {
      a.value = !1, r("blur", g);
    }, u = () => {
      a.value = !1;
    }, c = () => {
      var g;
      (g = o.value) === null || g === void 0 || g.focus();
    }, f = () => {
      var g;
      (g = o.value) === null || g === void 0 || g.blur();
    }, d = () => {
      a.value = !0, c();
    }, h = (g) => {
      g.preventDefault(), c(), r("mousedown", g);
    };
    i({
      focus: c,
      blur: f,
      clickFocus: d,
      ref: o
    });
    let p = null;
    it(() => {
      p = vr(document, "mouseup", s);
    }), yt(() => {
      p == null || p.remove();
    });
    const v = L(() => {
      const {
        vertical: g,
        offset: m,
        reverse: y
      } = t;
      return g ? {
        [y ? "top" : "bottom"]: `${m}%`,
        [y ? "bottom" : "top"]: "auto",
        transform: y ? null : "translateY(+50%)"
      } : {
        [y ? "right" : "left"]: `${m}%`,
        [y ? "left" : "right"]: "auto",
        transform: `translateX(${y ? "+" : "-"}50%)`
      };
    });
    return () => {
      const {
        prefixCls: g,
        disabled: m,
        min: y,
        max: b,
        value: _,
        tabindex: O,
        ariaLabel: S,
        ariaLabelledBy: x,
        ariaValueTextFormatter: C,
        onMouseenter: T,
        onMouseleave: w
      } = t, P = ye(n.class, {
        [`${g}-handle-click-focused`]: a.value
      }), $ = {
        "aria-valuemin": y,
        "aria-valuemax": b,
        "aria-valuenow": _,
        "aria-disabled": !!m
      }, A = [n.style, v.value];
      let D = O || 0;
      (m || O === null) && (D = null);
      let E;
      C && (E = C(_));
      const R = I(I(I(I({}, n), {
        role: "slider",
        tabindex: D
      }), $), {
        class: P,
        onBlur: l,
        onKeydown: u,
        onMousedown: h,
        onMouseenter: T,
        onMouseleave: w,
        ref: o,
        style: A
      });
      return M("div", j(j({}, R), {}, {
        "aria-label": S,
        "aria-labelledby": x,
        "aria-valuetext": E
      }), null);
    };
  }
});
function RC(t, e) {
  try {
    return Object.keys(e).some((n) => t.target === e[n].ref);
  } catch {
    return !1;
  }
}
function CY(t, e) {
  let {
    min: n,
    max: r
  } = e;
  return t < n || t > r;
}
function S3(t) {
  return t.touches.length > 1 || t.type.toLowerCase() === "touchend" && t.touches.length > 0;
}
function x3(t, e) {
  let {
    marks: n,
    step: r,
    min: i,
    max: a
  } = e;
  const o = Object.keys(n).map(parseFloat);
  if (r !== null) {
    const l = Math.pow(10, TY(r)), u = Math.floor((a * l - i * l) / (r * l)), c = Math.min((t - i) / r, u), f = Math.round(c) * r + i;
    o.push(f);
  }
  const s = o.map((l) => Math.abs(t - l));
  return o[s.indexOf(Math.min(...s))];
}
function TY(t) {
  const e = t.toString();
  let n = 0;
  return e.indexOf(".") >= 0 && (n = e.length - e.indexOf(".") - 1), n;
}
function w3(t, e) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.clientY : e.pageX) / n;
}
function C3(t, e) {
  let n = 1;
  return window.visualViewport && (n = +(window.visualViewport.width / document.body.getBoundingClientRect().width).toFixed(2)), (t ? e.touches[0].clientY : e.touches[0].pageX) / n;
}
function T3(t, e) {
  const n = e.getBoundingClientRect();
  return t ? n.top + n.height * 0.5 : window.scrollX + n.left + n.width * 0.5;
}
function AD(t, e) {
  let {
    max: n,
    min: r
  } = e;
  return t <= r ? r : t >= n ? n : t;
}
function PY(t, e) {
  const {
    step: n
  } = e, r = isFinite(x3(t, e)) ? x3(t, e) : 0;
  return n === null ? r : parseFloat(r.toFixed(TY(n)));
}
function Eh(t) {
  t.stopPropagation(), t.preventDefault();
}
function NTe(t, e, n) {
  const r = {
    increase: (o, s) => o + s,
    decrease: (o, s) => o - s
  }, i = r[t](Object.keys(n.marks).indexOf(JSON.stringify(e)), 1), a = Object.keys(n.marks)[i];
  return n.step ? r[t](e, n.step) : Object.keys(n.marks).length && n.marks[a] ? n.marks[a] : e;
}
function $Y(t, e, n) {
  const r = "increase", i = "decrease";
  let a = r;
  switch (t.keyCode) {
    case ge.UP:
      a = e && n ? i : r;
      break;
    case ge.RIGHT:
      a = !e && n ? i : r;
      break;
    case ge.DOWN:
      a = e && n ? r : i;
      break;
    case ge.LEFT:
      a = !e && n ? r : i;
      break;
    case ge.END:
      return (o, s) => s.max;
    case ge.HOME:
      return (o, s) => s.min;
    case ge.PAGE_UP:
      return (o, s) => o + s.step * 2;
    case ge.PAGE_DOWN:
      return (o, s) => o - s.step * 2;
    default:
      return;
  }
  return (o, s) => NTe(a, o, s);
}
var BTe = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
function Lu() {
}
function AY(t) {
  const e = {
    id: String,
    min: Number,
    max: Number,
    step: Number,
    marks: Y.object,
    included: {
      type: Boolean,
      default: void 0
    },
    prefixCls: String,
    disabled: {
      type: Boolean,
      default: void 0
    },
    handle: Function,
    dots: {
      type: Boolean,
      default: void 0
    },
    vertical: {
      type: Boolean,
      default: void 0
    },
    reverse: {
      type: Boolean,
      default: void 0
    },
    minimumTrackStyle: Y.object,
    maximumTrackStyle: Y.object,
    handleStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
    trackStyle: Y.oneOfType([Y.object, Y.arrayOf(Y.object)]),
    railStyle: Y.object,
    dotStyle: Y.object,
    activeDotStyle: Y.object,
    autofocus: {
      type: Boolean,
      default: void 0
    },
    draggableTrack: {
      type: Boolean,
      default: void 0
    }
  };
  return te({
    compatConfig: {
      MODE: 3
    },
    name: "CreateSlider",
    mixins: [qS, t],
    inheritAttrs: !1,
    props: sr(e, {
      prefixCls: "rc-slider",
      min: 0,
      max: 100,
      step: 1,
      marks: {},
      included: !0,
      disabled: !1,
      dots: !1,
      vertical: !1,
      reverse: !1,
      trackStyle: [{}],
      handleStyle: [{}],
      railStyle: {},
      dotStyle: {},
      activeDotStyle: {}
    }),
    emits: ["change", "blur", "focus"],
    data() {
      const {
        step: n,
        max: r,
        min: i
      } = this, a = isFinite(r - i) ? (r - i) % n === 0 : !0;
      return Xr(n && Math.floor(n) === n ? a : !0, `Slider[max] - Slider[min] (${r - i}) should be a multiple of Slider[step] (${n})`), this.handlesRefs = {}, {};
    },
    mounted() {
      this.$nextTick(() => {
        this.document = this.sliderRef && this.sliderRef.ownerDocument;
        const {
          autofocus: n,
          disabled: r
        } = this;
        n && !r && this.focus();
      });
    },
    beforeUnmount() {
      this.$nextTick(() => {
        this.removeDocumentEvents();
      });
    },
    methods: {
      defaultHandle(n) {
        var {
          index: r,
          directives: i,
          className: a,
          style: o
        } = n, s = BTe(n, ["index", "directives", "className", "style"]);
        if (delete s.dragging, s.value === null)
          return null;
        const l = I(I({}, s), {
          class: a,
          style: o,
          key: r
        });
        return M(wY, l, null);
      },
      onDown(n, r) {
        let i = r;
        const {
          draggableTrack: a,
          vertical: o
        } = this.$props, {
          bounds: s
        } = this.$data, l = a && this.positionGetValue ? this.positionGetValue(i) || [] : [], u = RC(n, this.handlesRefs);
        if (this.dragTrack = a && s.length >= 2 && !u && !l.map((c, f) => {
          const d = f ? !0 : c >= s[f];
          return f === l.length - 1 ? c <= s[f] : d;
        }).some((c) => !c), this.dragTrack)
          this.dragOffset = i, this.startBounds = [...s];
        else {
          if (!u)
            this.dragOffset = 0;
          else {
            const c = T3(o, n.target);
            this.dragOffset = i - c, i = c;
          }
          this.onStart(i);
        }
      },
      onMouseDown(n) {
        if (n.button !== 0)
          return;
        this.removeDocumentEvents();
        const r = this.$props.vertical, i = w3(r, n);
        this.onDown(n, i), this.addDocumentMouseEvents();
      },
      onTouchStart(n) {
        if (S3(n)) return;
        const r = this.vertical, i = C3(r, n);
        this.onDown(n, i), this.addDocumentTouchEvents(), Eh(n);
      },
      onFocus(n) {
        const {
          vertical: r
        } = this;
        if (RC(n, this.handlesRefs) && !this.dragTrack) {
          const i = T3(r, n.target);
          this.dragOffset = 0, this.onStart(i), Eh(n), this.$emit("focus", n);
        }
      },
      onBlur(n) {
        this.dragTrack || this.onEnd(), this.$emit("blur", n);
      },
      onMouseUp() {
        this.handlesRefs[this.prevMovedHandleIndex] && this.handlesRefs[this.prevMovedHandleIndex].clickFocus();
      },
      onMouseMove(n) {
        if (!this.sliderRef) {
          this.onEnd();
          return;
        }
        const r = w3(this.vertical, n);
        this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onTouchMove(n) {
        if (S3(n) || !this.sliderRef) {
          this.onEnd();
          return;
        }
        const r = C3(this.vertical, n);
        this.onMove(n, r - this.dragOffset, this.dragTrack, this.startBounds);
      },
      onKeyDown(n) {
        this.sliderRef && RC(n, this.handlesRefs) && this.onKeyboard(n);
      },
      onClickMarkLabel(n, r) {
        n.stopPropagation(), this.onChange({
          sValue: r
        }), this.setState({
          sValue: r
        }, () => this.onEnd(!0));
      },
      getSliderStart() {
        const n = this.sliderRef, {
          vertical: r,
          reverse: i
        } = this, a = n.getBoundingClientRect();
        return r ? i ? a.bottom : a.top : window.scrollX + (i ? a.right : a.left);
      },
      getSliderLength() {
        const n = this.sliderRef;
        if (!n)
          return 0;
        const r = n.getBoundingClientRect();
        return this.vertical ? r.height : r.width;
      },
      addDocumentTouchEvents() {
        this.onTouchMoveListener = vr(this.document, "touchmove", this.onTouchMove), this.onTouchUpListener = vr(this.document, "touchend", this.onEnd);
      },
      addDocumentMouseEvents() {
        this.onMouseMoveListener = vr(this.document, "mousemove", this.onMouseMove), this.onMouseUpListener = vr(this.document, "mouseup", this.onEnd);
      },
      removeDocumentEvents() {
        this.onTouchMoveListener && this.onTouchMoveListener.remove(), this.onTouchUpListener && this.onTouchUpListener.remove(), this.onMouseMoveListener && this.onMouseMoveListener.remove(), this.onMouseUpListener && this.onMouseUpListener.remove();
      },
      focus() {
        var n;
        this.$props.disabled || (n = this.handlesRefs[0]) === null || n === void 0 || n.focus();
      },
      blur() {
        this.$props.disabled || Object.keys(this.handlesRefs).forEach((n) => {
          var r, i;
          (i = (r = this.handlesRefs[n]) === null || r === void 0 ? void 0 : r.blur) === null || i === void 0 || i.call(r);
        });
      },
      calcValue(n) {
        const {
          vertical: r,
          min: i,
          max: a
        } = this, o = Math.abs(Math.max(n, 0) / this.getSliderLength());
        return r ? (1 - o) * (a - i) + i : o * (a - i) + i;
      },
      calcValueByPos(n) {
        const i = (this.reverse ? -1 : 1) * (n - this.getSliderStart());
        return this.trimAlignValue(this.calcValue(i));
      },
      calcOffset(n) {
        const {
          min: r,
          max: i
        } = this, a = (n - r) / (i - r);
        return Math.max(0, a * 100);
      },
      saveSlider(n) {
        this.sliderRef = n;
      },
      saveHandle(n, r) {
        this.handlesRefs[n] = r;
      }
    },
    render() {
      const {
        prefixCls: n,
        marks: r,
        dots: i,
        step: a,
        included: o,
        disabled: s,
        vertical: l,
        reverse: u,
        min: c,
        max: f,
        maximumTrackStyle: d,
        railStyle: h,
        dotStyle: p,
        activeDotStyle: v,
        id: g
      } = this, {
        class: m,
        style: y
      } = this.$attrs, {
        tracks: b,
        handles: _
      } = this.renderSlider(), O = ye(n, m, {
        [`${n}-with-marks`]: Object.keys(r).length,
        [`${n}-disabled`]: s,
        [`${n}-vertical`]: l,
        [`${n}-horizontal`]: !l
      }), S = {
        vertical: l,
        marks: r,
        included: o,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: f,
        min: c,
        reverse: u,
        class: `${n}-mark`,
        onClickLabel: s ? Lu : this.onClickMarkLabel
      }, x = {
        [pr ? "onTouchstartPassive" : "onTouchstart"]: s ? Lu : this.onTouchStart
      };
      return M("div", j(j({
        id: g,
        ref: this.saveSlider,
        tabindex: "-1",
        class: O
      }, x), {}, {
        onMousedown: s ? Lu : this.onMouseDown,
        onMouseup: s ? Lu : this.onMouseUp,
        onKeydown: s ? Lu : this.onKeyDown,
        onFocus: s ? Lu : this.onFocus,
        onBlur: s ? Lu : this.onBlur,
        style: y
      }), [M("div", {
        class: `${n}-rail`,
        style: I(I({}, d), h)
      }, null), b, M(SY, {
        prefixCls: n,
        vertical: l,
        reverse: u,
        marks: r,
        dots: i,
        step: a,
        included: o,
        lowerBound: this.getLowerBound(),
        upperBound: this.getUpperBound(),
        max: f,
        min: c,
        dotStyle: p,
        activeDotStyle: v
      }, null), _, M(xY, S, {
        mark: this.$slots.mark
      }), rj(this)]);
    }
  });
}
const zTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "Slider",
  mixins: [qS],
  inheritAttrs: !1,
  props: {
    defaultValue: Number,
    value: Number,
    disabled: {
      type: Boolean,
      default: void 0
    },
    autofocus: {
      type: Boolean,
      default: void 0
    },
    tabindex: Y.oneOfType([Y.number, Y.string]),
    reverse: {
      type: Boolean,
      default: void 0
    },
    min: Number,
    max: Number,
    ariaLabelForHandle: String,
    ariaLabelledByForHandle: String,
    ariaValueTextFormatterForHandle: String,
    startPoint: Number
  },
  emits: ["beforeChange", "afterChange", "change"],
  data() {
    const t = this.defaultValue !== void 0 ? this.defaultValue : this.min, e = this.value !== void 0 ? this.value : t;
    return {
      sValue: this.trimAlignValue(e),
      dragging: !1
    };
  },
  watch: {
    value: {
      handler(t) {
        this.setChangeValue(t);
      },
      deep: !0
    },
    min() {
      const {
        sValue: t
      } = this;
      this.setChangeValue(t);
    },
    max() {
      const {
        sValue: t
      } = this;
      this.setChangeValue(t);
    }
  },
  methods: {
    setChangeValue(t) {
      const e = t !== void 0 ? t : this.sValue, n = this.trimAlignValue(e, this.$props);
      n !== this.sValue && (this.setState({
        sValue: n
      }), CY(e, this.$props) && this.$emit("change", n));
    },
    onChange(t) {
      const e = !v1(this, "value"), n = t.sValue > this.max ? I(I({}, t), {
        sValue: this.max
      }) : t;
      e && this.setState(n);
      const r = n.sValue;
      this.$emit("change", r);
    },
    onStart(t) {
      this.setState({
        dragging: !0
      });
      const {
        sValue: e
      } = this;
      this.$emit("beforeChange", e);
      const n = this.calcValueByPos(t);
      this.startValue = n, this.startPosition = t, n !== e && (this.prevMovedHandleIndex = 0, this.onChange({
        sValue: n
      }));
    },
    onEnd(t) {
      const {
        dragging: e
      } = this;
      this.removeDocumentEvents(), (e || t) && this.$emit("afterChange", this.sValue), this.setState({
        dragging: !1
      });
    },
    onMove(t, e) {
      Eh(t);
      const {
        sValue: n
      } = this, r = this.calcValueByPos(e);
      r !== n && this.onChange({
        sValue: r
      });
    },
    onKeyboard(t) {
      const {
        reverse: e,
        vertical: n
      } = this.$props, r = $Y(t, n, e);
      if (r) {
        Eh(t);
        const {
          sValue: i
        } = this, a = r(i, this.$props), o = this.trimAlignValue(a);
        if (o === i) return;
        this.onChange({
          sValue: o
        }), this.$emit("afterChange", o), this.onEnd();
      }
    },
    getLowerBound() {
      const t = this.$props.startPoint || this.$props.min;
      return this.$data.sValue > t ? t : this.$data.sValue;
    },
    getUpperBound() {
      return this.$data.sValue < this.$props.startPoint ? this.$props.startPoint : this.$data.sValue;
    },
    trimAlignValue(t) {
      let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (t === null)
        return null;
      const n = I(I({}, this.$props), e), r = AD(t, n);
      return PY(r, n);
    },
    getTrack(t) {
      let {
        prefixCls: e,
        reverse: n,
        vertical: r,
        included: i,
        minimumTrackStyle: a,
        mergedTrackStyle: o,
        length: s,
        offset: l
      } = t;
      return M($D, {
        class: `${e}-track`,
        vertical: r,
        included: i,
        offset: l,
        reverse: n,
        length: s,
        style: I(I({}, a), o)
      }, null);
    },
    renderSlider() {
      const {
        prefixCls: t,
        vertical: e,
        included: n,
        disabled: r,
        minimumTrackStyle: i,
        trackStyle: a,
        handleStyle: o,
        tabindex: s,
        ariaLabelForHandle: l,
        ariaLabelledByForHandle: u,
        ariaValueTextFormatterForHandle: c,
        min: f,
        max: d,
        startPoint: h,
        reverse: p,
        handle: v,
        defaultHandle: g
      } = this, m = v || g, {
        sValue: y,
        dragging: b
      } = this, _ = this.calcOffset(y), O = m({
        class: `${t}-handle`,
        prefixCls: t,
        vertical: e,
        offset: _,
        value: y,
        dragging: b,
        disabled: r,
        min: f,
        max: d,
        reverse: p,
        index: 0,
        tabindex: s,
        ariaLabel: l,
        ariaLabelledBy: u,
        ariaValueTextFormatter: c,
        style: o[0] || o,
        ref: (C) => this.saveHandle(0, C),
        onFocus: this.onFocus,
        onBlur: this.onBlur
      }), S = h !== void 0 ? this.calcOffset(h) : 0, x = a[0] || a;
      return {
        tracks: this.getTrack({
          prefixCls: t,
          reverse: p,
          vertical: e,
          included: n,
          offset: S,
          minimumTrackStyle: i,
          mergedTrackStyle: x,
          length: _ - S
        }),
        handles: O
      };
    }
  }
}), VTe = AY(zTe), Up = (t) => {
  let {
    value: e,
    handle: n,
    bounds: r,
    props: i
  } = t;
  const {
    allowCross: a,
    pushable: o
  } = i, s = Number(o), l = AD(e, i);
  let u = l;
  return !a && n != null && r !== void 0 && (n > 0 && l <= r[n - 1] + s && (u = r[n - 1] + s), n < r.length - 1 && l >= r[n + 1] - s && (u = r[n + 1] - s)), PY(u, i);
}, FTe = {
  defaultValue: Y.arrayOf(Y.number),
  value: Y.arrayOf(Y.number),
  count: Number,
  pushable: qfe(Y.oneOfType([Y.looseBool, Y.number])),
  allowCross: {
    type: Boolean,
    default: void 0
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  reverse: {
    type: Boolean,
    default: void 0
  },
  tabindex: Y.arrayOf(Y.number),
  prefixCls: String,
  min: Number,
  max: Number,
  autofocus: {
    type: Boolean,
    default: void 0
  },
  ariaLabelGroupForHandles: Array,
  ariaLabelledByGroupForHandles: Array,
  ariaValueTextFormatterGroupForHandles: Array,
  draggableTrack: {
    type: Boolean,
    default: void 0
  }
}, WTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "Range",
  mixins: [qS],
  inheritAttrs: !1,
  props: sr(FTe, {
    count: 1,
    allowCross: !0,
    pushable: !1,
    tabindex: [],
    draggableTrack: !1,
    ariaLabelGroupForHandles: [],
    ariaLabelledByGroupForHandles: [],
    ariaValueTextFormatterGroupForHandles: []
  }),
  emits: ["beforeChange", "afterChange", "change"],
  displayName: "Range",
  data() {
    const {
      count: t,
      min: e,
      max: n
    } = this, r = Array(...Array(t + 1)).map(() => e), i = v1(this, "defaultValue") ? this.defaultValue : r;
    let {
      value: a
    } = this;
    a === void 0 && (a = i);
    const o = a.map((l, u) => Up({
      value: l,
      handle: u,
      props: this.$props
    }));
    return {
      sHandle: null,
      recent: o[0] === n ? 0 : o.length - 1,
      bounds: o
    };
  },
  watch: {
    value: {
      handler(t) {
        const {
          bounds: e
        } = this;
        this.setChangeValue(t || e);
      },
      deep: !0
    },
    min() {
      const {
        value: t
      } = this;
      this.setChangeValue(t || this.bounds);
    },
    max() {
      const {
        value: t
      } = this;
      this.setChangeValue(t || this.bounds);
    }
  },
  methods: {
    setChangeValue(t) {
      const {
        bounds: e
      } = this;
      let n = t.map((r, i) => Up({
        value: r,
        handle: i,
        bounds: e,
        props: this.$props
      }));
      if (e.length === n.length) {
        if (n.every((r, i) => r === e[i]))
          return null;
      } else
        n = t.map((r, i) => Up({
          value: r,
          handle: i,
          props: this.$props
        }));
      if (this.setState({
        bounds: n
      }), t.some((r) => CY(r, this.$props))) {
        const r = t.map((i) => AD(i, this.$props));
        this.$emit("change", r);
      }
    },
    onChange(t) {
      if (!v1(this, "value"))
        this.setState(t);
      else {
        const i = {};
        ["sHandle", "recent"].forEach((a) => {
          t[a] !== void 0 && (i[a] = t[a]);
        }), Object.keys(i).length && this.setState(i);
      }
      const r = I(I({}, this.$data), t).bounds;
      this.$emit("change", r);
    },
    positionGetValue(t) {
      const e = this.getValue(), n = this.calcValueByPos(t), r = this.getClosestBound(n), i = this.getBoundNeedMoving(n, r), a = e[i];
      if (n === a) return null;
      const o = [...e];
      return o[i] = n, o;
    },
    onStart(t) {
      const {
        bounds: e
      } = this;
      this.$emit("beforeChange", e);
      const n = this.calcValueByPos(t);
      this.startValue = n, this.startPosition = t;
      const r = this.getClosestBound(n);
      this.prevMovedHandleIndex = this.getBoundNeedMoving(n, r), this.setState({
        sHandle: this.prevMovedHandleIndex,
        recent: this.prevMovedHandleIndex
      });
      const i = e[this.prevMovedHandleIndex];
      if (n === i) return;
      const a = [...e];
      a[this.prevMovedHandleIndex] = n, this.onChange({
        bounds: a
      });
    },
    onEnd(t) {
      const {
        sHandle: e
      } = this;
      this.removeDocumentEvents(), e || (this.dragTrack = !1), (e !== null || t) && this.$emit("afterChange", this.bounds), this.setState({
        sHandle: null
      });
    },
    onMove(t, e, n, r) {
      Eh(t);
      const {
        $data: i,
        $props: a
      } = this, o = a.max || 100, s = a.min || 0;
      if (n) {
        let d = a.vertical ? -e : e;
        d = a.reverse ? -d : d;
        const h = o - Math.max(...r), p = s - Math.min(...r), v = Math.min(Math.max(d / (this.getSliderLength() / 100), p), h), g = r.map((m) => Math.floor(Math.max(Math.min(m + v, o), s)));
        i.bounds.map((m, y) => m === g[y]).some((m) => !m) && this.onChange({
          bounds: g
        });
        return;
      }
      const {
        bounds: l,
        sHandle: u
      } = this, c = this.calcValueByPos(e), f = l[u];
      c !== f && this.moveTo(c);
    },
    onKeyboard(t) {
      const {
        reverse: e,
        vertical: n
      } = this.$props, r = $Y(t, n, e);
      if (r) {
        Eh(t);
        const {
          bounds: i,
          sHandle: a
        } = this, o = i[a === null ? this.recent : a], s = r(o, this.$props), l = Up({
          value: s,
          handle: a,
          bounds: i,
          props: this.$props
        });
        if (l === o) return;
        this.moveTo(l, !0);
      }
    },
    getClosestBound(t) {
      const {
        bounds: e
      } = this;
      let n = 0;
      for (let r = 1; r < e.length - 1; r += 1)
        t >= e[r] && (n = r);
      return Math.abs(e[n + 1] - t) < Math.abs(e[n] - t) && (n += 1), n;
    },
    getBoundNeedMoving(t, e) {
      const {
        bounds: n,
        recent: r
      } = this;
      let i = e;
      const a = n[e + 1] === n[e];
      return a && n[r] === n[e] && (i = r), a && t !== n[e + 1] && (i = t < n[e + 1] ? e : e + 1), i;
    },
    getLowerBound() {
      return this.bounds[0];
    },
    getUpperBound() {
      const {
        bounds: t
      } = this;
      return t[t.length - 1];
    },
    /**
     * Returns an array of possible slider points, taking into account both
     * `marks` and `step`. The result is cached.
     */
    getPoints() {
      const {
        marks: t,
        step: e,
        min: n,
        max: r
      } = this, i = this.internalPointsCache;
      if (!i || i.marks !== t || i.step !== e) {
        const a = I({}, t);
        if (e !== null)
          for (let s = n; s <= r; s += e)
            a[s] = s;
        const o = Object.keys(a).map(parseFloat);
        o.sort((s, l) => s - l), this.internalPointsCache = {
          marks: t,
          step: e,
          points: o
        };
      }
      return this.internalPointsCache.points;
    },
    moveTo(t, e) {
      const n = [...this.bounds], {
        sHandle: r,
        recent: i
      } = this, a = r === null ? i : r;
      n[a] = t;
      let o = a;
      this.$props.pushable !== !1 ? this.pushSurroundingHandles(n, o) : this.$props.allowCross && (n.sort((s, l) => s - l), o = n.indexOf(t)), this.onChange({
        recent: o,
        sHandle: o,
        bounds: n
      }), e && (this.$emit("afterChange", n), this.setState({}, () => {
        this.handlesRefs[o].focus();
      }), this.onEnd());
    },
    pushSurroundingHandles(t, e) {
      const n = t[e], {
        pushable: r
      } = this, i = Number(r);
      let a = 0;
      if (t[e + 1] - n < i && (a = 1), n - t[e - 1] < i && (a = -1), a === 0)
        return;
      const o = e + a, s = a * (t[o] - n);
      this.pushHandle(t, o, a, i - s) || (t[e] = t[o] - a * i);
    },
    pushHandle(t, e, n, r) {
      const i = t[e];
      let a = t[e];
      for (; n * (a - i) < r; ) {
        if (!this.pushHandleOnePoint(t, e, n))
          return t[e] = i, !1;
        a = t[e];
      }
      return !0;
    },
    pushHandleOnePoint(t, e, n) {
      const r = this.getPoints(), a = r.indexOf(t[e]) + n;
      if (a >= r.length || a < 0)
        return !1;
      const o = e + n, s = r[a], {
        pushable: l
      } = this, u = Number(l), c = n * (t[o] - s);
      return this.pushHandle(t, o, n, u - c) ? (t[e] = s, !0) : !1;
    },
    trimAlignValue(t) {
      const {
        sHandle: e,
        bounds: n
      } = this;
      return Up({
        value: t,
        handle: e,
        bounds: n,
        props: this.$props
      });
    },
    ensureValueNotConflict(t, e, n) {
      let {
        allowCross: r,
        pushable: i
      } = n;
      const a = this.$data || {}, {
        bounds: o
      } = a;
      if (t = t === void 0 ? a.sHandle : t, i = Number(i), !r && t != null && o !== void 0) {
        if (t > 0 && e <= o[t - 1] + i)
          return o[t - 1] + i;
        if (t < o.length - 1 && e >= o[t + 1] - i)
          return o[t + 1] - i;
      }
      return e;
    },
    getTrack(t) {
      let {
        bounds: e,
        prefixCls: n,
        reverse: r,
        vertical: i,
        included: a,
        offsets: o,
        trackStyle: s
      } = t;
      return e.slice(0, -1).map((l, u) => {
        const c = u + 1, f = ye({
          [`${n}-track`]: !0,
          [`${n}-track-${c}`]: !0
        });
        return M($D, {
          class: f,
          vertical: i,
          reverse: r,
          included: a,
          offset: o[c - 1],
          length: o[c] - o[c - 1],
          style: s[u],
          key: c
        }, null);
      });
    },
    renderSlider() {
      const {
        sHandle: t,
        bounds: e,
        prefixCls: n,
        vertical: r,
        included: i,
        disabled: a,
        min: o,
        max: s,
        reverse: l,
        handle: u,
        defaultHandle: c,
        trackStyle: f,
        handleStyle: d,
        tabindex: h,
        ariaLabelGroupForHandles: p,
        ariaLabelledByGroupForHandles: v,
        ariaValueTextFormatterGroupForHandles: g
      } = this, m = u || c, y = e.map((O) => this.calcOffset(O)), b = `${n}-handle`, _ = e.map((O, S) => {
        let x = h[S] || 0;
        (a || h[S] === null) && (x = null);
        const C = t === S;
        return m({
          class: ye({
            [b]: !0,
            [`${b}-${S + 1}`]: !0,
            [`${b}-dragging`]: C
          }),
          prefixCls: n,
          vertical: r,
          dragging: C,
          offset: y[S],
          value: O,
          index: S,
          tabindex: x,
          min: o,
          max: s,
          reverse: l,
          disabled: a,
          style: d[S],
          ref: (T) => this.saveHandle(S, T),
          onFocus: this.onFocus,
          onBlur: this.onBlur,
          ariaLabel: p[S],
          ariaLabelledBy: v[S],
          ariaValueTextFormatter: g[S]
        });
      });
      return {
        tracks: this.getTrack({
          bounds: e,
          prefixCls: n,
          reverse: l,
          vertical: r,
          included: i,
          offsets: y,
          trackStyle: f
        }),
        handles: _
      };
    }
  }
}), QTe = AY(WTe), HTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "SliderTooltip",
  inheritAttrs: !1,
  props: kU(),
  setup(t, e) {
    let {
      attrs: n,
      slots: r
    } = e;
    const i = U(null), a = U(null);
    function o() {
      xt.cancel(a.value), a.value = null;
    }
    function s() {
      a.value = xt(() => {
        var u;
        (u = i.value) === null || u === void 0 || u.forcePopupAlign(), a.value = null;
      });
    }
    const l = () => {
      o(), t.open && s();
    };
    return se([() => t.open, () => t.title], () => {
      l();
    }, {
      flush: "post",
      immediate: !0
    }), Fle(() => {
      l();
    }), yt(() => {
      o();
    }), () => M(dx, j(j({
      ref: i
    }, t), n), r);
  }
}), GTe = (t) => {
  const {
    componentCls: e,
    controlSize: n,
    dotSize: r,
    marginFull: i,
    marginPart: a,
    colorFillContentHover: o
  } = t;
  return {
    [e]: I(I({}, nn(t)), {
      position: "relative",
      height: n,
      margin: `${a}px ${i}px`,
      padding: 0,
      cursor: "pointer",
      touchAction: "none",
      "&-vertical": {
        margin: `${i}px ${a}px`
      },
      [`${e}-rail`]: {
        position: "absolute",
        backgroundColor: t.colorFillTertiary,
        borderRadius: t.borderRadiusXS,
        transition: `background-color ${t.motionDurationMid}`
      },
      [`${e}-track`]: {
        position: "absolute",
        backgroundColor: t.colorPrimaryBorder,
        borderRadius: t.borderRadiusXS,
        transition: `background-color ${t.motionDurationMid}`
      },
      "&:hover": {
        [`${e}-rail`]: {
          backgroundColor: t.colorFillSecondary
        },
        [`${e}-track`]: {
          backgroundColor: t.colorPrimaryBorderHover
        },
        [`${e}-dot`]: {
          borderColor: o
        },
        [`${e}-handle::after`]: {
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`
        },
        [`${e}-dot-active`]: {
          borderColor: t.colorPrimary
        }
      },
      [`${e}-handle`]: {
        position: "absolute",
        width: t.handleSize,
        height: t.handleSize,
        outline: "none",
        [`${e}-dragging`]: {
          zIndex: 1
        },
        // 扩大选区
        "&::before": {
          content: '""',
          position: "absolute",
          insetInlineStart: -t.handleLineWidth,
          insetBlockStart: -t.handleLineWidth,
          width: t.handleSize + t.handleLineWidth * 2,
          height: t.handleSize + t.handleLineWidth * 2,
          backgroundColor: "transparent"
        },
        "&::after": {
          content: '""',
          position: "absolute",
          insetBlockStart: 0,
          insetInlineStart: 0,
          width: t.handleSize,
          height: t.handleSize,
          backgroundColor: t.colorBgElevated,
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,
          borderRadius: "50%",
          cursor: "pointer",
          transition: `
            inset-inline-start ${t.motionDurationMid},
            inset-block-start ${t.motionDurationMid},
            width ${t.motionDurationMid},
            height ${t.motionDurationMid},
            box-shadow ${t.motionDurationMid}
          `
        },
        "&:hover, &:active, &:focus": {
          "&::before": {
            insetInlineStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
            insetBlockStart: -((t.handleSizeHover - t.handleSize) / 2 + t.handleLineWidthHover),
            width: t.handleSizeHover + t.handleLineWidthHover * 2,
            height: t.handleSizeHover + t.handleLineWidthHover * 2
          },
          "&::after": {
            boxShadow: `0 0 0 ${t.handleLineWidthHover}px ${t.colorPrimary}`,
            width: t.handleSizeHover,
            height: t.handleSizeHover,
            insetInlineStart: (t.handleSize - t.handleSizeHover) / 2,
            insetBlockStart: (t.handleSize - t.handleSizeHover) / 2
          }
        }
      },
      [`${e}-mark`]: {
        position: "absolute",
        fontSize: t.fontSize
      },
      [`${e}-mark-text`]: {
        position: "absolute",
        display: "inline-block",
        color: t.colorTextDescription,
        textAlign: "center",
        wordBreak: "keep-all",
        cursor: "pointer",
        userSelect: "none",
        "&-active": {
          color: t.colorText
        }
      },
      [`${e}-step`]: {
        position: "absolute",
        background: "transparent",
        pointerEvents: "none"
      },
      [`${e}-dot`]: {
        position: "absolute",
        width: r,
        height: r,
        backgroundColor: t.colorBgElevated,
        border: `${t.handleLineWidth}px solid ${t.colorBorderSecondary}`,
        borderRadius: "50%",
        cursor: "pointer",
        transition: `border-color ${t.motionDurationSlow}`,
        "&-active": {
          borderColor: t.colorPrimaryBorder
        }
      },
      [`&${e}-disabled`]: {
        cursor: "not-allowed",
        [`${e}-rail`]: {
          backgroundColor: `${t.colorFillSecondary} !important`
        },
        [`${e}-track`]: {
          backgroundColor: `${t.colorTextDisabled} !important`
        },
        [`
          ${e}-dot
        `]: {
          backgroundColor: t.colorBgElevated,
          borderColor: t.colorTextDisabled,
          boxShadow: "none",
          cursor: "not-allowed"
        },
        [`${e}-handle::after`]: {
          backgroundColor: t.colorBgElevated,
          cursor: "not-allowed",
          width: t.handleSize,
          height: t.handleSize,
          boxShadow: `0 0 0 ${t.handleLineWidth}px ${new en(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,
          insetInlineStart: 0,
          insetBlockStart: 0
        },
        [`
          ${e}-mark-text,
          ${e}-dot
        `]: {
          cursor: "not-allowed !important"
        }
      }
    })
  };
}, EY = (t, e) => {
  const {
    componentCls: n,
    railSize: r,
    handleSize: i,
    dotSize: a
  } = t, o = e ? "paddingBlock" : "paddingInline", s = e ? "width" : "height", l = e ? "height" : "width", u = e ? "insetBlockStart" : "insetInlineStart", c = e ? "top" : "insetInlineStart";
  return {
    [o]: r,
    [l]: r * 3,
    [`${n}-rail`]: {
      [s]: "100%",
      [l]: r
    },
    [`${n}-track`]: {
      [l]: r
    },
    [`${n}-handle`]: {
      [u]: (r * 3 - i) / 2
    },
    [`${n}-mark`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: i,
      [s]: "100%"
    },
    [`${n}-step`]: {
      // Reset all
      insetInlineStart: 0,
      top: 0,
      [c]: r,
      [s]: "100%",
      [l]: r
    },
    [`${n}-dot`]: {
      position: "absolute",
      [u]: (r - a) / 2
    }
  };
}, jTe = (t) => {
  const {
    componentCls: e,
    marginPartWithMark: n
  } = t;
  return {
    [`${e}-horizontal`]: I(I({}, EY(t, !0)), {
      [`&${e}-with-marks`]: {
        marginBottom: n
      }
    })
  };
}, ZTe = (t) => {
  const {
    componentCls: e
  } = t;
  return {
    [`${e}-vertical`]: I(I({}, EY(t, !1)), {
      height: "100%"
    })
  };
}, UTe = Sn("Slider", (t) => {
  const e = Bt(t, {
    marginPart: (t.controlHeight - t.controlSize) / 2,
    marginFull: t.controlSize / 2,
    marginPartWithMark: t.controlHeightLG - t.controlSize
  });
  return [GTe(e), jTe(e), ZTe(e)];
}, (t) => {
  const n = t.controlHeightLG / 4, r = t.controlHeightSM / 2, i = t.lineWidth + 1, a = t.lineWidth + 1 * 3;
  return {
    controlSize: n,
    railSize: 4,
    handleSize: n,
    handleSizeHover: r,
    dotSize: 8,
    handleLineWidth: i,
    handleLineWidthHover: a
  };
});
var P3 = function(t, e) {
  var n = {};
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
    e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
  return n;
};
const XTe = (t) => typeof t == "number" ? t.toString() : "", YTe = () => ({
  id: String,
  prefixCls: String,
  tooltipPrefixCls: String,
  range: gn([Boolean, Object]),
  reverse: nt(),
  min: Number,
  max: Number,
  step: gn([Object, Number]),
  marks: $t(),
  dots: nt(),
  value: gn([Array, Number]),
  defaultValue: gn([Array, Number]),
  included: nt(),
  disabled: nt(),
  vertical: nt(),
  tipFormatter: gn([Function, Object], () => XTe),
  tooltipOpen: nt(),
  /** @deprecated `tooltipVisible` is deprecated. Please use `tooltipOpen` instead. */
  tooltipVisible: nt(),
  tooltipPlacement: hn(),
  getTooltipPopupContainer: tt(),
  autofocus: nt(),
  handleStyle: gn([Array, Object]),
  trackStyle: gn([Array, Object]),
  onChange: tt(),
  onAfterChange: tt(),
  onFocus: tt(),
  onBlur: tt(),
  "onUpdate:value": tt()
}), qTe = te({
  compatConfig: {
    MODE: 3
  },
  name: "ASlider",
  inheritAttrs: !1,
  props: YTe(),
  // emits: ['update:value', 'change', 'afterChange', 'blur'],
  slots: Object,
  setup(t, e) {
    let {
      attrs: n,
      slots: r,
      emit: i,
      expose: a
    } = e;
    process.env.NODE_ENV !== "production" && [["tooltipVisible", "tooltipOpen"]].forEach((x) => {
      let [C, T] = x;
      Qi(t.tooltipVisible === void 0, "Slider", `\`${C}\` is deprecated, please use \`${T}\` instead.`);
    });
    const {
      prefixCls: o,
      rootPrefixCls: s,
      direction: l,
      getPopupContainer: u,
      configProvider: c
    } = It("slider", t), [f, d] = UTe(o), h = ss(), p = U(), v = U({}), g = (x, C) => {
      v.value[x] = C;
    }, m = L(() => t.tooltipPlacement ? t.tooltipPlacement : t.vertical ? l.value === "rtl" ? "left" : "right" : "top"), y = () => {
      var x;
      (x = p.value) === null || x === void 0 || x.focus();
    }, b = () => {
      var x;
      (x = p.value) === null || x === void 0 || x.blur();
    }, _ = (x) => {
      i("update:value", x), i("change", x), h.onFieldChange();
    }, O = (x) => {
      i("blur", x);
    };
    a({
      focus: y,
      blur: b
    });
    const S = (x) => {
      var {
        tooltipPrefixCls: C
      } = x, T = x.info, {
        value: w,
        dragging: P,
        index: $
      } = T, A = P3(T, ["value", "dragging", "index"]);
      const {
        tipFormatter: D,
        tooltipOpen: E = t.tooltipVisible,
        getTooltipPopupContainer: R
      } = t, N = D ? v.value[$] || P : !1, V = E || E === void 0 && N;
      return M(HTe, {
        prefixCls: C,
        title: D ? D(w) : "",
        open: V,
        placement: m.value,
        transitionName: `${s.value}-zoom-down`,
        key: $,
        overlayClassName: `${o.value}-tooltip`,
        getPopupContainer: R || (u == null ? void 0 : u.value)
      }, {
        default: () => [M(wY, j(j({}, A), {}, {
          value: w,
          onMouseenter: () => g($, !0),
          onMouseleave: () => g($, !1)
        }), null)]
      });
    };
    return () => {
      const {
        tooltipPrefixCls: x,
        range: C,
        id: T = h.id.value
      } = t, w = P3(t, ["tooltipPrefixCls", "range", "id"]), P = c.getPrefixCls("tooltip", x), $ = ye(n.class, {
        [`${o.value}-rtl`]: l.value === "rtl"
      }, d.value);
      l.value === "rtl" && !w.vertical && (w.reverse = !w.reverse);
      let A;
      return typeof C == "object" && (A = C.draggableTrack), f(C ? M(QTe, j(j(j({}, n), w), {}, {
        step: w.step,
        draggableTrack: A,
        class: $,
        ref: p,
        handle: (D) => S({
          tooltipPrefixCls: P,
          prefixCls: o.value,
          info: D
        }),
        prefixCls: o.value,
        onChange: _,
        onBlur: O
      }), {
        mark: r.mark
      }) : M(VTe, j(j(j({}, n), w), {}, {
        id: T,
        step: w.step,
        class: $,
        ref: p,
        handle: (D) => S({
          tooltipPrefixCls: P,
          prefixCls: o.value,
          info: D
        }),
        prefixCls: o.value,
        onChange: _,
        onBlur: O
      }), {
        mark: r.mark
      }));
    };
  }
}), KTe = np(qTe);
var JTe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-center", theme: "outlined" };
function $3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      ePe(t, i, n[i]);
    });
  }
  return t;
}
function ePe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var ED = function(e, n) {
  var r = $3({}, e, n.attrs);
  return M(lt, $3({}, r, {
    icon: JTe
  }), null);
};
ED.displayName = "AlignCenterOutlined";
ED.inheritAttrs = !1;
var tPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-left", theme: "outlined" };
function A3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      nPe(t, i, n[i]);
    });
  }
  return t;
}
function nPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var MD = function(e, n) {
  var r = A3({}, e, n.attrs);
  return M(lt, A3({}, r, {
    icon: tPe
  }), null);
};
MD.displayName = "AlignLeftOutlined";
MD.inheritAttrs = !1;
var rPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "align-right", theme: "outlined" };
function E3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      iPe(t, i, n[i]);
    });
  }
  return t;
}
function iPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var ID = function(e, n) {
  var r = E3({}, e, n.attrs);
  return M(lt, E3({}, r, {
    icon: rPe
  }), null);
};
ID.displayName = "AlignRightOutlined";
ID.inheritAttrs = !1;
var aPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z" } }] }, name: "bold", theme: "outlined" };
function M3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      oPe(t, i, n[i]);
    });
  }
  return t;
}
function oPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var DD = function(e, n) {
  var r = M3({}, e, n.attrs);
  return M(lt, M3({}, r, {
    icon: aPe
  }), null);
};
DD.displayName = "BoldOutlined";
DD.inheritAttrs = !1;
var sPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 808H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-720-94h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-498h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm166 166h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm332 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 332h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm222-72h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388 426h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm388-404h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-388 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z" } }] }, name: "border-bottom", theme: "outlined" };
function I3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      lPe(t, i, n[i]);
    });
  }
  return t;
}
function lPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var RD = function(e, n) {
  var r = I3({}, e, n.attrs);
  return M(lt, I3({}, r, {
    icon: sPe
  }), null);
};
RD.displayName = "BorderBottomOutlined";
RD.inheritAttrs = !1;
var uPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M208 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM540 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-left", theme: "outlined" };
function D3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      cPe(t, i, n[i]);
    });
  }
  return t;
}
function cPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var kD = function(e, n) {
  var r = D3({}, e, n.attrs);
  return M(lt, D3({}, r, {
    icon: uPe
  }), null);
};
kD.displayName = "BorderLeftOutlined";
kD.inheritAttrs = !1;
var fPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144h-56c-4.4 0-8 3.6-8 8v720c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V152c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-498 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm498 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM374 808h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-right", theme: "outlined" };
function R3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      dPe(t, i, n[i]);
    });
  }
  return t;
}
function dPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var LD = function(e, n) {
  var r = R3({}, e, n.attrs);
  return M(lt, R3({}, r, {
    icon: fPe
  }), null);
};
LD.displayName = "BorderRightOutlined";
LD.inheritAttrs = !1;
var hPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 144H152c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM208 310h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166-166h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm166 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332-498h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm332 332h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-332 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "border-top", theme: "outlined" };
function k3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      pPe(t, i, n[i]);
    });
  }
  return t;
}
function pPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var ND = function(e, n) {
  var r = k3({}, e, n.attrs);
  return M(lt, k3({}, r, {
    icon: hPe
  }), null);
};
ND.displayName = "BorderTopOutlined";
ND.inheritAttrs = !1;
var vPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "database", theme: "outlined" };
function L3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      gPe(t, i, n[i]);
    });
  }
  return t;
}
function gPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var x0 = function(e, n) {
  var r = L3({}, e, n.attrs);
  return M(lt, L3({}, r, {
    icon: vPe
  }), null);
};
x0.displayName = "DatabaseOutlined";
x0.inheritAttrs = !1;
var mPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z" } }] }, name: "font-colors", theme: "outlined" };
function N3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      yPe(t, i, n[i]);
    });
  }
  return t;
}
function yPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var BD = function(e, n) {
  var r = N3({}, e, n.attrs);
  return M(lt, N3({}, r, {
    icon: mPe
  }), null);
};
BD.displayName = "FontColorsOutlined";
BD.inheritAttrs = !1;
var bPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "italic", theme: "outlined" };
function B3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      _Pe(t, i, n[i]);
    });
  }
  return t;
}
function _Pe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var zD = function(e, n) {
  var r = B3({}, e, n.attrs);
  return M(lt, B3({}, r, {
    icon: bPe
  }), null);
};
zD.displayName = "ItalicOutlined";
zD.inheritAttrs = !1;
var OPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M712 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm2-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM136 374h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0-174h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm752 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-230 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 624H358c-87.3 0-158-70.7-158-158V484c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v182c0 127 103 230 230 230h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomleft", theme: "outlined" };
function z3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      SPe(t, i, n[i]);
    });
  }
  return t;
}
function SPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var VD = function(e, n) {
  var r = z3({}, e, n.attrs);
  return M(lt, z3({}, r, {
    icon: OPe
  }), null);
};
VD.displayName = "RadiusBottomleftOutlined";
VD.inheritAttrs = !1;
var xPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-58-624h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm578 102h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 824h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm292 72h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm174 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm230 276h-56c-4.4 0-8 3.6-8 8v182c0 87.3-70.7 158-158 158H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c127 0 230-103 230-230V484c0-4.4-3.6-8-8-8z" } }] }, name: "radius-bottomright", theme: "outlined" };
function V3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      wPe(t, i, n[i]);
    });
  }
  return t;
}
function wPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var FD = function(e, n) {
  var r = V3({}, e, n.attrs);
  return M(lt, V3({}, r, {
    icon: xPe
  }), null);
};
FD.displayName = "RadiusBottomrightOutlined";
FD.inheritAttrs = !1;
var CPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M656 200h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm58 624h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 650h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm696-696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174-696H358c-127 0-230 103-230 230v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-87.3 70.7-158 158-158h182c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" } }] }, name: "radius-upleft", theme: "outlined" };
function F3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      TPe(t, i, n[i]);
    });
  }
  return t;
}
function TPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var WD = function(e, n) {
  var r = F3({}, e, n.attrs);
  return M(lt, F3({}, r, {
    icon: CPe
  }), null);
};
WD.displayName = "RadiusUpleftOutlined";
WD.inheritAttrs = !1;
var PPe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M368 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-2 696h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm522-174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM192 128h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 174h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm348 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm174 0h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-48-696H484c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h182c87.3 0 158 70.7 158 158v182c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V358c0-127-103-230-230-230z" } }] }, name: "radius-upright", theme: "outlined" };
function W3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      $Pe(t, i, n[i]);
    });
  }
  return t;
}
function $Pe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var QD = function(e, n) {
  var r = W3({}, e, n.attrs);
  return M(lt, W3({}, r, {
    icon: PPe
  }), null);
};
QD.displayName = "RadiusUprightOutlined";
QD.inheritAttrs = !1;
var APe = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 00-37-29.3H154a44 44 0 00-44 44v252a44 44 0 0044 44h75v388a44 44 0 0044 44h478a44 44 0 0044-44V466h75a44 44 0 0044-44V170a44 44 0 00-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z" } }] }, name: "skin", theme: "outlined" };
function Q3(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? Object(arguments[e]) : {}, r = Object.keys(n);
    typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(i) {
      return Object.getOwnPropertyDescriptor(n, i).enumerable;
    }))), r.forEach(function(i) {
      EPe(t, i, n[i]);
    });
  }
  return t;
}
function EPe(t, e, n) {
  return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
}
var w0 = function(e, n) {
  var r = Q3({}, e, n.attrs);
  return M(lt, Q3({}, r, {
    icon: APe
  }), null);
};
w0.displayName = "SkinOutlined";
w0.inheritAttrs = !1;
const bs = (t, e, { checkForDefaultPrevented: n = !0 } = {}) => (i) => {
  const a = t == null ? void 0 : t(i);
  if (n === !1 || !a)
    return e == null ? void 0 : e(i);
};
var H3;
const Yr = typeof window < "u", MPe = (t) => typeof t == "string", MY = () => {
}, IPe = Yr && ((H3 = window == null ? void 0 : window.navigator) == null ? void 0 : H3.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function IY(t) {
  return typeof t == "function" ? t() : B(t);
}
function DPe(t) {
  return t;
}
function HD(t) {
  return jG() ? (f0(t), !0) : !1;
}
function RPe(t, e = !0) {
  vn() ? it(t) : e ? t() : Tt(t);
}
function Rl(t) {
  var e;
  const n = IY(t);
  return (e = n == null ? void 0 : n.$el) != null ? e : n;
}
const GD = Yr ? window : void 0;
function I_(...t) {
  let e, n, r, i;
  if (MPe(t[0]) || Array.isArray(t[0]) ? ([n, r, i] = t, e = GD) : [e, n, r, i] = t, !e)
    return MY;
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  const a = [], o = () => {
    a.forEach((c) => c()), a.length = 0;
  }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(() => [Rl(e), IY(i)], ([c, f]) => {
    o(), c && a.push(...n.flatMap((d) => r.map((h) => s(c, d, h, f))));
  }, { immediate: !0, flush: "post" }), u = () => {
    l(), o();
  };
  return HD(u), u;
}
let G3 = !1;
function kPe(t, e, n = {}) {
  const { window: r = GD, ignore: i = [], capture: a = !0, detectIframe: o = !1 } = n;
  if (!r)
    return;
  IPe && !G3 && (G3 = !0, Array.from(r.document.body.children).forEach((d) => d.addEventListener("click", MY)));
  let s = !0;
  const l = (d) => i.some((h) => {
    if (typeof h == "string")
      return Array.from(r.document.querySelectorAll(h)).some((p) => p === d.target || d.composedPath().includes(p));
    {
      const p = Rl(h);
      return p && (d.target === p || d.composedPath().includes(p));
    }
  }), c = [
    I_(r, "click", (d) => {
      const h = Rl(t);
      if (!(!h || h === d.target || d.composedPath().includes(h))) {
        if (d.detail === 0 && (s = !l(d)), !s) {
          s = !0;
          return;
        }
        e(d);
      }
    }, { passive: !0, capture: a }),
    I_(r, "pointerdown", (d) => {
      const h = Rl(t);
      h && (s = !d.composedPath().includes(h) && !l(d));
    }, { passive: !0 }),
    o && I_(r, "blur", (d) => {
      var h;
      const p = Rl(t);
      ((h = r.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(p != null && p.contains(r.document.activeElement)) && e(d);
    })
  ].filter(Boolean);
  return () => c.forEach((d) => d());
}
function LPe(t, e = !1) {
  const n = U(), r = () => n.value = !!t();
  return r(), RPe(r, e), n;
}
const j3 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Z3 = "__vueuse_ssr_handlers__";
j3[Z3] = j3[Z3] || {};
var U3 = Object.getOwnPropertySymbols, NPe = Object.prototype.hasOwnProperty, BPe = Object.prototype.propertyIsEnumerable, zPe = (t, e) => {
  var n = {};
  for (var r in t)
    NPe.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
  if (t != null && U3)
    for (var r of U3(t))
      e.indexOf(r) < 0 && BPe.call(t, r) && (n[r] = t[r]);
  return n;
};
function VPe(t, e, n = {}) {
  const r = n, { window: i = GD } = r, a = zPe(r, ["window"]);
  let o;
  const s = LPe(() => i && "ResizeObserver" in i), l = () => {
    o && (o.disconnect(), o = void 0);
  }, u = se(() => Rl(t), (f) => {
    l(), s.value && i && f && (o = new ResizeObserver(e), o.observe(f, a));
  }, { immediate: !0, flush: "post" }), c = () => {
    l(), u();
  };
  return HD(c), {
    isSupported: s,
    stop: c
  };
}
var X3;
(function(t) {
  t.UP = "UP", t.RIGHT = "RIGHT", t.DOWN = "DOWN", t.LEFT = "LEFT", t.NONE = "NONE";
})(X3 || (X3 = {}));
var FPe = Object.defineProperty, Y3 = Object.getOwnPropertySymbols, WPe = Object.prototype.hasOwnProperty, QPe = Object.prototype.propertyIsEnumerable, q3 = (t, e, n) => e in t ? FPe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, HPe = (t, e) => {
  for (var n in e || (e = {}))
    WPe.call(e, n) && q3(t, n, e[n]);
  if (Y3)
    for (var n of Y3(e))
      QPe.call(e, n) && q3(t, n, e[n]);
  return t;
};
const GPe = {
  easeInSine: [0.12, 0, 0.39, 0],
  easeOutSine: [0.61, 1, 0.88, 1],
  easeInOutSine: [0.37, 0, 0.63, 1],
  easeInQuad: [0.11, 0, 0.5, 0],
  easeOutQuad: [0.5, 1, 0.89, 1],
  easeInOutQuad: [0.45, 0, 0.55, 1],
  easeInCubic: [0.32, 0, 0.67, 0],
  easeOutCubic: [0.33, 1, 0.68, 1],
  easeInOutCubic: [0.65, 0, 0.35, 1],
  easeInQuart: [0.5, 0, 0.75, 0],
  easeOutQuart: [0.25, 1, 0.5, 1],
  easeInOutQuart: [0.76, 0, 0.24, 1],
  easeInQuint: [0.64, 0, 0.78, 0],
  easeOutQuint: [0.22, 1, 0.36, 1],
  easeInOutQuint: [0.83, 0, 0.17, 1],
  easeInExpo: [0.7, 0, 0.84, 0],
  easeOutExpo: [0.16, 1, 0.3, 1],
  easeInOutExpo: [0.87, 0, 0.13, 1],
  easeInCirc: [0.55, 0, 1, 0.45],
  easeOutCirc: [0, 0.55, 0.45, 1],
  easeInOutCirc: [0.85, 0, 0.15, 1],
  easeInBack: [0.36, 0, 0.66, -0.56],
  easeOutBack: [0.34, 1.56, 0.64, 1],
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
HPe({
  linear: DPe
}, GPe);
const jPe = () => Yr && /firefox/i.test(window.navigator.userAgent), jD = (t) => {
  let e, n;
  return t.type === "touchend" ? (n = t.changedTouches[0].clientY, e = t.changedTouches[0].clientX) : t.type.startsWith("touch") ? (n = t.touches[0].clientY, e = t.touches[0].clientX) : (n = t.clientY, e = t.clientX), {
    clientX: e,
    clientY: n
  };
};
/**
* @vue/shared v3.4.31
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
process.env.NODE_ENV !== "production" && Object.freeze({});
process.env.NODE_ENV !== "production" && Object.freeze([]);
const lm = () => {
}, ZPe = Object.prototype.hasOwnProperty, W1 = (t, e) => ZPe.call(t, e), UPe = Array.isArray, zv = (t) => typeof t == "function", ba = (t) => typeof t == "string", um = (t) => t !== null && typeof t == "object", XPe = (t) => t === void 0, Q1 = (t) => typeof t == "boolean", Ws = (t) => typeof t == "number", cm = (t) => typeof Element > "u" ? !1 : t instanceof Element, K3 = (t) => Gl(t), YPe = (t) => ba(t) ? !Number.isNaN(Number(t)) : !1;
class qPe extends Error {
  constructor(e) {
    super(e), this.name = "ElementPlusError";
  }
}
function Gi(t, e) {
  if (process.env.NODE_ENV !== "production") {
    const n = ba(t) ? new qPe(`[${t}] ${e}`) : t;
    console.warn(n);
  }
}
const KPe = "utils/dom/style";
function eA(t, e = "px") {
  if (!t)
    return "";
  if (Ws(t) || YPe(t))
    return `${t}${e}`;
  if (ba(t))
    return t;
  Gi(KPe, "binding value must be a string or number");
}
/*! Element Plus Icons Vue v2.3.1 */
var JPe = /* @__PURE__ */ te({
  name: "ArrowDown",
  __name: "arrow-down",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
      })
    ]));
  }
}), e$e = JPe, t$e = /* @__PURE__ */ te({
  name: "CircleCheck",
  __name: "circle-check",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
      }),
      He("path", {
        fill: "currentColor",
        d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
      })
    ]));
  }
}), n$e = t$e, r$e = /* @__PURE__ */ te({
  name: "CircleClose",
  __name: "circle-close",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
      }),
      He("path", {
        fill: "currentColor",
        d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
      })
    ]));
  }
}), DY = r$e, i$e = /* @__PURE__ */ te({
  name: "Close",
  __name: "close",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
      })
    ]));
  }
}), a$e = i$e, o$e = /* @__PURE__ */ te({
  name: "Hide",
  __name: "hide",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
      }),
      He("path", {
        fill: "currentColor",
        d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
      })
    ]));
  }
}), s$e = o$e, l$e = /* @__PURE__ */ te({
  name: "Loading",
  __name: "loading",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
      })
    ]));
  }
}), RY = l$e, u$e = /* @__PURE__ */ te({
  name: "View",
  __name: "view",
  setup(t) {
    return (e, n) => (pe(), Qe("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 1024 1024"
    }, [
      He("path", {
        fill: "currentColor",
        d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
      })
    ]));
  }
}), c$e = u$e;
const kY = "__epPropKey", jt = (t) => t, f$e = (t) => um(t) && !!t[kY], Tx = (t, e) => {
  if (!um(t) || f$e(t))
    return t;
  const { values: n, required: r, default: i, type: a, validator: o } = t, l = {
    type: a,
    required: !!r,
    validator: n || o ? (u) => {
      let c = !1, f = [];
      if (n && (f = Array.from(n), W1(t, "default") && f.push(i), c || (c = f.includes(u))), o && (c || (c = o(u))), !c && f.length > 0) {
        const d = [...new Set(f)].map((h) => JSON.stringify(h)).join(", ");
        Wle(`Invalid prop: validation failed${e ? ` for prop "${e}"` : ""}. Expected one of [${d}], got value ${JSON.stringify(u)}.`);
      }
      return c;
    } : void 0,
    [kY]: !0
  };
  return W1(t, "default") && (l.default = i), l;
}, rr = (t) => A1(Object.entries(t).map(([e, n]) => [
  e,
  Tx(n, e)
])), H1 = jt([
  String,
  Object,
  Function
]), d$e = {
  validating: RY,
  success: n$e,
  error: DY
}, Df = (t, e) => {
  if (t.install = (n) => {
    for (const r of [t, ...Object.values(e ?? {})])
      n.component(r.name, r);
  }, e)
    for (const [n, r] of Object.entries(e))
      t[n] = r;
  return t;
}, ZD = (t) => (t.install = lm, t), Xc = {
  tab: "Tab",
  enter: "Enter",
  space: "Space",
  left: "ArrowLeft",
  up: "ArrowUp",
  right: "ArrowRight",
  down: "ArrowDown",
  esc: "Escape",
  delete: "Delete",
  backspace: "Backspace",
  numpadEnter: "NumpadEnter",
  pageUp: "PageUp",
  pageDown: "PageDown",
  home: "Home",
  end: "End"
}, Qs = "update:modelValue", LY = "change", h$e = ["", "default", "small", "large"], p$e = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t), v$e = (t) => t, g$e = ["class", "style"], m$e = /^on[A-Z]/, y$e = (t = {}) => {
  const { excludeListeners: e = !1, excludeKeys: n } = t, r = L(() => ((n == null ? void 0 : n.value) || []).concat(g$e)), i = vn();
  return i ? L(() => {
    var a;
    return A1(Object.entries((a = i.proxy) == null ? void 0 : a.$attrs).filter(([o]) => !r.value.includes(o) && !(e && m$e.test(o))));
  }) : (Gi("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), L(() => ({})));
}, C0 = ({ from: t, replacement: e, scope: n, version: r, ref: i, type: a = "API" }, o) => {
  se(() => B(o), (s) => {
    s && Gi(n, `[${a}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
For more detail, please visit: ${i}
`);
  }, {
    immediate: !0
  });
};
var b$e = {
  name: "en",
  el: {
    breadcrumb: {
      label: "Breadcrumb"
    },
    colorpicker: {
      confirm: "OK",
      clear: "Clear",
      defaultLabel: "color picker",
      description: "current color is {color}. press enter to select a new color."
    },
    datepicker: {
      now: "Now",
      today: "Today",
      cancel: "Cancel",
      clear: "Clear",
      confirm: "OK",
      dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
      monthTablePrompt: "Use the arrow keys and enter to select the month",
      yearTablePrompt: "Use the arrow keys and enter to select the year",
      selectedDate: "Selected date",
      selectDate: "Select date",
      selectTime: "Select time",
      startDate: "Start Date",
      startTime: "Start Time",
      endDate: "End Date",
      endTime: "End Time",
      prevYear: "Previous Year",
      nextYear: "Next Year",
      prevMonth: "Previous Month",
      nextMonth: "Next Month",
      year: "",
      month1: "January",
      month2: "February",
      month3: "March",
      month4: "April",
      month5: "May",
      month6: "June",
      month7: "July",
      month8: "August",
      month9: "September",
      month10: "October",
      month11: "November",
      month12: "December",
      week: "week",
      weeks: {
        sun: "Sun",
        mon: "Mon",
        tue: "Tue",
        wed: "Wed",
        thu: "Thu",
        fri: "Fri",
        sat: "Sat"
      },
      weeksFull: {
        sun: "Sunday",
        mon: "Monday",
        tue: "Tuesday",
        wed: "Wednesday",
        thu: "Thursday",
        fri: "Friday",
        sat: "Saturday"
      },
      months: {
        jan: "Jan",
        feb: "Feb",
        mar: "Mar",
        apr: "Apr",
        may: "May",
        jun: "Jun",
        jul: "Jul",
        aug: "Aug",
        sep: "Sep",
        oct: "Oct",
        nov: "Nov",
        dec: "Dec"
      }
    },
    inputNumber: {
      decrease: "decrease number",
      increase: "increase number"
    },
    select: {
      loading: "Loading",
      noMatch: "No matching data",
      noData: "No data",
      placeholder: "Select"
    },
    dropdown: {
      toggleDropdown: "Toggle Dropdown"
    },
    cascader: {
      noMatch: "No matching data",
      loading: "Loading",
      placeholder: "Select",
      noData: "No data"
    },
    pagination: {
      goto: "Go to",
      pagesize: "/page",
      total: "Total {total}",
      pageClassifier: "",
      page: "Page",
      prev: "Go to previous page",
      next: "Go to next page",
      currentPage: "page {pager}",
      prevPages: "Previous {pager} pages",
      nextPages: "Next {pager} pages",
      deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
    },
    dialog: {
      close: "Close this dialog"
    },
    drawer: {
      close: "Close this dialog"
    },
    messagebox: {
      title: "Message",
      confirm: "OK",
      cancel: "Cancel",
      error: "Illegal input",
      close: "Close this dialog"
    },
    upload: {
      deleteTip: "press delete to remove",
      delete: "Delete",
      preview: "Preview",
      continue: "Continue"
    },
    slider: {
      defaultLabel: "slider between {min} and {max}",
      defaultRangeStartLabel: "pick start value",
      defaultRangeEndLabel: "pick end value"
    },
    table: {
      emptyText: "No Data",
      confirmFilter: "Confirm",
      resetFilter: "Reset",
      clearFilter: "All",
      sumText: "Sum"
    },
    tour: {
      next: "Next",
      previous: "Previous",
      finish: "Finish"
    },
    tree: {
      emptyText: "No Data"
    },
    transfer: {
      noMatch: "No matching data",
      noData: "No data",
      titles: ["List 1", "List 2"],
      filterPlaceholder: "Enter keyword",
      noCheckedFormat: "{total} items",
      hasCheckedFormat: "{checked}/{total} checked"
    },
    image: {
      error: "FAILED"
    },
    pageHeader: {
      title: "Back"
    },
    popconfirm: {
      confirmButtonText: "Yes",
      cancelButtonText: "No"
    },
    carousel: {
      leftArrow: "Carousel arrow left",
      rightArrow: "Carousel arrow right",
      indicator: "Carousel switch to index {index}"
    }
  }
};
const _$e = (t) => (e, n) => O$e(e, n, B(t)), O$e = (t, e, n) => kt(n, t, t).replace(/\{(\w+)\}/g, (r, i) => {
  var a;
  return `${(a = e == null ? void 0 : e[i]) != null ? a : `{${i}}`}`;
}), S$e = (t) => {
  const e = L(() => B(t).name), n = tp(t) ? t : U(t);
  return {
    lang: e,
    locale: n,
    t: _$e(t)
  };
}, x$e = Symbol("localeContextKey"), w$e = (t) => {
  const e = Ge(x$e, U());
  return S$e(L(() => e.value || b$e));
}, kC = "el", C$e = "is-", Nu = (t, e, n, r, i) => {
  let a = `${t}-${e}`;
  return n && (a += `-${n}`), r && (a += `__${r}`), i && (a += `--${i}`), a;
}, T$e = Symbol("namespaceContextKey"), UD = (t) => {
  const e = vn() ? Ge(T$e, U(kC)) : U(kC);
  return L(() => B(e) || kC);
}, Jn = (t, e) => {
  const n = UD();
  return {
    namespace: n,
    b: (v = "") => Nu(n.value, t, v, "", ""),
    e: (v) => v ? Nu(n.value, t, "", v, "") : "",
    m: (v) => v ? Nu(n.value, t, "", "", v) : "",
    be: (v, g) => v && g ? Nu(n.value, t, v, g, "") : "",
    em: (v, g) => v && g ? Nu(n.value, t, "", v, g) : "",
    bm: (v, g) => v && g ? Nu(n.value, t, v, "", g) : "",
    bem: (v, g, m) => v && g && m ? Nu(n.value, t, v, g, m) : "",
    is: (v, ...g) => {
      const m = g.length >= 1 ? g[0] : !0;
      return v && m ? `${C$e}${v}` : "";
    },
    cssVar: (v) => {
      const g = {};
      for (const m in v)
        v[m] && (g[`--${n.value}-${m}`] = v[m]);
      return g;
    },
    cssVarName: (v) => `--${n.value}-${v}`,
    cssVarBlock: (v) => {
      const g = {};
      for (const m in v)
        v[m] && (g[`--${n.value}-${t}-${m}`] = v[m]);
      return g;
    },
    cssVarBlockName: (v) => `--${n.value}-${t}-${v}`
  };
}, P$e = Tx({
  type: jt(Boolean),
  default: null
}), $$e = Tx({
  type: jt(Function)
}), NY = (t) => {
  const e = `update:${t}`, n = `onUpdate:${t}`, r = [e], i = {
    [t]: P$e,
    [n]: $$e
  };
  return {
    useModelToggle: ({
      indicator: o,
      toggleReason: s,
      shouldHideWhenRouteChanges: l,
      shouldProceed: u,
      onShow: c,
      onHide: f
    }) => {
      const d = vn(), { emit: h } = d, p = d.props, v = L(() => zv(p[n])), g = L(() => p[t] === null), m = (x) => {
        o.value !== !0 && (o.value = !0, s && (s.value = x), zv(c) && c(x));
      }, y = (x) => {
        o.value !== !1 && (o.value = !1, s && (s.value = x), zv(f) && f(x));
      }, b = (x) => {
        if (p.disabled === !0 || zv(u) && !u())
          return;
        const C = v.value && Yr;
        C && h(e, !0), (g.value || !C) && m(x);
      }, _ = (x) => {
        if (p.disabled === !0 || !Yr)
          return;
        const C = v.value && Yr;
        C && h(e, !1), (g.value || !C) && y(x);
      }, O = (x) => {
        Q1(x) && (p.disabled && x ? v.value && h(e, !1) : o.value !== x && (x ? m() : y()));
      }, S = () => {
        o.value ? _() : b();
      };
      return se(() => p[t], O), l && d.appContext.config.globalProperties.$route !== void 0 && se(() => ({
        ...d.proxy.$route
      }), () => {
        l.value && o.value && _();
      }), it(() => {
        O(p[t]);
      }), {
        hide: _,
        show: b,
        toggle: S,
        hasUpdateHandler: v
      };
    },
    useModelToggleProps: i,
    useModelToggleEmits: r
  };
};
NY("modelValue");
const BY = (t) => {
  const e = vn();
  return L(() => {
    var n, r;
    return (r = (n = e == null ? void 0 : e.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[t];
  });
};
var _i = "top", Pa = "bottom", $a = "right", Oi = "left", XD = "auto", T0 = [_i, Pa, $a, Oi], Mh = "start", fm = "end", A$e = "clippingParents", zY = "viewport", Xp = "popper", E$e = "reference", J3 = T0.reduce(function(t, e) {
  return t.concat([e + "-" + Mh, e + "-" + fm]);
}, []), YD = [].concat(T0, [XD]).reduce(function(t, e) {
  return t.concat([e, e + "-" + Mh, e + "-" + fm]);
}, []), M$e = "beforeRead", I$e = "read", D$e = "afterRead", R$e = "beforeMain", k$e = "main", L$e = "afterMain", N$e = "beforeWrite", B$e = "write", z$e = "afterWrite", V$e = [M$e, I$e, D$e, R$e, k$e, L$e, N$e, B$e, z$e];
function ns(t) {
  return t ? (t.nodeName || "").toLowerCase() : null;
}
function ho(t) {
  if (t == null) return window;
  if (t.toString() !== "[object Window]") {
    var e = t.ownerDocument;
    return e && e.defaultView || window;
  }
  return t;
}
function Ih(t) {
  var e = ho(t).Element;
  return t instanceof e || t instanceof Element;
}
function _a(t) {
  var e = ho(t).HTMLElement;
  return t instanceof e || t instanceof HTMLElement;
}
function qD(t) {
  if (typeof ShadowRoot > "u") return !1;
  var e = ho(t).ShadowRoot;
  return t instanceof e || t instanceof ShadowRoot;
}
function F$e(t) {
  var e = t.state;
  Object.keys(e.elements).forEach(function(n) {
    var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
    !_a(a) || !ns(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(o) {
      var s = i[o];
      s === !1 ? a.removeAttribute(o) : a.setAttribute(o, s === !0 ? "" : s);
    }));
  });
}
function W$e(t) {
  var e = t.state, n = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
  return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
    Object.keys(e.elements).forEach(function(r) {
      var i = e.elements[r], a = e.attributes[r] || {}, o = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = o.reduce(function(l, u) {
        return l[u] = "", l;
      }, {});
      !_a(i) || !ns(i) || (Object.assign(i.style, s), Object.keys(a).forEach(function(l) {
        i.removeAttribute(l);
      }));
    });
  };
}
var VY = { name: "applyStyles", enabled: !0, phase: "write", fn: F$e, effect: W$e, requires: ["computeStyles"] };
function jo(t) {
  return t.split("-")[0];
}
var Yc = Math.max, G1 = Math.min, Dh = Math.round;
function Rh(t, e) {
  e === void 0 && (e = !1);
  var n = t.getBoundingClientRect(), r = 1, i = 1;
  if (_a(t) && e) {
    var a = t.offsetHeight, o = t.offsetWidth;
    o > 0 && (r = Dh(n.width) / o || 1), a > 0 && (i = Dh(n.height) / a || 1);
  }
  return { width: n.width / r, height: n.height / i, top: n.top / i, right: n.right / r, bottom: n.bottom / i, left: n.left / r, x: n.left / r, y: n.top / i };
}
function KD(t) {
  var e = Rh(t), n = t.offsetWidth, r = t.offsetHeight;
  return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), { x: t.offsetLeft, y: t.offsetTop, width: n, height: r };
}
function FY(t, e) {
  var n = e.getRootNode && e.getRootNode();
  if (t.contains(e)) return !0;
  if (n && qD(n)) {
    var r = e;
    do {
      if (r && t.isSameNode(r)) return !0;
      r = r.parentNode || r.host;
    } while (r);
  }
  return !1;
}
function Hs(t) {
  return ho(t).getComputedStyle(t);
}
function Q$e(t) {
  return ["table", "td", "th"].indexOf(ns(t)) >= 0;
}
function xu(t) {
  return ((Ih(t) ? t.ownerDocument : t.document) || window.document).documentElement;
}
function Px(t) {
  return ns(t) === "html" ? t : t.assignedSlot || t.parentNode || (qD(t) ? t.host : null) || xu(t);
}
function e6(t) {
  return !_a(t) || Hs(t).position === "fixed" ? null : t.offsetParent;
}
function H$e(t) {
  var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
  if (n && _a(t)) {
    var r = Hs(t);
    if (r.position === "fixed") return null;
  }
  var i = Px(t);
  for (qD(i) && (i = i.host); _a(i) && ["html", "body"].indexOf(ns(i)) < 0; ) {
    var a = Hs(i);
    if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none") return i;
    i = i.parentNode;
  }
  return null;
}
function P0(t) {
  for (var e = ho(t), n = e6(t); n && Q$e(n) && Hs(n).position === "static"; ) n = e6(n);
  return n && (ns(n) === "html" || ns(n) === "body" && Hs(n).position === "static") ? e : n || H$e(t) || e;
}
function JD(t) {
  return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
}
function mg(t, e, n) {
  return Yc(t, G1(e, n));
}
function G$e(t, e, n) {
  var r = mg(t, e, n);
  return r > n ? n : r;
}
function WY() {
  return { top: 0, right: 0, bottom: 0, left: 0 };
}
function QY(t) {
  return Object.assign({}, WY(), t);
}
function HY(t, e) {
  return e.reduce(function(n, r) {
    return n[r] = t, n;
  }, {});
}
var j$e = function(t, e) {
  return t = typeof t == "function" ? t(Object.assign({}, e.rects, { placement: e.placement })) : t, QY(typeof t != "number" ? t : HY(t, T0));
};
function Z$e(t) {
  var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, o = n.modifiersData.popperOffsets, s = jo(n.placement), l = JD(s), u = [Oi, $a].indexOf(s) >= 0, c = u ? "height" : "width";
  if (!(!a || !o)) {
    var f = j$e(i.padding, n), d = KD(a), h = l === "y" ? _i : Oi, p = l === "y" ? Pa : $a, v = n.rects.reference[c] + n.rects.reference[l] - o[l] - n.rects.popper[c], g = o[l] - n.rects.reference[l], m = P0(a), y = m ? l === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, b = v / 2 - g / 2, _ = f[h], O = y - d[c] - f[p], S = y / 2 - d[c] / 2 + b, x = mg(_, S, O), C = l;
    n.modifiersData[r] = (e = {}, e[C] = x, e.centerOffset = x - S, e);
  }
}
function U$e(t) {
  var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
  i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || !FY(e.elements.popper, i) || (e.elements.arrow = i));
}
var X$e = { name: "arrow", enabled: !0, phase: "main", fn: Z$e, effect: U$e, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function kh(t) {
  return t.split("-")[1];
}
var Y$e = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function q$e(t) {
  var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
  return { x: Dh(e * i) / i || 0, y: Dh(n * i) / i || 0 };
}
function t6(t) {
  var e, n = t.popper, r = t.popperRect, i = t.placement, a = t.variation, o = t.offsets, s = t.position, l = t.gpuAcceleration, u = t.adaptive, c = t.roundOffsets, f = t.isFixed, d = o.x, h = d === void 0 ? 0 : d, p = o.y, v = p === void 0 ? 0 : p, g = typeof c == "function" ? c({ x: h, y: v }) : { x: h, y: v };
  h = g.x, v = g.y;
  var m = o.hasOwnProperty("x"), y = o.hasOwnProperty("y"), b = Oi, _ = _i, O = window;
  if (u) {
    var S = P0(n), x = "clientHeight", C = "clientWidth";
    if (S === ho(n) && (S = xu(n), Hs(S).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), S = S, i === _i || (i === Oi || i === $a) && a === fm) {
      _ = Pa;
      var T = f && S === O && O.visualViewport ? O.visualViewport.height : S[x];
      v -= T - r.height, v *= l ? 1 : -1;
    }
    if (i === Oi || (i === _i || i === Pa) && a === fm) {
      b = $a;
      var w = f && S === O && O.visualViewport ? O.visualViewport.width : S[C];
      h -= w - r.width, h *= l ? 1 : -1;
    }
  }
  var P = Object.assign({ position: s }, u && Y$e), $ = c === !0 ? q$e({ x: h, y: v }) : { x: h, y: v };
  if (h = $.x, v = $.y, l) {
    var A;
    return Object.assign({}, P, (A = {}, A[_] = y ? "0" : "", A[b] = m ? "0" : "", A.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", A));
  }
  return Object.assign({}, P, (e = {}, e[_] = y ? v + "px" : "", e[b] = m ? h + "px" : "", e.transform = "", e));
}
function K$e(t) {
  var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, o = a === void 0 ? !0 : a, s = n.roundOffsets, l = s === void 0 ? !0 : s, u = { placement: jo(e.placement), variation: kh(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: i, isFixed: e.options.strategy === "fixed" };
  e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, t6(Object.assign({}, u, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: l })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, t6(Object.assign({}, u, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
}
var GY = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: K$e, data: {} }, ky = { passive: !0 };
function J$e(t) {
  var e = t.state, n = t.instance, r = t.options, i = r.scroll, a = i === void 0 ? !0 : i, o = r.resize, s = o === void 0 ? !0 : o, l = ho(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
  return a && u.forEach(function(c) {
    c.addEventListener("scroll", n.update, ky);
  }), s && l.addEventListener("resize", n.update, ky), function() {
    a && u.forEach(function(c) {
      c.removeEventListener("scroll", n.update, ky);
    }), s && l.removeEventListener("resize", n.update, ky);
  };
}
var jY = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
}, effect: J$e, data: {} }, e2e = { left: "right", right: "left", bottom: "top", top: "bottom" };
function D_(t) {
  return t.replace(/left|right|bottom|top/g, function(e) {
    return e2e[e];
  });
}
var t2e = { start: "end", end: "start" };
function n6(t) {
  return t.replace(/start|end/g, function(e) {
    return t2e[e];
  });
}
function eR(t) {
  var e = ho(t), n = e.pageXOffset, r = e.pageYOffset;
  return { scrollLeft: n, scrollTop: r };
}
function tR(t) {
  return Rh(xu(t)).left + eR(t).scrollLeft;
}
function n2e(t) {
  var e = ho(t), n = xu(t), r = e.visualViewport, i = n.clientWidth, a = n.clientHeight, o = 0, s = 0;
  return r && (i = r.width, a = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (o = r.offsetLeft, s = r.offsetTop)), { width: i, height: a, x: o + tR(t), y: s };
}
function r2e(t) {
  var e, n = xu(t), r = eR(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = Yc(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Yc(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + tR(t), l = -r.scrollTop;
  return Hs(i || n).direction === "rtl" && (s += Yc(n.clientWidth, i ? i.clientWidth : 0) - a), { width: a, height: o, x: s, y: l };
}
function nR(t) {
  var e = Hs(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
  return /auto|scroll|overlay|hidden/.test(n + i + r);
}
function ZY(t) {
  return ["html", "body", "#document"].indexOf(ns(t)) >= 0 ? t.ownerDocument.body : _a(t) && nR(t) ? t : ZY(Px(t));
}
function yg(t, e) {
  var n;
  e === void 0 && (e = []);
  var r = ZY(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = ho(r), o = i ? [a].concat(a.visualViewport || [], nR(r) ? r : []) : r, s = e.concat(o);
  return i ? s : s.concat(yg(Px(o)));
}
function tA(t) {
  return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
}
function i2e(t) {
  var e = Rh(t);
  return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
}
function r6(t, e) {
  return e === zY ? tA(n2e(t)) : Ih(e) ? i2e(e) : tA(r2e(xu(t)));
}
function a2e(t) {
  var e = yg(Px(t)), n = ["absolute", "fixed"].indexOf(Hs(t).position) >= 0, r = n && _a(t) ? P0(t) : t;
  return Ih(r) ? e.filter(function(i) {
    return Ih(i) && FY(i, r) && ns(i) !== "body";
  }) : [];
}
function o2e(t, e, n) {
  var r = e === "clippingParents" ? a2e(t) : [].concat(e), i = [].concat(r, [n]), a = i[0], o = i.reduce(function(s, l) {
    var u = r6(t, l);
    return s.top = Yc(u.top, s.top), s.right = G1(u.right, s.right), s.bottom = G1(u.bottom, s.bottom), s.left = Yc(u.left, s.left), s;
  }, r6(t, a));
  return o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
}
function UY(t) {
  var e = t.reference, n = t.element, r = t.placement, i = r ? jo(r) : null, a = r ? kh(r) : null, o = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, l;
  switch (i) {
    case _i:
      l = { x: o, y: e.y - n.height };
      break;
    case Pa:
      l = { x: o, y: e.y + e.height };
      break;
    case $a:
      l = { x: e.x + e.width, y: s };
      break;
    case Oi:
      l = { x: e.x - n.width, y: s };
      break;
    default:
      l = { x: e.x, y: e.y };
  }
  var u = i ? JD(i) : null;
  if (u != null) {
    var c = u === "y" ? "height" : "width";
    switch (a) {
      case Mh:
        l[u] = l[u] - (e[c] / 2 - n[c] / 2);
        break;
      case fm:
        l[u] = l[u] + (e[c] / 2 - n[c] / 2);
        break;
    }
  }
  return l;
}
function dm(t, e) {
  e === void 0 && (e = {});
  var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.boundary, o = a === void 0 ? A$e : a, s = n.rootBoundary, l = s === void 0 ? zY : s, u = n.elementContext, c = u === void 0 ? Xp : u, f = n.altBoundary, d = f === void 0 ? !1 : f, h = n.padding, p = h === void 0 ? 0 : h, v = QY(typeof p != "number" ? p : HY(p, T0)), g = c === Xp ? E$e : Xp, m = t.rects.popper, y = t.elements[d ? g : c], b = o2e(Ih(y) ? y : y.contextElement || xu(t.elements.popper), o, l), _ = Rh(t.elements.reference), O = UY({ reference: _, element: m, strategy: "absolute", placement: i }), S = tA(Object.assign({}, m, O)), x = c === Xp ? S : _, C = { top: b.top - x.top + v.top, bottom: x.bottom - b.bottom + v.bottom, left: b.left - x.left + v.left, right: x.right - b.right + v.right }, T = t.modifiersData.offset;
  if (c === Xp && T) {
    var w = T[i];
    Object.keys(C).forEach(function(P) {
      var $ = [$a, Pa].indexOf(P) >= 0 ? 1 : -1, A = [_i, Pa].indexOf(P) >= 0 ? "y" : "x";
      C[P] += w[A] * $;
    });
  }
  return C;
}
function s2e(t, e) {
  e === void 0 && (e = {});
  var n = e, r = n.placement, i = n.boundary, a = n.rootBoundary, o = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? YD : l, c = kh(r), f = c ? s ? J3 : J3.filter(function(p) {
    return kh(p) === c;
  }) : T0, d = f.filter(function(p) {
    return u.indexOf(p) >= 0;
  });
  d.length === 0 && (d = f);
  var h = d.reduce(function(p, v) {
    return p[v] = dm(t, { placement: v, boundary: i, rootBoundary: a, padding: o })[jo(v)], p;
  }, {});
  return Object.keys(h).sort(function(p, v) {
    return h[p] - h[v];
  });
}
function l2e(t) {
  if (jo(t) === XD) return [];
  var e = D_(t);
  return [n6(t), e, n6(e)];
}
function u2e(t) {
  var e = t.state, n = t.options, r = t.name;
  if (!e.modifiersData[r]._skip) {
    for (var i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !0 : o, l = n.fallbackPlacements, u = n.padding, c = n.boundary, f = n.rootBoundary, d = n.altBoundary, h = n.flipVariations, p = h === void 0 ? !0 : h, v = n.allowedAutoPlacements, g = e.options.placement, m = jo(g), y = m === g, b = l || (y || !p ? [D_(g)] : l2e(g)), _ = [g].concat(b).reduce(function(ne, ee) {
      return ne.concat(jo(ee) === XD ? s2e(e, { placement: ee, boundary: c, rootBoundary: f, padding: u, flipVariations: p, allowedAutoPlacements: v }) : ee);
    }, []), O = e.rects.reference, S = e.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, T = _[0], w = 0; w < _.length; w++) {
      var P = _[w], $ = jo(P), A = kh(P) === Mh, D = [_i, Pa].indexOf($) >= 0, E = D ? "width" : "height", R = dm(e, { placement: P, boundary: c, rootBoundary: f, altBoundary: d, padding: u }), N = D ? A ? $a : Oi : A ? Pa : _i;
      O[E] > S[E] && (N = D_(N));
      var V = D_(N), z = [];
      if (a && z.push(R[$] <= 0), s && z.push(R[N] <= 0, R[V] <= 0), z.every(function(ne) {
        return ne;
      })) {
        T = P, C = !1;
        break;
      }
      x.set(P, z);
    }
    if (C) for (var W = p ? 3 : 1, F = function(ne) {
      var ee = _.find(function(oe) {
        var K = x.get(oe);
        if (K) return K.slice(0, ne).every(function(ie) {
          return ie;
        });
      });
      if (ee) return T = ee, "break";
    }, Q = W; Q > 0; Q--) {
      var Z = F(Q);
      if (Z === "break") break;
    }
    e.placement !== T && (e.modifiersData[r]._skip = !0, e.placement = T, e.reset = !0);
  }
}
var c2e = { name: "flip", enabled: !0, phase: "main", fn: u2e, requiresIfExists: ["offset"], data: { _skip: !1 } };
function i6(t, e, n) {
  return n === void 0 && (n = { x: 0, y: 0 }), { top: t.top - e.height - n.y, right: t.right - e.width + n.x, bottom: t.bottom - e.height + n.y, left: t.left - e.width - n.x };
}
function a6(t) {
  return [_i, $a, Pa, Oi].some(function(e) {
    return t[e] >= 0;
  });
}
function f2e(t) {
  var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, o = dm(e, { elementContext: "reference" }), s = dm(e, { altBoundary: !0 }), l = i6(o, r), u = i6(s, i, a), c = a6(l), f = a6(u);
  e.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: c, hasPopperEscaped: f }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": f });
}
var d2e = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: f2e };
function h2e(t, e, n) {
  var r = jo(t), i = [Oi, _i].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, { placement: t })) : n, o = a[0], s = a[1];
  return o = o || 0, s = (s || 0) * i, [Oi, $a].indexOf(r) >= 0 ? { x: s, y: o } : { x: o, y: s };
}
function p2e(t) {
  var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, o = YD.reduce(function(c, f) {
    return c[f] = h2e(f, e.rects, a), c;
  }, {}), s = o[e.placement], l = s.x, u = s.y;
  e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = o;
}
var v2e = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: p2e };
function g2e(t) {
  var e = t.state, n = t.name;
  e.modifiersData[n] = UY({ reference: e.rects.reference, element: e.rects.popper, strategy: "absolute", placement: e.placement });
}
var XY = { name: "popperOffsets", enabled: !0, phase: "read", fn: g2e, data: {} };
function m2e(t) {
  return t === "x" ? "y" : "x";
}
function y2e(t) {
  var e = t.state, n = t.options, r = t.name, i = n.mainAxis, a = i === void 0 ? !0 : i, o = n.altAxis, s = o === void 0 ? !1 : o, l = n.boundary, u = n.rootBoundary, c = n.altBoundary, f = n.padding, d = n.tether, h = d === void 0 ? !0 : d, p = n.tetherOffset, v = p === void 0 ? 0 : p, g = dm(e, { boundary: l, rootBoundary: u, padding: f, altBoundary: c }), m = jo(e.placement), y = kh(e.placement), b = !y, _ = JD(m), O = m2e(_), S = e.modifiersData.popperOffsets, x = e.rects.reference, C = e.rects.popper, T = typeof v == "function" ? v(Object.assign({}, e.rects, { placement: e.placement })) : v, w = typeof T == "number" ? { mainAxis: T, altAxis: T } : Object.assign({ mainAxis: 0, altAxis: 0 }, T), P = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, $ = { x: 0, y: 0 };
  if (S) {
    if (a) {
      var A, D = _ === "y" ? _i : Oi, E = _ === "y" ? Pa : $a, R = _ === "y" ? "height" : "width", N = S[_], V = N + g[D], z = N - g[E], W = h ? -C[R] / 2 : 0, F = y === Mh ? x[R] : C[R], Q = y === Mh ? -C[R] : -x[R], Z = e.elements.arrow, ne = h && Z ? KD(Z) : { width: 0, height: 0 }, ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : WY(), oe = ee[D], K = ee[E], ie = mg(0, x[R], ne[R]), X = b ? x[R] / 2 - W - ie - oe - w.mainAxis : F - ie - oe - w.mainAxis, H = b ? -x[R] / 2 + W + ie + K + w.mainAxis : Q + ie + K + w.mainAxis, G = e.elements.arrow && P0(e.elements.arrow), re = G ? _ === "y" ? G.clientTop || 0 : G.clientLeft || 0 : 0, fe = (A = P == null ? void 0 : P[_]) != null ? A : 0, de = N + X - fe - re, Ee = N + H - fe, $e = mg(h ? G1(V, de) : V, N, h ? Yc(z, Ee) : z);
      S[_] = $e, $[_] = $e - N;
    }
    if (s) {
      var Se, be = _ === "x" ? _i : Oi, he = _ === "x" ? Pa : $a, Te = S[O], ze = O === "y" ? "height" : "width", ut = Te + g[be], ct = Te - g[he], Dt = [_i, Oi].indexOf(m) !== -1, ve = (Se = P == null ? void 0 : P[O]) != null ? Se : 0, Xe = Dt ? ut : Te - x[ze] - C[ze] - ve + w.altAxis, Rt = Dt ? Te + x[ze] + C[ze] - ve - w.altAxis : ct, An = h && Dt ? G$e(Xe, Te, Rt) : mg(h ? Xe : ut, Te, h ? Rt : ct);
      S[O] = An, $[O] = An - Te;
    }
    e.modifiersData[r] = $;
  }
}
var b2e = { name: "preventOverflow", enabled: !0, phase: "main", fn: y2e, requiresIfExists: ["offset"] };
function _2e(t) {
  return { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop };
}
function O2e(t) {
  return t === ho(t) || !_a(t) ? eR(t) : _2e(t);
}
function S2e(t) {
  var e = t.getBoundingClientRect(), n = Dh(e.width) / t.offsetWidth || 1, r = Dh(e.height) / t.offsetHeight || 1;
  return n !== 1 || r !== 1;
}
function x2e(t, e, n) {
  n === void 0 && (n = !1);
  var r = _a(e), i = _a(e) && S2e(e), a = xu(e), o = Rh(t, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
  return (r || !r && !n) && ((ns(e) !== "body" || nR(a)) && (s = O2e(e)), _a(e) ? (l = Rh(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = tR(a))), { x: o.left + s.scrollLeft - l.x, y: o.top + s.scrollTop - l.y, width: o.width, height: o.height };
}
function w2e(t) {
  var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
  t.forEach(function(a) {
    e.set(a.name, a);
  });
  function i(a) {
    n.add(a.name);
    var o = [].concat(a.requires || [], a.requiresIfExists || []);
    o.forEach(function(s) {
      if (!n.has(s)) {
        var l = e.get(s);
        l && i(l);
      }
    }), r.push(a);
  }
  return t.forEach(function(a) {
    n.has(a.name) || i(a);
  }), r;
}
function C2e(t) {
  var e = w2e(t);
  return V$e.reduce(function(n, r) {
    return n.concat(e.filter(function(i) {
      return i.phase === r;
    }));
  }, []);
}
function T2e(t) {
  var e;
  return function() {
    return e || (e = new Promise(function(n) {
      Promise.resolve().then(function() {
        e = void 0, n(t());
      });
    })), e;
  };
}
function P2e(t) {
  var e = t.reduce(function(n, r) {
    var i = n[r.name];
    return n[r.name] = i ? Object.assign({}, i, r, { options: Object.assign({}, i.options, r.options), data: Object.assign({}, i.data, r.data) }) : r, n;
  }, {});
  return Object.keys(e).map(function(n) {
    return e[n];
  });
}
var o6 = { placement: "bottom", modifiers: [], strategy: "absolute" };
function s6() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
  return !e.some(function(r) {
    return !(r && typeof r.getBoundingClientRect == "function");
  });
}
function rR(t) {
  t === void 0 && (t = {});
  var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? o6 : i;
  return function(o, s, l) {
    l === void 0 && (l = a);
    var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, o6, a), modifiersData: {}, elements: { reference: o, popper: s }, attributes: {}, styles: {} }, c = [], f = !1, d = { state: u, setOptions: function(v) {
      var g = typeof v == "function" ? v(u.options) : v;
      p(), u.options = Object.assign({}, a, u.options, g), u.scrollParents = { reference: Ih(o) ? yg(o) : o.contextElement ? yg(o.contextElement) : [], popper: yg(s) };
      var m = C2e(P2e([].concat(r, u.options.modifiers)));
      return u.orderedModifiers = m.filter(function(y) {
        return y.enabled;
      }), h(), d.update();
    }, forceUpdate: function() {
      if (!f) {
        var v = u.elements, g = v.reference, m = v.popper;
        if (s6(g, m)) {
          u.rects = { reference: x2e(g, P0(m), u.options.strategy === "fixed"), popper: KD(m) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(C) {
            return u.modifiersData[C.name] = Object.assign({}, C.data);
          });
          for (var y = 0; y < u.orderedModifiers.length; y++) {
            if (u.reset === !0) {
              u.reset = !1, y = -1;
              continue;
            }
            var b = u.orderedModifiers[y], _ = b.fn, O = b.options, S = O === void 0 ? {} : O, x = b.name;
            typeof _ == "function" && (u = _({ state: u, options: S, name: x, instance: d }) || u);
          }
        }
      }
    }, update: T2e(function() {
      return new Promise(function(v) {
        d.forceUpdate(), v(u);
      });
    }), destroy: function() {
      p(), f = !0;
    } };
    if (!s6(o, s)) return d;
    d.setOptions(l).then(function(v) {
      !f && l.onFirstUpdate && l.onFirstUpdate(v);
    });
    function h() {
      u.orderedModifiers.forEach(function(v) {
        var g = v.name, m = v.options, y = m === void 0 ? {} : m, b = v.effect;
        if (typeof b == "function") {
          var _ = b({ state: u, name: g, instance: d, options: y }), O = function() {
          };
          c.push(_ || O);
        }
      });
    }
    function p() {
      c.forEach(function(v) {
        return v();
      }), c = [];
    }
    return d;
  };
}
rR();
var $2e = [jY, XY, GY, VY];
rR({ defaultModifiers: $2e });
var A2e = [jY, XY, GY, VY, v2e, c2e, b2e, X$e, d2e], E2e = rR({ defaultModifiers: A2e });
const M2e = (t, e, n = {}) => {
  const r = {
    name: "updateState",
    enabled: !0,
    phase: "write",
    fn: ({ state: l }) => {
      const u = I2e(l);
      Object.assign(o.value, u);
    },
    requires: ["computeStyles"]
  }, i = L(() => {
    const { onFirstUpdate: l, placement: u, strategy: c, modifiers: f } = B(n);
    return {
      onFirstUpdate: l,
      placement: u || "bottom",
      strategy: c || "absolute",
      modifiers: [
        ...f || [],
        r,
        { name: "applyStyles", enabled: !1 }
      ]
    };
  }), a = ae(), o = U({
    styles: {
      popper: {
        position: B(i).strategy,
        left: "0",
        top: "0"
      },
      arrow: {
        position: "absolute"
      }
    },
    attributes: {}
  }), s = () => {
    a.value && (a.value.destroy(), a.value = void 0);
  };
  return se(i, (l) => {
    const u = B(a);
    u && u.setOptions(l);
  }, {
    deep: !0
  }), se([t, e], ([l, u]) => {
    s(), !(!l || !u) && (a.value = E2e(l, u, B(i)));
  }), yt(() => {
    s();
  }), {
    state: L(() => {
      var l;
      return { ...((l = B(a)) == null ? void 0 : l.state) || {} };
    }),
    styles: L(() => B(o).styles),
    attributes: L(() => B(o).attributes),
    update: () => {
      var l;
      return (l = B(a)) == null ? void 0 : l.update();
    },
    forceUpdate: () => {
      var l;
      return (l = B(a)) == null ? void 0 : l.forceUpdate();
    },
    instanceRef: L(() => B(a))
  };
};
function I2e(t) {
  const e = Object.keys(t.elements), n = A1(e.map((i) => [i, t.styles[i] || {}])), r = A1(e.map((i) => [i, t.attributes[i]]));
  return {
    styles: n,
    attributes: r
  };
}
function l6() {
  let t;
  const e = (r, i) => {
    n(), t = window.setTimeout(r, i);
  }, n = () => window.clearTimeout(t);
  return HD(() => n()), {
    registerTimeout: e,
    cancelTimeout: n
  };
}
const nA = {
  prefix: Math.floor(Math.random() * 1e4),
  current: 0
}, D2e = Symbol("elIdInjection"), YY = () => vn() ? Ge(D2e, nA) : nA, iR = (t) => {
  const e = YY();
  !Yr && e === nA && Gi("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
  prefix: number,
  current: number,
})`);
  const n = UD();
  return L(() => B(t) || `${n.value}-id-${e.prefix}-${e.current++}`);
};
let Pd = [];
const u6 = (t) => {
  const e = t;
  e.key === Xc.esc && Pd.forEach((n) => n(e));
}, R2e = (t) => {
  it(() => {
    Pd.length === 0 && document.addEventListener("keydown", u6), Yr && Pd.push(t);
  }), yt(() => {
    Pd = Pd.filter((e) => e !== t), Pd.length === 0 && Yr && document.removeEventListener("keydown", u6);
  });
};
let c6;
const qY = () => {
  const t = UD(), e = YY(), n = L(() => `${t.value}-popper-container-${e.prefix}`), r = L(() => `#${n.value}`);
  return {
    id: n,
    selector: r
  };
}, k2e = (t) => {
  const e = document.createElement("div");
  return e.id = t, document.body.appendChild(e), e;
}, L2e = () => {
  const { id: t, selector: e } = qY();
  return HG(() => {
    Yr && (process.env.NODE_ENV === "test" || !c6 && !document.body.querySelector(e.value)) && (c6 = k2e(t.value));
  }), {
    id: t,
    selector: e
  };
}, N2e = rr({
  showAfter: {
    type: Number,
    default: 0
  },
  hideAfter: {
    type: Number,
    default: 200
  },
  autoClose: {
    type: Number,
    default: 0
  }
}), B2e = ({
  showAfter: t,
  hideAfter: e,
  autoClose: n,
  open: r,
  close: i
}) => {
  const { registerTimeout: a } = l6(), {
    registerTimeout: o,
    cancelTimeout: s
  } = l6();
  return {
    onOpen: (c) => {
      a(() => {
        r(c);
        const f = B(n);
        Ws(f) && f > 0 && o(() => {
          i(c);
        }, f);
      }, B(t));
    },
    onClose: (c) => {
      s(), a(() => {
        i(c);
      }, B(e));
    }
  };
}, KY = Symbol("elForwardRef"), z2e = (t) => {
  pt(KY, {
    setForwardRef: (n) => {
      t.value = n;
    }
  });
}, V2e = (t) => ({
  mounted(e) {
    t(e);
  },
  updated(e) {
    t(e);
  },
  unmounted() {
    t(null);
  }
}), f6 = {
  current: 0
}, d6 = U(0), F2e = 2e3, h6 = Symbol("elZIndexContextKey"), W2e = Symbol("zIndexContextKey"), Q2e = (t) => {
  const e = vn() ? Ge(h6, f6) : f6, n = vn() ? Ge(W2e, void 0) : void 0, r = L(() => {
    const o = B(n);
    return Ws(o) ? o : F2e;
  }), i = L(() => r.value + d6.value), a = () => (e.current++, d6.value = e.current, i.value);
  return !Yr && !Ge(h6) && Gi("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
    initialZIndex: r,
    currentZIndex: i,
    nextZIndex: a
  };
};
function H2e(t) {
  const e = U();
  function n() {
    if (t.value == null)
      return;
    const { selectionStart: i, selectionEnd: a, value: o } = t.value;
    if (i == null || a == null)
      return;
    const s = o.slice(0, Math.max(0, i)), l = o.slice(Math.max(0, a));
    e.value = {
      selectionStart: i,
      selectionEnd: a,
      value: o,
      beforeTxt: s,
      afterTxt: l
    };
  }
  function r() {
    if (t.value == null || e.value == null)
      return;
    const { value: i } = t.value, { beforeTxt: a, afterTxt: o, selectionStart: s } = e.value;
    if (a == null || o == null || s == null)
      return;
    let l = i.length;
    if (i.endsWith(o))
      l = i.length - o.length;
    else if (i.startsWith(a))
      l = a.length;
    else {
      const u = a[s - 1], c = i.indexOf(u, s - 1);
      c !== -1 && (l = c + 1);
    }
    t.value.setSelectionRange(l, l);
  }
  return [n, r];
}
const $0 = Tx({
  type: String,
  values: h$e,
  required: !1
}), G2e = Symbol("size"), j2e = () => {
  const t = Ge(G2e, {});
  return L(() => B(t.size) || "");
};
function JY(t, { afterFocus: e, beforeBlur: n, afterBlur: r } = {}) {
  const i = vn(), { emit: a } = i, o = ae(), s = U(!1), l = (f) => {
    s.value || (s.value = !0, a("focus", f), e == null || e());
  }, u = (f) => {
    var d;
    zv(n) && n(f) || f.relatedTarget && ((d = o.value) != null && d.contains(f.relatedTarget)) || (s.value = !1, a("blur", f), r == null || r());
  }, c = () => {
    var f;
    (f = t.value) == null || f.focus();
  };
  return se(o, (f) => {
    f && f.setAttribute("tabindex", "-1");
  }), I_(o, "click", c), {
    wrapperRef: o,
    isFocused: s,
    handleFocus: l,
    handleBlur: u
  };
}
const Z2e = rr({
  ariaLabel: String,
  ariaOrientation: {
    type: String,
    values: ["horizontal", "vertical", "undefined"]
  },
  ariaControls: String
}), A0 = (t) => am(Z2e, t), U2e = Symbol(), p6 = U();
function X2e(t, e = void 0) {
  const n = vn() ? Ge(U2e, p6) : p6;
  return L(() => {
    var r, i;
    return (i = (r = n.value) == null ? void 0 : r[t]) != null ? i : e;
  });
}
var Qn = (t, e) => {
  const n = t.__vccOpts || t;
  for (const [r, i] of e)
    n[r] = i;
  return n;
};
const Y2e = rr({
  size: {
    type: jt([Number, String])
  },
  color: {
    type: String
  }
}), q2e = te({
  name: "ElIcon",
  inheritAttrs: !1
}), K2e = /* @__PURE__ */ te({
  ...q2e,
  props: Y2e,
  setup(t) {
    const e = t, n = Jn("icon"), r = L(() => {
      const { size: i, color: a } = e;
      return !i && !a ? {} : {
        fontSize: XPe(i) ? void 0 : eA(i),
        "--color": a
      };
    });
    return (i, a) => (pe(), Qe("i", _n({
      class: B(n).b(),
      style: B(r)
    }, i.$attrs), [
      zn(i.$slots, "default")
    ], 16));
  }
});
var J2e = /* @__PURE__ */ Qn(K2e, [["__file", "icon.vue"]]);
const ws = Df(J2e), aR = Symbol("formContextKey"), j1 = Symbol("formItemContextKey"), $x = (t, e = {}) => {
  const n = U(void 0), r = e.prop ? n : BY("size"), i = e.global ? n : j2e(), a = e.form ? { size: void 0 } : Ge(aR, void 0), o = e.formItem ? { size: void 0 } : Ge(j1, void 0);
  return L(() => r.value || B(t) || (o == null ? void 0 : o.size) || (a == null ? void 0 : a.size) || i.value || "");
}, E0 = (t) => {
  const e = BY("disabled"), n = Ge(aR, void 0);
  return L(() => e.value || B(t) || (n == null ? void 0 : n.disabled) || !1);
}, Ax = () => {
  const t = Ge(aR, void 0), e = Ge(j1, void 0);
  return {
    form: t,
    formItem: e
  };
}, oR = (t, {
  formItemContext: e,
  disableIdGeneration: n,
  disableIdManagement: r
}) => {
  n || (n = U(!1)), r || (r = U(!1));
  const i = U();
  let a;
  const o = L(() => {
    var s;
    return !!(!(t.label || t.ariaLabel) && e && e.inputIds && ((s = e.inputIds) == null ? void 0 : s.length) <= 1);
  });
  return it(() => {
    a = se([Nn(t, "id"), n], ([s, l]) => {
      const u = s ?? (l ? void 0 : iR().value);
      u !== i.value && (e != null && e.removeInputId && (i.value && e.removeInputId(i.value), !(r != null && r.value) && !l && u && e.addInputId(u)), i.value = u);
    }, { immediate: !0 });
  }), nl(() => {
    a && a(), e != null && e.removeInputId && i.value && e.removeInputId(i.value);
  }), {
    isLabeledByFormItem: o,
    inputId: i
  };
};
let Fa;
const eAe = `
  height:0 !important;
  visibility:hidden !important;
  ${jPe() ? "" : "overflow:hidden !important;"}
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
`, tAe = [
  "letter-spacing",
  "line-height",
  "padding-top",
  "padding-bottom",
  "font-family",
  "font-weight",
  "font-size",
  "text-rendering",
  "text-transform",
  "width",
  "text-indent",
  "padding-left",
  "padding-right",
  "border-width",
  "box-sizing"
];
function nAe(t) {
  const e = window.getComputedStyle(t), n = e.getPropertyValue("box-sizing"), r = Number.parseFloat(e.getPropertyValue("padding-bottom")) + Number.parseFloat(e.getPropertyValue("padding-top")), i = Number.parseFloat(e.getPropertyValue("border-bottom-width")) + Number.parseFloat(e.getPropertyValue("border-top-width"));
  return { contextStyle: tAe.map((o) => `${o}:${e.getPropertyValue(o)}`).join(";"), paddingSize: r, borderSize: i, boxSizing: n };
}
function v6(t, e = 1, n) {
  var r;
  Fa || (Fa = document.createElement("textarea"), document.body.appendChild(Fa));
  const { paddingSize: i, borderSize: a, boxSizing: o, contextStyle: s } = nAe(t);
  Fa.setAttribute("style", `${s};${eAe}`), Fa.value = t.value || t.placeholder || "";
  let l = Fa.scrollHeight;
  const u = {};
  o === "border-box" ? l = l + a : o === "content-box" && (l = l - i), Fa.value = "";
  const c = Fa.scrollHeight - i;
  if (Ws(e)) {
    let f = c * e;
    o === "border-box" && (f = f + i + a), l = Math.max(f, l), u.minHeight = `${f}px`;
  }
  if (Ws(n)) {
    let f = c * n;
    o === "border-box" && (f = f + i + a), l = Math.min(f, l);
  }
  return u.height = `${l}px`, (r = Fa.parentNode) == null || r.removeChild(Fa), Fa = void 0, u;
}
const rAe = rr({
  id: {
    type: String,
    default: void 0
  },
  size: $0,
  disabled: Boolean,
  modelValue: {
    type: jt([
      String,
      Number,
      Object
    ]),
    default: ""
  },
  maxlength: {
    type: [String, Number]
  },
  minlength: {
    type: [String, Number]
  },
  type: {
    type: String,
    default: "text"
  },
  resize: {
    type: String,
    values: ["none", "both", "horizontal", "vertical"]
  },
  autosize: {
    type: jt([Boolean, Object]),
    default: !1
  },
  autocomplete: {
    type: String,
    default: "off"
  },
  formatter: {
    type: Function
  },
  parser: {
    type: Function
  },
  placeholder: {
    type: String
  },
  form: {
    type: String
  },
  readonly: {
    type: Boolean,
    default: !1
  },
  clearable: {
    type: Boolean,
    default: !1
  },
  showPassword: {
    type: Boolean,
    default: !1
  },
  showWordLimit: {
    type: Boolean,
    default: !1
  },
  suffixIcon: {
    type: H1
  },
  prefixIcon: {
    type: H1
  },
  containerRole: {
    type: String,
    default: void 0
  },
  label: {
    type: String,
    default: void 0
  },
  tabindex: {
    type: [String, Number],
    default: 0
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  inputStyle: {
    type: jt([Object, Array, String]),
    default: () => v$e({})
  },
  autofocus: {
    type: Boolean,
    default: !1
  },
  ...A0(["ariaLabel"])
}), iAe = {
  [Qs]: (t) => ba(t),
  input: (t) => ba(t),
  change: (t) => ba(t),
  focus: (t) => t instanceof FocusEvent,
  blur: (t) => t instanceof FocusEvent,
  clear: () => !0,
  mouseleave: (t) => t instanceof MouseEvent,
  mouseenter: (t) => t instanceof MouseEvent,
  keydown: (t) => t instanceof Event,
  compositionstart: (t) => t instanceof CompositionEvent,
  compositionupdate: (t) => t instanceof CompositionEvent,
  compositionend: (t) => t instanceof CompositionEvent
}, aAe = ["role"], oAe = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], sAe = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], lAe = te({
  name: "ElInput",
  inheritAttrs: !1
}), uAe = /* @__PURE__ */ te({
  ...lAe,
  props: rAe,
  emits: iAe,
  setup(t, { expose: e, emit: n }) {
    const r = t, i = Qle(), a = ZG(), o = L(() => {
      const ve = {};
      return r.containerRole === "combobox" && (ve["aria-haspopup"] = i["aria-haspopup"], ve["aria-owns"] = i["aria-owns"], ve["aria-expanded"] = i["aria-expanded"]), ve;
    }), s = L(() => [
      r.type === "textarea" ? g.b() : v.b(),
      v.m(h.value),
      v.is("disabled", p.value),
      v.is("exceed", ne.value),
      {
        [v.b("group")]: a.prepend || a.append,
        [v.m("prefix")]: a.prefix || r.prefixIcon,
        [v.m("suffix")]: a.suffix || r.suffixIcon || r.clearable || r.showPassword,
        [v.bm("suffix", "password-clear")]: W.value && F.value,
        [v.b("hidden")]: r.type === "hidden"
      },
      i.class
    ]), l = L(() => [
      v.e("wrapper"),
      v.is("focus", w.value)
    ]), u = y$e({
      excludeKeys: L(() => Object.keys(o.value))
    }), { form: c, formItem: f } = Ax(), { inputId: d } = oR(r, {
      formItemContext: f
    }), h = $x(), p = E0(), v = Jn("input"), g = Jn("textarea"), m = ae(), y = ae(), b = U(!1), _ = U(!1), O = U(!1), S = U(), x = ae(r.inputStyle), C = L(() => m.value || y.value), { wrapperRef: T, isFocused: w, handleFocus: P, handleBlur: $ } = JY(C, {
      afterBlur() {
        var ve;
        r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "blur").catch((Xe) => Gi(Xe)));
      }
    }), A = L(() => {
      var ve;
      return (ve = c == null ? void 0 : c.statusIcon) != null ? ve : !1;
    }), D = L(() => (f == null ? void 0 : f.validateState) || ""), E = L(() => D.value && d$e[D.value]), R = L(() => O.value ? c$e : s$e), N = L(() => [
      i.style
    ]), V = L(() => [
      r.inputStyle,
      x.value,
      { resize: r.resize }
    ]), z = L(() => Gl(r.modelValue) ? "" : String(r.modelValue)), W = L(() => r.clearable && !p.value && !r.readonly && !!z.value && (w.value || b.value)), F = L(() => r.showPassword && !p.value && !r.readonly && !!z.value && (!!z.value || w.value)), Q = L(() => r.showWordLimit && !!r.maxlength && (r.type === "text" || r.type === "textarea") && !p.value && !r.readonly && !r.showPassword), Z = L(() => z.value.length), ne = L(() => !!Q.value && Z.value > Number(r.maxlength)), ee = L(() => !!a.suffix || !!r.suffixIcon || W.value || r.showPassword || Q.value || !!D.value && A.value), [oe, K] = H2e(m);
    VPe(y, (ve) => {
      if (H(), !Q.value || r.resize !== "both")
        return;
      const Xe = ve[0], { width: Rt } = Xe.contentRect;
      S.value = {
        right: `calc(100% - ${Rt + 15 + 6}px)`
      };
    });
    const ie = () => {
      const { type: ve, autosize: Xe } = r;
      if (!(!Yr || ve !== "textarea" || !y.value))
        if (Xe) {
          const Rt = um(Xe) ? Xe.minRows : void 0, An = um(Xe) ? Xe.maxRows : void 0, sn = v6(y.value, Rt, An);
          x.value = {
            overflowY: "hidden",
            ...sn
          }, Tt(() => {
            y.value.offsetHeight, x.value = sn;
          });
        } else
          x.value = {
            minHeight: v6(y.value).minHeight
          };
    }, H = ((ve) => {
      let Xe = !1;
      return () => {
        var Rt;
        if (Xe || !r.autosize)
          return;
        ((Rt = y.value) == null ? void 0 : Rt.offsetParent) === null || (ve(), Xe = !0);
      };
    })(ie), G = () => {
      const ve = C.value, Xe = r.formatter ? r.formatter(z.value) : z.value;
      !ve || ve.value === Xe || (ve.value = Xe);
    }, re = async (ve) => {
      oe();
      let { value: Xe } = ve.target;
      if (r.formatter && (Xe = r.parser ? r.parser(Xe) : Xe), !_.value) {
        if (Xe === z.value) {
          G();
          return;
        }
        n(Qs, Xe), n("input", Xe), await Tt(), G(), K();
      }
    }, fe = (ve) => {
      n("change", ve.target.value);
    }, de = (ve) => {
      n("compositionstart", ve), _.value = !0;
    }, Ee = (ve) => {
      var Xe;
      n("compositionupdate", ve);
      const Rt = (Xe = ve.target) == null ? void 0 : Xe.value, An = Rt[Rt.length - 1] || "";
      _.value = !p$e(An);
    }, $e = (ve) => {
      n("compositionend", ve), _.value && (_.value = !1, re(ve));
    }, Se = () => {
      O.value = !O.value, be();
    }, be = async () => {
      var ve;
      await Tt(), (ve = C.value) == null || ve.focus();
    }, he = () => {
      var ve;
      return (ve = C.value) == null ? void 0 : ve.blur();
    }, Te = (ve) => {
      b.value = !1, n("mouseleave", ve);
    }, ze = (ve) => {
      b.value = !0, n("mouseenter", ve);
    }, ut = (ve) => {
      n("keydown", ve);
    }, ct = () => {
      var ve;
      (ve = C.value) == null || ve.select();
    }, Dt = () => {
      n(Qs, ""), n("change", ""), n("clear"), n("input", "");
    };
    return se(() => r.modelValue, () => {
      var ve;
      Tt(() => ie()), r.validateEvent && ((ve = f == null ? void 0 : f.validate) == null || ve.call(f, "change").catch((Xe) => Gi(Xe)));
    }), se(z, () => G()), se(() => r.type, async () => {
      await Tt(), G(), ie();
    }), it(() => {
      !r.formatter && r.parser && Gi("ElInput", "If you set the parser, you also need to set the formatter."), G(), Tt(ie);
    }), C0({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-input",
      ref: "https://element-plus.org/en-US/component/input.html"
    }, L(() => !!r.label)), e({
      input: m,
      textarea: y,
      ref: C,
      textareaStyle: V,
      autosize: Nn(r, "autosize"),
      focus: be,
      blur: he,
      select: ct,
      clear: Dt,
      resizeTextarea: ie
    }), (ve, Xe) => (pe(), Qe("div", _n(B(o), {
      class: [
        B(s),
        {
          [B(v).bm("group", "append")]: ve.$slots.append,
          [B(v).bm("group", "prepend")]: ve.$slots.prepend
        }
      ],
      style: B(N),
      role: ve.containerRole,
      onMouseenter: ze,
      onMouseleave: Te
    }), [
      _t(" input "),
      ve.type !== "textarea" ? (pe(), Qe(wt, { key: 0 }, [
        _t(" prepend slot "),
        ve.$slots.prepend ? (pe(), Qe("div", {
          key: 0,
          class: Ye(B(v).be("group", "prepend"))
        }, [
          zn(ve.$slots, "prepend")
        ], 2)) : _t("v-if", !0),
        He("div", {
          ref_key: "wrapperRef",
          ref: T,
          class: Ye(B(l))
        }, [
          _t(" prefix slot "),
          ve.$slots.prefix || ve.prefixIcon ? (pe(), Qe("span", {
            key: 0,
            class: Ye(B(v).e("prefix"))
          }, [
            He("span", {
              class: Ye(B(v).e("prefix-inner"))
            }, [
              zn(ve.$slots, "prefix"),
              ve.prefixIcon ? (pe(), je(B(ws), {
                key: 0,
                class: Ye(B(v).e("icon"))
              }, {
                default: we(() => [
                  (pe(), je(Ec(ve.prefixIcon)))
                ]),
                _: 1
              }, 8, ["class"])) : _t("v-if", !0)
            ], 2)
          ], 2)) : _t("v-if", !0),
          He("input", _n({
            id: B(d),
            ref_key: "input",
            ref: m,
            class: B(v).e("inner")
          }, B(u), {
            minlength: ve.minlength,
            maxlength: ve.maxlength,
            type: ve.showPassword ? O.value ? "text" : "password" : ve.type,
            disabled: B(p),
            readonly: ve.readonly,
            autocomplete: ve.autocomplete,
            tabindex: ve.tabindex,
            "aria-label": ve.label || ve.ariaLabel,
            placeholder: ve.placeholder,
            style: ve.inputStyle,
            form: ve.form,
            autofocus: ve.autofocus,
            onCompositionstart: de,
            onCompositionupdate: Ee,
            onCompositionend: $e,
            onInput: re,
            onFocus: Xe[0] || (Xe[0] = (...Rt) => B(P) && B(P)(...Rt)),
            onBlur: Xe[1] || (Xe[1] = (...Rt) => B($) && B($)(...Rt)),
            onChange: fe,
            onKeydown: ut
          }), null, 16, oAe),
          _t(" suffix slot "),
          B(ee) ? (pe(), Qe("span", {
            key: 1,
            class: Ye(B(v).e("suffix"))
          }, [
            He("span", {
              class: Ye(B(v).e("suffix-inner"))
            }, [
              !B(W) || !B(F) || !B(Q) ? (pe(), Qe(wt, { key: 0 }, [
                zn(ve.$slots, "suffix"),
                ve.suffixIcon ? (pe(), je(B(ws), {
                  key: 0,
                  class: Ye(B(v).e("icon"))
                }, {
                  default: we(() => [
                    (pe(), je(Ec(ve.suffixIcon)))
                  ]),
                  _: 1
                }, 8, ["class"])) : _t("v-if", !0)
              ], 64)) : _t("v-if", !0),
              B(W) ? (pe(), je(B(ws), {
                key: 1,
                class: Ye([B(v).e("icon"), B(v).e("clear")]),
                onMousedown: lf(B(lm), ["prevent"]),
                onClick: Dt
              }, {
                default: we(() => [
                  M(B(DY))
                ]),
                _: 1
              }, 8, ["class", "onMousedown"])) : _t("v-if", !0),
              B(F) ? (pe(), je(B(ws), {
                key: 2,
                class: Ye([B(v).e("icon"), B(v).e("password")]),
                onClick: Se
              }, {
                default: we(() => [
                  (pe(), je(Ec(B(R))))
                ]),
                _: 1
              }, 8, ["class"])) : _t("v-if", !0),
              B(Q) ? (pe(), Qe("span", {
                key: 3,
                class: Ye(B(v).e("count"))
              }, [
                He("span", {
                  class: Ye(B(v).e("count-inner"))
                }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 3)
              ], 2)) : _t("v-if", !0),
              B(D) && B(E) && B(A) ? (pe(), je(B(ws), {
                key: 4,
                class: Ye([
                  B(v).e("icon"),
                  B(v).e("validateIcon"),
                  B(v).is("loading", B(D) === "validating")
                ])
              }, {
                default: we(() => [
                  (pe(), je(Ec(B(E))))
                ]),
                _: 1
              }, 8, ["class"])) : _t("v-if", !0)
            ], 2)
          ], 2)) : _t("v-if", !0)
        ], 2),
        _t(" append slot "),
        ve.$slots.append ? (pe(), Qe("div", {
          key: 1,
          class: Ye(B(v).be("group", "append"))
        }, [
          zn(ve.$slots, "append")
        ], 2)) : _t("v-if", !0)
      ], 64)) : (pe(), Qe(wt, { key: 1 }, [
        _t(" textarea "),
        He("textarea", _n({
          id: B(d),
          ref_key: "textarea",
          ref: y,
          class: [B(g).e("inner"), B(v).is("focus", B(w))]
        }, B(u), {
          minlength: ve.minlength,
          maxlength: ve.maxlength,
          tabindex: ve.tabindex,
          disabled: B(p),
          readonly: ve.readonly,
          autocomplete: ve.autocomplete,
          style: B(V),
          "aria-label": ve.label || ve.ariaLabel,
          placeholder: ve.placeholder,
          form: ve.form,
          autofocus: ve.autofocus,
          onCompositionstart: de,
          onCompositionupdate: Ee,
          onCompositionend: $e,
          onInput: re,
          onFocus: Xe[2] || (Xe[2] = (...Rt) => B(P) && B(P)(...Rt)),
          onBlur: Xe[3] || (Xe[3] = (...Rt) => B($) && B($)(...Rt)),
          onChange: fe,
          onKeydown: ut
        }), null, 16, sAe),
        B(Q) ? (pe(), Qe("span", {
          key: 0,
          style: Sr(S.value),
          class: Ye(B(v).e("count"))
        }, Bi(B(Z)) + " / " + Bi(ve.maxlength), 7)) : _t("v-if", !0)
      ], 64))
    ], 16, aAe));
  }
});
var cAe = /* @__PURE__ */ Qn(uAe, [["__file", "input.vue"]]);
const sR = Df(cAe), lR = Symbol("popper"), eq = Symbol("popperContent"), fAe = [
  "dialog",
  "grid",
  "group",
  "listbox",
  "menu",
  "navigation",
  "tooltip",
  "tree"
], tq = rr({
  role: {
    type: String,
    values: fAe,
    default: "tooltip"
  }
}), dAe = te({
  name: "ElPopper",
  inheritAttrs: !1
}), hAe = /* @__PURE__ */ te({
  ...dAe,
  props: tq,
  setup(t, { expose: e }) {
    const n = t, r = U(), i = U(), a = U(), o = U(), s = L(() => n.role), l = {
      triggerRef: r,
      popperInstanceRef: i,
      contentRef: a,
      referenceRef: o,
      role: s
    };
    return e(l), pt(lR, l), (u, c) => zn(u.$slots, "default");
  }
});
var pAe = /* @__PURE__ */ Qn(hAe, [["__file", "popper.vue"]]);
const nq = rr({
  arrowOffset: {
    type: Number,
    default: 5
  }
}), vAe = te({
  name: "ElPopperArrow",
  inheritAttrs: !1
}), gAe = /* @__PURE__ */ te({
  ...vAe,
  props: nq,
  setup(t, { expose: e }) {
    const n = t, r = Jn("popper"), { arrowOffset: i, arrowRef: a, arrowStyle: o } = Ge(eq, void 0);
    return se(() => n.arrowOffset, (s) => {
      i.value = s;
    }), yt(() => {
      a.value = void 0;
    }), e({
      arrowRef: a
    }), (s, l) => (pe(), Qe("span", {
      ref_key: "arrowRef",
      ref: a,
      class: Ye(B(r).e("arrow")),
      style: Sr(B(o)),
      "data-popper-arrow": ""
    }, null, 6));
  }
});
var mAe = /* @__PURE__ */ Qn(gAe, [["__file", "arrow.vue"]]);
const LC = "ElOnlyChild", yAe = te({
  name: LC,
  setup(t, {
    slots: e,
    attrs: n
  }) {
    var r;
    const i = Ge(KY), a = V2e((r = i == null ? void 0 : i.setForwardRef) != null ? r : lm);
    return () => {
      var o;
      const s = (o = e.default) == null ? void 0 : o.call(e, n);
      if (!s)
        return null;
      if (s.length > 1)
        return Gi(LC, "requires exact only one valid child."), null;
      const l = rq(s);
      return l ? bi(Ns(l, n), [[a]]) : (Gi(LC, "no valid child node found"), null);
    };
  }
});
function rq(t) {
  if (!t)
    return null;
  const e = t;
  for (const n of e) {
    if (um(n))
      switch (n.type) {
        case QG:
          continue;
        case TS:
        case "svg":
          return g6(n);
        case wt:
          return rq(n.children);
        default:
          return n;
      }
    return g6(n);
  }
  return null;
}
function g6(t) {
  const e = Jn("only-child");
  return M("span", {
    class: e.e("content")
  }, [t]);
}
const iq = rr({
  virtualRef: {
    type: jt(Object)
  },
  virtualTriggering: Boolean,
  onMouseenter: {
    type: jt(Function)
  },
  onMouseleave: {
    type: jt(Function)
  },
  onClick: {
    type: jt(Function)
  },
  onKeydown: {
    type: jt(Function)
  },
  onFocus: {
    type: jt(Function)
  },
  onBlur: {
    type: jt(Function)
  },
  onContextmenu: {
    type: jt(Function)
  },
  id: String,
  open: Boolean
}), bAe = te({
  name: "ElPopperTrigger",
  inheritAttrs: !1
}), _Ae = /* @__PURE__ */ te({
  ...bAe,
  props: iq,
  setup(t, { expose: e }) {
    const n = t, { role: r, triggerRef: i } = Ge(lR, void 0);
    z2e(i);
    const a = L(() => s.value ? n.id : void 0), o = L(() => {
      if (r && r.value === "tooltip")
        return n.open && n.id ? n.id : void 0;
    }), s = L(() => {
      if (r && r.value !== "tooltip")
        return r.value;
    }), l = L(() => s.value ? `${n.open}` : void 0);
    let u;
    return it(() => {
      se(() => n.virtualRef, (c) => {
        c && (i.value = Rl(c));
      }, {
        immediate: !0
      }), se(i, (c, f) => {
        u == null || u(), u = void 0, cm(c) && ([
          "onMouseenter",
          "onMouseleave",
          "onClick",
          "onKeydown",
          "onFocus",
          "onBlur",
          "onContextmenu"
        ].forEach((d) => {
          var h;
          const p = n[d];
          p && (c.addEventListener(d.slice(2).toLowerCase(), p), (h = f == null ? void 0 : f.removeEventListener) == null || h.call(f, d.slice(2).toLowerCase(), p));
        }), u = se([a, o, s, l], (d) => {
          [
            "aria-controls",
            "aria-describedby",
            "aria-haspopup",
            "aria-expanded"
          ].forEach((h, p) => {
            Gl(d[p]) ? c.removeAttribute(h) : c.setAttribute(h, d[p]);
          });
        }, { immediate: !0 })), cm(f) && [
          "aria-controls",
          "aria-describedby",
          "aria-haspopup",
          "aria-expanded"
        ].forEach((d) => f.removeAttribute(d));
      }, {
        immediate: !0
      });
    }), yt(() => {
      u == null || u(), u = void 0;
    }), e({
      triggerRef: i
    }), (c, f) => c.virtualTriggering ? _t("v-if", !0) : (pe(), je(B(yAe), _n({ key: 0 }, c.$attrs, {
      "aria-controls": B(a),
      "aria-describedby": B(o),
      "aria-expanded": B(l),
      "aria-haspopup": B(s)
    }), {
      default: we(() => [
        zn(c.$slots, "default")
      ]),
      _: 3
    }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
  }
});
var OAe = /* @__PURE__ */ Qn(_Ae, [["__file", "trigger.vue"]]);
const NC = "focus-trap.focus-after-trapped", BC = "focus-trap.focus-after-released", SAe = "focus-trap.focusout-prevented", m6 = {
  cancelable: !0,
  bubbles: !1
}, xAe = {
  cancelable: !0,
  bubbles: !1
}, y6 = "focusAfterTrapped", b6 = "focusAfterReleased", wAe = Symbol("elFocusTrap"), uR = U(), Ex = U(0), cR = U(0);
let Ly = 0;
const aq = (t) => {
  const e = [], n = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
    acceptNode: (r) => {
      const i = r.tagName === "INPUT" && r.type === "hidden";
      return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 || r === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
    }
  });
  for (; n.nextNode(); )
    e.push(n.currentNode);
  return e;
}, _6 = (t, e) => {
  for (const n of t)
    if (!CAe(n, e))
      return n;
}, CAe = (t, e) => {
  if (process.env.NODE_ENV === "test")
    return !1;
  if (getComputedStyle(t).visibility === "hidden")
    return !0;
  for (; t; ) {
    if (e && t === e)
      return !1;
    if (getComputedStyle(t).display === "none")
      return !0;
    t = t.parentElement;
  }
  return !1;
}, TAe = (t) => {
  const e = aq(t), n = _6(e, t), r = _6(e.reverse(), t);
  return [n, r];
}, PAe = (t) => t instanceof HTMLInputElement && "select" in t, _l = (t, e) => {
  if (t && t.focus) {
    const n = document.activeElement;
    t.focus({ preventScroll: !0 }), cR.value = window.performance.now(), t !== n && PAe(t) && e && t.select();
  }
};
function O6(t, e) {
  const n = [...t], r = t.indexOf(e);
  return r !== -1 && n.splice(r, 1), n;
}
const $Ae = () => {
  let t = [];
  return {
    push: (r) => {
      const i = t[0];
      i && r !== i && i.pause(), t = O6(t, r), t.unshift(r);
    },
    remove: (r) => {
      var i, a;
      t = O6(t, r), (a = (i = t[0]) == null ? void 0 : i.resume) == null || a.call(i);
    }
  };
}, AAe = (t, e = !1) => {
  const n = document.activeElement;
  for (const r of t)
    if (_l(r, e), document.activeElement !== n)
      return;
}, S6 = $Ae(), EAe = () => Ex.value > cR.value, Ny = () => {
  uR.value = "pointer", Ex.value = window.performance.now();
}, x6 = () => {
  uR.value = "keyboard", Ex.value = window.performance.now();
}, MAe = () => (it(() => {
  Ly === 0 && (document.addEventListener("mousedown", Ny), document.addEventListener("touchstart", Ny), document.addEventListener("keydown", x6)), Ly++;
}), yt(() => {
  Ly--, Ly <= 0 && (document.removeEventListener("mousedown", Ny), document.removeEventListener("touchstart", Ny), document.removeEventListener("keydown", x6));
}), {
  focusReason: uR,
  lastUserFocusTimestamp: Ex,
  lastAutomatedFocusTimestamp: cR
}), By = (t) => new CustomEvent(SAe, {
  ...xAe,
  detail: t
}), IAe = te({
  name: "ElFocusTrap",
  inheritAttrs: !1,
  props: {
    loop: Boolean,
    trapped: Boolean,
    focusTrapEl: Object,
    focusStartEl: {
      type: [Object, String],
      default: "first"
    }
  },
  emits: [
    y6,
    b6,
    "focusin",
    "focusout",
    "focusout-prevented",
    "release-requested"
  ],
  setup(t, { emit: e }) {
    const n = U();
    let r, i;
    const { focusReason: a } = MAe();
    R2e((p) => {
      t.trapped && !o.paused && e("release-requested", p);
    });
    const o = {
      paused: !1,
      pause() {
        this.paused = !0;
      },
      resume() {
        this.paused = !1;
      }
    }, s = (p) => {
      if (!t.loop && !t.trapped || o.paused)
        return;
      const { key: v, altKey: g, ctrlKey: m, metaKey: y, currentTarget: b, shiftKey: _ } = p, { loop: O } = t, S = v === Xc.tab && !g && !m && !y, x = document.activeElement;
      if (S && x) {
        const C = b, [T, w] = TAe(C);
        if (T && w) {
          if (!_ && x === w) {
            const $ = By({
              focusReason: a.value
            });
            e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(T, !0));
          } else if (_ && [T, C].includes(x)) {
            const $ = By({
              focusReason: a.value
            });
            e("focusout-prevented", $), $.defaultPrevented || (p.preventDefault(), O && _l(w, !0));
          }
        } else if (x === C) {
          const $ = By({
            focusReason: a.value
          });
          e("focusout-prevented", $), $.defaultPrevented || p.preventDefault();
        }
      }
    };
    pt(wAe, {
      focusTrapRef: n,
      onKeydown: s
    }), se(() => t.focusTrapEl, (p) => {
      p && (n.value = p);
    }, { immediate: !0 }), se([n], ([p], [v]) => {
      p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", f)), v && (v.removeEventListener("keydown", s), v.removeEventListener("focusin", c), v.removeEventListener("focusout", f));
    });
    const l = (p) => {
      e(y6, p);
    }, u = (p) => e(b6, p), c = (p) => {
      const v = B(n);
      if (!v)
        return;
      const g = p.target, m = p.relatedTarget, y = g && v.contains(g);
      t.trapped || m && v.contains(m) || (r = m), y && e("focusin", p), !o.paused && t.trapped && (y ? i = g : _l(i, !0));
    }, f = (p) => {
      const v = B(n);
      if (!(o.paused || !v))
        if (t.trapped) {
          const g = p.relatedTarget;
          !Gl(g) && !v.contains(g) && setTimeout(() => {
            if (!o.paused && t.trapped) {
              const m = By({
                focusReason: a.value
              });
              e("focusout-prevented", m), m.defaultPrevented || _l(i, !0);
            }
          }, 0);
        } else {
          const g = p.target;
          g && v.contains(g) || e("focusout", p);
        }
    };
    async function d() {
      await Tt();
      const p = B(n);
      if (p) {
        S6.push(o);
        const v = p.contains(document.activeElement) ? r : document.activeElement;
        if (r = v, !p.contains(v)) {
          const m = new Event(NC, m6);
          p.addEventListener(NC, l), p.dispatchEvent(m), m.defaultPrevented || Tt(() => {
            let y = t.focusStartEl;
            ba(y) || (_l(y), document.activeElement !== y && (y = "first")), y === "first" && AAe(aq(p), !0), (document.activeElement === v || y === "container") && _l(p);
          });
        }
      }
    }
    function h() {
      const p = B(n);
      if (p) {
        p.removeEventListener(NC, l);
        const v = new CustomEvent(BC, {
          ...m6,
          detail: {
            focusReason: a.value
          }
        });
        p.addEventListener(BC, u), p.dispatchEvent(v), !v.defaultPrevented && (a.value == "keyboard" || !EAe() || p.contains(document.activeElement)) && _l(r ?? document.body), p.removeEventListener(BC, u), S6.remove(o);
      }
    }
    return it(() => {
      t.trapped && d(), se(() => t.trapped, (p) => {
        p ? d() : h();
      });
    }), yt(() => {
      t.trapped && h();
    }), {
      onKeydown: s
    };
  }
});
function DAe(t, e, n, r, i, a) {
  return zn(t.$slots, "default", { handleKeydown: t.onKeydown });
}
var RAe = /* @__PURE__ */ Qn(IAe, [["render", DAe], ["__file", "focus-trap.vue"]]);
const kAe = ["fixed", "absolute"], LAe = rr({
  boundariesPadding: {
    type: Number,
    default: 0
  },
  fallbackPlacements: {
    type: jt(Array),
    default: void 0
  },
  gpuAcceleration: {
    type: Boolean,
    default: !0
  },
  offset: {
    type: Number,
    default: 12
  },
  placement: {
    type: String,
    values: YD,
    default: "bottom"
  },
  popperOptions: {
    type: jt(Object),
    default: () => ({})
  },
  strategy: {
    type: String,
    values: kAe,
    default: "absolute"
  }
}), oq = rr({
  ...LAe,
  id: String,
  style: {
    type: jt([String, Array, Object])
  },
  className: {
    type: jt([String, Array, Object])
  },
  effect: {
    type: String,
    default: "dark"
  },
  visible: Boolean,
  enterable: {
    type: Boolean,
    default: !0
  },
  pure: Boolean,
  focusOnShow: {
    type: Boolean,
    default: !1
  },
  trapping: {
    type: Boolean,
    default: !1
  },
  popperClass: {
    type: jt([String, Array, Object])
  },
  popperStyle: {
    type: jt([String, Array, Object])
  },
  referenceEl: {
    type: jt(Object)
  },
  triggerTargetEl: {
    type: jt(Object)
  },
  stopPopperMouseEvent: {
    type: Boolean,
    default: !0
  },
  virtualTriggering: Boolean,
  zIndex: Number,
  ...A0(["ariaLabel"])
}), NAe = {
  mouseenter: (t) => t instanceof MouseEvent,
  mouseleave: (t) => t instanceof MouseEvent,
  focus: () => !0,
  blur: () => !0,
  close: () => !0
}, BAe = (t, e = []) => {
  const { placement: n, strategy: r, popperOptions: i } = t, a = {
    placement: n,
    strategy: r,
    ...i,
    modifiers: [...VAe(t), ...e]
  };
  return FAe(a, i == null ? void 0 : i.modifiers), a;
}, zAe = (t) => {
  if (Yr)
    return Rl(t);
};
function VAe(t) {
  const { offset: e, gpuAcceleration: n, fallbackPlacements: r } = t;
  return [
    {
      name: "offset",
      options: {
        offset: [0, e ?? 12]
      }
    },
    {
      name: "preventOverflow",
      options: {
        padding: {
          top: 2,
          bottom: 2,
          left: 5,
          right: 5
        }
      }
    },
    {
      name: "flip",
      options: {
        padding: 5,
        fallbackPlacements: r
      }
    },
    {
      name: "computeStyles",
      options: {
        gpuAcceleration: n
      }
    }
  ];
}
function FAe(t, e) {
  e && (t.modifiers = [...t.modifiers, ...e ?? []]);
}
const WAe = 0, QAe = (t) => {
  const { popperInstanceRef: e, contentRef: n, triggerRef: r, role: i } = Ge(lR, void 0), a = U(), o = U(), s = L(() => ({
    name: "eventListeners",
    enabled: !!t.visible
  })), l = L(() => {
    var m;
    const y = B(a), b = (m = B(o)) != null ? m : WAe;
    return {
      name: "arrow",
      enabled: !Abe(y),
      options: {
        element: y,
        padding: b
      }
    };
  }), u = L(() => ({
    onFirstUpdate: () => {
      p();
    },
    ...BAe(t, [
      B(l),
      B(s)
    ])
  })), c = L(() => zAe(t.referenceEl) || B(r)), { attributes: f, state: d, styles: h, update: p, forceUpdate: v, instanceRef: g } = M2e(c, n, u);
  return se(g, (m) => e.value = m), it(() => {
    se(() => {
      var m;
      return (m = B(c)) == null ? void 0 : m.getBoundingClientRect();
    }, () => {
      p();
    });
  }), {
    attributes: f,
    arrowRef: a,
    contentRef: n,
    instanceRef: g,
    state: d,
    styles: h,
    role: i,
    forceUpdate: v,
    update: p
  };
}, HAe = (t, {
  attributes: e,
  styles: n,
  role: r
}) => {
  const { nextZIndex: i } = Q2e(), a = Jn("popper"), o = L(() => B(e).popper), s = U(Ws(t.zIndex) ? t.zIndex : i()), l = L(() => [
    a.b(),
    a.is("pure", t.pure),
    a.is(t.effect),
    t.popperClass
  ]), u = L(() => [
    { zIndex: B(s) },
    B(n).popper,
    t.popperStyle || {}
  ]), c = L(() => r.value === "dialog" ? "false" : void 0), f = L(() => B(n).arrow || {});
  return {
    ariaModal: c,
    arrowStyle: f,
    contentAttrs: o,
    contentClass: l,
    contentStyle: u,
    contentZIndex: s,
    updateZIndex: () => {
      s.value = Ws(t.zIndex) ? t.zIndex : i();
    }
  };
}, GAe = (t, e) => {
  const n = U(!1), r = U();
  return {
    focusStartRef: r,
    trapped: n,
    onFocusAfterReleased: (u) => {
      var c;
      ((c = u.detail) == null ? void 0 : c.focusReason) !== "pointer" && (r.value = "first", e("blur"));
    },
    onFocusAfterTrapped: () => {
      e("focus");
    },
    onFocusInTrap: (u) => {
      t.visible && !n.value && (u.target && (r.value = u.target), n.value = !0);
    },
    onFocusoutPrevented: (u) => {
      t.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
    },
    onReleaseRequested: () => {
      n.value = !1, e("close");
    }
  };
}, jAe = te({
  name: "ElPopperContent"
}), ZAe = /* @__PURE__ */ te({
  ...jAe,
  props: oq,
  emits: NAe,
  setup(t, { expose: e, emit: n }) {
    const r = t, {
      focusStartRef: i,
      trapped: a,
      onFocusAfterReleased: o,
      onFocusAfterTrapped: s,
      onFocusInTrap: l,
      onFocusoutPrevented: u,
      onReleaseRequested: c
    } = GAe(r, n), { attributes: f, arrowRef: d, contentRef: h, styles: p, instanceRef: v, role: g, update: m } = QAe(r), {
      ariaModal: y,
      arrowStyle: b,
      contentAttrs: _,
      contentClass: O,
      contentStyle: S,
      updateZIndex: x
    } = HAe(r, {
      styles: p,
      attributes: f,
      role: g
    }), C = Ge(j1, void 0), T = U();
    pt(eq, {
      arrowStyle: b,
      arrowRef: d,
      arrowOffset: T
    }), C && pt(j1, {
      ...C,
      addInputId: lm,
      removeInputId: lm
    });
    let w;
    const P = (A = !0) => {
      m(), A && x();
    }, $ = () => {
      P(!1), r.visible && r.focusOnShow ? a.value = !0 : r.visible === !1 && (a.value = !1);
    };
    return it(() => {
      se(() => r.triggerTargetEl, (A, D) => {
        w == null || w(), w = void 0;
        const E = B(A || h.value), R = B(D || h.value);
        cm(E) && (w = se([g, () => r.ariaLabel, y, () => r.id], (N) => {
          ["role", "aria-label", "aria-modal", "id"].forEach((V, z) => {
            Gl(N[z]) ? E.removeAttribute(V) : E.setAttribute(V, N[z]);
          });
        }, { immediate: !0 })), R !== E && cm(R) && ["role", "aria-label", "aria-modal", "id"].forEach((N) => {
          R.removeAttribute(N);
        });
      }, { immediate: !0 }), se(() => r.visible, $, { immediate: !0 });
    }), yt(() => {
      w == null || w(), w = void 0;
    }), e({
      popperContentRef: h,
      popperInstanceRef: v,
      updatePopper: P,
      contentStyle: S
    }), (A, D) => (pe(), Qe("div", _n({
      ref_key: "contentRef",
      ref: h
    }, B(_), {
      style: B(S),
      class: B(O),
      tabindex: "-1",
      onMouseenter: D[0] || (D[0] = (E) => A.$emit("mouseenter", E)),
      onMouseleave: D[1] || (D[1] = (E) => A.$emit("mouseleave", E))
    }), [
      M(B(RAe), {
        trapped: B(a),
        "trap-on-focus-in": !0,
        "focus-trap-el": B(h),
        "focus-start-el": B(i),
        onFocusAfterTrapped: B(s),
        onFocusAfterReleased: B(o),
        onFocusin: B(l),
        onFocusoutPrevented: B(u),
        onReleaseRequested: B(c)
      }, {
        default: we(() => [
          zn(A.$slots, "default")
        ]),
        _: 3
      }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
    ], 16));
  }
});
var UAe = /* @__PURE__ */ Qn(ZAe, [["__file", "content.vue"]]);
const XAe = Df(pAe), fR = Symbol("elTooltip"), dR = rr({
  ...N2e,
  ...oq,
  appendTo: {
    type: jt([String, Object])
  },
  content: {
    type: String,
    default: ""
  },
  rawContent: {
    type: Boolean,
    default: !1
  },
  persistent: Boolean,
  visible: {
    type: jt(Boolean),
    default: null
  },
  transition: String,
  teleported: {
    type: Boolean,
    default: !0
  },
  disabled: Boolean,
  ...A0(["ariaLabel"])
}), sq = rr({
  ...iq,
  disabled: Boolean,
  trigger: {
    type: jt([String, Array]),
    default: "hover"
  },
  triggerKeys: {
    type: jt(Array),
    default: () => [Xc.enter, Xc.space]
  }
}), {
  useModelToggleProps: YAe,
  useModelToggleEmits: qAe,
  useModelToggle: KAe
} = NY("visible"), JAe = rr({
  ...tq,
  ...YAe,
  ...dR,
  ...sq,
  ...nq,
  showArrow: {
    type: Boolean,
    default: !0
  }
}), eEe = [
  ...qAe,
  "before-show",
  "before-hide",
  "show",
  "hide",
  "open",
  "close"
], tEe = (t, e) => UPe(t) ? t.includes(e) : t === e, Jf = (t, e, n) => (r) => {
  tEe(B(t), e) && n(r);
}, nEe = te({
  name: "ElTooltipTrigger"
}), rEe = /* @__PURE__ */ te({
  ...nEe,
  props: sq,
  setup(t, { expose: e }) {
    const n = t, r = Jn("tooltip"), { controlled: i, id: a, open: o, onOpen: s, onClose: l, onToggle: u } = Ge(fR, void 0), c = U(null), f = () => {
      if (B(i) || n.disabled)
        return !0;
    }, d = Nn(n, "trigger"), h = bs(f, Jf(d, "hover", s)), p = bs(f, Jf(d, "hover", l)), v = bs(f, Jf(d, "click", (_) => {
      _.button === 0 && u(_);
    })), g = bs(f, Jf(d, "focus", s)), m = bs(f, Jf(d, "focus", l)), y = bs(f, Jf(d, "contextmenu", (_) => {
      _.preventDefault(), u(_);
    })), b = bs(f, (_) => {
      const { code: O } = _;
      n.triggerKeys.includes(O) && (_.preventDefault(), u(_));
    });
    return e({
      triggerRef: c
    }), (_, O) => (pe(), je(B(OAe), {
      id: B(a),
      "virtual-ref": _.virtualRef,
      open: B(o),
      "virtual-triggering": _.virtualTriggering,
      class: Ye(B(r).e("trigger")),
      onBlur: B(m),
      onClick: B(v),
      onContextmenu: B(y),
      onFocus: B(g),
      onMouseenter: B(h),
      onMouseleave: B(p),
      onKeydown: B(b)
    }, {
      default: we(() => [
        zn(_.$slots, "default")
      ]),
      _: 3
    }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
  }
});
var iEe = /* @__PURE__ */ Qn(rEe, [["__file", "trigger.vue"]]);
const aEe = te({
  name: "ElTooltipContent",
  inheritAttrs: !1
}), oEe = /* @__PURE__ */ te({
  ...aEe,
  props: dR,
  setup(t, { expose: e }) {
    const n = t, { selector: r } = qY(), i = Jn("tooltip"), a = U(null), o = U(!1), {
      controlled: s,
      id: l,
      open: u,
      trigger: c,
      onClose: f,
      onOpen: d,
      onShow: h,
      onHide: p,
      onBeforeShow: v,
      onBeforeHide: g
    } = Ge(fR, void 0), m = L(() => n.transition || `${i.namespace.value}-fade-in-linear`), y = L(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
    yt(() => {
      o.value = !0;
    });
    const b = L(() => B(y) ? !0 : B(u)), _ = L(() => n.disabled ? !1 : B(u)), O = L(() => n.appendTo || r.value), S = L(() => {
      var N;
      return (N = n.style) != null ? N : {};
    }), x = L(() => !B(u)), C = () => {
      p();
    }, T = () => {
      if (B(s))
        return !0;
    }, w = bs(T, () => {
      n.enterable && B(c) === "hover" && d();
    }), P = bs(T, () => {
      B(c) === "hover" && f();
    }), $ = () => {
      var N, V;
      (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N), v == null || v();
    }, A = () => {
      g == null || g();
    }, D = () => {
      h(), R = kPe(L(() => {
        var N;
        return (N = a.value) == null ? void 0 : N.popperContentRef;
      }), () => {
        if (B(s))
          return;
        B(c) !== "hover" && f();
      });
    }, E = () => {
      n.virtualTriggering || f();
    };
    let R;
    return se(() => B(u), (N) => {
      N || R == null || R();
    }, {
      flush: "post"
    }), se(() => n.content, () => {
      var N, V;
      (V = (N = a.value) == null ? void 0 : N.updatePopper) == null || V.call(N);
    }), e({
      contentRef: a
    }), (N, V) => (pe(), je(PS, {
      disabled: !N.teleported,
      to: B(O)
    }, [
      M(co, {
        name: B(m),
        onAfterLeave: C,
        onBeforeEnter: $,
        onAfterEnter: D,
        onBeforeLeave: A
      }, {
        default: we(() => [
          B(b) ? bi((pe(), je(B(UAe), _n({
            key: 0,
            id: B(l),
            ref_key: "contentRef",
            ref: a
          }, N.$attrs, {
            "aria-label": N.ariaLabel,
            "aria-hidden": B(x),
            "boundaries-padding": N.boundariesPadding,
            "fallback-placements": N.fallbackPlacements,
            "gpu-acceleration": N.gpuAcceleration,
            offset: N.offset,
            placement: N.placement,
            "popper-options": N.popperOptions,
            strategy: N.strategy,
            effect: N.effect,
            enterable: N.enterable,
            pure: N.pure,
            "popper-class": N.popperClass,
            "popper-style": [N.popperStyle, B(S)],
            "reference-el": N.referenceEl,
            "trigger-target-el": N.triggerTargetEl,
            visible: B(_),
            "z-index": N.zIndex,
            onMouseenter: B(w),
            onMouseleave: B(P),
            onBlur: E,
            onClose: B(f)
          }), {
            default: we(() => [
              o.value ? _t("v-if", !0) : zn(N.$slots, "default", { key: 0 })
            ]),
            _: 3
          }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
            [Bs, B(_)]
          ]) : _t("v-if", !0)
        ]),
        _: 3
      }, 8, ["name"])
    ], 8, ["disabled", "to"]));
  }
});
var sEe = /* @__PURE__ */ Qn(oEe, [["__file", "content.vue"]]);
const lEe = ["innerHTML"], uEe = { key: 1 }, cEe = te({
  name: "ElTooltip"
}), fEe = /* @__PURE__ */ te({
  ...cEe,
  props: JAe,
  emits: eEe,
  setup(t, { expose: e, emit: n }) {
    const r = t;
    L2e();
    const i = iR(), a = U(), o = U(), s = () => {
      var m;
      const y = B(a);
      y && ((m = y.popperInstanceRef) == null || m.update());
    }, l = U(!1), u = U(), { show: c, hide: f, hasUpdateHandler: d } = KAe({
      indicator: l,
      toggleReason: u
    }), { onOpen: h, onClose: p } = B2e({
      showAfter: Nn(r, "showAfter"),
      hideAfter: Nn(r, "hideAfter"),
      autoClose: Nn(r, "autoClose"),
      open: c,
      close: f
    }), v = L(() => Q1(r.visible) && !d.value);
    pt(fR, {
      controlled: v,
      id: i,
      open: Hle(l),
      trigger: Nn(r, "trigger"),
      onOpen: (m) => {
        h(m);
      },
      onClose: (m) => {
        p(m);
      },
      onToggle: (m) => {
        B(l) ? p(m) : h(m);
      },
      onShow: () => {
        n("show", u.value);
      },
      onHide: () => {
        n("hide", u.value);
      },
      onBeforeShow: () => {
        n("before-show", u.value);
      },
      onBeforeHide: () => {
        n("before-hide", u.value);
      },
      updatePopper: s
    }), se(() => r.disabled, (m) => {
      m && l.value && (l.value = !1);
    });
    const g = (m) => {
      var y, b;
      const _ = (b = (y = o.value) == null ? void 0 : y.contentRef) == null ? void 0 : b.popperContentRef, O = (m == null ? void 0 : m.relatedTarget) || document.activeElement;
      return _ && _.contains(O);
    };
    return Gle(() => l.value && f()), e({
      popperRef: a,
      contentRef: o,
      isFocusInsideContent: g,
      updatePopper: s,
      onOpen: h,
      onClose: p,
      hide: f
    }), (m, y) => (pe(), je(B(XAe), {
      ref_key: "popperRef",
      ref: a,
      role: m.role
    }, {
      default: we(() => [
        M(iEe, {
          disabled: m.disabled,
          trigger: m.trigger,
          "trigger-keys": m.triggerKeys,
          "virtual-ref": m.virtualRef,
          "virtual-triggering": m.virtualTriggering
        }, {
          default: we(() => [
            m.$slots.default ? zn(m.$slots, "default", { key: 0 }) : _t("v-if", !0)
          ]),
          _: 3
        }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
        M(sEe, {
          ref_key: "contentRef",
          ref: o,
          "aria-label": m.ariaLabel,
          "boundaries-padding": m.boundariesPadding,
          content: m.content,
          disabled: m.disabled,
          effect: m.effect,
          enterable: m.enterable,
          "fallback-placements": m.fallbackPlacements,
          "hide-after": m.hideAfter,
          "gpu-acceleration": m.gpuAcceleration,
          offset: m.offset,
          persistent: m.persistent,
          "popper-class": m.popperClass,
          "popper-style": m.popperStyle,
          placement: m.placement,
          "popper-options": m.popperOptions,
          pure: m.pure,
          "raw-content": m.rawContent,
          "reference-el": m.referenceEl,
          "trigger-target-el": m.triggerTargetEl,
          "show-after": m.showAfter,
          strategy: m.strategy,
          teleported: m.teleported,
          transition: m.transition,
          "virtual-triggering": m.virtualTriggering,
          "z-index": m.zIndex,
          "append-to": m.appendTo
        }, {
          default: we(() => [
            zn(m.$slots, "content", {}, () => [
              m.rawContent ? (pe(), Qe("span", {
                key: 0,
                innerHTML: m.content
              }, null, 8, lEe)) : (pe(), Qe("span", uEe, Bi(m.content), 1))
            ]),
            m.showArrow ? (pe(), je(B(mAe), {
              key: 0,
              "arrow-offset": m.arrowOffset
            }, null, 8, ["arrow-offset"])) : _t("v-if", !0)
          ]),
          _: 3
        }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
      ]),
      _: 3
    }, 8, ["role"]));
  }
});
var dEe = /* @__PURE__ */ Qn(fEe, [["__file", "tooltip.vue"]]);
const hEe = Df(dEe), lq = Symbol("buttonGroupContextKey"), pEe = (t, e) => {
  C0({
    from: "type.text",
    replacement: "link",
    version: "3.0.0",
    scope: "props",
    ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
  }, L(() => t.type === "text"));
  const n = Ge(lq, void 0), r = X2e("button"), { form: i } = Ax(), a = $x(L(() => n == null ? void 0 : n.size)), o = E0(), s = U(), l = ZG(), u = L(() => t.type || (n == null ? void 0 : n.type) || ""), c = L(() => {
    var p, v, g;
    return (g = (v = t.autoInsertSpace) != null ? v : (p = r.value) == null ? void 0 : p.autoInsertSpace) != null ? g : !1;
  }), f = L(() => t.tag === "button" ? {
    ariaDisabled: o.value || t.loading,
    disabled: o.value || t.loading,
    autofocus: t.autofocus,
    type: t.nativeType
  } : {}), d = L(() => {
    var p;
    const v = (p = l.default) == null ? void 0 : p.call(l);
    if (c.value && (v == null ? void 0 : v.length) === 1) {
      const g = v[0];
      if ((g == null ? void 0 : g.type) === TS) {
        const m = g.children;
        return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(m.trim());
      }
    }
    return !1;
  });
  return {
    _disabled: o,
    _size: a,
    _type: u,
    _ref: s,
    _props: f,
    shouldAddSpace: d,
    handleClick: (p) => {
      t.nativeType === "reset" && (i == null || i.resetFields()), e("click", p);
    }
  };
}, vEe = [
  "default",
  "primary",
  "success",
  "warning",
  "info",
  "danger",
  "text",
  ""
], gEe = ["button", "submit", "reset"], rA = rr({
  size: $0,
  disabled: Boolean,
  type: {
    type: String,
    values: vEe,
    default: ""
  },
  icon: {
    type: H1
  },
  nativeType: {
    type: String,
    values: gEe,
    default: "button"
  },
  loading: Boolean,
  loadingIcon: {
    type: H1,
    default: () => RY
  },
  plain: Boolean,
  text: Boolean,
  link: Boolean,
  bg: Boolean,
  autofocus: Boolean,
  round: Boolean,
  circle: Boolean,
  color: String,
  dark: Boolean,
  autoInsertSpace: {
    type: Boolean,
    default: void 0
  },
  tag: {
    type: jt([String, Object]),
    default: "button"
  }
}), mEe = {
  click: (t) => t instanceof MouseEvent
};
function fl(t, e = 20) {
  return t.mix("#141414", e).toString();
}
function yEe(t) {
  const e = E0(), n = Jn("button");
  return L(() => {
    let r = {}, i = t.color;
    if (i) {
      const a = i.match(/var\((.*?)\)/);
      a && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
      const o = new en(i), s = t.dark ? o.tint(20).toString() : fl(o, 20);
      if (t.plain)
        r = n.cssVarBlock({
          "bg-color": t.dark ? fl(o, 90) : o.tint(90).toString(),
          "text-color": i,
          "border-color": t.dark ? fl(o, 50) : o.tint(50).toString(),
          "hover-text-color": `var(${n.cssVarName("color-white")})`,
          "hover-bg-color": i,
          "hover-border-color": i,
          "active-bg-color": s,
          "active-text-color": `var(${n.cssVarName("color-white")})`,
          "active-border-color": s
        }), e.value && (r[n.cssVarBlockName("disabled-bg-color")] = t.dark ? fl(o, 90) : o.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = t.dark ? fl(o, 50) : o.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = t.dark ? fl(o, 80) : o.tint(80).toString());
      else {
        const l = t.dark ? fl(o, 30) : o.tint(30).toString(), u = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
        if (r = n.cssVarBlock({
          "bg-color": i,
          "text-color": u,
          "border-color": i,
          "hover-bg-color": l,
          "hover-text-color": u,
          "hover-border-color": l,
          "active-bg-color": s,
          "active-border-color": s
        }), e.value) {
          const c = t.dark ? fl(o, 50) : o.tint(50).toString();
          r[n.cssVarBlockName("disabled-bg-color")] = c, r[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = c;
        }
      }
    }
    return r;
  });
}
const bEe = te({
  name: "ElButton"
}), _Ee = /* @__PURE__ */ te({
  ...bEe,
  props: rA,
  emits: mEe,
  setup(t, { expose: e, emit: n }) {
    const r = t, i = yEe(r), a = Jn("button"), { _ref: o, _size: s, _type: l, _disabled: u, _props: c, shouldAddSpace: f, handleClick: d } = pEe(r, n), h = L(() => [
      a.b(),
      a.m(l.value),
      a.m(s.value),
      a.is("disabled", u.value),
      a.is("loading", r.loading),
      a.is("plain", r.plain),
      a.is("round", r.round),
      a.is("circle", r.circle),
      a.is("text", r.text),
      a.is("link", r.link),
      a.is("has-bg", r.bg)
    ]);
    return e({
      ref: o,
      size: s,
      type: l,
      disabled: u,
      shouldAddSpace: f
    }), (p, v) => (pe(), je(Ec(p.tag), _n({
      ref_key: "_ref",
      ref: o
    }, B(c), {
      class: B(h),
      style: B(i),
      onClick: B(d)
    }), {
      default: we(() => [
        p.loading ? (pe(), Qe(wt, { key: 0 }, [
          p.$slots.loading ? zn(p.$slots, "loading", { key: 0 }) : (pe(), je(B(ws), {
            key: 1,
            class: Ye(B(a).is("loading"))
          }, {
            default: we(() => [
              (pe(), je(Ec(p.loadingIcon)))
            ]),
            _: 1
          }, 8, ["class"]))
        ], 64)) : p.icon || p.$slots.icon ? (pe(), je(B(ws), { key: 1 }, {
          default: we(() => [
            p.icon ? (pe(), je(Ec(p.icon), { key: 0 })) : zn(p.$slots, "icon", { key: 1 })
          ]),
          _: 3
        })) : _t("v-if", !0),
        p.$slots.default ? (pe(), Qe("span", {
          key: 2,
          class: Ye({ [B(a).em("text", "expand")]: B(f) })
        }, [
          zn(p.$slots, "default")
        ], 2)) : _t("v-if", !0)
      ]),
      _: 3
    }, 16, ["class", "style", "onClick"]));
  }
});
var OEe = /* @__PURE__ */ Qn(_Ee, [["__file", "button.vue"]]);
const SEe = {
  size: rA.size,
  type: rA.type
}, xEe = te({
  name: "ElButtonGroup"
}), wEe = /* @__PURE__ */ te({
  ...xEe,
  props: SEe,
  setup(t) {
    const e = t;
    pt(lq, tn({
      size: Nn(e, "size"),
      type: Nn(e, "type")
    }));
    const n = Jn("button");
    return (r, i) => (pe(), Qe("div", {
      class: Ye(`${B(n).b("group")}`)
    }, [
      zn(r.$slots, "default")
    ], 2));
  }
});
var uq = /* @__PURE__ */ Qn(wEe, [["__file", "button-group.vue"]]);
const w6 = Df(OEe, {
  ButtonGroup: uq
});
ZD(uq);
const Ol = /* @__PURE__ */ new Map();
let C6;
Yr && (document.addEventListener("mousedown", (t) => C6 = t), document.addEventListener("mouseup", (t) => {
  for (const e of Ol.values())
    for (const { documentHandler: n } of e)
      n(t, C6);
}));
function T6(t, e) {
  let n = [];
  return Array.isArray(e.arg) ? n = e.arg : cm(e.arg) && n.push(e.arg), function(r, i) {
    const a = e.instance.popperRef, o = r.target, s = i == null ? void 0 : i.target, l = !e || !e.instance, u = !o || !s, c = t.contains(o) || t.contains(s), f = t === o, d = n.length && n.some((p) => p == null ? void 0 : p.contains(o)) || n.length && n.includes(s), h = a && (a.contains(o) || a.contains(s));
    l || u || c || f || d || h || e.value(r, i);
  };
}
const CEe = {
  beforeMount(t, e) {
    Ol.has(t) || Ol.set(t, []), Ol.get(t).push({
      documentHandler: T6(t, e),
      bindingFn: e.value
    });
  },
  updated(t, e) {
    Ol.has(t) || Ol.set(t, []);
    const n = Ol.get(t), r = n.findIndex((a) => a.bindingFn === e.oldValue), i = {
      documentHandler: T6(t, e),
      bindingFn: e.value
    };
    r >= 0 ? n.splice(r, 1, i) : n.push(i);
  },
  unmounted(t) {
    Ol.delete(t);
  }
}, cq = rr({
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  size: $0,
  disabled: Boolean,
  label: {
    type: [String, Number, Boolean],
    default: void 0
  },
  value: {
    type: [String, Number, Boolean],
    default: void 0
  },
  name: {
    type: String,
    default: void 0
  }
}), TEe = rr({
  ...cq,
  border: Boolean
}), fq = {
  [Qs]: (t) => ba(t) || Ws(t) || Q1(t),
  [LY]: (t) => ba(t) || Ws(t) || Q1(t)
}, dq = Symbol("radioGroupKey"), hq = (t, e) => {
  const n = U(), r = Ge(dq, void 0), i = L(() => !!r), a = L(() => K3(t.value) ? t.label : t.value), o = L({
    get() {
      return i.value ? r.modelValue : t.modelValue;
    },
    set(f) {
      i.value ? r.changeEvent(f) : e && e(Qs, f), n.value.checked = t.modelValue === a.value;
    }
  }), s = $x(L(() => r == null ? void 0 : r.size)), l = E0(L(() => r == null ? void 0 : r.disabled)), u = U(!1), c = L(() => l.value || i.value && o.value !== a.value ? -1 : 0);
  return C0({
    from: "label act as value",
    replacement: "value",
    version: "3.0.0",
    scope: "el-radio",
    ref: "https://element-plus.org/en-US/component/radio.html"
  }, L(() => i.value && K3(t.value))), {
    radioRef: n,
    isGroup: i,
    radioGroup: r,
    focus: u,
    size: s,
    disabled: l,
    tabIndex: c,
    modelValue: o,
    actualValue: a
  };
}, PEe = ["value", "name", "disabled"], $Ee = te({
  name: "ElRadio"
}), AEe = /* @__PURE__ */ te({
  ...$Ee,
  props: TEe,
  emits: fq,
  setup(t, { emit: e }) {
    const n = t, r = Jn("radio"), { radioRef: i, radioGroup: a, focus: o, size: s, disabled: l, modelValue: u, actualValue: c } = hq(n, e);
    function f() {
      Tt(() => e("change", u.value));
    }
    return (d, h) => {
      var p;
      return pe(), Qe("label", {
        class: Ye([
          B(r).b(),
          B(r).is("disabled", B(l)),
          B(r).is("focus", B(o)),
          B(r).is("bordered", d.border),
          B(r).is("checked", B(u) === B(c)),
          B(r).m(B(s))
        ])
      }, [
        He("span", {
          class: Ye([
            B(r).e("input"),
            B(r).is("disabled", B(l)),
            B(r).is("checked", B(u) === B(c))
          ])
        }, [
          bi(He("input", {
            ref_key: "radioRef",
            ref: i,
            "onUpdate:modelValue": h[0] || (h[0] = (v) => tp(u) ? u.value = v : null),
            class: Ye(B(r).e("original")),
            value: B(c),
            name: d.name || ((p = B(a)) == null ? void 0 : p.name),
            disabled: B(l),
            type: "radio",
            onFocus: h[1] || (h[1] = (v) => o.value = !0),
            onBlur: h[2] || (h[2] = (v) => o.value = !1),
            onChange: f,
            onClick: h[3] || (h[3] = lf(() => {
            }, ["stop"]))
          }, null, 42, PEe), [
            [UG, B(u)]
          ]),
          He("span", {
            class: Ye(B(r).e("inner"))
          }, null, 2)
        ], 2),
        He("span", {
          class: Ye(B(r).e("label")),
          onKeydown: h[4] || (h[4] = lf(() => {
          }, ["stop"]))
        }, [
          zn(d.$slots, "default", {}, () => [
            Kt(Bi(d.label), 1)
          ])
        ], 34)
      ], 2);
    };
  }
});
var EEe = /* @__PURE__ */ Qn(AEe, [["__file", "radio.vue"]]);
const MEe = rr({
  ...cq
}), IEe = ["value", "name", "disabled"], DEe = te({
  name: "ElRadioButton"
}), REe = /* @__PURE__ */ te({
  ...DEe,
  props: MEe,
  setup(t) {
    const e = t, n = Jn("radio"), { radioRef: r, focus: i, size: a, disabled: o, modelValue: s, radioGroup: l, actualValue: u } = hq(e), c = L(() => ({
      backgroundColor: (l == null ? void 0 : l.fill) || "",
      borderColor: (l == null ? void 0 : l.fill) || "",
      boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
      color: (l == null ? void 0 : l.textColor) || ""
    }));
    return (f, d) => {
      var h;
      return pe(), Qe("label", {
        class: Ye([
          B(n).b("button"),
          B(n).is("active", B(s) === B(u)),
          B(n).is("disabled", B(o)),
          B(n).is("focus", B(i)),
          B(n).bm("button", B(a))
        ])
      }, [
        bi(He("input", {
          ref_key: "radioRef",
          ref: r,
          "onUpdate:modelValue": d[0] || (d[0] = (p) => tp(s) ? s.value = p : null),
          class: Ye(B(n).be("button", "original-radio")),
          value: B(u),
          type: "radio",
          name: f.name || ((h = B(l)) == null ? void 0 : h.name),
          disabled: B(o),
          onFocus: d[1] || (d[1] = (p) => i.value = !0),
          onBlur: d[2] || (d[2] = (p) => i.value = !1),
          onClick: d[3] || (d[3] = lf(() => {
          }, ["stop"]))
        }, null, 42, IEe), [
          [UG, B(s)]
        ]),
        He("span", {
          class: Ye(B(n).be("button", "inner")),
          style: Sr(B(s) === B(u) ? B(c) : {}),
          onKeydown: d[4] || (d[4] = lf(() => {
          }, ["stop"]))
        }, [
          zn(f.$slots, "default", {}, () => [
            Kt(Bi(f.label), 1)
          ])
        ], 38)
      ], 2);
    };
  }
});
var pq = /* @__PURE__ */ Qn(REe, [["__file", "radio-button.vue"]]);
const kEe = rr({
  id: {
    type: String,
    default: void 0
  },
  size: $0,
  disabled: Boolean,
  modelValue: {
    type: [String, Number, Boolean],
    default: void 0
  },
  fill: {
    type: String,
    default: ""
  },
  label: {
    type: String,
    default: void 0
  },
  textColor: {
    type: String,
    default: ""
  },
  name: {
    type: String,
    default: void 0
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...A0(["ariaLabel"])
}), LEe = fq, NEe = ["id", "aria-label", "aria-labelledby"], BEe = te({
  name: "ElRadioGroup"
}), zEe = /* @__PURE__ */ te({
  ...BEe,
  props: kEe,
  emits: LEe,
  setup(t, { emit: e }) {
    const n = t, r = Jn("radio"), i = iR(), a = U(), { formItem: o } = Ax(), { inputId: s, isLabeledByFormItem: l } = oR(n, {
      formItemContext: o
    }), u = (f) => {
      e(Qs, f), Tt(() => e("change", f));
    };
    it(() => {
      const f = a.value.querySelectorAll("[type=radio]"), d = f[0];
      !Array.from(f).some((h) => h.checked) && d && (d.tabIndex = 0);
    });
    const c = L(() => n.name || i.value);
    return pt(dq, tn({
      ...$S(n),
      changeEvent: u,
      name: c
    })), se(() => n.modelValue, () => {
      n.validateEvent && (o == null || o.validate("change").catch((f) => Gi(f)));
    }), C0({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-radio-group",
      ref: "https://element-plus.org/en-US/component/radio.html"
    }, L(() => !!n.label)), (f, d) => (pe(), Qe("div", {
      id: B(s),
      ref_key: "radioGroupRef",
      ref: a,
      class: Ye(B(r).b("group")),
      role: "radiogroup",
      "aria-label": B(l) ? void 0 : f.label || f.ariaLabel || "radio-group",
      "aria-labelledby": B(l) ? B(o).labelId : void 0
    }, [
      zn(f.$slots, "default")
    ], 10, NEe));
  }
});
var vq = /* @__PURE__ */ Qn(zEe, [["__file", "radio-group.vue"]]);
Df(EEe, {
  RadioButton: pq,
  RadioGroup: vq
});
const gq = ZD(vq), bg = ZD(pq), VEe = rr({
  color: {
    type: jt(Object),
    required: !0
  },
  vertical: {
    type: Boolean,
    default: !1
  }
});
let zC = !1;
function hm(t, e) {
  if (!Yr)
    return;
  const n = function(a) {
    var o;
    (o = e.drag) == null || o.call(e, a);
  }, r = function(a) {
    var o;
    document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), document.removeEventListener("touchmove", n), document.removeEventListener("touchend", r), document.onselectstart = null, document.ondragstart = null, zC = !1, (o = e.end) == null || o.call(e, a);
  }, i = function(a) {
    var o;
    zC || (a.preventDefault(), document.onselectstart = () => !1, document.ondragstart = () => !1, document.addEventListener("mousemove", n), document.addEventListener("mouseup", r), document.addEventListener("touchmove", n), document.addEventListener("touchend", r), zC = !0, (o = e.start) == null || o.call(e, a));
  };
  t.addEventListener("mousedown", i), t.addEventListener("touchstart", i);
}
const FEe = (t) => {
  const e = vn(), n = ae(), r = ae();
  function i(o) {
    o.target !== n.value && a(o);
  }
  function a(o) {
    if (!r.value || !n.value)
      return;
    const l = e.vnode.el.getBoundingClientRect(), { clientX: u, clientY: c } = jD(o);
    if (t.vertical) {
      let f = c - l.top;
      f = Math.max(n.value.offsetHeight / 2, f), f = Math.min(f, l.height - n.value.offsetHeight / 2), t.color.set("alpha", Math.round((f - n.value.offsetHeight / 2) / (l.height - n.value.offsetHeight) * 100));
    } else {
      let f = u - l.left;
      f = Math.max(n.value.offsetWidth / 2, f), f = Math.min(f, l.width - n.value.offsetWidth / 2), t.color.set("alpha", Math.round((f - n.value.offsetWidth / 2) / (l.width - n.value.offsetWidth) * 100));
    }
  }
  return {
    thumb: n,
    bar: r,
    handleDrag: a,
    handleClick: i
  };
}, WEe = (t, {
  bar: e,
  thumb: n,
  handleDrag: r
}) => {
  const i = vn(), a = Jn("color-alpha-slider"), o = U(0), s = U(0), l = U();
  function u() {
    if (!n.value || t.vertical)
      return 0;
    const y = i.vnode.el, b = t.color.get("alpha");
    return y ? Math.round(b * (y.offsetWidth - n.value.offsetWidth / 2) / 100) : 0;
  }
  function c() {
    if (!n.value)
      return 0;
    const y = i.vnode.el;
    if (!t.vertical)
      return 0;
    const b = t.color.get("alpha");
    return y ? Math.round(b * (y.offsetHeight - n.value.offsetHeight / 2) / 100) : 0;
  }
  function f() {
    if (t.color && t.color.value) {
      const { r: y, g: b, b: _ } = t.color.toRgb();
      return `linear-gradient(to right, rgba(${y}, ${b}, ${_}, 0) 0%, rgba(${y}, ${b}, ${_}, 1) 100%)`;
    }
    return "";
  }
  function d() {
    o.value = u(), s.value = c(), l.value = f();
  }
  it(() => {
    if (!e.value || !n.value)
      return;
    const y = {
      drag: (b) => {
        r(b);
      },
      end: (b) => {
        r(b);
      }
    };
    hm(e.value, y), hm(n.value, y), d();
  }), se(() => t.color.get("alpha"), () => d()), se(() => t.color.value, () => d());
  const h = L(() => [a.b(), a.is("vertical", t.vertical)]), p = L(() => a.e("bar")), v = L(() => a.e("thumb")), g = L(() => ({ background: l.value })), m = L(() => ({
    left: eA(o.value),
    top: eA(s.value)
  }));
  return { rootKls: h, barKls: p, barStyle: g, thumbKls: v, thumbStyle: m, update: d };
}, QEe = "ElColorAlphaSlider", HEe = te({
  name: QEe
}), GEe = /* @__PURE__ */ te({
  ...HEe,
  props: VEe,
  setup(t, { expose: e }) {
    const n = t, { bar: r, thumb: i, handleDrag: a, handleClick: o } = FEe(n), { rootKls: s, barKls: l, barStyle: u, thumbKls: c, thumbStyle: f, update: d } = WEe(n, {
      bar: r,
      thumb: i,
      handleDrag: a
    });
    return e({
      update: d,
      bar: r,
      thumb: i
    }), (h, p) => (pe(), Qe("div", {
      class: Ye(B(s))
    }, [
      He("div", {
        ref_key: "bar",
        ref: r,
        class: Ye(B(l)),
        style: Sr(B(u)),
        onClick: p[0] || (p[0] = (...v) => B(o) && B(o)(...v))
      }, null, 6),
      He("div", {
        ref_key: "thumb",
        ref: i,
        class: Ye(B(c)),
        style: Sr(B(f))
      }, null, 6)
    ], 2));
  }
});
var jEe = /* @__PURE__ */ Qn(GEe, [["__file", "alpha-slider.vue"]]);
const ZEe = te({
  name: "ElColorHueSlider",
  props: {
    color: {
      type: Object,
      required: !0
    },
    vertical: Boolean
  },
  setup(t) {
    const e = Jn("color-hue-slider"), n = vn(), r = U(), i = U(), a = U(0), o = U(0), s = L(() => t.color.get("hue"));
    se(() => s.value, () => {
      d();
    });
    function l(h) {
      h.target !== r.value && u(h);
    }
    function u(h) {
      if (!i.value || !r.value)
        return;
      const v = n.vnode.el.getBoundingClientRect(), { clientX: g, clientY: m } = jD(h);
      let y;
      if (t.vertical) {
        let b = m - v.top;
        b = Math.min(b, v.height - r.value.offsetHeight / 2), b = Math.max(r.value.offsetHeight / 2, b), y = Math.round((b - r.value.offsetHeight / 2) / (v.height - r.value.offsetHeight) * 360);
      } else {
        let b = g - v.left;
        b = Math.min(b, v.width - r.value.offsetWidth / 2), b = Math.max(r.value.offsetWidth / 2, b), y = Math.round((b - r.value.offsetWidth / 2) / (v.width - r.value.offsetWidth) * 360);
      }
      t.color.set("hue", y);
    }
    function c() {
      if (!r.value)
        return 0;
      const h = n.vnode.el;
      if (t.vertical)
        return 0;
      const p = t.color.get("hue");
      return h ? Math.round(p * (h.offsetWidth - r.value.offsetWidth / 2) / 360) : 0;
    }
    function f() {
      if (!r.value)
        return 0;
      const h = n.vnode.el;
      if (!t.vertical)
        return 0;
      const p = t.color.get("hue");
      return h ? Math.round(p * (h.offsetHeight - r.value.offsetHeight / 2) / 360) : 0;
    }
    function d() {
      a.value = c(), o.value = f();
    }
    return it(() => {
      if (!i.value || !r.value)
        return;
      const h = {
        drag: (p) => {
          u(p);
        },
        end: (p) => {
          u(p);
        }
      };
      hm(i.value, h), hm(r.value, h), d();
    }), {
      bar: i,
      thumb: r,
      thumbLeft: a,
      thumbTop: o,
      hueValue: s,
      handleClick: l,
      update: d,
      ns: e
    };
  }
});
function UEe(t, e, n, r, i, a) {
  return pe(), Qe("div", {
    class: Ye([t.ns.b(), t.ns.is("vertical", t.vertical)])
  }, [
    He("div", {
      ref: "bar",
      class: Ye(t.ns.e("bar")),
      onClick: e[0] || (e[0] = (...o) => t.handleClick && t.handleClick(...o))
    }, null, 2),
    He("div", {
      ref: "thumb",
      class: Ye(t.ns.e("thumb")),
      style: Sr({
        left: t.thumbLeft + "px",
        top: t.thumbTop + "px"
      })
    }, null, 6)
  ], 2);
}
var XEe = /* @__PURE__ */ Qn(ZEe, [["render", UEe], ["__file", "hue-slider.vue"]]);
const YEe = rr({
  modelValue: String,
  id: String,
  showAlpha: Boolean,
  colorFormat: String,
  disabled: Boolean,
  size: $0,
  popperClass: {
    type: String,
    default: ""
  },
  label: {
    type: String,
    default: void 0
  },
  tabindex: {
    type: [String, Number],
    default: 0
  },
  teleported: dR.teleported,
  predefine: {
    type: jt(Array)
  },
  validateEvent: {
    type: Boolean,
    default: !0
  },
  ...A0(["ariaLabel"])
}), qEe = {
  [Qs]: (t) => ba(t) || Gl(t),
  [LY]: (t) => ba(t) || Gl(t),
  activeChange: (t) => ba(t) || Gl(t),
  focus: (t) => t instanceof FocusEvent,
  blur: (t) => t instanceof FocusEvent
}, mq = Symbol("colorPickerContextKey"), P6 = function(t, e, n) {
  return [
    t,
    e * n / ((t = (2 - e) * n) < 1 ? t : 2 - t) || 0,
    t / 2
  ];
}, KEe = function(t) {
  return typeof t == "string" && t.includes(".") && Number.parseFloat(t) === 1;
}, JEe = function(t) {
  return typeof t == "string" && t.includes("%");
}, Yd = function(t, e) {
  KEe(t) && (t = "100%");
  const n = JEe(t);
  return t = Math.min(e, Math.max(0, Number.parseFloat(`${t}`))), n && (t = Number.parseInt(`${t * e}`, 10) / 100), Math.abs(t - e) < 1e-6 ? 1 : t % e / Number.parseFloat(e);
}, $6 = {
  10: "A",
  11: "B",
  12: "C",
  13: "D",
  14: "E",
  15: "F"
}, R_ = (t) => {
  t = Math.min(Math.round(t), 255);
  const e = Math.floor(t / 16), n = t % 16;
  return `${$6[e] || e}${$6[n] || n}`;
}, A6 = function({ r: t, g: e, b: n }) {
  return Number.isNaN(+t) || Number.isNaN(+e) || Number.isNaN(+n) ? "" : `#${R_(t)}${R_(e)}${R_(n)}`;
}, VC = {
  A: 10,
  B: 11,
  C: 12,
  D: 13,
  E: 14,
  F: 15
}, Bu = function(t) {
  return t.length === 2 ? (VC[t[0].toUpperCase()] || +t[0]) * 16 + (VC[t[1].toUpperCase()] || +t[1]) : VC[t[1].toUpperCase()] || +t[1];
}, eMe = function(t, e, n) {
  e = e / 100, n = n / 100;
  let r = e;
  const i = Math.max(n, 0.01);
  n *= 2, e *= n <= 1 ? n : 2 - n, r *= i <= 1 ? i : 2 - i;
  const a = (n + e) / 2, o = n === 0 ? 2 * r / (i + r) : 2 * e / (n + e);
  return {
    h: t,
    s: o * 100,
    v: a * 100
  };
}, E6 = (t, e, n) => {
  t = Yd(t, 255), e = Yd(e, 255), n = Yd(n, 255);
  const r = Math.max(t, e, n), i = Math.min(t, e, n);
  let a;
  const o = r, s = r - i, l = r === 0 ? 0 : s / r;
  if (r === i)
    a = 0;
  else {
    switch (r) {
      case t: {
        a = (e - n) / s + (e < n ? 6 : 0);
        break;
      }
      case e: {
        a = (n - t) / s + 2;
        break;
      }
      case n: {
        a = (t - e) / s + 4;
        break;
      }
    }
    a /= 6;
  }
  return { h: a * 360, s: l * 100, v: o * 100 };
}, Yp = function(t, e, n) {
  t = Yd(t, 360) * 6, e = Yd(e, 100), n = Yd(n, 100);
  const r = Math.floor(t), i = t - r, a = n * (1 - e), o = n * (1 - i * e), s = n * (1 - (1 - i) * e), l = r % 6, u = [n, o, a, a, s, n][l], c = [s, n, n, o, a, a][l], f = [a, a, s, n, n, o][l];
  return {
    r: Math.round(u * 255),
    g: Math.round(c * 255),
    b: Math.round(f * 255)
  };
};
class _g {
  constructor(e = {}) {
    this._hue = 0, this._saturation = 100, this._value = 100, this._alpha = 100, this.enableAlpha = !1, this.format = "hex", this.value = "";
    for (const n in e)
      W1(e, n) && (this[n] = e[n]);
    e.value ? this.fromString(e.value) : this.doOnChange();
  }
  set(e, n) {
    if (arguments.length === 1 && typeof e == "object") {
      for (const r in e)
        W1(e, r) && this.set(r, e[r]);
      return;
    }
    this[`_${e}`] = n, this.doOnChange();
  }
  get(e) {
    return e === "alpha" ? Math.floor(this[`_${e}`]) : this[`_${e}`];
  }
  toRgb() {
    return Yp(this._hue, this._saturation, this._value);
  }
  fromString(e) {
    if (!e) {
      this._hue = 0, this._saturation = 100, this._value = 100, this.doOnChange();
      return;
    }
    const n = (r, i, a) => {
      this._hue = Math.max(0, Math.min(360, r)), this._saturation = Math.max(0, Math.min(100, i)), this._value = Math.max(0, Math.min(100, a)), this.doOnChange();
    };
    if (e.includes("hsl")) {
      const r = e.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
        const { h: i, s: a, v: o } = eMe(r[0], r[1], r[2]);
        n(i, a, o);
      }
    } else if (e.includes("hsv")) {
      const r = e.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3 && n(r[0], r[1], r[2]);
    } else if (e.includes("rgb")) {
      const r = e.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((i) => i !== "").map((i, a) => a > 2 ? Number.parseFloat(i) : Number.parseInt(i, 10));
      if (r.length === 4 ? this._alpha = Number.parseFloat(r[3]) * 100 : r.length === 3 && (this._alpha = 100), r.length >= 3) {
        const { h: i, s: a, v: o } = E6(r[0], r[1], r[2]);
        n(i, a, o);
      }
    } else if (e.includes("#")) {
      const r = e.replace("#", "").trim();
      if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))
        return;
      let i, a, o;
      r.length === 3 ? (i = Bu(r[0] + r[0]), a = Bu(r[1] + r[1]), o = Bu(r[2] + r[2])) : (r.length === 6 || r.length === 8) && (i = Bu(r.slice(0, 2)), a = Bu(r.slice(2, 4)), o = Bu(r.slice(4, 6))), r.length === 8 ? this._alpha = Bu(r.slice(6)) / 255 * 100 : (r.length === 3 || r.length === 6) && (this._alpha = 100);
      const { h: s, s: l, v: u } = E6(i, a, o);
      n(s, l, u);
    }
  }
  compare(e) {
    return Math.abs(e._hue - this._hue) < 2 && Math.abs(e._saturation - this._saturation) < 1 && Math.abs(e._value - this._value) < 1 && Math.abs(e._alpha - this._alpha) < 1;
  }
  doOnChange() {
    const { _hue: e, _saturation: n, _value: r, _alpha: i, format: a } = this;
    if (this.enableAlpha)
      switch (a) {
        case "hsl": {
          const o = P6(e, n / 100, r / 100);
          this.value = `hsla(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%, ${this.get("alpha") / 100})`;
          break;
        }
        case "hsv": {
          this.value = `hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha") / 100})`;
          break;
        }
        case "hex": {
          this.value = `${A6(Yp(e, n, r))}${R_(i * 255 / 100)}`;
          break;
        }
        default: {
          const { r: o, g: s, b: l } = Yp(e, n, r);
          this.value = `rgba(${o}, ${s}, ${l}, ${this.get("alpha") / 100})`;
        }
      }
    else
      switch (a) {
        case "hsl": {
          const o = P6(e, n / 100, r / 100);
          this.value = `hsl(${e}, ${Math.round(o[1] * 100)}%, ${Math.round(o[2] * 100)}%)`;
          break;
        }
        case "hsv": {
          this.value = `hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;
          break;
        }
        case "rgb": {
          const { r: o, g: s, b: l } = Yp(e, n, r);
          this.value = `rgb(${o}, ${s}, ${l})`;
          break;
        }
        default:
          this.value = A6(Yp(e, n, r));
      }
  }
}
const tMe = te({
  props: {
    colors: {
      type: Array,
      required: !0
    },
    color: {
      type: Object,
      required: !0
    },
    enableAlpha: {
      type: Boolean,
      required: !0
    }
  },
  setup(t) {
    const e = Jn("color-predefine"), { currentColor: n } = Ge(mq), r = U(a(t.colors, t.color));
    se(() => n.value, (o) => {
      const s = new _g();
      s.fromString(o), r.value.forEach((l) => {
        l.selected = s.compare(l);
      });
    }), ht(() => {
      r.value = a(t.colors, t.color);
    });
    function i(o) {
      t.color.fromString(t.colors[o]);
    }
    function a(o, s) {
      return o.map((l) => {
        const u = new _g();
        return u.enableAlpha = t.enableAlpha, u.format = "rgba", u.fromString(l), u.selected = u.value === s.value, u;
      });
    }
    return {
      rgbaColors: r,
      handleSelect: i,
      ns: e
    };
  }
}), nMe = ["onClick"];
function rMe(t, e, n, r, i, a) {
  return pe(), Qe("div", {
    class: Ye(t.ns.b())
  }, [
    He("div", {
      class: Ye(t.ns.e("colors"))
    }, [
      (pe(!0), Qe(wt, null, ag(t.rgbaColors, (o, s) => (pe(), Qe("div", {
        key: t.colors[s],
        class: Ye([
          t.ns.e("color-selector"),
          t.ns.is("alpha", o._alpha < 100),
          { selected: o.selected }
        ]),
        onClick: (l) => t.handleSelect(s)
      }, [
        He("div", {
          style: Sr({ backgroundColor: o.value })
        }, null, 4)
      ], 10, nMe))), 128))
    ], 2)
  ], 2);
}
var iMe = /* @__PURE__ */ Qn(tMe, [["render", rMe], ["__file", "predefine.vue"]]);
const aMe = te({
  name: "ElSlPanel",
  props: {
    color: {
      type: Object,
      required: !0
    }
  },
  setup(t) {
    const e = Jn("color-svpanel"), n = vn(), r = U(0), i = U(0), a = U("hsl(0, 100%, 50%)"), o = L(() => {
      const u = t.color.get("hue"), c = t.color.get("value");
      return { hue: u, value: c };
    });
    function s() {
      const u = t.color.get("saturation"), c = t.color.get("value"), f = n.vnode.el, { clientWidth: d, clientHeight: h } = f;
      i.value = u * d / 100, r.value = (100 - c) * h / 100, a.value = `hsl(${t.color.get("hue")}, 100%, 50%)`;
    }
    function l(u) {
      const f = n.vnode.el.getBoundingClientRect(), { clientX: d, clientY: h } = jD(u);
      let p = d - f.left, v = h - f.top;
      p = Math.max(0, p), p = Math.min(p, f.width), v = Math.max(0, v), v = Math.min(v, f.height), i.value = p, r.value = v, t.color.set({
        saturation: p / f.width * 100,
        value: 100 - v / f.height * 100
      });
    }
    return se(() => o.value, () => {
      s();
    }), it(() => {
      hm(n.vnode.el, {
        drag: (u) => {
          l(u);
        },
        end: (u) => {
          l(u);
        }
      }), s();
    }), {
      cursorTop: r,
      cursorLeft: i,
      background: a,
      colorValue: o,
      handleDrag: l,
      update: s,
      ns: e
    };
  }
}), oMe = /* @__PURE__ */ He("div", null, null, -1), sMe = [
  oMe
];
function lMe(t, e, n, r, i, a) {
  return pe(), Qe("div", {
    class: Ye(t.ns.b()),
    style: Sr({
      backgroundColor: t.background
    })
  }, [
    He("div", {
      class: Ye(t.ns.e("white"))
    }, null, 2),
    He("div", {
      class: Ye(t.ns.e("black"))
    }, null, 2),
    He("div", {
      class: Ye(t.ns.e("cursor")),
      style: Sr({
        top: t.cursorTop + "px",
        left: t.cursorLeft + "px"
      })
    }, sMe, 6)
  ], 6);
}
var uMe = /* @__PURE__ */ Qn(aMe, [["render", lMe], ["__file", "sv-panel.vue"]]);
const cMe = ["onKeydown"], fMe = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"], dMe = te({
  name: "ElColorPicker"
}), hMe = /* @__PURE__ */ te({
  ...dMe,
  props: YEe,
  emits: qEe,
  setup(t, { expose: e, emit: n }) {
    const r = t, { t: i } = w$e(), a = Jn("color"), { formItem: o } = Ax(), s = $x(), l = E0(), { inputId: u, isLabeledByFormItem: c } = oR(r, {
      formItemContext: o
    }), f = U(), d = U(), h = U(), p = U(), v = U(), g = U(), {
      isFocused: m,
      handleFocus: y,
      handleBlur: b
    } = JY(v, {
      beforeBlur(H) {
        var G;
        return (G = p.value) == null ? void 0 : G.isFocusInsideContent(H);
      },
      afterBlur() {
        R(!1), W();
      }
    }), _ = (H) => {
      if (l.value)
        return X();
      y(H);
    };
    let O = !0;
    const S = tn(new _g({
      enableAlpha: r.showAlpha,
      format: r.colorFormat || "",
      value: r.modelValue
    })), x = U(!1), C = U(!1), T = U(""), w = L(() => !r.modelValue && !C.value ? "transparent" : E(S, r.showAlpha)), P = L(() => !r.modelValue && !C.value ? "" : S.value), $ = L(() => c.value ? void 0 : r.label || r.ariaLabel || i("el.colorpicker.defaultLabel"));
    C0({
      from: "label",
      replacement: "aria-label",
      version: "2.8.0",
      scope: "el-color-picker",
      ref: "https://element-plus.org/en-US/component/color-picker.html"
    }, L(() => !!r.label));
    const A = L(() => c.value ? o == null ? void 0 : o.labelId : void 0), D = L(() => [
      a.b("picker"),
      a.is("disabled", l.value),
      a.bm("picker", s.value),
      a.is("focused", m.value)
    ]);
    function E(H, G) {
      if (!(H instanceof _g))
        throw new TypeError("color should be instance of _color Class");
      const { r: re, g: fe, b: de } = H.toRgb();
      return G ? `rgba(${re}, ${fe}, ${de}, ${H.get("alpha") / 100})` : `rgb(${re}, ${fe}, ${de})`;
    }
    function R(H) {
      x.value = H;
    }
    const N = UI(R, 100, { leading: !0 });
    function V() {
      l.value || R(!0);
    }
    function z() {
      N(!1), W();
    }
    function W() {
      Tt(() => {
        r.modelValue ? S.fromString(r.modelValue) : (S.value = "", Tt(() => {
          C.value = !1;
        }));
      });
    }
    function F() {
      l.value || N(!x.value);
    }
    function Q() {
      S.fromString(T.value);
    }
    function Z() {
      const H = S.value;
      n(Qs, H), n("change", H), r.validateEvent && (o == null || o.validate("change").catch((G) => Gi(G))), N(!1), Tt(() => {
        const G = new _g({
          enableAlpha: r.showAlpha,
          format: r.colorFormat || "",
          value: r.modelValue
        });
        S.compare(G) || W();
      });
    }
    function ne() {
      N(!1), n(Qs, null), n("change", null), r.modelValue !== null && r.validateEvent && (o == null || o.validate("change").catch((H) => Gi(H))), W();
    }
    function ee(H) {
      if (x.value && (z(), m.value)) {
        const G = new FocusEvent("focus", H);
        b(G);
      }
    }
    function oe(H) {
      H.preventDefault(), H.stopPropagation(), R(!1), W();
    }
    function K(H) {
      switch (H.code) {
        case Xc.enter:
        case Xc.space:
          H.preventDefault(), H.stopPropagation(), V(), g.value.focus();
          break;
        case Xc.esc:
          oe(H);
          break;
      }
    }
    function ie() {
      v.value.focus();
    }
    function X() {
      v.value.blur();
    }
    return it(() => {
      r.modelValue && (T.value = P.value);
    }), se(() => r.modelValue, (H) => {
      H ? H && H !== S.value && (O = !1, S.fromString(H)) : C.value = !1;
    }), se(() => P.value, (H) => {
      T.value = H, O && n("activeChange", H), O = !0;
    }), se(() => S.value, () => {
      !r.modelValue && !C.value && (C.value = !0);
    }), se(() => x.value, () => {
      Tt(() => {
        var H, G, re;
        (H = f.value) == null || H.update(), (G = d.value) == null || G.update(), (re = h.value) == null || re.update();
      });
    }), pt(mq, {
      currentColor: P
    }), e({
      color: S,
      show: V,
      hide: z,
      focus: ie,
      blur: X
    }), (H, G) => (pe(), je(B(hEe), {
      ref_key: "popper",
      ref: p,
      visible: x.value,
      "show-arrow": !1,
      "fallback-placements": ["bottom", "top", "right", "left"],
      offset: 0,
      "gpu-acceleration": !1,
      "popper-class": [B(a).be("picker", "panel"), B(a).b("dropdown"), H.popperClass],
      "stop-popper-mouse-event": !1,
      effect: "light",
      trigger: "click",
      teleported: H.teleported,
      transition: `${B(a).namespace.value}-zoom-in-top`,
      persistent: "",
      onHide: G[2] || (G[2] = (re) => R(!1))
    }, {
      content: we(() => [
        bi((pe(), Qe("div", {
          onKeydown: Y4(oe, ["esc"])
        }, [
          He("div", {
            class: Ye(B(a).be("dropdown", "main-wrapper"))
          }, [
            M(XEe, {
              ref_key: "hue",
              ref: f,
              class: "hue-slider",
              color: B(S),
              vertical: ""
            }, null, 8, ["color"]),
            M(uMe, {
              ref_key: "sv",
              ref: d,
              color: B(S)
            }, null, 8, ["color"])
          ], 2),
          H.showAlpha ? (pe(), je(jEe, {
            key: 0,
            ref_key: "alpha",
            ref: h,
            color: B(S)
          }, null, 8, ["color"])) : _t("v-if", !0),
          H.predefine ? (pe(), je(iMe, {
            key: 1,
            ref: "predefine",
            "enable-alpha": H.showAlpha,
            color: B(S),
            colors: H.predefine
          }, null, 8, ["enable-alpha", "color", "colors"])) : _t("v-if", !0),
          He("div", {
            class: Ye(B(a).be("dropdown", "btns"))
          }, [
            He("span", {
              class: Ye(B(a).be("dropdown", "value"))
            }, [
              M(B(sR), {
                ref_key: "inputRef",
                ref: g,
                modelValue: T.value,
                "onUpdate:modelValue": G[0] || (G[0] = (re) => T.value = re),
                "validate-event": !1,
                size: "small",
                onKeyup: Y4(Q, ["enter"]),
                onBlur: Q
              }, null, 8, ["modelValue", "onKeyup"])
            ], 2),
            M(B(w6), {
              class: Ye(B(a).be("dropdown", "link-btn")),
              text: "",
              size: "small",
              onClick: ne
            }, {
              default: we(() => [
                Kt(Bi(B(i)("el.colorpicker.clear")), 1)
              ]),
              _: 1
            }, 8, ["class"]),
            M(B(w6), {
              plain: "",
              size: "small",
              class: Ye(B(a).be("dropdown", "btn")),
              onClick: Z
            }, {
              default: we(() => [
                Kt(Bi(B(i)("el.colorpicker.confirm")), 1)
              ]),
              _: 1
            }, 8, ["class"])
          ], 2)
        ], 40, cMe)), [
          [B(CEe), ee]
        ])
      ]),
      default: we(() => [
        He("div", _n({
          id: B(u),
          ref_key: "triggerRef",
          ref: v
        }, H.$attrs, {
          class: B(D),
          role: "button",
          "aria-label": B($),
          "aria-labelledby": B(A),
          "aria-description": B(i)("el.colorpicker.description", { color: H.modelValue || "" }),
          "aria-disabled": B(l),
          tabindex: B(l) ? -1 : H.tabindex,
          onKeydown: K,
          onFocus: _,
          onBlur: G[1] || (G[1] = (...re) => B(b) && B(b)(...re))
        }), [
          B(l) ? (pe(), Qe("div", {
            key: 0,
            class: Ye(B(a).be("picker", "mask"))
          }, null, 2)) : _t("v-if", !0),
          He("div", {
            class: Ye(B(a).be("picker", "trigger")),
            onClick: F
          }, [
            He("span", {
              class: Ye([B(a).be("picker", "color"), B(a).is("alpha", H.showAlpha)])
            }, [
              He("span", {
                class: Ye(B(a).be("picker", "color-inner")),
                style: Sr({
                  backgroundColor: B(w)
                })
              }, [
                bi(M(B(ws), {
                  class: Ye([B(a).be("picker", "icon"), B(a).is("icon-arrow-down")])
                }, {
                  default: we(() => [
                    M(B(e$e))
                  ]),
                  _: 1
                }, 8, ["class"]), [
                  [Bs, H.modelValue || C.value]
                ]),
                bi(M(B(ws), {
                  class: Ye([B(a).be("picker", "empty"), B(a).is("icon-close")])
                }, {
                  default: we(() => [
                    M(B(a$e))
                  ]),
                  _: 1
                }, 8, ["class"]), [
                  [Bs, !H.modelValue && !C.value]
                ])
              ], 6)
            ], 2)
          ], 2)
        ], 16, fMe)
      ]),
      _: 1
    }, 8, ["visible", "popper-class", "teleported", "transition"]));
  }
});
var pMe = /* @__PURE__ */ Qn(hMe, [["__file", "color-picker.vue"]]);
const qd = Df(pMe), yq = (t) => (AS("data-v-70598cf2"), t = t(), ES(), t), vMe = {
  key: 0,
  class: "color-box"
}, gMe = { class: "img-preview" }, mMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-empty" }, "未选择", -1)), yMe = /* @__PURE__ */ yq(() => /* @__PURE__ */ He("div", { class: "img-tip" }, "选择素材", -1)), bMe = /* @__PURE__ */ te({
  __name: "BackgroundSelect",
  props: {
    value: { default: () => ({
      type: "none",
      color: "",
      image: "",
      fillType: ""
    }) },
    filterOptions: {}
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = U(n.value), a = [
      { label: "无", value: "none" },
      { label: "颜色", value: "color" },
      { label: "图片", value: "image" }
    ], o = L(() => n.filterOptions ? a.filter((l) => {
      var u;
      return !((u = n.filterOptions) != null && u.includes(l.value));
    }) : a);
    se(
      () => i.value,
      () => {
        r("update:value", i.value);
      },
      {
        deep: !0
      }
    );
    const s = (l) => {
      l === "color" && !i.value.color && (i.value.color = "#0B074BFF");
    };
    return (l, u) => (pe(), Qe(wt, null, [
      M(B(ci), {
        value: i.value.type,
        "onUpdate:value": u[0] || (u[0] = (c) => i.value.type = c),
        style: { width: "100%" },
        options: o.value,
        onChange: s
      }, null, 8, ["value", "options"]),
      i.value.type === "color" ? (pe(), Qe("div", vMe, [
        M(B(qd), {
          modelValue: i.value.color,
          "onUpdate:modelValue": u[1] || (u[1] = (c) => i.value.color = c),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        M(B(sR), {
          modelValue: i.value.color,
          "onUpdate:modelValue": u[2] || (u[2] = (c) => i.value.color = c),
          size: "small"
        }, null, 8, ["modelValue"])
      ])) : i.value.type === "image" ? (pe(), Qe(wt, { key: 1 }, [
        He("div", gMe, [
          mMe,
          M(B(Al), {
            src: i.value.image
          }, null, 8, ["src"]),
          yMe
        ]),
        M(B(gq), {
          modelValue: i.value.fillType,
          "onUpdate:modelValue": u[3] || (u[3] = (c) => i.value.fillType = c)
        }, {
          default: we(() => [
            M(B(bg), { value: "cover" }, {
              default: we(() => [
                Kt("填充")
              ]),
              _: 1
            }),
            M(B(bg), { value: "contain" }, {
              default: we(() => [
                Kt("适应")
              ]),
              _: 1
            }),
            M(B(bg), { value: "stretch" }, {
              default: we(() => [
                Kt("拉伸")
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["modelValue"])
      ], 64)) : _t("", !0)
    ], 64));
  }
}), po = (t, e) => {
  const n = t.__vccOpts || t;
  for (const [r, i] of e)
    n[r] = i;
  return n;
}, _Me = /* @__PURE__ */ po(bMe, [["__scopeId", "data-v-70598cf2"]]), OMe = /* @__PURE__ */ te({
  __name: "ColorSelect",
  props: {
    value: {},
    gradient: { type: Boolean, default: !0 }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var s, l;
    const n = e, r = t, i = U(((s = r.value) == null ? void 0 : s.length) <= 9 || !r.value ? "pure" : "gradient"), a = U(r.value), o = U(((l = r.value) == null ? void 0 : l.length) >= 9 ? r.value.slice(22).replace(")", "").split(",") : ["#4ba9ff", "#fff"]);
    return se(
      () => [i.value, a.value, o.value],
      () => {
        i.value === "pure" ? a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value : a.value = `linear-gradient(90deg, ${o.value.join(",")})`, n("update:value", a.value);
      },
      {
        deep: !0
      }
    ), se(
      () => r.gradient,
      (u) => {
        u || (i.value = "pure", a.value = a.value.length > 9 ? "#FFFFFFFF" : a.value);
      }
    ), (u, c) => (pe(), Qe(wt, null, [
      u.gradient ? (pe(), je(B(gq), {
        key: 0,
        modelValue: i.value,
        "onUpdate:modelValue": c[0] || (c[0] = (f) => i.value = f),
        size: "small",
        style: { width: "100%" }
      }, {
        default: we(() => [
          M(B(bg), { value: "pure" }, {
            default: we(() => [
              Kt("单色")
            ]),
            _: 1
          }),
          M(B(bg), { value: "gradient" }, {
            default: we(() => [
              Kt("渐变色")
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"])) : _t("", !0),
      i.value === "pure" ? (pe(), Qe("div", {
        key: 1,
        class: "color-box",
        style: Sr({ marginTop: u.gradient ? "12px" : "0" })
      }, [
        M(B(qd), {
          modelValue: a.value,
          "onUpdate:modelValue": c[1] || (c[1] = (f) => a.value = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        M(B(sR), {
          modelValue: a.value,
          "onUpdate:modelValue": c[2] || (c[2] = (f) => a.value = f),
          size: "small"
        }, null, 8, ["modelValue"])
      ], 4)) : i.value === "gradient" ? (pe(), Qe("div", {
        key: 2,
        class: "gradient-box",
        style: Sr({ background: a.value })
      }, [
        M(B(qd), {
          modelValue: o.value[0],
          "onUpdate:modelValue": c[3] || (c[3] = (f) => o.value[0] = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"]),
        M(B(qd), {
          modelValue: o.value[1],
          "onUpdate:modelValue": c[4] || (c[4] = (f) => o.value[1] = f),
          "color-format": "hex",
          "show-alpha": "",
          size: "small"
        }, null, 8, ["modelValue"])
      ], 4)) : _t("", !0)
    ], 64));
  }
}), SMe = /* @__PURE__ */ po(OMe, [["__scopeId", "data-v-d5768739"]]), Z1 = [
  {
    name: "清新",
    color: ["#00a8e1", "#99cc00", "#e30039", "#fcd300", "#800080"]
  },
  {
    name: "复古",
    color: ["#FFA69E", "#FAE3D9", "#B8F2E6", "#56E39F", "#3A837D"]
  },
  {
    name: "商务",
    color: ["#194f97", "#555555", "#bd6b08", "#00686b", "#c82d31"]
  },
  {
    name: "经典",
    color: ["#002c53", "#ffa510", "#0c84c6", "#ffffff", "#f74d4d"]
  },
  {
    name: "怀旧",
    color: ["#3b6291", "#943c39", "#779043", "#624c7c", "#388498"]
  }
], xMe = {
  // 调色盘-预设颜色
  color: Z1[0].color,
  // 标题
  title: {
    show: !0,
    left: "center",
    top: 8,
    textStyle: {
      color: "#FFFFFFFF",
      fontSize: 16,
      fontWeight: "normal"
    }
  },
  // 图例
  legend: {
    show: !0,
    textStyle: {
      color: "#FFFFFFFF"
    },
    top: 32
  },
  // 布局
  grid: {
    bottom: 34,
    right: 20,
    left: 50,
    top: 60
  },
  // x轴
  xAxis: {
    type: "category",
    name: "",
    nameLocation: "middle",
    nameTruncate: {
      ellipsis: "...",
      maxWidth: 80
    },
    nameTextStyle: {
      color: "#FFFFFFFF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLabel: {
      show: !0,
      color: "#9fadbf",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLine: {
      show: !0,
      lineStyle: {
        width: 1
      }
    },
    axisTick: {
      show: !0,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    }
  },
  // y轴
  yAxis: {
    splitLine: {
      show: !0,
      lineStyle: {
        type: "dashed",
        color: "#36485f"
      }
    },
    type: "category",
    name: "",
    nameLocation: "middle",
    nameTruncate: {
      ellipsis: "...",
      maxWidth: 80
    },
    nameTextStyle: {
      color: "#FFFFFFFF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    axisLabel: {
      show: !0,
      color: "#9fadbf",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal",
      rotate: 0
    },
    axisLine: {
      show: !1,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    },
    axisTick: {
      show: !1,
      lineStyle: {
        width: 1,
        color: "#ccc"
      }
    }
  },
  // 提示
  tooltip: {
    show: !0,
    trigger: "axis",
    formatter: "{b} {c}",
    // valueFormatter: "(value, dataIndex) => value",
    axisPointer: {
      type: "line"
    },
    textStyle: {
      color: "#000000FF",
      fontSize: 12,
      fontWeight: "normal",
      fontStyle: "normal"
    },
    padding: 10,
    borderWidth: 1,
    borderColor: "#ccc",
    borderRadius: 4,
    backgroundColor: "#FFFFFFFF",
    extraCssText: ""
  }
}, wMe = { class: "color-list" }, CMe = { class: "del-btn" }, TMe = /* @__PURE__ */ te({
  __name: "ColorScheme",
  props: {
    value: {
      type: Array,
      default: () => []
    }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    const n = t, r = Z1.map((d) => d.color.join(",")), i = e, a = U(r.includes(n.value.join(",")) ? n.value.join(",") : "custom"), o = U(n.value), s = U();
    function l(d) {
      d === "custom" || (o.value = d.split(","), i("update:value", d.split(",")));
    }
    const u = () => {
      var d;
      (d = s.value) == null || d.show();
    };
    function c(d) {
      o.value.push(d), a.value = "custom", i("update:value", o.value);
    }
    const f = (d) => {
      o.value.splice(d, 1), a.value = "custom", i("update:value", o.value);
    };
    return (d, h) => (pe(), Qe("div", null, [
      M(B(ci), {
        value: a.value,
        "onUpdate:value": h[0] || (h[0] = (p) => a.value = p),
        size: "small",
        style: { width: "100%" },
        onChange: l
      }, {
        default: we(() => [
          (pe(!0), Qe(wt, null, ag(B(Z1), (p) => (pe(), je(B(M1), {
            key: p.name,
            value: p.color.join(",")
          }, {
            default: we(() => [
              (pe(!0), Qe(wt, null, ag(p.color.slice(0, 5), (v) => (pe(), Qe("span", {
                class: "color-block",
                key: v,
                style: Sr({ background: v })
              }, null, 4))), 128)),
              Kt(" " + Bi(p.name), 1)
            ]),
            _: 2
          }, 1032, ["value"]))), 128)),
          M(B(M1), { value: "custom" }, {
            default: we(() => [
              Kt("自定义组合")
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"]),
      He("div", wMe, [
        (pe(!0), Qe(wt, null, ag(o.value, (p, v) => (pe(), Qe("span", {
          class: "color-block",
          key: v,
          style: Sr({ background: p })
        }, [
          He("span", CMe, [
            M(B(Da), {
              onClick: (g) => f(v)
            }, null, 8, ["onClick"])
          ])
        ], 4))), 128)),
        He("span", {
          class: "color-block cus-btn",
          onClick: u
        }, [
          M(B(yx))
        ]),
        M(B(qd), {
          ref_key: "colorPickerRef",
          ref: s,
          style: { width: "0", height: "0", opacity: "0" },
          onChange: c
        }, null, 512)
      ])
    ]));
  }
}), PMe = /* @__PURE__ */ po(TMe, [["__scopeId", "data-v-b29b1b78"]]), $Me = { class: "position" }, AMe = /* @__PURE__ */ te({
  __name: "Position",
  props: {
    value: {},
    type: { default: "line" }
  },
  emits: ["update:value"],
  setup(t) {
    return (e, n) => (pe(), Qe("div", $Me, [
      e.type === "line" ? (pe(), je(B(vf), {
        key: 0,
        value: e.value,
        onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r.target.value))
      }, {
        default: we(() => [
          M(B(Io), { value: "left" }, {
            default: we(() => [
              M(B(MD))
            ]),
            _: 1
          }),
          M(B(Io), { value: "center" }, {
            default: we(() => [
              M(B(ED))
            ]),
            _: 1
          }),
          M(B(Io), { value: "right" }, {
            default: we(() => [
              M(B(ID))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"])) : e.type === "round" ? (pe(), je(B(vf), {
        key: 1,
        value: e.value,
        onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r.target.value))
      }, {
        default: we(() => [
          M(B(Io), { value: "top" }, {
            default: we(() => [
              M(B(ND))
            ]),
            _: 1
          }),
          M(B(Io), { value: "bottom" }, {
            default: we(() => [
              M(B(RD))
            ]),
            _: 1
          }),
          M(B(Io), { value: "left" }, {
            default: we(() => [
              M(B(kD))
            ]),
            _: 1
          }),
          M(B(Io), { value: "right" }, {
            default: we(() => [
              M(B(LD))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["value"])) : _t("", !0)
    ]));
  }
}), EMe = /* @__PURE__ */ po(AMe, [["__scopeId", "data-v-a4b8591a"]]), MMe = { class: "font-style" }, IMe = { class: "cus-btn" }, DMe = /* @__PURE__ */ te({
  __name: "FontStyle",
  props: {
    value: {}
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var v, g, m, y;
    const n = t, r = e, i = U((v = n.value) == null ? void 0 : v.bold), a = U((g = n.value) == null ? void 0 : g.italic), o = U((m = n.value) == null ? void 0 : m.size), s = U((y = n.value) == null ? void 0 : y.color), l = U(), u = () => {
      r("update:value", {
        size: o.value,
        bold: i.value,
        italic: a.value,
        color: s.value
      });
    }, c = () => {
      i.value = !i.value, u();
    }, f = () => {
      a.value = !a.value, u();
    };
    function d(b) {
      s.value = b, u();
    }
    function h(b) {
      o.value = b, u();
    }
    const p = () => {
      var b;
      (b = l.value) == null || b.show();
    };
    return (b, _) => (pe(), Qe("div", MMe, [
      M(B(Ur), {
        size: "small",
        onClick: p
      }, {
        default: we(() => [
          He("span", IMe, [
            M(B(BD)),
            He("div", {
              class: "color-block",
              style: Sr({ background: s.value })
            }, null, 4),
            M(B(qd), {
              ref_key: "colorPickerRef",
              ref: l,
              style: { width: "0", height: "0", opacity: "0" },
              value: s.value,
              "onUpdate:value": _[0] || (_[0] = (O) => s.value = O),
              onChange: d
            }, null, 8, ["value"])
          ])
        ]),
        _: 1
      }),
      M(B(Ur), {
        size: "small",
        onClick: c
      }, {
        default: we(() => [
          He("span", {
            class: Ye(["cus-btn", { "active-btn": i.value }])
          }, [
            M(B(DD))
          ], 2)
        ]),
        _: 1
      }),
      M(B(Ur), {
        size: "small",
        onClick: f
      }, {
        default: we(() => [
          He("span", {
            class: Ye(["cus-btn", { "active-btn": a.value }])
          }, [
            M(B(zD))
          ], 2)
        ]),
        _: 1
      }),
      M(B(O0), {
        size: "small",
        value: o.value,
        min: 12,
        step: 1,
        precision: 0,
        style: { width: "80px" },
        onChange: h
      }, {
        addonAfter: we(() => [
          Kt("px")
        ]),
        _: 1
      }, 8, ["value"])
    ]));
  }
}), RMe = /* @__PURE__ */ po(DMe, [["__scopeId", "data-v-12e62bfe"]]), kMe = { class: "cus-slider" }, LMe = /* @__PURE__ */ te({
  __name: "CusSlider",
  props: {
    value: {}
  },
  emits: ["update:value"],
  setup(t) {
    return (e, n) => (pe(), Qe("div", kMe, [
      M(B(KTe), {
        value: e.value,
        onChange: n[0] || (n[0] = (r) => e.$emit("update:value", r)),
        "tip-formatter": (r) => `${r}%`
      }, null, 8, ["value", "tip-formatter"]),
      M(B(O0), {
        value: e.value,
        onChange: n[1] || (n[1] = (r) => e.$emit("update:value", r)),
        "addon-after": "%"
      }, null, 8, ["value"])
    ]));
  }
}), NMe = /* @__PURE__ */ po(LMe, [["__scopeId", "data-v-2fe8fa98"]]), BMe = te({
  name: "FmBorderRadius",
  components: {
    RadioGroup: vf,
    RadioButton: Io,
    InputNumber: O0,
    Select: ci,
    RadiusUpleftOutlined: WD,
    RadiusUprightOutlined: QD,
    RadiusBottomleftOutlined: VD,
    RadiusBottomrightOutlined: FD
  },
  props: {
    value: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["update:value"],
  setup(t, { emit: e }) {
    var r, i, a, o;
    const n = tn({
      type: t.value.type || "all",
      value: t.value.type === "all" ? t.value.value : 0,
      unit: t.value.unit || "px",
      topLeft: typeof t.value.value == "object" ? (r = t.value.value) == null ? void 0 : r.topLeft : 0,
      topRight: typeof t.value.value == "object" ? (i = t.value.value) == null ? void 0 : i.topRight : 0,
      bottomLeft: typeof t.value.value == "object" ? (a = t.value.value) == null ? void 0 : a.bottomLeft : 0,
      bottomRight: typeof t.value.value == "object" ? (o = t.value.value) == null ? void 0 : o.bottomRight : 0
    });
    return se(
      () => n,
      (s) => {
        e("update:value", {
          type: s.type,
          value: s.type === "all" ? s.value : {
            topLeft: s.topLeft,
            topRight: s.topRight,
            bottomLeft: s.bottomLeft,
            bottomRight: s.bottomRight
          },
          unit: s.unit
        });
      },
      {
        deep: !0
      }
    ), {
      radius: n,
      unitOptions: [
        { label: "px", value: "px" },
        { label: "%", value: "%" }
      ]
    };
  }
}), zMe = {
  key: 0,
  class: "all"
}, VMe = {
  key: 1,
  class: "custom"
};
function FMe(t, e, n, r, i, a) {
  const o = cl("RadioButton"), s = cl("RadioGroup"), l = cl("InputNumber"), u = cl("Select"), c = cl("RadiusUpleftOutlined"), f = cl("RadiusUprightOutlined"), d = cl("RadiusBottomleftOutlined"), h = cl("RadiusBottomrightOutlined");
  return pe(), Qe("div", null, [
    M(s, {
      value: t.radius.type,
      "onUpdate:value": e[0] || (e[0] = (p) => t.radius.type = p)
    }, {
      default: we(() => [
        M(o, { value: "all" }, {
          default: we(() => [
            Kt("整体")
          ]),
          _: 1
        }),
        M(o, { value: "custom" }, {
          default: we(() => [
            Kt("单个")
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["value"]),
    t.radius.type === "all" ? (pe(), Qe("div", zMe, [
      M(l, {
        value: t.radius.value,
        "onUpdate:value": e[1] || (e[1] = (p) => t.radius.value = p)
      }, null, 8, ["value"]),
      M(u, {
        value: t.radius.unit,
        "onUpdate:value": e[2] || (e[2] = (p) => t.radius.unit = p),
        options: t.unitOptions
      }, null, 8, ["value", "options"])
    ])) : (pe(), Qe("div", VMe, [
      M(l, {
        value: t.radius.topLeft,
        "onUpdate:value": e[3] || (e[3] = (p) => t.radius.topLeft = p)
      }, {
        addonBefore: we(() => [
          M(c)
        ]),
        _: 1
      }, 8, ["value"]),
      M(l, {
        value: t.radius.topRight,
        "onUpdate:value": e[4] || (e[4] = (p) => t.radius.topRight = p)
      }, {
        addonBefore: we(() => [
          M(f)
        ]),
        _: 1
      }, 8, ["value"]),
      M(l, {
        value: t.radius.bottomLeft,
        "onUpdate:value": e[5] || (e[5] = (p) => t.radius.bottomLeft = p)
      }, {
        addonBefore: we(() => [
          M(d)
        ]),
        _: 1
      }, 8, ["value"]),
      M(l, {
        value: t.radius.bottomRight,
        "onUpdate:value": e[6] || (e[6] = (p) => t.radius.bottomRight = p)
      }, {
        addonBefore: we(() => [
          M(h)
        ]),
        _: 1
      }, 8, ["value"]),
      M(u, {
        value: t.radius.unit,
        "onUpdate:value": e[7] || (e[7] = (p) => t.radius.unit = p),
        options: t.unitOptions
      }, null, 8, ["value", "options"])
    ]))
  ]);
}
const WMe = /* @__PURE__ */ po(BMe, [["render", FMe], ["__scopeId", "data-v-da2b5cf6"]]), QMe = /* @__PURE__ */ te({
  __name: "CusFormItem",
  props: {
    item: {},
    modelValue: {}
  },
  emits: ["update:modelValue"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = U(n.modelValue);
    return se(
      () => i.value,
      () => {
        r("update:modelValue", i.value);
      },
      { deep: !0 }
    ), se(
      () => n.modelValue,
      (a) => {
        YS(a, i.value) || (i.value = a);
      }
    ), (a, o) => (pe(), je(B(PX), {
      label: a.item.type !== "divider" ? a.item.label : "",
      name: a.item.prop,
      rules: a.item.rules
    }, {
      default: we(() => {
        var s, l, u, c, f, d, h, p, v, g, m;
        return [
          a.item.type === "divider" ? (pe(), je(B(Zwe), {
            key: 0,
            style: { margin: "0" }
          }, {
            default: we(() => [
              Kt(Bi(a.item.label), 1)
            ]),
            _: 1
          })) : a.item.type === "input" ? (pe(), je(B(Hn), _n({
            key: 1,
            value: i.value,
            "onUpdate:value": o[0] || (o[0] = (y) => i.value = y)
          }, (s = a.item) == null ? void 0 : s.fieldProps), null, 16, ["value"])) : a.item.type === "select" ? (pe(), je(B(ci), _n({
            key: 2,
            value: i.value,
            "onUpdate:value": o[1] || (o[1] = (y) => i.value = y)
          }, (l = a.item) == null ? void 0 : l.fieldProps), null, 16, ["value"])) : a.item.type === "inputNumber" ? (pe(), je(B(O0), _n({
            key: 3,
            value: i.value,
            "onUpdate:value": o[2] || (o[2] = (y) => i.value = y)
          }, (u = a.item) == null ? void 0 : u.fieldProps, { style: { width: "100%" } }), null, 16, ["value"])) : a.item.type === "image" ? (pe(), je(B(Al), _n({
            key: 4,
            value: i.value,
            "onUpdate:value": o[3] || (o[3] = (y) => i.value = y)
          }, (c = a.item) == null ? void 0 : c.fieldProps), null, 16, ["value"])) : a.item.type === "checkboxGroup" ? (pe(), je(B(z1), _n({
            key: 5,
            value: i.value,
            "onUpdate:value": o[4] || (o[4] = (y) => i.value = y)
          }, (f = a.item) == null ? void 0 : f.fieldProps), null, 16, ["value"])) : a.item.type === "backgroundSelect" ? (pe(), je(_Me, _n({
            key: 6,
            value: i.value,
            "onUpdate:value": o[5] || (o[5] = (y) => i.value = y)
          }, (d = a.item) == null ? void 0 : d.fieldProps), null, 16, ["value"])) : a.item.type === "colorSelect" ? (pe(), je(SMe, _n({
            key: 7,
            value: i.value,
            "onUpdate:value": o[6] || (o[6] = (y) => i.value = y)
          }, (h = a.item) == null ? void 0 : h.fieldProps), null, 16, ["value"])) : a.item.type === "colorScheme" ? (pe(), je(PMe, _n({
            key: 8,
            value: i.value,
            "onUpdate:value": o[7] || (o[7] = (y) => i.value = y)
          }, (p = a.item) == null ? void 0 : p.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroup" ? (pe(), je(B(vf), _n({
            key: 9,
            value: i.value,
            "onUpdate:value": o[8] || (o[8] = (y) => i.value = y),
            size: "small"
          }, (v = a.item) == null ? void 0 : v.fieldProps), null, 16, ["value"])) : a.item.type === "radioGroupButton" ? (pe(), je(B(vf), {
            key: 10,
            value: i.value,
            "onUpdate:value": o[9] || (o[9] = (y) => i.value = y),
            size: "small"
          }, {
            default: we(() => [
              (pe(!0), Qe(wt, null, ag(a.item.fieldProps.options, (y) => (pe(), je(B(Io), {
                key: y.value,
                value: y.value
              }, {
                default: we(() => [
                  Kt(Bi(y.label), 1)
                ]),
                _: 2
              }, 1032, ["value"]))), 128))
            ]),
            _: 1
          }, 8, ["value"])) : a.item.type === "position" ? (pe(), je(EMe, _n({
            key: 11,
            value: i.value,
            "onUpdate:value": o[10] || (o[10] = (y) => i.value = y)
          }, (g = a.item) == null ? void 0 : g.fieldProps), null, 16, ["value"])) : a.item.type === "fontStyle" ? (pe(), je(RMe, _n({
            key: 12,
            value: i.value,
            "onUpdate:value": o[11] || (o[11] = (y) => i.value = y)
          }, (m = a.item) == null ? void 0 : m.fieldProps), null, 16, ["value"])) : a.item.type === "slider" ? (pe(), je(B(im), { key: 13 }, {
            default: we(() => {
              var y;
              return [
                M(NMe, _n({
                  value: i.value,
                  "onUpdate:value": o[12] || (o[12] = (b) => i.value = b)
                }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
              ];
            }),
            _: 1
          })) : a.item.type === "boderRadiusSelect" ? (pe(), je(B(im), { key: 14 }, {
            default: we(() => {
              var y;
              return [
                M(WMe, _n({
                  value: i.value,
                  "onUpdate:value": o[13] || (o[13] = (b) => i.value = b)
                }, (y = a.item) == null ? void 0 : y.fieldProps), null, 16, ["value"])
              ];
            }),
            _: 1
          })) : _t("", !0),
          a.item.tip ? (pe(), je(B(dx), {
            key: 15,
            title: a.item.tip
          }, {
            default: we(() => [
              M(B(fx), { style: { color: "#666" } })
            ]),
            _: 1
          }, 8, ["title"])) : _t("", !0)
        ];
      }),
      _: 1
    }, 8, ["label", "name", "rules"]));
  }
}), HMe = /* @__PURE__ */ po(QMe, [["__scopeId", "data-v-04c55003"]]), Mx = te({
  props: {
    columns: {
      type: Array,
      default: () => []
    },
    formModel: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = U({}), r = U(), i = U({}), a = L(() => t.columns.map((f) => ({
      ...f,
      rules: (f == null ? void 0 : f.rules) || []
    }))), o = (f) => {
      f == null || f.forEach((d) => {
        var h;
        if (d.type === "group")
          o(d.children);
        else if (d.type === "dependency") {
          const p = (h = d.children) == null ? void 0 : h.call(
            d,
            am(n.value, d.name || []),
            n
          );
          o(p);
        } else {
          if (d.type === "divider") return;
          const p = kt(t.formModel, d.prop);
          n.value[d.prop] = d != null && d.valueToForm ? d.valueToForm(p, t.formModel) : p ?? d.defaultValue, d.format ? d.format(i, n.value[d.prop]) : i.value[d.prop] = p ?? d.defaultValue;
        }
      });
    }, s = (f, d) => {
      n.value[d.prop] = f, d.format ? d.format(i, f) : i.value[d.prop] = f, e("change", i.value);
    }, l = (f) => {
      var d;
      switch (f.type) {
        case "dependency": {
          const h = (d = f.children) == null ? void 0 : d.call(
            f,
            am(n.value, f.name || []),
            n
          );
          return o(h), c(h);
        }
        case "group":
          return u(f);
        default:
          return /* @__PURE__ */ React.createElement(
            HMe,
            {
              key: f.prop,
              item: f,
              modelValue: n.value[f.prop],
              "onUpdate:modelValue": (h) => {
                s(h, f);
              }
            }
          );
      }
    }, u = (f) => {
      var d;
      return /* @__PURE__ */ React.createElement(cg, { style: { borderRadius: 0 } }, /* @__PURE__ */ React.createElement(B1, { style: { borderRadius: 0 }, key: f.prop, header: f.label }, (d = f.children) == null ? void 0 : d.map((h) => l(h))));
    }, c = (f) => f.map((d) => {
      switch (d.type) {
        case "group":
          return u(d);
        default:
          return l(d);
      }
    });
    return se(
      () => a.value,
      (f) => {
        f && o(f);
      },
      { immediate: !0 }
    ), () => /* @__PURE__ */ React.createElement(
      dr,
      {
        model: n,
        colon: !1,
        "label-col": { span: 8 },
        ref: r,
        layout: "horizontal",
        size: "small"
      },
      c(a.value)
    );
  }
}), bq = /* @__PURE__ */ te({
  __name: "Config",
  props: eI,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = L(() => [
      {
        label: "内容",
        prop: "text",
        type: "input",
        defaultValue: n.text
      },
      {
        label: "字体",
        prop: "fontSize",
        type: "inputNumber",
        defaultValue: n.fontSize
      },
      {
        label: "颜色",
        prop: "color",
        type: "colorSelect",
        defaultValue: n.color
      },
      {
        label: "对齐",
        prop: "textAlign",
        type: "radioGroup",
        defaultValue: n.textAlign,
        fieldProps: {
          options: [
            { label: "左对齐", value: "left" },
            { label: "居中", value: "center" },
            { label: "右对齐", value: "right" }
          ]
        }
      }
    ]), a = (o) => {
      r("change", o);
    };
    return (o, s) => (pe(), je(B(Mx), _n({ columns: i.value }, o.$attrs, { onChange: a }), null, 16, ["columns"]));
  }
});
Zg.Config = bq;
Zg.install = (t) => (t.component("FmDashboardTitle", Zg), t);
const GMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: bq,
  default: Zg,
  defaultPropsValue: jle,
  titleProps: eI
}, Symbol.toStringTag, { value: "Module" }));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var iA = function(t, e) {
  return iA = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
    n.__proto__ = r;
  } || function(n, r) {
    for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
  }, iA(t, e);
};
function q(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
  iA(t, e);
  function n() {
    this.constructor = t;
  }
  t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
}
var jMe = /* @__PURE__ */ function() {
  function t() {
    this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
  }
  return t;
}(), ZMe = /* @__PURE__ */ function() {
  function t() {
    this.browser = new jMe(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window < "u";
  }
  return t;
}(), fc = new ZMe();
typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (fc.wxa = !0, fc.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? fc.worker = !0 : typeof navigator > "u" || navigator.userAgent.indexOf("Node.js") === 0 ? (fc.node = !0, fc.svgSupported = !0) : UMe(navigator.userAgent, fc);
function UMe(t, e) {
  var n = e.browser, r = t.match(/Firefox\/([\d.]+)/), i = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(t);
  r && (n.firefox = !0, n.version = r[1]), i && (n.ie = !0, n.version = i[1]), a && (n.edge = !0, n.version = a[1], n.newEdge = +a[1].split(".")[0] > 18), o && (n.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !n.ie && !n.edge, e.pointerEventsSupported = "onpointerdown" in window && (n.edge || n.ie && +n.version >= 11), e.domSupported = typeof document < "u";
  var s = document.documentElement.style;
  e.transform3dSupported = (n.ie && "transition" in s || n.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || n.ie && +n.version >= 9;
}
const vt = fc;
var hR = 12, _q = "sans-serif", iu = hR + "px " + _q, XMe = 20, YMe = 100, qMe = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
function KMe(t) {
  var e = {};
  if (typeof JSON > "u")
    return e;
  for (var n = 0; n < t.length; n++) {
    var r = String.fromCharCode(n + 32), i = (t.charCodeAt(n) - XMe) / YMe;
    e[r] = i;
  }
  return e;
}
var JMe = KMe(qMe), io = {
  createCanvas: function() {
    return typeof document < "u" && document.createElement("canvas");
  },
  measureText: /* @__PURE__ */ function() {
    var t, e;
    return function(n, r) {
      if (!t) {
        var i = io.createCanvas();
        t = i && i.getContext("2d");
      }
      if (t)
        return e !== r && (e = t.font = r || iu), t.measureText(n);
      n = n || "", r = r || iu;
      var a = /((?:\d+)?\.?\d*)px/.exec(r), o = a && +a[1] || hR, s = 0;
      if (r.indexOf("mono") >= 0)
        s = o * n.length;
      else
        for (var l = 0; l < n.length; l++) {
          var u = JMe[n[l]];
          s += u == null ? o : u * o;
        }
      return { width: s };
    };
  }(),
  loadImage: function(t, e, n) {
    var r = new Image();
    return r.onload = e, r.onerror = n, r.src = t, r;
  }
};
function Oq(t) {
  for (var e in io)
    t[e] && (io[e] = t[e]);
}
var Sq = Aa([
  "Function",
  "RegExp",
  "Date",
  "Error",
  "CanvasGradient",
  "CanvasPattern",
  "Image",
  "Canvas"
], function(t, e) {
  return t["[object " + e + "]"] = !0, t;
}, {}), xq = Aa([
  "Int8",
  "Uint8",
  "Uint8Clamped",
  "Int16",
  "Uint16",
  "Int32",
  "Uint32",
  "Float32",
  "Float64"
], function(t, e) {
  return t["[object " + e + "Array]"] = !0, t;
}, {}), cp = Object.prototype.toString, Ix = Array.prototype, eIe = Ix.forEach, tIe = Ix.filter, pR = Ix.slice, nIe = Ix.map, M6 = (function() {
}).constructor, zy = M6 ? M6.prototype : null, vR = "__proto__", rIe = 2311;
function gR() {
  return rIe++;
}
function Oa() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  typeof console < "u" && console.error.apply(console, t);
}
function Le(t) {
  if (t == null || typeof t != "object")
    return t;
  var e = t, n = cp.call(t);
  if (n === "[object Array]") {
    if (!Kd(t)) {
      e = [];
      for (var r = 0, i = t.length; r < i; r++)
        e[r] = Le(t[r]);
    }
  } else if (xq[n]) {
    if (!Kd(t)) {
      var a = t.constructor;
      if (a.from)
        e = a.from(t);
      else {
        e = new a(t.length);
        for (var r = 0, i = t.length; r < i; r++)
          e[r] = t[r];
      }
    }
  } else if (!Sq[n] && !Kd(t) && !au(t)) {
    e = {};
    for (var o in t)
      t.hasOwnProperty(o) && o !== vR && (e[o] = Le(t[o]));
  }
  return e;
}
function qe(t, e, n) {
  if (!Ie(e) || !Ie(t))
    return n ? Le(e) : t;
  for (var r in e)
    if (e.hasOwnProperty(r) && r !== vR) {
      var i = t[r], a = e[r];
      Ie(a) && Ie(i) && !ue(a) && !ue(i) && !au(a) && !au(i) && !aA(a) && !aA(i) && !Kd(a) && !Kd(i) ? qe(i, a, n) : (n || !(r in t)) && (t[r] = Le(e[r]));
    }
  return t;
}
function Dx(t, e) {
  for (var n = t[0], r = 1, i = t.length; r < i; r++)
    n = qe(n, t[r], e);
  return n;
}
function le(t, e) {
  if (Object.assign)
    Object.assign(t, e);
  else
    for (var n in e)
      e.hasOwnProperty(n) && n !== vR && (t[n] = e[n]);
  return t;
}
function Re(t, e, n) {
  for (var r = st(e), i = 0; i < r.length; i++) {
    var a = r[i];
    (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
  }
  return t;
}
var iIe = io.createCanvas;
function et(t, e) {
  if (t) {
    if (t.indexOf)
      return t.indexOf(e);
    for (var n = 0, r = t.length; n < r; n++)
      if (t[n] === e)
        return n;
  }
  return -1;
}
function mR(t, e) {
  var n = t.prototype;
  function r() {
  }
  r.prototype = e.prototype, t.prototype = new r();
  for (var i in n)
    n.hasOwnProperty(i) && (t.prototype[i] = n[i]);
  t.prototype.constructor = t, t.superClass = e;
}
function xn(t, e, n) {
  if (t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
    for (var r = Object.getOwnPropertyNames(e), i = 0; i < r.length; i++) {
      var a = r[i];
      a !== "constructor" && (n ? e[a] != null : t[a] == null) && (t[a] = e[a]);
    }
  else
    Re(t, e, n);
}
function wr(t) {
  return !t || typeof t == "string" ? !1 : typeof t.length == "number";
}
function k(t, e, n) {
  if (t && e)
    if (t.forEach && t.forEach === eIe)
      t.forEach(e, n);
    else if (t.length === +t.length)
      for (var r = 0, i = t.length; r < i; r++)
        e.call(n, t[r], r, t);
    else
      for (var a in t)
        t.hasOwnProperty(a) && e.call(n, t[a], a, t);
}
function ce(t, e, n) {
  if (!t)
    return [];
  if (!e)
    return Rx(t);
  if (t.map && t.map === nIe)
    return t.map(e, n);
  for (var r = [], i = 0, a = t.length; i < a; i++)
    r.push(e.call(n, t[i], i, t));
  return r;
}
function Aa(t, e, n, r) {
  if (t && e) {
    for (var i = 0, a = t.length; i < a; i++)
      n = e.call(r, n, t[i], i, t);
    return n;
  }
}
function Nt(t, e, n) {
  if (!t)
    return [];
  if (!e)
    return Rx(t);
  if (t.filter && t.filter === tIe)
    return t.filter(e, n);
  for (var r = [], i = 0, a = t.length; i < a; i++)
    e.call(n, t[i], i, t) && r.push(t[i]);
  return r;
}
function wq(t, e, n) {
  if (t && e) {
    for (var r = 0, i = t.length; r < i; r++)
      if (e.call(n, t[r], r, t))
        return t[r];
  }
}
function st(t) {
  if (!t)
    return [];
  if (Object.keys)
    return Object.keys(t);
  var e = [];
  for (var n in t)
    t.hasOwnProperty(n) && e.push(n);
  return e;
}
function aIe(t, e) {
  for (var n = [], r = 2; r < arguments.length; r++)
    n[r - 2] = arguments[r];
  return function() {
    return t.apply(e, n.concat(pR.call(arguments)));
  };
}
var xe = zy && Me(zy.bind) ? zy.call.bind(zy.bind) : aIe;
function Ue(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return function() {
    return t.apply(this, e.concat(pR.call(arguments)));
  };
}
function ue(t) {
  return Array.isArray ? Array.isArray(t) : cp.call(t) === "[object Array]";
}
function Me(t) {
  return typeof t == "function";
}
function Oe(t) {
  return typeof t == "string";
}
function pm(t) {
  return cp.call(t) === "[object String]";
}
function St(t) {
  return typeof t == "number";
}
function Ie(t) {
  var e = typeof t;
  return e === "function" || !!t && e === "object";
}
function aA(t) {
  return !!Sq[cp.call(t)];
}
function Nr(t) {
  return !!xq[cp.call(t)];
}
function au(t) {
  return typeof t == "object" && typeof t.nodeType == "number" && typeof t.ownerDocument == "object";
}
function M0(t) {
  return t.colorStops != null;
}
function Cq(t) {
  return t.image != null;
}
function yR(t) {
  return cp.call(t) === "[object RegExp]";
}
function ou(t) {
  return t !== t;
}
function Tn() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  for (var n = 0, r = t.length; n < r; n++)
    if (t[n] != null)
      return t[n];
}
function We(t, e) {
  return t ?? e;
}
function ji(t, e, n) {
  return t ?? e ?? n;
}
function Rx(t) {
  for (var e = [], n = 1; n < arguments.length; n++)
    e[n - 1] = arguments[n];
  return pR.apply(t, e);
}
function kx(t) {
  if (typeof t == "number")
    return [t, t, t, t];
  var e = t.length;
  return e === 2 ? [t[0], t[1], t[0], t[1]] : e === 3 ? [t[0], t[1], t[2], t[1]] : t;
}
function ke(t, e) {
  if (!t)
    throw new Error(e);
}
function ma(t) {
  return t == null ? null : typeof t.trim == "function" ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
var Tq = "__ec_primitive__";
function vm(t) {
  t[Tq] = !0;
}
function Kd(t) {
  return t[Tq];
}
var oIe = function() {
  function t() {
    this.data = {};
  }
  return t.prototype.delete = function(e) {
    var n = this.has(e);
    return n && delete this.data[e], n;
  }, t.prototype.has = function(e) {
    return this.data.hasOwnProperty(e);
  }, t.prototype.get = function(e) {
    return this.data[e];
  }, t.prototype.set = function(e, n) {
    return this.data[e] = n, this;
  }, t.prototype.keys = function() {
    return st(this.data);
  }, t.prototype.forEach = function(e) {
    var n = this.data;
    for (var r in n)
      n.hasOwnProperty(r) && e(n[r], r);
  }, t;
}(), Pq = typeof Map == "function";
function sIe() {
  return Pq ? /* @__PURE__ */ new Map() : new oIe();
}
var $q = function() {
  function t(e) {
    var n = ue(e);
    this.data = sIe();
    var r = this;
    e instanceof t ? e.each(i) : e && k(e, i);
    function i(a, o) {
      n ? r.set(a, o) : r.set(o, a);
    }
  }
  return t.prototype.hasKey = function(e) {
    return this.data.has(e);
  }, t.prototype.get = function(e) {
    return this.data.get(e);
  }, t.prototype.set = function(e, n) {
    return this.data.set(e, n), n;
  }, t.prototype.each = function(e, n) {
    this.data.forEach(function(r, i) {
      e.call(n, r, i);
    });
  }, t.prototype.keys = function() {
    var e = this.data.keys();
    return Pq ? Array.from(e) : e;
  }, t.prototype.removeKey = function(e) {
    this.data.delete(e);
  }, t;
}();
function Pe(t) {
  return new $q(t);
}
function gm(t, e) {
  for (var n = new t.constructor(t.length + e.length), r = 0; r < t.length; r++)
    n[r] = t[r];
  for (var i = t.length, r = 0; r < e.length; r++)
    n[r + i] = e[r];
  return n;
}
function I0(t, e) {
  var n;
  if (Object.create)
    n = Object.create(t);
  else {
    var r = function() {
    };
    r.prototype = t, n = new r();
  }
  return e && le(n, e), n;
}
function bR(t) {
  var e = t.style;
  e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
}
function Ce(t, e) {
  return t.hasOwnProperty(e);
}
function On() {
}
var Og = 180 / Math.PI;
const lIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  HashMap: $q,
  RADIAN_TO_DEGREE: Og,
  assert: ke,
  bind: xe,
  clone: Le,
  concatArray: gm,
  createCanvas: iIe,
  createHashMap: Pe,
  createObject: I0,
  curry: Ue,
  defaults: Re,
  disableUserSelect: bR,
  each: k,
  eqNaN: ou,
  extend: le,
  filter: Nt,
  find: wq,
  guid: gR,
  hasOwn: Ce,
  indexOf: et,
  inherits: mR,
  isArray: ue,
  isArrayLike: wr,
  isBuiltInObject: aA,
  isDom: au,
  isFunction: Me,
  isGradientObject: M0,
  isImagePatternObject: Cq,
  isNumber: St,
  isObject: Ie,
  isPrimitive: Kd,
  isRegExp: yR,
  isString: Oe,
  isStringSafe: pm,
  isTypedArray: Nr,
  keys: st,
  logError: Oa,
  map: ce,
  merge: qe,
  mergeAll: Dx,
  mixin: xn,
  noop: On,
  normalizeCssArray: kx,
  reduce: Aa,
  retrieve: Tn,
  retrieve2: We,
  retrieve3: ji,
  setAsPrimitive: vm,
  slice: Rx,
  trim: ma
}, Symbol.toStringTag, { value: "Module" }));
function wu(t, e) {
  return t == null && (t = 0), e == null && (e = 0), [t, e];
}
function Mr(t, e) {
  return t[0] = e[0], t[1] = e[1], t;
}
function Zo(t) {
  return [t[0], t[1]];
}
function Aq(t, e, n) {
  return t[0] = e, t[1] = n, t;
}
function oA(t, e, n) {
  return t[0] = e[0] + n[0], t[1] = e[1] + n[1], t;
}
function U1(t, e, n, r) {
  return t[0] = e[0] + n[0] * r, t[1] = e[1] + n[1] * r, t;
}
function kl(t, e, n) {
  return t[0] = e[0] - n[0], t[1] = e[1] - n[1], t;
}
function mm(t) {
  return Math.sqrt(_R(t));
}
var uIe = mm;
function _R(t) {
  return t[0] * t[0] + t[1] * t[1];
}
var cIe = _R;
function fIe(t, e, n) {
  return t[0] = e[0] * n[0], t[1] = e[1] * n[1], t;
}
function dIe(t, e, n) {
  return t[0] = e[0] / n[0], t[1] = e[1] / n[1], t;
}
function hIe(t, e) {
  return t[0] * e[0] + t[1] * e[1];
}
function Sg(t, e, n) {
  return t[0] = e[0] * n, t[1] = e[1] * n, t;
}
function Rf(t, e) {
  var n = mm(e);
  return n === 0 ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / n, t[1] = e[1] / n), t;
}
function X1(t, e) {
  return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
}
var Ts = X1;
function Eq(t, e) {
  return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
}
var Ul = Eq;
function pIe(t, e) {
  return t[0] = -e[0], t[1] = -e[1], t;
}
function xg(t, e, n, r) {
  return t[0] = e[0] + r * (n[0] - e[0]), t[1] = e[1] + r * (n[1] - e[1]), t;
}
function ar(t, e, n) {
  var r = e[0], i = e[1];
  return t[0] = n[0] * r + n[2] * i + n[4], t[1] = n[1] * r + n[3] * i + n[5], t;
}
function Ps(t, e, n) {
  return t[0] = Math.min(e[0], n[0]), t[1] = Math.min(e[1], n[1]), t;
}
function $s(t, e, n) {
  return t[0] = Math.max(e[0], n[0]), t[1] = Math.max(e[1], n[1]), t;
}
const vIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  add: oA,
  applyTransform: ar,
  clone: Zo,
  copy: Mr,
  create: wu,
  dist: Ts,
  distSquare: Ul,
  distance: X1,
  distanceSquare: Eq,
  div: dIe,
  dot: hIe,
  len: mm,
  lenSquare: _R,
  length: uIe,
  lengthSquare: cIe,
  lerp: xg,
  max: $s,
  min: Ps,
  mul: fIe,
  negate: pIe,
  normalize: Rf,
  scale: Sg,
  scaleAndAdd: U1,
  set: Aq,
  sub: kl
}, Symbol.toStringTag, { value: "Module" }));
var ed = /* @__PURE__ */ function() {
  function t(e, n) {
    this.target = e, this.topTarget = n && n.topTarget;
  }
  return t;
}(), gIe = function() {
  function t(e) {
    this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
  }
  return t.prototype._dragStart = function(e) {
    for (var n = e.target; n && !n.draggable; )
      n = n.parent || n.__hostTarget;
    n && (this._draggingTarget = n, n.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new ed(n, e), "dragstart", e.event));
  }, t.prototype._drag = function(e) {
    var n = this._draggingTarget;
    if (n) {
      var r = e.offsetX, i = e.offsetY, a = r - this._x, o = i - this._y;
      this._x = r, this._y = i, n.drift(a, o, e), this.handler.dispatchToElement(new ed(n, e), "drag", e.event);
      var s = this.handler.findHover(r, i, n).target, l = this._dropTarget;
      this._dropTarget = s, n !== s && (l && s !== l && this.handler.dispatchToElement(new ed(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new ed(s, e), "dragenter", e.event));
    }
  }, t.prototype._dragEnd = function(e) {
    var n = this._draggingTarget;
    n && (n.dragging = !1), this.handler.dispatchToElement(new ed(n, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new ed(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
  }, t;
}(), Ra = function() {
  function t(e) {
    e && (this._$eventProcessor = e);
  }
  return t.prototype.on = function(e, n, r, i) {
    this._$handlers || (this._$handlers = {});
    var a = this._$handlers;
    if (typeof n == "function" && (i = r, r = n, n = null), !r || !e)
      return this;
    var o = this._$eventProcessor;
    n != null && o && o.normalizeQuery && (n = o.normalizeQuery(n)), a[e] || (a[e] = []);
    for (var s = 0; s < a[e].length; s++)
      if (a[e][s].h === r)
        return this;
    var l = {
      h: r,
      query: n,
      ctx: i || this,
      callAtLast: r.zrEventfulCallAtLast
    }, u = a[e].length - 1, c = a[e][u];
    return c && c.callAtLast ? a[e].splice(u, 0, l) : a[e].push(l), this;
  }, t.prototype.isSilent = function(e) {
    var n = this._$handlers;
    return !n || !n[e] || !n[e].length;
  }, t.prototype.off = function(e, n) {
    var r = this._$handlers;
    if (!r)
      return this;
    if (!e)
      return this._$handlers = {}, this;
    if (n) {
      if (r[e]) {
        for (var i = [], a = 0, o = r[e].length; a < o; a++)
          r[e][a].h !== n && i.push(r[e][a]);
        r[e] = i;
      }
      r[e] && r[e].length === 0 && delete r[e];
    } else
      delete r[e];
    return this;
  }, t.prototype.trigger = function(e) {
    for (var n = [], r = 1; r < arguments.length; r++)
      n[r - 1] = arguments[r];
    if (!this._$handlers)
      return this;
    var i = this._$handlers[e], a = this._$eventProcessor;
    if (i)
      for (var o = n.length, s = i.length, l = 0; l < s; l++) {
        var u = i[l];
        if (!(a && a.filter && u.query != null && !a.filter(e, u.query)))
          switch (o) {
            case 0:
              u.h.call(u.ctx);
              break;
            case 1:
              u.h.call(u.ctx, n[0]);
              break;
            case 2:
              u.h.call(u.ctx, n[0], n[1]);
              break;
            default:
              u.h.apply(u.ctx, n);
              break;
          }
      }
    return a && a.afterTrigger && a.afterTrigger(e), this;
  }, t.prototype.triggerWithContext = function(e) {
    for (var n = [], r = 1; r < arguments.length; r++)
      n[r - 1] = arguments[r];
    if (!this._$handlers)
      return this;
    var i = this._$handlers[e], a = this._$eventProcessor;
    if (i)
      for (var o = n.length, s = n[o - 1], l = i.length, u = 0; u < l; u++) {
        var c = i[u];
        if (!(a && a.filter && c.query != null && !a.filter(e, c.query)))
          switch (o) {
            case 0:
              c.h.call(s);
              break;
            case 1:
              c.h.call(s, n[0]);
              break;
            case 2:
              c.h.call(s, n[0], n[1]);
              break;
            default:
              c.h.apply(s, n.slice(1, o - 1));
              break;
          }
      }
    return a && a.afterTrigger && a.afterTrigger(e), this;
  }, t;
}(), mIe = Math.log(2);
function sA(t, e, n, r, i, a) {
  var o = r + "-" + i, s = t.length;
  if (a.hasOwnProperty(o))
    return a[o];
  if (e === 1) {
    var l = Math.round(Math.log((1 << s) - 1 & ~i) / mIe);
    return t[n][l];
  }
  for (var u = r | 1 << n, c = n + 1; r & 1 << c; )
    c++;
  for (var f = 0, d = 0, h = 0; d < s; d++) {
    var p = 1 << d;
    p & i || (f += (h % 2 ? -1 : 1) * t[n][d] * sA(t, e - 1, c, u, i | p, a), h++);
  }
  return a[o] = f, f;
}
function I6(t, e) {
  var n = [
    [t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]],
    [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]],
    [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]],
    [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]],
    [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]],
    [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]],
    [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]],
    [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]
  ], r = {}, i = sA(n, 8, 0, 0, 0, r);
  if (i !== 0) {
    for (var a = [], o = 0; o < 8; o++)
      for (var s = 0; s < 8; s++)
        a[s] == null && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * sA(n, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, r) / i * e[o];
    return function(l, u, c) {
      var f = u * a[6] + c * a[7] + 1;
      l[0] = (u * a[0] + c * a[1] + a[2]) / f, l[1] = (u * a[3] + c * a[4] + a[5]) / f;
    };
  }
}
var D6 = "___zrEVENTSAVED", FC = [];
function yIe(t, e, n, r, i) {
  return lA(FC, e, r, i, !0) && lA(t, n, FC[0], FC[1]);
}
function lA(t, e, n, r, i) {
  if (e.getBoundingClientRect && vt.domSupported && !Mq(e)) {
    var a = e[D6] || (e[D6] = {}), o = bIe(e, a), s = _Ie(o, a, i);
    if (s)
      return s(t, n, r), !0;
  }
  return !1;
}
function bIe(t, e) {
  var n = e.markers;
  if (n)
    return n;
  n = e.markers = [];
  for (var r = ["left", "right"], i = ["top", "bottom"], a = 0; a < 4; a++) {
    var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
    s.cssText = [
      "position: absolute",
      "visibility: hidden",
      "padding: 0",
      "margin: 0",
      "border-width: 0",
      "user-select: none",
      "width:0",
      "height:0",
      r[l] + ":0",
      i[u] + ":0",
      r[1 - l] + ":auto",
      i[1 - u] + ":auto",
      ""
    ].join("!important;"), t.appendChild(o), n.push(o);
  }
  return n;
}
function _Ie(t, e, n) {
  for (var r = n ? "invTrans" : "trans", i = e[r], a = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
    var c = t[u].getBoundingClientRect(), f = 2 * u, d = c.left, h = c.top;
    o.push(d, h), l = l && a && d === a[f] && h === a[f + 1], s.push(t[u].offsetLeft, t[u].offsetTop);
  }
  return l && i ? i : (e.srcCoords = o, e[r] = n ? I6(s, o) : I6(o, s));
}
function Mq(t) {
  return t.nodeName.toUpperCase() === "CANVAS";
}
var OIe = /([&<>"'])/g, SIe = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "'": "&#39;"
};
function Gr(t) {
  return t == null ? "" : (t + "").replace(OIe, function(e, n) {
    return SIe[n];
  });
}
var xIe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, WC = [], wIe = vt.browser.firefox && +vt.browser.version.split(".")[0] < 39;
function uA(t, e, n, r) {
  return n = n || {}, r ? R6(t, e, n) : wIe && e.layerX != null && e.layerX !== e.offsetX ? (n.zrX = e.layerX, n.zrY = e.layerY) : e.offsetX != null ? (n.zrX = e.offsetX, n.zrY = e.offsetY) : R6(t, e, n), n;
}
function R6(t, e, n) {
  if (vt.domSupported && t.getBoundingClientRect) {
    var r = e.clientX, i = e.clientY;
    if (Mq(t)) {
      var a = t.getBoundingClientRect();
      n.zrX = r - a.left, n.zrY = i - a.top;
      return;
    } else if (lA(WC, t, r, i)) {
      n.zrX = WC[0], n.zrY = WC[1];
      return;
    }
  }
  n.zrX = n.zrY = 0;
}
function OR(t) {
  return t || window.event;
}
function sa(t, e, n) {
  if (e = OR(e), e.zrX != null)
    return e;
  var r = e.type, i = r && r.indexOf("touch") >= 0;
  if (i) {
    var o = r !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
    o && uA(t, o, e, n);
  } else {
    uA(t, e, e, n);
    var a = CIe(e);
    e.zrDelta = a ? a / 120 : -(e.detail || 0) / 3;
  }
  var s = e.button;
  return e.which == null && s !== void 0 && xIe.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
}
function CIe(t) {
  var e = t.wheelDelta;
  if (e)
    return e;
  var n = t.deltaX, r = t.deltaY;
  if (n == null || r == null)
    return e;
  var i = Math.abs(r !== 0 ? r : n), a = r > 0 ? -1 : r < 0 ? 1 : n > 0 ? -1 : 1;
  return 3 * i * a;
}
function cA(t, e, n, r) {
  t.addEventListener(e, n, r);
}
function TIe(t, e, n, r) {
  t.removeEventListener(e, n, r);
}
var Gs = function(t) {
  t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
};
function k6(t) {
  return t.which === 2 || t.which === 3;
}
var PIe = function() {
  function t() {
    this._track = [];
  }
  return t.prototype.recognize = function(e, n, r) {
    return this._doTrack(e, n, r), this._recognize(e);
  }, t.prototype.clear = function() {
    return this._track.length = 0, this;
  }, t.prototype._doTrack = function(e, n, r) {
    var i = e.touches;
    if (i) {
      for (var a = {
        points: [],
        touches: [],
        target: n,
        event: e
      }, o = 0, s = i.length; o < s; o++) {
        var l = i[o], u = uA(r, l, {});
        a.points.push([u.zrX, u.zrY]), a.touches.push(l);
      }
      this._track.push(a);
    }
  }, t.prototype._recognize = function(e) {
    for (var n in QC)
      if (QC.hasOwnProperty(n)) {
        var r = QC[n](this._track, e);
        if (r)
          return r;
      }
  }, t;
}();
function L6(t) {
  var e = t[1][0] - t[0][0], n = t[1][1] - t[0][1];
  return Math.sqrt(e * e + n * n);
}
function $Ie(t) {
  return [
    (t[0][0] + t[1][0]) / 2,
    (t[0][1] + t[1][1]) / 2
  ];
}
var QC = {
  pinch: function(t, e) {
    var n = t.length;
    if (n) {
      var r = (t[n - 1] || {}).points, i = (t[n - 2] || {}).points || r;
      if (i && i.length > 1 && r && r.length > 1) {
        var a = L6(r) / L6(i);
        !isFinite(a) && (a = 1), e.pinchScale = a;
        var o = $Ie(r);
        return e.pinchX = o[0], e.pinchY = o[1], {
          type: "pinch",
          target: t[0].target,
          event: e
        };
      }
    }
  }
};
function Si() {
  return [1, 0, 0, 1, 0, 0];
}
function D0(t) {
  return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
}
function Lx(t, e) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t;
}
function Uo(t, e, n) {
  var r = e[0] * n[0] + e[2] * n[1], i = e[1] * n[0] + e[3] * n[1], a = e[0] * n[2] + e[2] * n[3], o = e[1] * n[2] + e[3] * n[3], s = e[0] * n[4] + e[2] * n[5] + e[4], l = e[1] * n[4] + e[3] * n[5] + e[5];
  return t[0] = r, t[1] = i, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
}
function ao(t, e, n) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + n[0], t[5] = e[5] + n[1], t;
}
function Cu(t, e, n, r) {
  r === void 0 && (r = [0, 0]);
  var i = e[0], a = e[2], o = e[4], s = e[1], l = e[3], u = e[5], c = Math.sin(n), f = Math.cos(n);
  return t[0] = i * f + s * c, t[1] = -i * c + s * f, t[2] = a * f + l * c, t[3] = -a * c + f * l, t[4] = f * (o - r[0]) + c * (u - r[1]) + r[0], t[5] = f * (u - r[1]) - c * (o - r[0]) + r[1], t;
}
function Nx(t, e, n) {
  var r = n[0], i = n[1];
  return t[0] = e[0] * r, t[1] = e[1] * i, t[2] = e[2] * r, t[3] = e[3] * i, t[4] = e[4] * r, t[5] = e[5] * i, t;
}
function kf(t, e) {
  var n = e[0], r = e[2], i = e[4], a = e[1], o = e[3], s = e[5], l = n * o - a * r;
  return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -r * l, t[3] = n * l, t[4] = (r * s - o * i) * l, t[5] = (a * i - n * s) * l, t) : null;
}
function Iq(t) {
  var e = Si();
  return Lx(e, t), e;
}
const AIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  clone: Iq,
  copy: Lx,
  create: Si,
  identity: D0,
  invert: kf,
  mul: Uo,
  rotate: Cu,
  scale: Nx,
  translate: ao
}, Symbol.toStringTag, { value: "Module" }));
var Ke = function() {
  function t(e, n) {
    this.x = e || 0, this.y = n || 0;
  }
  return t.prototype.copy = function(e) {
    return this.x = e.x, this.y = e.y, this;
  }, t.prototype.clone = function() {
    return new t(this.x, this.y);
  }, t.prototype.set = function(e, n) {
    return this.x = e, this.y = n, this;
  }, t.prototype.equal = function(e) {
    return e.x === this.x && e.y === this.y;
  }, t.prototype.add = function(e) {
    return this.x += e.x, this.y += e.y, this;
  }, t.prototype.scale = function(e) {
    this.x *= e, this.y *= e;
  }, t.prototype.scaleAndAdd = function(e, n) {
    this.x += e.x * n, this.y += e.y * n;
  }, t.prototype.sub = function(e) {
    return this.x -= e.x, this.y -= e.y, this;
  }, t.prototype.dot = function(e) {
    return this.x * e.x + this.y * e.y;
  }, t.prototype.len = function() {
    return Math.sqrt(this.x * this.x + this.y * this.y);
  }, t.prototype.lenSquare = function() {
    return this.x * this.x + this.y * this.y;
  }, t.prototype.normalize = function() {
    var e = this.len();
    return this.x /= e, this.y /= e, this;
  }, t.prototype.distance = function(e) {
    var n = this.x - e.x, r = this.y - e.y;
    return Math.sqrt(n * n + r * r);
  }, t.prototype.distanceSquare = function(e) {
    var n = this.x - e.x, r = this.y - e.y;
    return n * n + r * r;
  }, t.prototype.negate = function() {
    return this.x = -this.x, this.y = -this.y, this;
  }, t.prototype.transform = function(e) {
    if (e) {
      var n = this.x, r = this.y;
      return this.x = e[0] * n + e[2] * r + e[4], this.y = e[1] * n + e[3] * r + e[5], this;
    }
  }, t.prototype.toArray = function(e) {
    return e[0] = this.x, e[1] = this.y, e;
  }, t.prototype.fromArray = function(e) {
    this.x = e[0], this.y = e[1];
  }, t.set = function(e, n, r) {
    e.x = n, e.y = r;
  }, t.copy = function(e, n) {
    e.x = n.x, e.y = n.y;
  }, t.len = function(e) {
    return Math.sqrt(e.x * e.x + e.y * e.y);
  }, t.lenSquare = function(e) {
    return e.x * e.x + e.y * e.y;
  }, t.dot = function(e, n) {
    return e.x * n.x + e.y * n.y;
  }, t.add = function(e, n, r) {
    e.x = n.x + r.x, e.y = n.y + r.y;
  }, t.sub = function(e, n, r) {
    e.x = n.x - r.x, e.y = n.y - r.y;
  }, t.scale = function(e, n, r) {
    e.x = n.x * r, e.y = n.y * r;
  }, t.scaleAndAdd = function(e, n, r, i) {
    e.x = n.x + r.x * i, e.y = n.y + r.y * i;
  }, t.lerp = function(e, n, r, i) {
    var a = 1 - i;
    e.x = a * n.x + i * r.x, e.y = a * n.y + i * r.y;
  }, t;
}(), Vy = Math.min, Fy = Math.max, zu = new Ke(), Vu = new Ke(), Fu = new Ke(), Wu = new Ke(), qp = new Ke(), Kp = new Ke(), EIe = function() {
  function t(e, n, r, i) {
    r < 0 && (e = e + r, r = -r), i < 0 && (n = n + i, i = -i), this.x = e, this.y = n, this.width = r, this.height = i;
  }
  return t.prototype.union = function(e) {
    var n = Vy(e.x, this.x), r = Vy(e.y, this.y);
    isFinite(this.x) && isFinite(this.width) ? this.width = Fy(e.x + e.width, this.x + this.width) - n : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = Fy(e.y + e.height, this.y + this.height) - r : this.height = e.height, this.x = n, this.y = r;
  }, t.prototype.applyTransform = function(e) {
    t.applyTransform(this, this, e);
  }, t.prototype.calculateTransform = function(e) {
    var n = this, r = e.width / n.width, i = e.height / n.height, a = Si();
    return ao(a, a, [-n.x, -n.y]), Nx(a, a, [r, i]), ao(a, a, [e.x, e.y]), a;
  }, t.prototype.intersect = function(e, n) {
    if (!e)
      return !1;
    e instanceof t || (e = t.create(e));
    var r = this, i = r.x, a = r.x + r.width, o = r.y, s = r.y + r.height, l = e.x, u = e.x + e.width, c = e.y, f = e.y + e.height, d = !(a < l || u < i || s < c || f < o);
    if (n) {
      var h = 1 / 0, p = 0, v = Math.abs(a - l), g = Math.abs(u - i), m = Math.abs(s - c), y = Math.abs(f - o), b = Math.min(v, g), _ = Math.min(m, y);
      a < l || u < i ? b > p && (p = b, v < g ? Ke.set(Kp, -v, 0) : Ke.set(Kp, g, 0)) : b < h && (h = b, v < g ? Ke.set(qp, v, 0) : Ke.set(qp, -g, 0)), s < c || f < o ? _ > p && (p = _, m < y ? Ke.set(Kp, 0, -m) : Ke.set(Kp, 0, y)) : b < h && (h = b, m < y ? Ke.set(qp, 0, m) : Ke.set(qp, 0, -y));
    }
    return n && Ke.copy(n, d ? qp : Kp), d;
  }, t.prototype.contain = function(e, n) {
    var r = this;
    return e >= r.x && e <= r.x + r.width && n >= r.y && n <= r.y + r.height;
  }, t.prototype.clone = function() {
    return new t(this.x, this.y, this.width, this.height);
  }, t.prototype.copy = function(e) {
    t.copy(this, e);
  }, t.prototype.plain = function() {
    return {
      x: this.x,
      y: this.y,
      width: this.width,
      height: this.height
    };
  }, t.prototype.isFinite = function() {
    return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
  }, t.prototype.isZero = function() {
    return this.width === 0 || this.height === 0;
  }, t.create = function(e) {
    return new t(e.x, e.y, e.width, e.height);
  }, t.copy = function(e, n) {
    e.x = n.x, e.y = n.y, e.width = n.width, e.height = n.height;
  }, t.applyTransform = function(e, n, r) {
    if (!r) {
      e !== n && t.copy(e, n);
      return;
    }
    if (r[1] < 1e-5 && r[1] > -1e-5 && r[2] < 1e-5 && r[2] > -1e-5) {
      var i = r[0], a = r[3], o = r[4], s = r[5];
      e.x = n.x * i + o, e.y = n.y * a + s, e.width = n.width * i, e.height = n.height * a, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
      return;
    }
    zu.x = Fu.x = n.x, zu.y = Wu.y = n.y, Vu.x = Wu.x = n.x + n.width, Vu.y = Fu.y = n.y + n.height, zu.transform(r), Wu.transform(r), Vu.transform(r), Fu.transform(r), e.x = Vy(zu.x, Vu.x, Fu.x, Wu.x), e.y = Vy(zu.y, Vu.y, Fu.y, Wu.y);
    var l = Fy(zu.x, Vu.x, Fu.x, Wu.x), u = Fy(zu.y, Vu.y, Fu.y, Wu.y);
    e.width = l - e.x, e.height = u - e.y;
  }, t;
}();
const Je = EIe;
var Dq = "silent";
function MIe(t, e, n) {
  return {
    type: t,
    event: n,
    target: e.target,
    topTarget: e.topTarget,
    cancelBubble: !1,
    offsetX: n.zrX,
    offsetY: n.zrY,
    gestureEvent: n.gestureEvent,
    pinchX: n.pinchX,
    pinchY: n.pinchY,
    pinchScale: n.pinchScale,
    wheelDelta: n.zrDelta,
    zrByTouch: n.zrByTouch,
    which: n.which,
    stop: IIe
  };
}
function IIe() {
  Gs(this.event);
}
var DIe = function(t) {
  q(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.handler = null, n;
  }
  return e.prototype.dispose = function() {
  }, e.prototype.setCursor = function() {
  }, e;
}(Ra), Jp = /* @__PURE__ */ function() {
  function t(e, n) {
    this.x = e, this.y = n;
  }
  return t;
}(), RIe = [
  "click",
  "dblclick",
  "mousewheel",
  "mouseout",
  "mouseup",
  "mousedown",
  "mousemove",
  "contextmenu"
], HC = new Je(0, 0, 0, 0), Rq = function(t) {
  q(e, t);
  function e(n, r, i, a, o) {
    var s = t.call(this) || this;
    return s._hovered = new Jp(0, 0), s.storage = n, s.painter = r, s.painterRoot = a, s._pointerSize = o, i = i || new DIe(), s.proxy = null, s.setHandlerProxy(i), s._draggingMgr = new gIe(s), s;
  }
  return e.prototype.setHandlerProxy = function(n) {
    this.proxy && this.proxy.dispose(), n && (k(RIe, function(r) {
      n.on && n.on(r, this[r], this);
    }, this), n.handler = this), this.proxy = n;
  }, e.prototype.mousemove = function(n) {
    var r = n.zrX, i = n.zrY, a = kq(this, r, i), o = this._hovered, s = o.target;
    s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
    var l = this._hovered = a ? new Jp(r, i) : this.findHover(r, i), u = l.target, c = this.proxy;
    c.setCursor && c.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", n), this.dispatchToElement(l, "mousemove", n), u && u !== s && this.dispatchToElement(l, "mouseover", n);
  }, e.prototype.mouseout = function(n) {
    var r = n.zrEventControl;
    r !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", n), r !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: n });
  }, e.prototype.resize = function() {
    this._hovered = new Jp(0, 0);
  }, e.prototype.dispatch = function(n, r) {
    var i = this[n];
    i && i.call(this, r);
  }, e.prototype.dispose = function() {
    this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
  }, e.prototype.setCursorStyle = function(n) {
    var r = this.proxy;
    r.setCursor && r.setCursor(n);
  }, e.prototype.dispatchToElement = function(n, r, i) {
    n = n || {};
    var a = n.target;
    if (!(a && a.silent)) {
      for (var o = "on" + r, s = MIe(r, n, i); a && (a[o] && (s.cancelBubble = !!a[o].call(a, s)), a.trigger(r, s), a = a.__hostTarget ? a.__hostTarget : a.parent, !s.cancelBubble); )
        ;
      s.cancelBubble || (this.trigger(r, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
        typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(r, s);
      }));
    }
  }, e.prototype.findHover = function(n, r, i) {
    var a = this.storage.getDisplayList(), o = new Jp(n, r);
    if (N6(a, o, n, r, i), this._pointerSize && !o.target) {
      for (var s = [], l = this._pointerSize, u = l / 2, c = new Je(n - u, r - u, l, l), f = a.length - 1; f >= 0; f--) {
        var d = a[f];
        d !== i && !d.ignore && !d.ignoreCoarsePointer && (!d.parent || !d.parent.ignoreCoarsePointer) && (HC.copy(d.getBoundingRect()), d.transform && HC.applyTransform(d.transform), HC.intersect(c) && s.push(d));
      }
      if (s.length)
        for (var h = 4, p = Math.PI / 12, v = Math.PI * 2, g = 0; g < u; g += h)
          for (var m = 0; m < v; m += p) {
            var y = n + g * Math.cos(m), b = r + g * Math.sin(m);
            if (N6(s, o, y, b, i), o.target)
              return o;
          }
    }
    return o;
  }, e.prototype.processGesture = function(n, r) {
    this._gestureMgr || (this._gestureMgr = new PIe());
    var i = this._gestureMgr;
    r === "start" && i.clear();
    var a = i.recognize(n, this.findHover(n.zrX, n.zrY, null).target, this.proxy.dom);
    if (r === "end" && i.clear(), a) {
      var o = a.type;
      n.gestureEvent = o;
      var s = new Jp();
      s.target = a.target, this.dispatchToElement(s, o, a.event);
    }
  }, e;
}(Ra);
k(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(t) {
  Rq.prototype[t] = function(e) {
    var n = e.zrX, r = e.zrY, i = kq(this, n, r), a, o;
    if ((t !== "mouseup" || !i) && (a = this.findHover(n, r), o = a.target), t === "mousedown")
      this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
    else if (t === "mouseup")
      this._upEl = o;
    else if (t === "click") {
      if (this._downEl !== this._upEl || !this._downPoint || Ts(this._downPoint, [e.zrX, e.zrY]) > 4)
        return;
      this._downPoint = null;
    }
    this.dispatchToElement(a, t, e);
  };
});
function kIe(t, e, n) {
  if (t[t.rectHover ? "rectContain" : "contain"](e, n)) {
    for (var r = t, i = void 0, a = !1; r; ) {
      if (r.ignoreClip && (a = !0), !a) {
        var o = r.getClipPath();
        if (o && !o.contain(e, n))
          return !1;
      }
      r.silent && (i = !0);
      var s = r.__hostTarget;
      r = s || r.parent;
    }
    return i ? Dq : !0;
  }
  return !1;
}
function N6(t, e, n, r, i) {
  for (var a = t.length - 1; a >= 0; a--) {
    var o = t[a], s = void 0;
    if (o !== i && !o.ignore && (s = kIe(o, n, r)) && (!e.topTarget && (e.topTarget = o), s !== Dq)) {
      e.target = o;
      break;
    }
  }
}
function kq(t, e, n) {
  var r = t.painter;
  return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
}
var Lq = 32, ev = 7;
function LIe(t) {
  for (var e = 0; t >= Lq; )
    e |= t & 1, t >>= 1;
  return t + e;
}
function B6(t, e, n, r) {
  var i = e + 1;
  if (i === n)
    return 1;
  if (r(t[i++], t[e]) < 0) {
    for (; i < n && r(t[i], t[i - 1]) < 0; )
      i++;
    NIe(t, e, i);
  } else
    for (; i < n && r(t[i], t[i - 1]) >= 0; )
      i++;
  return i - e;
}
function NIe(t, e, n) {
  for (n--; e < n; ) {
    var r = t[e];
    t[e++] = t[n], t[n--] = r;
  }
}
function z6(t, e, n, r, i) {
  for (r === e && r++; r < n; r++) {
    for (var a = t[r], o = e, s = r, l; o < s; )
      l = o + s >>> 1, i(a, t[l]) < 0 ? s = l : o = l + 1;
    var u = r - o;
    switch (u) {
      case 3:
        t[o + 3] = t[o + 2];
      case 2:
        t[o + 2] = t[o + 1];
      case 1:
        t[o + 1] = t[o];
        break;
      default:
        for (; u > 0; )
          t[o + u] = t[o + u - 1], u--;
    }
    t[o] = a;
  }
}
function GC(t, e, n, r, i, a) {
  var o = 0, s = 0, l = 1;
  if (a(t, e[n + i]) > 0) {
    for (s = r - i; l < s && a(t, e[n + i + l]) > 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += i, l += i;
  } else {
    for (s = i + 1; l < s && a(t, e[n + i - l]) <= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = i - l, l = i - u;
  }
  for (o++; o < l; ) {
    var c = o + (l - o >>> 1);
    a(t, e[n + c]) > 0 ? o = c + 1 : l = c;
  }
  return l;
}
function jC(t, e, n, r, i, a) {
  var o = 0, s = 0, l = 1;
  if (a(t, e[n + i]) < 0) {
    for (s = i + 1; l < s && a(t, e[n + i - l]) < 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s);
    var u = o;
    o = i - l, l = i - u;
  } else {
    for (s = r - i; l < s && a(t, e[n + i + l]) >= 0; )
      o = l, l = (l << 1) + 1, l <= 0 && (l = s);
    l > s && (l = s), o += i, l += i;
  }
  for (o++; o < l; ) {
    var c = o + (l - o >>> 1);
    a(t, e[n + c]) < 0 ? l = c : o = c + 1;
  }
  return l;
}
function BIe(t, e) {
  var n = ev, r, i, a = 0, o = [];
  r = [], i = [];
  function s(h, p) {
    r[a] = h, i[a] = p, a += 1;
  }
  function l() {
    for (; a > 1; ) {
      var h = a - 2;
      if (h >= 1 && i[h - 1] <= i[h] + i[h + 1] || h >= 2 && i[h - 2] <= i[h] + i[h - 1])
        i[h - 1] < i[h + 1] && h--;
      else if (i[h] > i[h + 1])
        break;
      c(h);
    }
  }
  function u() {
    for (; a > 1; ) {
      var h = a - 2;
      h > 0 && i[h - 1] < i[h + 1] && h--, c(h);
    }
  }
  function c(h) {
    var p = r[h], v = i[h], g = r[h + 1], m = i[h + 1];
    i[h] = v + m, h === a - 3 && (r[h + 1] = r[h + 2], i[h + 1] = i[h + 2]), a--;
    var y = jC(t[g], t, p, v, 0, e);
    p += y, v -= y, v !== 0 && (m = GC(t[p + v - 1], t, g, m, m - 1, e), m !== 0 && (v <= m ? f(p, v, g, m) : d(p, v, g, m)));
  }
  function f(h, p, v, g) {
    var m = 0;
    for (m = 0; m < p; m++)
      o[m] = t[h + m];
    var y = 0, b = v, _ = h;
    if (t[_++] = t[b++], --g === 0) {
      for (m = 0; m < p; m++)
        t[_ + m] = o[y + m];
      return;
    }
    if (p === 1) {
      for (m = 0; m < g; m++)
        t[_ + m] = t[b + m];
      t[_ + g] = o[y];
      return;
    }
    for (var O = n, S, x, C; ; ) {
      S = 0, x = 0, C = !1;
      do
        if (e(t[b], o[y]) < 0) {
          if (t[_++] = t[b++], x++, S = 0, --g === 0) {
            C = !0;
            break;
          }
        } else if (t[_++] = o[y++], S++, x = 0, --p === 1) {
          C = !0;
          break;
        }
      while ((S | x) < O);
      if (C)
        break;
      do {
        if (S = jC(t[b], o, y, p, 0, e), S !== 0) {
          for (m = 0; m < S; m++)
            t[_ + m] = o[y + m];
          if (_ += S, y += S, p -= S, p <= 1) {
            C = !0;
            break;
          }
        }
        if (t[_++] = t[b++], --g === 0) {
          C = !0;
          break;
        }
        if (x = GC(o[y], t, b, g, 0, e), x !== 0) {
          for (m = 0; m < x; m++)
            t[_ + m] = t[b + m];
          if (_ += x, b += x, g -= x, g === 0) {
            C = !0;
            break;
          }
        }
        if (t[_++] = o[y++], --p === 1) {
          C = !0;
          break;
        }
        O--;
      } while (S >= ev || x >= ev);
      if (C)
        break;
      O < 0 && (O = 0), O += 2;
    }
    if (n = O, n < 1 && (n = 1), p === 1) {
      for (m = 0; m < g; m++)
        t[_ + m] = t[b + m];
      t[_ + g] = o[y];
    } else {
      if (p === 0)
        throw new Error();
      for (m = 0; m < p; m++)
        t[_ + m] = o[y + m];
    }
  }
  function d(h, p, v, g) {
    var m = 0;
    for (m = 0; m < g; m++)
      o[m] = t[v + m];
    var y = h + p - 1, b = g - 1, _ = v + g - 1, O = 0, S = 0;
    if (t[_--] = t[y--], --p === 0) {
      for (O = _ - (g - 1), m = 0; m < g; m++)
        t[O + m] = o[m];
      return;
    }
    if (g === 1) {
      for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
        t[S + m] = t[O + m];
      t[_] = o[b];
      return;
    }
    for (var x = n; ; ) {
      var C = 0, T = 0, w = !1;
      do
        if (e(o[b], t[y]) < 0) {
          if (t[_--] = t[y--], C++, T = 0, --p === 0) {
            w = !0;
            break;
          }
        } else if (t[_--] = o[b--], T++, C = 0, --g === 1) {
          w = !0;
          break;
        }
      while ((C | T) < x);
      if (w)
        break;
      do {
        if (C = p - jC(o[b], t, h, p, p - 1, e), C !== 0) {
          for (_ -= C, y -= C, p -= C, S = _ + 1, O = y + 1, m = C - 1; m >= 0; m--)
            t[S + m] = t[O + m];
          if (p === 0) {
            w = !0;
            break;
          }
        }
        if (t[_--] = o[b--], --g === 1) {
          w = !0;
          break;
        }
        if (T = g - GC(t[y], o, 0, g, g - 1, e), T !== 0) {
          for (_ -= T, b -= T, g -= T, S = _ + 1, O = b + 1, m = 0; m < T; m++)
            t[S + m] = o[O + m];
          if (g <= 1) {
            w = !0;
            break;
          }
        }
        if (t[_--] = t[y--], --p === 0) {
          w = !0;
          break;
        }
        x--;
      } while (C >= ev || T >= ev);
      if (w)
        break;
      x < 0 && (x = 0), x += 2;
    }
    if (n = x, n < 1 && (n = 1), g === 1) {
      for (_ -= p, y -= p, S = _ + 1, O = y + 1, m = p - 1; m >= 0; m--)
        t[S + m] = t[O + m];
      t[_] = o[b];
    } else {
      if (g === 0)
        throw new Error();
      for (O = _ - (g - 1), m = 0; m < g; m++)
        t[O + m] = o[m];
    }
  }
  return {
    mergeRuns: l,
    forceMergeRuns: u,
    pushRun: s
  };
}
function k_(t, e, n, r) {
  n || (n = 0), r || (r = t.length);
  var i = r - n;
  if (!(i < 2)) {
    var a = 0;
    if (i < Lq) {
      a = B6(t, n, r, e), z6(t, n, r, n + a, e);
      return;
    }
    var o = BIe(t, e), s = LIe(i);
    do {
      if (a = B6(t, n, r, e), a < s) {
        var l = i;
        l > s && (l = s), z6(t, n, n + l, n + a, e), a = l;
      }
      o.pushRun(n, a), o.mergeRuns(), i -= a, n += a;
    } while (i !== 0);
    o.forceMergeRuns();
  }
}
var ki = 1, Vv = 2, $d = 4, V6 = !1;
function ZC() {
  V6 || (V6 = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
}
function F6(t, e) {
  return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
}
var zIe = function() {
  function t() {
    this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = F6;
  }
  return t.prototype.traverse = function(e, n) {
    for (var r = 0; r < this._roots.length; r++)
      this._roots[r].traverse(e, n);
  }, t.prototype.getDisplayList = function(e, n) {
    n = n || !1;
    var r = this._displayList;
    return (e || !r.length) && this.updateDisplayList(n), r;
  }, t.prototype.updateDisplayList = function(e) {
    this._displayListLen = 0;
    for (var n = this._roots, r = this._displayList, i = 0, a = n.length; i < a; i++)
      this._updateAndAddDisplayable(n[i], null, e);
    r.length = this._displayListLen, k_(r, F6);
  }, t.prototype._updateAndAddDisplayable = function(e, n, r) {
    if (!(e.ignore && !r)) {
      e.beforeUpdate(), e.update(), e.afterUpdate();
      var i = e.getClipPath();
      if (e.ignoreClip)
        n = null;
      else if (i) {
        n ? n = n.slice() : n = [];
        for (var a = i, o = e; a; )
          a.parent = o, a.updateTransform(), n.push(a), o = a, a = a.getClipPath();
      }
      if (e.childrenRef) {
        for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
          var u = s[l];
          e.__dirty && (u.__dirty |= ki), this._updateAndAddDisplayable(u, n, r);
        }
        e.__dirty = 0;
      } else {
        var c = e;
        n && n.length ? c.__clipPaths = n : c.__clipPaths && c.__clipPaths.length > 0 && (c.__clipPaths = []), isNaN(c.z) && (ZC(), c.z = 0), isNaN(c.z2) && (ZC(), c.z2 = 0), isNaN(c.zlevel) && (ZC(), c.zlevel = 0), this._displayList[this._displayListLen++] = c;
      }
      var f = e.getDecalElement && e.getDecalElement();
      f && this._updateAndAddDisplayable(f, n, r);
      var d = e.getTextGuideLine();
      d && this._updateAndAddDisplayable(d, n, r);
      var h = e.getTextContent();
      h && this._updateAndAddDisplayable(h, n, r);
    }
  }, t.prototype.addRoot = function(e) {
    e.__zr && e.__zr.storage === this || this._roots.push(e);
  }, t.prototype.delRoot = function(e) {
    if (e instanceof Array) {
      for (var n = 0, r = e.length; n < r; n++)
        this.delRoot(e[n]);
      return;
    }
    var i = et(this._roots, e);
    i >= 0 && this._roots.splice(i, 1);
  }, t.prototype.delAllRoots = function() {
    this._roots = [], this._displayList = [], this._displayListLen = 0;
  }, t.prototype.getRoots = function() {
    return this._roots;
  }, t.prototype.dispose = function() {
    this._displayList = null, this._roots = null;
  }, t;
}(), Y1;
Y1 = vt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(t) {
  return setTimeout(t, 16);
};
var wg = {
  linear: function(t) {
    return t;
  },
  quadraticIn: function(t) {
    return t * t;
  },
  quadraticOut: function(t) {
    return t * (2 - t);
  },
  quadraticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1);
  },
  cubicIn: function(t) {
    return t * t * t;
  },
  cubicOut: function(t) {
    return --t * t * t + 1;
  },
  cubicInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2);
  },
  quarticIn: function(t) {
    return t * t * t * t;
  },
  quarticOut: function(t) {
    return 1 - --t * t * t * t;
  },
  quarticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2);
  },
  quinticIn: function(t) {
    return t * t * t * t * t;
  },
  quinticOut: function(t) {
    return --t * t * t * t * t + 1;
  },
  quinticInOut: function(t) {
    return (t *= 2) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2);
  },
  sinusoidalIn: function(t) {
    return 1 - Math.cos(t * Math.PI / 2);
  },
  sinusoidalOut: function(t) {
    return Math.sin(t * Math.PI / 2);
  },
  sinusoidalInOut: function(t) {
    return 0.5 * (1 - Math.cos(Math.PI * t));
  },
  exponentialIn: function(t) {
    return t === 0 ? 0 : Math.pow(1024, t - 1);
  },
  exponentialOut: function(t) {
    return t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
  },
  exponentialInOut: function(t) {
    return t === 0 ? 0 : t === 1 ? 1 : (t *= 2) < 1 ? 0.5 * Math.pow(1024, t - 1) : 0.5 * (-Math.pow(2, -10 * (t - 1)) + 2);
  },
  circularIn: function(t) {
    return 1 - Math.sqrt(1 - t * t);
  },
  circularOut: function(t) {
    return Math.sqrt(1 - --t * t);
  },
  circularInOut: function(t) {
    return (t *= 2) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  },
  elasticIn: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), -(n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)));
  },
  elasticOut: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), n * Math.pow(2, -10 * t) * Math.sin((t - e) * (2 * Math.PI) / r) + 1);
  },
  elasticInOut: function(t) {
    var e, n = 0.1, r = 0.4;
    return t === 0 ? 0 : t === 1 ? 1 : (!n || n < 1 ? (n = 1, e = r / 4) : e = r * Math.asin(1 / n) / (2 * Math.PI), (t *= 2) < 1 ? -0.5 * (n * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r)) : n * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / r) * 0.5 + 1);
  },
  backIn: function(t) {
    var e = 1.70158;
    return t * t * ((e + 1) * t - e);
  },
  backOut: function(t) {
    var e = 1.70158;
    return --t * t * ((e + 1) * t + e) + 1;
  },
  backInOut: function(t) {
    var e = 2.5949095;
    return (t *= 2) < 1 ? 0.5 * (t * t * ((e + 1) * t - e)) : 0.5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  },
  bounceIn: function(t) {
    return 1 - wg.bounceOut(1 - t);
  },
  bounceOut: function(t) {
    return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
  },
  bounceInOut: function(t) {
    return t < 0.5 ? wg.bounceIn(t * 2) * 0.5 : wg.bounceOut(t * 2 - 1) * 0.5 + 0.5;
  }
}, Wy = Math.pow, Xl = Math.sqrt, q1 = 1e-8, Nq = 1e-4, W6 = Xl(3), Qy = 1 / 3, ko = wu(), ha = wu(), Jd = wu();
function Ll(t) {
  return t > -q1 && t < q1;
}
function Bq(t) {
  return t > q1 || t < -q1;
}
function Gn(t, e, n, r, i) {
  var a = 1 - i;
  return a * a * (a * t + 3 * i * e) + i * i * (i * r + 3 * a * n);
}
function Q6(t, e, n, r, i) {
  var a = 1 - i;
  return 3 * (((e - t) * a + 2 * (n - e) * i) * a + (r - n) * i * i);
}
function K1(t, e, n, r, i, a) {
  var o = r + 3 * (e - n) - t, s = 3 * (n - e * 2 + t), l = 3 * (e - t), u = t - i, c = s * s - 3 * o * l, f = s * l - 9 * o * u, d = l * l - 3 * s * u, h = 0;
  if (Ll(c) && Ll(f))
    if (Ll(s))
      a[0] = 0;
    else {
      var p = -l / s;
      p >= 0 && p <= 1 && (a[h++] = p);
    }
  else {
    var v = f * f - 4 * c * d;
    if (Ll(v)) {
      var g = f / c, p = -s / o + g, m = -g / 2;
      p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m);
    } else if (v > 0) {
      var y = Xl(v), b = c * s + 1.5 * o * (-f + y), _ = c * s + 1.5 * o * (-f - y);
      b < 0 ? b = -Wy(-b, Qy) : b = Wy(b, Qy), _ < 0 ? _ = -Wy(-_, Qy) : _ = Wy(_, Qy);
      var p = (-s - (b + _)) / (3 * o);
      p >= 0 && p <= 1 && (a[h++] = p);
    } else {
      var O = (2 * c * s - 3 * o * f) / (2 * Xl(c * c * c)), S = Math.acos(O) / 3, x = Xl(c), C = Math.cos(S), p = (-s - 2 * x * C) / (3 * o), m = (-s + x * (C + W6 * Math.sin(S))) / (3 * o), T = (-s + x * (C - W6 * Math.sin(S))) / (3 * o);
      p >= 0 && p <= 1 && (a[h++] = p), m >= 0 && m <= 1 && (a[h++] = m), T >= 0 && T <= 1 && (a[h++] = T);
    }
  }
  return h;
}
function zq(t, e, n, r, i) {
  var a = 6 * n - 12 * e + 6 * t, o = 9 * e + 3 * r - 3 * t - 9 * n, s = 3 * e - 3 * t, l = 0;
  if (Ll(o)) {
    if (Bq(a)) {
      var u = -s / a;
      u >= 0 && u <= 1 && (i[l++] = u);
    }
  } else {
    var c = a * a - 4 * o * s;
    if (Ll(c))
      i[0] = -a / (2 * o);
    else if (c > 0) {
      var f = Xl(c), u = (-a + f) / (2 * o), d = (-a - f) / (2 * o);
      u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
    }
  }
  return l;
}
function su(t, e, n, r, i, a) {
  var o = (e - t) * i + t, s = (n - e) * i + e, l = (r - n) * i + n, u = (s - o) * i + o, c = (l - s) * i + s, f = (c - u) * i + u;
  a[0] = t, a[1] = o, a[2] = u, a[3] = f, a[4] = f, a[5] = c, a[6] = l, a[7] = r;
}
function Vq(t, e, n, r, i, a, o, s, l, u, c) {
  var f, d = 5e-3, h = 1 / 0, p, v, g, m;
  ko[0] = l, ko[1] = u;
  for (var y = 0; y < 1; y += 0.05)
    ha[0] = Gn(t, n, i, o, y), ha[1] = Gn(e, r, a, s, y), g = Ul(ko, ha), g < h && (f = y, h = g);
  h = 1 / 0;
  for (var b = 0; b < 32 && !(d < Nq); b++)
    p = f - d, v = f + d, ha[0] = Gn(t, n, i, o, p), ha[1] = Gn(e, r, a, s, p), g = Ul(ha, ko), p >= 0 && g < h ? (f = p, h = g) : (Jd[0] = Gn(t, n, i, o, v), Jd[1] = Gn(e, r, a, s, v), m = Ul(Jd, ko), v <= 1 && m < h ? (f = v, h = m) : d *= 0.5);
  return c && (c[0] = Gn(t, n, i, o, f), c[1] = Gn(e, r, a, s, f)), Xl(h);
}
function VIe(t, e, n, r, i, a, o, s, l) {
  for (var u = t, c = e, f = 0, d = 1 / l, h = 1; h <= l; h++) {
    var p = h * d, v = Gn(t, n, i, o, p), g = Gn(e, r, a, s, p), m = v - u, y = g - c;
    f += Math.sqrt(m * m + y * y), u = v, c = g;
  }
  return f;
}
function ir(t, e, n, r) {
  var i = 1 - r;
  return i * (i * t + 2 * r * e) + r * r * n;
}
function fA(t, e, n, r) {
  return 2 * ((1 - r) * (e - t) + r * (n - e));
}
function FIe(t, e, n, r, i) {
  var a = t - 2 * e + n, o = 2 * (e - t), s = t - r, l = 0;
  if (Ll(a)) {
    if (Bq(o)) {
      var u = -s / o;
      u >= 0 && u <= 1 && (i[l++] = u);
    }
  } else {
    var c = o * o - 4 * a * s;
    if (Ll(c)) {
      var u = -o / (2 * a);
      u >= 0 && u <= 1 && (i[l++] = u);
    } else if (c > 0) {
      var f = Xl(c), u = (-o + f) / (2 * a), d = (-o - f) / (2 * a);
      u >= 0 && u <= 1 && (i[l++] = u), d >= 0 && d <= 1 && (i[l++] = d);
    }
  }
  return l;
}
function Fq(t, e, n) {
  var r = t + n - 2 * e;
  return r === 0 ? 0.5 : (t - e) / r;
}
function ym(t, e, n, r, i) {
  var a = (e - t) * r + t, o = (n - e) * r + e, s = (o - a) * r + a;
  i[0] = t, i[1] = a, i[2] = s, i[3] = s, i[4] = o, i[5] = n;
}
function Wq(t, e, n, r, i, a, o, s, l) {
  var u, c = 5e-3, f = 1 / 0;
  ko[0] = o, ko[1] = s;
  for (var d = 0; d < 1; d += 0.05) {
    ha[0] = ir(t, n, i, d), ha[1] = ir(e, r, a, d);
    var h = Ul(ko, ha);
    h < f && (u = d, f = h);
  }
  f = 1 / 0;
  for (var p = 0; p < 32 && !(c < Nq); p++) {
    var v = u - c, g = u + c;
    ha[0] = ir(t, n, i, v), ha[1] = ir(e, r, a, v);
    var h = Ul(ha, ko);
    if (v >= 0 && h < f)
      u = v, f = h;
    else {
      Jd[0] = ir(t, n, i, g), Jd[1] = ir(e, r, a, g);
      var m = Ul(Jd, ko);
      g <= 1 && m < f ? (u = g, f = m) : c *= 0.5;
    }
  }
  return l && (l[0] = ir(t, n, i, u), l[1] = ir(e, r, a, u)), Xl(f);
}
function WIe(t, e, n, r, i, a, o) {
  for (var s = t, l = e, u = 0, c = 1 / o, f = 1; f <= o; f++) {
    var d = f * c, h = ir(t, n, i, d), p = ir(e, r, a, d), v = h - s, g = p - l;
    u += Math.sqrt(v * v + g * g), s = h, l = p;
  }
  return u;
}
var QIe = /cubic-bezier\(([0-9,\.e ]+)\)/;
function SR(t) {
  var e = t && QIe.exec(t);
  if (e) {
    var n = e[1].split(","), r = +ma(n[0]), i = +ma(n[1]), a = +ma(n[2]), o = +ma(n[3]);
    if (isNaN(r + i + a + o))
      return;
    var s = [];
    return function(l) {
      return l <= 0 ? 0 : l >= 1 ? 1 : K1(0, r, a, 1, l, s) && Gn(0, i, o, 1, s[0]);
    };
  }
}
var HIe = function() {
  function t(e) {
    this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || On, this.ondestroy = e.ondestroy || On, this.onrestart = e.onrestart || On, e.easing && this.setEasing(e.easing);
  }
  return t.prototype.step = function(e, n) {
    if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
      this._pausedTime += n;
      return;
    }
    var r = this._life, i = e - this._startTime - this._pausedTime, a = i / r;
    a < 0 && (a = 0), a = Math.min(a, 1);
    var o = this.easingFunc, s = o ? o(a) : a;
    if (this.onframe(s), a === 1)
      if (this.loop) {
        var l = i % r;
        this._startTime = e - l, this._pausedTime = 0, this.onrestart();
      } else
        return !0;
    return !1;
  }, t.prototype.pause = function() {
    this._paused = !0;
  }, t.prototype.resume = function() {
    this._paused = !1;
  }, t.prototype.setEasing = function(e) {
    this.easing = e, this.easingFunc = Me(e) ? e : wg[e] || SR(e);
  }, t;
}(), Qq = /* @__PURE__ */ function() {
  function t(e) {
    this.value = e;
  }
  return t;
}(), GIe = function() {
  function t() {
    this._len = 0;
  }
  return t.prototype.insert = function(e) {
    var n = new Qq(e);
    return this.insertEntry(n), n;
  }, t.prototype.insertEntry = function(e) {
    this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
  }, t.prototype.remove = function(e) {
    var n = e.prev, r = e.next;
    n ? n.next = r : this.head = r, r ? r.prev = n : this.tail = n, e.next = e.prev = null, this._len--;
  }, t.prototype.len = function() {
    return this._len;
  }, t.prototype.clear = function() {
    this.head = this.tail = null, this._len = 0;
  }, t;
}(), R0 = function() {
  function t(e) {
    this._list = new GIe(), this._maxSize = 10, this._map = {}, this._maxSize = e;
  }
  return t.prototype.put = function(e, n) {
    var r = this._list, i = this._map, a = null;
    if (i[e] == null) {
      var o = r.len(), s = this._lastRemovedEntry;
      if (o >= this._maxSize && o > 0) {
        var l = r.head;
        r.remove(l), delete i[l.key], a = l.value, this._lastRemovedEntry = l;
      }
      s ? s.value = n : s = new Qq(n), s.key = e, r.insertEntry(s), i[e] = s;
    }
    return a;
  }, t.prototype.get = function(e) {
    var n = this._map[e], r = this._list;
    if (n != null)
      return n !== r.tail && (r.remove(n), r.insertEntry(n)), n.value;
  }, t.prototype.clear = function() {
    this._list.clear(), this._map = {};
  }, t.prototype.len = function() {
    return this._list.len();
  }, t;
}(), H6 = {
  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 Ja(t) {
  return t = Math.round(t), t < 0 ? 0 : t > 255 ? 255 : t;
}
function jIe(t) {
  return t = Math.round(t), t < 0 ? 0 : t > 360 ? 360 : t;
}
function bm(t) {
  return t < 0 ? 0 : t > 1 ? 1 : t;
}
function UC(t) {
  var e = t;
  return e.length && e.charAt(e.length - 1) === "%" ? Ja(parseFloat(e) / 100 * 255) : Ja(parseInt(e, 10));
}
function qc(t) {
  var e = t;
  return e.length && e.charAt(e.length - 1) === "%" ? bm(parseFloat(e) / 100) : bm(parseFloat(e));
}
function XC(t, e, n) {
  return n < 0 ? n += 1 : n > 1 && (n -= 1), n * 6 < 1 ? t + (e - t) * n * 6 : n * 2 < 1 ? e : n * 3 < 2 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
function Nl(t, e, n) {
  return t + (e - t) * n;
}
function aa(t, e, n, r, i) {
  return t[0] = e, t[1] = n, t[2] = r, t[3] = i, t;
}
function dA(t, e) {
  return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
}
var Hq = new R0(20), Hy = null;
function td(t, e) {
  Hy && dA(Hy, e), Hy = Hq.put(t, Hy || e.slice());
}
function qr(t, e) {
  if (t) {
    e = e || [];
    var n = Hq.get(t);
    if (n)
      return dA(e, n);
    t = t + "";
    var r = t.replace(/ /g, "").toLowerCase();
    if (r in H6)
      return dA(e, H6[r]), td(t, e), e;
    var i = r.length;
    if (r.charAt(0) === "#") {
      if (i === 4 || i === 5) {
        var a = parseInt(r.slice(1, 4), 16);
        if (!(a >= 0 && a <= 4095)) {
          aa(e, 0, 0, 0, 1);
          return;
        }
        return aa(e, (a & 3840) >> 4 | (a & 3840) >> 8, a & 240 | (a & 240) >> 4, a & 15 | (a & 15) << 4, i === 5 ? parseInt(r.slice(4), 16) / 15 : 1), td(t, e), e;
      } else if (i === 7 || i === 9) {
        var a = parseInt(r.slice(1, 7), 16);
        if (!(a >= 0 && a <= 16777215)) {
          aa(e, 0, 0, 0, 1);
          return;
        }
        return aa(e, (a & 16711680) >> 16, (a & 65280) >> 8, a & 255, i === 9 ? parseInt(r.slice(7), 16) / 255 : 1), td(t, e), e;
      }
      return;
    }
    var o = r.indexOf("("), s = r.indexOf(")");
    if (o !== -1 && s + 1 === i) {
      var l = r.substr(0, o), u = r.substr(o + 1, s - (o + 1)).split(","), c = 1;
      switch (l) {
        case "rgba":
          if (u.length !== 4)
            return u.length === 3 ? aa(e, +u[0], +u[1], +u[2], 1) : aa(e, 0, 0, 0, 1);
          c = qc(u.pop());
        case "rgb":
          if (u.length >= 3)
            return aa(e, UC(u[0]), UC(u[1]), UC(u[2]), u.length === 3 ? c : qc(u[3])), td(t, e), e;
          aa(e, 0, 0, 0, 1);
          return;
        case "hsla":
          if (u.length !== 4) {
            aa(e, 0, 0, 0, 1);
            return;
          }
          return u[3] = qc(u[3]), hA(u, e), td(t, e), e;
        case "hsl":
          if (u.length !== 3) {
            aa(e, 0, 0, 0, 1);
            return;
          }
          return hA(u, e), td(t, e), e;
        default:
          return;
      }
    }
    aa(e, 0, 0, 0, 1);
  }
}
function hA(t, e) {
  var n = (parseFloat(t[0]) % 360 + 360) % 360 / 360, r = qc(t[1]), i = qc(t[2]), a = i <= 0.5 ? i * (r + 1) : i + r - i * r, o = i * 2 - a;
  return e = e || [], aa(e, Ja(XC(o, a, n + 1 / 3) * 255), Ja(XC(o, a, n) * 255), Ja(XC(o, a, n - 1 / 3) * 255), 1), t.length === 4 && (e[3] = t[3]), e;
}
function ZIe(t) {
  if (t) {
    var e = t[0] / 255, n = t[1] / 255, r = t[2] / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = a - i, s = (a + i) / 2, l, u;
    if (o === 0)
      l = 0, u = 0;
    else {
      s < 0.5 ? u = o / (a + i) : u = o / (2 - a - i);
      var c = ((a - e) / 6 + o / 2) / o, f = ((a - n) / 6 + o / 2) / o, d = ((a - r) / 6 + o / 2) / o;
      e === a ? l = d - f : n === a ? l = 1 / 3 + c - d : r === a && (l = 2 / 3 + f - c), l < 0 && (l += 1), l > 1 && (l -= 1);
    }
    var h = [l * 360, u, s];
    return t[3] != null && h.push(t[3]), h;
  }
}
function J1(t, e) {
  var n = qr(t);
  if (n) {
    for (var r = 0; r < 3; r++)
      e < 0 ? n[r] = n[r] * (1 - e) | 0 : n[r] = (255 - n[r]) * e + n[r] | 0, n[r] > 255 ? n[r] = 255 : n[r] < 0 && (n[r] = 0);
    return eo(n, n.length === 4 ? "rgba" : "rgb");
  }
}
function UIe(t) {
  var e = qr(t);
  if (e)
    return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1);
}
function Cg(t, e, n) {
  if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
    n = n || [];
    var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = e[i], s = e[a], l = r - i;
    return n[0] = Ja(Nl(o[0], s[0], l)), n[1] = Ja(Nl(o[1], s[1], l)), n[2] = Ja(Nl(o[2], s[2], l)), n[3] = bm(Nl(o[3], s[3], l)), n;
  }
}
var XIe = Cg;
function xR(t, e, n) {
  if (!(!(e && e.length) || !(t >= 0 && t <= 1))) {
    var r = t * (e.length - 1), i = Math.floor(r), a = Math.ceil(r), o = qr(e[i]), s = qr(e[a]), l = r - i, u = eo([
      Ja(Nl(o[0], s[0], l)),
      Ja(Nl(o[1], s[1], l)),
      Ja(Nl(o[2], s[2], l)),
      bm(Nl(o[3], s[3], l))
    ], "rgba");
    return n ? {
      color: u,
      leftIndex: i,
      rightIndex: a,
      value: r
    } : u;
  }
}
var YIe = xR;
function eh(t, e, n, r) {
  var i = qr(t);
  if (t)
    return i = ZIe(i), e != null && (i[0] = jIe(e)), n != null && (i[1] = qc(n)), r != null && (i[2] = qc(r)), eo(hA(i), "rgba");
}
function _m(t, e) {
  var n = qr(t);
  if (n && e != null)
    return n[3] = bm(e), eo(n, "rgba");
}
function eo(t, e) {
  if (!(!t || !t.length)) {
    var n = t[0] + "," + t[1] + "," + t[2];
    return (e === "rgba" || e === "hsva" || e === "hsla") && (n += "," + t[3]), e + "(" + n + ")";
  }
}
function Om(t, e) {
  var n = qr(t);
  return n ? (0.299 * n[0] + 0.587 * n[1] + 0.114 * n[2]) * n[3] / 255 + (1 - n[3]) * e : 0;
}
function qIe() {
  return eo([
    Math.round(Math.random() * 255),
    Math.round(Math.random() * 255),
    Math.round(Math.random() * 255)
  ], "rgb");
}
var G6 = new R0(100);
function eO(t) {
  if (Oe(t)) {
    var e = G6.get(t);
    return e || (e = J1(t, -0.1), G6.put(t, e)), e;
  } else if (M0(t)) {
    var n = le({}, t);
    return n.colorStops = ce(t.colorStops, function(r) {
      return {
        offset: r.offset,
        color: J1(r.color, -0.1)
      };
    }), n;
  }
  return t;
}
const KIe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  fastLerp: Cg,
  fastMapToColor: XIe,
  lerp: xR,
  lift: J1,
  liftColor: eO,
  lum: Om,
  mapToColor: YIe,
  modifyAlpha: _m,
  modifyHSL: eh,
  parse: qr,
  random: qIe,
  stringify: eo,
  toHex: UIe
}, Symbol.toStringTag, { value: "Module" }));
var tO = Math.round;
function Sm(t) {
  var e;
  if (!t || t === "transparent")
    t = "none";
  else if (typeof t == "string" && t.indexOf("rgba") > -1) {
    var n = qr(t);
    n && (t = "rgb(" + n[0] + "," + n[1] + "," + n[2] + ")", e = n[3]);
  }
  return {
    color: t,
    opacity: e ?? 1
  };
}
var j6 = 1e-4;
function Bl(t) {
  return t < j6 && t > -j6;
}
function Gy(t) {
  return tO(t * 1e3) / 1e3;
}
function pA(t) {
  return tO(t * 1e4) / 1e4;
}
function JIe(t) {
  return "matrix(" + Gy(t[0]) + "," + Gy(t[1]) + "," + Gy(t[2]) + "," + Gy(t[3]) + "," + pA(t[4]) + "," + pA(t[5]) + ")";
}
var eDe = {
  left: "start",
  right: "end",
  center: "middle",
  middle: "middle"
};
function tDe(t, e, n) {
  return n === "top" ? t += e / 2 : n === "bottom" && (t -= e / 2), t;
}
function nDe(t) {
  return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY);
}
function rDe(t) {
  var e = t.style, n = t.getGlobalScale();
  return [
    e.shadowColor,
    (e.shadowBlur || 0).toFixed(2),
    (e.shadowOffsetX || 0).toFixed(2),
    (e.shadowOffsetY || 0).toFixed(2),
    n[0],
    n[1]
  ].join(",");
}
function Gq(t) {
  return t && !!t.image;
}
function iDe(t) {
  return t && !!t.svgElement;
}
function wR(t) {
  return Gq(t) || iDe(t);
}
function jq(t) {
  return t.type === "linear";
}
function Zq(t) {
  return t.type === "radial";
}
function Uq(t) {
  return t && (t.type === "linear" || t.type === "radial");
}
function Bx(t) {
  return "url(#" + t + ")";
}
function Xq(t) {
  var e = t.getGlobalScale(), n = Math.max(e[0], e[1]);
  return Math.max(Math.ceil(Math.log(n) / Math.log(10)), 1);
}
function Yq(t) {
  var e = t.x || 0, n = t.y || 0, r = (t.rotation || 0) * Og, i = We(t.scaleX, 1), a = We(t.scaleY, 1), o = t.skewX || 0, s = t.skewY || 0, l = [];
  return (e || n) && l.push("translate(" + e + "px," + n + "px)"), r && l.push("rotate(" + r + ")"), (i !== 1 || a !== 1) && l.push("scale(" + i + "," + a + ")"), (o || s) && l.push("skew(" + tO(o * Og) + "deg, " + tO(s * Og) + "deg)"), l.join(" ");
}
var aDe = function() {
  return vt.hasGlobalWindow && Me(window.btoa) ? function(t) {
    return window.btoa(unescape(encodeURIComponent(t)));
  } : typeof Buffer < "u" ? function(t) {
    return Buffer.from(t).toString("base64");
  } : function(t) {
    return process.env.NODE_ENV !== "production" && Oa("Base64 isn't natively supported in the current environment."), null;
  };
}(), vA = Array.prototype.slice;
function _s(t, e, n) {
  return (e - t) * n + t;
}
function YC(t, e, n, r) {
  for (var i = e.length, a = 0; a < i; a++)
    t[a] = _s(e[a], n[a], r);
  return t;
}
function oDe(t, e, n, r) {
  for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
    t[o] || (t[o] = []);
    for (var s = 0; s < a; s++)
      t[o][s] = _s(e[o][s], n[o][s], r);
  }
  return t;
}
function jy(t, e, n, r) {
  for (var i = e.length, a = 0; a < i; a++)
    t[a] = e[a] + n[a] * r;
  return t;
}
function Z6(t, e, n, r) {
  for (var i = e.length, a = i && e[0].length, o = 0; o < i; o++) {
    t[o] || (t[o] = []);
    for (var s = 0; s < a; s++)
      t[o][s] = e[o][s] + n[o][s] * r;
  }
  return t;
}
function sDe(t, e) {
  for (var n = t.length, r = e.length, i = n > r ? e : t, a = Math.min(n, r), o = i[a - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = a; s < Math.max(n, r); s++)
    i.push({
      offset: o.offset,
      color: o.color.slice()
    });
}
function lDe(t, e, n) {
  var r = t, i = e;
  if (!(!r.push || !i.push)) {
    var a = r.length, o = i.length;
    if (a !== o) {
      var s = a > o;
      if (s)
        r.length = o;
      else
        for (var l = a; l < o; l++)
          r.push(n === 1 ? i[l] : vA.call(i[l]));
    }
    for (var u = r[0] && r[0].length, l = 0; l < r.length; l++)
      if (n === 1)
        isNaN(r[l]) && (r[l] = i[l]);
      else
        for (var c = 0; c < u; c++)
          isNaN(r[l][c]) && (r[l][c] = i[l][c]);
  }
}
function Tg(t) {
  if (wr(t)) {
    var e = t.length;
    if (wr(t[0])) {
      for (var n = [], r = 0; r < e; r++)
        n.push(vA.call(t[r]));
      return n;
    }
    return vA.call(t);
  }
  return t;
}
function L_(t) {
  return t[0] = Math.floor(t[0]) || 0, t[1] = Math.floor(t[1]) || 0, t[2] = Math.floor(t[2]) || 0, t[3] = t[3] == null ? 1 : t[3], "rgba(" + t.join(",") + ")";
}
function uDe(t) {
  return wr(t && t[0]) ? 2 : 1;
}
var Zy = 0, N_ = 1, qq = 2, Fv = 3, gA = 4, mA = 5, U6 = 6;
function X6(t) {
  return t === gA || t === mA;
}
function Uy(t) {
  return t === N_ || t === qq;
}
var tv = [0, 0, 0, 0], cDe = function() {
  function t(e) {
    this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
  }
  return t.prototype.isFinished = function() {
    return this._finished;
  }, t.prototype.setFinished = function() {
    this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
  }, t.prototype.needsAnimate = function() {
    return this.keyframes.length >= 1;
  }, t.prototype.getAdditiveTrack = function() {
    return this._additiveTrack;
  }, t.prototype.addKeyframe = function(e, n, r) {
    this._needsSort = !0;
    var i = this.keyframes, a = i.length, o = !1, s = U6, l = n;
    if (wr(n)) {
      var u = uDe(n);
      s = u, (u === 1 && !St(n[0]) || u === 2 && !St(n[0][0])) && (o = !0);
    } else if (St(n) && !ou(n))
      s = Zy;
    else if (Oe(n))
      if (!isNaN(+n))
        s = Zy;
      else {
        var c = qr(n);
        c && (l = c, s = Fv);
      }
    else if (M0(n)) {
      var f = le({}, l);
      f.colorStops = ce(n.colorStops, function(h) {
        return {
          offset: h.offset,
          color: qr(h.color)
        };
      }), jq(n) ? s = gA : Zq(n) && (s = mA), l = f;
    }
    a === 0 ? this.valType = s : (s !== this.valType || s === U6) && (o = !0), this.discrete = this.discrete || o;
    var d = {
      time: e,
      value: l,
      rawValue: n,
      percent: 0
    };
    return r && (d.easing = r, d.easingFunc = Me(r) ? r : wg[r] || SR(r)), i.push(d), d;
  }, t.prototype.prepare = function(e, n) {
    var r = this.keyframes;
    this._needsSort && r.sort(function(v, g) {
      return v.time - g.time;
    });
    for (var i = this.valType, a = r.length, o = r[a - 1], s = this.discrete, l = Uy(i), u = X6(i), c = 0; c < a; c++) {
      var f = r[c], d = f.value, h = o.value;
      f.percent = f.time / e, s || (l && c !== a - 1 ? lDe(d, h, i) : u && sDe(d.colorStops, h.colorStops));
    }
    if (!s && i !== mA && n && this.needsAnimate() && n.needsAnimate() && i === n.valType && !n._finished) {
      this._additiveTrack = n;
      for (var p = r[0].value, c = 0; c < a; c++)
        i === Zy ? r[c].additiveValue = r[c].value - p : i === Fv ? r[c].additiveValue = jy([], r[c].value, p, -1) : Uy(i) && (r[c].additiveValue = i === N_ ? jy([], r[c].value, p, -1) : Z6([], r[c].value, p, -1));
    }
  }, t.prototype.step = function(e, n) {
    if (!this._finished) {
      this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
      var r = this._additiveTrack != null, i = r ? "additiveValue" : "value", a = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = a === Fv, c, f = this._lastFr, d = Math.min, h, p;
      if (s === 1)
        h = p = o[0];
      else {
        if (n < 0)
          c = 0;
        else if (n < this._lastFrP) {
          var v = d(f + 1, s - 1);
          for (c = v; c >= 0 && !(o[c].percent <= n); c--)
            ;
          c = d(c, s - 2);
        } else {
          for (c = f; c < s && !(o[c].percent > n); c++)
            ;
          c = d(c - 1, s - 2);
        }
        p = o[c + 1], h = o[c];
      }
      if (h && p) {
        this._lastFr = c, this._lastFrP = n;
        var g = p.percent - h.percent, m = g === 0 ? 1 : d((n - h.percent) / g, 1);
        p.easingFunc && (m = p.easingFunc(m));
        var y = r ? this._additiveValue : u ? tv : e[l];
        if ((Uy(a) || u) && !y && (y = this._additiveValue = []), this.discrete)
          e[l] = m < 1 ? h.rawValue : p.rawValue;
        else if (Uy(a))
          a === N_ ? YC(y, h[i], p[i], m) : oDe(y, h[i], p[i], m);
        else if (X6(a)) {
          var b = h[i], _ = p[i], O = a === gA;
          e[l] = {
            type: O ? "linear" : "radial",
            x: _s(b.x, _.x, m),
            y: _s(b.y, _.y, m),
            colorStops: ce(b.colorStops, function(x, C) {
              var T = _.colorStops[C];
              return {
                offset: _s(x.offset, T.offset, m),
                color: L_(YC([], x.color, T.color, m))
              };
            }),
            global: _.global
          }, O ? (e[l].x2 = _s(b.x2, _.x2, m), e[l].y2 = _s(b.y2, _.y2, m)) : e[l].r = _s(b.r, _.r, m);
        } else if (u)
          YC(y, h[i], p[i], m), r || (e[l] = L_(y));
        else {
          var S = _s(h[i], p[i], m);
          r ? this._additiveValue = S : e[l] = S;
        }
        r && this._addToTarget(e);
      }
    }
  }, t.prototype._addToTarget = function(e) {
    var n = this.valType, r = this.propName, i = this._additiveValue;
    n === Zy ? e[r] = e[r] + i : n === Fv ? (qr(e[r], tv), jy(tv, tv, i, 1), e[r] = L_(tv)) : n === N_ ? jy(e[r], e[r], i, 1) : n === qq && Z6(e[r], e[r], i, 1);
  }, t;
}(), CR = function() {
  function t(e, n, r, i) {
    if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = n, n && i) {
      Oa("Can' use additive animation on looped animation.");
      return;
    }
    this._additiveAnimators = i, this._allowDiscrete = r;
  }
  return t.prototype.getMaxTime = function() {
    return this._maxTime;
  }, t.prototype.getDelay = function() {
    return this._delay;
  }, t.prototype.getLoop = function() {
    return this._loop;
  }, t.prototype.getTarget = function() {
    return this._target;
  }, t.prototype.changeTarget = function(e) {
    this._target = e;
  }, t.prototype.when = function(e, n, r) {
    return this.whenWithKeys(e, n, st(n), r);
  }, t.prototype.whenWithKeys = function(e, n, r, i) {
    for (var a = this._tracks, o = 0; o < r.length; o++) {
      var s = r[o], l = a[s];
      if (!l) {
        l = a[s] = new cDe(s);
        var u = void 0, c = this._getAdditiveTrack(s);
        if (c) {
          var f = c.keyframes, d = f[f.length - 1];
          u = d && d.value, c.valType === Fv && u && (u = L_(u));
        } else
          u = this._target[s];
        if (u == null)
          continue;
        e > 0 && l.addKeyframe(0, Tg(u), i), this._trackKeys.push(s);
      }
      l.addKeyframe(e, Tg(n[s]), i);
    }
    return this._maxTime = Math.max(this._maxTime, e), this;
  }, t.prototype.pause = function() {
    this._clip.pause(), this._paused = !0;
  }, t.prototype.resume = function() {
    this._clip.resume(), this._paused = !1;
  }, t.prototype.isPaused = function() {
    return !!this._paused;
  }, t.prototype.duration = function(e) {
    return this._maxTime = e, this._force = !0, this;
  }, t.prototype._doneCallback = function() {
    this._setTracksFinished(), this._clip = null;
    var e = this._doneCbs;
    if (e)
      for (var n = e.length, r = 0; r < n; r++)
        e[r].call(this);
  }, t.prototype._abortedCallback = function() {
    this._setTracksFinished();
    var e = this.animation, n = this._abortedCbs;
    if (e && e.removeClip(this._clip), this._clip = null, n)
      for (var r = 0; r < n.length; r++)
        n[r].call(this);
  }, t.prototype._setTracksFinished = function() {
    for (var e = this._tracks, n = this._trackKeys, r = 0; r < n.length; r++)
      e[n[r]].setFinished();
  }, t.prototype._getAdditiveTrack = function(e) {
    var n, r = this._additiveAnimators;
    if (r)
      for (var i = 0; i < r.length; i++) {
        var a = r[i].getTrack(e);
        a && (n = a);
      }
    return n;
  }, t.prototype.start = function(e) {
    if (!(this._started > 0)) {
      this._started = 1;
      for (var n = this, r = [], i = this._maxTime || 0, a = 0; a < this._trackKeys.length; a++) {
        var o = this._trackKeys[a], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, c = u.length;
        if (s.prepare(i, l), s.needsAnimate())
          if (!this._allowDiscrete && s.discrete) {
            var f = u[c - 1];
            f && (n._target[s.propName] = f.rawValue), s.setFinished();
          } else
            r.push(s);
      }
      if (r.length || this._force) {
        var d = new HIe({
          life: i,
          loop: this._loop,
          delay: this._delay || 0,
          onframe: function(h) {
            n._started = 2;
            var p = n._additiveAnimators;
            if (p) {
              for (var v = !1, g = 0; g < p.length; g++)
                if (p[g]._clip) {
                  v = !0;
                  break;
                }
              v || (n._additiveAnimators = null);
            }
            for (var g = 0; g < r.length; g++)
              r[g].step(n._target, h);
            var m = n._onframeCbs;
            if (m)
              for (var g = 0; g < m.length; g++)
                m[g](n._target, h);
          },
          ondestroy: function() {
            n._doneCallback();
          }
        });
        this._clip = d, this.animation && this.animation.addClip(d), e && d.setEasing(e);
      } else
        this._doneCallback();
      return this;
    }
  }, t.prototype.stop = function(e) {
    if (this._clip) {
      var n = this._clip;
      e && n.onframe(1), this._abortedCallback();
    }
  }, t.prototype.delay = function(e) {
    return this._delay = e, this;
  }, t.prototype.during = function(e) {
    return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
  }, t.prototype.done = function(e) {
    return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
  }, t.prototype.aborted = function(e) {
    return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
  }, t.prototype.getClip = function() {
    return this._clip;
  }, t.prototype.getTrack = function(e) {
    return this._tracks[e];
  }, t.prototype.getTracks = function() {
    var e = this;
    return ce(this._trackKeys, function(n) {
      return e._tracks[n];
    });
  }, t.prototype.stopTracks = function(e, n) {
    if (!e.length || !this._clip)
      return !0;
    for (var r = this._tracks, i = this._trackKeys, a = 0; a < e.length; a++) {
      var o = r[e[a]];
      o && !o.isFinished() && (n ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
    }
    for (var s = !0, a = 0; a < i.length; a++)
      if (!r[i[a]].isFinished()) {
        s = !1;
        break;
      }
    return s && this._abortedCallback(), s;
  }, t.prototype.saveTo = function(e, n, r) {
    if (e) {
      n = n || this._trackKeys;
      for (var i = 0; i < n.length; i++) {
        var a = n[i], o = this._tracks[a];
        if (!(!o || o.isFinished())) {
          var s = o.keyframes, l = s[r ? 0 : s.length - 1];
          l && (e[a] = Tg(l.rawValue));
        }
      }
    }
  }, t.prototype.__changeFinalValue = function(e, n) {
    n = n || st(e);
    for (var r = 0; r < n.length; r++) {
      var i = n[r], a = this._tracks[i];
      if (a) {
        var o = a.keyframes;
        if (o.length > 1) {
          var s = o.pop();
          a.addKeyframe(s.time, e[i]), a.prepare(this._maxTime, a.getAdditiveTrack());
        }
      }
    }
  }, t;
}();
function zd() {
  return (/* @__PURE__ */ new Date()).getTime();
}
var fDe = function(t) {
  q(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r._running = !1, r._time = 0, r._pausedTime = 0, r._pauseStart = 0, r._paused = !1, n = n || {}, r.stage = n.stage || {}, r;
  }
  return e.prototype.addClip = function(n) {
    n.animation && this.removeClip(n), this._head ? (this._tail.next = n, n.prev = this._tail, n.next = null, this._tail = n) : this._head = this._tail = n, n.animation = this;
  }, e.prototype.addAnimator = function(n) {
    n.animation = this;
    var r = n.getClip();
    r && this.addClip(r);
  }, e.prototype.removeClip = function(n) {
    if (n.animation) {
      var r = n.prev, i = n.next;
      r ? r.next = i : this._head = i, i ? i.prev = r : this._tail = r, n.next = n.prev = n.animation = null;
    }
  }, e.prototype.removeAnimator = function(n) {
    var r = n.getClip();
    r && this.removeClip(r), n.animation = null;
  }, e.prototype.update = function(n) {
    for (var r = zd() - this._pausedTime, i = r - this._time, a = this._head; a; ) {
      var o = a.next, s = a.step(r, i);
      s && (a.ondestroy(), this.removeClip(a)), a = o;
    }
    this._time = r, n || (this.trigger("frame", i), this.stage.update && this.stage.update());
  }, e.prototype._startLoop = function() {
    var n = this;
    this._running = !0;
    function r() {
      n._running && (Y1(r), !n._paused && n.update());
    }
    Y1(r);
  }, e.prototype.start = function() {
    this._running || (this._time = zd(), this._pausedTime = 0, this._startLoop());
  }, e.prototype.stop = function() {
    this._running = !1;
  }, e.prototype.pause = function() {
    this._paused || (this._pauseStart = zd(), this._paused = !0);
  }, e.prototype.resume = function() {
    this._paused && (this._pausedTime += zd() - this._pauseStart, this._paused = !1);
  }, e.prototype.clear = function() {
    for (var n = this._head; n; ) {
      var r = n.next;
      n.prev = n.next = n.animation = null, n = r;
    }
    this._head = this._tail = null;
  }, e.prototype.isFinished = function() {
    return this._head == null;
  }, e.prototype.animate = function(n, r) {
    r = r || {}, this.start();
    var i = new CR(n, r.loop);
    return this.addAnimator(i), i;
  }, e;
}(Ra), dDe = 300, qC = vt.domSupported, KC = function() {
  var t = [
    "click",
    "dblclick",
    "mousewheel",
    "wheel",
    "mouseout",
    "mouseup",
    "mousedown",
    "mousemove",
    "contextmenu"
  ], e = [
    "touchstart",
    "touchend",
    "touchmove"
  ], n = {
    pointerdown: 1,
    pointerup: 1,
    pointermove: 1,
    pointerout: 1
  }, r = ce(t, function(i) {
    var a = i.replace("mouse", "pointer");
    return n.hasOwnProperty(a) ? a : i;
  });
  return {
    mouse: t,
    touch: e,
    pointer: r
  };
}(), Y6 = {
  mouse: ["mousemove", "mouseup"],
  pointer: ["pointermove", "pointerup"]
}, q6 = !1;
function yA(t) {
  var e = t.pointerType;
  return e === "pen" || e === "touch";
}
function hDe(t) {
  t.touching = !0, t.touchTimer != null && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function() {
    t.touching = !1, t.touchTimer = null;
  }, 700);
}
function JC(t) {
  t && (t.zrByTouch = !0);
}
function pDe(t, e) {
  return sa(t.dom, new vDe(t, e), !0);
}
function Kq(t, e) {
  for (var n = e, r = !1; n && n.nodeType !== 9 && !(r = n.domBelongToZr || n !== e && n === t.painterRoot); )
    n = n.parentNode;
  return r;
}
var vDe = /* @__PURE__ */ function() {
  function t(e, n) {
    this.stopPropagation = On, this.stopImmediatePropagation = On, this.preventDefault = On, this.type = n.type, this.target = this.currentTarget = e.dom, this.pointerType = n.pointerType, this.clientX = n.clientX, this.clientY = n.clientY;
  }
  return t;
}(), Ga = {
  mousedown: function(t) {
    t = sa(this.dom, t), this.__mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t);
  },
  mousemove: function(t) {
    t = sa(this.dom, t);
    var e = this.__mayPointerCapture;
    e && (t.zrX !== e[0] || t.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", t);
  },
  mouseup: function(t) {
    t = sa(this.dom, t), this.__togglePointerCapture(!1), this.trigger("mouseup", t);
  },
  mouseout: function(t) {
    t = sa(this.dom, t);
    var e = t.toElement || t.relatedTarget;
    Kq(this, e) || (this.__pointerCapturing && (t.zrEventControl = "no_globalout"), this.trigger("mouseout", t));
  },
  wheel: function(t) {
    q6 = !0, t = sa(this.dom, t), this.trigger("mousewheel", t);
  },
  mousewheel: function(t) {
    q6 || (t = sa(this.dom, t), this.trigger("mousewheel", t));
  },
  touchstart: function(t) {
    t = sa(this.dom, t), JC(t), this.__lastTouchMoment = /* @__PURE__ */ new Date(), this.handler.processGesture(t, "start"), Ga.mousemove.call(this, t), Ga.mousedown.call(this, t);
  },
  touchmove: function(t) {
    t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "change"), Ga.mousemove.call(this, t);
  },
  touchend: function(t) {
    t = sa(this.dom, t), JC(t), this.handler.processGesture(t, "end"), Ga.mouseup.call(this, t), +/* @__PURE__ */ new Date() - +this.__lastTouchMoment < dDe && Ga.click.call(this, t);
  },
  pointerdown: function(t) {
    Ga.mousedown.call(this, t);
  },
  pointermove: function(t) {
    yA(t) || Ga.mousemove.call(this, t);
  },
  pointerup: function(t) {
    Ga.mouseup.call(this, t);
  },
  pointerout: function(t) {
    yA(t) || Ga.mouseout.call(this, t);
  }
};
k(["click", "dblclick", "contextmenu"], function(t) {
  Ga[t] = function(e) {
    e = sa(this.dom, e), this.trigger(t, e);
  };
});
var bA = {
  pointermove: function(t) {
    yA(t) || bA.mousemove.call(this, t);
  },
  pointerup: function(t) {
    bA.mouseup.call(this, t);
  },
  mousemove: function(t) {
    this.trigger("mousemove", t);
  },
  mouseup: function(t) {
    var e = this.__pointerCapturing;
    this.__togglePointerCapture(!1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t));
  }
};
function gDe(t, e) {
  var n = e.domHandlers;
  vt.pointerEventsSupported ? k(KC.pointer, function(r) {
    B_(e, r, function(i) {
      n[r].call(t, i);
    });
  }) : (vt.touchEventsSupported && k(KC.touch, function(r) {
    B_(e, r, function(i) {
      n[r].call(t, i), hDe(e);
    });
  }), k(KC.mouse, function(r) {
    B_(e, r, function(i) {
      i = OR(i), e.touching || n[r].call(t, i);
    });
  }));
}
function mDe(t, e) {
  vt.pointerEventsSupported ? k(Y6.pointer, n) : vt.touchEventsSupported || k(Y6.mouse, n);
  function n(r) {
    function i(a) {
      a = OR(a), Kq(t, a.target) || (a = pDe(t, a), e.domHandlers[r].call(t, a));
    }
    B_(e, r, i, { capture: !0 });
  }
}
function B_(t, e, n, r) {
  t.mounted[e] = n, t.listenerOpts[e] = r, cA(t.domTarget, e, n, r);
}
function eT(t) {
  var e = t.mounted;
  for (var n in e)
    e.hasOwnProperty(n) && TIe(t.domTarget, n, e[n], t.listenerOpts[n]);
  t.mounted = {};
}
var K6 = /* @__PURE__ */ function() {
  function t(e, n) {
    this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = n;
  }
  return t;
}(), yDe = function(t) {
  q(e, t);
  function e(n, r) {
    var i = t.call(this) || this;
    return i.__pointerCapturing = !1, i.dom = n, i.painterRoot = r, i._localHandlerScope = new K6(n, Ga), qC && (i._globalHandlerScope = new K6(document, bA)), gDe(i, i._localHandlerScope), i;
  }
  return e.prototype.dispose = function() {
    eT(this._localHandlerScope), qC && eT(this._globalHandlerScope);
  }, e.prototype.setCursor = function(n) {
    this.dom.style && (this.dom.style.cursor = n || "default");
  }, e.prototype.__togglePointerCapture = function(n) {
    if (this.__mayPointerCapture = null, qC && +this.__pointerCapturing ^ +n) {
      this.__pointerCapturing = n;
      var r = this._globalHandlerScope;
      n ? mDe(this, r) : eT(r);
    }
  }, e;
}(Ra), Jq = 1;
vt.hasGlobalWindow && (Jq = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
var nO = Jq, _A = 0.4, OA = "#333", SA = "#ccc", bDe = "#eee", J6 = D0, eB = 5e-5;
function Qu(t) {
  return t > eB || t < -eB;
}
var Hu = [], nd = [], tT = Si(), nT = Math.abs, _De = function() {
  function t() {
  }
  return t.prototype.getLocalTransform = function(e) {
    return t.getLocalTransform(this, e);
  }, t.prototype.setPosition = function(e) {
    this.x = e[0], this.y = e[1];
  }, t.prototype.setScale = function(e) {
    this.scaleX = e[0], this.scaleY = e[1];
  }, t.prototype.setSkew = function(e) {
    this.skewX = e[0], this.skewY = e[1];
  }, t.prototype.setOrigin = function(e) {
    this.originX = e[0], this.originY = e[1];
  }, t.prototype.needLocalTransform = function() {
    return Qu(this.rotation) || Qu(this.x) || Qu(this.y) || Qu(this.scaleX - 1) || Qu(this.scaleY - 1) || Qu(this.skewX) || Qu(this.skewY);
  }, t.prototype.updateTransform = function() {
    var e = this.parent && this.parent.transform, n = this.needLocalTransform(), r = this.transform;
    if (!(n || e)) {
      r && (J6(r), this.invTransform = null);
      return;
    }
    r = r || Si(), n ? this.getLocalTransform(r) : J6(r), e && (n ? Uo(r, e, r) : Lx(r, e)), this.transform = r, this._resolveGlobalScaleRatio(r);
  }, t.prototype._resolveGlobalScaleRatio = function(e) {
    var n = this.globalScaleRatio;
    if (n != null && n !== 1) {
      this.getGlobalScale(Hu);
      var r = Hu[0] < 0 ? -1 : 1, i = Hu[1] < 0 ? -1 : 1, a = ((Hu[0] - r) * n + r) / Hu[0] || 0, o = ((Hu[1] - i) * n + i) / Hu[1] || 0;
      e[0] *= a, e[1] *= a, e[2] *= o, e[3] *= o;
    }
    this.invTransform = this.invTransform || Si(), kf(this.invTransform, e);
  }, t.prototype.getComputedTransform = function() {
    for (var e = this, n = []; e; )
      n.push(e), e = e.parent;
    for (; e = n.pop(); )
      e.updateTransform();
    return this.transform;
  }, t.prototype.setLocalTransform = function(e) {
    if (e) {
      var n = e[0] * e[0] + e[1] * e[1], r = e[2] * e[2] + e[3] * e[3], i = Math.atan2(e[1], e[0]), a = Math.PI / 2 + i - Math.atan2(e[3], e[2]);
      r = Math.sqrt(r) * Math.cos(a), n = Math.sqrt(n), this.skewX = a, this.skewY = 0, this.rotation = -i, this.x = +e[4], this.y = +e[5], this.scaleX = n, this.scaleY = r, this.originX = 0, this.originY = 0;
    }
  }, t.prototype.decomposeTransform = function() {
    if (this.transform) {
      var e = this.parent, n = this.transform;
      e && e.transform && (e.invTransform = e.invTransform || Si(), Uo(nd, e.invTransform, n), n = nd);
      var r = this.originX, i = this.originY;
      (r || i) && (tT[4] = r, tT[5] = i, Uo(nd, n, tT), nd[4] -= r, nd[5] -= i, n = nd), this.setLocalTransform(n);
    }
  }, t.prototype.getGlobalScale = function(e) {
    var n = this.transform;
    return e = e || [], n ? (e[0] = Math.sqrt(n[0] * n[0] + n[1] * n[1]), e[1] = Math.sqrt(n[2] * n[2] + n[3] * n[3]), n[0] < 0 && (e[0] = -e[0]), n[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
  }, t.prototype.transformCoordToLocal = function(e, n) {
    var r = [e, n], i = this.invTransform;
    return i && ar(r, r, i), r;
  }, t.prototype.transformCoordToGlobal = function(e, n) {
    var r = [e, n], i = this.transform;
    return i && ar(r, r, i), r;
  }, t.prototype.getLineScale = function() {
    var e = this.transform;
    return e && nT(e[0] - 1) > 1e-10 && nT(e[3] - 1) > 1e-10 ? Math.sqrt(nT(e[0] * e[3] - e[2] * e[1])) : 1;
  }, t.prototype.copyTransform = function(e) {
    eK(this, e);
  }, t.getLocalTransform = function(e, n) {
    n = n || [];
    var r = e.originX || 0, i = e.originY || 0, a = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, c = e.x, f = e.y, d = e.skewX ? Math.tan(e.skewX) : 0, h = e.skewY ? Math.tan(-e.skewY) : 0;
    if (r || i || s || l) {
      var p = r + s, v = i + l;
      n[4] = -p * a - d * v * o, n[5] = -v * o - h * p * a;
    } else
      n[4] = n[5] = 0;
    return n[0] = a, n[3] = o, n[1] = h * a, n[2] = d * o, u && Cu(n, n, u), n[4] += r + c, n[5] += i + f, n;
  }, t.initDefaultProps = function() {
    var e = t.prototype;
    e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0;
  }(), t;
}(), rs = [
  "x",
  "y",
  "originX",
  "originY",
  "anchorX",
  "anchorY",
  "rotation",
  "scaleX",
  "scaleY",
  "skewX",
  "skewY"
];
function eK(t, e) {
  for (var n = 0; n < rs.length; n++) {
    var r = rs[n];
    t[r] = e[r];
  }
}
const As = _De;
var tB = {};
function Zi(t, e) {
  e = e || iu;
  var n = tB[e];
  n || (n = tB[e] = new R0(500));
  var r = n.get(t);
  return r == null && (r = io.measureText(t, e).width, n.put(t, r)), r;
}
function nB(t, e, n, r) {
  var i = Zi(t, e), a = zx(e), o = Wv(0, i, n), s = Ad(0, a, r), l = new Je(o, s, i, a);
  return l;
}
function k0(t, e, n, r) {
  var i = ((t || "") + "").split(`
`), a = i.length;
  if (a === 1)
    return nB(i[0], e, n, r);
  for (var o = new Je(0, 0, 0, 0), s = 0; s < i.length; s++) {
    var l = nB(i[s], e, n, r);
    s === 0 ? o.copy(l) : o.union(l);
  }
  return o;
}
function Wv(t, e, n) {
  return n === "right" ? t -= e : n === "center" && (t -= e / 2), t;
}
function Ad(t, e, n) {
  return n === "middle" ? t -= e / 2 : n === "bottom" && (t -= e), t;
}
function zx(t) {
  return Zi("国", t);
}
function oo(t, e) {
  return typeof t == "string" ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
}
function rO(t, e, n) {
  var r = e.position || "inside", i = e.distance != null ? e.distance : 5, a = n.height, o = n.width, s = a / 2, l = n.x, u = n.y, c = "left", f = "top";
  if (r instanceof Array)
    l += oo(r[0], n.width), u += oo(r[1], n.height), c = null, f = null;
  else
    switch (r) {
      case "left":
        l -= i, u += s, c = "right", f = "middle";
        break;
      case "right":
        l += i + o, u += s, f = "middle";
        break;
      case "top":
        l += o / 2, u -= i, c = "center", f = "bottom";
        break;
      case "bottom":
        l += o / 2, u += a + i, c = "center";
        break;
      case "inside":
        l += o / 2, u += s, c = "center", f = "middle";
        break;
      case "insideLeft":
        l += i, u += s, f = "middle";
        break;
      case "insideRight":
        l += o - i, u += s, c = "right", f = "middle";
        break;
      case "insideTop":
        l += o / 2, u += i, c = "center";
        break;
      case "insideBottom":
        l += o / 2, u += a - i, c = "center", f = "bottom";
        break;
      case "insideTopLeft":
        l += i, u += i;
        break;
      case "insideTopRight":
        l += o - i, u += i, c = "right";
        break;
      case "insideBottomLeft":
        l += i, u += a - i, f = "bottom";
        break;
      case "insideBottomRight":
        l += o - i, u += a - i, c = "right", f = "bottom";
        break;
    }
  return t = t || {}, t.x = l, t.y = u, t.align = c, t.verticalAlign = f, t;
}
var rT = "__zr_normal__", iT = rs.concat(["ignore"]), ODe = Aa(rs, function(t, e) {
  return t[e] = !0, t;
}, { ignore: !1 }), rd = {}, SDe = new Je(0, 0, 0, 0), Vx = function() {
  function t(e) {
    this.id = gR(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
  }
  return t.prototype._init = function(e) {
    this.attr(e);
  }, t.prototype.drift = function(e, n, r) {
    switch (this.draggable) {
      case "horizontal":
        n = 0;
        break;
      case "vertical":
        e = 0;
        break;
    }
    var i = this.transform;
    i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += e, i[5] += n, this.decomposeTransform(), this.markRedraw();
  }, t.prototype.beforeUpdate = function() {
  }, t.prototype.afterUpdate = function() {
  }, t.prototype.update = function() {
    this.updateTransform(), this.__dirty && this.updateInnerText();
  }, t.prototype.updateInnerText = function(e) {
    var n = this._textContent;
    if (n && (!n.ignore || e)) {
      this.textConfig || (this.textConfig = {});
      var r = this.textConfig, i = r.local, a = n.innerTransformable, o = void 0, s = void 0, l = !1;
      a.parent = i ? this : null;
      var u = !1;
      if (a.copyTransform(n), r.position != null) {
        var c = SDe;
        r.layoutRect ? c.copy(r.layoutRect) : c.copy(this.getBoundingRect()), i || c.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(rd, r, c) : rO(rd, r, c), a.x = rd.x, a.y = rd.y, o = rd.align, s = rd.verticalAlign;
        var f = r.origin;
        if (f && r.rotation != null) {
          var d = void 0, h = void 0;
          f === "center" ? (d = c.width * 0.5, h = c.height * 0.5) : (d = oo(f[0], c.width), h = oo(f[1], c.height)), u = !0, a.originX = -a.x + d + (i ? 0 : c.x), a.originY = -a.y + h + (i ? 0 : c.y);
        }
      }
      r.rotation != null && (a.rotation = r.rotation);
      var p = r.offset;
      p && (a.x += p[0], a.y += p[1], u || (a.originX = -p[0], a.originY = -p[1]));
      var v = r.inside == null ? typeof r.position == "string" && r.position.indexOf("inside") >= 0 : r.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), m = void 0, y = void 0, b = void 0;
      v && this.canBeInsideText() ? (m = r.insideFill, y = r.insideStroke, (m == null || m === "auto") && (m = this.getInsideTextFill()), (y == null || y === "auto") && (y = this.getInsideTextStroke(m), b = !0)) : (m = r.outsideFill, y = r.outsideStroke, (m == null || m === "auto") && (m = this.getOutsideFill()), (y == null || y === "auto") && (y = this.getOutsideStroke(m), b = !0)), m = m || "#000", (m !== g.fill || y !== g.stroke || b !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = m, g.stroke = y, g.autoStroke = b, g.align = o, g.verticalAlign = s, n.setDefaultTextStyle(g)), n.__dirty |= ki, l && n.dirtyStyle(!0);
    }
  }, t.prototype.canBeInsideText = function() {
    return !0;
  }, t.prototype.getInsideTextFill = function() {
    return "#fff";
  }, t.prototype.getInsideTextStroke = function(e) {
    return "#000";
  }, t.prototype.getOutsideFill = function() {
    return this.__zr && this.__zr.isDarkMode() ? SA : OA;
  }, t.prototype.getOutsideStroke = function(e) {
    var n = this.__zr && this.__zr.getBackgroundColor(), r = typeof n == "string" && qr(n);
    r || (r = [255, 255, 255, 1]);
    for (var i = r[3], a = this.__zr.isDarkMode(), o = 0; o < 3; o++)
      r[o] = r[o] * i + (a ? 0 : 255) * (1 - i);
    return r[3] = 1, eo(r, "rgba");
  }, t.prototype.traverse = function(e, n) {
  }, t.prototype.attrKV = function(e, n) {
    e === "textConfig" ? this.setTextConfig(n) : e === "textContent" ? this.setTextContent(n) : e === "clipPath" ? this.setClipPath(n) : e === "extra" ? (this.extra = this.extra || {}, le(this.extra, n)) : this[e] = n;
  }, t.prototype.hide = function() {
    this.ignore = !0, this.markRedraw();
  }, t.prototype.show = function() {
    this.ignore = !1, this.markRedraw();
  }, t.prototype.attr = function(e, n) {
    if (typeof e == "string")
      this.attrKV(e, n);
    else if (Ie(e))
      for (var r = e, i = st(r), a = 0; a < i.length; a++) {
        var o = i[a];
        this.attrKV(o, e[o]);
      }
    return this.markRedraw(), this;
  }, t.prototype.saveCurrentToNormalState = function(e) {
    this._innerSaveToNormal(e);
    for (var n = this._normalState, r = 0; r < this.animators.length; r++) {
      var i = this.animators[r], a = i.__fromStateTransition;
      if (!(i.getLoop() || a && a !== rT)) {
        var o = i.targetName, s = o ? n[o] : n;
        i.saveTo(s);
      }
    }
  }, t.prototype._innerSaveToNormal = function(e) {
    var n = this._normalState;
    n || (n = this._normalState = {}), e.textConfig && !n.textConfig && (n.textConfig = this.textConfig), this._savePrimaryToNormal(e, n, iT);
  }, t.prototype._savePrimaryToNormal = function(e, n, r) {
    for (var i = 0; i < r.length; i++) {
      var a = r[i];
      e[a] != null && !(a in n) && (n[a] = this[a]);
    }
  }, t.prototype.hasState = function() {
    return this.currentStates.length > 0;
  }, t.prototype.getState = function(e) {
    return this.states[e];
  }, t.prototype.ensureState = function(e) {
    var n = this.states;
    return n[e] || (n[e] = {}), n[e];
  }, t.prototype.clearStates = function(e) {
    this.useState(rT, !1, e);
  }, t.prototype.useState = function(e, n, r, i) {
    var a = e === rT, o = this.hasState();
    if (!(!o && a)) {
      var s = this.currentStates, l = this.stateTransition;
      if (!(et(s, e) >= 0 && (n || s.length === 1))) {
        var u;
        if (this.stateProxy && !a && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !a) {
          Oa("State " + e + " not exists.");
          return;
        }
        a || this.saveCurrentToNormalState(u);
        var c = !!(u && u.hoverLayer || i);
        c && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, n, !r && !this.__inHover && l && l.duration > 0, l);
        var f = this._textContent, d = this._textGuide;
        return f && f.useState(e, n, r, c), d && d.useState(e, n, r, c), a ? (this.currentStates = [], this._normalState = {}) : n ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~ki), u;
      }
    }
  }, t.prototype.useStates = function(e, n, r) {
    if (!e.length)
      this.clearStates();
    else {
      var i = [], a = this.currentStates, o = e.length, s = o === a.length;
      if (s) {
        for (var l = 0; l < o; l++)
          if (e[l] !== a[l]) {
            s = !1;
            break;
          }
      }
      if (s)
        return;
      for (var l = 0; l < o; l++) {
        var u = e[l], c = void 0;
        this.stateProxy && (c = this.stateProxy(u, e)), c || (c = this.states[u]), c && i.push(c);
      }
      var f = i[o - 1], d = !!(f && f.hoverLayer || r);
      d && this._toggleHoverLayerFlag(!0);
      var h = this._mergeStates(i), p = this.stateTransition;
      this.saveCurrentToNormalState(h), this._applyStateObj(e.join(","), h, this._normalState, !1, !n && !this.__inHover && p && p.duration > 0, p);
      var v = this._textContent, g = this._textGuide;
      v && v.useStates(e, n, d), g && g.useStates(e, n, d), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !d && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~ki);
    }
  }, t.prototype.isSilent = function() {
    for (var e = this.silent, n = this.parent; !e && n; ) {
      if (n.silent) {
        e = !0;
        break;
      }
      n = n.parent;
    }
    return e;
  }, t.prototype._updateAnimationTargets = function() {
    for (var e = 0; e < this.animators.length; e++) {
      var n = this.animators[e];
      n.targetName && n.changeTarget(this[n.targetName]);
    }
  }, t.prototype.removeState = function(e) {
    var n = et(this.currentStates, e);
    if (n >= 0) {
      var r = this.currentStates.slice();
      r.splice(n, 1), this.useStates(r);
    }
  }, t.prototype.replaceState = function(e, n, r) {
    var i = this.currentStates.slice(), a = et(i, e), o = et(i, n) >= 0;
    a >= 0 ? o ? i.splice(a, 1) : i[a] = n : r && !o && i.push(n), this.useStates(i);
  }, t.prototype.toggleState = function(e, n) {
    n ? this.useState(e, !0) : this.removeState(e);
  }, t.prototype._mergeStates = function(e) {
    for (var n = {}, r, i = 0; i < e.length; i++) {
      var a = e[i];
      le(n, a), a.textConfig && (r = r || {}, le(r, a.textConfig));
    }
    return r && (n.textConfig = r), n;
  }, t.prototype._applyStateObj = function(e, n, r, i, a, o) {
    var s = !(n && i);
    n && n.textConfig ? (this.textConfig = le({}, i ? this.textConfig : r.textConfig), le(this.textConfig, n.textConfig)) : s && r.textConfig && (this.textConfig = r.textConfig);
    for (var l = {}, u = !1, c = 0; c < iT.length; c++) {
      var f = iT[c], d = a && ODe[f];
      n && n[f] != null ? d ? (u = !0, l[f] = n[f]) : this[f] = n[f] : s && r[f] != null && (d ? (u = !0, l[f] = r[f]) : this[f] = r[f]);
    }
    if (!a)
      for (var c = 0; c < this.animators.length; c++) {
        var h = this.animators[c], p = h.targetName;
        h.getLoop() || h.__changeFinalValue(p ? (n || r)[p] : n || r);
      }
    u && this._transitionState(e, l, o);
  }, t.prototype._attachComponent = function(e) {
    if (e.__zr && !e.__hostTarget) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("Text element has been added to zrender.");
      return;
    }
    if (e === this) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("Recursive component attachment.");
      return;
    }
    var n = this.__zr;
    n && e.addSelfToZr(n), e.__zr = n, e.__hostTarget = this;
  }, t.prototype._detachComponent = function(e) {
    e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
  }, t.prototype.getClipPath = function() {
    return this._clipPath;
  }, t.prototype.setClipPath = function(e) {
    this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
  }, t.prototype.removeClipPath = function() {
    var e = this._clipPath;
    e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
  }, t.prototype.getTextContent = function() {
    return this._textContent;
  }, t.prototype.setTextContent = function(e) {
    var n = this._textContent;
    if (n !== e) {
      if (n && n !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
        throw new Error("Text element has been added to zrender.");
      e.innerTransformable = new As(), this._attachComponent(e), this._textContent = e, this.markRedraw();
    }
  }, t.prototype.setTextConfig = function(e) {
    this.textConfig || (this.textConfig = {}), le(this.textConfig, e), this.markRedraw();
  }, t.prototype.removeTextConfig = function() {
    this.textConfig = null, this.markRedraw();
  }, t.prototype.removeTextContent = function() {
    var e = this._textContent;
    e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
  }, t.prototype.getTextGuideLine = function() {
    return this._textGuide;
  }, t.prototype.setTextGuideLine = function(e) {
    this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
  }, t.prototype.removeTextGuideLine = function() {
    var e = this._textGuide;
    e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
  }, t.prototype.markRedraw = function() {
    this.__dirty |= ki;
    var e = this.__zr;
    e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
  }, t.prototype.dirty = function() {
    this.markRedraw();
  }, t.prototype._toggleHoverLayerFlag = function(e) {
    this.__inHover = e;
    var n = this._textContent, r = this._textGuide;
    n && (n.__inHover = e), r && (r.__inHover = e);
  }, t.prototype.addSelfToZr = function(e) {
    if (this.__zr !== e) {
      this.__zr = e;
      var n = this.animators;
      if (n)
        for (var r = 0; r < n.length; r++)
          e.animation.addAnimator(n[r]);
      this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
    }
  }, t.prototype.removeSelfFromZr = function(e) {
    if (this.__zr) {
      this.__zr = null;
      var n = this.animators;
      if (n)
        for (var r = 0; r < n.length; r++)
          e.animation.removeAnimator(n[r]);
      this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
    }
  }, t.prototype.animate = function(e, n, r) {
    var i = e ? this[e] : this;
    if (process.env.NODE_ENV !== "production" && !i) {
      Oa('Property "' + e + '" is not existed in element ' + this.id);
      return;
    }
    var a = new CR(i, n, r);
    return e && (a.targetName = e), this.addAnimator(a, e), a;
  }, t.prototype.addAnimator = function(e, n) {
    var r = this.__zr, i = this;
    e.during(function() {
      i.updateDuringAnimation(n);
    }).done(function() {
      var a = i.animators, o = et(a, e);
      o >= 0 && a.splice(o, 1);
    }), this.animators.push(e), r && r.animation.addAnimator(e), r && r.wakeUp();
  }, t.prototype.updateDuringAnimation = function(e) {
    this.markRedraw();
  }, t.prototype.stopAnimation = function(e, n) {
    for (var r = this.animators, i = r.length, a = [], o = 0; o < i; o++) {
      var s = r[o];
      !e || e === s.scope ? s.stop(n) : a.push(s);
    }
    return this.animators = a, this;
  }, t.prototype.animateTo = function(e, n, r) {
    aT(this, e, n, r);
  }, t.prototype.animateFrom = function(e, n, r) {
    aT(this, e, n, r, !0);
  }, t.prototype._transitionState = function(e, n, r, i) {
    for (var a = aT(this, n, r, i), o = 0; o < a.length; o++)
      a[o].__fromStateTransition = e;
  }, t.prototype.getBoundingRect = function() {
    return null;
  }, t.prototype.getPaintRect = function() {
    return null;
  }, t.initDefaultProps = function() {
    var e = t.prototype;
    e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = ki;
    var n = {};
    function r(a, o, s) {
      n[a + o + s] || (console.warn("DEPRECATED: '" + a + "' has been deprecated. use '" + o + "', '" + s + "' instead"), n[a + o + s] = !0);
    }
    function i(a, o, s, l) {
      Object.defineProperty(e, a, {
        get: function() {
          if (process.env.NODE_ENV !== "production" && r(a, s, l), !this[o]) {
            var c = this[o] = [];
            u(this, c);
          }
          return this[o];
        },
        set: function(c) {
          process.env.NODE_ENV !== "production" && r(a, s, l), this[s] = c[0], this[l] = c[1], this[o] = c, u(this, c);
        }
      });
      function u(c, f) {
        Object.defineProperty(f, 0, {
          get: function() {
            return c[s];
          },
          set: function(d) {
            c[s] = d;
          }
        }), Object.defineProperty(f, 1, {
          get: function() {
            return c[l];
          },
          set: function(d) {
            c[l] = d;
          }
        });
      }
    }
    Object.defineProperty && (i("position", "_legacyPos", "x", "y"), i("scale", "_legacyScale", "scaleX", "scaleY"), i("origin", "_legacyOrigin", "originX", "originY"));
  }(), t;
}();
xn(Vx, Ra);
xn(Vx, As);
function aT(t, e, n, r, i) {
  n = n || {};
  var a = [];
  tK(t, "", t, e, n, r, a, i);
  var o = a.length, s = !1, l = n.done, u = n.aborted, c = function() {
    s = !0, o--, o <= 0 && (s ? l && l() : u && u());
  }, f = function() {
    o--, o <= 0 && (s ? l && l() : u && u());
  };
  o || l && l(), a.length > 0 && n.during && a[0].during(function(p, v) {
    n.during(v);
  });
  for (var d = 0; d < a.length; d++) {
    var h = a[d];
    c && h.done(c), f && h.aborted(f), n.force && h.duration(n.duration), h.start(n.easing);
  }
  return a;
}
function oT(t, e, n) {
  for (var r = 0; r < n; r++)
    t[r] = e[r];
}
function xDe(t) {
  return wr(t[0]);
}
function wDe(t, e, n) {
  if (wr(e[n]))
    if (wr(t[n]) || (t[n] = []), Nr(e[n])) {
      var r = e[n].length;
      t[n].length !== r && (t[n] = new e[n].constructor(r), oT(t[n], e[n], r));
    } else {
      var i = e[n], a = t[n], o = i.length;
      if (xDe(i))
        for (var s = i[0].length, l = 0; l < o; l++)
          a[l] ? oT(a[l], i[l], s) : a[l] = Array.prototype.slice.call(i[l]);
      else
        oT(a, i, o);
      a.length = i.length;
    }
  else
    t[n] = e[n];
}
function CDe(t, e) {
  return t === e || wr(t) && wr(e) && TDe(t, e);
}
function TDe(t, e) {
  var n = t.length;
  if (n !== e.length)
    return !1;
  for (var r = 0; r < n; r++)
    if (t[r] !== e[r])
      return !1;
  return !0;
}
function tK(t, e, n, r, i, a, o, s) {
  for (var l = st(r), u = i.duration, c = i.delay, f = i.additive, d = i.setToFinal, h = !Ie(a), p = t.animators, v = [], g = 0; g < l.length; g++) {
    var m = l[g], y = r[m];
    if (y != null && n[m] != null && (h || a[m]))
      if (Ie(y) && !wr(y) && !M0(y)) {
        if (e) {
          s || (n[m] = y, t.updateDuringAnimation(e));
          continue;
        }
        tK(t, m, n[m], y, i, a && a[m], o, s);
      } else
        v.push(m);
    else s || (n[m] = y, t.updateDuringAnimation(e), v.push(m));
  }
  var b = v.length;
  if (!f && b)
    for (var _ = 0; _ < p.length; _++) {
      var O = p[_];
      if (O.targetName === e) {
        var S = O.stopTracks(v);
        if (S) {
          var x = et(p, O);
          p.splice(x, 1);
        }
      }
    }
  if (i.force || (v = Nt(v, function(P) {
    return !CDe(r[P], n[P]);
  }), b = v.length), b > 0 || i.force && !o.length) {
    var C = void 0, T = void 0, w = void 0;
    if (s) {
      T = {}, d && (C = {});
      for (var _ = 0; _ < b; _++) {
        var m = v[_];
        T[m] = n[m], d ? C[m] = r[m] : n[m] = r[m];
      }
    } else if (d) {
      w = {};
      for (var _ = 0; _ < b; _++) {
        var m = v[_];
        w[m] = Tg(n[m]), wDe(n, r, m);
      }
    }
    var O = new CR(n, !1, !1, f ? Nt(p, function($) {
      return $.targetName === e;
    }) : null);
    O.targetName = e, i.scope && (O.scope = i.scope), d && C && O.whenWithKeys(0, C, v), w && O.whenWithKeys(0, w, v), O.whenWithKeys(u ?? 500, s ? T : r, v).delay(c || 0), t.addAnimator(O, e), o.push(O);
  }
}
var nK = function(t) {
  q(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r.isGroup = !0, r._children = [], r.attr(n), r;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.children = function() {
    return this._children.slice();
  }, e.prototype.childAt = function(n) {
    return this._children[n];
  }, e.prototype.childOfName = function(n) {
    for (var r = this._children, i = 0; i < r.length; i++)
      if (r[i].name === n)
        return r[i];
  }, e.prototype.childCount = function() {
    return this._children.length;
  }, e.prototype.add = function(n) {
    if (n && (n !== this && n.parent !== this && (this._children.push(n), this._doAdd(n)), process.env.NODE_ENV !== "production" && n.__hostTarget))
      throw "This elemenet has been used as an attachment";
    return this;
  }, e.prototype.addBefore = function(n, r) {
    if (n && n !== this && n.parent !== this && r && r.parent === this) {
      var i = this._children, a = i.indexOf(r);
      a >= 0 && (i.splice(a, 0, n), this._doAdd(n));
    }
    return this;
  }, e.prototype.replace = function(n, r) {
    var i = et(this._children, n);
    return i >= 0 && this.replaceAt(r, i), this;
  }, e.prototype.replaceAt = function(n, r) {
    var i = this._children, a = i[r];
    if (n && n !== this && n.parent !== this && n !== a) {
      i[r] = n, a.parent = null;
      var o = this.__zr;
      o && a.removeSelfFromZr(o), this._doAdd(n);
    }
    return this;
  }, e.prototype._doAdd = function(n) {
    n.parent && n.parent.remove(n), n.parent = this;
    var r = this.__zr;
    r && r !== n.__zr && n.addSelfToZr(r), r && r.refresh();
  }, e.prototype.remove = function(n) {
    var r = this.__zr, i = this._children, a = et(i, n);
    return a < 0 ? this : (i.splice(a, 1), n.parent = null, r && n.removeSelfFromZr(r), r && r.refresh(), this);
  }, e.prototype.removeAll = function() {
    for (var n = this._children, r = this.__zr, i = 0; i < n.length; i++) {
      var a = n[i];
      r && a.removeSelfFromZr(r), a.parent = null;
    }
    return n.length = 0, this;
  }, e.prototype.eachChild = function(n, r) {
    for (var i = this._children, a = 0; a < i.length; a++) {
      var o = i[a];
      n.call(r, o, a);
    }
    return this;
  }, e.prototype.traverse = function(n, r) {
    for (var i = 0; i < this._children.length; i++) {
      var a = this._children[i], o = n.call(r, a);
      a.isGroup && !o && a.traverse(n, r);
    }
    return this;
  }, e.prototype.addSelfToZr = function(n) {
    t.prototype.addSelfToZr.call(this, n);
    for (var r = 0; r < this._children.length; r++) {
      var i = this._children[r];
      i.addSelfToZr(n);
    }
  }, e.prototype.removeSelfFromZr = function(n) {
    t.prototype.removeSelfFromZr.call(this, n);
    for (var r = 0; r < this._children.length; r++) {
      var i = this._children[r];
      i.removeSelfFromZr(n);
    }
  }, e.prototype.getBoundingRect = function(n) {
    for (var r = new Je(0, 0, 0, 0), i = n || this._children, a = [], o = null, s = 0; s < i.length; s++) {
      var l = i[s];
      if (!(l.ignore || l.invisible)) {
        var u = l.getBoundingRect(), c = l.getLocalTransform(a);
        c ? (Je.applyTransform(r, u, c), o = o || r.clone(), o.union(r)) : (o = o || u.clone(), o.union(u));
      }
    }
    return o || r;
  }, e;
}(Vx);
nK.prototype.type = "group";
const Ve = nK;
/*!
* 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 Qv = {}, Rc = {};
function PDe(t) {
  delete Rc[t];
}
function $De(t) {
  if (!t)
    return !1;
  if (typeof t == "string")
    return Om(t, 1) < _A;
  if (t.colorStops) {
    for (var e = t.colorStops, n = 0, r = e.length, i = 0; i < r; i++)
      n += Om(e[i].color, 1);
    return n /= r, n < _A;
  }
  return !1;
}
var ADe = function() {
  function t(e, n, r) {
    var i = this;
    this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, r = r || {}, this.dom = n, this.id = e;
    var a = new zIe(), o = r.renderer || "canvas";
    if (Qv[o] || (o = st(Qv)[0]), process.env.NODE_ENV !== "production" && !Qv[o])
      throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
    r.useDirtyRect = r.useDirtyRect == null ? !1 : r.useDirtyRect;
    var s = new Qv[o](n, a, r, e), l = r.ssr || s.ssrOnly;
    this.storage = a, this.painter = s;
    var u = !vt.node && !vt.worker && !l ? new yDe(s.getViewportRoot(), s.root) : null, c = r.useCoarsePointer, f = c == null || c === "auto" ? vt.touchEventsSupported : !!c, d = 44, h;
    f && (h = We(r.pointerSize, d)), this.handler = new Rq(a, s, u, s.root, h), this.animation = new fDe({
      stage: {
        update: l ? null : function() {
          return i._flush(!0);
        }
      }
    }), l || this.animation.start();
  }
  return t.prototype.add = function(e) {
    this._disposed || !e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
  }, t.prototype.remove = function(e) {
    this._disposed || !e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
  }, t.prototype.configLayer = function(e, n) {
    this._disposed || (this.painter.configLayer && this.painter.configLayer(e, n), this.refresh());
  }, t.prototype.setBackgroundColor = function(e) {
    this._disposed || (this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = $De(e));
  }, t.prototype.getBackgroundColor = function() {
    return this._backgroundColor;
  }, t.prototype.setDarkMode = function(e) {
    this._darkMode = e;
  }, t.prototype.isDarkMode = function() {
    return this._darkMode;
  }, t.prototype.refreshImmediately = function(e) {
    this._disposed || (e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1);
  }, t.prototype.refresh = function() {
    this._disposed || (this._needsRefresh = !0, this.animation.start());
  }, t.prototype.flush = function() {
    this._disposed || this._flush(!1);
  }, t.prototype._flush = function(e) {
    var n, r = zd();
    this._needsRefresh && (n = !0, this.refreshImmediately(e)), this._needsRefreshHover && (n = !0, this.refreshHoverImmediately());
    var i = zd();
    n ? (this._stillFrameAccum = 0, this.trigger("rendered", {
      elapsedTime: i - r
    })) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
  }, t.prototype.setSleepAfterStill = function(e) {
    this._sleepAfterStill = e;
  }, t.prototype.wakeUp = function() {
    this._disposed || (this.animation.start(), this._stillFrameAccum = 0);
  }, t.prototype.refreshHover = function() {
    this._needsRefreshHover = !0;
  }, t.prototype.refreshHoverImmediately = function() {
    this._disposed || (this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover());
  }, t.prototype.resize = function(e) {
    this._disposed || (e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize());
  }, t.prototype.clearAnimation = function() {
    this._disposed || this.animation.clear();
  }, t.prototype.getWidth = function() {
    if (!this._disposed)
      return this.painter.getWidth();
  }, t.prototype.getHeight = function() {
    if (!this._disposed)
      return this.painter.getHeight();
  }, t.prototype.setCursorStyle = function(e) {
    this._disposed || this.handler.setCursorStyle(e);
  }, t.prototype.findHover = function(e, n) {
    if (!this._disposed)
      return this.handler.findHover(e, n);
  }, t.prototype.on = function(e, n, r) {
    return this._disposed || this.handler.on(e, n, r), this;
  }, t.prototype.off = function(e, n) {
    this._disposed || this.handler.off(e, n);
  }, t.prototype.trigger = function(e, n) {
    this._disposed || this.handler.trigger(e, n);
  }, t.prototype.clear = function() {
    if (!this._disposed) {
      for (var e = this.storage.getRoots(), n = 0; n < e.length; n++)
        e[n] instanceof Ve && e[n].removeSelfFromZr(this);
      this.storage.delAllRoots(), this.painter.clear();
    }
  }, t.prototype.dispose = function() {
    this._disposed || (this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, this._disposed = !0, PDe(this.id));
  }, t;
}();
function xA(t, e) {
  var n = new ADe(gR(), t, e);
  return Rc[n.id] = n, n;
}
function EDe(t) {
  t.dispose();
}
function MDe() {
  for (var t in Rc)
    Rc.hasOwnProperty(t) && Rc[t].dispose();
  Rc = {};
}
function IDe(t) {
  return Rc[t];
}
function rK(t, e) {
  Qv[t] = e;
}
var wA;
function iK(t) {
  if (typeof wA == "function")
    return wA(t);
}
function aK(t) {
  wA = t;
}
var DDe = "5.6.0";
const RDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  dispose: EDe,
  disposeAll: MDe,
  getElementSSRData: iK,
  getInstance: IDe,
  init: xA,
  registerPainter: rK,
  registerSSRDataGetter: aK,
  version: DDe
}, Symbol.toStringTag, { value: "Module" }));
var rB = 1e-4, oK = 20;
function kDe(t) {
  return t.replace(/^\s+|\s+$/g, "");
}
function Lt(t, e, n, r) {
  var i = e[0], a = e[1], o = n[0], s = n[1], l = a - i, u = s - o;
  if (l === 0)
    return u === 0 ? o : (o + s) / 2;
  if (r)
    if (l > 0) {
      if (t <= i)
        return o;
      if (t >= a)
        return s;
    } else {
      if (t >= i)
        return o;
      if (t <= a)
        return s;
    }
  else {
    if (t === i)
      return o;
    if (t === a)
      return s;
  }
  return (t - i) / l * u + o;
}
function _e(t, e) {
  switch (t) {
    case "center":
    case "middle":
      t = "50%";
      break;
    case "left":
    case "top":
      t = "0%";
      break;
    case "right":
    case "bottom":
      t = "100%";
      break;
  }
  return Oe(t) ? kDe(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : t == null ? NaN : +t;
}
function mn(t, e, n) {
  return e == null && (e = 10), e = Math.min(Math.max(0, e), oK), t = (+t).toFixed(e), n ? t : +t;
}
function Vi(t) {
  return t.sort(function(e, n) {
    return e - n;
  }), t;
}
function Ua(t) {
  if (t = +t, isNaN(t))
    return 0;
  if (t > 1e-14) {
    for (var e = 1, n = 0; n < 15; n++, e *= 10)
      if (Math.round(t * e) / e === t)
        return n;
  }
  return iO(t);
}
function iO(t) {
  var e = t.toString().toLowerCase(), n = e.indexOf("e"), r = n > 0 ? +e.slice(n + 1) : 0, i = n > 0 ? n : e.length, a = e.indexOf("."), o = a < 0 ? 0 : i - 1 - a;
  return Math.max(0, o - r);
}
function TR(t, e) {
  var n = Math.log, r = Math.LN10, i = Math.floor(n(t[1] - t[0]) / r), a = Math.round(n(Math.abs(e[1] - e[0])) / r), o = Math.min(Math.max(-i + a, 0), 20);
  return isFinite(o) ? o : 20;
}
function LDe(t, e, n) {
  if (!t[e])
    return 0;
  var r = sK(t, n);
  return r[e] || 0;
}
function sK(t, e) {
  var n = Aa(t, function(h, p) {
    return h + (isNaN(p) ? 0 : p);
  }, 0);
  if (n === 0)
    return [];
  for (var r = Math.pow(10, e), i = ce(t, function(h) {
    return (isNaN(h) ? 0 : h) / n * r * 100;
  }), a = r * 100, o = ce(i, function(h) {
    return Math.floor(h);
  }), s = Aa(o, function(h, p) {
    return h + p;
  }, 0), l = ce(i, function(h, p) {
    return h - o[p];
  }); s < a; ) {
    for (var u = Number.NEGATIVE_INFINITY, c = null, f = 0, d = l.length; f < d; ++f)
      l[f] > u && (u = l[f], c = f);
    ++o[c], l[c] = 0, ++s;
  }
  return ce(o, function(h) {
    return h / r;
  });
}
function NDe(t, e) {
  var n = Math.max(Ua(t), Ua(e)), r = t + e;
  return n > oK ? r : mn(r, n);
}
var CA = 9007199254740991;
function PR(t) {
  var e = Math.PI * 2;
  return (t % e + e) % e;
}
function Lh(t) {
  return t > -rB && t < rB;
}
var BDe = /^(?:(\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 Yi(t) {
  if (t instanceof Date)
    return t;
  if (Oe(t)) {
    var e = BDe.exec(t);
    if (!e)
      return /* @__PURE__ */ new Date(NaN);
    if (e[8]) {
      var n = +e[4] || 0;
      return e[8].toUpperCase() !== "Z" && (n -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, n, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0));
    } else
      return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0);
  } else if (t == null)
    return /* @__PURE__ */ new Date(NaN);
  return new Date(Math.round(t));
}
function lK(t) {
  return Math.pow(10, L0(t));
}
function L0(t) {
  if (t === 0)
    return 0;
  var e = Math.floor(Math.log(t) / Math.LN10);
  return t / Math.pow(10, e) >= 10 && e++, e;
}
function $R(t, e) {
  var n = L0(t), r = Math.pow(10, n), i = t / r, a;
  return e ? i < 1.5 ? a = 1 : i < 2.5 ? a = 2 : i < 4 ? a = 3 : i < 7 ? a = 5 : a = 10 : i < 1 ? a = 1 : i < 2 ? a = 2 : i < 3 ? a = 3 : i < 5 ? a = 5 : a = 10, t = a * r, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t;
}
function z_(t, e) {
  var n = (t.length - 1) * e + 1, r = Math.floor(n), i = +t[r - 1], a = n - r;
  return a ? i + a * (t[r] - i) : i;
}
function TA(t) {
  t.sort(function(l, u) {
    return s(l, u, 0) ? -1 : 1;
  });
  for (var e = -1 / 0, n = 1, r = 0; r < t.length; ) {
    for (var i = t[r].interval, a = t[r].close, o = 0; o < 2; o++)
      i[o] <= e && (i[o] = e, a[o] = o ? 1 : 1 - n), e = i[o], n = a[o];
    i[0] === i[1] && a[0] * a[1] !== 1 ? t.splice(r, 1) : r++;
  }
  return t;
  function s(l, u, c) {
    return l.interval[c] < u.interval[c] || l.interval[c] === u.interval[c] && (l.close[c] - u.close[c] === (c ? -1 : 1) || !c && s(l, u, 1));
  }
}
function is(t) {
  var e = parseFloat(t);
  return e == t && (e !== 0 || !Oe(t) || t.indexOf("x") <= 0) ? e : NaN;
}
function Fx(t) {
  return !isNaN(is(t));
}
function uK() {
  return Math.round(Math.random() * 9);
}
function cK(t, e) {
  return e === 0 ? t : cK(e, t % e);
}
function iB(t, e) {
  return t == null ? e : e == null ? t : t * e / cK(t, e);
}
var zDe = "[ECharts] ", aB = {}, VDe = typeof console < "u" && console.warn && console.log;
function Wx(t, e, n) {
  if (VDe) {
    if (n) {
      if (aB[e])
        return;
      aB[e] = !0;
    }
    console[t](zDe + e);
  }
}
function FDe(t, e) {
  Wx("log", t, e);
}
function dn(t, e) {
  Wx("warn", t, e);
}
function Cr(t, e) {
  Wx("error", t, e);
}
function Ea(t) {
  process.env.NODE_ENV !== "production" && Wx("warn", "DEPRECATED: " + t, !0);
}
function Cn(t, e, n) {
  process.env.NODE_ENV !== "production" && Ea((n ? "[" + n + "]" : "") + (t + " is deprecated, use " + e + " instead."));
}
function ti() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t[e] = arguments[e];
  var n = "";
  if (process.env.NODE_ENV !== "production") {
    var r = function(i) {
      return i === void 0 ? "undefined" : i === 1 / 0 ? "Infinity" : i === -1 / 0 ? "-Infinity" : ou(i) ? "NaN" : i instanceof Date ? "Date(" + i.toISOString() + ")" : Me(i) ? "function () { ... }" : yR(i) ? i + "" : null;
    };
    n = ce(t, function(i) {
      if (Oe(i))
        return i;
      var a = r(i);
      if (a != null)
        return a;
      if (typeof JSON < "u" && JSON.stringify)
        try {
          return JSON.stringify(i, function(o, s) {
            var l = r(s);
            return l ?? s;
          });
        } catch {
          return "?";
        }
      else
        return "?";
    }).join(" ");
  }
  return n;
}
function Et(t) {
  throw new Error(t);
}
function oB(t, e, n) {
  return (e - t) * n + t;
}
var fK = "series\0", dK = "\0_ec_\0";
function Qt(t) {
  return t instanceof Array ? t : t == null ? [] : [t];
}
function gf(t, e, n) {
  if (t) {
    t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
    for (var r = 0, i = n.length; r < i; r++) {
      var a = n[r];
      !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
    }
  }
}
var sB = ["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 fp(t) {
  return Ie(t) && !ue(t) && !(t instanceof Date) ? t.value : t;
}
function WDe(t) {
  return Ie(t) && !(t instanceof Array);
}
function hK(t, e, n) {
  var r = n === "normalMerge", i = n === "replaceMerge", a = n === "replaceAll";
  t = t || [], e = (e || []).slice();
  var o = Pe();
  k(e, function(l, u) {
    if (!Ie(l)) {
      e[u] = null;
      return;
    }
    process.env.NODE_ENV !== "production" && (l.id != null && !uB(l.id) && lB(l.id), l.name != null && !uB(l.name) && lB(l.name));
  });
  var s = QDe(t, o, n);
  return (r || i) && HDe(s, t, o, e), r && GDe(s, e), r || i ? jDe(s, e, i) : a && ZDe(s, e), UDe(s), s;
}
function QDe(t, e, n) {
  var r = [];
  if (n === "replaceAll")
    return r;
  for (var i = 0; i < t.length; i++) {
    var a = t[i];
    a && a.id != null && e.set(a.id, i), r.push({
      existing: n === "replaceMerge" || Nh(a) ? null : a,
      newOption: null,
      keyInfo: null,
      brandNew: null
    });
  }
  return r;
}
function HDe(t, e, n, r) {
  k(r, function(i, a) {
    if (!(!i || i.id == null)) {
      var o = Pg(i.id), s = n.get(o);
      if (s != null) {
        var l = t[s];
        ke(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = i, l.existing = e[s], r[a] = null;
      }
    }
  });
}
function GDe(t, e) {
  k(e, function(n, r) {
    if (!(!n || n.name == null))
      for (var i = 0; i < t.length; i++) {
        var a = t[i].existing;
        if (!t[i].newOption && a && (a.id == null || n.id == null) && !Nh(n) && !Nh(a) && pK("name", a, n)) {
          t[i].newOption = n, e[r] = null;
          return;
        }
      }
  });
}
function jDe(t, e, n) {
  k(e, function(r) {
    if (r) {
      for (
        var i, a = 0;
        // Be `!resultItem` only when `nextIdx >= result.length`.
        (i = t[a]) && (i.newOption || Nh(i.existing) || // In mode "replaceMerge", here no not-mapped-non-internal-existing.
        i.existing && r.id != null && !pK("id", r, i.existing));
      )
        a++;
      i ? (i.newOption = r, i.brandNew = n) : t.push({
        newOption: r,
        brandNew: n,
        existing: null,
        keyInfo: null
      }), a++;
    }
  });
}
function ZDe(t, e) {
  k(e, function(n) {
    t.push({
      newOption: n,
      brandNew: !0,
      existing: null,
      keyInfo: null
    });
  });
}
function UDe(t) {
  var e = Pe();
  k(t, function(n) {
    var r = n.existing;
    r && e.set(r.id, n);
  }), k(t, function(n) {
    var r = n.newOption;
    ke(!r || r.id == null || !e.get(r.id) || e.get(r.id) === n, "id duplicates: " + (r && r.id)), r && r.id != null && e.set(r.id, n), !n.keyInfo && (n.keyInfo = {});
  }), k(t, function(n, r) {
    var i = n.existing, a = n.newOption, o = n.keyInfo;
    if (Ie(a)) {
      if (o.name = a.name != null ? Pg(a.name) : i ? i.name : fK + r, i)
        o.id = Pg(i.id);
      else if (a.id != null)
        o.id = Pg(a.id);
      else {
        var s = 0;
        do
          o.id = "\0" + o.name + "\0" + s++;
        while (e.get(o.id));
      }
      e.set(o.id, n);
    }
  });
}
function pK(t, e, n) {
  var r = Vn(e[t], null), i = Vn(n[t], null);
  return r != null && i != null && r === i;
}
function Pg(t) {
  if (process.env.NODE_ENV !== "production" && t == null)
    throw new Error();
  return Vn(t, "");
}
function Vn(t, e) {
  return t == null ? e : Oe(t) ? t : St(t) || pm(t) ? t + "" : e;
}
function lB(t) {
  process.env.NODE_ENV !== "production" && dn("`" + t + "` is invalid id or name. Must be a string or number.");
}
function uB(t) {
  return pm(t) || Fx(t);
}
function AR(t) {
  var e = t.name;
  return !!(e && e.indexOf(fK));
}
function Nh(t) {
  return t && t.id != null && Pg(t.id).indexOf(dK) === 0;
}
function XDe(t) {
  return dK + t;
}
function YDe(t, e, n) {
  k(t, function(r) {
    var i = r.newOption;
    Ie(i) && (r.keyInfo.mainType = e, r.keyInfo.subType = qDe(e, i, r.existing, n));
  });
}
function qDe(t, e, n, r) {
  var i = e.type ? e.type : n ? n.subType : r.determineSubType(t, e);
  return i;
}
function KDe(t, e) {
  var n = {}, r = {};
  return i(t || [], n), i(e || [], r, n), [a(n), a(r)];
  function i(o, s, l) {
    for (var u = 0, c = o.length; u < c; u++) {
      var f = Vn(o[u].seriesId, null);
      if (f == null)
        return;
      for (var d = Qt(o[u].dataIndex), h = l && l[f], p = 0, v = d.length; p < v; p++) {
        var g = d[p];
        h && h[g] ? h[g] = null : (s[f] || (s[f] = {}))[g] = 1;
      }
    }
  }
  function a(o, s) {
    var l = [];
    for (var u in o)
      if (o.hasOwnProperty(u) && o[u] != null)
        if (s)
          l.push(+u);
        else {
          var c = a(o[u], !0);
          c.length && l.push({
            seriesId: u,
            dataIndex: c
          });
        }
    return l;
  }
}
function mf(t, e) {
  if (e.dataIndexInside != null)
    return e.dataIndexInside;
  if (e.dataIndex != null)
    return ue(e.dataIndex) ? ce(e.dataIndex, function(n) {
      return t.indexOfRawIndex(n);
    }) : t.indexOfRawIndex(e.dataIndex);
  if (e.name != null)
    return ue(e.name) ? ce(e.name, function(n) {
      return t.indexOfName(n);
    }) : t.indexOfName(e.name);
}
function bt() {
  var t = "__ec_inner_" + JDe++;
  return function(e) {
    return e[t] || (e[t] = {});
  };
}
var JDe = uK();
function $g(t, e, n) {
  var r = ER(e, n), i = r.mainTypeSpecified, a = r.queryOptionMap, o = r.others, s = o, l = n ? n.defaultMainType : null;
  return !i && l && a.set(l, {}), a.each(function(u, c) {
    var f = N0(t, c, u, {
      useDefault: l === c,
      enableAll: n && n.enableAll != null ? n.enableAll : !0,
      enableNone: n && n.enableNone != null ? n.enableNone : !0
    });
    s[c + "Models"] = f.models, s[c + "Model"] = f.models[0];
  }), s;
}
function ER(t, e) {
  var n;
  if (Oe(t)) {
    var r = {};
    r[t + "Index"] = 0, n = r;
  } else
    n = t;
  var i = Pe(), a = {}, o = !1;
  return k(n, function(s, l) {
    if (l === "dataIndex" || l === "dataIndexInside") {
      a[l] = s;
      return;
    }
    var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], c = u[1], f = (u[2] || "").toLowerCase();
    if (!(!c || !f || e && e.includeMainTypes && et(e.includeMainTypes, c) < 0)) {
      o = o || !!c;
      var d = i.get(c) || i.set(c, {});
      d[f] = s;
    }
  }), {
    mainTypeSpecified: o,
    queryOptionMap: i,
    others: a
  };
}
var Dn = {
  useDefault: !0,
  enableAll: !1,
  enableNone: !1
}, eRe = {
  useDefault: !1,
  enableAll: !0,
  enableNone: !0
};
function N0(t, e, n, r) {
  r = r || Dn;
  var i = n.index, a = n.id, o = n.name, s = {
    models: null,
    specified: i != null || a != null || o != null
  };
  if (!s.specified) {
    var l = void 0;
    return s.models = r.useDefault && (l = t.getComponent(e)) ? [l] : [], s;
  }
  return i === "none" || i === !1 ? (ke(r.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (i === "all" && (ke(r.enableAll, '`"all"` is not a valid value on index option.'), i = a = o = null), s.models = t.queryComponents({
    mainType: e,
    index: i,
    id: a,
    name: o
  }), s);
}
function vK(t, e, n) {
  t.setAttribute ? t.setAttribute(e, n) : t[e] = n;
}
function tRe(t, e) {
  return t.getAttribute ? t.getAttribute(e) : t[e];
}
function nRe(t) {
  return t === "auto" ? vt.domSupported ? "html" : "richText" : t || "html";
}
function PA(t, e) {
  var n = Pe(), r = [];
  return k(t, function(i) {
    var a = e(i);
    (n.get(a) || (r.push(a), n.set(a, []))).push(i);
  }), {
    keys: r,
    buckets: n
  };
}
function gK(t, e, n, r, i) {
  var a = e == null || e === "auto";
  if (r == null)
    return r;
  if (St(r)) {
    var o = oB(n || 0, r, i);
    return mn(o, a ? Math.max(Ua(n || 0), Ua(r)) : e);
  } else {
    if (Oe(r))
      return i < 1 ? n : r;
    for (var s = [], l = n, u = r, c = Math.max(l ? l.length : 0, u.length), f = 0; f < c; ++f) {
      var d = t.getDimensionInfo(f);
      if (d && d.type === "ordinal")
        s[f] = (i < 1 && l ? l : u)[f];
      else {
        var h = l && l[f] ? l[f] : 0, p = u[f], o = oB(h, p, i);
        s[f] = mn(o, a ? Math.max(Ua(h), Ua(p)) : e);
      }
    }
    return s;
  }
}
var rRe = ".", Gu = "___EC__COMPONENT__CONTAINER___", mK = "___EC__EXTENDED_CLASS___";
function Vo(t) {
  var e = {
    main: "",
    sub: ""
  };
  if (t) {
    var n = t.split(rRe);
    e.main = n[0] || "", e.sub = n[1] || "";
  }
  return e;
}
function iRe(t) {
  ke(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
}
function aRe(t) {
  return !!(t && t[mK]);
}
function MR(t, e) {
  t.$constructor = t, t.extend = function(n) {
    process.env.NODE_ENV !== "production" && k(e, function(a) {
      n[a] || console.warn("Method `" + a + "` should be implemented" + (n.type ? " in " + n.type : "") + ".");
    });
    var r = this, i;
    return oRe(r) ? i = /** @class */
    function(a) {
      q(o, a);
      function o() {
        return a.apply(this, arguments) || this;
      }
      return o;
    }(r) : (i = function() {
      (n.$constructor || r).apply(this, arguments);
    }, mR(i, this)), le(i.prototype, n), i[mK] = !0, i.extend = this.extend, i.superCall = uRe, i.superApply = cRe, i.superClass = r, i;
  };
}
function oRe(t) {
  return Me(t) && /^class\s/.test(Function.prototype.toString.call(t));
}
function yK(t, e) {
  t.extend = e.extend;
}
var sRe = Math.round(Math.random() * 10);
function lRe(t) {
  var e = ["__\0is_clz", sRe++].join("_");
  t.prototype[e] = !0, process.env.NODE_ENV !== "production" && ke(!t.isInstance, 'The method "is" can not be defined.'), t.isInstance = function(n) {
    return !!(n && n[e]);
  };
}
function uRe(t, e) {
  for (var n = [], r = 2; r < arguments.length; r++)
    n[r - 2] = arguments[r];
  return this.superClass.prototype[e].apply(t, n);
}
function cRe(t, e, n) {
  return this.superClass.prototype[e].apply(t, n);
}
function Qx(t) {
  var e = {};
  t.registerClass = function(r) {
    var i = r.type || r.prototype.type;
    if (i) {
      iRe(i), r.prototype.type = i;
      var a = Vo(i);
      if (!a.sub)
        process.env.NODE_ENV !== "production" && e[a.main] && console.warn(a.main + " exists."), e[a.main] = r;
      else if (a.sub !== Gu) {
        var o = n(a);
        o[a.sub] = r;
      }
    }
    return r;
  }, t.getClass = function(r, i, a) {
    var o = e[r];
    if (o && o[Gu] && (o = i ? o[i] : null), a && !o)
      throw new Error(i ? "Component " + r + "." + (i || "") + " is used but not imported." : r + ".type should be specified.");
    return o;
  }, t.getClassesByMainType = function(r) {
    var i = Vo(r), a = [], o = e[i.main];
    return o && o[Gu] ? k(o, function(s, l) {
      l !== Gu && a.push(s);
    }) : a.push(o), a;
  }, t.hasClass = function(r) {
    var i = Vo(r);
    return !!e[i.main];
  }, t.getAllClassMainTypes = function() {
    var r = [];
    return k(e, function(i, a) {
      r.push(a);
    }), r;
  }, t.hasSubTypes = function(r) {
    var i = Vo(r), a = e[i.main];
    return a && a[Gu];
  };
  function n(r) {
    var i = e[r.main];
    return (!i || !i[Gu]) && (i = e[r.main] = {}, i[Gu] = !0), i;
  }
}
function yf(t, e) {
  for (var n = 0; n < t.length; n++)
    t[n][1] || (t[n][1] = t[n][0]);
  return e = e || !1, function(r, i, a) {
    for (var o = {}, s = 0; s < t.length; s++) {
      var l = t[s][1];
      if (!(i && et(i, l) >= 0 || a && et(a, l) < 0)) {
        var u = r.getShallow(l, e);
        u != null && (o[t[s][0]] = u);
      }
    }
    return o;
  };
}
var fRe = [
  ["fill", "color"],
  ["shadowBlur"],
  ["shadowOffsetX"],
  ["shadowOffsetY"],
  ["opacity"],
  ["shadowColor"]
  // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
  // So do not transfer decal directly.
], dRe = yf(fRe), hRe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getAreaStyle = function(e, n) {
      return dRe(this, e, n);
    }, t;
  }()
), $A = new R0(50);
function pRe(t) {
  if (typeof t == "string") {
    var e = $A.get(t);
    return e && e.image;
  } else
    return t;
}
function IR(t, e, n, r, i) {
  if (t)
    if (typeof t == "string") {
      if (e && e.__zrImageSrc === t || !n)
        return e;
      var a = $A.get(t), o = { hostEl: n, cb: r, cbPayload: i };
      return a ? (e = a.image, !Hx(e) && a.pending.push(o)) : (e = io.loadImage(t, cB, cB), e.__zrImageSrc = t, $A.put(t, e.__cachedImgObj = {
        image: e,
        pending: [o]
      })), e;
    } else
      return t;
  else return e;
}
function cB() {
  var t = this.__cachedImgObj;
  this.onload = this.onerror = this.__cachedImgObj = null;
  for (var e = 0; e < t.pending.length; e++) {
    var n = t.pending[e], r = n.cb;
    r && r(this, n.cbPayload), n.hostEl.dirty();
  }
  t.pending.length = 0;
}
function Hx(t) {
  return t && t.width && t.height;
}
var sT = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
function bK(t, e, n, r, i) {
  if (!e)
    return "";
  var a = (t + "").split(`
`);
  i = _K(e, n, r, i);
  for (var o = 0, s = a.length; o < s; o++)
    a[o] = OK(a[o], i);
  return a.join(`
`);
}
function _K(t, e, n, r) {
  r = r || {};
  var i = le({}, r);
  i.font = e, n = We(n, "..."), i.maxIterations = We(r.maxIterations, 2);
  var a = i.minChar = We(r.minChar, 0);
  i.cnCharWidth = Zi("国", e);
  var o = i.ascCharWidth = Zi("a", e);
  i.placeholder = We(r.placeholder, "");
  for (var s = t = Math.max(0, t - 1), l = 0; l < a && s >= o; l++)
    s -= o;
  var u = Zi(n, e);
  return u > s && (n = "", u = 0), s = t - u, i.ellipsis = n, i.ellipsisWidth = u, i.contentWidth = s, i.containerWidth = t, i;
}
function OK(t, e) {
  var n = e.containerWidth, r = e.font, i = e.contentWidth;
  if (!n)
    return "";
  var a = Zi(t, r);
  if (a <= n)
    return t;
  for (var o = 0; ; o++) {
    if (a <= i || o >= e.maxIterations) {
      t += e.ellipsis;
      break;
    }
    var s = o === 0 ? vRe(t, i, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * i / a) : 0;
    t = t.substr(0, s), a = Zi(t, r);
  }
  return t === "" && (t = e.placeholder), t;
}
function vRe(t, e, n, r) {
  for (var i = 0, a = 0, o = t.length; a < o && i < e; a++) {
    var s = t.charCodeAt(a);
    i += 0 <= s && s <= 127 ? n : r;
  }
  return a;
}
function gRe(t, e) {
  t != null && (t += "");
  var n = e.overflow, r = e.padding, i = e.font, a = n === "truncate", o = zx(i), s = We(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", c = e.width, f;
  c != null && (n === "break" || n === "breakAll") ? f = t ? SK(t, e.font, c, n === "breakAll", 0).lines : [] : f = t ? t.split(`
`) : [];
  var d = f.length * s, h = We(e.height, d);
  if (d > h && u) {
    var p = Math.floor(h / s);
    f = f.slice(0, p);
  }
  if (t && a && c != null)
    for (var v = _K(c, i, e.ellipsis, {
      minChar: e.truncateMinChar,
      placeholder: e.placeholder
    }), g = 0; g < f.length; g++)
      f[g] = OK(f[g], v);
  for (var m = h, y = 0, g = 0; g < f.length; g++)
    y = Math.max(Zi(f[g], i), y);
  c == null && (c = y);
  var b = y;
  return r && (m += r[0] + r[2], b += r[1] + r[3], c += r[1] + r[3]), l && (b = c), {
    lines: f,
    height: h,
    outerWidth: b,
    outerHeight: m,
    lineHeight: s,
    calculatedLineHeight: o,
    contentWidth: y,
    contentHeight: d,
    width: c
  };
}
var mRe = /* @__PURE__ */ function() {
  function t() {
  }
  return t;
}(), fB = /* @__PURE__ */ function() {
  function t(e) {
    this.tokens = [], e && (this.tokens = e);
  }
  return t;
}(), yRe = /* @__PURE__ */ function() {
  function t() {
    this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
  }
  return t;
}();
function bRe(t, e) {
  var n = new yRe();
  if (t != null && (t += ""), !t)
    return n;
  for (var r = e.width, i = e.height, a = e.overflow, o = (a === "break" || a === "breakAll") && r != null ? { width: r, accumWidth: 0, breakAll: a === "breakAll" } : null, s = sT.lastIndex = 0, l; (l = sT.exec(t)) != null; ) {
    var u = l.index;
    u > s && lT(n, t.substring(s, u), e, o), lT(n, l[2], e, o, l[1]), s = sT.lastIndex;
  }
  s < t.length && lT(n, t.substring(s, t.length), e, o);
  var c = [], f = 0, d = 0, h = e.padding, p = a === "truncate", v = e.lineOverflow === "truncate";
  function g(V, z, W) {
    V.width = z, V.lineHeight = W, f += W, d = Math.max(d, z);
  }
  e: for (var m = 0; m < n.lines.length; m++) {
    for (var y = n.lines[m], b = 0, _ = 0, O = 0; O < y.tokens.length; O++) {
      var S = y.tokens[O], x = S.styleName && e.rich[S.styleName] || {}, C = S.textPadding = x.padding, T = C ? C[1] + C[3] : 0, w = S.font = x.font || e.font;
      S.contentHeight = zx(w);
      var P = We(x.height, S.contentHeight);
      if (S.innerHeight = P, C && (P += C[0] + C[2]), S.height = P, S.lineHeight = ji(x.lineHeight, e.lineHeight, P), S.align = x && x.align || e.align, S.verticalAlign = x && x.verticalAlign || "middle", v && i != null && f + S.lineHeight > i) {
        O > 0 ? (y.tokens = y.tokens.slice(0, O), g(y, _, b), n.lines = n.lines.slice(0, m + 1)) : n.lines = n.lines.slice(0, m);
        break e;
      }
      var $ = x.width, A = $ == null || $ === "auto";
      if (typeof $ == "string" && $.charAt($.length - 1) === "%")
        S.percentWidth = $, c.push(S), S.contentWidth = Zi(S.text, w);
      else {
        if (A) {
          var D = x.backgroundColor, E = D && D.image;
          E && (E = pRe(E), Hx(E) && (S.width = Math.max(S.width, E.width * P / E.height)));
        }
        var R = p && r != null ? r - _ : null;
        R != null && R < S.width ? !A || R < T ? (S.text = "", S.width = S.contentWidth = 0) : (S.text = bK(S.text, R - T, w, e.ellipsis, { minChar: e.truncateMinChar }), S.width = S.contentWidth = Zi(S.text, w)) : S.contentWidth = Zi(S.text, w);
      }
      S.width += T, _ += S.width, x && (b = Math.max(b, S.lineHeight));
    }
    g(y, _, b);
  }
  n.outerWidth = n.width = We(r, d), n.outerHeight = n.height = We(i, f), n.contentHeight = f, n.contentWidth = d, h && (n.outerWidth += h[1] + h[3], n.outerHeight += h[0] + h[2]);
  for (var m = 0; m < c.length; m++) {
    var S = c[m], N = S.percentWidth;
    S.width = parseInt(N, 10) / 100 * n.width;
  }
  return n;
}
function lT(t, e, n, r, i) {
  var a = e === "", o = i && n.rich[i] || {}, s = t.lines, l = o.font || n.font, u = !1, c, f;
  if (r) {
    var d = o.padding, h = d ? d[1] + d[3] : 0;
    if (o.width != null && o.width !== "auto") {
      var p = oo(o.width, r.width) + h;
      s.length > 0 && p + r.accumWidth > r.width && (c = e.split(`
`), u = !0), r.accumWidth = p;
    } else {
      var v = SK(e, l, r.width, r.breakAll, r.accumWidth);
      r.accumWidth = v.accumWidth + h, f = v.linesWidths, c = v.lines;
    }
  } else
    c = e.split(`
`);
  for (var g = 0; g < c.length; g++) {
    var m = c[g], y = new mRe();
    if (y.styleName = i, y.text = m, y.isLineHolder = !m && !a, typeof o.width == "number" ? y.width = o.width : y.width = f ? f[g] : Zi(m, l), !g && !u) {
      var b = (s[s.length - 1] || (s[0] = new fB())).tokens, _ = b.length;
      _ === 1 && b[0].isLineHolder ? b[0] = y : (m || !_ || a) && b.push(y);
    } else
      s.push(new fB([y]));
  }
}
function _Re(t) {
  var e = t.charCodeAt(0);
  return e >= 32 && e <= 591 || e >= 880 && e <= 4351 || e >= 4608 && e <= 5119 || e >= 7680 && e <= 8303;
}
var ORe = Aa(",&?/;] ".split(""), function(t, e) {
  return t[e] = !0, t;
}, {});
function SRe(t) {
  return _Re(t) ? !!ORe[t] : !0;
}
function SK(t, e, n, r, i) {
  for (var a = [], o = [], s = "", l = "", u = 0, c = 0, f = 0; f < t.length; f++) {
    var d = t.charAt(f);
    if (d === `
`) {
      l && (s += l, c += u), a.push(s), o.push(c), s = "", l = "", u = 0, c = 0;
      continue;
    }
    var h = Zi(d, e), p = r ? !1 : !SRe(d);
    if (a.length ? c + h > n : i + c + h > n) {
      c ? (s || l) && (p ? (s || (s = l, l = "", u = 0, c = u), a.push(s), o.push(c - u), l += d, u += h, s = "", c = u) : (l && (s += l, l = "", u = 0), a.push(s), o.push(c), s = d, c = h)) : p ? (a.push(l), o.push(u), l = d, u = h) : (a.push(d), o.push(h));
      continue;
    }
    c += h, p ? (l += d, u += h) : (l && (s += l, l = "", u = 0), s += d);
  }
  return !a.length && !s && (s = t, l = "", u = 0), l && (s += l), s && (a.push(s), o.push(c)), a.length === 1 && (c += i), {
    accumWidth: c,
    lines: a,
    linesWidths: o
  };
}
var AA = "__zr_style_" + Math.round(Math.random() * 10), Kc = {
  shadowBlur: 0,
  shadowOffsetX: 0,
  shadowOffsetY: 0,
  shadowColor: "#000",
  opacity: 1,
  blend: "source-over"
}, Gx = {
  style: {
    shadowBlur: !0,
    shadowOffsetX: !0,
    shadowOffsetY: !0,
    shadowColor: !0,
    opacity: !0
  }
};
Kc[AA] = !0;
var dB = ["z", "z2", "invisible"], xRe = ["invisible"], wRe = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype._init = function(n) {
    for (var r = st(n), i = 0; i < r.length; i++) {
      var a = r[i];
      a === "style" ? this.useStyle(n[a]) : t.prototype.attrKV.call(this, a, n[a]);
    }
    this.style || this.useStyle({});
  }, e.prototype.beforeBrush = function() {
  }, e.prototype.afterBrush = function() {
  }, e.prototype.innerBeforeBrush = function() {
  }, e.prototype.innerAfterBrush = function() {
  }, e.prototype.shouldBePainted = function(n, r, i, a) {
    var o = this.transform;
    if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && CRe(this, n, r) || o && !o[0] && !o[3])
      return !1;
    if (i && this.__clipPaths) {
      for (var s = 0; s < this.__clipPaths.length; ++s)
        if (this.__clipPaths[s].isZeroArea())
          return !1;
    }
    if (a && this.parent)
      for (var l = this.parent; l; ) {
        if (l.ignore)
          return !1;
        l = l.parent;
      }
    return !0;
  }, e.prototype.contain = function(n, r) {
    return this.rectContain(n, r);
  }, e.prototype.traverse = function(n, r) {
    n.call(r, this);
  }, e.prototype.rectContain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
    return a.contain(i[0], i[1]);
  }, e.prototype.getPaintRect = function() {
    var n = this._paintRect;
    if (!this._paintRect || this.__dirty) {
      var r = this.transform, i = this.getBoundingRect(), a = this.style, o = a.shadowBlur || 0, s = a.shadowOffsetX || 0, l = a.shadowOffsetY || 0;
      n = this._paintRect || (this._paintRect = new Je(0, 0, 0, 0)), r ? Je.applyTransform(n, i, r) : n.copy(i), (o || s || l) && (n.width += o * 2 + Math.abs(s), n.height += o * 2 + Math.abs(l), n.x = Math.min(n.x, n.x + s - o), n.y = Math.min(n.y, n.y + l - o));
      var u = this.dirtyRectTolerance;
      n.isZero() || (n.x = Math.floor(n.x - u), n.y = Math.floor(n.y - u), n.width = Math.ceil(n.width + 1 + u * 2), n.height = Math.ceil(n.height + 1 + u * 2));
    }
    return n;
  }, e.prototype.setPrevPaintRect = function(n) {
    n ? (this._prevPaintRect = this._prevPaintRect || new Je(0, 0, 0, 0), this._prevPaintRect.copy(n)) : this._prevPaintRect = null;
  }, e.prototype.getPrevPaintRect = function() {
    return this._prevPaintRect;
  }, e.prototype.animateStyle = function(n) {
    return this.animate("style", n);
  }, e.prototype.updateDuringAnimation = function(n) {
    n === "style" ? this.dirtyStyle() : this.markRedraw();
  }, e.prototype.attrKV = function(n, r) {
    n !== "style" ? t.prototype.attrKV.call(this, n, r) : this.style ? this.setStyle(r) : this.useStyle(r);
  }, e.prototype.setStyle = function(n, r) {
    return typeof n == "string" ? this.style[n] = r : le(this.style, n), this.dirtyStyle(), this;
  }, e.prototype.dirtyStyle = function(n) {
    n || this.markRedraw(), this.__dirty |= Vv, this._rect && (this._rect = null);
  }, e.prototype.dirty = function() {
    this.dirtyStyle();
  }, e.prototype.styleChanged = function() {
    return !!(this.__dirty & Vv);
  }, e.prototype.styleUpdated = function() {
    this.__dirty &= ~Vv;
  }, e.prototype.createStyle = function(n) {
    return I0(Kc, n);
  }, e.prototype.useStyle = function(n) {
    n[AA] || (n = this.createStyle(n)), this.__inHover ? this.__hoverStyle = n : this.style = n, this.dirtyStyle();
  }, e.prototype.isStyleObject = function(n) {
    return n[AA];
  }, e.prototype._innerSaveToNormal = function(n) {
    t.prototype._innerSaveToNormal.call(this, n);
    var r = this._normalState;
    n.style && !r.style && (r.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(n, r, dB);
  }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
    t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
    var l = !(r && a), u;
    if (r && r.style ? o ? a ? u = r.style : (u = this._mergeStyle(this.createStyle(), i.style), this._mergeStyle(u, r.style)) : (u = this._mergeStyle(this.createStyle(), a ? this.style : i.style), this._mergeStyle(u, r.style)) : l && (u = i.style), u)
      if (o) {
        var c = this.style;
        if (this.style = this.createStyle(l ? {} : c), l)
          for (var f = st(c), d = 0; d < f.length; d++) {
            var h = f[d];
            h in u && (u[h] = u[h], this.style[h] = c[h]);
          }
        for (var p = st(u), d = 0; d < p.length; d++) {
          var h = p[d];
          this.style[h] = this.style[h];
        }
        this._transitionState(n, {
          style: u
        }, s, this.getAnimationStyleProps());
      } else
        this.useStyle(u);
    for (var v = this.__inHover ? xRe : dB, d = 0; d < v.length; d++) {
      var h = v[d];
      r && r[h] != null ? this[h] = r[h] : l && i[h] != null && (this[h] = i[h]);
    }
  }, e.prototype._mergeStates = function(n) {
    for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
      var o = n[a];
      o.style && (i = i || {}, this._mergeStyle(i, o.style));
    }
    return i && (r.style = i), r;
  }, e.prototype._mergeStyle = function(n, r) {
    return le(n, r), n;
  }, e.prototype.getAnimationStyleProps = function() {
    return Gx;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.type = "displayable", n.invisible = !1, n.z = 0, n.z2 = 0, n.zlevel = 0, n.culling = !1, n.cursor = "pointer", n.rectHover = !1, n.incremental = !1, n._rect = null, n.dirtyRectTolerance = 0, n.__dirty = ki | Vv;
  }(), e;
}(Vx), uT = new Je(0, 0, 0, 0), cT = new Je(0, 0, 0, 0);
function CRe(t, e, n) {
  return uT.copy(t.getBoundingRect()), t.transform && uT.applyTransform(t.transform), cT.width = e, cT.height = n, !uT.intersect(cT);
}
const Ma = wRe;
var di = Math.min, hi = Math.max, fT = Math.sin, dT = Math.cos, ju = Math.PI * 2, Xy = wu(), Yy = wu(), qy = wu();
function jx(t, e, n) {
  if (t.length !== 0) {
    for (var r = t[0], i = r[0], a = r[0], o = r[1], s = r[1], l = 1; l < t.length; l++)
      r = t[l], i = di(i, r[0]), a = hi(a, r[0]), o = di(o, r[1]), s = hi(s, r[1]);
    e[0] = i, e[1] = o, n[0] = a, n[1] = s;
  }
}
function hB(t, e, n, r, i, a) {
  i[0] = di(t, n), i[1] = di(e, r), a[0] = hi(t, n), a[1] = hi(e, r);
}
var pB = [], vB = [];
function TRe(t, e, n, r, i, a, o, s, l, u) {
  var c = zq, f = Gn, d = c(t, n, i, o, pB);
  l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
  for (var h = 0; h < d; h++) {
    var p = f(t, n, i, o, pB[h]);
    l[0] = di(p, l[0]), u[0] = hi(p, u[0]);
  }
  d = c(e, r, a, s, vB);
  for (var h = 0; h < d; h++) {
    var v = f(e, r, a, s, vB[h]);
    l[1] = di(v, l[1]), u[1] = hi(v, u[1]);
  }
  l[0] = di(t, l[0]), u[0] = hi(t, u[0]), l[0] = di(o, l[0]), u[0] = hi(o, u[0]), l[1] = di(e, l[1]), u[1] = hi(e, u[1]), l[1] = di(s, l[1]), u[1] = hi(s, u[1]);
}
function PRe(t, e, n, r, i, a, o, s) {
  var l = Fq, u = ir, c = hi(di(l(t, n, i), 1), 0), f = hi(di(l(e, r, a), 1), 0), d = u(t, n, i, c), h = u(e, r, a, f);
  o[0] = di(t, i, d), o[1] = di(e, a, h), s[0] = hi(t, i, d), s[1] = hi(e, a, h);
}
function $Re(t, e, n, r, i, a, o, s, l) {
  var u = Ps, c = $s, f = Math.abs(i - a);
  if (f % ju < 1e-4 && f > 1e-4) {
    s[0] = t - n, s[1] = e - r, l[0] = t + n, l[1] = e + r;
    return;
  }
  if (Xy[0] = dT(i) * n + t, Xy[1] = fT(i) * r + e, Yy[0] = dT(a) * n + t, Yy[1] = fT(a) * r + e, u(s, Xy, Yy), c(l, Xy, Yy), i = i % ju, i < 0 && (i = i + ju), a = a % ju, a < 0 && (a = a + ju), i > a && !o ? a += ju : i < a && o && (i += ju), o) {
    var d = a;
    a = i, i = d;
  }
  for (var h = 0; h < a; h += Math.PI / 2)
    h > i && (qy[0] = dT(h) * n + t, qy[1] = fT(h) * r + e, u(s, qy, s), c(l, qy, l));
}
var Gt = {
  M: 1,
  L: 2,
  C: 3,
  Q: 4,
  A: 5,
  Z: 6,
  R: 7
}, Zu = [], Uu = [], bo = [], dl = [], _o = [], Oo = [], hT = Math.min, pT = Math.max, Xu = Math.cos, Yu = Math.sin, gs = Math.abs, EA = Math.PI, Sl = EA * 2, vT = typeof Float32Array < "u", nv = [];
function gT(t) {
  var e = Math.round(t / EA * 1e8) / 1e8;
  return e % 2 * EA;
}
function DR(t, e) {
  var n = gT(t[0]);
  n < 0 && (n += Sl);
  var r = n - t[0], i = t[1];
  i += r, !e && i - n >= Sl ? i = n + Sl : e && n - i >= Sl ? i = n - Sl : !e && n > i ? i = n + (Sl - gT(n - i)) : e && n < i && (i = n - (Sl - gT(i - n))), t[0] = n, t[1] = i;
}
var as = function() {
  function t(e) {
    this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []);
  }
  return t.prototype.increaseVersion = function() {
    this._version++;
  }, t.prototype.getVersion = function() {
    return this._version;
  }, t.prototype.setScale = function(e, n, r) {
    r = r || 0, r > 0 && (this._ux = gs(r / nO / e) || 0, this._uy = gs(r / nO / n) || 0);
  }, t.prototype.setDPR = function(e) {
    this.dpr = e;
  }, t.prototype.setContext = function(e) {
    this._ctx = e;
  }, t.prototype.getContext = function() {
    return this._ctx;
  }, t.prototype.beginPath = function() {
    return this._ctx && this._ctx.beginPath(), this.reset(), this;
  }, t.prototype.reset = function() {
    this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
  }, t.prototype.moveTo = function(e, n) {
    return this._drawPendingPt(), this.addData(Gt.M, e, n), this._ctx && this._ctx.moveTo(e, n), this._x0 = e, this._y0 = n, this._xi = e, this._yi = n, this;
  }, t.prototype.lineTo = function(e, n) {
    var r = gs(e - this._xi), i = gs(n - this._yi), a = r > this._ux || i > this._uy;
    if (this.addData(Gt.L, e, n), this._ctx && a && this._ctx.lineTo(e, n), a)
      this._xi = e, this._yi = n, this._pendingPtDist = 0;
    else {
      var o = r * r + i * i;
      o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = n, this._pendingPtDist = o);
    }
    return this;
  }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
    return this._drawPendingPt(), this.addData(Gt.C, e, n, r, i, a, o), this._ctx && this._ctx.bezierCurveTo(e, n, r, i, a, o), this._xi = a, this._yi = o, this;
  }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
    return this._drawPendingPt(), this.addData(Gt.Q, e, n, r, i), this._ctx && this._ctx.quadraticCurveTo(e, n, r, i), this._xi = r, this._yi = i, this;
  }, t.prototype.arc = function(e, n, r, i, a, o) {
    this._drawPendingPt(), nv[0] = i, nv[1] = a, DR(nv, o), i = nv[0], a = nv[1];
    var s = a - i;
    return this.addData(Gt.A, e, n, r, r, i, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, n, r, i, a, o), this._xi = Xu(a) * r + e, this._yi = Yu(a) * r + n, this;
  }, t.prototype.arcTo = function(e, n, r, i, a) {
    return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, n, r, i, a), this;
  }, t.prototype.rect = function(e, n, r, i) {
    return this._drawPendingPt(), this._ctx && this._ctx.rect(e, n, r, i), this.addData(Gt.R, e, n, r, i), this;
  }, t.prototype.closePath = function() {
    this._drawPendingPt(), this.addData(Gt.Z);
    var e = this._ctx, n = this._x0, r = this._y0;
    return e && e.closePath(), this._xi = n, this._yi = r, this;
  }, t.prototype.fill = function(e) {
    e && e.fill(), this.toStatic();
  }, t.prototype.stroke = function(e) {
    e && e.stroke(), this.toStatic();
  }, t.prototype.len = function() {
    return this._len;
  }, t.prototype.setData = function(e) {
    var n = e.length;
    !(this.data && this.data.length === n) && vT && (this.data = new Float32Array(n));
    for (var r = 0; r < n; r++)
      this.data[r] = e[r];
    this._len = n;
  }, t.prototype.appendPath = function(e) {
    e instanceof Array || (e = [e]);
    for (var n = e.length, r = 0, i = this._len, a = 0; a < n; a++)
      r += e[a].len();
    vT && this.data instanceof Float32Array && (this.data = new Float32Array(i + r));
    for (var a = 0; a < n; a++)
      for (var o = e[a].data, s = 0; s < o.length; s++)
        this.data[i++] = o[s];
    this._len = i;
  }, t.prototype.addData = function(e, n, r, i, a, o, s, l, u) {
    if (this._saveData) {
      var c = this.data;
      this._len + arguments.length > c.length && (this._expandData(), c = this.data);
      for (var f = 0; f < arguments.length; f++)
        c[this._len++] = arguments[f];
    }
  }, t.prototype._drawPendingPt = function() {
    this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
  }, t.prototype._expandData = function() {
    if (!(this.data instanceof Array)) {
      for (var e = [], n = 0; n < this._len; n++)
        e[n] = this.data[n];
      this.data = e;
    }
  }, t.prototype.toStatic = function() {
    if (this._saveData) {
      this._drawPendingPt();
      var e = this.data;
      e instanceof Array && (e.length = this._len, vT && this._len > 11 && (this.data = new Float32Array(e)));
    }
  }, t.prototype.getBoundingRect = function() {
    bo[0] = bo[1] = _o[0] = _o[1] = Number.MAX_VALUE, dl[0] = dl[1] = Oo[0] = Oo[1] = -Number.MAX_VALUE;
    var e = this.data, n = 0, r = 0, i = 0, a = 0, o;
    for (o = 0; o < this._len; ) {
      var s = e[o++], l = o === 1;
      switch (l && (n = e[o], r = e[o + 1], i = n, a = r), s) {
        case Gt.M:
          n = i = e[o++], r = a = e[o++], _o[0] = i, _o[1] = a, Oo[0] = i, Oo[1] = a;
          break;
        case Gt.L:
          hB(n, r, e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
          break;
        case Gt.C:
          TRe(n, r, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
          break;
        case Gt.Q:
          PRe(n, r, e[o++], e[o++], e[o], e[o + 1], _o, Oo), n = e[o++], r = e[o++];
          break;
        case Gt.A:
          var u = e[o++], c = e[o++], f = e[o++], d = e[o++], h = e[o++], p = e[o++] + h;
          o += 1;
          var v = !e[o++];
          l && (i = Xu(h) * f + u, a = Yu(h) * d + c), $Re(u, c, f, d, h, p, v, _o, Oo), n = Xu(p) * f + u, r = Yu(p) * d + c;
          break;
        case Gt.R:
          i = n = e[o++], a = r = e[o++];
          var g = e[o++], m = e[o++];
          hB(i, a, i + g, a + m, _o, Oo);
          break;
        case Gt.Z:
          n = i, r = a;
          break;
      }
      Ps(bo, bo, _o), $s(dl, dl, Oo);
    }
    return o === 0 && (bo[0] = bo[1] = dl[0] = dl[1] = 0), new Je(bo[0], bo[1], dl[0] - bo[0], dl[1] - bo[1]);
  }, t.prototype._calculateLength = function() {
    var e = this.data, n = this._len, r = this._ux, i = this._uy, a = 0, o = 0, s = 0, l = 0;
    this._pathSegLen || (this._pathSegLen = []);
    for (var u = this._pathSegLen, c = 0, f = 0, d = 0; d < n; ) {
      var h = e[d++], p = d === 1;
      p && (a = e[d], o = e[d + 1], s = a, l = o);
      var v = -1;
      switch (h) {
        case Gt.M:
          a = s = e[d++], o = l = e[d++];
          break;
        case Gt.L: {
          var g = e[d++], m = e[d++], y = g - a, b = m - o;
          (gs(y) > r || gs(b) > i || d === n - 1) && (v = Math.sqrt(y * y + b * b), a = g, o = m);
          break;
        }
        case Gt.C: {
          var _ = e[d++], O = e[d++], g = e[d++], m = e[d++], S = e[d++], x = e[d++];
          v = VIe(a, o, _, O, g, m, S, x, 10), a = S, o = x;
          break;
        }
        case Gt.Q: {
          var _ = e[d++], O = e[d++], g = e[d++], m = e[d++];
          v = WIe(a, o, _, O, g, m, 10), a = g, o = m;
          break;
        }
        case Gt.A:
          var C = e[d++], T = e[d++], w = e[d++], P = e[d++], $ = e[d++], A = e[d++], D = A + $;
          d += 1, p && (s = Xu($) * w + C, l = Yu($) * P + T), v = pT(w, P) * hT(Sl, Math.abs(A)), a = Xu(D) * w + C, o = Yu(D) * P + T;
          break;
        case Gt.R: {
          s = a = e[d++], l = o = e[d++];
          var E = e[d++], R = e[d++];
          v = E * 2 + R * 2;
          break;
        }
        case Gt.Z: {
          var y = s - a, b = l - o;
          v = Math.sqrt(y * y + b * b), a = s, o = l;
          break;
        }
      }
      v >= 0 && (u[f++] = v, c += v);
    }
    return this._pathLen = c, c;
  }, t.prototype.rebuildPath = function(e, n) {
    var r = this.data, i = this._ux, a = this._uy, o = this._len, s, l, u, c, f, d, h = n < 1, p, v, g = 0, m = 0, y, b = 0, _, O;
    if (!(h && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, v = this._pathLen, y = n * v, !y)))
      e: for (var S = 0; S < o; ) {
        var x = r[S++], C = S === 1;
        switch (C && (u = r[S], c = r[S + 1], s = u, l = c), x !== Gt.L && b > 0 && (e.lineTo(_, O), b = 0), x) {
          case Gt.M:
            s = u = r[S++], l = c = r[S++], e.moveTo(u, c);
            break;
          case Gt.L: {
            f = r[S++], d = r[S++];
            var T = gs(f - u), w = gs(d - c);
            if (T > i || w > a) {
              if (h) {
                var P = p[m++];
                if (g + P > y) {
                  var $ = (y - g) / P;
                  e.lineTo(u * (1 - $) + f * $, c * (1 - $) + d * $);
                  break e;
                }
                g += P;
              }
              e.lineTo(f, d), u = f, c = d, b = 0;
            } else {
              var A = T * T + w * w;
              A > b && (_ = f, O = d, b = A);
            }
            break;
          }
          case Gt.C: {
            var D = r[S++], E = r[S++], R = r[S++], N = r[S++], V = r[S++], z = r[S++];
            if (h) {
              var P = p[m++];
              if (g + P > y) {
                var $ = (y - g) / P;
                su(u, D, R, V, $, Zu), su(c, E, N, z, $, Uu), e.bezierCurveTo(Zu[1], Uu[1], Zu[2], Uu[2], Zu[3], Uu[3]);
                break e;
              }
              g += P;
            }
            e.bezierCurveTo(D, E, R, N, V, z), u = V, c = z;
            break;
          }
          case Gt.Q: {
            var D = r[S++], E = r[S++], R = r[S++], N = r[S++];
            if (h) {
              var P = p[m++];
              if (g + P > y) {
                var $ = (y - g) / P;
                ym(u, D, R, $, Zu), ym(c, E, N, $, Uu), e.quadraticCurveTo(Zu[1], Uu[1], Zu[2], Uu[2]);
                break e;
              }
              g += P;
            }
            e.quadraticCurveTo(D, E, R, N), u = R, c = N;
            break;
          }
          case Gt.A:
            var W = r[S++], F = r[S++], Q = r[S++], Z = r[S++], ne = r[S++], ee = r[S++], oe = r[S++], K = !r[S++], ie = Q > Z ? Q : Z, X = gs(Q - Z) > 1e-3, H = ne + ee, G = !1;
            if (h) {
              var P = p[m++];
              g + P > y && (H = ne + ee * (y - g) / P, G = !0), g += P;
            }
            if (X && e.ellipse ? e.ellipse(W, F, Q, Z, oe, ne, H, K) : e.arc(W, F, ie, ne, H, K), G)
              break e;
            C && (s = Xu(ne) * Q + W, l = Yu(ne) * Z + F), u = Xu(H) * Q + W, c = Yu(H) * Z + F;
            break;
          case Gt.R:
            s = u = r[S], l = c = r[S + 1], f = r[S++], d = r[S++];
            var re = r[S++], fe = r[S++];
            if (h) {
              var P = p[m++];
              if (g + P > y) {
                var de = y - g;
                e.moveTo(f, d), e.lineTo(f + hT(de, re), d), de -= re, de > 0 && e.lineTo(f + re, d + hT(de, fe)), de -= fe, de > 0 && e.lineTo(f + pT(re - de, 0), d + fe), de -= re, de > 0 && e.lineTo(f, d + pT(fe - de, 0));
                break e;
              }
              g += P;
            }
            e.rect(f, d, re, fe);
            break;
          case Gt.Z:
            if (h) {
              var P = p[m++];
              if (g + P > y) {
                var $ = (y - g) / P;
                e.lineTo(u * (1 - $) + s * $, c * (1 - $) + l * $);
                break e;
              }
              g += P;
            }
            e.closePath(), u = s, c = l;
        }
      }
  }, t.prototype.clone = function() {
    var e = new t(), n = this.data;
    return e.data = n.slice ? n.slice() : Array.prototype.slice.call(n), e._len = this._len, e;
  }, t.CMD = Gt, t.initDefaultProps = function() {
    var e = t.prototype;
    e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
  }(), t;
}();
function wl(t, e, n, r, i, a, o) {
  if (i === 0)
    return !1;
  var s = i, l = 0, u = t;
  if (o > e + s && o > r + s || o < e - s && o < r - s || a > t + s && a > n + s || a < t - s && a < n - s)
    return !1;
  if (t !== n)
    l = (e - r) / (t - n), u = (t * r - n * e) / (t - n);
  else
    return Math.abs(a - t) <= s / 2;
  var c = l * a - o + u, f = c * c / (l * l + 1);
  return f <= s / 2 * s / 2;
}
function ARe(t, e, n, r, i, a, o, s, l, u, c) {
  if (l === 0)
    return !1;
  var f = l;
  if (c > e + f && c > r + f && c > a + f && c > s + f || c < e - f && c < r - f && c < a - f && c < s - f || u > t + f && u > n + f && u > i + f && u > o + f || u < t - f && u < n - f && u < i - f && u < o - f)
    return !1;
  var d = Vq(t, e, n, r, i, a, o, s, u, c, null);
  return d <= f / 2;
}
function xK(t, e, n, r, i, a, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  if (l > e + u && l > r + u && l > a + u || l < e - u && l < r - u && l < a - u || s > t + u && s > n + u && s > i + u || s < t - u && s < n - u && s < i - u)
    return !1;
  var c = Wq(t, e, n, r, i, a, s, l, null);
  return c <= u / 2;
}
var gB = Math.PI * 2;
function Fi(t) {
  return t %= gB, t < 0 && (t += gB), t;
}
var rv = Math.PI * 2;
function ERe(t, e, n, r, i, a, o, s, l) {
  if (o === 0)
    return !1;
  var u = o;
  s -= t, l -= e;
  var c = Math.sqrt(s * s + l * l);
  if (c - u > n || c + u < n)
    return !1;
  if (Math.abs(r - i) % rv < 1e-4)
    return !0;
  if (a) {
    var f = r;
    r = Fi(i), i = Fi(f);
  } else
    r = Fi(r), i = Fi(i);
  r > i && (i += rv);
  var d = Math.atan2(l, s);
  return d < 0 && (d += rv), d >= r && d <= i || d + rv >= r && d + rv <= i;
}
function Os(t, e, n, r, i, a) {
  if (a > e && a > r || a < e && a < r || r === e)
    return 0;
  var o = (a - e) / (r - e), s = r < e ? 1 : -1;
  (o === 1 || o === 0) && (s = r < e ? 0.5 : -0.5);
  var l = o * (n - t) + t;
  return l === i ? 1 / 0 : l > i ? s : 0;
}
var hl = as.CMD, qu = Math.PI * 2, MRe = 1e-4;
function IRe(t, e) {
  return Math.abs(t - e) < MRe;
}
var Wr = [-1, -1, -1], ua = [-1, -1];
function DRe() {
  var t = ua[0];
  ua[0] = ua[1], ua[1] = t;
}
function RRe(t, e, n, r, i, a, o, s, l, u) {
  if (u > e && u > r && u > a && u > s || u < e && u < r && u < a && u < s)
    return 0;
  var c = K1(e, r, a, s, u, Wr);
  if (c === 0)
    return 0;
  for (var f = 0, d = -1, h = void 0, p = void 0, v = 0; v < c; v++) {
    var g = Wr[v], m = g === 0 || g === 1 ? 0.5 : 1, y = Gn(t, n, i, o, g);
    y < l || (d < 0 && (d = zq(e, r, a, s, ua), ua[1] < ua[0] && d > 1 && DRe(), h = Gn(e, r, a, s, ua[0]), d > 1 && (p = Gn(e, r, a, s, ua[1]))), d === 2 ? g < ua[0] ? f += h < e ? m : -m : g < ua[1] ? f += p < h ? m : -m : f += s < p ? m : -m : g < ua[0] ? f += h < e ? m : -m : f += s < h ? m : -m);
  }
  return f;
}
function kRe(t, e, n, r, i, a, o, s) {
  if (s > e && s > r && s > a || s < e && s < r && s < a)
    return 0;
  var l = FIe(e, r, a, s, Wr);
  if (l === 0)
    return 0;
  var u = Fq(e, r, a);
  if (u >= 0 && u <= 1) {
    for (var c = 0, f = ir(e, r, a, u), d = 0; d < l; d++) {
      var h = Wr[d] === 0 || Wr[d] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[d]);
      p < o || (Wr[d] < u ? c += f < e ? h : -h : c += a < f ? h : -h);
    }
    return c;
  } else {
    var h = Wr[0] === 0 || Wr[0] === 1 ? 0.5 : 1, p = ir(t, n, i, Wr[0]);
    return p < o ? 0 : a < e ? h : -h;
  }
}
function LRe(t, e, n, r, i, a, o, s) {
  if (s -= e, s > n || s < -n)
    return 0;
  var l = Math.sqrt(n * n - s * s);
  Wr[0] = -l, Wr[1] = l;
  var u = Math.abs(r - i);
  if (u < 1e-4)
    return 0;
  if (u >= qu - 1e-4) {
    r = 0, i = qu;
    var c = a ? 1 : -1;
    return o >= Wr[0] + t && o <= Wr[1] + t ? c : 0;
  }
  if (r > i) {
    var f = r;
    r = i, i = f;
  }
  r < 0 && (r += qu, i += qu);
  for (var d = 0, h = 0; h < 2; h++) {
    var p = Wr[h];
    if (p + t > o) {
      var v = Math.atan2(s, p), c = a ? 1 : -1;
      v < 0 && (v = qu + v), (v >= r && v <= i || v + qu >= r && v + qu <= i) && (v > Math.PI / 2 && v < Math.PI * 1.5 && (c = -c), d += c);
    }
  }
  return d;
}
function wK(t, e, n, r, i) {
  for (var a = t.data, o = t.len(), s = 0, l = 0, u = 0, c = 0, f = 0, d, h, p = 0; p < o; ) {
    var v = a[p++], g = p === 1;
    switch (v === hl.M && p > 1 && (n || (s += Os(l, u, c, f, r, i))), g && (l = a[p], u = a[p + 1], c = l, f = u), v) {
      case hl.M:
        c = a[p++], f = a[p++], l = c, u = f;
        break;
      case hl.L:
        if (n) {
          if (wl(l, u, a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += Os(l, u, a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case hl.C:
        if (n) {
          if (ARe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += RRe(l, u, a[p++], a[p++], a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case hl.Q:
        if (n) {
          if (xK(l, u, a[p++], a[p++], a[p], a[p + 1], e, r, i))
            return !0;
        } else
          s += kRe(l, u, a[p++], a[p++], a[p], a[p + 1], r, i) || 0;
        l = a[p++], u = a[p++];
        break;
      case hl.A:
        var m = a[p++], y = a[p++], b = a[p++], _ = a[p++], O = a[p++], S = a[p++];
        p += 1;
        var x = !!(1 - a[p++]);
        d = Math.cos(O) * b + m, h = Math.sin(O) * _ + y, g ? (c = d, f = h) : s += Os(l, u, d, h, r, i);
        var C = (r - m) * _ / b + m;
        if (n) {
          if (ERe(m, y, _, O, O + S, x, e, C, i))
            return !0;
        } else
          s += LRe(m, y, _, O, O + S, x, C, i);
        l = Math.cos(O + S) * b + m, u = Math.sin(O + S) * _ + y;
        break;
      case hl.R:
        c = l = a[p++], f = u = a[p++];
        var T = a[p++], w = a[p++];
        if (d = c + T, h = f + w, n) {
          if (wl(c, f, d, f, e, r, i) || wl(d, f, d, h, e, r, i) || wl(d, h, c, h, e, r, i) || wl(c, h, c, f, e, r, i))
            return !0;
        } else
          s += Os(d, f, d, h, r, i), s += Os(c, h, c, f, r, i);
        break;
      case hl.Z:
        if (n) {
          if (wl(l, u, c, f, e, r, i))
            return !0;
        } else
          s += Os(l, u, c, f, r, i);
        l = c, u = f;
        break;
    }
  }
  return !n && !IRe(u, f) && (s += Os(l, u, c, f, r, i) || 0), s !== 0;
}
function NRe(t, e, n) {
  return wK(t, 0, !1, e, n);
}
function BRe(t, e, n, r) {
  return wK(t, e, !0, n, r);
}
var aO = Re({
  fill: "#000",
  stroke: null,
  strokePercent: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  lineDashOffset: 0,
  lineWidth: 1,
  lineCap: "butt",
  miterLimit: 10,
  strokeNoScale: !1,
  strokeFirst: !1
}, Kc), zRe = {
  style: Re({
    fill: !0,
    stroke: !0,
    strokePercent: !0,
    fillOpacity: !0,
    strokeOpacity: !0,
    lineDashOffset: !0,
    lineWidth: !0,
    miterLimit: !0
  }, Gx.style)
}, mT = rs.concat([
  "invisible",
  "culling",
  "z",
  "z2",
  "zlevel",
  "parent"
]), ot = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.update = function() {
    var n = this;
    t.prototype.update.call(this);
    var r = this.style;
    if (r.decal) {
      var i = this._decalEl = this._decalEl || new e();
      i.buildPath === e.prototype.buildPath && (i.buildPath = function(l) {
        n.buildPath(l, n.shape);
      }), i.silent = !0;
      var a = i.style;
      for (var o in r)
        a[o] !== r[o] && (a[o] = r[o]);
      a.fill = r.fill ? r.decal : null, a.decal = null, a.shadowColor = null, r.strokeFirst && (a.stroke = null);
      for (var s = 0; s < mT.length; ++s)
        i[mT[s]] = this[mT[s]];
      i.__dirty |= ki;
    } else this._decalEl && (this._decalEl = null);
  }, e.prototype.getDecalElement = function() {
    return this._decalEl;
  }, e.prototype._init = function(n) {
    var r = st(n);
    this.shape = this.getDefaultShape();
    var i = this.getDefaultStyle();
    i && this.useStyle(i);
    for (var a = 0; a < r.length; a++) {
      var o = r[a], s = n[o];
      o === "style" ? this.style ? le(this.style, s) : this.useStyle(s) : o === "shape" ? le(this.shape, s) : t.prototype.attrKV.call(this, o, s);
    }
    this.style || this.useStyle({});
  }, e.prototype.getDefaultStyle = function() {
    return null;
  }, e.prototype.getDefaultShape = function() {
    return {};
  }, e.prototype.canBeInsideText = function() {
    return this.hasFill();
  }, e.prototype.getInsideTextFill = function() {
    var n = this.style.fill;
    if (n !== "none") {
      if (Oe(n)) {
        var r = Om(n, 0);
        return r > 0.5 ? OA : r > 0.2 ? bDe : SA;
      } else if (n)
        return SA;
    }
    return OA;
  }, e.prototype.getInsideTextStroke = function(n) {
    var r = this.style.fill;
    if (Oe(r)) {
      var i = this.__zr, a = !!(i && i.isDarkMode()), o = Om(n, 0) < _A;
      if (a === o)
        return r;
    }
  }, e.prototype.buildPath = function(n, r, i) {
  }, e.prototype.pathUpdated = function() {
    this.__dirty &= ~$d;
  }, e.prototype.getUpdatedPathProxy = function(n) {
    return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, n), this.path;
  }, e.prototype.createPathProxy = function() {
    this.path = new as(!1);
  }, e.prototype.hasStroke = function() {
    var n = this.style, r = n.stroke;
    return !(r == null || r === "none" || !(n.lineWidth > 0));
  }, e.prototype.hasFill = function() {
    var n = this.style, r = n.fill;
    return r != null && r !== "none";
  }, e.prototype.getBoundingRect = function() {
    var n = this._rect, r = this.style, i = !n;
    if (i) {
      var a = !1;
      this.path || (a = !0, this.createPathProxy());
      var o = this.path;
      (a || this.__dirty & $d) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), n = o.getBoundingRect();
    }
    if (this._rect = n, this.hasStroke() && this.path && this.path.len() > 0) {
      var s = this._rectStroke || (this._rectStroke = n.clone());
      if (this.__dirty || i) {
        s.copy(n);
        var l = r.strokeNoScale ? this.getLineScale() : 1, u = r.lineWidth;
        if (!this.hasFill()) {
          var c = this.strokeContainThreshold;
          u = Math.max(u, c ?? 4);
        }
        l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
      }
      return s;
    }
    return n;
  }, e.prototype.contain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect(), o = this.style;
    if (n = i[0], r = i[1], a.contain(n, r)) {
      var s = this.path;
      if (this.hasStroke()) {
        var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
        if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), BRe(s, l / u, n, r)))
          return !0;
      }
      if (this.hasFill())
        return NRe(s, n, r);
    }
    return !1;
  }, e.prototype.dirtyShape = function() {
    this.__dirty |= $d, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
  }, e.prototype.dirty = function() {
    this.dirtyStyle(), this.dirtyShape();
  }, e.prototype.animateShape = function(n) {
    return this.animate("shape", n);
  }, e.prototype.updateDuringAnimation = function(n) {
    n === "style" ? this.dirtyStyle() : n === "shape" ? this.dirtyShape() : this.markRedraw();
  }, e.prototype.attrKV = function(n, r) {
    n === "shape" ? this.setShape(r) : t.prototype.attrKV.call(this, n, r);
  }, e.prototype.setShape = function(n, r) {
    var i = this.shape;
    return i || (i = this.shape = {}), typeof n == "string" ? i[n] = r : le(i, n), this.dirtyShape(), this;
  }, e.prototype.shapeChanged = function() {
    return !!(this.__dirty & $d);
  }, e.prototype.createStyle = function(n) {
    return I0(aO, n);
  }, e.prototype._innerSaveToNormal = function(n) {
    t.prototype._innerSaveToNormal.call(this, n);
    var r = this._normalState;
    n.shape && !r.shape && (r.shape = le({}, this.shape));
  }, e.prototype._applyStateObj = function(n, r, i, a, o, s) {
    t.prototype._applyStateObj.call(this, n, r, i, a, o, s);
    var l = !(r && a), u;
    if (r && r.shape ? o ? a ? u = r.shape : (u = le({}, i.shape), le(u, r.shape)) : (u = le({}, a ? this.shape : i.shape), le(u, r.shape)) : l && (u = i.shape), u)
      if (o) {
        this.shape = le({}, this.shape);
        for (var c = {}, f = st(u), d = 0; d < f.length; d++) {
          var h = f[d];
          typeof u[h] == "object" ? this.shape[h] = u[h] : c[h] = u[h];
        }
        this._transitionState(n, {
          shape: c
        }, s);
      } else
        this.shape = u, this.dirtyShape();
  }, e.prototype._mergeStates = function(n) {
    for (var r = t.prototype._mergeStates.call(this, n), i, a = 0; a < n.length; a++) {
      var o = n[a];
      o.shape && (i = i || {}, this._mergeStyle(i, o.shape));
    }
    return i && (r.shape = i), r;
  }, e.prototype.getAnimationStyleProps = function() {
    return zRe;
  }, e.prototype.isZeroArea = function() {
    return !1;
  }, e.extend = function(n) {
    var r = function(a) {
      q(o, a);
      function o(s) {
        var l = a.call(this, s) || this;
        return n.init && n.init.call(l, s), l;
      }
      return o.prototype.getDefaultStyle = function() {
        return Le(n.style);
      }, o.prototype.getDefaultShape = function() {
        return Le(n.shape);
      }, o;
    }(e);
    for (var i in n)
      typeof n[i] == "function" && (r.prototype[i] = n[i]);
    return r;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.type = "path", n.strokeContainThreshold = 5, n.segmentIgnoreThreshold = 0, n.subPixelOptimize = !1, n.autoBatch = !1, n.__dirty = ki | Vv | $d;
  }(), e;
}(Ma), VRe = Re({
  strokeFirst: !0,
  font: iu,
  x: 0,
  y: 0,
  textAlign: "left",
  textBaseline: "top",
  miterLimit: 2
}, aO), Bh = function(t) {
  q(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.hasStroke = function() {
    var n = this.style, r = n.stroke;
    return r != null && r !== "none" && n.lineWidth > 0;
  }, e.prototype.hasFill = function() {
    var n = this.style, r = n.fill;
    return r != null && r !== "none";
  }, e.prototype.createStyle = function(n) {
    return I0(VRe, n);
  }, e.prototype.setBoundingRect = function(n) {
    this._rect = n;
  }, e.prototype.getBoundingRect = function() {
    var n = this.style;
    if (!this._rect) {
      var r = n.text;
      r != null ? r += "" : r = "";
      var i = k0(r, n.font, n.textAlign, n.textBaseline);
      if (i.x += n.x || 0, i.y += n.y || 0, this.hasStroke()) {
        var a = n.lineWidth;
        i.x -= a / 2, i.y -= a / 2, i.width += a, i.height += a;
      }
      this._rect = i;
    }
    return this._rect;
  }, e.initDefaultProps = function() {
    var n = e.prototype;
    n.dirtyRectTolerance = 10;
  }(), e;
}(Ma);
Bh.prototype.type = "tspan";
var FRe = Re({
  x: 0,
  y: 0
}, Kc), WRe = {
  style: Re({
    x: !0,
    y: !0,
    width: !0,
    height: !0,
    sx: !0,
    sy: !0,
    sWidth: !0,
    sHeight: !0
  }, Gx.style)
};
function QRe(t) {
  return !!(t && typeof t != "string" && t.width && t.height);
}
var CK = function(t) {
  q(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.createStyle = function(n) {
    return I0(FRe, n);
  }, e.prototype._getSize = function(n) {
    var r = this.style, i = r[n];
    if (i != null)
      return i;
    var a = QRe(r.image) ? r.image : this.__image;
    if (!a)
      return 0;
    var o = n === "width" ? "height" : "width", s = r[o];
    return s == null ? a[n] : a[n] / a[o] * s;
  }, e.prototype.getWidth = function() {
    return this._getSize("width");
  }, e.prototype.getHeight = function() {
    return this._getSize("height");
  }, e.prototype.getAnimationStyleProps = function() {
    return WRe;
  }, e.prototype.getBoundingRect = function() {
    var n = this.style;
    return this._rect || (this._rect = new Je(n.x || 0, n.y || 0, this.getWidth(), this.getHeight())), this._rect;
  }, e;
}(Ma);
CK.prototype.type = "image";
const lr = CK;
function HRe(t, e) {
  var n = e.x, r = e.y, i = e.width, a = e.height, o = e.r, s, l, u, c;
  i < 0 && (n = n + i, i = -i), a < 0 && (r = r + a, a = -a), typeof o == "number" ? s = l = u = c = o : o instanceof Array ? o.length === 1 ? s = l = u = c = o[0] : o.length === 2 ? (s = u = o[0], l = c = o[1]) : o.length === 3 ? (s = o[0], l = c = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], c = o[3]) : s = l = u = c = 0;
  var f;
  s + l > i && (f = s + l, s *= i / f, l *= i / f), u + c > i && (f = u + c, u *= i / f, c *= i / f), l + u > a && (f = l + u, l *= a / f, u *= a / f), s + c > a && (f = s + c, s *= a / f, c *= a / f), t.moveTo(n + s, r), t.lineTo(n + i - l, r), l !== 0 && t.arc(n + i - l, r + l, l, -Math.PI / 2, 0), t.lineTo(n + i, r + a - u), u !== 0 && t.arc(n + i - u, r + a - u, u, 0, Math.PI / 2), t.lineTo(n + c, r + a), c !== 0 && t.arc(n + c, r + a - c, c, Math.PI / 2, Math.PI), t.lineTo(n, r + s), s !== 0 && t.arc(n + s, r + s, s, Math.PI, Math.PI * 1.5);
}
var Vd = Math.round;
function TK(t, e, n) {
  if (e) {
    var r = e.x1, i = e.x2, a = e.y1, o = e.y2;
    t.x1 = r, t.x2 = i, t.y1 = a, t.y2 = o;
    var s = n && n.lineWidth;
    return s && (Vd(r * 2) === Vd(i * 2) && (t.x1 = t.x2 = kc(r, s, !0)), Vd(a * 2) === Vd(o * 2) && (t.y1 = t.y2 = kc(a, s, !0))), t;
  }
}
function PK(t, e, n) {
  if (e) {
    var r = e.x, i = e.y, a = e.width, o = e.height;
    t.x = r, t.y = i, t.width = a, t.height = o;
    var s = n && n.lineWidth;
    return s && (t.x = kc(r, s, !0), t.y = kc(i, s, !0), t.width = Math.max(kc(r + a, s, !1) - t.x, a === 0 ? 0 : 1), t.height = Math.max(kc(i + o, s, !1) - t.y, o === 0 ? 0 : 1)), t;
  }
}
function kc(t, e, n) {
  if (!e)
    return t;
  var r = Vd(t * 2);
  return (r + Vd(e)) % 2 === 0 ? r / 2 : (r + (n ? 1 : -1)) / 2;
}
var GRe = /* @__PURE__ */ function() {
  function t() {
    this.x = 0, this.y = 0, this.width = 0, this.height = 0;
  }
  return t;
}(), jRe = {}, $K = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new GRe();
  }, e.prototype.buildPath = function(n, r) {
    var i, a, o, s;
    if (this.subPixelOptimize) {
      var l = PK(jRe, r, this.style);
      i = l.x, a = l.y, o = l.width, s = l.height, l.r = r.r, r = l;
    } else
      i = r.x, a = r.y, o = r.width, s = r.height;
    r.r ? HRe(n, r) : n.rect(i, a, o, s);
  }, e.prototype.isZeroArea = function() {
    return !this.shape.width || !this.shape.height;
  }, e;
}(ot);
$K.prototype.type = "rect";
const mt = $K;
var mB = {
  fill: "#000"
}, yB = 2, ZRe = {
  style: Re({
    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
  }, Gx.style)
}, AK = function(t) {
  q(e, t);
  function e(n) {
    var r = t.call(this) || this;
    return r.type = "text", r._children = [], r._defaultStyle = mB, r.attr(n), r;
  }
  return e.prototype.childrenRef = function() {
    return this._children;
  }, e.prototype.update = function() {
    t.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
    for (var n = 0; n < this._children.length; n++) {
      var r = this._children[n];
      r.zlevel = this.zlevel, r.z = this.z, r.z2 = this.z2, r.culling = this.culling, r.cursor = this.cursor, r.invisible = this.invisible;
    }
  }, e.prototype.updateTransform = function() {
    var n = this.innerTransformable;
    n ? (n.updateTransform(), n.transform && (this.transform = n.transform)) : t.prototype.updateTransform.call(this);
  }, e.prototype.getLocalTransform = function(n) {
    var r = this.innerTransformable;
    return r ? r.getLocalTransform(n) : t.prototype.getLocalTransform.call(this, n);
  }, e.prototype.getComputedTransform = function() {
    return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), t.prototype.getComputedTransform.call(this);
  }, e.prototype._updateSubTexts = function() {
    this._childCursor = 0, YRe(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
  }, e.prototype.addSelfToZr = function(n) {
    t.prototype.addSelfToZr.call(this, n);
    for (var r = 0; r < this._children.length; r++)
      this._children[r].__zr = n;
  }, e.prototype.removeSelfFromZr = function(n) {
    t.prototype.removeSelfFromZr.call(this, n);
    for (var r = 0; r < this._children.length; r++)
      this._children[r].__zr = null;
  }, e.prototype.getBoundingRect = function() {
    if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
      for (var n = new Je(0, 0, 0, 0), r = this._children, i = [], a = null, o = 0; o < r.length; o++) {
        var s = r[o], l = s.getBoundingRect(), u = s.getLocalTransform(i);
        u ? (n.copy(l), n.applyTransform(u), a = a || n.clone(), a.union(n)) : (a = a || l.clone(), a.union(l));
      }
      this._rect = a || n;
    }
    return this._rect;
  }, e.prototype.setDefaultTextStyle = function(n) {
    this._defaultStyle = n || mB;
  }, e.prototype.setTextContent = function(n) {
    if (process.env.NODE_ENV !== "production")
      throw new Error("Can't attach text on another text");
  }, e.prototype._mergeStyle = function(n, r) {
    if (!r)
      return n;
    var i = r.rich, a = n.rich || i && {};
    return le(n, r), i && a ? (this._mergeRich(a, i), n.rich = a) : a && (n.rich = a), n;
  }, e.prototype._mergeRich = function(n, r) {
    for (var i = st(r), a = 0; a < i.length; a++) {
      var o = i[a];
      n[o] = n[o] || {}, le(n[o], r[o]);
    }
  }, e.prototype.getAnimationStyleProps = function() {
    return ZRe;
  }, e.prototype._getOrCreateChild = function(n) {
    var r = this._children[this._childCursor];
    return (!r || !(r instanceof n)) && (r = new n()), this._children[this._childCursor++] = r, r.__zr = this.__zr, r.parent = this, r;
  }, e.prototype._updatePlainTexts = function() {
    var n = this.style, r = n.font || iu, i = n.padding, a = CB(n), o = gRe(a, n), s = yT(n), l = !!n.backgroundColor, u = o.outerHeight, c = o.outerWidth, f = o.contentWidth, d = o.lines, h = o.lineHeight, p = this._defaultStyle, v = n.x || 0, g = n.y || 0, m = n.align || p.align || "left", y = n.verticalAlign || p.verticalAlign || "top", b = v, _ = Ad(g, o.contentHeight, y);
    if (s || i) {
      var O = Wv(v, c, m), S = Ad(g, u, y);
      s && this._renderBackground(n, n, O, S, c, u);
    }
    _ += h / 2, i && (b = wB(v, m, i), y === "top" ? _ += i[0] : y === "bottom" && (_ -= i[2]));
    for (var x = 0, C = !1, T = xB("fill" in n ? n.fill : (C = !0, p.fill)), w = SB("stroke" in n ? n.stroke : !l && (!p.autoStroke || C) ? (x = yB, p.stroke) : null), P = n.textShadowBlur > 0, $ = n.width != null && (n.overflow === "truncate" || n.overflow === "break" || n.overflow === "breakAll"), A = o.calculatedLineHeight, D = 0; D < d.length; D++) {
      var E = this._getOrCreateChild(Bh), R = E.createStyle();
      E.useStyle(R), R.text = d[D], R.x = b, R.y = _, m && (R.textAlign = m), R.textBaseline = "middle", R.opacity = n.opacity, R.strokeFirst = !0, P && (R.shadowBlur = n.textShadowBlur || 0, R.shadowColor = n.textShadowColor || "transparent", R.shadowOffsetX = n.textShadowOffsetX || 0, R.shadowOffsetY = n.textShadowOffsetY || 0), R.stroke = w, R.fill = T, w && (R.lineWidth = n.lineWidth || x, R.lineDash = n.lineDash, R.lineDashOffset = n.lineDashOffset || 0), R.font = r, _B(R, n), _ += h, $ && E.setBoundingRect(new Je(Wv(R.x, n.width, R.textAlign), Ad(R.y, A, R.textBaseline), f, A));
    }
  }, e.prototype._updateRichTexts = function() {
    var n = this.style, r = CB(n), i = bRe(r, n), a = i.width, o = i.outerWidth, s = i.outerHeight, l = n.padding, u = n.x || 0, c = n.y || 0, f = this._defaultStyle, d = n.align || f.align, h = n.verticalAlign || f.verticalAlign, p = Wv(u, o, d), v = Ad(c, s, h), g = p, m = v;
    l && (g += l[3], m += l[0]);
    var y = g + a;
    yT(n) && this._renderBackground(n, n, p, v, o, s);
    for (var b = !!n.backgroundColor, _ = 0; _ < i.lines.length; _++) {
      for (var O = i.lines[_], S = O.tokens, x = S.length, C = O.lineHeight, T = O.width, w = 0, P = g, $ = y, A = x - 1, D = void 0; w < x && (D = S[w], !D.align || D.align === "left"); )
        this._placeToken(D, n, C, m, P, "left", b), T -= D.width, P += D.width, w++;
      for (; A >= 0 && (D = S[A], D.align === "right"); )
        this._placeToken(D, n, C, m, $, "right", b), T -= D.width, $ -= D.width, A--;
      for (P += (a - (P - g) - (y - $) - T) / 2; w <= A; )
        D = S[w], this._placeToken(D, n, C, m, P + D.width / 2, "center", b), P += D.width, w++;
      m += C;
    }
  }, e.prototype._placeToken = function(n, r, i, a, o, s, l) {
    var u = r.rich[n.styleName] || {};
    u.text = n.text;
    var c = n.verticalAlign, f = a + i / 2;
    c === "top" ? f = a + n.height / 2 : c === "bottom" && (f = a + i - n.height / 2);
    var d = !n.isLineHolder && yT(u);
    d && this._renderBackground(u, r, s === "right" ? o - n.width : s === "center" ? o - n.width / 2 : o, f - n.height / 2, n.width, n.height);
    var h = !!u.backgroundColor, p = n.textPadding;
    p && (o = wB(o, s, p), f -= n.height / 2 - p[0] - n.innerHeight / 2);
    var v = this._getOrCreateChild(Bh), g = v.createStyle();
    v.useStyle(g);
    var m = this._defaultStyle, y = !1, b = 0, _ = xB("fill" in u ? u.fill : "fill" in r ? r.fill : (y = !0, m.fill)), O = SB("stroke" in u ? u.stroke : "stroke" in r ? r.stroke : !h && !l && (!m.autoStroke || y) ? (b = yB, m.stroke) : null), S = u.textShadowBlur > 0 || r.textShadowBlur > 0;
    g.text = n.text, g.x = o, g.y = f, S && (g.shadowBlur = u.textShadowBlur || r.textShadowBlur || 0, g.shadowColor = u.textShadowColor || r.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || r.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || r.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = n.font || iu, g.opacity = ji(u.opacity, r.opacity, 1), _B(g, u), O && (g.lineWidth = ji(u.lineWidth, r.lineWidth, b), g.lineDash = We(u.lineDash, r.lineDash), g.lineDashOffset = r.lineDashOffset || 0, g.stroke = O), _ && (g.fill = _);
    var x = n.contentWidth, C = n.contentHeight;
    v.setBoundingRect(new Je(Wv(g.x, x, g.textAlign), Ad(g.y, C, g.textBaseline), x, C));
  }, e.prototype._renderBackground = function(n, r, i, a, o, s) {
    var l = n.backgroundColor, u = n.borderWidth, c = n.borderColor, f = l && l.image, d = l && !f, h = n.borderRadius, p = this, v, g;
    if (d || n.lineHeight || u && c) {
      v = this._getOrCreateChild(mt), v.useStyle(v.createStyle()), v.style.fill = null;
      var m = v.shape;
      m.x = i, m.y = a, m.width = o, m.height = s, m.r = h, v.dirtyShape();
    }
    if (d) {
      var y = v.style;
      y.fill = l || null, y.fillOpacity = We(n.fillOpacity, 1);
    } else if (f) {
      g = this._getOrCreateChild(lr), g.onload = function() {
        p.dirtyStyle();
      };
      var b = g.style;
      b.image = l.image, b.x = i, b.y = a, b.width = o, b.height = s;
    }
    if (u && c) {
      var y = v.style;
      y.lineWidth = u, y.stroke = c, y.strokeOpacity = We(n.strokeOpacity, 1), y.lineDash = n.borderDash, y.lineDashOffset = n.borderDashOffset || 0, v.strokeContainThreshold = 0, v.hasFill() && v.hasStroke() && (y.strokeFirst = !0, y.lineWidth *= 2);
    }
    var _ = (v || g).style;
    _.shadowBlur = n.shadowBlur || 0, _.shadowColor = n.shadowColor || "transparent", _.shadowOffsetX = n.shadowOffsetX || 0, _.shadowOffsetY = n.shadowOffsetY || 0, _.opacity = ji(n.opacity, r.opacity, 1);
  }, e.makeFont = function(n) {
    var r = "";
    return MK(n) && (r = [
      n.fontStyle,
      n.fontWeight,
      EK(n.fontSize),
      n.fontFamily || "sans-serif"
    ].join(" ")), r && ma(r) || n.textFont || n.font;
  }, e;
}(Ma), URe = { left: !0, right: 1, center: 1 }, XRe = { top: 1, bottom: 1, middle: 1 }, bB = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
function EK(t) {
  return typeof t == "string" && (t.indexOf("px") !== -1 || t.indexOf("rem") !== -1 || t.indexOf("em") !== -1) ? t : isNaN(+t) ? hR + "px" : t + "px";
}
function _B(t, e) {
  for (var n = 0; n < bB.length; n++) {
    var r = bB[n], i = e[r];
    i != null && (t[r] = i);
  }
}
function MK(t) {
  return t.fontSize != null || t.fontFamily || t.fontWeight;
}
function YRe(t) {
  return OB(t), k(t.rich, OB), t;
}
function OB(t) {
  if (t) {
    t.font = AK.makeFont(t);
    var e = t.align;
    e === "middle" && (e = "center"), t.align = e == null || URe[e] ? e : "left";
    var n = t.verticalAlign;
    n === "center" && (n = "middle"), t.verticalAlign = n == null || XRe[n] ? n : "top";
    var r = t.padding;
    r && (t.padding = kx(t.padding));
  }
}
function SB(t, e) {
  return t == null || e <= 0 || t === "transparent" || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
}
function xB(t) {
  return t == null || t === "none" ? null : t.image || t.colorStops ? "#000" : t;
}
function wB(t, e, n) {
  return e === "right" ? t - n[1] : e === "center" ? t + n[3] / 2 - n[1] / 2 : t + n[3];
}
function CB(t) {
  var e = t.text;
  return e != null && (e += ""), e;
}
function yT(t) {
  return !!(t.backgroundColor || t.lineHeight || t.borderWidth && t.borderColor);
}
const gt = AK;
var Fe = bt(), MA = function(t, e, n, r) {
  if (r) {
    var i = Fe(r);
    i.dataIndex = n, i.dataType = e, i.seriesIndex = t, i.ssrType = "chart", r.type === "group" && r.traverse(function(a) {
      var o = Fe(a);
      o.seriesIndex = t, o.dataIndex = n, o.dataType = e, o.ssrType = "chart";
    });
  }
}, TB = 1, PB = {}, IK = bt(), RR = bt(), kR = 0, B0 = 1, Zx = 2, ni = ["emphasis", "blur", "select"], xm = ["normal", "emphasis", "blur", "select"], dp = 10, qRe = 9, Jc = "highlight", V_ = "downplay", Ag = "select", F_ = "unselect", Eg = "toggleSelect";
function id(t) {
  return t != null && t !== "none";
}
function Ux(t, e, n) {
  t.onHoverStateChange && (t.hoverState || 0) !== n && t.onHoverStateChange(e), t.hoverState = n;
}
function DK(t) {
  Ux(t, "emphasis", Zx);
}
function RK(t) {
  t.hoverState === Zx && Ux(t, "normal", kR);
}
function LR(t) {
  Ux(t, "blur", B0);
}
function kK(t) {
  t.hoverState === B0 && Ux(t, "normal", kR);
}
function KRe(t) {
  t.selected = !0;
}
function JRe(t) {
  t.selected = !1;
}
function $B(t, e, n) {
  e(t, n);
}
function sl(t, e, n) {
  $B(t, e, n), t.isGroup && t.traverse(function(r) {
    $B(r, e, n);
  });
}
function oO(t, e) {
  switch (e) {
    case "emphasis":
      t.hoverState = Zx;
      break;
    case "normal":
      t.hoverState = kR;
      break;
    case "blur":
      t.hoverState = B0;
      break;
    case "select":
      t.selected = !0;
  }
}
function eke(t, e, n, r) {
  for (var i = t.style, a = {}, o = 0; o < e.length; o++) {
    var s = e[o], l = i[s];
    a[s] = l ?? (r && r[s]);
  }
  for (var o = 0; o < t.animators.length; o++) {
    var u = t.animators[o];
    u.__fromStateTransition && u.__fromStateTransition.indexOf(n) < 0 && u.targetName === "style" && u.saveTo(a, e);
  }
  return a;
}
function tke(t, e, n, r) {
  var i = n && et(n, "select") >= 0, a = !1;
  if (t instanceof ot) {
    var o = IK(t), s = i && o.selectFill || o.normalFill, l = i && o.selectStroke || o.normalStroke;
    if (id(s) || id(l)) {
      r = r || {};
      var u = r.style || {};
      u.fill === "inherit" ? (a = !0, r = le({}, r), u = le({}, u), u.fill = s) : !id(u.fill) && id(s) ? (a = !0, r = le({}, r), u = le({}, u), u.fill = eO(s)) : !id(u.stroke) && id(l) && (a || (r = le({}, r), u = le({}, u)), u.stroke = eO(l)), r.style = u;
    }
  }
  if (r && r.z2 == null) {
    a || (r = le({}, r));
    var c = t.z2EmphasisLift;
    r.z2 = t.z2 + (c ?? dp);
  }
  return r;
}
function nke(t, e, n) {
  if (n && n.z2 == null) {
    n = le({}, n);
    var r = t.z2SelectLift;
    n.z2 = t.z2 + (r ?? qRe);
  }
  return n;
}
function rke(t, e, n) {
  var r = et(t.currentStates, e) >= 0, i = t.style.opacity, a = r ? null : eke(t, ["opacity"], e, {
    opacity: 1
  });
  n = n || {};
  var o = n.style || {};
  return o.opacity == null && (n = le({}, n), o = le({
    // Already being applied 'emphasis'. DON'T mul opacity multiple times.
    opacity: r ? i : a.opacity * 0.1
  }, o), n.style = o), n;
}
function bT(t, e) {
  var n = this.states[t];
  if (this.style) {
    if (t === "emphasis")
      return tke(this, t, e, n);
    if (t === "blur")
      return rke(this, t, n);
    if (t === "select")
      return nke(this, t, n);
  }
  return n;
}
function bf(t) {
  t.stateProxy = bT;
  var e = t.getTextContent(), n = t.getTextGuideLine();
  e && (e.stateProxy = bT), n && (n.stateProxy = bT);
}
function AB(t, e) {
  !zK(t, e) && !t.__highByOuter && sl(t, DK);
}
function EB(t, e) {
  !zK(t, e) && !t.__highByOuter && sl(t, RK);
}
function js(t, e) {
  t.__highByOuter |= 1 << (e || 0), sl(t, DK);
}
function Zs(t, e) {
  !(t.__highByOuter &= ~(1 << (e || 0))) && sl(t, RK);
}
function LK(t) {
  sl(t, LR);
}
function NR(t) {
  sl(t, kK);
}
function NK(t) {
  sl(t, KRe);
}
function BK(t) {
  sl(t, JRe);
}
function zK(t, e) {
  return t.__highDownSilentOnTouch && e.zrByTouch;
}
function VK(t) {
  var e = t.getModel(), n = [], r = [];
  e.eachComponent(function(i, a) {
    var o = RR(a), s = i === "series", l = s ? t.getViewOfSeriesModel(a) : t.getViewOfComponentModel(a);
    !s && r.push(l), o.isBlured && (l.group.traverse(function(u) {
      kK(u);
    }), s && n.push(a)), o.isBlured = !1;
  }), k(r, function(i) {
    i && i.toggleBlurSeries && i.toggleBlurSeries(n, !1, e);
  });
}
function IA(t, e, n, r) {
  var i = r.getModel();
  n = n || "coordinateSystem";
  function a(u, c) {
    for (var f = 0; f < c.length; f++) {
      var d = u.getItemGraphicEl(c[f]);
      d && NR(d);
    }
  }
  if (t != null && !(!e || e === "none")) {
    var o = i.getSeriesByIndex(t), s = o.coordinateSystem;
    s && s.master && (s = s.master);
    var l = [];
    i.eachSeries(function(u) {
      var c = o === u, f = u.coordinateSystem;
      f && f.master && (f = f.master);
      var d = f && s ? f === s : c;
      if (!// Not blur other series if blurScope series
      (n === "series" && !c || n === "coordinateSystem" && !d || e === "series" && c)) {
        var h = r.getViewOfSeriesModel(u);
        if (h.group.traverse(function(g) {
          g.__highByOuter && c && e === "self" || LR(g);
        }), wr(e))
          a(u.getData(), e);
        else if (Ie(e))
          for (var p = st(e), v = 0; v < p.length; v++)
            a(u.getData(p[v]), e[p[v]]);
        l.push(u), RR(u).isBlured = !0;
      }
    }), i.eachComponent(function(u, c) {
      if (u !== "series") {
        var f = r.getViewOfComponentModel(c);
        f && f.toggleBlurSeries && f.toggleBlurSeries(l, !0, i);
      }
    });
  }
}
function DA(t, e, n) {
  if (!(t == null || e == null)) {
    var r = n.getModel().getComponent(t, e);
    if (r) {
      RR(r).isBlured = !0;
      var i = n.getViewOfComponentModel(r);
      !i || !i.focusBlurEnabled || i.group.traverse(function(a) {
        LR(a);
      });
    }
  }
}
function ike(t, e, n) {
  var r = t.seriesIndex, i = t.getData(e.dataType);
  if (!i) {
    process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + e.dataType);
    return;
  }
  var a = mf(i, e);
  a = (ue(a) ? a[0] : a) || 0;
  var o = i.getItemGraphicEl(a);
  if (!o)
    for (var s = i.count(), l = 0; !o && l < s; )
      o = i.getItemGraphicEl(l++);
  if (o) {
    var u = Fe(o);
    IA(r, u.focus, u.blurScope, n);
  } else {
    var c = t.get(["emphasis", "focus"]), f = t.get(["emphasis", "blurScope"]);
    c != null && IA(r, c, f, n);
  }
}
function BR(t, e, n, r) {
  var i = {
    focusSelf: !1,
    dispatchers: null
  };
  if (t == null || t === "series" || e == null || n == null)
    return i;
  var a = r.getModel().getComponent(t, e);
  if (!a)
    return i;
  var o = r.getViewOfComponentModel(a);
  if (!o || !o.findHighDownDispatchers)
    return i;
  for (var s = o.findHighDownDispatchers(n), l, u = 0; u < s.length; u++)
    if (process.env.NODE_ENV !== "production" && !lu(s[u]) && Cr("param should be highDownDispatcher"), Fe(s[u]).focus === "self") {
      l = !0;
      break;
    }
  return {
    focusSelf: l,
    dispatchers: s
  };
}
function ake(t, e, n) {
  process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher");
  var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n), a = i.dispatchers, o = i.focusSelf;
  a ? (o && DA(r.componentMainType, r.componentIndex, n), k(a, function(s) {
    return AB(s, e);
  })) : (IA(r.seriesIndex, r.focus, r.blurScope, n), r.focus === "self" && DA(r.componentMainType, r.componentIndex, n), AB(t, e));
}
function oke(t, e, n) {
  process.env.NODE_ENV !== "production" && !lu(t) && Cr("param should be highDownDispatcher"), VK(n);
  var r = Fe(t), i = BR(r.componentMainType, r.componentIndex, r.componentHighDownName, n).dispatchers;
  i ? k(i, function(a) {
    return EB(a, e);
  }) : EB(t, e);
}
function ske(t, e, n) {
  if (kA(e)) {
    var r = e.dataType, i = t.getData(r), a = mf(i, e);
    ue(a) || (a = [a]), t[e.type === Eg ? "toggleSelect" : e.type === Ag ? "select" : "unselect"](a, r);
  }
}
function MB(t) {
  var e = t.getAllData();
  k(e, function(n) {
    var r = n.data, i = n.type;
    r.eachItemGraphicEl(function(a, o) {
      t.isSelected(o, i) ? NK(a) : BK(a);
    });
  });
}
function lke(t) {
  var e = [];
  return t.eachSeries(function(n) {
    var r = n.getAllData();
    k(r, function(i) {
      i.data;
      var a = i.type, o = n.getSelectedDataIndices();
      if (o.length > 0) {
        var s = {
          dataIndex: o,
          seriesIndex: n.seriesIndex
        };
        a != null && (s.dataType = a), e.push(s);
      }
    });
  }), e;
}
function Yl(t, e, n) {
  Lc(t, !0), sl(t, bf), RA(t, e, n);
}
function uke(t) {
  Lc(t, !1);
}
function bn(t, e, n, r) {
  r ? uke(t) : Yl(t, e, n);
}
function RA(t, e, n) {
  var r = Fe(t);
  e != null ? (r.focus = e, r.blurScope = n) : r.focus && (r.focus = null);
}
var IB = ["emphasis", "blur", "select"], cke = {
  itemStyle: "getItemStyle",
  lineStyle: "getLineStyle",
  areaStyle: "getAreaStyle"
};
function Tr(t, e, n, r) {
  n = n || "itemStyle";
  for (var i = 0; i < IB.length; i++) {
    var a = IB[i], o = e.getModel([a, n]), s = t.ensureState(a);
    s.style = r ? r(o) : o[cke[n]]();
  }
}
function Lc(t, e) {
  var n = e === !1, r = t;
  t.highDownSilentOnTouch && (r.__highDownSilentOnTouch = t.highDownSilentOnTouch), (!n || r.__highDownDispatcher) && (r.__highByOuter = r.__highByOuter || 0, r.__highDownDispatcher = !n);
}
function lu(t) {
  return !!(t && t.__highDownDispatcher);
}
function fke(t, e, n) {
  var r = Fe(t);
  r.componentMainType = e.mainType, r.componentIndex = e.componentIndex, r.componentHighDownName = n;
}
function dke(t) {
  var e = PB[t];
  return e == null && TB <= 32 && (e = PB[t] = TB++), e;
}
function kA(t) {
  var e = t.type;
  return e === Ag || e === F_ || e === Eg;
}
function DB(t) {
  var e = t.type;
  return e === Jc || e === V_;
}
function hke(t) {
  var e = IK(t);
  e.normalFill = t.style.fill, e.normalStroke = t.style.stroke;
  var n = t.states.select || {};
  e.selectFill = n.style && n.style.fill || null, e.selectStroke = n.style && n.style.stroke || null;
}
var ad = as.CMD, pke = [[], [], []], RB = Math.sqrt, vke = Math.atan2;
function FK(t, e) {
  if (e) {
    var n = t.data, r = t.len(), i, a, o, s, l, u, c = ad.M, f = ad.C, d = ad.L, h = ad.R, p = ad.A, v = ad.Q;
    for (o = 0, s = 0; o < r; ) {
      switch (i = n[o++], s = o, a = 0, i) {
        case c:
          a = 1;
          break;
        case d:
          a = 1;
          break;
        case f:
          a = 3;
          break;
        case v:
          a = 2;
          break;
        case p:
          var g = e[4], m = e[5], y = RB(e[0] * e[0] + e[1] * e[1]), b = RB(e[2] * e[2] + e[3] * e[3]), _ = vke(-e[1] / b, e[0] / y);
          n[o] *= y, n[o++] += g, n[o] *= b, n[o++] += m, n[o++] *= y, n[o++] *= b, n[o++] += _, n[o++] += _, o += 2, s = o;
          break;
        case h:
          u[0] = n[o++], u[1] = n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1], u[0] += n[o++], u[1] += n[o++], ar(u, u, e), n[s++] = u[0], n[s++] = u[1];
      }
      for (l = 0; l < a; l++) {
        var O = pke[l];
        O[0] = n[o++], O[1] = n[o++], ar(O, O, e), n[s++] = O[0], n[s++] = O[1];
      }
    }
    t.increaseVersion();
  }
}
var _T = Math.sqrt, Ky = Math.sin, Jy = Math.cos, iv = Math.PI;
function kB(t) {
  return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
}
function LA(t, e) {
  return (t[0] * e[0] + t[1] * e[1]) / (kB(t) * kB(e));
}
function LB(t, e) {
  return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(LA(t, e));
}
function NB(t, e, n, r, i, a, o, s, l, u, c) {
  var f = l * (iv / 180), d = Jy(f) * (t - n) / 2 + Ky(f) * (e - r) / 2, h = -1 * Ky(f) * (t - n) / 2 + Jy(f) * (e - r) / 2, p = d * d / (o * o) + h * h / (s * s);
  p > 1 && (o *= _T(p), s *= _T(p));
  var v = (i === a ? -1 : 1) * _T((o * o * (s * s) - o * o * (h * h) - s * s * (d * d)) / (o * o * (h * h) + s * s * (d * d))) || 0, g = v * o * h / s, m = v * -s * d / o, y = (t + n) / 2 + Jy(f) * g - Ky(f) * m, b = (e + r) / 2 + Ky(f) * g + Jy(f) * m, _ = LB([1, 0], [(d - g) / o, (h - m) / s]), O = [(d - g) / o, (h - m) / s], S = [(-1 * d - g) / o, (-1 * h - m) / s], x = LB(O, S);
  if (LA(O, S) <= -1 && (x = iv), LA(O, S) >= 1 && (x = 0), x < 0) {
    var C = Math.round(x / iv * 1e6) / 1e6;
    x = iv * 2 + C % 2 * iv;
  }
  c.addData(u, y, b, o, s, _, x, f, a);
}
var gke = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, mke = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function yke(t) {
  var e = new as();
  if (!t)
    return e;
  var n = 0, r = 0, i = n, a = r, o, s = as.CMD, l = t.match(gke);
  if (!l)
    return e;
  for (var u = 0; u < l.length; u++) {
    for (var c = l[u], f = c.charAt(0), d = void 0, h = c.match(mke) || [], p = h.length, v = 0; v < p; v++)
      h[v] = parseFloat(h[v]);
    for (var g = 0; g < p; ) {
      var m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = n, T = r, w = void 0, P = void 0;
      switch (f) {
        case "l":
          n += h[g++], r += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "L":
          n = h[g++], r = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "m":
          n += h[g++], r += h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "l";
          break;
        case "M":
          n = h[g++], r = h[g++], d = s.M, e.addData(d, n, r), i = n, a = r, f = "L";
          break;
        case "h":
          n += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "H":
          n = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "v":
          r += h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "V":
          r = h[g++], d = s.L, e.addData(d, n, r);
          break;
        case "C":
          d = s.C, e.addData(d, h[g++], h[g++], h[g++], h[g++], h[g++], h[g++]), n = h[g - 2], r = h[g - 1];
          break;
        case "c":
          d = s.C, e.addData(d, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r, h[g++] + n, h[g++] + r), n += h[g - 2], r += h[g - 1];
          break;
        case "S":
          m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = h[g++], T = h[g++], n = h[g++], r = h[g++], e.addData(d, m, y, C, T, n, r);
          break;
        case "s":
          m = n, y = r, w = e.len(), P = e.data, o === s.C && (m += n - P[w - 4], y += r - P[w - 3]), d = s.C, C = n + h[g++], T = r + h[g++], n += h[g++], r += h[g++], e.addData(d, m, y, C, T, n, r);
          break;
        case "Q":
          C = h[g++], T = h[g++], n = h[g++], r = h[g++], d = s.Q, e.addData(d, C, T, n, r);
          break;
        case "q":
          C = h[g++] + n, T = h[g++] + r, n += h[g++], r += h[g++], d = s.Q, e.addData(d, C, T, n, r);
          break;
        case "T":
          m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n = h[g++], r = h[g++], d = s.Q, e.addData(d, m, y, n, r);
          break;
        case "t":
          m = n, y = r, w = e.len(), P = e.data, o === s.Q && (m += n - P[w - 4], y += r - P[w - 3]), n += h[g++], r += h[g++], d = s.Q, e.addData(d, m, y, n, r);
          break;
        case "A":
          b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n = h[g++], r = h[g++], d = s.A, NB(C, T, n, r, S, x, b, _, O, d, e);
          break;
        case "a":
          b = h[g++], _ = h[g++], O = h[g++], S = h[g++], x = h[g++], C = n, T = r, n += h[g++], r += h[g++], d = s.A, NB(C, T, n, r, S, x, b, _, O, d, e);
          break;
      }
    }
    (f === "z" || f === "Z") && (d = s.Z, e.addData(d), n = i, r = a), o = d;
  }
  return e.toStatic(), e;
}
var WK = function(t) {
  q(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e.prototype.applyTransform = function(n) {
  }, e;
}(ot);
function QK(t) {
  return t.setData != null;
}
function HK(t, e) {
  var n = yke(t), r = le({}, e);
  return r.buildPath = function(i) {
    if (QK(i)) {
      i.setData(n.data);
      var a = i.getContext();
      a && i.rebuildPath(a, 1);
    } else {
      var a = i;
      n.rebuildPath(a, 1);
    }
  }, r.applyTransform = function(i) {
    FK(n, i), this.dirtyShape();
  }, r;
}
function GK(t, e) {
  return new WK(HK(t, e));
}
function bke(t, e) {
  var n = HK(t, e), r = function(i) {
    q(a, i);
    function a(o) {
      var s = i.call(this, o) || this;
      return s.applyTransform = n.applyTransform, s.buildPath = n.buildPath, s;
    }
    return a;
  }(WK);
  return r;
}
function _ke(t, e) {
  for (var n = [], r = t.length, i = 0; i < r; i++) {
    var a = t[i];
    n.push(a.getUpdatedPathProxy(!0));
  }
  var o = new ot(e);
  return o.createPathProxy(), o.buildPath = function(s) {
    if (QK(s)) {
      s.appendPath(n);
      var l = s.getContext();
      l && s.rebuildPath(l, 1);
    }
  }, o;
}
function zR(t, e) {
  e = e || {};
  var n = new ot();
  return t.shape && n.setShape(t.shape), n.setStyle(t.style), e.bakeTransform ? FK(n.path, t.getComputedTransform()) : e.toLocal ? n.setLocalTransform(t.getComputedTransform()) : n.copyTransform(t), n.buildPath = t.buildPath, n.applyTransform = n.applyTransform, n.z = t.z, n.z2 = t.z2, n.zlevel = t.zlevel, n;
}
var Oke = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0;
  }
  return t;
}(), jK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new Oke();
  }, e.prototype.buildPath = function(n, r) {
    n.moveTo(r.cx + r.r, r.cy), n.arc(r.cx, r.cy, r.r, 0, Math.PI * 2);
  }, e;
}(ot);
jK.prototype.type = "circle";
const ll = jK;
var Ske = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
  }
  return t;
}(), ZK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new Ske();
  }, e.prototype.buildPath = function(n, r) {
    var i = 0.5522848, a = r.cx, o = r.cy, s = r.rx, l = r.ry, u = s * i, c = l * i;
    n.moveTo(a - s, o), n.bezierCurveTo(a - s, o - c, a - u, o - l, a, o - l), n.bezierCurveTo(a + u, o - l, a + s, o - c, a + s, o), n.bezierCurveTo(a + s, o + c, a + u, o + l, a, o + l), n.bezierCurveTo(a - u, o + l, a - s, o + c, a - s, o), n.closePath();
  }, e;
}(ot);
ZK.prototype.type = "ellipse";
const Xx = ZK;
var UK = Math.PI, OT = UK * 2, Ku = Math.sin, od = Math.cos, xke = Math.acos, Ar = Math.atan2, BB = Math.abs, Mg = Math.sqrt, Hv = Math.max, So = Math.min, Ha = 1e-4;
function wke(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = f * l - c * u;
  if (!(d * d < Ha))
    return d = (c * (e - a) - f * (t - i)) / d, [t + d * l, e + d * u];
}
function eb(t, e, n, r, i, a, o) {
  var s = t - n, l = e - r, u = (o ? a : -a) / Mg(s * s + l * l), c = u * l, f = -u * s, d = t + c, h = e + f, p = n + c, v = r + f, g = (d + p) / 2, m = (h + v) / 2, y = p - d, b = v - h, _ = y * y + b * b, O = i - a, S = d * v - p * h, x = (b < 0 ? -1 : 1) * Mg(Hv(0, O * O * _ - S * S)), C = (S * b - y * x) / _, T = (-S * y - b * x) / _, w = (S * b + y * x) / _, P = (-S * y + b * x) / _, $ = C - g, A = T - m, D = w - g, E = P - m;
  return $ * $ + A * A > D * D + E * E && (C = w, T = P), {
    cx: C,
    cy: T,
    x0: -c,
    y0: -f,
    x1: C * (i / O - 1),
    y1: T * (i / O - 1)
  };
}
function Cke(t) {
  var e;
  if (ue(t)) {
    var n = t.length;
    if (!n)
      return t;
    n === 1 ? e = [t[0], t[0], 0, 0] : n === 2 ? e = [t[0], t[0], t[1], t[1]] : n === 3 ? e = t.concat(t[2]) : e = t;
  } else
    e = [t, t, t, t];
  return e;
}
function Tke(t, e) {
  var n, r = Hv(e.r, 0), i = Hv(e.r0 || 0, 0), a = r > 0, o = i > 0;
  if (!(!a && !o)) {
    if (a || (r = i, i = 0), i > r) {
      var s = r;
      r = i, i = s;
    }
    var l = e.startAngle, u = e.endAngle;
    if (!(isNaN(l) || isNaN(u))) {
      var c = e.cx, f = e.cy, d = !!e.clockwise, h = BB(u - l), p = h > OT && h % OT;
      if (p > Ha && (h = p), !(r > Ha))
        t.moveTo(c, f);
      else if (h > OT - Ha)
        t.moveTo(c + r * od(l), f + r * Ku(l)), t.arc(c, f, r, l, u, !d), i > Ha && (t.moveTo(c + i * od(u), f + i * Ku(u)), t.arc(c, f, i, u, l, d));
      else {
        var v = void 0, g = void 0, m = void 0, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0, x = void 0, C = void 0, T = void 0, w = void 0, P = void 0, $ = void 0, A = void 0, D = void 0, E = r * od(l), R = r * Ku(l), N = i * od(u), V = i * Ku(u), z = h > Ha;
        if (z) {
          var W = e.cornerRadius;
          W && (n = Cke(W), v = n[0], g = n[1], m = n[2], y = n[3]);
          var F = BB(r - i) / 2;
          if (b = So(F, m), _ = So(F, y), O = So(F, v), S = So(F, g), T = x = Hv(b, _), w = C = Hv(O, S), (x > Ha || C > Ha) && (P = r * od(u), $ = r * Ku(u), A = i * od(l), D = i * Ku(l), h < UK)) {
            var Q = wke(E, R, A, D, P, $, N, V);
            if (Q) {
              var Z = E - Q[0], ne = R - Q[1], ee = P - Q[0], oe = $ - Q[1], K = 1 / Ku(xke((Z * ee + ne * oe) / (Mg(Z * Z + ne * ne) * Mg(ee * ee + oe * oe))) / 2), ie = Mg(Q[0] * Q[0] + Q[1] * Q[1]);
              T = So(x, (r - ie) / (K + 1)), w = So(C, (i - ie) / (K - 1));
            }
          }
        }
        if (!z)
          t.moveTo(c + E, f + R);
        else if (T > Ha) {
          var X = So(m, T), H = So(y, T), G = eb(A, D, E, R, r, X, d), re = eb(P, $, N, V, r, H, d);
          t.moveTo(c + G.cx + G.x0, f + G.cy + G.y0), T < x && X === H ? t.arc(c + G.cx, f + G.cy, T, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (X > 0 && t.arc(c + G.cx, f + G.cy, X, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, r, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), !d), H > 0 && t.arc(c + re.cx, f + re.cy, H, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
        } else
          t.moveTo(c + E, f + R), t.arc(c, f, r, l, u, !d);
        if (!(i > Ha) || !z)
          t.lineTo(c + N, f + V);
        else if (w > Ha) {
          var X = So(v, w), H = So(g, w), G = eb(N, V, P, $, i, -H, d), re = eb(E, R, A, D, i, -X, d);
          t.lineTo(c + G.cx + G.x0, f + G.cy + G.y0), w < C && X === H ? t.arc(c + G.cx, f + G.cy, w, Ar(G.y0, G.x0), Ar(re.y0, re.x0), !d) : (H > 0 && t.arc(c + G.cx, f + G.cy, H, Ar(G.y0, G.x0), Ar(G.y1, G.x1), !d), t.arc(c, f, i, Ar(G.cy + G.y1, G.cx + G.x1), Ar(re.cy + re.y1, re.cx + re.x1), d), X > 0 && t.arc(c + re.cx, f + re.cy, X, Ar(re.y1, re.x1), Ar(re.y0, re.x0), !d));
        } else
          t.lineTo(c + N, f + V), t.arc(c, f, i, u, l, d);
      }
      t.closePath();
    }
  }
}
var Pke = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0;
  }
  return t;
}(), XK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new Pke();
  }, e.prototype.buildPath = function(n, r) {
    Tke(n, r);
  }, e.prototype.isZeroArea = function() {
    return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
  }, e;
}(ot);
XK.prototype.type = "sector";
const ri = XK;
var $ke = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
  }
  return t;
}(), YK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new $ke();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.cx, a = r.cy, o = Math.PI * 2;
    n.moveTo(i + r.r, a), n.arc(i, a, r.r, 0, o, !1), n.moveTo(i + r.r0, a), n.arc(i, a, r.r0, 0, o, !0);
  }, e;
}(ot);
YK.prototype.type = "ring";
const z0 = YK;
function Ake(t, e, n, r) {
  var i = [], a = [], o = [], s = [], l, u, c, f;
  if (r) {
    c = [1 / 0, 1 / 0], f = [-1 / 0, -1 / 0];
    for (var d = 0, h = t.length; d < h; d++)
      Ps(c, c, t[d]), $s(f, f, t[d]);
    Ps(c, c, r[0]), $s(f, f, r[1]);
  }
  for (var d = 0, h = t.length; d < h; d++) {
    var p = t[d];
    if (n)
      l = t[d ? d - 1 : h - 1], u = t[(d + 1) % h];
    else if (d === 0 || d === h - 1) {
      i.push(Zo(t[d]));
      continue;
    } else
      l = t[d - 1], u = t[d + 1];
    kl(a, u, l), Sg(a, a, e);
    var v = X1(p, l), g = X1(p, u), m = v + g;
    m !== 0 && (v /= m, g /= m), Sg(o, a, -v), Sg(s, a, g);
    var y = oA([], p, o), b = oA([], p, s);
    r && ($s(y, y, c), Ps(y, y, f), $s(b, b, c), Ps(b, b, f)), i.push(y), i.push(b);
  }
  return n && i.push(i.shift()), i;
}
function qK(t, e, n) {
  var r = e.smooth, i = e.points;
  if (i && i.length >= 2) {
    if (r) {
      var a = Ake(i, r, n, e.smoothConstraint);
      t.moveTo(i[0][0], i[0][1]);
      for (var o = i.length, s = 0; s < (n ? o : o - 1); s++) {
        var l = a[s * 2], u = a[s * 2 + 1], c = i[(s + 1) % o];
        t.bezierCurveTo(l[0], l[1], u[0], u[1], c[0], c[1]);
      }
    } else {
      t.moveTo(i[0][0], i[0][1]);
      for (var s = 1, f = i.length; s < f; s++)
        t.lineTo(i[s][0], i[s][1]);
    }
    n && t.closePath();
  }
}
var Eke = /* @__PURE__ */ function() {
  function t() {
    this.points = null, this.smooth = 0, this.smoothConstraint = null;
  }
  return t;
}(), KK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultShape = function() {
    return new Eke();
  }, e.prototype.buildPath = function(n, r) {
    qK(n, r, !0);
  }, e;
}(ot);
KK.prototype.type = "polygon";
const ii = KK;
var Mke = /* @__PURE__ */ function() {
  function t() {
    this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
  }
  return t;
}(), JK = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new Mke();
  }, e.prototype.buildPath = function(n, r) {
    qK(n, r, !1);
  }, e;
}(ot);
JK.prototype.type = "polyline";
const ai = JK;
var Ike = {}, Dke = /* @__PURE__ */ function() {
  function t() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
  }
  return t;
}(), eJ = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new Dke();
  }, e.prototype.buildPath = function(n, r) {
    var i, a, o, s;
    if (this.subPixelOptimize) {
      var l = TK(Ike, r, this.style);
      i = l.x1, a = l.y1, o = l.x2, s = l.y2;
    } else
      i = r.x1, a = r.y1, o = r.x2, s = r.y2;
    var u = r.percent;
    u !== 0 && (n.moveTo(i, a), u < 1 && (o = i * (1 - u) + o * u, s = a * (1 - u) + s * u), n.lineTo(o, s));
  }, e.prototype.pointAt = function(n) {
    var r = this.shape;
    return [
      r.x1 * (1 - n) + r.x2 * n,
      r.y1 * (1 - n) + r.y2 * n
    ];
  }, e;
}(ot);
eJ.prototype.type = "line";
const Un = eJ;
var oi = [], Rke = /* @__PURE__ */ function() {
  function t() {
    this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
  }
  return t;
}();
function zB(t, e, n) {
  var r = t.cpx2, i = t.cpy2;
  return r != null || i != null ? [
    (n ? Q6 : Gn)(t.x1, t.cpx1, t.cpx2, t.x2, e),
    (n ? Q6 : Gn)(t.y1, t.cpy1, t.cpy2, t.y2, e)
  ] : [
    (n ? fA : ir)(t.x1, t.cpx1, t.x2, e),
    (n ? fA : ir)(t.y1, t.cpy1, t.y2, e)
  ];
}
var tJ = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new Rke();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.x1, a = r.y1, o = r.x2, s = r.y2, l = r.cpx1, u = r.cpy1, c = r.cpx2, f = r.cpy2, d = r.percent;
    d !== 0 && (n.moveTo(i, a), c == null || f == null ? (d < 1 && (ym(i, l, o, d, oi), l = oi[1], o = oi[2], ym(a, u, s, d, oi), u = oi[1], s = oi[2]), n.quadraticCurveTo(l, u, o, s)) : (d < 1 && (su(i, l, c, o, d, oi), l = oi[1], c = oi[2], o = oi[3], su(a, u, f, s, d, oi), u = oi[1], f = oi[2], s = oi[3]), n.bezierCurveTo(l, u, c, f, o, s)));
  }, e.prototype.pointAt = function(n) {
    return zB(this.shape, n, !1);
  }, e.prototype.tangentAt = function(n) {
    var r = zB(this.shape, n, !0);
    return Rf(r, r);
  }, e;
}(ot);
tJ.prototype.type = "bezier-curve";
const V0 = tJ;
var kke = /* @__PURE__ */ function() {
  function t() {
    this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
  }
  return t;
}(), nJ = function(t) {
  q(e, t);
  function e(n) {
    return t.call(this, n) || this;
  }
  return e.prototype.getDefaultStyle = function() {
    return {
      stroke: "#000",
      fill: null
    };
  }, e.prototype.getDefaultShape = function() {
    return new kke();
  }, e.prototype.buildPath = function(n, r) {
    var i = r.cx, a = r.cy, o = Math.max(r.r, 0), s = r.startAngle, l = r.endAngle, u = r.clockwise, c = Math.cos(s), f = Math.sin(s);
    n.moveTo(c * o + i, f * o + a), n.arc(i, a, o, s, l, !u);
  }, e;
}(ot);
nJ.prototype.type = "arc";
const Yx = nJ;
var Lke = function(t) {
  q(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.type = "compound", n;
  }
  return e.prototype._updatePathDirty = function() {
    for (var n = this.shape.paths, r = this.shapeChanged(), i = 0; i < n.length; i++)
      r = r || n[i].shapeChanged();
    r && this.dirtyShape();
  }, e.prototype.beforeBrush = function() {
    this._updatePathDirty();
    for (var n = this.shape.paths || [], r = this.getGlobalScale(), i = 0; i < n.length; i++)
      n[i].path || n[i].createPathProxy(), n[i].path.setScale(r[0], r[1], n[i].segmentIgnoreThreshold);
  }, e.prototype.buildPath = function(n, r) {
    for (var i = r.paths || [], a = 0; a < i.length; a++)
      i[a].buildPath(n, i[a].shape, !0);
  }, e.prototype.afterBrush = function() {
    for (var n = this.shape.paths || [], r = 0; r < n.length; r++)
      n[r].pathUpdated();
  }, e.prototype.getBoundingRect = function() {
    return this._updatePathDirty.call(this), ot.prototype.getBoundingRect.call(this);
  }, e;
}(ot);
const qx = Lke;
var rJ = function() {
  function t(e) {
    this.colorStops = e || [];
  }
  return t.prototype.addColorStop = function(e, n) {
    this.colorStops.push({
      offset: e,
      color: n
    });
  }, t;
}(), Nke = function(t) {
  q(e, t);
  function e(n, r, i, a, o, s) {
    var l = t.call(this, o) || this;
    return l.x = n ?? 0, l.y = r ?? 0, l.x2 = i ?? 1, l.y2 = a ?? 0, l.type = "linear", l.global = s || !1, l;
  }
  return e;
}(rJ);
const hp = Nke;
var Bke = function(t) {
  q(e, t);
  function e(n, r, i, a, o) {
    var s = t.call(this, a) || this;
    return s.x = n ?? 0.5, s.y = r ?? 0.5, s.r = i ?? 0.5, s.type = "radial", s.global = o || !1, s;
  }
  return e;
}(rJ);
const VR = Bke;
var Ju = [0, 0], ec = [0, 0], tb = new Ke(), nb = new Ke(), zke = function() {
  function t(e, n) {
    this._corners = [], this._axes = [], this._origin = [0, 0];
    for (var r = 0; r < 4; r++)
      this._corners[r] = new Ke();
    for (var r = 0; r < 2; r++)
      this._axes[r] = new Ke();
    e && this.fromBoundingRect(e, n);
  }
  return t.prototype.fromBoundingRect = function(e, n) {
    var r = this._corners, i = this._axes, a = e.x, o = e.y, s = a + e.width, l = o + e.height;
    if (r[0].set(a, o), r[1].set(s, o), r[2].set(s, l), r[3].set(a, l), n)
      for (var u = 0; u < 4; u++)
        r[u].transform(n);
    Ke.sub(i[0], r[1], r[0]), Ke.sub(i[1], r[3], r[0]), i[0].normalize(), i[1].normalize();
    for (var u = 0; u < 2; u++)
      this._origin[u] = i[u].dot(r[0]);
  }, t.prototype.intersect = function(e, n) {
    var r = !0, i = !n;
    return tb.set(1 / 0, 1 / 0), nb.set(0, 0), !this._intersectCheckOneSide(this, e, tb, nb, i, 1) && (r = !1, i) || !this._intersectCheckOneSide(e, this, tb, nb, i, -1) && (r = !1, i) || i || Ke.copy(n, r ? tb : nb), r;
  }, t.prototype._intersectCheckOneSide = function(e, n, r, i, a, o) {
    for (var s = !0, l = 0; l < 2; l++) {
      var u = this._axes[l];
      if (this._getProjMinMaxOnAxis(l, e._corners, Ju), this._getProjMinMaxOnAxis(l, n._corners, ec), Ju[1] < ec[0] || Ju[0] > ec[1]) {
        if (s = !1, a)
          return s;
        var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
        Math.min(c, f) > i.len() && (c < f ? Ke.scale(i, u, -c * o) : Ke.scale(i, u, f * o));
      } else if (r) {
        var c = Math.abs(ec[0] - Ju[1]), f = Math.abs(Ju[0] - ec[1]);
        Math.min(c, f) < r.len() && (c < f ? Ke.scale(r, u, c * o) : Ke.scale(r, u, -f * o));
      }
    }
    return s;
  }, t.prototype._getProjMinMaxOnAxis = function(e, n, r) {
    for (var i = this._axes[e], a = this._origin, o = n[0].dot(i) + a[e], s = o, l = o, u = 1; u < n.length; u++) {
      var c = n[u].dot(i) + a[e];
      s = Math.min(c, s), l = Math.max(c, l);
    }
    r[0] = s, r[1] = l;
  }, t;
}();
const sO = zke;
var Vke = [], Fke = function(t) {
  q(e, t);
  function e() {
    var n = t !== null && t.apply(this, arguments) || this;
    return n.notClear = !0, n.incremental = !0, n._displayables = [], n._temporaryDisplayables = [], n._cursor = 0, n;
  }
  return e.prototype.traverse = function(n, r) {
    n.call(r, this);
  }, e.prototype.useStyle = function() {
    this.style = {};
  }, e.prototype.getCursor = function() {
    return this._cursor;
  }, e.prototype.innerAfterBrush = function() {
    this._cursor = this._displayables.length;
  }, e.prototype.clearDisplaybles = function() {
    this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
  }, e.prototype.clearTemporalDisplayables = function() {
    this._temporaryDisplayables = [];
  }, e.prototype.addDisplayable = function(n, r) {
    r ? this._temporaryDisplayables.push(n) : this._displayables.push(n), this.markRedraw();
  }, e.prototype.addDisplayables = function(n, r) {
    r = r || !1;
    for (var i = 0; i < n.length; i++)
      this.addDisplayable(n[i], r);
  }, e.prototype.getDisplayables = function() {
    return this._displayables;
  }, e.prototype.getTemporalDisplayables = function() {
    return this._temporaryDisplayables;
  }, e.prototype.eachPendingDisplayable = function(n) {
    for (var r = this._cursor; r < this._displayables.length; r++)
      n && n(this._displayables[r]);
    for (var r = 0; r < this._temporaryDisplayables.length; r++)
      n && n(this._temporaryDisplayables[r]);
  }, e.prototype.update = function() {
    this.updateTransform();
    for (var n = this._cursor; n < this._displayables.length; n++) {
      var r = this._displayables[n];
      r.parent = this, r.update(), r.parent = null;
    }
    for (var n = 0; n < this._temporaryDisplayables.length; n++) {
      var r = this._temporaryDisplayables[n];
      r.parent = this, r.update(), r.parent = null;
    }
  }, e.prototype.getBoundingRect = function() {
    if (!this._rect) {
      for (var n = new Je(1 / 0, 1 / 0, -1 / 0, -1 / 0), r = 0; r < this._displayables.length; r++) {
        var i = this._displayables[r], a = i.getBoundingRect().clone();
        i.needLocalTransform() && a.applyTransform(i.getLocalTransform(Vke)), n.union(a);
      }
      this._rect = n;
    }
    return this._rect;
  }, e.prototype.contain = function(n, r) {
    var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
    if (a.contain(i[0], i[1]))
      for (var o = 0; o < this._displayables.length; o++) {
        var s = this._displayables[o];
        if (s.contain(n, r))
          return !0;
      }
    return !1;
  }, e;
}(Ma);
const iJ = Fke;
var aJ = bt();
function pp(t, e, n, r, i) {
  var a;
  if (e && e.ecModel) {
    var o = e.ecModel.getUpdatePayload();
    a = o && o.animation;
  }
  var s = e && e.isAnimationEnabled(), l = t === "update";
  if (s) {
    var u = void 0, c = void 0, f = void 0;
    r ? (u = We(r.duration, 200), c = We(r.easing, "cubicOut"), f = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), c = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), f = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), a && (a.duration != null && (u = a.duration), a.easing != null && (c = a.easing), a.delay != null && (f = a.delay)), Me(f) && (f = f(n, i)), Me(u) && (u = u(n));
    var d = {
      duration: u || 0,
      delay: f,
      easing: c
    };
    return d;
  } else
    return null;
}
function FR(t, e, n, r, i, a, o) {
  var s = !1, l;
  Me(i) ? (o = a, a = i, i = null) : Ie(i) && (a = i.cb, o = i.during, s = i.isFrom, l = i.removeOpt, i = i.dataIndex);
  var u = t === "leave";
  u || e.stopAnimation("leave");
  var c = pp(t, r, i, u ? l || {} : null, r && r.getAnimationDelayParams ? r.getAnimationDelayParams(e, i) : null);
  if (c && c.duration > 0) {
    var f = c.duration, d = c.delay, h = c.easing, p = {
      duration: f,
      delay: d || 0,
      easing: h,
      done: a,
      force: !!a || !!o,
      // Set to final state in update/init animation.
      // So the post processing based on the path shape can be done correctly.
      setToFinal: !u,
      scope: t,
      during: o
    };
    s ? e.animateFrom(n, p) : e.animateTo(n, p);
  } else
    e.stopAnimation(), !s && e.attr(n), o && o(1), a && a();
}
function Ct(t, e, n, r, i, a) {
  FR("update", t, e, n, r, i, a);
}
function Yt(t, e, n, r, i, a) {
  FR("enter", t, e, n, r, i, a);
}
function th(t) {
  if (!t.__zr)
    return !0;
  for (var e = 0; e < t.animators.length; e++) {
    var n = t.animators[e];
    if (n.scope === "leave")
      return !0;
  }
  return !1;
}
function uu(t, e, n, r, i, a) {
  th(t) || FR("leave", t, e, n, r, i, a);
}
function VB(t, e, n, r) {
  t.removeTextContent(), t.removeTextGuideLine(), uu(t, {
    style: {
      opacity: 0
    }
  }, e, n, r);
}
function wm(t, e, n) {
  function r() {
    t.parent && t.parent.remove(t);
  }
  t.isGroup ? t.traverse(function(i) {
    i.isGroup || VB(i, e, n, r);
  }) : VB(t, e, n, r);
}
function so(t) {
  aJ(t).oldStyle = t.style;
}
function Wke(t) {
  return aJ(t).oldStyle;
}
var lO = Math.max, uO = Math.min, NA = {};
function oJ(t) {
  return ot.extend(t);
}
var Qke = bke;
function sJ(t, e) {
  return Qke(t, e);
}
function ka(t, e) {
  NA[t] = e;
}
function Kx(t) {
  if (NA.hasOwnProperty(t))
    return NA[t];
}
function F0(t, e, n, r) {
  var i = GK(t, e);
  return n && (r === "center" && (n = lJ(n, i.getBoundingRect())), QR(i, n)), i;
}
function WR(t, e, n) {
  var r = new lr({
    style: {
      image: t,
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    onload: function(i) {
      if (n === "center") {
        var a = {
          width: i.width,
          height: i.height
        };
        r.setStyle(lJ(e, a));
      }
    }
  });
  return r;
}
function lJ(t, e) {
  var n = e.width / e.height, r = t.height * n, i;
  r <= t.width ? i = t.height : (r = t.width, i = r / n);
  var a = t.x + t.width / 2, o = t.y + t.height / 2;
  return {
    x: a - r / 2,
    y: o - i / 2,
    width: r,
    height: i
  };
}
var Li = _ke;
function QR(t, e) {
  if (t.applyTransform) {
    var n = t.getBoundingRect(), r = n.calculateTransform(e);
    t.applyTransform(r);
  }
}
function zh(t, e) {
  return TK(t, t, {
    lineWidth: e
  }), t;
}
function Hke(t) {
  return PK(t.shape, t.shape, t.style), t;
}
var W_ = kc;
function ql(t, e) {
  for (var n = D0([]); t && t !== e; )
    Uo(n, t.getLocalTransform(), n), t = t.parent;
  return n;
}
function to(t, e, n) {
  return e && !wr(e) && (e = As.getLocalTransform(e)), n && (e = kf([], e)), ar([], t, e);
}
function Jx(t, e, n) {
  var r = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), i = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), a = [t === "left" ? -r : t === "right" ? r : 0, t === "top" ? -i : t === "bottom" ? i : 0];
  return a = to(a, e, n), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
}
function FB(t) {
  return !t.isGroup;
}
function Gke(t) {
  return t.shape != null;
}
function W0(t, e, n) {
  if (!t || !e)
    return;
  function r(o) {
    var s = {};
    return o.traverse(function(l) {
      FB(l) && l.anid && (s[l.anid] = l);
    }), s;
  }
  function i(o) {
    var s = {
      x: o.x,
      y: o.y,
      rotation: o.rotation
    };
    return Gke(o) && (s.shape = le({}, o.shape)), s;
  }
  var a = r(t);
  e.traverse(function(o) {
    if (FB(o) && o.anid) {
      var s = a[o.anid];
      if (s) {
        var l = i(o);
        o.attr(i(s)), Ct(o, l, n, Fe(o).dataIndex);
      }
    }
  });
}
function HR(t, e) {
  return ce(t, function(n) {
    var r = n[0];
    r = lO(r, e.x), r = uO(r, e.x + e.width);
    var i = n[1];
    return i = lO(i, e.y), i = uO(i, e.y + e.height), [r, i];
  });
}
function uJ(t, e) {
  var n = lO(t.x, e.x), r = uO(t.x + t.width, e.x + e.width), i = lO(t.y, e.y), a = uO(t.y + t.height, e.y + e.height);
  if (r >= n && a >= i)
    return {
      x: n,
      y: i,
      width: r - n,
      height: a - i
    };
}
function vp(t, e, n) {
  var r = le({
    rectHover: !0
  }, e), i = r.style = {
    strokeNoScale: !0
  };
  if (n = n || {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }, t)
    return t.indexOf("image://") === 0 ? (i.image = t.slice(8), Re(i, n), new lr(r)) : F0(t.replace("path://", ""), r, n, "center");
}
function Gv(t, e, n, r, i) {
  for (var a = 0, o = i[i.length - 1]; a < i.length; a++) {
    var s = i[a];
    if (cJ(t, e, n, r, s[0], s[1], o[0], o[1]))
      return !0;
    o = s;
  }
}
function cJ(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = ST(c, f, l, u);
  if (jke(d))
    return !1;
  var h = t - i, p = e - a, v = ST(h, p, l, u) / d;
  if (v < 0 || v > 1)
    return !1;
  var g = ST(h, p, c, f) / d;
  return !(g < 0 || g > 1);
}
function ST(t, e, n, r) {
  return t * r - n * e;
}
function jke(t) {
  return t <= 1e-6 && t >= -1e-6;
}
function gp(t) {
  var e = t.itemTooltipOption, n = t.componentModel, r = t.itemName, i = Oe(e) ? {
    formatter: e
  } : e, a = n.mainType, o = n.componentIndex, s = {
    componentType: a,
    name: r,
    $vars: ["name"]
  };
  s[a + "Index"] = o;
  var l = t.formatterParamsExtra;
  l && k(st(l), function(c) {
    Ce(s, c) || (s[c] = l[c], s.$vars.push(c));
  });
  var u = Fe(t.el);
  u.componentMainType = a, u.componentIndex = o, u.tooltipConfig = {
    name: r,
    option: Re({
      content: r,
      encodeHTMLContent: !0,
      formatterParams: s
    }, i)
  };
}
function WB(t, e) {
  var n;
  t.isGroup && (n = e(t)), n || t.traverse(e);
}
function Tu(t, e) {
  if (t)
    if (ue(t))
      for (var n = 0; n < t.length; n++)
        WB(t[n], e);
    else
      WB(t, e);
}
ka("circle", ll);
ka("ellipse", Xx);
ka("sector", ri);
ka("ring", z0);
ka("polygon", ii);
ka("polyline", ai);
ka("rect", mt);
ka("line", Un);
ka("bezierCurve", V0);
ka("arc", Yx);
const Lf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Arc: Yx,
  BezierCurve: V0,
  BoundingRect: Je,
  Circle: ll,
  CompoundPath: qx,
  Ellipse: Xx,
  Group: Ve,
  Image: lr,
  IncrementalDisplayable: iJ,
  Line: Un,
  LinearGradient: hp,
  OrientedBoundingRect: sO,
  Path: ot,
  Point: Ke,
  Polygon: ii,
  Polyline: ai,
  RadialGradient: VR,
  Rect: mt,
  Ring: z0,
  Sector: ri,
  Text: gt,
  applyTransform: to,
  clipPointsByRect: HR,
  clipRectByRect: uJ,
  createIcon: vp,
  extendPath: sJ,
  extendShape: oJ,
  getShapeClass: Kx,
  getTransform: ql,
  groupTransition: W0,
  initProps: Yt,
  isElementRemoved: th,
  lineLineIntersect: cJ,
  linePolygonIntersect: Gv,
  makeImage: WR,
  makePath: F0,
  mergePath: Li,
  registerShape: ka,
  removeElement: uu,
  removeElementWithFadeOut: wm,
  resizePath: QR,
  setTooltipConfig: gp,
  subPixelOptimize: W_,
  subPixelOptimizeLine: zh,
  subPixelOptimizeRect: Hke,
  transformDirection: Jx,
  traverseElements: Tu,
  updateProps: Ct
}, Symbol.toStringTag, { value: "Module" }));
var ew = {};
function fJ(t, e) {
  for (var n = 0; n < ni.length; n++) {
    var r = ni[n], i = e[r], a = t.ensureState(r);
    a.style = a.style || {}, a.style.text = i;
  }
  var o = t.currentStates.slice();
  t.clearStates(!0), t.setStyle({
    text: e.normal
  }), t.useStates(o, !0);
}
function BA(t, e, n) {
  var r = t.labelFetcher, i = t.labelDataIndex, a = t.labelDimIndex, o = e.normal, s;
  r && (s = r.getFormattedLabel(i, "normal", null, a, o && o.get("formatter"), n != null ? {
    interpolatedValue: n
  } : null)), s == null && (s = Me(t.defaultText) ? t.defaultText(i, t, n) : t.defaultText);
  for (var l = {
    normal: s
  }, u = 0; u < ni.length; u++) {
    var c = ni[u], f = e[c];
    l[c] = We(r ? r.getFormattedLabel(i, c, null, a, f && f.get("formatter")) : null, s);
  }
  return l;
}
function Pr(t, e, n, r) {
  n = n || ew;
  for (var i = t instanceof gt, a = !1, o = 0; o < xm.length; o++) {
    var s = e[xm[o]];
    if (s && s.getShallow("show")) {
      a = !0;
      break;
    }
  }
  var l = i ? t : t.getTextContent();
  if (a) {
    i || (l || (l = new gt(), t.setTextContent(l)), t.stateProxy && (l.stateProxy = t.stateProxy));
    var u = BA(n, e), c = e.normal, f = !!c.getShallow("show"), d = Zt(c, r && r.normal, n, !1, !i);
    d.text = u.normal, i || t.setTextConfig(cO(c, n, !1));
    for (var o = 0; o < ni.length; o++) {
      var h = ni[o], s = e[h];
      if (s) {
        var p = l.ensureState(h), v = !!We(s.getShallow("show"), f);
        if (v !== f && (p.ignore = !v), p.style = Zt(s, r && r[h], n, !0, !i), p.style.text = u[h], !i) {
          var g = t.ensureState(h);
          g.textConfig = cO(s, n, !0);
        }
      }
    }
    l.silent = !!c.getShallow("silent"), l.style.x != null && (d.x = l.style.x), l.style.y != null && (d.y = l.style.y), l.ignore = !f, l.useStyle(d), l.dirty(), n.enableTextSetter && (mp(l).setLabelText = function(m) {
      var y = BA(n, e, m);
      fJ(l, y);
    });
  } else l && (l.ignore = !0);
  t.dirty();
}
function er(t, e) {
  e = e || "label";
  for (var n = {
    normal: t.getModel(e)
  }, r = 0; r < ni.length; r++) {
    var i = ni[r];
    n[i] = t.getModel([i, e]);
  }
  return n;
}
function Zt(t, e, n, r, i) {
  var a = {};
  return Zke(a, t, n, r, i), e && le(a, e), a;
}
function cO(t, e, n) {
  e = e || {};
  var r = {}, i, a = t.getShallow("rotate"), o = We(t.getShallow("distance"), n ? null : 5), s = t.getShallow("offset");
  return i = t.getShallow("position") || (n ? null : "inside"), i === "outside" && (i = e.defaultOutsidePosition || "top"), i != null && (r.position = i), s != null && (r.offset = s), a != null && (a *= Math.PI / 180, r.rotation = a), o != null && (r.distance = o), r.outsideFill = t.get("color") === "inherit" ? e.inheritColor || null : "auto", r;
}
function Zke(t, e, n, r, i) {
  n = n || ew;
  var a = e.ecModel, o = a && a.option.textStyle, s = Uke(e), l;
  if (s) {
    l = {};
    for (var u in s)
      if (s.hasOwnProperty(u)) {
        var c = e.getModel(["rich", u]);
        jB(l[u] = {}, c, o, n, r, i, !1, !0);
      }
  }
  l && (t.rich = l);
  var f = e.get("overflow");
  f && (t.overflow = f);
  var d = e.get("minMargin");
  d != null && (t.margin = d), jB(t, e, o, n, r, i, !0, !1);
}
function Uke(t) {
  for (var e; t && t !== t.ecModel; ) {
    var n = (t.option || ew).rich;
    if (n) {
      e = e || {};
      for (var r = st(n), i = 0; i < r.length; i++) {
        var a = r[i];
        e[a] = 1;
      }
    }
    t = t.parentModel;
  }
  return e;
}
var QB = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], HB = ["align", "lineHeight", "width", "height", "tag", "verticalAlign", "ellipsis"], GB = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
function jB(t, e, n, r, i, a, o, s) {
  n = !i && n || ew;
  var l = r && r.inheritColor, u = e.getShallow("color"), c = e.getShallow("textBorderColor"), f = We(e.getShallow("opacity"), n.opacity);
  (u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && Cn("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (c === "inherit" || c === "auto") && (process.env.NODE_ENV !== "production" && c === "auto" && Cn("color: 'auto'", "color: 'inherit'"), l ? c = l : c = null), a || (u = u || n.color, c = c || n.textBorderColor), u != null && (t.fill = u), c != null && (t.stroke = c);
  var d = We(e.getShallow("textBorderWidth"), n.textBorderWidth);
  d != null && (t.lineWidth = d);
  var h = We(e.getShallow("textBorderType"), n.textBorderType);
  h != null && (t.lineDash = h);
  var p = We(e.getShallow("textBorderDashOffset"), n.textBorderDashOffset);
  p != null && (t.lineDashOffset = p), !i && f == null && !s && (f = r && r.defaultOpacity), f != null && (t.opacity = f), !i && !a && t.fill == null && r.inheritColor && (t.fill = r.inheritColor);
  for (var v = 0; v < QB.length; v++) {
    var g = QB[v], m = We(e.getShallow(g), n[g]);
    m != null && (t[g] = m);
  }
  for (var v = 0; v < HB.length; v++) {
    var g = HB[v], m = e.getShallow(g);
    m != null && (t[g] = m);
  }
  if (t.verticalAlign == null) {
    var y = e.getShallow("baseline");
    y != null && (t.verticalAlign = y);
  }
  if (!o || !r.disableBox) {
    for (var v = 0; v < GB.length; v++) {
      var g = GB[v], m = e.getShallow(g);
      m != null && (t[g] = m);
    }
    var b = e.getShallow("borderType");
    b != null && (t.borderDash = b), (t.backgroundColor === "auto" || t.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.backgroundColor === "auto" && Cn("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), t.backgroundColor = l), (t.borderColor === "auto" || t.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && t.borderColor === "auto" && Cn("borderColor: 'auto'", "borderColor: 'inherit'"), t.borderColor = l);
  }
}
function GR(t, e) {
  var n = e && e.getModel("textStyle");
  return ma([
    // FIXME in node-canvas fontWeight is before fontStyle
    t.fontStyle || n && n.getShallow("fontStyle") || "",
    t.fontWeight || n && n.getShallow("fontWeight") || "",
    (t.fontSize || n && n.getShallow("fontSize") || 12) + "px",
    t.fontFamily || n && n.getShallow("fontFamily") || "sans-serif"
  ].join(" "));
}
var mp = bt();
function dJ(t, e, n, r) {
  if (t) {
    var i = mp(t);
    i.prevValue = i.value, i.value = n;
    var a = e.normal;
    i.valueAnimation = a.get("valueAnimation"), i.valueAnimation && (i.precision = a.get("precision"), i.defaultInterpolatedText = r, i.statesModels = e);
  }
}
function hJ(t, e, n, r, i) {
  var a = mp(t);
  if (!a.valueAnimation || a.prevValue === a.value)
    return;
  var o = a.defaultInterpolatedText, s = We(a.interpolatedValue, a.prevValue), l = a.value;
  function u(c) {
    var f = gK(n, a.precision, s, l, c);
    a.interpolatedValue = c === 1 ? null : f;
    var d = BA({
      labelDataIndex: e,
      labelFetcher: i,
      defaultText: o ? o(f) : f + ""
    }, a.statesModels, f);
    fJ(t, d);
  }
  t.percent = 0, (a.prevValue == null ? Yt : Ct)(t, {
    // percent is used to prevent animation from being aborted #15916
    percent: 1
  }, r, e, null, u);
}
var Xke = ["textStyle", "color"], xT = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], wT = new gt(), Yke = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getTextColor = function(e) {
      var n = this.ecModel;
      return this.getShallow("color") || (!e && n ? n.get(Xke) : null);
    }, t.prototype.getFont = function() {
      return GR({
        fontStyle: this.getShallow("fontStyle"),
        fontWeight: this.getShallow("fontWeight"),
        fontSize: this.getShallow("fontSize"),
        fontFamily: this.getShallow("fontFamily")
      }, this.ecModel);
    }, t.prototype.getTextRect = function(e) {
      for (var n = {
        text: e,
        verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
      }, r = 0; r < xT.length; r++)
        n[xT[r]] = this.getShallow(xT[r]);
      return wT.useStyle(n), wT.update(), wT.getBoundingRect();
    }, t;
  }()
), pJ = [
  ["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.
], qke = yf(pJ), Kke = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getLineStyle = function(e) {
      return qke(this, e);
    }, t;
  }()
), vJ = [
  ["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.
], Jke = yf(vJ), eLe = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getItemStyle = function(e, n) {
      return Jke(this, e, n);
    }, t;
  }()
), Nf = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.parentModel = n, this.ecModel = r, this.option = e;
    }
    return t.prototype.init = function(e, n, r) {
    }, t.prototype.mergeOption = function(e, n) {
      qe(this.option, e, !0);
    }, t.prototype.get = function(e, n) {
      return e == null ? this.option : this._doGet(this.parsePath(e), !n && this.parentModel);
    }, t.prototype.getShallow = function(e, n) {
      var r = this.option, i = r == null ? r : r[e];
      if (i == null && !n) {
        var a = this.parentModel;
        a && (i = a.getShallow(e));
      }
      return i;
    }, t.prototype.getModel = function(e, n) {
      var r = e != null, i = r ? this.parsePath(e) : null, a = r ? this._doGet(i) : this.option;
      return n = n || this.parentModel && this.parentModel.getModel(this.resolveParentPath(i)), new t(a, n, this.ecModel);
    }, t.prototype.isEmpty = function() {
      return this.option == null;
    }, t.prototype.restoreData = function() {
    }, t.prototype.clone = function() {
      var e = this.constructor;
      return new e(Le(this.option));
    }, t.prototype.parsePath = function(e) {
      return typeof e == "string" ? e.split(".") : e;
    }, t.prototype.resolveParentPath = function(e) {
      return e;
    }, t.prototype.isAnimationEnabled = function() {
      if (!vt.node && this.option) {
        if (this.option.animation != null)
          return !!this.option.animation;
        if (this.parentModel)
          return this.parentModel.isAnimationEnabled();
      }
    }, t.prototype._doGet = function(e, n) {
      var r = this.option;
      if (!e)
        return r;
      for (var i = 0; i < e.length && !(e[i] && (r = r && typeof r == "object" ? r[e[i]] : null, r == null)); i++)
        ;
      return r == null && n && (r = n._doGet(this.resolveParentPath(e), n.parentModel)), r;
    }, t;
  }()
);
MR(Nf);
lRe(Nf);
xn(Nf, Kke);
xn(Nf, eLe);
xn(Nf, hRe);
xn(Nf, Yke);
const Wt = Nf;
var tLe = Math.round(Math.random() * 10);
function yp(t) {
  return [t || "", tLe++].join("_");
}
function nLe(t) {
  var e = {};
  t.registerSubTypeDefaulter = function(n, r) {
    var i = Vo(n);
    e[i.main] = r;
  }, t.determineSubType = function(n, r) {
    var i = r.type;
    if (!i) {
      var a = Vo(n).main;
      t.hasSubTypes(n) && e[a] && (i = e[a](r));
    }
    return i;
  };
}
function rLe(t, e) {
  t.topologicalTravel = function(a, o, s, l) {
    if (!a.length)
      return;
    var u = n(o), c = u.graph, f = u.noEntryList, d = {};
    for (k(a, function(y) {
      d[y] = !0;
    }); f.length; ) {
      var h = f.pop(), p = c[h], v = !!d[h];
      v && (s.call(l, h, p.originalDeps.slice()), delete d[h]), k(p.successor, v ? m : g);
    }
    k(d, function() {
      var y = "";
      throw process.env.NODE_ENV !== "production" && (y = ti("Circular dependency may exists: ", d, a, o)), new Error(y);
    });
    function g(y) {
      c[y].entryCount--, c[y].entryCount === 0 && f.push(y);
    }
    function m(y) {
      d[y] = !0, g(y);
    }
  };
  function n(a) {
    var o = {}, s = [];
    return k(a, function(l) {
      var u = r(o, l), c = u.originalDeps = e(l), f = i(c, a);
      u.entryCount = f.length, u.entryCount === 0 && s.push(l), k(f, function(d) {
        et(u.predecessor, d) < 0 && u.predecessor.push(d);
        var h = r(o, d);
        et(h.successor, d) < 0 && h.successor.push(l);
      });
    }), {
      graph: o,
      noEntryList: s
    };
  }
  function r(a, o) {
    return a[o] || (a[o] = {
      predecessor: [],
      successor: []
    }), a[o];
  }
  function i(a, o) {
    var s = [];
    return k(a, function(l) {
      et(o, l) >= 0 && s.push(l);
    }), s;
  }
}
function Pu(t, e) {
  return qe(qe({}, t, !0), e, !0);
}
const iLe = {
  time: {
    month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
    dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
  },
  legend: {
    selector: {
      all: "All",
      inverse: "Inv"
    }
  },
  toolbox: {
    brush: {
      title: {
        rect: "Box Select",
        polygon: "Lasso Select",
        lineX: "Horizontally Select",
        lineY: "Vertically Select",
        keep: "Keep Selections",
        clear: "Clear Selections"
      }
    },
    dataView: {
      title: "Data View",
      lang: ["Data View", "Close", "Refresh"]
    },
    dataZoom: {
      title: {
        zoom: "Zoom",
        back: "Zoom Reset"
      }
    },
    magicType: {
      title: {
        line: "Switch to Line Chart",
        bar: "Switch to Bar Chart",
        stack: "Stack",
        tiled: "Tile"
      }
    },
    restore: {
      title: "Restore"
    },
    saveAsImage: {
      title: "Save as Image",
      lang: ["Right Click to Save Image"]
    }
  },
  series: {
    typeNames: {
      pie: "Pie chart",
      bar: "Bar chart",
      line: "Line chart",
      scatter: "Scatter plot",
      effectScatter: "Ripple scatter plot",
      radar: "Radar chart",
      tree: "Tree",
      treemap: "Treemap",
      boxplot: "Boxplot",
      candlestick: "Candlestick",
      k: "K line chart",
      heatmap: "Heat map",
      map: "Map",
      parallel: "Parallel coordinate map",
      lines: "Line graph",
      graph: "Relationship graph",
      sankey: "Sankey diagram",
      funnel: "Funnel chart",
      gauge: "Gauge",
      pictorialBar: "Pictorial bar",
      themeRiver: "Theme River Map",
      sunburst: "Sunburst",
      custom: "Custom chart",
      chart: "Chart"
    }
  },
  aria: {
    general: {
      withTitle: 'This is a chart about "{title}"',
      withoutTitle: "This is a chart"
    },
    series: {
      single: {
        prefix: "",
        withName: " with type {seriesType} named {seriesName}.",
        withoutName: " with type {seriesType}."
      },
      multiple: {
        prefix: ". It consists of {seriesCount} series count.",
        withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
        withoutName: " The {seriesId} series is a {seriesType}.",
        separator: {
          middle: "",
          end: ""
        }
      }
    },
    data: {
      allData: "The data is as follows: ",
      partialData: "The first {displayCnt} items are: ",
      withName: "the data for {name} is {value}",
      withoutName: "{value}",
      separator: {
        middle: ", ",
        end: ". "
      }
    }
  }
}, aLe = {
  time: {
    month: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
    monthAbbr: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
    dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
    dayOfWeekAbbr: ["日", "一", "二", "三", "四", "五", "六"]
  },
  legend: {
    selector: {
      all: "全选",
      inverse: "反选"
    }
  },
  toolbox: {
    brush: {
      title: {
        rect: "矩形选择",
        polygon: "圈选",
        lineX: "横向选择",
        lineY: "纵向选择",
        keep: "保持选择",
        clear: "清除选择"
      }
    },
    dataView: {
      title: "数据视图",
      lang: ["数据视图", "关闭", "刷新"]
    },
    dataZoom: {
      title: {
        zoom: "区域缩放",
        back: "区域缩放还原"
      }
    },
    magicType: {
      title: {
        line: "切换为折线图",
        bar: "切换为柱状图",
        stack: "切换为堆叠",
        tiled: "切换为平铺"
      }
    },
    restore: {
      title: "还原"
    },
    saveAsImage: {
      title: "保存为图片",
      lang: ["右键另存为图片"]
    }
  },
  series: {
    typeNames: {
      pie: "饼图",
      bar: "柱状图",
      line: "折线图",
      scatter: "散点图",
      effectScatter: "涟漪散点图",
      radar: "雷达图",
      tree: "树图",
      treemap: "矩形树图",
      boxplot: "箱型图",
      candlestick: "K线图",
      k: "K线图",
      heatmap: "热力图",
      map: "地图",
      parallel: "平行坐标图",
      lines: "线图",
      graph: "关系图",
      sankey: "桑基图",
      funnel: "漏斗图",
      gauge: "仪表盘图",
      pictorialBar: "象形柱图",
      themeRiver: "主题河流图",
      sunburst: "旭日图",
      custom: "自定义图表",
      chart: "图表"
    }
  },
  aria: {
    general: {
      withTitle: "这是一个关于“{title}”的图表。",
      withoutTitle: "这是一个图表，"
    },
    series: {
      single: {
        prefix: "",
        withName: "图表类型是{seriesType}，表示{seriesName}。",
        withoutName: "图表类型是{seriesType}。"
      },
      multiple: {
        prefix: "它由{seriesCount}个图表系列组成。",
        withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",
        withoutName: "第{seriesId}个系列是一个{seriesType}，",
        separator: {
          middle: "；",
          end: "。"
        }
      }
    },
    data: {
      allData: "其数据是——",
      partialData: "其中，前{displayCnt}项是——",
      withName: "{name}的数据是{value}",
      withoutName: "{value}",
      separator: {
        middle: "，",
        end: ""
      }
    }
  }
};
var fO = "ZH", jR = "EN", nh = jR, Q_ = {}, ZR = {}, gJ = vt.domSupported ? function() {
  var t = (
    /* eslint-disable-next-line */
    (document.documentElement.lang || navigator.language || navigator.browserLanguage || nh).toUpperCase()
  );
  return t.indexOf(fO) > -1 ? fO : nh;
}() : nh;
function UR(t, e) {
  t = t.toUpperCase(), ZR[t] = new Wt(e), Q_[t] = e;
}
function oLe(t) {
  if (Oe(t)) {
    var e = Q_[t.toUpperCase()] || {};
    return t === fO || t === jR ? Le(e) : qe(Le(e), Le(Q_[nh]), !1);
  } else
    return qe(Le(t), Le(Q_[nh]), !1);
}
function zA(t) {
  return ZR[t];
}
function sLe() {
  return ZR[nh];
}
UR(jR, iLe);
UR(fO, aLe);
var XR = 1e3, YR = XR * 60, Ig = YR * 60, va = Ig * 24, ZB = va * 365, jv = {
  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}"
}, rb = "{yyyy}-{MM}-{dd}", UB = {
  year: "{yyyy}",
  month: "{yyyy}-{MM}",
  day: rb,
  hour: rb + " " + jv.hour,
  minute: rb + " " + jv.minute,
  second: rb + " " + jv.second,
  millisecond: jv.none
}, CT = ["year", "month", "day", "hour", "minute", "second", "millisecond"], mJ = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
function Qr(t, e) {
  return t += "", "0000".substr(0, e - t.length) + t;
}
function rh(t) {
  switch (t) {
    case "half-year":
    case "quarter":
      return "month";
    case "week":
    case "half-week":
      return "day";
    case "half-day":
    case "quarter-day":
      return "hour";
    default:
      return t;
  }
}
function lLe(t) {
  return t === rh(t);
}
function uLe(t) {
  switch (t) {
    case "year":
    case "month":
      return "day";
    case "millisecond":
      return "millisecond";
    default:
      return "second";
  }
}
function Q0(t, e, n, r) {
  var i = Yi(t), a = i[qR(n)](), o = i[ih(n)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = i[tw(n)](), u = i["get" + (n ? "UTC" : "") + "Day"](), c = i[Cm(n)](), f = (c - 1) % 12 + 1, d = i[nw(n)](), h = i[rw(n)](), p = i[iw(n)](), v = c >= 12 ? "pm" : "am", g = v.toUpperCase(), m = r instanceof Wt ? r : zA(r || gJ) || sLe(), y = m.getModel("time"), b = y.get("month"), _ = y.get("monthAbbr"), O = y.get("dayOfWeek"), S = y.get("dayOfWeekAbbr");
  return (e || "").replace(/{a}/g, v + "").replace(/{A}/g, g + "").replace(/{yyyy}/g, a + "").replace(/{yy}/g, Qr(a % 100 + "", 2)).replace(/{Q}/g, s + "").replace(/{MMMM}/g, b[o - 1]).replace(/{MMM}/g, _[o - 1]).replace(/{MM}/g, Qr(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Qr(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, O[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Qr(c, 2)).replace(/{H}/g, c + "").replace(/{hh}/g, Qr(f + "", 2)).replace(/{h}/g, f + "").replace(/{mm}/g, Qr(d, 2)).replace(/{m}/g, d + "").replace(/{ss}/g, Qr(h, 2)).replace(/{s}/g, h + "").replace(/{SSS}/g, Qr(p, 3)).replace(/{S}/g, p + "");
}
function cLe(t, e, n, r, i) {
  var a = null;
  if (Oe(n))
    a = n;
  else if (Me(n))
    a = n(t.value, e, {
      level: t.level
    });
  else {
    var o = le({}, jv);
    if (t.level > 0)
      for (var s = 0; s < CT.length; ++s)
        o[CT[s]] = "{primary|" + o[CT[s]] + "}";
    var l = n ? n.inherit === !1 ? n : Re(n, o) : o, u = yJ(t.value, i);
    if (l[u])
      a = l[u];
    else if (l.inherit) {
      for (var c = mJ.indexOf(u), s = c - 1; s >= 0; --s)
        if (l[u]) {
          a = l[u];
          break;
        }
      a = a || o.none;
    }
    if (ue(a)) {
      var f = t.level == null ? 0 : t.level >= 0 ? t.level : a.length + t.level;
      f = Math.min(f, a.length - 1), a = a[f];
    }
  }
  return Q0(new Date(t.value), a, i, r);
}
function yJ(t, e) {
  var n = Yi(t), r = n[ih(e)]() + 1, i = n[tw(e)](), a = n[Cm(e)](), o = n[nw(e)](), s = n[rw(e)](), l = n[iw(e)](), u = l === 0, c = u && s === 0, f = c && o === 0, d = f && a === 0, h = d && i === 1, p = h && r === 1;
  return p ? "year" : h ? "month" : d ? "day" : f ? "hour" : c ? "minute" : u ? "second" : "millisecond";
}
function XB(t, e, n) {
  var r = St(t) ? Yi(t) : t;
  switch (e = e || yJ(t, n), e) {
    case "year":
      return r[qR(n)]();
    case "half-year":
      return r[ih(n)]() >= 6 ? 1 : 0;
    case "quarter":
      return Math.floor((r[ih(n)]() + 1) / 4);
    case "month":
      return r[ih(n)]();
    case "day":
      return r[tw(n)]();
    case "half-day":
      return r[Cm(n)]() / 24;
    case "hour":
      return r[Cm(n)]();
    case "minute":
      return r[nw(n)]();
    case "second":
      return r[rw(n)]();
    case "millisecond":
      return r[iw(n)]();
  }
}
function qR(t) {
  return t ? "getUTCFullYear" : "getFullYear";
}
function ih(t) {
  return t ? "getUTCMonth" : "getMonth";
}
function tw(t) {
  return t ? "getUTCDate" : "getDate";
}
function Cm(t) {
  return t ? "getUTCHours" : "getHours";
}
function nw(t) {
  return t ? "getUTCMinutes" : "getMinutes";
}
function rw(t) {
  return t ? "getUTCSeconds" : "getSeconds";
}
function iw(t) {
  return t ? "getUTCMilliseconds" : "getMilliseconds";
}
function fLe(t) {
  return t ? "setUTCFullYear" : "setFullYear";
}
function bJ(t) {
  return t ? "setUTCMonth" : "setMonth";
}
function _J(t) {
  return t ? "setUTCDate" : "setDate";
}
function OJ(t) {
  return t ? "setUTCHours" : "setHours";
}
function SJ(t) {
  return t ? "setUTCMinutes" : "setMinutes";
}
function xJ(t) {
  return t ? "setUTCSeconds" : "setSeconds";
}
function wJ(t) {
  return t ? "setUTCMilliseconds" : "setMilliseconds";
}
function dLe(t, e, n, r, i, a, o, s) {
  var l = new gt({
    style: {
      text: t,
      font: e,
      align: n,
      verticalAlign: r,
      padding: i,
      rich: a,
      overflow: o ? "truncate" : null,
      lineHeight: s
    }
  });
  return l.getBoundingRect();
}
function KR(t) {
  if (!Fx(t))
    return Oe(t) ? t : "-";
  var e = (t + "").split(".");
  return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
}
function JR(t, e) {
  return t = (t || "").toLowerCase().replace(/-(.)/g, function(n, r) {
    return r.toUpperCase();
  }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
}
var Bf = kx;
function VA(t, e, n) {
  var r = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
  function i(c) {
    return c && ma(c) ? c : "-";
  }
  function a(c) {
    return !!(c != null && !isNaN(c) && isFinite(c));
  }
  var o = e === "time", s = t instanceof Date;
  if (o || s) {
    var l = o ? Yi(t) : t;
    if (isNaN(+l)) {
      if (s)
        return "-";
    } else return Q0(l, r, n);
  }
  if (e === "ordinal")
    return pm(t) ? i(t) : St(t) && a(t) ? t + "" : "-";
  var u = is(t);
  return a(u) ? KR(u) : pm(t) ? i(t) : typeof t == "boolean" ? t + "" : "-";
}
var YB = ["a", "b", "c", "d", "e", "f", "g"], TT = function(t, e) {
  return "{" + t + (e ?? "") + "}";
};
function ek(t, e, n) {
  ue(e) || (e = [e]);
  var r = e.length;
  if (!r)
    return "";
  for (var i = e[0].$vars || [], a = 0; a < i.length; a++) {
    var o = YB[a];
    t = t.replace(TT(o), TT(o, 0));
  }
  for (var s = 0; s < r; s++)
    for (var l = 0; l < i.length; l++) {
      var u = e[s][i[l]];
      t = t.replace(TT(YB[l], s), n ? Gr(u) : u);
    }
  return t;
}
function hLe(t, e, n) {
  return k(e, function(r, i) {
    t = t.replace("{" + i + "}", r);
  }), t;
}
function CJ(t, e) {
  var n = Oe(t) ? {
    color: t,
    extraCssText: e
  } : t || {}, r = n.color, i = n.type;
  e = n.extraCssText;
  var a = n.renderMode || "html";
  if (!r)
    return "";
  if (a === "html")
    return i === "subItem" ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + Gr(r) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:' + Gr(r) + ";" + (e || "") + '"></span>';
  var o = n.markerId || "markerX";
  return {
    renderMode: a,
    content: "{" + o + "|}  ",
    style: i === "subItem" ? {
      width: 4,
      height: 4,
      borderRadius: 2,
      backgroundColor: r
    } : {
      width: 10,
      height: 10,
      borderRadius: 5,
      backgroundColor: r
    }
  };
}
function pLe(t, e, n) {
  process.env.NODE_ENV !== "production" && Cn("echarts.format.formatTime", "echarts.time.format"), (t === "week" || t === "month" || t === "quarter" || t === "half-year" || t === "year") && (t = `MM-dd
yyyy`);
  var r = Yi(e), i = n ? "getUTC" : "get", a = r[i + "FullYear"](), o = r[i + "Month"]() + 1, s = r[i + "Date"](), l = r[i + "Hours"](), u = r[i + "Minutes"](), c = r[i + "Seconds"](), f = r[i + "Milliseconds"]();
  return t = t.replace("MM", Qr(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", Qr(a % 100 + "", 2)).replace("dd", Qr(s, 2)).replace("d", s).replace("hh", Qr(l, 2)).replace("h", l).replace("mm", Qr(u, 2)).replace("m", u).replace("ss", Qr(c, 2)).replace("s", c).replace("SSS", Qr(f, 3)), t;
}
function vLe(t) {
  return t && t.charAt(0).toUpperCase() + t.substr(1);
}
function _f(t, e) {
  return e = e || "transparent", Oe(t) ? t : Ie(t) && t.colorStops && (t.colorStops[0] || {}).color || e;
}
function dO(t, e) {
  if (e === "_blank" || e === "blank") {
    var n = window.open();
    n.opener = null, n.location.href = t;
  } else
    window.open(t, e);
}
var H_ = k, TJ = ["left", "right", "top", "bottom", "width", "height"], Nc = [["width", "left", "right"], ["height", "top", "bottom"]];
function tk(t, e, n, r, i) {
  var a = 0, o = 0;
  r == null && (r = 1 / 0), i == null && (i = 1 / 0);
  var s = 0;
  e.eachChild(function(l, u) {
    var c = l.getBoundingRect(), f = e.childAt(u + 1), d = f && f.getBoundingRect(), h, p;
    if (t === "horizontal") {
      var v = c.width + (d ? -d.x + c.x : 0);
      h = a + v, h > r || l.newline ? (a = 0, h = v, o += s + n, s = c.height) : s = Math.max(s, c.height);
    } else {
      var g = c.height + (d ? -d.y + c.y : 0);
      p = o + g, p > i || l.newline ? (a += s + n, o = 0, p = g, s = c.width) : s = Math.max(s, c.width);
    }
    l.newline || (l.x = a, l.y = o, l.markRedraw(), t === "horizontal" ? a = h + n : o = p + n);
  });
}
var ef = tk;
Ue(tk, "vertical");
Ue(tk, "horizontal");
function gLe(t, e, n) {
  var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i);
  return (isNaN(a) || isNaN(parseFloat(t.left))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.right))) && (s = r), (isNaN(o) || isNaN(parseFloat(t.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(t.bottom))) && (l = i), n = Bf(n || 0), {
    width: Math.max(s - a - n[1] - n[3], 0),
    height: Math.max(l - o - n[0] - n[2], 0)
  };
}
function Rn(t, e, n) {
  n = Bf(n || 0);
  var r = e.width, i = e.height, a = _e(t.left, r), o = _e(t.top, i), s = _e(t.right, r), l = _e(t.bottom, i), u = _e(t.width, r), c = _e(t.height, i), f = n[2] + n[0], d = n[1] + n[3], h = t.aspect;
  switch (isNaN(u) && (u = r - s - d - a), isNaN(c) && (c = i - l - f - o), h != null && (isNaN(u) && isNaN(c) && (h > r / i ? u = r * 0.8 : c = i * 0.8), isNaN(u) && (u = h * c), isNaN(c) && (c = u / h)), isNaN(a) && (a = r - s - u - d), isNaN(o) && (o = i - l - c - f), t.left || t.right) {
    case "center":
      a = r / 2 - u / 2 - n[3];
      break;
    case "right":
      a = r - u - d;
      break;
  }
  switch (t.top || t.bottom) {
    case "middle":
    case "center":
      o = i / 2 - c / 2 - n[0];
      break;
    case "bottom":
      o = i - c - f;
      break;
  }
  a = a || 0, o = o || 0, isNaN(u) && (u = r - d - a - (s || 0)), isNaN(c) && (c = i - f - o - (l || 0));
  var p = new Je(a + n[3], o + n[0], u, c);
  return p.margin = n, p;
}
function aw(t, e, n, r, i, a) {
  var o = !i || !i.hv || i.hv[0], s = !i || !i.hv || i.hv[1], l = i && i.boundingMode || "all";
  if (a = a || t, a.x = t.x, a.y = t.y, !o && !s)
    return !1;
  var u;
  if (l === "raw")
    u = t.type === "group" ? new Je(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect();
  else if (u = t.getBoundingRect(), t.needLocalTransform()) {
    var c = t.getLocalTransform();
    u = u.clone(), u.applyTransform(c);
  }
  var f = Rn(Re({
    width: u.width,
    height: u.height
  }, e), n, r), d = o ? f.x - u.x : 0, h = s ? f.y - u.y : 0;
  return l === "raw" ? (a.x = d, a.y = h) : (a.x += d, a.y += h), a === t && t.markRedraw(), !0;
}
function mLe(t, e) {
  return t[Nc[e][0]] != null || t[Nc[e][1]] != null && t[Nc[e][2]] != null;
}
function Tm(t) {
  var e = t.layoutMode || t.constructor.layoutMode;
  return Ie(e) ? e : e ? {
    type: e
  } : null;
}
function cu(t, e, n) {
  var r = n && n.ignoreSize;
  !ue(r) && (r = [r, r]);
  var i = o(Nc[0], 0), a = o(Nc[1], 1);
  u(Nc[0], t, i), u(Nc[1], t, a);
  function o(c, f) {
    var d = {}, h = 0, p = {}, v = 0, g = 2;
    if (H_(c, function(b) {
      p[b] = t[b];
    }), H_(c, function(b) {
      s(e, b) && (d[b] = p[b] = e[b]), l(d, b) && h++, l(p, b) && v++;
    }), r[f])
      return l(e, c[1]) ? p[c[2]] = null : l(e, c[2]) && (p[c[1]] = null), p;
    if (v === g || !h)
      return p;
    if (h >= g)
      return d;
    for (var m = 0; m < c.length; m++) {
      var y = c[m];
      if (!s(d, y) && s(t, y)) {
        d[y] = t[y];
        break;
      }
    }
    return d;
  }
  function s(c, f) {
    return c.hasOwnProperty(f);
  }
  function l(c, f) {
    return c[f] != null && c[f] !== "auto";
  }
  function u(c, f, d) {
    H_(c, function(h) {
      f[h] = d[h];
    });
  }
}
function bp(t) {
  return PJ({}, t);
}
function PJ(t, e) {
  return e && t && H_(TJ, function(n) {
    e.hasOwnProperty(n) && (t[n] = e[n]);
  }), t;
}
var yLe = bt(), rt = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this, n, r, i) || this;
      return a.uid = yp("ec_cpt_model"), a;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i);
    }, e.prototype.mergeDefaultAndTheme = function(n, r) {
      var i = Tm(this), a = i ? bp(n) : {}, o = r.getTheme();
      qe(n, o.get(this.mainType)), qe(n, this.getDefaultOption()), i && cu(n, a, i);
    }, e.prototype.mergeOption = function(n, r) {
      qe(this.option, n, !0);
      var i = Tm(this);
      i && cu(this.option, n, i);
    }, e.prototype.optionUpdated = function(n, r) {
    }, e.prototype.getDefaultOption = function() {
      var n = this.constructor;
      if (!aRe(n))
        return n.defaultOption;
      var r = yLe(this);
      if (!r.defaultOption) {
        for (var i = [], a = n; a; ) {
          var o = a.prototype.defaultOption;
          o && i.push(o), a = a.superClass;
        }
        for (var s = {}, l = i.length - 1; l >= 0; l--)
          s = qe(s, i[l], !0);
        r.defaultOption = s;
      }
      return r.defaultOption;
    }, e.prototype.getReferringComponents = function(n, r) {
      var i = n + "Index", a = n + "Id";
      return N0(this.ecModel, n, {
        index: this.get(i, !0),
        id: this.get(a, !0)
      }, r);
    }, e.prototype.getBoxLayoutParams = function() {
      var n = this;
      return {
        left: n.get("left"),
        top: n.get("top"),
        right: n.get("right"),
        bottom: n.get("bottom"),
        width: n.get("width"),
        height: n.get("height")
      };
    }, e.prototype.getZLevelKey = function() {
      return "";
    }, e.prototype.setZLevel = function(n) {
      this.option.zlevel = n;
    }, e.protoInitialize = function() {
      var n = e.prototype;
      n.type = "component", n.id = "", n.name = "", n.mainType = "", n.subType = "", n.componentIndex = 0;
    }(), e;
  }(Wt)
);
yK(rt, Wt);
Qx(rt);
nLe(rt);
rLe(rt, bLe);
function bLe(t) {
  var e = [];
  return k(rt.getClassesByMainType(t), function(n) {
    e = e.concat(n.dependencies || n.prototype.dependencies || []);
  }), e = ce(e, function(n) {
    return Vo(n).main;
  }), t !== "dataset" && et(e, "dataset") <= 0 && e.unshift("dataset"), e;
}
var $J = "";
typeof navigator < "u" && ($J = navigator.platform || "");
var sd = "rgba(0, 0, 0, 0.2)";
const _Le = {
  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: sd,
        dashArrayX: [1, 0],
        dashArrayY: [2, 5],
        symbolSize: 1,
        rotation: Math.PI / 6
      }, {
        color: sd,
        symbol: "circle",
        dashArrayX: [[8, 8], [0, 8, 8, 0]],
        dashArrayY: [6, 0],
        symbolSize: 0.8
      }, {
        color: sd,
        dashArrayX: [1, 0],
        dashArrayY: [4, 3],
        rotation: -Math.PI / 4
      }, {
        color: sd,
        dashArrayX: [[6, 6], [0, 6, 6, 0]],
        dashArrayY: [6, 0]
      }, {
        color: sd,
        dashArrayX: [[1, 0], [1, 6]],
        dashArrayY: [1, 0, 6, 0],
        rotation: Math.PI / 4
      }, {
        color: sd,
        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: $J.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 FA = Pe(["tooltip", "label", "itemName", "itemId", "itemGroupId", "itemChildGroupId", "seriesName"]), La = "original", Br = "arrayRows", Na = "objectRows", ls = "keyedColumns", Ds = "typedArray", AJ = "unknown", Xo = "column", _p = "row", cr = {
  Must: 1,
  Might: 2,
  Not: 3
  // Other cases
}, EJ = bt();
function OLe(t) {
  EJ(t).datasetMap = Pe();
}
function MJ(t, e, n) {
  var r = {}, i = rk(e);
  if (!i || !t)
    return r;
  var a = [], o = [], s = e.ecModel, l = EJ(s).datasetMap, u = i.uid + "_" + n.seriesLayoutBy, c, f;
  t = t.slice(), k(t, function(v, g) {
    var m = Ie(v) ? v : t[g] = {
      name: v
    };
    m.type === "ordinal" && c == null && (c = g, f = p(m)), r[m.name] = [];
  });
  var d = l.get(u) || l.set(u, {
    categoryWayDim: f,
    valueWayDim: 0
  });
  k(t, function(v, g) {
    var m = v.name, y = p(v);
    if (c == null) {
      var b = d.valueWayDim;
      h(r[m], b, y), h(o, b, y), d.valueWayDim += y;
    } else if (c === g)
      h(r[m], 0, y), h(a, 0, y);
    else {
      var b = d.categoryWayDim;
      h(r[m], b, y), h(o, b, y), d.categoryWayDim += y;
    }
  });
  function h(v, g, m) {
    for (var y = 0; y < m; y++)
      v.push(g + y);
  }
  function p(v) {
    var g = v.dimsDef;
    return g ? g.length : 1;
  }
  return a.length && (r.itemName = a), o.length && (r.seriesName = o), r;
}
function nk(t, e, n) {
  var r = {}, i = rk(t);
  if (!i)
    return r;
  var a = e.sourceFormat, o = e.dimensionsDefine, s;
  (a === Na || a === ls) && k(o, function(c, f) {
    (Ie(c) ? c.name : c) === "name" && (s = f);
  });
  var l = function() {
    for (var c = {}, f = {}, d = [], h = 0, p = Math.min(5, n); h < p; h++) {
      var v = DJ(e.data, a, e.seriesLayoutBy, o, e.startIndex, h);
      d.push(v);
      var g = v === cr.Not;
      if (g && c.v == null && h !== s && (c.v = h), (c.n == null || c.n === c.v || !g && d[c.n] === cr.Not) && (c.n = h), m(c) && d[c.n] !== cr.Not)
        return c;
      g || (v === cr.Might && f.v == null && h !== s && (f.v = h), (f.n == null || f.n === f.v) && (f.n = h));
    }
    function m(y) {
      return y.v != null && y.n != null;
    }
    return m(c) ? c : m(f) ? f : null;
  }();
  if (l) {
    r.value = [l.v];
    var u = s ?? l.n;
    r.itemName = [u], r.seriesName = [u];
  }
  return r;
}
function rk(t) {
  var e = t.get("data", !0);
  if (!e)
    return N0(t.ecModel, "dataset", {
      index: t.get("datasetIndex", !0),
      id: t.get("datasetId", !0)
    }, Dn).models[0];
}
function SLe(t) {
  return !t.get("transform", !0) && !t.get("fromTransformResult", !0) ? [] : N0(t.ecModel, "dataset", {
    index: t.get("fromDatasetIndex", !0),
    id: t.get("fromDatasetId", !0)
  }, Dn).models;
}
function IJ(t, e) {
  return DJ(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
}
function DJ(t, e, n, r, i, a) {
  var o, s = 5;
  if (Nr(t))
    return cr.Not;
  var l, u;
  if (r) {
    var c = r[a];
    Ie(c) ? (l = c.name, u = c.type) : Oe(c) && (l = c);
  }
  if (u != null)
    return u === "ordinal" ? cr.Must : cr.Not;
  if (e === Br) {
    var f = t;
    if (n === _p) {
      for (var d = f[a], h = 0; h < (d || []).length && h < s; h++)
        if ((o = _(d[i + h])) != null)
          return o;
    } else
      for (var h = 0; h < f.length && h < s; h++) {
        var p = f[i + h];
        if (p && (o = _(p[a])) != null)
          return o;
      }
  } else if (e === Na) {
    var v = t;
    if (!l)
      return cr.Not;
    for (var h = 0; h < v.length && h < s; h++) {
      var g = v[h];
      if (g && (o = _(g[l])) != null)
        return o;
    }
  } else if (e === ls) {
    var m = t;
    if (!l)
      return cr.Not;
    var d = m[l];
    if (!d || Nr(d))
      return cr.Not;
    for (var h = 0; h < d.length && h < s; h++)
      if ((o = _(d[h])) != null)
        return o;
  } else if (e === La)
    for (var y = t, h = 0; h < y.length && h < s; h++) {
      var g = y[h], b = fp(g);
      if (!ue(b))
        return cr.Not;
      if ((o = _(b[a])) != null)
        return o;
    }
  function _(O) {
    var S = Oe(O);
    if (O != null && Number.isFinite(Number(O)) && O !== "")
      return S ? cr.Might : cr.Not;
    if (S && O !== "-")
      return cr.Must;
  }
  return cr.Not;
}
var WA = Pe();
function xLe(t, e) {
  ke(WA.get(t) == null && e), WA.set(t, e);
}
function wLe(t, e, n) {
  var r = WA.get(e);
  if (!r)
    return n;
  var i = r(t);
  if (!i)
    return n;
  if (process.env.NODE_ENV !== "production")
    for (var a = 0; a < i.length; a++)
      ke(Nh(i[a]));
  return n.concat(i);
}
var qB = bt(), CLe = bt(), ik = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getColorFromPalette = function(e, n, r) {
      var i = Qt(this.get("color", !0)), a = this.get("colorLayer", !0);
      return RJ(this, qB, i, a, e, n, r);
    }, t.prototype.clearColorPalette = function() {
      PLe(this, qB);
    }, t;
  }()
);
function QA(t, e, n, r) {
  var i = Qt(t.get(["aria", "decal", "decals"]));
  return RJ(t, CLe, i, null, e, n, r);
}
function TLe(t, e) {
  for (var n = t.length, r = 0; r < n; r++)
    if (t[r].length > e)
      return t[r];
  return t[n - 1];
}
function RJ(t, e, n, r, i, a, o) {
  a = a || t;
  var s = e(a), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
  if (u.hasOwnProperty(i))
    return u[i];
  var c = o == null || !r ? n : TLe(r, o);
  if (c = c || n, !(!c || !c.length)) {
    var f = c[l];
    return i && (u[i] = f), s.paletteIdx = (l + 1) % c.length, f;
  }
}
function PLe(t, e) {
  e(t).paletteIdx = 0, e(t).paletteNameMap = {};
}
var ib, av, KB, PT = "\0_ec_inner", JB = 1, $Le = {
  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"
}, ALe = {
  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"
}, hO = {};
function ELe(t) {
  k(t, function(e, n) {
    if (!rt.hasClass(n)) {
      var r = $Le[n];
      r && !hO[r] && (Cr("Component " + n + ` is used but not imported.
import { ` + r + ` } from 'echarts/components';
echarts.use([` + r + "]);"), hO[r] = !0);
    }
  });
}
var ak = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function(n, r, i, a, o, s) {
      a = a || {}, this.option = null, this._theme = new Wt(a), this._locale = new Wt(o), this._optionManager = s;
    }, e.prototype.setOption = function(n, r, i) {
      process.env.NODE_ENV !== "production" && (ke(n != null, "option is null/undefined"), ke(n[PT] !== JB, "please use chart.getOption()"));
      var a = nz(r);
      this._optionManager.setOption(n, i, a), this._resetOption(null, a);
    }, e.prototype.resetOption = function(n, r) {
      return this._resetOption(n, nz(r));
    }, e.prototype._resetOption = function(n, r) {
      var i = !1, a = this._optionManager;
      if (!n || n === "recreate") {
        var o = a.mountOption(n === "recreate");
        process.env.NODE_ENV !== "production" && ELe(o), !this.option || n === "recreate" ? KB(this, o) : (this.restoreData(), this._mergeOption(o, r)), i = !0;
      }
      if ((n === "timeline" || n === "media") && this.restoreData(), !n || n === "recreate" || n === "timeline") {
        var s = a.getTimelineOption(this);
        s && (i = !0, this._mergeOption(s, r));
      }
      if (!n || n === "recreate" || n === "media") {
        var l = a.getMediaOption(this);
        l.length && k(l, function(u) {
          i = !0, this._mergeOption(u, r);
        }, this);
      }
      return i;
    }, e.prototype.mergeOption = function(n) {
      this._mergeOption(n, null);
    }, e.prototype._mergeOption = function(n, r) {
      var i = this.option, a = this._componentsMap, o = this._componentsCount, s = [], l = Pe(), u = r && r.replaceMergeMainTypeMap;
      OLe(this), k(n, function(f, d) {
        f != null && (rt.hasClass(d) ? d && (s.push(d), l.set(d, !0)) : i[d] = i[d] == null ? Le(f) : qe(i[d], f, !0));
      }), u && u.each(function(f, d) {
        rt.hasClass(d) && !l.get(d) && (s.push(d), l.set(d, !0));
      }), rt.topologicalTravel(s, rt.getAllClassMainTypes(), c, this);
      function c(f) {
        var d = wLe(this, f, Qt(n[f])), h = a.get(f), p = (
          // `!oldCmptList` means init. See the comment in `mappingToExists`
          h ? u && u.get(f) ? "replaceMerge" : "normalMerge" : "replaceAll"
        ), v = hK(h, d, p);
        YDe(v, f, rt), i[f] = null, a.set(f, null), o.set(f, 0);
        var g = [], m = [], y = 0, b, _;
        k(v, function(O, S) {
          var x = O.existing, C = O.newOption;
          if (!C)
            x && (x.mergeOption({}, this), x.optionUpdated({}, !1));
          else {
            var T = f === "series", w = rt.getClass(
              f,
              O.keyInfo.subType,
              !T
              // Give a more detailed warn later if series don't exists
            );
            if (!w) {
              if (process.env.NODE_ENV !== "production") {
                var P = O.keyInfo.subType, $ = ALe[P];
                hO[P] || (hO[P] = !0, Cr($ ? "Series " + P + ` is used but not imported.
import { ` + $ + ` } from 'echarts/charts';
echarts.use([` + $ + "]);" : "Unknown series " + P));
              }
              return;
            }
            if (f === "tooltip") {
              if (b) {
                process.env.NODE_ENV !== "production" && (_ || (dn("Currently only one tooltip component is allowed."), _ = !0));
                return;
              }
              b = !0;
            }
            if (x && x.constructor === w)
              x.name = O.keyInfo.name, x.mergeOption(C, this), x.optionUpdated(C, !1);
            else {
              var A = le({
                componentIndex: S
              }, O.keyInfo);
              x = new w(C, this, this, A), le(x, A), O.brandNew && (x.__requireNewView = !0), x.init(C, this, this), x.optionUpdated(null, !0);
            }
          }
          x ? (g.push(x.option), m.push(x), y++) : (g.push(void 0), m.push(void 0));
        }, this), i[f] = g, a.set(f, m), o.set(f, y), f === "series" && ib(this);
      }
      this._seriesIndices || ib(this);
    }, e.prototype.getOption = function() {
      var n = Le(this.option);
      return k(n, function(r, i) {
        if (rt.hasClass(i)) {
          for (var a = Qt(r), o = a.length, s = !1, l = o - 1; l >= 0; l--)
            a[l] && !Nh(a[l]) ? s = !0 : (a[l] = null, !s && o--);
          a.length = o, n[i] = a;
        }
      }), delete n[PT], n;
    }, e.prototype.getTheme = function() {
      return this._theme;
    }, e.prototype.getLocaleModel = function() {
      return this._locale;
    }, e.prototype.setUpdatePayload = function(n) {
      this._payload = n;
    }, e.prototype.getUpdatePayload = function() {
      return this._payload;
    }, e.prototype.getComponent = function(n, r) {
      var i = this._componentsMap.get(n);
      if (i) {
        var a = i[r || 0];
        if (a)
          return a;
        if (r == null) {
          for (var o = 0; o < i.length; o++)
            if (i[o])
              return i[o];
        }
      }
    }, e.prototype.queryComponents = function(n) {
      var r = n.mainType;
      if (!r)
        return [];
      var i = n.index, a = n.id, o = n.name, s = this._componentsMap.get(r);
      if (!s || !s.length)
        return [];
      var l;
      return i != null ? (l = [], k(Qt(i), function(u) {
        s[u] && l.push(s[u]);
      })) : a != null ? l = ez("id", a, s) : o != null ? l = ez("name", o, s) : l = Nt(s, function(u) {
        return !!u;
      }), tz(l, n);
    }, e.prototype.findComponents = function(n) {
      var r = n.query, i = n.mainType, a = s(r), o = a ? this.queryComponents(a) : Nt(this._componentsMap.get(i), function(u) {
        return !!u;
      });
      return l(tz(o, n));
      function s(u) {
        var c = i + "Index", f = i + "Id", d = i + "Name";
        return u && (u[c] != null || u[f] != null || u[d] != null) ? {
          mainType: i,
          // subType will be filtered finally.
          index: u[c],
          id: u[f],
          name: u[d]
        } : null;
      }
      function l(u) {
        return n.filter ? Nt(u, n.filter) : u;
      }
    }, e.prototype.eachComponent = function(n, r, i) {
      var a = this._componentsMap;
      if (Me(n)) {
        var o = r, s = n;
        a.each(function(f, d) {
          for (var h = 0; f && h < f.length; h++) {
            var p = f[h];
            p && s.call(o, d, p, p.componentIndex);
          }
        });
      } else
        for (var l = Oe(n) ? a.get(n) : Ie(n) ? this.findComponents(n) : null, u = 0; l && u < l.length; u++) {
          var c = l[u];
          c && r.call(i, c, c.componentIndex);
        }
    }, e.prototype.getSeriesByName = function(n) {
      var r = Vn(n, null);
      return Nt(this._componentsMap.get("series"), function(i) {
        return !!i && r != null && i.name === r;
      });
    }, e.prototype.getSeriesByIndex = function(n) {
      return this._componentsMap.get("series")[n];
    }, e.prototype.getSeriesByType = function(n) {
      return Nt(this._componentsMap.get("series"), function(r) {
        return !!r && r.subType === n;
      });
    }, e.prototype.getSeries = function() {
      return Nt(this._componentsMap.get("series"), function(n) {
        return !!n;
      });
    }, e.prototype.getSeriesCount = function() {
      return this._componentsCount.get("series");
    }, e.prototype.eachSeries = function(n, r) {
      av(this), k(this._seriesIndices, function(i) {
        var a = this._componentsMap.get("series")[i];
        n.call(r, a, i);
      }, this);
    }, e.prototype.eachRawSeries = function(n, r) {
      k(this._componentsMap.get("series"), function(i) {
        i && n.call(r, i, i.componentIndex);
      });
    }, e.prototype.eachSeriesByType = function(n, r, i) {
      av(this), k(this._seriesIndices, function(a) {
        var o = this._componentsMap.get("series")[a];
        o.subType === n && r.call(i, o, a);
      }, this);
    }, e.prototype.eachRawSeriesByType = function(n, r, i) {
      return k(this.getSeriesByType(n), r, i);
    }, e.prototype.isSeriesFiltered = function(n) {
      return av(this), this._seriesIndicesMap.get(n.componentIndex) == null;
    }, e.prototype.getCurrentSeriesIndices = function() {
      return (this._seriesIndices || []).slice();
    }, e.prototype.filterSeries = function(n, r) {
      av(this);
      var i = [];
      k(this._seriesIndices, function(a) {
        var o = this._componentsMap.get("series")[a];
        n.call(r, o, a) && i.push(a);
      }, this), this._seriesIndices = i, this._seriesIndicesMap = Pe(i);
    }, e.prototype.restoreData = function(n) {
      ib(this);
      var r = this._componentsMap, i = [];
      r.each(function(a, o) {
        rt.hasClass(o) && i.push(o);
      }), rt.topologicalTravel(i, rt.getAllClassMainTypes(), function(a) {
        k(r.get(a), function(o) {
          o && (a !== "series" || !MLe(o, n)) && o.restoreData();
        });
      });
    }, e.internalField = function() {
      ib = function(n) {
        var r = n._seriesIndices = [];
        k(n._componentsMap.get("series"), function(i) {
          i && r.push(i.componentIndex);
        }), n._seriesIndicesMap = Pe(r);
      }, av = function(n) {
        if (process.env.NODE_ENV !== "production" && !n._seriesIndices)
          throw new Error("Option should contains series.");
      }, KB = function(n, r) {
        n.option = {}, n.option[PT] = JB, n._componentsMap = Pe({
          series: []
        }), n._componentsCount = Pe();
        var i = r.aria;
        Ie(i) && i.enabled == null && (i.enabled = !0), ILe(r, n._theme.option), qe(r, _Le, !1), n._mergeOption(r, null);
      };
    }(), e;
  }(Wt)
);
function MLe(t, e) {
  if (e) {
    var n = e.seriesIndex, r = e.seriesId, i = e.seriesName;
    return n != null && t.componentIndex !== n || r != null && t.id !== r || i != null && t.name !== i;
  }
}
function ILe(t, e) {
  var n = t.color && !t.colorLayer;
  k(e, function(r, i) {
    i === "colorLayer" && n || rt.hasClass(i) || (typeof r == "object" ? t[i] = t[i] ? qe(t[i], r, !1) : Le(r) : t[i] == null && (t[i] = r));
  });
}
function ez(t, e, n) {
  if (ue(e)) {
    var r = Pe();
    return k(e, function(a) {
      if (a != null) {
        var o = Vn(a, null);
        o != null && r.set(a, !0);
      }
    }), Nt(n, function(a) {
      return a && r.get(a[t]);
    });
  } else {
    var i = Vn(e, null);
    return Nt(n, function(a) {
      return a && i != null && a[t] === i;
    });
  }
}
function tz(t, e) {
  return e.hasOwnProperty("subType") ? Nt(t, function(n) {
    return n && n.subType === e.subType;
  }) : t;
}
function nz(t) {
  var e = Pe();
  return t && k(Qt(t.replaceMerge), function(n) {
    process.env.NODE_ENV !== "production" && ke(rt.hasClass(n), '"' + n + '" is not valid component main type in "replaceMerge"'), e.set(n, !0);
  }), {
    replaceMergeMainTypeMap: e
  };
}
xn(ak, ik);
var DLe = [
  "getDom",
  "getZr",
  "getWidth",
  "getHeight",
  "getDevicePixelRatio",
  "dispatchAction",
  "isSSR",
  "isDisposed",
  "on",
  "off",
  "getDataURL",
  "getConnectedDataURL",
  // 'getModel',
  "getOption",
  // 'getViewOfComponentModel',
  // 'getViewOfSeriesModel',
  "getId",
  "updateLabelLayout"
], kJ = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      k(DLe, function(n) {
        this[n] = xe(e[n], e);
      }, this);
    }
    return t;
  }()
), $T = {}, zf = (
  /** @class */
  function() {
    function t() {
      this._coordinateSystems = [];
    }
    return t.prototype.create = function(e, n) {
      var r = [];
      k($T, function(i, a) {
        var o = i.create(e, n);
        r = r.concat(o || []);
      }), this._coordinateSystems = r;
    }, t.prototype.update = function(e, n) {
      k(this._coordinateSystems, function(r) {
        r.update && r.update(e, n);
      });
    }, t.prototype.getCoordinateSystems = function() {
      return this._coordinateSystems.slice();
    }, t.register = function(e, n) {
      $T[e] = n;
    }, t.get = function(e) {
      return $T[e];
    }, t;
  }()
), RLe = /^(min|max)?(.+)$/, kLe = (
  /** @class */
  function() {
    function t(e) {
      this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
    }
    return t.prototype.setOption = function(e, n, r) {
      e && (k(Qt(e.series), function(o) {
        o && o.data && Nr(o.data) && vm(o.data);
      }), k(Qt(e.dataset), function(o) {
        o && o.source && Nr(o.source) && vm(o.source);
      })), e = Le(e);
      var i = this._optionBackup, a = LLe(e, n, !i);
      this._newBaseOption = a.baseOption, i ? (a.timelineOptions.length && (i.timelineOptions = a.timelineOptions), a.mediaList.length && (i.mediaList = a.mediaList), a.mediaDefault && (i.mediaDefault = a.mediaDefault)) : this._optionBackup = a;
    }, t.prototype.mountOption = function(e) {
      var n = this._optionBackup;
      return this._timelineOptions = n.timelineOptions, this._mediaList = n.mediaList, this._mediaDefault = n.mediaDefault, this._currentMediaIndices = [], Le(e ? n.baseOption : this._newBaseOption);
    }, t.prototype.getTimelineOption = function(e) {
      var n, r = this._timelineOptions;
      if (r.length) {
        var i = e.getComponent("timeline");
        i && (n = Le(
          // FIXME:TS as TimelineModel or quivlant interface
          r[i.getCurrentIndex()]
        ));
      }
      return n;
    }, t.prototype.getMediaOption = function(e) {
      var n = this._api.getWidth(), r = this._api.getHeight(), i = this._mediaList, a = this._mediaDefault, o = [], s = [];
      if (!i.length && !a)
        return s;
      for (var l = 0, u = i.length; l < u; l++)
        NLe(i[l].query, n, r) && o.push(l);
      return !o.length && a && (o = [-1]), o.length && !zLe(o, this._currentMediaIndices) && (s = ce(o, function(c) {
        return Le(c === -1 ? a.option : i[c].option);
      })), this._currentMediaIndices = o, s;
    }, t;
  }()
);
function LLe(t, e, n) {
  var r = [], i, a, o = t.baseOption, s = t.timeline, l = t.options, u = t.media, c = !!t.media, f = !!(l || s || o && o.timeline);
  o ? (a = o, a.timeline || (a.timeline = s)) : ((f || c) && (t.options = t.media = null), a = t), c && (ue(u) ? k(u, function(h) {
    process.env.NODE_ENV !== "production" && h && !h.option && Ie(h.query) && Ie(h.query.option) && Cr("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), h && h.option && (h.query ? r.push(h) : i || (i = h));
  }) : process.env.NODE_ENV !== "production" && Cr("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), d(a), k(l, function(h) {
    return d(h);
  }), k(r, function(h) {
    return d(h.option);
  });
  function d(h) {
    k(e, function(p) {
      p(h, n);
    });
  }
  return {
    baseOption: a,
    timelineOptions: l || [],
    mediaDefault: i,
    mediaList: r
  };
}
function NLe(t, e, n) {
  var r = {
    width: e,
    height: n,
    aspectratio: e / n
    // lower case for convenience.
  }, i = !0;
  return k(t, function(a, o) {
    var s = o.match(RLe);
    if (!(!s || !s[1] || !s[2])) {
      var l = s[1], u = s[2].toLowerCase();
      BLe(r[u], a, l) || (i = !1);
    }
  }), i;
}
function BLe(t, e, n) {
  return n === "min" ? t >= e : n === "max" ? t <= e : t === e;
}
function zLe(t, e) {
  return t.join(",") === e.join(",");
}
var ea = k, Pm = Ie, rz = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
function AT(t) {
  var e = t && t.itemStyle;
  if (e)
    for (var n = 0, r = rz.length; n < r; n++) {
      var i = rz[n], a = e.normal, o = e.emphasis;
      a && a[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.normal." + i, i), t[i] = t[i] || {}, t[i].normal ? qe(t[i].normal, a[i]) : t[i].normal = a[i], a[i] = null), o && o[i] && (process.env.NODE_ENV !== "production" && Cn("itemStyle.emphasis." + i, "emphasis." + i), t[i] = t[i] || {}, t[i].emphasis ? qe(t[i].emphasis, o[i]) : t[i].emphasis = o[i], o[i] = null);
    }
}
function Ir(t, e, n) {
  if (t && t[e] && (t[e].normal || t[e].emphasis)) {
    var r = t[e].normal, i = t[e].emphasis;
    r && (process.env.NODE_ENV !== "production" && Ea("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), n ? (t[e].normal = t[e].emphasis = null, Re(t[e], r)) : t[e] = r), i && (process.env.NODE_ENV !== "production" && Ea(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), t.emphasis = t.emphasis || {}, t.emphasis[e] = i, i.focus && (t.emphasis.focus = i.focus), i.blurScope && (t.emphasis.blurScope = i.blurScope));
  }
}
function Zv(t) {
  Ir(t, "itemStyle"), Ir(t, "lineStyle"), Ir(t, "areaStyle"), Ir(t, "label"), Ir(t, "labelLine"), Ir(t, "upperLabel"), Ir(t, "edgeLabel");
}
function En(t, e) {
  var n = Pm(t) && t[e], r = Pm(n) && n.textStyle;
  if (r) {
    process.env.NODE_ENV !== "production" && Ea("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
    for (var i = 0, a = sB.length; i < a; i++) {
      var o = sB[i];
      r.hasOwnProperty(o) && (n[o] = r[o]);
    }
  }
}
function la(t) {
  t && (Zv(t), En(t, "label"), t.emphasis && En(t.emphasis, "label"));
}
function VLe(t) {
  if (Pm(t)) {
    AT(t), Zv(t), En(t, "label"), En(t, "upperLabel"), En(t, "edgeLabel"), t.emphasis && (En(t.emphasis, "label"), En(t.emphasis, "upperLabel"), En(t.emphasis, "edgeLabel"));
    var e = t.markPoint;
    e && (AT(e), la(e));
    var n = t.markLine;
    n && (AT(n), la(n));
    var r = t.markArea;
    r && la(r);
    var i = t.data;
    if (t.type === "graph") {
      i = i || t.nodes;
      var a = t.links || t.edges;
      if (a && !Nr(a))
        for (var o = 0; o < a.length; o++)
          la(a[o]);
      k(t.categories, function(u) {
        Zv(u);
      });
    }
    if (i && !Nr(i))
      for (var o = 0; o < i.length; o++)
        la(i[o]);
    if (e = t.markPoint, e && e.data)
      for (var s = e.data, o = 0; o < s.length; o++)
        la(s[o]);
    if (n = t.markLine, n && n.data)
      for (var l = n.data, o = 0; o < l.length; o++)
        ue(l[o]) ? (la(l[o][0]), la(l[o][1])) : la(l[o]);
    t.type === "gauge" ? (En(t, "axisLabel"), En(t, "title"), En(t, "detail")) : t.type === "treemap" ? (Ir(t.breadcrumb, "itemStyle"), k(t.levels, function(u) {
      Zv(u);
    })) : t.type === "tree" && Zv(t.leaves);
  }
}
function ms(t) {
  return ue(t) ? t : t ? [t] : [];
}
function iz(t) {
  return (ue(t) ? t[0] : t) || {};
}
function FLe(t, e) {
  ea(ms(t.series), function(r) {
    Pm(r) && VLe(r);
  });
  var n = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  e && n.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), ea(n, function(r) {
    ea(ms(t[r]), function(i) {
      i && (En(i, "axisLabel"), En(i.axisPointer, "label"));
    });
  }), ea(ms(t.parallel), function(r) {
    var i = r && r.parallelAxisDefault;
    En(i, "axisLabel"), En(i && i.axisPointer, "label");
  }), ea(ms(t.calendar), function(r) {
    Ir(r, "itemStyle"), En(r, "dayLabel"), En(r, "monthLabel"), En(r, "yearLabel");
  }), ea(ms(t.radar), function(r) {
    En(r, "name"), r.name && r.axisName == null && (r.axisName = r.name, delete r.name, process.env.NODE_ENV !== "production" && Ea("name property in radar component has been changed to axisName")), r.nameGap != null && r.axisNameGap == null && (r.axisNameGap = r.nameGap, delete r.nameGap, process.env.NODE_ENV !== "production" && Ea("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && ea(r.indicator, function(i) {
      i.text && Cn("text", "name", "radar.indicator");
    });
  }), ea(ms(t.geo), function(r) {
    Pm(r) && (la(r), ea(ms(r.regions), function(i) {
      la(i);
    }));
  }), ea(ms(t.timeline), function(r) {
    la(r), Ir(r, "label"), Ir(r, "itemStyle"), Ir(r, "controlStyle", !0);
    var i = r.data;
    ue(i) && k(i, function(a) {
      Ie(a) && (Ir(a, "label"), Ir(a, "itemStyle"));
    });
  }), ea(ms(t.toolbox), function(r) {
    Ir(r, "iconStyle"), ea(r.feature, function(i) {
      Ir(i, "iconStyle");
    });
  }), En(iz(t.axisPointer), "label"), En(iz(t.tooltip).axisPointer, "label");
}
function WLe(t, e) {
  for (var n = e.split(","), r = t, i = 0; i < n.length && (r = r && r[n[i]], r != null); i++)
    ;
  return r;
}
function QLe(t, e, n, r) {
  for (var i = e.split(","), a = t, o, s = 0; s < i.length - 1; s++)
    o = i[s], a[o] == null && (a[o] = {}), a = a[o];
  a[i[s]] == null && (a[i[s]] = n);
}
function az(t) {
  t && k(HLe, function(e) {
    e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  });
}
var HLe = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], GLe = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], ET = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
function ov(t) {
  var e = t && t.itemStyle;
  if (e)
    for (var n = 0; n < ET.length; n++) {
      var r = ET[n][1], i = ET[n][0];
      e[r] != null && (e[i] = e[r], process.env.NODE_ENV !== "production" && Cn(r, i));
    }
}
function oz(t) {
  t && t.alignTo === "edge" && t.margin != null && t.edgeDistance == null && (process.env.NODE_ENV !== "production" && Cn("label.margin", "label.edgeDistance", "pie"), t.edgeDistance = t.margin);
}
function sz(t) {
  t && t.downplay && !t.blur && (t.blur = t.downplay, process.env.NODE_ENV !== "production" && Cn("downplay", "blur", "sunburst"));
}
function jLe(t) {
  t && t.focusNodeAdjacency != null && (t.emphasis = t.emphasis || {}, t.emphasis.focus == null && (process.env.NODE_ENV !== "production" && Cn("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), t.emphasis.focus = "adjacency"));
}
function LJ(t, e) {
  if (t)
    for (var n = 0; n < t.length; n++)
      e(t[n]), t[n] && LJ(t[n].children, e);
}
function NJ(t, e) {
  FLe(t, e), t.series = Qt(t.series), k(t.series, function(n) {
    if (Ie(n)) {
      var r = n.type;
      if (r === "line")
        n.clipOverflow != null && (n.clip = n.clipOverflow, process.env.NODE_ENV !== "production" && Cn("clipOverflow", "clip", "line"));
      else if (r === "pie" || r === "gauge") {
        n.clockWise != null && (n.clockwise = n.clockWise, process.env.NODE_ENV !== "production" && Cn("clockWise", "clockwise")), oz(n.label);
        var i = n.data;
        if (i && !Nr(i))
          for (var a = 0; a < i.length; a++)
            oz(i[a]);
        n.hoverOffset != null && (n.emphasis = n.emphasis || {}, (n.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && Cn("hoverOffset", "emphasis.scaleSize"), n.emphasis.scaleSize = n.hoverOffset));
      } else if (r === "gauge") {
        var o = WLe(n, "pointer.color");
        o != null && QLe(n, "itemStyle.color", o);
      } else if (r === "bar") {
        ov(n), ov(n.backgroundStyle), ov(n.emphasis);
        var i = n.data;
        if (i && !Nr(i))
          for (var a = 0; a < i.length; a++)
            typeof i[a] == "object" && (ov(i[a]), ov(i[a] && i[a].emphasis));
      } else if (r === "sunburst") {
        var s = n.highlightPolicy;
        s && (n.emphasis = n.emphasis || {}, n.emphasis.focus || (n.emphasis.focus = s, process.env.NODE_ENV !== "production" && Cn("highlightPolicy", "emphasis.focus", "sunburst"))), sz(n), LJ(n.data, sz);
      } else r === "graph" || r === "sankey" ? jLe(n) : r === "map" && (n.mapType && !n.map && (process.env.NODE_ENV !== "production" && Cn("mapType", "map", "map"), n.map = n.mapType), n.mapLocation && (process.env.NODE_ENV !== "production" && Ea("`mapLocation` is not used anymore."), Re(n, n.mapLocation)));
      n.hoverAnimation != null && (n.emphasis = n.emphasis || {}, n.emphasis && n.emphasis.scale == null && (process.env.NODE_ENV !== "production" && Cn("hoverAnimation", "emphasis.scale"), n.emphasis.scale = n.hoverAnimation)), az(n);
    }
  }), t.dataRange && (t.visualMap = t.dataRange), k(GLe, function(n) {
    var r = t[n];
    r && (ue(r) || (r = [r]), k(r, function(i) {
      az(i);
    }));
  });
}
function ZLe(t) {
  var e = Pe();
  t.eachSeries(function(n) {
    var r = n.get("stack");
    if (r) {
      var i = e.get(r) || e.set(r, []), a = n.getData(), o = {
        // Used for calculate axis extent automatically.
        // TODO: Type getCalculationInfo return more specific type?
        stackResultDimension: a.getCalculationInfo("stackResultDimension"),
        stackedOverDimension: a.getCalculationInfo("stackedOverDimension"),
        stackedDimension: a.getCalculationInfo("stackedDimension"),
        stackedByDimension: a.getCalculationInfo("stackedByDimension"),
        isStackedByIndex: a.getCalculationInfo("isStackedByIndex"),
        data: a,
        seriesModel: n
      };
      if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
        return;
      i.length && a.setCalculationInfo("stackedOnSeries", i[i.length - 1].seriesModel), i.push(o);
    }
  }), e.each(ULe);
}
function ULe(t) {
  k(t, function(e, n) {
    var r = [], i = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
    o.modify(a, function(u, c, f) {
      var d = o.get(e.stackedDimension, f);
      if (isNaN(d))
        return i;
      var h, p;
      s ? p = o.getRawIndex(f) : h = o.get(e.stackedByDimension, f);
      for (var v = NaN, g = n - 1; g >= 0; g--) {
        var m = t[g];
        if (s || (p = m.data.rawIndexOf(m.stackedByDimension, h)), p >= 0) {
          var y = m.data.getByRawIndex(m.stackResultDimension, p);
          if (l === "all" || l === "positive" && y > 0 || l === "negative" && y < 0 || l === "samesign" && d >= 0 && y > 0 || l === "samesign" && d <= 0 && y < 0) {
            d = NDe(d, y), v = y;
            break;
          }
        }
      }
      return r[0] = d, r[1] = v, r;
    });
  });
}
var ow = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.data = e.data || (e.sourceFormat === ls ? {} : []), this.sourceFormat = e.sourceFormat || AJ, this.seriesLayoutBy = e.seriesLayoutBy || Xo, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
      var n = this.dimensionsDefine = e.dimensionsDefine;
      if (n)
        for (var r = 0; r < n.length; r++) {
          var i = n[r];
          i.type == null && IJ(this, r) === cr.Must && (i.type = "ordinal");
        }
    }
    return t;
  }()
);
function ok(t) {
  return t instanceof ow;
}
function HA(t, e, n) {
  n = n || BJ(t);
  var r = e.seriesLayoutBy, i = YLe(t, n, r, e.sourceHeader, e.dimensions), a = new ow({
    data: t,
    sourceFormat: n,
    seriesLayoutBy: r,
    dimensionsDefine: i.dimensionsDefine,
    startIndex: i.startIndex,
    dimensionsDetectedCount: i.dimensionsDetectedCount,
    metaRawOption: Le(e)
  });
  return a;
}
function sk(t) {
  return new ow({
    data: t,
    sourceFormat: Nr(t) ? Ds : La
  });
}
function XLe(t) {
  return new ow({
    data: t.data,
    sourceFormat: t.sourceFormat,
    seriesLayoutBy: t.seriesLayoutBy,
    dimensionsDefine: Le(t.dimensionsDefine),
    startIndex: t.startIndex,
    dimensionsDetectedCount: t.dimensionsDetectedCount
  });
}
function BJ(t) {
  var e = AJ;
  if (Nr(t))
    e = Ds;
  else if (ue(t)) {
    t.length === 0 && (e = Br);
    for (var n = 0, r = t.length; n < r; n++) {
      var i = t[n];
      if (i != null) {
        if (ue(i) || Nr(i)) {
          e = Br;
          break;
        } else if (Ie(i)) {
          e = Na;
          break;
        }
      }
    }
  } else if (Ie(t)) {
    for (var a in t)
      if (Ce(t, a) && wr(t[a])) {
        e = ls;
        break;
      }
  }
  return e;
}
function YLe(t, e, n, r, i) {
  var a, o;
  if (!t)
    return {
      dimensionsDefine: lz(i),
      startIndex: o,
      dimensionsDetectedCount: a
    };
  if (e === Br) {
    var s = t;
    r === "auto" || r == null ? uz(function(u) {
      u != null && u !== "-" && (Oe(u) ? o == null && (o = 1) : o = 0);
    }, n, s, 10) : o = St(r) ? r : r ? 1 : 0, !i && o === 1 && (i = [], uz(function(u, c) {
      i[c] = u != null ? u + "" : "";
    }, n, s, 1 / 0)), a = i ? i.length : n === _p ? s.length : s[0] ? s[0].length : null;
  } else if (e === Na)
    i || (i = qLe(t));
  else if (e === ls)
    i || (i = [], k(t, function(u, c) {
      i.push(c);
    }));
  else if (e === La) {
    var l = fp(t[0]);
    a = ue(l) && l.length || 1;
  } else e === Ds && process.env.NODE_ENV !== "production" && ke(!!i, "dimensions must be given if data is TypedArray.");
  return {
    startIndex: o,
    dimensionsDefine: lz(i),
    dimensionsDetectedCount: a
  };
}
function qLe(t) {
  for (var e = 0, n; e < t.length && !(n = t[e++]); )
    ;
  if (n)
    return st(n);
}
function lz(t) {
  if (t) {
    var e = Pe();
    return ce(t, function(n, r) {
      n = Ie(n) ? n : {
        name: n
      };
      var i = {
        name: n.name,
        displayName: n.displayName,
        type: n.type
      };
      if (i.name == null)
        return i;
      i.name += "", i.displayName == null && (i.displayName = i.name);
      var a = e.get(i.name);
      return a ? i.name += "-" + a.count++ : e.set(i.name, {
        count: 1
      }), i;
    });
  }
}
function uz(t, e, n, r) {
  if (e === _p)
    for (var i = 0; i < n.length && i < r; i++)
      t(n[i] ? n[i][0] : null, i);
  else
    for (var a = n[0] || [], i = 0; i < a.length && i < r; i++)
      t(a[i], i);
}
function zJ(t) {
  var e = t.sourceFormat;
  return e === Na || e === ls;
}
var tc, nc, rc, cz, fz, VJ = (
  /** @class */
  function() {
    function t(e, n) {
      var r = ok(e) ? e : sk(e);
      this._source = r;
      var i = this._data = r.data;
      if (r.sourceFormat === Ds) {
        if (process.env.NODE_ENV !== "production" && n == null)
          throw new Error("Typed array data must specify dimension size");
        this._offset = 0, this._dimSize = n, this._data = i;
      }
      fz(this, i, r);
    }
    return t.prototype.getSource = function() {
      return this._source;
    }, t.prototype.count = function() {
      return 0;
    }, t.prototype.getItem = function(e, n) {
    }, t.prototype.appendData = function(e) {
    }, t.prototype.clean = function() {
    }, t.protoInitialize = function() {
      var e = t.prototype;
      e.pure = !1, e.persistent = !0;
    }(), t.internalField = function() {
      var e;
      fz = function(o, s, l) {
        var u = l.sourceFormat, c = l.seriesLayoutBy, f = l.startIndex, d = l.dimensionsDefine, h = cz[lk(u, c)];
        if (process.env.NODE_ENV !== "production" && ke(h, "Invalide sourceFormat: " + u), le(o, h), u === Ds)
          o.getItem = n, o.count = i, o.fillStorage = r;
        else {
          var p = FJ(u, c);
          o.getItem = xe(p, null, s, f, d);
          var v = WJ(u, c);
          o.count = xe(v, null, s, f, d);
        }
      };
      var n = function(o, s) {
        o = o - this._offset, s = s || [];
        for (var l = this._data, u = this._dimSize, c = u * o, f = 0; f < u; f++)
          s[f] = l[c + f];
        return s;
      }, r = function(o, s, l, u) {
        for (var c = this._data, f = this._dimSize, d = 0; d < f; d++) {
          for (var h = u[d], p = h[0] == null ? 1 / 0 : h[0], v = h[1] == null ? -1 / 0 : h[1], g = s - o, m = l[d], y = 0; y < g; y++) {
            var b = c[y * f + d];
            m[o + y] = b, b < p && (p = b), b > v && (v = b);
          }
          h[0] = p, h[1] = v;
        }
      }, i = function() {
        return this._data ? this._data.length / this._dimSize : 0;
      };
      cz = (e = {}, e[Br + "_" + Xo] = {
        pure: !0,
        appendData: a
      }, e[Br + "_" + _p] = {
        pure: !0,
        appendData: function() {
          throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
        }
      }, e[Na] = {
        pure: !0,
        appendData: a
      }, e[ls] = {
        pure: !0,
        appendData: function(o) {
          var s = this._data;
          k(o, function(l, u) {
            for (var c = s[u] || (s[u] = []), f = 0; f < (l || []).length; f++)
              c.push(l[f]);
          });
        }
      }, e[La] = {
        appendData: a
      }, e[Ds] = {
        persistent: !1,
        pure: !0,
        appendData: function(o) {
          process.env.NODE_ENV !== "production" && ke(Nr(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
        },
        // Clean self if data is already used.
        clean: function() {
          this._offset += this.count(), this._data = null;
        }
      }, e);
      function a(o) {
        for (var s = 0; s < o.length; s++)
          this._data.push(o[s]);
      }
    }(), t;
  }()
), dz = function(t, e, n, r) {
  return t[r];
}, KLe = (tc = {}, tc[Br + "_" + Xo] = function(t, e, n, r) {
  return t[r + e];
}, tc[Br + "_" + _p] = function(t, e, n, r, i) {
  r += e;
  for (var a = i || [], o = t, s = 0; s < o.length; s++) {
    var l = o[s];
    a[s] = l ? l[r] : null;
  }
  return a;
}, tc[Na] = dz, tc[ls] = function(t, e, n, r, i) {
  for (var a = i || [], o = 0; o < n.length; o++) {
    var s = n[o].name;
    if (process.env.NODE_ENV !== "production" && s == null)
      throw new Error();
    var l = t[s];
    a[o] = l ? l[r] : null;
  }
  return a;
}, tc[La] = dz, tc);
function FJ(t, e) {
  var n = KLe[lk(t, e)];
  return process.env.NODE_ENV !== "production" && ke(n, 'Do not support get item on "' + t + '", "' + e + '".'), n;
}
var hz = function(t, e, n) {
  return t.length;
}, JLe = (nc = {}, nc[Br + "_" + Xo] = function(t, e, n) {
  return Math.max(0, t.length - e);
}, nc[Br + "_" + _p] = function(t, e, n) {
  var r = t[0];
  return r ? Math.max(0, r.length - e) : 0;
}, nc[Na] = hz, nc[ls] = function(t, e, n) {
  var r = n[0].name;
  if (process.env.NODE_ENV !== "production" && r == null)
    throw new Error();
  var i = t[r];
  return i ? i.length : 0;
}, nc[La] = hz, nc);
function WJ(t, e) {
  var n = JLe[lk(t, e)];
  return process.env.NODE_ENV !== "production" && ke(n, 'Do not support count on "' + t + '", "' + e + '".'), n;
}
var MT = function(t, e, n) {
  return t[e];
}, e4e = (rc = {}, rc[Br] = MT, rc[Na] = function(t, e, n) {
  return t[n];
}, rc[ls] = MT, rc[La] = function(t, e, n) {
  var r = fp(t);
  return r instanceof Array ? r[e] : r;
}, rc[Ds] = MT, rc);
function QJ(t) {
  var e = e4e[t];
  return process.env.NODE_ENV !== "production" && ke(e, 'Do not support get value on "' + t + '".'), e;
}
function lk(t, e) {
  return t === Br ? t + "_" + e : t;
}
function Vh(t, e, n) {
  if (t) {
    var r = t.getRawDataItem(e);
    if (r != null) {
      var i = t.getStore(), a = i.getSource().sourceFormat;
      if (n != null) {
        var o = t.getDimensionIndex(n), s = i.getDimensionProperty(o);
        return QJ(a)(r, o, s);
      } else {
        var l = r;
        return a === La && (l = fp(r)), l;
      }
    }
  }
}
var t4e = /\{@(.+?)\}/g, sw = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getDataParams = function(e, n) {
      var r = this.getData(n), i = this.getRawValue(e, n), a = r.getRawIndex(e), o = r.getName(e), s = r.getRawDataItem(e), l = r.getItemVisual(e, "style"), u = l && l[r.getItemVisual(e, "drawType") || "fill"], c = l && l.stroke, f = this.mainType, d = f === "series", h = r.userOutput && r.userOutput.get();
      return {
        componentType: f,
        componentSubType: this.subType,
        componentIndex: this.componentIndex,
        seriesType: d ? this.subType : null,
        seriesIndex: this.seriesIndex,
        seriesId: d ? this.id : null,
        seriesName: d ? this.name : null,
        name: o,
        dataIndex: a,
        data: s,
        dataType: n,
        value: i,
        color: u,
        borderColor: c,
        dimensionNames: h ? h.fullDimensions : null,
        encode: h ? h.encode : null,
        // Param name list for mapping `a`, `b`, `c`, `d`, `e`
        $vars: ["seriesName", "name", "value"]
      };
    }, t.prototype.getFormattedLabel = function(e, n, r, i, a, o) {
      n = n || "normal";
      var s = this.getData(r), l = this.getDataParams(e, r);
      if (o && (l.value = o.interpolatedValue), i != null && ue(l.value) && (l.value = l.value[i]), !a) {
        var u = s.getItemModel(e);
        a = u.get(n === "normal" ? ["label", "formatter"] : [n, "label", "formatter"]);
      }
      if (Me(a))
        return l.status = n, l.dimensionIndex = i, a(l);
      if (Oe(a)) {
        var c = ek(a, l);
        return c.replace(t4e, function(f, d) {
          var h = d.length, p = d;
          p.charAt(0) === "[" && p.charAt(h - 1) === "]" && (p = +p.slice(1, h - 1), process.env.NODE_ENV !== "production" && isNaN(p) && Cr("Invalide label formatter: @" + d + ", only support @[0], @[1], @[2], ..."));
          var v = Vh(s, e, p);
          if (o && ue(o.interpolatedValue)) {
            var g = s.getDimensionIndex(p);
            g >= 0 && (v = o.interpolatedValue[g]);
          }
          return v != null ? v + "" : "";
        });
      }
    }, t.prototype.getRawValue = function(e, n) {
      return Vh(this.getData(n), e);
    }, t.prototype.formatTooltip = function(e, n, r) {
    }, t;
  }()
);
function pz(t) {
  var e, n;
  return Ie(t) ? t.type ? n = t : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + ti(t)) : e = t, {
    text: e,
    // markers: markers || markersExisting,
    frag: n
  };
}
function Dg(t) {
  return new n4e(t);
}
var n4e = (
  /** @class */
  function() {
    function t(e) {
      e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
    }
    return t.prototype.perform = function(e) {
      var n = this._upstream, r = e && e.skip;
      if (this._dirty && n) {
        var i = this.context;
        i.data = i.outputData = n.context.outputData;
      }
      this.__pipeline && (this.__pipeline.currentTask = this);
      var a;
      this._plan && !r && (a = this._plan(this.context));
      var o = c(this._modBy), s = this._modDataCount || 0, l = c(e && e.modBy), u = e && e.modDataCount || 0;
      (o !== l || s !== u) && (a = "reset");
      function c(y) {
        return !(y >= 1) && (y = 1), y;
      }
      var f;
      (this._dirty || a === "reset") && (this._dirty = !1, f = this._doReset(r)), this._modBy = l, this._modDataCount = u;
      var d = e && e.step;
      if (n ? (process.env.NODE_ENV !== "production" && ke(n._outputDueEnd != null), this._dueEnd = n._outputDueEnd) : (process.env.NODE_ENV !== "production" && ke(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
        var h = this._dueIndex, p = Math.min(d != null ? this._dueIndex + d : 1 / 0, this._dueEnd);
        if (!r && (f || h < p)) {
          var v = this._progress;
          if (ue(v))
            for (var g = 0; g < v.length; g++)
              this._doProgress(v[g], h, p, l, u);
          else
            this._doProgress(v, h, p, l, u);
        }
        this._dueIndex = p;
        var m = this._settedOutputEnd != null ? this._settedOutputEnd : p;
        process.env.NODE_ENV !== "production" && ke(m >= this._outputDueEnd), this._outputDueEnd = m;
      } else
        this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
      return this.unfinished();
    }, t.prototype.dirty = function() {
      this._dirty = !0, this._onDirty && this._onDirty(this.context);
    }, t.prototype._doProgress = function(e, n, r, i, a) {
      vz.reset(n, r, i, a), this._callingProgress = e, this._callingProgress({
        start: n,
        end: r,
        count: r - n,
        next: vz.next
      }, this.context);
    }, t.prototype._doReset = function(e) {
      this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
      var n, r;
      !e && this._reset && (n = this._reset(this.context), n && n.progress && (r = n.forceFirstProgress, n = n.progress), ue(n) && !n.length && (n = null)), this._progress = n, this._modBy = this._modDataCount = null;
      var i = this._downstream;
      return i && i.dirty(), r;
    }, t.prototype.unfinished = function() {
      return this._progress && this._dueIndex < this._dueEnd;
    }, t.prototype.pipe = function(e) {
      process.env.NODE_ENV !== "production" && ke(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
    }, t.prototype.dispose = function() {
      this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
    }, t.prototype.getUpstream = function() {
      return this._upstream;
    }, t.prototype.getDownstream = function() {
      return this._downstream;
    }, t.prototype.setOutputEnd = function(e) {
      this._outputDueEnd = this._settedOutputEnd = e;
    }, t;
  }()
), vz = /* @__PURE__ */ function() {
  var t, e, n, r, i, a = {
    reset: function(l, u, c, f) {
      e = l, t = u, n = c, r = f, i = Math.ceil(r / n), a.next = n > 1 && r > 0 ? s : o;
    }
  };
  return a;
  function o() {
    return e < t ? e++ : null;
  }
  function s() {
    var l = e % i * n + Math.ceil(e / i), u = e >= t ? null : l < r ? l : e;
    return e++, u;
  }
}();
function Kl(t, e) {
  var n = e && e.type;
  return n === "ordinal" ? t : (n === "time" && !St(t) && t != null && t !== "-" && (t = +Yi(t)), t == null || t === "" ? NaN : Number(t));
}
var r4e = Pe({
  number: function(t) {
    return parseFloat(t);
  },
  time: function(t) {
    return +Yi(t);
  },
  trim: function(t) {
    return Oe(t) ? ma(t) : t;
  }
});
function HJ(t) {
  return r4e.get(t);
}
var GJ = {
  lt: function(t, e) {
    return t < e;
  },
  lte: function(t, e) {
    return t <= e;
  },
  gt: function(t, e) {
    return t > e;
  },
  gte: function(t, e) {
    return t >= e;
  }
}, i4e = (
  /** @class */
  function() {
    function t(e, n) {
      if (!St(n)) {
        var r = "";
        process.env.NODE_ENV !== "production" && (r = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Et(r);
      }
      this._opFn = GJ[e], this._rvalFloat = is(n);
    }
    return t.prototype.evaluate = function(e) {
      return St(e) ? this._opFn(e, this._rvalFloat) : this._opFn(is(e), this._rvalFloat);
    }, t;
  }()
), jJ = (
  /** @class */
  function() {
    function t(e, n) {
      var r = e === "desc";
      this._resultLT = r ? 1 : -1, n == null && (n = r ? "min" : "max"), this._incomparable = n === "min" ? -1 / 0 : 1 / 0;
    }
    return t.prototype.evaluate = function(e, n) {
      var r = St(e) ? e : is(e), i = St(n) ? n : is(n), a = isNaN(r), o = isNaN(i);
      if (a && (r = this._incomparable), o && (i = this._incomparable), a && o) {
        var s = Oe(e), l = Oe(n);
        s && (r = l ? e : 0), l && (i = s ? n : 0);
      }
      return r < i ? this._resultLT : r > i ? -this._resultLT : 0;
    }, t;
  }()
), a4e = (
  /** @class */
  function() {
    function t(e, n) {
      this._rval = n, this._isEQ = e, this._rvalTypeof = typeof n, this._rvalFloat = is(n);
    }
    return t.prototype.evaluate = function(e) {
      var n = e === this._rval;
      if (!n) {
        var r = typeof e;
        r !== this._rvalTypeof && (r === "number" || this._rvalTypeof === "number") && (n = is(e) === this._rvalFloat);
      }
      return this._isEQ ? n : !n;
    }, t;
  }()
);
function o4e(t, e) {
  return t === "eq" || t === "ne" ? new a4e(t === "eq", e) : Ce(GJ, t) ? new i4e(t, e) : null;
}
var s4e = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getRawData = function() {
      throw new Error("not supported");
    }, t.prototype.getRawDataItem = function(e) {
      throw new Error("not supported");
    }, t.prototype.cloneRawData = function() {
    }, t.prototype.getDimensionInfo = function(e) {
    }, t.prototype.cloneAllDimensionInfo = function() {
    }, t.prototype.count = function() {
    }, t.prototype.retrieveValue = function(e, n) {
    }, t.prototype.retrieveValueFromItem = function(e, n) {
    }, t.prototype.convertValue = function(e, n) {
      return Kl(e, n);
    }, t;
  }()
);
function l4e(t, e) {
  var n = new s4e(), r = t.data, i = n.sourceFormat = t.sourceFormat, a = t.startIndex, o = "";
  t.seriesLayoutBy !== Xo && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Et(o));
  var s = [], l = {}, u = t.dimensionsDefine;
  if (u)
    k(u, function(v, g) {
      var m = v.name, y = {
        index: g,
        name: m,
        displayName: v.displayName
      };
      if (s.push(y), m != null) {
        var b = "";
        Ce(l, m) && (process.env.NODE_ENV !== "production" && (b = 'dimension name "' + m + '" duplicated.'), Et(b)), l[m] = y;
      }
    });
  else
    for (var c = 0; c < t.dimensionsDetectedCount; c++)
      s.push({
        index: c
      });
  var f = FJ(i, Xo);
  e.__isBuiltIn && (n.getRawDataItem = function(v) {
    return f(r, a, s, v);
  }, n.getRawData = xe(u4e, null, t)), n.cloneRawData = xe(c4e, null, t);
  var d = WJ(i, Xo);
  n.count = xe(d, null, r, a, s);
  var h = QJ(i);
  n.retrieveValue = function(v, g) {
    var m = f(r, a, s, v);
    return p(m, g);
  };
  var p = n.retrieveValueFromItem = function(v, g) {
    if (v != null) {
      var m = s[g];
      if (m)
        return h(v, g, m.name);
    }
  };
  return n.getDimensionInfo = xe(f4e, null, s, l), n.cloneAllDimensionInfo = xe(d4e, null, s), n;
}
function u4e(t) {
  var e = t.sourceFormat;
  if (!uk(e)) {
    var n = "";
    process.env.NODE_ENV !== "production" && (n = "`getRawData` is not supported in source format " + e), Et(n);
  }
  return t.data;
}
function c4e(t) {
  var e = t.sourceFormat, n = t.data;
  if (!uk(e)) {
    var r = "";
    process.env.NODE_ENV !== "production" && (r = "`cloneRawData` is not supported in source format " + e), Et(r);
  }
  if (e === Br) {
    for (var i = [], a = 0, o = n.length; a < o; a++)
      i.push(n[a].slice());
    return i;
  } else if (e === Na) {
    for (var i = [], a = 0, o = n.length; a < o; a++)
      i.push(le({}, n[a]));
    return i;
  }
}
function f4e(t, e, n) {
  if (n != null) {
    if (St(n) || !isNaN(n) && !Ce(e, n))
      return t[n];
    if (Ce(e, n))
      return e[n];
  }
}
function d4e(t) {
  return Le(t);
}
var ZJ = Pe();
function h4e(t) {
  t = Le(t);
  var e = t.type, n = "";
  e || (process.env.NODE_ENV !== "production" && (n = "Must have a `type` when `registerTransform`."), Et(n));
  var r = e.split(":");
  r.length !== 2 && (process.env.NODE_ENV !== "production" && (n = 'Name must include namespace like "ns:regression".'), Et(n));
  var i = !1;
  r[0] === "echarts" && (e = r[1], i = !0), t.__isBuiltIn = i, ZJ.set(e, t);
}
function p4e(t, e, n) {
  var r = Qt(t), i = r.length, a = "";
  i || (process.env.NODE_ENV !== "production" && (a = "If `transform` declared, it should at least contain one transform."), Et(a));
  for (var o = 0, s = i; o < s; o++) {
    var l = r[o];
    e = v4e(l, e, n, i === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
  }
  return e;
}
function v4e(t, e, n, r) {
  var i = "";
  e.length || (process.env.NODE_ENV !== "production" && (i = "Must have at least one upstream dataset."), Et(i)), Ie(t) || (process.env.NODE_ENV !== "production" && (i = "transform declaration must be an object rather than " + typeof t + "."), Et(i));
  var a = t.type, o = ZJ.get(a);
  o || (process.env.NODE_ENV !== "production" && (i = 'Can not find transform on type "' + a + '".'), Et(i));
  var s = ce(e, function(c) {
    return l4e(c, o);
  }), l = Qt(o.transform({
    upstream: s[0],
    upstreamList: s,
    config: Le(t.config)
  }));
  if (process.env.NODE_ENV !== "production" && t.print) {
    var u = ce(l, function(c) {
      var f = r != null ? " === pipe index: " + r : "";
      return ["=== dataset index: " + n.datasetIndex + f + " ===", "- transform result data:", ti(c.data), "- transform result dimensions:", ti(c.dimensions)].join(`
`);
    }).join(`
`);
    FDe(u);
  }
  return ce(l, function(c, f) {
    var d = "";
    Ie(c) || (process.env.NODE_ENV !== "production" && (d = "A transform should not return some empty results."), Et(d)), c.data || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be not be null or undefined"), Et(d));
    var h = BJ(c.data);
    uk(h) || (process.env.NODE_ENV !== "production" && (d = "Transform result data should be array rows or object rows."), Et(d));
    var p, v = e[0];
    if (v && f === 0 && !c.dimensions) {
      var g = v.startIndex;
      g && (c.data = v.data.slice(0, g).concat(c.data)), p = {
        seriesLayoutBy: Xo,
        sourceHeader: g,
        dimensions: v.metaRawOption.dimensions
      };
    } else
      p = {
        seriesLayoutBy: Xo,
        sourceHeader: 0,
        dimensions: c.dimensions
      };
    return HA(c.data, p, null);
  });
}
function uk(t) {
  return t === Br || t === Na;
}
var lw = "undefined", g4e = typeof Uint32Array === lw ? Array : Uint32Array, m4e = typeof Uint16Array === lw ? Array : Uint16Array, UJ = typeof Int32Array === lw ? Array : Int32Array, gz = typeof Float64Array === lw ? Array : Float64Array, XJ = {
  float: gz,
  int: UJ,
  // Ordinal data type can be string or int
  ordinal: Array,
  number: Array,
  time: gz
}, IT;
function sv(t) {
  return t > 65535 ? g4e : m4e;
}
function ld() {
  return [1 / 0, -1 / 0];
}
function y4e(t) {
  var e = t.constructor;
  return e === Array ? t.slice() : new e(t);
}
function mz(t, e, n, r, i) {
  var a = XJ[n || "float"];
  if (i) {
    var o = t[e], s = o && o.length;
    if (s !== r) {
      for (var l = new a(r), u = 0; u < s; u++)
        l[u] = o[u];
      t[e] = l;
    }
  } else
    t[e] = new a(r);
}
var GA = (
  /** @class */
  function() {
    function t() {
      this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = Pe();
    }
    return t.prototype.initData = function(e, n, r) {
      process.env.NODE_ENV !== "production" && ke(Me(e.getItem) && Me(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
      var i = e.getSource(), a = this.defaultDimValueGetter = IT[i.sourceFormat];
      this._dimValueGetter = r || a, this._rawExtent = [];
      var o = zJ(i);
      this._dimensions = ce(n, function(s) {
        return process.env.NODE_ENV !== "production" && o && ke(s.property != null), {
          // Only pick these two props. Not leak other properties like orderMeta.
          type: s.type,
          property: s.property
        };
      }), this._initDataFromProvider(0, e.count());
    }, t.prototype.getProvider = function() {
      return this._provider;
    }, t.prototype.getSource = function() {
      return this._provider.getSource();
    }, t.prototype.ensureCalculationDimension = function(e, n) {
      var r = this._calcDimNameToIdx, i = this._dimensions, a = r.get(e);
      if (a != null) {
        if (i[a].type === n)
          return a;
      } else
        a = i.length;
      return i[a] = {
        type: n
      }, r.set(e, a), this._chunks[a] = new XJ[n || "float"](this._rawCount), this._rawExtent[a] = ld(), a;
    }, t.prototype.collectOrdinalMeta = function(e, n) {
      var r = this._chunks[e], i = this._dimensions[e], a = this._rawExtent, o = i.ordinalOffset || 0, s = r.length;
      o === 0 && (a[e] = ld());
      for (var l = a[e], u = o; u < s; u++) {
        var c = r[u] = n.parseAndCollect(r[u]);
        isNaN(c) || (l[0] = Math.min(c, l[0]), l[1] = Math.max(c, l[1]));
      }
      i.ordinalMeta = n, i.ordinalOffset = s, i.type = "ordinal";
    }, t.prototype.getOrdinalMeta = function(e) {
      var n = this._dimensions[e], r = n.ordinalMeta;
      return r;
    }, t.prototype.getDimensionProperty = function(e) {
      var n = this._dimensions[e];
      return n && n.property;
    }, t.prototype.appendData = function(e) {
      process.env.NODE_ENV !== "production" && ke(!this._indices, "appendData can only be called on raw data.");
      var n = this._provider, r = this.count();
      n.appendData(e);
      var i = n.count();
      return n.persistent || (i += r), r < i && this._initDataFromProvider(r, i, !0), [r, i];
    }, t.prototype.appendValues = function(e, n) {
      for (var r = this._chunks, i = this._dimensions, a = i.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, n || 0), u = 0; u < a; u++) {
        var c = i[u];
        mz(r, u, c.type, l, !0);
      }
      for (var f = [], d = s; d < l; d++)
        for (var h = d - s, p = 0; p < a; p++) {
          var c = i[p], v = IT.arrayRows.call(this, e[h] || f, c.property, h, p);
          r[p][d] = v;
          var g = o[p];
          v < g[0] && (g[0] = v), v > g[1] && (g[1] = v);
        }
      return this._rawCount = this._count = l, {
        start: s,
        end: l
      };
    }, t.prototype._initDataFromProvider = function(e, n, r) {
      for (var i = this._provider, a = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = ce(o, function(y) {
        return y.property;
      }), c = 0; c < s; c++) {
        var f = o[c];
        l[c] || (l[c] = ld()), mz(a, c, f.type, n, r);
      }
      if (i.fillStorage)
        i.fillStorage(e, n, a, l);
      else
        for (var d = [], h = e; h < n; h++) {
          d = i.getItem(h, d);
          for (var p = 0; p < s; p++) {
            var v = a[p], g = this._dimValueGetter(d, u[p], h, p);
            v[h] = g;
            var m = l[p];
            g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
          }
        }
      !i.persistent && i.clean && i.clean(), this._rawCount = this._count = n, this._extent = [];
    }, t.prototype.count = function() {
      return this._count;
    }, t.prototype.get = function(e, n) {
      if (!(n >= 0 && n < this._count))
        return NaN;
      var r = this._chunks[e];
      return r ? r[this.getRawIndex(n)] : NaN;
    }, t.prototype.getValues = function(e, n) {
      var r = [], i = [];
      if (n == null) {
        n = e, e = [];
        for (var a = 0; a < this._dimensions.length; a++)
          i.push(a);
      } else
        i = e;
      for (var a = 0, o = i.length; a < o; a++)
        r.push(this.get(i[a], n));
      return r;
    }, t.prototype.getByRawIndex = function(e, n) {
      if (!(n >= 0 && n < this._rawCount))
        return NaN;
      var r = this._chunks[e];
      return r ? r[n] : NaN;
    }, t.prototype.getSum = function(e) {
      var n = this._chunks[e], r = 0;
      if (n)
        for (var i = 0, a = this.count(); i < a; i++) {
          var o = this.get(e, i);
          isNaN(o) || (r += o);
        }
      return r;
    }, t.prototype.getMedian = function(e) {
      var n = [];
      this.each([e], function(a) {
        isNaN(a) || n.push(a);
      });
      var r = n.sort(function(a, o) {
        return a - o;
      }), i = this.count();
      return i === 0 ? 0 : i % 2 === 1 ? r[(i - 1) / 2] : (r[i / 2] + r[i / 2 - 1]) / 2;
    }, t.prototype.indexOfRawIndex = function(e) {
      if (e >= this._rawCount || e < 0)
        return -1;
      if (!this._indices)
        return e;
      var n = this._indices, r = n[e];
      if (r != null && r < this._count && r === e)
        return e;
      for (var i = 0, a = this._count - 1; i <= a; ) {
        var o = (i + a) / 2 | 0;
        if (n[o] < e)
          i = o + 1;
        else if (n[o] > e)
          a = o - 1;
        else
          return o;
      }
      return -1;
    }, t.prototype.indicesOfNearest = function(e, n, r) {
      var i = this._chunks, a = i[e], o = [];
      if (!a)
        return o;
      r == null && (r = 1 / 0);
      for (var s = 1 / 0, l = -1, u = 0, c = 0, f = this.count(); c < f; c++) {
        var d = this.getRawIndex(c), h = n - a[d], p = Math.abs(h);
        p <= r && ((p < s || p === s && h >= 0 && l < 0) && (s = p, l = h, u = 0), h === l && (o[u++] = c));
      }
      return o.length = u, o;
    }, t.prototype.getIndices = function() {
      var e, n = this._indices;
      if (n) {
        var r = n.constructor, i = this._count;
        if (r === Array) {
          e = new r(i);
          for (var a = 0; a < i; a++)
            e[a] = n[a];
        } else
          e = new r(n.buffer, 0, i);
      } else {
        var r = sv(this._rawCount);
        e = new r(this.count());
        for (var a = 0; a < e.length; a++)
          e[a] = a;
      }
      return e;
    }, t.prototype.filter = function(e, n) {
      if (!this._count)
        return this;
      for (var r = this.clone(), i = r.count(), a = sv(r._rawCount), o = new a(i), s = [], l = e.length, u = 0, c = e[0], f = r._chunks, d = 0; d < i; d++) {
        var h = void 0, p = r.getRawIndex(d);
        if (l === 0)
          h = n(d);
        else if (l === 1) {
          var v = f[c][p];
          h = n(v, d);
        } else {
          for (var g = 0; g < l; g++)
            s[g] = f[e[g]][p];
          s[g] = d, h = n.apply(null, s);
        }
        h && (o[u++] = p);
      }
      return u < i && (r._indices = o), r._count = u, r._extent = [], r._updateGetRawIdx(), r;
    }, t.prototype.selectRange = function(e) {
      var n = this.clone(), r = n._count;
      if (!r)
        return this;
      var i = st(e), a = i.length;
      if (!a)
        return this;
      var o = n.count(), s = sv(n._rawCount), l = new s(o), u = 0, c = i[0], f = e[c][0], d = e[c][1], h = n._chunks, p = !1;
      if (!n._indices) {
        var v = 0;
        if (a === 1) {
          for (var g = h[i[0]], m = 0; m < r; m++) {
            var y = g[m];
            (y >= f && y <= d || isNaN(y)) && (l[u++] = v), v++;
          }
          p = !0;
        } else if (a === 2) {
          for (var g = h[i[0]], b = h[i[1]], _ = e[i[1]][0], O = e[i[1]][1], m = 0; m < r; m++) {
            var y = g[m], S = b[m];
            (y >= f && y <= d || isNaN(y)) && (S >= _ && S <= O || isNaN(S)) && (l[u++] = v), v++;
          }
          p = !0;
        }
      }
      if (!p)
        if (a === 1)
          for (var m = 0; m < o; m++) {
            var x = n.getRawIndex(m), y = h[i[0]][x];
            (y >= f && y <= d || isNaN(y)) && (l[u++] = x);
          }
        else
          for (var m = 0; m < o; m++) {
            for (var C = !0, x = n.getRawIndex(m), T = 0; T < a; T++) {
              var w = i[T], y = h[w][x];
              (y < e[w][0] || y > e[w][1]) && (C = !1);
            }
            C && (l[u++] = n.getRawIndex(m));
          }
      return u < o && (n._indices = l), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
    }, t.prototype.map = function(e, n) {
      var r = this.clone(e);
      return this._updateDims(r, e, n), r;
    }, t.prototype.modify = function(e, n) {
      this._updateDims(this, e, n);
    }, t.prototype._updateDims = function(e, n, r) {
      for (var i = e._chunks, a = [], o = n.length, s = e.count(), l = [], u = e._rawExtent, c = 0; c < n.length; c++)
        u[n[c]] = ld();
      for (var f = 0; f < s; f++) {
        for (var d = e.getRawIndex(f), h = 0; h < o; h++)
          l[h] = i[n[h]][d];
        l[o] = f;
        var p = r && r.apply(null, l);
        if (p != null) {
          typeof p != "object" && (a[0] = p, p = a);
          for (var c = 0; c < p.length; c++) {
            var v = n[c], g = p[c], m = u[v], y = i[v];
            y && (y[d] = g), g < m[0] && (m[0] = g), g > m[1] && (m[1] = g);
          }
        }
      }
    }, t.prototype.lttbDownSample = function(e, n) {
      var r = this.clone([e], !0), i = r._chunks, a = i[e], o = this.count(), s = 0, l = Math.floor(1 / n), u = this.getRawIndex(0), c, f, d, h = new (sv(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
      h[s++] = u;
      for (var p = 1; p < o - 1; p += l) {
        for (var v = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), m = (g + v) / 2, y = 0, b = v; b < g; b++) {
          var _ = this.getRawIndex(b), O = a[_];
          isNaN(O) || (y += O);
        }
        y /= g - v;
        var S = p, x = Math.min(p + l, o), C = p - 1, T = a[u];
        c = -1, d = S;
        for (var w = -1, P = 0, b = S; b < x; b++) {
          var _ = this.getRawIndex(b), O = a[_];
          if (isNaN(O)) {
            P++, w < 0 && (w = _);
            continue;
          }
          f = Math.abs((C - m) * (O - T) - (C - b) * (y - T)), f > c && (c = f, d = _);
        }
        P > 0 && P < x - S && (h[s++] = Math.min(w, d), d = Math.max(w, d)), h[s++] = d, u = d;
      }
      return h[s++] = this.getRawIndex(o - 1), r._count = s, r._indices = h, r.getRawIndex = this._getRawIdx, r;
    }, t.prototype.downSample = function(e, n, r, i) {
      for (var a = this.clone([e], !0), o = a._chunks, s = [], l = Math.floor(1 / n), u = o[e], c = this.count(), f = a._rawExtent[e] = ld(), d = new (sv(this._rawCount))(Math.ceil(c / l)), h = 0, p = 0; p < c; p += l) {
        l > c - p && (l = c - p, s.length = l);
        for (var v = 0; v < l; v++) {
          var g = this.getRawIndex(p + v);
          s[v] = u[g];
        }
        var m = r(s), y = this.getRawIndex(Math.min(p + i(s, m) || 0, c - 1));
        u[y] = m, m < f[0] && (f[0] = m), m > f[1] && (f[1] = m), d[h++] = y;
      }
      return a._count = h, a._indices = d, a._updateGetRawIdx(), a;
    }, t.prototype.each = function(e, n) {
      if (this._count)
        for (var r = e.length, i = this._chunks, a = 0, o = this.count(); a < o; a++) {
          var s = this.getRawIndex(a);
          switch (r) {
            case 0:
              n(a);
              break;
            case 1:
              n(i[e[0]][s], a);
              break;
            case 2:
              n(i[e[0]][s], i[e[1]][s], a);
              break;
            default:
              for (var l = 0, u = []; l < r; l++)
                u[l] = i[e[l]][s];
              u[l] = a, n.apply(null, u);
          }
        }
    }, t.prototype.getDataExtent = function(e) {
      var n = this._chunks[e], r = ld();
      if (!n)
        return r;
      var i = this.count(), a = !this._indices, o;
      if (a)
        return this._rawExtent[e].slice();
      if (o = this._extent[e], o)
        return o.slice();
      o = r;
      for (var s = o[0], l = o[1], u = 0; u < i; u++) {
        var c = this.getRawIndex(u), f = n[c];
        f < s && (s = f), f > l && (l = f);
      }
      return o = [s, l], this._extent[e] = o, o;
    }, t.prototype.getRawDataItem = function(e) {
      var n = this.getRawIndex(e);
      if (this._provider.persistent)
        return this._provider.getItem(n);
      for (var r = [], i = this._chunks, a = 0; a < i.length; a++)
        r.push(i[a][n]);
      return r;
    }, t.prototype.clone = function(e, n) {
      var r = new t(), i = this._chunks, a = e && Aa(e, function(s, l) {
        return s[l] = !0, s;
      }, {});
      if (a)
        for (var o = 0; o < i.length; o++)
          r._chunks[o] = a[o] ? y4e(i[o]) : i[o];
      else
        r._chunks = i;
      return this._copyCommonProps(r), n || (r._indices = this._cloneIndices()), r._updateGetRawIdx(), r;
    }, t.prototype._copyCommonProps = function(e) {
      e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = Le(this._extent), e._rawExtent = Le(this._rawExtent);
    }, t.prototype._cloneIndices = function() {
      if (this._indices) {
        var e = this._indices.constructor, n = void 0;
        if (e === Array) {
          var r = this._indices.length;
          n = new e(r);
          for (var i = 0; i < r; i++)
            n[i] = this._indices[i];
        } else
          n = new e(this._indices);
        return n;
      }
      return null;
    }, t.prototype._getRawIdxIdentity = function(e) {
      return e;
    }, t.prototype._getRawIdx = function(e) {
      return e < this._count && e >= 0 ? this._indices[e] : -1;
    }, t.prototype._updateGetRawIdx = function() {
      this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
    }, t.internalField = function() {
      function e(n, r, i, a) {
        return Kl(n[a], this._dimensions[a]);
      }
      IT = {
        arrayRows: e,
        objectRows: function(n, r, i, a) {
          return Kl(n[r], this._dimensions[a]);
        },
        keyedColumns: e,
        original: function(n, r, i, a) {
          var o = n && (n.value == null ? n : n.value);
          return Kl(o instanceof Array ? o[a] : o, this._dimensions[a]);
        },
        typedArray: function(n, r, i, a) {
          return n[a];
        }
      };
    }(), t;
  }()
), YJ = (
  /** @class */
  function() {
    function t(e) {
      this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
    }
    return t.prototype.dirty = function() {
      this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
    }, t.prototype._setLocalSource = function(e, n) {
      this._sourceList = e, this._upstreamSignList = n, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
    }, t.prototype._getVersionSign = function() {
      return this._sourceHost.uid + "_" + this._versionSignBase;
    }, t.prototype.prepareSource = function() {
      this._isDirty() && (this._createSource(), this._dirty = !1);
    }, t.prototype._createSource = function() {
      this._setLocalSource([], []);
      var e = this._sourceHost, n = this._getUpstreamSourceManagers(), r = !!n.length, i, a;
      if (lv(e)) {
        var o = e, s = void 0, l = void 0, u = void 0;
        if (r) {
          var c = n[0];
          c.prepareSource(), u = c.getSource(), s = u.data, l = u.sourceFormat, a = [c._getVersionSign()];
        } else
          s = o.get("data", !0), l = Nr(s) ? Ds : La, a = [];
        var f = this._getSourceMetaRawOption() || {}, d = u && u.metaRawOption || {}, h = We(f.seriesLayoutBy, d.seriesLayoutBy) || null, p = We(f.sourceHeader, d.sourceHeader), v = We(f.dimensions, d.dimensions), g = h !== d.seriesLayoutBy || !!p != !!d.sourceHeader || v;
        i = g ? [HA(s, {
          seriesLayoutBy: h,
          sourceHeader: p,
          dimensions: v
        }, l)] : [];
      } else {
        var m = e;
        if (r) {
          var y = this._applyTransform(n);
          i = y.sourceList, a = y.upstreamSignList;
        } else {
          var b = m.get("source", !0);
          i = [HA(b, this._getSourceMetaRawOption(), null)], a = [];
        }
      }
      process.env.NODE_ENV !== "production" && ke(i && a), this._setLocalSource(i, a);
    }, t.prototype._applyTransform = function(e) {
      var n = this._sourceHost, r = n.get("transform", !0), i = n.get("fromTransformResult", !0);
      if (process.env.NODE_ENV !== "production" && ke(i != null || r != null), i != null) {
        var a = "";
        e.length !== 1 && (process.env.NODE_ENV !== "production" && (a = "When using `fromTransformResult`, there should be only one upstream dataset"), bz(a));
      }
      var o, s = [], l = [];
      return k(e, function(u) {
        u.prepareSource();
        var c = u.getSource(i || 0), f = "";
        i != null && !c && (process.env.NODE_ENV !== "production" && (f = "Can not retrieve result by `fromTransformResult`: " + i), bz(f)), s.push(c), l.push(u._getVersionSign());
      }), r ? o = p4e(r, s, {
        datasetIndex: n.componentIndex
      }) : i != null && (o = [XLe(s[0])]), {
        sourceList: o,
        upstreamSignList: l
      };
    }, t.prototype._isDirty = function() {
      if (this._dirty)
        return !0;
      for (var e = this._getUpstreamSourceManagers(), n = 0; n < e.length; n++) {
        var r = e[n];
        if (
          // Consider the case that there is ancestor diry, call it recursively.
          // The performance is probably not an issue because usually the chain is not long.
          r._isDirty() || this._upstreamSignList[n] !== r._getVersionSign()
        )
          return !0;
      }
    }, t.prototype.getSource = function(e) {
      e = e || 0;
      var n = this._sourceList[e];
      if (!n) {
        var r = this._getUpstreamSourceManagers();
        return r[0] && r[0].getSource(e);
      }
      return n;
    }, t.prototype.getSharedDataStore = function(e) {
      process.env.NODE_ENV !== "production" && ke(lv(this._sourceHost), "Can only call getDataStore on series source manager.");
      var n = e.makeStoreSchema();
      return this._innerGetDataStore(n.dimensions, e.source, n.hash);
    }, t.prototype._innerGetDataStore = function(e, n, r) {
      var i = 0, a = this._storeList, o = a[i];
      o || (o = a[i] = {});
      var s = o[r];
      if (!s) {
        var l = this._getUpstreamSourceManagers()[0];
        lv(this._sourceHost) && l ? s = l._innerGetDataStore(e, n, r) : (s = new GA(), s.initData(new VJ(n, e.length), e)), o[r] = s;
      }
      return s;
    }, t.prototype._getUpstreamSourceManagers = function() {
      var e = this._sourceHost;
      if (lv(e)) {
        var n = rk(e);
        return n ? [n.getSourceManager()] : [];
      } else
        return ce(SLe(e), function(r) {
          return r.getSourceManager();
        });
    }, t.prototype._getSourceMetaRawOption = function() {
      var e = this._sourceHost, n, r, i;
      if (lv(e))
        n = e.get("seriesLayoutBy", !0), r = e.get("sourceHeader", !0), i = e.get("dimensions", !0);
      else if (!this._getUpstreamSourceManagers().length) {
        var a = e;
        n = a.get("seriesLayoutBy", !0), r = a.get("sourceHeader", !0), i = a.get("dimensions", !0);
      }
      return {
        seriesLayoutBy: n,
        sourceHeader: r,
        dimensions: i
      };
    }, t;
  }()
);
function yz(t) {
  var e = t.option.transform;
  e && vm(t.option.transform);
}
function lv(t) {
  return t.mainType === "series";
}
function bz(t) {
  throw new Error(t);
}
var qJ = "line-height:1";
function KJ(t, e) {
  var n = t.color || "#6e7079", r = t.fontSize || 12, i = t.fontWeight || "400", a = t.color || "#464646", o = t.fontSize || 14, s = t.fontWeight || "900";
  return e === "html" ? {
    // eslint-disable-next-line max-len
    nameStyle: "font-size:" + Gr(r + "") + "px;color:" + Gr(n) + ";font-weight:" + Gr(i + ""),
    // eslint-disable-next-line max-len
    valueStyle: "font-size:" + Gr(o + "") + "px;color:" + Gr(a) + ";font-weight:" + Gr(s + "")
  } : {
    nameStyle: {
      fontSize: r,
      fill: n,
      fontWeight: i
    },
    valueStyle: {
      fontSize: o,
      fill: a,
      fontWeight: s
    }
  };
}
var b4e = [0, 10, 20, 30], _4e = ["", `
`, `

`, `


`];
function tr(t, e) {
  return e.type = t, e;
}
function jA(t) {
  return t.type === "section";
}
function JJ(t) {
  return jA(t) ? O4e : S4e;
}
function eee(t) {
  if (jA(t)) {
    var e = 0, n = t.blocks.length, r = n > 1 || n > 0 && !t.noHeader;
    return k(t.blocks, function(i) {
      var a = eee(i);
      a >= e && (e = a + +(r && // 0 always can not be readable gap level.
      (!a || jA(i) && !i.noHeader)));
    }), e;
  }
  return 0;
}
function O4e(t, e, n, r) {
  var i = e.noHeader, a = x4e(eee(e)), o = [], s = e.blocks || [];
  ke(!s || ue(s)), s = s || [];
  var l = t.orderMode;
  if (e.sortBlocks && l) {
    s = s.slice();
    var u = {
      valueAsc: "asc",
      valueDesc: "desc"
    };
    if (Ce(u, l)) {
      var c = new jJ(u[l], null);
      s.sort(function(p, v) {
        return c.evaluate(p.sortParam, v.sortParam);
      });
    } else l === "seriesDesc" && s.reverse();
  }
  k(s, function(p, v) {
    var g = e.valueFormatter, m = JJ(p)(
      // Inherit valueFormatter
      g ? le(le({}, t), {
        valueFormatter: g
      }) : t,
      p,
      v > 0 ? a.html : 0,
      r
    );
    m != null && o.push(m);
  });
  var f = t.renderMode === "richText" ? o.join(a.richText) : ZA(o.join(""), i ? n : a.html);
  if (i)
    return f;
  var d = VA(e.header, "ordinal", t.useUTC), h = KJ(r, t.renderMode).nameStyle;
  return t.renderMode === "richText" ? tee(t, d, h) + a.richText + f : ZA('<div style="' + h + ";" + qJ + ';">' + Gr(d) + "</div>" + f, n);
}
function S4e(t, e, n, r) {
  var i = t.renderMode, a = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = t.useUTC, c = e.valueFormatter || t.valueFormatter || function(_) {
    return _ = ue(_) ? _ : [_], ce(_, function(O, S) {
      return VA(O, ue(h) ? h[S] : h, u);
    });
  };
  if (!(a && o)) {
    var f = s ? "" : t.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", i), d = a ? "" : VA(l, "ordinal", u), h = e.valueType, p = o ? [] : c(e.value, e.dataIndex), v = !s || !a, g = !s && a, m = KJ(r, i), y = m.nameStyle, b = m.valueStyle;
    return i === "richText" ? (s ? "" : f) + (a ? "" : tee(t, d, y)) + (o ? "" : T4e(t, p, v, g, b)) : ZA((s ? "" : f) + (a ? "" : w4e(d, !s, y)) + (o ? "" : C4e(p, v, g, b)), n);
  }
}
function _z(t, e, n, r, i, a) {
  if (t) {
    var o = JJ(t), s = {
      useUTC: i,
      renderMode: n,
      orderMode: r,
      markupStyleCreator: e,
      valueFormatter: t.valueFormatter
    };
    return o(s, t, 0, a);
  }
}
function x4e(t) {
  return {
    html: b4e[t],
    richText: _4e[t]
  };
}
function ZA(t, e) {
  var n = '<div style="clear:both"></div>', r = "margin: " + e + "px 0 0";
  return '<div style="' + r + ";" + qJ + ';">' + t + n + "</div>";
}
function w4e(t, e, n) {
  var r = e ? "margin-left:2px" : "";
  return '<span style="' + n + ";" + r + '">' + Gr(t) + "</span>";
}
function C4e(t, e, n, r) {
  var i = n ? "10px" : "20px", a = e ? "float:right;margin-left:" + i : "";
  return t = ue(t) ? t : [t], '<span style="' + a + ";" + r + '">' + ce(t, function(o) {
    return Gr(o);
  }).join("&nbsp;&nbsp;") + "</span>";
}
function tee(t, e, n) {
  return t.markupStyleCreator.wrapRichTextStyle(e, n);
}
function T4e(t, e, n, r, i) {
  var a = [i], o = r ? 10 : 20;
  return n && a.push({
    padding: [0, 0, 0, o],
    align: "right"
  }), t.markupStyleCreator.wrapRichTextStyle(ue(e) ? e.join("  ") : e, a);
}
function nee(t, e) {
  var n = t.getData().getItemVisual(e, "style"), r = n[t.visualDrawType];
  return _f(r);
}
function ree(t, e) {
  var n = t.get("padding");
  return n ?? (e === "richText" ? [8, 10] : 10);
}
var DT = (
  /** @class */
  function() {
    function t() {
      this.richTextStyles = {}, this._nextStyleNameId = uK();
    }
    return t.prototype._generateStyleName = function() {
      return "__EC_aUTo_" + this._nextStyleNameId++;
    }, t.prototype.makeTooltipMarker = function(e, n, r) {
      var i = r === "richText" ? this._generateStyleName() : null, a = CJ({
        color: n,
        type: e,
        renderMode: r,
        markerId: i
      });
      return Oe(a) ? a : (process.env.NODE_ENV !== "production" && ke(i), this.richTextStyles[i] = a.style, a.content);
    }, t.prototype.wrapRichTextStyle = function(e, n) {
      var r = {};
      ue(n) ? k(n, function(a) {
        return le(r, a);
      }) : le(r, n);
      var i = this._generateStyleName();
      return this.richTextStyles[i] = r, "{" + i + "|" + e + "}";
    }, t;
  }()
);
function iee(t) {
  var e = t.series, n = t.dataIndex, r = t.multipleSeries, i = e.getData(), a = i.mapDimensionsAll("defaultedTooltip"), o = a.length, s = e.getRawValue(n), l = ue(s), u = nee(e, n), c, f, d, h;
  if (o > 1 || l && !o) {
    var p = P4e(s, e, n, a, u);
    c = p.inlineValues, f = p.inlineValueTypes, d = p.blocks, h = p.inlineValues[0];
  } else if (o) {
    var v = i.getDimensionInfo(a[0]);
    h = c = Vh(i, n, a[0]), f = v.type;
  } else
    h = c = l ? s[0] : s;
  var g = AR(e), m = g && e.name || "", y = i.getName(n), b = r ? m : y;
  return tr("section", {
    header: m,
    // When series name is not specified, do not show a header line with only '-'.
    // This case always happens in tooltip.trigger: 'item'.
    noHeader: r || !g,
    sortParam: h,
    blocks: [tr("nameValue", {
      markerType: "item",
      markerColor: u,
      // Do not mix display seriesName and itemName in one tooltip,
      // which might confuses users.
      name: b,
      // name dimension might be auto assigned, where the name might
      // be not readable. So we check trim here.
      noName: !ma(b),
      value: c,
      valueType: f,
      dataIndex: n
    })].concat(d || [])
  });
}
function P4e(t, e, n, r, i) {
  var a = e.getData(), o = Aa(t, function(f, d, h) {
    var p = a.getDimensionInfo(h);
    return f = f || p && p.tooltip !== !1 && p.displayName != null;
  }, !1), s = [], l = [], u = [];
  r.length ? k(r, function(f) {
    c(Vh(a, n, f), f);
  }) : k(t, c);
  function c(f, d) {
    var h = a.getDimensionInfo(d);
    !h || h.otherDims.tooltip === !1 || (o ? u.push(tr("nameValue", {
      markerType: "subItem",
      markerColor: i,
      name: h.displayName,
      value: f,
      valueType: h.type
    })) : (s.push(f), l.push(h.type)));
  }
  return {
    inlineValues: s,
    inlineValueTypes: l,
    blocks: u
  };
}
var pl = bt();
function ab(t, e) {
  return t.getName(e) || t.getId(e);
}
var G_ = "__universalTransitionEnabled", Ht = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n._selectedDataIndicesMap = {}, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.seriesIndex = this.componentIndex, this.dataTask = Dg({
        count: A4e,
        reset: E4e
      }), this.dataTask.context = {
        model: this
      }, this.mergeDefaultAndTheme(n, i);
      var a = pl(this).sourceManager = new YJ(this);
      a.prepareSource();
      var o = this.getInitialData(n, i);
      Sz(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && ke(o, "getInitialData returned invalid data."), pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
    }, e.prototype.mergeDefaultAndTheme = function(n, r) {
      var i = Tm(this), a = i ? bp(n) : {}, o = this.subType;
      rt.hasClass(o) && (o += "Series"), qe(n, r.getTheme().get(this.subType)), qe(n, this.getDefaultOption()), gf(n, "label", ["show"]), this.fillDataTextStyle(n.data), i && cu(n, a, i);
    }, e.prototype.mergeOption = function(n, r) {
      n = qe(this.option, n, !0), this.fillDataTextStyle(n.data);
      var i = Tm(this);
      i && cu(this.option, n, i);
      var a = pl(this).sourceManager;
      a.dirty(), a.prepareSource();
      var o = this.getInitialData(n, r);
      Sz(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, pl(this).dataBeforeProcessed = o, Oz(this), this._initSelectedMapFromData(o);
    }, e.prototype.fillDataTextStyle = function(n) {
      if (n && !Nr(n))
        for (var r = ["show"], i = 0; i < n.length; i++)
          n[i] && n[i].label && gf(n[i], "label", r);
    }, e.prototype.getInitialData = function(n, r) {
    }, e.prototype.appendData = function(n) {
      var r = this.getRawData();
      r.appendData(n.data);
    }, e.prototype.getData = function(n) {
      var r = UA(this);
      if (r) {
        var i = r.context.data;
        return n == null || !i.getLinkedData ? i : i.getLinkedData(n);
      } else
        return pl(this).data;
    }, e.prototype.getAllData = function() {
      var n = this.getData();
      return n && n.getLinkedDataAll ? n.getLinkedDataAll() : [{
        data: n
      }];
    }, e.prototype.setData = function(n) {
      var r = UA(this);
      if (r) {
        var i = r.context;
        i.outputData = n, r !== this.dataTask && (i.data = n);
      }
      pl(this).data = n;
    }, e.prototype.getEncode = function() {
      var n = this.get("encode", !0);
      if (n)
        return Pe(n);
    }, e.prototype.getSourceManager = function() {
      return pl(this).sourceManager;
    }, e.prototype.getSource = function() {
      return this.getSourceManager().getSource();
    }, e.prototype.getRawData = function() {
      return pl(this).dataBeforeProcessed;
    }, e.prototype.getColorBy = function() {
      var n = this.get("colorBy");
      return n || "series";
    }, e.prototype.isColorBySeries = function() {
      return this.getColorBy() === "series";
    }, e.prototype.getBaseAxis = function() {
      var n = this.coordinateSystem;
      return n && n.getBaseAxis && n.getBaseAxis();
    }, e.prototype.formatTooltip = function(n, r, i) {
      return iee({
        series: this,
        dataIndex: n,
        multipleSeries: r
      });
    }, e.prototype.isAnimationEnabled = function() {
      var n = this.ecModel;
      if (vt.node && !(n && n.ssr))
        return !1;
      var r = this.getShallow("animation");
      return r && this.getData().count() > this.getShallow("animationThreshold") && (r = !1), !!r;
    }, e.prototype.restoreData = function() {
      this.dataTask.dirty();
    }, e.prototype.getColorFromPalette = function(n, r, i) {
      var a = this.ecModel, o = ik.prototype.getColorFromPalette.call(this, n, r, i);
      return o || (o = a.getColorFromPalette(n, r, i)), o;
    }, e.prototype.coordDimToDataDim = function(n) {
      return this.getRawData().mapDimensionsAll(n);
    }, e.prototype.getProgressive = function() {
      return this.get("progressive");
    }, e.prototype.getProgressiveThreshold = function() {
      return this.get("progressiveThreshold");
    }, e.prototype.select = function(n, r) {
      this._innerSelect(this.getData(r), n);
    }, e.prototype.unselect = function(n, r) {
      var i = this.option.selectedMap;
      if (i) {
        var a = this.option.selectedMode, o = this.getData(r);
        if (a === "series" || i === "all") {
          this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
          return;
        }
        for (var s = 0; s < n.length; s++) {
          var l = n[s], u = ab(o, l);
          i[u] = !1, this._selectedDataIndicesMap[u] = -1;
        }
      }
    }, e.prototype.toggleSelect = function(n, r) {
      for (var i = [], a = 0; a < n.length; a++)
        i[0] = n[a], this.isSelected(n[a], r) ? this.unselect(i, r) : this.select(i, r);
    }, e.prototype.getSelectedDataIndices = function() {
      if (this.option.selectedMap === "all")
        return [].slice.call(this.getData().getIndices());
      for (var n = this._selectedDataIndicesMap, r = st(n), i = [], a = 0; a < r.length; a++) {
        var o = n[r[a]];
        o >= 0 && i.push(o);
      }
      return i;
    }, e.prototype.isSelected = function(n, r) {
      var i = this.option.selectedMap;
      if (!i)
        return !1;
      var a = this.getData(r);
      return (i === "all" || i[ab(a, n)]) && !a.getItemModel(n).get(["select", "disabled"]);
    }, e.prototype.isUniversalTransitionEnabled = function() {
      if (this[G_])
        return !0;
      var n = this.option.universalTransition;
      return n ? n === !0 ? !0 : n && n.enabled : !1;
    }, e.prototype._innerSelect = function(n, r) {
      var i, a, o = this.option, s = o.selectedMode, l = r.length;
      if (!(!s || !l)) {
        if (s === "series")
          o.selectedMap = "all";
        else if (s === "multiple") {
          Ie(o.selectedMap) || (o.selectedMap = {});
          for (var u = o.selectedMap, c = 0; c < l; c++) {
            var f = r[c], d = ab(n, f);
            u[d] = !0, this._selectedDataIndicesMap[d] = n.getRawIndex(f);
          }
        } else if (s === "single" || s === !0) {
          var h = r[l - 1], d = ab(n, h);
          o.selectedMap = (i = {}, i[d] = !0, i), this._selectedDataIndicesMap = (a = {}, a[d] = n.getRawIndex(h), a);
        }
      }
    }, e.prototype._initSelectedMapFromData = function(n) {
      if (!this.option.selectedMap) {
        var r = [];
        n.hasItemOption && n.each(function(i) {
          var a = n.getRawDataItem(i);
          a && a.selected && r.push(i);
        }), r.length > 0 && this._innerSelect(n, r);
      }
    }, e.registerClass = function(n) {
      return rt.registerClass(n);
    }, e.protoInitialize = function() {
      var n = e.prototype;
      n.type = "series.__base__", n.seriesIndex = 0, n.ignoreStyleOnData = !1, n.hasSymbolVisual = !1, n.defaultSymbol = "circle", n.visualStyleAccessPath = "itemStyle", n.visualDrawType = "fill";
    }(), e;
  }(rt)
);
xn(Ht, sw);
xn(Ht, ik);
yK(Ht, rt);
function Oz(t) {
  var e = t.name;
  AR(t) || (t.name = $4e(t) || e);
}
function $4e(t) {
  var e = t.getRawData(), n = e.mapDimensionsAll("seriesName"), r = [];
  return k(n, function(i) {
    var a = e.getDimensionInfo(i);
    a.displayName && r.push(a.displayName);
  }), r.join(" ");
}
function A4e(t) {
  return t.model.getRawData().count();
}
function E4e(t) {
  var e = t.model;
  return e.setData(e.getRawData().cloneShallow()), M4e;
}
function M4e(t, e) {
  e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
}
function Sz(t, e) {
  k(gm(t.CHANGABLE_METHODS, t.DOWNSAMPLE_METHODS), function(n) {
    t.wrapMethod(n, Ue(I4e, e));
  });
}
function I4e(t, e) {
  var n = UA(t);
  return n && n.setOutputEnd((e || this).count()), e;
}
function UA(t) {
  var e = (t.ecModel || {}).scheduler, n = e && e.getPipeline(t.uid);
  if (n) {
    var r = n.currentTask;
    if (r) {
      var i = r.agentStubMap;
      i && (r = i.get(t.uid));
    }
    return r;
  }
}
var Xt = (
  /** @class */
  function() {
    function t() {
      this.group = new Ve(), this.uid = yp("viewComponent");
    }
    return t.prototype.init = function(e, n) {
    }, t.prototype.render = function(e, n, r, i) {
    }, t.prototype.dispose = function(e, n) {
    }, t.prototype.updateView = function(e, n, r, i) {
    }, t.prototype.updateLayout = function(e, n, r, i) {
    }, t.prototype.updateVisual = function(e, n, r, i) {
    }, t.prototype.toggleBlurSeries = function(e, n, r) {
    }, t.prototype.eachRendered = function(e) {
      var n = this.group;
      n && n.traverse(e);
    }, t;
  }()
);
MR(Xt);
Qx(Xt);
function Op() {
  var t = bt();
  return function(e) {
    var n = t(e), r = e.pipelineContext, i = !!n.large, a = !!n.progressiveRender, o = n.large = !!(r && r.large), s = n.progressiveRender = !!(r && r.progressiveRender);
    return (i !== o || a !== s) && "reset";
  };
}
var aee = bt(), D4e = Op(), zt = (
  /** @class */
  function() {
    function t() {
      this.group = new Ve(), this.uid = yp("viewChart"), this.renderTask = Dg({
        plan: R4e,
        reset: k4e
      }), this.renderTask.context = {
        view: this
      };
    }
    return t.prototype.init = function(e, n) {
    }, t.prototype.render = function(e, n, r, i) {
      if (process.env.NODE_ENV !== "production")
        throw new Error("render method must been implemented");
    }, t.prototype.highlight = function(e, n, r, i) {
      var a = e.getData(i && i.dataType);
      if (!a) {
        process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
        return;
      }
      wz(a, i, "emphasis");
    }, t.prototype.downplay = function(e, n, r, i) {
      var a = e.getData(i && i.dataType);
      if (!a) {
        process.env.NODE_ENV !== "production" && Cr("Unknown dataType " + i.dataType);
        return;
      }
      wz(a, i, "normal");
    }, t.prototype.remove = function(e, n) {
      this.group.removeAll();
    }, t.prototype.dispose = function(e, n) {
    }, t.prototype.updateView = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.updateLayout = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.updateVisual = function(e, n, r, i) {
      this.render(e, n, r, i);
    }, t.prototype.eachRendered = function(e) {
      Tu(this.group, e);
    }, t.markUpdateMethod = function(e, n) {
      aee(e).updateMethod = n;
    }, t.protoInitialize = function() {
      var e = t.prototype;
      e.type = "chart";
    }(), t;
  }()
);
function xz(t, e, n) {
  t && lu(t) && (e === "emphasis" ? js : Zs)(t, n);
}
function wz(t, e, n) {
  var r = mf(t, e), i = e && e.highlightKey != null ? dke(e.highlightKey) : null;
  r != null ? k(Qt(r), function(a) {
    xz(t.getItemGraphicEl(a), n, i);
  }) : t.eachItemGraphicEl(function(a) {
    xz(a, n, i);
  });
}
MR(zt, ["dispose"]);
Qx(zt);
function R4e(t) {
  return D4e(t.model);
}
function k4e(t) {
  var e = t.model, n = t.ecModel, r = t.api, i = t.payload, a = e.pipelineContext.progressiveRender, o = t.view, s = i && aee(i).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  return l !== "render" && o[l](e, n, r, i), L4e[l];
}
var L4e = {
  incrementalPrepareRender: {
    progress: function(t, e) {
      e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
    }
  },
  render: {
    // Put view.render in `progress` to support appendData. But in this case
    // view.render should not be called in reset, otherwise it will be called
    // twise. Use `forceFirstProgress` to make sure that view.render is called
    // in any cases.
    forceFirstProgress: !0,
    progress: function(t, e) {
      e.view.render(e.model, e.ecModel, e.api, e.payload);
    }
  }
}, pO = "\0__throttleOriginMethod", Cz = "\0__throttleRate", Tz = "\0__throttleType";
function uw(t, e, n) {
  var r, i = 0, a = 0, o = null, s, l, u, c;
  e = e || 0;
  function f() {
    a = (/* @__PURE__ */ new Date()).getTime(), o = null, t.apply(l, u || []);
  }
  var d = function() {
    for (var h = [], p = 0; p < arguments.length; p++)
      h[p] = arguments[p];
    r = (/* @__PURE__ */ new Date()).getTime(), l = this, u = h;
    var v = c || e, g = c || n;
    c = null, s = r - (g ? i : a) - v, clearTimeout(o), g ? o = setTimeout(f, v) : s >= 0 ? f() : o = setTimeout(f, -s), i = r;
  };
  return d.clear = function() {
    o && (clearTimeout(o), o = null);
  }, d.debounceNextCall = function(h) {
    c = h;
  }, d;
}
function Sp(t, e, n, r) {
  var i = t[e];
  if (i) {
    var a = i[pO] || i, o = i[Tz], s = i[Cz];
    if (s !== n || o !== r) {
      if (n == null || !r)
        return t[e] = a;
      i = t[e] = uw(a, n, r === "debounce"), i[pO] = a, i[Tz] = r, i[Cz] = n;
    }
    return i;
  }
}
function $m(t, e) {
  var n = t[e];
  n && n[pO] && (n.clear && n.clear(), t[e] = n[pO]);
}
var Pz = bt(), $z = {
  itemStyle: yf(vJ, !0),
  lineStyle: yf(pJ, !0)
}, N4e = {
  lineStyle: "stroke",
  itemStyle: "fill"
};
function oee(t, e) {
  var n = t.visualStyleMapper || $z[e];
  return n || (console.warn("Unknown style type '" + e + "'."), $z.itemStyle);
}
function see(t, e) {
  var n = t.visualDrawType || N4e[e];
  return n || (console.warn("Unknown style type '" + e + "'."), "fill");
}
var B4e = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(t, e) {
    var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = t.getModel(r), a = oee(t, r), o = a(i), s = i.getShallow("decal");
    s && (n.setVisual("decal", s), s.dirty = !0);
    var l = see(t, r), u = o[l], c = Me(u) ? u : null, f = o.fill === "auto" || o.stroke === "auto";
    if (!o[l] || c || f) {
      var d = t.getColorFromPalette(
        // TODO series count changed.
        t.name,
        null,
        e.getSeriesCount()
      );
      o[l] || (o[l] = d, n.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || Me(o.fill) ? d : o.fill, o.stroke = o.stroke === "auto" || Me(o.stroke) ? d : o.stroke;
    }
    if (n.setVisual("style", o), n.setVisual("drawType", l), !e.isSeriesFiltered(t) && c)
      return n.setVisual("colorFromPalette", !1), {
        dataEach: function(h, p) {
          var v = t.getDataParams(p), g = le({}, o);
          g[l] = c(v), h.setItemVisual(p, "style", g);
        }
      };
  }
}, uv = new Wt(), z4e = {
  createOnAllSeries: !0,
  performRawSeries: !0,
  reset: function(t, e) {
    if (!(t.ignoreStyleOnData || e.isSeriesFiltered(t))) {
      var n = t.getData(), r = t.visualStyleAccessPath || "itemStyle", i = oee(t, r), a = n.getVisual("drawType");
      return {
        dataEach: n.hasItemOption ? function(o, s) {
          var l = o.getRawDataItem(s);
          if (l && l[r]) {
            uv.option = l[r];
            var u = i(uv), c = o.ensureUniqueItemVisual(s, "style");
            le(c, u), uv.option.decal && (o.setItemVisual(s, "decal", uv.option.decal), uv.option.decal.dirty = !0), a in u && o.setItemVisual(s, "colorFromPalette", !1);
          }
        } : null
      };
    }
  }
}, V4e = {
  performRawSeries: !0,
  overallReset: function(t) {
    var e = Pe();
    t.eachSeries(function(n) {
      var r = n.getColorBy();
      if (!n.isColorBySeries()) {
        var i = n.type + "-" + r, a = e.get(i);
        a || (a = {}, e.set(i, a)), Pz(n).scope = a;
      }
    }), t.eachSeries(function(n) {
      if (!(n.isColorBySeries() || t.isSeriesFiltered(n))) {
        var r = n.getRawData(), i = {}, a = n.getData(), o = Pz(n).scope, s = n.visualStyleAccessPath || "itemStyle", l = see(n, s);
        a.each(function(u) {
          var c = a.getRawIndex(u);
          i[c] = u;
        }), r.each(function(u) {
          var c = i[u], f = a.getItemVisual(c, "colorFromPalette");
          if (f) {
            var d = a.ensureUniqueItemVisual(c, "style"), h = r.getName(u) || u + "", p = r.count();
            d[l] = n.getColorFromPalette(h, o, p);
          }
        });
      }
    });
  }
}, ob = Math.PI;
function F4e(t, e) {
  e = e || {}, Re(e, {
    text: "loading",
    textColor: "#000",
    fontSize: 12,
    fontWeight: "normal",
    fontStyle: "normal",
    fontFamily: "sans-serif",
    maskColor: "rgba(255, 255, 255, 0.8)",
    showSpinner: !0,
    color: "#5470c6",
    spinnerRadius: 10,
    lineWidth: 5,
    zlevel: 0
  });
  var n = new Ve(), r = new mt({
    style: {
      fill: e.maskColor
    },
    zlevel: e.zlevel,
    z: 1e4
  });
  n.add(r);
  var i = new gt({
    style: {
      text: e.text,
      fill: e.textColor,
      fontSize: e.fontSize,
      fontWeight: e.fontWeight,
      fontStyle: e.fontStyle,
      fontFamily: e.fontFamily
    },
    zlevel: e.zlevel,
    z: 10001
  }), a = new mt({
    style: {
      fill: "none"
    },
    textContent: i,
    textConfig: {
      position: "right",
      distance: 10
    },
    zlevel: e.zlevel,
    z: 10001
  });
  n.add(a);
  var o;
  return e.showSpinner && (o = new Yx({
    shape: {
      startAngle: -ob / 2,
      endAngle: -ob / 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: ob * 3 / 2
  }).start("circularInOut"), o.animateShape(!0).when(1e3, {
    startAngle: ob * 3 / 2
  }).delay(300).start("circularInOut"), n.add(o)), n.resize = function() {
    var s = i.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (t.getWidth() - l * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : l), c = t.getHeight() / 2;
    e.showSpinner && o.setShape({
      cx: u,
      cy: c
    }), a.setShape({
      x: u - l,
      y: c - l,
      width: l * 2,
      height: l * 2
    }), r.setShape({
      x: 0,
      y: 0,
      width: t.getWidth(),
      height: t.getHeight()
    });
  }, n.resize(), n;
}
var lee = (
  /** @class */
  function() {
    function t(e, n, r, i) {
      this._stageTaskMap = Pe(), this.ecInstance = e, this.api = n, r = this._dataProcessorHandlers = r.slice(), i = this._visualHandlers = i.slice(), this._allHandlers = r.concat(i);
    }
    return t.prototype.restoreData = function(e, n) {
      e.restoreData(n), this._stageTaskMap.each(function(r) {
        var i = r.overallTask;
        i && i.dirty();
      });
    }, t.prototype.getPerformArgs = function(e, n) {
      if (e.__pipeline) {
        var r = this._pipelineMap.get(e.__pipeline.id), i = r.context, a = !n && r.progressiveEnabled && (!i || i.progressiveRender) && e.__idxInPipeline > r.blockIndex, o = a ? r.step : null, s = i && i.modDataCount, l = s != null ? Math.ceil(s / o) : null;
        return {
          step: o,
          modBy: l,
          modDataCount: s
        };
      }
    }, t.prototype.getPipeline = function(e) {
      return this._pipelineMap.get(e);
    }, t.prototype.updateStreamModes = function(e, n) {
      var r = this._pipelineMap.get(e.uid), i = e.getData(), a = i.count(), o = r.progressiveEnabled && n.incrementalPrepareRender && a >= r.threshold, s = e.get("large") && a >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? a : null;
      e.pipelineContext = r.context = {
        progressiveRender: o,
        modDataCount: l,
        large: s
      };
    }, t.prototype.restorePipelines = function(e) {
      var n = this, r = n._pipelineMap = Pe();
      e.eachSeries(function(i) {
        var a = i.getProgressive(), o = i.uid;
        r.set(o, {
          id: o,
          head: null,
          tail: null,
          threshold: i.getProgressiveThreshold(),
          progressiveEnabled: a && !(i.preventIncremental && i.preventIncremental()),
          blockIndex: -1,
          step: Math.round(a || 700),
          count: 0
        }), n._pipe(i, i.dataTask);
      });
    }, t.prototype.prepareStageTasks = function() {
      var e = this._stageTaskMap, n = this.api.getModel(), r = this.api;
      k(this._allHandlers, function(i) {
        var a = e.get(i.uid) || e.set(i.uid, {}), o = "";
        process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), ke(!(i.reset && i.overallReset), o), i.reset && this._createSeriesStageTask(i, a, n, r), i.overallReset && this._createOverallStageTask(i, a, n, r);
      }, this);
    }, t.prototype.prepareView = function(e, n, r, i) {
      var a = e.renderTask, o = a.context;
      o.model = n, o.ecModel = r, o.api = i, a.__block = !e.incrementalPrepareRender, this._pipe(n, a);
    }, t.prototype.performDataProcessorTasks = function(e, n) {
      this._performStageTasks(this._dataProcessorHandlers, e, n, {
        block: !0
      });
    }, t.prototype.performVisualTasks = function(e, n, r) {
      this._performStageTasks(this._visualHandlers, e, n, r);
    }, t.prototype._performStageTasks = function(e, n, r, i) {
      i = i || {};
      var a = !1, o = this;
      k(e, function(l, u) {
        if (!(i.visualType && i.visualType !== l.visualType)) {
          var c = o._stageTaskMap.get(l.uid), f = c.seriesTaskMap, d = c.overallTask;
          if (d) {
            var h, p = d.agentStubMap;
            p.each(function(g) {
              s(i, g) && (g.dirty(), h = !0);
            }), h && d.dirty(), o.updatePayload(d, r);
            var v = o.getPerformArgs(d, i.block);
            p.each(function(g) {
              g.perform(v);
            }), d.perform(v) && (a = !0);
          } else f && f.each(function(g, m) {
            s(i, g) && g.dirty();
            var y = o.getPerformArgs(g, i.block);
            y.skip = !l.performRawSeries && n.isSeriesFiltered(g.context.model), o.updatePayload(g, r), g.perform(y) && (a = !0);
          });
        }
      });
      function s(l, u) {
        return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
      }
      this.unfinished = a || this.unfinished;
    }, t.prototype.performSeriesTasks = function(e) {
      var n;
      e.eachSeries(function(r) {
        n = r.dataTask.perform() || n;
      }), this.unfinished = n || this.unfinished;
    }, t.prototype.plan = function() {
      this._pipelineMap.each(function(e) {
        var n = e.tail;
        do {
          if (n.__block) {
            e.blockIndex = n.__idxInPipeline;
            break;
          }
          n = n.getUpstream();
        } while (n);
      });
    }, t.prototype.updatePayload = function(e, n) {
      n !== "remain" && (e.context.payload = n);
    }, t.prototype._createSeriesStageTask = function(e, n, r, i) {
      var a = this, o = n.seriesTaskMap, s = n.seriesTaskMap = Pe(), l = e.seriesType, u = e.getTargetSeries;
      e.createOnAllSeries ? r.eachRawSeries(c) : l ? r.eachRawSeriesByType(l, c) : u && u(r, i).each(c);
      function c(f) {
        var d = f.uid, h = s.set(d, o && o.get(d) || Dg({
          plan: j4e,
          reset: Z4e,
          count: X4e
        }));
        h.context = {
          model: f,
          ecModel: r,
          api: i,
          // PENDING: `useClearVisual` not used?
          useClearVisual: e.isVisual && !e.isLayout,
          plan: e.plan,
          reset: e.reset,
          scheduler: a
        }, a._pipe(f, h);
      }
    }, t.prototype._createOverallStageTask = function(e, n, r, i) {
      var a = this, o = n.overallTask = n.overallTask || Dg({
        reset: W4e
      });
      o.context = {
        ecModel: r,
        api: i,
        overallReset: e.overallReset,
        scheduler: a
      };
      var s = o.agentStubMap, l = o.agentStubMap = Pe(), u = e.seriesType, c = e.getTargetSeries, f = !0, d = !1, h = "";
      process.env.NODE_ENV !== "production" && (h = '"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'), ke(!e.createOnAllSeries, h), u ? r.eachRawSeriesByType(u, p) : c ? c(r, i).each(p) : (f = !1, k(r.getSeries(), p));
      function p(v) {
        var g = v.uid, m = l.set(g, s && s.get(g) || // When the result of `getTargetSeries` changed, the overallTask
        // should be set as dirty and re-performed.
        (d = !0, Dg({
          reset: Q4e,
          onDirty: G4e
        })));
        m.context = {
          model: v,
          overallProgress: f
          // FIXME:TS never used, so comment it
          // modifyOutputEnd: modifyOutputEnd
        }, m.agent = o, m.__block = f, a._pipe(v, m);
      }
      d && o.dirty();
    }, t.prototype._pipe = function(e, n) {
      var r = e.uid, i = this._pipelineMap.get(r);
      !i.head && (i.head = n), i.tail && i.tail.pipe(n), i.tail = n, n.__idxInPipeline = i.count++, n.__pipeline = i;
    }, t.wrapStageHandler = function(e, n) {
      return Me(e) && (e = {
        overallReset: e,
        seriesType: Y4e(e)
      }), e.uid = yp("stageHandler"), n && (e.visualType = n), e;
    }, t;
  }()
);
function W4e(t) {
  t.overallReset(t.ecModel, t.api, t.payload);
}
function Q4e(t) {
  return t.overallProgress && H4e;
}
function H4e() {
  this.agent.dirty(), this.getDownstream().dirty();
}
function G4e() {
  this.agent && this.agent.dirty();
}
function j4e(t) {
  return t.plan ? t.plan(t.model, t.ecModel, t.api, t.payload) : null;
}
function Z4e(t) {
  t.useClearVisual && t.data.clearAllVisual();
  var e = t.resetDefines = Qt(t.reset(t.model, t.ecModel, t.api, t.payload));
  return e.length > 1 ? ce(e, function(n, r) {
    return uee(r);
  }) : U4e;
}
var U4e = uee(0);
function uee(t) {
  return function(e, n) {
    var r = n.data, i = n.resetDefines[t];
    if (i && i.dataEach)
      for (var a = e.start; a < e.end; a++)
        i.dataEach(r, a);
    else i && i.progress && i.progress(e, r);
  };
}
function X4e(t) {
  return t.data.count();
}
function Y4e(t) {
  vO = null;
  try {
    t(Am, cee);
  } catch {
  }
  return vO;
}
var Am = {}, cee = {}, vO;
fee(Am, ak);
fee(cee, kJ);
Am.eachSeriesByType = Am.eachRawSeriesByType = function(t) {
  vO = t;
};
Am.eachComponent = function(t) {
  t.mainType === "series" && t.subType && (vO = t.subType);
};
function fee(t, e) {
  for (var n in e.prototype)
    t[n] = On;
}
var Az = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
const q4e = {
  color: Az,
  colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], Az]
};
var Fr = "#B9B8CE", Ez = "#100C2A", sb = function() {
  return {
    axisLine: {
      lineStyle: {
        color: Fr
      }
    },
    splitLine: {
      lineStyle: {
        color: "#484753"
      }
    },
    splitArea: {
      areaStyle: {
        color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
      }
    },
    minorSplitLine: {
      lineStyle: {
        color: "#20203B"
      }
    }
  };
}, Mz = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], dee = {
  darkMode: !0,
  color: Mz,
  backgroundColor: Ez,
  axisPointer: {
    lineStyle: {
      color: "#817f91"
    },
    crossStyle: {
      color: "#817f91"
    },
    label: {
      // TODO Contrast of label backgorundColor
      color: "#fff"
    }
  },
  legend: {
    textStyle: {
      color: Fr
    }
  },
  textStyle: {
    color: Fr
  },
  title: {
    textStyle: {
      color: "#EEF1FA"
    },
    subtextStyle: {
      color: "#B9B8CE"
    }
  },
  toolbox: {
    iconStyle: {
      borderColor: Fr
    }
  },
  dataZoom: {
    borderColor: "#71708A",
    textStyle: {
      color: Fr
    },
    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: Fr
    }
  },
  timeline: {
    lineStyle: {
      color: Fr
    },
    label: {
      color: Fr
    },
    controlStyle: {
      color: Fr,
      borderColor: Fr
    }
  },
  calendar: {
    itemStyle: {
      color: Ez
    },
    dayLabel: {
      color: Fr
    },
    monthLabel: {
      color: Fr
    },
    yearLabel: {
      color: Fr
    }
  },
  timeAxis: sb(),
  logAxis: sb(),
  valueAxis: sb(),
  categoryAxis: sb(),
  line: {
    symbol: "circle"
  },
  graph: {
    color: Mz
  },
  gauge: {
    title: {
      color: Fr
    },
    axisLine: {
      lineStyle: {
        color: [[1, "rgba(207,212,219,0.2)"]]
      }
    },
    axisLabel: {
      color: Fr
    },
    detail: {
      color: "#EEF1FA"
    }
  },
  candlestick: {
    itemStyle: {
      color: "#f64e56",
      color0: "#54ea92",
      borderColor: "#f64e56",
      borderColor0: "#54ea92"
      // borderColor: '#ca2824',
      // borderColor0: '#09a443'
    }
  }
};
dee.categoryAxis.splitLine.show = !1;
var K4e = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.normalizeQuery = function(e) {
      var n = {}, r = {}, i = {};
      if (Oe(e)) {
        var a = Vo(e);
        n.mainType = a.main || null, n.subType = a.sub || null;
      } else {
        var o = ["Index", "Name", "Id"], s = {
          name: 1,
          dataIndex: 1,
          dataType: 1
        };
        k(e, function(l, u) {
          for (var c = !1, f = 0; f < o.length; f++) {
            var d = o[f], h = u.lastIndexOf(d);
            if (h > 0 && h === u.length - d.length) {
              var p = u.slice(0, h);
              p !== "data" && (n.mainType = p, n[d.toLowerCase()] = l, c = !0);
            }
          }
          s.hasOwnProperty(u) && (r[u] = l, c = !0), c || (i[u] = l);
        });
      }
      return {
        cptQuery: n,
        dataQuery: r,
        otherQuery: i
      };
    }, t.prototype.filter = function(e, n) {
      var r = this.eventInfo;
      if (!r)
        return !0;
      var i = r.targetEl, a = r.packedEvent, o = r.model, s = r.view;
      if (!o || !s)
        return !0;
      var l = n.cptQuery, u = n.dataQuery;
      return c(l, o, "mainType") && c(l, o, "subType") && c(l, o, "index", "componentIndex") && c(l, o, "name") && c(l, o, "id") && c(u, a, "name") && c(u, a, "dataIndex") && c(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, n.otherQuery, i, a));
      function c(f, d, h, p) {
        return f[h] == null || d[p || h] === f[h];
      }
    }, t.prototype.afterTrigger = function() {
      this.eventInfo = null;
    }, t;
  }()
), XA = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], Iz = XA.concat(["symbolKeepAspect"]), J4e = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    var n = t.getData();
    if (t.legendIcon && n.setVisual("legendIcon", t.legendIcon), !t.hasSymbolVisual)
      return;
    for (var r = {}, i = {}, a = !1, o = 0; o < XA.length; o++) {
      var s = XA[o], l = t.get(s);
      Me(l) ? (a = !0, i[s] = l) : r[s] = l;
    }
    if (r.symbol = r.symbol || t.defaultSymbol, n.setVisual(le({
      legendIcon: t.legendIcon || r.symbol,
      symbolKeepAspect: t.get("symbolKeepAspect")
    }, r)), e.isSeriesFiltered(t))
      return;
    var u = st(i);
    function c(f, d) {
      for (var h = t.getRawValue(d), p = t.getDataParams(d), v = 0; v < u.length; v++) {
        var g = u[v];
        f.setItemVisual(d, g, i[g](h, p));
      }
    }
    return {
      dataEach: a ? c : null
    };
  }
}, e8e = {
  createOnAllSeries: !0,
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    if (!t.hasSymbolVisual || e.isSeriesFiltered(t))
      return;
    var n = t.getData();
    function r(i, a) {
      for (var o = i.getItemModel(a), s = 0; s < Iz.length; s++) {
        var l = Iz[s], u = o.getShallow(l, !0);
        u != null && i.setItemVisual(a, l, u);
      }
    }
    return {
      dataEach: n.hasItemOption ? r : null
    };
  }
};
function ck(t, e, n) {
  switch (n) {
    case "color":
      var r = t.getItemVisual(e, "style");
      return r[t.getVisual("drawType")];
    case "opacity":
      return t.getItemVisual(e, "style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return t.getItemVisual(e, n);
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  }
}
function H0(t, e) {
  switch (e) {
    case "color":
      var n = t.getVisual("style");
      return n[t.getVisual("drawType")];
    case "opacity":
      return t.getVisual("style").opacity;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      return t.getVisual(e);
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
  }
}
function hee(t, e, n, r) {
  switch (n) {
    case "color":
      var i = t.ensureUniqueItemVisual(e, "style");
      i[t.getVisual("drawType")] = r, t.setItemVisual(e, "colorFromPalette", !1);
      break;
    case "opacity":
      t.ensureUniqueItemVisual(e, "style").opacity = r;
      break;
    case "symbol":
    case "symbolSize":
    case "liftZ":
      t.setItemVisual(e, n, r);
      break;
    default:
      process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + n);
  }
}
function pee(t, e) {
  function n(r, i) {
    var a = [];
    return r.eachComponent({
      mainType: "series",
      subType: t,
      query: i
    }, function(o) {
      a.push(o.seriesIndex);
    }), a;
  }
  k([[t + "ToggleSelect", "toggleSelect"], [t + "Select", "select"], [t + "UnSelect", "unselect"]], function(r) {
    e(r[0], function(i, a, o) {
      i = le({}, i), process.env.NODE_ENV !== "production" && Cn(i.type, r[1]), o.dispatchAction(le(i, {
        type: r[1],
        seriesIndex: n(a, i)
      }));
    });
  });
}
function ud(t, e, n, r, i) {
  var a = t + e;
  n.isSilent(a) || (process.env.NODE_ENV !== "production" && Ea("event " + a + " is deprecated."), r.eachComponent({
    mainType: "series",
    subType: "pie"
  }, function(o) {
    for (var s = o.seriesIndex, l = o.option.selectedMap, u = i.selected, c = 0; c < u.length; c++)
      if (u[c].seriesIndex === s) {
        var f = o.getData(), d = mf(f, i.fromActionPayload);
        n.trigger(a, {
          type: a,
          seriesId: o.id,
          name: ue(d) ? f.getName(d[0]) : f.getName(d),
          selected: Oe(l) ? l : le({}, l)
        });
      }
  }));
}
function t8e(t, e, n) {
  t.on("selectchanged", function(r) {
    var i = n.getModel();
    r.isFromClick ? (ud("map", "selectchanged", e, i, r), ud("pie", "selectchanged", e, i, r)) : r.fromAction === "select" ? (ud("map", "selected", e, i, r), ud("pie", "selected", e, i, r)) : r.fromAction === "unselect" && (ud("map", "unselected", e, i, r), ud("pie", "unselected", e, i, r));
  });
}
function Bc(t, e, n) {
  for (var r; t && !(e(t) && (r = t, n)); )
    t = t.__hostTarget || t.parent;
  return r;
}
var n8e = Math.round(Math.random() * 9), r8e = typeof Object.defineProperty == "function", i8e = function() {
  function t() {
    this._id = "__ec_inner_" + n8e++;
  }
  return t.prototype.get = function(e) {
    return this._guard(e)[this._id];
  }, t.prototype.set = function(e, n) {
    var r = this._guard(e);
    return r8e ? Object.defineProperty(r, this._id, {
      value: n,
      enumerable: !1,
      configurable: !0
    }) : r[this._id] = n, this;
  }, t.prototype.delete = function(e) {
    return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
  }, t.prototype.has = function(e) {
    return !!this._guard(e)[this._id];
  }, t.prototype._guard = function(e) {
    if (e !== Object(e))
      throw TypeError("Value of WeakMap is not a non-null object.");
    return e;
  }, t;
}(), a8e = ot.extend({
  type: "triangle",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
    t.moveTo(n, r - a), t.lineTo(n + i, r + a), t.lineTo(n - i, r + a), t.closePath();
  }
}), o8e = ot.extend({
  type: "diamond",
  shape: {
    cx: 0,
    cy: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.cx, r = e.cy, i = e.width / 2, a = e.height / 2;
    t.moveTo(n, r - a), t.lineTo(n + i, r), t.lineTo(n, r + a), t.lineTo(n - i, r), t.closePath();
  }
}), s8e = ot.extend({
  type: "pin",
  shape: {
    // x, y on the cusp
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.x, r = e.y, i = e.width / 5 * 3, a = Math.max(i, e.height), o = i / 2, s = o * o / (a - o), l = r - a + o + s, u = Math.asin(s / o), c = Math.cos(u) * o, f = Math.sin(u), d = Math.cos(u), h = o * 0.6, p = o * 0.7;
    t.moveTo(n - c, l + s), t.arc(n, l, o, Math.PI - u, Math.PI * 2 + u), t.bezierCurveTo(n + c - f * h, l + s + d * h, n, r - p, n, r), t.bezierCurveTo(n, r - p, n - c + f * h, l + s + d * h, n - c, l + s), t.closePath();
  }
}), l8e = ot.extend({
  type: "arrow",
  shape: {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  buildPath: function(t, e) {
    var n = e.height, r = e.width, i = e.x, a = e.y, o = r / 3 * 2;
    t.moveTo(i, a), t.lineTo(i + o, a + n), t.lineTo(i, a + n / 4 * 3), t.lineTo(i - o, a + n), t.lineTo(i, a), t.closePath();
  }
}), u8e = {
  line: Un,
  rect: mt,
  roundRect: mt,
  square: mt,
  circle: ll,
  diamond: o8e,
  pin: s8e,
  arrow: l8e,
  triangle: a8e
}, c8e = {
  line: function(t, e, n, r, i) {
    i.x1 = t, i.y1 = e + r / 2, i.x2 = t + n, i.y2 = e + r / 2;
  },
  rect: function(t, e, n, r, i) {
    i.x = t, i.y = e, i.width = n, i.height = r;
  },
  roundRect: function(t, e, n, r, i) {
    i.x = t, i.y = e, i.width = n, i.height = r, i.r = Math.min(n, r) / 4;
  },
  square: function(t, e, n, r, i) {
    var a = Math.min(n, r);
    i.x = t, i.y = e, i.width = a, i.height = a;
  },
  circle: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.r = Math.min(n, r) / 2;
  },
  diamond: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  },
  pin: function(t, e, n, r, i) {
    i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  },
  arrow: function(t, e, n, r, i) {
    i.x = t + n / 2, i.y = e + r / 2, i.width = n, i.height = r;
  },
  triangle: function(t, e, n, r, i) {
    i.cx = t + n / 2, i.cy = e + r / 2, i.width = n, i.height = r;
  }
}, gO = {};
k(u8e, function(t, e) {
  gO[e] = new t();
});
var f8e = ot.extend({
  type: "symbol",
  shape: {
    symbolType: "",
    x: 0,
    y: 0,
    width: 0,
    height: 0
  },
  calculateTextPosition: function(t, e, n) {
    var r = rO(t, e, n), i = this.shape;
    return i && i.symbolType === "pin" && e.position === "inside" && (r.y = n.y + n.height * 0.4), r;
  },
  buildPath: function(t, e, n) {
    var r = e.symbolType;
    if (r !== "none") {
      var i = gO[r];
      i || (r = "rect", i = gO[r]), c8e[r](e.x, e.y, e.width, e.height, i.shape), i.buildPath(t, i.shape, n);
    }
  }
});
function d8e(t, e) {
  if (this.type !== "image") {
    var n = this.style;
    this.__isEmptyBrush ? (n.stroke = t, n.fill = e || "#fff", n.lineWidth = 2) : this.shape.symbolType === "line" ? n.stroke = t : n.fill = t, this.markRedraw();
  }
}
function $n(t, e, n, r, i, a, o) {
  var s = t.indexOf("empty") === 0;
  s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  var l;
  return t.indexOf("image://") === 0 ? l = WR(t.slice(8), new Je(e, n, r, i), o ? "center" : "cover") : t.indexOf("path://") === 0 ? l = F0(t.slice(7), {}, new Je(e, n, r, i), o ? "center" : "cover") : l = new f8e({
    shape: {
      symbolType: t,
      x: e,
      y: n,
      width: r,
      height: i
    }
  }), l.__isEmptyBrush = s, l.setColor = d8e, a && l.setColor(a), l;
}
function xp(t) {
  return ue(t) || (t = [+t, +t]), [t[0] || 0, t[1] || 0];
}
function Vf(t, e) {
  if (t != null)
    return ue(t) || (t = [t, t]), [_e(t[0], e[0]) || 0, _e(We(t[1], t[0]), e[1]) || 0];
}
function zc(t) {
  return isFinite(t);
}
function h8e(t, e, n) {
  var r = e.x == null ? 0 : e.x, i = e.x2 == null ? 1 : e.x2, a = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
  e.global || (r = r * n.width + n.x, i = i * n.width + n.x, a = a * n.height + n.y, o = o * n.height + n.y), r = zc(r) ? r : 0, i = zc(i) ? i : 1, a = zc(a) ? a : 0, o = zc(o) ? o : 0;
  var s = t.createLinearGradient(r, a, i, o);
  return s;
}
function p8e(t, e, n) {
  var r = n.width, i = n.height, a = Math.min(r, i), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, l = e.r == null ? 0.5 : e.r;
  e.global || (o = o * r + n.x, s = s * i + n.y, l = l * a), o = zc(o) ? o : 0.5, s = zc(s) ? s : 0.5, l = l >= 0 && zc(l) ? l : 0.5;
  var u = t.createRadialGradient(o, s, 0, o, s, l);
  return u;
}
function YA(t, e, n) {
  for (var r = e.type === "radial" ? p8e(t, e, n) : h8e(t, e, n), i = e.colorStops, a = 0; a < i.length; a++)
    r.addColorStop(i[a].offset, i[a].color);
  return r;
}
function v8e(t, e) {
  if (t === e || !t && !e)
    return !1;
  if (!t || !e || t.length !== e.length)
    return !0;
  for (var n = 0; n < t.length; n++)
    if (t[n] !== e[n])
      return !0;
  return !1;
}
function lb(t) {
  return parseInt(t, 10);
}
function Fd(t, e, n) {
  var r = ["width", "height"][e], i = ["clientWidth", "clientHeight"][e], a = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
  if (n[r] != null && n[r] !== "auto")
    return parseFloat(n[r]);
  var s = document.defaultView.getComputedStyle(t);
  return (t[i] || lb(s[r]) || lb(t.style[r])) - (lb(s[a]) || 0) - (lb(s[o]) || 0) | 0;
}
function g8e(t, e) {
  return !t || t === "solid" || !(e > 0) ? null : t === "dashed" ? [4 * e, 2 * e] : t === "dotted" ? [e] : St(t) ? [t] : ue(t) ? t : null;
}
function fk(t) {
  var e = t.style, n = e.lineDash && e.lineWidth > 0 && g8e(e.lineDash, e.lineWidth), r = e.lineDashOffset;
  if (n) {
    var i = e.strokeNoScale && t.getLineScale ? t.getLineScale() : 1;
    i && i !== 1 && (n = ce(n, function(a) {
      return a / i;
    }), r /= i);
  }
  return [n, r];
}
var m8e = new as(!0);
function mO(t) {
  var e = t.stroke;
  return !(e == null || e === "none" || !(t.lineWidth > 0));
}
function Dz(t) {
  return typeof t == "string" && t !== "none";
}
function yO(t) {
  var e = t.fill;
  return e != null && e !== "none";
}
function Rz(t, e) {
  if (e.fillOpacity != null && e.fillOpacity !== 1) {
    var n = t.globalAlpha;
    t.globalAlpha = e.fillOpacity * e.opacity, t.fill(), t.globalAlpha = n;
  } else
    t.fill();
}
function kz(t, e) {
  if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
    var n = t.globalAlpha;
    t.globalAlpha = e.strokeOpacity * e.opacity, t.stroke(), t.globalAlpha = n;
  } else
    t.stroke();
}
function qA(t, e, n) {
  var r = IR(e.image, e.__image, n);
  if (Hx(r)) {
    var i = t.createPattern(r, e.repeat || "repeat");
    if (typeof DOMMatrix == "function" && i && i.setTransform) {
      var a = new DOMMatrix();
      a.translateSelf(e.x || 0, e.y || 0), a.rotateSelf(0, 0, (e.rotation || 0) * Og), a.scaleSelf(e.scaleX || 1, e.scaleY || 1), i.setTransform(a);
    }
    return i;
  }
}
function y8e(t, e, n, r) {
  var i, a = mO(n), o = yO(n), s = n.strokePercent, l = s < 1, u = !e.path;
  (!e.silent || l) && u && e.createPathProxy();
  var c = e.path || m8e, f = e.__dirty;
  if (!r) {
    var d = n.fill, h = n.stroke, p = o && !!d.colorStops, v = a && !!h.colorStops, g = o && !!d.image, m = a && !!h.image, y = void 0, b = void 0, _ = void 0, O = void 0, S = void 0;
    (p || v) && (S = e.getBoundingRect()), p && (y = f ? YA(t, d, S) : e.__canvasFillGradient, e.__canvasFillGradient = y), v && (b = f ? YA(t, h, S) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = b), g && (_ = f || !e.__canvasFillPattern ? qA(t, d, e) : e.__canvasFillPattern, e.__canvasFillPattern = _), m && (O = f || !e.__canvasStrokePattern ? qA(t, h, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = _), p ? t.fillStyle = y : g && (_ ? t.fillStyle = _ : o = !1), v ? t.strokeStyle = b : m && (O ? t.strokeStyle = O : a = !1);
  }
  var x = e.getGlobalScale();
  c.setScale(x[0], x[1], e.segmentIgnoreThreshold);
  var C, T;
  t.setLineDash && n.lineDash && (i = fk(e), C = i[0], T = i[1]);
  var w = !0;
  (u || f & $d) && (c.setDPR(t.dpr), l ? c.setContext(null) : (c.setContext(t), w = !1), c.reset(), e.buildPath(c, e.shape, r), c.toStatic(), e.pathUpdated()), w && c.rebuildPath(t, l ? s : 1), C && (t.setLineDash(C), t.lineDashOffset = T), r || (n.strokeFirst ? (a && kz(t, n), o && Rz(t, n)) : (o && Rz(t, n), a && kz(t, n))), C && t.setLineDash([]);
}
function b8e(t, e, n) {
  var r = e.__image = IR(n.image, e.__image, e, e.onload);
  if (!(!r || !Hx(r))) {
    var i = n.x || 0, a = n.y || 0, o = e.getWidth(), s = e.getHeight(), l = r.width / r.height;
    if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = r.width, s = r.height), n.sWidth && n.sHeight) {
      var u = n.sx || 0, c = n.sy || 0;
      t.drawImage(r, u, c, n.sWidth, n.sHeight, i, a, o, s);
    } else if (n.sx && n.sy) {
      var u = n.sx, c = n.sy, f = o - u, d = s - c;
      t.drawImage(r, u, c, f, d, i, a, o, s);
    } else
      t.drawImage(r, i, a, o, s);
  }
}
function _8e(t, e, n) {
  var r, i = n.text;
  if (i != null && (i += ""), i) {
    t.font = n.font || iu, t.textAlign = n.textAlign, t.textBaseline = n.textBaseline;
    var a = void 0, o = void 0;
    t.setLineDash && n.lineDash && (r = fk(e), a = r[0], o = r[1]), a && (t.setLineDash(a), t.lineDashOffset = o), n.strokeFirst ? (mO(n) && t.strokeText(i, n.x, n.y), yO(n) && t.fillText(i, n.x, n.y)) : (yO(n) && t.fillText(i, n.x, n.y), mO(n) && t.strokeText(i, n.x, n.y)), a && t.setLineDash([]);
  }
}
var Lz = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], Nz = [
  ["lineCap", "butt"],
  ["lineJoin", "miter"],
  ["miterLimit", 10]
];
function vee(t, e, n, r, i) {
  var a = !1;
  if (!r && (n = n || {}, e === n))
    return !1;
  if (r || e.opacity !== n.opacity) {
    gi(t, i), a = !0;
    var o = Math.max(Math.min(e.opacity, 1), 0);
    t.globalAlpha = isNaN(o) ? Kc.opacity : o;
  }
  (r || e.blend !== n.blend) && (a || (gi(t, i), a = !0), t.globalCompositeOperation = e.blend || Kc.blend);
  for (var s = 0; s < Lz.length; s++) {
    var l = Lz[s];
    (r || e[l] !== n[l]) && (a || (gi(t, i), a = !0), t[l] = t.dpr * (e[l] || 0));
  }
  return (r || e.shadowColor !== n.shadowColor) && (a || (gi(t, i), a = !0), t.shadowColor = e.shadowColor || Kc.shadowColor), a;
}
function Bz(t, e, n, r, i) {
  var a = Em(e, i.inHover), o = r ? null : n && Em(n, i.inHover) || {};
  if (a === o)
    return !1;
  var s = vee(t, a, o, r, i);
  if ((r || a.fill !== o.fill) && (s || (gi(t, i), s = !0), Dz(a.fill) && (t.fillStyle = a.fill)), (r || a.stroke !== o.stroke) && (s || (gi(t, i), s = !0), Dz(a.stroke) && (t.strokeStyle = a.stroke)), (r || a.opacity !== o.opacity) && (s || (gi(t, i), s = !0), t.globalAlpha = a.opacity == null ? 1 : a.opacity), e.hasStroke()) {
    var l = a.lineWidth, u = l / (a.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
    t.lineWidth !== u && (s || (gi(t, i), s = !0), t.lineWidth = u);
  }
  for (var c = 0; c < Nz.length; c++) {
    var f = Nz[c], d = f[0];
    (r || a[d] !== o[d]) && (s || (gi(t, i), s = !0), t[d] = a[d] || f[1]);
  }
  return s;
}
function O8e(t, e, n, r, i) {
  return vee(t, Em(e, i.inHover), n && Em(n, i.inHover), r, i);
}
function gee(t, e) {
  var n = e.transform, r = t.dpr || 1;
  n ? t.setTransform(r * n[0], r * n[1], r * n[2], r * n[3], r * n[4], r * n[5]) : t.setTransform(r, 0, 0, r, 0, 0);
}
function S8e(t, e, n) {
  for (var r = !1, i = 0; i < t.length; i++) {
    var a = t[i];
    r = r || a.isZeroArea(), gee(e, a), e.beginPath(), a.buildPath(e, a.shape), e.clip();
  }
  n.allClipped = r;
}
function x8e(t, e) {
  return t && e ? t[0] !== e[0] || t[1] !== e[1] || t[2] !== e[2] || t[3] !== e[3] || t[4] !== e[4] || t[5] !== e[5] : !(!t && !e);
}
var zz = 1, Vz = 2, Fz = 3, Wz = 4;
function w8e(t) {
  var e = yO(t), n = mO(t);
  return !(t.lineDash || !(+e ^ +n) || e && typeof t.fill != "string" || n && typeof t.stroke != "string" || t.strokePercent < 1 || t.strokeOpacity < 1 || t.fillOpacity < 1);
}
function gi(t, e) {
  e.batchFill && t.fill(), e.batchStroke && t.stroke(), e.batchFill = "", e.batchStroke = "";
}
function Em(t, e) {
  return e && t.__hoverStyle || t.style;
}
function dk(t, e) {
  Vc(t, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
}
function Vc(t, e, n, r) {
  var i = e.transform;
  if (!e.shouldBePainted(n.viewWidth, n.viewHeight, !1, !1)) {
    e.__dirty &= ~ki, e.__isRendered = !1;
    return;
  }
  var a = e.__clipPaths, o = n.prevElClipPaths, s = !1, l = !1;
  if ((!o || v8e(a, o)) && (o && o.length && (gi(t, n), t.restore(), l = s = !0, n.prevElClipPaths = null, n.allClipped = !1, n.prevEl = null), a && a.length && (gi(t, n), t.save(), S8e(a, t, n), s = !0), n.prevElClipPaths = a), n.allClipped) {
    e.__isRendered = !1;
    return;
  }
  e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
  var u = n.prevEl;
  u || (l = s = !0);
  var c = e instanceof ot && e.autoBatch && w8e(e.style);
  s || x8e(i, u.transform) ? (gi(t, n), gee(t, e)) : c || gi(t, n);
  var f = Em(e, n.inHover);
  e instanceof ot ? (n.lastDrawType !== zz && (l = !0, n.lastDrawType = zz), Bz(t, e, u, l, n), (!c || !n.batchFill && !n.batchStroke) && t.beginPath(), y8e(t, e, f, c), c && (n.batchFill = f.fill || "", n.batchStroke = f.stroke || "")) : e instanceof Bh ? (n.lastDrawType !== Fz && (l = !0, n.lastDrawType = Fz), Bz(t, e, u, l, n), _8e(t, e, f)) : e instanceof lr ? (n.lastDrawType !== Vz && (l = !0, n.lastDrawType = Vz), O8e(t, e, u, l, n), b8e(t, e, f)) : e.getTemporalDisplayables && (n.lastDrawType !== Wz && (l = !0, n.lastDrawType = Wz), C8e(t, e, n)), c && r && gi(t, n), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), n.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
}
function C8e(t, e, n) {
  var r = e.getDisplayables(), i = e.getTemporalDisplayables();
  t.save();
  var a = {
    prevElClipPaths: null,
    prevEl: null,
    allClipped: !1,
    viewWidth: n.viewWidth,
    viewHeight: n.viewHeight,
    inHover: n.inHover
  }, o, s;
  for (o = e.getCursor(), s = r.length; o < s; o++) {
    var l = r[o];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  }
  for (var u = 0, c = i.length; u < c; u++) {
    var l = i[u];
    l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), Vc(t, l, a, u === c - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), a.prevEl = l;
  }
  e.clearTemporalDisplayables(), e.notClear = !0, t.restore();
}
var RT = new i8e(), Qz = new R0(100), Hz = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
function Fh(t, e) {
  if (t === "none")
    return null;
  var n = e.getDevicePixelRatio(), r = e.getZr(), i = r.painter.type === "svg";
  t.dirty && RT.delete(t);
  var a = RT.get(t);
  if (a)
    return a;
  var o = Re(t, {
    symbol: "rect",
    symbolSize: 1,
    symbolKeepAspect: !0,
    color: "rgba(0, 0, 0, 0.2)",
    backgroundColor: null,
    dashArrayX: 5,
    dashArrayY: 5,
    rotation: 0,
    maxTileWidth: 512,
    maxTileHeight: 512
  });
  o.backgroundColor === "none" && (o.backgroundColor = null);
  var s = {
    repeat: "repeat"
  };
  return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = i ? 1 : 1 / n, RT.set(t, s), t.dirty = !1, s;
  function l(u) {
    for (var c = [n], f = !0, d = 0; d < Hz.length; ++d) {
      var h = o[Hz[d]];
      if (h != null && !ue(h) && !Oe(h) && !St(h) && typeof h != "boolean") {
        f = !1;
        break;
      }
      c.push(h);
    }
    var p;
    if (f) {
      p = c.join(",") + (i ? "-svg" : "");
      var v = Qz.get(p);
      v && (i ? u.svgElement = v : u.image = v);
    }
    var g = yee(o.dashArrayX), m = T8e(o.dashArrayY), y = mee(o.symbol), b = P8e(g), _ = bee(m), O = !i && io.createCanvas(), S = i && {
      tag: "g",
      attrs: {},
      key: "dcl",
      children: []
    }, x = T(), C;
    O && (O.width = x.width * n, O.height = x.height * n, C = O.getContext("2d")), w(), f && Qz.put(p, O || S), u.image = O, u.svgElement = S, u.svgWidth = x.width, u.svgHeight = x.height;
    function T() {
      for (var P = 1, $ = 0, A = b.length; $ < A; ++$)
        P = iB(P, b[$]);
      for (var D = 1, $ = 0, A = y.length; $ < A; ++$)
        D = iB(D, y[$].length);
      P *= D;
      var E = _ * b.length * y.length;
      if (process.env.NODE_ENV !== "production") {
        var R = function(N) {
          console.warn("Calculated decal size is greater than " + N + " due to decal option settings so " + N + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + N + " to be larger to avoid incontinuity.");
        };
        P > o.maxTileWidth && R("maxTileWidth"), E > o.maxTileHeight && R("maxTileHeight");
      }
      return {
        width: Math.max(1, Math.min(P, o.maxTileWidth)),
        height: Math.max(1, Math.min(E, o.maxTileHeight))
      };
    }
    function w() {
      C && (C.clearRect(0, 0, O.width, O.height), o.backgroundColor && (C.fillStyle = o.backgroundColor, C.fillRect(0, 0, O.width, O.height)));
      for (var P = 0, $ = 0; $ < m.length; ++$)
        P += m[$];
      if (P <= 0)
        return;
      for (var A = -_, D = 0, E = 0, R = 0; A < x.height; ) {
        if (D % 2 === 0) {
          for (var N = E / 2 % y.length, V = 0, z = 0, W = 0; V < x.width * 2; ) {
            for (var F = 0, $ = 0; $ < g[R].length; ++$)
              F += g[R][$];
            if (F <= 0)
              break;
            if (z % 2 === 0) {
              var Q = (1 - o.symbolSize) * 0.5, Z = V + g[R][z] * Q, ne = A + m[D] * Q, ee = g[R][z] * o.symbolSize, oe = m[D] * o.symbolSize, K = W / 2 % y[N].length;
              ie(Z, ne, ee, oe, y[N][K]);
            }
            V += g[R][z], ++W, ++z, z === g[R].length && (z = 0);
          }
          ++R, R === g.length && (R = 0);
        }
        A += m[D], ++E, ++D, D === m.length && (D = 0);
      }
      function ie(X, H, G, re, fe) {
        var de = i ? 1 : n, Ee = $n(fe, X * de, H * de, G * de, re * de, o.color, o.symbolKeepAspect);
        if (i) {
          var $e = r.painter.renderOneToVNode(Ee);
          $e && S.children.push($e);
        } else
          dk(C, Ee);
      }
    }
  }
}
function mee(t) {
  if (!t || t.length === 0)
    return [["rect"]];
  if (Oe(t))
    return [[t]];
  for (var e = !0, n = 0; n < t.length; ++n)
    if (!Oe(t[n])) {
      e = !1;
      break;
    }
  if (e)
    return mee([t]);
  for (var r = [], n = 0; n < t.length; ++n)
    Oe(t[n]) ? r.push([t[n]]) : r.push(t[n]);
  return r;
}
function yee(t) {
  if (!t || t.length === 0)
    return [[0, 0]];
  if (St(t)) {
    var e = Math.ceil(t);
    return [[e, e]];
  }
  for (var n = !0, r = 0; r < t.length; ++r)
    if (!St(t[r])) {
      n = !1;
      break;
    }
  if (n)
    return yee([t]);
  for (var i = [], r = 0; r < t.length; ++r)
    if (St(t[r])) {
      var e = Math.ceil(t[r]);
      i.push([e, e]);
    } else {
      var e = ce(t[r], function(s) {
        return Math.ceil(s);
      });
      e.length % 2 === 1 ? i.push(e.concat(e)) : i.push(e);
    }
  return i;
}
function T8e(t) {
  if (!t || typeof t == "object" && t.length === 0)
    return [0, 0];
  if (St(t)) {
    var e = Math.ceil(t);
    return [e, e];
  }
  var n = ce(t, function(r) {
    return Math.ceil(r);
  });
  return t.length % 2 ? n.concat(n) : n;
}
function P8e(t) {
  return ce(t, function(e) {
    return bee(e);
  });
}
function bee(t) {
  for (var e = 0, n = 0; n < t.length; ++n)
    e += t[n];
  return t.length % 2 === 1 ? e * 2 : e;
}
function $8e(t, e) {
  t.eachRawSeries(function(n) {
    if (!t.isSeriesFiltered(n)) {
      var r = n.getData();
      r.hasItemVisual() && r.each(function(o) {
        var s = r.getItemVisual(o, "decal");
        if (s) {
          var l = r.ensureUniqueItemVisual(o, "style");
          l.decal = Fh(s, e);
        }
      });
      var i = r.getVisual("decal");
      if (i) {
        var a = r.getVisual("style");
        a.decal = Fh(i, e);
      }
    }
  });
}
var ja = new Ra(), bO = {};
function A8e(t, e) {
  process.env.NODE_ENV !== "production" && bO[t] && Cr("Already has an implementation of " + t + "."), bO[t] = e;
}
function _ee(t) {
  return process.env.NODE_ENV !== "production" && (bO[t] || Cr("Implementation of " + t + " doesn't exists.")), bO[t];
}
var E8e = "5.5.1", M8e = {
  zrender: "5.6.0"
}, I8e = 1, D8e = 800, R8e = 900, k8e = 1e3, L8e = 2e3, N8e = 5e3, Oee = 1e3, B8e = 1100, hk = 2e3, See = 3e3, z8e = 4e3, cw = 4500, V8e = 4600, F8e = 5e3, W8e = 6e3, xee = 7e3, wee = {
  PROCESSOR: {
    FILTER: k8e,
    SERIES_FILTER: D8e,
    STATISTIC: N8e
  },
  VISUAL: {
    LAYOUT: Oee,
    PROGRESSIVE_LAYOUT: B8e,
    GLOBAL: hk,
    CHART: See,
    POST_CHART_LAYOUT: V8e,
    COMPONENT: z8e,
    BRUSH: F8e,
    CHART_ITEM: cw,
    ARIA: W8e,
    DECAL: xee
  }
}, Er = "__flagInMainProcess", si = "__pendingUpdate", kT = "__needsUpdateStatus", Gz = /^[a-zA-Z0-9_]+$/, LT = "__connectUpdateStatus", jz = 0, Q8e = 1, H8e = 2;
function Cee(t) {
  return function() {
    for (var e = [], n = 0; n < arguments.length; n++)
      e[n] = arguments[n];
    if (this.isDisposed()) {
      Ii(this.id);
      return;
    }
    return Pee(this, t, e);
  };
}
function Tee(t) {
  return function() {
    for (var e = [], n = 0; n < arguments.length; n++)
      e[n] = arguments[n];
    return Pee(this, t, e);
  };
}
function Pee(t, e, n) {
  return n[0] = n[0] && n[0].toLowerCase(), Ra.prototype[e].apply(t, n);
}
var $ee = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e;
  }(Ra)
), Aee = $ee.prototype;
Aee.on = Tee("on");
Aee.off = Tee("off");
var cd, NT, ub, vl, BT, zT, VT, cv, fv, Zz, Uz, FT, Xz, cb, Yz, Eee, ta, qz, _O = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this, new K4e()) || this;
      a._chartsViews = [], a._chartsMap = {}, a._componentsViews = [], a._componentsMap = {}, a._pendingActions = [], i = i || {}, Oe(r) && (r = Mee[r]), a._dom = n;
      var o = "canvas", s = "auto", l = !1;
      if (process.env.NODE_ENV !== "production") {
        var u = (
          /* eslint-disable-next-line */
          vt.hasGlobalWindow ? window : global
        );
        u && (o = We(u.__ECHARTS__DEFAULT__RENDERER__, o), s = We(u.__ECHARTS__DEFAULT__COARSE_POINTER, s), l = We(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, l));
      }
      i.ssr && aK(function(h) {
        var p = Fe(h), v = p.dataIndex;
        if (v != null) {
          var g = Pe();
          return g.set("series_index", p.seriesIndex), g.set("data_index", v), p.ssrType && g.set("ssr_type", p.ssrType), g;
        }
      });
      var c = a._zr = xA(n, {
        renderer: i.renderer || o,
        devicePixelRatio: i.devicePixelRatio,
        width: i.width,
        height: i.height,
        ssr: i.ssr,
        useDirtyRect: We(i.useDirtyRect, l),
        useCoarsePointer: We(i.useCoarsePointer, s),
        pointerSize: i.pointerSize
      });
      a._ssr = i.ssr, a._throttledZrFlush = uw(xe(c.flush, c), 17), r = Le(r), r && NJ(r, !0), a._theme = r, a._locale = oLe(i.locale || gJ), a._coordSysMgr = new zf();
      var f = a._api = Yz(a);
      function d(h, p) {
        return h.__prio - p.__prio;
      }
      return k_(SO, d), k_(KA, d), a._scheduler = new lee(a, f, KA, SO), a._messageCenter = new $ee(), a._initEvents(), a.resize = xe(a.resize, a), c.animation.on("frame", a._onframe, a), Zz(c, a), Uz(c, a), vm(a), a;
    }
    return e.prototype._onframe = function() {
      if (!this._disposed) {
        qz(this);
        var n = this._scheduler;
        if (this[si]) {
          var r = this[si].silent;
          this[Er] = !0;
          try {
            cd(this), vl.update.call(this, null, this[si].updateParams);
          } catch (l) {
            throw this[Er] = !1, this[si] = null, l;
          }
          this._zr.flush(), this[Er] = !1, this[si] = null, cv.call(this, r), fv.call(this, r);
        } else if (n.unfinished) {
          var i = I8e, a = this._model, o = this._api;
          n.unfinished = !1;
          do {
            var s = +/* @__PURE__ */ new Date();
            n.performSeriesTasks(a), n.performDataProcessorTasks(a), zT(this, a), n.performVisualTasks(a), cb(this, this._model, o, "remain", {}), i -= +/* @__PURE__ */ new Date() - s;
          } while (i > 0 && n.unfinished);
          n.unfinished || this._zr.flush();
        }
      }
    }, e.prototype.getDom = function() {
      return this._dom;
    }, e.prototype.getId = function() {
      return this.id;
    }, e.prototype.getZr = function() {
      return this._zr;
    }, e.prototype.isSSR = function() {
      return this._ssr;
    }, e.prototype.setOption = function(n, r, i) {
      if (this[Er]) {
        process.env.NODE_ENV !== "production" && Cr("`setOption` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      var a, o, s;
      if (Ie(r) && (i = r.lazyUpdate, a = r.silent, o = r.replaceMerge, s = r.transition, r = r.notMerge), this[Er] = !0, !this._model || r) {
        var l = new kLe(this._api), u = this._theme, c = this._model = new ak();
        c.scheduler = this._scheduler, c.ssr = this._ssr, c.init(null, null, null, u, this._locale, l);
      }
      this._model.setOption(n, {
        replaceMerge: o
      }, JA);
      var f = {
        seriesTransition: s,
        optionChanged: !0
      };
      if (i)
        this[si] = {
          silent: a,
          updateParams: f
        }, this[Er] = !1, this.getZr().wakeUp();
      else {
        try {
          cd(this), vl.update.call(this, null, f);
        } catch (d) {
          throw this[si] = null, this[Er] = !1, d;
        }
        this._ssr || this._zr.flush(), this[si] = null, this[Er] = !1, cv.call(this, a), fv.call(this, a);
      }
    }, e.prototype.setTheme = function() {
      Ea("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 || vt.hasGlobalWindow && window.devicePixelRatio || 1;
    }, e.prototype.getRenderedCanvas = function(n) {
      return process.env.NODE_ENV !== "production" && Cn("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(n);
    }, e.prototype.renderToCanvas = function(n) {
      n = n || {};
      var r = this._zr.painter;
      if (process.env.NODE_ENV !== "production" && r.type !== "canvas")
        throw new Error("renderToCanvas can only be used in the canvas renderer.");
      return r.getRenderedCanvas({
        backgroundColor: n.backgroundColor || this._model.get("backgroundColor"),
        pixelRatio: n.pixelRatio || this.getDevicePixelRatio()
      });
    }, e.prototype.renderToSVGString = function(n) {
      n = n || {};
      var r = this._zr.painter;
      if (process.env.NODE_ENV !== "production" && r.type !== "svg")
        throw new Error("renderToSVGString can only be used in the svg renderer.");
      return r.renderToString({
        useViewBox: n.useViewBox
      });
    }, e.prototype.getSvgDataURL = function() {
      if (vt.svgSupported) {
        var n = this._zr, r = n.storage.getDisplayList();
        return k(r, function(i) {
          i.stopAnimation(null, !0);
        }), n.painter.toDataURL();
      }
    }, e.prototype.getDataURL = function(n) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      n = n || {};
      var r = n.excludeComponents, i = this._model, a = [], o = this;
      k(r, function(l) {
        i.eachComponent({
          mainType: l
        }, function(u) {
          var c = o._componentsMap[u.__viewId];
          c.group.ignore || (a.push(c), c.group.ignore = !0);
        });
      });
      var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(n).toDataURL("image/" + (n && n.type || "png"));
      return k(a, function(l) {
        l.group.ignore = !1;
      }), s;
    }, e.prototype.getConnectedDataURL = function(n) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      var r = n.type === "svg", i = this.group, a = Math.min, o = Math.max, s = 1 / 0;
      if (xO[i]) {
        var l = s, u = s, c = -s, f = -s, d = [], h = n && n.pixelRatio || this.getDevicePixelRatio();
        k(tf, function(b, _) {
          if (b.group === i) {
            var O = r ? b.getZr().painter.getSvgDom().innerHTML : b.renderToCanvas(Le(n)), S = b.getDom().getBoundingClientRect();
            l = a(S.left, l), u = a(S.top, u), c = o(S.right, c), f = o(S.bottom, f), d.push({
              dom: O,
              left: S.left,
              top: S.top
            });
          }
        }), l *= h, u *= h, c *= h, f *= h;
        var p = c - l, v = f - u, g = io.createCanvas(), m = xA(g, {
          renderer: r ? "svg" : "canvas"
        });
        if (m.resize({
          width: p,
          height: v
        }), r) {
          var y = "";
          return k(d, function(b) {
            var _ = b.left - l, O = b.top - u;
            y += '<g transform="translate(' + _ + "," + O + ')">' + b.dom + "</g>";
          }), m.painter.getSvgRoot().innerHTML = y, n.connectedBackgroundColor && m.painter.setBackgroundColor(n.connectedBackgroundColor), m.refreshImmediately(), m.painter.toDataURL();
        } else
          return n.connectedBackgroundColor && m.add(new mt({
            shape: {
              x: 0,
              y: 0,
              width: p,
              height: v
            },
            style: {
              fill: n.connectedBackgroundColor
            }
          })), k(d, function(b) {
            var _ = new lr({
              style: {
                x: b.left * h - l,
                y: b.top * h - u,
                image: b.dom
              }
            });
            m.add(_);
          }), m.refreshImmediately(), g.toDataURL("image/" + (n && n.type || "png"));
      } else
        return this.getDataURL(n);
    }, e.prototype.convertToPixel = function(n, r) {
      return BT(this, "convertToPixel", n, r);
    }, e.prototype.convertFromPixel = function(n, r) {
      return BT(this, "convertFromPixel", n, r);
    }, e.prototype.containPixel = function(n, r) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      var i = this._model, a, o = $g(i, n);
      return k(o, function(s, l) {
        l.indexOf("Models") >= 0 && k(s, function(u) {
          var c = u.coordinateSystem;
          if (c && c.containPoint)
            a = a || !!c.containPoint(r);
          else if (l === "seriesModels") {
            var f = this._chartsMap[u.__viewId];
            f && f.containPoint ? a = a || f.containPoint(r, u) : process.env.NODE_ENV !== "production" && dn(l + ": " + (f ? "The found component do not support containPoint." : "No view mapping to the found component."));
          } else
            process.env.NODE_ENV !== "production" && dn(l + ": containPoint is not supported");
        }, this);
      }, this), !!a;
    }, e.prototype.getVisual = function(n, r) {
      var i = this._model, a = $g(i, n, {
        defaultMainType: "series"
      }), o = a.seriesModel;
      process.env.NODE_ENV !== "production" && (o || dn("There is no specified series model"));
      var s = o.getData(), l = a.hasOwnProperty("dataIndexInside") ? a.dataIndexInside : a.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(a.dataIndex) : null;
      return l != null ? ck(s, l, r) : H0(s, r);
    }, e.prototype.getViewOfComponentModel = function(n) {
      return this._componentsMap[n.__viewId];
    }, e.prototype.getViewOfSeriesModel = function(n) {
      return this._chartsMap[n.__viewId];
    }, e.prototype._initEvents = function() {
      var n = this;
      k(G8e, function(r) {
        var i = function(a) {
          var o = n.getModel(), s = a.target, l, u = r === "globalout";
          if (u ? l = {} : s && Bc(s, function(p) {
            var v = Fe(p);
            if (v && v.dataIndex != null) {
              var g = v.dataModel || o.getSeriesByIndex(v.seriesIndex);
              return l = g && g.getDataParams(v.dataIndex, v.dataType, s) || {}, !0;
            } else if (v.eventData)
              return l = le({}, v.eventData), !0;
          }, !0), l) {
            var c = l.componentType, f = l.componentIndex;
            (c === "markLine" || c === "markPoint" || c === "markArea") && (c = "series", f = l.seriesIndex);
            var d = c && f != null && o.getComponent(c, f), h = d && n[d.mainType === "series" ? "_chartsMap" : "_componentsMap"][d.__viewId];
            process.env.NODE_ENV !== "production" && !u && !(d && h) && dn("model or view can not be found by params"), l.event = a, l.type = r, n._$eventProcessor.eventInfo = {
              targetEl: s,
              packedEvent: l,
              model: d,
              view: h
            }, n.trigger(r, l);
          }
        };
        i.zrEventfulCallAtLast = !0, n._zr.on(r, i, n);
      }), k(Rg, function(r, i) {
        n._messageCenter.on(i, function(a) {
          this.trigger(i, a);
        }, n);
      }), k(["selectchanged"], function(r) {
        n._messageCenter.on(r, function(i) {
          this.trigger(r, i);
        }, n);
      }), t8e(this._messageCenter, this, this._api);
    }, e.prototype.isDisposed = function() {
      return this._disposed;
    }, e.prototype.clear = function() {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      this.setOption({
        series: []
      }, !0);
    }, e.prototype.dispose = function() {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      this._disposed = !0;
      var n = this.getDom();
      n && vK(this.getDom(), vk, "");
      var r = this, i = r._api, a = r._model;
      k(r._componentsViews, function(o) {
        o.dispose(a, i);
      }), k(r._chartsViews, function(o) {
        o.dispose(a, i);
      }), r._zr.dispose(), r._dom = r._model = r._chartsMap = r._componentsMap = r._chartsViews = r._componentsViews = r._scheduler = r._api = r._zr = r._throttledZrFlush = r._theme = r._coordSysMgr = r._messageCenter = null, delete tf[r.id];
    }, e.prototype.resize = function(n) {
      if (this[Er]) {
        process.env.NODE_ENV !== "production" && Cr("`resize` should not be called during main process.");
        return;
      }
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      this._zr.resize(n);
      var r = this._model;
      if (this._loadingFX && this._loadingFX.resize(), !!r) {
        var i = r.resetOption("media"), a = n && n.silent;
        this[si] && (a == null && (a = this[si].silent), i = !0, this[si] = null), this[Er] = !0;
        try {
          i && cd(this), vl.update.call(this, {
            type: "resize",
            animation: le({
              // Disable animation
              duration: 0
            }, n && n.animation)
          });
        } catch (o) {
          throw this[Er] = !1, o;
        }
        this[Er] = !1, cv.call(this, a), fv.call(this, a);
      }
    }, e.prototype.showLoading = function(n, r) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      if (Ie(n) && (r = n, n = ""), n = n || "default", this.hideLoading(), !eE[n]) {
        process.env.NODE_ENV !== "production" && dn("Loading effects " + n + " not exists.");
        return;
      }
      var i = eE[n](this._api, r), a = this._zr;
      this._loadingFX = i, a.add(i);
    }, e.prototype.hideLoading = function() {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
    }, e.prototype.makeActionFromEvent = function(n) {
      var r = le({}, n);
      return r.type = Rg[n.type], r;
    }, e.prototype.dispatchAction = function(n, r) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      if (Ie(r) || (r = {
        silent: !!r
      }), !!OO[n.type] && this._model) {
        if (this[Er]) {
          this._pendingActions.push(n);
          return;
        }
        var i = r.silent;
        VT.call(this, n, i);
        var a = r.flush;
        a ? this._zr.flush() : a !== !1 && vt.browser.weChat && this._throttledZrFlush(), cv.call(this, i), fv.call(this, i);
      }
    }, e.prototype.updateLabelLayout = function() {
      ja.trigger("series:layoutlabels", this._model, this._api, {
        // Not adding series labels.
        // TODO
        updatedSeries: []
      });
    }, e.prototype.appendData = function(n) {
      if (this._disposed) {
        Ii(this.id);
        return;
      }
      var r = n.seriesIndex, i = this.getModel(), a = i.getSeriesByIndex(r);
      process.env.NODE_ENV !== "production" && ke(n.data && a), a.appendData(n), this._scheduler.unfinished = !0, this.getZr().wakeUp();
    }, e.internalField = function() {
      cd = function(f) {
        var d = f._scheduler;
        d.restorePipelines(f._model), d.prepareStageTasks(), NT(f, !0), NT(f, !1), d.plan();
      }, NT = function(f, d) {
        for (var h = f._model, p = f._scheduler, v = d ? f._componentsViews : f._chartsViews, g = d ? f._componentsMap : f._chartsMap, m = f._zr, y = f._api, b = 0; b < v.length; b++)
          v[b].__alive = !1;
        d ? h.eachComponent(function(S, x) {
          S !== "series" && _(x);
        }) : h.eachSeries(_);
        function _(S) {
          var x = S.__requireNewView;
          S.__requireNewView = !1;
          var C = "_ec_" + S.id + "_" + S.type, T = !x && g[C];
          if (!T) {
            var w = Vo(S.type), P = d ? Xt.getClass(w.main, w.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.
              zt.getClass(w.sub)
            );
            process.env.NODE_ENV !== "production" && ke(P, w.sub + " does not exist."), T = new P(), T.init(h, y), g[C] = T, v.push(T), m.add(T.group);
          }
          S.__viewId = T.__id = C, T.__alive = !0, T.__model = S, T.group.__ecComponentInfo = {
            mainType: S.mainType,
            index: S.componentIndex
          }, !d && p.prepareView(T, S, h, y);
        }
        for (var b = 0; b < v.length; ) {
          var O = v[b];
          O.__alive ? b++ : (!d && O.renderTask.dispose(), m.remove(O.group), O.dispose(h, y), v.splice(b, 1), g[O.__id] === O && delete g[O.__id], O.__id = O.group.__ecComponentInfo = null);
        }
      }, ub = function(f, d, h, p, v) {
        var g = f._model;
        if (g.setUpdatePayload(h), !p) {
          k([].concat(f._componentsViews).concat(f._chartsViews), O);
          return;
        }
        var m = {};
        m[p + "Id"] = h[p + "Id"], m[p + "Index"] = h[p + "Index"], m[p + "Name"] = h[p + "Name"];
        var y = {
          mainType: p,
          query: m
        };
        v && (y.subType = v);
        var b = h.excludeSeriesId, _;
        b != null && (_ = Pe(), k(Qt(b), function(S) {
          var x = Vn(S, null);
          x != null && _.set(x, !0);
        })), g && g.eachComponent(y, function(S) {
          var x = _ && _.get(S.id) != null;
          if (!x)
            if (DB(h))
              if (S instanceof Ht)
                h.type === Jc && !h.notBlur && !S.get(["emphasis", "disabled"]) && ike(S, h, f._api);
              else {
                var C = BR(S.mainType, S.componentIndex, h.name, f._api), T = C.focusSelf, w = C.dispatchers;
                h.type === Jc && T && !h.notBlur && DA(S.mainType, S.componentIndex, f._api), w && k(w, function(P) {
                  h.type === Jc ? js(P) : Zs(P);
                });
              }
            else kA(h) && S instanceof Ht && (ske(S, h, f._api), MB(S), ta(f));
        }, f), g && g.eachComponent(y, function(S) {
          var x = _ && _.get(S.id) != null;
          x || O(f[p === "series" ? "_chartsMap" : "_componentsMap"][S.__viewId]);
        }, f);
        function O(S) {
          S && S.__alive && S[d] && S[d](S.__model, g, f._api, h);
        }
      }, vl = {
        prepareAndUpdate: function(f) {
          cd(this), vl.update.call(this, f, {
            // Needs to mark option changed if newOption is given.
            // It's from MagicType.
            // TODO If use a separate flag optionChanged in payload?
            optionChanged: f.newOption != null
          });
        },
        update: function(f, d) {
          var h = this._model, p = this._api, v = this._zr, g = this._coordSysMgr, m = this._scheduler;
          if (h) {
            h.setUpdatePayload(f), m.restoreData(h, f), m.performSeriesTasks(h), g.create(h, p), m.performDataProcessorTasks(h, f), zT(this, h), g.update(h, p), n(h), m.performVisualTasks(h, f), FT(this, h, p, f, d);
            var y = h.get("backgroundColor") || "transparent", b = h.get("darkMode");
            v.setBackgroundColor(y), b != null && b !== "auto" && v.setDarkMode(b), ja.trigger("afterupdate", h, p);
          }
        },
        updateTransform: function(f) {
          var d = this, h = this._model, p = this._api;
          if (h) {
            h.setUpdatePayload(f);
            var v = [];
            h.eachComponent(function(m, y) {
              if (m !== "series") {
                var b = d.getViewOfComponentModel(y);
                if (b && b.__alive)
                  if (b.updateTransform) {
                    var _ = b.updateTransform(y, h, p, f);
                    _ && _.update && v.push(b);
                  } else
                    v.push(b);
              }
            });
            var g = Pe();
            h.eachSeries(function(m) {
              var y = d._chartsMap[m.__viewId];
              if (y.updateTransform) {
                var b = y.updateTransform(m, h, p, f);
                b && b.update && g.set(m.uid, 1);
              } else
                g.set(m.uid, 1);
            }), n(h), this._scheduler.performVisualTasks(h, f, {
              setDirty: !0,
              dirtyMap: g
            }), cb(this, h, p, f, {}, g), ja.trigger("afterupdate", h, p);
          }
        },
        updateView: function(f) {
          var d = this._model;
          d && (d.setUpdatePayload(f), zt.markUpdateMethod(f, "updateView"), n(d), this._scheduler.performVisualTasks(d, f, {
            setDirty: !0
          }), FT(this, d, this._api, f, {}), ja.trigger("afterupdate", d, this._api));
        },
        updateVisual: function(f) {
          var d = this, h = this._model;
          h && (h.setUpdatePayload(f), h.eachSeries(function(p) {
            p.getData().clearAllVisual();
          }), zt.markUpdateMethod(f, "updateVisual"), n(h), this._scheduler.performVisualTasks(h, f, {
            visualType: "visual",
            setDirty: !0
          }), h.eachComponent(function(p, v) {
            if (p !== "series") {
              var g = d.getViewOfComponentModel(v);
              g && g.__alive && g.updateVisual(v, h, d._api, f);
            }
          }), h.eachSeries(function(p) {
            var v = d._chartsMap[p.__viewId];
            v.updateVisual(p, h, d._api, f);
          }), ja.trigger("afterupdate", h, this._api));
        },
        updateLayout: function(f) {
          vl.update.call(this, f);
        }
      }, BT = function(f, d, h, p) {
        if (f._disposed) {
          Ii(f.id);
          return;
        }
        for (var v = f._model, g = f._coordSysMgr.getCoordinateSystems(), m, y = $g(v, h), b = 0; b < g.length; b++) {
          var _ = g[b];
          if (_[d] && (m = _[d](v, y, p)) != null)
            return m;
        }
        process.env.NODE_ENV !== "production" && dn("No coordinate system that supports " + d + " found by the given finder.");
      }, zT = function(f, d) {
        var h = f._chartsMap, p = f._scheduler;
        d.eachSeries(function(v) {
          p.updateStreamModes(v, h[v.__viewId]);
        });
      }, VT = function(f, d) {
        var h = this, p = this.getModel(), v = f.type, g = f.escapeConnect, m = OO[v], y = m.actionInfo, b = (y.update || "update").split(":"), _ = b.pop(), O = b[0] != null && Vo(b[0]);
        this[Er] = !0;
        var S = [f], x = !1;
        f.batch && (x = !0, S = ce(f.batch, function(D) {
          return D = Re(le({}, D), f), D.batch = null, D;
        }));
        var C = [], T, w = kA(f), P = DB(f);
        if (P && VK(this._api), k(S, function(D) {
          if (T = m.action(D, h._model, h._api), T = T || le({}, D), T.type = y.event || T.type, C.push(T), P) {
            var E = ER(f), R = E.queryOptionMap, N = E.mainTypeSpecified, V = N ? R.keys()[0] : "series";
            ub(h, _, D, V), ta(h);
          } else w ? (ub(h, _, D, "series"), ta(h)) : O && ub(h, _, D, O.main, O.sub);
        }), _ !== "none" && !P && !w && !O)
          try {
            this[si] ? (cd(this), vl.update.call(this, f), this[si] = null) : vl[_].call(this, f);
          } catch (D) {
            throw this[Er] = !1, D;
          }
        if (x ? T = {
          type: y.event || v,
          escapeConnect: g,
          batch: C
        } : T = C[0], this[Er] = !1, !d) {
          var $ = this._messageCenter;
          if ($.trigger(T.type, T), w) {
            var A = {
              type: "selectchanged",
              escapeConnect: g,
              selected: lke(p),
              isFromClick: f.isFromClick || !1,
              fromAction: f.type,
              fromActionPayload: f
            };
            $.trigger(A.type, A);
          }
        }
      }, cv = function(f) {
        for (var d = this._pendingActions; d.length; ) {
          var h = d.shift();
          VT.call(this, h, f);
        }
      }, fv = function(f) {
        !f && this.trigger("updated");
      }, Zz = function(f, d) {
        f.on("rendered", function(h) {
          d.trigger("rendered", h), // Although zr is dirty if initial animation is not finished
          // and this checking is called on frame, we also check
          // animation finished for robustness.
          f.animation.isFinished() && !d[si] && !d._scheduler.unfinished && !d._pendingActions.length && d.trigger("finished");
        });
      }, Uz = function(f, d) {
        f.on("mouseover", function(h) {
          var p = h.target, v = Bc(p, lu);
          v && (ake(v, h, d._api), ta(d));
        }).on("mouseout", function(h) {
          var p = h.target, v = Bc(p, lu);
          v && (oke(v, h, d._api), ta(d));
        }).on("click", function(h) {
          var p = h.target, v = Bc(p, function(y) {
            return Fe(y).dataIndex != null;
          }, !0);
          if (v) {
            var g = v.selected ? "unselect" : "select", m = Fe(v);
            d._api.dispatchAction({
              type: g,
              dataType: m.dataType,
              dataIndexInside: m.dataIndex,
              seriesIndex: m.seriesIndex,
              isFromClick: !0
            });
          }
        });
      };
      function n(f) {
        f.clearColorPalette(), f.eachSeries(function(d) {
          d.clearColorPalette();
        });
      }
      function r(f) {
        var d = [], h = [], p = !1;
        if (f.eachComponent(function(y, b) {
          var _ = b.get("zlevel") || 0, O = b.get("z") || 0, S = b.getZLevelKey();
          p = p || !!S, (y === "series" ? h : d).push({
            zlevel: _,
            z: O,
            idx: b.componentIndex,
            type: y,
            key: S
          });
        }), p) {
          var v = d.concat(h), g, m;
          k_(v, function(y, b) {
            return y.zlevel === b.zlevel ? y.z - b.z : y.zlevel - b.zlevel;
          }), k(v, function(y) {
            var b = f.getComponent(y.type, y.idx), _ = y.zlevel, O = y.key;
            g != null && (_ = Math.max(g, _)), O ? (_ === g && O !== m && _++, m = O) : m && (_ === g && _++, m = ""), g = _, b.setZLevel(_);
          });
        }
      }
      FT = function(f, d, h, p, v) {
        r(d), Xz(f, d, h, p, v), k(f._chartsViews, function(g) {
          g.__alive = !1;
        }), cb(f, d, h, p, v), k(f._chartsViews, function(g) {
          g.__alive || g.remove(d, h);
        });
      }, Xz = function(f, d, h, p, v, g) {
        k(g || f._componentsViews, function(m) {
          var y = m.__model;
          u(y, m), m.render(y, d, h, p), s(y, m), c(y, m);
        });
      }, cb = function(f, d, h, p, v, g) {
        var m = f._scheduler;
        v = le(v || {}, {
          updatedSeries: d.getSeries()
        }), ja.trigger("series:beforeupdate", d, h, v);
        var y = !1;
        d.eachSeries(function(b) {
          var _ = f._chartsMap[b.__viewId];
          _.__alive = !0;
          var O = _.renderTask;
          m.updatePayload(O, p), u(b, _), g && g.get(b.uid) && O.dirty(), O.perform(m.getPerformArgs(O)) && (y = !0), _.group.silent = !!b.get("silent"), o(b, _), MB(b);
        }), m.unfinished = y || m.unfinished, ja.trigger("series:layoutlabels", d, h, v), ja.trigger("series:transition", d, h, v), d.eachSeries(function(b) {
          var _ = f._chartsMap[b.__viewId];
          s(b, _), c(b, _);
        }), a(f, d), ja.trigger("series:afterupdate", d, h, v);
      }, ta = function(f) {
        f[kT] = !0, f.getZr().wakeUp();
      }, qz = function(f) {
        f[kT] && (f.getZr().storage.traverse(function(d) {
          th(d) || i(d);
        }), f[kT] = !1);
      };
      function i(f) {
        for (var d = [], h = f.currentStates, p = 0; p < h.length; p++) {
          var v = h[p];
          v === "emphasis" || v === "blur" || v === "select" || d.push(v);
        }
        f.selected && f.states.select && d.push("select"), f.hoverState === Zx && f.states.emphasis ? d.push("emphasis") : f.hoverState === B0 && f.states.blur && d.push("blur"), f.useStates(d);
      }
      function a(f, d) {
        var h = f._zr, p = h.storage, v = 0;
        p.traverse(function(g) {
          g.isGroup || v++;
        }), v > d.get("hoverLayerThreshold") && !vt.node && !vt.worker && d.eachSeries(function(g) {
          if (!g.preventUsingHoverLayer) {
            var m = f._chartsMap[g.__viewId];
            m.__alive && m.eachRendered(function(y) {
              y.states.emphasis && (y.states.emphasis.hoverLayer = !0);
            });
          }
        });
      }
      function o(f, d) {
        var h = f.get("blendMode") || null;
        d.eachRendered(function(p) {
          p.isGroup || (p.style.blend = h);
        });
      }
      function s(f, d) {
        if (!f.preventAutoZ) {
          var h = f.get("z") || 0, p = f.get("zlevel") || 0;
          d.eachRendered(function(v) {
            return l(v, h, p, -1 / 0), !0;
          });
        }
      }
      function l(f, d, h, p) {
        var v = f.getTextContent(), g = f.getTextGuideLine(), m = f.isGroup;
        if (m)
          for (var y = f.childrenRef(), b = 0; b < y.length; b++)
            p = Math.max(l(y[b], d, h, p), p);
        else
          f.z = d, f.zlevel = h, p = Math.max(f.z2, p);
        if (v && (v.z = d, v.zlevel = h, isFinite(p) && (v.z2 = p + 2)), g) {
          var _ = f.textGuideLineConfig;
          g.z = d, g.zlevel = h, isFinite(p) && (g.z2 = p + (_ && _.showAbove ? 1 : -1));
        }
        return p;
      }
      function u(f, d) {
        d.eachRendered(function(h) {
          if (!th(h)) {
            var p = h.getTextContent(), v = h.getTextGuideLine();
            h.stateTransition && (h.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), v && v.stateTransition && (v.stateTransition = null), h.hasState() ? (h.prevStates = h.currentStates, h.clearStates()) : h.prevStates && (h.prevStates = null);
          }
        });
      }
      function c(f, d) {
        var h = f.getModel("stateAnimation"), p = f.isAnimationEnabled(), v = h.get("duration"), g = v > 0 ? {
          duration: v,
          delay: h.get("delay"),
          easing: h.get("easing")
          // additive: stateAnimationModel.get('additive')
        } : null;
        d.eachRendered(function(m) {
          if (m.states && m.states.emphasis) {
            if (th(m))
              return;
            if (m instanceof ot && hke(m), m.__dirty) {
              var y = m.prevStates;
              y && m.useStates(y);
            }
            if (p) {
              m.stateTransition = g;
              var b = m.getTextContent(), _ = m.getTextGuideLine();
              b && (b.stateTransition = g), _ && (_.stateTransition = g);
            }
            m.__dirty && i(m);
          }
        });
      }
      Yz = function(f) {
        return new /** @class */
        (function(d) {
          q(h, d);
          function h() {
            return d !== null && d.apply(this, arguments) || this;
          }
          return h.prototype.getCoordinateSystems = function() {
            return f._coordSysMgr.getCoordinateSystems();
          }, h.prototype.getComponentByElement = function(p) {
            for (; p; ) {
              var v = p.__ecComponentInfo;
              if (v != null)
                return f._model.getComponent(v.mainType, v.index);
              p = p.parent;
            }
          }, h.prototype.enterEmphasis = function(p, v) {
            js(p, v), ta(f);
          }, h.prototype.leaveEmphasis = function(p, v) {
            Zs(p, v), ta(f);
          }, h.prototype.enterBlur = function(p) {
            LK(p), ta(f);
          }, h.prototype.leaveBlur = function(p) {
            NR(p), ta(f);
          }, h.prototype.enterSelect = function(p) {
            NK(p), ta(f);
          }, h.prototype.leaveSelect = function(p) {
            BK(p), ta(f);
          }, h.prototype.getModel = function() {
            return f.getModel();
          }, h.prototype.getViewOfComponentModel = function(p) {
            return f.getViewOfComponentModel(p);
          }, h.prototype.getViewOfSeriesModel = function(p) {
            return f.getViewOfSeriesModel(p);
          }, h;
        }(kJ))(f);
      }, Eee = function(f) {
        function d(h, p) {
          for (var v = 0; v < h.length; v++) {
            var g = h[v];
            g[LT] = p;
          }
        }
        k(Rg, function(h, p) {
          f._messageCenter.on(p, function(v) {
            if (xO[f.group] && f[LT] !== jz) {
              if (v && v.escapeConnect)
                return;
              var g = f.makeActionFromEvent(v), m = [];
              k(tf, function(y) {
                y !== f && y.group === f.group && m.push(y);
              }), d(m, jz), k(m, function(y) {
                y[LT] !== Q8e && y.dispatchAction(g);
              }), d(m, H8e);
            }
          });
        });
      };
    }(), e;
  }(Ra)
), pk = _O.prototype;
pk.on = Cee("on");
pk.off = Cee("off");
pk.one = function(t, e, n) {
  var r = this;
  Ea("ECharts#one is deprecated.");
  function i() {
    for (var a = [], o = 0; o < arguments.length; o++)
      a[o] = arguments[o];
    e && e.apply && e.apply(this, a), r.off(t, i);
  }
  this.on.call(this, t, i, n);
};
var G8e = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
function Ii(t) {
  process.env.NODE_ENV !== "production" && dn("Instance " + t + " has been disposed");
}
var OO = {}, Rg = {}, KA = [], JA = [], SO = [], Mee = {}, eE = {}, tf = {}, xO = {}, j8e = +/* @__PURE__ */ new Date() - 0, Z8e = +/* @__PURE__ */ new Date() - 0, vk = "_echarts_instance_";
function Iee(t, e, n) {
  var r = !(n && n.ssr);
  if (r) {
    if (process.env.NODE_ENV !== "production" && !t)
      throw new Error("Initialize failed: invalid dom.");
    var i = gk(t);
    if (i)
      return process.env.NODE_ENV !== "production" && dn("There is a chart instance already initialized on the dom."), i;
    process.env.NODE_ENV !== "production" && au(t) && t.nodeName.toUpperCase() !== "CANVAS" && (!t.clientWidth && (!n || n.width == null) || !t.clientHeight && (!n || n.height == null)) && dn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");
  }
  var a = new _O(t, e, n);
  return a.id = "ec_" + j8e++, tf[a.id] = a, r && vK(t, vk, a.id), Eee(a), ja.trigger("afterinit", a), a;
}
function U8e(t) {
  if (ue(t)) {
    var e = t;
    t = null, k(e, function(n) {
      n.group != null && (t = n.group);
    }), t = t || "g_" + Z8e++, k(e, function(n) {
      n.group = t;
    });
  }
  return xO[t] = !0, t;
}
function Dee(t) {
  xO[t] = !1;
}
var X8e = Dee;
function Y8e(t) {
  Oe(t) ? t = tf[t] : t instanceof _O || (t = gk(t)), t instanceof _O && !t.isDisposed() && t.dispose();
}
function gk(t) {
  return tf[tRe(t, vk)];
}
function q8e(t) {
  return tf[t];
}
function mk(t, e) {
  Mee[t] = e;
}
function yk(t) {
  et(JA, t) < 0 && JA.push(t);
}
function bk(t, e) {
  _k(KA, t, e, L8e);
}
function Ree(t) {
  fw("afterinit", t);
}
function kee(t) {
  fw("afterupdate", t);
}
function fw(t, e) {
  ja.on(t, e);
}
function vo(t, e, n) {
  Me(e) && (n = e, e = "");
  var r = Ie(t) ? t.type : [t, t = {
    event: e
  }][0];
  t.event = (t.event || r).toLowerCase(), e = t.event, !Rg[e] && (ke(Gz.test(r) && Gz.test(e)), OO[r] || (OO[r] = {
    action: n,
    actionInfo: t
  }), Rg[e] = r);
}
function Lee(t, e) {
  zf.register(t, e);
}
function K8e(t) {
  var e = zf.get(t);
  if (e)
    return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice();
}
function Nee(t, e) {
  _k(SO, t, e, Oee, "layout");
}
function $u(t, e) {
  _k(SO, t, e, See, "visual");
}
var Kz = [];
function _k(t, e, n, r, i) {
  if ((Me(e) || Ie(e)) && (n = e, e = r), process.env.NODE_ENV !== "production") {
    if (isNaN(e) || e == null)
      throw new Error("Illegal priority");
    k(t, function(o) {
      ke(o.__raw !== n);
    });
  }
  if (!(et(Kz, n) >= 0)) {
    Kz.push(n);
    var a = lee.wrapStageHandler(n, i);
    a.__prio = e, a.__raw = n, t.push(a);
  }
}
function Ok(t, e) {
  eE[t] = e;
}
function J8e(t) {
  process.env.NODE_ENV !== "production" && Ea("setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead."), Oq({
    createCanvas: t
  });
}
function Bee(t, e, n) {
  var r = _ee("registerMap");
  r && r(t, e, n);
}
function eNe(t) {
  var e = _ee("getMap");
  return e && e(t);
}
var zee = h4e;
$u(hk, B4e);
$u(cw, z4e);
$u(cw, V4e);
$u(hk, J4e);
$u(cw, e8e);
$u(xee, $8e);
yk(NJ);
bk(R8e, ZLe);
Ok("default", F4e);
vo({
  type: Jc,
  event: Jc,
  update: Jc
}, On);
vo({
  type: V_,
  event: V_,
  update: V_
}, On);
vo({
  type: Ag,
  event: Ag,
  update: Ag
}, On);
vo({
  type: F_,
  event: F_,
  update: F_
}, On);
vo({
  type: Eg,
  event: Eg,
  update: Eg
}, On);
mk("light", q4e);
mk("dark", dee);
var tNe = {}, Jz = [], nNe = {
  registerPreprocessor: yk,
  registerProcessor: bk,
  registerPostInit: Ree,
  registerPostUpdate: kee,
  registerUpdateLifecycle: fw,
  registerAction: vo,
  registerCoordinateSystem: Lee,
  registerLayout: Nee,
  registerVisual: $u,
  registerTransform: zee,
  registerLoading: Ok,
  registerMap: Bee,
  registerImpl: A8e,
  PRIORITY: wee,
  ComponentModel: rt,
  ComponentView: Xt,
  SeriesModel: Ht,
  ChartView: zt,
  // TODO Use ComponentModel and SeriesModel instead of Constructor
  registerComponentModel: function(t) {
    rt.registerClass(t);
  },
  registerComponentView: function(t) {
    Xt.registerClass(t);
  },
  registerSeriesModel: function(t) {
    Ht.registerClass(t);
  },
  registerChartView: function(t) {
    zt.registerClass(t);
  },
  registerSubTypeDefaulter: function(t, e) {
    rt.registerSubTypeDefaulter(t, e);
  },
  registerPainter: function(t, e) {
    rK(t, e);
  }
};
function at(t) {
  if (ue(t)) {
    k(t, function(e) {
      at(e);
    });
    return;
  }
  et(Jz, t) >= 0 || (Jz.push(t), Me(t) && (t = {
    install: t
  }), t.install(nNe));
}
function dv(t) {
  return t == null ? 0 : t.length || 1;
}
function eV(t) {
  return t;
}
var Us = (
  /** @class */
  function() {
    function t(e, n, r, i, a, o) {
      this._old = e, this._new = n, this._oldKeyGetter = r || eV, this._newKeyGetter = i || eV, this.context = a, this._diffModeMultiple = o === "multiple";
    }
    return t.prototype.add = function(e) {
      return this._add = e, this;
    }, t.prototype.update = function(e) {
      return this._update = e, this;
    }, t.prototype.updateManyToOne = function(e) {
      return this._updateManyToOne = e, this;
    }, t.prototype.updateOneToMany = function(e) {
      return this._updateOneToMany = e, this;
    }, t.prototype.updateManyToMany = function(e) {
      return this._updateManyToMany = e, this;
    }, t.prototype.remove = function(e) {
      return this._remove = e, this;
    }, t.prototype.execute = function() {
      this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
    }, t.prototype._executeOneToOne = function() {
      var e = this._old, n = this._new, r = {}, i = new Array(e.length), a = new Array(n.length);
      this._initIndexMap(e, null, i, "_oldKeyGetter"), this._initIndexMap(n, r, a, "_newKeyGetter");
      for (var o = 0; o < e.length; o++) {
        var s = i[o], l = r[s], u = dv(l);
        if (u > 1) {
          var c = l.shift();
          l.length === 1 && (r[s] = l[0]), this._update && this._update(c, o);
        } else u === 1 ? (r[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
      }
      this._performRestAdd(a, r);
    }, t.prototype._executeMultiple = function() {
      var e = this._old, n = this._new, r = {}, i = {}, a = [], o = [];
      this._initIndexMap(e, r, a, "_oldKeyGetter"), this._initIndexMap(n, i, o, "_newKeyGetter");
      for (var s = 0; s < a.length; s++) {
        var l = a[s], u = r[l], c = i[l], f = dv(u), d = dv(c);
        if (f > 1 && d === 1)
          this._updateManyToOne && this._updateManyToOne(c, u), i[l] = null;
        else if (f === 1 && d > 1)
          this._updateOneToMany && this._updateOneToMany(c, u), i[l] = null;
        else if (f === 1 && d === 1)
          this._update && this._update(c, u), i[l] = null;
        else if (f > 1 && d > 1)
          this._updateManyToMany && this._updateManyToMany(c, u), i[l] = null;
        else if (f > 1)
          for (var h = 0; h < f; h++)
            this._remove && this._remove(u[h]);
        else
          this._remove && this._remove(u);
      }
      this._performRestAdd(o, i);
    }, t.prototype._performRestAdd = function(e, n) {
      for (var r = 0; r < e.length; r++) {
        var i = e[r], a = n[i], o = dv(a);
        if (o > 1)
          for (var s = 0; s < o; s++)
            this._add && this._add(a[s]);
        else o === 1 && this._add && this._add(a);
        n[i] = null;
      }
    }, t.prototype._initIndexMap = function(e, n, r, i) {
      for (var a = this._diffModeMultiple, o = 0; o < e.length; o++) {
        var s = "_ec_" + this[i](e[o], o);
        if (a || (r[o] = s), !!n) {
          var l = n[s], u = dv(l);
          u === 0 ? (n[s] = o, a && r.push(s)) : u === 1 ? n[s] = [l, o] : l.push(o);
        }
      }
    }, t;
  }()
), rNe = (
  /** @class */
  function() {
    function t(e, n) {
      this._encode = e, this._schema = n;
    }
    return t.prototype.get = function() {
      return {
        // Do not generate full dimension name until fist used.
        fullDimensions: this._getFullDimensionNames(),
        encode: this._encode
      };
    }, t.prototype._getFullDimensionNames = function() {
      return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
    }, t;
  }()
);
function iNe(t, e) {
  var n = {}, r = n.encode = {}, i = Pe(), a = [], o = [], s = {};
  k(t.dimensions, function(d) {
    var h = t.getDimensionInfo(d), p = h.coordDim;
    if (p) {
      process.env.NODE_ENV !== "production" && ke(FA.get(p) == null);
      var v = h.coordDimIndex;
      WT(r, p)[v] = d, h.isExtraCoord || (i.set(p, 1), aNe(h.type) && (a[0] = d), WT(s, p)[v] = t.getDimensionIndex(h.name)), h.defaultTooltip && o.push(d);
    }
    FA.each(function(g, m) {
      var y = WT(r, m), b = h.otherDims[m];
      b != null && b !== !1 && (y[b] = h.name);
    });
  });
  var l = [], u = {};
  i.each(function(d, h) {
    var p = r[h];
    u[h] = p[0], l = l.concat(p);
  }), n.dataDimsOnCoord = l, n.dataDimIndicesOnCoord = ce(l, function(d) {
    return t.getDimensionInfo(d).storeDimIndex;
  }), n.encodeFirstDimNotExtra = u;
  var c = r.label;
  c && c.length && (a = c.slice());
  var f = r.tooltip;
  return f && f.length ? o = f.slice() : o.length || (o = a.slice()), r.defaultedLabel = a, r.defaultedTooltip = o, n.userOutput = new rNe(s, e), n;
}
function WT(t, e) {
  return t.hasOwnProperty(e) || (t[e] = []), t[e];
}
function wO(t) {
  return t === "category" ? "ordinal" : t === "time" ? "time" : "float";
}
function aNe(t) {
  return !(t === "ordinal" || t === "time");
}
var j_ = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.otherDims = {}, e != null && le(this, e);
    }
    return t;
  }()
), oNe = bt(), sNe = {
  float: "f",
  int: "i",
  ordinal: "o",
  number: "n",
  time: "t"
}, Vee = (
  /** @class */
  function() {
    function t(e) {
      this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
    }
    return t.prototype.isDimensionOmitted = function() {
      return this._dimOmitted;
    }, t.prototype._updateDimOmitted = function(e) {
      this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = Qee(this.source)));
    }, t.prototype.getSourceDimensionIndex = function(e) {
      return We(this._dimNameMap.get(e), -1);
    }, t.prototype.getSourceDimension = function(e) {
      var n = this.source.dimensionsDefine;
      if (n)
        return n[e];
    }, t.prototype.makeStoreSchema = function() {
      for (var e = this._fullDimCount, n = zJ(this.source), r = !Hee(e), i = "", a = [], o = 0, s = 0; o < e; o++) {
        var l = void 0, u = void 0, c = void 0, f = this.dimensions[s];
        if (f && f.storeDimIndex === o)
          l = n ? f.name : null, u = f.type, c = f.ordinalMeta, s++;
        else {
          var d = this.getSourceDimension(o);
          d && (l = n ? d.name : null, u = d.type);
        }
        a.push({
          property: l,
          type: u,
          ordinalMeta: c
        }), n && l != null && (!f || !f.isCalculationCoord) && (i += r ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), i += "$", i += sNe[u] || "f", c && (i += c.uid), i += "$";
      }
      var h = this.source, p = [h.seriesLayoutBy, h.startIndex, i].join("$$");
      return {
        dimensions: a,
        hash: p
      };
    }, t.prototype.makeOutputDimensionNames = function() {
      for (var e = [], n = 0, r = 0; n < this._fullDimCount; n++) {
        var i = void 0, a = this.dimensions[r];
        if (a && a.storeDimIndex === n)
          a.isCalculationCoord || (i = a.name), r++;
        else {
          var o = this.getSourceDimension(n);
          o && (i = o.name);
        }
        e.push(i);
      }
      return e;
    }, t.prototype.appendCalculationDimension = function(e) {
      this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
    }, t;
  }()
);
function Fee(t) {
  return t instanceof Vee;
}
function Wee(t) {
  for (var e = Pe(), n = 0; n < (t || []).length; n++) {
    var r = t[n], i = Ie(r) ? r.name : r;
    i != null && e.get(i) == null && e.set(i, n);
  }
  return e;
}
function Qee(t) {
  var e = oNe(t);
  return e.dimNameMap || (e.dimNameMap = Wee(t.dimensionsDefine));
}
function Hee(t) {
  return t > 30;
}
var hv = Ie, gl = ce, lNe = typeof Int32Array > "u" ? Array : Int32Array, uNe = "e\0\0", tV = -1, cNe = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], fNe = ["_approximateExtent"], nV, fb, pv, fd, QT, db, HT, dNe = (
  /** @class */
  function() {
    function t(e, n) {
      this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
      var r, i = !1;
      Fee(e) ? (r = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (i = !0, r = e), r = r || ["x", "y"];
      for (var a = {}, o = [], s = {}, l = !1, u = {}, c = 0; c < r.length; c++) {
        var f = r[c], d = Oe(f) ? new j_({
          name: f
        }) : f instanceof j_ ? f : new j_(f), h = d.name;
        d.type = d.type || "float", d.coordDim || (d.coordDim = h, d.coordDimIndex = 0);
        var p = d.otherDims = d.otherDims || {};
        o.push(h), a[h] = d, u[h] != null && (l = !0), d.createInvertedIndices && (s[h] = []), p.itemName === 0 && (this._nameDimIdx = c), p.itemId === 0 && (this._idDimIdx = c), process.env.NODE_ENV !== "production" && ke(i || d.storeDimIndex >= 0), i && (d.storeDimIndex = c);
      }
      if (this.dimensions = o, this._dimInfos = a, this._initGetDimensionInfo(l), this.hostModel = n, this._invertedIndicesMap = s, this._dimOmitted) {
        var v = this._dimIdxToName = Pe();
        k(o, function(g) {
          v.set(a[g].storeDimIndex, g);
        });
      }
    }
    return t.prototype.getDimension = function(e) {
      var n = this._recognizeDimIndex(e);
      if (n == null)
        return e;
      if (n = e, !this._dimOmitted)
        return this.dimensions[n];
      var r = this._dimIdxToName.get(n);
      if (r != null)
        return r;
      var i = this._schema.getSourceDimension(n);
      if (i)
        return i.name;
    }, t.prototype.getDimensionIndex = function(e) {
      var n = this._recognizeDimIndex(e);
      if (n != null)
        return n;
      if (e == null)
        return -1;
      var r = this._getDimInfo(e);
      return r ? r.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
    }, t.prototype._recognizeDimIndex = function(e) {
      if (St(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
        return +e;
    }, t.prototype._getStoreDimIndex = function(e) {
      var n = this.getDimensionIndex(e);
      if (process.env.NODE_ENV !== "production" && n == null)
        throw new Error("Unknown dimension " + e);
      return n;
    }, t.prototype.getDimensionInfo = function(e) {
      return this._getDimInfo(this.getDimension(e));
    }, t.prototype._initGetDimensionInfo = function(e) {
      var n = this._dimInfos;
      this._getDimInfo = e ? function(r) {
        return n.hasOwnProperty(r) ? n[r] : void 0;
      } : function(r) {
        return n[r];
      };
    }, t.prototype.getDimensionsOnCoord = function() {
      return this._dimSummary.dataDimsOnCoord.slice();
    }, t.prototype.mapDimension = function(e, n) {
      var r = this._dimSummary;
      if (n == null)
        return r.encodeFirstDimNotExtra[e];
      var i = r.encode[e];
      return i ? i[n] : null;
    }, t.prototype.mapDimensionsAll = function(e) {
      var n = this._dimSummary, r = n.encode[e];
      return (r || []).slice();
    }, t.prototype.getStore = function() {
      return this._store;
    }, t.prototype.initData = function(e, n, r) {
      var i = this, a;
      if (e instanceof GA && (a = e), !a) {
        var o = this.dimensions, s = ok(e) || wr(e) ? new VJ(e, o.length) : e;
        a = new GA();
        var l = gl(o, function(u) {
          return {
            type: i._dimInfos[u].type,
            property: u
          };
        });
        a.initData(s, l, r);
      }
      this._store = a, this._nameList = (n || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, a.count()), this._dimSummary = iNe(this, this._schema), this.userOutput = this._dimSummary.userOutput;
    }, t.prototype.appendData = function(e) {
      var n = this._store.appendData(e);
      this._doInit(n[0], n[1]);
    }, t.prototype.appendValues = function(e, n) {
      var r = this._store.appendValues(e, n.length), i = r.start, a = r.end, o = this._shouldMakeIdFromName();
      if (this._updateOrdinalMeta(), n)
        for (var s = i; s < a; s++) {
          var l = s - i;
          this._nameList[s] = n[l], o && HT(this, s);
        }
    }, t.prototype._updateOrdinalMeta = function() {
      for (var e = this._store, n = this.dimensions, r = 0; r < n.length; r++) {
        var i = this._dimInfos[n[r]];
        i.ordinalMeta && e.collectOrdinalMeta(i.storeDimIndex, i.ordinalMeta);
      }
    }, t.prototype._shouldMakeIdFromName = function() {
      var e = this._store.getProvider();
      return this._idDimIdx == null && e.getSource().sourceFormat !== Ds && !e.fillStorage;
    }, t.prototype._doInit = function(e, n) {
      if (!(e >= n)) {
        var r = this._store, i = r.getProvider();
        this._updateOrdinalMeta();
        var a = this._nameList, o = this._idList, s = i.getSource().sourceFormat, l = s === La;
        if (l && !i.pure)
          for (var u = [], c = e; c < n; c++) {
            var f = i.getItem(c, u);
            if (!this.hasItemOption && WDe(f) && (this.hasItemOption = !0), f) {
              var d = f.name;
              a[c] == null && d != null && (a[c] = Vn(d, null));
              var h = f.id;
              o[c] == null && h != null && (o[c] = Vn(h, null));
            }
          }
        if (this._shouldMakeIdFromName())
          for (var c = e; c < n; c++)
            HT(this, c);
        nV(this);
      }
    }, t.prototype.getApproximateExtent = function(e) {
      return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
    }, t.prototype.setApproximateExtent = function(e, n) {
      n = this.getDimension(n), this._approximateExtent[n] = e.slice();
    }, t.prototype.getCalculationInfo = function(e) {
      return this._calculationInfo[e];
    }, t.prototype.setCalculationInfo = function(e, n) {
      hv(e) ? le(this._calculationInfo, e) : this._calculationInfo[e] = n;
    }, t.prototype.getName = function(e) {
      var n = this.getRawIndex(e), r = this._nameList[n];
      return r == null && this._nameDimIdx != null && (r = pv(this, this._nameDimIdx, n)), r == null && (r = ""), r;
    }, t.prototype._getCategory = function(e, n) {
      var r = this._store.get(e, n), i = this._store.getOrdinalMeta(e);
      return i ? i.categories[r] : r;
    }, t.prototype.getId = function(e) {
      return fb(this, this.getRawIndex(e));
    }, t.prototype.count = function() {
      return this._store.count();
    }, t.prototype.get = function(e, n) {
      var r = this._store, i = this._dimInfos[e];
      if (i)
        return r.get(i.storeDimIndex, n);
    }, t.prototype.getByRawIndex = function(e, n) {
      var r = this._store, i = this._dimInfos[e];
      if (i)
        return r.getByRawIndex(i.storeDimIndex, n);
    }, t.prototype.getIndices = function() {
      return this._store.getIndices();
    }, t.prototype.getDataExtent = function(e) {
      return this._store.getDataExtent(this._getStoreDimIndex(e));
    }, t.prototype.getSum = function(e) {
      return this._store.getSum(this._getStoreDimIndex(e));
    }, t.prototype.getMedian = function(e) {
      return this._store.getMedian(this._getStoreDimIndex(e));
    }, t.prototype.getValues = function(e, n) {
      var r = this, i = this._store;
      return ue(e) ? i.getValues(gl(e, function(a) {
        return r._getStoreDimIndex(a);
      }), n) : i.getValues(e);
    }, t.prototype.hasValue = function(e) {
      for (var n = this._dimSummary.dataDimIndicesOnCoord, r = 0, i = n.length; r < i; r++)
        if (isNaN(this._store.get(n[r], e)))
          return !1;
      return !0;
    }, t.prototype.indexOfName = function(e) {
      for (var n = 0, r = this._store.count(); n < r; n++)
        if (this.getName(n) === e)
          return n;
      return -1;
    }, t.prototype.getRawIndex = function(e) {
      return this._store.getRawIndex(e);
    }, t.prototype.indexOfRawIndex = function(e) {
      return this._store.indexOfRawIndex(e);
    }, t.prototype.rawIndexOf = function(e, n) {
      var r = e && this._invertedIndicesMap[e];
      if (process.env.NODE_ENV !== "production" && !r)
        throw new Error("Do not supported yet");
      var i = r[n];
      return i == null || isNaN(i) ? tV : i;
    }, t.prototype.indicesOfNearest = function(e, n, r) {
      return this._store.indicesOfNearest(this._getStoreDimIndex(e), n, r);
    }, t.prototype.each = function(e, n, r) {
      Me(e) && (r = n, n = e, e = []);
      var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
      this._store.each(a, i ? xe(n, i) : n);
    }, t.prototype.filterSelf = function(e, n, r) {
      Me(e) && (r = n, n = e, e = []);
      var i = r || this, a = gl(fd(e), this._getStoreDimIndex, this);
      return this._store = this._store.filter(a, i ? xe(n, i) : n), this;
    }, t.prototype.selectRange = function(e) {
      var n = this, r = {}, i = st(e);
      return k(i, function(a) {
        var o = n._getStoreDimIndex(a);
        r[o] = e[a];
      }), this._store = this._store.selectRange(r), this;
    }, t.prototype.mapArray = function(e, n, r) {
      Me(e) && (r = n, n = e, e = []), r = r || this;
      var i = [];
      return this.each(e, function() {
        i.push(n && n.apply(this, arguments));
      }, r), i;
    }, t.prototype.map = function(e, n, r, i) {
      var a = r || i || this, o = gl(fd(e), this._getStoreDimIndex, this), s = db(this);
      return s._store = this._store.map(o, a ? xe(n, a) : n), s;
    }, t.prototype.modify = function(e, n, r, i) {
      var a = this, o = r || i || this;
      process.env.NODE_ENV !== "production" && k(fd(e), function(l) {
        var u = a.getDimensionInfo(l);
        u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
      });
      var s = gl(fd(e), this._getStoreDimIndex, this);
      this._store.modify(s, o ? xe(n, o) : n);
    }, t.prototype.downSample = function(e, n, r, i) {
      var a = db(this);
      return a._store = this._store.downSample(this._getStoreDimIndex(e), n, r, i), a;
    }, t.prototype.lttbDownSample = function(e, n) {
      var r = db(this);
      return r._store = this._store.lttbDownSample(this._getStoreDimIndex(e), n), r;
    }, t.prototype.getRawDataItem = function(e) {
      return this._store.getRawDataItem(e);
    }, t.prototype.getItemModel = function(e) {
      var n = this.hostModel, r = this.getRawDataItem(e);
      return new Wt(r, n, n && n.ecModel);
    }, t.prototype.diff = function(e) {
      var n = this;
      return new Us(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(r) {
        return fb(e, r);
      }, function(r) {
        return fb(n, r);
      });
    }, t.prototype.getVisual = function(e) {
      var n = this._visual;
      return n && n[e];
    }, t.prototype.setVisual = function(e, n) {
      this._visual = this._visual || {}, hv(e) ? le(this._visual, e) : this._visual[e] = n;
    }, t.prototype.getItemVisual = function(e, n) {
      var r = this._itemVisuals[e], i = r && r[n];
      return i ?? this.getVisual(n);
    }, t.prototype.hasItemVisual = function() {
      return this._itemVisuals.length > 0;
    }, t.prototype.ensureUniqueItemVisual = function(e, n) {
      var r = this._itemVisuals, i = r[e];
      i || (i = r[e] = {});
      var a = i[n];
      return a == null && (a = this.getVisual(n), ue(a) ? a = a.slice() : hv(a) && (a = le({}, a)), i[n] = a), a;
    }, t.prototype.setItemVisual = function(e, n, r) {
      var i = this._itemVisuals[e] || {};
      this._itemVisuals[e] = i, hv(n) ? le(i, n) : i[n] = r;
    }, t.prototype.clearAllVisual = function() {
      this._visual = {}, this._itemVisuals = [];
    }, t.prototype.setLayout = function(e, n) {
      hv(e) ? le(this._layout, e) : this._layout[e] = n;
    }, t.prototype.getLayout = function(e) {
      return this._layout[e];
    }, t.prototype.getItemLayout = function(e) {
      return this._itemLayouts[e];
    }, t.prototype.setItemLayout = function(e, n, r) {
      this._itemLayouts[e] = r ? le(this._itemLayouts[e] || {}, n) : n;
    }, t.prototype.clearItemLayouts = function() {
      this._itemLayouts.length = 0;
    }, t.prototype.setItemGraphicEl = function(e, n) {
      var r = this.hostModel && this.hostModel.seriesIndex;
      MA(r, this.dataType, e, n), this._graphicEls[e] = n;
    }, t.prototype.getItemGraphicEl = function(e) {
      return this._graphicEls[e];
    }, t.prototype.eachItemGraphicEl = function(e, n) {
      k(this._graphicEls, function(r, i) {
        r && e && e.call(n, r, i);
      });
    }, t.prototype.cloneShallow = function(e) {
      return e || (e = new t(this._schema ? this._schema : gl(this.dimensions, this._getDimInfo, this), this.hostModel)), QT(e, this), e._store = this._store, e;
    }, t.prototype.wrapMethod = function(e, n) {
      var r = this[e];
      Me(r) && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
        var i = r.apply(this, arguments);
        return n.apply(this, [i].concat(Rx(arguments)));
      });
    }, t.internalField = function() {
      nV = function(e) {
        var n = e._invertedIndicesMap;
        k(n, function(r, i) {
          var a = e._dimInfos[i], o = a.ordinalMeta, s = e._store;
          if (o) {
            r = n[i] = new lNe(o.categories.length);
            for (var l = 0; l < r.length; l++)
              r[l] = tV;
            for (var l = 0; l < s.count(); l++)
              r[s.get(a.storeDimIndex, l)] = l;
          }
        });
      }, pv = function(e, n, r) {
        return Vn(e._getCategory(n, r), null);
      }, fb = function(e, n) {
        var r = e._idList[n];
        return r == null && e._idDimIdx != null && (r = pv(e, e._idDimIdx, n)), r == null && (r = uNe + n), r;
      }, fd = function(e) {
        return ue(e) || (e = e != null ? [e] : []), e;
      }, db = function(e) {
        var n = new t(e._schema ? e._schema : gl(e.dimensions, e._getDimInfo, e), e.hostModel);
        return QT(n, e), n;
      }, QT = function(e, n) {
        k(cNe.concat(n.__wrappedMethods || []), function(r) {
          n.hasOwnProperty(r) && (e[r] = n[r]);
        }), e.__wrappedMethods = n.__wrappedMethods, k(fNe, function(r) {
          e[r] = Le(n[r]);
        }), e._calculationInfo = le({}, n._calculationInfo);
      }, HT = function(e, n) {
        var r = e._nameList, i = e._idList, a = e._nameDimIdx, o = e._idDimIdx, s = r[n], l = i[n];
        if (s == null && a != null && (r[n] = s = pv(e, a, n)), l == null && o != null && (i[n] = l = pv(e, o, n)), l == null && s != null) {
          var u = e._nameRepeatCount, c = u[s] = (u[s] || 0) + 1;
          l = s, c > 1 && (l += "__ec__" + c), i[n] = l;
        }
      };
    }(), t;
  }()
);
const Lr = dNe;
function hNe(t, e) {
  return wp(t, e).dimensions;
}
function wp(t, e) {
  ok(t) || (t = sk(t)), e = e || {};
  var n = e.coordDimensions || [], r = e.dimensionsDefine || t.dimensionsDefine || [], i = Pe(), a = [], o = vNe(t, n, r, e.dimensionsCount), s = e.canOmitUnusedDimensions && Hee(o), l = r === t.dimensionsDefine, u = l ? Qee(t) : Wee(r), c = e.encodeDefine;
  !c && e.encodeDefaulter && (c = e.encodeDefaulter(t, o));
  for (var f = Pe(c), d = new UJ(o), h = 0; h < d.length; h++)
    d[h] = -1;
  function p(T) {
    var w = d[T];
    if (w < 0) {
      var P = r[T], $ = Ie(P) ? P : {
        name: P
      }, A = new j_(), D = $.name;
      D != null && u.get(D) != null && (A.name = A.displayName = D), $.type != null && (A.type = $.type), $.displayName != null && (A.displayName = $.displayName);
      var E = a.length;
      return d[T] = E, A.storeDimIndex = T, a.push(A), A;
    }
    return a[w];
  }
  if (!s)
    for (var h = 0; h < o; h++)
      p(h);
  f.each(function(T, w) {
    var P = Qt(T).slice();
    if (P.length === 1 && !Oe(P[0]) && P[0] < 0) {
      f.set(w, !1);
      return;
    }
    var $ = f.set(w, []);
    k(P, function(A, D) {
      var E = Oe(A) ? u.get(A) : A;
      E != null && E < o && ($[D] = E, g(p(E), w, D));
    });
  });
  var v = 0;
  k(n, function(T) {
    var w, P, $, A;
    if (Oe(T))
      w = T, A = {};
    else {
      A = T, w = A.name;
      var D = A.ordinalMeta;
      A.ordinalMeta = null, A = le({}, A), A.ordinalMeta = D, P = A.dimsDef, $ = A.otherDims, A.name = A.coordDim = A.coordDimIndex = A.dimsDef = A.otherDims = null;
    }
    var E = f.get(w);
    if (E !== !1) {
      if (E = Qt(E), !E.length)
        for (var R = 0; R < (P && P.length || 1); R++) {
          for (; v < o && p(v).coordDim != null; )
            v++;
          v < o && E.push(v++);
        }
      k(E, function(N, V) {
        var z = p(N);
        if (l && A.type != null && (z.type = A.type), g(Re(z, A), w, V), z.name == null && P) {
          var W = P[V];
          !Ie(W) && (W = {
            name: W
          }), z.name = z.displayName = W.name, z.defaultTooltip = W.defaultTooltip;
        }
        $ && Re(z.otherDims, $);
      });
    }
  });
  function g(T, w, P) {
    FA.get(w) != null ? T.otherDims[w] = P : (T.coordDim = w, T.coordDimIndex = P, i.set(w, !0));
  }
  var m = e.generateCoord, y = e.generateCoordCount, b = y != null;
  y = m ? y || 1 : 0;
  var _ = m || "value";
  function O(T) {
    T.name == null && (T.name = T.coordDim);
  }
  if (s)
    k(a, function(T) {
      O(T);
    }), a.sort(function(T, w) {
      return T.storeDimIndex - w.storeDimIndex;
    });
  else
    for (var S = 0; S < o; S++) {
      var x = p(S), C = x.coordDim;
      C == null && (x.coordDim = gNe(_, i, b), x.coordDimIndex = 0, (!m || y <= 0) && (x.isExtraCoord = !0), y--), O(x), x.type == null && (IJ(t, S) === cr.Must || x.isExtraCoord && (x.otherDims.itemName != null || x.otherDims.seriesName != null)) && (x.type = "ordinal");
    }
  return pNe(a), new Vee({
    source: t,
    dimensions: a,
    fullDimensionCount: o,
    dimensionOmitted: s
  });
}
function pNe(t) {
  for (var e = Pe(), n = 0; n < t.length; n++) {
    var r = t[n], i = r.name, a = e.get(i) || 0;
    a > 0 && (r.name = i + (a - 1)), a++, e.set(i, a);
  }
}
function vNe(t, e, n, r) {
  var i = Math.max(t.dimensionsDetectedCount || 1, e.length, n.length, r || 0);
  return k(e, function(a) {
    var o;
    Ie(a) && (o = a.dimsDef) && (i = Math.max(i, o.length));
  }), i;
}
function gNe(t, e, n) {
  if (n || e.hasKey(t)) {
    for (var r = 0; e.hasKey(t + r); )
      r++;
    t += r;
  }
  return e.set(t, !0), t;
}
var mNe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.coordSysDims = [], this.axisMap = Pe(), this.categoryAxisMap = Pe(), this.coordSysName = e;
    }
    return t;
  }()
);
function yNe(t) {
  var e = t.get("coordinateSystem"), n = new mNe(e), r = bNe[e];
  if (r)
    return r(t, n, n.axisMap, n.categoryAxisMap), n;
}
var bNe = {
  cartesian2d: function(t, e, n, r) {
    var i = t.getReferringComponents("xAxis", Dn).models[0], a = t.getReferringComponents("yAxis", Dn).models[0];
    if (process.env.NODE_ENV !== "production") {
      if (!i)
        throw new Error('xAxis "' + Tn(t.get("xAxisIndex"), t.get("xAxisId"), 0) + '" not found');
      if (!a)
        throw new Error('yAxis "' + Tn(t.get("xAxisIndex"), t.get("yAxisId"), 0) + '" not found');
    }
    e.coordSysDims = ["x", "y"], n.set("x", i), n.set("y", a), dd(i) && (r.set("x", i), e.firstCategoryDimIndex = 0), dd(a) && (r.set("y", a), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  singleAxis: function(t, e, n, r) {
    var i = t.getReferringComponents("singleAxis", Dn).models[0];
    if (process.env.NODE_ENV !== "production" && !i)
      throw new Error("singleAxis should be specified.");
    e.coordSysDims = ["single"], n.set("single", i), dd(i) && (r.set("single", i), e.firstCategoryDimIndex = 0);
  },
  polar: function(t, e, n, r) {
    var i = t.getReferringComponents("polar", Dn).models[0], a = i.findAxisModel("radiusAxis"), o = i.findAxisModel("angleAxis");
    if (process.env.NODE_ENV !== "production") {
      if (!o)
        throw new Error("angleAxis option not found");
      if (!a)
        throw new Error("radiusAxis option not found");
    }
    e.coordSysDims = ["radius", "angle"], n.set("radius", a), n.set("angle", o), dd(a) && (r.set("radius", a), e.firstCategoryDimIndex = 0), dd(o) && (r.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
  },
  geo: function(t, e, n, r) {
    e.coordSysDims = ["lng", "lat"];
  },
  parallel: function(t, e, n, r) {
    var i = t.ecModel, a = i.getComponent("parallel", t.get("parallelIndex")), o = e.coordSysDims = a.dimensions.slice();
    k(a.parallelAxisIndex, function(s, l) {
      var u = i.getComponent("parallelAxis", s), c = o[l];
      n.set(c, u), dd(u) && (r.set(c, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
    });
  }
};
function dd(t) {
  return t.get("type") === "category";
}
function Gee(t, e, n) {
  n = n || {};
  var r = n.byIndex, i = n.stackedCoordDimension, a, o, s;
  _Ne(e) ? a = e : (o = e.schema, a = o.dimensions, s = e.store);
  var l = !!(t && t.get("stack")), u, c, f, d;
  if (k(a, function(y, b) {
    Oe(y) && (a[b] = y = {
      name: y
    }), l && !y.isExtraCoord && (!r && !u && y.ordinalMeta && (u = y), !c && y.type !== "ordinal" && y.type !== "time" && (!i || i === y.coordDim) && (c = y));
  }), c && !r && !u && (r = !0), c) {
    f = "__\0ecstackresult_" + t.id, d = "__\0ecstackedover_" + t.id, u && (u.createInvertedIndices = !0);
    var h = c.coordDim, p = c.type, v = 0;
    k(a, function(y) {
      y.coordDim === h && v++;
    });
    var g = {
      name: f,
      coordDim: h,
      coordDimIndex: v,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: a.length
    }, m = {
      name: d,
      // This dimension contains stack base (generally, 0), so do not set it as
      // `stackedDimCoordDim` to avoid extent calculation, consider log scale.
      coordDim: d,
      coordDimIndex: v + 1,
      type: p,
      isExtraCoord: !0,
      isCalculationCoord: !0,
      storeDimIndex: a.length + 1
    };
    o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(d, p), m.storeDimIndex = s.ensureCalculationDimension(f, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(m)) : (a.push(g), a.push(m));
  }
  return {
    stackedDimension: c && c.name,
    stackedByDimension: u && u.name,
    isStackedByIndex: r,
    stackedOverDimension: d,
    stackResultDimension: f
  };
}
function _Ne(t) {
  return !Fee(t.schema);
}
function Xs(t, e) {
  return !!e && e === t.getCalculationInfo("stackedDimension");
}
function Sk(t, e) {
  return Xs(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
}
function ONe(t, e) {
  var n = t.get("coordinateSystem"), r = zf.get(n), i;
  return e && e.coordSysDims && (i = ce(e.coordSysDims, function(a) {
    var o = {
      name: a
    }, s = e.axisMap.get(a);
    if (s) {
      var l = s.get("type");
      o.type = wO(l);
    }
    return o;
  })), i || (i = r && (r.getDimensionsInfo ? r.getDimensionsInfo() : r.dimensions.slice()) || ["x", "y"]), i;
}
function SNe(t, e, n) {
  var r, i;
  return n && k(t, function(a, o) {
    var s = a.coordDim, l = n.categoryAxisMap.get(s);
    l && (r == null && (r = o), a.ordinalMeta = l.getOrdinalMeta(), e && (a.createInvertedIndices = !0)), a.otherDims.itemName != null && (i = !0);
  }), !i && r != null && (t[r].otherDims.itemName = 0), r;
}
function us(t, e, n) {
  n = n || {};
  var r = e.getSourceManager(), i, a = !1;
  t ? (a = !0, i = sk(t)) : (i = r.getSource(), a = i.sourceFormat === La);
  var o = yNe(e), s = ONe(e, o), l = n.useEncodeDefaulter, u = Me(l) ? l : l ? Ue(MJ, s, e) : null, c = {
    coordDimensions: s,
    generateCoord: n.generateCoord,
    encodeDefine: e.getEncode(),
    encodeDefaulter: u,
    canOmitUnusedDimensions: !a
  }, f = wp(i, c), d = SNe(f.dimensions, n.createInvertedIndices, o), h = a ? null : r.getSharedDataStore(f), p = Gee(e, {
    schema: f,
    store: h
  }), v = new Lr(f, e);
  v.setCalculationInfo(p);
  var g = d != null && xNe(i) ? function(m, y, b, _) {
    return _ === d ? b : this.defaultDimValueGetter(m, y, b, _);
  } : null;
  return v.hasItemOption = !1, v.initData(
    // Try to reuse the data store in sourceManager if using dataset.
    a ? i : h,
    null,
    g
  ), v;
}
function xNe(t) {
  if (t.sourceFormat === La) {
    var e = wNe(t.data || []);
    return !ue(fp(e));
  }
}
function wNe(t) {
  for (var e = 0; e < t.length && t[e] == null; )
    e++;
  return t[e];
}
var cs = (
  /** @class */
  function() {
    function t(e) {
      this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
    }
    return t.prototype.getSetting = function(e) {
      return this._setting[e];
    }, t.prototype.unionExtent = function(e) {
      var n = this._extent;
      e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]);
    }, t.prototype.unionExtentFromData = function(e, n) {
      this.unionExtent(e.getApproximateExtent(n));
    }, t.prototype.getExtent = function() {
      return this._extent.slice();
    }, t.prototype.setExtent = function(e, n) {
      var r = this._extent;
      isNaN(e) || (r[0] = e), isNaN(n) || (r[1] = n);
    }, t.prototype.isInExtentRange = function(e) {
      return this._extent[0] <= e && this._extent[1] >= e;
    }, t.prototype.isBlank = function() {
      return this._isBlank;
    }, t.prototype.setBlank = function(e) {
      this._isBlank = e;
    }, t;
  }()
);
Qx(cs);
var CNe = 0, tE = (
  /** @class */
  function() {
    function t(e) {
      this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++CNe;
    }
    return t.createByAxisModel = function(e) {
      var n = e.option, r = n.data, i = r && ce(r, TNe);
      return new t({
        categories: i,
        needCollect: !i,
        // deduplication is default in axis.
        deduplication: n.dedplication !== !1
      });
    }, t.prototype.getOrdinal = function(e) {
      return this._getOrCreateMap().get(e);
    }, t.prototype.parseAndCollect = function(e) {
      var n, r = this._needCollect;
      if (!Oe(e) && !r)
        return e;
      if (r && !this._deduplication)
        return n = this.categories.length, this.categories[n] = e, n;
      var i = this._getOrCreateMap();
      return n = i.get(e), n == null && (r ? (n = this.categories.length, this.categories[n] = e, i.set(e, n)) : n = NaN), n;
    }, t.prototype._getOrCreateMap = function() {
      return this._map || (this._map = Pe(this.categories));
    }, t;
  }()
);
function TNe(t) {
  return Ie(t) && t.value != null ? t.value : t + "";
}
function PNe(t) {
  var e = Math.pow(10, L0(Math.abs(t))), n = Math.abs(t / e);
  return n === 0 || n === 1 || n === 2 || n === 3 || n === 5;
}
function nE(t) {
  return t.type === "interval" || t.type === "log";
}
function $Ne(t, e, n, r) {
  var i = {}, a = t[1] - t[0], o = i.interval = $R(a / e, !0);
  n != null && o < n && (o = i.interval = n), r != null && o > r && (o = i.interval = r);
  var s = i.intervalPrecision = jee(o), l = i.niceTickExtent = [mn(Math.ceil(t[0] / o) * o, s), mn(Math.floor(t[1] / o) * o, s)];
  return ANe(l, t), i;
}
function GT(t) {
  var e = Math.pow(10, L0(t)), n = t / e;
  return n ? n === 2 ? n = 3 : n === 3 ? n = 5 : n *= 2 : n = 1, mn(n * e);
}
function jee(t) {
  return Ua(t) + 2;
}
function rV(t, e, n) {
  t[e] = Math.max(Math.min(t[e], n[1]), n[0]);
}
function ANe(t, e) {
  !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), rV(t, 0, e), rV(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
}
function dw(t, e) {
  return t >= e[0] && t <= e[1];
}
function hw(t, e) {
  return e[1] === e[0] ? 0.5 : (t - e[0]) / (e[1] - e[0]);
}
function pw(t, e) {
  return t * (e[1] - e[0]) + e[0];
}
var vw = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      r.type = "ordinal";
      var i = r.getSetting("ordinalMeta");
      return i || (i = new tE({})), ue(i) && (i = new tE({
        categories: ce(i, function(a) {
          return Ie(a) ? a.value : a;
        })
      })), r._ordinalMeta = i, r._extent = r.getSetting("extent") || [0, i.categories.length - 1], r;
    }
    return e.prototype.parse = function(n) {
      return n == null ? NaN : Oe(n) ? this._ordinalMeta.getOrdinal(n) : Math.round(n);
    }, e.prototype.contain = function(n) {
      return n = this.parse(n), dw(n, this._extent) && this._ordinalMeta.categories[n] != null;
    }, e.prototype.normalize = function(n) {
      return n = this._getTickNumber(this.parse(n)), hw(n, this._extent);
    }, e.prototype.scale = function(n) {
      return n = Math.round(pw(n, this._extent)), this.getRawOrdinalNumber(n);
    }, e.prototype.getTicks = function() {
      for (var n = [], r = this._extent, i = r[0]; i <= r[1]; )
        n.push({
          value: i
        }), i++;
      return n;
    }, e.prototype.getMinorTicks = function(n) {
    }, e.prototype.setSortInfo = function(n) {
      if (n == null) {
        this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
        return;
      }
      for (var r = n.ordinalNumbers, i = this._ordinalNumbersByTick = [], a = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, r.length); o < l; ++o) {
        var u = r[o];
        i[o] = u, a[u] = o;
      }
      for (var c = 0; o < s; ++o) {
        for (; a[c] != null; )
          c++;
        i.push(c), a[c] = o;
      }
    }, e.prototype._getTickNumber = function(n) {
      var r = this._ticksByOrdinalNumber;
      return r && n >= 0 && n < r.length ? r[n] : n;
    }, e.prototype.getRawOrdinalNumber = function(n) {
      var r = this._ordinalNumbersByTick;
      return r && n >= 0 && n < r.length ? r[n] : n;
    }, e.prototype.getLabel = function(n) {
      if (!this.isBlank()) {
        var r = this.getRawOrdinalNumber(n.value), i = this._ordinalMeta.categories[r];
        return i == null ? "" : i + "";
      }
    }, e.prototype.count = function() {
      return this._extent[1] - this._extent[0] + 1;
    }, e.prototype.unionExtentFromData = function(n, r) {
      this.unionExtent(n.getApproximateExtent(r));
    }, e.prototype.isInExtentRange = function(n) {
      return n = this._getTickNumber(n), this._extent[0] <= n && this._extent[1] >= n;
    }, e.prototype.getOrdinalMeta = function() {
      return this._ordinalMeta;
    }, e.prototype.calcNiceTicks = function() {
    }, e.prototype.calcNiceExtent = function() {
    }, e.type = "ordinal", e;
  }(cs)
);
cs.registerClass(vw);
var ic = mn, Ys = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "interval", n._interval = 0, n._intervalPrecision = 2, n;
    }
    return e.prototype.parse = function(n) {
      return n;
    }, e.prototype.contain = function(n) {
      return dw(n, this._extent);
    }, e.prototype.normalize = function(n) {
      return hw(n, this._extent);
    }, e.prototype.scale = function(n) {
      return pw(n, this._extent);
    }, e.prototype.setExtent = function(n, r) {
      var i = this._extent;
      isNaN(n) || (i[0] = parseFloat(n)), isNaN(r) || (i[1] = parseFloat(r));
    }, e.prototype.unionExtent = function(n) {
      var r = this._extent;
      n[0] < r[0] && (r[0] = n[0]), n[1] > r[1] && (r[1] = n[1]), this.setExtent(r[0], r[1]);
    }, e.prototype.getInterval = function() {
      return this._interval;
    }, e.prototype.setInterval = function(n) {
      this._interval = n, this._niceExtent = this._extent.slice(), this._intervalPrecision = jee(n);
    }, e.prototype.getTicks = function(n) {
      var r = this._interval, i = this._extent, a = this._niceExtent, o = this._intervalPrecision, s = [];
      if (!r)
        return s;
      var l = 1e4;
      i[0] < a[0] && (n ? s.push({
        value: ic(a[0] - r, o)
      }) : s.push({
        value: i[0]
      }));
      for (var u = a[0]; u <= a[1] && (s.push({
        value: u
      }), u = ic(u + r, o), u !== s[s.length - 1].value); )
        if (s.length > l)
          return [];
      var c = s.length ? s[s.length - 1].value : a[1];
      return i[1] > c && (n ? s.push({
        value: ic(c + r, o)
      }) : s.push({
        value: i[1]
      })), s;
    }, e.prototype.getMinorTicks = function(n) {
      for (var r = this.getTicks(!0), i = [], a = this.getExtent(), o = 1; o < r.length; o++) {
        for (var s = r[o], l = r[o - 1], u = 0, c = [], f = s.value - l.value, d = f / n; u < n - 1; ) {
          var h = ic(l.value + (u + 1) * d);
          h > a[0] && h < a[1] && c.push(h), u++;
        }
        i.push(c);
      }
      return i;
    }, e.prototype.getLabel = function(n, r) {
      if (n == null)
        return "";
      var i = r && r.precision;
      i == null ? i = Ua(n.value) || 0 : i === "auto" && (i = this._intervalPrecision);
      var a = ic(n.value, i, !0);
      return KR(a);
    }, e.prototype.calcNiceTicks = function(n, r, i) {
      n = n || 5;
      var a = this._extent, o = a[1] - a[0];
      if (isFinite(o)) {
        o < 0 && (o = -o, a.reverse());
        var s = $Ne(a, n, r, i);
        this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
      }
    }, e.prototype.calcNiceExtent = function(n) {
      var r = this._extent;
      if (r[0] === r[1])
        if (r[0] !== 0) {
          var i = Math.abs(r[0]);
          n.fixMax || (r[1] += i / 2), r[0] -= i / 2;
        } else
          r[1] = 1;
      var a = r[1] - r[0];
      isFinite(a) || (r[0] = 0, r[1] = 1), this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
      var o = this._interval;
      n.fixMin || (r[0] = ic(Math.floor(r[0] / o) * o)), n.fixMax || (r[1] = ic(Math.ceil(r[1] / o) * o));
    }, e.prototype.setNiceExtent = function(n, r) {
      this._niceExtent = [n, r];
    }, e.type = "interval", e;
  }(cs)
);
cs.registerClass(Ys);
var Zee = typeof Float32Array < "u", ENe = Zee ? Float32Array : Array;
function Fo(t) {
  return ue(t) ? Zee ? new Float32Array(t) : t : new ENe(t);
}
var rE = "__ec_stack_";
function xk(t) {
  return t.get("stack") || rE + t.seriesIndex;
}
function wk(t) {
  return t.dim + t.index;
}
function MNe(t) {
  var e = [], n = t.axis, r = "axis0";
  if (n.type === "category") {
    for (var i = n.getBandWidth(), a = 0; a < t.count; a++)
      e.push(Re({
        bandWidth: i,
        axisKey: r,
        stackId: rE + a
      }, t));
    for (var o = Yee(e), s = [], a = 0; a < t.count; a++) {
      var l = o[r][rE + a];
      l.offsetCenter = l.offset + l.width / 2, s.push(l);
    }
    return s;
  }
}
function Uee(t, e) {
  var n = [];
  return e.eachSeriesByType(t, function(r) {
    Jee(r) && n.push(r);
  }), n;
}
function INe(t) {
  var e = {};
  k(t, function(l) {
    var u = l.coordinateSystem, c = u.getBaseAxis();
    if (!(c.type !== "time" && c.type !== "value"))
      for (var f = l.getData(), d = c.dim + "_" + c.index, h = f.getDimensionIndex(f.mapDimension(c.dim)), p = f.getStore(), v = 0, g = p.count(); v < g; ++v) {
        var m = p.get(h, v);
        e[d] ? e[d].push(m) : e[d] = [m];
      }
  });
  var n = {};
  for (var r in e)
    if (e.hasOwnProperty(r)) {
      var i = e[r];
      if (i) {
        i.sort(function(l, u) {
          return l - u;
        });
        for (var a = null, o = 1; o < i.length; ++o) {
          var s = i[o] - i[o - 1];
          s > 0 && (a = a === null ? s : Math.min(a, s));
        }
        n[r] = a;
      }
    }
  return n;
}
function Xee(t) {
  var e = INe(t), n = [];
  return k(t, function(r) {
    var i = r.coordinateSystem, a = i.getBaseAxis(), o = a.getExtent(), s;
    if (a.type === "category")
      s = a.getBandWidth();
    else if (a.type === "value" || a.type === "time") {
      var l = a.dim + "_" + a.index, u = e[l], c = Math.abs(o[1] - o[0]), f = a.scale.getExtent(), d = Math.abs(f[1] - f[0]);
      s = u ? c / d * u : c;
    } else {
      var h = r.getData();
      s = Math.abs(o[1] - o[0]) / h.count();
    }
    var p = _e(r.get("barWidth"), s), v = _e(r.get("barMaxWidth"), s), g = _e(
      // barMinWidth by default is 0.5 / 1 in cartesian. Because in value axis,
      // the auto-calculated bar width might be less than 0.5 / 1.
      r.get("barMinWidth") || (ete(r) ? 0.5 : 1),
      s
    ), m = r.get("barGap"), y = r.get("barCategoryGap");
    n.push({
      bandWidth: s,
      barWidth: p,
      barMaxWidth: v,
      barMinWidth: g,
      barGap: m,
      barCategoryGap: y,
      axisKey: wk(a),
      stackId: xk(r)
    });
  }), Yee(n);
}
function Yee(t) {
  var e = {};
  k(t, function(r, i) {
    var a = r.axisKey, o = r.bandWidth, s = e[a] || {
      bandWidth: o,
      remainedWidth: o,
      autoWidthCount: 0,
      categoryGap: null,
      gap: "20%",
      stacks: {}
    }, l = s.stacks;
    e[a] = s;
    var u = r.stackId;
    l[u] || s.autoWidthCount++, l[u] = l[u] || {
      width: 0,
      maxWidth: 0
    };
    var c = r.barWidth;
    c && !l[u].width && (l[u].width = c, c = Math.min(s.remainedWidth, c), s.remainedWidth -= c);
    var f = r.barMaxWidth;
    f && (l[u].maxWidth = f);
    var d = r.barMinWidth;
    d && (l[u].minWidth = d);
    var h = r.barGap;
    h != null && (s.gap = h);
    var p = r.barCategoryGap;
    p != null && (s.categoryGap = p);
  });
  var n = {};
  return k(e, function(r, i) {
    n[i] = {};
    var a = r.stacks, o = r.bandWidth, s = r.categoryGap;
    if (s == null) {
      var l = st(a).length;
      s = Math.max(35 - l * 4, 15) + "%";
    }
    var u = _e(s, o), c = _e(r.gap, 1), f = r.remainedWidth, d = r.autoWidthCount, h = (f - u) / (d + (d - 1) * c);
    h = Math.max(h, 0), k(a, function(m) {
      var y = m.maxWidth, b = m.minWidth;
      if (m.width) {
        var _ = m.width;
        y && (_ = Math.min(_, y)), b && (_ = Math.max(_, b)), m.width = _, f -= _ + c * _, d--;
      } else {
        var _ = h;
        y && y < _ && (_ = Math.min(y, f)), b && b > _ && (_ = b), _ !== h && (m.width = _, f -= _ + c * _, d--);
      }
    }), h = (f - u) / (d + (d - 1) * c), h = Math.max(h, 0);
    var p = 0, v;
    k(a, function(m, y) {
      m.width || (m.width = h), v = m, p += m.width * (1 + c);
    }), v && (p -= v.width * c);
    var g = -p / 2;
    k(a, function(m, y) {
      n[i][y] = n[i][y] || {
        bandWidth: o,
        offset: g,
        width: m.width
      }, g += m.width * (1 + c);
    });
  }), n;
}
function DNe(t, e, n) {
  if (t && e) {
    var r = t[wk(e)];
    return r != null && n != null ? r[xk(n)] : r;
  }
}
function qee(t, e) {
  var n = Uee(t, e), r = Xee(n);
  k(n, function(i) {
    var a = i.getData(), o = i.coordinateSystem, s = o.getBaseAxis(), l = xk(i), u = r[wk(s)][l], c = u.offset, f = u.width;
    a.setLayout({
      bandWidth: u.bandWidth,
      offset: c,
      size: f
    });
  });
}
function Kee(t) {
  return {
    seriesType: t,
    plan: Op(),
    reset: function(e) {
      if (Jee(e)) {
        var n = e.getData(), r = e.coordinateSystem, i = r.getBaseAxis(), a = r.getOtherAxis(i), o = n.getDimensionIndex(n.mapDimension(a.dim)), s = n.getDimensionIndex(n.mapDimension(i.dim)), l = e.get("showBackground", !0), u = n.mapDimension(a.dim), c = n.getCalculationInfo("stackResultDimension"), f = Xs(n, u) && !!n.getCalculationInfo("stackedOnSeries"), d = a.isHorizontal(), h = RNe(i, a), p = ete(e), v = e.get("barMinHeight") || 0, g = c && n.getDimensionIndex(c), m = n.getLayout("size"), y = n.getLayout("offset");
        return {
          progress: function(b, _) {
            for (var O = b.count, S = p && Fo(O * 3), x = p && l && Fo(O * 3), C = p && Fo(O), T = r.master.getRect(), w = d ? T.width : T.height, P, $ = _.getStore(), A = 0; (P = b.next()) != null; ) {
              var D = $.get(f ? g : o, P), E = $.get(s, P), R = h, N = void 0;
              f && (N = +D - $.get(o, P));
              var V = void 0, z = void 0, W = void 0, F = void 0;
              if (d) {
                var Q = r.dataToPoint([D, E]);
                if (f) {
                  var Z = r.dataToPoint([N, E]);
                  R = Z[0];
                }
                V = R, z = Q[1] + y, W = Q[0] - R, F = m, Math.abs(W) < v && (W = (W < 0 ? -1 : 1) * v);
              } else {
                var Q = r.dataToPoint([E, D]);
                if (f) {
                  var Z = r.dataToPoint([E, N]);
                  R = Z[1];
                }
                V = Q[0] + y, z = R, W = m, F = Q[1] - R, Math.abs(F) < v && (F = (F <= 0 ? -1 : 1) * v);
              }
              p ? (S[A] = V, S[A + 1] = z, S[A + 2] = d ? W : F, x && (x[A] = d ? T.x : V, x[A + 1] = d ? z : T.y, x[A + 2] = w), C[P] = P) : _.setItemLayout(P, {
                x: V,
                y: z,
                width: W,
                height: F
              }), A += 3;
            }
            p && _.setLayout({
              largePoints: S,
              largeDataIndices: C,
              largeBackgroundPoints: x,
              valueAxisHorizontal: d
            });
          }
        };
      }
    }
  };
}
function Jee(t) {
  return t.coordinateSystem && t.coordinateSystem.type === "cartesian2d";
}
function ete(t) {
  return t.pipelineContext && t.pipelineContext.large;
}
function RNe(t, e) {
  var n = e.model.get("startValue");
  return n || (n = 0), e.toGlobalCoord(e.dataToCoord(e.type === "log" ? n > 0 ? n : 1 : n));
}
var kNe = function(t, e, n, r) {
  for (; n < r; ) {
    var i = n + r >>> 1;
    t[i][1] < e ? n = i + 1 : r = i;
  }
  return n;
}, Ck = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "time", r;
    }
    return e.prototype.getLabel = function(n) {
      var r = this.getSetting("useUTC");
      return Q0(n.value, UB[uLe(rh(this._minLevelUnit))] || UB.second, r, this.getSetting("locale"));
    }, e.prototype.getFormattedLabel = function(n, r, i) {
      var a = this.getSetting("useUTC"), o = this.getSetting("locale");
      return cLe(n, r, i, o, a);
    }, e.prototype.getTicks = function() {
      var n = this._interval, r = this._extent, i = [];
      if (!n)
        return i;
      i.push({
        value: r[0],
        level: 0
      });
      var a = this.getSetting("useUTC"), o = WNe(this._minLevelUnit, this._approxInterval, a, r);
      return i = i.concat(o), i.push({
        value: r[1],
        level: 0
      }), i;
    }, e.prototype.calcNiceExtent = function(n) {
      var r = this._extent;
      if (r[0] === r[1] && (r[0] -= va, r[1] += va), r[1] === -1 / 0 && r[0] === 1 / 0) {
        var i = /* @__PURE__ */ new Date();
        r[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), r[0] = r[1] - va;
      }
      this.calcNiceTicks(n.splitNumber, n.minInterval, n.maxInterval);
    }, e.prototype.calcNiceTicks = function(n, r, i) {
      n = n || 10;
      var a = this._extent, o = a[1] - a[0];
      this._approxInterval = o / n, r != null && this._approxInterval < r && (this._approxInterval = r), i != null && this._approxInterval > i && (this._approxInterval = i);
      var s = hb.length, l = Math.min(kNe(hb, this._approxInterval, 0, s), s - 1);
      this._interval = hb[l][1], this._minLevelUnit = hb[Math.max(l - 1, 0)][0];
    }, e.prototype.parse = function(n) {
      return St(n) ? n : +Yi(n);
    }, e.prototype.contain = function(n) {
      return dw(this.parse(n), this._extent);
    }, e.prototype.normalize = function(n) {
      return hw(this.parse(n), this._extent);
    }, e.prototype.scale = function(n) {
      return pw(n, this._extent);
    }, e.type = "time", e;
  }(Ys)
), hb = [
  // Format                           interval
  ["second", XR],
  ["minute", YR],
  ["hour", Ig],
  ["quarter-day", Ig * 6],
  ["half-day", Ig * 12],
  ["day", va * 1.2],
  ["half-week", va * 3.5],
  ["week", va * 7],
  ["month", va * 31],
  ["quarter", va * 95],
  ["half-year", ZB / 2],
  ["year", ZB]
  // 1Y
];
function LNe(t, e, n, r) {
  var i = Yi(e), a = Yi(n), o = function(p) {
    return XB(i, p, r) === XB(a, p, r);
  }, s = function() {
    return o("year");
  }, l = function() {
    return s() && o("month");
  }, u = function() {
    return l() && o("day");
  }, c = function() {
    return u() && o("hour");
  }, f = function() {
    return c() && o("minute");
  }, d = function() {
    return f() && o("second");
  }, h = function() {
    return d() && o("millisecond");
  };
  switch (t) {
    case "year":
      return s();
    case "month":
      return l();
    case "day":
      return u();
    case "hour":
      return c();
    case "minute":
      return f();
    case "second":
      return d();
    case "millisecond":
      return h();
  }
}
function NNe(t, e) {
  return t /= va, t > 16 ? 16 : t > 7.5 ? 7 : t > 3.5 ? 4 : t > 1.5 ? 2 : 1;
}
function BNe(t) {
  var e = 30 * va;
  return t /= e, t > 6 ? 6 : t > 3 ? 3 : t > 2 ? 2 : 1;
}
function zNe(t) {
  return t /= Ig, t > 12 ? 12 : t > 6 ? 6 : t > 3.5 ? 4 : t > 2 ? 2 : 1;
}
function iV(t, e) {
  return t /= e ? YR : XR, t > 30 ? 30 : t > 20 ? 20 : t > 15 ? 15 : t > 10 ? 10 : t > 5 ? 5 : t > 2 ? 2 : 1;
}
function VNe(t) {
  return $R(t, !0);
}
function FNe(t, e, n) {
  var r = new Date(t);
  switch (rh(e)) {
    case "year":
    case "month":
      r[bJ(n)](0);
    case "day":
      r[_J(n)](1);
    case "hour":
      r[OJ(n)](0);
    case "minute":
      r[SJ(n)](0);
    case "second":
      r[xJ(n)](0), r[wJ(n)](0);
  }
  return r.getTime();
}
function WNe(t, e, n, r) {
  var i = 1e4, a = mJ, o = 0;
  function s(w, P, $, A, D, E, R) {
    for (var N = new Date(P), V = P, z = N[A](); V < $ && V <= r[1]; )
      R.push({
        value: V
      }), z += w, N[D](z), V = N.getTime();
    R.push({
      value: V,
      notAdd: !0
    });
  }
  function l(w, P, $) {
    var A = [], D = !P.length;
    if (!LNe(rh(w), r[0], r[1], n)) {
      D && (P = [{
        // TODO Optimize. Not include so may ticks.
        value: FNe(new Date(r[0]), w, n)
      }, {
        value: r[1]
      }]);
      for (var E = 0; E < P.length - 1; E++) {
        var R = P[E].value, N = P[E + 1].value;
        if (R !== N) {
          var V = void 0, z = void 0, W = void 0, F = !1;
          switch (w) {
            case "year":
              V = Math.max(1, Math.round(e / va / 365)), z = qR(n), W = fLe(n);
              break;
            case "half-year":
            case "quarter":
            case "month":
              V = BNe(e), z = ih(n), W = bJ(n);
              break;
            case "week":
            case "half-week":
            case "day":
              V = NNe(e), z = tw(n), W = _J(n), F = !0;
              break;
            case "half-day":
            case "quarter-day":
            case "hour":
              V = zNe(e), z = Cm(n), W = OJ(n);
              break;
            case "minute":
              V = iV(e, !0), z = nw(n), W = SJ(n);
              break;
            case "second":
              V = iV(e, !1), z = rw(n), W = xJ(n);
              break;
            case "millisecond":
              V = VNe(e), z = iw(n), W = wJ(n);
              break;
          }
          s(V, R, N, z, W, F, A), w === "year" && $.length > 1 && E === 0 && $.unshift({
            value: $[0].value - V
          });
        }
      }
      for (var E = 0; E < A.length; E++)
        $.push(A[E]);
      return A;
    }
  }
  for (var u = [], c = [], f = 0, d = 0, h = 0; h < a.length && o++ < i; ++h) {
    var p = rh(a[h]);
    if (lLe(a[h])) {
      l(a[h], u[u.length - 1] || [], c);
      var v = a[h + 1] ? rh(a[h + 1]) : null;
      if (p !== v) {
        if (c.length) {
          d = f, c.sort(function(w, P) {
            return w.value - P.value;
          });
          for (var g = [], m = 0; m < c.length; ++m) {
            var y = c[m].value;
            (m === 0 || c[m - 1].value !== y) && (g.push(c[m]), y >= r[0] && y <= r[1] && f++);
          }
          var b = (r[1] - r[0]) / e;
          if (f > b * 1.5 && d > b / 1.5 || (u.push(g), f > b || t === a[h]))
            break;
        }
        c = [];
      }
    }
  }
  process.env.NODE_ENV !== "production" && o >= i && dn("Exceed safe limit.");
  for (var _ = Nt(ce(u, function(w) {
    return Nt(w, function(P) {
      return P.value >= r[0] && P.value <= r[1] && !P.notAdd;
    });
  }), function(w) {
    return w.length > 0;
  }), O = [], S = _.length - 1, h = 0; h < _.length; ++h)
    for (var x = _[h], C = 0; C < x.length; ++C)
      O.push({
        value: x[C].value,
        level: S - h
      });
  O.sort(function(w, P) {
    return w.value - P.value;
  });
  for (var T = [], h = 0; h < O.length; ++h)
    (h === 0 || O[h].value !== O[h - 1].value) && T.push(O[h]);
  return T;
}
cs.registerClass(Ck);
var aV = cs.prototype, kg = Ys.prototype, QNe = mn, HNe = Math.floor, GNe = Math.ceil, pb = Math.pow, Wa = Math.log, Tk = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "log", n.base = 10, n._originalScale = new Ys(), n._interval = 0, n;
    }
    return e.prototype.getTicks = function(n) {
      var r = this._originalScale, i = this._extent, a = r.getExtent(), o = kg.getTicks.call(this, n);
      return ce(o, function(s) {
        var l = s.value, u = mn(pb(this.base, l));
        return u = l === i[0] && this._fixMin ? vb(u, a[0]) : u, u = l === i[1] && this._fixMax ? vb(u, a[1]) : u, {
          value: u
        };
      }, this);
    }, e.prototype.setExtent = function(n, r) {
      var i = Wa(this.base);
      n = Wa(Math.max(0, n)) / i, r = Wa(Math.max(0, r)) / i, kg.setExtent.call(this, n, r);
    }, e.prototype.getExtent = function() {
      var n = this.base, r = aV.getExtent.call(this);
      r[0] = pb(n, r[0]), r[1] = pb(n, r[1]);
      var i = this._originalScale, a = i.getExtent();
      return this._fixMin && (r[0] = vb(r[0], a[0])), this._fixMax && (r[1] = vb(r[1], a[1])), r;
    }, e.prototype.unionExtent = function(n) {
      this._originalScale.unionExtent(n);
      var r = this.base;
      n[0] = Wa(n[0]) / Wa(r), n[1] = Wa(n[1]) / Wa(r), aV.unionExtent.call(this, n);
    }, e.prototype.unionExtentFromData = function(n, r) {
      this.unionExtent(n.getApproximateExtent(r));
    }, e.prototype.calcNiceTicks = function(n) {
      n = n || 10;
      var r = this._extent, i = r[1] - r[0];
      if (!(i === 1 / 0 || i <= 0)) {
        var a = lK(i), o = n / i * a;
        for (o <= 0.5 && (a *= 10); !isNaN(a) && Math.abs(a) < 1 && Math.abs(a) > 0; )
          a *= 10;
        var s = [mn(GNe(r[0] / a) * a), mn(HNe(r[1] / a) * a)];
        this._interval = a, this._niceExtent = s;
      }
    }, e.prototype.calcNiceExtent = function(n) {
      kg.calcNiceExtent.call(this, n), this._fixMin = n.fixMin, this._fixMax = n.fixMax;
    }, e.prototype.parse = function(n) {
      return n;
    }, e.prototype.contain = function(n) {
      return n = Wa(n) / Wa(this.base), dw(n, this._extent);
    }, e.prototype.normalize = function(n) {
      return n = Wa(n) / Wa(this.base), hw(n, this._extent);
    }, e.prototype.scale = function(n) {
      return n = pw(n, this._extent), pb(this.base, n);
    }, e.type = "log", e;
  }(cs)
), tte = Tk.prototype;
tte.getMinorTicks = kg.getMinorTicks;
tte.getLabel = kg.getLabel;
function vb(t, e) {
  return QNe(t, Ua(e));
}
cs.registerClass(Tk);
var jNe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this._prepareParams(e, n, r);
    }
    return t.prototype._prepareParams = function(e, n, r) {
      r[1] < r[0] && (r = [NaN, NaN]), this._dataMin = r[0], this._dataMax = r[1];
      var i = this._isOrdinal = e.type === "ordinal";
      this._needCrossZero = e.type === "interval" && n.getNeedCrossZero && n.getNeedCrossZero();
      var a = n.get("min", !0);
      a == null && (a = n.get("startValue", !0));
      var o = this._modelMinRaw = a;
      Me(o) ? this._modelMinNum = gb(e, o({
        min: r[0],
        max: r[1]
      })) : o !== "dataMin" && (this._modelMinNum = gb(e, o));
      var s = this._modelMaxRaw = n.get("max", !0);
      if (Me(s) ? this._modelMaxNum = gb(e, s({
        min: r[0],
        max: r[1]
      })) : s !== "dataMax" && (this._modelMaxNum = gb(e, s)), i)
        this._axisDataLen = n.getCategories().length;
      else {
        var l = n.get("boundaryGap"), u = ue(l) ? l : [l || 0, l || 0];
        typeof u[0] == "boolean" || typeof u[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [oo(u[0], 1), oo(u[1], 1)];
      }
    }, t.prototype.calculate = function() {
      var e = this._isOrdinal, n = this._dataMin, r = this._dataMax, i = this._axisDataLen, a = this._boundaryGapInner, o = e ? null : r - n || Math.abs(n), s = this._modelMinRaw === "dataMin" ? n : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? r : this._modelMaxNum, u = s != null, c = l != null;
      s == null && (s = e ? i ? 0 : NaN : n - a[0] * o), l == null && (l = e ? i ? i - 1 : NaN : r + a[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
      var f = ou(s) || ou(l) || e && !i;
      this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !c && (l = 0));
      var d = this._determinedMin, h = this._determinedMax;
      return d != null && (s = d, u = !0), h != null && (l = h, c = !0), {
        min: s,
        max: l,
        minFixed: u,
        maxFixed: c,
        isBlank: f
      };
    }, t.prototype.modifyDataMinMax = function(e, n) {
      process.env.NODE_ENV !== "production" && ke(!this.frozen), this[UNe[e]] = n;
    }, t.prototype.setDeterminedMinMax = function(e, n) {
      var r = ZNe[e];
      process.env.NODE_ENV !== "production" && ke(!this.frozen && this[r] == null), this[r] = n;
    }, t.prototype.freeze = function() {
      this.frozen = !0;
    }, t;
  }()
), ZNe = {
  min: "_determinedMin",
  max: "_determinedMax"
}, UNe = {
  min: "_dataMin",
  max: "_dataMax"
};
function nte(t, e, n) {
  var r = t.rawExtentInfo;
  return r || (r = new jNe(t, e, n), t.rawExtentInfo = r, r);
}
function gb(t, e) {
  return e == null ? null : ou(e) ? NaN : t.parse(e);
}
function rte(t, e) {
  var n = t.type, r = nte(t, e, t.getExtent()).calculate();
  t.setBlank(r.isBlank);
  var i = r.min, a = r.max, o = e.ecModel;
  if (o && n === "time") {
    var s = Uee("bar", o), l = !1;
    if (k(s, function(f) {
      l = l || f.getBaseAxis() === e.axis;
    }), l) {
      var u = Xee(s), c = XNe(i, a, e, u);
      i = c.min, a = c.max;
    }
  }
  return {
    extent: [i, a],
    // "fix" means "fixed", the value should not be
    // changed in the subsequent steps.
    fixMin: r.minFixed,
    fixMax: r.maxFixed
  };
}
function XNe(t, e, n, r) {
  var i = n.axis.getExtent(), a = i[1] - i[0], o = DNe(r, n.axis);
  if (o === void 0)
    return {
      min: t,
      max: e
    };
  var s = 1 / 0;
  k(o, function(h) {
    s = Math.min(h.offset, s);
  });
  var l = -1 / 0;
  k(o, function(h) {
    l = Math.max(h.offset + h.width, l);
  }), s = Math.abs(s), l = Math.abs(l);
  var u = s + l, c = e - t, f = 1 - (s + l) / a, d = c / f - c;
  return e += d * (l / u), t -= d * (s / u), {
    min: t,
    max: e
  };
}
function Of(t, e) {
  var n = e, r = rte(t, n), i = r.extent, a = n.get("splitNumber");
  t instanceof Tk && (t.base = n.get("logBase"));
  var o = t.type, s = n.get("interval"), l = o === "interval" || o === "time";
  t.setExtent(i[0], i[1]), t.calcNiceExtent({
    splitNumber: a,
    fixMin: r.fixMin,
    fixMax: r.fixMax,
    minInterval: l ? n.get("minInterval") : null,
    maxInterval: l ? n.get("maxInterval") : null
  }), s != null && t.setInterval && t.setInterval(s);
}
function G0(t, e) {
  if (e = e || t.get("type"), e)
    switch (e) {
      case "category":
        return new vw({
          ordinalMeta: t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new Ck({
          locale: t.ecModel.getLocaleModel(),
          useUTC: t.ecModel.get("useUTC")
        });
      default:
        return new (cs.getClass(e) || Ys)();
    }
}
function YNe(t) {
  var e = t.scale.getExtent(), n = e[0], r = e[1];
  return !(n > 0 && r > 0 || n < 0 && r < 0);
}
function Cp(t) {
  var e = t.getLabelModel().get("formatter"), n = t.type === "category" ? t.scale.getExtent()[0] : null;
  return t.scale.type === "time" ? /* @__PURE__ */ function(r) {
    return function(i, a) {
      return t.scale.getFormattedLabel(i, a, r);
    };
  }(e) : Oe(e) ? /* @__PURE__ */ function(r) {
    return function(i) {
      var a = t.scale.getLabel(i), o = r.replace("{value}", a ?? "");
      return o;
    };
  }(e) : Me(e) ? /* @__PURE__ */ function(r) {
    return function(i, a) {
      return n != null && (a = i.value - n), r(Pk(t, i), a, i.level != null ? {
        level: i.level
      } : null);
    };
  }(e) : function(r) {
    return t.scale.getLabel(r);
  };
}
function Pk(t, e) {
  return t.type === "category" ? t.scale.getLabel(e) : e.value;
}
function qNe(t) {
  var e = t.model, n = t.scale;
  if (!(!e.get(["axisLabel", "show"]) || n.isBlank())) {
    var r, i, a = n.getExtent();
    n instanceof vw ? i = n.count() : (r = n.getTicks(), i = r.length);
    var o = t.getLabelModel(), s = Cp(t), l, u = 1;
    i > 40 && (u = Math.ceil(i / 40));
    for (var c = 0; c < i; c += u) {
      var f = r ? r[c] : {
        value: a[0] + c
      }, d = s(f, c), h = o.getTextRect(d), p = KNe(h, o.get("rotate") || 0);
      l ? l.union(p) : l = p;
    }
    return l;
  }
}
function KNe(t, e) {
  var n = e * Math.PI / 180, r = t.width, i = t.height, a = r * Math.abs(Math.cos(n)) + Math.abs(i * Math.sin(n)), o = r * Math.abs(Math.sin(n)) + Math.abs(i * Math.cos(n)), s = new Je(t.x, t.y, a, o);
  return s;
}
function $k(t) {
  var e = t.get("interval");
  return e ?? "auto";
}
function ite(t) {
  return t.type === "category" && $k(t.getLabelModel()) === 0;
}
function CO(t, e) {
  var n = {};
  return k(t.mapDimensionsAll(e), function(r) {
    n[Sk(t, r)] = !0;
  }), st(n);
}
function JNe(t, e, n) {
  e && k(CO(e, n), function(r) {
    var i = e.getApproximateExtent(r);
    i[0] < t[0] && (t[0] = i[0]), i[1] > t[1] && (t[1] = i[1]);
  });
}
var Tp = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getNeedCrossZero = function() {
      var e = this.option;
      return !e.scale;
    }, t.prototype.getCoordSysModel = function() {
    }, t;
  }()
);
function e5e(t) {
  return us(null, t);
}
var t5e = {
  isDimensionStacked: Xs,
  enableDataStack: Gee,
  getStackedDimension: Sk
};
function n5e(t, e) {
  var n = e;
  e instanceof Wt || (n = new Wt(e));
  var r = G0(n);
  return r.setExtent(t[0], t[1]), Of(r, n), r;
}
function r5e(t) {
  xn(t, Tp);
}
function i5e(t, e) {
  return e = e || {}, Zt(t, null, null, e.state !== "normal");
}
const a5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  createDimensions: hNe,
  createList: e5e,
  createScale: n5e,
  createSymbol: $n,
  createTextStyle: i5e,
  dataStack: t5e,
  enableHoverEmphasis: Yl,
  getECData: Fe,
  getLayoutRect: Rn,
  mixinAxisModelCommonMethods: r5e
}, Symbol.toStringTag, { value: "Module" }));
var o5e = 1e-8;
function oV(t, e) {
  return Math.abs(t - e) < o5e;
}
function Sc(t, e, n) {
  var r = 0, i = t[0];
  if (!i)
    return !1;
  for (var a = 1; a < t.length; a++) {
    var o = t[a];
    r += Os(i[0], i[1], o[0], o[1], e, n), i = o;
  }
  var s = t[0];
  return (!oV(i[0], s[0]) || !oV(i[1], s[1])) && (r += Os(i[0], i[1], s[0], s[1], e, n)), r !== 0;
}
var s5e = [];
function jT(t, e) {
  for (var n = 0; n < t.length; n++)
    ar(t[n], t[n], e);
}
function sV(t, e, n, r) {
  for (var i = 0; i < t.length; i++) {
    var a = t[i];
    r && (a = r.project(a)), a && isFinite(a[0]) && isFinite(a[1]) && (Ps(e, e, a), $s(n, n, a));
  }
}
function l5e(t) {
  for (var e = 0, n = 0, r = 0, i = t.length, a = t[i - 1][0], o = t[i - 1][1], s = 0; s < i; s++) {
    var l = t[s][0], u = t[s][1], c = a * u - l * o;
    e += c, n += (a + l) * c, r += (o + u) * c, a = l, o = u;
  }
  return e ? [n / e / 3, r / e / 3, e] : [t[0][0] || 0, t[0][1] || 0];
}
var ate = (
  /** @class */
  function() {
    function t(e) {
      this.name = e;
    }
    return t.prototype.setCenter = function(e) {
      this._center = e;
    }, t.prototype.getCenter = function() {
      var e = this._center;
      return e || (e = this._center = this.calcCenter()), e;
    }, t;
  }()
), lV = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e, n) {
      this.type = "polygon", this.exterior = e, this.interiors = n;
    }
    return t;
  }()
), uV = (
  /** @class */
  /* @__PURE__ */ function() {
    function t(e) {
      this.type = "linestring", this.points = e;
    }
    return t;
  }()
), ote = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this, n) || this;
      return a.type = "geoJSON", a.geometries = r, a._center = i && [i[0], i[1]], a;
    }
    return e.prototype.calcCenter = function() {
      for (var n = this.geometries, r, i = 0, a = 0; a < n.length; a++) {
        var o = n[a], s = o.exterior, l = s && s.length;
        l > i && (r = o, i = l);
      }
      if (r)
        return l5e(r.exterior);
      var u = this.getBoundingRect();
      return [u.x + u.width / 2, u.y + u.height / 2];
    }, e.prototype.getBoundingRect = function(n) {
      var r = this._rect;
      if (r && !n)
        return r;
      var i = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0], o = this.geometries;
      return k(o, function(s) {
        s.type === "polygon" ? sV(s.exterior, i, a, n) : k(s.points, function(l) {
          sV(l, i, a, n);
        });
      }), isFinite(i[0]) && isFinite(i[1]) && isFinite(a[0]) && isFinite(a[1]) || (i[0] = i[1] = a[0] = a[1] = 0), r = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]), n || (this._rect = r), r;
    }, e.prototype.contain = function(n) {
      var r = this.getBoundingRect(), i = this.geometries;
      if (!r.contain(n[0], n[1]))
        return !1;
      e: for (var a = 0, o = i.length; a < o; a++) {
        var s = i[a];
        if (s.type === "polygon") {
          var l = s.exterior, u = s.interiors;
          if (Sc(l, n[0], n[1])) {
            for (var c = 0; c < (u ? u.length : 0); c++)
              if (Sc(u[c], n[0], n[1]))
                continue e;
            return !0;
          }
        }
      }
      return !1;
    }, e.prototype.transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = o.width / o.height;
      i ? a || (a = i / s) : i = s * a;
      for (var l = new Je(n, r, i, a), u = o.calculateTransform(l), c = this.geometries, f = 0; f < c.length; f++) {
        var d = c[f];
        d.type === "polygon" ? (jT(d.exterior, u), k(d.interiors, function(h) {
          jT(h, u);
        })) : k(d.points, function(h) {
          jT(h, u);
        });
      }
      o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
    }, e.prototype.cloneShallow = function(n) {
      n == null && (n = this.name);
      var r = new e(n, this.geometries, this._center);
      return r._rect = this._rect, r.transformTo = null, r;
    }, e;
  }(ate)
), u5e = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r) {
      var i = t.call(this, n) || this;
      return i.type = "geoSVG", i._elOnlyForCalculate = r, i;
    }
    return e.prototype.calcCenter = function() {
      for (var n = this._elOnlyForCalculate, r = n.getBoundingRect(), i = [r.x + r.width / 2, r.y + r.height / 2], a = D0(s5e), o = n; o && !o.isGeoSVGGraphicRoot; )
        Uo(a, o.getLocalTransform(), a), o = o.parent;
      return kf(a, a), ar(i, i, a), i;
    }, e;
  }(ate)
);
function c5e(t) {
  if (!t.UTF8Encoding)
    return t;
  var e = t, n = e.UTF8Scale;
  n == null && (n = 1024);
  var r = e.features;
  return k(r, function(i) {
    var a = i.geometry, o = a.encodeOffsets, s = a.coordinates;
    if (o)
      switch (a.type) {
        case "LineString":
          a.coordinates = ste(s, o, n);
          break;
        case "Polygon":
          ZT(s, o, n);
          break;
        case "MultiLineString":
          ZT(s, o, n);
          break;
        case "MultiPolygon":
          k(s, function(l, u) {
            return ZT(l, o[u], n);
          });
      }
  }), e.UTF8Encoding = !1, e;
}
function ZT(t, e, n) {
  for (var r = 0; r < t.length; r++)
    t[r] = ste(t[r], e[r], n);
}
function ste(t, e, n) {
  for (var r = [], i = e[0], a = e[1], o = 0; o < t.length; o += 2) {
    var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
    s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += i, l += a, i = s, a = l, r.push([s / n, l / n]);
  }
  return r;
}
function iE(t, e) {
  return t = c5e(t), ce(Nt(t.features, function(n) {
    return n.geometry && n.properties && n.geometry.coordinates.length > 0;
  }), function(n) {
    var r = n.properties, i = n.geometry, a = [];
    switch (i.type) {
      case "Polygon":
        var o = i.coordinates;
        a.push(new lV(o[0], o.slice(1)));
        break;
      case "MultiPolygon":
        k(i.coordinates, function(l) {
          l[0] && a.push(new lV(l[0], l.slice(1)));
        });
        break;
      case "LineString":
        a.push(new uV([i.coordinates]));
        break;
      case "MultiLineString":
        a.push(new uV(i.coordinates));
    }
    var s = new ote(r[e || "name"], a, r.cp);
    return s.properties = r, s;
  });
}
const f5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  MAX_SAFE_INTEGER: CA,
  asc: Vi,
  getPercentWithPrecision: LDe,
  getPixelPrecision: TR,
  getPrecision: Ua,
  getPrecisionSafe: iO,
  isNumeric: Fx,
  isRadianAroundZero: Lh,
  linearMap: Lt,
  nice: $R,
  numericToNumber: is,
  parseDate: Yi,
  quantile: z_,
  quantity: lK,
  quantityExponent: L0,
  reformIntervals: TA,
  remRadian: PR,
  round: mn
}, Symbol.toStringTag, { value: "Module" })), d5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  format: Q0,
  parse: Yi
}, Symbol.toStringTag, { value: "Module" })), h5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Arc: Yx,
  BezierCurve: V0,
  BoundingRect: Je,
  Circle: ll,
  CompoundPath: qx,
  Ellipse: Xx,
  Group: Ve,
  Image: lr,
  IncrementalDisplayable: iJ,
  Line: Un,
  LinearGradient: hp,
  Polygon: ii,
  Polyline: ai,
  RadialGradient: VR,
  Rect: mt,
  Ring: z0,
  Sector: ri,
  Text: gt,
  clipPointsByRect: HR,
  clipRectByRect: uJ,
  createIcon: vp,
  extendPath: sJ,
  extendShape: oJ,
  getShapeClass: Kx,
  getTransform: ql,
  initProps: Yt,
  makeImage: WR,
  makePath: F0,
  mergePath: Li,
  registerShape: ka,
  resizePath: QR,
  updateProps: Ct
}, Symbol.toStringTag, { value: "Module" })), p5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  addCommas: KR,
  capitalFirst: vLe,
  encodeHTML: Gr,
  formatTime: pLe,
  formatTpl: ek,
  getTextRect: dLe,
  getTooltipMarker: CJ,
  normalizeCssArray: Bf,
  toCamelCase: JR,
  truncateText: bK
}, Symbol.toStringTag, { value: "Module" })), v5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  bind: xe,
  clone: Le,
  curry: Ue,
  defaults: Re,
  each: k,
  extend: le,
  filter: Nt,
  indexOf: et,
  inherits: mR,
  isArray: ue,
  isFunction: Me,
  isObject: Ie,
  isString: Oe,
  map: ce,
  merge: qe,
  reduce: Aa
}, Symbol.toStringTag, { value: "Module" }));
var Mm = bt();
function lte(t, e) {
  var n = ce(e, function(r) {
    return t.scale.parse(r);
  });
  return t.type === "time" && n.length > 0 && (n.sort(), n.unshift(n[0]), n.push(n[n.length - 1])), n;
}
function g5e(t) {
  var e = t.getLabelModel().get("customValues");
  if (e) {
    var n = Cp(t);
    return {
      labels: lte(t, e).map(function(r) {
        var i = {
          value: r
        };
        return {
          formattedLabel: n(i),
          rawLabel: t.scale.getLabel(i),
          tickValue: r
        };
      })
    };
  }
  return t.type === "category" ? y5e(t) : _5e(t);
}
function m5e(t, e) {
  var n = t.getTickModel().get("customValues");
  return n ? {
    ticks: lte(t, n)
  } : t.type === "category" ? b5e(t, e) : {
    ticks: ce(t.scale.getTicks(), function(r) {
      return r.value;
    })
  };
}
function y5e(t) {
  var e = t.getLabelModel(), n = ute(t, e);
  return !e.get("show") || t.scale.isBlank() ? {
    labels: [],
    labelCategoryInterval: n.labelCategoryInterval
  } : n;
}
function ute(t, e) {
  var n = cte(t, "labels"), r = $k(e), i = fte(n, r);
  if (i)
    return i;
  var a, o;
  return Me(r) ? a = pte(t, r) : (o = r === "auto" ? O5e(t) : r, a = hte(t, o)), dte(n, r, {
    labels: a,
    labelCategoryInterval: o
  });
}
function b5e(t, e) {
  var n = cte(t, "ticks"), r = $k(e), i = fte(n, r);
  if (i)
    return i;
  var a, o;
  if ((!e.get("show") || t.scale.isBlank()) && (a = []), Me(r))
    a = pte(t, r, !0);
  else if (r === "auto") {
    var s = ute(t, t.getLabelModel());
    o = s.labelCategoryInterval, a = ce(s.labels, function(l) {
      return l.tickValue;
    });
  } else
    o = r, a = hte(t, o, !0);
  return dte(n, r, {
    ticks: a,
    tickCategoryInterval: o
  });
}
function _5e(t) {
  var e = t.scale.getTicks(), n = Cp(t);
  return {
    labels: ce(e, function(r, i) {
      return {
        level: r.level,
        formattedLabel: n(r, i),
        rawLabel: t.scale.getLabel(r),
        tickValue: r.value
      };
    })
  };
}
function cte(t, e) {
  return Mm(t)[e] || (Mm(t)[e] = []);
}
function fte(t, e) {
  for (var n = 0; n < t.length; n++)
    if (t[n].key === e)
      return t[n].value;
}
function dte(t, e, n) {
  return t.push({
    key: e,
    value: n
  }), n;
}
function O5e(t) {
  var e = Mm(t).autoInterval;
  return e ?? (Mm(t).autoInterval = t.calculateCategoryInterval());
}
function S5e(t) {
  var e = x5e(t), n = Cp(t), r = (e.axisRotate - e.labelRotate) / 180 * Math.PI, i = t.scale, a = i.getExtent(), o = i.count();
  if (a[1] - a[0] < 1)
    return 0;
  var s = 1;
  o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), c = Math.abs(u * Math.cos(r)), f = Math.abs(u * Math.sin(r)), d = 0, h = 0; l <= a[1]; l += s) {
    var p = 0, v = 0, g = k0(n({
      value: l
    }), e.font, "center", "top");
    p = g.width * 1.3, v = g.height * 1.3, d = Math.max(d, p, 7), h = Math.max(h, v, 7);
  }
  var m = d / c, y = h / f;
  isNaN(m) && (m = 1 / 0), isNaN(y) && (y = 1 / 0);
  var b = Math.max(0, Math.floor(Math.min(m, y))), _ = Mm(t.model), O = t.getExtent(), S = _.lastAutoInterval, x = _.lastTickCount;
  return S != null && x != null && Math.abs(S - b) <= 1 && Math.abs(x - o) <= 1 && S > b && _.axisExtent0 === O[0] && _.axisExtent1 === O[1] ? b = S : (_.lastTickCount = o, _.lastAutoInterval = b, _.axisExtent0 = O[0], _.axisExtent1 = O[1]), b;
}
function x5e(t) {
  var e = t.getLabelModel();
  return {
    axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
    labelRotate: e.get("rotate") || 0,
    font: e.getFont()
  };
}
function hte(t, e, n) {
  var r = Cp(t), i = t.scale, a = i.getExtent(), o = t.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = a[0], c = i.count();
  u !== 0 && l > 1 && c / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
  var f = ite(t), d = o.get("showMinLabel") || f, h = o.get("showMaxLabel") || f;
  d && u !== a[0] && v(a[0]);
  for (var p = u; p <= a[1]; p += l)
    v(p);
  h && p - l !== a[1] && v(a[1]);
  function v(g) {
    var m = {
      value: g
    };
    s.push(n ? g : {
      formattedLabel: r(m),
      rawLabel: i.getLabel(m),
      tickValue: g
    });
  }
  return s;
}
function pte(t, e, n) {
  var r = t.scale, i = Cp(t), a = [];
  return k(r.getTicks(), function(o) {
    var s = r.getLabel(o), l = o.value;
    e(o.value, s) && a.push(n ? l : {
      formattedLabel: i(o),
      rawLabel: s,
      tickValue: l
    });
  }), a;
}
var cV = [0, 1], w5e = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = n, this._extent = r || [0, 0];
    }
    return t.prototype.contain = function(e) {
      var n = this._extent, r = Math.min(n[0], n[1]), i = Math.max(n[0], n[1]);
      return e >= r && e <= i;
    }, t.prototype.containData = function(e) {
      return this.scale.contain(e);
    }, t.prototype.getExtent = function() {
      return this._extent.slice();
    }, t.prototype.getPixelPrecision = function(e) {
      return TR(e || this.scale.getExtent(), this._extent);
    }, t.prototype.setExtent = function(e, n) {
      var r = this._extent;
      r[0] = e, r[1] = n;
    }, t.prototype.dataToCoord = function(e, n) {
      var r = this._extent, i = this.scale;
      return e = i.normalize(e), this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count())), Lt(e, cV, r, n);
    }, t.prototype.coordToData = function(e, n) {
      var r = this._extent, i = this.scale;
      this.onBand && i.type === "ordinal" && (r = r.slice(), fV(r, i.count()));
      var a = Lt(e, r, cV, n);
      return this.scale.scale(a);
    }, t.prototype.pointToData = function(e, n) {
    }, t.prototype.getTicksCoords = function(e) {
      e = e || {};
      var n = e.tickModel || this.getTickModel(), r = m5e(this, n), i = r.ticks, a = ce(i, function(s) {
        return {
          coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
          tickValue: s
        };
      }, this), o = n.get("alignWithLabel");
      return C5e(this, a, o, e.clamp), a;
    }, t.prototype.getMinorTicksCoords = function() {
      if (this.scale.type === "ordinal")
        return [];
      var e = this.model.getModel("minorTick"), n = e.get("splitNumber");
      n > 0 && n < 100 || (n = 5);
      var r = this.scale.getMinorTicks(n), i = ce(r, function(a) {
        return ce(a, function(o) {
          return {
            coord: this.dataToCoord(o),
            tickValue: o
          };
        }, this);
      }, this);
      return i;
    }, t.prototype.getViewLabels = function() {
      return g5e(this).labels;
    }, t.prototype.getLabelModel = function() {
      return this.model.getModel("axisLabel");
    }, t.prototype.getTickModel = function() {
      return this.model.getModel("axisTick");
    }, t.prototype.getBandWidth = function() {
      var e = this._extent, n = this.scale.getExtent(), r = n[1] - n[0] + (this.onBand ? 1 : 0);
      r === 0 && (r = 1);
      var i = Math.abs(e[1] - e[0]);
      return Math.abs(i) / r;
    }, t.prototype.calculateCategoryInterval = function() {
      return S5e(this);
    }, t;
  }()
);
function fV(t, e) {
  var n = t[1] - t[0], r = e, i = n / r / 2;
  t[0] += i, t[1] -= i;
}
function C5e(t, e, n, r) {
  var i = e.length;
  if (!t.onBand || n || !i)
    return;
  var a = t.getExtent(), o, s;
  if (i === 1)
    e[0].coord = a[0], o = e[1] = {
      coord: a[1]
    };
  else {
    var l = e[i - 1].tickValue - e[0].tickValue, u = (e[i - 1].coord - e[0].coord) / l;
    k(e, function(h) {
      h.coord -= u / 2;
    });
    var c = t.scale.getExtent();
    s = 1 + c[1] - e[i - 1].tickValue, o = {
      coord: e[i - 1].coord + u * s
    }, e.push(o);
  }
  var f = a[0] > a[1];
  d(e[0].coord, a[0]) && (r ? e[0].coord = a[0] : e.shift()), r && d(a[0], e[0].coord) && e.unshift({
    coord: a[0]
  }), d(a[1], o.coord) && (r ? o.coord = a[1] : e.pop()), r && d(o.coord, a[1]) && e.push({
    coord: a[1]
  });
  function d(h, p) {
    return h = mn(h), p = mn(p), f ? h > p : h < p;
  }
}
const Ba = w5e;
function T5e(t) {
  var e = rt.extend(t);
  return rt.registerClass(e), e;
}
function P5e(t) {
  var e = Xt.extend(t);
  return Xt.registerClass(e), e;
}
function $5e(t) {
  var e = Ht.extend(t);
  return Ht.registerClass(e), e;
}
function A5e(t) {
  var e = zt.extend(t);
  return zt.registerClass(e), e;
}
var vv = Math.PI * 2, ac = as.CMD, E5e = ["top", "right", "bottom", "left"];
function M5e(t, e, n, r, i) {
  var a = n.width, o = n.height;
  switch (t) {
    case "top":
      r.set(n.x + a / 2, n.y - e), i.set(0, -1);
      break;
    case "bottom":
      r.set(n.x + a / 2, n.y + o + e), i.set(0, 1);
      break;
    case "left":
      r.set(n.x - e, n.y + o / 2), i.set(-1, 0);
      break;
    case "right":
      r.set(n.x + a + e, n.y + o / 2), i.set(1, 0);
      break;
  }
}
function I5e(t, e, n, r, i, a, o, s, l) {
  o -= t, s -= e;
  var u = Math.sqrt(o * o + s * s);
  o /= u, s /= u;
  var c = o * n + t, f = s * n + e;
  if (Math.abs(r - i) % vv < 1e-4)
    return l[0] = c, l[1] = f, u - n;
  if (a) {
    var d = r;
    r = Fi(i), i = Fi(d);
  } else
    r = Fi(r), i = Fi(i);
  r > i && (i += vv);
  var h = Math.atan2(s, o);
  if (h < 0 && (h += vv), h >= r && h <= i || h + vv >= r && h + vv <= i)
    return l[0] = c, l[1] = f, u - n;
  var p = n * Math.cos(r) + t, v = n * Math.sin(r) + e, g = n * Math.cos(i) + t, m = n * Math.sin(i) + e, y = (p - o) * (p - o) + (v - s) * (v - s), b = (g - o) * (g - o) + (m - s) * (m - s);
  return y < b ? (l[0] = p, l[1] = v, Math.sqrt(y)) : (l[0] = g, l[1] = m, Math.sqrt(b));
}
function TO(t, e, n, r, i, a, o, s) {
  var l = i - t, u = a - e, c = n - t, f = r - e, d = Math.sqrt(c * c + f * f);
  c /= d, f /= d;
  var h = l * c + u * f, p = h / d;
  s && (p = Math.min(Math.max(p, 0), 1)), p *= d;
  var v = o[0] = t + p * c, g = o[1] = e + p * f;
  return Math.sqrt((v - i) * (v - i) + (g - a) * (g - a));
}
function vte(t, e, n, r, i, a, o) {
  n < 0 && (t = t + n, n = -n), r < 0 && (e = e + r, r = -r);
  var s = t + n, l = e + r, u = o[0] = Math.min(Math.max(i, t), s), c = o[1] = Math.min(Math.max(a, e), l);
  return Math.sqrt((u - i) * (u - i) + (c - a) * (c - a));
}
var Za = [];
function D5e(t, e, n) {
  var r = vte(e.x, e.y, e.width, e.height, t.x, t.y, Za);
  return n.set(Za[0], Za[1]), r;
}
function R5e(t, e, n) {
  for (var r = 0, i = 0, a = 0, o = 0, s, l, u = 1 / 0, c = e.data, f = t.x, d = t.y, h = 0; h < c.length; ) {
    var p = c[h++];
    h === 1 && (r = c[h], i = c[h + 1], a = r, o = i);
    var v = u;
    switch (p) {
      case ac.M:
        a = c[h++], o = c[h++], r = a, i = o;
        break;
      case ac.L:
        v = TO(r, i, c[h], c[h + 1], f, d, Za, !0), r = c[h++], i = c[h++];
        break;
      case ac.C:
        v = Vq(r, i, c[h++], c[h++], c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
        break;
      case ac.Q:
        v = Wq(r, i, c[h++], c[h++], c[h], c[h + 1], f, d, Za), r = c[h++], i = c[h++];
        break;
      case ac.A:
        var g = c[h++], m = c[h++], y = c[h++], b = c[h++], _ = c[h++], O = c[h++];
        h += 1;
        var S = !!(1 - c[h++]);
        s = Math.cos(_) * y + g, l = Math.sin(_) * b + m, h <= 1 && (a = s, o = l);
        var x = (f - g) * b / y + g;
        v = I5e(g, m, b, _, _ + O, S, x, d, Za), r = Math.cos(_ + O) * y + g, i = Math.sin(_ + O) * b + m;
        break;
      case ac.R:
        a = r = c[h++], o = i = c[h++];
        var C = c[h++], T = c[h++];
        v = vte(a, o, C, T, f, d, Za);
        break;
      case ac.Z:
        v = TO(r, i, a, o, f, d, Za, !0), r = a, i = o;
        break;
    }
    v < u && (u = v, n.set(Za[0], Za[1]));
  }
  return u;
}
var Xa = new Ke(), Ut = new Ke(), wn = new Ke(), Wo = new Ke(), Lo = new Ke();
function dV(t, e) {
  if (t) {
    var n = t.getTextGuideLine(), r = t.getTextContent();
    if (r && n) {
      var i = t.textGuideLineConfig || {}, a = [[0, 0], [0, 0], [0, 0]], o = i.candidates || E5e, s = r.getBoundingRect().clone();
      s.applyTransform(r.getComputedTransform());
      var l = 1 / 0, u = i.anchor, c = t.getComputedTransform(), f = c && kf([], c), d = e.get("length2") || 0;
      u && wn.copy(u);
      for (var h = 0; h < o.length; h++) {
        var p = o[h];
        M5e(p, 0, s, Xa, Wo), Ke.scaleAndAdd(Ut, Xa, Wo, d), Ut.transform(f);
        var v = t.getBoundingRect(), g = u ? u.distance(Ut) : t instanceof ot ? R5e(Ut, t.path, wn) : D5e(Ut, v, wn);
        g < l && (l = g, Ut.transform(c), wn.transform(c), wn.toArray(a[0]), Ut.toArray(a[1]), Xa.toArray(a[2]));
      }
      gte(a, e.get("minTurnAngle")), n.setShape({
        points: a
      });
    }
  }
}
var PO = [], Hr = new Ke();
function gte(t, e) {
  if (e <= 180 && e > 0) {
    e = e / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Xa, Ut), Ke.sub(Lo, wn, Ut);
    var n = Wo.len(), r = Lo.len();
    if (!(n < 1e-3 || r < 1e-3)) {
      Wo.scale(1 / n), Lo.scale(1 / r);
      var i = Wo.dot(Lo), a = Math.cos(e);
      if (a < i) {
        var o = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
        Hr.fromArray(PO), Hr.scaleAndAdd(Lo, o / Math.tan(Math.PI - e));
        var s = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
        if (isNaN(s))
          return;
        s < 0 ? Ke.copy(Hr, Ut) : s > 1 && Ke.copy(Hr, wn), Hr.toArray(t[1]);
      }
    }
  }
}
function k5e(t, e, n) {
  if (n <= 180 && n > 0) {
    n = n / 180 * Math.PI, Xa.fromArray(t[0]), Ut.fromArray(t[1]), wn.fromArray(t[2]), Ke.sub(Wo, Ut, Xa), Ke.sub(Lo, wn, Ut);
    var r = Wo.len(), i = Lo.len();
    if (!(r < 1e-3 || i < 1e-3)) {
      Wo.scale(1 / r), Lo.scale(1 / i);
      var a = Wo.dot(e), o = Math.cos(n);
      if (a < o) {
        var s = TO(Ut.x, Ut.y, wn.x, wn.y, Xa.x, Xa.y, PO, !1);
        Hr.fromArray(PO);
        var l = Math.PI / 2, u = Math.acos(Lo.dot(e)), c = l + u - n;
        if (c >= l)
          Ke.copy(Hr, wn);
        else {
          Hr.scaleAndAdd(Lo, s / Math.tan(Math.PI / 2 - c));
          var f = wn.x !== Ut.x ? (Hr.x - Ut.x) / (wn.x - Ut.x) : (Hr.y - Ut.y) / (wn.y - Ut.y);
          if (isNaN(f))
            return;
          f < 0 ? Ke.copy(Hr, Ut) : f > 1 && Ke.copy(Hr, wn);
        }
        Hr.toArray(t[1]);
      }
    }
  }
}
function UT(t, e, n, r) {
  var i = n === "normal", a = i ? t : t.ensureState(n);
  a.ignore = e;
  var o = r.get("smooth");
  o && o === !0 && (o = 0.3), a.shape = a.shape || {}, o > 0 && (a.shape.smooth = o);
  var s = r.getModel("lineStyle").getLineStyle();
  i ? t.useStyle(s) : a.style = s;
}
function L5e(t, e) {
  var n = e.smooth, r = e.points;
  if (r)
    if (t.moveTo(r[0][0], r[0][1]), n > 0 && r.length >= 3) {
      var i = Ts(r[0], r[1]), a = Ts(r[1], r[2]);
      if (!i || !a) {
        t.lineTo(r[1][0], r[1][1]), t.lineTo(r[2][0], r[2][1]);
        return;
      }
      var o = Math.min(i, a) * n, s = xg([], r[1], r[0], o / i), l = xg([], r[1], r[2], o / a), u = xg([], s, l, 0.5);
      t.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), t.bezierCurveTo(l[0], l[1], l[0], l[1], r[2][0], r[2][1]);
    } else
      for (var c = 1; c < r.length; c++)
        t.lineTo(r[c][0], r[c][1]);
}
function Ak(t, e, n) {
  var r = t.getTextGuideLine(), i = t.getTextContent();
  if (!i) {
    r && t.removeTextGuideLine();
    return;
  }
  for (var a = e.normal, o = a.get("show"), s = i.ignore, l = 0; l < xm.length; l++) {
    var u = xm[l], c = e[u], f = u === "normal";
    if (c) {
      var d = c.get("show"), h = f ? s : We(i.states[u] && i.states[u].ignore, s);
      if (h || !We(d, o)) {
        var p = f ? r : r && r.states[u];
        p && (p.ignore = !0), r && UT(r, !0, u, c);
        continue;
      }
      r || (r = new ai(), t.setTextGuideLine(r), !f && (s || !o) && UT(r, !0, "normal", e.normal), t.stateProxy && (r.stateProxy = t.stateProxy)), UT(r, !1, u, c);
    }
  }
  if (r) {
    Re(r.style, n), r.style.fill = null;
    var v = a.get("showAbove"), g = t.textGuideLineConfig = t.textGuideLineConfig || {};
    g.showAbove = v || !1, r.buildPath = L5e;
  }
}
function Ek(t, e) {
  e = e || "labelLine";
  for (var n = {
    normal: t.getModel(e)
  }, r = 0; r < ni.length; r++) {
    var i = ni[r];
    n[i] = t.getModel([i, e]);
  }
  return n;
}
function mte(t) {
  for (var e = [], n = 0; n < t.length; n++) {
    var r = t[n];
    if (!r.defaultAttr.ignore) {
      var i = r.label, a = i.getComputedTransform(), o = i.getBoundingRect(), s = !a || a[1] < 1e-5 && a[2] < 1e-5, l = i.style.margin || 0, u = o.clone();
      u.applyTransform(a), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
      var c = s ? new sO(o, a) : null;
      e.push({
        label: i,
        labelLine: r.labelLine,
        rect: u,
        localRect: o,
        obb: c,
        priority: r.priority,
        defaultAttr: r.defaultAttr,
        layoutOption: r.computedLayoutOption,
        axisAligned: s,
        transform: a
      });
    }
  }
  return e;
}
function yte(t, e, n, r, i, a) {
  var o = t.length;
  if (o < 2)
    return;
  t.sort(function(C, T) {
    return C.rect[e] - T.rect[e];
  });
  for (var s = 0, l, u = !1, c = 0, f = 0; f < o; f++) {
    var d = t[f], h = d.rect;
    l = h[e] - s, l < 0 && (h[e] -= l, d.label[e] -= l, u = !0);
    var p = Math.max(-l, 0);
    c += p, s = h[e] + h[n];
  }
  c > 0 && a && O(-c / o, 0, o);
  var v = t[0], g = t[o - 1], m, y;
  b(), m < 0 && S(-m, 0.8), y < 0 && S(y, 0.8), b(), _(m, y, 1), _(y, m, -1), b(), m < 0 && x(-m), y < 0 && x(y);
  function b() {
    m = v.rect[e] - r, y = i - g.rect[e] - g.rect[n];
  }
  function _(C, T, w) {
    if (C < 0) {
      var P = Math.min(T, -C);
      if (P > 0) {
        O(P * w, 0, o);
        var $ = P + C;
        $ < 0 && S(-$ * w, 1);
      } else
        S(-C * w, 1);
    }
  }
  function O(C, T, w) {
    C !== 0 && (u = !0);
    for (var P = T; P < w; P++) {
      var $ = t[P], A = $.rect;
      A[e] += C, $.label[e] += C;
    }
  }
  function S(C, T) {
    for (var w = [], P = 0, $ = 1; $ < o; $++) {
      var A = t[$ - 1].rect, D = Math.max(t[$].rect[e] - A[e] - A[n], 0);
      w.push(D), P += D;
    }
    if (P) {
      var E = Math.min(Math.abs(C) / P, T);
      if (C > 0)
        for (var $ = 0; $ < o - 1; $++) {
          var R = w[$] * E;
          O(R, 0, $ + 1);
        }
      else
        for (var $ = o - 1; $ > 0; $--) {
          var R = w[$ - 1] * E;
          O(-R, $, o);
        }
    }
  }
  function x(C) {
    var T = C < 0 ? -1 : 1;
    C = Math.abs(C);
    for (var w = Math.ceil(C / (o - 1)), P = 0; P < o - 1; P++)
      if (T > 0 ? O(w, 0, P + 1) : O(-w, o - P - 1, o), C -= w, C <= 0)
        return;
  }
  return u;
}
function N5e(t, e, n, r) {
  return yte(t, "x", "width", e, n, r);
}
function bte(t, e, n, r) {
  return yte(t, "y", "height", e, n, r);
}
function _te(t) {
  var e = [];
  t.sort(function(v, g) {
    return g.priority - v.priority;
  });
  var n = new Je(0, 0, 0, 0);
  function r(v) {
    if (!v.ignore) {
      var g = v.ensureState("emphasis");
      g.ignore == null && (g.ignore = !1);
    }
    v.ignore = !0;
  }
  for (var i = 0; i < t.length; i++) {
    var a = t[i], o = a.axisAligned, s = a.localRect, l = a.transform, u = a.label, c = a.labelLine;
    n.copy(a.rect), n.width -= 0.1, n.height -= 0.1, n.x += 0.05, n.y += 0.05;
    for (var f = a.obb, d = !1, h = 0; h < e.length; h++) {
      var p = e[h];
      if (n.intersect(p.rect)) {
        if (o && p.axisAligned) {
          d = !0;
          break;
        }
        if (p.obb || (p.obb = new sO(p.localRect, p.transform)), f || (f = new sO(s, l)), f.intersect(p.obb)) {
          d = !0;
          break;
        }
      }
    }
    d ? (r(u), c && r(c)) : (u.attr("ignore", a.defaultAttr.ignore), c && c.attr("ignore", a.defaultAttr.labelGuideIgnore), e.push(a));
  }
}
function B5e(t) {
  if (t) {
    for (var e = [], n = 0; n < t.length; n++)
      e.push(t[n].slice());
    return e;
  }
}
function z5e(t, e) {
  var n = t.label, r = e && e.getTextGuideLine();
  return {
    dataIndex: t.dataIndex,
    dataType: t.dataType,
    seriesIndex: t.seriesModel.seriesIndex,
    text: t.label.style.text,
    rect: t.hostRect,
    labelRect: t.rect,
    // x: labelAttr.x,
    // y: labelAttr.y,
    align: n.style.align,
    verticalAlign: n.style.verticalAlign,
    labelLinePoints: B5e(r && r.shape.points)
  };
}
var hV = ["align", "verticalAlign", "width", "height", "fontSize"], Vr = new As(), XT = bt(), V5e = bt();
function mb(t, e, n) {
  for (var r = 0; r < n.length; r++) {
    var i = n[r];
    e[i] != null && (t[i] = e[i]);
  }
}
var yb = ["x", "y", "rotation"], F5e = (
  /** @class */
  function() {
    function t() {
      this._labelList = [], this._chartViewList = [];
    }
    return t.prototype.clearLabels = function() {
      this._labelList = [], this._chartViewList = [];
    }, t.prototype._addLabel = function(e, n, r, i, a) {
      var o = i.style, s = i.__hostTarget, l = s.textConfig || {}, u = i.getComputedTransform(), c = i.getBoundingRect().plain();
      Je.applyTransform(c, c, u), u ? Vr.setLocalTransform(u) : (Vr.x = Vr.y = Vr.rotation = Vr.originX = Vr.originY = 0, Vr.scaleX = Vr.scaleY = 1), Vr.rotation = Fi(Vr.rotation);
      var f = i.__hostTarget, d;
      if (f) {
        d = f.getBoundingRect().plain();
        var h = f.getComputedTransform();
        Je.applyTransform(d, d, h);
      }
      var p = d && f.getTextGuideLine();
      this._labelList.push({
        label: i,
        labelLine: p,
        seriesModel: r,
        dataIndex: e,
        dataType: n,
        layoutOption: a,
        computedLayoutOption: null,
        rect: c,
        hostRect: d,
        // Label with lower priority will be hidden when overlapped
        // Use rect size as default priority
        priority: d ? d.width * d.height : 0,
        // Save default label attributes.
        // For restore if developers want get back to default value in callback.
        defaultAttr: {
          ignore: i.ignore,
          labelGuideIgnore: p && p.ignore,
          x: Vr.x,
          y: Vr.y,
          scaleX: Vr.scaleX,
          scaleY: Vr.scaleY,
          rotation: Vr.rotation,
          style: {
            x: o.x,
            y: o.y,
            align: o.align,
            verticalAlign: o.verticalAlign,
            width: o.width,
            height: o.height,
            fontSize: o.fontSize
          },
          cursor: i.cursor,
          attachedPos: l.position,
          attachedRot: l.rotation
        }
      });
    }, t.prototype.addLabelsOfSeries = function(e) {
      var n = this;
      this._chartViewList.push(e);
      var r = e.__model, i = r.get("labelLayout");
      (Me(i) || st(i).length) && e.group.traverse(function(a) {
        if (a.ignore)
          return !0;
        var o = a.getTextContent(), s = Fe(a);
        o && !o.disableLabelLayout && n._addLabel(s.dataIndex, s.dataType, r, o, i);
      });
    }, t.prototype.updateLayoutConfig = function(e) {
      var n = e.getWidth(), r = e.getHeight();
      function i(b, _) {
        return function() {
          dV(b, _);
        };
      }
      for (var a = 0; a < this._labelList.length; a++) {
        var o = this._labelList[a], s = o.label, l = s.__hostTarget, u = o.defaultAttr, c = void 0;
        Me(o.layoutOption) ? c = o.layoutOption(z5e(o, l)) : c = o.layoutOption, c = c || {}, o.computedLayoutOption = c;
        var f = Math.PI / 180;
        l && l.setTextConfig({
          // Force to set local false.
          local: !1,
          // Ignore position and rotation config on the host el if x or y is changed.
          position: c.x != null || c.y != null ? null : u.attachedPos,
          // Ignore rotation config on the host el if rotation is changed.
          rotation: c.rotate != null ? c.rotate * f : u.attachedRot,
          offset: [c.dx || 0, c.dy || 0]
        });
        var d = !1;
        if (c.x != null ? (s.x = _e(c.x, n), s.setStyle("x", 0), d = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), c.y != null ? (s.y = _e(c.y, r), s.setStyle("y", 0), d = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), c.labelLinePoints) {
          var h = l.getTextGuideLine();
          h && (h.setShape({
            points: c.labelLinePoints
          }), d = !1);
        }
        var p = XT(s);
        p.needsUpdateLabelLine = d, s.rotation = c.rotate != null ? c.rotate * f : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
        for (var v = 0; v < hV.length; v++) {
          var g = hV[v];
          s.setStyle(g, c[g] != null ? c[g] : u.style[g]);
        }
        if (c.draggable) {
          if (s.draggable = !0, s.cursor = "move", l) {
            var m = o.seriesModel;
            if (o.dataIndex != null) {
              var y = o.seriesModel.getData(o.dataType);
              m = y.getItemModel(o.dataIndex);
            }
            s.on("drag", i(l, m.getModel("labelLine")));
          }
        } else
          s.off("drag"), s.cursor = u.cursor;
      }
    }, t.prototype.layout = function(e) {
      var n = e.getWidth(), r = e.getHeight(), i = mte(this._labelList), a = Nt(i, function(l) {
        return l.layoutOption.moveOverlap === "shiftX";
      }), o = Nt(i, function(l) {
        return l.layoutOption.moveOverlap === "shiftY";
      });
      N5e(a, 0, n), bte(o, 0, r);
      var s = Nt(i, function(l) {
        return l.layoutOption.hideOverlap;
      });
      _te(s);
    }, t.prototype.processLabelsOverall = function() {
      var e = this;
      k(this._chartViewList, function(n) {
        var r = n.__model, i = n.ignoreLabelLineUpdate, a = r.isAnimationEnabled();
        n.group.traverse(function(o) {
          if (o.ignore && !o.forceLabelAnimation)
            return !0;
          var s = !i, l = o.getTextContent();
          !s && l && (s = XT(l).needsUpdateLabelLine), s && e._updateLabelLine(o, r), a && e._animateLabels(o, r);
        });
      });
    }, t.prototype._updateLabelLine = function(e, n) {
      var r = e.getTextContent(), i = Fe(e), a = i.dataIndex;
      if (r && a != null) {
        var o = n.getData(i.dataType), s = o.getItemModel(a), l = {}, u = o.getItemVisual(a, "style");
        if (u) {
          var c = o.getVisual("drawType");
          l.stroke = u[c];
        }
        var f = s.getModel("labelLine");
        Ak(e, Ek(s), l), dV(e, f);
      }
    }, t.prototype._animateLabels = function(e, n) {
      var r = e.getTextContent(), i = e.getTextGuideLine();
      if (r && (e.forceLabelAnimation || !r.ignore && !r.invisible && !e.disableLabelAnimation && !th(e))) {
        var a = XT(r), o = a.oldLayout, s = Fe(e), l = s.dataIndex, u = {
          x: r.x,
          y: r.y,
          rotation: r.rotation
        }, c = n.getData(s.dataType);
        if (o) {
          r.attr(o);
          var d = e.prevStates;
          d && (et(d, "select") >= 0 && r.attr(a.oldLayoutSelect), et(d, "emphasis") >= 0 && r.attr(a.oldLayoutEmphasis)), Ct(r, u, n, l);
        } else if (r.attr(u), !mp(r).valueAnimation) {
          var f = We(r.style.opacity, 1);
          r.style.opacity = 0, Yt(r, {
            style: {
              opacity: f
            }
          }, n, l);
        }
        if (a.oldLayout = u, r.states.select) {
          var h = a.oldLayoutSelect = {};
          mb(h, u, yb), mb(h, r.states.select, yb);
        }
        if (r.states.emphasis) {
          var p = a.oldLayoutEmphasis = {};
          mb(p, u, yb), mb(p, r.states.emphasis, yb);
        }
        hJ(r, l, c, n, n);
      }
      if (i && !i.ignore && !i.invisible) {
        var a = V5e(i), o = a.oldLayout, v = {
          points: i.shape.points
        };
        o ? (i.attr({
          shape: o
        }), Ct(i, {
          shape: v
        }, n)) : (i.setShape(v), i.style.strokePercent = 0, Yt(i, {
          style: {
            strokePercent: 1
          }
        }, n)), a.oldLayout = v;
      }
    }, t;
  }()
), YT = bt();
function W5e(t) {
  t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
    var i = YT(n).labelManager;
    i || (i = YT(n).labelManager = new F5e()), i.clearLabels();
  }), t.registerUpdateLifecycle("series:layoutlabels", function(e, n, r) {
    var i = YT(n).labelManager;
    r.updatedSeries.forEach(function(a) {
      i.addLabelsOfSeries(n.getViewOfSeriesModel(a));
    }), i.updateLayoutConfig(n), i.layout(n), i.processLabelsOverall();
  });
}
var qT = Math.sin, KT = Math.cos, Ote = Math.PI, oc = Math.PI * 2, Q5e = 180 / Ote, Ste = function() {
  function t() {
  }
  return t.prototype.reset = function(e) {
    this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
  }, t.prototype.moveTo = function(e, n) {
    this._add("M", e, n);
  }, t.prototype.lineTo = function(e, n) {
    this._add("L", e, n);
  }, t.prototype.bezierCurveTo = function(e, n, r, i, a, o) {
    this._add("C", e, n, r, i, a, o);
  }, t.prototype.quadraticCurveTo = function(e, n, r, i) {
    this._add("Q", e, n, r, i);
  }, t.prototype.arc = function(e, n, r, i, a, o) {
    this.ellipse(e, n, r, r, 0, i, a, o);
  }, t.prototype.ellipse = function(e, n, r, i, a, o, s, l) {
    var u = s - o, c = !l, f = Math.abs(u), d = Bl(f - oc) || (c ? u >= oc : -u >= oc), h = u > 0 ? u % oc : u % oc + oc, p = !1;
    d ? p = !0 : Bl(f) ? p = !1 : p = h >= Ote == !!c;
    var v = e + r * KT(o), g = n + i * qT(o);
    this._start && this._add("M", v, g);
    var m = Math.round(a * Q5e);
    if (d) {
      var y = 1 / this._p, b = (c ? 1 : -1) * (oc - y);
      this._add("A", r, i, m, 1, +c, e + r * KT(o + b), n + i * qT(o + b)), y > 0.01 && this._add("A", r, i, m, 0, +c, v, g);
    } else {
      var _ = e + r * KT(s), O = n + i * qT(s);
      this._add("A", r, i, m, +p, +c, _, O);
    }
  }, t.prototype.rect = function(e, n, r, i) {
    this._add("M", e, n), this._add("l", r, 0), this._add("l", 0, i), this._add("l", -r, 0), this._add("Z");
  }, t.prototype.closePath = function() {
    this._d.length > 0 && this._add("Z");
  }, t.prototype._add = function(e, n, r, i, a, o, s, l, u) {
    for (var c = [], f = this._p, d = 1; d < arguments.length; d++) {
      var h = arguments[d];
      if (isNaN(h)) {
        this._invalid = !0;
        return;
      }
      c.push(Math.round(h * f) / f);
    }
    this._d.push(e + c.join(" ")), this._start = e === "Z";
  }, t.prototype.generateStr = function() {
    this._str = this._invalid ? "" : this._d.join(""), this._d = [];
  }, t.prototype.getStr = function() {
    return this._str;
  }, t;
}(), Mk = "none", H5e = Math.round;
function G5e(t) {
  var e = t.fill;
  return e != null && e !== Mk;
}
function j5e(t) {
  var e = t.stroke;
  return e != null && e !== Mk;
}
var aE = ["lineCap", "miterLimit", "lineJoin"], Z5e = ce(aE, function(t) {
  return "stroke-" + t.toLowerCase();
});
function U5e(t, e, n, r) {
  var i = e.opacity == null ? 1 : e.opacity;
  if (n instanceof lr) {
    t("opacity", i);
    return;
  }
  if (G5e(e)) {
    var a = Sm(e.fill);
    t("fill", a.color);
    var o = e.fillOpacity != null ? e.fillOpacity * a.opacity * i : a.opacity * i;
    o < 1 && t("fill-opacity", o);
  } else
    t("fill", Mk);
  if (j5e(e)) {
    var s = Sm(e.stroke);
    t("stroke", s.color);
    var l = e.strokeNoScale ? n.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, c = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * i : s.opacity * i, f = e.strokeFirst;
    if (u !== 1 && t("stroke-width", u), f && t("paint-order", f ? "stroke" : "fill"), c < 1 && t("stroke-opacity", c), e.lineDash) {
      var d = fk(n), h = d[0], p = d[1];
      h && (p = H5e(p || 0), t("stroke-dasharray", h.join(",")), (p || r) && t("stroke-dashoffset", p));
    }
    for (var v = 0; v < aE.length; v++) {
      var g = aE[v];
      if (e[g] !== aO[g]) {
        var m = e[g] || aO[g];
        m && t(Z5e[v], m);
      }
    }
  }
}
var xte = "http://www.w3.org/2000/svg", wte = "http://www.w3.org/1999/xlink", X5e = "http://www.w3.org/2000/xmlns/", Y5e = "http://www.w3.org/XML/1998/namespace", pV = "ecmeta_";
function Cte(t) {
  return document.createElementNS(xte, t);
}
function Xn(t, e, n, r, i) {
  return {
    tag: t,
    attrs: n || {},
    children: r,
    text: i,
    key: e
  };
}
function q5e(t, e) {
  var n = [];
  if (e)
    for (var r in e) {
      var i = e[r], a = r;
      i !== !1 && (i !== !0 && i != null && (a += '="' + i + '"'), n.push(a));
    }
  return "<" + t + " " + n.join(" ") + ">";
}
function K5e(t) {
  return "</" + t + ">";
}
function Ik(t, e) {
  e = e || {};
  var n = e.newline ? `
` : "";
  function r(i) {
    var a = i.children, o = i.tag, s = i.attrs, l = i.text;
    return q5e(o, s) + (o !== "style" ? Gr(l) : l || "") + (a ? "" + n + ce(a, function(u) {
      return r(u);
    }).join(n) + n : "") + K5e(o);
  }
  return r(t);
}
function J5e(t, e, n) {
  n = n || {};
  var r = n.newline ? `
` : "", i = " {" + r, a = r + "}", o = ce(st(t), function(l) {
    return l + i + ce(st(t[l]), function(u) {
      return u + ":" + t[l][u] + ";";
    }).join(r) + a;
  }).join(r), s = ce(st(e), function(l) {
    return "@keyframes " + l + i + ce(st(e[l]), function(u) {
      return u + i + ce(st(e[l][u]), function(c) {
        var f = e[l][u][c];
        return c === "d" && (f = 'path("' + f + '")'), c + ":" + f + ";";
      }).join(r) + a;
    }).join(r) + a;
  }).join(r);
  return !o && !s ? "" : ["<![CDATA[", o, s, "]]>"].join(r);
}
function oE(t) {
  return {
    zrId: t,
    shadowCache: {},
    patternCache: {},
    gradientCache: {},
    clipPathCache: {},
    defs: {},
    cssNodes: {},
    cssAnims: {},
    cssStyleCache: {},
    cssAnimIdx: 0,
    shadowIdx: 0,
    gradientIdx: 0,
    patternIdx: 0,
    clipPathIdx: 0
  };
}
function vV(t, e, n, r) {
  return Xn("svg", "root", {
    width: t,
    height: e,
    xmlns: xte,
    "xmlns:xlink": wte,
    version: "1.1",
    baseProfile: "full",
    viewBox: r ? "0 0 " + t + " " + e : !1
  }, n);
}
var e3e = 0;
function Tte() {
  return e3e++;
}
var gV = {
  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"
}, dc = "transform-origin";
function t3e(t, e, n) {
  var r = le({}, t.shape);
  le(r, e), t.buildPath(n, r);
  var i = new Ste();
  return i.reset(Xq(t)), n.rebuildPath(i, 1), i.generateStr(), i.getStr();
}
function n3e(t, e) {
  var n = e.originX, r = e.originY;
  (n || r) && (t[dc] = n + "px " + r + "px");
}
var r3e = {
  fill: "fill",
  opacity: "opacity",
  lineWidth: "stroke-width",
  lineDashOffset: "stroke-dashoffset"
};
function Pte(t, e) {
  var n = e.zrId + "-ani-" + e.cssAnimIdx++;
  return e.cssAnims[n] = t, n;
}
function i3e(t, e, n) {
  var r = t.shape.paths, i = {}, a, o;
  if (k(r, function(l) {
    var u = oE(n.zrId);
    u.animation = !0, gw(l, {}, u, !0);
    var c = u.cssAnims, f = u.cssNodes, d = st(c), h = d.length;
    if (h) {
      o = d[h - 1];
      var p = c[o];
      for (var v in p) {
        var g = p[v];
        i[v] = i[v] || { d: "" }, i[v].d += g.d || "";
      }
      for (var m in f) {
        var y = f[m].animation;
        y.indexOf(o) >= 0 && (a = y);
      }
    }
  }), !!a) {
    e.d = !1;
    var s = Pte(i, n);
    return a.replace(o, s);
  }
}
function mV(t) {
  return Oe(t) ? gV[t] ? "cubic-bezier(" + gV[t] + ")" : SR(t) ? t : "" : "";
}
function gw(t, e, n, r) {
  var i = t.animators, a = i.length, o = [];
  if (t instanceof qx) {
    var s = i3e(t, e, n);
    if (s)
      o.push(s);
    else if (!a)
      return;
  } else if (!a)
    return;
  for (var l = {}, u = 0; u < a; u++) {
    var c = i[u], f = [c.getMaxTime() / 1e3 + "s"], d = mV(c.getClip().easing), h = c.getDelay();
    d ? f.push(d) : f.push("linear"), h && f.push(h / 1e3 + "s"), c.getLoop() && f.push("infinite");
    var p = f.join(" ");
    l[p] = l[p] || [p, []], l[p][1].push(c);
  }
  function v(y) {
    var b = y[1], _ = b.length, O = {}, S = {}, x = {}, C = "animation-timing-function";
    function T(ie, X, H) {
      for (var G = ie.getTracks(), re = ie.getMaxTime(), fe = 0; fe < G.length; fe++) {
        var de = G[fe];
        if (de.needsAnimate()) {
          var Ee = de.keyframes, $e = de.propName;
          if (H && ($e = H($e)), $e)
            for (var Se = 0; Se < Ee.length; Se++) {
              var be = Ee[Se], he = Math.round(be.time / re * 100) + "%", Te = mV(be.easing), ze = be.rawValue;
              (Oe(ze) || St(ze)) && (X[he] = X[he] || {}, X[he][$e] = be.rawValue, Te && (X[he][C] = Te));
            }
        }
      }
    }
    for (var w = 0; w < _; w++) {
      var P = b[w], $ = P.targetName;
      $ ? $ === "shape" && T(P, S) : !r && T(P, O);
    }
    for (var A in O) {
      var D = {};
      eK(D, t), le(D, O[A]);
      var E = Yq(D), R = O[A][C];
      x[A] = E ? {
        transform: E
      } : {}, n3e(x[A], D), R && (x[A][C] = R);
    }
    var N, V = !0;
    for (var A in S) {
      x[A] = x[A] || {};
      var z = !N, R = S[A][C];
      z && (N = new as());
      var W = N.len();
      N.reset(), x[A].d = t3e(t, S[A], N);
      var F = N.len();
      if (!z && W !== F) {
        V = !1;
        break;
      }
      R && (x[A][C] = R);
    }
    if (!V)
      for (var A in x)
        delete x[A].d;
    if (!r)
      for (var w = 0; w < _; w++) {
        var P = b[w], $ = P.targetName;
        $ === "style" && T(P, x, function(G) {
          return r3e[G];
        });
      }
    for (var Q = st(x), Z = !0, ne, w = 1; w < Q.length; w++) {
      var ee = Q[w - 1], oe = Q[w];
      if (x[ee][dc] !== x[oe][dc]) {
        Z = !1;
        break;
      }
      ne = x[ee][dc];
    }
    if (Z && ne) {
      for (var A in x)
        x[A][dc] && delete x[A][dc];
      e[dc] = ne;
    }
    if (Nt(Q, function(ie) {
      return st(x[ie]).length > 0;
    }).length) {
      var K = Pte(x, n);
      return K + " " + y[0] + " both";
    }
  }
  for (var g in l) {
    var s = v(l[g]);
    s && o.push(s);
  }
  if (o.length) {
    var m = n.zrId + "-cls-" + Tte();
    n.cssNodes["." + m] = {
      animation: o.join(",")
    }, e.class = m;
  }
}
function a3e(t, e, n) {
  if (!t.ignore)
    if (t.isSilent()) {
      var r = {
        "pointer-events": "none"
      };
      yV(r, e, n);
    } else {
      var i = t.states.emphasis && t.states.emphasis.style ? t.states.emphasis.style : {}, a = i.fill;
      if (!a) {
        var o = t.style && t.style.fill, s = t.states.select && t.states.select.style && t.states.select.style.fill, l = t.currentStates.indexOf("select") >= 0 && s || o;
        l && (a = eO(l));
      }
      var u = i.lineWidth;
      if (u) {
        var c = !i.strokeNoScale && t.transform ? t.transform[0] : 1;
        u = u / c;
      }
      var r = {
        cursor: "pointer"
      };
      a && (r.fill = a), i.stroke && (r.stroke = i.stroke), u && (r["stroke-width"] = u), yV(r, e, n);
    }
}
function yV(t, e, n, r) {
  var i = JSON.stringify(t), a = n.cssStyleCache[i];
  a || (a = n.zrId + "-cls-" + Tte(), n.cssStyleCache[i] = a, n.cssNodes["." + a + ":hover"] = t), e.class = e.class ? e.class + " " + a : a;
}
var Im = Math.round;
function $te(t) {
  return t && Oe(t.src);
}
function Ate(t) {
  return t && Me(t.toDataURL);
}
function Dk(t, e, n, r) {
  U5e(function(i, a) {
    var o = i === "fill" || i === "stroke";
    o && Uq(a) ? Mte(e, t, i, r) : o && wR(a) ? Ite(n, t, i, r) : o && a === "none" ? t[i] = "transparent" : t[i] = a;
  }, e, n, !1), d3e(n, t, r);
}
function Rk(t, e) {
  var n = iK(e);
  n && (n.each(function(r, i) {
    r != null && (t[(pV + i).toLowerCase()] = r + "");
  }), e.isSilent() && (t[pV + "silent"] = "true"));
}
function bV(t) {
  return Bl(t[0] - 1) && Bl(t[1]) && Bl(t[2]) && Bl(t[3] - 1);
}
function o3e(t) {
  return Bl(t[4]) && Bl(t[5]);
}
function kk(t, e, n) {
  if (e && !(o3e(e) && bV(e))) {
    var r = 1e4;
    t.transform = bV(e) ? "translate(" + Im(e[4] * r) / r + " " + Im(e[5] * r) / r + ")" : JIe(e);
  }
}
function _V(t, e, n) {
  for (var r = t.points, i = [], a = 0; a < r.length; a++)
    i.push(Im(r[a][0] * n) / n), i.push(Im(r[a][1] * n) / n);
  e.points = i.join(" ");
}
function OV(t) {
  return !t.smooth;
}
function s3e(t) {
  var e = ce(t, function(n) {
    return typeof n == "string" ? [n, n] : n;
  });
  return function(n, r, i) {
    for (var a = 0; a < e.length; a++) {
      var o = e[a], s = n[o[0]];
      s != null && (r[o[1]] = Im(s * i) / i);
    }
  };
}
var l3e = {
  circle: [s3e(["cx", "cy", "r"])],
  polyline: [_V, OV],
  polygon: [_V, OV]
};
function u3e(t) {
  for (var e = t.animators, n = 0; n < e.length; n++)
    if (e[n].targetName === "shape")
      return !0;
  return !1;
}
function Ete(t, e) {
  var n = t.style, r = t.shape, i = l3e[t.type], a = {}, o = e.animation, s = "path", l = t.style.strokePercent, u = e.compress && Xq(t) || 4;
  if (i && !e.willUpdate && !(i[1] && !i[1](r)) && !(o && u3e(t)) && !(l < 1)) {
    s = t.type;
    var c = Math.pow(10, u);
    i[0](r, a, c);
  } else {
    var f = !t.path || t.shapeChanged();
    t.path || t.createPathProxy();
    var d = t.path;
    f && (d.beginPath(), t.buildPath(d, t.shape), t.pathUpdated());
    var h = d.getVersion(), p = t, v = p.__svgPathBuilder;
    (p.__svgPathVersion !== h || !v || l !== p.__svgPathStrokePercent) && (v || (v = p.__svgPathBuilder = new Ste()), v.reset(u), d.rebuildPath(v, l), v.generateStr(), p.__svgPathVersion = h, p.__svgPathStrokePercent = l), a.d = v.getStr();
  }
  return kk(a, t.transform), Dk(a, n, t, e), Rk(a, t), e.animation && gw(t, a, e), e.emphasis && a3e(t, a, e), Xn(s, t.id + "", a);
}
function c3e(t, e) {
  var n = t.style, r = n.image;
  if (r && !Oe(r) && ($te(r) ? r = r.src : Ate(r) && (r = r.toDataURL())), !!r) {
    var i = n.x || 0, a = n.y || 0, o = n.width, s = n.height, l = {
      href: r,
      width: o,
      height: s
    };
    return i && (l.x = i), a && (l.y = a), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("image", t.id + "", l);
  }
}
function f3e(t, e) {
  var n = t.style, r = n.text;
  if (r != null && (r += ""), !(!r || isNaN(n.x) || isNaN(n.y))) {
    var i = n.font || iu, a = n.x || 0, o = tDe(n.y || 0, zx(i), n.textBaseline), s = eDe[n.textAlign] || n.textAlign, l = {
      "dominant-baseline": "central",
      "text-anchor": s
    };
    if (MK(n)) {
      var u = "", c = n.fontStyle, f = EK(n.fontSize);
      if (!parseFloat(f))
        return;
      var d = n.fontFamily || _q, h = n.fontWeight;
      u += "font-size:" + f + ";font-family:" + d + ";", c && c !== "normal" && (u += "font-style:" + c + ";"), h && h !== "normal" && (u += "font-weight:" + h + ";"), l.style = u;
    } else
      l.style = "font: " + i;
    return r.match(/\s/) && (l["xml:space"] = "preserve"), a && (l.x = a), o && (l.y = o), kk(l, t.transform), Dk(l, n, t, e), Rk(l, t), e.animation && gw(t, l, e), Xn("text", t.id + "", l, void 0, r);
  }
}
function SV(t, e) {
  if (t instanceof ot)
    return Ete(t, e);
  if (t instanceof lr)
    return c3e(t, e);
  if (t instanceof Bh)
    return f3e(t, e);
}
function d3e(t, e, n) {
  var r = t.style;
  if (nDe(r)) {
    var i = rDe(t), a = n.shadowCache, o = a[i];
    if (!o) {
      var s = t.getGlobalScale(), l = s[0], u = s[1];
      if (!l || !u)
        return;
      var c = r.shadowOffsetX || 0, f = r.shadowOffsetY || 0, d = r.shadowBlur, h = Sm(r.shadowColor), p = h.opacity, v = h.color, g = d / 2 / l, m = d / 2 / u, y = g + " " + m;
      o = n.zrId + "-s" + n.shadowIdx++, n.defs[o] = Xn("filter", o, {
        id: o,
        x: "-100%",
        y: "-100%",
        width: "300%",
        height: "300%"
      }, [
        Xn("feDropShadow", "", {
          dx: c / l,
          dy: f / u,
          stdDeviation: y,
          "flood-color": v,
          "flood-opacity": p
        })
      ]), a[i] = o;
    }
    e.filter = Bx(o);
  }
}
function Mte(t, e, n, r) {
  var i = t[n], a, o = {
    gradientUnits: i.global ? "userSpaceOnUse" : "objectBoundingBox"
  };
  if (jq(i))
    a = "linearGradient", o.x1 = i.x, o.y1 = i.y, o.x2 = i.x2, o.y2 = i.y2;
  else if (Zq(i))
    a = "radialGradient", o.cx = We(i.x, 0.5), o.cy = We(i.y, 0.5), o.r = We(i.r, 0.5);
  else {
    process.env.NODE_ENV !== "production" && Oa("Illegal gradient type.");
    return;
  }
  for (var s = i.colorStops, l = [], u = 0, c = s.length; u < c; ++u) {
    var f = pA(s[u].offset) * 100 + "%", d = s[u].color, h = Sm(d), p = h.color, v = h.opacity, g = {
      offset: f
    };
    g["stop-color"] = p, v < 1 && (g["stop-opacity"] = v), l.push(Xn("stop", u + "", g));
  }
  var m = Xn(a, "", o, l), y = Ik(m), b = r.gradientCache, _ = b[y];
  _ || (_ = r.zrId + "-g" + r.gradientIdx++, b[y] = _, o.id = _, r.defs[_] = Xn(a, _, o, l)), e[n] = Bx(_);
}
function Ite(t, e, n, r) {
  var i = t.style[n], a = t.getBoundingRect(), o = {}, s = i.repeat, l = s === "no-repeat", u = s === "repeat-x", c = s === "repeat-y", f;
  if (Gq(i)) {
    var d = i.imageWidth, h = i.imageHeight, p = void 0, v = i.image;
    if (Oe(v) ? p = v : $te(v) ? p = v.src : Ate(v) && (p = v.toDataURL()), typeof Image > "u") {
      var g = "Image width/height must been given explictly in svg-ssr renderer.";
      ke(d, g), ke(h, g);
    } else if (d == null || h == null) {
      var m = function(w, P) {
        if (w) {
          var $ = w.elm, A = d || P.width, D = h || P.height;
          w.tag === "pattern" && (u ? (D = 1, A /= a.width) : c && (A = 1, D /= a.height)), w.attrs.width = A, w.attrs.height = D, $ && ($.setAttribute("width", A), $.setAttribute("height", D));
        }
      }, y = IR(p, null, t, function(w) {
        l || m(S, w), m(f, w);
      });
      y && y.width && y.height && (d = d || y.width, h = h || y.height);
    }
    f = Xn("image", "img", {
      href: p,
      width: d,
      height: h
    }), o.width = d, o.height = h;
  } else i.svgElement && (f = Le(i.svgElement), o.width = i.svgWidth, o.height = i.svgHeight);
  if (f) {
    var b, _;
    l ? b = _ = 1 : u ? (_ = 1, b = o.width / a.width) : c ? (b = 1, _ = o.height / a.height) : o.patternUnits = "userSpaceOnUse", b != null && !isNaN(b) && (o.width = b), _ != null && !isNaN(_) && (o.height = _);
    var O = Yq(i);
    O && (o.patternTransform = O);
    var S = Xn("pattern", "", o, [f]), x = Ik(S), C = r.patternCache, T = C[x];
    T || (T = r.zrId + "-p" + r.patternIdx++, C[x] = T, o.id = T, S = r.defs[T] = Xn("pattern", T, o, [f])), e[n] = Bx(T);
  }
}
function h3e(t, e, n) {
  var r = n.clipPathCache, i = n.defs, a = r[t.id];
  if (!a) {
    a = n.zrId + "-c" + n.clipPathIdx++;
    var o = {
      id: a
    };
    r[t.id] = a, i[a] = Xn("clipPath", a, o, [Ete(t, n)]);
  }
  e["clip-path"] = Bx(a);
}
function xV(t) {
  return document.createTextNode(t);
}
function xc(t, e, n) {
  t.insertBefore(e, n);
}
function wV(t, e) {
  t.removeChild(e);
}
function CV(t, e) {
  t.appendChild(e);
}
function Dte(t) {
  return t.parentNode;
}
function Rte(t) {
  return t.nextSibling;
}
function JT(t, e) {
  t.textContent = e;
}
var TV = 58, p3e = 120, v3e = Xn("", "");
function sE(t) {
  return t === void 0;
}
function Do(t) {
  return t !== void 0;
}
function g3e(t, e, n) {
  for (var r = {}, i = e; i <= n; ++i) {
    var a = t[i].key;
    a !== void 0 && (process.env.NODE_ENV !== "production" && r[a] != null && console.error("Duplicate key " + a), r[a] = i);
  }
  return r;
}
function Uv(t, e) {
  var n = t.key === e.key, r = t.tag === e.tag;
  return r && n;
}
function Dm(t) {
  var e, n = t.children, r = t.tag;
  if (Do(r)) {
    var i = t.elm = Cte(r);
    if (Lk(v3e, t), ue(n))
      for (e = 0; e < n.length; ++e) {
        var a = n[e];
        a != null && CV(i, Dm(a));
      }
    else Do(t.text) && !Ie(t.text) && CV(i, xV(t.text));
  } else
    t.elm = xV(t.text);
  return t.elm;
}
function kte(t, e, n, r, i) {
  for (; r <= i; ++r) {
    var a = n[r];
    a != null && xc(t, Dm(a), e);
  }
}
function $O(t, e, n, r) {
  for (; n <= r; ++n) {
    var i = e[n];
    if (i != null)
      if (Do(i.tag)) {
        var a = Dte(i.elm);
        wV(a, i.elm);
      } else
        wV(t, i.elm);
  }
}
function Lk(t, e) {
  var n, r = e.elm, i = t && t.attrs || {}, a = e.attrs || {};
  if (i !== a) {
    for (n in a) {
      var o = a[n], s = i[n];
      s !== o && (o === !0 ? r.setAttribute(n, "") : o === !1 ? r.removeAttribute(n) : n === "style" ? r.style.cssText = o : n.charCodeAt(0) !== p3e ? r.setAttribute(n, o) : n === "xmlns:xlink" || n === "xmlns" ? r.setAttributeNS(X5e, n, o) : n.charCodeAt(3) === TV ? r.setAttributeNS(Y5e, n, o) : n.charCodeAt(5) === TV ? r.setAttributeNS(wte, n, o) : r.setAttribute(n, o));
    }
    for (n in i)
      n in a || r.removeAttribute(n);
  }
}
function m3e(t, e, n) {
  for (var r = 0, i = 0, a = e.length - 1, o = e[0], s = e[a], l = n.length - 1, u = n[0], c = n[l], f, d, h, p; r <= a && i <= l; )
    o == null ? o = e[++r] : s == null ? s = e[--a] : u == null ? u = n[++i] : c == null ? c = n[--l] : Uv(o, u) ? (Ed(o, u), o = e[++r], u = n[++i]) : Uv(s, c) ? (Ed(s, c), s = e[--a], c = n[--l]) : Uv(o, c) ? (Ed(o, c), xc(t, o.elm, Rte(s.elm)), o = e[++r], c = n[--l]) : Uv(s, u) ? (Ed(s, u), xc(t, s.elm, o.elm), s = e[--a], u = n[++i]) : (sE(f) && (f = g3e(e, r, a)), d = f[u.key], sE(d) ? xc(t, Dm(u), o.elm) : (h = e[d], h.tag !== u.tag ? xc(t, Dm(u), o.elm) : (Ed(h, u), e[d] = void 0, xc(t, h.elm, o.elm))), u = n[++i]);
  (r <= a || i <= l) && (r > a ? (p = n[l + 1] == null ? null : n[l + 1].elm, kte(t, p, n, i, l)) : $O(t, e, r, a));
}
function Ed(t, e) {
  var n = e.elm = t.elm, r = t.children, i = e.children;
  t !== e && (Lk(t, e), sE(e.text) ? Do(r) && Do(i) ? r !== i && m3e(n, r, i) : Do(i) ? (Do(t.text) && JT(n, ""), kte(n, null, i, 0, i.length - 1)) : Do(r) ? $O(n, r, 0, r.length - 1) : Do(t.text) && JT(n, "") : t.text !== e.text && (Do(r) && $O(n, r, 0, r.length - 1), JT(n, e.text)));
}
function y3e(t, e) {
  if (Uv(t, e))
    Ed(t, e);
  else {
    var n = t.elm, r = Dte(n);
    Dm(e), r !== null && (xc(r, e.elm, Rte(n)), $O(r, [t], 0, 0));
  }
  return e;
}
var b3e = 0, _3e = function() {
  function t(e, n, r) {
    if (this.type = "svg", this.refreshHover = PV("refreshHover"), this.configLayer = PV("configLayer"), this.storage = n, this._opts = r = le({}, r), this.root = e, this._id = "zr" + b3e++, this._oldVNode = vV(r.width, r.height), e && !r.ssr) {
      var i = this._viewport = document.createElement("div");
      i.style.cssText = "position:relative;overflow:hidden";
      var a = this._svgDom = this._oldVNode.elm = Cte("svg");
      Lk(null, this._oldVNode), i.appendChild(a), e.appendChild(i);
    }
    this.resize(r.width, r.height);
  }
  return t.prototype.getType = function() {
    return this.type;
  }, t.prototype.getViewportRoot = function() {
    return this._viewport;
  }, t.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, t.prototype.getSvgDom = function() {
    return this._svgDom;
  }, t.prototype.refresh = function() {
    if (this.root) {
      var e = this.renderToVNode({
        willUpdate: !0
      });
      e.attrs.style = "position:absolute;left:0;top:0;user-select:none", y3e(this._oldVNode, e), this._oldVNode = e;
    }
  }, t.prototype.renderOneToVNode = function(e) {
    return SV(e, oE(this._id));
  }, t.prototype.renderToVNode = function(e) {
    e = e || {};
    var n = this.storage.getDisplayList(!0), r = this._width, i = this._height, a = oE(this._id);
    a.animation = e.animation, a.willUpdate = e.willUpdate, a.compress = e.compress, a.emphasis = e.emphasis;
    var o = [], s = this._bgVNode = O3e(r, i, this._backgroundColor, a);
    s && o.push(s);
    var l = e.compress ? null : this._mainVNode = Xn("g", "main", {}, []);
    this._paintList(n, a, l ? l.children : o), l && o.push(l);
    var u = ce(st(a.defs), function(d) {
      return a.defs[d];
    });
    if (u.length && o.push(Xn("defs", "defs", {}, u)), e.animation) {
      var c = J5e(a.cssNodes, a.cssAnims, { newline: !0 });
      if (c) {
        var f = Xn("style", "stl", {}, [], c);
        o.push(f);
      }
    }
    return vV(r, i, o, e.useViewBox);
  }, t.prototype.renderToString = function(e) {
    return e = e || {}, Ik(this.renderToVNode({
      animation: We(e.cssAnimation, !0),
      emphasis: We(e.cssEmphasis, !0),
      willUpdate: !1,
      compress: !0,
      useViewBox: We(e.useViewBox, !0)
    }), { newline: !0 });
  }, t.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e;
  }, t.prototype.getSvgRoot = function() {
    return this._mainVNode && this._mainVNode.elm;
  }, t.prototype._paintList = function(e, n, r) {
    for (var i = e.length, a = [], o = 0, s, l, u = 0, c = 0; c < i; c++) {
      var f = e[c];
      if (!f.invisible) {
        var d = f.__clipPaths, h = d && d.length || 0, p = l && l.length || 0, v = void 0;
        for (v = Math.max(h - 1, p - 1); v >= 0 && !(d && l && d[v] === l[v]); v--)
          ;
        for (var g = p - 1; g > v; g--)
          o--, s = a[o - 1];
        for (var m = v + 1; m < h; m++) {
          var y = {};
          h3e(d[m], y, n);
          var b = Xn("g", "clip-g-" + u++, y, []);
          (s ? s.children : r).push(b), a[o++] = b, s = b;
        }
        l = d;
        var _ = SV(f, n);
        _ && (s ? s.children : r).push(_);
      }
    }
  }, t.prototype.resize = function(e, n) {
    var r = this._opts, i = this.root, a = this._viewport;
    if (e != null && (r.width = e), n != null && (r.height = n), i && a && (a.style.display = "none", e = Fd(i, 0, r), n = Fd(i, 1, r), a.style.display = ""), this._width !== e || this._height !== n) {
      if (this._width = e, this._height = n, a) {
        var o = a.style;
        o.width = e + "px", o.height = n + "px";
      }
      if (wR(this._backgroundColor))
        this.refresh();
      else {
        var s = this._svgDom;
        s && (s.setAttribute("width", e), s.setAttribute("height", n));
        var l = this._bgVNode && this._bgVNode.elm;
        l && (l.setAttribute("width", e), l.setAttribute("height", n));
      }
    }
  }, t.prototype.getWidth = function() {
    return this._width;
  }, t.prototype.getHeight = function() {
    return this._height;
  }, t.prototype.dispose = function() {
    this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
  }, t.prototype.clear = function() {
    this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
  }, t.prototype.toDataURL = function(e) {
    var n = this.renderToString(), r = "data:image/svg+xml;";
    return e ? (n = aDe(n), n && r + "base64," + n) : r + "charset=UTF-8," + encodeURIComponent(n);
  }, t;
}();
function PV(t) {
  return function() {
    process.env.NODE_ENV !== "production" && Oa('In SVG mode painter not support method "' + t + '"');
  };
}
function O3e(t, e, n, r) {
  var i;
  if (n && n !== "none")
    if (i = Xn("rect", "bg", {
      width: t,
      height: e,
      x: "0",
      y: "0"
    }), Uq(n))
      Mte({ fill: n }, i.attrs, "fill", r);
    else if (wR(n))
      Ite({
        style: {
          fill: n
        },
        dirty: On,
        getBoundingRect: function() {
          return { width: t, height: e };
        }
      }, i.attrs, "fill", r);
    else {
      var a = Sm(n), o = a.color, s = a.opacity;
      i.attrs.fill = o, s < 1 && (i.attrs["fill-opacity"] = s);
    }
  return i;
}
function S3e(t) {
  t.registerPainter("svg", _3e);
}
function $V(t, e, n) {
  var r = io.createCanvas(), i = e.getWidth(), a = e.getHeight(), o = r.style;
  return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = i + "px", o.height = a + "px", r.setAttribute("data-zr-dom-id", t)), r.width = i * n, r.height = a * n, r;
}
var eP = function(t) {
  q(e, t);
  function e(n, r, i) {
    var a = t.call(this) || this;
    a.motionBlur = !1, a.lastFrameAlpha = 0.7, a.dpr = 1, a.virtual = !1, a.config = {}, a.incremental = !1, a.zlevel = 0, a.maxRepaintRectCount = 5, a.__dirty = !0, a.__firstTimePaint = !0, a.__used = !1, a.__drawIndex = 0, a.__startIndex = 0, a.__endIndex = 0, a.__prevStartIndex = null, a.__prevEndIndex = null;
    var o;
    i = i || nO, typeof n == "string" ? o = $V(n, r, i) : Ie(n) && (o = n, n = o.id), a.id = n, a.dom = o;
    var s = o.style;
    return s && (bR(o), o.onselectstart = function() {
      return !1;
    }, s.padding = "0", s.margin = "0", s.borderWidth = "0"), a.painter = r, a.dpr = i, a;
  }
  return e.prototype.getElementCount = function() {
    return this.__endIndex - this.__startIndex;
  }, e.prototype.afterBrush = function() {
    this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
  }, e.prototype.initContext = function() {
    this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  }, e.prototype.setUnpainted = function() {
    this.__firstTimePaint = !0;
  }, e.prototype.createBackBuffer = function() {
    var n = this.dpr;
    this.domBack = $V("back-" + this.id, this.painter, n), this.ctxBack = this.domBack.getContext("2d"), n !== 1 && this.ctxBack.scale(n, n);
  }, e.prototype.createRepaintRects = function(n, r, i, a) {
    if (this.__firstTimePaint)
      return this.__firstTimePaint = !1, null;
    var o = [], s = this.maxRepaintRectCount, l = !1, u = new Je(0, 0, 0, 0);
    function c(y) {
      if (!(!y.isFinite() || y.isZero()))
        if (o.length === 0) {
          var b = new Je(0, 0, 0, 0);
          b.copy(y), o.push(b);
        } else {
          for (var _ = !1, O = 1 / 0, S = 0, x = 0; x < o.length; ++x) {
            var C = o[x];
            if (C.intersect(y)) {
              var T = new Je(0, 0, 0, 0);
              T.copy(C), T.union(y), o[x] = T, _ = !0;
              break;
            } else if (l) {
              u.copy(y), u.union(C);
              var w = y.width * y.height, P = C.width * C.height, $ = u.width * u.height, A = $ - w - P;
              A < O && (O = A, S = x);
            }
          }
          if (l && (o[S].union(y), _ = !0), !_) {
            var b = new Je(0, 0, 0, 0);
            b.copy(y), o.push(b);
          }
          l || (l = o.length >= s);
        }
    }
    for (var f = this.__startIndex; f < this.__endIndex; ++f) {
      var d = n[f];
      if (d) {
        var h = d.shouldBePainted(i, a, !0, !0), p = d.__isRendered && (d.__dirty & ki || !h) ? d.getPrevPaintRect() : null;
        p && c(p);
        var v = h && (d.__dirty & ki || !d.__isRendered) ? d.getPaintRect() : null;
        v && c(v);
      }
    }
    for (var f = this.__prevStartIndex; f < this.__prevEndIndex; ++f) {
      var d = r[f], h = d && d.shouldBePainted(i, a, !0, !0);
      if (d && (!h || !d.__zr) && d.__isRendered) {
        var p = d.getPrevPaintRect();
        p && c(p);
      }
    }
    var g;
    do {
      g = !1;
      for (var f = 0; f < o.length; ) {
        if (o[f].isZero()) {
          o.splice(f, 1);
          continue;
        }
        for (var m = f + 1; m < o.length; )
          o[f].intersect(o[m]) ? (g = !0, o[f].union(o[m]), o.splice(m, 1)) : m++;
        f++;
      }
    } while (g);
    return this._paintRects = o, o;
  }, e.prototype.debugGetPaintRects = function() {
    return (this._paintRects || []).slice();
  }, e.prototype.resize = function(n, r) {
    var i = this.dpr, a = this.dom, o = a.style, s = this.domBack;
    o && (o.width = n + "px", o.height = r + "px"), a.width = n * i, a.height = r * i, s && (s.width = n * i, s.height = r * i, i !== 1 && this.ctxBack.scale(i, i));
  }, e.prototype.clear = function(n, r, i) {
    var a = this.dom, o = this.ctx, s = a.width, l = a.height;
    r = r || this.clearColor;
    var u = this.motionBlur && !n, c = this.lastFrameAlpha, f = this.dpr, d = this;
    u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(a, 0, 0, s / f, l / f));
    var h = this.domBack;
    function p(v, g, m, y) {
      if (o.clearRect(v, g, m, y), r && r !== "transparent") {
        var b = void 0;
        if (M0(r)) {
          var _ = r.global || r.__width === m && r.__height === y;
          b = _ && r.__canvasGradient || YA(o, r, {
            x: 0,
            y: 0,
            width: m,
            height: y
          }), r.__canvasGradient = b, r.__width = m, r.__height = y;
        } else Cq(r) && (r.scaleX = r.scaleX || f, r.scaleY = r.scaleY || f, b = qA(o, r, {
          dirty: function() {
            d.setUnpainted(), d.painter.refresh();
          }
        }));
        o.save(), o.fillStyle = b || r, o.fillRect(v, g, m, y), o.restore();
      }
      u && (o.save(), o.globalAlpha = c, o.drawImage(h, v, g, m, y), o.restore());
    }
    !i || u ? p(0, 0, s, l) : i.length && k(i, function(v) {
      p(v.x * f, v.y * f, v.width * f, v.height * f);
    });
  }, e;
}(Ra), AV = 1e5, sc = 314159, bb = 0.01, x3e = 1e-3;
function w3e(t) {
  return t ? t.__builtin__ ? !0 : !(typeof t.resize != "function" || typeof t.refresh != "function") : !1;
}
function C3e(t, e) {
  var n = document.createElement("div");
  return n.style.cssText = [
    "position:relative",
    "width:" + t + "px",
    "height:" + e + "px",
    "padding:0",
    "margin:0",
    "border-width:0"
  ].join(";") + ";", n;
}
var T3e = function() {
  function t(e, n, r, i) {
    this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
    var a = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
    this._opts = r = le({}, r || {}), this.dpr = r.devicePixelRatio || nO, this._singleCanvas = a, this.root = e;
    var o = e.style;
    o && (bR(e), e.innerHTML = ""), this.storage = n;
    var s = this._zlevelList;
    this._prevDisplayList = [];
    var l = this._layers;
    if (a) {
      var c = e, f = c.width, d = c.height;
      r.width != null && (f = r.width), r.height != null && (d = r.height), this.dpr = r.devicePixelRatio || 1, c.width = f * this.dpr, c.height = d * this.dpr, this._width = f, this._height = d;
      var h = new eP(c, this, this.dpr);
      h.__builtin__ = !0, h.initContext(), l[sc] = h, h.zlevel = sc, s.push(sc), this._domRoot = e;
    } else {
      this._width = Fd(e, 0, r), this._height = Fd(e, 1, r);
      var u = this._domRoot = C3e(this._width, this._height);
      e.appendChild(u);
    }
  }
  return t.prototype.getType = function() {
    return "canvas";
  }, t.prototype.isSingleCanvas = function() {
    return this._singleCanvas;
  }, t.prototype.getViewportRoot = function() {
    return this._domRoot;
  }, t.prototype.getViewportRootOffset = function() {
    var e = this.getViewportRoot();
    if (e)
      return {
        offsetLeft: e.offsetLeft || 0,
        offsetTop: e.offsetTop || 0
      };
  }, t.prototype.refresh = function(e) {
    var n = this.storage.getDisplayList(!0), r = this._prevDisplayList, i = this._zlevelList;
    this._redrawId = Math.random(), this._paintList(n, r, e, this._redrawId);
    for (var a = 0; a < i.length; a++) {
      var o = i[a], s = this._layers[o];
      if (!s.__builtin__ && s.refresh) {
        var l = a === 0 ? this._backgroundColor : null;
        s.refresh(l);
      }
    }
    return this._opts.useDirtyRect && (this._prevDisplayList = n.slice()), this;
  }, t.prototype.refreshHover = function() {
    this._paintHoverList(this.storage.getDisplayList(!1));
  }, t.prototype._paintHoverList = function(e) {
    var n = e.length, r = this._hoverlayer;
    if (r && r.clear(), !!n) {
      for (var i = {
        inHover: !0,
        viewWidth: this._width,
        viewHeight: this._height
      }, a, o = 0; o < n; o++) {
        var s = e[o];
        s.__inHover && (r || (r = this._hoverlayer = this.getLayer(AV)), a || (a = r.ctx, a.save()), Vc(a, s, i, o === n - 1));
      }
      a && a.restore();
    }
  }, t.prototype.getHoverLayer = function() {
    return this.getLayer(AV);
  }, t.prototype.paintOne = function(e, n) {
    dk(e, n);
  }, t.prototype._paintList = function(e, n, r, i) {
    if (this._redrawId === i) {
      r = r || !1, this._updateLayerStatus(e);
      var a = this._doPaintList(e, n, r), o = a.finished, s = a.needsRefreshHover;
      if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
        this.eachLayer(function(u) {
          u.afterBrush && u.afterBrush();
        });
      else {
        var l = this;
        Y1(function() {
          l._paintList(e, n, r, i);
        });
      }
    }
  }, t.prototype._compositeManually = function() {
    var e = this.getLayer(sc).ctx, n = this._domRoot.width, r = this._domRoot.height;
    e.clearRect(0, 0, n, r), this.eachBuiltinLayer(function(i) {
      i.virtual && e.drawImage(i.dom, 0, 0, n, r);
    });
  }, t.prototype._doPaintList = function(e, n, r) {
    for (var i = this, a = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
      var l = this._zlevelList[s], u = this._layers[l];
      u.__builtin__ && u !== this._hoverlayer && (u.__dirty || r) && a.push(u);
    }
    for (var c = !0, f = !1, d = function(v) {
      var g = a[v], m = g.ctx, y = o && g.createRepaintRects(e, n, h._width, h._height), b = r ? g.__startIndex : g.__drawIndex, _ = !r && g.incremental && Date.now, O = _ && Date.now(), S = g.zlevel === h._zlevelList[0] ? h._backgroundColor : null;
      if (g.__startIndex === g.__endIndex)
        g.clear(!1, S, y);
      else if (b === g.__startIndex) {
        var x = e[b];
        (!x.incremental || !x.notClear || r) && g.clear(!1, S, y);
      }
      b === -1 && (console.error("For some unknown reason. drawIndex is -1"), b = g.__startIndex);
      var C, T = function(A) {
        var D = {
          inHover: !1,
          allClipped: !1,
          prevEl: null,
          viewWidth: i._width,
          viewHeight: i._height
        };
        for (C = b; C < g.__endIndex; C++) {
          var E = e[C];
          if (E.__inHover && (f = !0), i._doPaintEl(E, g, o, A, D, C === g.__endIndex - 1), _) {
            var R = Date.now() - O;
            if (R > 15)
              break;
          }
        }
        D.prevElClipPaths && m.restore();
      };
      if (y)
        if (y.length === 0)
          C = g.__endIndex;
        else
          for (var w = h.dpr, P = 0; P < y.length; ++P) {
            var $ = y[P];
            m.save(), m.beginPath(), m.rect($.x * w, $.y * w, $.width * w, $.height * w), m.clip(), T($), m.restore();
          }
      else
        m.save(), T(), m.restore();
      g.__drawIndex = C, g.__drawIndex < g.__endIndex && (c = !1);
    }, h = this, p = 0; p < a.length; p++)
      d(p);
    return vt.wxa && k(this._layers, function(v) {
      v && v.ctx && v.ctx.draw && v.ctx.draw();
    }), {
      finished: c,
      needsRefreshHover: f
    };
  }, t.prototype._doPaintEl = function(e, n, r, i, a, o) {
    var s = n.ctx;
    if (r) {
      var l = e.getPaintRect();
      (!i || l && l.intersect(i)) && (Vc(s, e, a, o), e.setPrevPaintRect(l));
    } else
      Vc(s, e, a, o);
  }, t.prototype.getLayer = function(e, n) {
    this._singleCanvas && !this._needsManuallyCompositing && (e = sc);
    var r = this._layers[e];
    return r || (r = new eP("zr_" + e, this, this.dpr), r.zlevel = e, r.__builtin__ = !0, this._layerConfig[e] ? qe(r, this._layerConfig[e], !0) : this._layerConfig[e - bb] && qe(r, this._layerConfig[e - bb], !0), n && (r.virtual = n), this.insertLayer(e, r), r.initContext()), r;
  }, t.prototype.insertLayer = function(e, n) {
    var r = this._layers, i = this._zlevelList, a = i.length, o = this._domRoot, s = null, l = -1;
    if (r[e]) {
      process.env.NODE_ENV !== "production" && Oa("ZLevel " + e + " has been used already");
      return;
    }
    if (!w3e(n)) {
      process.env.NODE_ENV !== "production" && Oa("Layer of zlevel " + e + " is not valid");
      return;
    }
    if (a > 0 && e > i[0]) {
      for (l = 0; l < a - 1 && !(i[l] < e && i[l + 1] > e); l++)
        ;
      s = r[i[l]];
    }
    if (i.splice(l + 1, 0, e), r[e] = n, !n.virtual)
      if (s) {
        var u = s.dom;
        u.nextSibling ? o.insertBefore(n.dom, u.nextSibling) : o.appendChild(n.dom);
      } else
        o.firstChild ? o.insertBefore(n.dom, o.firstChild) : o.appendChild(n.dom);
    n.painter || (n.painter = this);
  }, t.prototype.eachLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i];
      e.call(n, this._layers[a], a);
    }
  }, t.prototype.eachBuiltinLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i], o = this._layers[a];
      o.__builtin__ && e.call(n, o, a);
    }
  }, t.prototype.eachOtherLayer = function(e, n) {
    for (var r = this._zlevelList, i = 0; i < r.length; i++) {
      var a = r[i], o = this._layers[a];
      o.__builtin__ || e.call(n, o, a);
    }
  }, t.prototype.getLayers = function() {
    return this._layers;
  }, t.prototype._updateLayerStatus = function(e) {
    this.eachBuiltinLayer(function(f, d) {
      f.__dirty = f.__used = !1;
    });
    function n(f) {
      a && (a.__endIndex !== f && (a.__dirty = !0), a.__endIndex = f);
    }
    if (this._singleCanvas)
      for (var r = 1; r < e.length; r++) {
        var i = e[r];
        if (i.zlevel !== e[r - 1].zlevel || i.incremental) {
          this._needsManuallyCompositing = !0;
          break;
        }
      }
    var a = null, o = 0, s, l;
    for (l = 0; l < e.length; l++) {
      var i = e[l], u = i.zlevel, c = void 0;
      s !== u && (s = u, o = 0), i.incremental ? (c = this.getLayer(u + x3e, this._needsManuallyCompositing), c.incremental = !0, o = 1) : c = this.getLayer(u + (o > 0 ? bb : 0), this._needsManuallyCompositing), c.__builtin__ || Oa("ZLevel " + u + " has been used by unkown layer " + c.id), c !== a && (c.__used = !0, c.__startIndex !== l && (c.__dirty = !0), c.__startIndex = l, c.incremental ? c.__drawIndex = -1 : c.__drawIndex = l, n(l), a = c), i.__dirty & ki && !i.__inHover && (c.__dirty = !0, c.incremental && c.__drawIndex < 0 && (c.__drawIndex = l));
    }
    n(l), this.eachBuiltinLayer(function(f, d) {
      !f.__used && f.getElementCount() > 0 && (f.__dirty = !0, f.__startIndex = f.__endIndex = f.__drawIndex = 0), f.__dirty && f.__drawIndex < 0 && (f.__drawIndex = f.__startIndex);
    });
  }, t.prototype.clear = function() {
    return this.eachBuiltinLayer(this._clearLayer), this;
  }, t.prototype._clearLayer = function(e) {
    e.clear();
  }, t.prototype.setBackgroundColor = function(e) {
    this._backgroundColor = e, k(this._layers, function(n) {
      n.setUnpainted();
    });
  }, t.prototype.configLayer = function(e, n) {
    if (n) {
      var r = this._layerConfig;
      r[e] ? qe(r[e], n, !0) : r[e] = n;
      for (var i = 0; i < this._zlevelList.length; i++) {
        var a = this._zlevelList[i];
        if (a === e || a === e + bb) {
          var o = this._layers[a];
          qe(o, r[e], !0);
        }
      }
    }
  }, t.prototype.delLayer = function(e) {
    var n = this._layers, r = this._zlevelList, i = n[e];
    i && (i.dom.parentNode.removeChild(i.dom), delete n[e], r.splice(et(r, e), 1));
  }, t.prototype.resize = function(e, n) {
    if (this._domRoot.style) {
      var r = this._domRoot;
      r.style.display = "none";
      var i = this._opts, a = this.root;
      if (e != null && (i.width = e), n != null && (i.height = n), e = Fd(a, 0, i), n = Fd(a, 1, i), r.style.display = "", this._width !== e || n !== this._height) {
        r.style.width = e + "px", r.style.height = n + "px";
        for (var o in this._layers)
          this._layers.hasOwnProperty(o) && this._layers[o].resize(e, n);
        this.refresh(!0);
      }
      this._width = e, this._height = n;
    } else {
      if (e == null || n == null)
        return;
      this._width = e, this._height = n, this.getLayer(sc).resize(e, n);
    }
    return this;
  }, t.prototype.clearLayer = function(e) {
    var n = this._layers[e];
    n && n.clear();
  }, t.prototype.dispose = function() {
    this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  }, t.prototype.getRenderedCanvas = function(e) {
    if (e = e || {}, this._singleCanvas && !this._compositeManually)
      return this._layers[sc].dom;
    var n = new eP("image", this, e.pixelRatio || this.dpr);
    n.initContext(), n.clear(!1, e.backgroundColor || this._backgroundColor);
    var r = n.ctx;
    if (e.pixelRatio <= this.dpr) {
      this.refresh();
      var i = n.dom.width, a = n.dom.height;
      this.eachLayer(function(f) {
        f.__builtin__ ? r.drawImage(f.dom, 0, 0, i, a) : f.renderToCanvas && (r.save(), f.renderToCanvas(r), r.restore());
      });
    } else
      for (var o = {
        inHover: !1,
        viewWidth: this._width,
        viewHeight: this._height
      }, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
        var c = s[l];
        Vc(r, c, o, l === u - 1);
      }
    return n.dom;
  }, t.prototype.getWidth = function() {
    return this._width;
  }, t.prototype.getHeight = function() {
    return this._height;
  }, t;
}();
function P3e(t) {
  t.registerPainter("canvas", T3e);
}
var $3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n) {
      if (process.env.NODE_ENV !== "production") {
        var r = n.coordinateSystem;
        if (r !== "polar" && r !== "cartesian2d")
          throw new Error("Line not support coordinateSystem besides cartesian and polar");
      }
      return us(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getLegendIcon = function(n) {
      var r = new Ve(), i = $n("line", 0, n.itemHeight / 2, n.itemWidth, 0, n.lineStyle.stroke, !1);
      r.add(i), i.setStyle(n.lineStyle);
      var a = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = a === "none" ? "circle" : a, l = n.itemHeight * 0.8, u = $n(s, (n.itemWidth - l) / 2, (n.itemHeight - l) / 2, l, l, n.itemStyle.fill);
      r.add(u), u.setStyle(n.itemStyle);
      var c = n.iconRotate === "inherit" ? o : n.iconRotate || 0;
      return u.rotation = c * Math.PI / 180, u.setOrigin([n.itemWidth / 2, n.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), r;
    }, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
      // zlevel: 0,
      z: 3,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      clip: !0,
      label: {
        position: "top"
      },
      // itemStyle: {
      // },
      endLabel: {
        show: !1,
        valueAnimation: !0,
        distance: 8
      },
      lineStyle: {
        width: 2,
        type: "solid"
      },
      emphasis: {
        scale: !0
      },
      // areaStyle: {
      // origin of areaStyle. Valid values:
      // `'auto'/null/undefined`: from axisLine to data
      // `'start'`: from min to data
      // `'end'`: from data to max
      // origin: 'auto'
      // },
      // false, 'start', 'end', 'middle'
      step: !1,
      // Disabled if step is true
      smooth: !1,
      smoothMonotone: null,
      symbol: "emptyCircle",
      symbolSize: 4,
      symbolRotate: null,
      showSymbol: !0,
      // `false`: follow the label interval strategy.
      // `true`: show all symbols.
      // `'auto'`: If possible, show all symbols, otherwise
      //           follow the label interval strategy.
      showAllSymbol: "auto",
      // Whether to connect break point.
      connectNulls: !1,
      // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.
      sampling: "none",
      animationEasing: "linear",
      // Disable progressive
      progressive: 0,
      hoverLayerThreshold: 1 / 0,
      universalTransition: {
        divideShape: "clone"
      },
      triggerLineEvent: !1
    }, e;
  }(Ht)
);
function Wh(t, e) {
  var n = t.mapDimensionsAll("defaultedLabel"), r = n.length;
  if (r === 1) {
    var i = Vh(t, e, n[0]);
    return i != null ? i + "" : null;
  } else if (r) {
    for (var a = [], o = 0; o < n.length; o++)
      a.push(Vh(t, e, n[o]));
    return a.join(" ");
  }
}
function Lte(t, e) {
  var n = t.mapDimensionsAll("defaultedLabel");
  if (!ue(e))
    return e + "";
  for (var r = [], i = 0; i < n.length; i++) {
    var a = t.getDimensionIndex(n[i]);
    a >= 0 && r.push(e[a]);
  }
  return r.join(" ");
}
var j0 = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a) {
      var o = t.call(this) || this;
      return o.updateData(n, r, i, a), o;
    }
    return e.prototype._createSymbol = function(n, r, i, a, o) {
      this.removeAll();
      var s = $n(n, -1, -1, 2, 2, null, o);
      s.attr({
        z2: 100,
        culling: !0,
        scaleX: a[0] / 2,
        scaleY: a[1] / 2
      }), s.drift = A3e, this._symbolType = n, this.add(s);
    }, e.prototype.stopSymbolAnimation = function(n) {
      this.childAt(0).stopAnimation(null, n);
    }, e.prototype.getSymbolType = function() {
      return this._symbolType;
    }, e.prototype.getSymbolPath = function() {
      return this.childAt(0);
    }, e.prototype.highlight = function() {
      js(this.childAt(0));
    }, e.prototype.downplay = function() {
      Zs(this.childAt(0));
    }, e.prototype.setZ = function(n, r) {
      var i = this.childAt(0);
      i.zlevel = n, i.z = r;
    }, e.prototype.setDraggable = function(n, r) {
      var i = this.childAt(0);
      i.draggable = n, i.cursor = !r && n ? "move" : i.cursor;
    }, e.prototype.updateData = function(n, r, i, a) {
      this.silent = !1;
      var o = n.getItemVisual(r, "symbol") || "circle", s = n.hostModel, l = e.getSymbolSize(n, r), u = o !== this._symbolType, c = a && a.disableAnimation;
      if (u) {
        var f = n.getItemVisual(r, "symbolKeepAspect");
        this._createSymbol(o, n, r, l, f);
      } else {
        var d = this.childAt(0);
        d.silent = !1;
        var h = {
          scaleX: l[0] / 2,
          scaleY: l[1] / 2
        };
        c ? d.attr(h) : Ct(d, h, s, r), so(d);
      }
      if (this._updateCommon(n, r, l, i, a), u) {
        var d = this.childAt(0);
        if (!c) {
          var h = {
            scaleX: this._sizeX,
            scaleY: this._sizeY,
            style: {
              // Always fadeIn. Because it has fadeOut animation when symbol is removed..
              opacity: d.style.opacity
            }
          };
          d.scaleX = d.scaleY = 0, d.style.opacity = 0, Yt(d, h, s, r);
        }
      }
      c && this.childAt(0).stopAnimation("leave");
    }, e.prototype._updateCommon = function(n, r, i, a, o) {
      var s = this.childAt(0), l = n.hostModel, u, c, f, d, h, p, v, g, m;
      if (a && (u = a.emphasisItemStyle, c = a.blurItemStyle, f = a.selectItemStyle, d = a.focus, h = a.blurScope, v = a.labelStatesModels, g = a.hoverScale, m = a.cursorStyle, p = a.emphasisDisabled), !a || n.hasItemOption) {
        var y = a && a.itemModel ? a.itemModel : n.getItemModel(r), b = y.getModel("emphasis");
        u = b.getModel("itemStyle").getItemStyle(), f = y.getModel(["select", "itemStyle"]).getItemStyle(), c = y.getModel(["blur", "itemStyle"]).getItemStyle(), d = b.get("focus"), h = b.get("blurScope"), p = b.get("disabled"), v = er(y), g = b.getShallow("scale"), m = y.getShallow("cursor");
      }
      var _ = n.getItemVisual(r, "symbolRotate");
      s.attr("rotation", (_ || 0) * Math.PI / 180 || 0);
      var O = Vf(n.getItemVisual(r, "symbolOffset"), i);
      O && (s.x = O[0], s.y = O[1]), m && s.attr("cursor", m);
      var S = n.getItemVisual(r, "style"), x = S.fill;
      if (s instanceof lr) {
        var C = s.style;
        s.useStyle(le({
          // TODO other properties like x, y ?
          image: C.image,
          x: C.x,
          y: C.y,
          width: C.width,
          height: C.height
        }, S));
      } else
        s.__isEmptyBrush ? s.useStyle(le({}, S)) : s.useStyle(S), s.style.decal = null, s.setColor(x, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
      var T = n.getItemVisual(r, "liftZ"), w = this._z2;
      T != null ? w == null && (this._z2 = s.z2, s.z2 += T) : w != null && (s.z2 = w, this._z2 = null);
      var P = o && o.useNameLabel;
      Pr(s, v, {
        labelFetcher: l,
        labelDataIndex: r,
        defaultText: $,
        inheritColor: x,
        defaultOpacity: S.opacity
      });
      function $(E) {
        return P ? n.getName(E) : Wh(n, E);
      }
      this._sizeX = i[0] / 2, this._sizeY = i[1] / 2;
      var A = s.ensureState("emphasis");
      A.style = u, s.ensureState("select").style = f, s.ensureState("blur").style = c;
      var D = g == null || g === !0 ? Math.max(1.1, 3 / this._sizeY) : isFinite(g) && g > 0 ? +g : 1;
      A.scaleX = this._sizeX * D, A.scaleY = this._sizeY * D, this.setSymbolScale(1), bn(this, d, h, p);
    }, e.prototype.setSymbolScale = function(n) {
      this.scaleX = this.scaleY = n;
    }, e.prototype.fadeOut = function(n, r, i) {
      var a = this.childAt(0), o = Fe(this).dataIndex, s = i && i.animation;
      if (this.silent = a.silent = !0, i && i.fadeLabel) {
        var l = a.getTextContent();
        l && uu(l, {
          style: {
            opacity: 0
          }
        }, r, {
          dataIndex: o,
          removeOpt: s,
          cb: function() {
            a.removeTextContent();
          }
        });
      } else
        a.removeTextContent();
      uu(a, {
        style: {
          opacity: 0
        },
        scaleX: 0,
        scaleY: 0
      }, r, {
        dataIndex: o,
        cb: n,
        removeOpt: s
      });
    }, e.getSymbolSize = function(n, r) {
      return xp(n.getItemVisual(r, "symbolSize"));
    }, e;
  }(Ve)
);
function A3e(t, e) {
  this.parent.drift(t, e);
}
function tP(t, e, n, r) {
  return e && !isNaN(e[0]) && !isNaN(e[1]) && !(r.isIgnore && r.isIgnore(n)) && !(r.clipShape && !r.clipShape.contain(e[0], e[1])) && t.getItemVisual(n, "symbol") !== "none";
}
function EV(t) {
  return t != null && !Ie(t) && (t = {
    isIgnore: t
  }), t || {};
}
function MV(t) {
  var e = t.hostModel, n = e.getModel("emphasis");
  return {
    emphasisItemStyle: n.getModel("itemStyle").getItemStyle(),
    blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
    selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
    focus: n.get("focus"),
    blurScope: n.get("blurScope"),
    emphasisDisabled: n.get("disabled"),
    hoverScale: n.get("scale"),
    labelStatesModels: er(e),
    cursorStyle: e.get("cursor")
  };
}
var Z0 = (
  /** @class */
  function() {
    function t(e) {
      this.group = new Ve(), this._SymbolCtor = e || j0;
    }
    return t.prototype.updateData = function(e, n) {
      this._progressiveEls = null, n = EV(n);
      var r = this.group, i = e.hostModel, a = this._data, o = this._SymbolCtor, s = n.disableAnimation, l = MV(e), u = {
        disableAnimation: s
      }, c = n.getSymbolPoint || function(f) {
        return e.getItemLayout(f);
      };
      a || r.removeAll(), e.diff(a).add(function(f) {
        var d = c(f);
        if (tP(e, d, f, n)) {
          var h = new o(e, f, l, u);
          h.setPosition(d), e.setItemGraphicEl(f, h), r.add(h);
        }
      }).update(function(f, d) {
        var h = a.getItemGraphicEl(d), p = c(f);
        if (!tP(e, p, f, n)) {
          r.remove(h);
          return;
        }
        var v = e.getItemVisual(f, "symbol") || "circle", g = h && h.getSymbolType && h.getSymbolType();
        if (!h || g && g !== v)
          r.remove(h), h = new o(e, f, l, u), h.setPosition(p);
        else {
          h.updateData(e, f, l, u);
          var m = {
            x: p[0],
            y: p[1]
          };
          s ? h.attr(m) : Ct(h, m, i);
        }
        r.add(h), e.setItemGraphicEl(f, h);
      }).remove(function(f) {
        var d = a.getItemGraphicEl(f);
        d && d.fadeOut(function() {
          r.remove(d);
        }, i);
      }).execute(), this._getSymbolPoint = c, this._data = e;
    }, t.prototype.updateLayout = function() {
      var e = this, n = this._data;
      n && n.eachItemGraphicEl(function(r, i) {
        var a = e._getSymbolPoint(i);
        r.setPosition(a), r.markRedraw();
      });
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = MV(e), this._data = null, this.group.removeAll();
    }, t.prototype.incrementalUpdate = function(e, n, r) {
      this._progressiveEls = [], r = EV(r);
      function i(l) {
        l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
      }
      for (var a = e.start; a < e.end; a++) {
        var o = n.getItemLayout(a);
        if (tP(n, o, a, r)) {
          var s = new this._SymbolCtor(n, a, this._seriesScope);
          s.traverse(i), s.setPosition(o), this.group.add(s), n.setItemGraphicEl(a, s), this._progressiveEls.push(s);
        }
      }
    }, t.prototype.eachRendered = function(e) {
      Tu(this._progressiveEls || this.group, e);
    }, t.prototype.remove = function(e) {
      var n = this.group, r = this._data;
      r && e ? r.eachItemGraphicEl(function(i) {
        i.fadeOut(function() {
          n.remove(i);
        }, r.hostModel);
      }) : n.removeAll();
    }, t;
  }()
);
function Nte(t, e, n) {
  var r = t.getBaseAxis(), i = t.getOtherAxis(r), a = E3e(i, n), o = r.dim, s = i.dim, l = e.mapDimension(s), u = e.mapDimension(o), c = s === "x" || s === "radius" ? 1 : 0, f = ce(t.dimensions, function(p) {
    return e.mapDimension(p);
  }), d = !1, h = e.getCalculationInfo("stackResultDimension");
  return Xs(
    e,
    f[0]
    /* , dims[1] */
  ) && (d = !0, f[0] = h), Xs(
    e,
    f[1]
    /* , dims[0] */
  ) && (d = !0, f[1] = h), {
    dataDimsForPoint: f,
    valueStart: a,
    valueAxisDim: s,
    baseAxisDim: o,
    stacked: !!d,
    valueDim: l,
    baseDim: u,
    baseDataOffset: c,
    stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  };
}
function E3e(t, e) {
  var n = 0, r = t.scale.getExtent();
  return e === "start" ? n = r[0] : e === "end" ? n = r[1] : St(e) && !isNaN(e) ? n = e : r[0] > 0 ? n = r[0] : r[1] < 0 && (n = r[1]), n;
}
function Bte(t, e, n, r) {
  var i = NaN;
  t.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = t.valueStart);
  var a = t.baseDataOffset, o = [];
  return o[a] = n.get(t.baseDim, r), o[1 - a] = i, e.dataToPoint(o);
}
function M3e(t, e) {
  var n = [];
  return e.diff(t).add(function(r) {
    n.push({
      cmd: "+",
      idx: r
    });
  }).update(function(r, i) {
    n.push({
      cmd: "=",
      idx: i,
      idx1: r
    });
  }).remove(function(r) {
    n.push({
      cmd: "-",
      idx: r
    });
  }).execute(), n;
}
function I3e(t, e, n, r, i, a, o, s) {
  for (var l = M3e(t, e), u = [], c = [], f = [], d = [], h = [], p = [], v = [], g = Nte(i, e, o), m = t.getLayout("points") || [], y = e.getLayout("points") || [], b = 0; b < l.length; b++) {
    var _ = l[b], O = !0, S = void 0, x = void 0;
    switch (_.cmd) {
      case "=":
        S = _.idx * 2, x = _.idx1 * 2;
        var C = m[S], T = m[S + 1], w = y[x], P = y[x + 1];
        (isNaN(C) || isNaN(T)) && (C = w, T = P), u.push(C, T), c.push(w, P), f.push(n[S], n[S + 1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex(_.idx1));
        break;
      case "+":
        var $ = _.idx, A = g.dataDimsForPoint, D = i.dataToPoint([e.get(A[0], $), e.get(A[1], $)]);
        x = $ * 2, u.push(D[0], D[1]), c.push(y[x], y[x + 1]);
        var E = Bte(g, i, e, $);
        f.push(E[0], E[1]), d.push(r[x], r[x + 1]), v.push(e.getRawIndex($));
        break;
      case "-":
        O = !1;
    }
    O && (h.push(_), p.push(p.length));
  }
  p.sort(function(ee, oe) {
    return v[ee] - v[oe];
  });
  for (var R = u.length, N = Fo(R), V = Fo(R), z = Fo(R), W = Fo(R), F = [], b = 0; b < p.length; b++) {
    var Q = p[b], Z = b * 2, ne = Q * 2;
    N[Z] = u[ne], N[Z + 1] = u[ne + 1], V[Z] = c[ne], V[Z + 1] = c[ne + 1], z[Z] = f[ne], z[Z + 1] = f[ne + 1], W[Z] = d[ne], W[Z + 1] = d[ne + 1], F[b] = h[Q];
  }
  return {
    current: N,
    next: V,
    stackedOnCurrent: z,
    stackedOnNext: W,
    status: F
  };
}
var ml = Math.min, yl = Math.max;
function nf(t, e) {
  return isNaN(t) || isNaN(e);
}
function lE(t, e, n, r, i, a, o, s, l) {
  for (var u, c, f, d, h, p, v = n, g = 0; g < r; g++) {
    var m = e[v * 2], y = e[v * 2 + 1];
    if (v >= i || v < 0)
      break;
    if (nf(m, y)) {
      if (l) {
        v += a;
        continue;
      }
      break;
    }
    if (v === n)
      t[a > 0 ? "moveTo" : "lineTo"](m, y), f = m, d = y;
    else {
      var b = m - u, _ = y - c;
      if (b * b + _ * _ < 0.5) {
        v += a;
        continue;
      }
      if (o > 0) {
        for (var O = v + a, S = e[O * 2], x = e[O * 2 + 1]; S === m && x === y && g < r; )
          g++, O += a, v += a, S = e[O * 2], x = e[O * 2 + 1], m = e[v * 2], y = e[v * 2 + 1], b = m - u, _ = y - c;
        var C = g + 1;
        if (l)
          for (; nf(S, x) && C < r; )
            C++, O += a, S = e[O * 2], x = e[O * 2 + 1];
        var T = 0.5, w = 0, P = 0, $ = void 0, A = void 0;
        if (C >= r || nf(S, x))
          h = m, p = y;
        else {
          w = S - u, P = x - c;
          var D = m - u, E = S - m, R = y - c, N = x - y, V = void 0, z = void 0;
          if (s === "x") {
            V = Math.abs(D), z = Math.abs(E);
            var W = w > 0 ? 1 : -1;
            h = m - W * V * o, p = y, $ = m + W * z * o, A = y;
          } else if (s === "y") {
            V = Math.abs(R), z = Math.abs(N);
            var F = P > 0 ? 1 : -1;
            h = m, p = y - F * V * o, $ = m, A = y + F * z * o;
          } else
            V = Math.sqrt(D * D + R * R), z = Math.sqrt(E * E + N * N), T = z / (z + V), h = m - w * o * (1 - T), p = y - P * o * (1 - T), $ = m + w * o * T, A = y + P * o * T, $ = ml($, yl(S, m)), A = ml(A, yl(x, y)), $ = yl($, ml(S, m)), A = yl(A, ml(x, y)), w = $ - m, P = A - y, h = m - w * V / z, p = y - P * V / z, h = ml(h, yl(u, m)), p = ml(p, yl(c, y)), h = yl(h, ml(u, m)), p = yl(p, ml(c, y)), w = m - h, P = y - p, $ = m + w * z / V, A = y + P * z / V;
        }
        t.bezierCurveTo(f, d, h, p, m, y), f = $, d = A;
      } else
        t.lineTo(m, y);
    }
    u = m, c = y, v += a;
  }
  return g;
}
var zte = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.smooth = 0, this.smoothConstraint = !0;
    }
    return t;
  }()
), D3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-polyline", r;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new zte();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = 0, o = i.length / 2;
      if (r.connectNulls) {
        for (; o > 0 && nf(i[o * 2 - 2], i[o * 2 - 1]); o--)
          ;
        for (; a < o && nf(i[a * 2], i[a * 2 + 1]); a++)
          ;
      }
      for (; a < o; )
        a += lE(n, i, a, o, o, 1, r.smooth, r.smoothMonotone, r.connectNulls) + 1;
    }, e.prototype.getPointOn = function(n, r) {
      this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
      for (var i = this.path, a = i.data, o = as.CMD, s, l, u = r === "x", c = [], f = 0; f < a.length; ) {
        var d = a[f++], h = void 0, p = void 0, v = void 0, g = void 0, m = void 0, y = void 0, b = void 0;
        switch (d) {
          case o.M:
            s = a[f++], l = a[f++];
            break;
          case o.L:
            if (h = a[f++], p = a[f++], b = u ? (n - s) / (h - s) : (n - l) / (p - l), b <= 1 && b >= 0) {
              var _ = u ? (p - l) * b + l : (h - s) * b + s;
              return u ? [n, _] : [_, n];
            }
            s = h, l = p;
            break;
          case o.C:
            h = a[f++], p = a[f++], v = a[f++], g = a[f++], m = a[f++], y = a[f++];
            var O = u ? K1(s, h, v, m, n, c) : K1(l, p, g, y, n, c);
            if (O > 0)
              for (var S = 0; S < O; S++) {
                var x = c[S];
                if (x <= 1 && x >= 0) {
                  var _ = u ? Gn(l, p, g, y, x) : Gn(s, h, v, m, x);
                  return u ? [n, _] : [_, n];
                }
              }
            s = m, l = y;
            break;
        }
      }
    }, e;
  }(ot)
), R3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e;
  }(zte)
), Vte = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-polygon", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new R3e();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = r.stackedOnPoints, o = 0, s = i.length / 2, l = r.smoothMonotone;
      if (r.connectNulls) {
        for (; s > 0 && nf(i[s * 2 - 2], i[s * 2 - 1]); s--)
          ;
        for (; o < s && nf(i[o * 2], i[o * 2 + 1]); o++)
          ;
      }
      for (; o < s; ) {
        var u = lE(n, i, o, s, s, 1, r.smooth, l, r.connectNulls);
        lE(n, a, o + u - 1, u, s, -1, r.stackedOnSmooth, l, r.connectNulls), o += u + 1, n.closePath();
      }
    }, e;
  }(ot)
);
function Fte(t, e, n, r, i) {
  var a = t.getArea(), o = a.x, s = a.y, l = a.width, u = a.height, c = n.get(["lineStyle", "width"]) || 2;
  o -= c / 2, s -= c / 2, l += c, u += c, l = Math.ceil(l), o !== Math.floor(o) && (o = Math.floor(o), l++);
  var f = new mt({
    shape: {
      x: o,
      y: s,
      width: l,
      height: u
    }
  });
  if (e) {
    var d = t.getBaseAxis(), h = d.isHorizontal(), p = d.inverse;
    h ? (p && (f.shape.x += l), f.shape.width = 0) : (p || (f.shape.y += u), f.shape.height = 0);
    var v = Me(i) ? function(g) {
      i(g, f);
    } : null;
    Yt(f, {
      shape: {
        width: l,
        height: u,
        x: o,
        y: s
      }
    }, n, null, r, v);
  }
  return f;
}
function Wte(t, e, n) {
  var r = t.getArea(), i = mn(r.r0, 1), a = mn(r.r, 1), o = new ri({
    shape: {
      cx: mn(t.cx, 1),
      cy: mn(t.cy, 1),
      r0: i,
      r: a,
      startAngle: r.startAngle,
      endAngle: r.endAngle,
      clockwise: r.clockwise
    }
  });
  if (e) {
    var s = t.getBaseAxis().dim === "angle";
    s ? o.shape.endAngle = r.startAngle : o.shape.r = i, Yt(o, {
      shape: {
        endAngle: r.endAngle,
        r: a
      }
    }, n);
  }
  return o;
}
function U0(t, e, n, r, i) {
  if (t) {
    if (t.type === "polar")
      return Wte(t, e, n);
    if (t.type === "cartesian2d")
      return Fte(t, e, n, r, i);
  } else return null;
  return null;
}
function Ff(t, e) {
  return t.type === e;
}
function IV(t, e) {
  if (t.length === e.length) {
    for (var n = 0; n < t.length; n++)
      if (t[n] !== e[n])
        return;
    return !0;
  }
}
function DV(t) {
  for (var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = 0; a < t.length; ) {
    var o = t[a++], s = t[a++];
    isNaN(o) || (e = Math.min(o, e), r = Math.max(o, r)), isNaN(s) || (n = Math.min(s, n), i = Math.max(s, i));
  }
  return [[e, n], [r, i]];
}
function RV(t, e) {
  var n = DV(t), r = n[0], i = n[1], a = DV(e), o = a[0], s = a[1];
  return Math.max(Math.abs(r[0] - o[0]), Math.abs(r[1] - o[1]), Math.abs(i[0] - s[0]), Math.abs(i[1] - s[1]));
}
function kV(t) {
  return St(t) ? t : t ? 0.5 : 0;
}
function k3e(t, e, n) {
  if (!n.valueDim)
    return [];
  for (var r = e.count(), i = Fo(r * 2), a = 0; a < r; a++) {
    var o = Bte(n, t, e, a);
    i[a * 2] = o[0], i[a * 2 + 1] = o[1];
  }
  return i;
}
function bl(t, e, n, r) {
  var i = e.getBaseAxis(), a = i.dim === "x" || i.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], c = [], f = [];
  if (r) {
    for (s = 0; s < t.length; s += 2)
      !isNaN(t[s]) && !isNaN(t[s + 1]) && f.push(t[s], t[s + 1]);
    t = f;
  }
  for (s = 0; s < t.length - 2; s += 2)
    switch (c[0] = t[s + 2], c[1] = t[s + 3], u[0] = t[s], u[1] = t[s + 1], o.push(u[0], u[1]), n) {
      case "end":
        l[a] = c[a], l[1 - a] = u[1 - a], o.push(l[0], l[1]);
        break;
      case "middle":
        var d = (u[a] + c[a]) / 2, h = [];
        l[a] = h[a] = d, l[1 - a] = u[1 - a], h[1 - a] = c[1 - a], o.push(l[0], l[1]), o.push(h[0], h[1]);
        break;
      default:
        l[a] = u[a], l[1 - a] = c[1 - a], o.push(l[0], l[1]);
    }
  return o.push(t[s++], t[s++]), o;
}
function L3e(t, e) {
  var n = [], r = t.length, i, a;
  function o(c, f, d) {
    var h = c.coord, p = (d - h) / (f.coord - h), v = xR(p, [c.color, f.color]);
    return {
      coord: d,
      color: v
    };
  }
  for (var s = 0; s < r; s++) {
    var l = t[s], u = l.coord;
    if (u < 0)
      i = l;
    else if (u > e) {
      a ? n.push(o(a, l, e)) : i && n.push(o(i, l, 0), o(i, l, e));
      break;
    } else
      i && (n.push(o(i, l, 0)), i = null), n.push(l), a = l;
  }
  return n;
}
function N3e(t, e, n) {
  var r = t.getVisual("visualMeta");
  if (!(!r || !r.length || !t.count())) {
    if (e.type !== "cartesian2d") {
      process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
      return;
    }
    for (var i, a, o = r.length - 1; o >= 0; o--) {
      var s = t.getDimensionInfo(r[o].dimension);
      if (i = s && s.coordDim, i === "x" || i === "y") {
        a = r[o];
        break;
      }
    }
    if (!a) {
      process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
      return;
    }
    var l = e.getAxis(i), u = ce(a.stops, function(b) {
      return {
        coord: l.toGlobalCoord(l.dataToCoord(b.value)),
        color: b.color
      };
    }), c = u.length, f = a.outerColors.slice();
    c && u[0].coord > u[c - 1].coord && (u.reverse(), f.reverse());
    var d = L3e(u, i === "x" ? n.getWidth() : n.getHeight()), h = d.length;
    if (!h && c)
      return u[0].coord < 0 ? f[1] ? f[1] : u[c - 1].color : f[0] ? f[0] : u[0].color;
    var p = 10, v = d[0].coord - p, g = d[h - 1].coord + p, m = g - v;
    if (m < 1e-3)
      return "transparent";
    k(d, function(b) {
      b.offset = (b.coord - v) / m;
    }), d.push({
      // NOTE: inRangeStopLen may still be 0 if stoplen is zero.
      offset: h ? d[h - 1].offset : 0.5,
      color: f[1] || "transparent"
    }), d.unshift({
      offset: h ? d[0].offset : 0.5,
      color: f[0] || "transparent"
    });
    var y = new hp(0, 0, 0, 0, d, !0);
    return y[i] = v, y[i + "2"] = g, y;
  }
}
function B3e(t, e, n) {
  var r = t.get("showAllSymbol"), i = r === "auto";
  if (!(r && !i)) {
    var a = n.getAxesByScale("ordinal")[0];
    if (a && !(i && z3e(a, e))) {
      var o = e.mapDimension(a.dim), s = {};
      return k(a.getViewLabels(), function(l) {
        var u = a.scale.getRawOrdinalNumber(l.tickValue);
        s[u] = 1;
      }), function(l) {
        return !s.hasOwnProperty(e.get(o, l));
      };
    }
  }
}
function z3e(t, e) {
  var n = t.getExtent(), r = Math.abs(n[1] - n[0]) / t.scale.count();
  isNaN(r) && (r = 0);
  for (var i = e.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a)
    if (j0.getSymbolSize(
      e,
      o
      // Only for cartesian, where `isHorizontal` exists.
    )[t.isHorizontal() ? 1 : 0] * 1.5 > r)
      return !1;
  return !0;
}
function V3e(t, e) {
  return isNaN(t) || isNaN(e);
}
function F3e(t) {
  for (var e = t.length / 2; e > 0 && V3e(t[e * 2 - 2], t[e * 2 - 1]); e--)
    ;
  return e - 1;
}
function LV(t, e) {
  return [t[e * 2], t[e * 2 + 1]];
}
function W3e(t, e, n) {
  for (var r = t.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, l = -1, u = 0; u < r; u++)
    if (o = t[u * 2 + i], !(isNaN(o) || isNaN(t[u * 2 + 1 - i]))) {
      if (u === 0) {
        a = o;
        continue;
      }
      if (a <= e && o >= e || a >= e && o <= e) {
        l = u;
        break;
      }
      s = u, a = o;
    }
  return {
    range: [s, l],
    t: (e - a) / (o - a)
  };
}
function Qte(t) {
  if (t.get(["endLabel", "show"]))
    return !0;
  for (var e = 0; e < ni.length; e++)
    if (t.get([ni[e], "endLabel", "show"]))
      return !0;
  return !1;
}
function nP(t, e, n, r) {
  if (Ff(e, "cartesian2d")) {
    var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = {
      lastFrameIndex: 0
    }, l = Qte(r) ? function(h, p) {
      t._endLabelOnDuring(h, p, o, s, a, i, e);
    } : null, u = e.getBaseAxis().isHorizontal(), c = Fte(e, n, r, function() {
      var h = t._endLabel;
      h && n && s.originalX != null && h.attr({
        x: s.originalX,
        y: s.originalY
      });
    }, l);
    if (!r.get("clip", !0)) {
      var f = c.shape, d = Math.max(f.width, f.height);
      u ? (f.y -= d, f.height += d * 2) : (f.x -= d, f.width += d * 2);
    }
    return l && l(1, c), c;
  } else
    return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), Wte(e, n, r);
}
function Q3e(t, e) {
  var n = e.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
  return {
    normal: {
      align: t.get("align") || a,
      verticalAlign: t.get("verticalAlign") || o
    }
  };
}
var H3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function() {
      var n = new Ve(), r = new Z0();
      this.group.add(r.group), this._symbolDraw = r, this._lineGroup = n;
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = n.coordinateSystem, s = this.group, l = n.getData(), u = n.getModel("lineStyle"), c = n.getModel("areaStyle"), f = l.getLayout("points") || [], d = o.type === "polar", h = this._coordSys, p = this._symbolDraw, v = this._polyline, g = this._polygon, m = this._lineGroup, y = !r.ssr && n.get("animation"), b = !c.isEmpty(), _ = c.get("origin"), O = Nte(o, l, _), S = b && k3e(o, l, O), x = n.get("showSymbol"), C = n.get("connectNulls"), T = x && !d && B3e(n, l, o), w = this._data;
      w && w.eachItemGraphicEl(function(oe, K) {
        oe.__temp && (s.remove(oe), w.setItemGraphicEl(K, null));
      }), x || p.remove(), s.add(m);
      var P = d ? !1 : n.get("step"), $;
      o && o.getArea && n.get("clip", !0) && ($ = o.getArea(), $.width != null ? ($.x -= 0.1, $.y -= 0.1, $.width += 0.2, $.height += 0.2) : $.r0 && ($.r0 -= 0.5, $.r += 0.5)), this._clipShapeForSymbol = $;
      var A = N3e(l, o, i) || l.getVisual("style")[l.getVisual("drawType")];
      if (!(v && h.type === o.type && P === this._step))
        x && p.updateData(l, {
          isIgnore: T,
          clipShape: $,
          disableAnimation: !0,
          getSymbolPoint: function(oe) {
            return [f[oe * 2], f[oe * 2 + 1]];
          }
        }), y && this._initSymbolLabelAnimation(l, o, $), P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v = this._newPolyline(f), b ? g = this._newPolygon(f, S) : g && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, _f(A)), m.setClipPath(nP(this, o, !0, n));
      else {
        b && !g ? g = this._newPolygon(f, S) : g && !b && (m.remove(g), g = this._polygon = null), d || this._initOrUpdateEndLabel(n, o, _f(A));
        var D = m.getClipPath();
        if (D) {
          var E = nP(this, o, !1, n);
          Yt(D, {
            shape: E.shape
          }, n);
        } else
          m.setClipPath(nP(this, o, !0, n));
        x && p.updateData(l, {
          isIgnore: T,
          clipShape: $,
          disableAnimation: !0,
          getSymbolPoint: function(oe) {
            return [f[oe * 2], f[oe * 2 + 1]];
          }
        }), (!IV(this._stackedOnPoints, S) || !IV(this._points, f)) && (y ? this._doUpdateAnimation(l, S, o, i, P, _, C) : (P && (f = bl(f, o, P, C), S && (S = bl(S, o, P, C))), v.setShape({
          points: f
        }), g && g.setShape({
          points: f,
          stackedOnPoints: S
        })));
      }
      var R = n.getModel("emphasis"), N = R.get("focus"), V = R.get("blurScope"), z = R.get("disabled");
      if (v.useStyle(Re(
        // Use color in lineStyle first
        u.getLineStyle(),
        {
          fill: "none",
          stroke: A,
          lineJoin: "bevel"
        }
      )), Tr(v, n, "lineStyle"), v.style.lineWidth > 0 && n.get(["emphasis", "lineStyle", "width"]) === "bolder") {
        var W = v.getState("emphasis").style;
        W.lineWidth = +v.style.lineWidth + 1;
      }
      Fe(v).seriesIndex = n.seriesIndex, bn(v, N, V, z);
      var F = kV(n.get("smooth")), Q = n.get("smoothMonotone");
      if (v.setShape({
        smooth: F,
        smoothMonotone: Q,
        connectNulls: C
      }), g) {
        var Z = l.getCalculationInfo("stackedOnSeries"), ne = 0;
        g.useStyle(Re(c.getAreaStyle(), {
          fill: A,
          opacity: 0.7,
          lineJoin: "bevel",
          decal: l.getVisual("style").decal
        })), Z && (ne = kV(Z.get("smooth"))), g.setShape({
          smooth: F,
          stackedOnSmooth: ne,
          smoothMonotone: Q,
          connectNulls: C
        }), Tr(g, n, "areaStyle"), Fe(g).seriesIndex = n.seriesIndex, bn(g, N, V, z);
      }
      var ee = function(oe) {
        a._changePolyState(oe);
      };
      l.eachItemGraphicEl(function(oe) {
        oe && (oe.onHoverStateChange = ee);
      }), this._polyline.onHoverStateChange = ee, this._data = l, this._coordSys = o, this._stackedOnPoints = S, this._points = f, this._step = P, this._valueOrigin = _, n.get("triggerLineEvent") && (this.packEventData(n, v), g && this.packEventData(n, g));
    }, e.prototype.packEventData = function(n, r) {
      Fe(r).eventData = {
        componentType: "series",
        componentSubType: "line",
        componentIndex: n.componentIndex,
        seriesIndex: n.seriesIndex,
        seriesName: n.name,
        seriesType: "line"
      };
    }, e.prototype.highlight = function(n, r, i, a) {
      var o = n.getData(), s = mf(o, a);
      if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
        var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
        if (!u) {
          var c = l[s * 2], f = l[s * 2 + 1];
          if (isNaN(c) || isNaN(f) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, f))
            return;
          var d = n.get("zlevel") || 0, h = n.get("z") || 0;
          u = new j0(o, s), u.x = c, u.y = f, u.setZ(d, h);
          var p = u.getSymbolPath().getTextContent();
          p && (p.zlevel = d, p.z = h, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
        }
        u.highlight();
      } else
        zt.prototype.highlight.call(this, n, r, i, a);
    }, e.prototype.downplay = function(n, r, i, a) {
      var o = n.getData(), s = mf(o, a);
      if (this._changePolyState("normal"), s != null && s >= 0) {
        var l = o.getItemGraphicEl(s);
        l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
      } else
        zt.prototype.downplay.call(this, n, r, i, a);
    }, e.prototype._changePolyState = function(n) {
      var r = this._polygon;
      oO(this._polyline, n), r && oO(r, n);
    }, e.prototype._newPolyline = function(n) {
      var r = this._polyline;
      return r && this._lineGroup.remove(r), r = new D3e({
        shape: {
          points: n
        },
        segmentIgnoreThreshold: 2,
        z2: 10
      }), this._lineGroup.add(r), this._polyline = r, r;
    }, e.prototype._newPolygon = function(n, r) {
      var i = this._polygon;
      return i && this._lineGroup.remove(i), i = new Vte({
        shape: {
          points: n,
          stackedOnPoints: r
        },
        segmentIgnoreThreshold: 2
      }), this._lineGroup.add(i), this._polygon = i, i;
    }, e.prototype._initSymbolLabelAnimation = function(n, r, i) {
      var a, o, s = r.getBaseAxis(), l = s.inverse;
      r.type === "cartesian2d" ? (a = s.isHorizontal(), o = !1) : r.type === "polar" && (a = s.dim === "angle", o = !0);
      var u = n.hostModel, c = u.get("animationDuration");
      Me(c) && (c = c(null));
      var f = u.get("animationDelay") || 0, d = Me(f) ? f(null) : f;
      n.eachItemGraphicEl(function(h, p) {
        var v = h;
        if (v) {
          var g = [h.x, h.y], m = void 0, y = void 0, b = void 0;
          if (i)
            if (o) {
              var _ = i, O = r.pointToCoord(g);
              a ? (m = _.startAngle, y = _.endAngle, b = -O[1] / 180 * Math.PI) : (m = _.r0, y = _.r, b = O[0]);
            } else {
              var S = i;
              a ? (m = S.x, y = S.x + S.width, b = h.x) : (m = S.y + S.height, y = S.y, b = h.y);
            }
          var x = y === m ? 0 : (b - m) / (y - m);
          l && (x = 1 - x);
          var C = Me(f) ? f(p) : c * x + d, T = v.getSymbolPath(), w = T.getTextContent();
          v.attr({
            scaleX: 0,
            scaleY: 0
          }), v.animateTo({
            scaleX: 1,
            scaleY: 1
          }, {
            duration: 200,
            setToFinal: !0,
            delay: C
          }), w && w.animateFrom({
            style: {
              opacity: 0
            }
          }, {
            duration: 300,
            delay: C
          }), T.disableLabelAnimation = !0;
        }
      });
    }, e.prototype._initOrUpdateEndLabel = function(n, r, i) {
      var a = n.getModel("endLabel");
      if (Qte(n)) {
        var o = n.getData(), s = this._polyline, l = o.getLayout("points");
        if (!l) {
          s.removeTextContent(), this._endLabel = null;
          return;
        }
        var u = this._endLabel;
        u || (u = this._endLabel = new gt({
          z2: 200
          // should be higher than item symbol
        }), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
        var c = F3e(l);
        c >= 0 && (Pr(s, er(n, "endLabel"), {
          inheritColor: i,
          labelFetcher: n,
          labelDataIndex: c,
          defaultText: function(f, d, h) {
            return h != null ? Lte(o, h) : Wh(o, f);
          },
          enableTextSetter: !0
        }, Q3e(a, r)), s.textConfig.position = null);
      } else this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
    }, e.prototype._endLabelOnDuring = function(n, r, i, a, o, s, l) {
      var u = this._endLabel, c = this._polyline;
      if (u) {
        n < 1 && a.originalX == null && (a.originalX = u.x, a.originalY = u.y);
        var f = i.getLayout("points"), d = i.hostModel, h = d.get("connectNulls"), p = s.get("precision"), v = s.get("distance") || 0, g = l.getBaseAxis(), m = g.isHorizontal(), y = g.inverse, b = r.shape, _ = y ? m ? b.x : b.y + b.height : m ? b.x + b.width : b.y, O = (m ? v : 0) * (y ? -1 : 1), S = (m ? 0 : -v) * (y ? -1 : 1), x = m ? "x" : "y", C = W3e(f, _, x), T = C.range, w = T[1] - T[0], P = void 0;
        if (w >= 1) {
          if (w > 1 && !h) {
            var $ = LV(f, T[0]);
            u.attr({
              x: $[0] + O,
              y: $[1] + S
            }), o && (P = d.getRawValue(T[0]));
          } else {
            var $ = c.getPointOn(_, x);
            $ && u.attr({
              x: $[0] + O,
              y: $[1] + S
            });
            var A = d.getRawValue(T[0]), D = d.getRawValue(T[1]);
            o && (P = gK(i, p, A, D, C.t));
          }
          a.lastFrameIndex = T[0];
        } else {
          var E = n === 1 || a.lastFrameIndex > 0 ? T[0] : 0, $ = LV(f, E);
          o && (P = d.getRawValue(E)), u.attr({
            x: $[0] + O,
            y: $[1] + S
          });
        }
        if (o) {
          var R = mp(u);
          typeof R.setLabelText == "function" && R.setLabelText(P);
        }
      }
    }, e.prototype._doUpdateAnimation = function(n, r, i, a, o, s, l) {
      var u = this._polyline, c = this._polygon, f = n.hostModel, d = I3e(this._data, n, this._stackedOnPoints, r, this._coordSys, i, this._valueOrigin), h = d.current, p = d.stackedOnCurrent, v = d.next, g = d.stackedOnNext;
      if (o && (h = bl(d.current, i, o, l), p = bl(d.stackedOnCurrent, i, o, l), v = bl(d.next, i, o, l), g = bl(d.stackedOnNext, i, o, l)), RV(h, v) > 3e3 || c && RV(p, g) > 3e3) {
        u.stopAnimation(), u.setShape({
          points: v
        }), c && (c.stopAnimation(), c.setShape({
          points: v,
          stackedOnPoints: g
        }));
        return;
      }
      u.shape.__points = d.current, u.shape.points = h;
      var m = {
        shape: {
          points: v
        }
      };
      d.current !== h && (m.shape.__points = d.next), u.stopAnimation(), Ct(u, m, f), c && (c.setShape({
        // Reuse the points with polyline.
        points: h,
        stackedOnPoints: p
      }), c.stopAnimation(), Ct(c, {
        shape: {
          stackedOnPoints: g
        }
      }, f), u.shape.points !== c.shape.points && (c.shape.points = u.shape.points));
      for (var y = [], b = d.status, _ = 0; _ < b.length; _++) {
        var O = b[_].cmd;
        if (O === "=") {
          var S = n.getItemGraphicEl(b[_].idx1);
          S && y.push({
            el: S,
            ptIdx: _
            // Index of points
          });
        }
      }
      u.animators && u.animators.length && u.animators[0].during(function() {
        c && c.dirtyShape();
        for (var x = u.shape.__points, C = 0; C < y.length; C++) {
          var T = y[C].el, w = y[C].ptIdx * 2;
          T.x = x[w], T.y = x[w + 1], T.markRedraw();
        }
      });
    }, e.prototype.remove = function(n) {
      var r = this.group, i = this._data;
      this._lineGroup.removeAll(), this._symbolDraw.remove(!0), i && i.eachItemGraphicEl(function(a, o) {
        a.__temp && (r.remove(a), i.setItemGraphicEl(o, null));
      }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
    }, e.type = "line", e;
  }(zt)
);
function X0(t, e) {
  return {
    seriesType: t,
    plan: Op(),
    reset: function(n) {
      var r = n.getData(), i = n.coordinateSystem, a = n.pipelineContext, o = e || a.large;
      if (i) {
        var s = ce(i.dimensions, function(h) {
          return r.mapDimension(h);
        }).slice(0, 2), l = s.length, u = r.getCalculationInfo("stackResultDimension");
        Xs(r, s[0]) && (s[0] = u), Xs(r, s[1]) && (s[1] = u);
        var c = r.getStore(), f = r.getDimensionIndex(s[0]), d = r.getDimensionIndex(s[1]);
        return l && {
          progress: function(h, p) {
            for (var v = h.end - h.start, g = o && Fo(v * l), m = [], y = [], b = h.start, _ = 0; b < h.end; b++) {
              var O = void 0;
              if (l === 1) {
                var S = c.get(f, b);
                O = i.dataToPoint(S, null, y);
              } else
                m[0] = c.get(f, b), m[1] = c.get(d, b), O = i.dataToPoint(m, null, y);
              o ? (g[_++] = O[0], g[_++] = O[1]) : p.setItemLayout(b, O.slice());
            }
            o && p.setLayout("points", g);
          }
        };
      }
    }
  };
}
var G3e = {
  average: function(t) {
    for (var e = 0, n = 0, r = 0; r < t.length; r++)
      isNaN(t[r]) || (e += t[r], n++);
    return n === 0 ? NaN : e / n;
  },
  sum: function(t) {
    for (var e = 0, n = 0; n < t.length; n++)
      e += t[n] || 0;
    return e;
  },
  max: function(t) {
    for (var e = -1 / 0, n = 0; n < t.length; n++)
      t[n] > e && (e = t[n]);
    return isFinite(e) ? e : NaN;
  },
  min: function(t) {
    for (var e = 1 / 0, n = 0; n < t.length; n++)
      t[n] < e && (e = t[n]);
    return isFinite(e) ? e : NaN;
  },
  minmax: function(t) {
    for (var e = -1 / 0, n = -1 / 0, r = 0; r < t.length; r++) {
      var i = t[r], a = Math.abs(i);
      a > e && (e = a, n = i);
    }
    return isFinite(n) ? n : NaN;
  },
  // TODO
  // Median
  nearest: function(t) {
    return t[0];
  }
}, j3e = function(t) {
  return Math.round(t.length / 2);
};
function Hte(t) {
  return {
    seriesType: t,
    // FIXME:TS never used, so comment it
    // modifyOutputEnd: true,
    reset: function(e, n, r) {
      var i = e.getData(), a = e.get("sampling"), o = e.coordinateSystem, s = i.count();
      if (s > 10 && o.type === "cartesian2d" && a) {
        var l = o.getBaseAxis(), u = o.getOtherAxis(l), c = l.getExtent(), f = r.getDevicePixelRatio(), d = Math.abs(c[1] - c[0]) * (f || 1), h = Math.round(s / d);
        if (isFinite(h) && h > 1) {
          a === "lttb" && e.setData(i.lttbDownSample(i.mapDimension(u.dim), 1 / h));
          var p = void 0;
          Oe(a) ? p = G3e[a] : Me(a) && (p = a), p && e.setData(i.downSample(i.mapDimension(u.dim), 1 / h, p, j3e));
        }
      }
    }
  };
}
function Z3e(t) {
  t.registerChartView(H3e), t.registerSeriesModel($3e), t.registerLayout(X0("line", !0)), t.registerVisual({
    seriesType: "line",
    reset: function(e) {
      var n = e.getData(), r = e.getModel("lineStyle").getLineStyle();
      r && !r.stroke && (r.stroke = n.getVisual("style").fill), n.setVisual("legendLineStyle", r);
    }
  }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("line"));
}
var Rm = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return us(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getMarkerPosition = function(n, r, i) {
      var a = this.coordinateSystem;
      if (a && a.clampData) {
        var o = a.clampData(n), s = a.dataToPoint(o);
        if (i)
          k(a.getAxes(), function(d, h) {
            if (d.type === "category" && r != null) {
              var p = d.getTicksCoords(), v = d.getTickModel().get("alignWithLabel"), g = o[h], m = r[h] === "x1" || r[h] === "y1";
              if (m && !v && (g += 1), p.length < 2)
                return;
              if (p.length === 2) {
                s[h] = d.toGlobalCoord(d.getExtent()[m ? 1 : 0]);
                return;
              }
              for (var y = void 0, b = void 0, _ = 1, O = 0; O < p.length; O++) {
                var S = p[O].coord, x = O === p.length - 1 ? p[O - 1].tickValue + _ : p[O].tickValue;
                if (x === g) {
                  b = S;
                  break;
                } else if (x < g)
                  y = S;
                else if (y != null && x > g) {
                  b = (S + y) / 2;
                  break;
                }
                O === 1 && (_ = x - p[0].tickValue);
              }
              b == null && (y ? y && (b = p[p.length - 1].coord) : b = p[0].coord), s[h] = d.toGlobalCoord(b);
            }
          });
        else {
          var l = this.getData(), u = l.getLayout("offset"), c = l.getLayout("size"), f = a.getBaseAxis().isHorizontal() ? 0 : 1;
          s[f] += u + c / 2;
        }
        return s;
      }
      return [NaN, NaN];
    }, e.type = "series.__base_bar__", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      // stack: null
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      barMinHeight: 0,
      barMinAngle: 0,
      // cursor: null,
      large: !1,
      largeThreshold: 400,
      progressive: 3e3,
      progressiveChunkMode: "mod"
    }, e;
  }(Ht)
);
Ht.registerClass(Rm);
var U3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function() {
      return us(null, this, {
        useEncodeDefaulter: !0,
        createInvertedIndices: !!this.get("realtimeSort", !0) || null
      });
    }, e.prototype.getProgressive = function() {
      return this.get("large") ? this.get("progressive") : !1;
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.get("progressiveThreshold"), r = this.get("largeThreshold");
      return r > n && (n = r), n;
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.rect(r.getItemLayout(n));
    }, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = Pu(Rm.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;
  }(Rm)
), X3e = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
    }
    return t;
  }()
), AO = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "sausage", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new X3e();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.cx, a = r.cy, o = Math.max(r.r0 || 0, 0), s = Math.max(r.r, 0), l = (s - o) * 0.5, u = o + l, c = r.startAngle, f = r.endAngle, d = r.clockwise, h = Math.PI * 2, p = d ? f - c < h : c - f < h;
      p || (c = f - (d ? h : -h));
      var v = Math.cos(c), g = Math.sin(c), m = Math.cos(f), y = Math.sin(f);
      p ? (n.moveTo(v * o + i, g * o + a), n.arc(v * u + i, g * u + a, l, -Math.PI + c, c, !d)) : n.moveTo(v * s + i, g * s + a), n.arc(i, a, s, c, f, !d), n.arc(m * u + i, y * u + a, l, f - Math.PI * 2, f - Math.PI, !d), o !== 0 && n.arc(i, a, o, f, c, d);
    }, e;
  }(ot)
);
function Y3e(t, e) {
  e = e || {};
  var n = e.isRoundCap;
  return function(r, i, a) {
    var o = i.position;
    if (!o || o instanceof Array)
      return rO(r, i, a);
    var s = t(o), l = i.distance != null ? i.distance : 5, u = this.shape, c = u.cx, f = u.cy, d = u.r, h = u.r0, p = (d + h) / 2, v = u.startAngle, g = u.endAngle, m = (v + g) / 2, y = n ? Math.abs(d - h) / 2 : 0, b = Math.cos, _ = Math.sin, O = c + d * b(v), S = f + d * _(v), x = "left", C = "top";
    switch (s) {
      case "startArc":
        O = c + (h - l) * b(m), S = f + (h - l) * _(m), x = "center", C = "top";
        break;
      case "insideStartArc":
        O = c + (h + l) * b(m), S = f + (h + l) * _(m), x = "center", C = "bottom";
        break;
      case "startAngle":
        O = c + p * b(v) + _b(v, l + y, !1), S = f + p * _(v) + Ob(v, l + y, !1), x = "right", C = "middle";
        break;
      case "insideStartAngle":
        O = c + p * b(v) + _b(v, -l + y, !1), S = f + p * _(v) + Ob(v, -l + y, !1), x = "left", C = "middle";
        break;
      case "middle":
        O = c + p * b(m), S = f + p * _(m), x = "center", C = "middle";
        break;
      case "endArc":
        O = c + (d + l) * b(m), S = f + (d + l) * _(m), x = "center", C = "bottom";
        break;
      case "insideEndArc":
        O = c + (d - l) * b(m), S = f + (d - l) * _(m), x = "center", C = "top";
        break;
      case "endAngle":
        O = c + p * b(g) + _b(g, l + y, !0), S = f + p * _(g) + Ob(g, l + y, !0), x = "left", C = "middle";
        break;
      case "insideEndAngle":
        O = c + p * b(g) + _b(g, -l + y, !0), S = f + p * _(g) + Ob(g, -l + y, !0), x = "right", C = "middle";
        break;
      default:
        return rO(r, i, a);
    }
    return r = r || {}, r.x = O, r.y = S, r.align = x, r.verticalAlign = C, r;
  };
}
function q3e(t, e, n, r) {
  if (St(r)) {
    t.setTextConfig({
      rotation: r
    });
    return;
  } else if (ue(e)) {
    t.setTextConfig({
      rotation: 0
    });
    return;
  }
  var i = t.shape, a = i.clockwise ? i.startAngle : i.endAngle, o = i.clockwise ? i.endAngle : i.startAngle, s = (a + o) / 2, l, u = n(e);
  switch (u) {
    case "startArc":
    case "insideStartArc":
    case "middle":
    case "insideEndArc":
    case "endArc":
      l = s;
      break;
    case "startAngle":
    case "insideStartAngle":
      l = a;
      break;
    case "endAngle":
    case "insideEndAngle":
      l = o;
      break;
    default:
      t.setTextConfig({
        rotation: 0
      });
      return;
  }
  var c = Math.PI * 1.5 - l;
  u === "middle" && c > Math.PI / 2 && c < Math.PI * 1.5 && (c -= Math.PI), t.setTextConfig({
    rotation: c
  });
}
function _b(t, e, n) {
  return e * Math.sin(t) * (n ? -1 : 1);
}
function Ob(t, e, n) {
  return e * Math.cos(t) * (n ? 1 : -1);
}
function Fc(t, e, n) {
  var r = t.get("borderRadius");
  if (r == null)
    return n ? {
      cornerRadius: 0
    } : null;
  ue(r) || (r = [r, r, r, r]);
  var i = Math.abs(e.r || 0 - e.r0 || 0);
  return {
    cornerRadius: ce(r, function(a) {
      return oo(a, i);
    })
  };
}
var rP = Math.max, iP = Math.min;
function K3e(t, e) {
  var n = t.getArea && t.getArea();
  if (Ff(t, "cartesian2d")) {
    var r = t.getBaseAxis();
    if (r.type !== "category" || !r.onBand) {
      var i = e.getLayout("bandWidth");
      r.isHorizontal() ? (n.x -= i, n.width += i * 2) : (n.y -= i, n.height += i * 2);
    }
  }
  return n;
}
var J3e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t.call(this) || this;
      return n.type = e.type, n._isFirstFrame = !0, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._model = n, this._removeOnRenderedListener(i), this._updateDrawMode(n);
      var o = n.get("coordinateSystem");
      o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(n, r, i) : this._renderNormal(n, r, i, a)) : process.env.NODE_ENV !== "production" && dn("Only cartesian2d and polar supported for bar.");
    }, e.prototype.incrementalPrepareRender = function(n) {
      this._clear(), this._updateDrawMode(n), this._updateLargeClip(n);
    }, e.prototype.incrementalRender = function(n, r) {
      this._progressiveEls = [], this._incrementalRenderLarge(n, r);
    }, e.prototype.eachRendered = function(n) {
      Tu(this._progressiveEls || this.group, n);
    }, e.prototype._updateDrawMode = function(n) {
      var r = n.pipelineContext.large;
      (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
    }, e.prototype._renderNormal = function(n, r, i, a) {
      var o = this.group, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.getBaseAxis(), f;
      u.type === "cartesian2d" ? f = c.isHorizontal() : u.type === "polar" && (f = c.dim === "angle");
      var d = n.isAnimationEnabled() ? n : null, h = e6e(n, u);
      h && this._enableRealtimeSort(h, s, i);
      var p = n.get("clip", !0) || h, v = K3e(u, s);
      o.removeClipPath();
      var g = n.get("roundCap", !0), m = n.get("showBackground", !0), y = n.getModel("backgroundStyle"), b = y.get("borderRadius") || 0, _ = [], O = this._backgroundEls, S = a && a.isInitSort, x = a && a.type === "changeAxisOrder";
      function C(P) {
        var $ = Sb[u.type](s, P), A = s6e(u, f, $);
        return A.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? A.setShape("r", b) : A.setShape("cornerRadius", b), _[P] = A, A;
      }
      s.diff(l).add(function(P) {
        var $ = s.getItemModel(P), A = Sb[u.type](s, P, $);
        if (m && C(P), !(!s.hasValue(P) || !FV[u.type](A))) {
          var D = !1;
          p && (D = NV[u.type](v, A));
          var E = BV[u.type](n, s, P, A, f, d, c.model, !1, g);
          h && (E.forceLabelAnimation = !0), WV(E, s, P, $, A, n, f, u.type === "polar"), S ? E.attr({
            shape: A
          }) : h ? zV(h, d, E, A, P, f, !1, !1) : Yt(E, {
            shape: A
          }, n, P), s.setItemGraphicEl(P, E), o.add(E), E.ignore = D;
        }
      }).update(function(P, $) {
        var A = s.getItemModel(P), D = Sb[u.type](s, P, A);
        if (m) {
          var E = void 0;
          O.length === 0 ? E = C($) : (E = O[$], E.useStyle(y.getItemStyle()), u.type === "cartesian2d" ? E.setShape("r", b) : E.setShape("cornerRadius", b), _[P] = E);
          var R = Sb[u.type](s, P), N = jte(f, R, u);
          Ct(E, {
            shape: N
          }, d, P);
        }
        var V = l.getItemGraphicEl($);
        if (!s.hasValue(P) || !FV[u.type](D)) {
          o.remove(V);
          return;
        }
        var z = !1;
        if (p && (z = NV[u.type](v, D), z && o.remove(V)), V ? so(V) : V = BV[u.type](n, s, P, D, f, d, c.model, !!V, g), h && (V.forceLabelAnimation = !0), x) {
          var W = V.getTextContent();
          if (W) {
            var F = mp(W);
            F.prevValue != null && (F.prevValue = F.value);
          }
        } else
          WV(V, s, P, A, D, n, f, u.type === "polar");
        S ? V.attr({
          shape: D
        }) : h ? zV(h, d, V, D, P, f, !0, x) : Ct(V, {
          shape: D
        }, n, P, null), s.setItemGraphicEl(P, V), V.ignore = z, o.add(V);
      }).remove(function(P) {
        var $ = l.getItemGraphicEl(P);
        $ && wm($, n, P);
      }).execute();
      var T = this._backgroundGroup || (this._backgroundGroup = new Ve());
      T.removeAll();
      for (var w = 0; w < _.length; ++w)
        T.add(_[w]);
      o.add(T), this._backgroundEls = _, this._data = s;
    }, e.prototype._renderLarge = function(n, r, i) {
      this._clear(), HV(n, this.group), this._updateLargeClip(n);
    }, e.prototype._incrementalRenderLarge = function(n, r) {
      this._removeBackground(), HV(r, this.group, this._progressiveEls, !0);
    }, e.prototype._updateLargeClip = function(n) {
      var r = n.get("clip", !0) && U0(n.coordinateSystem, !1, n), i = this.group;
      r ? i.setClipPath(r) : i.removeClipPath();
    }, e.prototype._enableRealtimeSort = function(n, r, i) {
      var a = this;
      if (r.count()) {
        var o = n.baseAxis;
        if (this._isFirstFrame)
          this._dispatchInitSort(r, n, i), this._isFirstFrame = !1;
        else {
          var s = function(l) {
            var u = r.getItemGraphicEl(l), c = u && u.shape;
            return c && // The result should be consistent with the initial sort by data value.
            // Do not support the case that both positive and negative exist.
            Math.abs(o.isHorizontal() ? c.height : c.width) || 0;
          };
          this._onRendered = function() {
            a._updateSortWithinSameData(r, s, o, i);
          }, i.getZr().on("rendered", this._onRendered);
        }
      }
    }, e.prototype._dataSort = function(n, r, i) {
      var a = [];
      return n.each(n.mapDimension(r.dim), function(o, s) {
        var l = i(s);
        l = l ?? NaN, a.push({
          dataIndex: s,
          mappedValue: l,
          ordinalNumber: o
        });
      }), a.sort(function(o, s) {
        return s.mappedValue - o.mappedValue;
      }), {
        ordinalNumbers: ce(a, function(o) {
          return o.ordinalNumber;
        })
      };
    }, e.prototype._isOrderChangedWithinSameData = function(n, r, i) {
      for (var a = i.scale, o = n.mapDimension(i.dim), s = Number.MAX_VALUE, l = 0, u = a.getOrdinalMeta().categories.length; l < u; ++l) {
        var c = n.rawIndexOf(o, a.getRawOrdinalNumber(l)), f = c < 0 ? Number.MIN_VALUE : r(n.indexOfRawIndex(c));
        if (f > s)
          return !0;
        s = f;
      }
      return !1;
    }, e.prototype._isOrderDifferentInView = function(n, r) {
      for (var i = r.scale, a = i.getExtent(), o = Math.max(0, a[0]), s = Math.min(a[1], i.getOrdinalMeta().categories.length - 1); o <= s; ++o)
        if (n.ordinalNumbers[o] !== i.getRawOrdinalNumber(o))
          return !0;
    }, e.prototype._updateSortWithinSameData = function(n, r, i, a) {
      if (this._isOrderChangedWithinSameData(n, r, i)) {
        var o = this._dataSort(n, i, r);
        this._isOrderDifferentInView(o, i) && (this._removeOnRenderedListener(a), a.dispatchAction({
          type: "changeAxisOrder",
          componentType: i.dim + "Axis",
          axisId: i.index,
          sortInfo: o
        }));
      }
    }, e.prototype._dispatchInitSort = function(n, r, i) {
      var a = r.baseAxis, o = this._dataSort(n, a, function(s) {
        return n.get(n.mapDimension(r.otherAxis.dim), s);
      });
      i.dispatchAction({
        type: "changeAxisOrder",
        componentType: a.dim + "Axis",
        isInitSort: !0,
        axisId: a.index,
        sortInfo: o
      });
    }, e.prototype.remove = function(n, r) {
      this._clear(this._model), this._removeOnRenderedListener(r);
    }, e.prototype.dispose = function(n, r) {
      this._removeOnRenderedListener(r);
    }, e.prototype._removeOnRenderedListener = function(n) {
      this._onRendered && (n.getZr().off("rendered", this._onRendered), this._onRendered = null);
    }, e.prototype._clear = function(n) {
      var r = this.group, i = this._data;
      n && n.isAnimationEnabled() && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function(a) {
        wm(a, n, Fe(a).dataIndex);
      })) : r.removeAll(), this._data = null, this._isFirstFrame = !0;
    }, e.prototype._removeBackground = function() {
      this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
    }, e.type = "bar", e;
  }(zt)
), NV = {
  cartesian2d: function(t, e) {
    var n = e.width < 0 ? -1 : 1, r = e.height < 0 ? -1 : 1;
    n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height);
    var i = t.x + t.width, a = t.y + t.height, o = rP(e.x, t.x), s = iP(e.x + e.width, i), l = rP(e.y, t.y), u = iP(e.y + e.height, a), c = s < o, f = u < l;
    return e.x = c && o > i ? s : o, e.y = f && l > a ? u : l, e.width = c ? 0 : s - o, e.height = f ? 0 : u - l, n < 0 && (e.x += e.width, e.width = -e.width), r < 0 && (e.y += e.height, e.height = -e.height), c || f;
  },
  polar: function(t, e) {
    var n = e.r0 <= e.r ? 1 : -1;
    if (n < 0) {
      var r = e.r;
      e.r = e.r0, e.r0 = r;
    }
    var i = iP(e.r, t.r), a = rP(e.r0, t.r0);
    e.r = i, e.r0 = a;
    var o = i - a < 0;
    if (n < 0) {
      var r = e.r;
      e.r = e.r0, e.r0 = r;
    }
    return o;
  }
}, BV = {
  cartesian2d: function(t, e, n, r, i, a, o, s, l) {
    var u = new mt({
      shape: le({}, r),
      z2: 1
    });
    if (u.__dataIndex = n, u.name = "item", a) {
      var c = u.shape, f = i ? "height" : "width";
      c[f] = 0;
    }
    return u;
  },
  polar: function(t, e, n, r, i, a, o, s, l) {
    var u = !i && l ? AO : ri, c = new u({
      shape: r,
      z2: 1
    });
    c.name = "item";
    var f = Gte(i);
    if (c.calculateTextPosition = Y3e(f, {
      isRoundCap: u === AO
    }), a) {
      var d = c.shape, h = i ? "r" : "endAngle", p = {};
      d[h] = i ? r.r0 : r.startAngle, p[h] = r[h], (s ? Ct : Yt)(c, {
        shape: p
        // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
      }, a);
    }
    return c;
  }
};
function e6e(t, e) {
  var n = t.get("realtimeSort", !0), r = e.getBaseAxis();
  if (process.env.NODE_ENV !== "production" && n && (r.type !== "category" && dn("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && dn("`realtimeSort` will not work because this bar series is not on cartesian2d.")), n && r.type === "category" && e.type === "cartesian2d")
    return {
      baseAxis: r,
      otherAxis: e.getOtherAxis(r)
    };
}
function zV(t, e, n, r, i, a, o, s) {
  var l, u;
  a ? (u = {
    x: r.x,
    width: r.width
  }, l = {
    y: r.y,
    height: r.height
  }) : (u = {
    y: r.y,
    height: r.height
  }, l = {
    x: r.x,
    width: r.width
  }), s || (o ? Ct : Yt)(n, {
    shape: l
  }, e, i, null);
  var c = e ? t.baseAxis.model : null;
  (o ? Ct : Yt)(n, {
    shape: u
  }, c, i);
}
function VV(t, e) {
  for (var n = 0; n < e.length; n++)
    if (!isFinite(t[e[n]]))
      return !0;
  return !1;
}
var t6e = ["x", "y", "width", "height"], n6e = ["cx", "cy", "r", "startAngle", "endAngle"], FV = {
  cartesian2d: function(t) {
    return !VV(t, t6e);
  },
  polar: function(t) {
    return !VV(t, n6e);
  }
}, Sb = {
  // itemModel is only used to get borderWidth, which is not needed
  // when calculating bar background layout.
  cartesian2d: function(t, e, n) {
    var r = t.getItemLayout(e), i = n ? i6e(n, r) : 0, a = r.width > 0 ? 1 : -1, o = r.height > 0 ? 1 : -1;
    return {
      x: r.x + a * i / 2,
      y: r.y + o * i / 2,
      width: r.width - a * i,
      height: r.height - o * i
    };
  },
  polar: function(t, e, n) {
    var r = t.getItemLayout(e);
    return {
      cx: r.cx,
      cy: r.cy,
      r0: r.r0,
      r: r.r,
      startAngle: r.startAngle,
      endAngle: r.endAngle,
      clockwise: r.clockwise
    };
  }
};
function r6e(t) {
  return t.startAngle != null && t.endAngle != null && t.startAngle === t.endAngle;
}
function Gte(t) {
  return /* @__PURE__ */ function(e) {
    var n = e ? "Arc" : "Angle";
    return function(r) {
      switch (r) {
        case "start":
        case "insideStart":
        case "end":
        case "insideEnd":
          return r + n;
        default:
          return r;
      }
    };
  }(t);
}
function WV(t, e, n, r, i, a, o, s) {
  var l = e.getItemVisual(n, "style");
  if (s) {
    if (!a.get("roundCap")) {
      var c = t.shape, f = Fc(r.getModel("itemStyle"), c, !0);
      le(c, f), t.setShape(c);
    }
  } else {
    var u = r.get(["itemStyle", "borderRadius"]) || 0;
    t.setShape("r", u);
  }
  t.useStyle(l);
  var d = r.getShallow("cursor");
  d && t.attr("cursor", d);
  var h = s ? o ? i.r >= i.r0 ? "endArc" : "startArc" : i.endAngle >= i.startAngle ? "endAngle" : "startAngle" : o ? i.height >= 0 ? "bottom" : "top" : i.width >= 0 ? "right" : "left", p = er(r);
  Pr(t, p, {
    labelFetcher: a,
    labelDataIndex: n,
    defaultText: Wh(a.getData(), n),
    inheritColor: l.fill,
    defaultOpacity: l.opacity,
    defaultOutsidePosition: h
  });
  var v = t.getTextContent();
  if (s && v) {
    var g = r.get(["label", "position"]);
    t.textConfig.inside = g === "middle" ? !0 : null, q3e(t, g === "outside" ? h : g, Gte(o), r.get(["label", "rotate"]));
  }
  dJ(v, p, a.getRawValue(n), function(y) {
    return Lte(e, y);
  });
  var m = r.getModel(["emphasis"]);
  bn(t, m.get("focus"), m.get("blurScope"), m.get("disabled")), Tr(t, r), r6e(i) && (t.style.fill = "none", t.style.stroke = "none", k(t.states, function(y) {
    y.style && (y.style.fill = y.style.stroke = "none");
  }));
}
function i6e(t, e) {
  var n = t.get(["itemStyle", "borderColor"]);
  if (!n || n === "none")
    return 0;
  var r = t.get(["itemStyle", "borderWidth"]) || 0, i = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), a = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
  return Math.min(r, i, a);
}
var a6e = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), QV = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "largeBar", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new a6e();
    }, e.prototype.buildPath = function(n, r) {
      for (var i = r.points, a = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, c = 0; c < i.length; c += 3)
        l[a] = u, l[o] = i[c + 2], s[a] = i[c + a], s[o] = i[c + o], n.rect(s[0], s[1], l[0], l[1]);
    }, e;
  }(ot)
);
function HV(t, e, n, r) {
  var i = t.getData(), a = i.getLayout("valueAxisHorizontal") ? 1 : 0, o = i.getLayout("largeDataIndices"), s = i.getLayout("size"), l = t.getModel("backgroundStyle"), u = i.getLayout("largeBackgroundPoints");
  if (u) {
    var c = new QV({
      shape: {
        points: u
      },
      incremental: !!r,
      silent: !0,
      z2: 0
    });
    c.baseDimIdx = a, c.largeDataIndices = o, c.barWidth = s, c.useStyle(l.getItemStyle()), e.add(c), n && n.push(c);
  }
  var f = new QV({
    shape: {
      points: i.getLayout("largePoints")
    },
    incremental: !!r,
    ignoreCoarsePointer: !0,
    z2: 1
  });
  f.baseDimIdx = a, f.largeDataIndices = o, f.barWidth = s, e.add(f), f.useStyle(i.getVisual("style")), Fe(f).seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", GV), f.on("mousemove", GV)), n && n.push(f);
}
var GV = uw(function(t) {
  var e = this, n = o6e(e, t.offsetX, t.offsetY);
  Fe(e).dataIndex = n >= 0 ? n : null;
}, 30, !1);
function o6e(t, e, n) {
  for (var r = t.baseDimIdx, i = 1 - r, a = t.shape.points, o = t.largeDataIndices, s = [], l = [], u = t.barWidth, c = 0, f = a.length / 3; c < f; c++) {
    var d = c * 3;
    if (l[r] = u, l[i] = a[d + 2], s[r] = a[d + r], s[i] = a[d + i], l[i] < 0 && (s[i] += l[i], l[i] = -l[i]), e >= s[0] && e <= s[0] + l[0] && n >= s[1] && n <= s[1] + l[1])
      return o[c];
  }
  return -1;
}
function jte(t, e, n) {
  if (Ff(n, "cartesian2d")) {
    var r = e, i = n.getArea();
    return {
      x: t ? r.x : i.x,
      y: t ? i.y : r.y,
      width: t ? r.width : i.width,
      height: t ? i.height : r.height
    };
  } else {
    var i = n.getArea(), a = e;
    return {
      cx: i.cx,
      cy: i.cy,
      r0: t ? i.r0 : a.r0,
      r: t ? i.r : a.r,
      startAngle: t ? a.startAngle : 0,
      endAngle: t ? a.endAngle : Math.PI * 2
    };
  }
}
function s6e(t, e, n) {
  var r = t.type === "polar" ? ri : mt;
  return new r({
    shape: jte(e, n, t),
    silent: !0,
    z2: 0
  });
}
function l6e(t) {
  t.registerChartView(J3e), t.registerSeriesModel(U3e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "bar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("bar")), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, Hte("bar")), t.registerAction({
    type: "changeAxisOrder",
    event: "changeAxisOrder",
    update: "update"
  }, function(e, n) {
    var r = e.componentType || "series";
    n.eachComponent({
      mainType: r,
      query: e
    }, function(i) {
      e.sortInfo && i.axis.setCategorySortInfo(e.sortInfo);
    });
  });
}
var jV = Math.PI * 2, xb = Math.PI / 180;
function Zte(t, e) {
  return Rn(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function Ute(t, e) {
  var n = Zte(t, e), r = t.get("center"), i = t.get("radius");
  ue(i) || (i = [0, i]);
  var a = _e(n.width, e.getWidth()), o = _e(n.height, e.getHeight()), s = Math.min(a, o), l = _e(i[0], s / 2), u = _e(i[1], s / 2), c, f, d = t.coordinateSystem;
  if (d) {
    var h = d.dataToPoint(r);
    c = h[0] || 0, f = h[1] || 0;
  } else
    ue(r) || (r = [r, r]), c = _e(r[0], a) + n.x, f = _e(r[1], o) + n.y;
  return {
    cx: c,
    cy: f,
    r0: l,
    r: u
  };
}
function u6e(t, e, n) {
  e.eachSeriesByType(t, function(r) {
    var i = r.getData(), a = i.mapDimension("value"), o = Zte(r, n), s = Ute(r, n), l = s.cx, u = s.cy, c = s.r, f = s.r0, d = -r.get("startAngle") * xb, h = r.get("endAngle"), p = r.get("padAngle") * xb;
    h = h === "auto" ? d - jV : -h * xb;
    var v = r.get("minAngle") * xb, g = v + p, m = 0;
    i.each(a, function(N) {
      !isNaN(N) && m++;
    });
    var y = i.getSum(a), b = Math.PI / (y || m) * 2, _ = r.get("clockwise"), O = r.get("roseType"), S = r.get("stillShowZeroSum"), x = i.getDataExtent(a);
    x[0] = 0;
    var C = _ ? 1 : -1, T = [d, h], w = C * p / 2;
    DR(T, !_), d = T[0], h = T[1];
    var P = Xte(r);
    P.startAngle = d, P.endAngle = h, P.clockwise = _;
    var $ = Math.abs(h - d), A = $, D = 0, E = d;
    if (i.setLayout({
      viewRect: o,
      r: c
    }), i.each(a, function(N, V) {
      var z;
      if (isNaN(N)) {
        i.setItemLayout(V, {
          angle: NaN,
          startAngle: NaN,
          endAngle: NaN,
          clockwise: _,
          cx: l,
          cy: u,
          r0: f,
          r: O ? NaN : c
        });
        return;
      }
      O !== "area" ? z = y === 0 && S ? b : N * b : z = $ / m, z < g ? (z = g, A -= g) : D += N;
      var W = E + C * z, F = 0, Q = 0;
      p > z ? (F = E + C * z / 2, Q = F) : (F = E + w, Q = W - w), i.setItemLayout(V, {
        angle: z,
        startAngle: F,
        endAngle: Q,
        clockwise: _,
        cx: l,
        cy: u,
        r0: f,
        r: O ? Lt(N, x, [f, c]) : c
      }), E = W;
    }), A < jV && m)
      if (A <= 1e-3) {
        var R = $ / m;
        i.each(a, function(N, V) {
          if (!isNaN(N)) {
            var z = i.getItemLayout(V);
            z.angle = R;
            var W = 0, F = 0;
            R < p ? (W = d + C * (V + 1 / 2) * R, F = W) : (W = d + C * V * R + w, F = d + C * (V + 1) * R - w), z.startAngle = W, z.endAngle = F;
          }
        });
      } else
        b = A / D, E = d, i.each(a, function(N, V) {
          if (!isNaN(N)) {
            var z = i.getItemLayout(V), W = z.angle === g ? g : N * b, F = 0, Q = 0;
            W < p ? (F = E + C * W / 2, Q = F) : (F = E + w, Q = E + C * W - w), z.startAngle = F, z.endAngle = Q, E += C * W;
          }
        });
  });
}
var Xte = bt();
function Y0(t) {
  return {
    seriesType: t,
    reset: function(e, n) {
      var r = n.findComponents({
        mainType: "legend"
      });
      if (!(!r || !r.length)) {
        var i = e.getData();
        i.filterSelf(function(a) {
          for (var o = i.getName(a), s = 0; s < r.length; s++)
            if (!r[s].isSelected(o))
              return !1;
          return !0;
        });
      }
    }
  };
}
var c6e = Math.PI / 180;
function ZV(t, e, n, r, i, a, o, s, l, u) {
  if (t.length < 2)
    return;
  function c(v) {
    for (var g = v.rB, m = g * g, y = 0; y < v.list.length; y++) {
      var b = v.list[y], _ = Math.abs(b.label.y - n), O = r + b.len, S = O * O, x = Math.sqrt((1 - Math.abs(_ * _ / m)) * S), C = e + (x + b.len2) * i, T = C - b.label.x, w = b.targetTextWidth - T * i;
      Yte(b, w, !0), b.label.x = C;
    }
  }
  function f(v) {
    for (var g = {
      list: [],
      maxY: 0
    }, m = {
      list: [],
      maxY: 0
    }, y = 0; y < v.length; y++)
      if (v[y].labelAlignTo === "none") {
        var b = v[y], _ = b.label.y > n ? m : g, O = Math.abs(b.label.y - n);
        if (O >= _.maxY) {
          var S = b.label.x - e - b.len2 * i, x = r + b.len, C = Math.abs(S) < x ? Math.sqrt(O * O / (1 - S * S / x / x)) : x;
          _.rB = C, _.maxY = O;
        }
        _.list.push(b);
      }
    c(g), c(m);
  }
  for (var d = t.length, h = 0; h < d; h++)
    if (t[h].position === "outer" && t[h].labelAlignTo === "labelLine") {
      var p = t[h].label.x - u;
      t[h].linePoints[1][0] += p, t[h].label.x = u;
    }
  bte(t, l, l + o) && f(t);
}
function f6e(t, e, n, r, i, a, o, s) {
  for (var l = [], u = [], c = Number.MAX_VALUE, f = -Number.MAX_VALUE, d = 0; d < t.length; d++) {
    var h = t[d].label;
    aP(t[d]) || (h.x < e ? (c = Math.min(c, h.x), l.push(t[d])) : (f = Math.max(f, h.x), u.push(t[d])));
  }
  for (var d = 0; d < t.length; d++) {
    var p = t[d];
    if (!aP(p) && p.linePoints) {
      if (p.labelStyleWidth != null)
        continue;
      var h = p.label, v = p.linePoints, g = void 0;
      p.labelAlignTo === "edge" ? h.x < e ? g = v[2][0] - p.labelDistance - o - p.edgeDistance : g = o + i - p.edgeDistance - v[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? h.x < e ? g = c - o - p.bleedMargin : g = o + i - f - p.bleedMargin : h.x < e ? g = h.x - o - p.bleedMargin : g = o + i - h.x - p.bleedMargin, p.targetTextWidth = g, Yte(p, g);
    }
  }
  ZV(u, e, n, r, 1, i, a, o, s, f), ZV(l, e, n, r, -1, i, a, o, s, c);
  for (var d = 0; d < t.length; d++) {
    var p = t[d];
    if (!aP(p) && p.linePoints) {
      var h = p.label, v = p.linePoints, m = p.labelAlignTo === "edge", y = h.style.padding, b = y ? y[1] + y[3] : 0, _ = h.style.backgroundColor ? 0 : b, O = p.rect.width + _, S = v[1][0] - v[2][0];
      m ? h.x < e ? v[2][0] = o + p.edgeDistance + O + p.labelDistance : v[2][0] = o + i - p.edgeDistance - O - p.labelDistance : (h.x < e ? v[2][0] = h.x + p.labelDistance : v[2][0] = h.x - p.labelDistance, v[1][0] = v[2][0] + S), v[1][1] = v[2][1] = h.y;
    }
  }
}
function Yte(t, e, n) {
  if (n === void 0 && (n = !1), t.labelStyleWidth == null) {
    var r = t.label, i = r.style, a = t.rect, o = i.backgroundColor, s = i.padding, l = s ? s[1] + s[3] : 0, u = i.overflow, c = a.width + (o ? 0 : l);
    if (e < c || n) {
      var f = a.height;
      if (u && u.match("break")) {
        r.setStyle("backgroundColor", null), r.setStyle("width", e - l);
        var d = r.getBoundingRect();
        r.setStyle("width", Math.ceil(d.width)), r.setStyle("backgroundColor", o);
      } else {
        var h = e - l, p = e < c ? h : (
          // Current available width is enough, but the text may have
          // already been wrapped with a smaller available width.
          n ? h > t.unconstrainedWidth ? null : h : null
        );
        r.setStyle("width", p);
      }
      var v = r.getBoundingRect();
      a.width = v.width;
      var g = (r.style.margin || 0) + 2.1;
      a.height = v.height + g, a.y -= (a.height - f) / 2;
    }
  }
}
function aP(t) {
  return t.position === "center";
}
function d6e(t) {
  var e = t.getData(), n = [], r, i, a = !1, o = (t.get("minShowLabelAngle") || 0) * c6e, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, c = s.x, f = s.y, d = s.height;
  function h(S) {
    S.ignore = !0;
  }
  function p(S) {
    if (!S.ignore)
      return !0;
    for (var x in S.states)
      if (S.states[x].ignore === !1)
        return !0;
    return !1;
  }
  e.each(function(S) {
    var x = e.getItemGraphicEl(S), C = x.shape, T = x.getTextContent(), w = x.getTextGuideLine(), P = e.getItemModel(S), $ = P.getModel("label"), A = $.get("position") || P.get(["emphasis", "label", "position"]), D = $.get("distanceToLabelLine"), E = $.get("alignTo"), R = _e($.get("edgeDistance"), u), N = $.get("bleedMargin"), V = P.getModel("labelLine"), z = V.get("length");
    z = _e(z, u);
    var W = V.get("length2");
    if (W = _e(W, u), Math.abs(C.endAngle - C.startAngle) < o) {
      k(T.states, h), T.ignore = !0, w && (k(w.states, h), w.ignore = !0);
      return;
    }
    if (p(T)) {
      var F = (C.startAngle + C.endAngle) / 2, Q = Math.cos(F), Z = Math.sin(F), ne, ee, oe, K;
      r = C.cx, i = C.cy;
      var ie = A === "inside" || A === "inner";
      if (A === "center")
        ne = C.cx, ee = C.cy, K = "center";
      else {
        var X = (ie ? (C.r + C.r0) / 2 * Q : C.r * Q) + r, H = (ie ? (C.r + C.r0) / 2 * Z : C.r * Z) + i;
        if (ne = X + Q * 3, ee = H + Z * 3, !ie) {
          var G = X + Q * (z + l - C.r), re = H + Z * (z + l - C.r), fe = G + (Q < 0 ? -1 : 1) * W, de = re;
          E === "edge" ? ne = Q < 0 ? c + R : c + u - R : ne = fe + (Q < 0 ? -D : D), ee = de, oe = [[X, H], [G, re], [fe, de]];
        }
        K = ie ? "center" : E === "edge" ? Q > 0 ? "right" : "left" : Q > 0 ? "left" : "right";
      }
      var Ee = Math.PI, $e = 0, Se = $.get("rotate");
      if (St(Se))
        $e = Se * (Ee / 180);
      else if (A === "center")
        $e = 0;
      else if (Se === "radial" || Se === !0) {
        var be = Q < 0 ? -F + Ee : -F;
        $e = be;
      } else if (Se === "tangential" && A !== "outside" && A !== "outer") {
        var he = Math.atan2(Q, Z);
        he < 0 && (he = Ee * 2 + he);
        var Te = Z > 0;
        Te && (he = Ee + he), $e = he - Ee;
      }
      if (a = !!$e, T.x = ne, T.y = ee, T.rotation = $e, T.setStyle({
        verticalAlign: "middle"
      }), ie) {
        T.setStyle({
          align: K
        });
        var ct = T.states.select;
        ct && (ct.x += T.x, ct.y += T.y);
      } else {
        var ze = T.getBoundingRect().clone();
        ze.applyTransform(T.getComputedTransform());
        var ut = (T.style.margin || 0) + 2.1;
        ze.y -= ut / 2, ze.height += ut, n.push({
          label: T,
          labelLine: w,
          position: A,
          len: z,
          len2: W,
          minTurnAngle: V.get("minTurnAngle"),
          maxSurfaceAngle: V.get("maxSurfaceAngle"),
          surfaceNormal: new Ke(Q, Z),
          linePoints: oe,
          textAlign: K,
          labelDistance: D,
          labelAlignTo: E,
          edgeDistance: R,
          bleedMargin: N,
          rect: ze,
          unconstrainedWidth: ze.width,
          labelStyleWidth: T.style.width
        });
      }
      x.setTextConfig({
        inside: ie
      });
    }
  }), !a && t.get("avoidLabelOverlap") && f6e(n, r, i, l, u, d, c, f);
  for (var v = 0; v < n.length; v++) {
    var g = n[v], m = g.label, y = g.labelLine, b = isNaN(m.x) || isNaN(m.y);
    if (m) {
      m.setStyle({
        align: g.textAlign
      }), b && (k(m.states, h), m.ignore = !0);
      var _ = m.states.select;
      _ && (_.x += m.x, _.y += m.y);
    }
    if (y) {
      var O = g.linePoints;
      b || !O ? (k(y.states, h), y.ignore = !0) : (gte(O, g.minTurnAngle), k5e(O, g.surfaceNormal, g.maxSurfaceAngle), y.setShape({
        points: O
      }), m.__hostTarget.textGuideLineConfig = {
        anchor: new Ke(O[0][0], O[0][1])
      });
    }
  }
}
var h6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      a.z2 = 2;
      var o = new gt();
      return a.setTextContent(o), a.updateData(n, r, i, !0), a;
    }
    return e.prototype.updateData = function(n, r, i, a) {
      var o = this, s = n.hostModel, l = n.getItemModel(r), u = l.getModel("emphasis"), c = n.getItemLayout(r), f = le(Fc(l.getModel("itemStyle"), c, !0), c);
      if (isNaN(f.startAngle)) {
        o.setShape(f);
        return;
      }
      if (a) {
        o.setShape(f);
        var d = s.getShallow("animationType");
        s.ecModel.ssr ? (Yt(o, {
          scaleX: 0,
          scaleY: 0
        }, s, {
          dataIndex: r,
          isFrom: !0
        }), o.originX = f.cx, o.originY = f.cy) : d === "scale" ? (o.shape.r = c.r0, Yt(o, {
          shape: {
            r: c.r
          }
        }, s, r)) : i != null ? (o.setShape({
          startAngle: i,
          endAngle: i
        }), Yt(o, {
          shape: {
            startAngle: c.startAngle,
            endAngle: c.endAngle
          }
        }, s, r)) : (o.shape.endAngle = c.startAngle, Ct(o, {
          shape: {
            endAngle: c.endAngle
          }
        }, s, r));
      } else
        so(o), Ct(o, {
          shape: f
        }, s, r);
      o.useStyle(n.getItemVisual(r, "style")), Tr(o, l);
      var h = (c.startAngle + c.endAngle) / 2, p = s.get("selectedOffset"), v = Math.cos(h) * p, g = Math.sin(h) * p, m = l.getShallow("cursor");
      m && o.attr("cursor", m), this._updateLabel(s, n, r), o.ensureState("emphasis").shape = le({
        r: c.r + (u.get("scale") && u.get("scaleSize") || 0)
      }, Fc(u.getModel("itemStyle"), c)), le(o.ensureState("select"), {
        x: v,
        y: g,
        shape: Fc(l.getModel(["select", "itemStyle"]), c)
      }), le(o.ensureState("blur"), {
        shape: Fc(l.getModel(["blur", "itemStyle"]), c)
      });
      var y = o.getTextGuideLine(), b = o.getTextContent();
      y && le(y.ensureState("select"), {
        x: v,
        y: g
      }), le(b.ensureState("select"), {
        x: v,
        y: g
      }), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n, r, i) {
      var a = this, o = r.getItemModel(i), s = o.getModel("labelLine"), l = r.getItemVisual(i, "style"), u = l && l.fill, c = l && l.opacity;
      Pr(a, er(o), {
        labelFetcher: r.hostModel,
        labelDataIndex: i,
        inheritColor: u,
        defaultOpacity: c,
        defaultText: n.getFormattedLabel(i, "normal") || r.getName(i)
      });
      var f = a.getTextContent();
      a.setTextConfig({
        // reset position, rotation
        position: null,
        rotation: null
      }), f.attr({
        z2: 10
      });
      var d = n.get(["label", "position"]);
      if (d !== "outside" && d !== "outer")
        a.removeTextGuideLine();
      else {
        var h = this.getTextGuideLine();
        h || (h = new ai(), this.setTextGuideLine(h)), Ak(this, Ek(o), {
          stroke: u,
          opacity: ji(s.get(["lineStyle", "opacity"]), c, 1)
        });
      }
    }, e;
  }(ri)
), p6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.ignoreLabelLineUpdate = !0, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = n.getData(), s = this._data, l = this.group, u;
      if (!s && o.count() > 0) {
        for (var c = o.getItemLayout(0), f = 1; isNaN(c && c.startAngle) && f < o.count(); ++f)
          c = o.getItemLayout(f);
        c && (u = c.startAngle);
      }
      if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && n.get("showEmptyCircle")) {
        var d = Xte(n), h = new ri({
          shape: le(Ute(n, i), d)
        });
        h.useStyle(n.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = h, l.add(h);
      }
      o.diff(s).add(function(p) {
        var v = new h6e(o, p, u);
        o.setItemGraphicEl(p, v), l.add(v);
      }).update(function(p, v) {
        var g = s.getItemGraphicEl(v);
        g.updateData(o, p, u), g.off("click"), l.add(g), o.setItemGraphicEl(p, g);
      }).remove(function(p) {
        var v = s.getItemGraphicEl(p);
        wm(v, n, p);
      }).execute(), d6e(n), n.get("animationTypeUpdate") !== "expansion" && (this._data = o);
    }, e.prototype.dispose = function() {
    }, e.prototype.containPoint = function(n, r) {
      var i = r.getData(), a = i.getItemLayout(0);
      if (a) {
        var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
        return l <= a.r && l >= a.r0;
      }
    }, e.type = "pie", e;
  }(zt)
);
function Pp(t, e, n) {
  e = ue(e) && {
    coordDimensions: e
  } || le({
    encodeDefine: t.getEncode()
  }, e);
  var r = t.getSource(), i = wp(r, e).dimensions, a = new Lr(i, t);
  return a.initData(r, n), a;
}
var q0 = (
  /** @class */
  function() {
    function t(e, n) {
      this._getDataWithEncodedVisual = e, this._getRawData = n;
    }
    return t.prototype.getAllNames = function() {
      var e = this._getRawData();
      return e.mapArray(e.getName);
    }, t.prototype.containName = function(e) {
      var n = this._getRawData();
      return n.indexOfName(e) >= 0;
    }, t.prototype.indexOfName = function(e) {
      var n = this._getDataWithEncodedVisual();
      return n.indexOfName(e);
    }, t.prototype.getItemVisual = function(e, n) {
      var r = this._getDataWithEncodedVisual();
      return r.getItemVisual(e, n);
    }, t;
  }()
), v6e = bt(), g6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
    }, e.prototype.mergeOption = function() {
      t.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.getInitialData = function() {
      return Pp(this, {
        coordDimensions: ["value"],
        encodeDefaulter: Ue(nk, this)
      });
    }, e.prototype.getDataParams = function(n) {
      var r = this.getData(), i = v6e(r), a = i.seats;
      if (!a) {
        var o = [];
        r.each(r.mapDimension("value"), function(l) {
          o.push(l);
        }), a = i.seats = sK(o, r.hostModel.get("percentPrecision"));
      }
      var s = t.prototype.getDataParams.call(this, n);
      return s.percent = a[n] || 0, s.$vars.push("percent"), s;
    }, e.prototype._defaultLabelLine = function(n) {
      gf(n, "labelLine", ["show"]);
      var r = n.labelLine, i = n.emphasis.labelLine;
      r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
    }, e.type = "series.pie", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      colorBy: "data",
      // 默认全局居中
      center: ["50%", "50%"],
      radius: [0, "75%"],
      // 默认顺时针
      clockwise: !0,
      startAngle: 90,
      endAngle: "auto",
      padAngle: 0,
      // 最小角度改为0
      minAngle: 0,
      // If the angle of a sector less than `minShowLabelAngle`,
      // the label will not be displayed.
      minShowLabelAngle: 0,
      // 选中时扇区偏移量
      selectedOffset: 10,
      // 选择模式，默认关闭，可选single，multiple
      // selectedMode: false,
      // 南丁格尔玫瑰图模式，'radius'（半径） | 'area'（面积）
      // roseType: null,
      percentPrecision: 2,
      // If still show when all data zero.
      stillShowZeroSum: !0,
      // cursor: null,
      left: 0,
      top: 0,
      right: 0,
      bottom: 0,
      width: null,
      height: null,
      label: {
        // color: 'inherit',
        // If rotate around circle
        rotate: 0,
        show: !0,
        overflow: "truncate",
        // 'outer', 'inside', 'center'
        position: "outer",
        // 'none', 'labelLine', 'edge'. Works only when position is 'outer'
        alignTo: "none",
        // Closest distance between label and chart edge.
        // Works only position is 'outer' and alignTo is 'edge'.
        edgeDistance: "25%",
        // Works only position is 'outer' and alignTo is not 'edge'.
        bleedMargin: 10,
        // Distance between text and label line.
        distanceToLabelLine: 5
        // formatter: 标签文本格式器，同 tooltip.formatter，不支持异步回调
        // 默认使用全局文本样式，详见 textStyle
        // distance: 当position为inner时有效，为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数
      },
      // Enabled when label.normal.position is 'outer'
      labelLine: {
        show: !0,
        // 引导线两段中的第一段长度
        length: 15,
        // 引导线两段中的第二段长度
        length2: 15,
        smooth: !1,
        minTurnAngle: 90,
        maxSurfaceAngle: 90,
        lineStyle: {
          // color: 各异,
          width: 1,
          type: "solid"
        }
      },
      itemStyle: {
        borderWidth: 1,
        borderJoin: "round"
      },
      showEmptyCircle: !0,
      emptyCircleStyle: {
        color: "lightgray",
        opacity: 1
      },
      labelLayout: {
        // Hide the overlapped label.
        hideOverlap: !0
      },
      emphasis: {
        scale: !0,
        scaleSize: 5
      },
      // If use strategy to avoid label overlapping
      avoidLabelOverlap: !0,
      // Animation type. Valid values: expansion, scale
      animationType: "expansion",
      animationDuration: 1e3,
      // Animation type when update. Valid values: transition, expansion
      animationTypeUpdate: "transition",
      animationEasingUpdate: "cubicInOut",
      animationDurationUpdate: 500,
      animationEasing: "cubicInOut"
    }, e;
  }(Ht)
);
function m6e(t) {
  return {
    seriesType: t,
    reset: function(e, n) {
      var r = e.getData();
      r.filterSelf(function(i) {
        var a = r.mapDimension("value"), o = r.get(a, i);
        return !(St(o) && !isNaN(o) && o < 0);
      });
    }
  };
}
function y6e(t) {
  t.registerChartView(p6e), t.registerSeriesModel(g6e), pee("pie", t.registerAction), t.registerLayout(Ue(u6e, "pie")), t.registerProcessor(Y0("pie")), t.registerProcessor(m6e("pie"));
}
var b6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return us(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.getProgressive = function() {
      var n = this.option.progressive;
      return n ?? (this.option.large ? 5e3 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.option.progressiveThreshold;
      return n ?? (this.option.large ? 1e4 : this.get("progressiveThreshold"));
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.point(r.getItemLayout(n));
    }, e.prototype.getZLevelKey = function() {
      return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
    }, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      symbolSize: 10,
      // symbolRotate: null,  // 图形旋转控制
      large: !1,
      // Available when large is true
      largeThreshold: 2e3,
      // cursor: null,
      itemStyle: {
        opacity: 0.8
        // color: 各异
      },
      emphasis: {
        scale: !0
      },
      // If clip the overflow graphics
      // Works on cartesian / polar series
      clip: !0,
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      },
      universalTransition: {
        divideShape: "clone"
      }
      // progressive: null
    }, e;
  }(Ht)
), qte = 4, _6e = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), O6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r._off = 0, r.hoverDataIdx = -1, r;
    }
    return e.prototype.getDefaultShape = function() {
      return new _6e();
    }, e.prototype.reset = function() {
      this.notClear = !1, this._off = 0;
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = r.size, o = this.symbolProxy, s = o.shape, l = n.getContext ? n.getContext() : n, u = l && a[0] < qte, c = this.softClipShape, f;
      if (u) {
        this._ctx = l;
        return;
      }
      for (this._ctx = null, f = this._off; f < i.length; ) {
        var d = i[f++], h = i[f++];
        isNaN(d) || isNaN(h) || c && !c.contain(d, h) || (s.x = d - a[0] / 2, s.y = h - a[1] / 2, s.width = a[0], s.height = a[1], o.buildPath(n, s, !0));
      }
      this.incremental && (this._off = f, this.notClear = !0);
    }, e.prototype.afterBrush = function() {
      var n = this.shape, r = n.points, i = n.size, a = this._ctx, o = this.softClipShape, s;
      if (a) {
        for (s = this._off; s < r.length; ) {
          var l = r[s++], u = r[s++];
          isNaN(l) || isNaN(u) || o && !o.contain(l, u) || a.fillRect(l - i[0] / 2, u - i[1] / 2, i[0], i[1]);
        }
        this.incremental && (this._off = s, this.notClear = !0);
      }
    }, e.prototype.findDataIndex = function(n, r) {
      for (var i = this.shape, a = i.points, o = i.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = a.length / 2 - 1; u >= 0; u--) {
        var c = u * 2, f = a[c] - s / 2, d = a[c + 1] - l / 2;
        if (n >= f && r >= d && n <= f + s && r <= d + l)
          return u;
      }
      return -1;
    }, e.prototype.contain = function(n, r) {
      var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
      if (n = i[0], r = i[1], a.contain(n, r)) {
        var o = this.hoverDataIdx = this.findDataIndex(n, r);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var n = this._rect;
      if (!n) {
        for (var r = this.shape, i = r.points, a = r.size, o = a[0], s = a[1], l = 1 / 0, u = 1 / 0, c = -1 / 0, f = -1 / 0, d = 0; d < i.length; ) {
          var h = i[d++], p = i[d++];
          l = Math.min(h, l), c = Math.max(h, c), u = Math.min(p, u), f = Math.max(p, f);
        }
        n = this._rect = new Je(l - o / 2, u - s / 2, c - l + o, f - u + s);
      }
      return n;
    }, e;
  }(ot)
), S6e = (
  /** @class */
  function() {
    function t() {
      this.group = new Ve();
    }
    return t.prototype.updateData = function(e, n) {
      this._clear();
      var r = this._create();
      r.setShape({
        points: e.getLayout("points")
      }), this._setCommon(r, e, n);
    }, t.prototype.updateLayout = function(e) {
      var n = e.getLayout("points");
      this.group.eachChild(function(r) {
        if (r.startIndex != null) {
          var i = (r.endIndex - r.startIndex) * 2, a = r.startIndex * 4 * 2;
          n = new Float32Array(n.buffer, a, i);
        }
        r.setShape("points", n), r.reset();
      });
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._clear();
    }, t.prototype.incrementalUpdate = function(e, n, r) {
      var i = this._newAdded[0], a = n.getLayout("points"), o = i && i.shape.points;
      if (o && o.length < 2e4) {
        var s = o.length, l = new Float32Array(s + a.length);
        l.set(o), l.set(a, s), i.endIndex = e.end, i.setShape({
          points: l
        });
      } else {
        this._newAdded = [];
        var u = this._create();
        u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
          points: a
        }), this._setCommon(u, n, r);
      }
    }, t.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, t.prototype._create = function() {
      var e = new O6e({
        cursor: "default"
      });
      return e.ignoreCoarsePointer = !0, this.group.add(e), this._newAdded.push(e), e;
    }, t.prototype._setCommon = function(e, n, r) {
      var i = n.hostModel;
      r = r || {};
      var a = n.getVisual("symbolSize");
      e.setShape("size", a instanceof Array ? a : [a, a]), e.softClipShape = r.clipShape || null, e.symbolProxy = $n(n.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
      var o = e.shape.size[0] < qte;
      e.useStyle(
        // Draw shadow when doing fillRect is extremely slow.
        i.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
      );
      var s = n.getVisual("style"), l = s && s.fill;
      l && e.setColor(l);
      var u = Fe(e);
      u.seriesIndex = i.seriesIndex, e.on("mousemove", function(c) {
        u.dataIndex = null;
        var f = e.hoverDataIdx;
        f >= 0 && (u.dataIndex = f + (e.startIndex || 0));
      });
    }, t.prototype.remove = function() {
      this._clear();
    }, t.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, t;
  }()
), x6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._updateSymbolDraw(a, n);
      o.updateData(a, {
        // TODO
        // If this parameter should be a shape or a bounding volume
        // shape will be more general.
        // But bounding volume like bounding rect will be much faster in the contain calculation
        clipShape: this._getClipShape(n)
      }), this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      var a = n.getData(), o = this._updateSymbolDraw(a, n);
      o.incrementalPrepareUpdate(a), this._finished = !1;
    }, e.prototype.incrementalRender = function(n, r, i) {
      this._symbolDraw.incrementalUpdate(n, r.getData(), {
        clipShape: this._getClipShape(r)
      }), this._finished = n.end === r.getData().count();
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData();
      if (this.group.dirty(), !this._finished || a.count() > 1e4)
        return {
          update: !0
        };
      var o = X0("").reset(n, r, i);
      o.progress && o.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._symbolDraw.updateLayout(a);
    }, e.prototype.eachRendered = function(n) {
      this._symbolDraw && this._symbolDraw.eachRendered(n);
    }, e.prototype._getClipShape = function(n) {
      if (n.get("clip", !0)) {
        var r = n.coordinateSystem;
        return r && r.getArea && r.getArea(0.1);
      }
    }, e.prototype._updateSymbolDraw = function(n, r) {
      var i = this._symbolDraw, a = r.pipelineContext, o = a.large;
      return (!i || o !== this._isLargeDraw) && (i && i.remove(), i = this._symbolDraw = o ? new S6e() : new Z0(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(i.group), i;
    }, e.prototype.remove = function(n, r) {
      this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
    }, e.prototype.dispose = function() {
    }, e.type = "scatter", e;
  }(zt)
), w6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
      show: !1,
      // zlevel: 0,
      z: 0,
      left: "10%",
      top: 60,
      right: "10%",
      bottom: 70,
      // If grid size contain label
      containLabel: !1,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      backgroundColor: "rgba(0,0,0,0)",
      borderWidth: 1,
      borderColor: "#ccc"
    }, e;
  }(rt)
), uE = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("grid", Dn).models[0];
    }, e.type = "cartesian2dAxis", e;
  }(rt)
);
xn(uE, Tp);
var Kte = {
  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)"]
    }
  }
}, C6e = qe({
  // 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"
  }
}, Kte), Nk = qe({
  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
    }
  }
}, Kte), T6e = qe({
  splitNumber: 6,
  axisLabel: {
    // To eliminate labels that are not nice
    showMinLabel: !1,
    showMaxLabel: !1,
    rich: {
      primary: {
        fontWeight: "bold"
      }
    }
  },
  splitLine: {
    show: !1
  }
}, Nk), P6e = Re({
  logBase: 10
}, Nk);
const Jte = {
  category: C6e,
  value: Nk,
  time: T6e,
  log: P6e
};
var $6e = {
  value: 1,
  category: 1,
  time: 1,
  log: 1
};
function Qh(t, e, n, r) {
  k($6e, function(i, a) {
    var o = qe(qe({}, Jte[a], !0), r, !0), s = (
      /** @class */
      function(l) {
        q(u, l);
        function u() {
          var c = l !== null && l.apply(this, arguments) || this;
          return c.type = e + "Axis." + a, c;
        }
        return u.prototype.mergeDefaultAndTheme = function(c, f) {
          var d = Tm(this), h = d ? bp(c) : {}, p = f.getTheme();
          qe(c, p.get(a + "Axis")), qe(c, this.getDefaultOption()), c.type = UV(c), d && cu(c, h, d);
        }, u.prototype.optionUpdated = function() {
          var c = this.option;
          c.type === "category" && (this.__ordinalMeta = tE.createByAxisModel(this));
        }, u.prototype.getCategories = function(c) {
          var f = this.option;
          if (f.type === "category")
            return c ? f.data : this.__ordinalMeta.categories;
        }, u.prototype.getOrdinalMeta = function() {
          return this.__ordinalMeta;
        }, u.type = e + "Axis." + a, u.defaultOption = o, u;
      }(n)
    );
    t.registerComponentModel(s);
  }), t.registerSubTypeDefaulter(e + "Axis", UV);
}
function UV(t) {
  return t.type || (t.data ? "category" : "value");
}
var A6e = (
  /** @class */
  function() {
    function t(e) {
      this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
    }
    return t.prototype.getAxis = function(e) {
      return this._axes[e];
    }, t.prototype.getAxes = function() {
      return ce(this._dimList, function(e) {
        return this._axes[e];
      }, this);
    }, t.prototype.getAxesByScale = function(e) {
      return e = e.toLowerCase(), Nt(this.getAxes(), function(n) {
        return n.scale.type === e;
      });
    }, t.prototype.addAxis = function(e) {
      var n = e.dim;
      this._axes[n] = e, this._dimList.push(n);
    }, t;
  }()
), cE = ["x", "y"];
function XV(t) {
  return t.type === "interval" || t.type === "time";
}
var E6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "cartesian2d", n.dimensions = cE, n;
    }
    return e.prototype.calcAffineTransform = function() {
      this._transform = this._invTransform = null;
      var n = this.getAxis("x").scale, r = this.getAxis("y").scale;
      if (!(!XV(n) || !XV(r))) {
        var i = n.getExtent(), a = r.getExtent(), o = this.dataToPoint([i[0], a[0]]), s = this.dataToPoint([i[1], a[1]]), l = i[1] - i[0], u = a[1] - a[0];
        if (!(!l || !u)) {
          var c = (s[0] - o[0]) / l, f = (s[1] - o[1]) / u, d = o[0] - i[0] * c, h = o[1] - a[0] * f, p = this._transform = [c, 0, 0, f, d, h];
          this._invTransform = kf([], p);
        }
      }
    }, e.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
    }, e.prototype.containPoint = function(n) {
      var r = this.getAxis("x"), i = this.getAxis("y");
      return r.contain(r.toLocalCoord(n[0])) && i.contain(i.toLocalCoord(n[1]));
    }, e.prototype.containData = function(n) {
      return this.getAxis("x").containData(n[0]) && this.getAxis("y").containData(n[1]);
    }, e.prototype.containZone = function(n, r) {
      var i = this.dataToPoint(n), a = this.dataToPoint(r), o = this.getArea(), s = new Je(i[0], i[1], a[0] - i[0], a[1] - i[1]);
      return o.intersect(s);
    }, e.prototype.dataToPoint = function(n, r, i) {
      i = i || [];
      var a = n[0], o = n[1];
      if (this._transform && a != null && isFinite(a) && o != null && isFinite(o))
        return ar(i, n, this._transform);
      var s = this.getAxis("x"), l = this.getAxis("y");
      return i[0] = s.toGlobalCoord(s.dataToCoord(a, r)), i[1] = l.toGlobalCoord(l.dataToCoord(o, r)), i;
    }, e.prototype.clampData = function(n, r) {
      var i = this.getAxis("x").scale, a = this.getAxis("y").scale, o = i.getExtent(), s = a.getExtent(), l = i.parse(n[0]), u = a.parse(n[1]);
      return r = r || [], r[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), r[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), r;
    }, e.prototype.pointToData = function(n, r) {
      var i = [];
      if (this._invTransform)
        return ar(i, n, this._invTransform);
      var a = this.getAxis("x"), o = this.getAxis("y");
      return i[0] = a.coordToData(a.toLocalCoord(n[0]), r), i[1] = o.coordToData(o.toLocalCoord(n[1]), r), i;
    }, e.prototype.getOtherAxis = function(n) {
      return this.getAxis(n.dim === "x" ? "y" : "x");
    }, e.prototype.getArea = function(n) {
      n = n || 0;
      var r = this.getAxis("x").getGlobalExtent(), i = this.getAxis("y").getGlobalExtent(), a = Math.min(r[0], r[1]) - n, o = Math.min(i[0], i[1]) - n, s = Math.max(r[0], r[1]) - a + n, l = Math.max(i[0], i[1]) - o + n;
      return new Je(a, o, s, l);
    }, e;
  }(A6e)
), M6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.index = 0, s.type = a || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var n = this.position;
      return n === "top" || n === "bottom";
    }, e.prototype.getGlobalExtent = function(n) {
      var r = this.getExtent();
      return r[0] = this.toGlobalCoord(r[0]), r[1] = this.toGlobalCoord(r[1]), n && r[0] > r[1] && r.reverse(), r;
    }, e.prototype.pointToData = function(n, r) {
      return this.coordToData(this.toLocalCoord(n[this.dim === "x" ? 0 : 1]), r);
    }, e.prototype.setCategorySortInfo = function(n) {
      if (this.type !== "category")
        return !1;
      this.model.option.categorySortInfo = n, this.scale.setSortInfo(n);
    }, e;
  }(Ba)
);
function fE(t, e, n) {
  n = n || {};
  var r = t.coordinateSystem, i = e.axis, a = {}, o = i.getAxesOnZeroOf()[0], s = i.position, l = o ? "onZero" : s, u = i.dim, c = r.getRect(), f = [c.x, c.x + c.width, c.y, c.y + c.height], d = {
    left: 0,
    right: 1,
    top: 0,
    bottom: 1,
    onZero: 2
  }, h = e.get("offset") || 0, p = u === "x" ? [f[2] - h, f[3] + h] : [f[0] - h, f[1] + h];
  if (o) {
    var v = o.toGlobalCoord(o.dataToCoord(0));
    p[d.onZero] = Math.max(Math.min(v, p[1]), p[0]);
  }
  a.position = [u === "y" ? p[d[l]] : f[0], u === "x" ? p[d[l]] : f[3]], a.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
  var g = {
    top: -1,
    bottom: 1,
    left: -1,
    right: 1
  };
  a.labelDirection = a.tickDirection = a.nameDirection = g[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), Tn(n.labelInside, e.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
  var m = e.get(["axisLabel", "rotate"]);
  return a.labelRotate = l === "top" ? -m : m, a.z2 = 1, a;
}
function YV(t) {
  return t.get("coordinateSystem") === "cartesian2d";
}
function qV(t) {
  var e = {
    xAxisModel: null,
    yAxisModel: null
  };
  return k(e, function(n, r) {
    var i = r.replace(/Model$/, ""), a = t.getReferringComponents(i, Dn).models[0];
    if (process.env.NODE_ENV !== "production" && !a)
      throw new Error(i + ' "' + ji(t.get(i + "Index"), t.get(i + "Id"), 0) + '" not found');
    e[r] = a;
  }), e;
}
var oP = Math.log;
function ene(t, e, n) {
  var r = Ys.prototype, i = r.getTicks.call(n), a = r.getTicks.call(n, !0), o = i.length - 1, s = r.getInterval.call(n), l = rte(t, e), u = l.extent, c = l.fixMin, f = l.fixMax;
  if (t.type === "log") {
    var d = oP(t.base);
    u = [oP(u[0]) / d, oP(u[1]) / d];
  }
  t.setExtent(u[0], u[1]), t.calcNiceExtent({
    splitNumber: o,
    fixMin: c,
    fixMax: f
  });
  var h = r.getExtent.call(t);
  c && (u[0] = h[0]), f && (u[1] = h[1]);
  var p = r.getInterval.call(t), v = u[0], g = u[1];
  if (c && f)
    p = (g - v) / o;
  else if (c)
    for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
      p = GT(p), g = u[0] + p * o;
  else if (f)
    for (v = u[1] - p * o; v > u[0] && isFinite(v) && isFinite(u[0]); )
      p = GT(p), v = u[1] - p * o;
  else {
    var m = t.getTicks().length - 1;
    m > o && (p = GT(p));
    var y = p * o;
    g = Math.ceil(u[1] / p) * p, v = mn(g - y), v < 0 && u[0] >= 0 ? (v = 0, g = mn(y)) : g > 0 && u[1] <= 0 && (g = 0, v = -mn(y));
  }
  var b = (i[0].value - a[0].value) / s, _ = (i[o].value - a[o].value) / s;
  if (r.setExtent.call(t, v + p * b, g + p * _), r.setInterval.call(t, p), (b || _) && r.setNiceExtent.call(t, v + p, g - p), process.env.NODE_ENV !== "production") {
    var O = r.getTicks.call(t);
    O[1] && (!PNe(p) || iO(O[1].value) > iO(p)) && dn(
      // eslint-disable-next-line
      "The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
    );
  }
}
var I6e = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = cE, this._initCartesian(e, n, r), this.model = e;
    }
    return t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype.update = function(e, n) {
      var r = this._axesMap;
      this._updateScale(e, this.model);
      function i(o) {
        var s, l = st(o), u = l.length;
        if (u) {
          for (var c = [], f = u - 1; f >= 0; f--) {
            var d = +l[f], h = o[d], p = h.model, v = h.scale;
            // Only value and log axis without interval support alignTicks.
            nE(v) && p.get("alignTicks") && p.get("interval") == null ? c.push(h) : (Of(v, p), nE(v) && (s = h));
          }
          c.length && (s || (s = c.pop(), Of(s.scale, s.model)), k(c, function(g) {
            ene(g.scale, g.model, s.scale);
          }));
        }
      }
      i(r.x), i(r.y);
      var a = {};
      k(r.x, function(o) {
        KV(r, "y", o, a);
      }), k(r.y, function(o) {
        KV(r, "x", o, a);
      }), this.resize(this.model, n);
    }, t.prototype.resize = function(e, n, r) {
      var i = e.getBoxLayoutParams(), a = !r && e.get("containLabel"), o = Rn(i, {
        width: n.getWidth(),
        height: n.getHeight()
      });
      this._rect = o;
      var s = this._axesList;
      l(), a && (k(s, function(u) {
        if (!u.model.get(["axisLabel", "inside"])) {
          var c = qNe(u);
          if (c) {
            var f = u.isHorizontal() ? "height" : "width", d = u.model.get(["axisLabel", "margin"]);
            o[f] -= c[f] + d, u.position === "top" ? o.y += c.height + d : u.position === "left" && (o.x += c.width + d);
          }
        }
      }), l()), k(this._coordsList, function(u) {
        u.calcAffineTransform();
      });
      function l() {
        k(s, function(u) {
          var c = u.isHorizontal(), f = c ? [0, o.width] : [0, o.height], d = u.inverse ? 1 : 0;
          u.setExtent(f[d], f[1 - d]), D6e(u, c ? o.x : o.y);
        });
      }
    }, t.prototype.getAxis = function(e, n) {
      var r = this._axesMap[e];
      if (r != null)
        return r[n || 0];
    }, t.prototype.getAxes = function() {
      return this._axesList.slice();
    }, t.prototype.getCartesian = function(e, n) {
      if (e != null && n != null) {
        var r = "x" + e + "y" + n;
        return this._coordsMap[r];
      }
      Ie(e) && (n = e.yAxisIndex, e = e.xAxisIndex);
      for (var i = 0, a = this._coordsList; i < a.length; i++)
        if (a[i].getAxis("x").index === e || a[i].getAxis("y").index === n)
          return a[i];
    }, t.prototype.getCartesians = function() {
      return this._coordsList.slice();
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = this._findConvertTarget(n);
      return i.cartesian ? i.cartesian.dataToPoint(r) : i.axis ? i.axis.toGlobalCoord(i.axis.dataToCoord(r)) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = this._findConvertTarget(n);
      return i.cartesian ? i.cartesian.pointToData(r) : i.axis ? i.axis.coordToData(i.axis.toLocalCoord(r)) : null;
    }, t.prototype._findConvertTarget = function(e) {
      var n = e.seriesModel, r = e.xAxisModel || n && n.getReferringComponents("xAxis", Dn).models[0], i = e.yAxisModel || n && n.getReferringComponents("yAxis", Dn).models[0], a = e.gridModel, o = this._coordsList, s, l;
      if (n)
        s = n.coordinateSystem, et(o, s) < 0 && (s = null);
      else if (r && i)
        s = this.getCartesian(r.componentIndex, i.componentIndex);
      else if (r)
        l = this.getAxis("x", r.componentIndex);
      else if (i)
        l = this.getAxis("y", i.componentIndex);
      else if (a) {
        var u = a.coordinateSystem;
        u === this && (s = this._coordsList[0]);
      }
      return {
        cartesian: s,
        axis: l
      };
    }, t.prototype.containPoint = function(e) {
      var n = this._coordsList[0];
      if (n)
        return n.containPoint(e);
    }, t.prototype._initCartesian = function(e, n, r) {
      var i = this, a = this, o = {
        left: !1,
        right: !1,
        top: !1,
        bottom: !1
      }, s = {
        x: {},
        y: {}
      }, l = {
        x: 0,
        y: 0
      };
      if (n.eachComponent("xAxis", u("x"), this), n.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
        this._axesMap = {}, this._axesList = [];
        return;
      }
      this._axesMap = s, k(s.x, function(c, f) {
        k(s.y, function(d, h) {
          var p = "x" + f + "y" + h, v = new E6e(p);
          v.master = i, v.model = e, i._coordsMap[p] = v, i._coordsList.push(v), v.addAxis(c), v.addAxis(d);
        });
      });
      function u(c) {
        return function(f, d) {
          if (sP(f, e)) {
            var h = f.get("position");
            c === "x" ? h !== "top" && h !== "bottom" && (h = o.bottom ? "top" : "bottom") : h !== "left" && h !== "right" && (h = o.left ? "right" : "left"), o[h] = !0;
            var p = new M6e(c, G0(f), [0, 0], f.get("type"), h), v = p.type === "category";
            p.onBand = v && f.get("boundaryGap"), p.inverse = f.get("inverse"), f.axis = p, p.model = f, p.grid = a, p.index = d, a._axesList.push(p), s[c][d] = p, l[c]++;
          }
        };
      }
    }, t.prototype._updateScale = function(e, n) {
      k(this._axesList, function(i) {
        if (i.scale.setExtent(1 / 0, -1 / 0), i.type === "category") {
          var a = i.model.get("categorySortInfo");
          i.scale.setSortInfo(a);
        }
      }), e.eachSeries(function(i) {
        if (YV(i)) {
          var a = qV(i), o = a.xAxisModel, s = a.yAxisModel;
          if (!sP(o, n) || !sP(s, n))
            return;
          var l = this.getCartesian(o.componentIndex, s.componentIndex), u = i.getData(), c = l.getAxis("x"), f = l.getAxis("y");
          r(u, c), r(u, f);
        }
      }, this);
      function r(i, a) {
        k(CO(i, a.dim), function(o) {
          a.scale.unionExtentFromData(i, o);
        });
      }
    }, t.prototype.getTooltipAxes = function(e) {
      var n = [], r = [];
      return k(this.getCartesians(), function(i) {
        var a = e != null && e !== "auto" ? i.getAxis(e) : i.getBaseAxis(), o = i.getOtherAxis(a);
        et(n, a) < 0 && n.push(a), et(r, o) < 0 && r.push(o);
      }), {
        baseAxes: n,
        otherAxes: r
      };
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("grid", function(i, a) {
        var o = new t(i, e, n);
        o.name = "grid_" + a, o.resize(i, n, !0), i.coordinateSystem = o, r.push(o);
      }), e.eachSeries(function(i) {
        if (YV(i)) {
          var a = qV(i), o = a.xAxisModel, s = a.yAxisModel, l = o.getCoordSysModel();
          if (process.env.NODE_ENV !== "production") {
            if (!l)
              throw new Error('Grid "' + ji(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
            if (o.getCoordSysModel() !== s.getCoordSysModel())
              throw new Error("xAxis and yAxis must use the same grid");
          }
          var u = l.coordinateSystem;
          i.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
        }
      }), r;
    }, t.dimensions = cE, t;
  }()
);
function sP(t, e) {
  return t.getCoordSysModel() === e;
}
function KV(t, e, n, r) {
  n.getAxesOnZeroOf = function() {
    return a ? [a] : [];
  };
  var i = t[e], a, o = n.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
  if (!s)
    return;
  if (l != null)
    JV(i[l]) && (a = i[l]);
  else
    for (var u in i)
      if (i.hasOwnProperty(u) && JV(i[u]) && !r[c(i[u])]) {
        a = i[u];
        break;
      }
  a && (r[c(a)] = !0);
  function c(f) {
    return f.dim + "_" + f.index;
  }
}
function JV(t) {
  return t && t.type !== "category" && t.type !== "time" && YNe(t);
}
function D6e(t, e) {
  var n = t.getExtent(), r = n[0] + n[1];
  t.toGlobalCoord = t.dim === "x" ? function(i) {
    return i + e;
  } : function(i) {
    return r - i + e;
  }, t.toLocalCoord = t.dim === "x" ? function(i) {
    return i - e;
  } : function(i) {
    return r - i + e;
  };
}
var zl = Math.PI, Kr = (
  /** @class */
  function() {
    function t(e, n) {
      this.group = new Ve(), this.opt = n, this.axisModel = e, Re(n, {
        labelOffset: 0,
        nameDirection: 1,
        tickDirection: 1,
        labelDirection: 1,
        silent: !0,
        handleAutoShown: function() {
          return !0;
        }
      });
      var r = new Ve({
        x: n.position[0],
        y: n.position[1],
        rotation: n.rotation
      });
      r.updateTransform(), this._transformGroup = r;
    }
    return t.prototype.hasBuilder = function(e) {
      return !!eF[e];
    }, t.prototype.add = function(e) {
      eF[e](this.opt, this.axisModel, this.group, this._transformGroup);
    }, t.prototype.getGroup = function() {
      return this.group;
    }, t.innerTextLayout = function(e, n, r) {
      var i = PR(n - e), a, o;
      return Lh(i) ? (o = r > 0 ? "top" : "bottom", a = "center") : Lh(i - zl) ? (o = r > 0 ? "bottom" : "top", a = "center") : (o = "middle", i > 0 && i < zl ? a = r > 0 ? "right" : "left" : a = r > 0 ? "left" : "right"), {
        rotation: i,
        textAlign: a,
        textVerticalAlign: o
      };
    }, t.makeAxisEventDataBase = function(e) {
      var n = {
        componentType: e.mainType,
        componentIndex: e.componentIndex
      };
      return n[e.mainType + "Index"] = e.componentIndex, n;
    }, t.isLabelSilent = function(e) {
      var n = e.get("tooltip");
      return e.get("silent") || !(e.get("triggerEvent") || n && n.show);
    }, t;
  }()
), eF = {
  axisLine: function(t, e, n, r) {
    var i = e.get(["axisLine", "show"]);
    if (i === "auto" && t.handleAutoShown && (i = t.handleAutoShown("axisLine")), !!i) {
      var a = e.axis.getExtent(), o = r.transform, s = [a[0], 0], l = [a[1], 0], u = s[0] > l[0];
      o && (ar(s, s, o), ar(l, l, o));
      var c = le({
        lineCap: "round"
      }, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new Un({
        shape: {
          x1: s[0],
          y1: s[1],
          x2: l[0],
          y2: l[1]
        },
        style: c,
        strokeContainThreshold: t.strokeContainThreshold || 5,
        silent: !0,
        z2: 1
      });
      zh(f.shape, f.style.lineWidth), f.anid = "line", n.add(f);
      var d = e.get(["axisLine", "symbol"]);
      if (d != null) {
        var h = e.get(["axisLine", "symbolSize"]);
        Oe(d) && (d = [d, d]), (Oe(h) || St(h)) && (h = [h, h]);
        var p = Vf(e.get(["axisLine", "symbolOffset"]) || 0, h), v = h[0], g = h[1];
        k([{
          rotate: t.rotation + Math.PI / 2,
          offset: p[0],
          r: 0
        }, {
          rotate: t.rotation - Math.PI / 2,
          offset: p[1],
          r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
        }], function(m, y) {
          if (d[y] !== "none" && d[y] != null) {
            var b = $n(d[y], -v / 2, -g / 2, v, g, c.stroke, !0), _ = m.r + m.offset, O = u ? l : s;
            b.attr({
              rotation: m.rotate,
              x: O[0] + _ * Math.cos(t.rotation),
              y: O[1] - _ * Math.sin(t.rotation),
              silent: !0,
              z2: 11
            }), n.add(b);
          }
        });
      }
    }
  },
  axisTickLabel: function(t, e, n, r) {
    var i = L6e(n, r, e, t), a = B6e(n, r, e, t);
    if (k6e(e, a, i), N6e(n, r, e, t.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
      var o = mte(ce(a, function(s) {
        return {
          label: s,
          priority: s.z2,
          defaultAttr: {
            ignore: s.ignore
          }
        };
      }));
      _te(o);
    }
  },
  axisName: function(t, e, n, r) {
    var i = Tn(t.axisName, e.get("name"));
    if (i) {
      var a = e.get("nameLocation"), o = t.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), c = u[0] > u[1] ? -1 : 1, f = [
        a === "start" ? u[0] - c * l : a === "end" ? u[1] + c * l : (u[0] + u[1]) / 2,
        // Reuse labelOffset.
        nF(a) ? t.labelOffset + o * l : 0
      ], d, h = e.get("nameRotate");
      h != null && (h = h * zl / 180);
      var p;
      nF(a) ? d = Kr.innerTextLayout(
        t.rotation,
        h ?? t.rotation,
        // Adapt to axis.
        o
      ) : (d = R6e(t.rotation, a, h || 0, u), p = t.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(d.rotation)), !isFinite(p) && (p = null)));
      var v = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, y = Tn(t.nameTruncateMaxWidth, g.maxWidth, p), b = new gt({
        x: f[0],
        y: f[1],
        rotation: d.rotation,
        silent: Kr.isLabelSilent(e),
        style: Zt(s, {
          text: i,
          font: v,
          overflow: "truncate",
          width: y,
          ellipsis: m,
          fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          align: s.get("align") || d.textAlign,
          verticalAlign: s.get("verticalAlign") || d.textVerticalAlign
        }),
        z2: 1
      });
      if (gp({
        el: b,
        componentModel: e,
        itemName: i
      }), b.__fullText = i, b.anid = "name", e.get("triggerEvent")) {
        var _ = Kr.makeAxisEventDataBase(e);
        _.targetType = "axisName", _.name = i, Fe(b).eventData = _;
      }
      r.add(b), b.updateTransform(), n.add(b), b.decomposeTransform();
    }
  }
};
function R6e(t, e, n, r) {
  var i = PR(n - t), a, o, s = r[0] > r[1], l = e === "start" && !s || e !== "start" && s;
  return Lh(i - zl / 2) ? (o = l ? "bottom" : "top", a = "center") : Lh(i - zl * 1.5) ? (o = l ? "top" : "bottom", a = "center") : (o = "middle", i < zl * 1.5 && i > zl / 2 ? a = l ? "left" : "right" : a = l ? "right" : "left"), {
    rotation: i,
    textAlign: a,
    textVerticalAlign: o
  };
}
function k6e(t, e, n) {
  if (!ite(t.axis)) {
    var r = t.get(["axisLabel", "showMinLabel"]), i = t.get(["axisLabel", "showMaxLabel"]);
    e = e || [], n = n || [];
    var a = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = n[0], c = n[1], f = n[n.length - 1], d = n[n.length - 2];
    r === !1 ? (na(a), na(u)) : tF(a, o) && (r ? (na(o), na(c)) : (na(a), na(u))), i === !1 ? (na(s), na(f)) : tF(l, s) && (i ? (na(l), na(d)) : (na(s), na(f)));
  }
}
function na(t) {
  t && (t.ignore = !0);
}
function tF(t, e) {
  var n = t && t.getBoundingRect().clone(), r = e && e.getBoundingRect().clone();
  if (!(!n || !r)) {
    var i = D0([]);
    return Cu(i, i, -t.rotation), n.applyTransform(Uo([], i, t.getLocalTransform())), r.applyTransform(Uo([], i, e.getLocalTransform())), n.intersect(r);
  }
}
function nF(t) {
  return t === "middle" || t === "center";
}
function tne(t, e, n, r, i) {
  for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
    var u = t[l].coord;
    o[0] = u, o[1] = 0, s[0] = u, s[1] = n, e && (ar(o, o, e), ar(s, s, e));
    var c = new Un({
      shape: {
        x1: o[0],
        y1: o[1],
        x2: s[0],
        y2: s[1]
      },
      style: r,
      z2: 2,
      autoBatch: !0,
      silent: !0
    });
    zh(c.shape, c.style.lineWidth), c.anid = i + "_" + t[l].tickValue, a.push(c);
  }
  return a;
}
function L6e(t, e, n, r) {
  var i = n.axis, a = n.getModel("axisTick"), o = a.get("show");
  if (o === "auto" && r.handleAutoShown && (o = r.handleAutoShown("axisTick")), !(!o || i.scale.isBlank())) {
    for (var s = a.getModel("lineStyle"), l = r.tickDirection * a.get("length"), u = i.getTicksCoords(), c = tne(u, e.transform, l, Re(s.getLineStyle(), {
      stroke: n.get(["axisLine", "lineStyle", "color"])
    }), "ticks"), f = 0; f < c.length; f++)
      t.add(c[f]);
    return c;
  }
}
function N6e(t, e, n, r) {
  var i = n.axis, a = n.getModel("minorTick");
  if (!(!a.get("show") || i.scale.isBlank())) {
    var o = i.getMinorTicksCoords();
    if (o.length)
      for (var s = a.getModel("lineStyle"), l = r * a.get("length"), u = Re(s.getLineStyle(), Re(n.getModel("axisTick").getLineStyle(), {
        stroke: n.get(["axisLine", "lineStyle", "color"])
      })), c = 0; c < o.length; c++)
        for (var f = tne(o[c], e.transform, l, u, "minorticks_" + c), d = 0; d < f.length; d++)
          t.add(f[d]);
  }
}
function B6e(t, e, n, r) {
  var i = n.axis, a = Tn(r.axisLabelShow, n.get(["axisLabel", "show"]));
  if (!(!a || i.scale.isBlank())) {
    var o = n.getModel("axisLabel"), s = o.get("margin"), l = i.getViewLabels(), u = (Tn(r.labelRotate, o.get("rotate")) || 0) * zl / 180, c = Kr.innerTextLayout(r.rotation, u, r.labelDirection), f = n.getCategories && n.getCategories(!0), d = [], h = Kr.isLabelSilent(n), p = n.get("triggerEvent");
    return k(l, function(v, g) {
      var m = i.scale.type === "ordinal" ? i.scale.getRawOrdinalNumber(v.tickValue) : v.tickValue, y = v.formattedLabel, b = v.rawLabel, _ = o;
      if (f && f[m]) {
        var O = f[m];
        Ie(O) && O.textStyle && (_ = new Wt(O.textStyle, o, n.ecModel));
      }
      var S = _.getTextColor() || n.get(["axisLine", "lineStyle", "color"]), x = i.dataToCoord(m), C = _.getShallow("align", !0) || c.textAlign, T = We(_.getShallow("alignMinLabel", !0), C), w = We(_.getShallow("alignMaxLabel", !0), C), P = _.getShallow("verticalAlign", !0) || _.getShallow("baseline", !0) || c.textVerticalAlign, $ = We(_.getShallow("verticalAlignMinLabel", !0), P), A = We(_.getShallow("verticalAlignMaxLabel", !0), P), D = new gt({
        x,
        y: r.labelOffset + r.labelDirection * s,
        rotation: c.rotation,
        silent: h,
        z2: 10 + (v.level || 0),
        style: Zt(_, {
          text: y,
          align: g === 0 ? T : g === l.length - 1 ? w : C,
          verticalAlign: g === 0 ? $ : g === l.length - 1 ? A : P,
          fill: Me(S) ? S(
            // (1) In category axis with data zoom, tick is not the original
            // index of axis.data. So tick should not be exposed to user
            // in category axis.
            // (2) Compatible with previous version, which always use formatted label as
            // input. But in interval scale the formatted label is like '223,445', which
            // maked user replace ','. So we modify it to return original val but remain
            // it as 'string' to avoid error in replacing.
            i.type === "category" ? b : i.type === "value" ? m + "" : m,
            g
          ) : S
        })
      });
      if (D.anid = "label_" + m, p) {
        var E = Kr.makeAxisEventDataBase(n);
        E.targetType = "axisLabel", E.value = b, E.tickIndex = g, i.type === "category" && (E.dataIndex = m), Fe(D).eventData = E;
      }
      e.add(D), D.updateTransform(), d.push(D), t.add(D), D.decomposeTransform();
    }), d;
  }
}
function z6e(t, e) {
  var n = {
    /**
     * key: makeKey(axis.model)
     * value: {
     *      axis,
     *      coordSys,
     *      axisPointerModel,
     *      triggerTooltip,
     *      triggerEmphasis,
     *      involveSeries,
     *      snap,
     *      seriesModels,
     *      seriesDataCount
     * }
     */
    axesInfo: {},
    seriesInvolved: !1,
    /**
     * key: makeKey(coordSys.model)
     * value: Object: key makeKey(axis.model), value: axisInfo
     */
    coordSysAxesInfo: {},
    coordSysMap: {}
  };
  return V6e(n, t, e), n.seriesInvolved && W6e(n, t), n;
}
function V6e(t, e, n) {
  var r = e.getComponent("tooltip"), i = e.getComponent("axisPointer"), a = i.get("link", !0) || [], o = [];
  k(n.getCoordinateSystems(), function(s) {
    if (!s.axisPointerEnabled)
      return;
    var l = km(s.model), u = t.coordSysAxesInfo[l] = {};
    t.coordSysMap[l] = s;
    var c = s.model, f = c.getModel("tooltip", r);
    if (k(s.getAxes(), Ue(v, !1, null)), s.getTooltipAxes && r && f.get("show")) {
      var d = f.get("trigger") === "axis", h = f.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(f.get(["axisPointer", "axis"]));
      (d || h) && k(p.baseAxes, Ue(v, h ? "cross" : !0, d)), h && k(p.otherAxes, Ue(v, "cross", !1));
    }
    function v(g, m, y) {
      var b = y.model.getModel("axisPointer", i), _ = b.get("show");
      if (!(!_ || _ === "auto" && !g && !dE(b))) {
        m == null && (m = b.get("triggerTooltip")), b = g ? F6e(y, f, i, e, g, m) : b;
        var O = b.get("snap"), S = b.get("triggerEmphasis"), x = km(y.model), C = m || O || y.type === "category", T = t.axesInfo[x] = {
          key: x,
          axis: y,
          coordSys: s,
          axisPointerModel: b,
          triggerTooltip: m,
          triggerEmphasis: S,
          involveSeries: C,
          snap: O,
          useHandle: dE(b),
          seriesModels: [],
          linkGroup: null
        };
        u[x] = T, t.seriesInvolved = t.seriesInvolved || C;
        var w = Q6e(a, y);
        if (w != null) {
          var P = o[w] || (o[w] = {
            axesInfo: {}
          });
          P.axesInfo[x] = T, P.mapper = a[w].mapper, T.linkGroup = P;
        }
      }
    }
  });
}
function F6e(t, e, n, r, i, a) {
  var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
  k(s, function(d) {
    l[d] = Le(o.get(d));
  }), l.snap = t.type !== "category" && !!a, o.get("type") === "cross" && (l.type = "line");
  var u = l.label || (l.label = {});
  if (u.show == null && (u.show = !1), i === "cross") {
    var c = o.get(["label", "show"]);
    if (u.show = c ?? !0, !a) {
      var f = l.lineStyle = o.get("crossStyle");
      f && Re(u, f.textStyle);
    }
  }
  return t.model.getModel("axisPointer", new Wt(l, n, r));
}
function W6e(t, e) {
  e.eachSeries(function(n) {
    var r = n.coordinateSystem, i = n.get(["tooltip", "trigger"], !0), a = n.get(["tooltip", "show"], !0);
    !r || i === "none" || i === !1 || i === "item" || a === !1 || n.get(["axisPointer", "show"], !0) === !1 || k(t.coordSysAxesInfo[km(r.model)], function(o) {
      var s = o.axis;
      r.getAxis(s.dim) === s && (o.seriesModels.push(n), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += n.getData().count());
    });
  });
}
function Q6e(t, e) {
  for (var n = e.model, r = e.dim, i = 0; i < t.length; i++) {
    var a = t[i] || {};
    if (lP(a[r + "AxisId"], n.id) || lP(a[r + "AxisIndex"], n.componentIndex) || lP(a[r + "AxisName"], n.name))
      return i;
  }
}
function lP(t, e) {
  return t === "all" || ue(t) && et(t, e) >= 0 || t === e;
}
function H6e(t) {
  var e = Bk(t);
  if (e) {
    var n = e.axisPointerModel, r = e.axis.scale, i = n.option, a = n.get("status"), o = n.get("value");
    o != null && (o = r.parse(o));
    var s = dE(n);
    a == null && (i.status = s ? "show" : "hide");
    var l = r.getExtent().slice();
    l[0] > l[1] && l.reverse(), // Pick a value on axis when initializing.
    (o == null || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), i.value = o, s && (i.status = e.axis.scale.isBlank() ? "hide" : "show");
  }
}
function Bk(t) {
  var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  return e && e.axesInfo[km(t)];
}
function G6e(t) {
  var e = Bk(t);
  return e && e.axisPointerModel;
}
function dE(t) {
  return !!t.get(["handle", "show"]);
}
function km(t) {
  return t.type + "||" + t.id;
}
var uP = {}, Wf = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.axisPointerClass && H6e(n), t.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(n, i, !0);
    }, e.prototype.updateAxisPointer = function(n, r, i, a) {
      this._doUpdateAxisPointerClass(n, i, !1);
    }, e.prototype.remove = function(n, r) {
      var i = this._axisPointer;
      i && i.remove(r);
    }, e.prototype.dispose = function(n, r) {
      this._disposeAxisPointer(r), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._doUpdateAxisPointerClass = function(n, r, i) {
      var a = e.getAxisPointerClass(this.axisPointerClass);
      if (a) {
        var o = G6e(n);
        o ? (this._axisPointer || (this._axisPointer = new a())).render(n, o, r, i) : this._disposeAxisPointer(r);
      }
    }, e.prototype._disposeAxisPointer = function(n) {
      this._axisPointer && this._axisPointer.dispose(n), this._axisPointer = null;
    }, e.registerAxisPointerClass = function(n, r) {
      if (process.env.NODE_ENV !== "production" && uP[n])
        throw new Error("axisPointer " + n + " exists");
      uP[n] = r;
    }, e.getAxisPointerClass = function(n) {
      return n && uP[n];
    }, e.type = "axis", e;
  }(Xt)
), hE = bt();
function nne(t, e, n, r) {
  var i = n.axis;
  if (!i.scale.isBlank()) {
    var a = n.getModel("splitArea"), o = a.getModel("areaStyle"), s = o.get("color"), l = r.coordinateSystem.getRect(), u = i.getTicksCoords({
      tickModel: a,
      clamp: !0
    });
    if (u.length) {
      var c = s.length, f = hE(t).splitAreaColors, d = Pe(), h = 0;
      if (f)
        for (var p = 0; p < u.length; p++) {
          var v = f.get(u[p].tickValue);
          if (v != null) {
            h = (v + (c - 1) * p) % c;
            break;
          }
        }
      var g = i.toGlobalCoord(u[0].coord), m = o.getAreaStyle();
      s = ue(s) ? s : [s];
      for (var p = 1; p < u.length; p++) {
        var y = i.toGlobalCoord(u[p].coord), b = void 0, _ = void 0, O = void 0, S = void 0;
        i.isHorizontal() ? (b = g, _ = l.y, O = y - b, S = l.height, g = b + O) : (b = l.x, _ = g, O = l.width, S = y - _, g = _ + S);
        var x = u[p - 1].tickValue;
        x != null && d.set(x, h), e.add(new mt({
          anid: x != null ? "area_" + x : null,
          shape: {
            x: b,
            y: _,
            width: O,
            height: S
          },
          style: Re({
            fill: s[h]
          }, m),
          autoBatch: !0,
          silent: !0
        })), h = (h + 1) % c;
      }
      hE(t).splitAreaColors = d;
    }
  }
}
function rne(t) {
  hE(t).splitAreaColors = null;
}
var j6e = ["axisLine", "axisTickLabel", "axisName"], Z6e = ["splitArea", "splitLine", "minorSplitLine"], ine = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "CartesianAxisPointer", n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.group.removeAll();
      var o = this._axisGroup;
      if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
        var s = n.getCoordSysModel(), l = fE(s, n), u = new Kr(n, le({
          handleAutoShown: function(f) {
            for (var d = s.coordinateSystem.getCartesians(), h = 0; h < d.length; h++)
              if (nE(d[h].getOtherAxis(n.axis).scale))
                return !0;
            return !1;
          }
        }, l));
        k(j6e, u.add, u), this._axisGroup.add(u.getGroup()), k(Z6e, function(f) {
          n.get([f, "show"]) && U6e[f](this, this._axisGroup, n, s);
        }, this);
        var c = a && a.type === "changeAxisOrder" && a.isInitSort;
        c || W0(o, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
      }
    }, e.prototype.remove = function() {
      rne(this);
    }, e.type = "cartesianAxis", e;
  }(Wf)
), U6e = {
  splitLine: function(t, e, n, r) {
    var i = n.axis;
    if (!i.scale.isBlank()) {
      var a = n.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
      s = ue(s) ? s : [s];
      for (var l = r.coordinateSystem.getRect(), u = i.isHorizontal(), c = 0, f = i.getTicksCoords({
        tickModel: a
      }), d = [], h = [], p = o.getLineStyle(), v = 0; v < f.length; v++) {
        var g = i.toGlobalCoord(f[v].coord);
        u ? (d[0] = g, d[1] = l.y, h[0] = g, h[1] = l.y + l.height) : (d[0] = l.x, d[1] = g, h[0] = l.x + l.width, h[1] = g);
        var m = c++ % s.length, y = f[v].tickValue, b = new Un({
          anid: y != null ? "line_" + f[v].tickValue : null,
          autoBatch: !0,
          shape: {
            x1: d[0],
            y1: d[1],
            x2: h[0],
            y2: h[1]
          },
          style: Re({
            stroke: s[m]
          }, p),
          silent: !0
        });
        zh(b.shape, p.lineWidth), e.add(b);
      }
    }
  },
  minorSplitLine: function(t, e, n, r) {
    var i = n.axis, a = n.getModel("minorSplitLine"), o = a.getModel("lineStyle"), s = r.coordinateSystem.getRect(), l = i.isHorizontal(), u = i.getMinorTicksCoords();
    if (u.length)
      for (var c = [], f = [], d = o.getLineStyle(), h = 0; h < u.length; h++)
        for (var p = 0; p < u[h].length; p++) {
          var v = i.toGlobalCoord(u[h][p].coord);
          l ? (c[0] = v, c[1] = s.y, f[0] = v, f[1] = s.y + s.height) : (c[0] = s.x, c[1] = v, f[0] = s.x + s.width, f[1] = v);
          var g = new Un({
            anid: "minor_line_" + u[h][p].tickValue,
            autoBatch: !0,
            shape: {
              x1: c[0],
              y1: c[1],
              x2: f[0],
              y2: f[1]
            },
            style: d,
            silent: !0
          });
          zh(g.shape, d.lineWidth), e.add(g);
        }
  },
  splitArea: function(t, e, n, r) {
    nne(t, e, n, r);
  }
}, ane = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "xAxis", e;
  }(ine)
), X6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = ane.type, n;
    }
    return e.type = "yAxis", e;
  }(ine)
), Y6e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "grid", n;
    }
    return e.prototype.render = function(n, r) {
      this.group.removeAll(), n.get("show") && this.group.add(new mt({
        shape: n.coordinateSystem.getRect(),
        style: Re({
          fill: n.get("backgroundColor")
        }, n.getItemStyle()),
        silent: !0,
        z2: -1
      }));
    }, e.type = "grid", e;
  }(Xt)
), rF = {
  // gridIndex: 0,
  // gridId: '',
  offset: 0
};
function one(t) {
  t.registerComponentView(Y6e), t.registerComponentModel(w6e), t.registerCoordinateSystem("cartesian2d", I6e), Qh(t, "x", uE, rF), Qh(t, "y", uE, rF), t.registerComponentView(ane), t.registerComponentView(X6e), t.registerPreprocessor(function(e) {
    e.xAxis && e.yAxis && !e.grid && (e.grid = {});
  });
}
function q6e(t) {
  at(one), t.registerSeriesModel(b6e), t.registerChartView(x6e), t.registerLayout(X0("scatter"));
}
function K6e(t) {
  t.eachSeriesByType("radar", function(e) {
    var n = e.getData(), r = [], i = e.coordinateSystem;
    if (i) {
      var a = i.getIndicatorAxes();
      k(a, function(o, s) {
        n.each(n.mapDimension(a[s].dim), function(l, u) {
          r[u] = r[u] || [];
          var c = i.dataToPoint(l, s);
          r[u][s] = iF(c) ? c : aF(i);
        });
      }), n.each(function(o) {
        var s = wq(r[o], function(l) {
          return iF(l);
        }) || aF(i);
        r[o].push(s.slice()), n.setItemLayout(o, r[o]);
      });
    }
  });
}
function iF(t) {
  return !isNaN(t[0]) && !isNaN(t[1]);
}
function aF(t) {
  return [t.cx, t.cy];
}
function J6e(t) {
  var e = t.polar;
  if (e) {
    ue(e) || (e = [e]);
    var n = [];
    k(e, function(r, i) {
      r.indicator ? (r.type && !r.shape && (r.shape = r.type), t.radar = t.radar || [], ue(t.radar) || (t.radar = [t.radar]), t.radar.push(r)) : n.push(r);
    }), t.polar = n;
  }
  k(t.series, function(r) {
    r && r.type === "radar" && r.polarIndex && (r.radarIndex = r.polarIndex);
  });
}
var eBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.coordinateSystem, o = this.group, s = n.getData(), l = this._data;
      function u(d, h) {
        var p = d.getItemVisual(h, "symbol") || "circle";
        if (p !== "none") {
          var v = xp(d.getItemVisual(h, "symbolSize")), g = $n(p, -1, -1, 2, 2), m = d.getItemVisual(h, "symbolRotate") || 0;
          return g.attr({
            style: {
              strokeNoScale: !0
            },
            z2: 100,
            scaleX: v[0] / 2,
            scaleY: v[1] / 2,
            rotation: m * Math.PI / 180 || 0
          }), g;
        }
      }
      function c(d, h, p, v, g, m) {
        p.removeAll();
        for (var y = 0; y < h.length - 1; y++) {
          var b = u(v, g);
          b && (b.__dimIdx = y, d[y] ? (b.setPosition(d[y]), Lf[m ? "initProps" : "updateProps"](b, {
            x: h[y][0],
            y: h[y][1]
          }, n, g)) : b.setPosition(h[y]), p.add(b));
        }
      }
      function f(d) {
        return ce(d, function(h) {
          return [a.cx, a.cy];
        });
      }
      s.diff(l).add(function(d) {
        var h = s.getItemLayout(d);
        if (h) {
          var p = new ii(), v = new ai(), g = {
            shape: {
              points: h
            }
          };
          p.shape.points = f(h), v.shape.points = f(h), Yt(p, g, n, d), Yt(v, g, n, d);
          var m = new Ve(), y = new Ve();
          m.add(v), m.add(p), m.add(y), c(v.shape.points, h, y, s, d, !0), s.setItemGraphicEl(d, m);
        }
      }).update(function(d, h) {
        var p = l.getItemGraphicEl(h), v = p.childAt(0), g = p.childAt(1), m = p.childAt(2), y = {
          shape: {
            points: s.getItemLayout(d)
          }
        };
        y.shape.points && (c(v.shape.points, y.shape.points, m, s, d, !1), so(g), so(v), Ct(v, y, n), Ct(g, y, n), s.setItemGraphicEl(d, p));
      }).remove(function(d) {
        o.remove(l.getItemGraphicEl(d));
      }).execute(), s.eachItemGraphicEl(function(d, h) {
        var p = s.getItemModel(h), v = d.childAt(0), g = d.childAt(1), m = d.childAt(2), y = s.getItemVisual(h, "style"), b = y.fill;
        o.add(d), v.useStyle(Re(p.getModel("lineStyle").getLineStyle(), {
          fill: "none",
          stroke: b
        })), Tr(v, p, "lineStyle"), Tr(g, p, "areaStyle");
        var _ = p.getModel("areaStyle"), O = _.isEmpty() && _.parentModel.isEmpty();
        g.ignore = O, k(["emphasis", "select", "blur"], function(C) {
          var T = p.getModel([C, "areaStyle"]), w = T.isEmpty() && T.parentModel.isEmpty();
          g.ensureState(C).ignore = w && O;
        }), g.useStyle(Re(_.getAreaStyle(), {
          fill: b,
          opacity: 0.7,
          decal: y.decal
        }));
        var S = p.getModel("emphasis"), x = S.getModel("itemStyle").getItemStyle();
        m.eachChild(function(C) {
          if (C instanceof lr) {
            var T = C.style;
            C.useStyle(le({
              // TODO other properties like x, y ?
              image: T.image,
              x: T.x,
              y: T.y,
              width: T.width,
              height: T.height
            }, y));
          } else
            C.useStyle(y), C.setColor(b), C.style.strokeNoScale = !0;
          var w = C.ensureState("emphasis");
          w.style = Le(x);
          var P = s.getStore().get(s.getDimensionIndex(C.__dimIdx), h);
          (P == null || isNaN(P)) && (P = ""), Pr(C, er(p), {
            labelFetcher: s.hostModel,
            labelDataIndex: h,
            labelDimIndex: C.__dimIdx,
            defaultText: P,
            inheritColor: b,
            defaultOpacity: y.opacity
          });
        }), bn(d, S.get("focus"), S.get("blurScope"), S.get("disabled"));
      }), this._data = s;
    }, e.prototype.remove = function() {
      this.group.removeAll(), this._data = null;
    }, e.type = "radar", e;
  }(zt)
), tBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
    }, e.prototype.getInitialData = function(n, r) {
      return Pp(this, {
        generateCoord: "indicator_",
        generateCoordCount: 1 / 0
      });
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(n), u = l === "" ? this.name : l, c = nee(this, n);
      return tr("section", {
        header: u,
        sortBlocks: !0,
        blocks: ce(s, function(f) {
          var d = a.get(a.mapDimension(f.dim), n);
          return tr("nameValue", {
            markerType: "subItem",
            markerColor: c,
            name: f.name,
            value: d,
            sortParam: d
          });
        })
      });
    }, e.prototype.getTooltipPosition = function(n) {
      if (n != null) {
        for (var r = this.getData(), i = this.coordinateSystem, a = r.getValues(ce(i.dimensions, function(u) {
          return r.mapDimension(u);
        }), n), o = 0, s = a.length; o < s; o++)
          if (!isNaN(a[o])) {
            var l = i.getIndicatorAxes();
            return i.coordToPoint(l[o].dataToCoord(a[o]), o);
          }
      }
    }, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      colorBy: "data",
      coordinateSystem: "radar",
      legendHoverLink: !0,
      radarIndex: 0,
      lineStyle: {
        width: 2,
        type: "solid",
        join: "round"
      },
      label: {
        position: "top"
      },
      // areaStyle: {
      // },
      // itemStyle: {}
      symbolSize: 8
      // symbolRotate: null
    }, e;
  }(Ht)
), gv = Jte.value;
function wb(t, e) {
  return Re({
    show: e
  }, t);
}
var nBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      var n = this.get("boundaryGap"), r = this.get("splitNumber"), i = this.get("scale"), a = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), c = this.get(["axisName", "formatter"]), f = this.get("axisNameGap"), d = this.get("triggerEvent"), h = ce(this.get("indicator") || [], function(p) {
        p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
        var v = l;
        p.color != null && (v = Re({
          color: p.color
        }, l));
        var g = qe(Le(p), {
          boundaryGap: n,
          splitNumber: r,
          scale: i,
          axisLine: a,
          axisTick: o,
          // axisType: axisType,
          axisLabel: s,
          // Compatible with 2 and use text
          name: p.text,
          showName: u,
          nameLocation: "end",
          nameGap: f,
          // min: 0,
          nameTextStyle: v,
          triggerEvent: d
        }, !1);
        if (Oe(c)) {
          var m = g.name;
          g.name = c.replace("{value}", m ?? "");
        } else Me(c) && (g.name = c(g.name, g));
        var y = new Wt(g, null, this.ecModel);
        return xn(y, Tp.prototype), y.mainType = "radar", y.componentIndex = this.componentIndex, y;
      }, this);
      this._indicatorModels = h;
    }, e.prototype.getIndicatorModels = function() {
      return this._indicatorModels;
    }, e.type = "radar", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      center: ["50%", "50%"],
      radius: "75%",
      startAngle: 90,
      axisName: {
        show: !0
        // formatter: null
        // textStyle: {}
      },
      boundaryGap: [0, 0],
      splitNumber: 5,
      axisNameGap: 15,
      scale: !1,
      // Polygon or circle
      shape: "polygon",
      axisLine: qe({
        lineStyle: {
          color: "#bbb"
        }
      }, gv.axisLine),
      axisLabel: wb(gv.axisLabel, !1),
      axisTick: wb(gv.axisTick, !1),
      // axisType: 'value',
      splitLine: wb(gv.splitLine, !0),
      splitArea: wb(gv.splitArea, !0),
      // {text, min, max}
      indicator: []
    }, e;
  }(rt)
), rBe = ["axisLine", "axisTickLabel", "axisName"], iBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group;
      a.removeAll(), this._buildAxes(n), this._buildSplitLineAndArea(n);
    }, e.prototype._buildAxes = function(n) {
      var r = n.coordinateSystem, i = r.getIndicatorAxes(), a = ce(i, function(o) {
        var s = o.model.get("showName") ? o.name : "", l = new Kr(o.model, {
          axisName: s,
          position: [r.cx, r.cy],
          rotation: o.angle,
          labelDirection: -1,
          tickDirection: -1,
          nameDirection: 1
        });
        return l;
      });
      k(a, function(o) {
        k(rBe, o.add, o), this.group.add(o.getGroup());
      }, this);
    }, e.prototype._buildSplitLineAndArea = function(n) {
      var r = n.coordinateSystem, i = r.getIndicatorAxes();
      if (!i.length)
        return;
      var a = n.get("shape"), o = n.getModel("splitLine"), s = n.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), c = o.get("show"), f = s.get("show"), d = l.get("color"), h = u.get("color"), p = ue(d) ? d : [d], v = ue(h) ? h : [h], g = [], m = [];
      function y(E, R, N) {
        var V = N % R.length;
        return E[V] = E[V] || [], V;
      }
      if (a === "circle")
        for (var b = i[0].getTicksCoords(), _ = r.cx, O = r.cy, S = 0; S < b.length; S++) {
          if (c) {
            var x = y(g, p, S);
            g[x].push(new ll({
              shape: {
                cx: _,
                cy: O,
                r: b[S].coord
              }
            }));
          }
          if (f && S < b.length - 1) {
            var x = y(m, v, S);
            m[x].push(new z0({
              shape: {
                cx: _,
                cy: O,
                r0: b[S].coord,
                r: b[S + 1].coord
              }
            }));
          }
        }
      else
        for (var C, T = ce(i, function(E, R) {
          var N = E.getTicksCoords();
          return C = C == null ? N.length - 1 : Math.min(N.length - 1, C), ce(N, function(V) {
            return r.coordToPoint(V.coord, R);
          });
        }), w = [], S = 0; S <= C; S++) {
          for (var P = [], $ = 0; $ < i.length; $++)
            P.push(T[$][S]);
          if (P[0] ? P.push(P[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + S), c) {
            var x = y(g, p, S);
            g[x].push(new ai({
              shape: {
                points: P
              }
            }));
          }
          if (f && w) {
            var x = y(m, v, S - 1);
            m[x].push(new ii({
              shape: {
                points: P.concat(w)
              }
            }));
          }
          w = P.slice().reverse();
        }
      var A = l.getLineStyle(), D = u.getAreaStyle();
      k(m, function(E, R) {
        this.group.add(Li(E, {
          style: Re({
            stroke: "none",
            fill: v[R % v.length]
          }, D),
          silent: !0
        }));
      }, this), k(g, function(E, R) {
        this.group.add(Li(E, {
          style: Re({
            fill: "none",
            stroke: p[R % p.length]
          }, A),
          silent: !0
        }));
      }, this);
    }, e.type = "radar", e;
  }(Xt)
), aBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this, n, r, i) || this;
      return a.type = "value", a.angle = 0, a.name = "", a;
    }
    return e;
  }(Ba)
), oBe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.dimensions = [], this._model = e, this._indicatorAxes = ce(e.getIndicatorModels(), function(i, a) {
        var o = "indicator_" + a, s = new aBe(
          o,
          new Ys()
          // (indicatorModel.get('axisType') === 'log') ? new LogScale() : new IntervalScale()
        );
        return s.name = i.get("name"), s.model = i, i.axis = s, this.dimensions.push(o), s;
      }, this), this.resize(e, r);
    }
    return t.prototype.getIndicatorAxes = function() {
      return this._indicatorAxes;
    }, t.prototype.dataToPoint = function(e, n) {
      var r = this._indicatorAxes[n];
      return this.coordToPoint(r.dataToCoord(e), n);
    }, t.prototype.coordToPoint = function(e, n) {
      var r = this._indicatorAxes[n], i = r.angle, a = this.cx + e * Math.cos(i), o = this.cy - e * Math.sin(i);
      return [a, o];
    }, t.prototype.pointToData = function(e) {
      var n = e[0] - this.cx, r = e[1] - this.cy, i = Math.sqrt(n * n + r * r);
      n /= i, r /= i;
      for (var a = Math.atan2(-r, n), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
        var c = this._indicatorAxes[u], f = Math.abs(a - c.angle);
        f < o && (s = c, l = u, o = f);
      }
      return [l, +(s && s.coordToData(i))];
    }, t.prototype.resize = function(e, n) {
      var r = e.get("center"), i = n.getWidth(), a = n.getHeight(), o = Math.min(i, a) / 2;
      this.cx = _e(r[0], i), this.cy = _e(r[1], a), this.startAngle = e.get("startAngle") * Math.PI / 180;
      var s = e.get("radius");
      (Oe(s) || St(s)) && (s = [0, s]), this.r0 = _e(s[0], o), this.r = _e(s[1], o), k(this._indicatorAxes, function(l, u) {
        l.setExtent(this.r0, this.r);
        var c = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
        c = Math.atan2(Math.sin(c), Math.cos(c)), l.angle = c;
      }, this);
    }, t.prototype.update = function(e, n) {
      var r = this._indicatorAxes, i = this._model;
      k(r, function(s) {
        s.scale.setExtent(1 / 0, -1 / 0);
      }), e.eachSeriesByType("radar", function(s, l) {
        if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== i)) {
          var u = s.getData();
          k(r, function(c) {
            c.scale.unionExtentFromData(u, u.mapDimension(c.dim));
          });
        }
      }, this);
      var a = i.get("splitNumber"), o = new Ys();
      o.setExtent(0, a), o.setInterval(1), k(r, function(s, l) {
        ene(s.scale, s.model, o);
      });
    }, t.prototype.convertToPixel = function(e, n, r) {
      return console.warn("Not implemented."), null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      return console.warn("Not implemented."), null;
    }, t.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("radar", function(i) {
        var a = new t(i, e, n);
        r.push(a), i.coordinateSystem = a;
      }), e.eachSeriesByType("radar", function(i) {
        i.get("coordinateSystem") === "radar" && (i.coordinateSystem = r[i.get("radarIndex") || 0]);
      }), r;
    }, t.dimensions = [], t;
  }()
);
function sBe(t) {
  t.registerCoordinateSystem("radar", oBe), t.registerComponentModel(nBe), t.registerComponentView(iBe), t.registerVisual({
    seriesType: "radar",
    reset: function(e) {
      var n = e.getData();
      n.each(function(r) {
        n.setItemVisual(r, "legendIcon", "roundRect");
      }), n.setVisual("legendIcon", "roundRect");
    }
  });
}
function lBe(t) {
  at(sBe), t.registerChartView(eBe), t.registerSeriesModel(tBe), t.registerLayout(K6e), t.registerProcessor(Y0("radar")), t.registerPreprocessor(J6e);
}
var oF = "\0_ec_interaction_mutex";
function uBe(t, e, n) {
  var r = zk(t);
  r[e] = n;
}
function cBe(t, e, n) {
  var r = zk(t), i = r[e];
  i === n && (r[e] = null);
}
function sF(t, e) {
  return !!zk(t)[e];
}
function zk(t) {
  return t[oF] || (t[oF] = {});
}
vo({
  type: "takeGlobalCursor",
  event: "globalCursorTaken",
  update: "update"
}, On);
var K0 = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this) || this;
      r._zr = n;
      var i = xe(r._mousedownHandler, r), a = xe(r._mousemoveHandler, r), o = xe(r._mouseupHandler, r), s = xe(r._mousewheelHandler, r), l = xe(r._pinchHandler, r);
      return r.enable = function(u, c) {
        this.disable(), this._opt = Re(Le(c) || {}, {
          zoomOnMouseWheel: !0,
          moveOnMouseMove: !0,
          // By default, wheel do not trigger move.
          moveOnMouseWheel: !1,
          preventDefaultMouseMove: !0
        }), u == null && (u = !0), (u === !0 || u === "move" || u === "pan") && (n.on("mousedown", i), n.on("mousemove", a), n.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (n.on("mousewheel", s), n.on("pinch", l));
      }, r.disable = function() {
        n.off("mousedown", i), n.off("mousemove", a), n.off("mouseup", o), n.off("mousewheel", s), n.off("pinch", l);
      }, r;
    }
    return e.prototype.isDragging = function() {
      return this._dragging;
    }, e.prototype.isPinching = function() {
      return this._pinching;
    }, e.prototype.setPointerChecker = function(n) {
      this.pointerChecker = n;
    }, e.prototype.dispose = function() {
      this.disable();
    }, e.prototype._mousedownHandler = function(n) {
      if (!k6(n)) {
        for (var r = n.target; r; ) {
          if (r.draggable)
            return;
          r = r.__hostTarget || r.parent;
        }
        var i = n.offsetX, a = n.offsetY;
        this.pointerChecker && this.pointerChecker(n, i, a) && (this._x = i, this._y = a, this._dragging = !0);
      }
    }, e.prototype._mousemoveHandler = function(n) {
      if (!(!this._dragging || !Z_("moveOnMouseMove", n, this._opt) || n.gestureEvent === "pinch" || sF(this._zr, "globalPan"))) {
        var r = n.offsetX, i = n.offsetY, a = this._x, o = this._y, s = r - a, l = i - o;
        this._x = r, this._y = i, this._opt.preventDefaultMouseMove && Gs(n.event), sne(this, "pan", "moveOnMouseMove", n, {
          dx: s,
          dy: l,
          oldX: a,
          oldY: o,
          newX: r,
          newY: i,
          isAvailableBehavior: null
        });
      }
    }, e.prototype._mouseupHandler = function(n) {
      k6(n) || (this._dragging = !1);
    }, e.prototype._mousewheelHandler = function(n) {
      var r = Z_("zoomOnMouseWheel", n, this._opt), i = Z_("moveOnMouseWheel", n, this._opt), a = n.wheelDelta, o = Math.abs(a), s = n.offsetX, l = n.offsetY;
      if (!(a === 0 || !r && !i)) {
        if (r) {
          var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, c = a > 0 ? u : 1 / u;
          cP(this, "zoom", "zoomOnMouseWheel", n, {
            scale: c,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
        if (i) {
          var f = Math.abs(a), d = (a > 0 ? 1 : -1) * (f > 3 ? 0.4 : f > 1 ? 0.15 : 0.05);
          cP(this, "scrollMove", "moveOnMouseWheel", n, {
            scrollDelta: d,
            originX: s,
            originY: l,
            isAvailableBehavior: null
          });
        }
      }
    }, e.prototype._pinchHandler = function(n) {
      if (!sF(this._zr, "globalPan")) {
        var r = n.pinchScale > 1 ? 1.1 : 1 / 1.1;
        cP(this, "zoom", null, n, {
          scale: r,
          originX: n.pinchX,
          originY: n.pinchY,
          isAvailableBehavior: null
        });
      }
    }, e;
  }(Ra)
);
function cP(t, e, n, r, i) {
  t.pointerChecker && t.pointerChecker(r, i.originX, i.originY) && (Gs(r.event), sne(t, e, n, r, i));
}
function sne(t, e, n, r, i) {
  i.isAvailableBehavior = xe(Z_, null, n, r), t.trigger(e, i);
}
function Z_(t, e, n) {
  var r = n[t];
  return !t || r && (!Oe(r) || e.event[r + "Key"]);
}
function Vk(t, e, n) {
  var r = t.target;
  r.x += e, r.y += n, r.dirty();
}
function Fk(t, e, n, r) {
  var i = t.target, a = t.zoomLimit, o = t.zoom = t.zoom || 1;
  if (o *= e, a) {
    var s = a.min || 0, l = a.max || 1 / 0;
    o = Math.max(Math.min(l, o), s);
  }
  var u = o / t.zoom;
  t.zoom = o, i.x -= (n - i.x) * (u - 1), i.y -= (r - i.y) * (u - 1), i.scaleX *= u, i.scaleY *= u, i.dirty();
}
var fBe = {
  axisPointer: 1,
  tooltip: 1,
  brush: 1
};
function mw(t, e, n) {
  var r = e.getComponentByElement(t.topTarget), i = r && r.coordinateSystem;
  return r && r !== n && !fBe.hasOwnProperty(r.mainType) && i && i.model !== n;
}
function lne(t) {
  if (Oe(t)) {
    var e = new DOMParser();
    t = e.parseFromString(t, "text/xml");
  }
  var n = t;
  for (n.nodeType === 9 && (n = n.firstChild); n.nodeName.toLowerCase() !== "svg" || n.nodeType !== 1; )
    n = n.nextSibling;
  return n;
}
var fP, EO = {
  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"
}, lF = st(EO), MO = {
  "alignment-baseline": "textBaseline",
  "stop-color": "stopColor"
}, uF = st(MO), dBe = function() {
  function t() {
    this._defs = {}, this._root = null;
  }
  return t.prototype.parse = function(e, n) {
    n = n || {};
    var r = lne(e);
    if (process.env.NODE_ENV !== "production" && !r)
      throw new Error("Illegal svg");
    this._defsUsePending = [];
    var i = new Ve();
    this._root = i;
    var a = [], o = r.getAttribute("viewBox") || "", s = parseFloat(r.getAttribute("width") || n.width), l = parseFloat(r.getAttribute("height") || n.height);
    isNaN(s) && (s = null), isNaN(l) && (l = null), $i(r, i, null, !0, !1);
    for (var u = r.firstChild; u; )
      this._parseNode(u, i, a, null, !1, !1), u = u.nextSibling;
    vBe(this._defs, this._defsUsePending), this._defsUsePending = [];
    var c, f;
    if (o) {
      var d = yw(o);
      d.length >= 4 && (c = {
        x: parseFloat(d[0] || 0),
        y: parseFloat(d[1] || 0),
        width: parseFloat(d[2]),
        height: parseFloat(d[3])
      });
    }
    if (c && s != null && l != null && (f = cne(c, { x: 0, y: 0, width: s, height: l }), !n.ignoreViewBox)) {
      var h = i;
      i = new Ve(), i.add(h), h.scaleX = h.scaleY = f.scale, h.x = f.x, h.y = f.y;
    }
    return !n.ignoreRootClip && s != null && l != null && i.setClipPath(new mt({
      shape: { x: 0, y: 0, width: s, height: l }
    })), {
      root: i,
      width: s,
      height: l,
      viewBoxRect: c,
      viewBoxTransform: f,
      named: a
    };
  }, t.prototype._parseNode = function(e, n, r, i, a, o) {
    var s = e.nodeName.toLowerCase(), l, u = i;
    if (s === "defs" && (a = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
      l = n;
    else {
      if (!a) {
        var c = fP[s];
        if (c && Ce(fP, s)) {
          l = c.call(this, e, n);
          var f = e.getAttribute("name");
          if (f) {
            var d = {
              name: f,
              namedFrom: null,
              svgNodeTagLower: s,
              el: l
            };
            r.push(d), s === "g" && (u = d);
          } else i && r.push({
            name: i.name,
            namedFrom: i,
            svgNodeTagLower: s,
            el: l
          });
          n.add(l);
        }
      }
      var h = cF[s];
      if (h && Ce(cF, s)) {
        var p = h.call(this, e), v = e.getAttribute("id");
        v && (this._defs[v] = p);
      }
    }
    if (l && l.isGroup)
      for (var g = e.firstChild; g; )
        g.nodeType === 1 ? this._parseNode(g, l, r, u, a, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
  }, t.prototype._parseText = function(e, n) {
    var r = new Bh({
      style: {
        text: e.textContent
      },
      silent: !0,
      x: this._textX || 0,
      y: this._textY || 0
    });
    ra(n, r), $i(e, r, this._defsUsePending, !1, !1), hBe(r, n);
    var i = r.style, a = i.fontSize;
    a && a < 9 && (i.fontSize = 9, r.scaleX *= a / 9, r.scaleY *= a / 9);
    var o = (i.fontSize || i.fontFamily) && [
      i.fontStyle,
      i.fontWeight,
      (i.fontSize || 12) + "px",
      i.fontFamily || "sans-serif"
    ].join(" ");
    i.font = o;
    var s = r.getBoundingRect();
    return this._textX += s.width, n.add(r), r;
  }, t.internalField = function() {
    fP = {
      g: function(e, n) {
        var r = new Ve();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r;
      },
      rect: function(e, n) {
        var r = new mt();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
          x: parseFloat(e.getAttribute("x") || "0"),
          y: parseFloat(e.getAttribute("y") || "0"),
          width: parseFloat(e.getAttribute("width") || "0"),
          height: parseFloat(e.getAttribute("height") || "0")
        }), r.silent = !0, r;
      },
      circle: function(e, n) {
        var r = new ll();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
          cx: parseFloat(e.getAttribute("cx") || "0"),
          cy: parseFloat(e.getAttribute("cy") || "0"),
          r: parseFloat(e.getAttribute("r") || "0")
        }), r.silent = !0, r;
      },
      line: function(e, n) {
        var r = new Un();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
          x1: parseFloat(e.getAttribute("x1") || "0"),
          y1: parseFloat(e.getAttribute("y1") || "0"),
          x2: parseFloat(e.getAttribute("x2") || "0"),
          y2: parseFloat(e.getAttribute("y2") || "0")
        }), r.silent = !0, r;
      },
      ellipse: function(e, n) {
        var r = new Xx();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setShape({
          cx: parseFloat(e.getAttribute("cx") || "0"),
          cy: parseFloat(e.getAttribute("cy") || "0"),
          rx: parseFloat(e.getAttribute("rx") || "0"),
          ry: parseFloat(e.getAttribute("ry") || "0")
        }), r.silent = !0, r;
      },
      polygon: function(e, n) {
        var r = e.getAttribute("points"), i;
        r && (i = hF(r));
        var a = new ii({
          shape: {
            points: i || []
          },
          silent: !0
        });
        return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
      },
      polyline: function(e, n) {
        var r = e.getAttribute("points"), i;
        r && (i = hF(r));
        var a = new ai({
          shape: {
            points: i || []
          },
          silent: !0
        });
        return ra(n, a), $i(e, a, this._defsUsePending, !1, !1), a;
      },
      image: function(e, n) {
        var r = new lr();
        return ra(n, r), $i(e, r, this._defsUsePending, !1, !1), r.setStyle({
          image: e.getAttribute("xlink:href") || e.getAttribute("href"),
          x: +e.getAttribute("x"),
          y: +e.getAttribute("y"),
          width: +e.getAttribute("width"),
          height: +e.getAttribute("height")
        }), r.silent = !0, r;
      },
      text: function(e, n) {
        var r = e.getAttribute("x") || "0", i = e.getAttribute("y") || "0", a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
        this._textX = parseFloat(r) + parseFloat(a), this._textY = parseFloat(i) + parseFloat(o);
        var s = new Ve();
        return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), s;
      },
      tspan: function(e, n) {
        var r = e.getAttribute("x"), i = e.getAttribute("y");
        r != null && (this._textX = parseFloat(r)), i != null && (this._textY = parseFloat(i));
        var a = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new Ve();
        return ra(n, s), $i(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(a), this._textY += parseFloat(o), s;
      },
      path: function(e, n) {
        var r = e.getAttribute("d") || "", i = GK(r);
        return ra(n, i), $i(e, i, this._defsUsePending, !1, !1), i.silent = !0, i;
      }
    };
  }(), t;
}(), cF = {
  lineargradient: function(t) {
    var e = parseInt(t.getAttribute("x1") || "0", 10), n = parseInt(t.getAttribute("y1") || "0", 10), r = parseInt(t.getAttribute("x2") || "10", 10), i = parseInt(t.getAttribute("y2") || "0", 10), a = new hp(e, n, r, i);
    return fF(t, a), dF(t, a), a;
  },
  radialgradient: function(t) {
    var e = parseInt(t.getAttribute("cx") || "0", 10), n = parseInt(t.getAttribute("cy") || "0", 10), r = parseInt(t.getAttribute("r") || "0", 10), i = new VR(e, n, r);
    return fF(t, i), dF(t, i), i;
  }
};
function fF(t, e) {
  var n = t.getAttribute("gradientUnits");
  n === "userSpaceOnUse" && (e.global = !0);
}
function dF(t, e) {
  for (var n = t.firstChild; n; ) {
    if (n.nodeType === 1 && n.nodeName.toLocaleLowerCase() === "stop") {
      var r = n.getAttribute("offset"), i = void 0;
      r && r.indexOf("%") > 0 ? i = parseInt(r, 10) / 100 : r ? i = parseFloat(r) : i = 0;
      var a = {};
      une(n, a, a);
      var o = a.stopColor || n.getAttribute("stop-color") || "#000000";
      e.colorStops.push({
        offset: i,
        color: o
      });
    }
    n = n.nextSibling;
  }
}
function ra(t, e) {
  t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), Re(e.__inheritedStyle, t.__inheritedStyle));
}
function hF(t) {
  for (var e = yw(t), n = [], r = 0; r < e.length; r += 2) {
    var i = parseFloat(e[r]), a = parseFloat(e[r + 1]);
    n.push([i, a]);
  }
  return n;
}
function $i(t, e, n, r, i) {
  var a = e, o = a.__inheritedStyle = a.__inheritedStyle || {}, s = {};
  t.nodeType === 1 && (yBe(t, e), une(t, o, s), r || bBe(t, o, s)), a.style = a.style || {}, o.fill != null && (a.style.fill = pF(a, "fill", o.fill, n)), o.stroke != null && (a.style.stroke = pF(a, "stroke", o.stroke, n)), k([
    "lineWidth",
    "opacity",
    "fillOpacity",
    "strokeOpacity",
    "miterLimit",
    "fontSize"
  ], function(l) {
    o[l] != null && (a.style[l] = parseFloat(o[l]));
  }), k([
    "lineDashOffset",
    "lineCap",
    "lineJoin",
    "fontWeight",
    "fontFamily",
    "fontStyle",
    "textAlign"
  ], function(l) {
    o[l] != null && (a.style[l] = o[l]);
  }), i && (a.__selfStyle = s), o.lineDash && (a.style.lineDash = ce(yw(o.lineDash), function(l) {
    return parseFloat(l);
  })), (o.visibility === "hidden" || o.visibility === "collapse") && (a.invisible = !0), o.display === "none" && (a.ignore = !0);
}
function hBe(t, e) {
  var n = e.__selfStyle;
  if (n) {
    var r = n.textBaseline, i = r;
    !r || r === "auto" || r === "baseline" ? i = "alphabetic" : r === "before-edge" || r === "text-before-edge" ? i = "top" : r === "after-edge" || r === "text-after-edge" ? i = "bottom" : (r === "central" || r === "mathematical") && (i = "middle"), t.style.textBaseline = i;
  }
  var a = e.__inheritedStyle;
  if (a) {
    var o = a.textAlign, s = o;
    o && (o === "middle" && (s = "center"), t.style.textAlign = s);
  }
}
var pBe = /^url\(\s*#(.*?)\)/;
function pF(t, e, n, r) {
  var i = n && n.match(pBe);
  if (i) {
    var a = ma(i[1]);
    r.push([t, e, a]);
    return;
  }
  return n === "none" && (n = null), n;
}
function vBe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    r[0].style[r[1]] = t[r[2]];
  }
}
var gBe = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function yw(t) {
  return t.match(gBe) || [];
}
var mBe = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, dP = Math.PI / 180;
function yBe(t, e) {
  var n = t.getAttribute("transform");
  if (n) {
    n = n.replace(/,/g, " ");
    var r = [], i = null;
    n.replace(mBe, function(f, d, h) {
      return r.push(d, h), "";
    });
    for (var a = r.length - 1; a > 0; a -= 2) {
      var o = r[a], s = r[a - 1], l = yw(o);
      switch (i = i || Si(), s) {
        case "translate":
          ao(i, i, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
          break;
        case "scale":
          Nx(i, i, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
          break;
        case "rotate":
          Cu(i, i, -parseFloat(l[0]) * dP, [
            parseFloat(l[1] || "0"),
            parseFloat(l[2] || "0")
          ]);
          break;
        case "skewX":
          var u = Math.tan(parseFloat(l[0]) * dP);
          Uo(i, [1, 0, u, 1, 0, 0], i);
          break;
        case "skewY":
          var c = Math.tan(parseFloat(l[0]) * dP);
          Uo(i, [1, c, 0, 1, 0, 0], i);
          break;
        case "matrix":
          i[0] = parseFloat(l[0]), i[1] = parseFloat(l[1]), i[2] = parseFloat(l[2]), i[3] = parseFloat(l[3]), i[4] = parseFloat(l[4]), i[5] = parseFloat(l[5]);
          break;
      }
    }
    e.setLocalTransform(i);
  }
}
var vF = /([^\s:;]+)\s*:\s*([^:;]+)/g;
function une(t, e, n) {
  var r = t.getAttribute("style");
  if (r) {
    vF.lastIndex = 0;
    for (var i; (i = vF.exec(r)) != null; ) {
      var a = i[1], o = Ce(EO, a) ? EO[a] : null;
      o && (e[o] = i[2]);
      var s = Ce(MO, a) ? MO[a] : null;
      s && (n[s] = i[2]);
    }
  }
}
function bBe(t, e, n) {
  for (var r = 0; r < lF.length; r++) {
    var i = lF[r], a = t.getAttribute(i);
    a != null && (e[EO[i]] = a);
  }
  for (var r = 0; r < uF.length; r++) {
    var i = uF[r], a = t.getAttribute(i);
    a != null && (n[MO[i]] = a);
  }
}
function cne(t, e) {
  var n = e.width / t.width, r = e.height / t.height, i = Math.min(n, r);
  return {
    scale: i,
    x: -(t.x + t.width / 2) * i + (e.x + e.width / 2),
    y: -(t.y + t.height / 2) * i + (e.y + e.height / 2)
  };
}
function _Be(t, e) {
  var n = new dBe();
  return n.parse(t, e);
}
var OBe = Pe([
  "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"
]), SBe = (
  /** @class */
  function() {
    function t(e, n) {
      this.type = "geoSVG", this._usedGraphicMap = Pe(), this._freedGraphics = [], this._mapName = e, this._parsedXML = lne(n);
    }
    return t.prototype.load = function() {
      var e = this._firstGraphic;
      if (!e) {
        e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
        var n = wBe(e.named), r = n.regions, i = n.regionsMap;
        this._regions = r, this._regionsMap = i;
      }
      return {
        boundingRect: this._boundingRect,
        regions: this._regions,
        regionsMap: this._regionsMap
      };
    }, t.prototype._buildGraphic = function(e) {
      var n, r;
      try {
        n = e && _Be(e, {
          ignoreViewBox: !0,
          ignoreRootClip: !0
        }) || {}, r = n.root, ke(r != null);
      } catch (g) {
        throw new Error(`Invalid svg format
` + g.message);
      }
      var i = new Ve();
      i.add(r), i.isGeoSVGGraphicRoot = !0;
      var a = n.width, o = n.height, s = n.viewBoxRect, l = this._boundingRect;
      if (!l) {
        var u = void 0, c = void 0, f = void 0, d = void 0;
        if (a != null ? (u = 0, f = a) : s && (u = s.x, f = s.width), o != null ? (c = 0, d = o) : s && (c = s.y, d = s.height), u == null || c == null) {
          var h = r.getBoundingRect();
          u == null && (u = h.x, f = h.width), c == null && (c = h.y, d = h.height);
        }
        l = this._boundingRect = new Je(u, c, f, d);
      }
      if (s) {
        var p = cne(s, l);
        r.scaleX = r.scaleY = p.scale, r.x = p.x, r.y = p.y;
      }
      i.setClipPath(new mt({
        shape: l.plain()
      }));
      var v = [];
      return k(n.named, function(g) {
        OBe.get(g.svgNodeTagLower) != null && (v.push(g), xBe(g.el));
      }), {
        root: i,
        boundingRect: l,
        named: v
      };
    }, t.prototype.useGraphic = function(e) {
      var n = this._usedGraphicMap, r = n.get(e);
      return r || (r = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), n.set(e, r), r);
    }, t.prototype.freeGraphic = function(e) {
      var n = this._usedGraphicMap, r = n.get(e);
      r && (n.removeKey(e), this._freedGraphics.push(r));
    }, t;
  }()
);
function xBe(t) {
  t.silent = !1, t.isGroup && t.traverse(function(e) {
    e.silent = !1;
  });
}
function wBe(t) {
  var e = [], n = Pe();
  return k(t, function(r) {
    if (r.namedFrom == null) {
      var i = new u5e(r.name, r.el);
      e.push(i), n.set(r.name, i);
    }
  }), {
    regions: e,
    regionsMap: n
  };
}
var pE = [126, 25], gF = "南海诸岛", hc = [[[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 lc = 0; lc < hc.length; lc++)
  for (var hd = 0; hd < hc[lc].length; hd++)
    hc[lc][hd][0] /= 10.5, hc[lc][hd][1] /= -10.5 / 0.75, hc[lc][hd][0] += pE[0], hc[lc][hd][1] += pE[1];
function CBe(t, e) {
  if (t === "china") {
    for (var n = 0; n < e.length; n++)
      if (e[n].name === gF)
        return;
    e.push(new ote(gF, ce(hc, function(r) {
      return {
        type: "polygon",
        exterior: r
      };
    }), pE));
  }
}
var TBe = {
  南海诸岛: [32, 80],
  // 全国
  广东: [0, -10],
  香港: [10, 5],
  澳门: [-10, 10],
  // '北京': [-10, 0],
  天津: [5, 5]
};
function PBe(t, e) {
  if (t === "china") {
    var n = TBe[e.name];
    if (n) {
      var r = e.getCenter();
      r[0] += n[0] / 10.5, r[1] += -n[1] / (10.5 / 0.75), e.setCenter(r);
    }
  }
}
var $Be = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
function ABe(t, e) {
  t === "china" && e.name === "台湾" && e.geometries.push({
    type: "polygon",
    exterior: $Be[0]
  });
}
var EBe = "name", MBe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "geoJSON", this._parsedMap = Pe(), this._mapName = e, this._specialAreas = r, this._geoJSON = DBe(n);
    }
    return t.prototype.load = function(e, n) {
      n = n || EBe;
      var r = this._parsedMap.get(n);
      if (!r) {
        var i = this._parseToRegions(n);
        r = this._parsedMap.set(n, {
          regions: i,
          boundingRect: IBe(i)
        });
      }
      var a = Pe(), o = [];
      return k(r.regions, function(s) {
        var l = s.name;
        e && Ce(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), a.set(l, s);
      }), {
        regions: o,
        boundingRect: r.boundingRect || new Je(0, 0, 0, 0),
        regionsMap: a
      };
    }, t.prototype._parseToRegions = function(e) {
      var n = this._mapName, r = this._geoJSON, i;
      try {
        i = r ? iE(r, e) : [];
      } catch (a) {
        throw new Error(`Invalid geoJson format
` + a.message);
      }
      return CBe(n, i), k(i, function(a) {
        var o = a.name;
        PBe(n, a), ABe(n, a);
        var s = this._specialAreas && this._specialAreas[o];
        s && a.transformTo(s.left, s.top, s.width, s.height);
      }, this), i;
    }, t.prototype.getMapForUser = function() {
      return {
        // For backward compatibility, use geoJson
        // PENDING: it has been returning them without clone.
        // do we need to avoid outsite modification?
        geoJson: this._geoJSON,
        geoJSON: this._geoJSON,
        specialAreas: this._specialAreas
      };
    }, t;
  }()
);
function IBe(t) {
  for (var e, n = 0; n < t.length; n++) {
    var r = t[n].getBoundingRect();
    e = e || r.clone(), e.union(r);
  }
  return e;
}
function DBe(t) {
  return Oe(t) ? typeof JSON < "u" && JSON.parse ? JSON.parse(t) : new Function("return (" + t + ");")() : t;
}
var mv = Pe();
const qs = {
  /**
   * Compatible with previous `echarts.registerMap`.
   *
   * @usage
   * ```js
   *
   * echarts.registerMap('USA', geoJson, specialAreas);
   *
   * echarts.registerMap('USA', {
   *     geoJson: geoJson,
   *     specialAreas: {...}
   * });
   * echarts.registerMap('USA', {
   *     geoJSON: geoJson,
   *     specialAreas: {...}
   * });
   *
   * echarts.registerMap('airport', {
   *     svg: svg
   * }
   * ```
   *
   * Note:
   * Do not support that register multiple geoJSON or SVG
   * one map name. Because different geoJSON and SVG have
   * different unit. It's not easy to make sure how those
   * units are mapping/normalize.
   * If intending to use multiple geoJSON or SVG, we can
   * use multiple geo coordinate system.
   */
  registerMap: function(t, e, n) {
    if (e.svg) {
      var r = new SBe(t, e.svg);
      mv.set(t, r);
    } else {
      var i = e.geoJson || e.geoJSON;
      i && !e.features ? n = e.specialAreas : i = e;
      var r = new MBe(t, i, n);
      mv.set(t, r);
    }
  },
  getGeoResource: function(t) {
    return mv.get(t);
  },
  /**
   * Only for exporting to users.
   * **MUST NOT** used internally.
   */
  getMapForUser: function(t) {
    var e = mv.get(t);
    return e && e.type === "geoJSON" && e.getMapForUser();
  },
  load: function(t, e, n) {
    var r = mv.get(t);
    if (!r) {
      process.env.NODE_ENV !== "production" && console.error("Map " + t + " not exists. The GeoJSON of the map must be provided.");
      return;
    }
    return r.load(e, n);
  }
};
var Wk = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], RBe = Pe(Wk), kBe = Pe(Wk.concat(["g"])), LBe = Pe(Wk.concat(["g"])), fne = bt();
function Cb(t) {
  var e = t.getItemStyle(), n = t.get("areaColor");
  return n != null && (e.fill = n), e;
}
function mF(t) {
  var e = t.style;
  e && (e.stroke = e.stroke || e.fill, e.fill = null);
}
var dne = (
  /** @class */
  function() {
    function t(e) {
      var n = new Ve();
      this.uid = yp("ec_map_draw"), this._controller = new K0(e.getZr()), this._controllerHost = {
        target: n
      }, this.group = n, n.add(this._regionsGroup = new Ve()), n.add(this._svgGroup = new Ve());
    }
    return t.prototype.draw = function(e, n, r, i, a) {
      var o = e.mainType === "geo", s = e.getData && e.getData();
      o && n.eachComponent({
        mainType: "series",
        subType: "map"
      }, function(m) {
        !s && m.getHostGeoModel() === e && (s = m.getData());
      });
      var l = e.coordinateSystem, u = this._regionsGroup, c = this.group, f = l.getTransformInfo(), d = f.raw, h = f.roam, p = !u.childAt(0) || a;
      p ? (c.x = h.x, c.y = h.y, c.scaleX = h.scaleX, c.scaleY = h.scaleY, c.dirty()) : Ct(c, h, e);
      var v = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
        api: r,
        geo: l,
        mapOrGeoModel: e,
        data: s,
        isVisualEncodedByVisualMap: v,
        isGeo: o,
        transformInfoRaw: d
      };
      l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, n, r), this._updateMapSelectHandler(e, u, r, i);
    }, t.prototype._buildGeoJSON = function(e) {
      var n = this._regionsGroupByName = Pe(), r = Pe(), i = this._regionsGroup, a = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
      function c(h, p) {
        return p && (h = p(h)), h && [h[0] * a.scaleX + a.x, h[1] * a.scaleY + a.y];
      }
      function f(h) {
        for (var p = [], v = !u && l && l.project, g = 0; g < h.length; ++g) {
          var m = c(h[g], v);
          m && p.push(m);
        }
        return p;
      }
      function d(h) {
        return {
          shape: {
            points: f(h)
          }
        };
      }
      i.removeAll(), k(e.geo.regions, function(h) {
        var p = h.name, v = n.get(p), g = r.get(p) || {}, m = g.dataIdx, y = g.regionModel;
        v || (v = n.set(p, new Ve()), i.add(v), m = s ? s.indexOfName(p) : null, y = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(m) : null, r.set(p, {
          dataIdx: m,
          regionModel: y
        }));
        var b = [], _ = [];
        k(h.geometries, function(x) {
          if (x.type === "polygon") {
            var C = [x.exterior].concat(x.interiors || []);
            u && (C = xF(C, u)), k(C, function(w) {
              b.push(new ii(d(w)));
            });
          } else {
            var T = x.points;
            u && (T = xF(T, u, !0)), k(T, function(w) {
              _.push(new ai(d(w)));
            });
          }
        });
        var O = c(h.getCenter(), l && l.project);
        function S(x, C) {
          if (x.length) {
            var T = new qx({
              culling: !0,
              segmentIgnoreThreshold: 1,
              shape: {
                paths: x
              }
            });
            v.add(T), yF(e, T, m, y), bF(e, T, p, y, o, m, O), C && (mF(T), k(T.states, mF));
          }
        }
        S(b), S(_, !0);
      }), n.each(function(h, p) {
        var v = r.get(p), g = v.dataIdx, m = v.regionModel;
        _F(e, h, p, m, o, g), OF(e, h, p, m, o), SF(e, h, p, m, o);
      }, this);
    }, t.prototype._buildSVG = function(e) {
      var n = e.geo.map, r = e.transformInfoRaw;
      this._svgGroup.x = r.x, this._svgGroup.y = r.y, this._svgGroup.scaleX = r.scaleX, this._svgGroup.scaleY = r.scaleY, this._svgResourceChanged(n) && (this._freeSVG(), this._useSVG(n));
      var i = this._svgDispatcherMap = Pe(), a = !1;
      k(this._svgGraphicRecord.named, function(o) {
        var s = o.name, l = e.mapOrGeoModel, u = e.data, c = o.svgNodeTagLower, f = o.el, d = u ? u.indexOfName(s) : null, h = l.getRegionModel(s);
        if (RBe.get(c) != null && f instanceof Ma && yF(e, f, d, h), f instanceof Ma && (f.culling = !0), f.z2EmphasisLift = 0, !o.namedFrom && (LBe.get(c) != null && bF(e, f, s, h, l, d, null), _F(e, f, s, h, l, d), OF(e, f, s, h, l), kBe.get(c) != null)) {
          var p = SF(e, f, s, h, l);
          p === "self" && (a = !0);
          var v = i.get(s) || i.set(s, []);
          v.push(f);
        }
      }, this), this._enableBlurEntireSVG(a, e);
    }, t.prototype._enableBlurEntireSVG = function(e, n) {
      if (e && n.isGeo) {
        var r = n.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), i = r.opacity;
        this._svgGraphicRecord.root.traverse(function(a) {
          if (!a.isGroup) {
            bf(a);
            var o = a.ensureState("blur").style || {};
            o.opacity == null && i != null && (o.opacity = i), a.ensureState("emphasis");
          }
        });
      }
    }, t.prototype.remove = function() {
      this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
    }, t.prototype.findHighDownDispatchers = function(e, n) {
      if (e == null)
        return [];
      var r = n.coordinateSystem;
      if (r.resourceType === "geoJSON") {
        var i = this._regionsGroupByName;
        if (i) {
          var a = i.get(e);
          return a ? [a] : [];
        }
      } else if (r.resourceType === "geoSVG")
        return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
    }, t.prototype._svgResourceChanged = function(e) {
      return this._svgMapName !== e;
    }, t.prototype._useSVG = function(e) {
      var n = qs.getGeoResource(e);
      if (n && n.type === "geoSVG") {
        var r = n.useGraphic(this.uid);
        this._svgGroup.add(r.root), this._svgGraphicRecord = r, this._svgMapName = e;
      }
    }, t.prototype._freeSVG = function() {
      var e = this._svgMapName;
      if (e != null) {
        var n = qs.getGeoResource(e);
        n && n.type === "geoSVG" && n.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
      }
    }, t.prototype._updateController = function(e, n, r) {
      var i = e.coordinateSystem, a = this._controller, o = this._controllerHost;
      o.zoomLimit = e.get("scaleLimit"), o.zoom = i.getZoom(), a.enable(e.get("roam") || !1);
      var s = e.mainType;
      function l() {
        var u = {
          type: "geoRoam",
          componentType: s
        };
        return u[s + "Id"] = e.id, u;
      }
      a.off("pan").on("pan", function(u) {
        this._mouseDownFlag = !1, Vk(o, u.dx, u.dy), r.dispatchAction(le(l(), {
          dx: u.dx,
          dy: u.dy,
          animation: {
            duration: 0
          }
        }));
      }, this), a.off("zoom").on("zoom", function(u) {
        this._mouseDownFlag = !1, Fk(o, u.scale, u.originX, u.originY), r.dispatchAction(le(l(), {
          totalZoom: o.zoom,
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY,
          animation: {
            duration: 0
          }
        }));
      }, this), a.setPointerChecker(function(u, c, f) {
        return i.containPoint([c, f]) && !mw(u, r, e);
      });
    }, t.prototype.resetForLabelLayout = function() {
      this.group.traverse(function(e) {
        var n = e.getTextContent();
        n && (n.ignore = fne(n).ignore);
      });
    }, t.prototype._updateMapSelectHandler = function(e, n, r, i) {
      var a = this;
      n.off("mousedown"), n.off("click"), e.get("selectedMode") && (n.on("mousedown", function() {
        a._mouseDownFlag = !0;
      }), n.on("click", function(o) {
        a._mouseDownFlag && (a._mouseDownFlag = !1);
      }));
    }, t;
  }()
);
function yF(t, e, n, r) {
  var i = r.getModel("itemStyle"), a = r.getModel(["emphasis", "itemStyle"]), o = r.getModel(["blur", "itemStyle"]), s = r.getModel(["select", "itemStyle"]), l = Cb(i), u = Cb(a), c = Cb(s), f = Cb(o), d = t.data;
  if (d) {
    var h = d.getItemVisual(n, "style"), p = d.getItemVisual(n, "decal");
    t.isVisualEncodedByVisualMap && h.fill && (l.fill = h.fill), p && (l.decal = Fh(p, t.api));
  }
  e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = c, e.ensureState("blur").style = f, bf(e);
}
function bF(t, e, n, r, i, a, o) {
  var s = t.data, l = t.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), a)), c = s && s.getItemLayout(a);
  if (l || u || c && c.showLabel) {
    var f = l ? n : a, d = void 0;
    (!s || a >= 0) && (d = i);
    var h = o ? {
      normal: {
        align: "center",
        verticalAlign: "middle"
      }
    } : null;
    Pr(e, er(r), {
      labelFetcher: d,
      labelDataIndex: f,
      defaultText: n
    }, h);
    var p = e.getTextContent();
    if (p && (fne(p).ignore = p.ignore, e.textConfig && o)) {
      var v = e.getBoundingRect().clone();
      e.textConfig.layoutRect = v, e.textConfig.position = [(o[0] - v.x) / v.width * 100 + "%", (o[1] - v.y) / v.height * 100 + "%"];
    }
    e.disableLabelAnimation = !0;
  } else
    e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
}
function _F(t, e, n, r, i, a) {
  t.data ? t.data.setItemGraphicEl(a, e) : Fe(e).eventData = {
    componentType: "geo",
    componentIndex: i.componentIndex,
    geoIndex: i.componentIndex,
    name: n,
    region: r && r.option || {}
  };
}
function OF(t, e, n, r, i) {
  t.data || gp({
    el: e,
    componentModel: i,
    itemName: n,
    // @ts-ignore FIXME:TS fix the "compatible with each other"?
    itemTooltipOption: r.get("tooltip")
  });
}
function SF(t, e, n, r, i) {
  e.highDownSilentOnTouch = !!i.get("selectedMode");
  var a = r.getModel("emphasis"), o = a.get("focus");
  return bn(e, o, a.get("blurScope"), a.get("disabled")), t.isGeo && fke(e, i, n), o;
}
function xF(t, e, n) {
  var r = [], i;
  function a() {
    i = [];
  }
  function o() {
    i.length && (r.push(i), i = []);
  }
  var s = e({
    polygonStart: a,
    polygonEnd: o,
    lineStart: a,
    lineEnd: o,
    point: function(l, u) {
      isFinite(l) && isFinite(u) && i.push([l, u]);
    },
    sphere: function() {
    }
  });
  return !n && s.polygonStart(), k(t, function(l) {
    s.lineStart();
    for (var u = 0; u < l.length; u++)
      s.point(l[u][0], l[u][1]);
    s.lineEnd();
  }), !n && s.polygonEnd(), r;
}
var NBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      if (!(a && a.type === "mapToggleSelect" && a.from === this.uid)) {
        var o = this.group;
        if (o.removeAll(), !n.getHostGeoModel()) {
          if (this._mapDraw && a && a.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), a && a.type === "geoRoam" && a.componentType === "series" && a.seriesId === n.id) {
            var s = this._mapDraw;
            s && o.add(s.group);
          } else if (n.needsDrawMap) {
            var s = this._mapDraw || new dne(i);
            o.add(s.group), s.draw(n, r, i, this, a), this._mapDraw = s;
          } else
            this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
          n.get("showLegendSymbol") && r.getComponent("legend") && this._renderSymbols(n, r, i);
        }
      }
    }, e.prototype.remove = function() {
      this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
    }, e.prototype.dispose = function() {
      this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
    }, e.prototype._renderSymbols = function(n, r, i) {
      var a = n.originalData, o = this.group;
      a.each(a.mapDimension("value"), function(s, l) {
        if (!isNaN(s)) {
          var u = a.getItemLayout(l);
          if (!(!u || !u.point)) {
            var c = u.point, f = u.offset, d = new ll({
              style: {
                // Because the special of map draw.
                // Which needs statistic of multiple series and draw on one map.
                // And each series also need a symbol with legend color
                //
                // Layout and visual are put one the different data
                // TODO
                fill: n.getData().getVisual("style").fill
              },
              shape: {
                cx: c[0] + f * 9,
                cy: c[1],
                r: 3
              },
              silent: !0,
              // Do not overlap the first series, on which labels are displayed.
              z2: 8 + (f ? 0 : dp + 1)
            });
            if (!f) {
              var h = n.mainSeries.getData(), p = a.getName(l), v = h.indexOfName(p), g = a.getItemModel(l), m = g.getModel("label"), y = h.getItemGraphicEl(v);
              Pr(d, er(g), {
                labelFetcher: {
                  getFormattedLabel: function(b, _) {
                    return n.getFormattedLabel(v, _);
                  }
                },
                defaultText: p
              }), d.disableLabelAnimation = !0, m.get("position") || d.setTextConfig({
                position: "bottom"
              }), y.onHoverStateChange = function(b) {
                oO(d, b);
              };
            }
            o.add(d);
          }
        }
      });
    }, e.type = "map", e;
  }(zt)
), BBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.needsDrawMap = !1, n.seriesGroup = [], n.getTooltipPosition = function(r) {
        if (r != null) {
          var i = this.getData().getName(r), a = this.coordinateSystem, o = a.getRegion(i);
          return o && a.dataToPoint(o.getCenter());
        }
      }, n;
    }
    return e.prototype.getInitialData = function(n) {
      for (var r = Pp(this, {
        coordDimensions: ["value"],
        encodeDefaulter: Ue(nk, this)
      }), i = Pe(), a = [], o = 0, s = r.count(); o < s; o++) {
        var l = r.getName(o);
        i.set(l, !0);
      }
      var u = qs.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
      return k(u.regions, function(c) {
        var f = c.name;
        i.get(f) || a.push(f);
      }), r.appendValues([], a), r;
    }, e.prototype.getHostGeoModel = function() {
      var n = this.option.geoIndex;
      return n != null ? this.ecModel.getComponent("geo", n) : null;
    }, e.prototype.getMapType = function() {
      return (this.getHostGeoModel() || this).option.map;
    }, e.prototype.getRawValue = function(n) {
      var r = this.getData();
      return r.get(r.mapDimension("value"), n);
    }, e.prototype.getRegionModel = function(n) {
      var r = this.getData();
      return r.getItemModel(r.indexOfName(n));
    }, e.prototype.formatTooltip = function(n, r, i) {
      for (var a = this.getData(), o = this.getRawValue(n), s = a.getName(n), l = this.seriesGroup, u = [], c = 0; c < l.length; c++) {
        var f = l[c].originalData.indexOfName(s), d = a.mapDimension("value");
        isNaN(l[c].originalData.get(d, f)) || u.push(l[c].name);
      }
      return tr("section", {
        header: u.join(", "),
        noHeader: !u.length,
        blocks: [tr("nameValue", {
          name: s,
          value: o
        })]
      });
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.getLegendIcon = function(n) {
      var r = n.icon || "roundRect", i = $n(r, 0, 0, n.itemWidth, n.itemHeight, n.itemStyle.fill);
      return i.setStyle(n.itemStyle), i.style.stroke = "none", r.indexOf("empty") > -1 && (i.style.stroke = i.style.fill, i.style.fill = "#fff", i.style.lineWidth = 2), i;
    }, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
      // 一级层叠
      // zlevel: 0,
      // 二级层叠
      z: 2,
      coordinateSystem: "geo",
      // map should be explicitly specified since ec3.
      map: "",
      // If `geoIndex` is not specified, a exclusive geo will be
      // created. Otherwise use the specified geo component, and
      // `map` and `mapType` are ignored.
      // geoIndex: 0,
      // 'center' | 'left' | 'right' | 'x%' | {number}
      left: "center",
      // 'center' | 'top' | 'bottom' | 'x%' | {number}
      top: "center",
      // right
      // bottom
      // width:
      // height
      // Aspect is width / height. Inited to be geoJson bbox aspect
      // This parameter is used for scale this aspect
      // Default value:
      // for geoSVG source: 1,
      // for geoJSON source: 0.75.
      aspectScale: null,
      // Layout with center and size
      // If you want to put map in a fixed size box with right aspect ratio
      // This two properties may be more convenient.
      // layoutCenter: [50%, 50%]
      // layoutSize: 100
      showLegendSymbol: !0,
      // Define left-top, right-bottom coords to control view
      // For example, [ [180, 90], [-180, -90] ],
      // higher priority than center and zoom
      boundingCoords: null,
      // Default on center of map
      center: null,
      zoom: 1,
      scaleLimit: null,
      selectedMode: !0,
      label: {
        show: !1,
        color: "#000"
      },
      // scaleLimit: null,
      itemStyle: {
        borderWidth: 0.5,
        borderColor: "#444",
        areaColor: "#eee"
      },
      emphasis: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          areaColor: "rgba(255,215,0,0.8)"
        }
      },
      select: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      nameProperty: "name"
    }, e;
  }(Ht)
);
function zBe(t, e) {
  var n = {};
  return k(t, function(r) {
    r.each(r.mapDimension("value"), function(i, a) {
      var o = "ec-" + r.getName(a);
      n[o] = n[o] || [], isNaN(i) || n[o].push(i);
    });
  }), t[0].map(t[0].mapDimension("value"), function(r, i) {
    for (var a = "ec-" + t[0].getName(i), o = 0, s = 1 / 0, l = -1 / 0, u = n[a].length, c = 0; c < u; c++)
      s = Math.min(s, n[a][c]), l = Math.max(l, n[a][c]), o += n[a][c];
    var f;
    return e === "min" ? f = s : e === "max" ? f = l : e === "average" ? f = o / u : f = o, u === 0 ? NaN : f;
  });
}
function VBe(t) {
  var e = {};
  t.eachSeriesByType("map", function(n) {
    var r = n.getHostGeoModel(), i = r ? "o" + r.id : "i" + n.getMapType();
    (e[i] = e[i] || []).push(n);
  }), k(e, function(n, r) {
    for (var i = zBe(ce(n, function(o) {
      return o.getData();
    }), n[0].get("mapValueCalculation")), a = 0; a < n.length; a++)
      n[a].originalData = n[a].getData();
    for (var a = 0; a < n.length; a++)
      n[a].seriesGroup = n, n[a].needsDrawMap = a === 0 && !n[a].getHostGeoModel(), n[a].setData(i.cloneShallow()), n[a].mainSeries = n[0];
  });
}
function FBe(t) {
  var e = {};
  t.eachSeriesByType("map", function(n) {
    var r = n.getMapType();
    if (!(n.getHostGeoModel() || e[r])) {
      var i = {};
      k(n.seriesGroup, function(o) {
        var s = o.coordinateSystem, l = o.originalData;
        o.get("showLegendSymbol") && t.getComponent("legend") && l.each(l.mapDimension("value"), function(u, c) {
          var f = l.getName(c), d = s.getRegion(f);
          if (!(!d || isNaN(u))) {
            var h = i[f] || 0, p = s.dataToPoint(d.getCenter());
            i[f] = h + 1, l.setItemLayout(c, {
              point: p,
              offset: h
            });
          }
        });
      });
      var a = n.getData();
      a.each(function(o) {
        var s = a.getName(o), l = a.getItemLayout(o) || {};
        l.showLabel = !i[s], a.setItemLayout(o, l);
      }), e[r] = !0;
    }
  });
}
var wF = ar, J0 = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this) || this;
      return r.type = "view", r.dimensions = ["x", "y"], r._roamTransformable = new As(), r._rawTransformable = new As(), r.name = n, r;
    }
    return e.prototype.setBoundingRect = function(n, r, i, a) {
      return this._rect = new Je(n, r, i, a), this._rect;
    }, e.prototype.getBoundingRect = function() {
      return this._rect;
    }, e.prototype.setViewRect = function(n, r, i, a) {
      this._transformTo(n, r, i, a), this._viewRect = new Je(n, r, i, a);
    }, e.prototype._transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = this._rawTransformable;
      s.transform = o.calculateTransform(new Je(n, r, i, a));
      var l = s.parent;
      s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
    }, e.prototype.setCenter = function(n, r) {
      n && (this._center = [_e(n[0], r.getWidth()), _e(n[1], r.getHeight())], this._updateCenterAndZoom());
    }, e.prototype.setZoom = function(n) {
      n = n || 1;
      var r = this.zoomLimit;
      r && (r.max != null && (n = Math.min(r.max, n)), r.min != null && (n = Math.max(r.min, n))), this._zoom = n, this._updateCenterAndZoom();
    }, e.prototype.getDefaultCenter = function() {
      var n = this.getBoundingRect(), r = n.x + n.width / 2, i = n.y + n.height / 2;
      return [r, i];
    }, e.prototype.getCenter = function() {
      return this._center || this.getDefaultCenter();
    }, e.prototype.getZoom = function() {
      return this._zoom || 1;
    }, e.prototype.getRoamTransform = function() {
      return this._roamTransformable.getLocalTransform();
    }, e.prototype._updateCenterAndZoom = function() {
      var n = this._rawTransformable.getLocalTransform(), r = this._roamTransformable, i = this.getDefaultCenter(), a = this.getCenter(), o = this.getZoom();
      a = ar([], a, n), i = ar([], i, n), r.originX = a[0], r.originY = a[1], r.x = i[0] - a[0], r.y = i[1] - a[1], r.scaleX = r.scaleY = o, this._updateTransform();
    }, e.prototype._updateTransform = function() {
      var n = this._roamTransformable, r = this._rawTransformable;
      r.parent = n, n.updateTransform(), r.updateTransform(), Lx(this.transform || (this.transform = []), r.transform || Si()), this._rawTransform = r.getLocalTransform(), this.invTransform = this.invTransform || [], kf(this.invTransform, this.transform), this.decomposeTransform();
    }, e.prototype.getTransformInfo = function() {
      var n = this._rawTransformable, r = this._roamTransformable, i = new As();
      return i.transform = r.transform, i.decomposeTransform(), {
        roam: {
          x: i.x,
          y: i.y,
          scaleX: i.scaleX,
          scaleY: i.scaleY
        },
        raw: {
          x: n.x,
          y: n.y,
          scaleX: n.scaleX,
          scaleY: n.scaleY
        }
      };
    }, e.prototype.getViewRect = function() {
      return this._viewRect;
    }, e.prototype.getViewRectAfterRoam = function() {
      var n = this.getBoundingRect().clone();
      return n.applyTransform(this.transform), n;
    }, e.prototype.dataToPoint = function(n, r, i) {
      var a = r ? this._rawTransform : this.transform;
      return i = i || [], a ? wF(i, n, a) : Mr(i, n);
    }, e.prototype.pointToData = function(n) {
      var r = this.invTransform;
      return r ? wF([], n, r) : [n[0], n[1]];
    }, e.prototype.convertToPixel = function(n, r, i) {
      var a = CF(r);
      return a === this ? a.dataToPoint(i) : null;
    }, e.prototype.convertFromPixel = function(n, r, i) {
      var a = CF(r);
      return a === this ? a.pointToData(i) : null;
    }, e.prototype.containPoint = function(n) {
      return this.getViewRectAfterRoam().contain(n[0], n[1]);
    }, e.dimensions = ["x", "y"], e;
  }(As)
);
function CF(t) {
  var e = t.seriesModel;
  return e ? e.coordinateSystem : null;
}
var WBe = {
  geoJSON: {
    aspectScale: 0.75,
    invertLongitute: !0
  },
  geoSVG: {
    aspectScale: 1,
    invertLongitute: !1
  }
}, hne = ["lng", "lat"], pne = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this, n) || this;
      a.dimensions = hne, a.type = "geo", a._nameCoordMap = Pe(), a.map = r;
      var o = i.projection, s = qs.load(r, i.nameMap, i.nameProperty), l = qs.getGeoResource(r), u = a.resourceType = l ? l.type : null, c = a.regions = s.regions, f = WBe[l.type];
      a._regionsMap = s.regionsMap, a.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && dn("Map " + r + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && dn("project and unproject must be both provided in the projeciton."), o = null)), a.projection = o;
      var d;
      if (o)
        for (var h = 0; h < c.length; h++) {
          var p = c[h].getBoundingRect(o);
          d = d || p.clone(), d.union(p);
        }
      else
        d = s.boundingRect;
      return a.setBoundingRect(d.x, d.y, d.width, d.height), a.aspectScale = o ? 1 : We(i.aspectScale, f.aspectScale), a._invertLongitute = o ? !1 : f.invertLongitute, a;
    }
    return e.prototype._transformTo = function(n, r, i, a) {
      var o = this.getBoundingRect(), s = this._invertLongitute;
      o = o.clone(), s && (o.y = -o.y - o.height);
      var l = this._rawTransformable;
      l.transform = o.calculateTransform(new Je(n, r, i, a));
      var u = l.parent;
      l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
    }, e.prototype.getRegion = function(n) {
      return this._regionsMap.get(n);
    }, e.prototype.getRegionByCoord = function(n) {
      for (var r = this.regions, i = 0; i < r.length; i++) {
        var a = r[i];
        if (a.type === "geoJSON" && a.contain(n))
          return r[i];
      }
    }, e.prototype.addGeoCoord = function(n, r) {
      this._nameCoordMap.set(n, r);
    }, e.prototype.getGeoCoord = function(n) {
      var r = this._regionsMap.get(n);
      return this._nameCoordMap.get(n) || r && r.getCenter();
    }, e.prototype.dataToPoint = function(n, r, i) {
      if (Oe(n) && (n = this.getGeoCoord(n)), n) {
        var a = this.projection;
        return a && (n = a.project(n)), n && this.projectedToPoint(n, r, i);
      }
    }, e.prototype.pointToData = function(n) {
      var r = this.projection;
      return r && (n = r.unproject(n)), n && this.pointToProjected(n);
    }, e.prototype.pointToProjected = function(n) {
      return t.prototype.pointToData.call(this, n);
    }, e.prototype.projectedToPoint = function(n, r, i) {
      return t.prototype.dataToPoint.call(this, n, r, i);
    }, e.prototype.convertToPixel = function(n, r, i) {
      var a = TF(r);
      return a === this ? a.dataToPoint(i) : null;
    }, e.prototype.convertFromPixel = function(n, r, i) {
      var a = TF(r);
      return a === this ? a.pointToData(i) : null;
    }, e;
  }(J0)
);
xn(pne, J0);
function TF(t) {
  var e = t.geoModel, n = t.seriesModel;
  return e ? e.coordinateSystem : n ? n.coordinateSystem || (n.getReferringComponents("geo", Dn).models[0] || {}).coordinateSystem : null;
}
const PF = pne;
function $F(t, e) {
  var n = t.get("boundingCoords");
  if (n != null) {
    var r = n[0], i = n[1];
    if (!(isFinite(r[0]) && isFinite(r[1]) && isFinite(i[0]) && isFinite(i[1])))
      process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
    else {
      var a = this.projection;
      if (a) {
        var o = r[0], s = r[1], l = i[0], u = i[1];
        r = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0];
        var c = function(S, x, C, T) {
          for (var w = C - S, P = T - x, $ = 0; $ <= 100; $++) {
            var A = $ / 100, D = a.project([S + w * A, x + P * A]);
            Ps(r, r, D), $s(i, i, D);
          }
        };
        c(o, s, l, s), c(l, s, l, u), c(l, u, o, u), c(o, u, l, s);
      }
      this.setBoundingRect(r[0], r[1], i[0] - r[0], i[1] - r[1]);
    }
  }
  var f = this.getBoundingRect(), d = t.get("layoutCenter"), h = t.get("layoutSize"), p = e.getWidth(), v = e.getHeight(), g = f.width / f.height * this.aspectScale, m = !1, y, b;
  d && h && (y = [_e(d[0], p), _e(d[1], v)], b = _e(h, Math.min(p, v)), !isNaN(y[0]) && !isNaN(y[1]) && !isNaN(b) ? m = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
  var _;
  if (m)
    _ = {}, g > 1 ? (_.width = b, _.height = b / g) : (_.height = b, _.width = b * g), _.y = y[1] - _.height / 2, _.x = y[0] - _.width / 2;
  else {
    var O = t.getBoxLayoutParams();
    O.aspect = g, _ = Rn(O, {
      width: p,
      height: v
    });
  }
  this.setViewRect(_.x, _.y, _.width, _.height), this.setCenter(t.get("center"), e), this.setZoom(t.get("zoom"));
}
function QBe(t, e) {
  k(e.get("geoCoord"), function(n, r) {
    t.addGeoCoord(r, n);
  });
}
var HBe = (
  /** @class */
  function() {
    function t() {
      this.dimensions = hne;
    }
    return t.prototype.create = function(e, n) {
      var r = [];
      function i(o) {
        return {
          nameProperty: o.get("nameProperty"),
          aspectScale: o.get("aspectScale"),
          projection: o.get("projection")
        };
      }
      e.eachComponent("geo", function(o, s) {
        var l = o.get("map"), u = new PF(l + s, l, le({
          nameMap: o.get("nameMap")
        }, i(o)));
        u.zoomLimit = o.get("scaleLimit"), r.push(u), o.coordinateSystem = u, u.model = o, u.resize = $F, u.resize(o, n);
      }), e.eachSeries(function(o) {
        var s = o.get("coordinateSystem");
        if (s === "geo") {
          var l = o.get("geoIndex") || 0;
          o.coordinateSystem = r[l];
        }
      });
      var a = {};
      return e.eachSeriesByType("map", function(o) {
        if (!o.getHostGeoModel()) {
          var s = o.getMapType();
          a[s] = a[s] || [], a[s].push(o);
        }
      }), k(a, function(o, s) {
        var l = ce(o, function(c) {
          return c.get("nameMap");
        }), u = new PF(s, s, le({
          nameMap: Dx(l)
        }, i(o[0])));
        u.zoomLimit = Tn.apply(null, ce(o, function(c) {
          return c.get("scaleLimit");
        })), r.push(u), u.resize = $F, u.resize(o[0], n), k(o, function(c) {
          c.coordinateSystem = u, QBe(u, c);
        });
      }), r;
    }, t.prototype.getFilledRegions = function(e, n, r, i) {
      for (var a = (e || []).slice(), o = Pe(), s = 0; s < a.length; s++)
        o.set(a[s].name, a[s]);
      var l = qs.load(n, r, i);
      return k(l.regions, function(u) {
        var c = u.name;
        !o.get(c) && a.push({
          name: c
        });
      }), a;
    }, t;
  }()
), vne = new HBe(), GBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = qs.getGeoResource(n.map);
      if (a && a.type === "geoJSON") {
        var o = n.itemStyle = n.itemStyle || {};
        "color" in o || (o.color = "#eee");
      }
      this.mergeDefaultAndTheme(n, i), gf(n, "label", ["show"]);
    }, e.prototype.optionUpdated = function() {
      var n = this, r = this.option;
      r.regions = vne.getFilledRegions(r.regions, r.map, r.nameMap, r.nameProperty);
      var i = {};
      this._optionModelMap = Aa(r.regions || [], function(a, o) {
        var s = o.name;
        return s && (a.set(s, new Wt(o, n, n.ecModel)), o.selected && (i[s] = !0)), a;
      }, Pe()), r.selectedMap || (r.selectedMap = i);
    }, e.prototype.getRegionModel = function(n) {
      return this._optionModelMap.get(n) || new Wt(null, this, this.ecModel);
    }, e.prototype.getFormattedLabel = function(n, r) {
      var i = this.getRegionModel(n), a = r === "normal" ? i.get(["label", "formatter"]) : i.get(["emphasis", "label", "formatter"]), o = {
        name: n
      };
      if (Me(a))
        return o.status = r, a(o);
      if (Oe(a))
        return a.replace("{a}", n ?? "");
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.select = function(n) {
      var r = this.option, i = r.selectedMode;
      if (i) {
        i !== "multiple" && (r.selectedMap = null);
        var a = r.selectedMap || (r.selectedMap = {});
        a[n] = !0;
      }
    }, e.prototype.unSelect = function(n) {
      var r = this.option.selectedMap;
      r && (r[n] = !1);
    }, e.prototype.toggleSelected = function(n) {
      this[this.isSelected(n) ? "unSelect" : "select"](n);
    }, e.prototype.isSelected = function(n) {
      var r = this.option.selectedMap;
      return !!(r && r[n]);
    }, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      show: !0,
      left: "center",
      top: "center",
      // Default value:
      // for geoSVG source: 1,
      // for geoJSON source: 0.75.
      aspectScale: null,
      // /// Layout with center and size
      // If you want to put map in a fixed size box with right aspect ratio
      // This two properties may be more convenient
      // layoutCenter: [50%, 50%]
      // layoutSize: 100
      silent: !1,
      // Map type
      map: "",
      // Define left-top, right-bottom coords to control view
      // For example, [ [180, 90], [-180, -90] ]
      boundingCoords: null,
      // Default on center of map
      center: null,
      zoom: 1,
      scaleLimit: null,
      // selectedMode: false
      label: {
        show: !1,
        color: "#000"
      },
      itemStyle: {
        borderWidth: 0.5,
        borderColor: "#444"
        // Default color:
        // + geoJSON: #eee
        // + geoSVG: null (use SVG original `fill`)
        // color: '#eee'
      },
      emphasis: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      select: {
        label: {
          show: !0,
          color: "rgb(100,0,0)"
        },
        itemStyle: {
          color: "rgba(255,215,0,0.8)"
        }
      },
      regions: []
      // tooltip: {
      //     show: false
      // }
    }, e;
  }(rt)
);
function AF(t, e) {
  return t.pointToProjected ? t.pointToProjected(e) : t.pointToData(e);
}
function Qk(t, e, n, r) {
  var i = t.getZoom(), a = t.getCenter(), o = e.zoom, s = t.projectedToPoint ? t.projectedToPoint(a) : t.dataToPoint(a);
  if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, t.setCenter(AF(t, s), r)), o != null) {
    if (n) {
      var l = n.min || 0, u = n.max || 1 / 0;
      o = Math.max(Math.min(i * o, u), l) / i;
    }
    t.scaleX *= o, t.scaleY *= o;
    var c = (e.originX - t.x) * (o - 1), f = (e.originY - t.y) * (o - 1);
    t.x -= c, t.y -= f, t.updateTransform(), t.setCenter(AF(t, s), r), t.setZoom(o * i);
  }
  return {
    center: t.getCenter(),
    zoom: t.getZoom()
  };
}
var jBe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.focusBlurEnabled = !0, n;
    }
    return e.prototype.init = function(n, r) {
      this._api = r;
    }, e.prototype.render = function(n, r, i, a) {
      if (this._model = n, !n.get("show")) {
        this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
        return;
      }
      this._mapDraw || (this._mapDraw = new dne(i));
      var o = this._mapDraw;
      o.draw(n, r, i, this, a), o.group.on("click", this._handleRegionClick, this), o.group.silent = n.get("silent"), this.group.add(o.group), this.updateSelectStatus(n, r, i);
    }, e.prototype._handleRegionClick = function(n) {
      var r;
      Bc(n.target, function(i) {
        return (r = Fe(i).eventData) != null;
      }, !0), r && this._api.dispatchAction({
        type: "geoToggleSelect",
        geoId: this._model.id,
        name: r.name
      });
    }, e.prototype.updateSelectStatus = function(n, r, i) {
      var a = this;
      this._mapDraw.group.traverse(function(o) {
        var s = Fe(o).eventData;
        if (s)
          return a._model.isSelected(s.name) ? i.enterSelect(o) : i.leaveSelect(o), !0;
      });
    }, e.prototype.findHighDownDispatchers = function(n) {
      return this._mapDraw && this._mapDraw.findHighDownDispatchers(n, this._model);
    }, e.prototype.dispose = function() {
      this._mapDraw && this._mapDraw.remove();
    }, e.type = "geo", e;
  }(Xt)
);
function ZBe(t, e, n) {
  qs.registerMap(t, e, n);
}
function gne(t) {
  t.registerCoordinateSystem("geo", vne), t.registerComponentModel(GBe), t.registerComponentView(jBe), t.registerImpl("registerMap", ZBe), t.registerImpl("getMap", function(n) {
    return qs.getMapForUser(n);
  });
  function e(n, r) {
    r.update = "geo:updateSelectStatus", t.registerAction(r, function(i, a) {
      var o = {}, s = [];
      return a.eachComponent({
        mainType: "geo",
        query: i
      }, function(l) {
        l[n](i.name);
        var u = l.coordinateSystem;
        k(u.regions, function(f) {
          o[f.name] = l.isSelected(f.name) || !1;
        });
        var c = [];
        k(o, function(f, d) {
          o[d] && c.push(d);
        }), s.push({
          geoIndex: l.componentIndex,
          // Use singular, the same naming convention as the event `selectchanged`.
          name: c
        });
      }), {
        selected: o,
        allSelected: s,
        name: i.name
      };
    });
  }
  e("toggleSelected", {
    type: "geoToggleSelect",
    event: "geoselectchanged"
  }), e("select", {
    type: "geoSelect",
    event: "geoselected"
  }), e("unSelect", {
    type: "geoUnSelect",
    event: "geounselected"
  }), t.registerAction({
    type: "geoRoam",
    event: "geoRoam",
    update: "updateTransform"
  }, function(n, r, i) {
    var a = n.componentType || "series";
    r.eachComponent({
      mainType: a,
      query: n
    }, function(o) {
      var s = o.coordinateSystem;
      if (s.type === "geo") {
        var l = Qk(s, n, o.get("scaleLimit"), i);
        o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), a === "series" && k(o.seriesGroup, function(u) {
          u.setCenter(l.center), u.setZoom(l.zoom);
        });
      }
    });
  });
}
function UBe(t) {
  at(gne), t.registerChartView(NBe), t.registerSeriesModel(BBe), t.registerLayout(FBe), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, VBe), pee("map", t.registerAction);
}
function XBe(t) {
  var e = t;
  e.hierNode = {
    defaultAncestor: null,
    ancestor: e,
    prelim: 0,
    modifier: 0,
    change: 0,
    shift: 0,
    i: 0,
    thread: null
  };
  for (var n = [e], r, i; r = n.pop(); )
    if (i = r.children, r.isExpand && i.length)
      for (var a = i.length, o = a - 1; o >= 0; o--) {
        var s = i[o];
        s.hierNode = {
          defaultAncestor: null,
          ancestor: s,
          prelim: 0,
          modifier: 0,
          change: 0,
          shift: 0,
          i: o,
          thread: null
        }, n.push(s);
      }
}
function YBe(t, e) {
  var n = t.isExpand ? t.children : [], r = t.parentNode.children, i = t.hierNode.i ? r[t.hierNode.i - 1] : null;
  if (n.length) {
    JBe(t);
    var a = (n[0].hierNode.prelim + n[n.length - 1].hierNode.prelim) / 2;
    i ? (t.hierNode.prelim = i.hierNode.prelim + e(t, i), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a;
  } else i && (t.hierNode.prelim = i.hierNode.prelim + e(t, i));
  t.parentNode.hierNode.defaultAncestor = eze(t, i, t.parentNode.hierNode.defaultAncestor || r[0], e);
}
function qBe(t) {
  var e = t.hierNode.prelim + t.parentNode.hierNode.modifier;
  t.setLayout({
    x: e
  }, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier;
}
function EF(t) {
  return arguments.length ? t : rze;
}
function Xv(t, e) {
  return t -= Math.PI / 2, {
    x: e * Math.cos(t),
    y: e * Math.sin(t)
  };
}
function KBe(t, e) {
  return Rn(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function JBe(t) {
  for (var e = t.children, n = e.length, r = 0, i = 0; --n >= 0; ) {
    var a = e[n];
    a.hierNode.prelim += r, a.hierNode.modifier += r, i += a.hierNode.change, r += a.hierNode.shift + i;
  }
}
function eze(t, e, n, r) {
  if (e) {
    for (var i = t, a = t, o = a.parentNode.children[0], s = e, l = i.hierNode.modifier, u = a.hierNode.modifier, c = o.hierNode.modifier, f = s.hierNode.modifier; s = hP(s), a = pP(a), s && a; ) {
      i = hP(i), o = pP(o), i.hierNode.ancestor = t;
      var d = s.hierNode.prelim + f - a.hierNode.prelim - u + r(s, a);
      d > 0 && (nze(tze(s, t, n), t, d), u += d, l += d), f += s.hierNode.modifier, u += a.hierNode.modifier, l += i.hierNode.modifier, c += o.hierNode.modifier;
    }
    s && !hP(i) && (i.hierNode.thread = s, i.hierNode.modifier += f - l), a && !pP(o) && (o.hierNode.thread = a, o.hierNode.modifier += u - c, n = t);
  }
  return n;
}
function hP(t) {
  var e = t.children;
  return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread;
}
function pP(t) {
  var e = t.children;
  return e.length && t.isExpand ? e[0] : t.hierNode.thread;
}
function tze(t, e, n) {
  return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : n;
}
function nze(t, e, n) {
  var r = n / (e.hierNode.i - t.hierNode.i);
  e.hierNode.change -= r, e.hierNode.shift += n, e.hierNode.modifier += n, e.hierNode.prelim += n, t.hierNode.change += r;
}
function rze(t, e) {
  return t.parentNode === e.parentNode ? 1 : 2;
}
var ize = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.parentPoint = [], this.childPoints = [];
    }
    return t;
  }()
), aze = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      return t.call(this, n) || this;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new ize();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.childPoints, a = i.length, o = r.parentPoint, s = i[0], l = i[a - 1];
      if (a === 1) {
        n.moveTo(o[0], o[1]), n.lineTo(s[0], s[1]);
        return;
      }
      var u = r.orient, c = u === "TB" || u === "BT" ? 0 : 1, f = 1 - c, d = _e(r.forkPosition, 1), h = [];
      h[c] = o[c], h[f] = o[f] + (l[f] - o[f]) * d, n.moveTo(o[0], o[1]), n.lineTo(h[0], h[1]), n.moveTo(s[0], s[1]), h[c] = s[c], n.lineTo(h[0], h[1]), h[c] = l[c], n.lineTo(h[0], h[1]), n.lineTo(l[0], l[1]);
      for (var p = 1; p < a - 1; p++) {
        var v = i[p];
        n.moveTo(v[0], v[1]), h[c] = v[c], n.lineTo(h[0], h[1]);
      }
    }, e;
  }(ot)
), oze = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._mainGroup = new Ve(), n;
    }
    return e.prototype.init = function(n, r) {
      this._controller = new K0(r.getZr()), this._controllerHost = {
        target: this.group
      }, this.group.add(this._mainGroup);
    }, e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = n.layoutInfo, s = this._mainGroup, l = n.get("layout");
      l === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(n, i), this._updateController(n, r, i);
      var u = this._data;
      a.diff(u).add(function(c) {
        MF(a, c) && IF(a, c, null, s, n);
      }).update(function(c, f) {
        var d = u.getItemGraphicEl(f);
        if (!MF(a, c)) {
          d && RF(u, f, d, s, n);
          return;
        }
        IF(a, c, d, s, n);
      }).remove(function(c) {
        var f = u.getItemGraphicEl(c);
        f && RF(u, c, f, s, n);
      }).execute(), this._nodeScaleRatio = n.get("nodeScaleRatio"), this._updateNodeAndLinkScale(n), n.get("expandAndCollapse") === !0 && a.eachItemGraphicEl(function(c, f) {
        c.off("click").on("click", function() {
          i.dispatchAction({
            type: "treeExpandAndCollapse",
            seriesId: n.id,
            dataIndex: f
          });
        });
      }), this._data = a;
    }, e.prototype._updateViewCoordSys = function(n, r) {
      var i = n.getData(), a = [];
      i.each(function(f) {
        var d = i.getItemLayout(f);
        d && !isNaN(d.x) && !isNaN(d.y) && a.push([+d.x, +d.y]);
      });
      var o = [], s = [];
      jx(a, o, s);
      var l = this._min, u = this._max;
      s[0] - o[0] === 0 && (o[0] = l ? l[0] : o[0] - 1, s[0] = u ? u[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = l ? l[1] : o[1] - 1, s[1] = u ? u[1] : s[1] + 1);
      var c = n.coordinateSystem = new J0();
      c.zoomLimit = n.get("scaleLimit"), c.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), c.setCenter(n.get("center"), r), c.setZoom(n.get("zoom")), this.group.attr({
        x: c.x,
        y: c.y,
        scaleX: c.scaleX,
        scaleY: c.scaleY
      }), this._min = o, this._max = s;
    }, e.prototype._updateController = function(n, r, i) {
      var a = this, o = this._controller, s = this._controllerHost, l = this.group;
      o.setPointerChecker(function(u, c, f) {
        var d = l.getBoundingRect();
        return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
      }), o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        Vk(s, u.dx, u.dy), i.dispatchAction({
          seriesId: n.id,
          type: "treeRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
          seriesId: n.id,
          type: "treeRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), a._updateNodeAndLinkScale(n), i.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function(n) {
      var r = n.getData(), i = this._getNodeGlobalScale(n);
      r.eachItemGraphicEl(function(a, o) {
        a.setSymbolScale(i);
      });
    }, e.prototype._getNodeGlobalScale = function(n) {
      var r = n.coordinateSystem;
      if (r.type !== "view")
        return 1;
      var i = this._nodeScaleRatio, a = r.scaleX || 1, o = r.getZoom(), s = (o - 1) * i + 1;
      return s / a;
    }, e.prototype.dispose = function() {
      this._controller && this._controller.dispose(), this._controllerHost = null;
    }, e.prototype.remove = function() {
      this._mainGroup.removeAll(), this._data = null;
    }, e.type = "tree", e;
  }(zt)
);
function MF(t, e) {
  var n = t.getItemLayout(e);
  return n && !isNaN(n.x) && !isNaN(n.y);
}
function IF(t, e, n, r, i) {
  var a = !n, o = t.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", c = t.tree.root, f = o.parentNode === c ? o : o.parentNode || o, d = t.getItemGraphicEl(f.dataIndex), h = f.getLayout(), p = d ? {
    x: d.__oldX,
    y: d.__oldY,
    rawX: d.__radialOldRawX,
    rawY: d.__radialOldRawY
  } : h, v = o.getLayout();
  a ? (n = new j0(t, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), n.x = p.x, n.y = p.y) : n.updateData(t, e, null, {
    symbolInnerColor: u,
    useNameLabel: !0
  }), n.__radialOldRawX = n.__radialRawX, n.__radialOldRawY = n.__radialRawY, n.__radialRawX = v.rawX, n.__radialRawY = v.rawY, r.add(n), t.setItemGraphicEl(e, n), n.__oldX = n.x, n.__oldY = n.y, Ct(n, {
    x: v.x,
    y: v.y
  }, i);
  var g = n.getSymbolPath();
  if (i.get("layout") === "radial") {
    var m = c.children[0], y = m.getLayout(), b = m.children.length, _ = void 0, O = void 0;
    if (v.x === y.x && o.isExpand === !0 && m.children.length) {
      var S = {
        x: (m.children[0].getLayout().x + m.children[b - 1].getLayout().x) / 2,
        y: (m.children[0].getLayout().y + m.children[b - 1].getLayout().y) / 2
      };
      _ = Math.atan2(S.y - y.y, S.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), O = S.x < y.x, O && (_ = _ - Math.PI);
    } else
      _ = Math.atan2(v.y - y.y, v.x - y.x), _ < 0 && (_ = Math.PI * 2 + _), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (O = v.x < y.x, O && (_ = _ - Math.PI)) : (O = v.x > y.x, O || (_ = _ - Math.PI));
    var x = O ? "left" : "right", C = s.getModel("label"), T = C.get("rotate"), w = T * (Math.PI / 180), P = g.getTextContent();
    P && (g.setTextConfig({
      position: C.get("position") || x,
      rotation: T == null ? -_ : w,
      origin: "center"
    }), P.setStyle("verticalAlign", "middle"));
  }
  var $ = s.get(["emphasis", "focus"]), A = $ === "relative" ? gm(o.getAncestorsIndices(), o.getDescendantIndices()) : $ === "ancestor" ? o.getAncestorsIndices() : $ === "descendant" ? o.getDescendantIndices() : null;
  A && (Fe(n).focus = A), sze(i, o, c, n, p, h, v, r), n.__edge && (n.onHoverStateChange = function(D) {
    if (D !== "blur") {
      var E = o.parentNode && t.getItemGraphicEl(o.parentNode.dataIndex);
      E && E.hoverState === B0 || oO(n.__edge, D);
    }
  });
}
function sze(t, e, n, r, i, a, o, s) {
  var l = e.getModel(), u = t.get("edgeShape"), c = t.get("layout"), f = t.getOrient(), d = t.get(["lineStyle", "curveness"]), h = t.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), v = r.__edge;
  if (u === "curve")
    e.parentNode && e.parentNode !== n && (v || (v = r.__edge = new V0({
      shape: vE(c, f, d, i, i)
    })), Ct(v, {
      shape: vE(c, f, d, a, o)
    }, t));
  else if (u === "polyline") {
    if (c === "orthogonal") {
      if (e !== n && e.children && e.children.length !== 0 && e.isExpand === !0) {
        for (var g = e.children, m = [], y = 0; y < g.length; y++) {
          var b = g[y].getLayout();
          m.push([b.x, b.y]);
        }
        v || (v = r.__edge = new aze({
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: [[o.x, o.y]],
            orient: f,
            forkPosition: h
          }
        })), Ct(v, {
          shape: {
            parentPoint: [o.x, o.y],
            childPoints: m
          }
        }, t);
      }
    } else if (process.env.NODE_ENV !== "production")
      throw new Error("The polyline edgeShape can only be used in orthogonal layout");
  }
  v && !(u === "polyline" && !e.isExpand) && (v.useStyle(Re({
    strokeNoScale: !0,
    fill: null
  }, p)), Tr(v, l, "lineStyle"), bf(v), s.add(v));
}
function DF(t, e, n, r, i) {
  var a = e.tree.root, o = mne(a, t), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(t.dataIndex);
  if (u) {
    var c = e.getItemGraphicEl(s.dataIndex), f = c.__edge, d = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? f : void 0), h = r.get("edgeShape"), p = r.get("layout"), v = r.get("orient"), g = r.get(["lineStyle", "curveness"]);
    d && (h === "curve" ? uu(d, {
      shape: vE(p, v, g, l, l),
      style: {
        opacity: 0
      }
    }, r, {
      cb: function() {
        n.remove(d);
      },
      removeOpt: i
    }) : h === "polyline" && r.get("layout") === "orthogonal" && uu(d, {
      shape: {
        parentPoint: [l.x, l.y],
        childPoints: [[l.x, l.y]]
      },
      style: {
        opacity: 0
      }
    }, r, {
      cb: function() {
        n.remove(d);
      },
      removeOpt: i
    }));
  }
}
function mne(t, e) {
  for (var n = e.parentNode === t ? e : e.parentNode || e, r; r = n.getLayout(), r == null; )
    n = n.parentNode === t ? n : n.parentNode || n;
  return {
    source: n,
    sourceLayout: r
  };
}
function RF(t, e, n, r, i) {
  var a = t.tree.getNodeByDataIndex(e), o = t.tree.root, s = mne(o, a).sourceLayout, l = {
    duration: i.get("animationDurationUpdate"),
    easing: i.get("animationEasingUpdate")
  };
  uu(n, {
    x: s.x + 1,
    y: s.y + 1
  }, i, {
    cb: function() {
      r.remove(n), t.setItemGraphicEl(e, null);
    },
    removeOpt: l
  }), n.fadeOut(null, t.hostModel, {
    fadeLabel: !0,
    animation: l
  }), a.children.forEach(function(u) {
    DF(u, t, r, i, l);
  }), DF(a, t, r, i, l);
}
function vE(t, e, n, r, i) {
  var a, o, s, l, u, c, f, d;
  if (t === "radial") {
    u = r.rawX, f = r.rawY, c = i.rawX, d = i.rawY;
    var h = Xv(u, f), p = Xv(u, f + (d - f) * n), v = Xv(c, d + (f - d) * n), g = Xv(c, d);
    return {
      x1: h.x || 0,
      y1: h.y || 0,
      x2: g.x || 0,
      y2: g.y || 0,
      cpx1: p.x || 0,
      cpy1: p.y || 0,
      cpx2: v.x || 0,
      cpy2: v.y || 0
    };
  } else
    u = r.x, f = r.y, c = i.x, d = i.y, (e === "LR" || e === "RL") && (a = u + (c - u) * n, o = f, s = c + (u - c) * n, l = d), (e === "TB" || e === "BT") && (a = u, o = f + (d - f) * n, s = c, l = d + (f - d) * n);
  return {
    x1: u,
    y1: f,
    x2: c,
    y2: d,
    cpx1: a,
    cpy1: o,
    cpx2: s,
    cpy2: l
  };
}
var Sa = bt();
function yne(t) {
  var e = t.mainData, n = t.datas;
  n || (n = {
    main: e
  }, t.datasAttr = {
    main: "data"
  }), t.datas = t.mainData = null, bne(e, n, t), k(n, function(r) {
    k(e.TRANSFERABLE_METHODS, function(i) {
      r.wrapMethod(i, Ue(lze, t));
    });
  }), e.wrapMethod("cloneShallow", Ue(cze, t)), k(e.CHANGABLE_METHODS, function(r) {
    e.wrapMethod(r, Ue(uze, t));
  }), ke(n[e.dataType] === e);
}
function lze(t, e) {
  if (hze(this)) {
    var n = le({}, Sa(this).datas);
    n[this.dataType] = e, bne(e, n, t);
  } else
    Hk(e, this.dataType, Sa(this).mainData, t);
  return e;
}
function uze(t, e) {
  return t.struct && t.struct.update(), e;
}
function cze(t, e) {
  return k(Sa(e).datas, function(n, r) {
    n !== e && Hk(n.cloneShallow(), r, e, t);
  }), e;
}
function fze(t) {
  var e = Sa(this).mainData;
  return t == null || e == null ? e : Sa(e).datas[t];
}
function dze() {
  var t = Sa(this).mainData;
  return t == null ? [{
    data: t
  }] : ce(st(Sa(t).datas), function(e) {
    return {
      type: e,
      data: Sa(t).datas[e]
    };
  });
}
function hze(t) {
  return Sa(t).mainData === t;
}
function bne(t, e, n) {
  Sa(t).datas = {}, k(e, function(r, i) {
    Hk(r, i, t, n);
  });
}
function Hk(t, e, n, r) {
  Sa(n).datas[e] = t, Sa(t).mainData = n, t.dataType = e, r.struct && (t[r.structAttr] = r.struct, r.struct[r.datasAttr[e]] = t), t.getLinkedData = fze, t.getLinkedDataAll = dze;
}
var pze = (
  /** @class */
  function() {
    function t(e, n) {
      this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = n;
    }
    return t.prototype.isRemoved = function() {
      return this.dataIndex < 0;
    }, t.prototype.eachNode = function(e, n, r) {
      Me(e) && (r = n, n = e, e = null), e = e || {}, Oe(e) && (e = {
        order: e
      });
      var i = e.order || "preorder", a = this[e.attr || "children"], o;
      i === "preorder" && (o = n.call(r, this));
      for (var s = 0; !o && s < a.length; s++)
        a[s].eachNode(e, n, r);
      i === "postorder" && n.call(r, this);
    }, t.prototype.updateDepthAndHeight = function(e) {
      var n = 0;
      this.depth = e;
      for (var r = 0; r < this.children.length; r++) {
        var i = this.children[r];
        i.updateDepthAndHeight(e + 1), i.height > n && (n = i.height);
      }
      this.height = n + 1;
    }, t.prototype.getNodeById = function(e) {
      if (this.getId() === e)
        return this;
      for (var n = 0, r = this.children, i = r.length; n < i; n++) {
        var a = r[n].getNodeById(e);
        if (a)
          return a;
      }
    }, t.prototype.contains = function(e) {
      if (e === this)
        return !0;
      for (var n = 0, r = this.children, i = r.length; n < i; n++) {
        var a = r[n].contains(e);
        if (a)
          return a;
      }
    }, t.prototype.getAncestors = function(e) {
      for (var n = [], r = e ? this : this.parentNode; r; )
        n.push(r), r = r.parentNode;
      return n.reverse(), n;
    }, t.prototype.getAncestorsIndices = function() {
      for (var e = [], n = this; n; )
        e.push(n.dataIndex), n = n.parentNode;
      return e.reverse(), e;
    }, t.prototype.getDescendantIndices = function() {
      var e = [];
      return this.eachNode(function(n) {
        e.push(n.dataIndex);
      }), e;
    }, t.prototype.getValue = function(e) {
      var n = this.hostTree.data;
      return n.getStore().get(n.getDimensionIndex(e || "value"), this.dataIndex);
    }, t.prototype.setLayout = function(e, n) {
      this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, n);
    }, t.prototype.getLayout = function() {
      return this.hostTree.data.getItemLayout(this.dataIndex);
    }, t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostTree, r = n.data.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getLevelModel = function() {
      return (this.hostTree.levelModels || [])[this.depth];
    }, t.prototype.setVisual = function(e, n) {
      this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, n);
    }, t.prototype.getVisual = function(e) {
      return this.hostTree.data.getItemVisual(this.dataIndex, e);
    }, t.prototype.getRawIndex = function() {
      return this.hostTree.data.getRawIndex(this.dataIndex);
    }, t.prototype.getId = function() {
      return this.hostTree.data.getId(this.dataIndex);
    }, t.prototype.getChildIndex = function() {
      if (this.parentNode) {
        for (var e = this.parentNode.children, n = 0; n < e.length; ++n)
          if (e[n] === this)
            return n;
        return -1;
      }
      return -1;
    }, t.prototype.isAncestorOf = function(e) {
      for (var n = e.parentNode; n; ) {
        if (n === this)
          return !0;
        n = n.parentNode;
      }
      return !1;
    }, t.prototype.isDescendantOf = function(e) {
      return e !== this && e.isAncestorOf(this);
    }, t;
  }()
), Gk = (
  /** @class */
  function() {
    function t(e) {
      this.type = "tree", this._nodes = [], this.hostModel = e;
    }
    return t.prototype.eachNode = function(e, n, r) {
      this.root.eachNode(e, n, r);
    }, t.prototype.getNodeByDataIndex = function(e) {
      var n = this.data.getRawIndex(e);
      return this._nodes[n];
    }, t.prototype.getNodeById = function(e) {
      return this.root.getNodeById(e);
    }, t.prototype.update = function() {
      for (var e = this.data, n = this._nodes, r = 0, i = n.length; r < i; r++)
        n[r].dataIndex = -1;
      for (var r = 0, i = e.count(); r < i; r++)
        n[e.getRawIndex(r)].dataIndex = r;
    }, t.prototype.clearLayouts = function() {
      this.data.clearItemLayouts();
    }, t.createTree = function(e, n, r) {
      var i = new t(n), a = [], o = 1;
      s(e);
      function s(c, f) {
        var d = c.value;
        o = Math.max(o, ue(d) ? d.length : 1), a.push(c);
        var h = new pze(Vn(c.name, ""), i);
        f ? vze(h, f) : i.root = h, i._nodes.push(h);
        var p = c.children;
        if (p)
          for (var v = 0; v < p.length; v++)
            s(p[v], h);
      }
      i.root.updateDepthAndHeight(0);
      var l = wp(a, {
        coordDimensions: ["value"],
        dimensionsCount: o
      }).dimensions, u = new Lr(l, n);
      return u.initData(a), r && r(u), yne({
        mainData: u,
        struct: i,
        structAttr: "tree"
      }), i.update(), i;
    }, t;
  }()
);
function vze(t, e) {
  var n = e.children;
  t.parentNode !== e && (n.push(t), t.parentNode = e);
}
function Lm(t, e, n) {
  if (t && et(e, t.type) >= 0) {
    var r = n.getData().tree.root, i = t.targetNode;
    if (Oe(i) && (i = r.getNodeById(i)), i && r.contains(i))
      return {
        node: i
      };
    var a = t.targetNodeId;
    if (a != null && (i = r.getNodeById(a)))
      return {
        node: i
      };
  }
}
function _ne(t) {
  for (var e = []; t; )
    t = t.parentNode, t && e.push(t);
  return e.reverse();
}
function jk(t, e) {
  var n = _ne(t);
  return et(n, e) >= 0;
}
function bw(t, e) {
  for (var n = []; t; ) {
    var r = t.dataIndex;
    n.push({
      name: t.name,
      dataIndex: r,
      value: e.getRawValue(r)
    }), t = t.parentNode;
  }
  return n.reverse(), n;
}
var gze = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.hasSymbolVisual = !0, n.ignoreStyleOnData = !0, n;
    }
    return e.prototype.getInitialData = function(n) {
      var r = {
        name: n.name,
        children: n.data
      }, i = n.leaves || {}, a = new Wt(i, this, this.ecModel), o = Gk.createTree(r, this, s);
      function s(f) {
        f.wrapMethod("getItemModel", function(d, h) {
          var p = o.getNodeByDataIndex(h);
          return p && p.children.length && p.isExpand || (d.parentModel = a), d;
        });
      }
      var l = 0;
      o.eachNode("preorder", function(f) {
        f.depth > l && (l = f.depth);
      });
      var u = n.expandAndCollapse, c = u && n.initialTreeDepth >= 0 ? n.initialTreeDepth : l;
      return o.root.eachNode("preorder", function(f) {
        var d = f.hostTree.data.getRawDataItem(f.dataIndex);
        f.isExpand = d && d.collapsed != null ? !d.collapsed : f.depth <= c;
      }), o.data;
    }, e.prototype.getOrient = function() {
      var n = this.get("orient");
      return n === "horizontal" ? n = "LR" : n === "vertical" && (n = "TB"), n;
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.formatTooltip = function(n, r, i) {
      for (var a = this.getData().tree, o = a.root.children[0], s = a.getNodeByDataIndex(n), l = s.getValue(), u = s.name; s && s !== o; )
        u = s.parentNode.name + "." + u, s = s.parentNode;
      return tr("nameValue", {
        name: u,
        value: l,
        noValue: isNaN(l) || l == null
      });
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treeAncestors = bw(i, this), r.collapsed = !i.isExpand, r;
    }, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      // the position of the whole view
      left: "12%",
      top: "12%",
      right: "12%",
      bottom: "12%",
      // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'
      layout: "orthogonal",
      // value can be 'polyline'
      edgeShape: "curve",
      edgeForkPosition: "50%",
      // true | false | 'move' | 'scale', see module:component/helper/RoamController.
      roam: !1,
      // Symbol size scale ratio in roam
      nodeScaleRatio: 0.4,
      // Default on center of graph
      center: null,
      zoom: 1,
      orient: "LR",
      symbol: "emptyCircle",
      symbolSize: 7,
      expandAndCollapse: !0,
      initialTreeDepth: 2,
      lineStyle: {
        color: "#ccc",
        width: 1.5,
        curveness: 0.5
      },
      itemStyle: {
        color: "lightsteelblue",
        // borderColor: '#c23531',
        borderWidth: 1.5
      },
      label: {
        show: !0
      },
      animationEasing: "linear",
      animationDuration: 700,
      animationDurationUpdate: 500
    }, e;
  }(Ht)
);
function mze(t, e, n) {
  for (var r = [t], i = [], a; a = r.pop(); )
    if (i.push(a), a.isExpand) {
      var o = a.children;
      if (o.length)
        for (var s = 0; s < o.length; s++)
          r.push(o[s]);
    }
  for (; a = i.pop(); )
    e(a, n);
}
function yv(t, e) {
  for (var n = [t], r; r = n.pop(); )
    if (e(r), r.isExpand) {
      var i = r.children;
      if (i.length)
        for (var a = i.length - 1; a >= 0; a--)
          n.push(i[a]);
    }
}
function yze(t, e) {
  t.eachSeriesByType("tree", function(n) {
    bze(n, e);
  });
}
function bze(t, e) {
  var n = KBe(t, e);
  t.layoutInfo = n;
  var r = t.get("layout"), i = 0, a = 0, o = null;
  r === "radial" ? (i = 2 * Math.PI, a = Math.min(n.height, n.width) / 2, o = EF(function(b, _) {
    return (b.parentNode === _.parentNode ? 1 : 2) / b.depth;
  })) : (i = n.width, a = n.height, o = EF());
  var s = t.getData().tree.root, l = s.children[0];
  if (l) {
    XBe(s), mze(l, YBe, o), s.hierNode.modifier = -l.hierNode.prelim, yv(l, qBe);
    var u = l, c = l, f = l;
    yv(l, function(b) {
      var _ = b.getLayout().x;
      _ < u.getLayout().x && (u = b), _ > c.getLayout().x && (c = b), b.depth > f.depth && (f = b);
    });
    var d = u === c ? 1 : o(u, c) / 2, h = d - u.getLayout().x, p = 0, v = 0, g = 0, m = 0;
    if (r === "radial")
      p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
        g = (b.getLayout().x + h) * p, m = (b.depth - 1) * v;
        var _ = Xv(g, m);
        b.setLayout({
          x: _.x,
          y: _.y,
          rawX: g,
          rawY: m
        }, !0);
      });
    else {
      var y = t.getOrient();
      y === "RL" || y === "LR" ? (v = a / (c.getLayout().x + d + h), p = i / (f.depth - 1 || 1), yv(l, function(b) {
        m = (b.getLayout().x + h) * v, g = y === "LR" ? (b.depth - 1) * p : i - (b.depth - 1) * p, b.setLayout({
          x: g,
          y: m
        }, !0);
      })) : (y === "TB" || y === "BT") && (p = i / (c.getLayout().x + d + h), v = a / (f.depth - 1 || 1), yv(l, function(b) {
        g = (b.getLayout().x + h) * p, m = y === "TB" ? (b.depth - 1) * v : a - (b.depth - 1) * v, b.setLayout({
          x: g,
          y: m
        }, !0);
      }));
    }
  }
}
function _ze(t) {
  t.eachSeriesByType("tree", function(e) {
    var n = e.getData(), r = n.tree;
    r.eachNode(function(i) {
      var a = i.getModel(), o = a.getModel("itemStyle").getItemStyle(), s = n.ensureUniqueItemVisual(i.dataIndex, "style");
      le(s, o);
    });
  });
}
function Oze(t) {
  t.registerAction({
    type: "treeExpandAndCollapse",
    event: "treeExpandAndCollapse",
    update: "update"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(r) {
      var i = e.dataIndex, a = r.getData().tree, o = a.getNodeByDataIndex(i);
      o.isExpand = !o.isExpand;
    });
  }), t.registerAction({
    type: "treeRoam",
    event: "treeRoam",
    // Here we set 'none' instead of 'update', because roam action
    // just need to update the transform matrix without having to recalculate
    // the layout. So don't need to go through the whole update process, such
    // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.
    update: "none"
  }, function(e, n, r) {
    n.eachComponent({
      mainType: "series",
      subType: "tree",
      query: e
    }, function(i) {
      var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
      i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
    });
  });
}
function Sze(t) {
  t.registerChartView(oze), t.registerSeriesModel(gze), t.registerLayout(yze), t.registerVisual(_ze), Oze(t);
}
var kF = ["treemapZoomToNode", "treemapRender", "treemapMove"];
function xze(t) {
  for (var e = 0; e < kF.length; e++)
    t.registerAction({
      type: kF[e],
      update: "updateView"
    }, On);
  t.registerAction({
    type: "treemapRootToNode",
    update: "updateView"
  }, function(n, r) {
    r.eachComponent({
      mainType: "series",
      subType: "treemap",
      query: n
    }, i);
    function i(a, o) {
      var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(n, s, a);
      if (l) {
        var u = a.getViewRoot();
        u && (n.direction = jk(u, l.node) ? "rollUp" : "drillDown"), a.resetViewRoot(l.node);
      }
    }
  });
}
function One(t) {
  var e = t.getData(), n = e.tree, r = {};
  n.eachNode(function(i) {
    for (var a = i; a && a.depth > 1; )
      a = a.parentNode;
    var o = QA(t.ecModel, a.name || a.dataIndex + "", r);
    i.setVisual("decal", o);
  });
}
var wze = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.preventUsingHoverLayer = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = {
        name: n.name,
        children: n.data
      };
      Sne(i);
      var a = n.levels || [], o = this.designatedVisualItemStyle = {}, s = new Wt({
        itemStyle: o
      }, this, r);
      a = n.levels = Cze(a, r);
      var l = ce(a || [], function(f) {
        return new Wt(f, s, r);
      }, this), u = Gk.createTree(i, this, c);
      function c(f) {
        f.wrapMethod("getItemModel", function(d, h) {
          var p = u.getNodeByDataIndex(h), v = p ? l[p.depth] : null;
          return d.parentModel = v || s, d;
        });
      }
      return u.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
      return tr("nameValue", {
        name: s,
        value: o
      });
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treeAncestors = bw(i, this), r.treePathInfo = r.treeAncestors, r;
    }, e.prototype.setLayoutInfo = function(n) {
      this.layoutInfo = this.layoutInfo || {}, le(this.layoutInfo, n);
    }, e.prototype.mapIdToIndex = function(n) {
      var r = this._idIndexMap;
      r || (r = this._idIndexMap = Pe(), this._idIndexMapCount = 0);
      var i = r.get(n);
      return i == null && r.set(n, i = this._idIndexMapCount++), i;
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(n) {
      n ? this._viewRoot = n : n = this._viewRoot;
      var r = this.getRawData().tree.root;
      (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
    }, e.prototype.enableAriaDecal = function() {
      One(this);
    }, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
      // Disable progressive rendering
      progressive: 0,
      // size: ['80%', '80%'],            // deprecated, compatible with ec2.
      left: "center",
      top: "middle",
      width: "80%",
      height: "80%",
      sort: !0,
      clipWindow: "origin",
      squareRatio: 0.5 * (1 + Math.sqrt(5)),
      leafDepth: null,
      drillDownIcon: "▶",
      // to align specialized icon. ▷▶❒❐▼✚
      zoomToNodeRatio: 0.32 * 0.32,
      scaleLimit: null,
      roam: !0,
      nodeClick: "zoomToNode",
      animation: !0,
      animationDurationUpdate: 900,
      animationEasing: "quinticInOut",
      breadcrumb: {
        show: !0,
        height: 22,
        left: "center",
        top: "bottom",
        // right
        // bottom
        emptyItemWidth: 25,
        itemStyle: {
          color: "rgba(0,0,0,0.7)",
          textStyle: {
            color: "#fff"
          }
        },
        emphasis: {
          itemStyle: {
            color: "rgba(0,0,0,0.9)"
            // '#5793f3',
          }
        }
      },
      label: {
        show: !0,
        // Do not use textDistance, for ellipsis rect just the same as treemap node rect.
        distance: 0,
        padding: 5,
        position: "inside",
        // formatter: null,
        color: "#fff",
        overflow: "truncate"
        // align
        // verticalAlign
      },
      upperLabel: {
        show: !1,
        position: [0, "50%"],
        height: 20,
        // formatter: null,
        // color: '#fff',
        overflow: "truncate",
        // align: null,
        verticalAlign: "middle"
      },
      itemStyle: {
        color: null,
        colorAlpha: null,
        colorSaturation: null,
        borderWidth: 0,
        gapWidth: 0,
        borderColor: "#fff",
        borderColorSaturation: null
        // If specified, borderColor will be ineffective, and the
        // border color is evaluated by color of current node and
        // borderColorSaturation.
      },
      emphasis: {
        upperLabel: {
          show: !0,
          position: [0, "50%"],
          overflow: "truncate",
          verticalAlign: "middle"
        }
      },
      visualDimension: 0,
      visualMin: null,
      visualMax: null,
      color: [],
      // level[n].color (if necessary).
      // + Specify color list of each level. level[0].color would be global
      // color list if not specified. (see method `setDefault`).
      // + But set as a empty array to forbid fetch color from global palette
      // when using nodeModel.get('color'), otherwise nodes on deep level
      // will always has color palette set and are not able to inherit color
      // from parent node.
      // + TreemapSeries.color can not be set as 'none', otherwise effect
      // legend color fetching (see seriesColor.js).
      colorAlpha: null,
      colorSaturation: null,
      colorMappingBy: "index",
      visibleMin: 10,
      // be rendered. Only works when sort is 'asc' or 'desc'.
      childrenVisibleMin: null,
      // grandchildren will not show.
      // Why grandchildren? If not grandchildren but children,
      // some siblings show children and some not,
      // the appearance may be mess and not consistent,
      levels: []
      // Each item: {
      //     visibleMin, itemStyle, visualDimension, label
      // }
    }, e;
  }(Ht)
);
function Sne(t) {
  var e = 0;
  k(t.children, function(r) {
    Sne(r);
    var i = r.value;
    ue(i) && (i = i[0]), e += i;
  });
  var n = t.value;
  ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
}
function Cze(t, e) {
  var n = Qt(e.get("color")), r = Qt(e.get(["aria", "decal", "decals"]));
  if (n) {
    t = t || [];
    var i, a;
    k(t, function(s) {
      var l = new Wt(s), u = l.get("color"), c = l.get("decal");
      (l.get(["itemStyle", "color"]) || u && u !== "none") && (i = !0), (l.get(["itemStyle", "decal"]) || c && c !== "none") && (a = !0);
    });
    var o = t[0] || (t[0] = {});
    return i || (o.color = n.slice()), !a && r && (o.decal = r.slice()), t;
  }
}
var Tze = 8, LF = 8, vP = 5, Pze = (
  /** @class */
  function() {
    function t(e) {
      this.group = new Ve(), e.add(this.group);
    }
    return t.prototype.render = function(e, n, r, i) {
      var a = e.getModel("breadcrumb"), o = this.group;
      if (o.removeAll(), !(!a.get("show") || !r)) {
        var s = a.getModel("itemStyle"), l = a.getModel("emphasis"), u = s.getModel("textStyle"), c = l.getModel(["itemStyle", "textStyle"]), f = {
          pos: {
            left: a.get("left"),
            right: a.get("right"),
            top: a.get("top"),
            bottom: a.get("bottom")
          },
          box: {
            width: n.getWidth(),
            height: n.getHeight()
          },
          emptyItemWidth: a.get("emptyItemWidth"),
          totalWidth: 0,
          renderList: []
        };
        this._prepare(r, f, u), this._renderContent(e, f, s, l, u, c, i), aw(o, f.pos, f.box);
      }
    }, t.prototype._prepare = function(e, n, r) {
      for (var i = e; i; i = i.parentNode) {
        var a = Vn(i.getModel().get("name"), ""), o = r.getTextRect(a), s = Math.max(o.width + Tze * 2, n.emptyItemWidth);
        n.totalWidth += s + LF, n.renderList.push({
          node: i,
          text: a,
          width: s
        });
      }
    }, t.prototype._renderContent = function(e, n, r, i, a, o, s) {
      for (var l = 0, u = n.emptyItemWidth, c = e.get(["breadcrumb", "height"]), f = gLe(n.pos, n.box), d = n.totalWidth, h = n.renderList, p = i.getModel("itemStyle").getItemStyle(), v = h.length - 1; v >= 0; v--) {
        var g = h[v], m = g.node, y = g.width, b = g.text;
        d > f.width && (d -= y - u, y = u, b = null);
        var _ = new ii({
          shape: {
            points: $ze(l, 0, y, c, v === h.length - 1, v === 0)
          },
          style: Re(r.getItemStyle(), {
            lineJoin: "bevel"
          }),
          textContent: new gt({
            style: Zt(a, {
              text: b
            })
          }),
          textConfig: {
            position: "inside"
          },
          z2: dp * 1e4,
          onclick: Ue(s, m)
        });
        _.disableLabelAnimation = !0, _.getTextContent().ensureState("emphasis").style = Zt(o, {
          text: b
        }), _.ensureState("emphasis").style = p, bn(_, i.get("focus"), i.get("blurScope"), i.get("disabled")), this.group.add(_), Aze(_, e, m), l += y + LF;
      }
    }, t.prototype.remove = function() {
      this.group.removeAll();
    }, t;
  }()
);
function $ze(t, e, n, r, i, a) {
  var o = [[i ? t : t - vP, e], [t + n, e], [t + n, e + r], [i ? t : t - vP, e + r]];
  return !a && o.splice(2, 0, [t + n + vP, e + r / 2]), !i && o.push([t, e + r / 2]), o;
}
function Aze(t, e, n) {
  Fe(t).eventData = {
    componentType: "series",
    componentSubType: "treemap",
    componentIndex: e.componentIndex,
    seriesIndex: e.seriesIndex,
    seriesName: e.name,
    seriesType: "treemap",
    selfType: "breadcrumb",
    nodeData: {
      dataIndex: n && n.dataIndex,
      name: n && n.name
    },
    treePathInfo: n && bw(n, e)
  };
}
var Eze = (
  /** @class */
  function() {
    function t() {
      this._storage = [], this._elExistsMap = {};
    }
    return t.prototype.add = function(e, n, r, i, a) {
      return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
        el: e,
        target: n,
        duration: r,
        delay: i,
        easing: a
      }), !0);
    }, t.prototype.finished = function(e) {
      return this._finishedCallback = e, this;
    }, t.prototype.start = function() {
      for (var e = this, n = this._storage.length, r = function() {
        n--, n <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
      }, i = 0, a = this._storage.length; i < a; i++) {
        var o = this._storage[i];
        o.el.animateTo(o.target, {
          duration: o.duration,
          delay: o.delay,
          easing: o.easing,
          setToFinal: !0,
          done: r,
          aborted: r
        });
      }
      return this;
    }, t;
  }()
);
function Mze() {
  return new Eze();
}
var gE = Ve, NF = mt, BF = 3, zF = "label", VF = "upperLabel", Ize = dp * 10, Dze = dp * 2, Rze = dp * 3, pc = yf([
  ["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.
]), FF = function(t) {
  var e = pc(t);
  return e.stroke = e.fill = e.lineWidth = null, e;
}, IO = bt(), kze = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._state = "ready", n._storage = bv(), n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = r.findComponents({
        mainType: "series",
        subType: "treemap",
        query: a
      });
      if (!(et(o, n) < 0)) {
        this.seriesModel = n, this.api = i, this.ecModel = r;
        var s = ["treemapZoomToNode", "treemapRootToNode"], l = Lm(a, s, n), u = a && a.type, c = n.layoutInfo, f = !this._oldTree, d = this._storage, h = u === "treemapRootToNode" && l && d ? {
          rootNodeGroup: d.nodeGroup[l.node.getRawIndex()],
          direction: a.direction
        } : null, p = this._giveContainerGroup(c), v = n.get("animation"), g = this._doRender(p, n, h);
        v && !f && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, n, h) : g.renderFinally(), this._resetController(i), this._renderBreadcrumb(n, i, l);
      }
    }, e.prototype._giveContainerGroup = function(n) {
      var r = this._containerGroup;
      return r || (r = this._containerGroup = new gE(), this._initEvents(r), this.group.add(r)), r.x = n.x, r.y = n.y, r;
    }, e.prototype._doRender = function(n, r, i) {
      var a = r.getData().tree, o = this._oldTree, s = bv(), l = bv(), u = this._storage, c = [];
      function f(y, b, _, O) {
        return Lze(r, l, u, i, s, c, y, b, _, O);
      }
      v(a.root ? [a.root] : [], o && o.root ? [o.root] : [], n, a === o || !o, 0);
      var d = g(u);
      if (this._oldTree = a, this._storage = l, this._controllerHost) {
        var h = this.seriesModel.layoutInfo, p = a.root.getLayout();
        p.width === h.width && p.height === h.height && (this._controllerHost.zoom = 1);
      }
      return {
        lastsForAnimation: s,
        willDeleteEls: d,
        renderFinally: m
      };
      function v(y, b, _, O, S) {
        O ? (b = y, k(y, function(T, w) {
          !T.isRemoved() && C(w, w);
        })) : new Us(b, y, x, x).add(C).update(C).remove(Ue(C, null)).execute();
        function x(T) {
          return T.getId();
        }
        function C(T, w) {
          var P = T != null ? y[T] : null, $ = w != null ? b[w] : null, A = f(P, $, _, S);
          A && v(P && P.viewChildren || [], $ && $.viewChildren || [], A, O, S + 1);
        }
      }
      function g(y) {
        var b = bv();
        return y && k(y, function(_, O) {
          var S = b[O];
          k(_, function(x) {
            x && (S.push(x), IO(x).willDelete = !0);
          });
        }), b;
      }
      function m() {
        k(d, function(y) {
          k(y, function(b) {
            b.parent && b.parent.remove(b);
          });
        }), k(c, function(y) {
          y.invisible = !0, y.dirty();
        });
      }
    }, e.prototype._doAnimation = function(n, r, i, a) {
      var o = i.get("animationDurationUpdate"), s = i.get("animationEasing"), l = (Me(o) ? 0 : o) || 0, u = (Me(s) ? null : s) || "cubicOut", c = Mze();
      k(r.willDeleteEls, function(f, d) {
        k(f, function(h, p) {
          if (!h.invisible) {
            var v = h.parent, g, m = IO(v);
            if (a && a.direction === "drillDown")
              g = v === a.rootNodeGroup ? {
                shape: {
                  x: 0,
                  y: 0,
                  width: m.nodeWidth,
                  height: m.nodeHeight
                },
                style: {
                  opacity: 0
                }
              } : {
                style: {
                  opacity: 0
                }
              };
            else {
              var y = 0, b = 0;
              m.willDelete || (y = m.nodeWidth / 2, b = m.nodeHeight / 2), g = d === "nodeGroup" ? {
                x: y,
                y: b,
                style: {
                  opacity: 0
                }
              } : {
                shape: {
                  x: y,
                  y: b,
                  width: 0,
                  height: 0
                },
                style: {
                  opacity: 0
                }
              };
            }
            g && c.add(h, g, l, 0, u);
          }
        });
      }), k(this._storage, function(f, d) {
        k(f, function(h, p) {
          var v = r.lastsForAnimation[d][p], g = {};
          v && (h instanceof Ve ? v.oldX != null && (g.x = h.x, g.y = h.y, h.x = v.oldX, h.y = v.oldY) : (v.oldShape && (g.shape = le({}, h.shape), h.setShape(v.oldShape)), v.fadein ? (h.setStyle("opacity", 0), g.style = {
            opacity: 1
          }) : h.style.opacity !== 1 && (g.style = {
            opacity: 1
          })), c.add(h, g, l, 0, u));
        });
      }, this), this._state = "animating", c.finished(xe(function() {
        this._state = "ready", r.renderFinally();
      }, this)).start();
    }, e.prototype._resetController = function(n) {
      var r = this._controller, i = this._controllerHost;
      i || (this._controllerHost = {
        target: this.group
      }, i = this._controllerHost), r || (r = this._controller = new K0(n.getZr()), r.enable(this.seriesModel.get("roam")), i.zoomLimit = this.seriesModel.get("scaleLimit"), i.zoom = this.seriesModel.get("zoom"), r.on("pan", xe(this._onPan, this)), r.on("zoom", xe(this._onZoom, this)));
      var a = new Je(0, 0, n.getWidth(), n.getHeight());
      r.setPointerChecker(function(o, s, l) {
        return a.contain(s, l);
      });
    }, e.prototype._clearController = function() {
      var n = this._controller;
      this._controllerHost = null, n && (n.dispose(), n = null);
    }, e.prototype._onPan = function(n) {
      if (this._state !== "animating" && (Math.abs(n.dx) > BF || Math.abs(n.dy) > BF)) {
        var r = this.seriesModel.getData().tree.root;
        if (!r)
          return;
        var i = r.getLayout();
        if (!i)
          return;
        this.api.dispatchAction({
          type: "treemapMove",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: i.x + n.dx,
            y: i.y + n.dy,
            width: i.width,
            height: i.height
          }
        });
      }
    }, e.prototype._onZoom = function(n) {
      var r = n.originX, i = n.originY, a = n.scale;
      if (this._state !== "animating") {
        var o = this.seriesModel.getData().tree.root;
        if (!o)
          return;
        var s = o.getLayout();
        if (!s)
          return;
        var l = new Je(s.x, s.y, s.width, s.height), u = null, c = this._controllerHost;
        u = c.zoomLimit;
        var f = c.zoom = c.zoom || 1;
        if (f *= a, u) {
          var d = u.min || 0, h = u.max || 1 / 0;
          f = Math.max(Math.min(h, f), d);
        }
        var p = f / c.zoom;
        c.zoom = f;
        var v = this.seriesModel.layoutInfo;
        r -= v.x, i -= v.y;
        var g = Si();
        ao(g, g, [-r, -i]), Nx(g, g, [p, p]), ao(g, g, [r, i]), l.applyTransform(g), this.api.dispatchAction({
          type: "treemapRender",
          from: this.uid,
          seriesId: this.seriesModel.id,
          rootRect: {
            x: l.x,
            y: l.y,
            width: l.width,
            height: l.height
          }
        });
      }
    }, e.prototype._initEvents = function(n) {
      var r = this;
      n.on("click", function(i) {
        if (r._state === "ready") {
          var a = r.seriesModel.get("nodeClick", !0);
          if (a) {
            var o = r.findTarget(i.offsetX, i.offsetY);
            if (o) {
              var s = o.node;
              if (s.getLayout().isLeafRoot)
                r._rootToNode(o);
              else if (a === "zoomToNode")
                r._zoomToNode(o);
              else if (a === "link") {
                var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), c = l.get("target", !0) || "blank";
                u && dO(u, c);
              }
            }
          }
        }
      }, this);
    }, e.prototype._renderBreadcrumb = function(n, r, i) {
      var a = this;
      i || (i = n.get("leafDepth", !0) != null ? {
        node: n.getViewRoot()
      } : this.findTarget(r.getWidth() / 2, r.getHeight() / 2), i || (i = {
        node: n.getData().tree.root
      })), (this._breadcrumb || (this._breadcrumb = new Pze(this.group))).render(n, r, i.node, function(o) {
        a._state !== "animating" && (jk(n.getViewRoot(), o) ? a._rootToNode({
          node: o
        }) : a._zoomToNode({
          node: o
        }));
      });
    }, e.prototype.remove = function() {
      this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = bv(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
    }, e.prototype.dispose = function() {
      this._clearController();
    }, e.prototype._zoomToNode = function(n) {
      this.api.dispatchAction({
        type: "treemapZoomToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n.node
      });
    }, e.prototype._rootToNode = function(n) {
      this.api.dispatchAction({
        type: "treemapRootToNode",
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n.node
      });
    }, e.prototype.findTarget = function(n, r) {
      var i, a = this.seriesModel.getViewRoot();
      return a.eachNode({
        attr: "viewChildren",
        order: "preorder"
      }, function(o) {
        var s = this._storage.background[o.getRawIndex()];
        if (s) {
          var l = s.transformCoordToLocal(n, r), u = s.shape;
          if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
            i = {
              node: o,
              offsetX: l[0],
              offsetY: l[1]
            };
          else
            return !1;
        }
      }, this), i;
    }, e.type = "treemap", e;
  }(zt)
);
function bv() {
  return {
    nodeGroup: [],
    background: [],
    content: []
  };
}
function Lze(t, e, n, r, i, a, o, s, l, u) {
  if (!o)
    return;
  var c = o.getLayout(), f = t.getData(), d = o.getModel();
  if (f.setItemGraphicEl(o.dataIndex, null), !c || !c.isInView)
    return;
  var h = c.width, p = c.height, v = c.borderWidth, g = c.invisible, m = o.getRawIndex(), y = s && s.getRawIndex(), b = o.viewChildren, _ = c.upperHeight, O = b && b.length, S = d.getModel("itemStyle"), x = d.getModel(["emphasis", "itemStyle"]), C = d.getModel(["blur", "itemStyle"]), T = d.getModel(["select", "itemStyle"]), w = S.get("borderRadius") || 0, P = ne("nodeGroup", gE);
  if (!P)
    return;
  if (l.add(P), P.x = c.x || 0, P.y = c.y || 0, P.markRedraw(), IO(P).nodeWidth = h, IO(P).nodeHeight = p, c.isAboveViewRoot)
    return P;
  var $ = ne("background", NF, u, Dze);
  $ && z(P, $, O && c.upperLabelHeight);
  var A = d.getModel("emphasis"), D = A.get("focus"), E = A.get("blurScope"), R = A.get("disabled"), N = D === "ancestor" ? o.getAncestorsIndices() : D === "descendant" ? o.getDescendantIndices() : D;
  if (O)
    lu(P) && Lc(P, !1), $ && (Lc($, !R), f.setItemGraphicEl(o.dataIndex, $), RA($, N, E));
  else {
    var V = ne("content", NF, u, Rze);
    V && W(P, V), $.disableMorphing = !0, $ && lu($) && Lc($, !1), Lc(P, !R), f.setItemGraphicEl(o.dataIndex, P), RA(P, N, E);
  }
  return P;
  function z(K, ie, X) {
    var H = Fe(ie);
    if (H.dataIndex = o.dataIndex, H.seriesIndex = t.seriesIndex, ie.setShape({
      x: 0,
      y: 0,
      width: h,
      height: p,
      r: w
    }), g)
      F(ie);
    else {
      ie.invisible = !1;
      var G = o.getVisual("style"), re = G.stroke, fe = FF(S);
      fe.fill = re;
      var de = pc(x);
      de.fill = x.get("borderColor");
      var Ee = pc(C);
      Ee.fill = C.get("borderColor");
      var $e = pc(T);
      if ($e.fill = T.get("borderColor"), X) {
        var Se = h - 2 * v;
        Q(
          // PENDING: convert ZRColor to ColorString for text.
          ie,
          re,
          G.opacity,
          {
            x: v,
            y: 0,
            width: Se,
            height: _
          }
        );
      } else
        ie.removeTextContent();
      ie.setStyle(fe), ie.ensureState("emphasis").style = de, ie.ensureState("blur").style = Ee, ie.ensureState("select").style = $e, bf(ie);
    }
    K.add(ie);
  }
  function W(K, ie) {
    var X = Fe(ie);
    X.dataIndex = o.dataIndex, X.seriesIndex = t.seriesIndex;
    var H = Math.max(h - 2 * v, 0), G = Math.max(p - 2 * v, 0);
    if (ie.culling = !0, ie.setShape({
      x: v,
      y: v,
      width: H,
      height: G,
      r: w
    }), g)
      F(ie);
    else {
      ie.invisible = !1;
      var re = o.getVisual("style"), fe = re.fill, de = FF(S);
      de.fill = fe, de.decal = re.decal;
      var Ee = pc(x), $e = pc(C), Se = pc(T);
      Q(ie, fe, re.opacity, null), ie.setStyle(de), ie.ensureState("emphasis").style = Ee, ie.ensureState("blur").style = $e, ie.ensureState("select").style = Se, bf(ie);
    }
    K.add(ie);
  }
  function F(K) {
    !K.invisible && a.push(K);
  }
  function Q(K, ie, X, H) {
    var G = d.getModel(H ? VF : zF), re = Vn(d.get("name"), null), fe = G.getShallow("show");
    Pr(K, er(d, H ? VF : zF), {
      defaultText: fe ? re : null,
      inheritColor: ie,
      defaultOpacity: X,
      labelFetcher: t,
      labelDataIndex: o.dataIndex
    });
    var de = K.getTextContent();
    if (de) {
      var Ee = de.style, $e = kx(Ee.padding || 0);
      H && (K.setTextConfig({
        layoutRect: H
      }), de.disableLabelLayout = !0), de.beforeUpdate = function() {
        var be = Math.max((H ? H.width : K.shape.width) - $e[1] - $e[3], 0), he = Math.max((H ? H.height : K.shape.height) - $e[0] - $e[2], 0);
        (Ee.width !== be || Ee.height !== he) && de.setStyle({
          width: be,
          height: he
        });
      }, Ee.truncateMinChar = 2, Ee.lineOverflow = "truncate", Z(Ee, H, c);
      var Se = de.getState("emphasis");
      Z(Se ? Se.style : null, H, c);
    }
  }
  function Z(K, ie, X) {
    var H = K ? K.text : null;
    if (!ie && X.isLeafRoot && H != null) {
      var G = t.get("drillDownIcon", !0);
      K.text = G ? G + " " + H : H;
    }
  }
  function ne(K, ie, X, H) {
    var G = y != null && n[K][y], re = i[K];
    return G ? (n[K][y] = null, ee(re, G)) : g || (G = new ie(), G instanceof Ma && (G.z2 = Nze(X, H)), oe(re, G)), e[K][m] = G;
  }
  function ee(K, ie) {
    var X = K[m] = {};
    ie instanceof gE ? (X.oldX = ie.x, X.oldY = ie.y) : X.oldShape = le({}, ie.shape);
  }
  function oe(K, ie) {
    var X = K[m] = {}, H = o.parentNode, G = ie instanceof Ve;
    if (H && (!r || r.direction === "drillDown")) {
      var re = 0, fe = 0, de = i.background[H.getRawIndex()];
      !r && de && de.oldShape && (re = de.oldShape.width, fe = de.oldShape.height), G ? (X.oldX = 0, X.oldY = fe) : X.oldShape = {
        x: re,
        y: fe,
        width: 0,
        height: 0
      };
    }
    X.fadein = !G;
  }
}
function Nze(t, e) {
  return t * Ize + e;
}
var Nm = k, Bze = Ie, DO = -1, qn = (
  /** @class */
  function() {
    function t(e) {
      var n = e.mappingMethod, r = e.type, i = this.option = Le(e);
      this.type = r, this.mappingMethod = n, this._normalizeData = Fze[n];
      var a = t.visualHandlers[r];
      this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._normalizedToVisual = a._normalizedToVisual[n], n === "piecewise" ? (gP(i), zze(i)) : n === "category" ? i.categories ? Vze(i) : gP(i, !0) : (ke(n !== "linear" || i.dataExtent), gP(i));
    }
    return t.prototype.mapValueToVisual = function(e) {
      var n = this._normalizeData(e);
      return this._normalizedToVisual(n, e);
    }, t.prototype.getNormalizer = function() {
      return xe(this._normalizeData, this);
    }, t.listVisualTypes = function() {
      return st(t.visualHandlers);
    }, t.isValidType = function(e) {
      return t.visualHandlers.hasOwnProperty(e);
    }, t.eachVisual = function(e, n, r) {
      Ie(e) ? k(e, n, r) : n.call(r, e);
    }, t.mapVisual = function(e, n, r) {
      var i, a = ue(e) ? [] : Ie(e) ? {} : (i = !0, null);
      return t.eachVisual(e, function(o, s) {
        var l = n.call(r, o, s);
        i ? a = l : a[s] = l;
      }), a;
    }, t.retrieveVisuals = function(e) {
      var n = {}, r;
      return e && Nm(t.visualHandlers, function(i, a) {
        e.hasOwnProperty(a) && (n[a] = e[a], r = !0);
      }), r ? n : null;
    }, t.prepareVisualTypes = function(e) {
      if (ue(e))
        e = e.slice();
      else if (Bze(e)) {
        var n = [];
        Nm(e, function(r, i) {
          n.push(i);
        }), e = n;
      } else
        return [];
      return e.sort(function(r, i) {
        return i === "color" && r !== "color" && r.indexOf("color") === 0 ? 1 : -1;
      }), e;
    }, t.dependsOn = function(e, n) {
      return n === "color" ? !!(e && e.indexOf(n) === 0) : e === n;
    }, t.findPieceIndex = function(e, n, r) {
      for (var i, a = 1 / 0, o = 0, s = n.length; o < s; o++) {
        var l = n[o].value;
        if (l != null) {
          if (l === e || Oe(l) && l === e + "")
            return o;
          r && d(l, o);
        }
      }
      for (var o = 0, s = n.length; o < s; o++) {
        var u = n[o], c = u.interval, f = u.close;
        if (c) {
          if (c[0] === -1 / 0) {
            if (Pb(f[1], e, c[1]))
              return o;
          } else if (c[1] === 1 / 0) {
            if (Pb(f[0], c[0], e))
              return o;
          } else if (Pb(f[0], c[0], e) && Pb(f[1], e, c[1]))
            return o;
          r && d(c[0], o), r && d(c[1], o);
        }
      }
      if (r)
        return e === 1 / 0 ? n.length - 1 : e === -1 / 0 ? 0 : i;
      function d(h, p) {
        var v = Math.abs(h - e);
        v < a && (a = v, i = p);
      }
    }, t.visualHandlers = {
      color: {
        applyVisual: _v("color"),
        getColorMapper: function() {
          var e = this.option;
          return xe(e.mappingMethod === "category" ? function(n, r) {
            return !r && (n = this._normalizeData(n)), Yv.call(this, n);
          } : function(n, r, i) {
            var a = !!i;
            return !r && (n = this._normalizeData(n)), i = Cg(n, e.parsedVisual, i), a ? i : eo(i, "rgba");
          }, this);
        },
        _normalizedToVisual: {
          linear: function(e) {
            return eo(Cg(e, this.option.parsedVisual), "rgba");
          },
          category: Yv,
          piecewise: function(e, n) {
            var r = yE.call(this, n);
            return r == null && (r = eo(Cg(e, this.option.parsedVisual), "rgba")), r;
          },
          fixed: vc
        }
      },
      colorHue: Tb(function(e, n) {
        return eh(e, n);
      }),
      colorSaturation: Tb(function(e, n) {
        return eh(e, null, n);
      }),
      colorLightness: Tb(function(e, n) {
        return eh(e, null, null, n);
      }),
      colorAlpha: Tb(function(e, n) {
        return _m(e, n);
      }),
      decal: {
        applyVisual: _v("decal"),
        _normalizedToVisual: {
          linear: null,
          category: Yv,
          piecewise: null,
          fixed: null
        }
      },
      opacity: {
        applyVisual: _v("opacity"),
        _normalizedToVisual: mE([0, 1])
      },
      liftZ: {
        applyVisual: _v("liftZ"),
        _normalizedToVisual: {
          linear: vc,
          category: vc,
          piecewise: vc,
          fixed: vc
        }
      },
      symbol: {
        applyVisual: function(e, n, r) {
          var i = this.mapValueToVisual(e);
          r("symbol", i);
        },
        _normalizedToVisual: {
          linear: WF,
          category: Yv,
          piecewise: function(e, n) {
            var r = yE.call(this, n);
            return r == null && (r = WF.call(this, e)), r;
          },
          fixed: vc
        }
      },
      symbolSize: {
        applyVisual: _v("symbolSize"),
        _normalizedToVisual: mE([0, 1])
      }
    }, t;
  }()
);
function zze(t) {
  var e = t.pieceList;
  t.hasSpecialVisual = !1, k(e, function(n, r) {
    n.originIndex = r, n.visual != null && (t.hasSpecialVisual = !0);
  });
}
function Vze(t) {
  var e = t.categories, n = t.categoryMap = {}, r = t.visual;
  if (Nm(e, function(o, s) {
    n[o] = s;
  }), !ue(r)) {
    var i = [];
    Ie(r) ? Nm(r, function(o, s) {
      var l = n[s];
      i[l ?? DO] = o;
    }) : i[DO] = r, r = xne(t, i);
  }
  for (var a = e.length - 1; a >= 0; a--)
    r[a] == null && (delete n[e[a]], e.pop());
}
function gP(t, e) {
  var n = t.visual, r = [];
  Ie(n) ? Nm(n, function(a) {
    r.push(a);
  }) : n != null && r.push(n);
  var i = {
    color: 1,
    symbol: 1
  };
  !e && r.length === 1 && !i.hasOwnProperty(t.type) && (r[1] = r[0]), xne(t, r);
}
function Tb(t) {
  return {
    applyVisual: function(e, n, r) {
      var i = this.mapValueToVisual(e);
      r("color", t(n("color"), i));
    },
    _normalizedToVisual: mE([0, 1])
  };
}
function WF(t) {
  var e = this.option.visual;
  return e[Math.round(Lt(t, [0, 1], [0, e.length - 1], !0))] || {};
}
function _v(t) {
  return function(e, n, r) {
    r(t, this.mapValueToVisual(e));
  };
}
function Yv(t) {
  var e = this.option.visual;
  return e[this.option.loop && t !== DO ? t % e.length : t];
}
function vc() {
  return this.option.visual[0];
}
function mE(t) {
  return {
    linear: function(e) {
      return Lt(e, t, this.option.visual, !0);
    },
    category: Yv,
    piecewise: function(e, n) {
      var r = yE.call(this, n);
      return r == null && (r = Lt(e, t, this.option.visual, !0)), r;
    },
    fixed: vc
  };
}
function yE(t) {
  var e = this.option, n = e.pieceList;
  if (e.hasSpecialVisual) {
    var r = qn.findPieceIndex(t, n), i = n[r];
    if (i && i.visual)
      return i.visual[this.type];
  }
}
function xne(t, e) {
  return t.visual = e, t.type === "color" && (t.parsedVisual = ce(e, function(n) {
    var r = qr(n);
    return !r && process.env.NODE_ENV !== "production" && dn("'" + n + "' is an illegal color, fallback to '#000000'", !0), r || [0, 0, 0, 1];
  })), e;
}
var Fze = {
  linear: function(t) {
    return Lt(t, this.option.dataExtent, [0, 1], !0);
  },
  piecewise: function(t) {
    var e = this.option.pieceList, n = qn.findPieceIndex(t, e, !0);
    if (n != null)
      return Lt(n, [0, e.length - 1], [0, 1], !0);
  },
  category: function(t) {
    var e = this.option.categories ? this.option.categoryMap[t] : t;
    return e ?? DO;
  },
  fixed: On
};
function Pb(t, e, n) {
  return t ? e <= n : e < n;
}
var Wze = "itemStyle", wne = bt();
const Qze = {
  seriesType: "treemap",
  reset: function(t) {
    var e = t.getData().tree, n = e.root;
    n.isRemoved() || Cne(
      n,
      // Visual should calculate from tree root but not view root.
      {},
      t.getViewRoot().getAncestors(),
      t
    );
  }
};
function Cne(t, e, n, r) {
  var i = t.getModel(), a = t.getLayout(), o = t.hostTree.data;
  if (!(!a || a.invisible || !a.isInView)) {
    var s = i.getModel(Wze), l = Hze(s, e, r), u = o.ensureUniqueItemVisual(t.dataIndex, "style"), c = s.get("borderColor"), f = s.get("borderColorSaturation"), d;
    f != null && (d = QF(l), c = Gze(f, d)), u.stroke = c;
    var h = t.viewChildren;
    if (!h || !h.length)
      d = QF(l), u.fill = d;
    else {
      var p = jze(t, i, a, s, l, h);
      k(h, function(v, g) {
        if (v.depth >= n.length || v === n[v.depth]) {
          var m = Zze(i, l, v, g, p, r);
          Cne(v, m, n, r);
        }
      });
    }
  }
}
function Hze(t, e, n) {
  var r = le({}, e), i = n.designatedVisualItemStyle;
  return k(["color", "colorAlpha", "colorSaturation"], function(a) {
    i[a] = e[a];
    var o = t.get(a);
    i[a] = null, o != null && (r[a] = o);
  }), r;
}
function QF(t) {
  var e = mP(t, "color");
  if (e) {
    var n = mP(t, "colorAlpha"), r = mP(t, "colorSaturation");
    return r && (e = eh(e, null, null, r)), n && (e = _m(e, n)), e;
  }
}
function Gze(t, e) {
  return e != null ? eh(e, null, null, t) : null;
}
function mP(t, e) {
  var n = t[e];
  if (n != null && n !== "none")
    return n;
}
function jze(t, e, n, r, i, a) {
  if (!(!a || !a.length)) {
    var o = yP(e, "color") || i.color != null && i.color !== "none" && (yP(e, "colorAlpha") || yP(e, "colorSaturation"));
    if (o) {
      var s = e.get("visualMin"), l = e.get("visualMax"), u = n.dataExtent.slice();
      s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
      var c = e.get("colorMappingBy"), f = {
        type: o.name,
        dataExtent: u,
        visual: o.range
      };
      f.type === "color" && (c === "index" || c === "id") ? (f.mappingMethod = "category", f.loop = !0) : f.mappingMethod = "linear";
      var d = new qn(f);
      return wne(d).drColorMappingBy = c, d;
    }
  }
}
function yP(t, e) {
  var n = t.get(e);
  return ue(n) && n.length ? {
    name: e,
    range: n
  } : null;
}
function Zze(t, e, n, r, i, a) {
  var o = le({}, e);
  if (i) {
    var s = i.type, l = s === "color" && wne(i).drColorMappingBy, u = l === "index" ? r : l === "id" ? a.mapIdToIndex(n.getId()) : n.getValue(t.get("visualDimension"));
    o[s] = i.mapValueToVisual(u);
  }
  return o;
}
var Bm = Math.max, RO = Math.min, HF = Tn, Zk = k, Tne = ["itemStyle", "borderWidth"], Uze = ["itemStyle", "gapWidth"], Xze = ["upperLabel", "show"], Yze = ["upperLabel", "height"];
const qze = {
  seriesType: "treemap",
  reset: function(t, e, n, r) {
    var i = n.getWidth(), a = n.getHeight(), o = t.option, s = Rn(t.getBoxLayoutParams(), {
      width: n.getWidth(),
      height: n.getHeight()
    }), l = o.size || [], u = _e(HF(s.width, l[0]), i), c = _e(HF(s.height, l[1]), a), f = r && r.type, d = ["treemapZoomToNode", "treemapRootToNode"], h = Lm(r, d, t), p = f === "treemapRender" || f === "treemapMove" ? r.rootRect : null, v = t.getViewRoot(), g = _ne(v);
    if (f !== "treemapMove") {
      var m = f === "treemapZoomToNode" ? rVe(t, h, v, u, c) : p ? [p.width, p.height] : [u, c], y = o.sort;
      y && y !== "asc" && y !== "desc" && (y = "desc");
      var b = {
        squareRatio: o.squareRatio,
        sort: y,
        leafDepth: o.leafDepth
      };
      v.hostTree.clearLayouts();
      var _ = {
        x: 0,
        y: 0,
        width: m[0],
        height: m[1],
        area: m[0] * m[1]
      };
      v.setLayout(_), Pne(v, b, !1, 0), _ = v.getLayout(), Zk(g, function(S, x) {
        var C = (g[x + 1] || v).getValue();
        S.setLayout(le({
          dataExtent: [C, C],
          borderWidth: 0,
          upperHeight: 0
        }, _));
      });
    }
    var O = t.getData().tree.root;
    O.setLayout(iVe(s, p, h), !0), t.setLayoutInfo(s), $ne(
      O,
      // Transform to base element coordinate system.
      new Je(-s.x, -s.y, i, a),
      g,
      v,
      0
    );
  }
};
function Pne(t, e, n, r) {
  var i, a;
  if (!t.isRemoved()) {
    var o = t.getLayout();
    i = o.width, a = o.height;
    var s = t.getModel(), l = s.get(Tne), u = s.get(Uze) / 2, c = Ane(s), f = Math.max(l, c), d = l - u, h = f - u;
    t.setLayout({
      borderWidth: l,
      upperHeight: f,
      upperLabelHeight: c
    }, !0), i = Bm(i - 2 * d, 0), a = Bm(a - d - h, 0);
    var p = i * a, v = Kze(t, s, p, e, n, r);
    if (v.length) {
      var g = {
        x: d,
        y: h,
        width: i,
        height: a
      }, m = RO(i, a), y = 1 / 0, b = [];
      b.area = 0;
      for (var _ = 0, O = v.length; _ < O; ) {
        var S = v[_];
        b.push(S), b.area += S.getLayout().area;
        var x = nVe(b, m, e.squareRatio);
        x <= y ? (_++, y = x) : (b.area -= b.pop().getLayout().area, GF(b, m, g, u, !1), m = RO(g.width, g.height), b.length = b.area = 0, y = 1 / 0);
      }
      if (b.length && GF(b, m, g, u, !0), !n) {
        var C = s.get("childrenVisibleMin");
        C != null && p < C && (n = !0);
      }
      for (var _ = 0, O = v.length; _ < O; _++)
        Pne(v[_], e, n, r + 1);
    }
  }
}
function Kze(t, e, n, r, i, a) {
  var o = t.children || [], s = r.sort;
  s !== "asc" && s !== "desc" && (s = null);
  var l = r.leafDepth != null && r.leafDepth <= a;
  if (i && !l)
    return t.viewChildren = [];
  o = Nt(o, function(h) {
    return !h.isRemoved();
  }), eVe(o, s);
  var u = tVe(e, o, s);
  if (u.sum === 0)
    return t.viewChildren = [];
  if (u.sum = Jze(e, n, u.sum, s, o), u.sum === 0)
    return t.viewChildren = [];
  for (var c = 0, f = o.length; c < f; c++) {
    var d = o[c].getValue() / u.sum * n;
    o[c].setLayout({
      area: d
    });
  }
  return l && (o.length && t.setLayout({
    isLeafRoot: !0
  }, !0), o.length = 0), t.viewChildren = o, t.setLayout({
    dataExtent: u.dataExtent
  }, !0), o;
}
function Jze(t, e, n, r, i) {
  if (!r)
    return n;
  for (var a = t.get("visibleMin"), o = i.length, s = o, l = o - 1; l >= 0; l--) {
    var u = i[r === "asc" ? o - l - 1 : l].getValue();
    u / n * e < a && (s = l, n -= u);
  }
  return r === "asc" ? i.splice(0, o - s) : i.splice(s, o - s), n;
}
function eVe(t, e) {
  return e && t.sort(function(n, r) {
    var i = e === "asc" ? n.getValue() - r.getValue() : r.getValue() - n.getValue();
    return i === 0 ? e === "asc" ? n.dataIndex - r.dataIndex : r.dataIndex - n.dataIndex : i;
  }), t;
}
function tVe(t, e, n) {
  for (var r = 0, i = 0, a = e.length; i < a; i++)
    r += e[i].getValue();
  var o = t.get("visualDimension"), s;
  return !e || !e.length ? s = [NaN, NaN] : o === "value" && n ? (s = [e[e.length - 1].getValue(), e[0].getValue()], n === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Zk(e, function(l) {
    var u = l.getValue(o);
    u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
  })), {
    sum: r,
    dataExtent: s
  };
}
function nVe(t, e, n) {
  for (var r = 0, i = 1 / 0, a = 0, o = void 0, s = t.length; a < s; a++)
    o = t[a].getLayout().area, o && (o < i && (i = o), o > r && (r = o));
  var l = t.area * t.area, u = e * e * n;
  return l ? Bm(u * r / l, l / (u * i)) : 1 / 0;
}
function GF(t, e, n, r, i) {
  var a = e === n.width ? 0 : 1, o = 1 - a, s = ["x", "y"], l = ["width", "height"], u = n[s[a]], c = e ? t.area / e : 0;
  (i || c > n[l[o]]) && (c = n[l[o]]);
  for (var f = 0, d = t.length; f < d; f++) {
    var h = t[f], p = {}, v = c ? h.getLayout().area / c : 0, g = p[l[o]] = Bm(c - 2 * r, 0), m = n[s[a]] + n[l[a]] - u, y = f === d - 1 || m < v ? m : v, b = p[l[a]] = Bm(y - 2 * r, 0);
    p[s[o]] = n[s[o]] + RO(r, g / 2), p[s[a]] = u + RO(r, b / 2), u += y, h.setLayout(p, !0);
  }
  n[s[o]] += c, n[l[o]] -= c;
}
function rVe(t, e, n, r, i) {
  var a = (e || {}).node, o = [r, i];
  if (!a || a === n)
    return o;
  for (var s, l = r * i, u = l * t.option.zoomToNodeRatio; s = a.parentNode; ) {
    for (var c = 0, f = s.children, d = 0, h = f.length; d < h; d++)
      c += f[d].getValue();
    var p = a.getValue();
    if (p === 0)
      return o;
    u *= c / p;
    var v = s.getModel(), g = v.get(Tne), m = Math.max(g, Ane(v));
    u += 4 * g * g + (3 * g + m) * Math.pow(u, 0.5), u > CA && (u = CA), a = s;
  }
  u < l && (u = l);
  var y = Math.pow(u / l, 0.5);
  return [r * y, i * y];
}
function iVe(t, e, n) {
  if (e)
    return {
      x: e.x,
      y: e.y
    };
  var r = {
    x: 0,
    y: 0
  };
  if (!n)
    return r;
  var i = n.node, a = i.getLayout();
  if (!a)
    return r;
  for (var o = [a.width / 2, a.height / 2], s = i; s; ) {
    var l = s.getLayout();
    o[0] += l.x, o[1] += l.y, s = s.parentNode;
  }
  return {
    x: t.width / 2 - o[0],
    y: t.height / 2 - o[1]
  };
}
function $ne(t, e, n, r, i) {
  var a = t.getLayout(), o = n[i], s = o && o === t;
  if (!(o && !s || i === n.length && t !== r)) {
    t.setLayout({
      // isInView means: viewRoot sub tree + viewAbovePath
      isInView: !0,
      // invisible only means: outside view clip so that the node can not
      // see but still layout for animation preparation but not render.
      invisible: !s && !e.intersect(a),
      isAboveViewRoot: s
    }, !0);
    var l = new Je(e.x - a.x, e.y - a.y, e.width, e.height);
    Zk(t.viewChildren || [], function(u) {
      $ne(u, l, n, r, i + 1);
    });
  }
}
function Ane(t) {
  return t.get(Xze) ? t.get(Yze) : 0;
}
function aVe(t) {
  t.registerSeriesModel(wze), t.registerChartView(kze), t.registerVisual(Qze), t.registerLayout(qze), xze(t);
}
function oVe(t) {
  var e = t.findComponents({
    mainType: "legend"
  });
  !e || !e.length || t.eachSeriesByType("graph", function(n) {
    var r = n.getCategoriesData(), i = n.getGraph(), a = i.data, o = r.mapArray(r.getName);
    a.filterSelf(function(s) {
      var l = a.getItemModel(s), u = l.getShallow("category");
      if (u != null) {
        St(u) && (u = o[u]);
        for (var c = 0; c < e.length; c++)
          if (!e[c].isSelected(u))
            return !1;
      }
      return !0;
    });
  });
}
function sVe(t) {
  var e = {};
  t.eachSeriesByType("graph", function(n) {
    var r = n.getCategoriesData(), i = n.getData(), a = {};
    r.each(function(o) {
      var s = r.getName(o);
      a["ec-" + s] = o;
      var l = r.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
      u.fill || (u.fill = n.getColorFromPalette(s, e)), r.setItemVisual(o, "style", u);
      for (var c = ["symbol", "symbolSize", "symbolKeepAspect"], f = 0; f < c.length; f++) {
        var d = l.getShallow(c[f], !0);
        d != null && r.setItemVisual(o, c[f], d);
      }
    }), r.count() && i.each(function(o) {
      var s = i.getItemModel(o), l = s.getShallow("category");
      if (l != null) {
        Oe(l) && (l = a["ec-" + l]);
        var u = r.getItemVisual(l, "style"), c = i.ensureUniqueItemVisual(o, "style");
        le(c, u);
        for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], d = 0; d < f.length; d++)
          i.setItemVisual(o, f[d], r.getItemVisual(l, f[d]));
      }
    });
  });
}
function $b(t) {
  return t instanceof Array || (t = [t, t]), t;
}
function lVe(t) {
  t.eachSeriesByType("graph", function(e) {
    var n = e.getGraph(), r = e.getEdgeData(), i = $b(e.get("edgeSymbol")), a = $b(e.get("edgeSymbolSize"));
    r.setVisual("fromSymbol", i && i[0]), r.setVisual("toSymbol", i && i[1]), r.setVisual("fromSymbolSize", a && a[0]), r.setVisual("toSymbolSize", a && a[1]), r.setVisual("style", e.getModel("lineStyle").getLineStyle()), r.each(function(o) {
      var s = r.getItemModel(o), l = n.getEdgeByIndex(o), u = $b(s.getShallow("symbol", !0)), c = $b(s.getShallow("symbolSize", !0)), f = s.getModel("lineStyle").getLineStyle(), d = r.ensureUniqueItemVisual(o, "style");
      switch (le(d, f), d.stroke) {
        case "source": {
          var h = l.node1.getVisual("style");
          d.stroke = h && h.fill;
          break;
        }
        case "target": {
          var h = l.node2.getVisual("style");
          d.stroke = h && h.fill;
          break;
        }
      }
      u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), c[0] && l.setVisual("fromSymbolSize", c[0]), c[1] && l.setVisual("toSymbolSize", c[1]);
    });
  });
}
var bE = "-->", _w = function(t) {
  return t.get("autoCurveness") || null;
}, Ene = function(t, e) {
  var n = _w(t), r = 20, i = [];
  if (St(n))
    r = n;
  else if (ue(n)) {
    t.__curvenessList = n;
    return;
  }
  e > r && (r = e);
  var a = r % 2 ? r + 2 : r + 3;
  i = [];
  for (var o = 0; o < a; o++)
    i.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
  t.__curvenessList = i;
}, zm = function(t, e, n) {
  var r = [t.id, t.dataIndex].join("."), i = [e.id, e.dataIndex].join(".");
  return [n.uid, r, i].join(bE);
}, Mne = function(t) {
  var e = t.split(bE);
  return [e[0], e[2], e[1]].join(bE);
}, uVe = function(t, e) {
  var n = zm(t.node1, t.node2, e);
  return e.__edgeMap[n];
}, cVe = function(t, e) {
  var n = _E(zm(t.node1, t.node2, e), e), r = _E(zm(t.node2, t.node1, e), e);
  return n + r;
}, _E = function(t, e) {
  var n = e.__edgeMap;
  return n[t] ? n[t].length : 0;
};
function fVe(t) {
  _w(t) && (t.__curvenessList = [], t.__edgeMap = {}, Ene(t));
}
function dVe(t, e, n, r) {
  if (_w(n)) {
    var i = zm(t, e, n), a = n.__edgeMap, o = a[Mne(i)];
    a[i] && !o ? a[i].isForward = !0 : o && a[i] && (o.isForward = !0, a[i].isForward = !1), a[i] = a[i] || [], a[i].push(r);
  }
}
function Uk(t, e, n, r) {
  var i = _w(e), a = ue(i);
  if (!i)
    return null;
  var o = uVe(t, e);
  if (!o)
    return null;
  for (var s = -1, l = 0; l < o.length; l++)
    if (o[l] === n) {
      s = l;
      break;
    }
  var u = cVe(t, e);
  Ene(e, u), t.lineStyle = t.lineStyle || {};
  var c = zm(t.node1, t.node2, e), f = e.__curvenessList, d = a || u % 2 ? 0 : 1;
  if (o.isForward)
    return f[d + s];
  var h = Mne(c), p = _E(h, e), v = f[s + p + d];
  return r ? a ? i && i[0] === 0 ? (p + d) % 2 ? v : -v : ((p % 2 ? 0 : 1) + d) % 2 ? v : -v : (p + d) % 2 ? v : -v : f[s + p + d];
}
function Ine(t) {
  var e = t.coordinateSystem;
  if (!(e && e.type !== "view")) {
    var n = t.getGraph();
    n.eachNode(function(r) {
      var i = r.getModel();
      r.setLayout([+i.get("x"), +i.get("y")]);
    }), Xk(n, t);
  }
}
function Xk(t, e) {
  t.eachEdge(function(n, r) {
    var i = ji(n.getModel().get(["lineStyle", "curveness"]), -Uk(n, e, r, !0), 0), a = Zo(n.node1.getLayout()), o = Zo(n.node2.getLayout()), s = [a, o];
    +i && s.push([(a[0] + o[0]) / 2 - (a[1] - o[1]) * i, (a[1] + o[1]) / 2 - (o[0] - a[0]) * i]), n.setLayout(s);
  });
}
function hVe(t, e) {
  t.eachSeriesByType("graph", function(n) {
    var r = n.get("layout"), i = n.coordinateSystem;
    if (i && i.type !== "view") {
      var a = n.getData(), o = [];
      k(i.dimensions, function(d) {
        o = o.concat(a.mapDimensionsAll(d));
      });
      for (var s = 0; s < a.count(); s++) {
        for (var l = [], u = !1, c = 0; c < o.length; c++) {
          var f = a.get(o[c], s);
          isNaN(f) || (u = !0), l.push(f);
        }
        u ? a.setItemLayout(s, i.dataToPoint(l)) : a.setItemLayout(s, [NaN, NaN]);
      }
      Xk(a.graph, n);
    } else (!r || r === "none") && Ine(n);
  });
}
function qv(t) {
  var e = t.coordinateSystem;
  if (e.type !== "view")
    return 1;
  var n = t.option.nodeScaleRatio, r = e.scaleX, i = e.getZoom(), a = (i - 1) * n + 1;
  return a / r;
}
function Kv(t) {
  var e = t.getVisual("symbolSize");
  return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
}
var jF = Math.PI, bP = [];
function Yk(t, e, n, r) {
  var i = t.coordinateSystem;
  if (!(i && i.type !== "view")) {
    var a = i.getBoundingRect(), o = t.getData(), s = o.graph, l = a.width / 2 + a.x, u = a.height / 2 + a.y, c = Math.min(a.width, a.height) / 2, f = o.count();
    if (o.setLayout({
      cx: l,
      cy: u
    }), !!f) {
      if (n) {
        var d = i.pointToData(r), h = d[0], p = d[1], v = [h - l, p - u];
        Rf(v, v), Sg(v, v, c), n.setLayout([l + v[0], u + v[1]], !0);
        var g = t.get(["circular", "rotateLabel"]);
        Dne(n, g, l, u);
      }
      pVe[e](t, s, o, c, l, u, f), s.eachEdge(function(m, y) {
        var b = ji(m.getModel().get(["lineStyle", "curveness"]), Uk(m, t, y), 0), _ = Zo(m.node1.getLayout()), O = Zo(m.node2.getLayout()), S, x = (_[0] + O[0]) / 2, C = (_[1] + O[1]) / 2;
        +b && (b *= 3, S = [l * b + x * (1 - b), u * b + C * (1 - b)]), m.setLayout([_, O, S]);
      });
    }
  }
}
var pVe = {
  value: function(t, e, n, r, i, a, o) {
    var s = 0, l = n.getSum("value"), u = Math.PI * 2 / (l || o);
    e.eachNode(function(c) {
      var f = c.getValue("value"), d = u * (l ? f : 1) / 2;
      s += d, c.setLayout([r * Math.cos(s) + i, r * Math.sin(s) + a]), s += d;
    });
  },
  symbolSize: function(t, e, n, r, i, a, o) {
    var s = 0;
    bP.length = o;
    var l = qv(t);
    e.eachNode(function(f) {
      var d = Kv(f);
      isNaN(d) && (d = 2), d < 0 && (d = 0), d *= l;
      var h = Math.asin(d / 2 / r);
      isNaN(h) && (h = jF / 2), bP[f.dataIndex] = h, s += h * 2;
    });
    var u = (2 * jF - s) / o / 2, c = 0;
    e.eachNode(function(f) {
      var d = u + bP[f.dataIndex];
      c += d, (!f.getLayout() || !f.getLayout().fixed) && f.setLayout([r * Math.cos(c) + i, r * Math.sin(c) + a]), c += d;
    });
  }
};
function Dne(t, e, n, r) {
  var i = t.getGraphicEl();
  if (i) {
    var a = t.getModel(), o = a.get(["label", "rotate"]) || 0, s = i.getSymbolPath();
    if (e) {
      var l = t.getLayout(), u = Math.atan2(l[1] - r, l[0] - n);
      u < 0 && (u = Math.PI * 2 + u);
      var c = l[0] < n;
      c && (u = u - Math.PI);
      var f = c ? "left" : "right";
      s.setTextConfig({
        rotation: -u,
        position: f,
        origin: "center"
      });
      var d = s.ensureState("emphasis");
      le(d.textConfig || (d.textConfig = {}), {
        position: f
      });
    } else
      s.setTextConfig({
        rotation: o *= Math.PI / 180
      });
  }
}
function vVe(t) {
  t.eachSeriesByType("graph", function(e) {
    e.get("layout") === "circular" && Yk(e, "symbolSize");
  });
}
var pd = U1;
function gVe(t, e, n) {
  for (var r = t, i = e, a = n.rect, o = a.width, s = a.height, l = [a.x + o / 2, a.y + s / 2], u = n.gravity == null ? 0.1 : n.gravity, c = 0; c < r.length; c++) {
    var f = r[c];
    f.p || (f.p = wu(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), f.pp = Zo(f.p), f.edges = null;
  }
  var d = n.friction == null ? 0.6 : n.friction, h = d, p, v;
  return {
    warmUp: function() {
      h = d * 0.8;
    },
    setFixed: function(g) {
      r[g].fixed = !0;
    },
    setUnfixed: function(g) {
      r[g].fixed = !1;
    },
    /**
     * Before step hook
     */
    beforeStep: function(g) {
      p = g;
    },
    /**
     * After step hook
     */
    afterStep: function(g) {
      v = g;
    },
    /**
     * Some formulas were originally copied from "d3.js"
     * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js
     * with some modifications made for this project.
     * See the license statement at the head of this file.
     */
    step: function(g) {
      p && p(r, i);
      for (var m = [], y = r.length, b = 0; b < i.length; b++) {
        var _ = i[b];
        if (!_.ignoreForceLayout) {
          var O = _.n1, S = _.n2;
          kl(m, S.p, O.p);
          var x = mm(m) - _.d, C = S.w / (O.w + S.w);
          isNaN(C) && (C = 0), Rf(m, m), !O.fixed && pd(O.p, O.p, m, C * x * h), !S.fixed && pd(S.p, S.p, m, -(1 - C) * x * h);
        }
      }
      for (var b = 0; b < y; b++) {
        var T = r[b];
        T.fixed || (kl(m, l, T.p), pd(T.p, T.p, m, u * h));
      }
      for (var b = 0; b < y; b++)
        for (var O = r[b], w = b + 1; w < y; w++) {
          var S = r[w];
          kl(m, S.p, O.p);
          var x = mm(m);
          x === 0 && (Aq(m, Math.random() - 0.5, Math.random() - 0.5), x = 1);
          var P = (O.rep + S.rep) / x / x;
          !O.fixed && pd(O.pp, O.pp, m, P), !S.fixed && pd(S.pp, S.pp, m, -P);
        }
      for (var $ = [], b = 0; b < y; b++) {
        var T = r[b];
        T.fixed || (kl($, T.p, T.pp), pd(T.p, T.p, $, h), Mr(T.pp, T.p));
      }
      h = h * 0.992;
      var A = h < 0.01;
      v && v(r, i, A), g && g(A);
    }
  };
}
function mVe(t) {
  t.eachSeriesByType("graph", function(e) {
    var n = e.coordinateSystem;
    if (!(n && n.type !== "view"))
      if (e.get("layout") === "force") {
        var r = e.preservedPoints || {}, i = e.getGraph(), a = i.data, o = i.edgeData, s = e.getModel("force"), l = s.get("initLayout");
        e.preservedPoints ? a.each(function(b) {
          var _ = a.getId(b);
          a.setItemLayout(b, r[_] || [NaN, NaN]);
        }) : !l || l === "none" ? Ine(e) : l === "circular" && Yk(e, "value");
        var u = a.getDataExtent("value"), c = o.getDataExtent("value"), f = s.get("repulsion"), d = s.get("edgeLength"), h = ue(f) ? f : [f, f], p = ue(d) ? d : [d, d];
        p = [p[1], p[0]];
        var v = a.mapArray("value", function(b, _) {
          var O = a.getItemLayout(_), S = Lt(b, u, h);
          return isNaN(S) && (S = (h[0] + h[1]) / 2), {
            w: S,
            rep: S,
            fixed: a.getItemModel(_).get("fixed"),
            p: !O || isNaN(O[0]) || isNaN(O[1]) ? null : O
          };
        }), g = o.mapArray("value", function(b, _) {
          var O = i.getEdgeByIndex(_), S = Lt(b, c, p);
          isNaN(S) && (S = (p[0] + p[1]) / 2);
          var x = O.getModel(), C = ji(O.getModel().get(["lineStyle", "curveness"]), -Uk(O, e, _, !0), 0);
          return {
            n1: v[O.node1.dataIndex],
            n2: v[O.node2.dataIndex],
            d: S,
            curveness: C,
            ignoreForceLayout: x.get("ignoreForceLayout")
          };
        }), m = n.getBoundingRect(), y = gVe(v, g, {
          rect: m,
          gravity: s.get("gravity"),
          friction: s.get("friction")
        });
        y.beforeStep(function(b, _) {
          for (var O = 0, S = b.length; O < S; O++)
            b[O].fixed && Mr(b[O].p, i.getNodeByIndex(O).getLayout());
        }), y.afterStep(function(b, _, O) {
          for (var S = 0, x = b.length; S < x; S++)
            b[S].fixed || i.getNodeByIndex(S).setLayout(b[S].p), r[a.getId(S)] = b[S].p;
          for (var S = 0, x = _.length; S < x; S++) {
            var C = _[S], T = i.getEdgeByIndex(S), w = C.n1.p, P = C.n2.p, $ = T.getLayout();
            $ = $ ? $.slice() : [], $[0] = $[0] || [], $[1] = $[1] || [], Mr($[0], w), Mr($[1], P), +C.curveness && ($[2] = [(w[0] + P[0]) / 2 - (w[1] - P[1]) * C.curveness, (w[1] + P[1]) / 2 - (P[0] - w[0]) * C.curveness]), T.setLayout($);
          }
        }), e.forceLayout = y, e.preservedPoints = r, y.step();
      } else
        e.forceLayout = null;
  });
}
function yVe(t, e, n) {
  var r = le(t.getBoxLayoutParams(), {
    aspect: n
  });
  return Rn(r, {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function bVe(t, e) {
  var n = [];
  return t.eachSeriesByType("graph", function(r) {
    var i = r.get("coordinateSystem");
    if (!i || i === "view") {
      var a = r.getData(), o = a.mapArray(function(g) {
        var m = a.getItemModel(g);
        return [+m.get("x"), +m.get("y")];
      }), s = [], l = [];
      jx(o, s, l), l[0] - s[0] === 0 && (l[0] += 1, s[0] -= 1), l[1] - s[1] === 0 && (l[1] += 1, s[1] -= 1);
      var u = (l[0] - s[0]) / (l[1] - s[1]), c = yVe(r, e, u);
      isNaN(u) && (s = [c.x, c.y], l = [c.x + c.width, c.y + c.height]);
      var f = l[0] - s[0], d = l[1] - s[1], h = c.width, p = c.height, v = r.coordinateSystem = new J0();
      v.zoomLimit = r.get("scaleLimit"), v.setBoundingRect(s[0], s[1], f, d), v.setViewRect(c.x, c.y, h, p), v.setCenter(r.get("center"), e), v.setZoom(r.get("zoom")), n.push(v);
    }
  }), n;
}
var ZF = Un.prototype, _P = V0.prototype, Rne = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
    }
    return t;
  }()
);
(function(t) {
  q(e, t);
  function e() {
    return t !== null && t.apply(this, arguments) || this;
  }
  return e;
})(Rne);
function OP(t) {
  return isNaN(+t.cpx1) || isNaN(+t.cpy1);
}
var _Ve = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "ec-line", r;
    }
    return e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new Rne();
    }, e.prototype.buildPath = function(n, r) {
      OP(r) ? ZF.buildPath.call(this, n, r) : _P.buildPath.call(this, n, r);
    }, e.prototype.pointAt = function(n) {
      return OP(this.shape) ? ZF.pointAt.call(this, n) : _P.pointAt.call(this, n);
    }, e.prototype.tangentAt = function(n) {
      var r = this.shape, i = OP(r) ? [r.x2 - r.x1, r.y2 - r.y1] : _P.tangentAt.call(this, n);
      return Rf(i, i);
    }, e;
  }(ot)
), SP = ["fromSymbol", "toSymbol"];
function UF(t) {
  return "_" + t + "Type";
}
function XF(t, e, n) {
  var r = e.getItemVisual(n, t);
  if (!r || r === "none")
    return r;
  var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = xp(i), u = Vf(o || 0, l);
  return r + l + u + (a || "") + (s || "");
}
function YF(t, e, n) {
  var r = e.getItemVisual(n, t);
  if (!(!r || r === "none")) {
    var i = e.getItemVisual(n, t + "Size"), a = e.getItemVisual(n, t + "Rotate"), o = e.getItemVisual(n, t + "Offset"), s = e.getItemVisual(n, t + "KeepAspect"), l = xp(i), u = Vf(o || 0, l), c = $n(r, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
    return c.__specifiedRotation = a == null || isNaN(a) ? void 0 : +a * Math.PI / 180 || 0, c.name = t, c;
  }
}
function OVe(t) {
  var e = new _Ve({
    name: "line",
    subPixelOptimize: !0
  });
  return OE(e.shape, t), e;
}
function OE(t, e) {
  t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  var n = e[2];
  n ? (t.cpx1 = n[0], t.cpy1 = n[1]) : (t.cpx1 = NaN, t.cpy1 = NaN);
}
var qk = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a._createLine(n, r, i), a;
    }
    return e.prototype._createLine = function(n, r, i) {
      var a = n.hostModel, o = n.getItemLayout(r), s = OVe(o);
      s.shape.percent = 0, Yt(s, {
        shape: {
          percent: 1
        }
      }, a, r), this.add(s), k(SP, function(l) {
        var u = YF(l, n, r);
        this.add(u), this[UF(l)] = XF(l, n, r);
      }, this), this._updateCommonStl(n, r, i);
    }, e.prototype.updateData = function(n, r, i) {
      var a = n.hostModel, o = this.childOfName("line"), s = n.getItemLayout(r), l = {
        shape: {}
      };
      OE(l.shape, s), Ct(o, l, a, r), k(SP, function(u) {
        var c = XF(u, n, r), f = UF(u);
        if (this[f] !== c) {
          this.remove(this.childOfName(u));
          var d = YF(u, n, r);
          this.add(d);
        }
        this[f] = c;
      }, this), this._updateCommonStl(n, r, i);
    }, e.prototype.getLinePath = function() {
      return this.childAt(0);
    }, e.prototype._updateCommonStl = function(n, r, i) {
      var a = n.hostModel, o = this.childOfName("line"), s = i && i.emphasisLineStyle, l = i && i.blurLineStyle, u = i && i.selectLineStyle, c = i && i.labelStatesModels, f = i && i.emphasisDisabled, d = i && i.focus, h = i && i.blurScope;
      if (!i || n.hasItemOption) {
        var p = n.getItemModel(r), v = p.getModel("emphasis");
        s = v.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), f = v.get("disabled"), d = v.get("focus"), h = v.get("blurScope"), c = er(p);
      }
      var g = n.getItemVisual(r, "style"), m = g.stroke;
      o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = l, o.ensureState("select").style = u, k(SP, function(S) {
        var x = this.childOfName(S);
        if (x) {
          x.setColor(m), x.style.opacity = g.opacity;
          for (var C = 0; C < ni.length; C++) {
            var T = ni[C], w = o.getState(T);
            if (w) {
              var P = w.style || {}, $ = x.ensureState(T), A = $.style || ($.style = {});
              P.stroke != null && (A[x.__isEmptyBrush ? "stroke" : "fill"] = P.stroke), P.opacity != null && (A.opacity = P.opacity);
            }
          }
          x.markRedraw();
        }
      }, this);
      var y = a.getRawValue(r);
      Pr(this, c, {
        labelDataIndex: r,
        labelFetcher: {
          getFormattedLabel: function(S, x) {
            return a.getFormattedLabel(S, x, n.dataType);
          }
        },
        inheritColor: m || "#000",
        defaultOpacity: g.opacity,
        defaultText: (y == null ? n.getName(r) : isFinite(y) ? mn(y) : y) + ""
      });
      var b = this.getTextContent();
      if (b) {
        var _ = c.normal;
        b.__align = b.style.align, b.__verticalAlign = b.style.verticalAlign, b.__position = _.get("position") || "middle";
        var O = _.get("distance");
        ue(O) || (O = [O, O]), b.__labelDistance = O;
      }
      this.setTextConfig({
        position: null,
        local: !0,
        inside: !1
        // Can't be inside for stroke element.
      }), bn(this, d, h, f);
    }, e.prototype.highlight = function() {
      js(this);
    }, e.prototype.downplay = function() {
      Zs(this);
    }, e.prototype.updateLayout = function(n, r) {
      this.setLinePoints(n.getItemLayout(r));
    }, e.prototype.setLinePoints = function(n) {
      var r = this.childOfName("line");
      OE(r.shape, n), r.dirty();
    }, e.prototype.beforeUpdate = function() {
      var n = this, r = n.childOfName("fromSymbol"), i = n.childOfName("toSymbol"), a = n.getTextContent();
      if (!r && !i && (!a || a.ignore))
        return;
      for (var o = 1, s = this.parent; s; )
        s.scaleX && (o /= s.scaleX), s = s.parent;
      var l = n.childOfName("line");
      if (!this.__dirty && !l.__dirty)
        return;
      var u = l.shape.percent, c = l.pointAt(0), f = l.pointAt(u), d = kl([], f, c);
      Rf(d, d);
      function h(w, P) {
        var $ = w.__specifiedRotation;
        if ($ == null) {
          var A = l.tangentAt(P);
          w.attr("rotation", (P === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(A[1], A[0]));
        } else
          w.attr("rotation", $);
      }
      if (r && (r.setPosition(c), h(r, 0), r.scaleX = r.scaleY = o * u, r.markRedraw()), i && (i.setPosition(f), h(i, 1), i.scaleX = i.scaleY = o * u, i.markRedraw()), a && !a.ignore) {
        a.x = a.y = 0, a.originX = a.originY = 0;
        var p = void 0, v = void 0, g = a.__labelDistance, m = g[0] * o, y = g[1] * o, b = u / 2, _ = l.tangentAt(b), O = [_[1], -_[0]], S = l.pointAt(b);
        O[1] > 0 && (O[0] = -O[0], O[1] = -O[1]);
        var x = _[0] < 0 ? -1 : 1;
        if (a.__position !== "start" && a.__position !== "end") {
          var C = -Math.atan2(_[1], _[0]);
          f[0] < c[0] && (C = Math.PI + C), a.rotation = C;
        }
        var T = void 0;
        switch (a.__position) {
          case "insideStartTop":
          case "insideMiddleTop":
          case "insideEndTop":
          case "middle":
            T = -y, v = "bottom";
            break;
          case "insideStartBottom":
          case "insideMiddleBottom":
          case "insideEndBottom":
            T = y, v = "top";
            break;
          default:
            T = 0, v = "middle";
        }
        switch (a.__position) {
          case "end":
            a.x = d[0] * m + f[0], a.y = d[1] * y + f[1], p = d[0] > 0.8 ? "left" : d[0] < -0.8 ? "right" : "center", v = d[1] > 0.8 ? "top" : d[1] < -0.8 ? "bottom" : "middle";
            break;
          case "start":
            a.x = -d[0] * m + c[0], a.y = -d[1] * y + c[1], p = d[0] > 0.8 ? "right" : d[0] < -0.8 ? "left" : "center", v = d[1] > 0.8 ? "bottom" : d[1] < -0.8 ? "top" : "middle";
            break;
          case "insideStartTop":
          case "insideStart":
          case "insideStartBottom":
            a.x = m * x + c[0], a.y = c[1] + T, p = _[0] < 0 ? "right" : "left", a.originX = -m * x, a.originY = -T;
            break;
          case "insideMiddleTop":
          case "insideMiddle":
          case "insideMiddleBottom":
          case "middle":
            a.x = S[0], a.y = S[1] + T, p = "center", a.originY = -T;
            break;
          case "insideEndTop":
          case "insideEnd":
          case "insideEndBottom":
            a.x = -m * x + f[0], a.y = f[1] + T, p = _[0] >= 0 ? "right" : "left", a.originX = m * x, a.originY = -T;
            break;
        }
        a.scaleX = a.scaleY = o, a.setStyle({
          // Use the user specified text align and baseline first
          verticalAlign: a.__verticalAlign || v,
          align: a.__align || p
        });
      }
    }, e;
  }(Ve)
), Kk = (
  /** @class */
  function() {
    function t(e) {
      this.group = new Ve(), this._LineCtor = e || qk;
    }
    return t.prototype.updateData = function(e) {
      var n = this;
      this._progressiveEls = null;
      var r = this, i = r.group, a = r._lineData;
      r._lineData = e, a || i.removeAll();
      var o = qF(e);
      e.diff(a).add(function(s) {
        n._doAdd(e, s, o);
      }).update(function(s, l) {
        n._doUpdate(a, e, l, s, o);
      }).remove(function(s) {
        i.remove(a.getItemGraphicEl(s));
      }).execute();
    }, t.prototype.updateLayout = function() {
      var e = this._lineData;
      e && e.eachItemGraphicEl(function(n, r) {
        n.updateLayout(e, r);
      }, this);
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this._seriesScope = qF(e), this._lineData = null, this.group.removeAll();
    }, t.prototype.incrementalUpdate = function(e, n) {
      this._progressiveEls = [];
      function r(s) {
        !s.isGroup && !SVe(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
      }
      for (var i = e.start; i < e.end; i++) {
        var a = n.getItemLayout(i);
        if (xP(a)) {
          var o = new this._LineCtor(n, i, this._seriesScope);
          o.traverse(r), this.group.add(o), n.setItemGraphicEl(i, o), this._progressiveEls.push(o);
        }
      }
    }, t.prototype.remove = function() {
      this.group.removeAll();
    }, t.prototype.eachRendered = function(e) {
      Tu(this._progressiveEls || this.group, e);
    }, t.prototype._doAdd = function(e, n, r) {
      var i = e.getItemLayout(n);
      if (xP(i)) {
        var a = new this._LineCtor(e, n, r);
        e.setItemGraphicEl(n, a), this.group.add(a);
      }
    }, t.prototype._doUpdate = function(e, n, r, i, a) {
      var o = e.getItemGraphicEl(r);
      if (!xP(n.getItemLayout(i))) {
        this.group.remove(o);
        return;
      }
      o ? o.updateData(n, i, a) : o = new this._LineCtor(n, i, a), n.setItemGraphicEl(i, o), this.group.add(o);
    }, t;
  }()
);
function SVe(t) {
  return t.animators && t.animators.length > 0;
}
function qF(t) {
  var e = t.hostModel, n = e.getModel("emphasis");
  return {
    lineStyle: e.getModel("lineStyle").getLineStyle(),
    emphasisLineStyle: n.getModel(["lineStyle"]).getLineStyle(),
    blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
    selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
    emphasisDisabled: n.get("disabled"),
    blurScope: n.get("blurScope"),
    focus: n.get("focus"),
    labelStatesModels: er(e)
  };
}
function KF(t) {
  return isNaN(t[0]) || isNaN(t[1]);
}
function xP(t) {
  return t && !KF(t[0]) && !KF(t[1]);
}
var wP = [], CP = [], TP = [], vd = ir, PP = Ul, JF = Math.abs;
function eW(t, e, n) {
  for (var r = t[0], i = t[1], a = t[2], o = 1 / 0, s, l = n * n, u = 0.1, c = 0.1; c <= 0.9; c += 0.1) {
    wP[0] = vd(r[0], i[0], a[0], c), wP[1] = vd(r[1], i[1], a[1], c);
    var f = JF(PP(wP, e) - l);
    f < o && (o = f, s = c);
  }
  for (var d = 0; d < 32; d++) {
    var h = s + u;
    CP[0] = vd(r[0], i[0], a[0], s), CP[1] = vd(r[1], i[1], a[1], s), TP[0] = vd(r[0], i[0], a[0], h), TP[1] = vd(r[1], i[1], a[1], h);
    var f = PP(CP, e) - l;
    if (JF(f) < 0.01)
      break;
    var p = PP(TP, e) - l;
    u /= 2, f < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
  }
  return s;
}
function $P(t, e) {
  var n = [], r = ym, i = [[], [], []], a = [[], []], o = [];
  e /= 2, t.eachEdge(function(s, l) {
    var u = s.getLayout(), c = s.getVisual("fromSymbol"), f = s.getVisual("toSymbol");
    u.__original || (u.__original = [Zo(u[0]), Zo(u[1])], u[2] && u.__original.push(Zo(u[2])));
    var d = u.__original;
    if (u[2] != null) {
      if (Mr(i[0], d[0]), Mr(i[1], d[2]), Mr(i[2], d[1]), c && c !== "none") {
        var h = Kv(s.node1), p = eW(i, d[0], h * e);
        r(i[0][0], i[1][0], i[2][0], p, n), i[0][0] = n[3], i[1][0] = n[4], r(i[0][1], i[1][1], i[2][1], p, n), i[0][1] = n[3], i[1][1] = n[4];
      }
      if (f && f !== "none") {
        var h = Kv(s.node2), p = eW(i, d[1], h * e);
        r(i[0][0], i[1][0], i[2][0], p, n), i[1][0] = n[1], i[2][0] = n[2], r(i[0][1], i[1][1], i[2][1], p, n), i[1][1] = n[1], i[2][1] = n[2];
      }
      Mr(u[0], i[0]), Mr(u[1], i[2]), Mr(u[2], i[1]);
    } else {
      if (Mr(a[0], d[0]), Mr(a[1], d[1]), kl(o, a[1], a[0]), Rf(o, o), c && c !== "none") {
        var h = Kv(s.node1);
        U1(a[0], a[0], o, h * e);
      }
      if (f && f !== "none") {
        var h = Kv(s.node2);
        U1(a[1], a[1], o, -h * e);
      }
      Mr(u[0], a[0]), Mr(u[1], a[1]);
    }
  });
}
function tW(t) {
  return t.type === "view";
}
var xVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      var i = new Z0(), a = new Kk(), o = this.group;
      this._controller = new K0(r.getZr()), this._controllerHost = {
        target: o
      }, o.add(i.group), o.add(a.group), this._symbolDraw = i, this._lineDraw = a, this._firstRender = !0;
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = n.coordinateSystem;
      this._model = n;
      var s = this._symbolDraw, l = this._lineDraw, u = this.group;
      if (tW(o)) {
        var c = {
          x: o.x,
          y: o.y,
          scaleX: o.scaleX,
          scaleY: o.scaleY
        };
        this._firstRender ? u.attr(c) : Ct(u, c, n);
      }
      $P(n.getGraph(), qv(n));
      var f = n.getData();
      s.updateData(f);
      var d = n.getEdgeData();
      l.updateData(d), this._updateNodeAndLinkScale(), this._updateController(n, r, i), clearTimeout(this._layoutTimeout);
      var h = n.forceLayout, p = n.get(["force", "layoutAnimation"]);
      h && this._startForceLayoutIteration(h, p);
      var v = n.get("layout");
      f.graph.eachNode(function(b) {
        var _ = b.dataIndex, O = b.getGraphicEl(), S = b.getModel();
        if (O) {
          O.off("drag").off("dragend");
          var x = S.get("draggable");
          x && O.on("drag", function(T) {
            switch (v) {
              case "force":
                h.warmUp(), !a._layouting && a._startForceLayoutIteration(h, p), h.setFixed(_), f.setItemLayout(_, [O.x, O.y]);
                break;
              case "circular":
                f.setItemLayout(_, [O.x, O.y]), b.setLayout({
                  fixed: !0
                }, !0), Yk(n, "symbolSize", b, [T.offsetX, T.offsetY]), a.updateLayout(n);
                break;
              case "none":
              default:
                f.setItemLayout(_, [O.x, O.y]), Xk(n.getGraph(), n), a.updateLayout(n);
                break;
            }
          }).on("dragend", function() {
            h && h.setUnfixed(_);
          }), O.setDraggable(x, !!S.get("cursor"));
          var C = S.get(["emphasis", "focus"]);
          C === "adjacency" && (Fe(O).focus = b.getAdjacentDataIndices());
        }
      }), f.graph.eachEdge(function(b) {
        var _ = b.getGraphicEl(), O = b.getModel().get(["emphasis", "focus"]);
        _ && O === "adjacency" && (Fe(_).focus = {
          edge: [b.dataIndex],
          node: [b.node1.dataIndex, b.node2.dataIndex]
        });
      });
      var g = n.get("layout") === "circular" && n.get(["circular", "rotateLabel"]), m = f.getLayout("cx"), y = f.getLayout("cy");
      f.graph.eachNode(function(b) {
        Dne(b, g, m, y);
      }), this._firstRender = !1;
    }, e.prototype.dispose = function() {
      this.remove(), this._controller && this._controller.dispose(), this._controllerHost = null;
    }, e.prototype._startForceLayoutIteration = function(n, r) {
      var i = this;
      (function a() {
        n.step(function(o) {
          i.updateLayout(i._model), (i._layouting = !o) && (r ? i._layoutTimeout = setTimeout(a, 16) : a());
        });
      })();
    }, e.prototype._updateController = function(n, r, i) {
      var a = this, o = this._controller, s = this._controllerHost, l = this.group;
      if (o.setPointerChecker(function(u, c, f) {
        var d = l.getBoundingRect();
        return d.applyTransform(l.transform), d.contain(c, f) && !mw(u, i, n);
      }), !tW(n.coordinateSystem)) {
        o.disable();
        return;
      }
      o.enable(n.get("roam")), s.zoomLimit = n.get("scaleLimit"), s.zoom = n.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
        Vk(s, u.dx, u.dy), i.dispatchAction({
          seriesId: n.id,
          type: "graphRoam",
          dx: u.dx,
          dy: u.dy
        });
      }).on("zoom", function(u) {
        Fk(s, u.scale, u.originX, u.originY), i.dispatchAction({
          seriesId: n.id,
          type: "graphRoam",
          zoom: u.scale,
          originX: u.originX,
          originY: u.originY
        }), a._updateNodeAndLinkScale(), $P(n.getGraph(), qv(n)), a._lineDraw.updateLayout(), i.updateLabelLayout();
      });
    }, e.prototype._updateNodeAndLinkScale = function() {
      var n = this._model, r = n.getData(), i = qv(n);
      r.eachItemGraphicEl(function(a, o) {
        a && a.setSymbolScale(i);
      });
    }, e.prototype.updateLayout = function(n) {
      $P(n.getGraph(), qv(n)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
    }, e.prototype.remove = function() {
      clearTimeout(this._layoutTimeout), this._layouting = !1, this._layoutTimeout = null, this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
    }, e.type = "graph", e;
  }(zt)
);
function gd(t) {
  return "_EC_" + t;
}
var wVe = (
  /** @class */
  function() {
    function t(e) {
      this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
    }
    return t.prototype.isDirected = function() {
      return this._directed;
    }, t.prototype.addNode = function(e, n) {
      e = e == null ? "" + n : "" + e;
      var r = this._nodesMap;
      if (r[gd(e)]) {
        process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
        return;
      }
      var i = new gc(e, n);
      return i.hostGraph = this, this.nodes.push(i), r[gd(e)] = i, i;
    }, t.prototype.getNodeByIndex = function(e) {
      var n = this.data.getRawIndex(e);
      return this.nodes[n];
    }, t.prototype.getNodeById = function(e) {
      return this._nodesMap[gd(e)];
    }, t.prototype.addEdge = function(e, n, r) {
      var i = this._nodesMap, a = this._edgesMap;
      if (St(e) && (e = this.nodes[e]), St(n) && (n = this.nodes[n]), e instanceof gc || (e = i[gd(e)]), n instanceof gc || (n = i[gd(n)]), !(!e || !n)) {
        var o = e.id + "-" + n.id, s = new kne(e, n, r);
        return s.hostGraph = this, this._directed && (e.outEdges.push(s), n.inEdges.push(s)), e.edges.push(s), e !== n && n.edges.push(s), this.edges.push(s), a[o] = s, s;
      }
    }, t.prototype.getEdgeByIndex = function(e) {
      var n = this.edgeData.getRawIndex(e);
      return this.edges[n];
    }, t.prototype.getEdge = function(e, n) {
      e instanceof gc && (e = e.id), n instanceof gc && (n = n.id);
      var r = this._edgesMap;
      return this._directed ? r[e + "-" + n] : r[e + "-" + n] || r[n + "-" + e];
    }, t.prototype.eachNode = function(e, n) {
      for (var r = this.nodes, i = r.length, a = 0; a < i; a++)
        r[a].dataIndex >= 0 && e.call(n, r[a], a);
    }, t.prototype.eachEdge = function(e, n) {
      for (var r = this.edges, i = r.length, a = 0; a < i; a++)
        r[a].dataIndex >= 0 && r[a].node1.dataIndex >= 0 && r[a].node2.dataIndex >= 0 && e.call(n, r[a], a);
    }, t.prototype.breadthFirstTraverse = function(e, n, r, i) {
      if (n instanceof gc || (n = this._nodesMap[gd(n)]), !!n) {
        for (var a = r === "out" ? "outEdges" : r === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
          this.nodes[o].__visited = !1;
        if (!e.call(i, n, null))
          for (var s = [n]; s.length; )
            for (var l = s.shift(), u = l[a], o = 0; o < u.length; o++) {
              var c = u[o], f = c.node1 === l ? c.node2 : c.node1;
              if (!f.__visited) {
                if (e.call(i, f, l))
                  return;
                s.push(f), f.__visited = !0;
              }
            }
      }
    }, t.prototype.update = function() {
      for (var e = this.data, n = this.edgeData, r = this.nodes, i = this.edges, a = 0, o = r.length; a < o; a++)
        r[a].dataIndex = -1;
      for (var a = 0, o = e.count(); a < o; a++)
        r[e.getRawIndex(a)].dataIndex = a;
      n.filterSelf(function(s) {
        var l = i[n.getRawIndex(s)];
        return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
      });
      for (var a = 0, o = i.length; a < o; a++)
        i[a].dataIndex = -1;
      for (var a = 0, o = n.count(); a < o; a++)
        i[n.getRawIndex(a)].dataIndex = a;
    }, t.prototype.clone = function() {
      for (var e = new t(this._directed), n = this.nodes, r = this.edges, i = 0; i < n.length; i++)
        e.addNode(n[i].id, n[i].dataIndex);
      for (var i = 0; i < r.length; i++) {
        var a = r[i];
        e.addEdge(a.node1.id, a.node2.id, a.dataIndex);
      }
      return e;
    }, t;
  }()
), gc = (
  /** @class */
  function() {
    function t(e, n) {
      this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e ?? "", this.dataIndex = n ?? -1;
    }
    return t.prototype.degree = function() {
      return this.edges.length;
    }, t.prototype.inDegree = function() {
      return this.inEdges.length;
    }, t.prototype.outDegree = function() {
      return this.outEdges.length;
    }, t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostGraph, r = n.data.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getAdjacentDataIndices = function() {
      for (var e = {
        edge: [],
        node: []
      }, n = 0; n < this.edges.length; n++) {
        var r = this.edges[n];
        r.dataIndex < 0 || (e.edge.push(r.dataIndex), e.node.push(r.node1.dataIndex, r.node2.dataIndex));
      }
      return e;
    }, t.prototype.getTrajectoryDataIndices = function() {
      for (var e = Pe(), n = Pe(), r = 0; r < this.edges.length; r++) {
        var i = this.edges[r];
        if (!(i.dataIndex < 0)) {
          e.set(i.dataIndex, !0);
          for (var a = [i.node1], o = [i.node2], s = 0; s < a.length; ) {
            var l = a[s];
            s++, n.set(l.dataIndex, !0);
            for (var u = 0; u < l.inEdges.length; u++)
              e.set(l.inEdges[u].dataIndex, !0), a.push(l.inEdges[u].node1);
          }
          for (s = 0; s < o.length; ) {
            var c = o[s];
            s++, n.set(c.dataIndex, !0);
            for (var u = 0; u < c.outEdges.length; u++)
              e.set(c.outEdges[u].dataIndex, !0), o.push(c.outEdges[u].node2);
          }
        }
      }
      return {
        edge: e.keys(),
        node: n.keys()
      };
    }, t;
  }()
), kne = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.dataIndex = -1, this.node1 = e, this.node2 = n, this.dataIndex = r ?? -1;
    }
    return t.prototype.getModel = function(e) {
      if (!(this.dataIndex < 0)) {
        var n = this.hostGraph, r = n.edgeData.getItemModel(this.dataIndex);
        return r.getModel(e);
      }
    }, t.prototype.getAdjacentDataIndices = function() {
      return {
        edge: [this.dataIndex],
        node: [this.node1.dataIndex, this.node2.dataIndex]
      };
    }, t.prototype.getTrajectoryDataIndices = function() {
      var e = Pe(), n = Pe();
      e.set(this.dataIndex, !0);
      for (var r = [this.node1], i = [this.node2], a = 0; a < r.length; ) {
        var o = r[a];
        a++, n.set(o.dataIndex, !0);
        for (var s = 0; s < o.inEdges.length; s++)
          e.set(o.inEdges[s].dataIndex, !0), r.push(o.inEdges[s].node1);
      }
      for (a = 0; a < i.length; ) {
        var l = i[a];
        a++, n.set(l.dataIndex, !0);
        for (var s = 0; s < l.outEdges.length; s++)
          e.set(l.outEdges[s].dataIndex, !0), i.push(l.outEdges[s].node2);
      }
      return {
        edge: e.keys(),
        node: n.keys()
      };
    }, t;
  }()
);
function Lne(t, e) {
  return {
    /**
     * @param Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.
     */
    getValue: function(n) {
      var r = this[t][e];
      return r.getStore().get(r.getDimensionIndex(n || "value"), this.dataIndex);
    },
    // TODO: TYPE stricter type.
    setVisual: function(n, r) {
      this.dataIndex >= 0 && this[t][e].setItemVisual(this.dataIndex, n, r);
    },
    getVisual: function(n) {
      return this[t][e].getItemVisual(this.dataIndex, n);
    },
    setLayout: function(n, r) {
      this.dataIndex >= 0 && this[t][e].setItemLayout(this.dataIndex, n, r);
    },
    getLayout: function() {
      return this[t][e].getItemLayout(this.dataIndex);
    },
    getGraphicEl: function() {
      return this[t][e].getItemGraphicEl(this.dataIndex);
    },
    getRawIndex: function() {
      return this[t][e].getRawIndex(this.dataIndex);
    }
  };
}
xn(gc, Lne("hostGraph", "data"));
xn(kne, Lne("hostGraph", "edgeData"));
function Nne(t, e, n, r, i) {
  for (var a = new wVe(r), o = 0; o < t.length; o++)
    a.addNode(Tn(
      // Id, name, dataIndex
      t[o].id,
      t[o].name,
      o
    ), o);
  for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
    var c = e[o], f = c.source, d = c.target;
    a.addEdge(f, d, u) && (l.push(c), s.push(Tn(Vn(c.id, null), f + " > " + d)), u++);
  }
  var h = n.get("coordinateSystem"), p;
  if (h === "cartesian2d" || h === "polar")
    p = us(t, n);
  else {
    var v = zf.get(h), g = v ? v.dimensions || [] : [];
    et(g, "value") < 0 && g.concat(["value"]);
    var m = wp(t, {
      coordDimensions: g,
      encodeDefine: n.getEncode()
    }).dimensions;
    p = new Lr(m, n), p.initData(t);
  }
  var y = new Lr(["value"], n);
  return y.initData(l, s), i && i(p, y), yne({
    mainData: p,
    struct: a,
    structAttr: "graph",
    datas: {
      node: p,
      edge: y
    },
    datasAttr: {
      node: "data",
      edge: "edgeData"
    }
  }), a.update(), a;
}
var CVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments);
      var r = this;
      function i() {
        return r._categoriesData;
      }
      this.legendVisualProvider = new q0(i, i), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(n.edges || n.links), this._updateCategoriesData();
    }, e.prototype.mergeDefaultAndTheme = function(n) {
      t.prototype.mergeDefaultAndTheme.apply(this, arguments), gf(n, "edgeLabel", ["show"]);
    }, e.prototype.getInitialData = function(n, r) {
      var i = n.edges || n.links || [], a = n.data || n.nodes || [], o = this;
      if (a && i) {
        fVe(this);
        var s = Nne(a, i, this, !0, l);
        return k(s.edges, function(u) {
          dVe(u.node1, u.node2, this, u.dataIndex);
        }, this), s.data;
      }
      function l(u, c) {
        u.wrapMethod("getItemModel", function(p) {
          var v = o._categoriesModels, g = p.getShallow("category"), m = v[g];
          return m && (m.parentModel = p.parentModel, p.parentModel = m), p;
        });
        var f = Wt.prototype.getModel;
        function d(p, v) {
          var g = f.call(this, p, v);
          return g.resolveParentPath = h, g;
        }
        c.wrapMethod("getItemModel", function(p) {
          return p.resolveParentPath = h, p.getModel = d, p;
        });
        function h(p) {
          if (p && (p[0] === "label" || p[1] === "label")) {
            var v = p.slice();
            return p[0] === "label" ? v[0] = "edgeLabel" : p[1] === "label" && (v[1] = "edgeLabel"), v;
          }
          return p;
        }
      }
    }, e.prototype.getGraph = function() {
      return this.getData().graph;
    }, e.prototype.getEdgeData = function() {
      return this.getGraph().edgeData;
    }, e.prototype.getCategoriesData = function() {
      return this._categoriesData;
    }, e.prototype.formatTooltip = function(n, r, i) {
      if (i === "edge") {
        var a = this.getData(), o = this.getDataParams(n, i), s = a.graph.getEdgeByIndex(n), l = a.getName(s.node1.dataIndex), u = a.getName(s.node2.dataIndex), c = [];
        return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
          name: c.join(" > "),
          value: o.value,
          noValue: o.value == null
        });
      }
      var f = iee({
        series: this,
        dataIndex: n,
        multipleSeries: r
      });
      return f;
    }, e.prototype._updateCategoriesData = function() {
      var n = ce(this.option.categories || [], function(i) {
        return i.value != null ? i : le({
          value: 0
        }, i);
      }), r = new Lr(["value"], this);
      r.initData(n), this._categoriesData = r, this._categoriesModels = r.mapArray(function(i) {
        return r.getItemModel(i);
      });
    }, e.prototype.setZoom = function(n) {
      this.option.zoom = n;
    }, e.prototype.setCenter = function(n) {
      this.option.center = n;
    }, e.prototype.isAnimationEnabled = function() {
      return t.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
    }, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      // Default option for all coordinate systems
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // polarIndex: 0,
      // geoIndex: 0,
      legendHoverLink: !0,
      layout: null,
      // Configuration of circular layout
      circular: {
        rotateLabel: !1
      },
      // Configuration of force directed layout
      force: {
        initLayout: null,
        // Node repulsion. Can be an array to represent range.
        repulsion: [0, 50],
        gravity: 0.1,
        // Initial friction
        friction: 0.6,
        // Edge length. Can be an array to represent range.
        edgeLength: 30,
        layoutAnimation: !0
      },
      left: "center",
      top: "center",
      // right: null,
      // bottom: null,
      // width: '80%',
      // height: '80%',
      symbol: "circle",
      symbolSize: 10,
      edgeSymbol: ["none", "none"],
      edgeSymbolSize: 10,
      edgeLabel: {
        position: "middle",
        distance: 5
      },
      draggable: !1,
      roam: !1,
      // Default on center of graph
      center: null,
      zoom: 1,
      // Symbol size scale ratio in roam
      nodeScaleRatio: 0.6,
      // cursor: null,
      // categories: [],
      // data: []
      // Or
      // nodes: []
      //
      // links: []
      // Or
      // edges: []
      label: {
        show: !1,
        formatter: "{b}"
      },
      itemStyle: {},
      lineStyle: {
        color: "#aaa",
        width: 1,
        opacity: 0.5
      },
      emphasis: {
        scale: !0,
        label: {
          show: !0
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Ht)
), TVe = {
  type: "graphRoam",
  event: "graphRoam",
  update: "none"
};
function PVe(t) {
  t.registerChartView(xVe), t.registerSeriesModel(CVe), t.registerProcessor(oVe), t.registerVisual(sVe), t.registerVisual(lVe), t.registerLayout(hVe), t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT, vVe), t.registerLayout(mVe), t.registerCoordinateSystem("graphView", {
    dimensions: J0.dimensions,
    create: bVe
  }), t.registerAction({
    type: "focusNodeAdjacency",
    event: "focusNodeAdjacency",
    update: "series:focusNodeAdjacency"
  }, On), t.registerAction({
    type: "unfocusNodeAdjacency",
    event: "unfocusNodeAdjacency",
    update: "series:unfocusNodeAdjacency"
  }, On), t.registerAction(TVe, function(e, n, r) {
    n.eachComponent({
      mainType: "series",
      query: e
    }, function(i) {
      var a = i.coordinateSystem, o = Qk(a, e, void 0, r);
      i.setCenter && i.setCenter(o.center), i.setZoom && i.setZoom(o.zoom);
    });
  });
}
var $Ve = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
    }
    return t;
  }()
), AVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "pointer", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new $Ve();
    }, e.prototype.buildPath = function(n, r) {
      var i = Math.cos, a = Math.sin, o = r.r, s = r.width, l = r.angle, u = r.x - i(l) * s * (s >= o / 3 ? 1 : 2), c = r.y - a(l) * s * (s >= o / 3 ? 1 : 2);
      l = r.angle - Math.PI / 2, n.moveTo(u, c), n.lineTo(r.x + i(l) * s, r.y + a(l) * s), n.lineTo(r.x + i(r.angle) * o, r.y + a(r.angle) * o), n.lineTo(r.x - i(l) * s, r.y - a(l) * s), n.lineTo(u, c);
    }, e;
  }(ot)
);
function EVe(t, e) {
  var n = t.get("center"), r = e.getWidth(), i = e.getHeight(), a = Math.min(r, i), o = _e(n[0], e.getWidth()), s = _e(n[1], e.getHeight()), l = _e(t.get("radius"), a / 2);
  return {
    cx: o,
    cy: s,
    r: l
  };
}
function Ab(t, e) {
  var n = t == null ? "" : t + "";
  return e && (Oe(e) ? n = e.replace("{value}", n) : Me(e) && (n = e(t))), n;
}
var MVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this.group.removeAll();
      var a = n.get(["axisLine", "lineStyle", "color"]), o = EVe(n, i);
      this._renderMain(n, r, i, a, o), this._data = n.getData();
    }, e.prototype.dispose = function() {
    }, e.prototype._renderMain = function(n, r, i, a, o) {
      var s = this.group, l = n.get("clockwise"), u = -n.get("startAngle") / 180 * Math.PI, c = -n.get("endAngle") / 180 * Math.PI, f = n.getModel("axisLine"), d = f.get("roundCap"), h = d ? AO : ri, p = f.get("show"), v = f.getModel("lineStyle"), g = v.get("width"), m = [u, c];
      DR(m, !l), u = m[0], c = m[1];
      for (var y = c - u, b = u, _ = [], O = 0; p && O < a.length; O++) {
        var S = Math.min(Math.max(a[O][0], 0), 1);
        c = u + y * S;
        var x = new h({
          shape: {
            startAngle: b,
            endAngle: c,
            cx: o.cx,
            cy: o.cy,
            clockwise: l,
            r0: o.r - g,
            r: o.r
          },
          silent: !0
        });
        x.setStyle({
          fill: a[O][1]
        }), x.setStyle(v.getLineStyle(
          // Because we use sector to simulate arc
          // so the properties for stroking are useless
          ["color", "width"]
        )), _.push(x), b = c;
      }
      _.reverse(), k(_, function(T) {
        return s.add(T);
      });
      var C = function(T) {
        if (T <= 0)
          return a[0][1];
        var w;
        for (w = 0; w < a.length; w++)
          if (a[w][0] >= T && (w === 0 ? 0 : a[w - 1][0]) < T)
            return a[w][1];
        return a[w - 1][1];
      };
      this._renderTicks(n, r, i, C, o, u, c, l, g), this._renderTitleAndDetail(n, r, i, C, o), this._renderAnchor(n, o), this._renderPointer(n, r, i, C, o, u, c, l, g);
    }, e.prototype._renderTicks = function(n, r, i, a, o, s, l, u, c) {
      for (var f = this.group, d = o.cx, h = o.cy, p = o.r, v = +n.get("min"), g = +n.get("max"), m = n.getModel("splitLine"), y = n.getModel("axisTick"), b = n.getModel("axisLabel"), _ = n.get("splitNumber"), O = y.get("splitNumber"), S = _e(m.get("length"), p), x = _e(y.get("length"), p), C = s, T = (l - s) / _, w = T / O, P = m.getModel("lineStyle").getLineStyle(), $ = y.getModel("lineStyle").getLineStyle(), A = m.get("distance"), D, E, R = 0; R <= _; R++) {
        if (D = Math.cos(C), E = Math.sin(C), m.get("show")) {
          var N = A ? A + c : c, V = new Un({
            shape: {
              x1: D * (p - N) + d,
              y1: E * (p - N) + h,
              x2: D * (p - S - N) + d,
              y2: E * (p - S - N) + h
            },
            style: P,
            silent: !0
          });
          P.stroke === "auto" && V.setStyle({
            stroke: a(R / _)
          }), f.add(V);
        }
        if (b.get("show")) {
          var N = b.get("distance") + A, z = Ab(mn(R / _ * (g - v) + v), b.get("formatter")), W = a(R / _), F = D * (p - S - N) + d, Q = E * (p - S - N) + h, Z = b.get("rotate"), ne = 0;
          Z === "radial" ? (ne = -C + 2 * Math.PI, ne > Math.PI / 2 && (ne += Math.PI)) : Z === "tangential" ? ne = -C - Math.PI / 2 : St(Z) && (ne = Z * Math.PI / 180), ne === 0 ? f.add(new gt({
            style: Zt(b, {
              text: z,
              x: F,
              y: Q,
              verticalAlign: E < -0.8 ? "top" : E > 0.8 ? "bottom" : "middle",
              align: D < -0.4 ? "left" : D > 0.4 ? "right" : "center"
            }, {
              inheritColor: W
            }),
            silent: !0
          })) : f.add(new gt({
            style: Zt(b, {
              text: z,
              x: F,
              y: Q,
              verticalAlign: "middle",
              align: "center"
            }, {
              inheritColor: W
            }),
            silent: !0,
            originX: F,
            originY: Q,
            rotation: ne
          }));
        }
        if (y.get("show") && R !== _) {
          var N = y.get("distance");
          N = N ? N + c : c;
          for (var ee = 0; ee <= O; ee++) {
            D = Math.cos(C), E = Math.sin(C);
            var oe = new Un({
              shape: {
                x1: D * (p - N) + d,
                y1: E * (p - N) + h,
                x2: D * (p - x - N) + d,
                y2: E * (p - x - N) + h
              },
              silent: !0,
              style: $
            });
            $.stroke === "auto" && oe.setStyle({
              stroke: a((R + ee / O) / _)
            }), f.add(oe), C += w;
          }
          C -= w;
        } else
          C += T;
      }
    }, e.prototype._renderPointer = function(n, r, i, a, o, s, l, u, c) {
      var f = this.group, d = this._data, h = this._progressEls, p = [], v = n.get(["pointer", "show"]), g = n.getModel("progress"), m = g.get("show"), y = n.getData(), b = y.mapDimension("value"), _ = +n.get("min"), O = +n.get("max"), S = [_, O], x = [s, l];
      function C(w, P) {
        var $ = y.getItemModel(w), A = $.getModel("pointer"), D = _e(A.get("width"), o.r), E = _e(A.get("length"), o.r), R = n.get(["pointer", "icon"]), N = A.get("offsetCenter"), V = _e(N[0], o.r), z = _e(N[1], o.r), W = A.get("keepAspect"), F;
        return R ? F = $n(R, V - D / 2, z - E, D, E, null, W) : F = new AVe({
          shape: {
            angle: -Math.PI / 2,
            width: D,
            r: E,
            x: V,
            y: z
          }
        }), F.rotation = -(P + Math.PI / 2), F.x = o.cx, F.y = o.cy, F;
      }
      function T(w, P) {
        var $ = g.get("roundCap"), A = $ ? AO : ri, D = g.get("overlap"), E = D ? g.get("width") : c / y.count(), R = D ? o.r - E : o.r - (w + 1) * E, N = D ? o.r : o.r - w * E, V = new A({
          shape: {
            startAngle: s,
            endAngle: P,
            cx: o.cx,
            cy: o.cy,
            clockwise: u,
            r0: R,
            r: N
          }
        });
        return D && (V.z2 = O - y.get(b, w) % O), V;
      }
      (m || v) && (y.diff(d).add(function(w) {
        var P = y.get(b, w);
        if (v) {
          var $ = C(w, s);
          Yt($, {
            rotation: -((isNaN(+P) ? x[0] : Lt(P, S, x, !0)) + Math.PI / 2)
          }, n), f.add($), y.setItemGraphicEl(w, $);
        }
        if (m) {
          var A = T(w, s), D = g.get("clip");
          Yt(A, {
            shape: {
              endAngle: Lt(P, S, x, D)
            }
          }, n), f.add(A), MA(n.seriesIndex, y.dataType, w, A), p[w] = A;
        }
      }).update(function(w, P) {
        var $ = y.get(b, w);
        if (v) {
          var A = d.getItemGraphicEl(P), D = A ? A.rotation : s, E = C(w, D);
          E.rotation = D, Ct(E, {
            rotation: -((isNaN(+$) ? x[0] : Lt($, S, x, !0)) + Math.PI / 2)
          }, n), f.add(E), y.setItemGraphicEl(w, E);
        }
        if (m) {
          var R = h[P], N = R ? R.shape.endAngle : s, V = T(w, N), z = g.get("clip");
          Ct(V, {
            shape: {
              endAngle: Lt($, S, x, z)
            }
          }, n), f.add(V), MA(n.seriesIndex, y.dataType, w, V), p[w] = V;
        }
      }).execute(), y.each(function(w) {
        var P = y.getItemModel(w), $ = P.getModel("emphasis"), A = $.get("focus"), D = $.get("blurScope"), E = $.get("disabled");
        if (v) {
          var R = y.getItemGraphicEl(w), N = y.getItemVisual(w, "style"), V = N.fill;
          if (R instanceof lr) {
            var z = R.style;
            R.useStyle(le({
              image: z.image,
              x: z.x,
              y: z.y,
              width: z.width,
              height: z.height
            }, N));
          } else
            R.useStyle(N), R.type !== "pointer" && R.setColor(V);
          R.setStyle(P.getModel(["pointer", "itemStyle"]).getItemStyle()), R.style.fill === "auto" && R.setStyle("fill", a(Lt(y.get(b, w), S, [0, 1], !0))), R.z2EmphasisLift = 0, Tr(R, P), bn(R, A, D, E);
        }
        if (m) {
          var W = p[w];
          W.useStyle(y.getItemVisual(w, "style")), W.setStyle(P.getModel(["progress", "itemStyle"]).getItemStyle()), W.z2EmphasisLift = 0, Tr(W, P), bn(W, A, D, E);
        }
      }), this._progressEls = p);
    }, e.prototype._renderAnchor = function(n, r) {
      var i = n.getModel("anchor"), a = i.get("show");
      if (a) {
        var o = i.get("size"), s = i.get("icon"), l = i.get("offsetCenter"), u = i.get("keepAspect"), c = $n(s, r.cx - o / 2 + _e(l[0], r.r), r.cy - o / 2 + _e(l[1], r.r), o, o, null, u);
        c.z2 = i.get("showAbove") ? 1 : 0, c.setStyle(i.getModel("itemStyle").getItemStyle()), this.group.add(c);
      }
    }, e.prototype._renderTitleAndDetail = function(n, r, i, a, o) {
      var s = this, l = n.getData(), u = l.mapDimension("value"), c = +n.get("min"), f = +n.get("max"), d = new Ve(), h = [], p = [], v = n.isAnimationEnabled(), g = n.get(["pointer", "showAbove"]);
      l.diff(this._data).add(function(m) {
        h[m] = new gt({
          silent: !0
        }), p[m] = new gt({
          silent: !0
        });
      }).update(function(m, y) {
        h[m] = s._titleEls[y], p[m] = s._detailEls[y];
      }).execute(), l.each(function(m) {
        var y = l.getItemModel(m), b = l.get(u, m), _ = new Ve(), O = a(Lt(b, [c, f], [0, 1], !0)), S = y.getModel("title");
        if (S.get("show")) {
          var x = S.get("offsetCenter"), C = o.cx + _e(x[0], o.r), T = o.cy + _e(x[1], o.r), w = h[m];
          w.attr({
            z2: g ? 0 : 2,
            style: Zt(S, {
              x: C,
              y: T,
              text: l.getName(m),
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: O
            })
          }), _.add(w);
        }
        var P = y.getModel("detail");
        if (P.get("show")) {
          var $ = P.get("offsetCenter"), A = o.cx + _e($[0], o.r), D = o.cy + _e($[1], o.r), E = _e(P.get("width"), o.r), R = _e(P.get("height"), o.r), N = n.get(["progress", "show"]) ? l.getItemVisual(m, "style").fill : O, w = p[m], V = P.get("formatter");
          w.attr({
            z2: g ? 0 : 2,
            style: Zt(P, {
              x: A,
              y: D,
              text: Ab(b, V),
              width: isNaN(E) ? null : E,
              height: isNaN(R) ? null : R,
              align: "center",
              verticalAlign: "middle"
            }, {
              inheritColor: N
            })
          }), dJ(w, {
            normal: P
          }, b, function(W) {
            return Ab(W, V);
          }), v && hJ(w, m, l, n, {
            getFormattedLabel: function(W, F, Q, Z, ne, ee) {
              return Ab(ee ? ee.interpolatedValue : b, V);
            }
          }), _.add(w);
        }
        d.add(_);
      }), this.group.add(d), this._titleEls = h, this._detailEls = p;
    }, e.type = "gauge", e;
  }(zt)
), IVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "itemStyle", n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return Pp(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;
  }(Ht)
);
function DVe(t) {
  t.registerChartView(MVe), t.registerSeriesModel(IVe);
}
var RVe = ["itemStyle", "opacity"], kVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r) {
      var i = t.call(this) || this, a = i, o = new ai(), s = new gt();
      return a.setTextContent(s), i.setTextGuideLine(o), i.updateData(n, r, !0), i;
    }
    return e.prototype.updateData = function(n, r, i) {
      var a = this, o = n.hostModel, s = n.getItemModel(r), l = n.getItemLayout(r), u = s.getModel("emphasis"), c = s.get(RVe);
      c = c ?? 1, i || so(a), a.useStyle(n.getItemVisual(r, "style")), a.style.lineJoin = "round", i ? (a.setShape({
        points: l.points
      }), a.style.opacity = 0, Yt(a, {
        style: {
          opacity: c
        }
      }, o, r)) : Ct(a, {
        style: {
          opacity: c
        },
        shape: {
          points: l.points
        }
      }, o, r), Tr(a, s), this._updateLabel(n, r), bn(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n, r) {
      var i = this, a = this.getTextGuideLine(), o = i.getTextContent(), s = n.hostModel, l = n.getItemModel(r), u = n.getItemLayout(r), c = u.label, f = n.getItemVisual(r, "style"), d = f.fill;
      Pr(
        // position will not be used in setLabelStyle
        o,
        er(l),
        {
          labelFetcher: n.hostModel,
          labelDataIndex: r,
          defaultOpacity: f.opacity,
          defaultText: n.getName(r)
        },
        {
          normal: {
            align: c.textAlign,
            verticalAlign: c.verticalAlign
          }
        }
      ), i.setTextConfig({
        local: !0,
        inside: !!c.inside,
        insideStroke: d,
        // insideFill: 'auto',
        outsideFill: d
      });
      var h = c.linePoints;
      a.setShape({
        points: h
      }), i.textGuideLineConfig = {
        anchor: h ? new Ke(h[0][0], h[0][1]) : null
      }, Ct(o, {
        style: {
          x: c.x,
          y: c.y
        }
      }, s, r), o.attr({
        rotation: c.rotation,
        originX: c.x,
        originY: c.y,
        z2: 10
      }), Ak(i, Ek(l), {
        // Default use item visual color
        stroke: d
      });
    }, e;
  }(ii)
), LVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.ignoreLabelLineUpdate = !0, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._data, s = this.group;
      a.diff(o).add(function(l) {
        var u = new kVe(a, l);
        a.setItemGraphicEl(l, u), s.add(u);
      }).update(function(l, u) {
        var c = o.getItemGraphicEl(u);
        c.updateData(a, l), s.add(c), a.setItemGraphicEl(l, c);
      }).remove(function(l) {
        var u = o.getItemGraphicEl(l);
        wm(u, n, l);
      }).execute(), this._data = a;
    }, e.prototype.remove = function() {
      this.group.removeAll(), this._data = null;
    }, e.prototype.dispose = function() {
    }, e.type = "funnel", e;
  }(zt)
), NVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this)), this._defaultLabelLine(n);
    }, e.prototype.getInitialData = function(n, r) {
      return Pp(this, {
        coordDimensions: ["value"],
        encodeDefaulter: Ue(nk, this)
      });
    }, e.prototype._defaultLabelLine = function(n) {
      gf(n, "labelLine", ["show"]);
      var r = n.labelLine, i = n.emphasis.labelLine;
      r.show = r.show && n.label.show, i.show = i.show && n.emphasis.label.show;
    }, e.prototype.getDataParams = function(n) {
      var r = this.getData(), i = t.prototype.getDataParams.call(this, n), a = r.mapDimension("value"), o = r.getSum(a);
      return i.percent = o ? +(r.get(a, n) / o * 100).toFixed(2) : 0, i.$vars.push("percent"), i;
    }, e.type = "series.funnel", e.defaultOption = {
      // zlevel: 0,                  // 一级层叠
      z: 2,
      legendHoverLink: !0,
      colorBy: "data",
      left: 80,
      top: 60,
      right: 80,
      bottom: 60,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      // 默认取数据最小最大值
      // min: 0,
      // max: 100,
      minSize: "0%",
      maxSize: "100%",
      sort: "descending",
      orient: "vertical",
      gap: 0,
      funnelAlign: "center",
      label: {
        show: !0,
        position: "outer"
        // formatter: 标签文本格式器，同Tooltip.formatter，不支持异步回调
      },
      labelLine: {
        show: !0,
        length: 20,
        lineStyle: {
          // color: 各异,
          width: 1
        }
      },
      itemStyle: {
        // color: 各异,
        borderColor: "#fff",
        borderWidth: 1
      },
      emphasis: {
        label: {
          show: !0
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Ht)
);
function BVe(t, e) {
  return Rn(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function zVe(t, e) {
  for (var n = t.mapDimension("value"), r = t.mapArray(n, function(l) {
    return l;
  }), i = [], a = e === "ascending", o = 0, s = t.count(); o < s; o++)
    i[o] = o;
  return Me(e) ? i.sort(e) : e !== "none" && i.sort(function(l, u) {
    return a ? r[l] - r[u] : r[u] - r[l];
  }), i;
}
function VVe(t) {
  var e = t.hostModel, n = e.get("orient");
  t.each(function(r) {
    var i = t.getItemModel(r), a = i.getModel("label"), o = a.get("position"), s = i.getModel("labelLine"), l = t.getItemLayout(r), u = l.points, c = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", f, d, h, p;
    if (c)
      o === "insideLeft" ? (d = (u[0][0] + u[3][0]) / 2 + 5, h = (u[0][1] + u[3][1]) / 2, f = "left") : o === "insideRight" ? (d = (u[1][0] + u[2][0]) / 2 - 5, h = (u[1][1] + u[2][1]) / 2, f = "right") : (d = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, h = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, f = "center"), p = [[d, h], [d, h]];
    else {
      var v = void 0, g = void 0, m = void 0, y = void 0, b = s.get("length");
      process.env.NODE_ENV !== "production" && (n === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), n === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = v - b, d = m - 5, f = "right") : o === "right" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = v + b, d = m + 5, f = "left") : o === "top" ? (v = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = g - b, h = y - 5, f = "center") : o === "bottom" ? (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = g + b, h = y + 5, f = "center") : o === "rightTop" ? (v = n === "horizontal" ? u[3][0] : u[1][0], g = n === "horizontal" ? u[3][1] : u[1][1], n === "horizontal" ? (y = g - b, h = y - 5, f = "center") : (m = v + b, d = m + 5, f = "top")) : o === "rightBottom" ? (v = u[2][0], g = u[2][1], n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "bottom")) : o === "leftTop" ? (v = u[0][0], g = n === "horizontal" ? u[0][1] : u[1][1], n === "horizontal" ? (y = g - b, h = y - 5, f = "center") : (m = v - b, d = m - 5, f = "right")) : o === "leftBottom" ? (v = n === "horizontal" ? u[1][0] : u[3][0], g = n === "horizontal" ? u[1][1] : u[2][1], n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v - b, d = m - 5, f = "right")) : (v = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, n === "horizontal" ? (y = g + b, h = y + 5, f = "center") : (m = v + b, d = m + 5, f = "left")), n === "horizontal" ? (m = v, d = m) : (y = g, h = y), p = [[v, g], [m, y]];
    }
    l.label = {
      linePoints: p,
      x: d,
      y: h,
      verticalAlign: "middle",
      textAlign: f,
      inside: c
    };
  });
}
function FVe(t, e) {
  t.eachSeriesByType("funnel", function(n) {
    var r = n.getData(), i = r.mapDimension("value"), a = n.get("sort"), o = BVe(n, e), s = n.get("orient"), l = o.width, u = o.height, c = zVe(r, a), f = o.x, d = o.y, h = s === "horizontal" ? [_e(n.get("minSize"), u), _e(n.get("maxSize"), u)] : [_e(n.get("minSize"), l), _e(n.get("maxSize"), l)], p = r.getDataExtent(i), v = n.get("min"), g = n.get("max");
    v == null && (v = Math.min(p[0], 0)), g == null && (g = p[1]);
    var m = n.get("funnelAlign"), y = n.get("gap"), b = s === "horizontal" ? l : u, _ = (b - y * (r.count() - 1)) / r.count(), O = function(D, E) {
      if (s === "horizontal") {
        var R = r.get(i, D) || 0, N = Lt(R, [v, g], h, !0), V = void 0;
        switch (m) {
          case "top":
            V = d;
            break;
          case "center":
            V = d + (u - N) / 2;
            break;
          case "bottom":
            V = d + (u - N);
            break;
        }
        return [[E, V], [E, V + N]];
      }
      var z = r.get(i, D) || 0, W = Lt(z, [v, g], h, !0), F;
      switch (m) {
        case "left":
          F = f;
          break;
        case "center":
          F = f + (l - W) / 2;
          break;
        case "right":
          F = f + l - W;
          break;
      }
      return [[F, E], [F + W, E]];
    };
    a === "ascending" && (_ = -_, y = -y, s === "horizontal" ? f += l : d += u, c = c.reverse());
    for (var S = 0; S < c.length; S++) {
      var x = c[S], C = c[S + 1], T = r.getItemModel(x);
      if (s === "horizontal") {
        var w = T.get(["itemStyle", "width"]);
        w == null ? w = _ : (w = _e(w, l), a === "ascending" && (w = -w));
        var P = O(x, f), $ = O(C, f + w);
        f += w + y, r.setItemLayout(x, {
          points: P.concat($.slice().reverse())
        });
      } else {
        var A = T.get(["itemStyle", "height"]);
        A == null ? A = _ : (A = _e(A, u), a === "ascending" && (A = -A));
        var P = O(x, d), $ = O(C, d + A);
        d += A + y, r.setItemLayout(x, {
          points: P.concat($.slice().reverse())
        });
      }
    }
    VVe(r);
  });
}
function WVe(t) {
  t.registerChartView(LVe), t.registerSeriesModel(NVe), t.registerLayout(FVe), t.registerProcessor(Y0("funnel"));
}
var QVe = 0.3, HVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._dataGroup = new Ve(), n._initialized = !1, n;
    }
    return e.prototype.init = function() {
      this.group.add(this._dataGroup);
    }, e.prototype.render = function(n, r, i, a) {
      this._progressiveEls = null;
      var o = this._dataGroup, s = n.getData(), l = this._data, u = n.coordinateSystem, c = u.dimensions, f = rW(n);
      s.diff(l).add(d).update(h).remove(p).execute();
      function d(g) {
        var m = nW(s, o, g, c, u);
        AP(m, s, g, f);
      }
      function h(g, m) {
        var y = l.getItemGraphicEl(m), b = Bne(s, g, c, u);
        s.setItemGraphicEl(g, y), Ct(y, {
          shape: {
            points: b
          }
        }, n, g), so(y), AP(y, s, g, f);
      }
      function p(g) {
        var m = l.getItemGraphicEl(g);
        o.remove(m);
      }
      if (!this._initialized) {
        this._initialized = !0;
        var v = GVe(u, n, function() {
          setTimeout(function() {
            o.removeClipPath();
          });
        });
        o.setClipPath(v);
      }
      this._data = s;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this._initialized = !0, this._data = null, this._dataGroup.removeAll();
    }, e.prototype.incrementalRender = function(n, r, i) {
      for (var a = r.getData(), o = r.coordinateSystem, s = o.dimensions, l = rW(r), u = this._progressiveEls = [], c = n.start; c < n.end; c++) {
        var f = nW(a, this._dataGroup, c, s, o);
        f.incremental = !0, AP(f, a, c, l), u.push(f);
      }
    }, e.prototype.remove = function() {
      this._dataGroup && this._dataGroup.removeAll(), this._data = null;
    }, e.type = "parallel", e;
  }(zt)
);
function GVe(t, e, n) {
  var r = t.model, i = t.getRect(), a = new mt({
    shape: {
      x: i.x,
      y: i.y,
      width: i.width,
      height: i.height
    }
  }), o = r.get("layout") === "horizontal" ? "width" : "height";
  return a.setShape(o, 0), Yt(a, {
    shape: {
      width: i.width,
      height: i.height
    }
  }, e, n), a;
}
function Bne(t, e, n, r) {
  for (var i = [], a = 0; a < n.length; a++) {
    var o = n[a], s = t.get(t.mapDimension(o), e);
    jVe(s, r.getAxis(o).type) || i.push(r.dataToPoint(s, o));
  }
  return i;
}
function nW(t, e, n, r, i) {
  var a = Bne(t, n, r, i), o = new ai({
    shape: {
      points: a
    },
    // silent: true,
    z2: 10
  });
  return e.add(o), t.setItemGraphicEl(n, o), o;
}
function rW(t) {
  var e = t.get("smooth", !0);
  return e === !0 && (e = QVe), e = is(e), ou(e) && (e = 0), {
    smooth: e
  };
}
function AP(t, e, n, r) {
  t.useStyle(e.getItemVisual(n, "style")), t.style.fill = null, t.setShape("smooth", r.smooth);
  var i = e.getItemModel(n), a = i.getModel("emphasis");
  Tr(t, i, "lineStyle"), bn(t, a.get("focus"), a.get("blurScope"), a.get("disabled"));
}
function jVe(t, e) {
  return e === "category" ? t == null : t == null || isNaN(t);
}
var ZVe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return us(null, this, {
        useEncodeDefaulter: xe(UVe, null, this)
      });
    }, e.prototype.getRawIndicesByActiveState = function(n) {
      var r = this.coordinateSystem, i = this.getData(), a = [];
      return r.eachActiveState(i, function(o, s) {
        n === o && a.push(i.getRawIndex(s));
      }), a;
    }, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "parallel",
      parallelIndex: 0,
      label: {
        show: !1
      },
      inactiveOpacity: 0.05,
      activeOpacity: 1,
      lineStyle: {
        width: 1,
        opacity: 0.45,
        type: "solid"
      },
      emphasis: {
        label: {
          show: !1
        }
      },
      progressive: 500,
      smooth: !1,
      animationEasing: "linear"
    }, e;
  }(Ht)
);
function UVe(t) {
  var e = t.ecModel.getComponent("parallel", t.get("parallelIndex"));
  if (e) {
    var n = {};
    return k(e.dimensions, function(r) {
      var i = XVe(r);
      n[r] = i;
    }), n;
  }
}
function XVe(t) {
  return +t.replace("dim", "");
}
var YVe = ["lineStyle", "opacity"], qVe = {
  seriesType: "parallel",
  reset: function(t, e) {
    var n = t.coordinateSystem, r = {
      normal: t.get(["lineStyle", "opacity"]),
      active: t.get("activeOpacity"),
      inactive: t.get("inactiveOpacity")
    };
    return {
      progress: function(i, a) {
        n.eachActiveState(a, function(o, s) {
          var l = r[o];
          if (o === "normal" && a.hasItemOption) {
            var u = a.getItemModel(s).get(YVe, !0);
            u != null && (l = u);
          }
          var c = a.ensureUniqueItemVisual(s, "style");
          c.opacity = l;
        }, i.start, i.end);
      }
    };
  }
};
function KVe(t) {
  JVe(t), eFe(t);
}
function JVe(t) {
  if (!t.parallel) {
    var e = !1;
    k(t.series, function(n) {
      n && n.type === "parallel" && (e = !0);
    }), e && (t.parallel = [{}]);
  }
}
function eFe(t) {
  var e = Qt(t.parallelAxis);
  k(e, function(n) {
    if (Ie(n)) {
      var r = n.parallelIndex || 0, i = Qt(t.parallel)[r];
      i && i.parallelAxisDefault && qe(n, i.parallelAxisDefault, !1);
    }
  });
}
var tFe = 5, nFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this._model = n, this._api = i, this._handlers || (this._handlers = {}, k(rFe, function(a, o) {
        i.getZr().on(o, this._handlers[o] = xe(a, this));
      }, this)), Sp(this, "_throttledDispatchExpand", n.get("axisExpandRate"), "fixRate");
    }, e.prototype.dispose = function(n, r) {
      $m(this, "_throttledDispatchExpand"), k(this._handlers, function(i, a) {
        r.getZr().off(a, i);
      }), this._handlers = null;
    }, e.prototype._throttledDispatchExpand = function(n) {
      this._dispatchExpand(n);
    }, e.prototype._dispatchExpand = function(n) {
      n && this._api.dispatchAction(le({
        type: "parallelAxisExpand"
      }, n));
    }, e.type = "parallel", e;
  }(Xt)
), rFe = {
  mousedown: function(t) {
    EP(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]);
  },
  mouseup: function(t) {
    var e = this._mouseDownPoint;
    if (EP(this, "click") && e) {
      var n = [t.offsetX, t.offsetY], r = Math.pow(e[0] - n[0], 2) + Math.pow(e[1] - n[1], 2);
      if (r > tFe)
        return;
      var i = this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]);
      i.behavior !== "none" && this._dispatchExpand({
        axisExpandWindow: i.axisExpandWindow
      });
    }
    this._mouseDownPoint = null;
  },
  mousemove: function(t) {
    if (!(this._mouseDownPoint || !EP(this, "mousemove"))) {
      var e = this._model, n = e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX, t.offsetY]), r = n.behavior;
      r === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(r === "none" ? null : {
        axisExpandWindow: n.axisExpandWindow,
        // Jumping uses animation, and sliding suppresses animation.
        animation: r === "jump" ? null : {
          duration: 0
          // Disable animation.
        }
      });
    }
  }
};
function EP(t, e) {
  var n = t._model;
  return n.get("axisExpandable") && n.get("axisExpandTriggerOn") === e;
}
var iFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      t.prototype.init.apply(this, arguments), this.mergeOption({});
    }, e.prototype.mergeOption = function(n) {
      var r = this.option;
      n && qe(r, n, !0), this._initDimensions();
    }, e.prototype.contains = function(n, r) {
      var i = n.get("parallelIndex");
      return i != null && r.getComponent("parallel", i) === this;
    }, e.prototype.setAxisExpand = function(n) {
      k(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(r) {
        n.hasOwnProperty(r) && (this.option[r] = n[r]);
      }, this);
    }, e.prototype._initDimensions = function() {
      var n = this.dimensions = [], r = this.parallelAxisIndex = [], i = Nt(this.ecModel.queryComponents({
        mainType: "parallelAxis"
      }), function(a) {
        return (a.get("parallelIndex") || 0) === this.componentIndex;
      }, this);
      k(i, function(a) {
        n.push("dim" + a.get("dim")), r.push(a.componentIndex);
      });
    }, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
      // zlevel: 0,
      z: 0,
      left: 80,
      top: 60,
      right: 80,
      bottom: 60,
      // width: {totalWidth} - left - right,
      // height: {totalHeight} - top - bottom,
      layout: "horizontal",
      // FIXME
      // naming?
      axisExpandable: !1,
      axisExpandCenter: null,
      axisExpandCount: 0,
      axisExpandWidth: 50,
      axisExpandRate: 17,
      axisExpandDebounce: 50,
      // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.
      // Do not doc to user until necessary.
      axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
      axisExpandTriggerOn: "click",
      parallelAxisDefault: null
    }, e;
  }(rt)
), aFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.type = a || "value", s.axisIndex = o, s;
    }
    return e.prototype.isHorizontal = function() {
      return this.coordinateSystem.getModel().get("layout") !== "horizontal";
    }, e;
  }(Ba)
);
function Qf(t, e, n, r, i, a) {
  t = t || 0;
  var o = n[1] - n[0];
  if (i != null && (i = md(i, [0, o])), a != null && (a = Math.max(a, i ?? 0)), r === "all") {
    var s = Math.abs(e[1] - e[0]);
    s = md(s, [0, o]), i = a = md(s, [i, a]), r = 0;
  }
  e[0] = md(e[0], n), e[1] = md(e[1], n);
  var l = MP(e, r);
  e[r] += t;
  var u = i || 0, c = n.slice();
  l.sign < 0 ? c[0] += u : c[1] -= u, e[r] = md(e[r], c);
  var f;
  return f = MP(e, r), i != null && (f.sign !== l.sign || f.span < i) && (e[1 - r] = e[r] + l.sign * i), f = MP(e, r), a != null && f.span > a && (e[1 - r] = e[r] + f.sign * a), e;
}
function MP(t, e) {
  var n = t[e] - t[1 - e];
  return {
    span: Math.abs(n),
    sign: n > 0 ? -1 : n < 0 ? 1 : e ? -1 : 1
  };
}
function md(t, e) {
  return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, t));
}
var IP = k, zne = Math.min, Vne = Math.max, iW = Math.floor, oFe = Math.ceil, aW = mn, sFe = Math.PI, lFe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "parallel", this._axesMap = Pe(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, n, r);
    }
    return t.prototype._init = function(e, n, r) {
      var i = e.dimensions, a = e.parallelAxisIndex;
      IP(i, function(o, s) {
        var l = a[s], u = n.getComponent("parallelAxis", l), c = this._axesMap.set(o, new aFe(o, G0(u), [0, 0], u.get("type"), l)), f = c.type === "category";
        c.onBand = f && u.get("boundaryGap"), c.inverse = u.get("inverse"), u.axis = c, c.model = u, c.coordinateSystem = u.coordinateSystem = this;
      }, this);
    }, t.prototype.update = function(e, n) {
      this._updateAxesFromSeries(this._model, e);
    }, t.prototype.containPoint = function(e) {
      var n = this._makeLayoutInfo(), r = n.axisBase, i = n.layoutBase, a = n.pixelDimIndex, o = e[1 - a], s = e[a];
      return o >= r && o <= r + n.axisLength && s >= i && s <= i + n.layoutLength;
    }, t.prototype.getModel = function() {
      return this._model;
    }, t.prototype._updateAxesFromSeries = function(e, n) {
      n.eachSeries(function(r) {
        if (e.contains(r, n)) {
          var i = r.getData();
          IP(this.dimensions, function(a) {
            var o = this._axesMap.get(a);
            o.scale.unionExtentFromData(i, i.mapDimension(a)), Of(o.scale, o.model);
          }, this);
        }
      }, this);
    }, t.prototype.resize = function(e, n) {
      this._rect = Rn(e.getBoxLayoutParams(), {
        width: n.getWidth(),
        height: n.getHeight()
      }), this._layoutAxes();
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype._makeLayoutInfo = function() {
      var e = this._model, n = this._rect, r = ["x", "y"], i = ["width", "height"], a = e.get("layout"), o = a === "horizontal" ? 0 : 1, s = n[i[o]], l = [0, s], u = this.dimensions.length, c = Eb(e.get("axisExpandWidth"), l), f = Eb(e.get("axisExpandCount") || 0, [0, u]), d = e.get("axisExpandable") && u > 3 && u > f && f > 1 && c > 0 && s > 0, h = e.get("axisExpandWindow"), p;
      if (h)
        p = Eb(h[1] - h[0], l), h[1] = h[0] + p;
      else {
        p = Eb(c * (f - 1), l);
        var v = e.get("axisExpandCenter") || iW(u / 2);
        h = [c * v - p / 2], h[1] = h[0] + p;
      }
      var g = (s - p) / (u - f);
      g < 3 && (g = 0);
      var m = [iW(aW(h[0] / c, 1)) + 1, oFe(aW(h[1] / c, 1)) - 1], y = g / c * h[0];
      return {
        layout: a,
        pixelDimIndex: o,
        layoutBase: n[r[o]],
        layoutLength: s,
        axisBase: n[r[1 - o]],
        axisLength: n[i[1 - o]],
        axisExpandable: d,
        axisExpandWidth: c,
        axisCollapseWidth: g,
        axisExpandWindow: h,
        axisCount: u,
        winInnerIndices: m,
        axisExpandWindow0Pos: y
      };
    }, t.prototype._layoutAxes = function() {
      var e = this._rect, n = this._axesMap, r = this.dimensions, i = this._makeLayoutInfo(), a = i.layout;
      n.each(function(o) {
        var s = [0, i.axisLength], l = o.inverse ? 1 : 0;
        o.setExtent(s[l], s[1 - l]);
      }), IP(r, function(o, s) {
        var l = (i.axisExpandable ? cFe : uFe)(s, i), u = {
          horizontal: {
            x: l.position,
            y: i.axisLength
          },
          vertical: {
            x: 0,
            y: l.position
          }
        }, c = {
          horizontal: sFe / 2,
          vertical: 0
        }, f = [u[a].x + e.x, u[a].y + e.y], d = c[a], h = Si();
        Cu(h, h, d), ao(h, h, f), this._axesLayout[o] = {
          position: f,
          rotation: d,
          transform: h,
          axisNameAvailableWidth: l.axisNameAvailableWidth,
          axisLabelShow: l.axisLabelShow,
          nameTruncateMaxWidth: l.nameTruncateMaxWidth,
          tickDirection: 1,
          labelDirection: 1
        };
      }, this);
    }, t.prototype.getAxis = function(e) {
      return this._axesMap.get(e);
    }, t.prototype.dataToPoint = function(e, n) {
      return this.axisCoordToPoint(this._axesMap.get(n).dataToCoord(e), n);
    }, t.prototype.eachActiveState = function(e, n, r, i) {
      r == null && (r = 0), i == null && (i = e.count());
      var a = this._axesMap, o = this.dimensions, s = [], l = [];
      k(o, function(g) {
        s.push(e.mapDimension(g)), l.push(a.get(g).model);
      });
      for (var u = this.hasAxisBrushed(), c = r; c < i; c++) {
        var f = void 0;
        if (!u)
          f = "normal";
        else {
          f = "active";
          for (var d = e.getValues(s, c), h = 0, p = o.length; h < p; h++) {
            var v = l[h].getActiveState(d[h]);
            if (v === "inactive") {
              f = "inactive";
              break;
            }
          }
        }
        n(f, c);
      }
    }, t.prototype.hasAxisBrushed = function() {
      for (var e = this.dimensions, n = this._axesMap, r = !1, i = 0, a = e.length; i < a; i++)
        n.get(e[i]).model.getActiveState() !== "normal" && (r = !0);
      return r;
    }, t.prototype.axisCoordToPoint = function(e, n) {
      var r = this._axesLayout[n];
      return to([e, 0], r.transform);
    }, t.prototype.getAxisLayout = function(e) {
      return Le(this._axesLayout[e]);
    }, t.prototype.getSlidedAxisExpandWindow = function(e) {
      var n = this._makeLayoutInfo(), r = n.pixelDimIndex, i = n.axisExpandWindow.slice(), a = i[1] - i[0], o = [0, n.axisExpandWidth * (n.axisCount - 1)];
      if (!this.containPoint(e))
        return {
          behavior: "none",
          axisExpandWindow: i
        };
      var s = e[r] - n.layoutBase - n.axisExpandWindow0Pos, l, u = "slide", c = n.axisCollapseWidth, f = this._model.get("axisExpandSlideTriggerArea"), d = f[0] != null;
      if (c)
        d && c && s < a * f[0] ? (u = "jump", l = s - a * f[2]) : d && c && s > a * (1 - f[0]) ? (u = "jump", l = s - a * (1 - f[2])) : (l = s - a * f[1]) >= 0 && (l = s - a * (1 - f[1])) <= 0 && (l = 0), l *= n.axisExpandWidth / c, l ? Qf(l, i, o, "all") : u = "none";
      else {
        var h = i[1] - i[0], p = o[1] * s / h;
        i = [Vne(0, p - h / 2)], i[1] = zne(o[1], i[0] + h), i[0] = i[1] - h;
      }
      return {
        axisExpandWindow: i,
        behavior: u
      };
    }, t;
  }()
);
function Eb(t, e) {
  return zne(Vne(t, e[0]), e[1]);
}
function uFe(t, e) {
  var n = e.layoutLength / (e.axisCount - 1);
  return {
    position: n * t,
    axisNameAvailableWidth: n,
    axisLabelShow: !0
  };
}
function cFe(t, e) {
  var n = e.layoutLength, r = e.axisExpandWidth, i = e.axisCount, a = e.axisCollapseWidth, o = e.winInnerIndices, s, l = a, u = !1, c;
  return t < o[0] ? (s = t * a, c = a) : t <= o[1] ? (s = e.axisExpandWindow0Pos + t * r - e.axisExpandWindow[0], l = r, u = !0) : (s = n - (i - 1 - t) * a, c = a), {
    position: s,
    axisNameAvailableWidth: l,
    axisLabelShow: u,
    nameTruncateMaxWidth: c
  };
}
function fFe(t, e) {
  var n = [];
  return t.eachComponent("parallel", function(r, i) {
    var a = new lFe(r, t, e);
    a.name = "parallel_" + i, a.resize(r, e), r.coordinateSystem = a, a.model = r, n.push(a);
  }), t.eachSeries(function(r) {
    if (r.get("coordinateSystem") === "parallel") {
      var i = r.getReferringComponents("parallel", Dn).models[0];
      r.coordinateSystem = i.coordinateSystem;
    }
  }), n;
}
var dFe = {
  create: fFe
}, SE = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.activeIntervals = [], n;
    }
    return e.prototype.getAreaSelectStyle = function() {
      return yf([
        ["fill", "color"],
        ["lineWidth", "borderWidth"],
        ["stroke", "borderColor"],
        ["width", "width"],
        ["opacity", "opacity"]
        // Option decal is in `DecalObject` but style.decal is in `PatternObject`.
        // So do not transfer decal directly.
      ])(this.getModel("areaSelectStyle"));
    }, e.prototype.setActiveIntervals = function(n) {
      var r = this.activeIntervals = Le(n);
      if (r)
        for (var i = r.length - 1; i >= 0; i--)
          Vi(r[i]);
    }, e.prototype.getActiveState = function(n) {
      var r = this.activeIntervals;
      if (!r.length)
        return "normal";
      if (n == null || isNaN(+n))
        return "inactive";
      if (r.length === 1) {
        var i = r[0];
        if (i[0] <= n && n <= i[1])
          return "active";
      } else
        for (var a = 0, o = r.length; a < o; a++)
          if (r[a][0] <= n && n <= r[a][1])
            return "active";
      return "inactive";
    }, e;
  }(rt)
);
xn(SE, Tp);
var Sf = !0, Vm = Math.min, Hh = Math.max, hFe = Math.pow, pFe = 1e4, vFe = 6, gFe = 6, oW = "globalPan", mFe = {
  w: [0, 0],
  e: [0, 1],
  n: [1, 0],
  s: [1, 1]
}, yFe = {
  w: "ew",
  e: "ew",
  n: "ns",
  s: "ns",
  ne: "nesw",
  sw: "nesw",
  nw: "nwse",
  se: "nwse"
}, sW = {
  brushStyle: {
    lineWidth: 2,
    stroke: "rgba(210,219,238,0.3)",
    fill: "#D2DBEE"
  },
  transformable: !0,
  brushMode: "single",
  removeOnClick: !1
}, bFe = 0, Jk = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this) || this;
      return r._track = [], r._covers = [], r._handlers = {}, process.env.NODE_ENV !== "production" && ke(n), r._zr = n, r.group = new Ve(), r._uid = "brushController_" + bFe++, k(TFe, function(i, a) {
        this._handlers[a] = xe(i, this);
      }, r), r;
    }
    return e.prototype.enableBrush = function(n) {
      return process.env.NODE_ENV !== "production" && ke(this._mounted), this._brushType && this._doDisableBrush(), n.brushType && this._doEnableBrush(n), this;
    }, e.prototype._doEnableBrush = function(n) {
      var r = this._zr;
      this._enableGlobalPan || uBe(r, oW, this._uid), k(this._handlers, function(i, a) {
        r.on(a, i);
      }), this._brushType = n.brushType, this._brushOption = qe(Le(sW), n, !0);
    }, e.prototype._doDisableBrush = function() {
      var n = this._zr;
      cBe(n, oW, this._uid), k(this._handlers, function(r, i) {
        n.off(i, r);
      }), this._brushType = this._brushOption = null;
    }, e.prototype.setPanels = function(n) {
      if (n && n.length) {
        var r = this._panels = {};
        k(n, function(i) {
          r[i.panelId] = Le(i);
        });
      } else
        this._panels = null;
      return this;
    }, e.prototype.mount = function(n) {
      n = n || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = n.enableGlobalPan;
      var r = this.group;
      return this._zr.add(r), r.attr({
        x: n.x || 0,
        y: n.y || 0,
        rotation: n.rotation || 0,
        scaleX: n.scaleX || 1,
        scaleY: n.scaleY || 1
      }), this._transform = r.getLocalTransform(), this;
    }, e.prototype.updateCovers = function(n) {
      process.env.NODE_ENV !== "production" && ke(this._mounted), n = ce(n, function(d) {
        return qe(Le(sW), d, !0);
      });
      var r = "\0-brush-index-", i = this._covers, a = this._covers = [], o = this, s = this._creatingCover;
      return new Us(i, n, u, l).add(c).update(c).remove(f).execute(), this;
      function l(d, h) {
        return (d.id != null ? d.id : r + h) + "-" + d.brushType;
      }
      function u(d, h) {
        return l(d.__brushOption, h);
      }
      function c(d, h) {
        var p = n[d];
        if (h != null && i[h] === s)
          a[d] = i[h];
        else {
          var v = a[d] = h != null ? (i[h].__brushOption = p, i[h]) : Wne(o, Fne(o, p));
          eL(o, v);
        }
      }
      function f(d) {
        i[d] !== s && o.group.remove(i[d]);
      }
    }, e.prototype.unmount = function() {
      if (!(process.env.NODE_ENV !== "production" && !this._mounted))
        return this.enableBrush(!1), xE(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
    }, e.prototype.dispose = function() {
      this.unmount(), this.off();
    }, e;
  }(Ra)
);
function Fne(t, e) {
  var n = Ow[e.brushType].createCover(t, e);
  return n.__brushOption = e, Hne(n, e), t.group.add(n), n;
}
function Wne(t, e) {
  var n = tL(e);
  return n.endCreating && (n.endCreating(t, e), Hne(e, e.__brushOption)), e;
}
function Qne(t, e) {
  var n = e.__brushOption;
  tL(e).updateCoverShape(t, e, n.range, n);
}
function Hne(t, e) {
  var n = e.z;
  n == null && (n = pFe), t.traverse(function(r) {
    r.z = n, r.z2 = n;
  });
}
function eL(t, e) {
  tL(e).updateCommon(t, e), Qne(t, e);
}
function tL(t) {
  return Ow[t.__brushOption.brushType];
}
function nL(t, e, n) {
  var r = t._panels;
  if (!r)
    return Sf;
  var i, a = t._transform;
  return k(r, function(o) {
    o.isTargetByCursor(e, n, a) && (i = o);
  }), i;
}
function Gne(t, e) {
  var n = t._panels;
  if (!n)
    return Sf;
  var r = e.__brushOption.panelId;
  return r != null ? n[r] : Sf;
}
function xE(t) {
  var e = t._covers, n = e.length;
  return k(e, function(r) {
    t.group.remove(r);
  }, t), e.length = 0, !!n;
}
function xf(t, e) {
  var n = ce(t._covers, function(r) {
    var i = r.__brushOption, a = Le(i.range);
    return {
      brushType: i.brushType,
      panelId: i.panelId,
      range: a
    };
  });
  t.trigger("brush", {
    areas: n,
    isEnd: !!e.isEnd,
    removeOnClick: !!e.removeOnClick
  });
}
function _Fe(t) {
  var e = t._track;
  if (!e.length)
    return !1;
  var n = e[e.length - 1], r = e[0], i = n[0] - r[0], a = n[1] - r[1], o = hFe(i * i + a * a, 0.5);
  return o > vFe;
}
function jne(t) {
  var e = t.length - 1;
  return e < 0 && (e = 0), [t[0], t[e]];
}
function Zne(t, e, n, r) {
  var i = new Ve();
  return i.add(new mt({
    name: "main",
    style: rL(n),
    silent: !0,
    draggable: !0,
    cursor: "move",
    drift: Ue(lW, t, e, i, ["n", "s", "w", "e"]),
    ondragend: Ue(xf, e, {
      isEnd: !0
    })
  })), k(r, function(a) {
    i.add(new mt({
      name: a.join(""),
      style: {
        opacity: 0
      },
      draggable: !0,
      silent: !0,
      invisible: !0,
      drift: Ue(lW, t, e, i, a),
      ondragend: Ue(xf, e, {
        isEnd: !0
      })
    }));
  }), i;
}
function Une(t, e, n, r) {
  var i = r.brushStyle.lineWidth || 0, a = Hh(i, gFe), o = n[0][0], s = n[1][0], l = o - i / 2, u = s - i / 2, c = n[0][1], f = n[1][1], d = c - a + i / 2, h = f - a + i / 2, p = c - o, v = f - s, g = p + i, m = v + i;
  ys(t, e, "main", o, s, p, v), r.transformable && (ys(t, e, "w", l, u, a, m), ys(t, e, "e", d, u, a, m), ys(t, e, "n", l, u, g, a), ys(t, e, "s", l, h, g, a), ys(t, e, "nw", l, u, a, a), ys(t, e, "ne", d, u, a, a), ys(t, e, "sw", l, h, a, a), ys(t, e, "se", d, h, a, a));
}
function wE(t, e) {
  var n = e.__brushOption, r = n.transformable, i = e.childAt(0);
  i.useStyle(rL(n)), i.attr({
    silent: !r,
    cursor: r ? "move" : "default"
  }), k([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(a) {
    var o = e.childOfName(a.join("")), s = a.length === 1 ? CE(t, a[0]) : SFe(t, a);
    o && o.attr({
      silent: !r,
      invisible: !r,
      cursor: r ? yFe[s] + "-resize" : null
    });
  });
}
function ys(t, e, n, r, i, a, o) {
  var s = e.childOfName(n);
  s && s.setShape(wFe(iL(t, e, [[r, i], [r + a, i + o]])));
}
function rL(t) {
  return Re({
    strokeNoScale: !0
  }, t.brushStyle);
}
function Xne(t, e, n, r) {
  var i = [Vm(t, n), Vm(e, r)], a = [Hh(t, n), Hh(e, r)];
  return [
    [i[0], a[0]],
    [i[1], a[1]]
    // y range
  ];
}
function OFe(t) {
  return ql(t.group);
}
function CE(t, e) {
  var n = {
    w: "left",
    e: "right",
    n: "top",
    s: "bottom"
  }, r = {
    left: "w",
    right: "e",
    top: "n",
    bottom: "s"
  }, i = Jx(n[e], OFe(t));
  return r[i];
}
function SFe(t, e) {
  var n = [CE(t, e[0]), CE(t, e[1])];
  return (n[0] === "e" || n[0] === "w") && n.reverse(), n.join("");
}
function lW(t, e, n, r, i, a) {
  var o = n.__brushOption, s = t.toRectRange(o.range), l = Yne(e, i, a);
  k(r, function(u) {
    var c = mFe[u];
    s[c[0]][c[1]] += l[c[0]];
  }), o.range = t.fromRectRange(Xne(s[0][0], s[1][0], s[0][1], s[1][1])), eL(e, n), xf(e, {
    isEnd: !1
  });
}
function xFe(t, e, n, r) {
  var i = e.__brushOption.range, a = Yne(t, n, r);
  k(i, function(o) {
    o[0] += a[0], o[1] += a[1];
  }), eL(t, e), xf(t, {
    isEnd: !1
  });
}
function Yne(t, e, n) {
  var r = t.group, i = r.transformCoordToLocal(e, n), a = r.transformCoordToLocal(0, 0);
  return [i[0] - a[0], i[1] - a[1]];
}
function iL(t, e, n) {
  var r = Gne(t, e);
  return r && r !== Sf ? r.clipPath(n, t._transform) : Le(n);
}
function wFe(t) {
  var e = Vm(t[0][0], t[1][0]), n = Vm(t[0][1], t[1][1]), r = Hh(t[0][0], t[1][0]), i = Hh(t[0][1], t[1][1]);
  return {
    x: e,
    y: n,
    width: r - e,
    height: i - n
  };
}
function CFe(t, e, n) {
  if (
    // Check active
    !(!t._brushType || PFe(t, e.offsetX, e.offsetY))
  ) {
    var r = t._zr, i = t._covers, a = nL(t, e, n);
    if (!t._dragging)
      for (var o = 0; o < i.length; o++) {
        var s = i[o].__brushOption;
        if (a && (a === Sf || s.panelId === a.panelId) && Ow[s.brushType].contain(i[o], n[0], n[1]))
          return;
      }
    a && r.setCursorStyle("crosshair");
  }
}
function TE(t) {
  var e = t.event;
  e.preventDefault && e.preventDefault();
}
function PE(t, e, n) {
  return t.childOfName("main").contain(e, n);
}
function qne(t, e, n, r) {
  var i = t._creatingCover, a = t._creatingPanel, o = t._brushOption, s;
  if (t._track.push(n.slice()), _Fe(t) || i) {
    if (a && !i) {
      o.brushMode === "single" && xE(t);
      var l = Le(o);
      l.brushType = uW(l.brushType, a), l.panelId = a === Sf ? null : a.panelId, i = t._creatingCover = Fne(t, l), t._covers.push(i);
    }
    if (i) {
      var u = Ow[uW(t._brushType, a)], c = i.__brushOption;
      c.range = u.getCreatingRange(iL(t, i, t._track)), r && (Wne(t, i), u.updateCommon(t, i)), Qne(t, i), s = {
        isEnd: r
      };
    }
  } else r && o.brushMode === "single" && o.removeOnClick && nL(t, e, n) && xE(t) && (s = {
    isEnd: r,
    removeOnClick: !0
  });
  return s;
}
function uW(t, e) {
  return t === "auto" ? (process.env.NODE_ENV !== "production" && ke(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : t;
}
var TFe = {
  mousedown: function(t) {
    if (this._dragging)
      cW(this, t);
    else if (!t.target || !t.target.draggable) {
      TE(t);
      var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY);
      this._creatingCover = null;
      var n = this._creatingPanel = nL(this, t, e);
      n && (this._dragging = !0, this._track = [e.slice()]);
    }
  },
  mousemove: function(t) {
    var e = t.offsetX, n = t.offsetY, r = this.group.transformCoordToLocal(e, n);
    if (CFe(this, t, r), this._dragging) {
      TE(t);
      var i = qne(this, t, r, !1);
      i && xf(this, i);
    }
  },
  mouseup: function(t) {
    cW(this, t);
  }
};
function cW(t, e) {
  if (t._dragging) {
    TE(e);
    var n = e.offsetX, r = e.offsetY, i = t.group.transformCoordToLocal(n, r), a = qne(t, e, i, !0);
    t._dragging = !1, t._track = [], t._creatingCover = null, a && xf(t, a);
  }
}
function PFe(t, e, n) {
  var r = t._zr;
  return e < 0 || e > r.getWidth() || n < 0 || n > r.getHeight();
}
var Ow = {
  lineX: fW(0),
  lineY: fW(1),
  rect: {
    createCover: function(t, e) {
      function n(r) {
        return r;
      }
      return Zne({
        toRectRange: n,
        fromRectRange: n
      }, t, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
    },
    getCreatingRange: function(t) {
      var e = jne(t);
      return Xne(e[1][0], e[1][1], e[0][0], e[0][1]);
    },
    updateCoverShape: function(t, e, n, r) {
      Une(t, e, n, r);
    },
    updateCommon: wE,
    contain: PE
  },
  polygon: {
    createCover: function(t, e) {
      var n = new Ve();
      return n.add(new ai({
        name: "main",
        style: rL(e),
        silent: !0
      })), n;
    },
    getCreatingRange: function(t) {
      return t;
    },
    endCreating: function(t, e) {
      e.remove(e.childAt(0)), e.add(new ii({
        name: "main",
        draggable: !0,
        drift: Ue(xFe, t, e),
        ondragend: Ue(xf, t, {
          isEnd: !0
        })
      }));
    },
    updateCoverShape: function(t, e, n, r) {
      e.childAt(0).setShape({
        points: iL(t, e, n)
      });
    },
    updateCommon: wE,
    contain: PE
  }
};
function fW(t) {
  return {
    createCover: function(e, n) {
      return Zne({
        toRectRange: function(r) {
          var i = [r, [0, 100]];
          return t && i.reverse(), i;
        },
        fromRectRange: function(r) {
          return r[t];
        }
      }, e, n, [[["w"], ["e"]], [["n"], ["s"]]][t]);
    },
    getCreatingRange: function(e) {
      var n = jne(e), r = Vm(n[0][t], n[1][t]), i = Hh(n[0][t], n[1][t]);
      return [r, i];
    },
    updateCoverShape: function(e, n, r, i) {
      var a, o = Gne(e, n);
      if (o !== Sf && o.getLinearBrushOtherExtent)
        a = o.getLinearBrushOtherExtent(t);
      else {
        var s = e._zr;
        a = [0, [s.getWidth(), s.getHeight()][1 - t]];
      }
      var l = [r, a];
      t && l.reverse(), Une(e, n, l, i);
    },
    updateCommon: wE,
    contain: PE
  };
}
function Kne(t) {
  return t = aL(t), function(e) {
    return HR(e, t);
  };
}
function Jne(t, e) {
  return t = aL(t), function(n) {
    var r = e ?? n, i = r ? t.width : t.height, a = r ? t.x : t.y;
    return [a, a + (i || 0)];
  };
}
function ere(t, e, n) {
  var r = aL(t);
  return function(i, a) {
    return r.contain(a[0], a[1]) && !mw(i, e, n);
  };
}
function aL(t) {
  return Je.create(t);
}
var $Fe = ["axisLine", "axisTickLabel", "axisName"], AFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      t.prototype.init.apply(this, arguments), (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this));
    }, e.prototype.render = function(n, r, i, a) {
      if (!EFe(n, r, a)) {
        this.axisModel = n, this.api = i, this.group.removeAll();
        var o = this._axisGroup;
        if (this._axisGroup = new Ve(), this.group.add(this._axisGroup), !!n.get("show")) {
          var s = IFe(n, r), l = s.coordinateSystem, u = n.getAreaSelectStyle(), c = u.width, f = n.axis.dim, d = l.getAxisLayout(f), h = le({
            strokeContainThreshold: c
          }, d), p = new Kr(n, h);
          k($Fe, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(h, u, n, s, c, i), W0(o, this._axisGroup, n);
        }
      }
    }, e.prototype._refreshBrushController = function(n, r, i, a, o, s) {
      var l = i.axis.getExtent(), u = l[1] - l[0], c = Math.min(30, Math.abs(u) * 0.1), f = Je.create({
        x: l[0],
        y: -o / 2,
        width: u,
        height: o
      });
      f.x -= c, f.width += 2 * c, this._brushController.mount({
        enableGlobalPan: !0,
        rotation: n.rotation,
        x: n.position[0],
        y: n.position[1]
      }).setPanels([{
        panelId: "pl",
        clipPath: Kne(f),
        isTargetByCursor: ere(f, s, a),
        getLinearBrushOtherExtent: Jne(f, 0)
      }]).enableBrush({
        brushType: "lineX",
        brushStyle: r,
        removeOnClick: !0
      }).updateCovers(MFe(i));
    }, e.prototype._onBrush = function(n) {
      var r = n.areas, i = this.axisModel, a = i.axis, o = ce(r, function(s) {
        return [a.coordToData(s.range[0], !0), a.coordToData(s.range[1], !0)];
      });
      (!i.option.realtime === n.isEnd || n.removeOnClick) && this.api.dispatchAction({
        type: "axisAreaSelect",
        parallelAxisId: i.id,
        intervals: o
      });
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.type = "parallelAxis", e;
  }(Xt)
);
function EFe(t, e, n) {
  return n && n.type === "axisAreaSelect" && e.findComponents({
    mainType: "parallelAxis",
    query: n
  })[0] === t;
}
function MFe(t) {
  var e = t.axis;
  return ce(t.activeIntervals, function(n) {
    return {
      brushType: "lineX",
      panelId: "pl",
      range: [e.dataToCoord(n[0], !0), e.dataToCoord(n[1], !0)]
    };
  });
}
function IFe(t, e) {
  return e.getComponent("parallel", t.get("parallelIndex"));
}
var DFe = {
  type: "axisAreaSelect",
  event: "axisAreaSelected"
  // update: 'updateVisual'
};
function RFe(t) {
  t.registerAction(DFe, function(e, n) {
    n.eachComponent({
      mainType: "parallelAxis",
      query: e
    }, function(r) {
      r.axis.model.setActiveIntervals(e.intervals);
    });
  }), t.registerAction("parallelAxisExpand", function(e, n) {
    n.eachComponent({
      mainType: "parallel",
      query: e
    }, function(r) {
      r.setAxisExpand(e);
    });
  });
}
var kFe = {
  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 tre(t) {
  t.registerComponentView(nFe), t.registerComponentModel(iFe), t.registerCoordinateSystem("parallel", dFe), t.registerPreprocessor(KVe), t.registerComponentModel(SE), t.registerComponentView(AFe), Qh(t, "parallel", SE, kFe), RFe(t);
}
function LFe(t) {
  at(tre), t.registerChartView(HVe), t.registerSeriesModel(ZVe), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, qVe);
}
var NFe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0;
    }
    return t;
  }()
), BFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      return t.call(this, n) || this;
    }
    return e.prototype.getDefaultShape = function() {
      return new NFe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.extent;
      n.moveTo(r.x1, r.y1), n.bezierCurveTo(r.cpx1, r.cpy1, r.cpx2, r.cpy2, r.x2, r.y2), r.orient === "vertical" ? (n.lineTo(r.x2 + i, r.y2), n.bezierCurveTo(r.cpx2 + i, r.cpy2, r.cpx1 + i, r.cpy1, r.x1 + i, r.y1)) : (n.lineTo(r.x2, r.y2 + i), n.bezierCurveTo(r.cpx2, r.cpy2 + i, r.cpx1, r.cpy1 + i, r.x1, r.y1 + i)), n.closePath();
    }, e.prototype.highlight = function() {
      js(this);
    }, e.prototype.downplay = function() {
      Zs(this);
    }, e;
  }(ot)
), zFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._focusAdjacencyDisabled = !1, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this, o = n.getGraph(), s = this.group, l = n.layoutInfo, u = l.width, c = l.height, f = n.getData(), d = n.getData("edge"), h = n.get("orient");
      this._model = n, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
        var v = new BFe(), g = Fe(v);
        g.dataIndex = p.dataIndex, g.seriesIndex = n.seriesIndex, g.dataType = "edge";
        var m = p.getModel(), y = m.getModel("lineStyle"), b = y.get("curveness"), _ = p.node1.getLayout(), O = p.node1.getModel(), S = O.get("localX"), x = O.get("localY"), C = p.node2.getLayout(), T = p.node2.getModel(), w = T.get("localX"), P = T.get("localY"), $ = p.getLayout(), A, D, E, R, N, V, z, W;
        v.shape.extent = Math.max(1, $.dy), v.shape.orient = h, h === "vertical" ? (A = (S != null ? S * u : _.x) + $.sy, D = (x != null ? x * c : _.y) + _.dy, E = (w != null ? w * u : C.x) + $.ty, R = P != null ? P * c : C.y, N = A, V = D * (1 - b) + R * b, z = E, W = D * b + R * (1 - b)) : (A = (S != null ? S * u : _.x) + _.dx, D = (x != null ? x * c : _.y) + $.sy, E = w != null ? w * u : C.x, R = (P != null ? P * c : C.y) + $.ty, N = A * (1 - b) + E * b, V = D, z = A * b + E * (1 - b), W = R), v.setShape({
          x1: A,
          y1: D,
          x2: E,
          y2: R,
          cpx1: N,
          cpy1: V,
          cpx2: z,
          cpy2: W
        }), v.useStyle(y.getItemStyle()), dW(v.style, h, p);
        var F = "" + m.get("value"), Q = er(m, "edgeLabel");
        Pr(v, Q, {
          labelFetcher: {
            getFormattedLabel: function(ee, oe, K, ie, X, H) {
              return n.getFormattedLabel(
                ee,
                oe,
                "edge",
                ie,
                // ensure edgeLabel formatter is provided
                // to prevent the inheritance from `label.formatter` of the series
                ji(X, Q.normal && Q.normal.get("formatter"), F),
                H
              );
            }
          },
          labelDataIndex: p.dataIndex,
          defaultText: F
        }), v.setTextConfig({
          position: "inside"
        });
        var Z = m.getModel("emphasis");
        Tr(v, m, "lineStyle", function(ee) {
          var oe = ee.getItemStyle();
          return dW(oe, h, p), oe;
        }), s.add(v), d.setItemGraphicEl(p.dataIndex, v);
        var ne = Z.get("focus");
        bn(v, ne === "adjacency" ? p.getAdjacentDataIndices() : ne === "trajectory" ? p.getTrajectoryDataIndices() : ne, Z.get("blurScope"), Z.get("disabled"));
      }), o.eachNode(function(p) {
        var v = p.getLayout(), g = p.getModel(), m = g.get("localX"), y = g.get("localY"), b = g.getModel("emphasis"), _ = g.get(["itemStyle", "borderRadius"]) || 0, O = new mt({
          shape: {
            x: m != null ? m * u : v.x,
            y: y != null ? y * c : v.y,
            width: v.dx,
            height: v.dy,
            r: _
          },
          style: g.getModel("itemStyle").getItemStyle(),
          z2: 10
        });
        Pr(O, er(g), {
          labelFetcher: {
            getFormattedLabel: function(x, C) {
              return n.getFormattedLabel(x, C, "node");
            }
          },
          labelDataIndex: p.dataIndex,
          defaultText: p.id
        }), O.disableLabelAnimation = !0, O.setStyle("fill", p.getVisual("color")), O.setStyle("decal", p.getVisual("style").decal), Tr(O, g), s.add(O), f.setItemGraphicEl(p.dataIndex, O), Fe(O).dataType = "node";
        var S = b.get("focus");
        bn(O, S === "adjacency" ? p.getAdjacentDataIndices() : S === "trajectory" ? p.getTrajectoryDataIndices() : S, b.get("blurScope"), b.get("disabled"));
      }), f.eachItemGraphicEl(function(p, v) {
        var g = f.getItemModel(v);
        g.get("draggable") && (p.drift = function(m, y) {
          a._focusAdjacencyDisabled = !0, this.shape.x += m, this.shape.y += y, this.dirty(), i.dispatchAction({
            type: "dragNode",
            seriesId: n.id,
            dataIndex: f.getRawIndex(v),
            localX: this.shape.x / u,
            localY: this.shape.y / c
          });
        }, p.ondragend = function() {
          a._focusAdjacencyDisabled = !1;
        }, p.draggable = !0, p.cursor = "move");
      }), !this._data && n.isAnimationEnabled() && s.setClipPath(VFe(s.getBoundingRect(), n, function() {
        s.removeClipPath();
      })), this._data = n.getData();
    }, e.prototype.dispose = function() {
    }, e.type = "sankey", e;
  }(zt)
);
function dW(t, e, n) {
  switch (t.fill) {
    case "source":
      t.fill = n.node1.getVisual("color"), t.decal = n.node1.getVisual("style").decal;
      break;
    case "target":
      t.fill = n.node2.getVisual("color"), t.decal = n.node2.getVisual("style").decal;
      break;
    case "gradient":
      var r = n.node1.getVisual("color"), i = n.node2.getVisual("color");
      Oe(r) && Oe(i) && (t.fill = new hp(0, 0, +(e === "horizontal"), +(e === "vertical"), [{
        color: r,
        offset: 0
      }, {
        color: i,
        offset: 1
      }]));
  }
}
function VFe(t, e, n) {
  var r = new mt({
    shape: {
      x: t.x - 10,
      y: t.y - 10,
      width: 0,
      height: t.height + 20
    }
  });
  return Yt(r, {
    shape: {
      width: t.width + 20
    }
  }, e, n), r;
}
var FFe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = n.edges || n.links, a = n.data || n.nodes, o = n.levels;
      this.levelModels = [];
      for (var s = this.levelModels, l = 0; l < o.length; l++)
        if (o[l].depth != null && o[l].depth >= 0)
          s[o[l].depth] = new Wt(o[l], this, r);
        else if (process.env.NODE_ENV !== "production")
          throw new Error("levels[i].depth is mandatory and should be natural number");
      if (a && i) {
        var u = Nne(a, i, this, !0, c);
        return u.data;
      }
      function c(f, d) {
        f.wrapMethod("getItemModel", function(h, p) {
          var v = h.parentModel, g = v.getData().getItemLayout(p);
          if (g) {
            var m = g.depth, y = v.levelModels[m];
            y && (h.parentModel = y);
          }
          return h;
        }), d.wrapMethod("getItemModel", function(h, p) {
          var v = h.parentModel, g = v.getGraph().getEdgeByIndex(p), m = g.node1.getLayout();
          if (m) {
            var y = m.depth, b = v.levelModels[y];
            b && (h.parentModel = b);
          }
          return h;
        });
      }
    }, e.prototype.setNodePosition = function(n, r) {
      var i = this.option.data || this.option.nodes, a = i[n];
      a.localX = r[0], a.localY = r[1];
    }, e.prototype.getGraph = function() {
      return this.getData().graph;
    }, e.prototype.getEdgeData = function() {
      return this.getGraph().edgeData;
    }, e.prototype.formatTooltip = function(n, r, i) {
      function a(h) {
        return isNaN(h) || h == null;
      }
      if (i === "edge") {
        var o = this.getDataParams(n, i), s = o.data, l = o.value, u = s.source + " -- " + s.target;
        return tr("nameValue", {
          name: u,
          value: l,
          noValue: a(l)
        });
      } else {
        var c = this.getGraph().getNodeByIndex(n), f = c.getLayout().value, d = this.getDataParams(n, i).data.name;
        return tr("nameValue", {
          name: d != null ? d + "" : null,
          value: f,
          noValue: a(f)
        });
      }
    }, e.prototype.optionUpdated = function() {
    }, e.prototype.getDataParams = function(n, r) {
      var i = t.prototype.getDataParams.call(this, n, r);
      if (i.value == null && r === "node") {
        var a = this.getGraph().getNodeByIndex(n), o = a.getLayout().value;
        i.value = o;
      }
      return i;
    }, e.type = "series.sankey", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "view",
      left: "5%",
      top: "5%",
      right: "20%",
      bottom: "5%",
      orient: "horizontal",
      nodeWidth: 20,
      nodeGap: 8,
      draggable: !0,
      layoutIterations: 32,
      label: {
        show: !0,
        position: "right",
        fontSize: 12
      },
      edgeLabel: {
        show: !1,
        fontSize: 12
      },
      levels: [],
      nodeAlign: "justify",
      lineStyle: {
        color: "#314656",
        opacity: 0.2,
        curveness: 0.5
      },
      emphasis: {
        label: {
          show: !0
        },
        lineStyle: {
          opacity: 0.5
        }
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      },
      animationEasing: "linear",
      animationDuration: 1e3
    }, e;
  }(Ht)
);
function WFe(t, e) {
  t.eachSeriesByType("sankey", function(n) {
    var r = n.get("nodeWidth"), i = n.get("nodeGap"), a = QFe(n, e);
    n.layoutInfo = a;
    var o = a.width, s = a.height, l = n.getGraph(), u = l.nodes, c = l.edges;
    GFe(u);
    var f = Nt(u, function(v) {
      return v.getLayout().value === 0;
    }), d = f.length !== 0 ? 0 : n.get("layoutIterations"), h = n.get("orient"), p = n.get("nodeAlign");
    HFe(u, c, r, i, o, s, d, h, p);
  });
}
function QFe(t, e) {
  return Rn(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  });
}
function HFe(t, e, n, r, i, a, o, s, l) {
  jFe(t, e, n, i, a, s, l), YFe(t, e, a, i, r, o, s), aWe(t, s);
}
function GFe(t) {
  k(t, function(e) {
    var n = Jl(e.outEdges, kO), r = Jl(e.inEdges, kO), i = e.getValue() || 0, a = Math.max(n, r, i);
    e.setLayout({
      value: a
    }, !0);
  });
}
function jFe(t, e, n, r, i, a, o) {
  for (var s = [], l = [], u = [], c = [], f = 0, d = 0; d < e.length; d++)
    s[d] = 1;
  for (var d = 0; d < t.length; d++)
    l[d] = t[d].inEdges.length, l[d] === 0 && u.push(t[d]);
  for (var h = -1; u.length; ) {
    for (var p = 0; p < u.length; p++) {
      var v = u[p], g = v.hostGraph.data.getRawDataItem(v.dataIndex), m = g.depth != null && g.depth >= 0;
      m && g.depth > h && (h = g.depth), v.setLayout({
        depth: m ? g.depth : f
      }, !0), a === "vertical" ? v.setLayout({
        dy: n
      }, !0) : v.setLayout({
        dx: n
      }, !0);
      for (var y = 0; y < v.outEdges.length; y++) {
        var b = v.outEdges[y], _ = e.indexOf(b);
        s[_] = 0;
        var O = b.node2, S = t.indexOf(O);
        --l[S] === 0 && c.indexOf(O) < 0 && c.push(O);
      }
    }
    ++f, u = c, c = [];
  }
  for (var d = 0; d < s.length; d++)
    if (s[d] === 1)
      throw new Error("Sankey is a DAG, the original data has cycle!");
  var x = h > f - 1 ? h : f - 1;
  o && o !== "left" && ZFe(t, o, a, x);
  var C = a === "vertical" ? (i - n) / x : (r - n) / x;
  XFe(t, C, a);
}
function nre(t) {
  var e = t.hostGraph.data.getRawDataItem(t.dataIndex);
  return e.depth != null && e.depth >= 0;
}
function ZFe(t, e, n, r) {
  if (e === "right") {
    for (var i = [], a = t, o = 0; a.length; ) {
      for (var s = 0; s < a.length; s++) {
        var l = a[s];
        l.setLayout({
          skNodeHeight: o
        }, !0);
        for (var u = 0; u < l.inEdges.length; u++) {
          var c = l.inEdges[u];
          i.indexOf(c.node1) < 0 && i.push(c.node1);
        }
      }
      a = i, i = [], ++o;
    }
    k(t, function(f) {
      nre(f) || f.setLayout({
        depth: Math.max(0, r - f.getLayout().skNodeHeight)
      }, !0);
    });
  } else e === "justify" && UFe(t, r);
}
function UFe(t, e) {
  k(t, function(n) {
    !nre(n) && !n.outEdges.length && n.setLayout({
      depth: e
    }, !0);
  });
}
function XFe(t, e, n) {
  k(t, function(r) {
    var i = r.getLayout().depth * e;
    n === "vertical" ? r.setLayout({
      y: i
    }, !0) : r.setLayout({
      x: i
    }, !0);
  });
}
function YFe(t, e, n, r, i, a, o) {
  var s = qFe(t, o);
  KFe(s, e, n, r, i, o), DP(s, i, n, r, o);
  for (var l = 1; a > 0; a--)
    l *= 0.99, JFe(s, l, o), DP(s, i, n, r, o), iWe(s, l, o), DP(s, i, n, r, o);
}
function qFe(t, e) {
  var n = [], r = e === "vertical" ? "y" : "x", i = PA(t, function(a) {
    return a.getLayout()[r];
  });
  return i.keys.sort(function(a, o) {
    return a - o;
  }), k(i.keys, function(a) {
    n.push(i.buckets.get(a));
  }), n;
}
function KFe(t, e, n, r, i, a) {
  var o = 1 / 0;
  k(t, function(s) {
    var l = s.length, u = 0;
    k(s, function(f) {
      u += f.getLayout().value;
    });
    var c = a === "vertical" ? (r - (l - 1) * i) / u : (n - (l - 1) * i) / u;
    c < o && (o = c);
  }), k(t, function(s) {
    k(s, function(l, u) {
      var c = l.getLayout().value * o;
      a === "vertical" ? (l.setLayout({
        x: u
      }, !0), l.setLayout({
        dx: c
      }, !0)) : (l.setLayout({
        y: u
      }, !0), l.setLayout({
        dy: c
      }, !0));
    });
  }), k(e, function(s) {
    var l = +s.getValue() * o;
    s.setLayout({
      dy: l
    }, !0);
  });
}
function DP(t, e, n, r, i) {
  var a = i === "vertical" ? "x" : "y";
  k(t, function(o) {
    o.sort(function(v, g) {
      return v.getLayout()[a] - g.getLayout()[a];
    });
    for (var s, l, u, c = 0, f = o.length, d = i === "vertical" ? "dx" : "dy", h = 0; h < f; h++)
      l = o[h], u = c - l.getLayout()[a], u > 0 && (s = l.getLayout()[a] + u, i === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0)), c = l.getLayout()[a] + l.getLayout()[d] + e;
    var p = i === "vertical" ? r : n;
    if (u = c - e - p, u > 0) {
      s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
        x: s
      }, !0) : l.setLayout({
        y: s
      }, !0), c = s;
      for (var h = f - 2; h >= 0; --h)
        l = o[h], u = l.getLayout()[a] + l.getLayout()[d] + e - c, u > 0 && (s = l.getLayout()[a] - u, i === "vertical" ? l.setLayout({
          x: s
        }, !0) : l.setLayout({
          y: s
        }, !0)), c = l.getLayout()[a];
    }
  });
}
function JFe(t, e, n) {
  k(t.slice().reverse(), function(r) {
    k(r, function(i) {
      if (i.outEdges.length) {
        var a = Jl(i.outEdges, eWe, n) / Jl(i.outEdges, kO);
        if (isNaN(a)) {
          var o = i.outEdges.length;
          a = o ? Jl(i.outEdges, tWe, n) / o : 0;
        }
        if (n === "vertical") {
          var s = i.getLayout().x + (a - fu(i, n)) * e;
          i.setLayout({
            x: s
          }, !0);
        } else {
          var l = i.getLayout().y + (a - fu(i, n)) * e;
          i.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function eWe(t, e) {
  return fu(t.node2, e) * t.getValue();
}
function tWe(t, e) {
  return fu(t.node2, e);
}
function nWe(t, e) {
  return fu(t.node1, e) * t.getValue();
}
function rWe(t, e) {
  return fu(t.node1, e);
}
function fu(t, e) {
  return e === "vertical" ? t.getLayout().x + t.getLayout().dx / 2 : t.getLayout().y + t.getLayout().dy / 2;
}
function kO(t) {
  return t.getValue();
}
function Jl(t, e, n) {
  for (var r = 0, i = t.length, a = -1; ++a < i; ) {
    var o = +e(t[a], n);
    isNaN(o) || (r += o);
  }
  return r;
}
function iWe(t, e, n) {
  k(t, function(r) {
    k(r, function(i) {
      if (i.inEdges.length) {
        var a = Jl(i.inEdges, nWe, n) / Jl(i.inEdges, kO);
        if (isNaN(a)) {
          var o = i.inEdges.length;
          a = o ? Jl(i.inEdges, rWe, n) / o : 0;
        }
        if (n === "vertical") {
          var s = i.getLayout().x + (a - fu(i, n)) * e;
          i.setLayout({
            x: s
          }, !0);
        } else {
          var l = i.getLayout().y + (a - fu(i, n)) * e;
          i.setLayout({
            y: l
          }, !0);
        }
      }
    });
  });
}
function aWe(t, e) {
  var n = e === "vertical" ? "x" : "y";
  k(t, function(r) {
    r.outEdges.sort(function(i, a) {
      return i.node2.getLayout()[n] - a.node2.getLayout()[n];
    }), r.inEdges.sort(function(i, a) {
      return i.node1.getLayout()[n] - a.node1.getLayout()[n];
    });
  }), k(t, function(r) {
    var i = 0, a = 0;
    k(r.outEdges, function(o) {
      o.setLayout({
        sy: i
      }, !0), i += o.getLayout().dy;
    }), k(r.inEdges, function(o) {
      o.setLayout({
        ty: a
      }, !0), a += o.getLayout().dy;
    });
  });
}
function oWe(t) {
  t.eachSeriesByType("sankey", function(e) {
    var n = e.getGraph(), r = n.nodes, i = n.edges;
    if (r.length) {
      var a = 1 / 0, o = -1 / 0;
      k(r, function(s) {
        var l = s.getLayout().value;
        l < a && (a = l), l > o && (o = l);
      }), k(r, function(s) {
        var l = new qn({
          type: "color",
          mappingMethod: "linear",
          dataExtent: [a, o],
          visual: e.get("color")
        }), u = l.mapValueToVisual(s.getLayout().value), c = s.getModel().get(["itemStyle", "color"]);
        c != null ? (s.setVisual("color", c), s.setVisual("style", {
          fill: c
        })) : (s.setVisual("color", u), s.setVisual("style", {
          fill: u
        }));
      });
    }
    i.length && k(i, function(s) {
      var l = s.getModel().get("lineStyle");
      s.setVisual("style", l);
    });
  });
}
function sWe(t) {
  t.registerChartView(zFe), t.registerSeriesModel(FFe), t.registerLayout(WFe), t.registerVisual(oWe), t.registerAction({
    type: "dragNode",
    event: "dragnode",
    // here can only use 'update' now, other value is not support in echarts.
    update: "update"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "sankey",
      query: e
    }, function(r) {
      r.setNodePosition(e.dataIndex, [e.localX, e.localY]);
    });
  });
}
var rre = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.getInitialData = function(e, n) {
      var r, i = n.getComponent("xAxis", this.get("xAxisIndex")), a = n.getComponent("yAxis", this.get("yAxisIndex")), o = i.get("type"), s = a.get("type"), l;
      o === "category" ? (e.layout = "horizontal", r = i.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", r = a.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
      var u = ["x", "y"], c = e.layout === "horizontal" ? 0 : 1, f = this._baseAxisDim = u[c], d = u[1 - c], h = [i, a], p = h[c].get("type"), v = h[1 - c].get("type"), g = e.data;
      if (g && l) {
        var m = [];
        k(g, function(_, O) {
          var S;
          ue(_) ? (S = _.slice(), _.unshift(O)) : ue(_.value) ? (S = le({}, _), S.value = S.value.slice(), _.value.unshift(O)) : S = _, m.push(S);
        }), e.data = m;
      }
      var y = this.defaultValueDimensions, b = [{
        name: f,
        type: wO(p),
        ordinalMeta: r,
        otherDims: {
          tooltip: !1,
          itemName: 0
        },
        dimsDef: ["base"]
      }, {
        name: d,
        type: wO(v),
        dimsDef: y.slice()
      }];
      return Pp(this, {
        coordDimensions: b,
        dimensionsCount: y.length + 1,
        encodeDefaulter: Ue(MJ, b, this)
      });
    }, t.prototype.getBaseAxis = function() {
      var e = this._baseAxisDim;
      return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
    }, t;
  }()
), ire = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.defaultValueDimensions = [{
        name: "min",
        defaultTooltip: !0
      }, {
        name: "Q1",
        defaultTooltip: !0
      }, {
        name: "median",
        defaultTooltip: !0
      }, {
        name: "Q3",
        defaultTooltip: !0
      }, {
        name: "max",
        defaultTooltip: !0
      }], n.visualDrawType = "stroke", n;
    }
    return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      layout: null,
      boxWidth: [7, 50],
      itemStyle: {
        color: "#fff",
        borderWidth: 1
      },
      emphasis: {
        scale: !0,
        itemStyle: {
          borderWidth: 2,
          shadowBlur: 5,
          shadowOffsetX: 1,
          shadowOffsetY: 1,
          shadowColor: "rgba(0,0,0,0.2)"
        }
      },
      animationDuration: 800
    }, e;
  }(Ht)
);
xn(ire, rre, !0);
var lWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this.group, s = this._data;
      this._data || o.removeAll();
      var l = n.get("layout") === "horizontal" ? 1 : 0;
      a.diff(s).add(function(u) {
        if (a.hasValue(u)) {
          var c = a.getItemLayout(u), f = hW(c, a, u, l, !0);
          a.setItemGraphicEl(u, f), o.add(f);
        }
      }).update(function(u, c) {
        var f = s.getItemGraphicEl(c);
        if (!a.hasValue(u)) {
          o.remove(f);
          return;
        }
        var d = a.getItemLayout(u);
        f ? (so(f), are(d, f, a, u)) : f = hW(d, a, u, l), o.add(f), a.setItemGraphicEl(u, f);
      }).remove(function(u) {
        var c = s.getItemGraphicEl(u);
        c && o.remove(c);
      }).execute(), this._data = a;
    }, e.prototype.remove = function(n) {
      var r = this.group, i = this._data;
      this._data = null, i && i.eachItemGraphicEl(function(a) {
        a && r.remove(a);
      });
    }, e.type = "boxplot", e;
  }(zt)
), uWe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), cWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "boxplotBoxPath", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new uWe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points, a = 0;
      for (n.moveTo(i[a][0], i[a][1]), a++; a < 4; a++)
        n.lineTo(i[a][0], i[a][1]);
      for (n.closePath(); a < i.length; a++)
        n.moveTo(i[a][0], i[a][1]), a++, n.lineTo(i[a][0], i[a][1]);
    }, e;
  }(ot)
);
function hW(t, e, n, r, i) {
  var a = t.ends, o = new cWe({
    shape: {
      points: i ? fWe(a, r, t) : a
    }
  });
  return are(t, o, e, n, i), o;
}
function are(t, e, n, r, i) {
  var a = n.hostModel, o = Lf[i ? "initProps" : "updateProps"];
  o(e, {
    shape: {
      points: t.ends
    }
  }, a, r), e.useStyle(n.getItemVisual(r, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
  var s = n.getItemModel(r), l = s.getModel("emphasis");
  Tr(e, s), bn(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
}
function fWe(t, e, n) {
  return ce(t, function(r) {
    return r = r.slice(), r[e] = n.initBaseline, r;
  });
}
var Lg = k;
function dWe(t) {
  var e = hWe(t);
  Lg(e, function(n) {
    var r = n.seriesModels;
    r.length && (pWe(n), Lg(r, function(i, a) {
      vWe(i, n.boxOffsetList[a], n.boxWidthList[a]);
    }));
  });
}
function hWe(t) {
  var e = [], n = [];
  return t.eachSeriesByType("boxplot", function(r) {
    var i = r.getBaseAxis(), a = et(n, i);
    a < 0 && (a = n.length, n[a] = i, e[a] = {
      axis: i,
      seriesModels: []
    }), e[a].seriesModels.push(r);
  }), e;
}
function pWe(t) {
  var e = t.axis, n = t.seriesModels, r = n.length, i = t.boxWidthList = [], a = t.boxOffsetList = [], o = [], s;
  if (e.type === "category")
    s = e.getBandWidth();
  else {
    var l = 0;
    Lg(n, function(p) {
      l = Math.max(l, p.getData().count());
    });
    var u = e.getExtent();
    s = Math.abs(u[1] - u[0]) / l;
  }
  Lg(n, function(p) {
    var v = p.get("boxWidth");
    ue(v) || (v = [v, v]), o.push([_e(v[0], s) || 0, _e(v[1], s) || 0]);
  });
  var c = s * 0.8 - 2, f = c / r * 0.3, d = (c - f * (r - 1)) / r, h = d / 2 - c / 2;
  Lg(n, function(p, v) {
    a.push(h), h += f + d, i.push(Math.min(Math.max(d, o[v][0]), o[v][1]));
  });
}
function vWe(t, e, n) {
  var r = t.coordinateSystem, i = t.getData(), a = n / 2, o = t.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = i.mapDimension(l[o]), c = i.mapDimensionsAll(l[s]);
  if (u == null || c.length < 5)
    return;
  for (var f = 0; f < i.count(); f++) {
    var d = i.get(u, f), h = b(d, c[2], f), p = b(d, c[0], f), v = b(d, c[1], f), g = b(d, c[3], f), m = b(d, c[4], f), y = [];
    _(y, v, !1), _(y, g, !0), y.push(p, v, m, g), O(y, p), O(y, m), O(y, h), i.setItemLayout(f, {
      initBaseline: h[s],
      ends: y
    });
  }
  function b(S, x, C) {
    var T = i.get(x, C), w = [];
    w[o] = S, w[s] = T;
    var P;
    return isNaN(S) || isNaN(T) ? P = [NaN, NaN] : (P = r.dataToPoint(w), P[o] += e), P;
  }
  function _(S, x, C) {
    var T = x.slice(), w = x.slice();
    T[o] += a, w[o] -= a, C ? S.push(T, w) : S.push(w, T);
  }
  function O(S, x) {
    var C = x.slice(), T = x.slice();
    C[o] -= a, T[o] += a, S.push(C, T);
  }
}
function gWe(t, e) {
  e = e || {};
  for (var n = [], r = [], i = e.boundIQR, a = i === "none" || i === 0, o = 0; o < t.length; o++) {
    var s = Vi(t[o].slice()), l = z_(s, 0.25), u = z_(s, 0.5), c = z_(s, 0.75), f = s[0], d = s[s.length - 1], h = (i ?? 1.5) * (c - l), p = a ? f : Math.max(f, l - h), v = a ? d : Math.min(d, c + h), g = e.itemNameFormatter, m = Me(g) ? g({
      value: o
    }) : Oe(g) ? g.replace("{value}", o + "") : o + "";
    n.push([m, p, l, u, c, v]);
    for (var y = 0; y < s.length; y++) {
      var b = s[y];
      if (b < p || b > v) {
        var _ = [m, b];
        r.push(_);
      }
    }
  }
  return {
    boxData: n,
    outliers: r
  };
}
var mWe = {
  type: "echarts:boxplot",
  transform: function(e) {
    var n = e.upstream;
    if (n.sourceFormat !== Br) {
      var r = "";
      process.env.NODE_ENV !== "production" && (r = ti("source data is not applicable for this boxplot transform. Expect number[][].")), Et(r);
    }
    var i = gWe(n.getRawData(), e.config);
    return [{
      dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
      data: i.boxData
    }, {
      data: i.outliers
    }];
  }
};
function yWe(t) {
  t.registerSeriesModel(ire), t.registerChartView(lWe), t.registerLayout(dWe), t.registerTransform(mWe);
}
var bWe = ["color", "borderColor"], _We = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(n), this._isLargeDraw ? this._renderLarge(n) : this._renderNormal(n);
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this._clear(), this._updateDrawMode(n);
    }, e.prototype.incrementalRender = function(n, r, i, a) {
      this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(n, r) : this._incrementalRenderNormal(n, r);
    }, e.prototype.eachRendered = function(n) {
      Tu(this._progressiveEls || this.group, n);
    }, e.prototype._updateDrawMode = function(n) {
      var r = n.pipelineContext.large;
      (this._isLargeDraw == null || r !== this._isLargeDraw) && (this._isLargeDraw = r, this._clear());
    }, e.prototype._renderNormal = function(n) {
      var r = n.getData(), i = this._data, a = this.group, o = r.getLayout("isSimpleBox"), s = n.get("clip", !0), l = n.coordinateSystem, u = l.getArea && l.getArea();
      this._data || a.removeAll(), r.diff(i).add(function(c) {
        if (r.hasValue(c)) {
          var f = r.getItemLayout(c);
          if (s && pW(u, f))
            return;
          var d = RP(f, c, !0);
          Yt(d, {
            shape: {
              points: f.ends
            }
          }, n, c), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
        }
      }).update(function(c, f) {
        var d = i.getItemGraphicEl(f);
        if (!r.hasValue(c)) {
          a.remove(d);
          return;
        }
        var h = r.getItemLayout(c);
        if (s && pW(u, h)) {
          a.remove(d);
          return;
        }
        d ? (Ct(d, {
          shape: {
            points: h.ends
          }
        }, n, c), so(d)) : d = RP(h), kP(d, r, c, o), a.add(d), r.setItemGraphicEl(c, d);
      }).remove(function(c) {
        var f = i.getItemGraphicEl(c);
        f && a.remove(f);
      }).execute(), this._data = r;
    }, e.prototype._renderLarge = function(n) {
      this._clear(), vW(n, this.group);
      var r = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
      r ? this.group.setClipPath(r) : this.group.removeClipPath();
    }, e.prototype._incrementalRenderNormal = function(n, r) {
      for (var i = r.getData(), a = i.getLayout("isSimpleBox"), o; (o = n.next()) != null; ) {
        var s = i.getItemLayout(o), l = RP(s);
        kP(l, i, o, a), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
      }
    }, e.prototype._incrementalRenderLarge = function(n, r) {
      vW(r, this.group, this._progressiveEls, !0);
    }, e.prototype.remove = function(n) {
      this._clear();
    }, e.prototype._clear = function() {
      this.group.removeAll(), this._data = null;
    }, e.type = "candlestick", e;
  }(zt)
), OWe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), SWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "normalCandlestickBox", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new OWe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.points;
      this.__simpleBox ? (n.moveTo(i[4][0], i[4][1]), n.lineTo(i[6][0], i[6][1])) : (n.moveTo(i[0][0], i[0][1]), n.lineTo(i[1][0], i[1][1]), n.lineTo(i[2][0], i[2][1]), n.lineTo(i[3][0], i[3][1]), n.closePath(), n.moveTo(i[4][0], i[4][1]), n.lineTo(i[5][0], i[5][1]), n.moveTo(i[6][0], i[6][1]), n.lineTo(i[7][0], i[7][1]));
    }, e;
  }(ot)
);
function RP(t, e, n) {
  var r = t.ends;
  return new SWe({
    shape: {
      points: n ? xWe(r, t) : r
    },
    z2: 100
  });
}
function pW(t, e) {
  for (var n = !0, r = 0; r < e.ends.length; r++)
    if (t.contain(e.ends[r][0], e.ends[r][1])) {
      n = !1;
      break;
    }
  return n;
}
function kP(t, e, n, r) {
  var i = e.getItemModel(n);
  t.useStyle(e.getItemVisual(n, "style")), t.style.strokeNoScale = !0, t.__simpleBox = r, Tr(t, i);
}
function xWe(t, e) {
  return ce(t, function(n) {
    return n = n.slice(), n[1] = e.initBaseline, n;
  });
}
var wWe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), LP = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r.type = "largeCandlestickBox", r;
    }
    return e.prototype.getDefaultShape = function() {
      return new wWe();
    }, e.prototype.buildPath = function(n, r) {
      for (var i = r.points, a = 0; a < i.length; )
        if (this.__sign === i[a++]) {
          var o = i[a++];
          n.moveTo(o, i[a++]), n.lineTo(o, i[a++]);
        } else
          a += 3;
    }, e;
  }(ot)
);
function vW(t, e, n, r) {
  var i = t.getData(), a = i.getLayout("largePoints"), o = new LP({
    shape: {
      points: a
    },
    __sign: 1,
    ignoreCoarsePointer: !0
  });
  e.add(o);
  var s = new LP({
    shape: {
      points: a
    },
    __sign: -1,
    ignoreCoarsePointer: !0
  });
  e.add(s);
  var l = new LP({
    shape: {
      points: a
    },
    __sign: 0,
    ignoreCoarsePointer: !0
  });
  e.add(l), NP(1, o, t), NP(-1, s, t), NP(0, l, t), r && (o.incremental = !0, s.incremental = !0), n && n.push(o, s);
}
function NP(t, e, n, r) {
  var i = n.get(["itemStyle", t > 0 ? "borderColor" : "borderColor0"]) || n.get(["itemStyle", t > 0 ? "color" : "color0"]);
  t === 0 && (i = n.get(["itemStyle", "borderColorDoji"]));
  var a = n.getModel("itemStyle").getItemStyle(bWe);
  e.useStyle(a), e.style.fill = null, e.style.stroke = i;
}
var ore = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.defaultValueDimensions = [{
        name: "open",
        defaultTooltip: !0
      }, {
        name: "close",
        defaultTooltip: !0
      }, {
        name: "lowest",
        defaultTooltip: !0
      }, {
        name: "highest",
        defaultTooltip: !0
      }], n;
    }
    return e.prototype.getShadowDim = function() {
      return "open";
    }, e.prototype.brushSelector = function(n, r, i) {
      var a = r.getItemLayout(n);
      return a && i.rect(a.brushRect);
    }, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
      // zlevel: 0,
      z: 2,
      coordinateSystem: "cartesian2d",
      legendHoverLink: !0,
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      layout: null,
      clip: !0,
      itemStyle: {
        color: "#eb5454",
        color0: "#47b262",
        borderColor: "#eb5454",
        borderColor0: "#47b262",
        borderColorDoji: null,
        // borderColor: '#d24040',
        // borderColor0: '#398f4f',
        borderWidth: 1
      },
      emphasis: {
        scale: !0,
        itemStyle: {
          borderWidth: 2
        }
      },
      barMaxWidth: null,
      barMinWidth: null,
      barWidth: null,
      large: !0,
      largeThreshold: 600,
      progressive: 3e3,
      progressiveThreshold: 1e4,
      progressiveChunkMode: "mod",
      animationEasing: "linear",
      animationDuration: 300
    }, e;
  }(Ht)
);
xn(ore, rre, !0);
function CWe(t) {
  !t || !ue(t.series) || k(t.series, function(e) {
    Ie(e) && e.type === "k" && (e.type = "candlestick");
  });
}
var TWe = ["itemStyle", "borderColor"], PWe = ["itemStyle", "borderColor0"], $We = ["itemStyle", "borderColorDoji"], AWe = ["itemStyle", "color"], EWe = ["itemStyle", "color0"], MWe = {
  seriesType: "candlestick",
  plan: Op(),
  // For legend.
  performRawSeries: !0,
  reset: function(t, e) {
    function n(a, o) {
      return o.get(a > 0 ? AWe : EWe);
    }
    function r(a, o) {
      return o.get(a === 0 ? $We : a > 0 ? TWe : PWe);
    }
    if (!e.isSeriesFiltered(t)) {
      var i = t.pipelineContext.large;
      return !i && {
        progress: function(a, o) {
          for (var s; (s = a.next()) != null; ) {
            var l = o.getItemModel(s), u = o.getItemLayout(s).sign, c = l.getItemStyle();
            c.fill = n(u, l), c.stroke = r(u, l) || c.fill;
            var f = o.ensureUniqueItemVisual(s, "style");
            le(f, c);
          }
        }
      };
    }
  }
}, IWe = {
  seriesType: "candlestick",
  plan: Op(),
  reset: function(t) {
    var e = t.coordinateSystem, n = t.getData(), r = DWe(t, n), i = 0, a = 1, o = ["x", "y"], s = n.getDimensionIndex(n.mapDimension(o[i])), l = ce(n.mapDimensionsAll(o[a]), n.getDimensionIndex, n), u = l[0], c = l[1], f = l[2], d = l[3];
    if (n.setLayout({
      candleWidth: r,
      // The value is experimented visually.
      isSimpleBox: r <= 1.3
    }), s < 0 || l.length < 4)
      return;
    return {
      progress: t.pipelineContext.large ? p : h
    };
    function h(v, g) {
      for (var m, y = g.getStore(); (m = v.next()) != null; ) {
        var b = y.get(s, m), _ = y.get(u, m), O = y.get(c, m), S = y.get(f, m), x = y.get(d, m), C = Math.min(_, O), T = Math.max(_, O), w = N(C, b), P = N(T, b), $ = N(S, b), A = N(x, b), D = [];
        V(D, P, 0), V(D, w, 1), D.push(W(A), W(P), W($), W(w));
        var E = g.getItemModel(m), R = !!E.get(["itemStyle", "borderColorDoji"]);
        g.setItemLayout(m, {
          sign: gW(y, m, _, O, c, R),
          initBaseline: _ > O ? P[a] : w[a],
          ends: D,
          brushRect: z(S, x, b)
        });
      }
      function N(F, Q) {
        var Z = [];
        return Z[i] = Q, Z[a] = F, isNaN(Q) || isNaN(F) ? [NaN, NaN] : e.dataToPoint(Z);
      }
      function V(F, Q, Z) {
        var ne = Q.slice(), ee = Q.slice();
        ne[i] = W_(ne[i] + r / 2, 1, !1), ee[i] = W_(ee[i] - r / 2, 1, !0), Z ? F.push(ne, ee) : F.push(ee, ne);
      }
      function z(F, Q, Z) {
        var ne = N(F, Z), ee = N(Q, Z);
        return ne[i] -= r / 2, ee[i] -= r / 2, {
          x: ne[0],
          y: ne[1],
          width: r,
          height: ee[1] - ne[1]
        };
      }
      function W(F) {
        return F[i] = W_(F[i], 1), F;
      }
    }
    function p(v, g) {
      for (var m = Fo(v.count * 4), y = 0, b, _ = [], O = [], S, x = g.getStore(), C = !!t.get(["itemStyle", "borderColorDoji"]); (S = v.next()) != null; ) {
        var T = x.get(s, S), w = x.get(u, S), P = x.get(c, S), $ = x.get(f, S), A = x.get(d, S);
        if (isNaN(T) || isNaN($) || isNaN(A)) {
          m[y++] = NaN, y += 3;
          continue;
        }
        m[y++] = gW(x, S, w, P, c, C), _[i] = T, _[a] = $, b = e.dataToPoint(_, null, O), m[y++] = b ? b[0] : NaN, m[y++] = b ? b[1] : NaN, _[a] = A, b = e.dataToPoint(_, null, O), m[y++] = b ? b[1] : NaN;
      }
      g.setLayout("largePoints", m);
    }
  }
};
function gW(t, e, n, r, i, a) {
  var o;
  return n > r ? o = -1 : n < r ? o = 1 : o = a ? 0 : e > 0 ? t.get(i, e - 1) <= r ? 1 : -1 : 1, o;
}
function DWe(t, e) {
  var n = t.getBaseAxis(), r, i = n.type === "category" ? n.getBandWidth() : (r = n.getExtent(), Math.abs(r[1] - r[0]) / e.count()), a = _e(We(t.get("barMaxWidth"), i), i), o = _e(We(t.get("barMinWidth"), 1), i), s = t.get("barWidth");
  return s != null ? _e(s, i) : Math.max(Math.min(i / 2, a), o);
}
function RWe(t) {
  t.registerChartView(_We), t.registerSeriesModel(ore), t.registerPreprocessor(CWe), t.registerVisual(MWe), t.registerLayout(IWe);
}
function mW(t, e) {
  var n = e.rippleEffectColor || e.color;
  t.eachChild(function(r) {
    r.attr({
      z: e.z,
      zlevel: e.zlevel,
      style: {
        stroke: e.brushType === "stroke" ? n : null,
        fill: e.brushType === "fill" ? n : null
      }
    });
  });
}
var kWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r) {
      var i = t.call(this) || this, a = new j0(n, r), o = new Ve();
      return i.add(a), i.add(o), i.updateData(n, r), i;
    }
    return e.prototype.stopEffectAnimation = function() {
      this.childAt(1).removeAll();
    }, e.prototype.startEffectAnimation = function(n) {
      for (var r = n.symbolType, i = n.color, a = n.rippleNumber, o = this.childAt(1), s = 0; s < a; s++) {
        var l = $n(r, -1, -1, 2, 2, i);
        l.attr({
          style: {
            strokeNoScale: !0
          },
          z2: 99,
          silent: !0,
          scaleX: 0.5,
          scaleY: 0.5
        });
        var u = -s / a * n.period + n.effectOffset;
        l.animate("", !0).when(n.period, {
          scaleX: n.rippleScale / 2,
          scaleY: n.rippleScale / 2
        }).delay(u).start(), l.animateStyle(!0).when(n.period, {
          opacity: 0
        }).delay(u).start(), o.add(l);
      }
      mW(o, n);
    }, e.prototype.updateEffectAnimation = function(n) {
      for (var r = this._effectCfg, i = this.childAt(1), a = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < a.length; o++) {
        var s = a[o];
        if (r[s] !== n[s]) {
          this.stopEffectAnimation(), this.startEffectAnimation(n);
          return;
        }
      }
      mW(i, n);
    }, e.prototype.highlight = function() {
      js(this);
    }, e.prototype.downplay = function() {
      Zs(this);
    }, e.prototype.getSymbolType = function() {
      var n = this.childAt(0);
      return n && n.getSymbolType();
    }, e.prototype.updateData = function(n, r) {
      var i = this, a = n.hostModel;
      this.childAt(0).updateData(n, r);
      var o = this.childAt(1), s = n.getItemModel(r), l = n.getItemVisual(r, "symbol"), u = xp(n.getItemVisual(r, "symbolSize")), c = n.getItemVisual(r, "style"), f = c && c.fill, d = s.getModel("emphasis");
      o.setScale(u), o.traverse(function(g) {
        g.setStyle("fill", f);
      });
      var h = Vf(n.getItemVisual(r, "symbolOffset"), u);
      h && (o.x = h[0], o.y = h[1]);
      var p = n.getItemVisual(r, "symbolRotate");
      o.rotation = (p || 0) * Math.PI / 180 || 0;
      var v = {};
      v.showEffectOn = a.get("showEffectOn"), v.rippleScale = s.get(["rippleEffect", "scale"]), v.brushType = s.get(["rippleEffect", "brushType"]), v.period = s.get(["rippleEffect", "period"]) * 1e3, v.effectOffset = r / n.count(), v.z = a.getShallow("z") || 0, v.zlevel = a.getShallow("zlevel") || 0, v.symbolType = l, v.color = f, v.rippleEffectColor = s.get(["rippleEffect", "color"]), v.rippleNumber = s.get(["rippleEffect", "number"]), v.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(v) : this.startEffectAnimation(v), this._effectCfg = v) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
        g === "emphasis" ? v.showEffectOn !== "render" && i.startEffectAnimation(v) : g === "normal" && v.showEffectOn !== "render" && i.stopEffectAnimation();
      }), this._effectCfg = v, bn(this, d.get("focus"), d.get("blurScope"), d.get("disabled"));
    }, e.prototype.fadeOut = function(n) {
      n && n();
    }, e;
  }(Ve)
), LWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this._symbolDraw = new Z0(kWe);
    }, e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._symbolDraw;
      o.updateData(a, {
        clipShape: this._getClipShape(n)
      }), this.group.add(o.group);
    }, e.prototype._getClipShape = function(n) {
      var r = n.coordinateSystem, i = r && r.getArea && r.getArea();
      return n.get("clip", !0) ? i : null;
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData();
      this.group.dirty();
      var o = X0("").reset(n, r, i);
      o.progress && o.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._symbolDraw.updateLayout();
    }, e.prototype._updateGroupTransform = function(n) {
      var r = n.coordinateSystem;
      r && r.getRoamTransform && (this.group.transform = Iq(r.getRoamTransform()), this.group.decomposeTransform());
    }, e.prototype.remove = function(n, r) {
      this._symbolDraw && this._symbolDraw.remove(!0);
    }, e.type = "effectScatter", e;
  }(zt)
), NWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return us(null, this, {
        useEncodeDefaulter: !0
      });
    }, e.prototype.brushSelector = function(n, r, i) {
      return i.point(r.getItemLayout(n));
    }, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      effectType: "ripple",
      progressive: 0,
      // When to show the effect, option: 'render'|'emphasis'
      showEffectOn: "render",
      clip: !0,
      // Ripple effect config
      rippleEffect: {
        period: 4,
        // Scale of ripple
        scale: 2.5,
        // Brush type can be fill or stroke
        brushType: "fill",
        // Ripple number
        number: 3
      },
      universalTransition: {
        divideShape: "clone"
      },
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Polar coordinate system
      // polarIndex: 0,
      // Geo coordinate system
      // geoIndex: 0,
      // symbol: null,        // 图形类型
      symbolSize: 10
      // 图形大小，半宽（半径）参数，当图形为方向或菱形则总宽度为symbolSize * 2
      // symbolRotate: null,  // 图形旋转控制
      // itemStyle: {
      //     opacity: 1
      // }
    }, e;
  }(Ht)
);
function BWe(t) {
  t.registerChartView(LWe), t.registerSeriesModel(NWe), t.registerLayout(X0("effectScatter"));
}
var sre = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a.add(a.createLine(n, r, i)), a._updateEffectSymbol(n, r), a;
    }
    return e.prototype.createLine = function(n, r, i) {
      return new qk(n, r, i);
    }, e.prototype._updateEffectSymbol = function(n, r) {
      var i = n.getItemModel(r), a = i.getModel("effect"), o = a.get("symbolSize"), s = a.get("symbol");
      ue(o) || (o = [o, o]);
      var l = n.getItemVisual(r, "style"), u = a.get("color") || l && l.stroke, c = this.childAt(1);
      this._symbolType !== s && (this.remove(c), c = $n(s, -0.5, -0.5, 1, 1, u), c.z2 = 100, c.culling = !0, this.add(c)), c && (c.setStyle("shadowColor", u), c.setStyle(a.getItemStyle(["color"])), c.scaleX = o[0], c.scaleY = o[1], c.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(n, a, r));
    }, e.prototype._updateEffectAnimation = function(n, r, i) {
      var a = this.childAt(1);
      if (a) {
        var o = n.getItemLayout(i), s = r.get("period") * 1e3, l = r.get("loop"), u = r.get("roundTrip"), c = r.get("constantSpeed"), f = Tn(r.get("delay"), function(h) {
          return h / n.count() * s / 3;
        });
        if (a.ignore = !0, this._updateAnimationPoints(a, o), c > 0 && (s = this._getLineLength(a) / c * 1e3), s !== this._period || l !== this._loop || u !== this._roundTrip) {
          a.stopAnimation();
          var d = void 0;
          Me(f) ? d = f(i) : d = f, a.__t > 0 && (d = -s * a.__t), this._animateSymbol(a, s, d, l, u);
        }
        this._period = s, this._loop = l, this._roundTrip = u;
      }
    }, e.prototype._animateSymbol = function(n, r, i, a, o) {
      if (r > 0) {
        n.__t = 0;
        var s = this, l = n.animate("", a).when(o ? r * 2 : r, {
          __t: o ? 2 : 1
        }).delay(i).during(function() {
          s._updateSymbolPosition(n);
        });
        a || l.done(function() {
          s.remove(n);
        }), l.start();
      }
    }, e.prototype._getLineLength = function(n) {
      return Ts(n.__p1, n.__cp1) + Ts(n.__cp1, n.__p2);
    }, e.prototype._updateAnimationPoints = function(n, r) {
      n.__p1 = r[0], n.__p2 = r[1], n.__cp1 = r[2] || [(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2];
    }, e.prototype.updateData = function(n, r, i) {
      this.childAt(0).updateData(n, r, i), this._updateEffectSymbol(n, r);
    }, e.prototype._updateSymbolPosition = function(n) {
      var r = n.__p1, i = n.__p2, a = n.__cp1, o = n.__t < 1 ? n.__t : 2 - n.__t, s = [n.x, n.y], l = s.slice(), u = ir, c = fA;
      s[0] = u(r[0], a[0], i[0], o), s[1] = u(r[1], a[1], i[1], o);
      var f = n.__t < 1 ? c(r[0], a[0], i[0], o) : c(i[0], a[0], r[0], 1 - o), d = n.__t < 1 ? c(r[1], a[1], i[1], o) : c(i[1], a[1], r[1], 1 - o);
      n.rotation = -Math.atan2(d, f) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (n.__lastT !== void 0 && n.__lastT < n.__t ? (n.scaleY = Ts(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : n.__lastT === 1 ? n.scaleY = 2 * Ts(r, s) : n.scaleY = this._symbolScale[1]), n.__lastT = n.__t, n.ignore = !1, n.x = s[0], n.y = s[1];
    }, e.prototype.updateLayout = function(n, r) {
      this.childAt(0).updateLayout(n, r);
      var i = n.getItemModel(r).getModel("effect");
      this._updateEffectAnimation(n, i, r);
    }, e;
  }(Ve)
), lre = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i) {
      var a = t.call(this) || this;
      return a._createPolyline(n, r, i), a;
    }
    return e.prototype._createPolyline = function(n, r, i) {
      var a = n.getItemLayout(r), o = new ai({
        shape: {
          points: a
        }
      });
      this.add(o), this._updateCommonStl(n, r, i);
    }, e.prototype.updateData = function(n, r, i) {
      var a = n.hostModel, o = this.childAt(0), s = {
        shape: {
          points: n.getItemLayout(r)
        }
      };
      Ct(o, s, a, r), this._updateCommonStl(n, r, i);
    }, e.prototype._updateCommonStl = function(n, r, i) {
      var a = this.childAt(0), o = n.getItemModel(r), s = i && i.emphasisLineStyle, l = i && i.focus, u = i && i.blurScope, c = i && i.emphasisDisabled;
      if (!i || n.hasItemOption) {
        var f = o.getModel("emphasis");
        s = f.getModel("lineStyle").getLineStyle(), c = f.get("disabled"), l = f.get("focus"), u = f.get("blurScope");
      }
      a.useStyle(n.getItemVisual(r, "style")), a.style.fill = null, a.style.strokeNoScale = !0;
      var d = a.ensureState("emphasis");
      d.style = s, bn(this, l, u, c);
    }, e.prototype.updateLayout = function(n, r) {
      var i = this.childAt(0);
      i.setShape("points", n.getItemLayout(r));
    }, e;
  }(Ve)
), zWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n._lastFrame = 0, n._lastFramePercent = 0, n;
    }
    return e.prototype.createLine = function(n, r, i) {
      return new lre(n, r, i);
    }, e.prototype._updateAnimationPoints = function(n, r) {
      this._points = r;
      for (var i = [0], a = 0, o = 1; o < r.length; o++) {
        var s = r[o - 1], l = r[o];
        a += Ts(s, l), i.push(a);
      }
      if (a === 0) {
        this._length = 0;
        return;
      }
      for (var o = 0; o < i.length; o++)
        i[o] /= a;
      this._offsets = i, this._length = a;
    }, e.prototype._getLineLength = function() {
      return this._length;
    }, e.prototype._updateSymbolPosition = function(n) {
      var r = n.__t < 1 ? n.__t : 2 - n.__t, i = this._points, a = this._offsets, o = i.length;
      if (a) {
        var s = this._lastFrame, l;
        if (r < this._lastFramePercent) {
          var u = Math.min(s + 1, o - 1);
          for (l = u; l >= 0 && !(a[l] <= r); l--)
            ;
          l = Math.min(l, o - 2);
        } else {
          for (l = s; l < o && !(a[l] > r); l++)
            ;
          l = Math.min(l - 1, o - 2);
        }
        var c = (r - a[l]) / (a[l + 1] - a[l]), f = i[l], d = i[l + 1];
        n.x = f[0] * (1 - c) + c * d[0], n.y = f[1] * (1 - c) + c * d[1];
        var h = n.__t < 1 ? d[0] - f[0] : f[0] - d[0], p = n.__t < 1 ? d[1] - f[1] : f[1] - d[1];
        n.rotation = -Math.atan2(p, h) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = r, n.ignore = !1;
      }
    }, e;
  }(sre)
), VWe = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
      this.polyline = !1, this.curveness = 0, this.segs = [];
    }
    return t;
  }()
), FWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n) {
      var r = t.call(this, n) || this;
      return r._off = 0, r.hoverDataIdx = -1, r;
    }
    return e.prototype.reset = function() {
      this.notClear = !1, this._off = 0;
    }, e.prototype.getDefaultStyle = function() {
      return {
        stroke: "#000",
        fill: null
      };
    }, e.prototype.getDefaultShape = function() {
      return new VWe();
    }, e.prototype.buildPath = function(n, r) {
      var i = r.segs, a = r.curveness, o;
      if (r.polyline)
        for (o = this._off; o < i.length; ) {
          var s = i[o++];
          if (s > 0) {
            n.moveTo(i[o++], i[o++]);
            for (var l = 1; l < s; l++)
              n.lineTo(i[o++], i[o++]);
          }
        }
      else
        for (o = this._off; o < i.length; ) {
          var u = i[o++], c = i[o++], f = i[o++], d = i[o++];
          if (n.moveTo(u, c), a > 0) {
            var h = (u + f) / 2 - (c - d) * a, p = (c + d) / 2 - (f - u) * a;
            n.quadraticCurveTo(h, p, f, d);
          } else
            n.lineTo(f, d);
        }
      this.incremental && (this._off = o, this.notClear = !0);
    }, e.prototype.findDataIndex = function(n, r) {
      var i = this.shape, a = i.segs, o = i.curveness, s = this.style.lineWidth;
      if (i.polyline)
        for (var l = 0, u = 0; u < a.length; ) {
          var c = a[u++];
          if (c > 0)
            for (var f = a[u++], d = a[u++], h = 1; h < c; h++) {
              var p = a[u++], v = a[u++];
              if (wl(f, d, p, v, s, n, r))
                return l;
            }
          l++;
        }
      else
        for (var l = 0, u = 0; u < a.length; ) {
          var f = a[u++], d = a[u++], p = a[u++], v = a[u++];
          if (o > 0) {
            var g = (f + p) / 2 - (d - v) * o, m = (d + v) / 2 - (p - f) * o;
            if (xK(f, d, g, m, p, v, s, n, r))
              return l;
          } else if (wl(f, d, p, v, s, n, r))
            return l;
          l++;
        }
      return -1;
    }, e.prototype.contain = function(n, r) {
      var i = this.transformCoordToLocal(n, r), a = this.getBoundingRect();
      if (n = i[0], r = i[1], a.contain(n, r)) {
        var o = this.hoverDataIdx = this.findDataIndex(n, r);
        return o >= 0;
      }
      return this.hoverDataIdx = -1, !1;
    }, e.prototype.getBoundingRect = function() {
      var n = this._rect;
      if (!n) {
        for (var r = this.shape, i = r.segs, a = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < i.length; ) {
          var c = i[u++], f = i[u++];
          a = Math.min(c, a), s = Math.max(c, s), o = Math.min(f, o), l = Math.max(f, l);
        }
        n = this._rect = new Je(a, o, s, l);
      }
      return n;
    }, e;
  }(ot)
), WWe = (
  /** @class */
  function() {
    function t() {
      this.group = new Ve();
    }
    return t.prototype.updateData = function(e) {
      this._clear();
      var n = this._create();
      n.setShape({
        segs: e.getLayout("linesPoints")
      }), this._setCommon(n, e);
    }, t.prototype.incrementalPrepareUpdate = function(e) {
      this.group.removeAll(), this._clear();
    }, t.prototype.incrementalUpdate = function(e, n) {
      var r = this._newAdded[0], i = n.getLayout("linesPoints"), a = r && r.shape.segs;
      if (a && a.length < 2e4) {
        var o = a.length, s = new Float32Array(o + i.length);
        s.set(a), s.set(i, o), r.setShape({
          segs: s
        });
      } else {
        this._newAdded = [];
        var l = this._create();
        l.incremental = !0, l.setShape({
          segs: i
        }), this._setCommon(l, n), l.__startIndex = e.start;
      }
    }, t.prototype.remove = function() {
      this._clear();
    }, t.prototype.eachRendered = function(e) {
      this._newAdded[0] && e(this._newAdded[0]);
    }, t.prototype._create = function() {
      var e = new FWe({
        cursor: "default",
        ignoreCoarsePointer: !0
      });
      return this._newAdded.push(e), this.group.add(e), e;
    }, t.prototype._setCommon = function(e, n, r) {
      var i = n.hostModel;
      e.setShape({
        polyline: i.get("polyline"),
        curveness: i.get(["lineStyle", "curveness"])
      }), e.useStyle(i.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
      var a = n.getVisual("style");
      a && a.stroke && e.setStyle("stroke", a.stroke), e.setStyle("fill", null);
      var o = Fe(e);
      o.seriesIndex = i.seriesIndex, e.on("mousemove", function(s) {
        o.dataIndex = null;
        var l = e.hoverDataIdx;
        l > 0 && (o.dataIndex = l + e.__startIndex);
      });
    }, t.prototype._clear = function() {
      this._newAdded = [], this.group.removeAll();
    }, t;
  }()
), ure = {
  seriesType: "lines",
  plan: Op(),
  reset: function(t) {
    var e = t.coordinateSystem;
    if (!e) {
      process.env.NODE_ENV !== "production" && Cr("The lines series must have a coordinate system.");
      return;
    }
    var n = t.get("polyline"), r = t.pipelineContext.large;
    return {
      progress: function(i, a) {
        var o = [];
        if (r) {
          var s = void 0, l = i.end - i.start;
          if (n) {
            for (var u = 0, c = i.start; c < i.end; c++)
              u += t.getLineCoordsCount(c);
            s = new Float32Array(l + u * 2);
          } else
            s = new Float32Array(l * 4);
          for (var f = 0, d = [], c = i.start; c < i.end; c++) {
            var h = t.getLineCoords(c, o);
            n && (s[f++] = h);
            for (var p = 0; p < h; p++)
              d = e.dataToPoint(o[p], !1, d), s[f++] = d[0], s[f++] = d[1];
          }
          a.setLayout("linesPoints", s);
        } else
          for (var c = i.start; c < i.end; c++) {
            var v = a.getItemModel(c), h = t.getLineCoords(c, o), g = [];
            if (n)
              for (var m = 0; m < h; m++)
                g.push(e.dataToPoint(o[m]));
            else {
              g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
              var y = v.get(["lineStyle", "curveness"]);
              +y && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * y, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * y]);
            }
            a.setItemLayout(c, g);
          }
      }
    };
  }
}, QWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this._updateLineDraw(a, n), s = n.get("zlevel"), l = n.get(["effect", "trailLength"]), u = i.getZr(), c = u.painter.getType() === "svg";
      c || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !c && u.configLayer(this._lastZlevel, {
        motionBlur: !1
      }), this._showEffect(n) && l > 0 && (c ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : u.configLayer(s, {
        motionBlur: !0,
        lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
      })), o.updateData(a);
      var f = n.get("clip", !0) && U0(n.coordinateSystem, !1, n);
      f ? this.group.setClipPath(f) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      var a = n.getData(), o = this._updateLineDraw(a, n);
      o.incrementalPrepareUpdate(a), this._clearLayer(i), this._finished = !1;
    }, e.prototype.incrementalRender = function(n, r, i) {
      this._lineDraw.incrementalUpdate(n, r.getData()), this._finished = n.end === r.getData().count();
    }, e.prototype.eachRendered = function(n) {
      this._lineDraw && this._lineDraw.eachRendered(n);
    }, e.prototype.updateTransform = function(n, r, i) {
      var a = n.getData(), o = n.pipelineContext;
      if (!this._finished || o.large || o.progressiveRender)
        return {
          update: !0
        };
      var s = ure.reset(n, r, i);
      s.progress && s.progress({
        start: 0,
        end: a.count(),
        count: a.count()
      }, a), this._lineDraw.updateLayout(), this._clearLayer(i);
    }, e.prototype._updateLineDraw = function(n, r) {
      var i = this._lineDraw, a = this._showEffect(r), o = !!r.get("polyline"), s = r.pipelineContext, l = s.large;
      return process.env.NODE_ENV !== "production" && a && l && console.warn("Large lines not support effect"), (!i || a !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (i && i.remove(), i = this._lineDraw = l ? new WWe() : new Kk(o ? a ? zWe : lre : a ? sre : qk), this._hasEffet = a, this._isPolyline = o, this._isLargeDraw = l), this.group.add(i.group), i;
    }, e.prototype._showEffect = function(n) {
      return !!n.get(["effect", "show"]);
    }, e.prototype._clearLayer = function(n) {
      var r = n.getZr(), i = r.painter.getType() === "svg";
      !i && this._lastZlevel != null && r.painter.getLayer(this._lastZlevel).clear(!0);
    }, e.prototype.remove = function(n, r) {
      this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(r);
    }, e.prototype.dispose = function(n, r) {
      this.remove(n, r);
    }, e.type = "lines", e;
  }(zt)
), HWe = typeof Uint32Array > "u" ? Array : Uint32Array, GWe = typeof Float64Array > "u" ? Array : Float64Array;
function yW(t) {
  var e = t.data;
  e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), t.data = ce(e, function(n) {
    var r = [n[0].coord, n[1].coord], i = {
      coords: r
    };
    return n[0].name && (i.fromName = n[0].name), n[1].name && (i.toName = n[1].name), Dx([i, n[0], n[1]]);
  }));
}
var jWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.visualStyleAccessPath = "lineStyle", n.visualDrawType = "stroke", n;
    }
    return e.prototype.init = function(n) {
      n.data = n.data || [], yW(n);
      var r = this._processFlatCoordsArray(n.data);
      this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count)), t.prototype.init.apply(this, arguments);
    }, e.prototype.mergeOption = function(n) {
      if (yW(n), n.data) {
        var r = this._processFlatCoordsArray(n.data);
        this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset, r.flatCoords && (n.data = new Float32Array(r.count));
      }
      t.prototype.mergeOption.apply(this, arguments);
    }, e.prototype.appendData = function(n) {
      var r = this._processFlatCoordsArray(n.data);
      r.flatCoords && (this._flatCoords ? (this._flatCoords = gm(this._flatCoords, r.flatCoords), this._flatCoordsOffset = gm(this._flatCoordsOffset, r.flatCoordsOffset)) : (this._flatCoords = r.flatCoords, this._flatCoordsOffset = r.flatCoordsOffset), n.data = new Float32Array(r.count)), this.getRawData().appendData(n.data);
    }, e.prototype._getCoordsFromItemModel = function(n) {
      var r = this.getData().getItemModel(n), i = r.option instanceof Array ? r.option : r.getShallow("coords");
      if (process.env.NODE_ENV !== "production" && !(i instanceof Array && i.length > 0 && i[0] instanceof Array))
        throw new Error("Invalid coords " + JSON.stringify(i) + ". Lines must have 2d coords array in data item.");
      return i;
    }, e.prototype.getLineCoordsCount = function(n) {
      return this._flatCoordsOffset ? this._flatCoordsOffset[n * 2 + 1] : this._getCoordsFromItemModel(n).length;
    }, e.prototype.getLineCoords = function(n, r) {
      if (this._flatCoordsOffset) {
        for (var i = this._flatCoordsOffset[n * 2], a = this._flatCoordsOffset[n * 2 + 1], o = 0; o < a; o++)
          r[o] = r[o] || [], r[o][0] = this._flatCoords[i + o * 2], r[o][1] = this._flatCoords[i + o * 2 + 1];
        return a;
      } else {
        for (var s = this._getCoordsFromItemModel(n), o = 0; o < s.length; o++)
          r[o] = r[o] || [], r[o][0] = s[o][0], r[o][1] = s[o][1];
        return s.length;
      }
    }, e.prototype._processFlatCoordsArray = function(n) {
      var r = 0;
      if (this._flatCoords && (r = this._flatCoords.length), St(n[0])) {
        for (var i = n.length, a = new HWe(i), o = new GWe(i), s = 0, l = 0, u = 0, c = 0; c < i; ) {
          u++;
          var f = n[c++];
          a[l++] = s + r, a[l++] = f;
          for (var d = 0; d < f; d++) {
            var h = n[c++], p = n[c++];
            if (o[s++] = h, o[s++] = p, c > i && process.env.NODE_ENV !== "production")
              throw new Error("Invalid data format.");
          }
        }
        return {
          flatCoordsOffset: new Uint32Array(a.buffer, 0, l),
          flatCoords: o,
          count: u
        };
      }
      return {
        flatCoordsOffset: null,
        flatCoords: null,
        count: n.length
      };
    }, e.prototype.getInitialData = function(n, r) {
      if (process.env.NODE_ENV !== "production") {
        var i = zf.get(n.coordinateSystem);
        if (!i)
          throw new Error("Unknown coordinate system " + n.coordinateSystem);
      }
      var a = new Lr(["value"], this);
      return a.hasItemOption = !1, a.initData(n.data, [], function(o, s, l, u) {
        if (o instanceof Array)
          return NaN;
        a.hasItemOption = !0;
        var c = o.value;
        if (c != null)
          return c instanceof Array ? c[u] : c;
      }), a;
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = a.getItemModel(n), s = o.get("name");
      if (s)
        return s;
      var l = o.get("fromName"), u = o.get("toName"), c = [];
      return l != null && c.push(l), u != null && c.push(u), tr("nameValue", {
        name: c.join(" > ")
      });
    }, e.prototype.preventIncremental = function() {
      return !!this.get(["effect", "show"]);
    }, e.prototype.getProgressive = function() {
      var n = this.option.progressive;
      return n ?? (this.option.large ? 1e4 : this.get("progressive"));
    }, e.prototype.getProgressiveThreshold = function() {
      var n = this.option.progressiveThreshold;
      return n ?? (this.option.large ? 2e4 : this.get("progressiveThreshold"));
    }, e.prototype.getZLevelKey = function() {
      var n = this.getModel("effect"), r = n.get("trailLength");
      return this.getData().count() > this.getProgressiveThreshold() ? this.id : n.get("show") && r > 0 ? r + "" : "";
    }, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
      coordinateSystem: "geo",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      // Cartesian coordinate system
      xAxisIndex: 0,
      yAxisIndex: 0,
      symbol: ["none", "none"],
      symbolSize: [10, 10],
      // Geo coordinate system
      geoIndex: 0,
      effect: {
        show: !1,
        period: 4,
        constantSpeed: 0,
        symbol: "circle",
        symbolSize: 3,
        loop: !0,
        trailLength: 0.2
      },
      large: !1,
      // Available when large is true
      largeThreshold: 2e3,
      polyline: !1,
      clip: !0,
      label: {
        show: !1,
        position: "end"
        // distance: 5,
        // formatter: 标签文本格式器，同Tooltip.formatter，不支持异步回调
      },
      lineStyle: {
        opacity: 0.5
      }
    }, e;
  }(Ht)
);
function Mb(t) {
  return t instanceof Array || (t = [t, t]), t;
}
var ZWe = {
  seriesType: "lines",
  reset: function(t) {
    var e = Mb(t.get("symbol")), n = Mb(t.get("symbolSize")), r = t.getData();
    r.setVisual("fromSymbol", e && e[0]), r.setVisual("toSymbol", e && e[1]), r.setVisual("fromSymbolSize", n && n[0]), r.setVisual("toSymbolSize", n && n[1]);
    function i(a, o) {
      var s = a.getItemModel(o), l = Mb(s.getShallow("symbol", !0)), u = Mb(s.getShallow("symbolSize", !0));
      l[0] && a.setItemVisual(o, "fromSymbol", l[0]), l[1] && a.setItemVisual(o, "toSymbol", l[1]), u[0] && a.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && a.setItemVisual(o, "toSymbolSize", u[1]);
    }
    return {
      dataEach: r.hasItemOption ? i : null
    };
  }
};
function UWe(t) {
  t.registerChartView(QWe), t.registerSeriesModel(jWe), t.registerLayout(ure), t.registerVisual(ZWe);
}
var XWe = 256, YWe = (
  /** @class */
  function() {
    function t() {
      this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
        inRange: null,
        outOfRange: null
      };
      var e = io.createCanvas();
      this.canvas = e;
    }
    return t.prototype.update = function(e, n, r, i, a, o) {
      var s = this._getBrush(), l = this._getGradient(a, "inRange"), u = this._getGradient(a, "outOfRange"), c = this.pointSize + this.blurSize, f = this.canvas, d = f.getContext("2d"), h = e.length;
      f.width = n, f.height = r;
      for (var p = 0; p < h; ++p) {
        var v = e[p], g = v[0], m = v[1], y = v[2], b = i(y);
        d.globalAlpha = b, d.drawImage(s, g - c, m - c);
      }
      if (!f.width || !f.height)
        return f;
      for (var _ = d.getImageData(0, 0, f.width, f.height), O = _.data, S = 0, x = O.length, C = this.minOpacity, T = this.maxOpacity, w = T - C; S < x; ) {
        var b = O[S + 3] / 256, P = Math.floor(b * (XWe - 1)) * 4;
        if (b > 0) {
          var $ = o(b) ? l : u;
          b > 0 && (b = b * w + C), O[S++] = $[P], O[S++] = $[P + 1], O[S++] = $[P + 2], O[S++] = $[P + 3] * b * 256;
        } else
          S += 4;
      }
      return d.putImageData(_, 0, 0), f;
    }, t.prototype._getBrush = function() {
      var e = this._brushCanvas || (this._brushCanvas = io.createCanvas()), n = this.pointSize + this.blurSize, r = n * 2;
      e.width = r, e.height = r;
      var i = e.getContext("2d");
      return i.clearRect(0, 0, r, r), i.shadowOffsetX = r, i.shadowBlur = this.blurSize, i.shadowColor = "#000", i.beginPath(), i.arc(-n, n, this.pointSize, 0, Math.PI * 2, !0), i.closePath(), i.fill(), e;
    }, t.prototype._getGradient = function(e, n) {
      for (var r = this._gradientPixels, i = r[n] || (r[n] = new Uint8ClampedArray(256 * 4)), a = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
        e[n](s / 255, !0, a), i[o++] = a[0], i[o++] = a[1], i[o++] = a[2], i[o++] = a[3];
      return i;
    }, t;
  }()
);
function qWe(t, e, n) {
  var r = t[1] - t[0];
  e = ce(e, function(o) {
    return {
      interval: [(o.interval[0] - t[0]) / r, (o.interval[1] - t[0]) / r]
    };
  });
  var i = e.length, a = 0;
  return function(o) {
    var s;
    for (s = a; s < i; s++) {
      var l = e[s].interval;
      if (l[0] <= o && o <= l[1]) {
        a = s;
        break;
      }
    }
    if (s === i)
      for (s = a - 1; s >= 0; s--) {
        var l = e[s].interval;
        if (l[0] <= o && o <= l[1]) {
          a = s;
          break;
        }
      }
    return s >= 0 && s < i && n[s];
  };
}
function KWe(t, e) {
  var n = t[1] - t[0];
  return e = [(e[0] - t[0]) / n, (e[1] - t[0]) / n], function(r) {
    return r >= e[0] && r <= e[1];
  };
}
function bW(t) {
  var e = t.dimensions;
  return e[0] === "lng" && e[1] === "lat";
}
var JWe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a;
      if (r.eachComponent("visualMap", function(s) {
        s.eachTargetSeries(function(l) {
          l === n && (a = s);
        });
      }), process.env.NODE_ENV !== "production" && !a)
        throw new Error("Heatmap must use with visualMap");
      this._progressiveEls = null, this.group.removeAll();
      var o = n.coordinateSystem;
      o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(n, i, 0, n.getData().count()) : bW(o) && this._renderOnGeo(o, n, a, i);
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this.group.removeAll();
    }, e.prototype.incrementalRender = function(n, r, i, a) {
      var o = r.coordinateSystem;
      o && (bW(o) ? this.render(r, i, a) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(r, a, n.start, n.end, !0)));
    }, e.prototype.eachRendered = function(n) {
      Tu(this._progressiveEls || this.group, n);
    }, e.prototype._renderOnCartesianAndCalendar = function(n, r, i, a, o) {
      var s = n.coordinateSystem, l = Ff(s, "cartesian2d"), u, c, f, d;
      if (l) {
        var h = s.getAxis("x"), p = s.getAxis("y");
        if (process.env.NODE_ENV !== "production") {
          if (!(h.type === "category" && p.type === "category"))
            throw new Error("Heatmap on cartesian must have two category axes");
          if (!(h.onBand && p.onBand))
            throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
        }
        u = h.getBandWidth() + 0.5, c = p.getBandWidth() + 0.5, f = h.scale.getExtent(), d = p.scale.getExtent();
      }
      for (var v = this.group, g = n.getData(), m = n.getModel(["emphasis", "itemStyle"]).getItemStyle(), y = n.getModel(["blur", "itemStyle"]).getItemStyle(), b = n.getModel(["select", "itemStyle"]).getItemStyle(), _ = n.get(["itemStyle", "borderRadius"]), O = er(n), S = n.getModel("emphasis"), x = S.get("focus"), C = S.get("blurScope"), T = S.get("disabled"), w = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], P = i; P < a; P++) {
        var $ = void 0, A = g.getItemVisual(P, "style");
        if (l) {
          var D = g.get(w[0], P), E = g.get(w[1], P);
          if (isNaN(g.get(w[2], P)) || isNaN(D) || isNaN(E) || D < f[0] || D > f[1] || E < d[0] || E > d[1])
            continue;
          var R = s.dataToPoint([D, E]);
          $ = new mt({
            shape: {
              x: R[0] - u / 2,
              y: R[1] - c / 2,
              width: u,
              height: c
            },
            style: A
          });
        } else {
          if (isNaN(g.get(w[1], P)))
            continue;
          $ = new mt({
            z2: 1,
            shape: s.dataToRect([g.get(w[0], P)]).contentShape,
            style: A
          });
        }
        if (g.hasItemOption) {
          var N = g.getItemModel(P), V = N.getModel("emphasis");
          m = V.getModel("itemStyle").getItemStyle(), y = N.getModel(["blur", "itemStyle"]).getItemStyle(), b = N.getModel(["select", "itemStyle"]).getItemStyle(), _ = N.get(["itemStyle", "borderRadius"]), x = V.get("focus"), C = V.get("blurScope"), T = V.get("disabled"), O = er(N);
        }
        $.shape.r = _;
        var z = n.getRawValue(P), W = "-";
        z && z[2] != null && (W = z[2] + ""), Pr($, O, {
          labelFetcher: n,
          labelDataIndex: P,
          defaultOpacity: A.opacity,
          defaultText: W
        }), $.ensureState("emphasis").style = m, $.ensureState("blur").style = y, $.ensureState("select").style = b, bn($, x, C, T), $.incremental = o, o && ($.states.emphasis.hoverLayer = !0), v.add($), g.setItemGraphicEl(P, $), this._progressiveEls && this._progressiveEls.push($);
      }
    }, e.prototype._renderOnGeo = function(n, r, i, a) {
      var o = i.targetVisuals.inRange, s = i.targetVisuals.outOfRange, l = r.getData(), u = this._hmLayer || this._hmLayer || new YWe();
      u.blurSize = r.get("blurSize"), u.pointSize = r.get("pointSize"), u.minOpacity = r.get("minOpacity"), u.maxOpacity = r.get("maxOpacity");
      var c = n.getViewRect().clone(), f = n.getRoamTransform();
      c.applyTransform(f);
      var d = Math.max(c.x, 0), h = Math.max(c.y, 0), p = Math.min(c.width + c.x, a.getWidth()), v = Math.min(c.height + c.y, a.getHeight()), g = p - d, m = v - h, y = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], b = l.mapArray(y, function(x, C, T) {
        var w = n.dataToPoint([x, C]);
        return w[0] -= d, w[1] -= h, w.push(T), w;
      }), _ = i.getExtent(), O = i.type === "visualMap.continuous" ? KWe(_, i.option.range) : qWe(_, i.getPieceList(), i.option.selected);
      u.update(b, g, m, o.color.getNormalizer(), {
        inRange: o.color.getColorMapper(),
        outOfRange: s.color.getColorMapper()
      }, O);
      var S = new lr({
        style: {
          width: g,
          height: m,
          x: d,
          y: h,
          image: u.canvas
        },
        silent: !0
      });
      this.group.add(S);
    }, e.type = "heatmap", e;
  }(zt)
), e7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      return us(null, this, {
        generateCoord: "value"
      });
    }, e.prototype.preventIncremental = function() {
      var n = zf.get(this.get("coordinateSystem"));
      if (n && n.dimensions)
        return n.dimensions[0] === "lng" && n.dimensions[1] === "lat";
    }, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Geo coordinate system
      geoIndex: 0,
      blurSize: 30,
      pointSize: 20,
      maxOpacity: 1,
      minOpacity: 0,
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }, e;
  }(Ht)
);
function t7e(t) {
  t.registerChartView(JWe), t.registerSeriesModel(e7e);
}
var n7e = ["itemStyle", "borderWidth"], _W = [{
  xy: "x",
  wh: "width",
  index: 0,
  posDesc: ["left", "right"]
}, {
  xy: "y",
  wh: "height",
  index: 1,
  posDesc: ["top", "bottom"]
}], BP = new ll(), r7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group, o = n.getData(), s = this._data, l = n.coordinateSystem, u = l.getBaseAxis(), c = u.isHorizontal(), f = l.master.getRect(), d = {
        ecSize: {
          width: i.getWidth(),
          height: i.getHeight()
        },
        seriesModel: n,
        coordSys: l,
        coordSysExtent: [[f.x, f.x + f.width], [f.y, f.y + f.height]],
        isHorizontal: c,
        valueDim: _W[+c],
        categoryDim: _W[1 - +c]
      };
      o.diff(s).add(function(p) {
        if (o.hasValue(p)) {
          var v = SW(o, p), g = OW(o, p, v, d), m = xW(o, d, g);
          o.setItemGraphicEl(p, m), a.add(m), CW(m, d, g);
        }
      }).update(function(p, v) {
        var g = s.getItemGraphicEl(v);
        if (!o.hasValue(p)) {
          a.remove(g);
          return;
        }
        var m = SW(o, p), y = OW(o, p, m, d), b = vre(o, y);
        g && b !== g.__pictorialShapeStr && (a.remove(g), o.setItemGraphicEl(p, null), g = null), g ? c7e(g, d, y) : g = xW(o, d, y, !0), o.setItemGraphicEl(p, g), g.__pictorialSymbolMeta = y, a.add(g), CW(g, d, y);
      }).remove(function(p) {
        var v = s.getItemGraphicEl(p);
        v && wW(s, p, v.__pictorialSymbolMeta.animationModel, v);
      }).execute();
      var h = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
      return h ? a.setClipPath(h) : a.removeClipPath(), this._data = o, this.group;
    }, e.prototype.remove = function(n, r) {
      var i = this.group, a = this._data;
      n.get("animation") ? a && a.eachItemGraphicEl(function(o) {
        wW(a, Fe(o).dataIndex, n, o);
      }) : i.removeAll();
    }, e.type = "pictorialBar", e;
  }(zt)
);
function OW(t, e, n, r) {
  var i = t.getItemLayout(e), a = n.get("symbolRepeat"), o = n.get("symbolClip"), s = n.get("symbolPosition") || "start", l = n.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, c = n.get("symbolPatternSize") || 2, f = n.isAnimationEnabled(), d = {
    dataIndex: e,
    layout: i,
    itemModel: n,
    symbolType: t.getItemVisual(e, "symbol") || "circle",
    style: t.getItemVisual(e, "style"),
    symbolClip: o,
    symbolRepeat: a,
    symbolRepeatDirection: n.get("symbolRepeatDirection"),
    symbolPatternSize: c,
    rotation: u,
    animationModel: f ? n : null,
    hoverScale: f && n.get(["emphasis", "scale"]),
    z2: n.getShallow("z", !0) || 0
  };
  i7e(n, a, i, r, d), a7e(t, e, i, a, o, d.boundingLength, d.pxSign, c, r, d), o7e(n, d.symbolScale, u, r, d);
  var h = d.symbolSize, p = Vf(n.get("symbolOffset"), h);
  return s7e(n, h, i, a, o, p, s, d.valueLineWidth, d.boundingLength, d.repeatCutLength, r, d), d;
}
function i7e(t, e, n, r, i) {
  var a = r.valueDim, o = t.get("symbolBoundingData"), s = r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(n[a.wh] <= 0), c;
  if (ue(o)) {
    var f = [zP(s, o[0]) - l, zP(s, o[1]) - l];
    f[1] < f[0] && f.reverse(), c = f[u];
  } else o != null ? c = zP(s, o) - l : e ? c = r.coordSysExtent[a.index][u] - l : c = n[a.wh];
  i.boundingLength = c, e && (i.repeatCutLength = n[a.wh]), i.pxSign = c > 0 ? 1 : -1;
}
function zP(t, e) {
  return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)));
}
function a7e(t, e, n, r, i, a, o, s, l, u) {
  var c = l.valueDim, f = l.categoryDim, d = Math.abs(n[f.wh]), h = t.getItemVisual(e, "symbolSize"), p;
  ue(h) ? p = h.slice() : h == null ? p = ["100%", "100%"] : p = [h, h], p[f.index] = _e(p[f.index], d), p[c.index] = _e(p[c.index], r ? d : Math.abs(a)), u.symbolSize = p;
  var v = u.symbolScale = [p[0] / s, p[1] / s];
  v[c.index] *= (l.isHorizontal ? -1 : 1) * o;
}
function o7e(t, e, n, r, i) {
  var a = t.get(n7e) || 0;
  a && (BP.attr({
    scaleX: e[0],
    scaleY: e[1],
    rotation: n
  }), BP.updateTransform(), a /= BP.getLineScale(), a *= e[r.valueDim.index]), i.valueLineWidth = a || 0;
}
function s7e(t, e, n, r, i, a, o, s, l, u, c, f) {
  var d = c.categoryDim, h = c.valueDim, p = f.pxSign, v = Math.max(e[h.index] + s, 0), g = v;
  if (r) {
    var m = Math.abs(l), y = Tn(t.get("symbolMargin"), "15%") + "", b = !1;
    y.lastIndexOf("!") === y.length - 1 && (b = !0, y = y.slice(0, y.length - 1));
    var _ = _e(y, e[h.index]), O = Math.max(v + _ * 2, 0), S = b ? 0 : _ * 2, x = Fx(r), C = x ? r : TW((m + S) / O), T = m - C * v;
    _ = T / 2 / (b ? C : Math.max(C - 1, 1)), O = v + _ * 2, S = b ? 0 : _ * 2, !x && r !== "fixed" && (C = u ? TW((Math.abs(u) + S) / O) : 0), g = C * O - S, f.repeatTimes = C, f.symbolMargin = _;
  }
  var w = p * (g / 2), P = f.pathPosition = [];
  P[d.index] = n[d.wh] / 2, P[h.index] = o === "start" ? w : o === "end" ? l - w : l / 2, a && (P[0] += a[0], P[1] += a[1]);
  var $ = f.bundlePosition = [];
  $[d.index] = n[d.xy], $[h.index] = n[h.xy];
  var A = f.barRectShape = le({}, n);
  A[h.wh] = p * Math.max(Math.abs(n[h.wh]), Math.abs(P[h.index] + w)), A[d.wh] = n[d.wh];
  var D = f.clipShape = {};
  D[d.xy] = -n[d.xy], D[d.wh] = c.ecSize[d.wh], D[h.xy] = 0, D[h.wh] = n[h.wh];
}
function cre(t) {
  var e = t.symbolPatternSize, n = $n(
    // Consider texture img, make a big size.
    t.symbolType,
    -e / 2,
    -e / 2,
    e,
    e
  );
  return n.attr({
    culling: !0
  }), n.type !== "image" && n.setStyle({
    strokeNoScale: !0
  }), n;
}
function fre(t, e, n, r) {
  var i = t.__pictorialBundle, a = n.symbolSize, o = n.valueLineWidth, s = n.pathPosition, l = e.valueDim, u = n.repeatTimes || 0, c = 0, f = a[e.valueDim.index] + o + n.symbolMargin * 2;
  for (oL(t, function(v) {
    v.__pictorialAnimationIndex = c, v.__pictorialRepeatTimes = u, c < u ? ah(v, null, p(c), n, r) : ah(v, null, {
      scaleX: 0,
      scaleY: 0
    }, n, r, function() {
      i.remove(v);
    }), c++;
  }); c < u; c++) {
    var d = cre(n);
    d.__pictorialAnimationIndex = c, d.__pictorialRepeatTimes = u, i.add(d);
    var h = p(c);
    ah(d, {
      x: h.x,
      y: h.y,
      scaleX: 0,
      scaleY: 0
    }, {
      scaleX: h.scaleX,
      scaleY: h.scaleY,
      rotation: h.rotation
    }, n, r);
  }
  function p(v) {
    var g = s.slice(), m = n.pxSign, y = v;
    return (n.symbolRepeatDirection === "start" ? m > 0 : m < 0) && (y = u - 1 - v), g[l.index] = f * (y - u / 2 + 0.5) + s[l.index], {
      x: g[0],
      y: g[1],
      scaleX: n.symbolScale[0],
      scaleY: n.symbolScale[1],
      rotation: n.rotation
    };
  }
}
function dre(t, e, n, r) {
  var i = t.__pictorialBundle, a = t.__pictorialMainPath;
  a ? ah(a, null, {
    x: n.pathPosition[0],
    y: n.pathPosition[1],
    scaleX: n.symbolScale[0],
    scaleY: n.symbolScale[1],
    rotation: n.rotation
  }, n, r) : (a = t.__pictorialMainPath = cre(n), i.add(a), ah(a, {
    x: n.pathPosition[0],
    y: n.pathPosition[1],
    scaleX: 0,
    scaleY: 0,
    rotation: n.rotation
  }, {
    scaleX: n.symbolScale[0],
    scaleY: n.symbolScale[1]
  }, n, r));
}
function hre(t, e, n) {
  var r = le({}, e.barRectShape), i = t.__pictorialBarRect;
  i ? ah(i, null, {
    shape: r
  }, e, n) : (i = t.__pictorialBarRect = new mt({
    z2: 2,
    shape: r,
    silent: !0,
    style: {
      stroke: "transparent",
      fill: "transparent",
      lineWidth: 0
    }
  }), i.disableMorphing = !0, t.add(i));
}
function pre(t, e, n, r) {
  if (n.symbolClip) {
    var i = t.__pictorialClipPath, a = le({}, n.clipShape), o = e.valueDim, s = n.animationModel, l = n.dataIndex;
    if (i)
      Ct(i, {
        shape: a
      }, s, l);
    else {
      a[o.wh] = 0, i = new mt({
        shape: a
      }), t.__pictorialBundle.setClipPath(i), t.__pictorialClipPath = i;
      var u = {};
      u[o.wh] = n.clipShape[o.wh], Lf[r ? "updateProps" : "initProps"](i, {
        shape: u
      }, s, l);
    }
  }
}
function SW(t, e) {
  var n = t.getItemModel(e);
  return n.getAnimationDelayParams = l7e, n.isAnimationEnabled = u7e, n;
}
function l7e(t) {
  return {
    index: t.__pictorialAnimationIndex,
    count: t.__pictorialRepeatTimes
  };
}
function u7e() {
  return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
}
function xW(t, e, n, r) {
  var i = new Ve(), a = new Ve();
  return i.add(a), i.__pictorialBundle = a, a.x = n.bundlePosition[0], a.y = n.bundlePosition[1], n.symbolRepeat ? fre(i, e, n) : dre(i, e, n), hre(i, n, r), pre(i, e, n, r), i.__pictorialShapeStr = vre(t, n), i.__pictorialSymbolMeta = n, i;
}
function c7e(t, e, n) {
  var r = n.animationModel, i = n.dataIndex, a = t.__pictorialBundle;
  Ct(a, {
    x: n.bundlePosition[0],
    y: n.bundlePosition[1]
  }, r, i), n.symbolRepeat ? fre(t, e, n, !0) : dre(t, e, n, !0), hre(t, n, !0), pre(t, e, n, !0);
}
function wW(t, e, n, r) {
  var i = r.__pictorialBarRect;
  i && i.removeTextContent();
  var a = [];
  oL(r, function(o) {
    a.push(o);
  }), r.__pictorialMainPath && a.push(r.__pictorialMainPath), r.__pictorialClipPath && (n = null), k(a, function(o) {
    uu(o, {
      scaleX: 0,
      scaleY: 0
    }, n, e, function() {
      r.parent && r.parent.remove(r);
    });
  }), t.setItemGraphicEl(e, null);
}
function vre(t, e) {
  return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
}
function oL(t, e, n) {
  k(t.__pictorialBundle.children(), function(r) {
    r !== t.__pictorialBarRect && e.call(n, r);
  });
}
function ah(t, e, n, r, i, a) {
  e && t.attr(e), r.symbolClip && !i ? n && t.attr(n) : n && Lf[i ? "updateProps" : "initProps"](t, n, r.animationModel, r.dataIndex, a);
}
function CW(t, e, n) {
  var r = n.dataIndex, i = n.itemModel, a = i.getModel("emphasis"), o = a.getModel("itemStyle").getItemStyle(), s = i.getModel(["blur", "itemStyle"]).getItemStyle(), l = i.getModel(["select", "itemStyle"]).getItemStyle(), u = i.getShallow("cursor"), c = a.get("focus"), f = a.get("blurScope"), d = a.get("scale");
  oL(t, function(v) {
    if (v instanceof lr) {
      var g = v.style;
      v.useStyle(le({
        // TODO other properties like dx, dy ?
        image: g.image,
        x: g.x,
        y: g.y,
        width: g.width,
        height: g.height
      }, n.style));
    } else
      v.useStyle(n.style);
    var m = v.ensureState("emphasis");
    m.style = o, d && (m.scaleX = v.scaleX * 1.1, m.scaleY = v.scaleY * 1.1), v.ensureState("blur").style = s, v.ensureState("select").style = l, u && (v.cursor = u), v.z2 = n.z2;
  });
  var h = e.valueDim.posDesc[+(n.boundingLength > 0)], p = t.__pictorialBarRect;
  p.ignoreClip = !0, Pr(p, er(i), {
    labelFetcher: e.seriesModel,
    labelDataIndex: r,
    defaultText: Wh(e.seriesModel.getData(), r),
    inheritColor: n.style.fill,
    defaultOpacity: n.style.opacity,
    defaultOutsidePosition: h
  }), bn(t, c, f, a.get("disabled"));
}
function TW(t) {
  var e = Math.round(t);
  return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t);
}
var f7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.hasSymbolVisual = !0, n.defaultSymbol = "roundRect", n;
    }
    return e.prototype.getInitialData = function(n) {
      return n.stack = null, t.prototype.getInitialData.apply(this, arguments);
    }, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = Pu(Rm.defaultOption, {
      symbol: "circle",
      symbolSize: null,
      symbolRotate: null,
      symbolPosition: null,
      symbolOffset: null,
      symbolMargin: null,
      symbolRepeat: !1,
      symbolRepeatDirection: "end",
      symbolClip: !1,
      symbolBoundingData: null,
      symbolPatternSize: 400,
      barGap: "-100%",
      // Pictorial bar do not clip by default because in many cases
      // xAxis and yAxis are not displayed and it's expected not to clip
      clip: !1,
      // z can be set in data item, which is z2 actually.
      // Disable progressive
      progressive: 0,
      emphasis: {
        // By default pictorialBar do not hover scale. Hover scale is not suitable
        // for the case that both has foreground and background.
        scale: !1
      },
      select: {
        itemStyle: {
          borderColor: "#212121"
        }
      }
    }), e;
  }(Rm)
);
function d7e(t) {
  t.registerChartView(r7e), t.registerSeriesModel(f7e), t.registerLayout(t.PRIORITY.VISUAL.LAYOUT, Ue(qee, "pictorialBar")), t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, Kee("pictorialBar"));
}
var h7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._layers = [], n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = n.getData(), o = this, s = this.group, l = n.getLayerSeries(), u = a.getLayout("layoutInfo"), c = u.rect, f = u.boundaryGap;
      s.x = 0, s.y = c.y + f[0];
      function d(g) {
        return g.name;
      }
      var h = new Us(this._layersSeries || [], l, d, d), p = [];
      h.add(xe(v, this, "add")).update(xe(v, this, "update")).remove(xe(v, this, "remove")).execute();
      function v(g, m, y) {
        var b = o._layers;
        if (g === "remove") {
          s.remove(b[m]);
          return;
        }
        for (var _ = [], O = [], S, x = l[m].indices, C = 0; C < x.length; C++) {
          var T = a.getItemLayout(x[C]), w = T.x, P = T.y0, $ = T.y;
          _.push(w, P), O.push(w, P + $), S = a.getItemVisual(x[C], "style");
        }
        var A, D = a.getItemLayout(x[0]), E = n.getModel("label"), R = E.get("margin"), N = n.getModel("emphasis");
        if (g === "add") {
          var V = p[m] = new Ve();
          A = new Vte({
            shape: {
              points: _,
              stackedOnPoints: O,
              smooth: 0.4,
              stackedOnSmooth: 0.4,
              smoothConstraint: !1
            },
            z2: 0
          }), V.add(A), s.add(V), n.isAnimationEnabled() && A.setClipPath(p7e(A.getBoundingRect(), n, function() {
            A.removeClipPath();
          }));
        } else {
          var V = b[y];
          A = V.childAt(0), s.add(V), p[m] = V, Ct(A, {
            shape: {
              points: _,
              stackedOnPoints: O
            }
          }, n), so(A);
        }
        Pr(A, er(n), {
          labelDataIndex: x[C - 1],
          defaultText: a.getName(x[C - 1]),
          inheritColor: S.fill
        }, {
          normal: {
            verticalAlign: "middle"
            // align: 'right'
          }
        }), A.setTextConfig({
          position: null,
          local: !0
        });
        var z = A.getTextContent();
        z && (z.x = D.x - R, z.y = D.y0 + D.y / 2), A.useStyle(S), a.setItemGraphicEl(m, A), Tr(A, n), bn(A, N.get("focus"), N.get("blurScope"), N.get("disabled"));
      }
      this._layersSeries = l, this._layers = p;
    }, e.type = "themeRiver", e;
  }(zt)
);
function p7e(t, e, n) {
  var r = new mt({
    shape: {
      x: t.x - 10,
      y: t.y - 10,
      width: 0,
      height: t.height + 20
    }
  });
  return Yt(r, {
    shape: {
      x: t.x - 50,
      width: t.width + 100,
      height: t.height + 20
    }
  }, e, n), r;
}
var VP = 2, v7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n) {
      t.prototype.init.apply(this, arguments), this.legendVisualProvider = new q0(xe(this.getData, this), xe(this.getRawData, this));
    }, e.prototype.fixData = function(n) {
      var r = n.length, i = {}, a = PA(n, function(d) {
        return i.hasOwnProperty(d[0] + "") || (i[d[0] + ""] = -1), d[2];
      }), o = [];
      a.buckets.each(function(d, h) {
        o.push({
          name: h,
          dataList: d
        });
      });
      for (var s = o.length, l = 0; l < s; ++l) {
        for (var u = o[l].name, c = 0; c < o[l].dataList.length; ++c) {
          var f = o[l].dataList[c][0] + "";
          i[f] = l;
        }
        for (var f in i)
          i.hasOwnProperty(f) && i[f] !== l && (i[f] = l, n[r] = [f, 0, u], r++);
      }
      return n;
    }, e.prototype.getInitialData = function(n, r) {
      for (var i = this.getReferringComponents("singleAxis", Dn).models[0], a = i.get("type"), o = Nt(n.data, function(p) {
        return p[2] !== void 0;
      }), s = this.fixData(o || []), l = [], u = this.nameMap = Pe(), c = 0, f = 0; f < s.length; ++f)
        l.push(s[f][VP]), u.get(s[f][VP]) || (u.set(s[f][VP], c), c++);
      var d = wp(s, {
        coordDimensions: ["single"],
        dimensionsDefine: [{
          name: "time",
          type: wO(a)
        }, {
          name: "value",
          type: "float"
        }, {
          name: "name",
          type: "ordinal"
        }],
        encodeDefine: {
          single: 0,
          value: 1,
          itemName: 2
        }
      }).dimensions, h = new Lr(d, this);
      return h.initData(s), h;
    }, e.prototype.getLayerSeries = function() {
      for (var n = this.getData(), r = n.count(), i = [], a = 0; a < r; ++a)
        i[a] = a;
      var o = n.mapDimension("single"), s = PA(i, function(u) {
        return n.get("name", u);
      }), l = [];
      return s.buckets.each(function(u, c) {
        u.sort(function(f, d) {
          return n.get(o, f) - n.get(o, d);
        }), l.push({
          name: c,
          indices: u
        });
      }), l;
    }, e.prototype.getAxisTooltipData = function(n, r, i) {
      ue(n) || (n = n ? [n] : []);
      for (var a = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, c = 0; c < l; ++c) {
        for (var f = Number.MAX_VALUE, d = -1, h = o[c].indices.length, p = 0; p < h; ++p) {
          var v = a.get(n[0], o[c].indices[p]), g = Math.abs(v - r);
          g <= f && (u = v, f = g, d = o[c].indices[p]);
        }
        s.push(d);
      }
      return {
        dataIndices: s,
        nestestValue: u
      };
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = a.getName(n), s = a.get(a.mapDimension("value"), n);
      return tr("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;
  }(Ht)
);
function g7e(t, e) {
  t.eachSeriesByType("themeRiver", function(n) {
    var r = n.getData(), i = n.coordinateSystem, a = {}, o = i.getRect();
    a.rect = o;
    var s = n.get("boundaryGap"), l = i.getAxis();
    if (a.boundaryGap = s, l.orient === "horizontal") {
      s[0] = _e(s[0], o.height), s[1] = _e(s[1], o.height);
      var u = o.height - s[0] - s[1];
      PW(r, n, u);
    } else {
      s[0] = _e(s[0], o.width), s[1] = _e(s[1], o.width);
      var c = o.width - s[0] - s[1];
      PW(r, n, c);
    }
    r.setLayout("layoutInfo", a);
  });
}
function PW(t, e, n) {
  if (t.count())
    for (var r = e.coordinateSystem, i = e.getLayerSeries(), a = t.mapDimension("single"), o = t.mapDimension("value"), s = ce(i, function(g) {
      return ce(g.indices, function(m) {
        var y = r.dataToPoint(t.get(a, m));
        return y[1] = t.get(o, m), y;
      });
    }), l = m7e(s), u = l.y0, c = n / l.max, f = i.length, d = i[0].indices.length, h, p = 0; p < d; ++p) {
      h = u[p] * c, t.setItemLayout(i[0].indices[p], {
        layerIndex: 0,
        x: s[0][p][0],
        y0: h,
        y: s[0][p][1] * c
      });
      for (var v = 1; v < f; ++v)
        h += s[v - 1][p][1] * c, t.setItemLayout(i[v].indices[p], {
          layerIndex: v,
          x: s[v][p][0],
          y0: h,
          y: s[v][p][1] * c
        });
    }
}
function m7e(t) {
  for (var e = t.length, n = t[0].length, r = [], i = [], a = 0, o = 0; o < n; ++o) {
    for (var s = 0, l = 0; l < e; ++l)
      s += t[l][o][1];
    s > a && (a = s), r.push(s);
  }
  for (var u = 0; u < n; ++u)
    i[u] = (a - r[u]) / 2;
  a = 0;
  for (var c = 0; c < n; ++c) {
    var f = r[c] + i[c];
    f > a && (a = f);
  }
  return {
    y0: i,
    max: a
  };
}
function y7e(t) {
  t.registerChartView(h7e), t.registerSeriesModel(v7e), t.registerLayout(g7e), t.registerProcessor(Y0("themeRiver"));
}
var b7e = 2, _7e = 4, $W = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a) {
      var o = t.call(this) || this;
      o.z2 = b7e, o.textConfig = {
        inside: !0
      }, Fe(o).seriesIndex = r.seriesIndex;
      var s = new gt({
        z2: _7e,
        silent: n.getModel().get(["label", "silent"])
      });
      return o.setTextContent(s), o.updateData(!0, n, r, i, a), o;
    }
    return e.prototype.updateData = function(n, r, i, a, o) {
      this.node = r, r.piece = this, i = i || this._seriesModel, a = a || this._ecModel;
      var s = this;
      Fe(s).dataIndex = r.dataIndex;
      var l = r.getModel(), u = l.getModel("emphasis"), c = r.getLayout(), f = le({}, c);
      f.label = null;
      var d = r.getVisual("style");
      d.lineJoin = "bevel";
      var h = r.getVisual("decal");
      h && (d.decal = Fh(h, o));
      var p = Fc(l.getModel("itemStyle"), f, !0);
      le(f, p), k(ni, function(y) {
        var b = s.ensureState(y), _ = l.getModel([y, "itemStyle"]);
        b.style = _.getItemStyle();
        var O = Fc(_, f);
        O && (b.shape = O);
      }), n ? (s.setShape(f), s.shape.r = c.r0, Yt(s, {
        shape: {
          r: c.r
        }
      }, i, r.dataIndex)) : (Ct(s, {
        shape: f
      }, i), so(s)), s.useStyle(d), this._updateLabel(i);
      var v = l.getShallow("cursor");
      v && s.attr("cursor", v), this._seriesModel = i || this._seriesModel, this._ecModel = a || this._ecModel;
      var g = u.get("focus"), m = g === "ancestor" ? r.getAncestorsIndices() : g === "descendant" ? r.getDescendantIndices() : g;
      bn(this, m, u.get("blurScope"), u.get("disabled"));
    }, e.prototype._updateLabel = function(n) {
      var r = this, i = this.node.getModel(), a = i.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), c = Math.sin(l), f = this, d = f.getTextContent(), h = this.node.dataIndex, p = a.get("minAngle") / 180 * Math.PI, v = a.get("show") && !(p != null && Math.abs(s) < p);
      d.ignore = !v, k(xm, function(m) {
        var y = m === "normal" ? i.getModel("label") : i.getModel([m, "label"]), b = m === "normal", _ = b ? d : d.ensureState(m), O = n.getFormattedLabel(h, m);
        b && (O = O || r.node.name), _.style = Zt(y, {}, null, m !== "normal", !0), O && (_.style.text = O);
        var S = y.get("show");
        S != null && !b && (_.ignore = !S);
        var x = g(y, "position"), C = b ? f : f.states[m], T = C.style.fill;
        C.textConfig = {
          outsideFill: y.get("color") === "inherit" ? T : null,
          inside: x !== "outside"
        };
        var w, P = g(y, "distance") || 0, $ = g(y, "align"), A = g(y, "rotate"), D = Math.PI * 0.5, E = Math.PI * 1.5, R = Fi(A === "tangential" ? Math.PI / 2 - l : l), N = R > D && !Lh(R - D) && R < E;
        x === "outside" ? (w = o.r + P, $ = N ? "right" : "left") : !$ || $ === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? w = 0 : w = (o.r + o.r0) / 2, $ = "center") : $ === "left" ? (w = o.r0 + P, $ = N ? "right" : "left") : $ === "right" && (w = o.r - P, $ = N ? "left" : "right"), _.style.align = $, _.style.verticalAlign = g(y, "verticalAlign") || "middle", _.x = w * u + o.cx, _.y = w * c + o.cy;
        var V = 0;
        A === "radial" ? V = Fi(-l) + (N ? Math.PI : 0) : A === "tangential" ? V = Fi(Math.PI / 2 - l) + (N ? Math.PI : 0) : St(A) && (V = A * Math.PI / 180), _.rotation = Fi(V);
      });
      function g(m, y) {
        var b = m.get(y);
        return b ?? a.get(y);
      }
      d.dirtyStyle();
    }, e;
  }(ri)
), $E = "sunburstRootToNode", AW = "sunburstHighlight", O7e = "sunburstUnhighlight";
function S7e(t) {
  t.registerAction({
    type: $E,
    update: "updateView"
  }, function(e, n) {
    n.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, r);
    function r(i, a) {
      var o = Lm(e, [$E], i);
      if (o) {
        var s = i.getViewRoot();
        s && (e.direction = jk(s, o.node) ? "rollUp" : "drillDown"), i.resetViewRoot(o.node);
      }
    }
  }), t.registerAction({
    type: AW,
    update: "none"
  }, function(e, n, r) {
    e = le({}, e), n.eachComponent({
      mainType: "series",
      subType: "sunburst",
      query: e
    }, i);
    function i(a) {
      var o = Lm(e, [AW], a);
      o && (e.dataIndex = o.node.dataIndex);
    }
    process.env.NODE_ENV !== "production" && Cn("sunburstHighlight", "highlight"), r.dispatchAction(le(e, {
      type: "highlight"
    }));
  }), t.registerAction({
    type: O7e,
    update: "updateView"
  }, function(e, n, r) {
    e = le({}, e), process.env.NODE_ENV !== "production" && Cn("sunburstUnhighlight", "downplay"), r.dispatchAction(le(e, {
      type: "downplay"
    }));
  });
}
var x7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this;
      this.seriesModel = n, this.api = i, this.ecModel = r;
      var s = n.getData(), l = s.tree.root, u = n.getViewRoot(), c = this.group, f = n.get("renderLabelForZeroData"), d = [];
      u.eachNode(function(y) {
        d.push(y);
      });
      var h = this._oldChildren || [];
      p(d, h), m(l, u), this._initEvents(), this._oldChildren = d;
      function p(y, b) {
        if (y.length === 0 && b.length === 0)
          return;
        new Us(b, y, _, _).add(O).update(O).remove(Ue(O, null)).execute();
        function _(S) {
          return S.getId();
        }
        function O(S, x) {
          var C = S == null ? null : y[S], T = x == null ? null : b[x];
          v(C, T);
        }
      }
      function v(y, b) {
        if (!f && y && !y.getValue() && (y = null), y !== l && b !== l) {
          if (b && b.piece)
            y ? (b.piece.updateData(!1, y, n, r, i), s.setItemGraphicEl(y.dataIndex, b.piece)) : g(b);
          else if (y) {
            var _ = new $W(y, n, r, i);
            c.add(_), s.setItemGraphicEl(y.dataIndex, _);
          }
        }
      }
      function g(y) {
        y && y.piece && (c.remove(y.piece), y.piece = null);
      }
      function m(y, b) {
        b.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, y, n, r, i) : (o.virtualPiece = new $W(y, n, r, i), c.add(o.virtualPiece)), b.piece.off("click"), o.virtualPiece.on("click", function(_) {
          o._rootToNode(b.parentNode);
        })) : o.virtualPiece && (c.remove(o.virtualPiece), o.virtualPiece = null);
      }
    }, e.prototype._initEvents = function() {
      var n = this;
      this.group.off("click"), this.group.on("click", function(r) {
        var i = !1, a = n.seriesModel.getViewRoot();
        a.eachNode(function(o) {
          if (!i && o.piece && o.piece === r.target) {
            var s = o.getModel().get("nodeClick");
            if (s === "rootToNode")
              n._rootToNode(o);
            else if (s === "link") {
              var l = o.getModel(), u = l.get("link");
              if (u) {
                var c = l.get("target", !0) || "_blank";
                dO(u, c);
              }
            }
            i = !0;
          }
        });
      });
    }, e.prototype._rootToNode = function(n) {
      n !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
        type: $E,
        from: this.uid,
        seriesId: this.seriesModel.id,
        targetNode: n
      });
    }, e.prototype.containPoint = function(n, r) {
      var i = r.getData(), a = i.getItemLayout(0);
      if (a) {
        var o = n[0] - a.cx, s = n[1] - a.cy, l = Math.sqrt(o * o + s * s);
        return l <= a.r && l >= a.r0;
      }
    }, e.type = "sunburst", e;
  }(zt)
), w7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.ignoreStyleOnData = !0, n;
    }
    return e.prototype.getInitialData = function(n, r) {
      var i = {
        name: n.name,
        children: n.data
      };
      gre(i);
      var a = this._levelModels = ce(n.levels || [], function(l) {
        return new Wt(l, this, r);
      }, this), o = Gk.createTree(i, this, s);
      function s(l) {
        l.wrapMethod("getItemModel", function(u, c) {
          var f = o.getNodeByDataIndex(c), d = a[f.depth];
          return d && (u.parentModel = d), u;
        });
      }
      return o.data;
    }, e.prototype.optionUpdated = function() {
      this.resetViewRoot();
    }, e.prototype.getDataParams = function(n) {
      var r = t.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(n);
      return r.treePathInfo = bw(i, this), r;
    }, e.prototype.getLevelModel = function(n) {
      return this._levelModels && this._levelModels[n.depth];
    }, e.prototype.getViewRoot = function() {
      return this._viewRoot;
    }, e.prototype.resetViewRoot = function(n) {
      n ? this._viewRoot = n : n = this._viewRoot;
      var r = this.getRawData().tree.root;
      (!n || n !== r && !r.contains(n)) && (this._viewRoot = r);
    }, e.prototype.enableAriaDecal = function() {
      One(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;
  }(Ht)
);
function gre(t) {
  var e = 0;
  k(t.children, function(r) {
    gre(r);
    var i = r.value;
    ue(i) && (i = i[0]), e += i;
  });
  var n = t.value;
  ue(n) && (n = n[0]), (n == null || isNaN(n)) && (n = e), n < 0 && (n = 0), ue(t.value) ? t.value[0] = n : t.value = n;
}
var EW = Math.PI / 180;
function C7e(t, e, n) {
  e.eachSeriesByType(t, function(r) {
    var i = r.get("center"), a = r.get("radius");
    ue(a) || (a = [0, a]), ue(i) || (i = [i, i]);
    var o = n.getWidth(), s = n.getHeight(), l = Math.min(o, s), u = _e(i[0], o), c = _e(i[1], s), f = _e(a[0], l / 2), d = _e(a[1], l / 2), h = -r.get("startAngle") * EW, p = r.get("minAngle") * EW, v = r.getData().tree.root, g = r.getViewRoot(), m = g.depth, y = r.get("sort");
    y != null && mre(g, y);
    var b = 0;
    k(g.children, function(R) {
      !isNaN(R.getValue()) && b++;
    });
    var _ = g.getValue(), O = Math.PI / (_ || b) * 2, S = g.depth > 0, x = g.height - (S ? -1 : 1), C = (d - f) / (x || 1), T = r.get("clockwise"), w = r.get("stillShowZeroSum"), P = T ? 1 : -1, $ = function(R, N) {
      if (R) {
        var V = N;
        if (R !== v) {
          var z = R.getValue(), W = _ === 0 && w ? O : z * O;
          W < p && (W = p), V = N + P * W;
          var F = R.depth - m - (S ? -1 : 1), Q = f + C * F, Z = f + C * (F + 1), ne = r.getLevelModel(R);
          if (ne) {
            var ee = ne.get("r0", !0), oe = ne.get("r", !0), K = ne.get("radius", !0);
            K != null && (ee = K[0], oe = K[1]), ee != null && (Q = _e(ee, l / 2)), oe != null && (Z = _e(oe, l / 2));
          }
          R.setLayout({
            angle: W,
            startAngle: N,
            endAngle: V,
            clockwise: T,
            cx: u,
            cy: c,
            r0: Q,
            r: Z
          });
        }
        if (R.children && R.children.length) {
          var ie = 0;
          k(R.children, function(X) {
            ie += $(X, N + ie);
          });
        }
        return V - N;
      }
    };
    if (S) {
      var A = f, D = f + C, E = Math.PI * 2;
      v.setLayout({
        angle: E,
        startAngle: h,
        endAngle: h + E,
        clockwise: T,
        cx: u,
        cy: c,
        r0: A,
        r: D
      });
    }
    $(g, h);
  });
}
function mre(t, e) {
  var n = t.children || [];
  t.children = T7e(n, e), n.length && k(t.children, function(r) {
    mre(r, e);
  });
}
function T7e(t, e) {
  if (Me(e)) {
    var n = ce(t, function(i, a) {
      var o = i.getValue();
      return {
        params: {
          depth: i.depth,
          height: i.height,
          dataIndex: i.dataIndex,
          getValue: function() {
            return o;
          }
        },
        index: a
      };
    });
    return n.sort(function(i, a) {
      return e(i.params, a.params);
    }), ce(n, function(i) {
      return t[i.index];
    });
  } else {
    var r = e === "asc";
    return t.sort(function(i, a) {
      var o = (i.getValue() - a.getValue()) * (r ? 1 : -1);
      return o === 0 ? (i.dataIndex - a.dataIndex) * (r ? -1 : 1) : o;
    });
  }
}
function P7e(t) {
  var e = {};
  function n(r, i, a) {
    for (var o = r; o && o.depth > 1; )
      o = o.parentNode;
    var s = i.getColorFromPalette(o.name || o.dataIndex + "", e);
    return r.depth > 1 && Oe(s) && (s = J1(s, (r.depth - 1) / (a - 1) * 0.5)), s;
  }
  t.eachSeriesByType("sunburst", function(r) {
    var i = r.getData(), a = i.tree;
    a.eachNode(function(o) {
      var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
      l.fill || (l.fill = n(o, r, a.root.height));
      var u = i.ensureUniqueItemVisual(o.dataIndex, "style");
      le(u, l);
    });
  });
}
function $7e(t) {
  t.registerChartView(x7e), t.registerSeriesModel(w7e), t.registerLayout(Ue(C7e, "sunburst")), t.registerProcessor(Ue(Y0, "sunburst")), t.registerVisual(P7e), S7e(t);
}
var MW = {
  color: "fill",
  borderColor: "stroke"
}, A7e = {
  symbol: 1,
  symbolSize: 1,
  symbolKeepAspect: 1,
  legendIcon: 1,
  visualMeta: 1,
  liftZ: 1,
  decal: 1
}, Rs = bt(), E7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
    }, e.prototype.getInitialData = function(n, r) {
      return us(null, this);
    }, e.prototype.getDataParams = function(n, r, i) {
      var a = t.prototype.getDataParams.call(this, n, r);
      return i && (a.info = Rs(i).info), a;
    }, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
      coordinateSystem: "cartesian2d",
      // zlevel: 0,
      z: 2,
      legendHoverLink: !0,
      // Custom series will not clip by default.
      // Some case will use custom series to draw label
      // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight
      clip: !1
      // Cartesian coordinate system
      // xAxisIndex: 0,
      // yAxisIndex: 0,
      // Polar coordinate system
      // polarIndex: 0,
      // Geo coordinate system
      // geoIndex: 0,
    }, e;
  }(Ht)
);
function M7e(t, e) {
  return e = e || [0, 0], ce(["x", "y"], function(n, r) {
    var i = this.getAxis(n), a = e[r], o = t[r] / 2;
    return i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(a - o) - i.dataToCoord(a + o));
  }, this);
}
function I7e(t) {
  var e = t.master.getRect();
  return {
    coordSys: {
      // The name exposed to user is always 'cartesian2d' but not 'grid'.
      type: "cartesian2d",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: xe(M7e, t)
    }
  };
}
function D7e(t, e) {
  return e = e || [0, 0], ce([0, 1], function(n) {
    var r = e[n], i = t[n] / 2, a = [], o = [];
    return a[n] = r - i, o[n] = r + i, a[1 - n] = o[1 - n] = e[1 - n], Math.abs(this.dataToPoint(a)[n] - this.dataToPoint(o)[n]);
  }, this);
}
function R7e(t) {
  var e = t.getBoundingRect();
  return {
    coordSys: {
      type: "geo",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      zoom: t.getZoom()
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: xe(D7e, t)
    }
  };
}
function k7e(t, e) {
  var n = this.getAxis(), r = e instanceof Array ? e[0] : e, i = (t instanceof Array ? t[0] : t) / 2;
  return n.type === "category" ? n.getBandWidth() : Math.abs(n.dataToCoord(r - i) - n.dataToCoord(r + i));
}
function L7e(t) {
  var e = t.getRect();
  return {
    coordSys: {
      type: "singleAxis",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height
    },
    api: {
      coord: function(n) {
        return t.dataToPoint(n);
      },
      size: xe(k7e, t)
    }
  };
}
function N7e(t, e) {
  return e = e || [0, 0], ce(["Radius", "Angle"], function(n, r) {
    var i = "get" + n + "Axis", a = this[i](), o = e[r], s = t[r] / 2, l = a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(o - s) - a.dataToCoord(o + s));
    return n === "Angle" && (l = l * Math.PI / 180), l;
  }, this);
}
function B7e(t) {
  var e = t.getRadiusAxis(), n = t.getAngleAxis(), r = e.getExtent();
  return r[0] > r[1] && r.reverse(), {
    coordSys: {
      type: "polar",
      cx: t.cx,
      cy: t.cy,
      r: r[1],
      r0: r[0]
    },
    api: {
      coord: function(i) {
        var a = e.dataToRadius(i[0]), o = n.dataToAngle(i[1]), s = t.coordToPoint([a, o]);
        return s.push(a, o * Math.PI / 180), s;
      },
      size: xe(N7e, t)
    }
  };
}
function z7e(t) {
  var e = t.getRect(), n = t.getRangeInfo();
  return {
    coordSys: {
      type: "calendar",
      x: e.x,
      y: e.y,
      width: e.width,
      height: e.height,
      cellWidth: t.getCellWidth(),
      cellHeight: t.getCellHeight(),
      rangeInfo: {
        start: n.start,
        end: n.end,
        weeks: n.weeks,
        dayCount: n.allDay
      }
    },
    api: {
      coord: function(r, i) {
        return t.dataToPoint(r, i);
      }
    }
  };
}
var IW = {};
function yre(t, e, n, r) {
  return t && (t.legacy || t.legacy !== !1 && !n && !r && e !== "tspan" && (e === "text" || Ce(t, "text")));
}
function bre(t, e, n) {
  var r = t, i, a, o;
  if (e === "text")
    o = r;
  else {
    o = {}, Ce(r, "text") && (o.text = r.text), Ce(r, "rich") && (o.rich = r.rich), Ce(r, "textFill") && (o.fill = r.textFill), Ce(r, "textStroke") && (o.stroke = r.textStroke), Ce(r, "fontFamily") && (o.fontFamily = r.fontFamily), Ce(r, "fontSize") && (o.fontSize = r.fontSize), Ce(r, "fontStyle") && (o.fontStyle = r.fontStyle), Ce(r, "fontWeight") && (o.fontWeight = r.fontWeight), a = {
      type: "text",
      style: o,
      // ec4 does not support rectText trigger.
      // And when text position is different in normal and emphasis
      // => hover text trigger emphasis;
      // => text position changed, leave mouse pointer immediately;
      // That might cause incorrect state.
      silent: !0
    }, i = {};
    var s = Ce(r, "textPosition");
    n ? i.position = s ? r.textPosition : "inside" : s && (i.position = r.textPosition), Ce(r, "textPosition") && (i.position = r.textPosition), Ce(r, "textOffset") && (i.offset = r.textOffset), Ce(r, "textRotation") && (i.rotation = r.textRotation), Ce(r, "textDistance") && (i.distance = r.textDistance);
  }
  return DW(o, t), k(o.rich, function(l) {
    DW(l, l);
  }), {
    textConfig: i,
    textContent: a
  };
}
function DW(t, e) {
  e && (e.font = e.textFont || e.font, Ce(e, "textStrokeWidth") && (t.lineWidth = e.textStrokeWidth), Ce(e, "textAlign") && (t.align = e.textAlign), Ce(e, "textVerticalAlign") && (t.verticalAlign = e.textVerticalAlign), Ce(e, "textLineHeight") && (t.lineHeight = e.textLineHeight), Ce(e, "textWidth") && (t.width = e.textWidth), Ce(e, "textHeight") && (t.height = e.textHeight), Ce(e, "textBackgroundColor") && (t.backgroundColor = e.textBackgroundColor), Ce(e, "textPadding") && (t.padding = e.textPadding), Ce(e, "textBorderColor") && (t.borderColor = e.textBorderColor), Ce(e, "textBorderWidth") && (t.borderWidth = e.textBorderWidth), Ce(e, "textBorderRadius") && (t.borderRadius = e.textBorderRadius), Ce(e, "textBoxShadowColor") && (t.shadowColor = e.textBoxShadowColor), Ce(e, "textBoxShadowBlur") && (t.shadowBlur = e.textBoxShadowBlur), Ce(e, "textBoxShadowOffsetX") && (t.shadowOffsetX = e.textBoxShadowOffsetX), Ce(e, "textBoxShadowOffsetY") && (t.shadowOffsetY = e.textBoxShadowOffsetY));
}
function RW(t, e, n) {
  var r = t;
  r.textPosition = r.textPosition || n.position || "inside", n.offset != null && (r.textOffset = n.offset), n.rotation != null && (r.textRotation = n.rotation), n.distance != null && (r.textDistance = n.distance);
  var i = r.textPosition.indexOf("inside") >= 0, a = t.fill || "#000";
  kW(r, e);
  var o = r.textFill == null;
  return i ? o && (r.textFill = n.insideFill || "#fff", !r.textStroke && n.insideStroke && (r.textStroke = n.insideStroke), !r.textStroke && (r.textStroke = a), r.textStrokeWidth == null && (r.textStrokeWidth = 2)) : (o && (r.textFill = t.fill || n.outsideFill || "#000"), !r.textStroke && n.outsideStroke && (r.textStroke = n.outsideStroke)), r.text = e.text, r.rich = e.rich, k(e.rich, function(s) {
    kW(s, s);
  }), r;
}
function kW(t, e) {
  e && (Ce(e, "fill") && (t.textFill = e.fill), Ce(e, "stroke") && (t.textStroke = e.fill), Ce(e, "lineWidth") && (t.textStrokeWidth = e.lineWidth), Ce(e, "font") && (t.font = e.font), Ce(e, "fontStyle") && (t.fontStyle = e.fontStyle), Ce(e, "fontWeight") && (t.fontWeight = e.fontWeight), Ce(e, "fontSize") && (t.fontSize = e.fontSize), Ce(e, "fontFamily") && (t.fontFamily = e.fontFamily), Ce(e, "align") && (t.textAlign = e.align), Ce(e, "verticalAlign") && (t.textVerticalAlign = e.verticalAlign), Ce(e, "lineHeight") && (t.textLineHeight = e.lineHeight), Ce(e, "width") && (t.textWidth = e.width), Ce(e, "height") && (t.textHeight = e.height), Ce(e, "backgroundColor") && (t.textBackgroundColor = e.backgroundColor), Ce(e, "padding") && (t.textPadding = e.padding), Ce(e, "borderColor") && (t.textBorderColor = e.borderColor), Ce(e, "borderWidth") && (t.textBorderWidth = e.borderWidth), Ce(e, "borderRadius") && (t.textBorderRadius = e.borderRadius), Ce(e, "shadowColor") && (t.textBoxShadowColor = e.shadowColor), Ce(e, "shadowBlur") && (t.textBoxShadowBlur = e.shadowBlur), Ce(e, "shadowOffsetX") && (t.textBoxShadowOffsetX = e.shadowOffsetX), Ce(e, "shadowOffsetY") && (t.textBoxShadowOffsetY = e.shadowOffsetY), Ce(e, "textShadowColor") && (t.textShadowColor = e.textShadowColor), Ce(e, "textShadowBlur") && (t.textShadowBlur = e.textShadowBlur), Ce(e, "textShadowOffsetX") && (t.textShadowOffsetX = e.textShadowOffsetX), Ce(e, "textShadowOffsetY") && (t.textShadowOffsetY = e.textShadowOffsetY));
}
function LW(t, e) {
  if (process.env.NODE_ENV !== "production") {
    var n = t + "^_^" + e;
    IW[n] || (console.warn('[ECharts] DEPRECATED: "' + t + '" has been deprecated. ' + e), IW[n] = !0);
  }
}
var _re = {
  position: ["x", "y"],
  scale: ["scaleX", "scaleY"],
  origin: ["originX", "originY"]
}, NW = st(_re), LO = Aa(rs, function(t, e) {
  return t[e] = 1, t;
}, {}), BW = rs.join(", "), NO = ["", "style", "shape", "extra"], Gh = bt();
function sL(t, e, n, r, i) {
  var a = t + "Animation", o = pp(t, r, i) || {}, s = Gh(e).userDuring;
  return o.duration > 0 && (o.during = s ? xe(H7e, {
    el: e,
    userDuring: s
  }) : null, o.setToFinal = !0, o.scope = t), le(o, n[a]), o;
}
function U_(t, e, n, r) {
  r = r || {};
  var i = r.dataIndex, a = r.isInit, o = r.clearStyle, s = n.isAnimationEnabled(), l = Gh(t), u = e.style;
  l.userDuring = e.during;
  var c = {}, f = {};
  if (j7e(t, e, f), VW("shape", e, f), VW("extra", e, f), !a && s && (G7e(t, e, c), zW("shape", t, e, c), zW("extra", t, e, c), Z7e(t, e, u, c)), f.style = u, V7e(t, f, o), W7e(t, e), s)
    if (a) {
      var d = {};
      k(NO, function(p) {
        var v = p ? e[p] : e;
        v && v.enterFrom && (p && (d[p] = d[p] || {}), le(p ? d[p] : d, v.enterFrom));
      });
      var h = sL("enter", t, e, n, i);
      h.duration > 0 && t.animateFrom(d, h);
    } else
      F7e(t, e, i || 0, n, c);
  Ore(t, e), u ? t.dirty() : t.markRedraw();
}
function Ore(t, e) {
  for (var n = Gh(t).leaveToProps, r = 0; r < NO.length; r++) {
    var i = NO[r], a = i ? e[i] : e;
    a && a.leaveTo && (n || (n = Gh(t).leaveToProps = {}), i && (n[i] = n[i] || {}), le(i ? n[i] : n, a.leaveTo));
  }
}
function Sw(t, e, n, r) {
  if (t) {
    var i = t.parent, a = Gh(t).leaveToProps;
    if (a) {
      var o = sL("update", t, e, n, 0);
      o.done = function() {
        i.remove(t);
      }, t.animateTo(a, o);
    } else
      i.remove(t);
  }
}
function rf(t) {
  return t === "all";
}
function V7e(t, e, n) {
  var r = e.style;
  if (!t.isGroup && r) {
    if (n) {
      t.useStyle({});
      for (var i = t.animators, a = 0; a < i.length; a++) {
        var o = i[a];
        o.targetName === "style" && o.changeTarget(t.style);
      }
    }
    t.setStyle(r);
  }
  e && (e.style = null, e && t.attr(e), e.style = r);
}
function F7e(t, e, n, r, i) {
  if (i) {
    var a = sL("update", t, e, r, n);
    a.duration > 0 && t.animateFrom(i, a);
  }
}
function W7e(t, e) {
  Ce(e, "silent") && (t.silent = e.silent), Ce(e, "ignore") && (t.ignore = e.ignore), t instanceof Ma && Ce(e, "invisible") && (t.invisible = e.invisible), t instanceof ot && Ce(e, "autoBatch") && (t.autoBatch = e.autoBatch);
}
var $o = {}, Q7e = {
  // Usually other props do not need to be changed in animation during.
  setTransform: function(t, e) {
    return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `setTransform`."), $o.el[t] = e, this;
  },
  getTransform: function(t) {
    return process.env.NODE_ENV !== "production" && ke(Ce(LO, t), "Only " + BW + " available in `getTransform`."), $o.el[t];
  },
  setShape: function(t, e) {
    process.env.NODE_ENV !== "production" && yd(t);
    var n = $o.el, r = n.shape || (n.shape = {});
    return r[t] = e, n.dirtyShape && n.dirtyShape(), this;
  },
  getShape: function(t) {
    process.env.NODE_ENV !== "production" && yd(t);
    var e = $o.el.shape;
    if (e)
      return e[t];
  },
  setStyle: function(t, e) {
    process.env.NODE_ENV !== "production" && yd(t);
    var n = $o.el, r = n.style;
    return r && (process.env.NODE_ENV !== "production" && ou(e) && dn("style." + t + " must not be assigned with NaN."), r[t] = e, n.dirtyStyle && n.dirtyStyle()), this;
  },
  getStyle: function(t) {
    process.env.NODE_ENV !== "production" && yd(t);
    var e = $o.el.style;
    if (e)
      return e[t];
  },
  setExtra: function(t, e) {
    process.env.NODE_ENV !== "production" && yd(t);
    var n = $o.el.extra || ($o.el.extra = {});
    return n[t] = e, this;
  },
  getExtra: function(t) {
    process.env.NODE_ENV !== "production" && yd(t);
    var e = $o.el.extra;
    if (e)
      return e[t];
  }
};
function yd(t) {
  if (process.env.NODE_ENV !== "production" && (t === "transition" || t === "enterFrom" || t === "leaveTo"))
    throw new Error('key must not be "' + t + '"');
}
function H7e() {
  var t = this, e = t.el;
  if (e) {
    var n = Gh(e).userDuring, r = t.userDuring;
    if (n !== r) {
      t.el = t.userDuring = null;
      return;
    }
    $o.el = e, r(Q7e);
  }
}
function zW(t, e, n, r) {
  var i = n[t];
  if (i) {
    var a = e[t], o;
    if (a) {
      var s = n.transition, l = i.transition;
      if (l)
        if (!o && (o = r[t] = {}), rf(l))
          le(o, a);
        else
          for (var u = Qt(l), c = 0; c < u.length; c++) {
            var f = u[c], d = a[f];
            o[f] = d;
          }
      else if (rf(s) || et(s, t) >= 0) {
        !o && (o = r[t] = {});
        for (var h = st(a), c = 0; c < h.length; c++) {
          var f = h[c], d = a[f];
          U7e(i[f], d) && (o[f] = d);
        }
      }
    }
  }
}
function VW(t, e, n) {
  var r = e[t];
  if (r)
    for (var i = n[t] = {}, a = st(r), o = 0; o < a.length; o++) {
      var s = a[o];
      i[s] = Tg(r[s]);
    }
}
function G7e(t, e, n) {
  for (var r = e.transition, i = rf(r) ? rs : Qt(r || []), a = 0; a < i.length; a++) {
    var o = i[a];
    if (!(o === "style" || o === "shape" || o === "extra")) {
      var s = t[o];
      process.env.NODE_ENV !== "production" && Sre(o, "el.transition"), n[o] = s;
    }
  }
}
function j7e(t, e, n) {
  for (var r = 0; r < NW.length; r++) {
    var i = NW[r], a = _re[i], o = e[i];
    o && (n[a[0]] = o[0], n[a[1]] = o[1]);
  }
  for (var r = 0; r < rs.length; r++) {
    var s = rs[r];
    e[s] != null && (n[s] = e[s]);
  }
}
function Z7e(t, e, n, r) {
  if (n) {
    var i = t.style, a;
    if (i) {
      var o = n.transition, s = e.transition;
      if (o && !rf(o)) {
        var l = Qt(o);
        !a && (a = r.style = {});
        for (var u = 0; u < l.length; u++) {
          var c = l[u], f = i[c];
          a[c] = f;
        }
      } else if (t.getAnimationStyleProps && (rf(s) || rf(o) || et(s, "style") >= 0)) {
        var d = t.getAnimationStyleProps(), h = d ? d.style : null;
        if (h) {
          !a && (a = r.style = {});
          for (var p = st(n), u = 0; u < p.length; u++) {
            var c = p[u];
            if (h[c]) {
              var f = i[c];
              a[c] = f;
            }
          }
        }
      }
    }
  }
}
function U7e(t, e) {
  return wr(t) ? t !== e : t != null && isFinite(t);
}
var Sre;
process.env.NODE_ENV !== "production" && (Sre = function(t, e) {
  Ce(LO, t) || dn("Prop `" + t + "` is not a permitted in `" + e + "`. Only `" + st(LO).join("`, `") + "` are permitted.");
});
var xre = bt(), X7e = ["percent", "easing", "shape", "style", "extra"];
function wre(t) {
  t.stopAnimation("keyframe"), t.attr(xre(t));
}
function BO(t, e, n) {
  if (!(!n.isAnimationEnabled() || !e)) {
    if (ue(e)) {
      k(e, function(s) {
        BO(t, s, n);
      });
      return;
    }
    var r = e.keyframes, i = e.duration;
    if (n && i == null) {
      var a = pp("enter", n, 0);
      i = a && a.duration;
    }
    if (!(!r || !i)) {
      var o = xre(t);
      k(NO, function(s) {
        if (!(s && !t[s])) {
          var l, u = !1;
          r.sort(function(c, f) {
            return c.percent - f.percent;
          }), k(r, function(c) {
            var f = t.animators, d = s ? c[s] : c;
            if (process.env.NODE_ENV !== "production" && c.percent >= 1 && (u = !0), !!d) {
              var h = st(d);
              if (s || (h = Nt(h, function(g) {
                return et(X7e, g) < 0;
              })), !!h.length) {
                l || (l = t.animate(s, e.loop, !0), l.scope = "keyframe");
                for (var p = 0; p < f.length; p++)
                  f[p] !== l && f[p].targetName === l.targetName && f[p].stopTracks(h);
                s && (o[s] = o[s] || {});
                var v = s ? o[s] : o;
                k(h, function(g) {
                  v[g] = ((s ? t[s] : t) || {})[g];
                }), l.whenWithKeys(i * c.percent, d, h, c.easing);
              }
            }
          }), l && (process.env.NODE_ENV !== "production" && (u || dn("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(i).start(e.easing));
        }
      });
    }
  }
}
var ks = "emphasis", Vl = "normal", lL = "blur", uL = "select", du = [Vl, ks, lL, uL], FP = {
  normal: ["itemStyle"],
  emphasis: [ks, "itemStyle"],
  blur: [lL, "itemStyle"],
  select: [uL, "itemStyle"]
}, WP = {
  normal: ["label"],
  emphasis: [ks, "label"],
  blur: [lL, "label"],
  select: [uL, "label"]
}, Y7e = ["x", "y"], q7e = "e\0\0", ia = {
  normal: {},
  emphasis: {},
  blur: {},
  select: {}
}, FW = {
  cartesian2d: I7e,
  geo: R7e,
  single: L7e,
  polar: B7e,
  calendar: z7e
};
function zO(t) {
  return t instanceof ot;
}
function AE(t) {
  return t instanceof Ma;
}
function K7e(t, e) {
  e.copyTransform(t), AE(e) && AE(t) && (e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel, e.invisible = t.invisible, e.ignore = t.ignore, zO(e) && zO(t) && e.setShape(t.shape));
}
var J7e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._progressiveEls = null;
      var o = this._data, s = n.getData(), l = this.group, u = WW(n, s, r, i);
      o || l.removeAll(), s.diff(o).add(function(f) {
        QP(i, null, f, u(f, a), n, l, s);
      }).remove(function(f) {
        var d = o.getItemGraphicEl(f);
        d && Sw(d, Rs(d).option, n);
      }).update(function(f, d) {
        var h = o.getItemGraphicEl(d);
        QP(i, h, f, u(f, a), n, l, s);
      }).execute();
      var c = n.get("clip", !0) ? U0(n.coordinateSystem, !1, n) : null;
      c ? l.setClipPath(c) : l.removeClipPath(), this._data = s;
    }, e.prototype.incrementalPrepareRender = function(n, r, i) {
      this.group.removeAll(), this._data = null;
    }, e.prototype.incrementalRender = function(n, r, i, a, o) {
      var s = r.getData(), l = WW(r, s, i, a), u = this._progressiveEls = [];
      function c(h) {
        h.isGroup || (h.incremental = !0, h.ensureState("emphasis").hoverLayer = !0);
      }
      for (var f = n.start; f < n.end; f++) {
        var d = QP(null, null, f, l(f, o), r, this.group, s);
        d && (d.traverse(c), u.push(d));
      }
    }, e.prototype.eachRendered = function(n) {
      Tu(this._progressiveEls || this.group, n);
    }, e.prototype.filterForExposedEvent = function(n, r, i, a) {
      var o = r.element;
      if (o == null || i.name === o)
        return !0;
      for (; (i = i.__hostTarget || i.parent) && i !== this.group; )
        if (i.name === o)
          return !0;
      return !1;
    }, e.type = "custom", e;
  }(zt)
);
function cL(t) {
  var e = t.type, n;
  if (e === "path") {
    var r = t.shape, i = r.width != null && r.height != null ? {
      x: r.x || 0,
      y: r.y || 0,
      width: r.width,
      height: r.height
    } : null, a = Pre(r);
    n = F0(a, null, i, r.layout || "center"), Rs(n).customPathData = a;
  } else if (e === "image")
    n = new lr({}), Rs(n).customImagePath = t.style.image;
  else if (e === "text")
    n = new gt({});
  else if (e === "group")
    n = new Ve();
  else {
    if (e === "compoundPath")
      throw new Error('"compoundPath" is not supported yet.');
    var o = Kx(e);
    if (!o) {
      var s = "";
      process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Et(s);
    }
    n = new o();
  }
  return Rs(n).customGraphicType = e, n.name = t.name, n.z2EmphasisLift = 1, n.z2SelectLift = 1, n;
}
function fL(t, e, n, r, i, a, o) {
  wre(e);
  var s = i && i.normal.cfg;
  s && e.setTextConfig(s), r && r.transition == null && (r.transition = Y7e);
  var l = r && r.style;
  if (l) {
    if (e.type === "text") {
      var u = l;
      Ce(u, "textFill") && (u.fill = u.textFill), Ce(u, "textStroke") && (u.stroke = u.textStroke);
    }
    var c = void 0, f = zO(e) ? l.decal : null;
    t && f && (f.dirty = !0, c = Fh(f, t)), l.__decalPattern = c;
  }
  if (AE(e) && l) {
    var c = l.__decalPattern;
    c && (l.decal = c);
  }
  U_(e, r, a, {
    dataIndex: n,
    isInit: o,
    clearStyle: !0
  }), BO(e, r.keyframeAnimation, a);
}
function Cre(t, e, n, r, i) {
  var a = e.isGroup ? null : e, o = i && i[t].cfg;
  if (a) {
    var s = a.ensureState(t);
    if (r === !1) {
      var l = a.getState(t);
      l && (l.style = null);
    } else
      s.style = r || null;
    o && (s.textConfig = o), bf(a);
  }
}
function eQe(t, e, n) {
  if (!t.isGroup) {
    var r = t, i = n.currentZ, a = n.currentZLevel;
    r.z = i, r.zlevel = a;
    var o = e.z2;
    o != null && (r.z2 = o || 0);
    for (var s = 0; s < du.length; s++)
      tQe(r, e, du[s]);
  }
}
function tQe(t, e, n) {
  var r = n === Vl, i = r ? e : VO(e, n), a = i ? i.z2 : null, o;
  a != null && (o = r ? t : t.ensureState(n), o.z2 = a || 0);
}
function WW(t, e, n, r) {
  var i = t.get("renderItem"), a = t.coordinateSystem, o = {};
  a && (process.env.NODE_ENV !== "production" && (ke(i, "series.render is required."), ke(a.prepareCustoms || FW[a.type], "This coordSys does not support custom series.")), o = a.prepareCustoms ? a.prepareCustoms(a) : FW[a.type](a));
  for (var s = Re({
    getWidth: r.getWidth,
    getHeight: r.getHeight,
    getZr: r.getZr,
    getDevicePixelRatio: r.getDevicePixelRatio,
    value: _,
    style: S,
    ordinalRawValue: O,
    styleEmphasis: x,
    visual: w,
    barLayout: P,
    currentSeriesIndices: $,
    font: A
  }, o.api || {}), l = {
    // The life cycle of context: current round of rendering.
    // The global life cycle is probably not necessary, because
    // user can store global status by themselves.
    context: {},
    seriesId: t.id,
    seriesName: t.name,
    seriesIndex: t.seriesIndex,
    coordSys: o.coordSys,
    dataInsideLength: e.count(),
    encode: nQe(t.getData())
  }, u, c, f = {}, d = {}, h = {}, p = {}, v = 0; v < du.length; v++) {
    var g = du[v];
    h[g] = t.getModel(FP[g]), p[g] = t.getModel(WP[g]);
  }
  function m(D) {
    return D === u ? c || (c = e.getItemModel(D)) : e.getItemModel(D);
  }
  function y(D, E) {
    return e.hasItemOption ? D === u ? f[E] || (f[E] = m(D).getModel(FP[E])) : m(D).getModel(FP[E]) : h[E];
  }
  function b(D, E) {
    return e.hasItemOption ? D === u ? d[E] || (d[E] = m(D).getModel(WP[E])) : m(D).getModel(WP[E]) : p[E];
  }
  return function(D, E) {
    return u = D, c = null, f = {}, d = {}, i && i(Re({
      dataIndexInside: D,
      dataIndex: e.getRawIndex(D),
      // Can be used for optimization when zoom or roam.
      actionType: E ? E.type : null
    }, l), s);
  };
  function _(D, E) {
    return E == null && (E = u), e.getStore().get(e.getDimensionIndex(D || 0), E);
  }
  function O(D, E) {
    E == null && (E = u), D = D || 0;
    var R = e.getDimensionInfo(D);
    if (!R) {
      var N = e.getDimensionIndex(D);
      return N >= 0 ? e.getStore().get(N, E) : void 0;
    }
    var V = e.get(R.name, E), z = R && R.ordinalMeta;
    return z ? z.categories[V] : V;
  }
  function S(D, E) {
    process.env.NODE_ENV !== "production" && LW("api.style", "Please write literal style directly instead."), E == null && (E = u);
    var R = e.getItemVisual(E, "style"), N = R && R.fill, V = R && R.opacity, z = y(E, Vl).getItemStyle();
    N != null && (z.fill = N), V != null && (z.opacity = V);
    var W = {
      inheritColor: Oe(N) ? N : "#000"
    }, F = b(E, Vl), Q = Zt(F, null, W, !1, !0);
    Q.text = F.getShallow("show") ? We(t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
    var Z = cO(F, W, !1);
    return T(D, z), z = RW(z, Q, Z), D && C(z, D), z.legacy = !0, z;
  }
  function x(D, E) {
    process.env.NODE_ENV !== "production" && LW("api.styleEmphasis", "Please write literal style directly instead."), E == null && (E = u);
    var R = y(E, ks).getItemStyle(), N = b(E, ks), V = Zt(N, null, null, !0, !0);
    V.text = N.getShallow("show") ? ji(t.getFormattedLabel(E, ks), t.getFormattedLabel(E, Vl), Wh(e, E)) : null;
    var z = cO(N, null, !0);
    return T(D, R), R = RW(R, V, z), D && C(R, D), R.legacy = !0, R;
  }
  function C(D, E) {
    for (var R in E)
      Ce(E, R) && (D[R] = E[R]);
  }
  function T(D, E) {
    D && (D.textFill && (E.textFill = D.textFill), D.textPosition && (E.textPosition = D.textPosition));
  }
  function w(D, E) {
    if (E == null && (E = u), Ce(MW, D)) {
      var R = e.getItemVisual(E, "style");
      return R ? R[MW[D]] : null;
    }
    if (Ce(A7e, D))
      return e.getItemVisual(E, D);
  }
  function P(D) {
    if (a.type === "cartesian2d") {
      var E = a.getBaseAxis();
      return MNe(Re({
        axis: E
      }, D));
    }
  }
  function $() {
    return n.getCurrentSeriesIndices();
  }
  function A(D) {
    return GR(D, n);
  }
}
function nQe(t) {
  var e = {};
  return k(t.dimensions, function(n) {
    var r = t.getDimensionInfo(n);
    if (!r.isExtraCoord) {
      var i = r.coordDim, a = e[i] = e[i] || [];
      a[r.coordDimIndex] = t.getDimensionIndex(n);
    }
  }), e;
}
function QP(t, e, n, r, i, a, o) {
  if (!r) {
    a.remove(e);
    return;
  }
  var s = dL(t, e, n, r, i, a);
  return s && o.setItemGraphicEl(n, s), s && bn(s, r.focus, r.blurScope, r.emphasisDisabled), s;
}
function dL(t, e, n, r, i, a) {
  process.env.NODE_ENV !== "production" && ke(r, "should not have an null/undefined element setting");
  var o = -1, s = e;
  e && Tre(e, r, i) && (o = et(a.childrenRef(), e), e = null);
  var l = !e, u = e;
  u ? u.clearStates() : (u = cL(r), s && K7e(s, u)), r.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), ia.normal.cfg = ia.normal.conOpt = ia.emphasis.cfg = ia.emphasis.conOpt = ia.blur.cfg = ia.blur.conOpt = ia.select.cfg = ia.select.conOpt = null, ia.isLegacy = !1, iQe(u, n, r, i, l, ia), rQe(u, n, r, i, l), fL(t, u, n, r, ia, i, l), Ce(r, "info") && (Rs(u).info = r.info);
  for (var c = 0; c < du.length; c++) {
    var f = du[c];
    if (f !== Vl) {
      var d = VO(r, f), h = hL(r, d, f);
      Cre(f, u, d, h, ia);
    }
  }
  return eQe(u, r, i), r.type === "group" && aQe(t, u, n, r, i), o >= 0 ? a.replaceAt(u, o) : a.add(u), u;
}
function Tre(t, e, n) {
  var r = Rs(t), i = e.type, a = e.shape, o = e.style;
  return (
    // Always create new if universal transition is enabled.
    // Because we do transition after render. It needs to know what old element is. Replacement will loose it.
    n.isUniversalTransitionEnabled() || i != null && i !== r.customGraphicType || i === "path" && uQe(a) && Pre(a) !== r.customPathData || i === "image" && Ce(o, "image") && o.image !== r.customImagePath
  );
}
function rQe(t, e, n, r, i) {
  var a = n.clipPath;
  if (a === !1)
    t && t.getClipPath() && t.removeClipPath();
  else if (a) {
    var o = t.getClipPath();
    o && Tre(o, a, r) && (o = null), o || (o = cL(a), process.env.NODE_ENV !== "production" && ke(zO(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), t.setClipPath(o)), fL(null, o, e, a, null, r, i);
  }
}
function iQe(t, e, n, r, i, a) {
  if (!t.isGroup) {
    QW(n, null, a), QW(n, ks, a);
    var o = a.normal.conOpt, s = a.emphasis.conOpt, l = a.blur.conOpt, u = a.select.conOpt;
    if (o != null || s != null || u != null || l != null) {
      var c = t.getTextContent();
      if (o === !1)
        c && t.removeTextContent();
      else {
        o = a.normal.conOpt = o || {
          type: "text"
        }, c ? c.clearStates() : (c = cL(o), t.setTextContent(c)), fL(null, c, e, o, null, r, i);
        for (var f = o && o.style, d = 0; d < du.length; d++) {
          var h = du[d];
          if (h !== Vl) {
            var p = a[h].conOpt;
            Cre(h, c, p, hL(o, p, h), null);
          }
        }
        f ? c.dirty() : c.markRedraw();
      }
    }
  }
}
function QW(t, e, n) {
  var r = e ? VO(t, e) : t, i = e ? hL(t, r, ks) : t.style, a = t.type, o = r ? r.textConfig : null, s = t.textContent, l = s ? e ? VO(s, e) : s : null;
  if (i && // Because emphasis style has little info to detect legacy,
  // if normal is legacy, emphasis is trade as legacy.
  (n.isLegacy || yre(i, a, !!o, !!l))) {
    n.isLegacy = !0;
    var u = bre(i, a, !e);
    !o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
  }
  if (!e && l) {
    var c = l;
    !c.type && (c.type = "text"), process.env.NODE_ENV !== "production" && ke(c.type === "text", 'textContent.type must be "text"');
  }
  var f = e ? n[e] : n.normal;
  f.cfg = o, f.conOpt = l;
}
function VO(t, e) {
  return e ? t ? t[e] : null : t;
}
function hL(t, e, n) {
  var r = e && e.style;
  return r == null && n === ks && t && (r = t.styleEmphasis), r;
}
function aQe(t, e, n, r, i) {
  var a = r.children, o = a ? a.length : 0, s = r.$mergeChildren, l = s === "byName" || r.diffChildrenByName, u = s === !1;
  if (!(!o && !l && !u)) {
    if (l) {
      sQe({
        api: t,
        oldChildren: e.children() || [],
        newChildren: a || [],
        dataIndex: n,
        seriesModel: i,
        group: e
      });
      return;
    }
    u && e.removeAll();
    for (var c = 0; c < o; c++) {
      var f = a[c], d = e.childAt(c);
      f ? (f.ignore == null && (f.ignore = !1), dL(t, d, n, f, i, e)) : (process.env.NODE_ENV !== "production" && ke(d, "renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."), d.ignore = !0);
    }
    for (var h = e.childCount() - 1; h >= c; h--) {
      var p = e.childAt(h);
      oQe(e, p, i);
    }
  }
}
function oQe(t, e, n) {
  e && Sw(e, Rs(t).option, n);
}
function sQe(t) {
  new Us(t.oldChildren, t.newChildren, HW, HW, t).add(GW).update(GW).remove(lQe).execute();
}
function HW(t, e) {
  var n = t && t.name;
  return n ?? q7e + e;
}
function GW(t, e) {
  var n = this.context, r = t != null ? n.newChildren[t] : null, i = e != null ? n.oldChildren[e] : null;
  dL(n.api, i, n.dataIndex, r, n.seriesModel, n.group);
}
function lQe(t) {
  var e = this.context, n = e.oldChildren[t];
  n && Sw(n, Rs(n).option, e.seriesModel);
}
function Pre(t) {
  return t && (t.pathData || t.d);
}
function uQe(t) {
  return t && (Ce(t, "pathData") || Ce(t, "d"));
}
function cQe(t) {
  t.registerChartView(J7e), t.registerSeriesModel(E7e);
}
var wc = bt(), jW = Le, HP = xe, pL = (
  /** @class */
  function() {
    function t() {
      this._dragging = !1, this.animationThreshold = 15;
    }
    return t.prototype.render = function(e, n, r, i) {
      var a = n.get("value"), o = n.get("status");
      if (this._axisModel = e, this._axisPointerModel = n, this._api = r, !(!i && this._lastValue === a && this._lastStatus === o)) {
        this._lastValue = a, this._lastStatus = o;
        var s = this._group, l = this._handle;
        if (!o || o === "hide") {
          s && s.hide(), l && l.hide();
          return;
        }
        s && s.show(), l && l.show();
        var u = {};
        this.makeElOption(u, a, e, n, r);
        var c = u.graphicKey;
        c !== this._lastGraphicKey && this.clear(r), this._lastGraphicKey = c;
        var f = this._moveAnimation = this.determineAnimation(e, n);
        if (!s)
          s = this._group = new Ve(), this.createPointerEl(s, u, e, n), this.createLabelEl(s, u, e, n), r.getZr().add(s);
        else {
          var d = Ue(ZW, n, f);
          this.updatePointerEl(s, u, d), this.updateLabelEl(s, u, d, n);
        }
        XW(s, n, !0), this._renderHandle(a);
      }
    }, t.prototype.remove = function(e) {
      this.clear(e);
    }, t.prototype.dispose = function(e) {
      this.clear(e);
    }, t.prototype.determineAnimation = function(e, n) {
      var r = n.get("animation"), i = e.axis, a = i.type === "category", o = n.get("snap");
      if (!o && !a)
        return !1;
      if (r === "auto" || r == null) {
        var s = this.animationThreshold;
        if (a && i.getBandWidth() > s)
          return !0;
        if (o) {
          var l = Bk(e).seriesDataCount, u = i.getExtent();
          return Math.abs(u[0] - u[1]) / l > s;
        }
        return !1;
      }
      return r === !0;
    }, t.prototype.makeElOption = function(e, n, r, i, a) {
    }, t.prototype.createPointerEl = function(e, n, r, i) {
      var a = n.pointer;
      if (a) {
        var o = wc(e).pointerEl = new Lf[a.type](jW(n.pointer));
        e.add(o);
      }
    }, t.prototype.createLabelEl = function(e, n, r, i) {
      if (n.label) {
        var a = wc(e).labelEl = new gt(jW(n.label));
        e.add(a), UW(a, i);
      }
    }, t.prototype.updatePointerEl = function(e, n, r) {
      var i = wc(e).pointerEl;
      i && n.pointer && (i.setStyle(n.pointer.style), r(i, {
        shape: n.pointer.shape
      }));
    }, t.prototype.updateLabelEl = function(e, n, r, i) {
      var a = wc(e).labelEl;
      a && (a.setStyle(n.label.style), r(a, {
        // Consider text length change in vertical axis, animation should
        // be used on shape, otherwise the effect will be weird.
        // TODOTODO
        // shape: elOption.label.shape,
        x: n.label.x,
        y: n.label.y
      }), UW(a, i));
    }, t.prototype._renderHandle = function(e) {
      if (!(this._dragging || !this.updateHandleTransform)) {
        var n = this._axisPointerModel, r = this._api.getZr(), i = this._handle, a = n.getModel("handle"), o = n.get("status");
        if (!a.get("show") || !o || o === "hide") {
          i && r.remove(i), this._handle = null;
          return;
        }
        var s;
        this._handle || (s = !0, i = this._handle = vp(a.get("icon"), {
          cursor: "move",
          draggable: !0,
          onmousemove: function(u) {
            Gs(u.event);
          },
          onmousedown: HP(this._onHandleDragMove, this, 0, 0),
          drift: HP(this._onHandleDragMove, this),
          ondragend: HP(this._onHandleDragEnd, this)
        }), r.add(i)), XW(i, n, !1), i.setStyle(a.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
        var l = a.get("size");
        ue(l) || (l = [l, l]), i.scaleX = l[0] / 2, i.scaleY = l[1] / 2, Sp(this, "_doDispatchAxisPointer", a.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
      }
    }, t.prototype._moveHandleToValue = function(e, n) {
      ZW(this._axisPointerModel, !n && this._moveAnimation, this._handle, GP(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
    }, t.prototype._onHandleDragMove = function(e, n) {
      var r = this._handle;
      if (r) {
        this._dragging = !0;
        var i = this.updateHandleTransform(GP(r), [e, n], this._axisModel, this._axisPointerModel);
        this._payloadInfo = i, r.stopAnimation(), r.attr(GP(i)), wc(r).lastProp = null, this._doDispatchAxisPointer();
      }
    }, t.prototype._doDispatchAxisPointer = function() {
      var e = this._handle;
      if (e) {
        var n = this._payloadInfo, r = this._axisModel;
        this._api.dispatchAction({
          type: "updateAxisPointer",
          x: n.cursorPoint[0],
          y: n.cursorPoint[1],
          tooltipOption: n.tooltipOption,
          axesInfo: [{
            axisDim: r.axis.dim,
            axisIndex: r.componentIndex
          }]
        });
      }
    }, t.prototype._onHandleDragEnd = function() {
      this._dragging = !1;
      var e = this._handle;
      if (e) {
        var n = this._axisPointerModel.get("value");
        this._moveHandleToValue(n), this._api.dispatchAction({
          type: "hideTip"
        });
      }
    }, t.prototype.clear = function(e) {
      this._lastValue = null, this._lastStatus = null;
      var n = e.getZr(), r = this._group, i = this._handle;
      n && r && (this._lastGraphicKey = null, r && n.remove(r), i && n.remove(i), this._group = null, this._handle = null, this._payloadInfo = null), $m(this, "_doDispatchAxisPointer");
    }, t.prototype.doClear = function() {
    }, t.prototype.buildLabel = function(e, n, r) {
      return r = r || 0, {
        x: e[r],
        y: e[1 - r],
        width: n[r],
        height: n[1 - r]
      };
    }, t;
  }()
);
function ZW(t, e, n, r) {
  $re(wc(n).lastProp, r) || (wc(n).lastProp = r, e ? Ct(n, r, t) : (n.stopAnimation(), n.attr(r)));
}
function $re(t, e) {
  if (Ie(t) && Ie(e)) {
    var n = !0;
    return k(e, function(r, i) {
      n = n && $re(t[i], r);
    }), !!n;
  } else
    return t === e;
}
function UW(t, e) {
  t[e.get(["label", "show"]) ? "show" : "hide"]();
}
function GP(t) {
  return {
    x: t.x || 0,
    y: t.y || 0,
    rotation: t.rotation || 0
  };
}
function XW(t, e, n) {
  var r = e.get("z"), i = e.get("zlevel");
  t && t.traverse(function(a) {
    a.type !== "group" && (r != null && (a.z = r), i != null && (a.zlevel = i), a.silent = n);
  });
}
function vL(t) {
  var e = t.get("type"), n = t.getModel(e + "Style"), r;
  return e === "line" ? (r = n.getLineStyle(), r.fill = null) : e === "shadow" && (r = n.getAreaStyle(), r.stroke = null), r;
}
function Are(t, e, n, r, i) {
  var a = n.get("value"), o = Ere(a, e.axis, e.ecModel, n.get("seriesDataIndices"), {
    precision: n.get(["label", "precision"]),
    formatter: n.get(["label", "formatter"])
  }), s = n.getModel("label"), l = Bf(s.get("padding") || 0), u = s.getFont(), c = k0(o, u), f = i.position, d = c.width + l[1] + l[3], h = c.height + l[0] + l[2], p = i.align;
  p === "right" && (f[0] -= d), p === "center" && (f[0] -= d / 2);
  var v = i.verticalAlign;
  v === "bottom" && (f[1] -= h), v === "middle" && (f[1] -= h / 2), fQe(f, d, h, r);
  var g = s.get("backgroundColor");
  (!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), t.label = {
    // shape: {x: 0, y: 0, width: width, height: height, r: labelModel.get('borderRadius')},
    x: f[0],
    y: f[1],
    style: Zt(s, {
      text: o,
      font: u,
      fill: s.getTextColor(),
      padding: l,
      backgroundColor: g
    }),
    // Label should be over axisPointer.
    z2: 10
  };
}
function fQe(t, e, n, r) {
  var i = r.getWidth(), a = r.getHeight();
  t[0] = Math.min(t[0] + e, i) - e, t[1] = Math.min(t[1] + n, a) - n, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
}
function Ere(t, e, n, r, i) {
  t = e.scale.parse(t);
  var a = e.scale.getLabel({
    value: t
  }, {
    // If `precision` is set, width can be fixed (like '12.00500'), which
    // helps to debounce when when moving label.
    precision: i.precision
  }), o = i.formatter;
  if (o) {
    var s = {
      value: Pk(e, {
        value: t
      }),
      axisDimension: e.dim,
      axisIndex: e.index,
      seriesData: []
    };
    k(r, function(l) {
      var u = n.getSeriesByIndex(l.seriesIndex), c = l.dataIndexInside, f = u && u.getDataParams(c);
      f && s.seriesData.push(f);
    }), Oe(o) ? a = o.replace("{value}", a) : Me(o) && (a = o(s));
  }
  return a;
}
function gL(t, e, n) {
  var r = Si();
  return Cu(r, r, n.rotation), ao(r, r, n.position), to([t.dataToCoord(e), (n.labelOffset || 0) + (n.labelDirection || 1) * (n.labelMargin || 0)], r);
}
function Mre(t, e, n, r, i, a) {
  var o = Kr.innerTextLayout(n.rotation, 0, n.labelDirection);
  n.labelMargin = i.get(["label", "margin"]), Are(e, r, i, a, {
    position: gL(r.axis, t, n),
    align: o.textAlign,
    verticalAlign: o.textVerticalAlign
  });
}
function mL(t, e, n) {
  return n = n || 0, {
    x1: t[n],
    y1: t[1 - n],
    x2: e[n],
    y2: e[1 - n]
  };
}
function Ire(t, e, n) {
  return n = n || 0, {
    x: t[n],
    y: t[1 - n],
    width: e[n],
    height: e[1 - n]
  };
}
function YW(t, e, n, r, i, a) {
  return {
    cx: t,
    cy: e,
    r0: n,
    r,
    startAngle: i,
    endAngle: a,
    clockwise: !0
  };
}
var dQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis, l = s.grid, u = a.get("type"), c = qW(l, s).getOtherAxis(s).getGlobalExtent(), f = s.toGlobalCoord(s.dataToCoord(r, !0));
      if (u && u !== "none") {
        var d = vL(a), h = hQe[u](s, f, c);
        h.style = d, n.graphicKey = h.type, n.pointer = h;
      }
      var p = fE(l.model, i);
      Mre(
        // @ts-ignore
        r,
        n,
        p,
        i,
        a,
        o
      );
    }, e.prototype.getHandleTransform = function(n, r, i) {
      var a = fE(r.axis.grid.model, r, {
        labelInside: !1
      });
      a.labelMargin = i.get(["handle", "margin"]);
      var o = gL(r.axis, n, a);
      return {
        x: o[0],
        y: o[1],
        rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(n, r, i, a) {
      var o = i.axis, s = o.grid, l = o.getGlobalExtent(!0), u = qW(s, o).getOtherAxis(o).getGlobalExtent(), c = o.dim === "x" ? 0 : 1, f = [n.x, n.y];
      f[c] += r[c], f[c] = Math.min(l[1], f[c]), f[c] = Math.max(l[0], f[c]);
      var d = (u[1] + u[0]) / 2, h = [d, d];
      h[c] = f[c];
      var p = [{
        verticalAlign: "middle"
      }, {
        align: "center"
      }];
      return {
        x: f[0],
        y: f[1],
        rotation: n.rotation,
        cursorPoint: h,
        tooltipOption: p[c]
      };
    }, e;
  }(pL)
);
function qW(t, e) {
  var n = {};
  return n[e.dim + "AxisIndex"] = e.index, t.getCartesian(n);
}
var hQe = {
  line: function(t, e, n) {
    var r = mL([e, n[0]], [e, n[1]], KW(t));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: r
    };
  },
  shadow: function(t, e, n) {
    var r = Math.max(1, t.getBandWidth()), i = n[1] - n[0];
    return {
      type: "Rect",
      shape: Ire([e - r / 2, n[0]], [r, i], KW(t))
    };
  }
};
function KW(t) {
  return t.dim === "x" ? 0 : 1;
}
var pQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "axisPointer", e.defaultOption = {
      // 'auto' means that show when triggered by tooltip or handle.
      show: "auto",
      // zlevel: 0,
      z: 50,
      type: "line",
      // axispointer triggered by tootip determine snap automatically,
      // see `modelHelper`.
      snap: !1,
      triggerTooltip: !0,
      triggerEmphasis: !0,
      value: null,
      status: null,
      link: [],
      // Do not set 'auto' here, otherwise global animation: false
      // will not effect at this axispointer.
      animation: null,
      animationDurationUpdate: 200,
      lineStyle: {
        color: "#B9BEC9",
        width: 1,
        type: "dashed"
      },
      shadowStyle: {
        color: "rgba(210,219,238,0.2)"
      },
      label: {
        show: !0,
        formatter: null,
        precision: "auto",
        margin: 3,
        color: "#fff",
        padding: [5, 7, 5, 7],
        backgroundColor: "auto",
        borderColor: null,
        borderWidth: 0,
        borderRadius: 3
      },
      handle: {
        show: !1,
        // eslint-disable-next-line
        icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
        size: 45,
        // handle margin is from symbol center to axis, which is stable when circular move.
        margin: 50,
        // color: '#1b8bbd'
        // color: '#2f4554'
        color: "#333",
        shadowBlur: 3,
        shadowColor: "#aaa",
        shadowOffsetX: 0,
        shadowOffsetY: 2,
        // For mobile performance
        throttle: 40
      }
    }, e;
  }(rt)
), Es = bt(), vQe = k;
function Dre(t, e, n) {
  if (!vt.node) {
    var r = e.getZr();
    Es(r).records || (Es(r).records = {}), gQe(r, e);
    var i = Es(r).records[t] || (Es(r).records[t] = {});
    i.handler = n;
  }
}
function gQe(t, e) {
  if (Es(t).initialized)
    return;
  Es(t).initialized = !0, n("click", Ue(JW, "click")), n("mousemove", Ue(JW, "mousemove")), n("globalout", yQe);
  function n(r, i) {
    t.on(r, function(a) {
      var o = bQe(e);
      vQe(Es(t).records, function(s) {
        s && i(s, a, o.dispatchAction);
      }), mQe(o.pendings, e);
    });
  }
}
function mQe(t, e) {
  var n = t.showTip.length, r = t.hideTip.length, i;
  n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
}
function yQe(t, e, n) {
  t.handler("leave", null, n);
}
function JW(t, e, n, r) {
  e.handler(t, n, r);
}
function bQe(t) {
  var e = {
    showTip: [],
    hideTip: []
  }, n = function(r) {
    var i = e[r.type];
    i ? i.push(r) : (r.dispatchAction = n, t.dispatchAction(r));
  };
  return {
    dispatchAction: n,
    pendings: e
  };
}
function EE(t, e) {
  if (!vt.node) {
    var n = e.getZr(), r = (Es(n).records || {})[t];
    r && (Es(n).records[t] = null);
  }
}
var _Qe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = r.getComponent("tooltip"), o = n.get("triggerOn") || a && a.get("triggerOn") || "mousemove|click";
      Dre("axisPointer", i, function(s, l, u) {
        o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
          type: "updateAxisPointer",
          currTrigger: s,
          x: l && l.offsetX,
          y: l && l.offsetY
        });
      });
    }, e.prototype.remove = function(n, r) {
      EE("axisPointer", r);
    }, e.prototype.dispose = function(n, r) {
      EE("axisPointer", r);
    }, e.type = "axisPointer", e;
  }(Xt)
);
function Rre(t, e) {
  var n = [], r = t.seriesIndex, i;
  if (r == null || !(i = e.getSeriesByIndex(r)))
    return {
      point: []
    };
  var a = i.getData(), o = mf(a, t);
  if (o == null || o < 0 || ue(o))
    return {
      point: []
    };
  var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
  if (i.getTooltipPosition)
    n = i.getTooltipPosition(o) || [];
  else if (l && l.dataToPoint)
    if (t.isStacked) {
      var u = l.getBaseAxis(), c = l.getOtherAxis(u), f = c.dim, d = u.dim, h = f === "x" || f === "radius" ? 1 : 0, p = a.mapDimension(d), v = [];
      v[h] = a.get(p, o), v[1 - h] = a.get(a.getCalculationInfo("stackResultDimension"), o), n = l.dataToPoint(v) || [];
    } else
      n = l.dataToPoint(a.getValues(ce(l.dimensions, function(m) {
        return a.mapDimension(m);
      }), o)) || [];
  else if (s) {
    var g = s.getBoundingRect().clone();
    g.applyTransform(s.transform), n = [g.x + g.width / 2, g.y + g.height / 2];
  }
  return {
    point: n,
    el: s
  };
}
var e7 = bt();
function OQe(t, e, n) {
  var r = t.currTrigger, i = [t.x, t.y], a = t, o = t.dispatchAction || xe(n.dispatchAction, n), s = e.getComponent("axisPointer").coordSysAxesInfo;
  if (s) {
    X_(i) && (i = Rre({
      seriesIndex: a.seriesIndex,
      // Do not use dataIndexInside from other ec instance.
      // FIXME: auto detect it?
      dataIndex: a.dataIndex
    }, e).point);
    var l = X_(i), u = a.axesInfo, c = s.axesInfo, f = r === "leave" || X_(i), d = {}, h = {}, p = {
      list: [],
      map: {}
    }, v = {
      showPointer: Ue(xQe, h),
      showTooltip: Ue(wQe, p)
    };
    k(s.coordSysMap, function(m, y) {
      var b = l || m.containPoint(i);
      k(s.coordSysAxesInfo[y], function(_, O) {
        var S = _.axis, x = $Qe(u, _);
        if (!f && b && (!u || x)) {
          var C = x && x.value;
          C == null && !l && (C = S.pointToData(i)), C != null && t7(_, C, v, !1, d);
        }
      });
    });
    var g = {};
    return k(c, function(m, y) {
      var b = m.linkGroup;
      b && !h[y] && k(b.axesInfo, function(_, O) {
        var S = h[O];
        if (_ !== m && S) {
          var x = S.value;
          b.mapper && (x = m.axis.scale.parse(b.mapper(x, n7(_), n7(m)))), g[m.key] = x;
        }
      });
    }), k(g, function(m, y) {
      t7(c[y], m, v, !0, d);
    }), CQe(h, c, d), TQe(p, i, t, o), PQe(c, o, n), d;
  }
}
function t7(t, e, n, r, i) {
  var a = t.axis;
  if (!(a.scale.isBlank() || !a.containData(e))) {
    if (!t.involveSeries) {
      n.showPointer(t, e);
      return;
    }
    var o = SQe(e, t), s = o.payloadBatch, l = o.snapToValue;
    s[0] && i.seriesIndex == null && le(i, s[0]), !r && t.snap && a.containData(l) && l != null && (e = l), n.showPointer(t, e, s), n.showTooltip(t, o, l);
  }
}
function SQe(t, e) {
  var n = e.axis, r = n.dim, i = t, a = [], o = Number.MAX_VALUE, s = -1;
  return k(e.seriesModels, function(l, u) {
    var c = l.getData().mapDimensionsAll(r), f, d;
    if (l.getAxisTooltipData) {
      var h = l.getAxisTooltipData(c, t, n);
      d = h.dataIndices, f = h.nestestValue;
    } else {
      if (d = l.getData().indicesOfNearest(
        c[0],
        t,
        // Add a threshold to avoid find the wrong dataIndex
        // when data length is not same.
        // false,
        n.type === "category" ? 0.5 : null
      ), !d.length)
        return;
      f = l.getData().get(c[0], d[0]);
    }
    if (!(f == null || !isFinite(f))) {
      var p = t - f, v = Math.abs(p);
      v <= o && ((v < o || p >= 0 && s < 0) && (o = v, s = p, i = f, a.length = 0), k(d, function(g) {
        a.push({
          seriesIndex: l.seriesIndex,
          dataIndexInside: g,
          dataIndex: l.getData().getRawIndex(g)
        });
      }));
    }
  }), {
    payloadBatch: a,
    snapToValue: i
  };
}
function xQe(t, e, n, r) {
  t[e.key] = {
    value: n,
    payloadBatch: r
  };
}
function wQe(t, e, n, r) {
  var i = n.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
  if (!(!e.triggerTooltip || !i.length)) {
    var l = e.coordSys.model, u = km(l), c = t.map[u];
    c || (c = t.map[u] = {
      coordSysId: l.id,
      coordSysIndex: l.componentIndex,
      coordSysType: l.type,
      coordSysMainType: l.mainType,
      dataByAxis: []
    }, t.list.push(c)), c.dataByAxis.push({
      axisDim: a.dim,
      axisIndex: o.componentIndex,
      axisType: o.type,
      axisId: o.id,
      value: r,
      // Caustion: viewHelper.getValueLabel is actually on "view stage", which
      // depends that all models have been updated. So it should not be performed
      // here. Considering axisPointerModel used here is volatile, which is hard
      // to be retrieve in TooltipView, we prepare parameters here.
      valueLabelOpt: {
        precision: s.get(["label", "precision"]),
        formatter: s.get(["label", "formatter"])
      },
      seriesDataIndices: i.slice()
    });
  }
}
function CQe(t, e, n) {
  var r = n.axesInfo = [];
  k(e, function(i, a) {
    var o = i.axisPointerModel.option, s = t[a];
    s ? (!i.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !i.useHandle && (o.status = "hide"), o.status === "show" && r.push({
      axisDim: i.axis.dim,
      axisIndex: i.axis.model.componentIndex,
      value: o.value
    });
  });
}
function TQe(t, e, n, r) {
  if (X_(e) || !t.list.length) {
    r({
      type: "hideTip"
    });
    return;
  }
  var i = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  r({
    type: "showTip",
    escapeConnect: !0,
    x: e[0],
    y: e[1],
    tooltipOption: n.tooltipOption,
    position: n.position,
    dataIndexInside: i.dataIndexInside,
    dataIndex: i.dataIndex,
    seriesIndex: i.seriesIndex,
    dataByCoordSys: t.list
  });
}
function PQe(t, e, n) {
  var r = n.getZr(), i = "axisPointerLastHighlights", a = e7(r)[i] || {}, o = e7(r)[i] = {};
  k(t, function(u, c) {
    var f = u.axisPointerModel.option;
    f.status === "show" && u.triggerEmphasis && k(f.seriesDataIndices, function(d) {
      var h = d.seriesIndex + " | " + d.dataIndex;
      o[h] = d;
    });
  });
  var s = [], l = [];
  k(a, function(u, c) {
    !o[c] && l.push(u);
  }), k(o, function(u, c) {
    !a[c] && s.push(u);
  }), l.length && n.dispatchAction({
    type: "downplay",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: l
  }), s.length && n.dispatchAction({
    type: "highlight",
    escapeConnect: !0,
    // Not blur others when highlight in axisPointer.
    notBlur: !0,
    batch: s
  });
}
function $Qe(t, e) {
  for (var n = 0; n < (t || []).length; n++) {
    var r = t[n];
    if (e.axis.dim === r.axisDim && e.axis.model.componentIndex === r.axisIndex)
      return r;
  }
}
function n7(t) {
  var e = t.axis.model, n = {}, r = n.axisDim = t.axis.dim;
  return n.axisIndex = n[r + "AxisIndex"] = e.componentIndex, n.axisName = n[r + "AxisName"] = e.name, n.axisId = n[r + "AxisId"] = e.id, n;
}
function X_(t) {
  return !t || t[0] == null || isNaN(t[0]) || t[1] == null || isNaN(t[1]);
}
function ey(t) {
  Wf.registerAxisPointerClass("CartesianAxisPointer", dQe), t.registerComponentModel(pQe), t.registerComponentView(_Qe), t.registerPreprocessor(function(e) {
    if (e) {
      (!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
      var n = e.axisPointer.link;
      n && !ue(n) && (e.axisPointer.link = [n]);
    }
  }), t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC, function(e, n) {
    e.getComponent("axisPointer").coordSysAxesInfo = z6e(e, n);
  }), t.registerAction({
    type: "updateAxisPointer",
    event: "updateAxisPointer",
    update: ":updateAxisPointer"
  }, OQe);
}
function AQe(t) {
  at(one), at(ey);
}
var EQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis;
      s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
      var l = s.polar, u = l.getOtherAxis(s), c = u.getExtent(), f = s.dataToCoord(r), d = a.get("type");
      if (d && d !== "none") {
        var h = vL(a), p = IQe[d](s, l, f, c);
        p.style = h, n.graphicKey = p.type, n.pointer = p;
      }
      var v = a.get(["label", "margin"]), g = MQe(r, i, a, l, v);
      Are(n, i, a, o, g);
    }, e;
  }(pL)
);
function MQe(t, e, n, r, i) {
  var a = e.axis, o = a.dataToCoord(t), s = r.getAngleAxis().getExtent()[0];
  s = s / 180 * Math.PI;
  var l = r.getRadiusAxis().getExtent(), u, c, f;
  if (a.dim === "radius") {
    var d = Si();
    Cu(d, d, s), ao(d, d, [r.cx, r.cy]), u = to([o, -i], d);
    var h = e.getModel("axisLabel").get("rotate") || 0, p = Kr.innerTextLayout(s, h * Math.PI / 180, -1);
    c = p.textAlign, f = p.textVerticalAlign;
  } else {
    var v = l[1];
    u = r.coordToPoint([v + i, o]);
    var g = r.cx, m = r.cy;
    c = Math.abs(u[0] - g) / v < 0.3 ? "center" : u[0] > g ? "left" : "right", f = Math.abs(u[1] - m) / v < 0.3 ? "middle" : u[1] > m ? "top" : "bottom";
  }
  return {
    position: u,
    align: c,
    verticalAlign: f
  };
}
var IQe = {
  line: function(t, e, n, r) {
    return t.dim === "angle" ? {
      type: "Line",
      shape: mL(e.coordToPoint([r[0], n]), e.coordToPoint([r[1], n]))
    } : {
      type: "Circle",
      shape: {
        cx: e.cx,
        cy: e.cy,
        r: n
      }
    };
  },
  shadow: function(t, e, n, r) {
    var i = Math.max(1, t.getBandWidth()), a = Math.PI / 180;
    return t.dim === "angle" ? {
      type: "Sector",
      shape: YW(
        e.cx,
        e.cy,
        r[0],
        r[1],
        // In ECharts y is negative if angle is positive
        (-n - i / 2) * a,
        (-n + i / 2) * a
      )
    } : {
      type: "Sector",
      shape: YW(e.cx, e.cy, n - i / 2, n + i / 2, 0, Math.PI * 2)
    };
  }
}, DQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.findAxisModel = function(n) {
      var r, i = this.ecModel;
      return i.eachComponent(n, function(a) {
        a.getCoordSysModel() === this && (r = a);
      }, this), r;
    }, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
      // zlevel: 0,
      z: 0,
      center: ["50%", "50%"],
      radius: "80%"
    }, e;
  }(rt)
), yL = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getCoordSysModel = function() {
      return this.getReferringComponents("polar", Dn).models[0];
    }, e.type = "polarAxis", e;
  }(rt)
);
xn(yL, Tp);
var RQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "angleAxis", e;
  }(yL)
), kQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "radiusAxis", e;
  }(yL)
), bL = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r) {
      return t.call(this, "radius", n, r) || this;
    }
    return e.prototype.pointToData = function(n, r) {
      return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
    }, e;
  }(Ba)
);
bL.prototype.dataToRadius = Ba.prototype.dataToCoord;
bL.prototype.radiusToData = Ba.prototype.coordToData;
var LQe = bt(), _L = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r) {
      return t.call(this, "angle", n, r || [0, 360]) || this;
    }
    return e.prototype.pointToData = function(n, r) {
      return this.polar.pointToData(n, r)[this.dim === "radius" ? 0 : 1];
    }, e.prototype.calculateCategoryInterval = function() {
      var n = this, r = n.getLabelModel(), i = n.scale, a = i.getExtent(), o = i.count();
      if (a[1] - a[0] < 1)
        return 0;
      var s = a[0], l = n.dataToCoord(s + 1) - n.dataToCoord(s), u = Math.abs(l), c = k0(s == null ? "" : s + "", r.getFont(), "center", "top"), f = Math.max(c.height, 7), d = f / u;
      isNaN(d) && (d = 1 / 0);
      var h = Math.max(0, Math.floor(d)), p = LQe(n.model), v = p.lastAutoInterval, g = p.lastTickCount;
      return v != null && g != null && Math.abs(v - h) <= 1 && Math.abs(g - o) <= 1 && v > h ? h = v : (p.lastTickCount = o, p.lastAutoInterval = h), h;
    }, e;
  }(Ba)
);
_L.prototype.dataToAngle = Ba.prototype.dataToCoord;
_L.prototype.angleToData = Ba.prototype.coordToData;
var kre = ["radius", "angle"], NQe = (
  /** @class */
  function() {
    function t(e) {
      this.dimensions = kre, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new bL(), this._angleAxis = new _L(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
    }
    return t.prototype.containPoint = function(e) {
      var n = this.pointToCoord(e);
      return this._radiusAxis.contain(n[0]) && this._angleAxis.contain(n[1]);
    }, t.prototype.containData = function(e) {
      return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
    }, t.prototype.getAxis = function(e) {
      var n = "_" + e + "Axis";
      return this[n];
    }, t.prototype.getAxes = function() {
      return [this._radiusAxis, this._angleAxis];
    }, t.prototype.getAxesByScale = function(e) {
      var n = [], r = this._angleAxis, i = this._radiusAxis;
      return r.scale.type === e && n.push(r), i.scale.type === e && n.push(i), n;
    }, t.prototype.getAngleAxis = function() {
      return this._angleAxis;
    }, t.prototype.getRadiusAxis = function() {
      return this._radiusAxis;
    }, t.prototype.getOtherAxis = function(e) {
      var n = this._angleAxis;
      return e === n ? this._radiusAxis : n;
    }, t.prototype.getBaseAxis = function() {
      return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
    }, t.prototype.getTooltipAxes = function(e) {
      var n = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
      return {
        baseAxes: [n],
        otherAxes: [this.getOtherAxis(n)]
      };
    }, t.prototype.dataToPoint = function(e, n) {
      return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], n), this._angleAxis.dataToAngle(e[1], n)]);
    }, t.prototype.pointToData = function(e, n) {
      var r = this.pointToCoord(e);
      return [this._radiusAxis.radiusToData(r[0], n), this._angleAxis.angleToData(r[1], n)];
    }, t.prototype.pointToCoord = function(e) {
      var n = e[0] - this.cx, r = e[1] - this.cy, i = this.getAngleAxis(), a = i.getExtent(), o = Math.min(a[0], a[1]), s = Math.max(a[0], a[1]);
      i.inverse ? o = s - 360 : s = o + 360;
      var l = Math.sqrt(n * n + r * r);
      n /= l, r /= l;
      for (var u = Math.atan2(-r, n) / Math.PI * 180, c = u < o ? 1 : -1; u < o || u > s; )
        u += c * 360;
      return [l, u];
    }, t.prototype.coordToPoint = function(e) {
      var n = e[0], r = e[1] / 180 * Math.PI, i = Math.cos(r) * n + this.cx, a = -Math.sin(r) * n + this.cy;
      return [i, a];
    }, t.prototype.getArea = function() {
      var e = this.getAngleAxis(), n = this.getRadiusAxis(), r = n.getExtent().slice();
      r[0] > r[1] && r.reverse();
      var i = e.getExtent(), a = Math.PI / 180;
      return {
        cx: this.cx,
        cy: this.cy,
        r0: r[0],
        r: r[1],
        startAngle: -i[0] * a,
        endAngle: -i[1] * a,
        clockwise: e.inverse,
        contain: function(o, s) {
          var l = o - this.cx, u = s - this.cy, c = l * l + u * u - 1e-4, f = this.r, d = this.r0;
          return c <= f * f && c >= d * d;
        }
      };
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = r7(n);
      return i === this ? this.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = r7(n);
      return i === this ? this.pointToData(r) : null;
    }, t;
  }()
);
function r7(t) {
  var e = t.seriesModel, n = t.polarModel;
  return n && n.coordinateSystem || e && e.coordinateSystem;
}
const BQe = NQe;
function zQe(t, e, n) {
  var r = e.get("center"), i = n.getWidth(), a = n.getHeight();
  t.cx = _e(r[0], i), t.cy = _e(r[1], a);
  var o = t.getRadiusAxis(), s = Math.min(i, a) / 2, l = e.get("radius");
  l == null ? l = [0, "100%"] : ue(l) || (l = [0, l]);
  var u = [_e(l[0], s), _e(l[1], s)];
  o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
}
function VQe(t, e) {
  var n = this, r = n.getAngleAxis(), i = n.getRadiusAxis();
  if (r.scale.setExtent(1 / 0, -1 / 0), i.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function(s) {
    if (s.coordinateSystem === n) {
      var l = s.getData();
      k(CO(l, "radius"), function(u) {
        i.scale.unionExtentFromData(l, u);
      }), k(CO(l, "angle"), function(u) {
        r.scale.unionExtentFromData(l, u);
      });
    }
  }), Of(r.scale, r.model), Of(i.scale, i.model), r.type === "category" && !r.onBand) {
    var a = r.getExtent(), o = 360 / r.scale.count();
    r.inverse ? a[1] += o : a[1] -= o, r.setExtent(a[0], a[1]);
  }
}
function FQe(t) {
  return t.mainType === "angleAxis";
}
function i7(t, e) {
  var n;
  if (t.type = e.get("type"), t.scale = G0(e), t.onBand = e.get("boundaryGap") && t.type === "category", t.inverse = e.get("inverse"), FQe(e)) {
    t.inverse = t.inverse !== e.get("clockwise");
    var r = e.get("startAngle"), i = (n = e.get("endAngle")) !== null && n !== void 0 ? n : r + (t.inverse ? -360 : 360);
    t.setExtent(r, i);
  }
  e.axis = t, t.model = e;
}
var WQe = {
  dimensions: kre,
  create: function(t, e) {
    var n = [];
    return t.eachComponent("polar", function(r, i) {
      var a = new BQe(i + "");
      a.update = VQe;
      var o = a.getRadiusAxis(), s = a.getAngleAxis(), l = r.findAxisModel("radiusAxis"), u = r.findAxisModel("angleAxis");
      i7(o, l), i7(s, u), zQe(a, r, e), n.push(a), r.coordinateSystem = a, a.model = r;
    }), t.eachSeries(function(r) {
      if (r.get("coordinateSystem") === "polar") {
        var i = r.getReferringComponents("polar", Dn).models[0];
        if (process.env.NODE_ENV !== "production" && !i)
          throw new Error('Polar "' + Tn(r.get("polarIndex"), r.get("polarId"), 0) + '" not found');
        r.coordinateSystem = i.coordinateSystem;
      }
    }), n;
  }
}, QQe = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
function Ib(t, e, n) {
  e[1] > e[0] && (e = e.slice().reverse());
  var r = t.coordToPoint([e[0], n]), i = t.coordToPoint([e[1], n]);
  return {
    x1: r[0],
    y1: r[1],
    x2: i[0],
    y2: i[1]
  };
}
function Db(t) {
  var e = t.getRadiusAxis();
  return e.inverse ? 0 : 1;
}
function a7(t) {
  var e = t[0], n = t[t.length - 1];
  e && n && Math.abs(Math.abs(e.coord - n.coord) - 360) < 1e-4 && t.pop();
}
var HQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
    }
    return e.prototype.render = function(n, r) {
      if (this.group.removeAll(), !!n.get("show")) {
        var i = n.axis, a = i.polar, o = a.getRadiusAxis().getExtent(), s = i.getTicksCoords(), l = i.getMinorTicksCoords(), u = ce(i.getViewLabels(), function(c) {
          c = Le(c);
          var f = i.scale, d = f.type === "ordinal" ? f.getRawOrdinalNumber(c.tickValue) : c.tickValue;
          return c.coord = i.dataToCoord(d), c;
        });
        a7(u), a7(s), k(QQe, function(c) {
          n.get([c, "show"]) && (!i.scale.isBlank() || c === "axisLine") && GQe[c](this.group, n, a, s, l, o, u);
        }, this);
      }
    }, e.type = "angleAxis", e;
  }(Wf)
), GQe = {
  axisLine: function(t, e, n, r, i, a) {
    var o = e.getModel(["axisLine", "lineStyle"]), s = n.getAngleAxis(), l = Math.PI / 180, u = s.getExtent(), c = Db(n), f = c ? 0 : 1, d, h = Math.abs(u[1] - u[0]) === 360 ? "Circle" : "Arc";
    a[f] === 0 ? d = new Lf[h]({
      shape: {
        cx: n.cx,
        cy: n.cy,
        r: a[c],
        startAngle: -u[0] * l,
        endAngle: -u[1] * l,
        clockwise: s.inverse
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }) : d = new z0({
      shape: {
        cx: n.cx,
        cy: n.cy,
        r: a[c],
        r0: a[f]
      },
      style: o.getLineStyle(),
      z2: 1,
      silent: !0
    }), d.style.fill = null, t.add(d);
  },
  axisTick: function(t, e, n, r, i, a) {
    var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = a[Db(n)], u = ce(r, function(c) {
      return new Un({
        shape: Ib(n, [l, l + s], c.coord)
      });
    });
    t.add(Li(u, {
      style: Re(o.getModel("lineStyle").getLineStyle(), {
        stroke: e.get(["axisLine", "lineStyle", "color"])
      })
    }));
  },
  minorTick: function(t, e, n, r, i, a) {
    if (i.length) {
      for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = a[Db(n)], c = [], f = 0; f < i.length; f++)
        for (var d = 0; d < i[f].length; d++)
          c.push(new Un({
            shape: Ib(n, [u, u + l], i[f][d].coord)
          }));
      t.add(Li(c, {
        style: Re(s.getModel("lineStyle").getLineStyle(), Re(o.getLineStyle(), {
          stroke: e.get(["axisLine", "lineStyle", "color"])
        }))
      }));
    }
  },
  axisLabel: function(t, e, n, r, i, a, o) {
    var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), c = e.get("triggerEvent");
    k(o, function(f, d) {
      var h = l, p = f.tickValue, v = a[Db(n)], g = n.coordToPoint([v + u, f.coord]), m = n.cx, y = n.cy, b = Math.abs(g[0] - m) / v < 0.3 ? "center" : g[0] > m ? "left" : "right", _ = Math.abs(g[1] - y) / v < 0.3 ? "middle" : g[1] > y ? "top" : "bottom";
      if (s && s[p]) {
        var O = s[p];
        Ie(O) && O.textStyle && (h = new Wt(O.textStyle, l, l.ecModel));
      }
      var S = new gt({
        silent: Kr.isLabelSilent(e),
        style: Zt(h, {
          x: g[0],
          y: g[1],
          fill: h.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
          text: f.formattedLabel,
          align: b,
          verticalAlign: _
        })
      });
      if (t.add(S), c) {
        var x = Kr.makeAxisEventDataBase(e);
        x.targetType = "axisLabel", x.value = f.rawLabel, Fe(S).eventData = x;
      }
    }, this);
  },
  splitLine: function(t, e, n, r, i, a) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
    l = l instanceof Array ? l : [l];
    for (var c = [], f = 0; f < r.length; f++) {
      var d = u++ % l.length;
      c[d] = c[d] || [], c[d].push(new Un({
        shape: Ib(n, a, r[f].coord)
      }));
    }
    for (var f = 0; f < c.length; f++)
      t.add(Li(c[f], {
        style: Re({
          stroke: l[f % l.length]
        }, s.getLineStyle()),
        silent: !0,
        z: e.get("z")
      }));
  },
  minorSplitLine: function(t, e, n, r, i, a) {
    if (i.length) {
      for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < i.length; u++)
        for (var c = 0; c < i[u].length; c++)
          l.push(new Un({
            shape: Ib(n, a, i[u][c].coord)
          }));
      t.add(Li(l, {
        style: s.getLineStyle(),
        silent: !0,
        z: e.get("z")
      }));
    }
  },
  splitArea: function(t, e, n, r, i, a) {
    if (r.length) {
      var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
      l = l instanceof Array ? l : [l];
      for (var c = [], f = Math.PI / 180, d = -r[0].coord * f, h = Math.min(a[0], a[1]), p = Math.max(a[0], a[1]), v = e.get("clockwise"), g = 1, m = r.length; g <= m; g++) {
        var y = g === m ? r[0].coord : r[g].coord, b = u++ % l.length;
        c[b] = c[b] || [], c[b].push(new ri({
          shape: {
            cx: n.cx,
            cy: n.cy,
            r0: h,
            r: p,
            startAngle: d,
            endAngle: -y * f,
            clockwise: v
          },
          silent: !0
        })), d = -y * f;
      }
      for (var g = 0; g < c.length; g++)
        t.add(Li(c[g], {
          style: Re({
            fill: l[g % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
}, jQe = ["axisLine", "axisTickLabel", "axisName"], ZQe = ["splitLine", "splitArea", "minorSplitLine"], UQe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "PolarAxisPointer", n;
    }
    return e.prototype.render = function(n, r) {
      if (this.group.removeAll(), !!n.get("show")) {
        var i = this._axisGroup, a = this._axisGroup = new Ve();
        this.group.add(a);
        var o = n.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), c = o.getMinorTicksCoords(), f = l.getExtent()[0], d = o.getExtent(), h = YQe(s, n, f), p = new Kr(n, h);
        k(jQe, p.add, p), a.add(p.getGroup()), W0(i, a, n), k(ZQe, function(v) {
          n.get([v, "show"]) && !o.scale.isBlank() && XQe[v](this.group, n, s, f, d, u, c);
        }, this);
      }
    }, e.type = "radiusAxis", e;
  }(Wf)
), XQe = {
  splitLine: function(t, e, n, r, i, a) {
    var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0, c = n.getAngleAxis(), f = Math.PI / 180, d = c.getExtent(), h = Math.abs(d[1] - d[0]) === 360 ? "Circle" : "Arc";
    l = l instanceof Array ? l : [l];
    for (var p = [], v = 0; v < a.length; v++) {
      var g = u++ % l.length;
      p[g] = p[g] || [], p[g].push(new Lf[h]({
        shape: {
          cx: n.cx,
          cy: n.cy,
          // ensure circle radius >= 0
          r: Math.max(a[v].coord, 0),
          startAngle: -d[0] * f,
          endAngle: -d[1] * f,
          clockwise: c.inverse
        }
      }));
    }
    for (var v = 0; v < p.length; v++)
      t.add(Li(p[v], {
        style: Re({
          stroke: l[v % l.length],
          fill: null
        }, s.getLineStyle()),
        silent: !0
      }));
  },
  minorSplitLine: function(t, e, n, r, i, a, o) {
    if (o.length) {
      for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], c = 0; c < o.length; c++)
        for (var f = 0; f < o[c].length; f++)
          u.push(new ll({
            shape: {
              cx: n.cx,
              cy: n.cy,
              r: o[c][f].coord
            }
          }));
      t.add(Li(u, {
        style: Re({
          fill: null
        }, l.getLineStyle()),
        silent: !0
      }));
    }
  },
  splitArea: function(t, e, n, r, i, a) {
    if (a.length) {
      var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
      l = l instanceof Array ? l : [l];
      for (var c = [], f = a[0].coord, d = 1; d < a.length; d++) {
        var h = u++ % l.length;
        c[h] = c[h] || [], c[h].push(new ri({
          shape: {
            cx: n.cx,
            cy: n.cy,
            r0: f,
            r: a[d].coord,
            startAngle: 0,
            endAngle: Math.PI * 2
          },
          silent: !0
        })), f = a[d].coord;
      }
      for (var d = 0; d < c.length; d++)
        t.add(Li(c[d], {
          style: Re({
            fill: l[d % l.length]
          }, s.getAreaStyle()),
          silent: !0
        }));
    }
  }
};
function YQe(t, e, n) {
  return {
    position: [t.cx, t.cy],
    rotation: n / 180 * Math.PI,
    labelDirection: -1,
    tickDirection: -1,
    nameDirection: 1,
    labelRotate: e.getModel("axisLabel").get("rotate"),
    // Over splitLine and splitArea
    z2: 1
  };
}
function Lre(t) {
  return t.get("stack") || "__ec_stack_" + t.seriesIndex;
}
function Nre(t, e) {
  return e.dim + t.model.componentIndex;
}
function qQe(t, e, n) {
  var r = {}, i = KQe(Nt(e.getSeriesByType(t), function(a) {
    return !e.isSeriesFiltered(a) && a.coordinateSystem && a.coordinateSystem.type === "polar";
  }));
  e.eachSeriesByType(t, function(a) {
    if (a.coordinateSystem.type === "polar") {
      var o = a.getData(), s = a.coordinateSystem, l = s.getBaseAxis(), u = Nre(s, l), c = Lre(a), f = i[u][c], d = f.offset, h = f.width, p = s.getOtherAxis(l), v = a.coordinateSystem.cx, g = a.coordinateSystem.cy, m = a.get("barMinHeight") || 0, y = a.get("barMinAngle") || 0;
      r[c] = r[c] || [];
      for (var b = o.mapDimension(p.dim), _ = o.mapDimension(l.dim), O = Xs(
        o,
        b
        /* , baseDim */
      ), S = l.dim !== "radius" || !a.get("roundCap", !0), x = p.model, C = x.get("startValue"), T = p.dataToCoord(C || 0), w = 0, P = o.count(); w < P; w++) {
        var $ = o.get(b, w), A = o.get(_, w), D = $ >= 0 ? "p" : "n", E = T;
        O && (r[c][A] || (r[c][A] = {
          p: T,
          n: T
          // Negative stack
        }), E = r[c][A][D]);
        var R = void 0, N = void 0, V = void 0, z = void 0;
        if (p.dim === "radius") {
          var W = p.dataToCoord($) - T, F = l.dataToCoord(A);
          Math.abs(W) < m && (W = (W < 0 ? -1 : 1) * m), R = E, N = E + W, V = F - d, z = V - h, O && (r[c][A][D] = N);
        } else {
          var Q = p.dataToCoord($, S) - T, Z = l.dataToCoord(A);
          Math.abs(Q) < y && (Q = (Q < 0 ? -1 : 1) * y), R = Z + d, N = R + h, V = E, z = E + Q, O && (r[c][A][D] = z);
        }
        o.setItemLayout(w, {
          cx: v,
          cy: g,
          r0: R,
          r: N,
          // Consider that positive angle is anti-clockwise,
          // while positive radian of sector is clockwise
          startAngle: -V * Math.PI / 180,
          endAngle: -z * 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: V >= z
        });
      }
    }
  });
}
function KQe(t) {
  var e = {};
  k(t, function(r, i) {
    var a = r.getData(), o = r.coordinateSystem, s = o.getBaseAxis(), l = Nre(o, s), u = s.getExtent(), c = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / a.count(), f = e[l] || {
      bandWidth: c,
      remainedWidth: c,
      autoWidthCount: 0,
      categoryGap: "20%",
      gap: "30%",
      stacks: {}
    }, d = f.stacks;
    e[l] = f;
    var h = Lre(r);
    d[h] || f.autoWidthCount++, d[h] = d[h] || {
      width: 0,
      maxWidth: 0
    };
    var p = _e(r.get("barWidth"), c), v = _e(r.get("barMaxWidth"), c), g = r.get("barGap"), m = r.get("barCategoryGap");
    p && !d[h].width && (p = Math.min(f.remainedWidth, p), d[h].width = p, f.remainedWidth -= p), v && (d[h].maxWidth = v), g != null && (f.gap = g), m != null && (f.categoryGap = m);
  });
  var n = {};
  return k(e, function(r, i) {
    n[i] = {};
    var a = r.stacks, o = r.bandWidth, s = _e(r.categoryGap, o), l = _e(r.gap, 1), u = r.remainedWidth, c = r.autoWidthCount, f = (u - s) / (c + (c - 1) * l);
    f = Math.max(f, 0), k(a, function(v, g) {
      var m = v.maxWidth;
      m && m < f && (m = Math.min(m, u), v.width && (m = Math.min(m, v.width)), u -= m, v.width = m, c--);
    }), f = (u - s) / (c + (c - 1) * l), f = Math.max(f, 0);
    var d = 0, h;
    k(a, function(v, g) {
      v.width || (v.width = f), h = v, d += v.width * (1 + l);
    }), h && (d -= h.width * l);
    var p = -d / 2;
    k(a, function(v, g) {
      n[i][g] = n[i][g] || {
        offset: p,
        width: v.width
      }, p += v.width * (1 + l);
    });
  }), n;
}
var JQe = {
  startAngle: 90,
  clockwise: !0,
  splitNumber: 12,
  axisLabel: {
    rotate: 0
  }
}, eHe = {
  splitNumber: 5
}, tHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "polar", e;
  }(Xt)
);
function nHe(t) {
  at(ey), Wf.registerAxisPointerClass("PolarAxisPointer", EQe), t.registerCoordinateSystem("polar", WQe), t.registerComponentModel(DQe), t.registerComponentView(tHe), Qh(t, "angle", RQe, JQe), Qh(t, "radius", kQe, eHe), t.registerComponentView(HQe), t.registerComponentView(UQe), t.registerLayout(Ue(qQe, "bar"));
}
function ME(t, e) {
  e = e || {};
  var n = t.coordinateSystem, r = t.axis, i = {}, a = r.position, o = r.orient, s = n.getRect(), l = [s.x, s.x + s.width, s.y, s.y + s.height], u = {
    horizontal: {
      top: l[2],
      bottom: l[3]
    },
    vertical: {
      left: l[0],
      right: l[1]
    }
  };
  i.position = [o === "vertical" ? u.vertical[a] : l[0], o === "horizontal" ? u.horizontal[a] : l[3]];
  var c = {
    horizontal: 0,
    vertical: 1
  };
  i.rotation = Math.PI / 2 * c[o];
  var f = {
    top: -1,
    bottom: 1,
    right: 1,
    left: -1
  };
  i.labelDirection = i.tickDirection = i.nameDirection = f[a], t.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), Tn(e.labelInside, t.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
  var d = e.rotate;
  return d == null && (d = t.get(["axisLabel", "rotate"])), i.labelRotation = a === "top" ? -d : d, i.z2 = 1, i;
}
var rHe = ["axisLine", "axisTickLabel", "axisName"], iHe = ["splitArea", "splitLine"], aHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.axisPointerClass = "SingleAxisPointer", n;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this.group;
      o.removeAll();
      var s = this._axisGroup;
      this._axisGroup = new Ve();
      var l = ME(n), u = new Kr(n, l);
      k(rHe, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), k(iHe, function(c) {
        n.get([c, "show"]) && oHe[c](this, this.group, this._axisGroup, n);
      }, this), W0(s, this._axisGroup, n), t.prototype.render.call(this, n, r, i, a);
    }, e.prototype.remove = function() {
      rne(this);
    }, e.type = "singleAxis", e;
  }(Wf)
), oHe = {
  splitLine: function(t, e, n, r) {
    var i = r.axis;
    if (!i.scale.isBlank()) {
      var a = r.getModel("splitLine"), o = a.getModel("lineStyle"), s = o.get("color");
      s = s instanceof Array ? s : [s];
      for (var l = o.get("width"), u = r.coordinateSystem.getRect(), c = i.isHorizontal(), f = [], d = 0, h = i.getTicksCoords({
        tickModel: a
      }), p = [], v = [], g = 0; g < h.length; ++g) {
        var m = i.toGlobalCoord(h[g].coord);
        c ? (p[0] = m, p[1] = u.y, v[0] = m, v[1] = u.y + u.height) : (p[0] = u.x, p[1] = m, v[0] = u.x + u.width, v[1] = m);
        var y = new Un({
          shape: {
            x1: p[0],
            y1: p[1],
            x2: v[0],
            y2: v[1]
          },
          silent: !0
        });
        zh(y.shape, l);
        var b = d++ % s.length;
        f[b] = f[b] || [], f[b].push(y);
      }
      for (var _ = o.getLineStyle(["color"]), g = 0; g < f.length; ++g)
        e.add(Li(f[g], {
          style: Re({
            stroke: s[g % s.length]
          }, _),
          silent: !0
        }));
    }
  },
  splitArea: function(t, e, n, r) {
    nne(t, n, r, r);
  }
}, Y_ = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.getCoordSysModel = function() {
      return this;
    }, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
      left: "5%",
      top: "5%",
      right: "5%",
      bottom: "5%",
      type: "value",
      position: "bottom",
      orient: "horizontal",
      axisLine: {
        show: !0,
        lineStyle: {
          width: 1,
          type: "solid"
        }
      },
      // Single coordinate system and single axis is the,
      // which is used as the parent tooltip model.
      // same model, so we set default tooltip show as true.
      tooltip: {
        show: !0
      },
      axisTick: {
        show: !0,
        length: 6,
        lineStyle: {
          width: 1
        }
      },
      axisLabel: {
        show: !0,
        interval: "auto"
      },
      splitLine: {
        show: !0,
        lineStyle: {
          type: "dashed",
          opacity: 0.2
        }
      }
    }, e;
  }(rt)
);
xn(Y_, Tp.prototype);
var sHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a, o) {
      var s = t.call(this, n, r, i) || this;
      return s.type = a || "value", s.position = o || "bottom", s;
    }
    return e.prototype.isHorizontal = function() {
      var n = this.position;
      return n === "top" || n === "bottom";
    }, e.prototype.pointToData = function(n, r) {
      return this.coordinateSystem.pointToData(n)[0];
    }, e;
  }(Ba)
), Bre = ["single"], lHe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "single", this.dimension = "single", this.dimensions = Bre, this.axisPointerEnabled = !0, this.model = e, this._init(e, n, r);
    }
    return t.prototype._init = function(e, n, r) {
      var i = this.dimension, a = new sHe(i, G0(e), [0, 0], e.get("type"), e.get("position")), o = a.type === "category";
      a.onBand = o && e.get("boundaryGap"), a.inverse = e.get("inverse"), a.orient = e.get("orient"), e.axis = a, a.model = e, a.coordinateSystem = this, this._axis = a;
    }, t.prototype.update = function(e, n) {
      e.eachSeries(function(r) {
        if (r.coordinateSystem === this) {
          var i = r.getData();
          k(i.mapDimensionsAll(this.dimension), function(a) {
            this._axis.scale.unionExtentFromData(i, a);
          }, this), Of(this._axis.scale, this._axis.model);
        }
      }, this);
    }, t.prototype.resize = function(e, n) {
      this._rect = Rn({
        left: e.get("left"),
        top: e.get("top"),
        right: e.get("right"),
        bottom: e.get("bottom"),
        width: e.get("width"),
        height: e.get("height")
      }, {
        width: n.getWidth(),
        height: n.getHeight()
      }), this._adjustAxis();
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype._adjustAxis = function() {
      var e = this._rect, n = this._axis, r = n.isHorizontal(), i = r ? [0, e.width] : [0, e.height], a = n.inverse ? 1 : 0;
      n.setExtent(i[a], i[1 - a]), this._updateAxisTransform(n, r ? e.x : e.y);
    }, t.prototype._updateAxisTransform = function(e, n) {
      var r = e.getExtent(), i = r[0] + r[1], a = e.isHorizontal();
      e.toGlobalCoord = a ? function(o) {
        return o + n;
      } : function(o) {
        return i - o + n;
      }, e.toLocalCoord = a ? function(o) {
        return o - n;
      } : function(o) {
        return i - o + n;
      };
    }, t.prototype.getAxis = function() {
      return this._axis;
    }, t.prototype.getBaseAxis = function() {
      return this._axis;
    }, t.prototype.getAxes = function() {
      return [this._axis];
    }, t.prototype.getTooltipAxes = function() {
      return {
        baseAxes: [this.getAxis()],
        // Empty otherAxes
        otherAxes: []
      };
    }, t.prototype.containPoint = function(e) {
      var n = this.getRect(), r = this.getAxis(), i = r.orient;
      return i === "horizontal" ? r.contain(r.toLocalCoord(e[0])) && e[1] >= n.y && e[1] <= n.y + n.height : r.contain(r.toLocalCoord(e[1])) && e[0] >= n.y && e[0] <= n.y + n.height;
    }, t.prototype.pointToData = function(e) {
      var n = this.getAxis();
      return [n.coordToData(n.toLocalCoord(e[n.orient === "horizontal" ? 0 : 1]))];
    }, t.prototype.dataToPoint = function(e) {
      var n = this.getAxis(), r = this.getRect(), i = [], a = n.orient === "horizontal" ? 0 : 1;
      return e instanceof Array && (e = e[0]), i[a] = n.toGlobalCoord(n.dataToCoord(+e)), i[1 - a] = a === 0 ? r.y + r.height / 2 : r.x + r.width / 2, i;
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = o7(n);
      return i === this ? this.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = o7(n);
      return i === this ? this.pointToData(r) : null;
    }, t;
  }()
);
function o7(t) {
  var e = t.seriesModel, n = t.singleAxisModel;
  return n && n.coordinateSystem || e && e.coordinateSystem;
}
function uHe(t, e) {
  var n = [];
  return t.eachComponent("singleAxis", function(r, i) {
    var a = new lHe(r, t, e);
    a.name = "single_" + i, a.resize(r, e), r.coordinateSystem = a, n.push(a);
  }), t.eachSeries(function(r) {
    if (r.get("coordinateSystem") === "singleAxis") {
      var i = r.getReferringComponents("singleAxis", Dn).models[0];
      r.coordinateSystem = i && i.coordinateSystem;
    }
  }), n;
}
var cHe = {
  create: uHe,
  dimensions: Bre
}, s7 = ["x", "y"], fHe = ["width", "height"], dHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.makeElOption = function(n, r, i, a, o) {
      var s = i.axis, l = s.coordinateSystem, u = jP(l, 1 - FO(s)), c = l.dataToPoint(r)[0], f = a.get("type");
      if (f && f !== "none") {
        var d = vL(a), h = hHe[f](s, c, u);
        h.style = d, n.graphicKey = h.type, n.pointer = h;
      }
      var p = ME(i);
      Mre(
        // @ts-ignore
        r,
        n,
        p,
        i,
        a,
        o
      );
    }, e.prototype.getHandleTransform = function(n, r, i) {
      var a = ME(r, {
        labelInside: !1
      });
      a.labelMargin = i.get(["handle", "margin"]);
      var o = gL(r.axis, n, a);
      return {
        x: o[0],
        y: o[1],
        rotation: a.rotation + (a.labelDirection < 0 ? Math.PI : 0)
      };
    }, e.prototype.updateHandleTransform = function(n, r, i, a) {
      var o = i.axis, s = o.coordinateSystem, l = FO(o), u = jP(s, l), c = [n.x, n.y];
      c[l] += r[l], c[l] = Math.min(u[1], c[l]), c[l] = Math.max(u[0], c[l]);
      var f = jP(s, 1 - l), d = (f[1] + f[0]) / 2, h = [d, d];
      return h[l] = c[l], {
        x: c[0],
        y: c[1],
        rotation: n.rotation,
        cursorPoint: h,
        tooltipOption: {
          verticalAlign: "middle"
        }
      };
    }, e;
  }(pL)
), hHe = {
  line: function(t, e, n) {
    var r = mL([e, n[0]], [e, n[1]], FO(t));
    return {
      type: "Line",
      subPixelOptimize: !0,
      shape: r
    };
  },
  shadow: function(t, e, n) {
    var r = t.getBandWidth(), i = n[1] - n[0];
    return {
      type: "Rect",
      shape: Ire([e - r / 2, n[0]], [r, i], FO(t))
    };
  }
};
function FO(t) {
  return t.isHorizontal() ? 0 : 1;
}
function jP(t, e) {
  var n = t.getRect();
  return [n[s7[e]], n[s7[e]] + n[fHe[e]]];
}
var pHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "single", e;
  }(Xt)
);
function vHe(t) {
  at(ey), Wf.registerAxisPointerClass("SingleAxisPointer", dHe), t.registerComponentView(pHe), t.registerComponentView(aHe), t.registerComponentModel(Y_), Qh(t, "single", Y_, Y_.defaultOption), t.registerCoordinateSystem("single", cHe);
}
var gHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = bp(n);
      t.prototype.init.apply(this, arguments), l7(n, a);
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), l7(this.option, n);
    }, e.prototype.getCellSize = function() {
      return this.option.cellSize;
    }, e.type = "calendar", e.defaultOption = {
      // zlevel: 0,
      z: 2,
      left: 80,
      top: 60,
      cellSize: 20,
      // horizontal vertical
      orient: "horizontal",
      // month separate line style
      splitLine: {
        show: !0,
        lineStyle: {
          color: "#000",
          width: 1,
          type: "solid"
        }
      },
      // rect style  temporarily unused emphasis
      itemStyle: {
        color: "#fff",
        borderWidth: 1,
        borderColor: "#ccc"
      },
      // week text style
      dayLabel: {
        show: !0,
        firstDay: 0,
        // start end
        position: "start",
        margin: "50%",
        color: "#000"
      },
      // month text style
      monthLabel: {
        show: !0,
        // start end
        position: "start",
        margin: 5,
        // center or left
        align: "center",
        formatter: null,
        color: "#000"
      },
      // year text style
      yearLabel: {
        show: !0,
        // top bottom left right
        position: null,
        margin: 30,
        formatter: null,
        color: "#ccc",
        fontFamily: "sans-serif",
        fontWeight: "bolder",
        fontSize: 20
      }
    }, e;
  }(rt)
);
function l7(t, e) {
  var n = t.cellSize, r;
  ue(n) ? r = n : r = t.cellSize = [n, n], r.length === 1 && (r[1] = r[0]);
  var i = ce([0, 1], function(a) {
    return mLe(e, a) && (r[a] = "auto"), r[a] != null && r[a] !== "auto";
  });
  cu(t, e, {
    type: "box",
    ignoreSize: i
  });
}
var mHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      var a = this.group;
      a.removeAll();
      var o = n.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = r.getLocaleModel();
      this._renderDayRect(n, s, a), this._renderLines(n, s, l, a), this._renderYearText(n, s, l, a), this._renderMonthText(n, u, l, a), this._renderWeekText(n, u, s, l, a);
    }, e.prototype._renderDayRect = function(n, r, i) {
      for (var a = n.coordinateSystem, o = n.getModel("itemStyle").getItemStyle(), s = a.getCellWidth(), l = a.getCellHeight(), u = r.start.time; u <= r.end.time; u = a.getNextNDay(u, 1).time) {
        var c = a.dataToRect([u], !1).tl, f = new mt({
          shape: {
            x: c[0],
            y: c[1],
            width: s,
            height: l
          },
          cursor: "default",
          style: o
        });
        i.add(f);
      }
    }, e.prototype._renderLines = function(n, r, i, a) {
      var o = this, s = n.coordinateSystem, l = n.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = n.get(["splitLine", "show"]), c = l.lineWidth;
      this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
      for (var f = r.start, d = 0; f.time <= r.end.time; d++) {
        p(f.formatedDate), d === 0 && (f = s.getDateInfo(r.start.y + "-" + r.start.m));
        var h = f.date;
        h.setMonth(h.getMonth() + 1), f = s.getDateInfo(h);
      }
      p(s.getNextNDay(r.end.time, 1).formatedDate);
      function p(v) {
        o._firstDayOfMonth.push(s.getDateInfo(v)), o._firstDayPoints.push(s.dataToRect([v], !1).tl);
        var g = o._getLinePointsOfOneWeek(n, v, i);
        o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, a);
      }
      u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, c, i), l, a), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, c, i), l, a);
    }, e.prototype._getEdgesPoints = function(n, r, i) {
      var a = [n[0].slice(), n[n.length - 1].slice()], o = i === "horizontal" ? 0 : 1;
      return a[0][o] = a[0][o] - r / 2, a[1][o] = a[1][o] + r / 2, a;
    }, e.prototype._drawSplitline = function(n, r, i) {
      var a = new ai({
        z2: 20,
        shape: {
          points: n
        },
        style: r
      });
      i.add(a);
    }, e.prototype._getLinePointsOfOneWeek = function(n, r, i) {
      for (var a = n.coordinateSystem, o = a.getDateInfo(r), s = [], l = 0; l < 7; l++) {
        var u = a.getNextNDay(o.time, l), c = a.dataToRect([u.time], !1);
        s[2 * u.day] = c.tl, s[2 * u.day + 1] = c[i === "horizontal" ? "bl" : "tr"];
      }
      return s;
    }, e.prototype._formatterLabel = function(n, r) {
      return Oe(n) && n ? hLe(n, r) : Me(n) ? n(r) : r.nameMap;
    }, e.prototype._yearTextPositionControl = function(n, r, i, a, o) {
      var s = r[0], l = r[1], u = ["center", "bottom"];
      a === "bottom" ? (l += o, u = ["center", "top"]) : a === "left" ? s -= o : a === "right" ? (s += o, u = ["center", "top"]) : l -= o;
      var c = 0;
      return (a === "left" || a === "right") && (c = Math.PI / 2), {
        rotation: c,
        x: s,
        y: l,
        style: {
          align: u[0],
          verticalAlign: u[1]
        }
      };
    }, e.prototype._renderYearText = function(n, r, i, a) {
      var o = n.getModel("yearLabel");
      if (o.get("show")) {
        var s = o.get("margin"), l = o.get("position");
        l || (l = i !== "horizontal" ? "top" : "left");
        var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], c = (u[0][0] + u[1][0]) / 2, f = (u[0][1] + u[1][1]) / 2, d = i === "horizontal" ? 0 : 1, h = {
          top: [c, u[d][1]],
          bottom: [c, u[1 - d][1]],
          left: [u[1 - d][0], f],
          right: [u[d][0], f]
        }, p = r.start.y;
        +r.end.y > +r.start.y && (p = p + "-" + r.end.y);
        var v = o.get("formatter"), g = {
          start: r.start.y,
          end: r.end.y,
          nameMap: p
        }, m = this._formatterLabel(v, g), y = new gt({
          z2: 30,
          style: Zt(o, {
            text: m
          })
        });
        y.attr(this._yearTextPositionControl(y, h[l], i, l, s)), a.add(y);
      }
    }, e.prototype._monthTextPositionControl = function(n, r, i, a, o) {
      var s = "left", l = "top", u = n[0], c = n[1];
      return i === "horizontal" ? (c = c + o, r && (s = "center"), a === "start" && (l = "bottom")) : (u = u + o, r && (l = "middle"), a === "start" && (s = "right")), {
        x: u,
        y: c,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderMonthText = function(n, r, i, a) {
      var o = n.getModel("monthLabel");
      if (o.get("show")) {
        var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), c = o.get("align"), f = [this._tlpoints, this._blpoints];
        (!s || Oe(s)) && (s && (r = zA(s) || r), s = r.get(["time", "monthAbbr"]) || []);
        var d = u === "start" ? 0 : 1, h = i === "horizontal" ? 0 : 1;
        l = u === "start" ? -l : l;
        for (var p = c === "center", v = 0; v < f[d].length - 1; v++) {
          var g = f[d][v].slice(), m = this._firstDayOfMonth[v];
          if (p) {
            var y = this._firstDayPoints[v];
            g[h] = (y[h] + f[0][v + 1][h]) / 2;
          }
          var b = o.get("formatter"), _ = s[+m.m - 1], O = {
            yyyy: m.y,
            yy: (m.y + "").slice(2),
            MM: m.m,
            M: +m.m,
            nameMap: _
          }, S = this._formatterLabel(b, O), x = new gt({
            z2: 30,
            style: le(Zt(o, {
              text: S
            }), this._monthTextPositionControl(g, p, i, u, l))
          });
          a.add(x);
        }
      }
    }, e.prototype._weekTextPositionControl = function(n, r, i, a, o) {
      var s = "center", l = "middle", u = n[0], c = n[1], f = i === "start";
      return r === "horizontal" ? (u = u + a + (f ? 1 : -1) * o[0] / 2, s = f ? "right" : "left") : (c = c + a + (f ? 1 : -1) * o[1] / 2, l = f ? "bottom" : "top"), {
        x: u,
        y: c,
        align: s,
        verticalAlign: l
      };
    }, e.prototype._renderWeekText = function(n, r, i, a, o) {
      var s = n.getModel("dayLabel");
      if (s.get("show")) {
        var l = n.coordinateSystem, u = s.get("position"), c = s.get("nameMap"), f = s.get("margin"), d = l.getFirstDayOfWeek();
        if (!c || Oe(c)) {
          c && (r = zA(c) || r);
          var h = r.get(["time", "dayOfWeekShort"]);
          c = h || ce(r.get(["time", "dayOfWeekAbbr"]), function(O) {
            return O[0];
          });
        }
        var p = l.getNextNDay(i.end.time, 7 - i.lweek).time, v = [l.getCellWidth(), l.getCellHeight()];
        f = _e(f, Math.min(v[1], v[0])), u === "start" && (p = l.getNextNDay(i.start.time, -(7 + i.fweek)).time, f = -f);
        for (var g = 0; g < 7; g++) {
          var m = l.getNextNDay(p, g), y = l.dataToRect([m.time], !1).center, b = g;
          b = Math.abs((g + d) % 7);
          var _ = new gt({
            z2: 30,
            style: le(Zt(s, {
              text: c[b]
            }), this._weekTextPositionControl(y, a, u, f, v))
          });
          o.add(_);
        }
      }
    }, e.type = "calendar", e;
  }(Xt)
), ZP = 864e5, yHe = (
  /** @class */
  function() {
    function t(e, n, r) {
      this.type = "calendar", this.dimensions = t.dimensions, this.getDimensionsInfo = t.getDimensionsInfo, this._model = e;
    }
    return t.getDimensionsInfo = function() {
      return [{
        name: "time",
        type: "time"
      }, "value"];
    }, t.prototype.getRangeInfo = function() {
      return this._rangeInfo;
    }, t.prototype.getModel = function() {
      return this._model;
    }, t.prototype.getRect = function() {
      return this._rect;
    }, t.prototype.getCellWidth = function() {
      return this._sw;
    }, t.prototype.getCellHeight = function() {
      return this._sh;
    }, t.prototype.getOrient = function() {
      return this._orient;
    }, t.prototype.getFirstDayOfWeek = function() {
      return this._firstDayOfWeek;
    }, t.prototype.getDateInfo = function(e) {
      e = Yi(e);
      var n = e.getFullYear(), r = e.getMonth() + 1, i = r < 10 ? "0" + r : "" + r, a = e.getDate(), o = a < 10 ? "0" + a : "" + a, s = e.getDay();
      return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
        y: n + "",
        m: i,
        d: o,
        day: s,
        time: e.getTime(),
        formatedDate: n + "-" + i + "-" + o,
        date: e
      };
    }, t.prototype.getNextNDay = function(e, n) {
      return n = n || 0, n === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + n), this.getDateInfo(e));
    }, t.prototype.update = function(e, n) {
      this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
      var r = this._rangeInfo.weeks || 1, i = ["width", "height"], a = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [r, 7] : [7, r];
      k([0, 1], function(f) {
        c(a, f) && (o[i[f]] = a[f] * s[f]);
      });
      var l = {
        width: n.getWidth(),
        height: n.getHeight()
      }, u = this._rect = Rn(o, l);
      k([0, 1], function(f) {
        c(a, f) || (a[f] = u[i[f]] / s[f]);
      });
      function c(f, d) {
        return f[d] != null && f[d] !== "auto";
      }
      this._sw = a[0], this._sh = a[1];
    }, t.prototype.dataToPoint = function(e, n) {
      ue(e) && (e = e[0]), n == null && (n = !0);
      var r = this.getDateInfo(e), i = this._rangeInfo, a = r.formatedDate;
      if (n && !(r.time >= i.start.time && r.time < i.end.time + ZP))
        return [NaN, NaN];
      var o = r.day, s = this._getRangeInfo([i.start.time, a]).nthWeek;
      return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2];
    }, t.prototype.pointToData = function(e) {
      var n = this.pointToDate(e);
      return n && n.time;
    }, t.prototype.dataToRect = function(e, n) {
      var r = this.dataToPoint(e, n);
      return {
        contentShape: {
          x: r[0] - (this._sw - this._lineWidth) / 2,
          y: r[1] - (this._sh - this._lineWidth) / 2,
          width: this._sw - this._lineWidth,
          height: this._sh - this._lineWidth
        },
        center: r,
        tl: [r[0] - this._sw / 2, r[1] - this._sh / 2],
        tr: [r[0] + this._sw / 2, r[1] - this._sh / 2],
        br: [r[0] + this._sw / 2, r[1] + this._sh / 2],
        bl: [r[0] - this._sw / 2, r[1] + this._sh / 2]
      };
    }, t.prototype.pointToDate = function(e) {
      var n = Math.floor((e[0] - this._rect.x) / this._sw) + 1, r = Math.floor((e[1] - this._rect.y) / this._sh) + 1, i = this._rangeInfo.range;
      return this._orient === "vertical" ? this._getDateByWeeksAndDay(r, n - 1, i) : this._getDateByWeeksAndDay(n, r - 1, i);
    }, t.prototype.convertToPixel = function(e, n, r) {
      var i = u7(n);
      return i === this ? i.dataToPoint(r) : null;
    }, t.prototype.convertFromPixel = function(e, n, r) {
      var i = u7(n);
      return i === this ? i.pointToData(r) : null;
    }, t.prototype.containPoint = function(e) {
      return console.warn("Not implemented."), !1;
    }, t.prototype._initRangeOption = function() {
      var e = this._model.get("range"), n;
      if (ue(e) && e.length === 1 && (e = e[0]), ue(e))
        n = e;
      else {
        var r = e.toString();
        if (/^\d{4}$/.test(r) && (n = [r + "-01-01", r + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(r)) {
          var i = this.getDateInfo(r), a = i.date;
          a.setMonth(a.getMonth() + 1);
          var o = this.getNextNDay(a, -1);
          n = [i.formatedDate, o.formatedDate];
        }
        /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(r) && (n = [r, r]);
      }
      if (!n)
        return process.env.NODE_ENV !== "production" && Oa("Invalid date range."), e;
      var s = this._getRangeInfo(n);
      return s.start.time > s.end.time && n.reverse(), n;
    }, t.prototype._getRangeInfo = function(e) {
      var n = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], r;
      n[0].time > n[1].time && (r = !0, n.reverse());
      var i = Math.floor(n[1].time / ZP) - Math.floor(n[0].time / ZP) + 1, a = new Date(n[0].time), o = a.getDate(), s = n[1].date.getDate();
      a.setDate(o + i - 1);
      var l = a.getDate();
      if (l !== s)
        for (var u = a.getTime() - n[1].time > 0 ? 1 : -1; (l = a.getDate()) !== s && (a.getTime() - n[1].time) * u > 0; )
          i -= u, a.setDate(l - u);
      var c = Math.floor((i + n[0].day + 6) / 7), f = r ? -c + 1 : c - 1;
      return r && n.reverse(), {
        range: [n[0].formatedDate, n[1].formatedDate],
        start: n[0],
        end: n[1],
        allDay: i,
        weeks: c,
        // From 0.
        nthWeek: f,
        fweek: n[0].day,
        lweek: n[1].day
      };
    }, t.prototype._getDateByWeeksAndDay = function(e, n, r) {
      var i = this._getRangeInfo(r);
      if (e > i.weeks || e === 0 && n < i.fweek || e === i.weeks && n > i.lweek)
        return null;
      var a = (e - 1) * 7 - i.fweek + n, o = new Date(i.start.time);
      return o.setDate(+i.start.d + a), this.getDateInfo(o);
    }, t.create = function(e, n) {
      var r = [];
      return e.eachComponent("calendar", function(i) {
        var a = new t(i);
        r.push(a), i.coordinateSystem = a;
      }), e.eachSeries(function(i) {
        i.get("coordinateSystem") === "calendar" && (i.coordinateSystem = r[i.get("calendarIndex") || 0]);
      }), r;
    }, t.dimensions = ["time", "value"], t;
  }()
);
function u7(t) {
  var e = t.calendarModel, n = t.seriesModel, r = e ? e.coordinateSystem : n ? n.coordinateSystem : null;
  return r;
}
function bHe(t) {
  t.registerComponentModel(gHe), t.registerComponentView(mHe), t.registerCoordinateSystem("calendar", yHe);
}
function _He(t, e) {
  var n = t.existing;
  if (e.id = t.keyInfo.id, !e.type && n && (e.type = n.type), e.parentId == null) {
    var r = e.parentOption;
    r ? e.parentId = r.id : n && (e.parentId = n.parentId);
  }
  e.parentOption = null;
}
function c7(t, e) {
  var n;
  return k(e, function(r) {
    t[r] != null && t[r] !== "auto" && (n = !0);
  }), n;
}
function OHe(t, e, n) {
  var r = le({}, n), i = t[e], a = n.$action || "merge";
  if (a === "merge")
    if (i) {
      if (process.env.NODE_ENV !== "production") {
        var o = n.type;
        ke(!o || i.type === o, 'Please set $action: "replace" to change `type`');
      }
      qe(i, r, !0), cu(i, r, {
        ignoreSize: !0
      }), PJ(n, i), Rb(n, i), Rb(n, i, "shape"), Rb(n, i, "style"), Rb(n, i, "extra"), n.clipPath = i.clipPath;
    } else
      t[e] = r;
  else a === "replace" ? t[e] = r : a === "remove" && i && (t[e] = null);
}
var zre = ["transition", "enterFrom", "leaveTo"], SHe = zre.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
function Rb(t, e, n) {
  if (n && (!t[n] && e[n] && (t[n] = {}), t = t[n], e = e[n]), !(!t || !e))
    for (var r = n ? zre : SHe, i = 0; i < r.length; i++) {
      var a = r[i];
      t[a] == null && e[a] != null && (t[a] = e[a]);
    }
}
function xHe(t, e) {
  if (t && (t.hv = e.hv = [
    // Rigid body, don't care about `width`.
    c7(e, ["left", "right"]),
    // Rigid body, don't care about `height`.
    c7(e, ["top", "bottom"])
  ], t.type === "group")) {
    var n = t, r = e;
    n.width == null && (n.width = r.width = 0), n.height == null && (n.height = r.height = 0);
  }
}
var wHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.preventAutoZ = !0, n;
    }
    return e.prototype.mergeOption = function(n, r) {
      var i = this.option.elements;
      this.option.elements = null, t.prototype.mergeOption.call(this, n, r), this.option.elements = i;
    }, e.prototype.optionUpdated = function(n, r) {
      var i = this.option, a = (r ? i : n).elements, o = i.elements = r ? [] : i.elements, s = [];
      this._flatten(a, s, null);
      var l = hK(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
      k(l, function(c, f) {
        var d = c.newOption;
        process.env.NODE_ENV !== "production" && ke(Ie(d) || c.existing, "Empty graphic option definition"), d && (u.push(d), _He(c, d), OHe(o, f, d), xHe(o[f], d));
      }, this), i.elements = Nt(o, function(c) {
        return c && delete c.$action, c != null;
      });
    }, e.prototype._flatten = function(n, r, i) {
      k(n, function(a) {
        if (a) {
          i && (a.parentOption = i), r.push(a);
          var o = a.children;
          o && o.length && this._flatten(o, r, a), delete a.children;
        }
      }, this);
    }, e.prototype.useElOptionsToUpdate = function() {
      var n = this._elOptionsToUpdate;
      return this._elOptionsToUpdate = null, n;
    }, e.type = "graphic", e.defaultOption = {
      elements: []
      // parentId: null
    }, e;
  }(rt)
), f7 = {
  // Reserved but not supported in graphic component.
  path: null,
  compoundPath: null,
  // Supported in graphic component.
  group: Ve,
  image: lr,
  text: gt
}, ca = bt(), CHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this._elMap = Pe();
    }, e.prototype.render = function(n, r, i) {
      n !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = n, this._updateElements(n), this._relocate(n, i);
    }, e.prototype._updateElements = function(n) {
      var r = n.useElOptionsToUpdate();
      if (r) {
        var i = this._elMap, a = this.group, o = n.get("z"), s = n.get("zlevel");
        k(r, function(l) {
          var u = Vn(l.id, null), c = u != null ? i.get(u) : null, f = Vn(l.parentId, null), d = f != null ? i.get(f) : a, h = l.type, p = l.style;
          h === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
          var v = l.textContent, g = l.textConfig;
          if (p && yre(p, h, !!g, !!v)) {
            var m = bre(p, h, !0);
            !g && m.textConfig && (g = l.textConfig = m.textConfig), !v && m.textContent && (v = m.textContent);
          }
          var y = THe(l);
          process.env.NODE_ENV !== "production" && c && ke(d === c.parent, "Changing parent is not supported.");
          var b = l.$action || "merge", _ = b === "merge", O = b === "replace";
          if (_) {
            var S = !c, x = c;
            S ? x = d7(u, d, l.type, i) : (x && (ca(x).isNew = !1), wre(x)), x && (U_(x, y, n, {
              isInit: S
            }), h7(x, l, o, s));
          } else if (O) {
            q_(c, l, i, n);
            var C = d7(u, d, l.type, i);
            C && (U_(C, y, n, {
              isInit: !0
            }), h7(C, l, o, s));
          } else b === "remove" && (Ore(c, l), q_(c, l, i, n));
          var T = i.get(u);
          if (T && v)
            if (_) {
              var w = T.getTextContent();
              w ? w.attr(v) : T.setTextContent(new gt(v));
            } else O && T.setTextContent(new gt(v));
          if (T) {
            var P = l.clipPath;
            if (P) {
              var $ = P.type, A = void 0, S = !1;
              if (_) {
                var D = T.getClipPath();
                S = !D || ca(D).type !== $, A = S ? IE($) : D;
              } else O && (S = !0, A = IE($));
              T.setClipPath(A), U_(A, P, n, {
                isInit: S
              }), BO(A, P.keyframeAnimation, n);
            }
            var E = ca(T);
            T.setTextConfig(g), E.option = l, PHe(T, n, l), gp({
              el: T,
              componentModel: n,
              itemName: T.name,
              itemTooltipOption: l.tooltip
            }), BO(T, l.keyframeAnimation, n);
          }
        });
      }
    }, e.prototype._relocate = function(n, r) {
      for (var i = n.option.elements, a = this.group, o = this._elMap, s = r.getWidth(), l = r.getHeight(), u = ["x", "y"], c = 0; c < i.length; c++) {
        var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
        if (!(!h || !h.isGroup)) {
          var p = h.parent, v = p === a, g = ca(h), m = ca(p);
          g.width = _e(g.option.width, v ? s : m.width) || 0, g.height = _e(g.option.height, v ? l : m.height) || 0;
        }
      }
      for (var c = i.length - 1; c >= 0; c--) {
        var f = i[c], d = Vn(f.id, null), h = d != null ? o.get(d) : null;
        if (h) {
          var p = h.parent, m = ca(p), y = p === a ? {
            width: s,
            height: l
          } : {
            width: m.width,
            height: m.height
          }, b = {}, _ = aw(h, f, y, null, {
            hv: f.hv,
            boundingMode: f.bounding
          }, b);
          if (!ca(h).isNew && _) {
            for (var O = f.transition, S = {}, x = 0; x < u.length; x++) {
              var C = u[x], T = b[C];
              O && (rf(O) || et(O, C) >= 0) ? S[C] = T : h[C] = T;
            }
            Ct(h, S, n, 0);
          } else
            h.attr(b);
        }
      }
    }, e.prototype._clear = function() {
      var n = this, r = this._elMap;
      r.each(function(i) {
        q_(i, ca(i).option, r, n._lastGraphicModel);
      }), this._elMap = Pe();
    }, e.prototype.dispose = function() {
      this._clear();
    }, e.type = "graphic", e;
  }(Xt)
);
function IE(t) {
  process.env.NODE_ENV !== "production" && ke(t, "graphic type MUST be set");
  var e = Ce(f7, t) ? f7[t] : Kx(t);
  process.env.NODE_ENV !== "production" && ke(e, "graphic type " + t + " can not be found");
  var n = new e({});
  return ca(n).type = t, n;
}
function d7(t, e, n, r) {
  var i = IE(n);
  return e.add(i), r.set(t, i), ca(i).id = t, ca(i).isNew = !0, i;
}
function q_(t, e, n, r) {
  var i = t && t.parent;
  i && (t.type === "group" && t.traverse(function(a) {
    q_(a, e, n, r);
  }), Sw(t, e, r), n.removeKey(ca(t).id));
}
function h7(t, e, n, r) {
  t.isGroup || k([
    ["cursor", Ma.prototype.cursor],
    // We should not support configure z and zlevel in the element level.
    // But seems we didn't limit it previously. So here still use it to avoid breaking.
    ["zlevel", r || 0],
    ["z", n || 0],
    // z2 must not be null/undefined, otherwise sort error may occur.
    ["z2", 0]
  ], function(i) {
    var a = i[0];
    Ce(e, a) ? t[a] = We(e[a], i[1]) : t[a] == null && (t[a] = i[1]);
  }), k(st(e), function(i) {
    if (i.indexOf("on") === 0) {
      var a = e[i];
      t[i] = Me(a) ? a : null;
    }
  }), Ce(e, "draggable") && (t.draggable = e.draggable), e.name != null && (t.name = e.name), e.id != null && (t.id = e.id);
}
function THe(t) {
  return t = le({}, t), k(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(TJ), function(e) {
    delete t[e];
  }), t;
}
function PHe(t, e, n) {
  var r = Fe(t).eventData;
  !t.silent && !t.ignore && !r && (r = Fe(t).eventData = {
    componentType: "graphic",
    componentIndex: e.componentIndex,
    name: t.name
  }), r && (r.info = n.info);
}
function $He(t) {
  t.registerComponentModel(wHe), t.registerComponentView(CHe), t.registerPreprocessor(function(e) {
    var n = e.graphic;
    ue(n) ? !n[0] || !n[0].elements ? e.graphic = [{
      elements: n
    }] : e.graphic = [e.graphic[0]] : n && !n.elements && (e.graphic = [{
      elements: [n]
    }]);
  });
}
var p7 = ["x", "y", "radius", "angle", "single"], AHe = ["cartesian2d", "polar", "singleAxis"];
function EHe(t) {
  var e = t.get("coordinateSystem");
  return et(AHe, e) >= 0;
}
function Fl(t) {
  return process.env.NODE_ENV !== "production" && ke(t), t + "Axis";
}
function MHe(t, e) {
  var n = Pe(), r = [], i = Pe();
  t.eachComponent({
    mainType: "dataZoom",
    query: e
  }, function(c) {
    i.get(c.uid) || s(c);
  });
  var a;
  do
    a = !1, t.eachComponent("dataZoom", o);
  while (a);
  function o(c) {
    !i.get(c.uid) && l(c) && (s(c), a = !0);
  }
  function s(c) {
    i.set(c.uid, !0), r.push(c), u(c);
  }
  function l(c) {
    var f = !1;
    return c.eachTargetAxis(function(d, h) {
      var p = n.get(d);
      p && p[h] && (f = !0);
    }), f;
  }
  function u(c) {
    c.eachTargetAxis(function(f, d) {
      (n.get(f) || n.set(f, []))[d] = !0;
    });
  }
  return r;
}
function Vre(t) {
  var e = t.ecModel, n = {
    infoList: [],
    infoMap: Pe()
  };
  return t.eachTargetAxis(function(r, i) {
    var a = e.getComponent(Fl(r), i);
    if (a) {
      var o = a.getCoordSysModel();
      if (o) {
        var s = o.uid, l = n.infoMap.get(s);
        l || (l = {
          model: o,
          axisModels: []
        }, n.infoList.push(l), n.infoMap.set(s, l)), l.axisModels.push(a);
      }
    }
  }), n;
}
var UP = (
  /** @class */
  function() {
    function t() {
      this.indexList = [], this.indexMap = [];
    }
    return t.prototype.add = function(e) {
      this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
    }, t;
  }()
), Fm = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._autoThrottle = !0, n._noTarget = !0, n._rangePropMode = ["percent", "percent"], n;
    }
    return e.prototype.init = function(n, r, i) {
      var a = v7(n);
      this.settledOption = a, this.mergeDefaultAndTheme(n, i), this._doInit(a);
    }, e.prototype.mergeOption = function(n) {
      var r = v7(n);
      qe(this.option, n, !0), qe(this.settledOption, r, !0), this._doInit(r);
    }, e.prototype._doInit = function(n) {
      var r = this.option;
      this._setDefaultThrottle(n), this._updateRangeUse(n);
      var i = this.settledOption;
      k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
        this._rangePropMode[o] === "value" && (r[a[0]] = i[a[0]] = null);
      }, this), this._resetTarget();
    }, e.prototype._resetTarget = function() {
      var n = this.get("orient", !0), r = this._targetAxisInfoMap = Pe(), i = this._fillSpecifiedTargetAxis(r);
      i ? this._orient = n || this._makeAutoOrientByTargetAxis() : (this._orient = n || "horizontal", this._fillAutoTargetAxisByOrient(r, this._orient)), this._noTarget = !0, r.each(function(a) {
        a.indexList.length && (this._noTarget = !1);
      }, this);
    }, e.prototype._fillSpecifiedTargetAxis = function(n) {
      var r = !1;
      return k(p7, function(i) {
        var a = this.getReferringComponents(Fl(i), eRe);
        if (a.specified) {
          r = !0;
          var o = new UP();
          k(a.models, function(s) {
            o.add(s.componentIndex);
          }), n.set(i, o);
        }
      }, this), r;
    }, e.prototype._fillAutoTargetAxisByOrient = function(n, r) {
      var i = this.ecModel, a = !0;
      if (a) {
        var o = r === "vertical" ? "y" : "x", s = i.findComponents({
          mainType: o + "Axis"
        });
        l(s, o);
      }
      if (a) {
        var s = i.findComponents({
          mainType: "singleAxis",
          filter: function(c) {
            return c.get("orient", !0) === r;
          }
        });
        l(s, "single");
      }
      function l(u, c) {
        var f = u[0];
        if (f) {
          var d = new UP();
          if (d.add(f.componentIndex), n.set(c, d), a = !1, c === "x" || c === "y") {
            var h = f.getReferringComponents("grid", Dn).models[0];
            h && k(u, function(p) {
              f.componentIndex !== p.componentIndex && h === p.getReferringComponents("grid", Dn).models[0] && d.add(p.componentIndex);
            });
          }
        }
      }
      a && k(p7, function(u) {
        if (a) {
          var c = i.findComponents({
            mainType: Fl(u),
            filter: function(d) {
              return d.get("type", !0) === "category";
            }
          });
          if (c[0]) {
            var f = new UP();
            f.add(c[0].componentIndex), n.set(u, f), a = !1;
          }
        }
      }, this);
    }, e.prototype._makeAutoOrientByTargetAxis = function() {
      var n;
      return this.eachTargetAxis(function(r) {
        !n && (n = r);
      }, this), n === "y" ? "vertical" : "horizontal";
    }, e.prototype._setDefaultThrottle = function(n) {
      if (n.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
        var r = this.ecModel.option;
        this.option.throttle = r.animation && r.animationDurationUpdate > 0 ? 100 : 20;
      }
    }, e.prototype._updateRangeUse = function(n) {
      var r = this._rangePropMode, i = this.get("rangeMode");
      k([["start", "startValue"], ["end", "endValue"]], function(a, o) {
        var s = n[a[0]] != null, l = n[a[1]] != null;
        s && !l ? r[o] = "percent" : !s && l ? r[o] = "value" : i ? r[o] = i[o] : s && (r[o] = "percent");
      });
    }, e.prototype.noTarget = function() {
      return this._noTarget;
    }, e.prototype.getFirstTargetAxisModel = function() {
      var n;
      return this.eachTargetAxis(function(r, i) {
        n == null && (n = this.ecModel.getComponent(Fl(r), i));
      }, this), n;
    }, e.prototype.eachTargetAxis = function(n, r) {
      this._targetAxisInfoMap.each(function(i, a) {
        k(i.indexList, function(o) {
          n.call(r, a, o);
        });
      });
    }, e.prototype.getAxisProxy = function(n, r) {
      var i = this.getAxisModel(n, r);
      if (i)
        return i.__dzAxisProxy;
    }, e.prototype.getAxisModel = function(n, r) {
      process.env.NODE_ENV !== "production" && ke(n && r != null);
      var i = this._targetAxisInfoMap.get(n);
      if (i && i.indexMap[r])
        return this.ecModel.getComponent(Fl(n), r);
    }, e.prototype.setRawRange = function(n) {
      var r = this.option, i = this.settledOption;
      k([["start", "startValue"], ["end", "endValue"]], function(a) {
        (n[a[0]] != null || n[a[1]] != null) && (r[a[0]] = i[a[0]] = n[a[0]], r[a[1]] = i[a[1]] = n[a[1]]);
      }, this), this._updateRangeUse(n);
    }, e.prototype.setCalculatedRange = function(n) {
      var r = this.option;
      k(["start", "startValue", "end", "endValue"], function(i) {
        r[i] = n[i];
      });
    }, e.prototype.getPercentRange = function() {
      var n = this.findRepresentativeAxisProxy();
      if (n)
        return n.getDataPercentWindow();
    }, e.prototype.getValueRange = function(n, r) {
      if (n == null && r == null) {
        var i = this.findRepresentativeAxisProxy();
        if (i)
          return i.getDataValueWindow();
      } else
        return this.getAxisProxy(n, r).getDataValueWindow();
    }, e.prototype.findRepresentativeAxisProxy = function(n) {
      if (n)
        return n.__dzAxisProxy;
      for (var r, i = this._targetAxisInfoMap.keys(), a = 0; a < i.length; a++)
        for (var o = i[a], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
          var u = this.getAxisProxy(o, s.indexList[l]);
          if (u.hostedBy(this))
            return u;
          r || (r = u);
        }
      return r;
    }, e.prototype.getRangePropMode = function() {
      return this._rangePropMode.slice();
    }, e.prototype.getOrient = function() {
      return process.env.NODE_ENV !== "production" && ke(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;
  }(rt)
);
function v7(t) {
  var e = {};
  return k(["start", "end", "startValue", "endValue", "throttle"], function(n) {
    t.hasOwnProperty(n) && (e[n] = t[n]);
  }), e;
}
var IHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.select", e;
  }(Fm)
), OL = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i, a) {
      this.dataZoomModel = n, this.ecModel = r, this.api = i;
    }, e.type = "dataZoom", e;
  }(Xt)
), DHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.select", e;
  }(OL)
), Md = k, g7 = Vi, RHe = (
  /** @class */
  function() {
    function t(e, n, r, i) {
      this._dimName = e, this._axisIndex = n, this.ecModel = i, this._dataZoomModel = r;
    }
    return t.prototype.hostedBy = function(e) {
      return this._dataZoomModel === e;
    }, t.prototype.getDataValueWindow = function() {
      return this._valueWindow.slice();
    }, t.prototype.getDataPercentWindow = function() {
      return this._percentWindow.slice();
    }, t.prototype.getTargetSeriesModels = function() {
      var e = [];
      return this.ecModel.eachSeries(function(n) {
        if (EHe(n)) {
          var r = Fl(this._dimName), i = n.getReferringComponents(r, Dn).models[0];
          i && this._axisIndex === i.componentIndex && e.push(n);
        }
      }, this), e;
    }, t.prototype.getAxisModel = function() {
      return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
    }, t.prototype.getMinMaxSpan = function() {
      return Le(this._minMaxSpan);
    }, t.prototype.calculateDataWindow = function(e) {
      var n = this._dataExtent, r = this.getAxisModel(), i = r.axis.scale, a = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
      Md(["start", "end"], function(d, h) {
        var p = e[d], v = e[d + "Value"];
        a[h] === "percent" ? (p == null && (p = o[h]), v = i.parse(Lt(p, o, n))) : (u = !0, v = v == null ? n[h] : i.parse(v), p = Lt(v, n, o)), l[h] = v == null || isNaN(v) ? n[h] : v, s[h] = p == null || isNaN(p) ? o[h] : p;
      }), g7(l), g7(s);
      var c = this._minMaxSpan;
      u ? f(l, s, n, o, !1) : f(s, l, o, n, !0);
      function f(d, h, p, v, g) {
        var m = g ? "Span" : "ValueSpan";
        Qf(0, d, p, "all", c["min" + m], c["max" + m]);
        for (var y = 0; y < 2; y++)
          h[y] = Lt(d[y], p, v, !0), g && (h[y] = i.parse(h[y]));
      }
      return {
        valueWindow: l,
        percentWindow: s
      };
    }, t.prototype.reset = function(e) {
      if (e === this._dataZoomModel) {
        var n = this.getTargetSeriesModels();
        this._dataExtent = kHe(this, this._dimName, n), this._updateMinMaxSpan();
        var r = this.calculateDataWindow(e.settledOption);
        this._valueWindow = r.valueWindow, this._percentWindow = r.percentWindow, this._setAxisModel();
      }
    }, t.prototype.filterData = function(e, n) {
      if (e !== this._dataZoomModel)
        return;
      var r = this._dimName, i = this.getTargetSeriesModels(), a = e.get("filterMode"), o = this._valueWindow;
      if (a === "none")
        return;
      Md(i, function(l) {
        var u = l.getData(), c = u.mapDimensionsAll(r);
        if (c.length) {
          if (a === "weakFilter") {
            var f = u.getStore(), d = ce(c, function(h) {
              return u.getDimensionIndex(h);
            }, u);
            u.filterSelf(function(h) {
              for (var p, v, g, m = 0; m < c.length; m++) {
                var y = f.get(d[m], h), b = !isNaN(y), _ = y < o[0], O = y > o[1];
                if (b && !_ && !O)
                  return !0;
                b && (g = !0), _ && (p = !0), O && (v = !0);
              }
              return g && p && v;
            });
          } else
            Md(c, function(h) {
              if (a === "empty")
                l.setData(u = u.map(h, function(v) {
                  return s(v) ? v : NaN;
                }));
              else {
                var p = {};
                p[h] = o, u.selectRange(p);
              }
            });
          Md(c, function(h) {
            u.setApproximateExtent(o, h);
          });
        }
      });
      function s(l) {
        return l >= o[0] && l <= o[1];
      }
    }, t.prototype._updateMinMaxSpan = function() {
      var e = this._minMaxSpan = {}, n = this._dataZoomModel, r = this._dataExtent;
      Md(["min", "max"], function(i) {
        var a = n.get(i + "Span"), o = n.get(i + "ValueSpan");
        o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? a = Lt(r[0] + o, r, [0, 100], !0) : a != null && (o = Lt(a, [0, 100], r, !0) - r[0]), e[i + "Span"] = a, e[i + "ValueSpan"] = o;
      }, this);
    }, t.prototype._setAxisModel = function() {
      var e = this.getAxisModel(), n = this._percentWindow, r = this._valueWindow;
      if (n) {
        var i = TR(r, [0, 500]);
        i = Math.min(i, 20);
        var a = e.axis.scale.rawExtentInfo;
        n[0] !== 0 && a.setDeterminedMinMax("min", +r[0].toFixed(i)), n[1] !== 100 && a.setDeterminedMinMax("max", +r[1].toFixed(i)), a.freeze();
      }
    }, t;
  }()
);
function kHe(t, e, n) {
  var r = [1 / 0, -1 / 0];
  Md(n, function(o) {
    JNe(r, o.getData(), e);
  });
  var i = t.getAxisModel(), a = nte(i.axis.scale, i, r).calculate();
  return [a.min, a.max];
}
var LHe = {
  // `dataZoomProcessor` will only be performed in needed series. Consider if
  // there is a line series and a pie series, it is better not to update the
  // line series if only pie series is needed to be updated.
  getTargetSeries: function(t) {
    function e(i) {
      t.eachComponent("dataZoom", function(a) {
        a.eachTargetAxis(function(o, s) {
          var l = t.getComponent(Fl(o), s);
          i(o, s, l, a);
        });
      });
    }
    e(function(i, a, o, s) {
      o.__dzAxisProxy = null;
    });
    var n = [];
    e(function(i, a, o, s) {
      o.__dzAxisProxy || (o.__dzAxisProxy = new RHe(i, a, s, t), n.push(o.__dzAxisProxy));
    });
    var r = Pe();
    return k(n, function(i) {
      k(i.getTargetSeriesModels(), function(a) {
        r.set(a.uid, a);
      });
    }), r;
  },
  // Consider appendData, where filter should be performed. Because data process is
  // in block mode currently, it is not need to worry about that the overallProgress
  // execute every frame.
  overallReset: function(t, e) {
    t.eachComponent("dataZoom", function(n) {
      n.eachTargetAxis(function(r, i) {
        n.getAxisProxy(r, i).reset(n);
      }), n.eachTargetAxis(function(r, i) {
        n.getAxisProxy(r, i).filterData(n, e);
      });
    }), t.eachComponent("dataZoom", function(n) {
      var r = n.findRepresentativeAxisProxy();
      if (r) {
        var i = r.getDataPercentWindow(), a = r.getDataValueWindow();
        n.setCalculatedRange({
          start: i[0],
          end: i[1],
          startValue: a[0],
          endValue: a[1]
        });
      }
    });
  }
};
function NHe(t) {
  t.registerAction("dataZoom", function(e, n) {
    var r = MHe(n, e);
    k(r, function(i) {
      i.setRawRange({
        start: e.start,
        end: e.end,
        startValue: e.startValue,
        endValue: e.endValue
      });
    });
  });
}
var m7 = !1;
function SL(t) {
  m7 || (m7 = !0, t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, LHe), NHe(t), t.registerSubTypeDefaulter("dataZoom", function() {
    return "slider";
  }));
}
function BHe(t) {
  t.registerComponentModel(IHe), t.registerComponentView(DHe), SL(t);
}
var pa = (
  /** @class */
  /* @__PURE__ */ function() {
    function t() {
    }
    return t;
  }()
), Fre = {};
function Id(t, e) {
  Fre[t] = e;
}
function Wre(t) {
  return Fre[t];
}
var zHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function() {
      t.prototype.optionUpdated.apply(this, arguments);
      var n = this.ecModel;
      k(this.option.feature, function(r, i) {
        var a = Wre(i);
        a && (a.getDefaultOption && (a.defaultOption = a.getDefaultOption(n)), qe(r, a.defaultOption));
      });
    }, e.type = "toolbox", e.layoutMode = {
      type: "box",
      ignoreSize: !0
    }, e.defaultOption = {
      show: !0,
      z: 6,
      // zlevel: 0,
      orient: "horizontal",
      left: "right",
      top: "top",
      // right
      // bottom
      backgroundColor: "transparent",
      borderColor: "#ccc",
      borderRadius: 0,
      borderWidth: 0,
      padding: 5,
      itemSize: 15,
      itemGap: 8,
      showTitle: !0,
      iconStyle: {
        borderColor: "#666",
        color: "none"
      },
      emphasis: {
        iconStyle: {
          borderColor: "#3E98C5"
        }
      },
      // textStyle: {},
      // feature
      tooltip: {
        show: !1,
        position: "bottom"
      }
    }, e;
  }(rt)
);
function VHe(t, e, n) {
  var r = e.getBoxLayoutParams(), i = e.get("padding"), a = {
    width: n.getWidth(),
    height: n.getHeight()
  }, o = Rn(r, a, i);
  ef(e.get("orient"), t, e.get("itemGap"), o.width, o.height), aw(t, r, a, i);
}
function Qre(t, e) {
  var n = Bf(e.get("padding")), r = e.getItemStyle(["color", "opacity"]);
  return r.fill = e.get("backgroundColor"), t = new mt({
    shape: {
      x: t.x - n[3],
      y: t.y - n[0],
      width: t.width + n[1] + n[3],
      height: t.height + n[0] + n[2],
      r: e.get("borderRadius")
    },
    style: r,
    silent: !0,
    z2: -1
  }), t;
}
var FHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i, a) {
      var o = this.group;
      if (o.removeAll(), !n.get("show"))
        return;
      var s = +n.get("itemSize"), l = n.get("orient") === "vertical", u = n.get("feature") || {}, c = this._features || (this._features = {}), f = [];
      k(u, function(p, v) {
        f.push(v);
      }), new Us(this._featureNames || [], f).add(d).update(d).remove(Ue(d, null)).execute(), this._featureNames = f;
      function d(p, v) {
        var g = f[p], m = f[v], y = u[g], b = new Wt(y, n, n.ecModel), _;
        if (a && a.newTitle != null && a.featureName === g && (y.title = a.newTitle), g && !m) {
          if (WHe(g))
            _ = {
              onclick: b.option.onclick,
              featureName: g
            };
          else {
            var O = Wre(g);
            if (!O)
              return;
            _ = new O();
          }
          c[g] = _;
        } else if (_ = c[m], !_)
          return;
        _.uid = yp("toolbox-feature"), _.model = b, _.ecModel = r, _.api = i;
        var S = _ instanceof pa;
        if (!g && m) {
          S && _.dispose && _.dispose(r, i);
          return;
        }
        if (!b.get("show") || S && _.unusable) {
          S && _.remove && _.remove(r, i);
          return;
        }
        h(b, _, g), b.setIconStatus = function(x, C) {
          var T = this.option, w = this.iconPaths;
          T.iconStatus = T.iconStatus || {}, T.iconStatus[x] = C, w[x] && (C === "emphasis" ? js : Zs)(w[x]);
        }, _ instanceof pa && _.render && _.render(b, r, i, a);
      }
      function h(p, v, g) {
        var m = p.getModel("iconStyle"), y = p.getModel(["emphasis", "iconStyle"]), b = v instanceof pa && v.getIcons ? v.getIcons() : p.get("icon"), _ = p.get("title") || {}, O, S;
        Oe(b) ? (O = {}, O[g] = b) : O = b, Oe(_) ? (S = {}, S[g] = _) : S = _;
        var x = p.iconPaths = {};
        k(O, function(C, T) {
          var w = vp(C, {}, {
            x: -s / 2,
            y: -s / 2,
            width: s,
            height: s
          });
          w.setStyle(m.getItemStyle());
          var P = w.ensureState("emphasis");
          P.style = y.getItemStyle();
          var $ = new gt({
            style: {
              text: S[T],
              align: y.get("textAlign"),
              borderRadius: y.get("textBorderRadius"),
              padding: y.get("textPadding"),
              fill: null,
              font: GR({
                fontStyle: y.get("textFontStyle"),
                fontFamily: y.get("textFontFamily"),
                fontSize: y.get("textFontSize"),
                fontWeight: y.get("textFontWeight")
              }, r)
            },
            ignore: !0
          });
          w.setTextContent($), gp({
            el: w,
            componentModel: n,
            itemName: T,
            formatterParamsExtra: {
              title: S[T]
            }
          }), w.__title = S[T], w.on("mouseover", function() {
            var A = y.getItemStyle(), D = l ? n.get("right") == null && n.get("left") !== "right" ? "right" : "left" : n.get("bottom") == null && n.get("top") !== "bottom" ? "bottom" : "top";
            $.setStyle({
              fill: y.get("textFill") || A.fill || A.stroke || "#000",
              backgroundColor: y.get("textBackgroundColor")
            }), w.setTextConfig({
              position: y.get("textPosition") || D
            }), $.ignore = !n.get("showTitle"), i.enterEmphasis(this);
          }).on("mouseout", function() {
            p.get(["iconStatus", T]) !== "emphasis" && i.leaveEmphasis(this), $.hide();
          }), (p.get(["iconStatus", T]) === "emphasis" ? js : Zs)(w), o.add(w), w.on("click", xe(v.onclick, v, r, i, T)), x[T] = w;
        });
      }
      VHe(o, n, i), o.add(Qre(o.getBoundingRect(), n)), l || o.eachChild(function(p) {
        var v = p.__title, g = p.ensureState("emphasis"), m = g.textConfig || (g.textConfig = {}), y = p.getTextContent(), b = y && y.ensureState("emphasis");
        if (b && !Me(b) && v) {
          var _ = b.style || (b.style = {}), O = k0(v, gt.makeFont(_)), S = p.x + o.x, x = p.y + o.y + s, C = !1;
          x + O.height > i.getHeight() && (m.position = "top", C = !0);
          var T = C ? -5 - O.height : s + 10;
          S + O.width / 2 > i.getWidth() ? (m.position = ["100%", T], _.align = "right") : S - O.width / 2 < 0 && (m.position = [0, T], _.align = "left");
        }
      });
    }, e.prototype.updateView = function(n, r, i, a) {
      k(this._features, function(o) {
        o instanceof pa && o.updateView && o.updateView(o.model, r, i, a);
      });
    }, e.prototype.remove = function(n, r) {
      k(this._features, function(i) {
        i instanceof pa && i.remove && i.remove(n, r);
      }), this.group.removeAll();
    }, e.prototype.dispose = function(n, r) {
      k(this._features, function(i) {
        i instanceof pa && i.dispose && i.dispose(n, r);
      });
    }, e.type = "toolbox", e;
  }(Xt)
);
function WHe(t) {
  return t.indexOf("my") === 0;
}
var QHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      var i = this.model, a = i.get("name") || n.get("title.0.text") || "echarts", o = r.getZr().painter.getType() === "svg", s = o ? "svg" : i.get("type", !0) || "png", l = r.getConnectedDataURL({
        type: s,
        backgroundColor: i.get("backgroundColor", !0) || n.get("backgroundColor") || "#fff",
        connectedBackgroundColor: i.get("connectedBackgroundColor"),
        excludeComponents: i.get("excludeComponents"),
        pixelRatio: i.get("pixelRatio")
      }), u = vt.browser;
      if (typeof MouseEvent == "function" && (u.newEdge || !u.ie && !u.edge)) {
        var c = document.createElement("a");
        c.download = a + "." + s, c.target = "_blank", c.href = l;
        var f = new MouseEvent("click", {
          // some micro front-end framework， window maybe is a Proxy
          view: document.defaultView,
          bubbles: !0,
          cancelable: !1
        });
        c.dispatchEvent(f);
      } else if (window.navigator.msSaveOrOpenBlob || o) {
        var d = l.split(","), h = d[0].indexOf("base64") > -1, p = o ? decodeURIComponent(d[1]) : d[1];
        h && (p = window.atob(p));
        var v = a + "." + s;
        if (window.navigator.msSaveOrOpenBlob) {
          for (var g = p.length, m = new Uint8Array(g); g--; )
            m[g] = p.charCodeAt(g);
          var y = new Blob([m]);
          window.navigator.msSaveOrOpenBlob(y, v);
        } else {
          var b = document.createElement("iframe");
          document.body.appendChild(b);
          var _ = b.contentWindow, O = _.document;
          O.open("image/svg+xml", "replace"), O.write(p), O.close(), _.focus(), O.execCommand("SaveAs", !0, v), document.body.removeChild(b);
        }
      } else {
        var S = i.get("lang"), x = '<body style="margin:0;"><img src="' + l + '" style="max-width:100%;" title="' + (S && S[0] || "") + '" /></body>', C = window.open();
        C.document.write(x), C.document.title = a;
      }
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
        title: n.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
        type: "png",
        // Default use option.backgroundColor
        // backgroundColor: '#fff',
        connectedBackgroundColor: "#fff",
        name: "",
        excludeComponents: ["toolbox"],
        // use current pixel ratio of device by default
        // pixelRatio: 1,
        lang: n.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
      };
      return r;
    }, e;
  }(pa)
), y7 = "__ec_magicType_stack__", HHe = [["line", "bar"], ["stack"]], GHe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.getIcons = function() {
      var n = this.model, r = n.get("icon"), i = {};
      return k(n.get("type"), function(a) {
        r[a] && (i[a] = r[a]);
      }), i;
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        type: [],
        // Icon group
        icon: {
          line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
          bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
          // eslint-disable-next-line
          stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
          // jshint ignore:line
        },
        // `line`, `bar`, `stack`, `tiled`
        title: n.getLocaleModel().get(["toolbox", "magicType", "title"]),
        option: {},
        seriesIndex: {}
      };
      return r;
    }, e.prototype.onclick = function(n, r, i) {
      var a = this.model, o = a.get(["seriesIndex", i]);
      if (b7[i]) {
        var s = {
          series: []
        }, l = function(f) {
          var d = f.subType, h = f.id, p = b7[i](d, h, f, a);
          p && (Re(p, f.option), s.series.push(p));
          var v = f.coordinateSystem;
          if (v && v.type === "cartesian2d" && (i === "line" || i === "bar")) {
            var g = v.getAxesByScale("ordinal")[0];
            if (g) {
              var m = g.dim, y = m + "Axis", b = f.getReferringComponents(y, Dn).models[0], _ = b.componentIndex;
              s[y] = s[y] || [];
              for (var O = 0; O <= _; O++)
                s[y][_] = s[y][_] || {};
              s[y][_].boundaryGap = i === "bar";
            }
          }
        };
        k(HHe, function(f) {
          et(f, i) >= 0 && k(f, function(d) {
            a.setIconStatus(d, "normal");
          });
        }), a.setIconStatus(i, "emphasis"), n.eachComponent({
          mainType: "series",
          query: o == null ? null : {
            seriesIndex: o
          }
        }, l);
        var u, c = i;
        i === "stack" && (u = qe({
          stack: a.option.title.tiled,
          tiled: a.option.title.stack
        }, a.option.title), a.get(["iconStatus", i]) !== "emphasis" && (c = "tiled")), r.dispatchAction({
          type: "changeMagicType",
          currentType: c,
          newOption: s,
          newTitle: u,
          featureName: "magicType"
        });
      }
    }, e;
  }(pa)
), b7 = {
  line: function(t, e, n, r) {
    if (t === "bar")
      return qe({
        id: e,
        type: "line",
        // Preserve data related option
        data: n.get("data"),
        stack: n.get("stack"),
        markPoint: n.get("markPoint"),
        markLine: n.get("markLine")
      }, r.get(["option", "line"]) || {}, !0);
  },
  bar: function(t, e, n, r) {
    if (t === "line")
      return qe({
        id: e,
        type: "bar",
        // Preserve data related option
        data: n.get("data"),
        stack: n.get("stack"),
        markPoint: n.get("markPoint"),
        markLine: n.get("markLine")
      }, r.get(["option", "bar"]) || {}, !0);
  },
  stack: function(t, e, n, r) {
    var i = n.get("stack") === y7;
    if (t === "line" || t === "bar")
      return r.setIconStatus("stack", i ? "normal" : "emphasis"), qe({
        id: e,
        stack: i ? "" : y7
      }, r.get(["option", "stack"]) || {}, !0);
  }
};
vo({
  type: "changeMagicType",
  event: "magicTypeChanged",
  update: "prepareAndUpdate"
}, function(t, e) {
  e.mergeOption(t.newOption);
});
var xw = new Array(60).join("-"), jh = "	";
function jHe(t) {
  var e = {}, n = [], r = [];
  return t.eachRawSeries(function(i) {
    var a = i.coordinateSystem;
    if (a && (a.type === "cartesian2d" || a.type === "polar")) {
      var o = a.getBaseAxis();
      if (o.type === "category") {
        var s = o.dim + "_" + o.index;
        e[s] || (e[s] = {
          categoryAxis: o,
          valueAxis: a.getOtherAxis(o),
          series: []
        }, r.push({
          axisDim: o.dim,
          axisIndex: o.index
        })), e[s].series.push(i);
      } else
        n.push(i);
    } else
      n.push(i);
  }), {
    seriesGroupByCategoryAxis: e,
    other: n,
    meta: r
  };
}
function ZHe(t) {
  var e = [];
  return k(t, function(n, r) {
    var i = n.categoryAxis, a = n.valueAxis, o = a.dim, s = [" "].concat(ce(n.series, function(h) {
      return h.name;
    })), l = [i.model.getCategories()];
    k(n.series, function(h) {
      var p = h.getRawData();
      l.push(h.getRawData().mapArray(p.mapDimension(o), function(v) {
        return v;
      }));
    });
    for (var u = [s.join(jh)], c = 0; c < l[0].length; c++) {
      for (var f = [], d = 0; d < l.length; d++)
        f.push(l[d][c]);
      u.push(f.join(jh));
    }
    e.push(u.join(`
`));
  }), e.join(`

` + xw + `

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

` + xw + `

`);
}
function XHe(t) {
  var e = jHe(t);
  return {
    value: Nt([ZHe(e.seriesGroupByCategoryAxis), UHe(e.other)], function(n) {
      return !!n.replace(/[\n\t\s]/g, "");
    }).join(`

` + xw + `

`),
    meta: e.meta
  };
}
function WO(t) {
  return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function YHe(t) {
  var e = t.slice(0, t.indexOf(`
`));
  if (e.indexOf(jh) >= 0)
    return !0;
}
var DE = new RegExp("[" + jh + "]+", "g");
function qHe(t) {
  for (var e = t.split(/\n+/g), n = WO(e.shift()).split(DE), r = [], i = ce(n, function(l) {
    return {
      name: l,
      data: []
    };
  }), a = 0; a < e.length; a++) {
    var o = WO(e[a]).split(DE);
    r.push(o.shift());
    for (var s = 0; s < o.length; s++)
      i[s] && (i[s].data[a] = o[s]);
  }
  return {
    series: i,
    categories: r
  };
}
function KHe(t) {
  for (var e = t.split(/\n+/g), n = WO(e.shift()), r = [], i = 0; i < e.length; i++) {
    var a = WO(e[i]);
    if (a) {
      var o = a.split(DE), s = "", l = void 0, u = !1;
      isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), r[i] = {
        name: s,
        value: []
      }, l = r[i].value) : l = r[i] = [];
      for (var c = 0; c < o.length; c++)
        l.push(+o[c]);
      l.length === 1 && (u ? r[i].value = l[0] : r[i] = l[0]);
    }
  }
  return {
    name: n,
    data: r
  };
}
function JHe(t, e) {
  var n = t.split(new RegExp(`
*` + xw + `
*`, "g")), r = {
    series: []
  };
  return k(n, function(i, a) {
    if (YHe(i)) {
      var o = qHe(i), s = e[a], l = s.axisDim + "Axis";
      s && (r[l] = r[l] || [], r[l][s.axisIndex] = {
        data: o.categories
      }, r.series = r.series.concat(o.series));
    } else {
      var o = KHe(i);
      r.series.push(o);
    }
  }), r;
}
var e9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      setTimeout(function() {
        r.dispatchAction({
          type: "hideTip"
        });
      });
      var i = r.getDom(), a = this.model;
      this._dom && i.removeChild(this._dom);
      var o = document.createElement("div");
      o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = a.get("backgroundColor") || "#fff";
      var s = document.createElement("h4"), l = a.get("lang") || [];
      s.innerHTML = l[0] || a.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = a.get("textColor");
      var u = document.createElement("div"), c = document.createElement("textarea");
      u.style.cssText = "overflow:auto";
      var f = a.get("optionToContent"), d = a.get("contentToOption"), h = XHe(n);
      if (Me(f)) {
        var p = f(r.getOption());
        Oe(p) ? u.innerHTML = p : au(p) && u.appendChild(p);
      } else {
        c.readOnly = a.get("readOnly");
        var v = c.style;
        v.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", v.color = a.get("textColor"), v.borderColor = a.get("textareaBorderColor"), v.backgroundColor = a.get("textareaColor"), c.value = h.value, u.appendChild(c);
      }
      var g = h.meta, m = document.createElement("div");
      m.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
      var y = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", b = document.createElement("div"), _ = document.createElement("div");
      y += ";background-color:" + a.get("buttonColor"), y += ";color:" + a.get("buttonTextColor");
      var O = this;
      function S() {
        i.removeChild(o), O._dom = null;
      }
      cA(b, "click", S), cA(_, "click", function() {
        if (d == null && f != null || d != null && f == null) {
          process.env.NODE_ENV !== "production" && dn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), S();
          return;
        }
        var x;
        try {
          Me(d) ? x = d(u, r.getOption()) : x = JHe(c.value, g);
        } catch (C) {
          throw S(), new Error("Data view format error " + C);
        }
        x && r.dispatchAction({
          type: "changeDataView",
          newOption: x
        }), S();
      }), b.innerHTML = l[1], _.innerHTML = l[2], _.style.cssText = b.style.cssText = y, !a.get("readOnly") && m.appendChild(_), m.appendChild(b), o.appendChild(s), o.appendChild(u), o.appendChild(m), u.style.height = i.clientHeight - 80 + "px", i.appendChild(o), this._dom = o;
    }, e.prototype.remove = function(n, r) {
      this._dom && r.getDom().removeChild(this._dom);
    }, e.prototype.dispose = function(n, r) {
      this.remove(n, r);
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        readOnly: !1,
        optionToContent: null,
        contentToOption: null,
        // eslint-disable-next-line
        icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
        title: n.getLocaleModel().get(["toolbox", "dataView", "title"]),
        lang: n.getLocaleModel().get(["toolbox", "dataView", "lang"]),
        backgroundColor: "#fff",
        textColor: "#000",
        textareaColor: "#fff",
        textareaBorderColor: "#333",
        buttonColor: "#c23531",
        buttonTextColor: "#fff"
      };
      return r;
    }, e;
  }(pa)
);
function t9e(t, e) {
  return ce(t, function(n, r) {
    var i = e && e[r];
    if (Ie(i) && !ue(i)) {
      var a = Ie(n) && !ue(n);
      a || (n = {
        value: n
      });
      var o = i.name != null && n.name == null;
      return n = Re(n, i), o && delete n.name, n;
    } else
      return n;
  });
}
vo({
  type: "changeDataView",
  event: "dataViewChanged",
  update: "prepareAndUpdate"
}, function(t, e) {
  var n = [];
  k(t.newOption.series, function(r) {
    var i = e.getSeriesByName(r.name)[0];
    if (!i)
      n.push(le({
        // Default is scatter
        type: "scatter"
      }, r));
    else {
      var a = i.get("data");
      n.push({
        name: r.name,
        data: t9e(r.data, a)
      });
    }
  }), e.mergeOption(Re({
    series: n
  }, t.newOption));
});
var Hre = k, Gre = bt();
function n9e(t, e) {
  var n = xL(t);
  Hre(e, function(r, i) {
    for (var a = n.length - 1; a >= 0; a--) {
      var o = n[a];
      if (o[i])
        break;
    }
    if (a < 0) {
      var s = t.queryComponents({
        mainType: "dataZoom",
        subType: "select",
        id: i
      })[0];
      if (s) {
        var l = s.getPercentRange();
        n[0][i] = {
          dataZoomId: i,
          start: l[0],
          end: l[1]
        };
      }
    }
  }), n.push(e);
}
function r9e(t) {
  var e = xL(t), n = e[e.length - 1];
  e.length > 1 && e.pop();
  var r = {};
  return Hre(n, function(i, a) {
    for (var o = e.length - 1; o >= 0; o--)
      if (i = e[o][a], i) {
        r[a] = i;
        break;
      }
  }), r;
}
function i9e(t) {
  Gre(t).snapshots = null;
}
function a9e(t) {
  return xL(t).length;
}
function xL(t) {
  var e = Gre(t);
  return e.snapshots || (e.snapshots = [{}]), e.snapshots;
}
var o9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.onclick = function(n, r) {
      i9e(n), r.dispatchAction({
        type: "restore",
        from: this.uid
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        // eslint-disable-next-line
        icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
        title: n.getLocaleModel().get(["toolbox", "restore", "title"])
      };
      return r;
    }, e;
  }(pa)
);
vo({
  type: "restore",
  event: "restore",
  update: "prepareAndUpdate"
}, function(t, e) {
  e.resetOption("recreate");
});
var s9e = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], wL = (
  /** @class */
  function() {
    function t(e, n, r) {
      var i = this;
      this._targetInfoList = [];
      var a = _7(n, e);
      k(l9e, function(o, s) {
        (!r || !r.include || et(r.include, s) >= 0) && o(a, i._targetInfoList);
      });
    }
    return t.prototype.setOutputRanges = function(e, n) {
      return this.matchOutputRanges(e, n, function(r, i, a) {
        if ((r.coordRanges || (r.coordRanges = [])).push(i), !r.coordRange) {
          r.coordRange = i;
          var o = XP[r.brushType](0, a, i);
          r.__rangeOffset = {
            offset: w7[r.brushType](o.values, r.range, [1, 1]),
            xyMinMax: o.xyMinMax
          };
        }
      }), e;
    }, t.prototype.matchOutputRanges = function(e, n, r) {
      k(e, function(i) {
        var a = this.findTargetInfo(i, n);
        a && a !== !0 && k(a.coordSyses, function(o) {
          var s = XP[i.brushType](1, o, i.range, !0);
          r(i, s.values, o, n);
        });
      }, this);
    }, t.prototype.setInputRanges = function(e, n) {
      k(e, function(r) {
        var i = this.findTargetInfo(r, n);
        if (process.env.NODE_ENV !== "production" && (ke(!i || i === !0 || r.coordRange, "coordRange must be specified when coord index specified."), ke(!i || i !== !0 || r.range, "range must be specified in global brush.")), r.range = r.range || [], i && i !== !0) {
          r.panelId = i.panelId;
          var a = XP[r.brushType](0, i.coordSys, r.coordRange), o = r.__rangeOffset;
          r.range = o ? w7[r.brushType](a.values, o.offset, u9e(a.xyMinMax, o.xyMinMax)) : a.values;
        }
      }, this);
    }, t.prototype.makePanelOpts = function(e, n) {
      return ce(this._targetInfoList, function(r) {
        var i = r.getPanelRect();
        return {
          panelId: r.panelId,
          defaultBrushType: n ? n(r) : null,
          clipPath: Kne(i),
          isTargetByCursor: ere(i, e, r.coordSysModel),
          getLinearBrushOtherExtent: Jne(i)
        };
      });
    }, t.prototype.controlSeries = function(e, n, r) {
      var i = this.findTargetInfo(e, r);
      return i === !0 || i && et(i.coordSyses, n.coordinateSystem) >= 0;
    }, t.prototype.findTargetInfo = function(e, n) {
      for (var r = this._targetInfoList, i = _7(n, e), a = 0; a < r.length; a++) {
        var o = r[a], s = e.panelId;
        if (s) {
          if (o.panelId === s)
            return o;
        } else
          for (var l = 0; l < O7.length; l++)
            if (O7[l](i, o))
              return o;
      }
      return !0;
    }, t;
  }()
);
function RE(t) {
  return t[0] > t[1] && t.reverse(), t;
}
function _7(t, e) {
  return $g(t, e, {
    includeMainTypes: s9e
  });
}
var l9e = {
  grid: function(t, e) {
    var n = t.xAxisModels, r = t.yAxisModels, i = t.gridModels, a = Pe(), o = {}, s = {};
    !n && !r && !i || (k(n, function(l) {
      var u = l.axis.grid.model;
      a.set(u.id, u), o[u.id] = !0;
    }), k(r, function(l) {
      var u = l.axis.grid.model;
      a.set(u.id, u), s[u.id] = !0;
    }), k(i, function(l) {
      a.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
    }), a.each(function(l) {
      var u = l.coordinateSystem, c = [];
      k(u.getCartesians(), function(f, d) {
        (et(n, f.getAxis("x").model) >= 0 || et(r, f.getAxis("y").model) >= 0) && c.push(f);
      }), e.push({
        panelId: "grid--" + l.id,
        gridModel: l,
        coordSysModel: l,
        // Use the first one as the representitive coordSys.
        coordSys: c[0],
        coordSyses: c,
        getPanelRect: S7.grid,
        xAxisDeclared: o[l.id],
        yAxisDeclared: s[l.id]
      });
    }));
  },
  geo: function(t, e) {
    k(t.geoModels, function(n) {
      var r = n.coordinateSystem;
      e.push({
        panelId: "geo--" + n.id,
        geoModel: n,
        coordSysModel: n,
        coordSys: r,
        coordSyses: [r],
        getPanelRect: S7.geo
      });
    });
  }
}, O7 = [
  // grid
  function(t, e) {
    var n = t.xAxisModel, r = t.yAxisModel, i = t.gridModel;
    return !i && n && (i = n.axis.grid.model), !i && r && (i = r.axis.grid.model), i && i === e.gridModel;
  },
  // geo
  function(t, e) {
    var n = t.geoModel;
    return n && n === e.geoModel;
  }
], S7 = {
  grid: function() {
    return this.coordSys.master.getRect().clone();
  },
  geo: function() {
    var t = this.coordSys, e = t.getBoundingRect().clone();
    return e.applyTransform(ql(t)), e;
  }
}, XP = {
  lineX: Ue(x7, 0),
  lineY: Ue(x7, 1),
  rect: function(t, e, n, r) {
    var i = t ? e.pointToData([n[0][0], n[1][0]], r) : e.dataToPoint([n[0][0], n[1][0]], r), a = t ? e.pointToData([n[0][1], n[1][1]], r) : e.dataToPoint([n[0][1], n[1][1]], r), o = [RE([i[0], a[0]]), RE([i[1], a[1]])];
    return {
      values: o,
      xyMinMax: o
    };
  },
  polygon: function(t, e, n, r) {
    var i = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], a = ce(n, function(o) {
      var s = t ? e.pointToData(o, r) : e.dataToPoint(o, r);
      return i[0][0] = Math.min(i[0][0], s[0]), i[1][0] = Math.min(i[1][0], s[1]), i[0][1] = Math.max(i[0][1], s[0]), i[1][1] = Math.max(i[1][1], s[1]), s;
    });
    return {
      values: a,
      xyMinMax: i
    };
  }
};
function x7(t, e, n, r) {
  process.env.NODE_ENV !== "production" && ke(n.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
  var i = n.getAxis(["x", "y"][t]), a = RE(ce([0, 1], function(s) {
    return e ? i.coordToData(i.toLocalCoord(r[s]), !0) : i.toGlobalCoord(i.dataToCoord(r[s]));
  })), o = [];
  return o[t] = a, o[1 - t] = [NaN, NaN], {
    values: a,
    xyMinMax: o
  };
}
var w7 = {
  lineX: Ue(C7, 0),
  lineY: Ue(C7, 1),
  rect: function(t, e, n) {
    return [[t[0][0] - n[0] * e[0][0], t[0][1] - n[0] * e[0][1]], [t[1][0] - n[1] * e[1][0], t[1][1] - n[1] * e[1][1]]];
  },
  polygon: function(t, e, n) {
    return ce(t, function(r, i) {
      return [r[0] - n[0] * e[i][0], r[1] - n[1] * e[i][1]];
    });
  }
};
function C7(t, e, n, r) {
  return [e[0] - r[t] * n[0], e[1] - r[t] * n[1]];
}
function u9e(t, e) {
  var n = T7(t), r = T7(e), i = [n[0] / r[0], n[1] / r[1]];
  return isNaN(i[0]) && (i[0] = 1), isNaN(i[1]) && (i[1] = 1), i;
}
function T7(t) {
  return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN];
}
var kE = k, c9e = XDe("toolbox-dataZoom_"), f9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i, a) {
      this._brushController || (this._brushController = new Jk(i.getZr()), this._brushController.on("brush", xe(this._onBrush, this)).mount()), p9e(n, r, this, a, i), h9e(n, r);
    }, e.prototype.onclick = function(n, r, i) {
      d9e[i].call(this);
    }, e.prototype.remove = function(n, r) {
      this._brushController && this._brushController.unmount();
    }, e.prototype.dispose = function(n, r) {
      this._brushController && this._brushController.dispose();
    }, e.prototype._onBrush = function(n) {
      var r = n.areas;
      if (!n.isEnd || !r.length)
        return;
      var i = {}, a = this.ecModel;
      this._brushController.updateCovers([]);
      var o = new wL(CL(this.model), a, {
        include: ["grid"]
      });
      o.matchOutputRanges(r, a, function(u, c, f) {
        if (f.type === "cartesian2d") {
          var d = u.brushType;
          d === "rect" ? (s("x", f, c[0]), s("y", f, c[1])) : s({
            lineX: "x",
            lineY: "y"
          }[d], f, c);
        }
      }), n9e(a, i), this._dispatchZoomAction(i);
      function s(u, c, f) {
        var d = c.getAxis(u), h = d.model, p = l(u, h, a), v = p.findRepresentativeAxisProxy(h).getMinMaxSpan();
        (v.minValueSpan != null || v.maxValueSpan != null) && (f = Qf(0, f.slice(), d.scale.getExtent(), 0, v.minValueSpan, v.maxValueSpan)), p && (i[p.id] = {
          dataZoomId: p.id,
          startValue: f[0],
          endValue: f[1]
        });
      }
      function l(u, c, f) {
        var d;
        return f.eachComponent({
          mainType: "dataZoom",
          subType: "select"
        }, function(h) {
          var p = h.getAxisModel(u, c.componentIndex);
          p && (d = h);
        }), d;
      }
    }, e.prototype._dispatchZoomAction = function(n) {
      var r = [];
      kE(n, function(i, a) {
        r.push(Le(i));
      }), r.length && this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        batch: r
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        filterMode: "filter",
        // Icon group
        icon: {
          zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
          back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
        },
        // `zoom`, `back`
        title: n.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
        brushStyle: {
          borderWidth: 0,
          color: "rgba(210,219,238,0.2)"
        }
      };
      return r;
    }, e;
  }(pa)
), d9e = {
  zoom: function() {
    var t = !this._isZoomActive;
    this.api.dispatchAction({
      type: "takeGlobalCursor",
      key: "dataZoomSelect",
      dataZoomSelectActive: t
    });
  },
  back: function() {
    this._dispatchZoomAction(r9e(this.ecModel));
  }
};
function CL(t) {
  var e = {
    xAxisIndex: t.get("xAxisIndex", !0),
    yAxisIndex: t.get("yAxisIndex", !0),
    xAxisId: t.get("xAxisId", !0),
    yAxisId: t.get("yAxisId", !0)
  };
  return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
}
function h9e(t, e) {
  t.setIconStatus("back", a9e(e) > 1 ? "emphasis" : "normal");
}
function p9e(t, e, n, r, i) {
  var a = n._isZoomActive;
  r && r.type === "takeGlobalCursor" && (a = r.key === "dataZoomSelect" ? r.dataZoomSelectActive : !1), n._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal");
  var o = new wL(CL(t), e, {
    include: ["grid"]
  }), s = o.makePanelOpts(i, function(l) {
    return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
  });
  n._brushController.setPanels(s).enableBrush(a && s.length ? {
    brushType: "auto",
    brushStyle: t.getModel("brushStyle").getItemStyle()
  } : !1);
}
xLe("dataZoom", function(t) {
  var e = t.getComponent("toolbox", 0), n = ["feature", "dataZoom"];
  if (!e || e.get(n) == null)
    return;
  var r = e.getModel(n), i = [], a = CL(r), o = $g(t, a);
  kE(o.xAxisModels, function(l) {
    return s(l, "xAxis", "xAxisIndex");
  }), kE(o.yAxisModels, function(l) {
    return s(l, "yAxis", "yAxisIndex");
  });
  function s(l, u, c) {
    var f = l.componentIndex, d = {
      type: "select",
      $fromToolbox: !0,
      // Default to be filter
      filterMode: r.get("filterMode", !0) || "filter",
      // Id for merge mapping.
      id: c9e + u + f
    };
    d[c] = f, i.push(d);
  }
  return i;
});
function v9e(t) {
  t.registerComponentModel(zHe), t.registerComponentView(FHe), Id("saveAsImage", QHe), Id("magicType", GHe), Id("dataView", e9e), Id("dataZoom", f9e), Id("restore", o9e), at(BHe);
}
var g9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
      // zlevel: 0,
      z: 60,
      show: !0,
      // tooltip main content
      showContent: !0,
      // 'trigger' only works on coordinate system.
      // 'item' | 'axis' | 'none'
      trigger: "item",
      // 'click' | 'mousemove' | 'none'
      triggerOn: "mousemove|click",
      alwaysShowContent: !1,
      displayMode: "single",
      renderMode: "auto",
      // whether restraint content inside viewRect.
      // If renderMode: 'richText', default true.
      // If renderMode: 'html', defaut false (for backward compat).
      confine: null,
      showDelay: 0,
      hideDelay: 100,
      // Animation transition time, unit is second
      transitionDuration: 0.4,
      enterable: !1,
      backgroundColor: "#fff",
      // box shadow
      shadowBlur: 10,
      shadowColor: "rgba(0, 0, 0, .2)",
      shadowOffsetX: 1,
      shadowOffsetY: 2,
      // tooltip border radius, unit is px, default is 4
      borderRadius: 4,
      // tooltip border width, unit is px, default is 0 (no border)
      borderWidth: 1,
      // Tooltip inside padding, default is 5 for all direction
      // Array is allowed to set up, right, bottom, left, same with css
      // The default value: See `tooltip/tooltipMarkup.ts#getPaddingFromTooltipModel`.
      padding: null,
      // Extra css text
      extraCssText: "",
      // axis indicator, trigger by axis
      axisPointer: {
        // default is line
        // legal values: 'line' | 'shadow' | 'cross'
        type: "line",
        // Valid when type is line, appoint tooltip line locate on which line. Optional
        // legal values: 'x' | 'y' | 'angle' | 'radius' | 'auto'
        // default is 'auto', chose the axis which type is category.
        // for multiply y axis, cartesian coord chose x axis, polar chose angle axis
        axis: "auto",
        animation: "auto",
        animationDurationUpdate: 200,
        animationEasingUpdate: "exponentialOut",
        crossStyle: {
          color: "#999",
          width: 1,
          type: "dashed",
          // TODO formatter
          textStyle: {}
        }
        // lineStyle and shadowStyle should not be specified here,
        // otherwise it will always override those styles on option.axisPointer.
      },
      textStyle: {
        color: "#666",
        fontSize: 14
      }
    }, e;
  }(rt)
);
function jre(t) {
  var e = t.get("confine");
  return e != null ? !!e : t.get("renderMode") === "richText";
}
function Zre(t) {
  if (vt.domSupported) {
    for (var e = document.documentElement.style, n = 0, r = t.length; n < r; n++)
      if (t[n] in e)
        return t[n];
  }
}
var Ure = Zre(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), m9e = Zre(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
function Xre(t, e) {
  if (!t)
    return e;
  e = JR(e, !0);
  var n = t.indexOf(e);
  return t = n === -1 ? e : "-" + t.slice(0, n) + "-" + e, t.toLowerCase();
}
function y9e(t, e) {
  var n = t.currentStyle || document.defaultView && document.defaultView.getComputedStyle(t);
  return n ? n[e] : null;
}
var b9e = Xre(m9e, "transition"), TL = Xre(Ure, "transform"), _9e = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (vt.transform3dSupported ? "will-change:transform;" : "");
function O9e(t) {
  return t = t === "left" ? "right" : t === "right" ? "left" : t === "top" ? "bottom" : "top", t;
}
function S9e(t, e, n) {
  if (!Oe(n) || n === "inside")
    return "";
  var r = t.get("backgroundColor"), i = t.get("borderWidth");
  e = _f(e);
  var a = O9e(n), o = Math.max(Math.round(i) * 1.5, 6), s = "", l = TL + ":", u;
  et(["left", "right"], a) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = a === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = a === "top" ? 225 : 45) + "deg)");
  var c = u * Math.PI / 180, f = o + i, d = f * Math.abs(Math.cos(c)) + f * Math.abs(Math.sin(c)), h = Math.round(((d - Math.SQRT2 * i) / 2 + Math.SQRT2 * i - (d - f) / 2) * 100) / 100;
  s += ";" + a + ":-" + h + "px";
  var p = e + " solid " + i + "px;", v = ["position:absolute;width:" + o + "px;height:" + o + "px;z-index:-1;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + r + ";"];
  return '<div style="' + v.join("") + '"></div>';
}
function x9e(t, e) {
  var n = "cubic-bezier(0.23,1,0.32,1)", r = " " + t / 2 + "s " + n, i = "opacity" + r + ",visibility" + r;
  return e || (r = " " + t + "s " + n, i += vt.transformSupported ? "," + TL + r : ",left" + r + ",top" + r), b9e + ":" + i;
}
function P7(t, e, n) {
  var r = t.toFixed(0) + "px", i = e.toFixed(0) + "px";
  if (!vt.transformSupported)
    return n ? "top:" + i + ";left:" + r + ";" : [["top", i], ["left", r]];
  var a = vt.transform3dSupported, o = "translate" + (a ? "3d" : "") + "(" + r + "," + i + (a ? ",0" : "") + ")";
  return n ? "top:0;left:0;" + TL + ":" + o + ";" : [["top", 0], ["left", 0], [Ure, o]];
}
function w9e(t) {
  var e = [], n = t.get("fontSize"), r = t.getTextColor();
  r && e.push("color:" + r), e.push("font:" + t.getFont()), n && e.push("line-height:" + Math.round(n * 3 / 2) + "px");
  var i = t.get("textShadowColor"), a = t.get("textShadowBlur") || 0, o = t.get("textShadowOffsetX") || 0, s = t.get("textShadowOffsetY") || 0;
  return i && a && e.push("text-shadow:" + o + "px " + s + "px " + a + "px " + i), k(["decoration", "align"], function(l) {
    var u = t.get(l);
    u && e.push("text-" + l + ":" + u);
  }), e.join(";");
}
function C9e(t, e, n) {
  var r = [], i = t.get("transitionDuration"), a = t.get("backgroundColor"), o = t.get("shadowBlur"), s = t.get("shadowColor"), l = t.get("shadowOffsetX"), u = t.get("shadowOffsetY"), c = t.getModel("textStyle"), f = ree(t, "html"), d = l + "px " + u + "px " + o + "px " + s;
  return r.push("box-shadow:" + d), e && i && r.push(x9e(i, n)), a && r.push("background-color:" + a), k(["width", "color", "radius"], function(h) {
    var p = "border-" + h, v = JR(p), g = t.get(v);
    g != null && r.push(p + ":" + g + (h === "color" ? "" : "px"));
  }), r.push(w9e(c)), f != null && r.push("padding:" + Bf(f).join("px ") + "px"), r.join(";") + ";";
}
function $7(t, e, n, r, i) {
  var a = e && e.painter;
  if (n) {
    var o = a && a.getViewportRoot();
    o && yIe(t, o, n, r, i);
  } else {
    t[0] = r, t[1] = i;
    var s = a && a.getViewportRootOffset();
    s && (t[0] += s.offsetLeft, t[1] += s.offsetTop);
  }
  t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
}
var T9e = (
  /** @class */
  function() {
    function t(e, n) {
      if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._alwaysShowContent = !1, this._firstShow = !0, this._longHide = !0, vt.wxa)
        return null;
      var r = document.createElement("div");
      r.domBelongToZr = !0, this.el = r;
      var i = this._zr = e.getZr(), a = n.appendTo, o = a && (Oe(a) ? document.querySelector(a) : au(a) ? a : Me(a) && a(e.getDom()));
      $7(this._styleCoord, i, o, e.getWidth() / 2, e.getHeight() / 2), (o || e.getDom()).appendChild(r), this._api = e, this._container = o;
      var s = this;
      r.onmouseenter = function() {
        s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
      }, r.onmousemove = function(l) {
        if (l = l || window.event, !s._enterable) {
          var u = i.handler, c = i.painter.getViewportRoot();
          sa(c, l, !0), u.dispatch("mousemove", l);
        }
      }, r.onmouseleave = function() {
        s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
      };
    }
    return t.prototype.update = function(e) {
      if (!this._container) {
        var n = this._api.getDom(), r = y9e(n, "position"), i = n.style;
        i.position !== "absolute" && r !== "absolute" && (i.position = "relative");
      }
      var a = e.get("alwaysShowContent");
      a && this._moveIfResized(), this._alwaysShowContent = a, this.el.className = e.get("className") || "";
    }, t.prototype.show = function(e, n) {
      clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
      var r = this.el, i = r.style, a = this._styleCoord;
      r.innerHTML ? i.cssText = _9e + C9e(e, !this._firstShow, this._longHide) + P7(a[0], a[1], !0) + ("border-color:" + _f(n) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : i.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
    }, t.prototype.setContent = function(e, n, r, i, a) {
      var o = this.el;
      if (e == null) {
        o.innerHTML = "";
        return;
      }
      var s = "";
      if (Oe(a) && r.get("trigger") === "item" && !jre(r) && (s = S9e(r, i, a)), Oe(e))
        o.innerHTML = e + s;
      else if (e) {
        o.innerHTML = "", ue(e) || (e = [e]);
        for (var l = 0; l < e.length; l++)
          au(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
        if (s && o.childNodes.length) {
          var u = document.createElement("div");
          u.innerHTML = s, o.appendChild(u);
        }
      }
    }, t.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, t.prototype.getSize = function() {
      var e = this.el;
      return [e.offsetWidth, e.offsetHeight];
    }, t.prototype.moveTo = function(e, n) {
      var r = this._styleCoord;
      if ($7(r, this._zr, this._container, e, n), r[0] != null && r[1] != null) {
        var i = this.el.style, a = P7(r[0], r[1]);
        k(a, function(o) {
          i[o[0]] = o[1];
        });
      }
    }, t.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], n = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
    }, t.prototype.hide = function() {
      var e = this, n = this.el.style;
      n.visibility = "hidden", n.opacity = "0", vt.transform3dSupported && (n.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
        return e._longHide = !0;
      }, 500);
    }, t.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
    }, t.prototype.isShow = function() {
      return this._show;
    }, t.prototype.dispose = function() {
      clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
      var e = this.el.parentNode;
      e && e.removeChild(this.el), this.el = this._container = null;
    }, t;
  }()
), P9e = (
  /** @class */
  function() {
    function t(e) {
      this._show = !1, this._styleCoord = [0, 0, 0, 0], this._alwaysShowContent = !1, this._enterable = !0, this._zr = e.getZr(), E7(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
    }
    return t.prototype.update = function(e) {
      var n = e.get("alwaysShowContent");
      n && this._moveIfResized(), this._alwaysShowContent = n;
    }, t.prototype.show = function() {
      this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
    }, t.prototype.setContent = function(e, n, r, i, a) {
      var o = this;
      Ie(e) && Et(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
      var s = r.getModel("textStyle");
      this.el = new gt({
        style: {
          rich: n.richTextStyles,
          text: e,
          lineHeight: 22,
          borderWidth: 1,
          borderColor: i,
          textShadowColor: s.get("textShadowColor"),
          fill: r.get(["textStyle", "color"]),
          padding: ree(r, "richText"),
          verticalAlign: "top",
          align: "left"
        },
        z: r.get("z")
      }), k(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
        o.el.style[u] = r.get(u);
      }), k(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
        o.el.style[u] = s.get(u) || 0;
      }), this._zr.add(this.el);
      var l = this;
      this.el.on("mouseover", function() {
        l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
      }), this.el.on("mouseout", function() {
        l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
      });
    }, t.prototype.setEnterable = function(e) {
      this._enterable = e;
    }, t.prototype.getSize = function() {
      var e = this.el, n = this.el.getBoundingRect(), r = A7(e.style);
      return [n.width + r.left + r.right, n.height + r.top + r.bottom];
    }, t.prototype.moveTo = function(e, n) {
      var r = this.el;
      if (r) {
        var i = this._styleCoord;
        E7(i, this._zr, e, n), e = i[0], n = i[1];
        var a = r.style, o = xl(a.borderWidth || 0), s = A7(a);
        r.x = e + o + s.left, r.y = n + o + s.top, r.markRedraw();
      }
    }, t.prototype._moveIfResized = function() {
      var e = this._styleCoord[2], n = this._styleCoord[3];
      this.moveTo(e * this._zr.getWidth(), n * this._zr.getHeight());
    }, t.prototype.hide = function() {
      this.el && this.el.hide(), this._show = !1;
    }, t.prototype.hideLater = function(e) {
      this._show && !(this._inContent && this._enterable) && !this._alwaysShowContent && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(xe(this.hide, this), e)) : this.hide());
    }, t.prototype.isShow = function() {
      return this._show;
    }, t.prototype.dispose = function() {
      this._zr.remove(this.el);
    }, t;
  }()
);
function xl(t) {
  return Math.max(0, t);
}
function A7(t) {
  var e = xl(t.shadowBlur || 0), n = xl(t.shadowOffsetX || 0), r = xl(t.shadowOffsetY || 0);
  return {
    left: xl(e - n),
    right: xl(e + n),
    top: xl(e - r),
    bottom: xl(e + r)
  };
}
function E7(t, e, n, r) {
  t[0] = n, t[1] = r, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight();
}
var $9e = new mt({
  shape: {
    x: -1,
    y: -1,
    width: 2,
    height: 2
  }
}), A9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      if (!(vt.node || !r.getDom())) {
        var i = n.getComponent("tooltip"), a = this._renderMode = nRe(i.get("renderMode"));
        this._tooltipContent = a === "richText" ? new P9e(r) : new T9e(r, {
          appendTo: i.get("appendToBody", !0) ? "body" : i.get("appendTo", !0)
        });
      }
    }, e.prototype.render = function(n, r, i) {
      if (!(vt.node || !i.getDom())) {
        this.group.removeAll(), this._tooltipModel = n, this._ecModel = r, this._api = i;
        var a = this._tooltipContent;
        a.update(n), a.setEnterable(n.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && n.get("transitionDuration") ? Sp(this, "_updatePosition", 50, "fixRate") : $m(this, "_updatePosition");
      }
    }, e.prototype._initGlobalListener = function() {
      var n = this._tooltipModel, r = n.get("triggerOn");
      Dre("itemTooltip", this._api, xe(function(i, a, o) {
        r !== "none" && (r.indexOf(i) >= 0 ? this._tryShow(a, o) : i === "leave" && this._hide(o));
      }, this));
    }, e.prototype._keepShow = function() {
      var n = this._tooltipModel, r = this._ecModel, i = this._api, a = n.get("triggerOn");
      if (this._lastX != null && this._lastY != null && a !== "none" && a !== "click") {
        var o = this;
        clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
          !i.isDisposed() && o.manuallyShowTip(n, r, i, {
            x: o._lastX,
            y: o._lastY,
            dataByCoordSys: o._lastDataByCoordSys
          });
        });
      }
    }, e.prototype.manuallyShowTip = function(n, r, i, a) {
      if (!(a.from === this.uid || vt.node || !i.getDom())) {
        var o = M7(a, i);
        this._ticket = "";
        var s = a.dataByCoordSys, l = D9e(a, r, i);
        if (l) {
          var u = l.el.getBoundingRect().clone();
          u.applyTransform(l.el.transform), this._tryShow({
            offsetX: u.x + u.width / 2,
            offsetY: u.y + u.height / 2,
            target: l.el,
            position: a.position,
            // When manully trigger, the mouse is not on the el, so we'd better to
            // position tooltip on the bottom of the el and display arrow is possible.
            positionDefault: "bottom"
          }, o);
        } else if (a.tooltip && a.x != null && a.y != null) {
          var c = $9e;
          c.x = a.x, c.y = a.y, c.update(), Fe(c).tooltipConfig = {
            name: null,
            option: a.tooltip
          }, this._tryShow({
            offsetX: a.x,
            offsetY: a.y,
            target: c
          }, o);
        } else if (s)
          this._tryShow({
            offsetX: a.x,
            offsetY: a.y,
            position: a.position,
            dataByCoordSys: s,
            tooltipOption: a.tooltipOption
          }, o);
        else if (a.seriesIndex != null) {
          if (this._manuallyAxisShowTip(n, r, i, a))
            return;
          var f = Rre(a, r), d = f.point[0], h = f.point[1];
          d != null && h != null && this._tryShow({
            offsetX: d,
            offsetY: h,
            target: f.el,
            position: a.position,
            // When manully trigger, the mouse is not on the el, so we'd better to
            // position tooltip on the bottom of the el and display arrow is possible.
            positionDefault: "bottom"
          }, o);
        } else a.x != null && a.y != null && (i.dispatchAction({
          type: "updateAxisPointer",
          x: a.x,
          y: a.y
        }), this._tryShow({
          offsetX: a.x,
          offsetY: a.y,
          position: a.position,
          target: i.getZr().findHover(a.x, a.y).target
        }, o));
      }
    }, e.prototype.manuallyHideTip = function(n, r, i, a) {
      var o = this._tooltipContent;
      this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, a.from !== this.uid && this._hide(M7(a, i));
    }, e.prototype._manuallyAxisShowTip = function(n, r, i, a) {
      var o = a.seriesIndex, s = a.dataIndex, l = r.getComponent("axisPointer").coordSysAxesInfo;
      if (!(o == null || s == null || l == null)) {
        var u = r.getSeriesByIndex(o);
        if (u) {
          var c = u.getData(), f = Ov([c.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
          if (f.get("trigger") === "axis")
            return i.dispatchAction({
              type: "updateAxisPointer",
              seriesIndex: o,
              dataIndex: s,
              position: a.position
            }), !0;
        }
      }
    }, e.prototype._tryShow = function(n, r) {
      var i = n.target, a = this._tooltipModel;
      if (a) {
        this._lastX = n.offsetX, this._lastY = n.offsetY;
        var o = n.dataByCoordSys;
        if (o && o.length)
          this._showAxisTooltip(o, n);
        else if (i) {
          var s = Fe(i);
          if (s.ssrType === "legend")
            return;
          this._lastDataByCoordSys = null;
          var l, u;
          Bc(i, function(c) {
            if (Fe(c).dataIndex != null)
              return l = c, !0;
            if (Fe(c).tooltipConfig != null)
              return u = c, !0;
          }, !0), l ? this._showSeriesItemTooltip(n, l, r) : u ? this._showComponentItemTooltip(n, u, r) : this._hide(r);
        } else
          this._lastDataByCoordSys = null, this._hide(r);
      }
    }, e.prototype._showOrMove = function(n, r) {
      var i = n.get("showDelay");
      r = xe(r, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(r, i) : r();
    }, e.prototype._showAxisTooltip = function(n, r) {
      var i = this._ecModel, a = this._tooltipModel, o = [r.offsetX, r.offsetY], s = Ov([r.tooltipOption], a), l = this._renderMode, u = [], c = tr("section", {
        blocks: [],
        noHeader: !0
      }), f = [], d = new DT();
      k(n, function(y) {
        k(y.dataByAxis, function(b) {
          var _ = i.getComponent(b.axisDim + "Axis", b.axisIndex), O = b.value;
          if (!(!_ || O == null)) {
            var S = Ere(O, _.axis, i, b.seriesDataIndices, b.valueLabelOpt), x = tr("section", {
              header: S,
              noHeader: !ma(S),
              sortBlocks: !0,
              blocks: []
            });
            c.blocks.push(x), k(b.seriesDataIndices, function(C) {
              var T = i.getSeriesByIndex(C.seriesIndex), w = C.dataIndexInside, P = T.getDataParams(w);
              if (!(P.dataIndex < 0)) {
                P.axisDim = b.axisDim, P.axisIndex = b.axisIndex, P.axisType = b.axisType, P.axisId = b.axisId, P.axisValue = Pk(_.axis, {
                  value: O
                }), P.axisValueLabel = S, P.marker = d.makeTooltipMarker("item", _f(P.color), l);
                var $ = pz(T.formatTooltip(w, !0, null)), A = $.frag;
                if (A) {
                  var D = Ov([T], a).get("valueFormatter");
                  x.blocks.push(D ? le({
                    valueFormatter: D
                  }, A) : A);
                }
                $.text && f.push($.text), u.push(P);
              }
            });
          }
        });
      }), c.blocks.reverse(), f.reverse();
      var h = r.position, p = s.get("order"), v = _z(c, d, l, p, i.get("useUTC"), s.get("textStyle"));
      v && f.unshift(v);
      var g = l === "richText" ? `

` : "<br/>", m = f.join(g);
      this._showOrMove(s, function() {
        this._updateContentNotChangedOnAxis(n, u) ? this._updatePosition(s, h, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, m, u, Math.random() + "", o[0], o[1], h, null, d);
      });
    }, e.prototype._showSeriesItemTooltip = function(n, r, i) {
      var a = this._ecModel, o = Fe(r), s = o.seriesIndex, l = a.getSeriesByIndex(s), u = o.dataModel || l, c = o.dataIndex, f = o.dataType, d = u.getData(f), h = this._renderMode, p = n.positionDefault, v = Ov([d.getItemModel(c), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
        position: p
      } : null), g = v.get("trigger");
      if (!(g != null && g !== "item")) {
        var m = u.getDataParams(c, f), y = new DT();
        m.marker = y.makeTooltipMarker("item", _f(m.color), h);
        var b = pz(u.formatTooltip(c, !1, f)), _ = v.get("order"), O = v.get("valueFormatter"), S = b.frag, x = S ? _z(O ? le({
          valueFormatter: O
        }, S) : S, y, h, _, a.get("useUTC"), v.get("textStyle")) : b.text, C = "item_" + u.name + "_" + c;
        this._showOrMove(v, function() {
          this._showTooltipContent(v, x, m, C, n.offsetX, n.offsetY, n.position, n.target, y);
        }), i({
          type: "showTip",
          dataIndexInside: c,
          dataIndex: d.getRawIndex(c),
          seriesIndex: s,
          from: this.uid
        });
      }
    }, e.prototype._showComponentItemTooltip = function(n, r, i) {
      var a = this._renderMode === "html", o = Fe(r), s = o.tooltipConfig, l = s.option || {}, u = l.encodeHTMLContent;
      if (Oe(l)) {
        var c = l;
        l = {
          content: c,
          // Fixed formatter
          formatter: c
        }, u = !0;
      }
      u && a && l.content && (l = Le(l), l.content = Gr(l.content));
      var f = [l], d = this._ecModel.getComponent(o.componentMainType, o.componentIndex);
      d && f.push(d), f.push({
        formatter: l.content
      });
      var h = n.positionDefault, p = Ov(f, this._tooltipModel, h ? {
        position: h
      } : null), v = p.get("content"), g = Math.random() + "", m = new DT();
      this._showOrMove(p, function() {
        var y = Le(p.get("formatterParams") || {});
        this._showTooltipContent(p, v, y, g, n.offsetX, n.offsetY, n.position, r, m);
      }), i({
        type: "showTip",
        from: this.uid
      });
    }, e.prototype._showTooltipContent = function(n, r, i, a, o, s, l, u, c) {
      if (this._ticket = "", !(!n.get("showContent") || !n.get("show"))) {
        var f = this._tooltipContent;
        f.setEnterable(n.get("enterable"));
        var d = n.get("formatter");
        l = l || n.get("position");
        var h = r, p = this._getNearestPoint([o, s], i, n.get("trigger"), n.get("borderColor")), v = p.color;
        if (d)
          if (Oe(d)) {
            var g = n.ecModel.get("useUTC"), m = ue(i) ? i[0] : i, y = m && m.axisType && m.axisType.indexOf("time") >= 0;
            h = d, y && (h = Q0(m.axisValue, h, g)), h = ek(h, i, !0);
          } else if (Me(d)) {
            var b = xe(function(_, O) {
              _ === this._ticket && (f.setContent(O, c, n, v, l), this._updatePosition(n, l, o, s, f, i, u));
            }, this);
            this._ticket = a, h = d(i, a, b);
          } else
            h = d;
        f.setContent(h, c, n, v, l), f.show(n, v), this._updatePosition(n, l, o, s, f, i, u);
      }
    }, e.prototype._getNearestPoint = function(n, r, i, a) {
      if (i === "axis" || ue(r))
        return {
          color: a || (this._renderMode === "html" ? "#fff" : "none")
        };
      if (!ue(r))
        return {
          color: a || r.color || r.borderColor
        };
    }, e.prototype._updatePosition = function(n, r, i, a, o, s, l) {
      var u = this._api.getWidth(), c = this._api.getHeight();
      r = r || n.get("position");
      var f = o.getSize(), d = n.get("align"), h = n.get("verticalAlign"), p = l && l.getBoundingRect().clone();
      if (l && p.applyTransform(l.transform), Me(r) && (r = r([i, a], s, o.el, p, {
        viewSize: [u, c],
        contentSize: f.slice()
      })), ue(r))
        i = _e(r[0], u), a = _e(r[1], c);
      else if (Ie(r)) {
        var v = r;
        v.width = f[0], v.height = f[1];
        var g = Rn(v, {
          width: u,
          height: c
        });
        i = g.x, a = g.y, d = null, h = null;
      } else if (Oe(r) && l) {
        var m = I9e(r, p, f, n.get("borderWidth"));
        i = m[0], a = m[1];
      } else {
        var m = E9e(i, a, o, u, c, d ? null : 20, h ? null : 20);
        i = m[0], a = m[1];
      }
      if (d && (i -= I7(d) ? f[0] / 2 : d === "right" ? f[0] : 0), h && (a -= I7(h) ? f[1] / 2 : h === "bottom" ? f[1] : 0), jre(n)) {
        var m = M9e(i, a, o, u, c);
        i = m[0], a = m[1];
      }
      o.moveTo(i, a);
    }, e.prototype._updateContentNotChangedOnAxis = function(n, r) {
      var i = this._lastDataByCoordSys, a = this._cbParamsList, o = !!i && i.length === n.length;
      return o && k(i, function(s, l) {
        var u = s.dataByAxis || [], c = n[l] || {}, f = c.dataByAxis || [];
        o = o && u.length === f.length, o && k(u, function(d, h) {
          var p = f[h] || {}, v = d.seriesDataIndices || [], g = p.seriesDataIndices || [];
          o = o && d.value === p.value && d.axisType === p.axisType && d.axisId === p.axisId && v.length === g.length, o && k(v, function(m, y) {
            var b = g[y];
            o = o && m.seriesIndex === b.seriesIndex && m.dataIndex === b.dataIndex;
          }), a && k(d.seriesDataIndices, function(m) {
            var y = m.seriesIndex, b = r[y], _ = a[y];
            b && _ && _.data !== b.data && (o = !1);
          });
        });
      }), this._lastDataByCoordSys = n, this._cbParamsList = r, !!o;
    }, e.prototype._hide = function(n) {
      this._lastDataByCoordSys = null, n({
        type: "hideTip",
        from: this.uid
      });
    }, e.prototype.dispose = function(n, r) {
      vt.node || !r.getDom() || ($m(this, "_updatePosition"), this._tooltipContent.dispose(), EE("itemTooltip", r));
    }, e.type = "tooltip", e;
  }(Xt)
);
function Ov(t, e, n) {
  var r = e.ecModel, i;
  n ? (i = new Wt(n, r, r), i = new Wt(e.option, i, r)) : i = e;
  for (var a = t.length - 1; a >= 0; a--) {
    var o = t[a];
    o && (o instanceof Wt && (o = o.get("tooltip", !0)), Oe(o) && (o = {
      formatter: o
    }), o && (i = new Wt(o, i, r)));
  }
  return i;
}
function M7(t, e) {
  return t.dispatchAction || xe(e.dispatchAction, e);
}
function E9e(t, e, n, r, i, a, o) {
  var s = n.getSize(), l = s[0], u = s[1];
  return a != null && (t + l + a + 2 > r ? t -= l + a : t += a), o != null && (e + u + o > i ? e -= u + o : e += o), [t, e];
}
function M9e(t, e, n, r, i) {
  var a = n.getSize(), o = a[0], s = a[1];
  return t = Math.min(t + o, r) - o, e = Math.min(e + s, i) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
}
function I9e(t, e, n, r) {
  var i = n[0], a = n[1], o = Math.ceil(Math.SQRT2 * r) + 8, s = 0, l = 0, u = e.width, c = e.height;
  switch (t) {
    case "inside":
      s = e.x + u / 2 - i / 2, l = e.y + c / 2 - a / 2;
      break;
    case "top":
      s = e.x + u / 2 - i / 2, l = e.y - a - o;
      break;
    case "bottom":
      s = e.x + u / 2 - i / 2, l = e.y + c + o;
      break;
    case "left":
      s = e.x - i - o, l = e.y + c / 2 - a / 2;
      break;
    case "right":
      s = e.x + u + o, l = e.y + c / 2 - a / 2;
  }
  return [s, l];
}
function I7(t) {
  return t === "center" || t === "middle";
}
function D9e(t, e, n) {
  var r = ER(t).queryOptionMap, i = r.keys()[0];
  if (!(!i || i === "series")) {
    var a = N0(e, i, r.get(i), {
      useDefault: !1,
      enableAll: !1,
      enableNone: !1
    }), o = a.models[0];
    if (o) {
      var s = n.getViewOfComponentModel(o), l;
      if (s.group.traverse(function(u) {
        var c = Fe(u).tooltipConfig;
        if (c && c.name === t.name)
          return l = u, !0;
      }), l)
        return {
          componentMainType: i,
          componentIndex: o.componentIndex,
          el: l
        };
    }
  }
}
function R9e(t) {
  at(ey), t.registerComponentModel(g9e), t.registerComponentView(A9e), t.registerAction({
    type: "showTip",
    event: "showTip",
    update: "tooltip:manuallyShowTip"
  }, On), t.registerAction({
    type: "hideTip",
    event: "hideTip",
    update: "tooltip:manuallyHideTip"
  }, On);
}
var k9e = ["rect", "polygon", "keep", "clear"];
function L9e(t, e) {
  var n = Qt(t ? t.brush : []);
  if (n.length) {
    var r = [];
    k(n, function(l) {
      var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
      u instanceof Array && (r = r.concat(u));
    });
    var i = t && t.toolbox;
    ue(i) && (i = i[0]), i || (i = {
      feature: {}
    }, t.toolbox = [i]);
    var a = i.feature || (i.feature = {}), o = a.brush || (a.brush = {}), s = o.type || (o.type = []);
    s.push.apply(s, r), N9e(s), e && !s.length && s.push.apply(s, k9e);
  }
}
function N9e(t) {
  var e = {};
  k(t, function(n) {
    e[n] = 1;
  }), t.length = 0, k(e, function(n, r) {
    t.push(r);
  });
}
var D7 = k;
function R7(t) {
  if (t) {
    for (var e in t)
      if (t.hasOwnProperty(e))
        return !0;
  }
}
function LE(t, e, n) {
  var r = {};
  return D7(e, function(a) {
    var o = r[a] = i();
    D7(t[a], function(s, l) {
      if (qn.isValidType(l)) {
        var u = {
          type: l,
          visual: s
        };
        n && n(u, a), o[l] = new qn(u), l === "opacity" && (u = Le(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new qn(u));
      }
    });
  }), r;
  function i() {
    var a = function() {
    };
    a.prototype.__hidden = a.prototype;
    var o = new a();
    return o;
  }
}
function Yre(t, e, n) {
  var r;
  k(n, function(i) {
    e.hasOwnProperty(i) && R7(e[i]) && (r = !0);
  }), r && k(n, function(i) {
    e.hasOwnProperty(i) && R7(e[i]) ? t[i] = Le(e[i]) : delete t[i];
  });
}
function B9e(t, e, n, r, i, a) {
  var o = {};
  k(t, function(f) {
    var d = qn.prepareVisualTypes(e[f]);
    o[f] = d;
  });
  var s;
  function l(f) {
    return ck(n, s, f);
  }
  function u(f, d) {
    hee(n, s, f, d);
  }
  n.each(c);
  function c(f, d) {
    s = f;
    var h = n.getRawDataItem(s);
    if (!(h && h.visualMap === !1))
      for (var p = r.call(i, f), v = e[p], g = o[p], m = 0, y = g.length; m < y; m++) {
        var b = g[m];
        v[b] && v[b].applyVisual(f, l, u);
      }
  }
}
function z9e(t, e, n, r) {
  var i = {};
  return k(t, function(a) {
    var o = qn.prepareVisualTypes(e[a]);
    i[a] = o;
  }), {
    progress: function(o, s) {
      var l;
      r != null && (l = s.getDimensionIndex(r));
      function u(O) {
        return ck(s, f, O);
      }
      function c(O, S) {
        hee(s, f, O, S);
      }
      for (var f, d = s.getStore(); (f = o.next()) != null; ) {
        var h = s.getRawDataItem(f);
        if (!(h && h.visualMap === !1))
          for (var p = r != null ? d.get(l, f) : f, v = n(p), g = e[v], m = i[v], y = 0, b = m.length; y < b; y++) {
            var _ = m[y];
            g[_] && g[_].applyVisual(p, u, c);
          }
      }
    }
  };
}
function V9e(t) {
  var e = t.brushType, n = {
    point: function(r) {
      return k7[e].point(r, n, t);
    },
    rect: function(r) {
      return k7[e].rect(r, n, t);
    }
  };
  return n;
}
var k7 = {
  lineX: L7(0),
  lineY: L7(1),
  rect: {
    point: function(t, e, n) {
      return t && n.boundingRect.contain(t[0], t[1]);
    },
    rect: function(t, e, n) {
      return t && n.boundingRect.intersect(t);
    }
  },
  polygon: {
    point: function(t, e, n) {
      return t && n.boundingRect.contain(t[0], t[1]) && Sc(n.range, t[0], t[1]);
    },
    rect: function(t, e, n) {
      var r = n.range;
      if (!t || r.length <= 1)
        return !1;
      var i = t.x, a = t.y, o = t.width, s = t.height, l = r[0];
      if (Sc(r, i, a) || Sc(r, i + o, a) || Sc(r, i, a + s) || Sc(r, i + o, a + s) || Je.create(t).contain(l[0], l[1]) || Gv(i, a, i + o, a, r) || Gv(i, a, i, a + s, r) || Gv(i + o, a, i + o, a + s, r) || Gv(i, a + s, i + o, a + s, r))
        return !0;
    }
  }
};
function L7(t) {
  var e = ["x", "y"], n = ["width", "height"];
  return {
    point: function(r, i, a) {
      if (r) {
        var o = a.range, s = r[t];
        return Sv(s, o);
      }
    },
    rect: function(r, i, a) {
      if (r) {
        var o = a.range, s = [r[e[t]], r[e[t]] + r[n[t]]];
        return s[1] < s[0] && s.reverse(), Sv(s[0], o) || Sv(s[1], o) || Sv(o[0], s) || Sv(o[1], s);
      }
    }
  };
}
function Sv(t, e) {
  return e[0] <= t && t <= e[1];
}
var N7 = ["inBrush", "outOfBrush"], YP = "__ecBrushSelect", NE = "__ecInBrushSelectEvent";
function qre(t) {
  t.eachComponent({
    mainType: "brush"
  }, function(e) {
    var n = e.brushTargetManager = new wL(e.option, t);
    n.setInputRanges(e.areas, t);
  });
}
function F9e(t, e, n) {
  var r = [], i, a;
  t.eachComponent({
    mainType: "brush"
  }, function(o) {
    n && n.type === "takeGlobalCursor" && o.setBrushOption(n.key === "brush" ? n.brushOption : {
      brushType: !1
    });
  }), qre(t), t.eachComponent({
    mainType: "brush"
  }, function(o, s) {
    var l = {
      brushId: o.id,
      brushIndex: s,
      brushName: o.name,
      areas: Le(o.areas),
      selected: []
    };
    r.push(l);
    var u = o.option, c = u.brushLink, f = [], d = [], h = [], p = !1;
    s || (i = u.throttleType, a = u.throttleDelay);
    var v = ce(o.areas, function(O) {
      var S = G9e[O.brushType], x = Re({
        boundingRect: S ? S(O) : void 0
      }, O);
      return x.selectors = V9e(x), x;
    }), g = LE(o.option, N7, function(O) {
      O.mappingMethod = "fixed";
    });
    ue(c) && k(c, function(O) {
      f[O] = 1;
    });
    function m(O) {
      return c === "all" || !!f[O];
    }
    function y(O) {
      return !!O.length;
    }
    t.eachSeries(function(O, S) {
      var x = h[S] = [];
      O.subType === "parallel" ? b(O, S) : _(O, S, x);
    });
    function b(O, S) {
      var x = O.coordinateSystem;
      p = p || x.hasAxisBrushed(), m(S) && x.eachActiveState(O.getData(), function(C, T) {
        C === "active" && (d[T] = 1);
      });
    }
    function _(O, S, x) {
      if (!(!O.brushSelector || H9e(o, S)) && (k(v, function(T) {
        o.brushTargetManager.controlSeries(T, O, t) && x.push(T), p = p || y(x);
      }), m(S) && y(x))) {
        var C = O.getData();
        C.each(function(T) {
          B7(O, x, C, T) && (d[T] = 1);
        });
      }
    }
    t.eachSeries(function(O, S) {
      var x = {
        seriesId: O.id,
        seriesIndex: S,
        seriesName: O.name,
        dataIndex: []
      };
      l.selected.push(x);
      var C = h[S], T = O.getData(), w = m(S) ? function(P) {
        return d[P] ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
      } : function(P) {
        return B7(O, C, T, P) ? (x.dataIndex.push(T.getRawIndex(P)), "inBrush") : "outOfBrush";
      };
      (m(S) ? p : y(C)) && B9e(N7, g, T, w);
    });
  }), W9e(e, i, a, r, n);
}
function W9e(t, e, n, r, i) {
  if (i) {
    var a = t.getZr();
    if (!a[NE]) {
      a[YP] || (a[YP] = Q9e);
      var o = Sp(a, YP, n, e);
      o(t, r);
    }
  }
}
function Q9e(t, e) {
  if (!t.isDisposed()) {
    var n = t.getZr();
    n[NE] = !0, t.dispatchAction({
      type: "brushSelect",
      batch: e
    }), n[NE] = !1;
  }
}
function B7(t, e, n, r) {
  for (var i = 0, a = e.length; i < a; i++) {
    var o = e[i];
    if (t.brushSelector(r, n, o.selectors, o))
      return !0;
  }
}
function H9e(t, e) {
  var n = t.option.seriesIndex;
  return n != null && n !== "all" && (ue(n) ? et(n, e) < 0 : e !== n);
}
var G9e = {
  rect: function(t) {
    return z7(t.range);
  },
  polygon: function(t) {
    for (var e, n = t.range, r = 0, i = n.length; r < i; r++) {
      e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
      var a = n[r];
      a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]);
    }
    return e && z7(e);
  }
};
function z7(t) {
  return new Je(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]);
}
var j9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      this.ecModel = n, this.api = r, this.model, (this._brushController = new Jk(r.getZr())).on("brush", xe(this._onBrush, this)).mount();
    }, e.prototype.render = function(n, r, i, a) {
      this.model = n, this._updateController(n, r, i, a);
    }, e.prototype.updateTransform = function(n, r, i, a) {
      qre(r), this._updateController(n, r, i, a);
    }, e.prototype.updateVisual = function(n, r, i, a) {
      this.updateTransform(n, r, i, a);
    }, e.prototype.updateView = function(n, r, i, a) {
      this._updateController(n, r, i, a);
    }, e.prototype._updateController = function(n, r, i, a) {
      (!a || a.$from !== n.id) && this._brushController.setPanels(n.brushTargetManager.makePanelOpts(i)).enableBrush(n.brushOption).updateCovers(n.areas.slice());
    }, e.prototype.dispose = function() {
      this._brushController.dispose();
    }, e.prototype._onBrush = function(n) {
      var r = this.model.id, i = this.model.brushTargetManager.setOutputRanges(n.areas, this.ecModel);
      (!n.isEnd || n.removeOnClick) && this.api.dispatchAction({
        type: "brush",
        brushId: r,
        areas: Le(i),
        $from: r
      }), n.isEnd && this.api.dispatchAction({
        type: "brushEnd",
        brushId: r,
        areas: Le(i),
        $from: r
      });
    }, e.type = "brush", e;
  }(Xt)
), Z9e = "#ddd", U9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.areas = [], n.brushOption = {}, n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      var i = this.option;
      !r && Yre(i, n, ["inBrush", "outOfBrush"]);
      var a = i.inBrush = i.inBrush || {};
      i.outOfBrush = i.outOfBrush || {
        color: Z9e
      }, a.hasOwnProperty("liftZ") || (a.liftZ = 5);
    }, e.prototype.setAreas = function(n) {
      process.env.NODE_ENV !== "production" && (ke(ue(n)), k(n, function(r) {
        ke(r.brushType, "Illegal areas");
      })), n && (this.areas = ce(n, function(r) {
        return V7(this.option, r);
      }, this));
    }, e.prototype.setBrushOption = function(n) {
      this.brushOption = V7(this.option, n), this.brushType = this.brushOption.brushType;
    }, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
      seriesIndex: "all",
      brushType: "rect",
      brushMode: "single",
      transformable: !0,
      brushStyle: {
        borderWidth: 1,
        color: "rgba(210,219,238,0.3)",
        borderColor: "#D2DBEE"
      },
      throttleType: "fixRate",
      throttleDelay: 0,
      removeOnClick: !0,
      z: 1e4
    }, e;
  }(rt)
);
function V7(t, e) {
  return qe({
    brushType: t.brushType,
    brushMode: t.brushMode,
    transformable: t.transformable,
    brushStyle: new Wt(t.brushStyle).getItemStyle(),
    removeOnClick: t.removeOnClick,
    z: t.z
  }, e, !0);
}
var X9e = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], Y9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      return t !== null && t.apply(this, arguments) || this;
    }
    return e.prototype.render = function(n, r, i) {
      var a, o, s;
      r.eachComponent({
        mainType: "brush"
      }, function(l) {
        a = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
      }), this._brushType = a, this._brushMode = o, k(n.get("type", !0), function(l) {
        n.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === a) ? "emphasis" : "normal");
      });
    }, e.prototype.updateView = function(n, r, i) {
      this.render(n, r, i);
    }, e.prototype.getIcons = function() {
      var n = this.model, r = n.get("icon", !0), i = {};
      return k(n.get("type", !0), function(a) {
        r[a] && (i[a] = r[a]);
      }), i;
    }, e.prototype.onclick = function(n, r, i) {
      var a = this._brushType, o = this._brushMode;
      i === "clear" ? (r.dispatchAction({
        type: "axisAreaSelect",
        intervals: []
      }), r.dispatchAction({
        type: "brush",
        command: "clear",
        // Clear all areas of all brush components.
        areas: []
      })) : r.dispatchAction({
        type: "takeGlobalCursor",
        key: "brush",
        brushOption: {
          brushType: i === "keep" ? a : a === i ? !1 : i,
          brushMode: i === "keep" ? o === "multiple" ? "single" : "multiple" : o
        }
      });
    }, e.getDefaultOption = function(n) {
      var r = {
        show: !0,
        type: X9e.slice(),
        icon: {
          /* eslint-disable */
          rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
          polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
          lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
          lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
          keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
          clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
          // jshint ignore:line
          /* eslint-enable */
        },
        // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`
        title: n.getLocaleModel().get(["toolbox", "brush", "title"])
      };
      return r;
    }, e;
  }(pa)
);
function q9e(t) {
  t.registerComponentView(j9e), t.registerComponentModel(U9e), t.registerPreprocessor(L9e), t.registerVisual(t.PRIORITY.VISUAL.BRUSH, F9e), t.registerAction({
    type: "brush",
    event: "brush",
    update: "updateVisual"
  }, function(e, n) {
    n.eachComponent({
      mainType: "brush",
      query: e
    }, function(r) {
      r.setAreas(e.areas);
    });
  }), t.registerAction({
    type: "brushSelect",
    event: "brushSelected",
    update: "none"
  }, On), t.registerAction({
    type: "brushEnd",
    event: "brushEnd",
    update: "none"
  }, On), Id("brush", Y9e);
}
var K9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, n;
    }
    return e.type = "title", e.defaultOption = {
      // zlevel: 0,
      z: 6,
      show: !0,
      text: "",
      target: "blank",
      subtext: "",
      subtarget: "blank",
      left: 0,
      top: 0,
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      borderWidth: 0,
      padding: 5,
      itemGap: 10,
      textStyle: {
        fontSize: 18,
        fontWeight: "bold",
        color: "#464646"
      },
      subtextStyle: {
        fontSize: 12,
        color: "#6E7079"
      }
    }, e;
  }(rt)
), J9e = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.render = function(n, r, i) {
      if (this.group.removeAll(), !!n.get("show")) {
        var a = this.group, o = n.getModel("textStyle"), s = n.getModel("subtextStyle"), l = n.get("textAlign"), u = We(n.get("textBaseline"), n.get("textVerticalAlign")), c = new gt({
          style: Zt(o, {
            text: n.get("text"),
            fill: o.getTextColor()
          }, {
            disableBox: !0
          }),
          z2: 10
        }), f = c.getBoundingRect(), d = n.get("subtext"), h = new gt({
          style: Zt(s, {
            text: d,
            fill: s.getTextColor(),
            y: f.height + n.get("itemGap"),
            verticalAlign: "top"
          }, {
            disableBox: !0
          }),
          z2: 10
        }), p = n.get("link"), v = n.get("sublink"), g = n.get("triggerEvent", !0);
        c.silent = !p && !g, h.silent = !v && !g, p && c.on("click", function() {
          dO(p, "_" + n.get("target"));
        }), v && h.on("click", function() {
          dO(v, "_" + n.get("subtarget"));
        }), Fe(c).eventData = Fe(h).eventData = g ? {
          componentType: "title",
          componentIndex: n.componentIndex
        } : null, a.add(c), d && a.add(h);
        var m = a.getBoundingRect(), y = n.getBoxLayoutParams();
        y.width = m.width, y.height = m.height;
        var b = Rn(y, {
          width: i.getWidth(),
          height: i.getHeight()
        }, n.get("padding"));
        l || (l = n.get("left") || n.get("right"), l === "middle" && (l = "center"), l === "right" ? b.x += b.width : l === "center" && (b.x += b.width / 2)), u || (u = n.get("top") || n.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? b.y += b.height : u === "middle" && (b.y += b.height / 2), u = u || "top"), a.x = b.x, a.y = b.y, a.markRedraw();
        var _ = {
          align: l,
          verticalAlign: u
        };
        c.setStyle(_), h.setStyle(_), m = a.getBoundingRect();
        var O = b.margin, S = n.getItemStyle(["color", "opacity"]);
        S.fill = n.get("backgroundColor");
        var x = new mt({
          shape: {
            x: m.x - O[3],
            y: m.y - O[0],
            width: m.width + O[1] + O[3],
            height: m.height + O[0] + O[2],
            r: n.get("borderRadius")
          },
          style: S,
          subPixelOptimize: !0,
          silent: !0
        });
        a.add(x);
      }
    }, e.type = "title", e;
  }(Xt)
);
function eGe(t) {
  t.registerComponentModel(K9e), t.registerComponentView(J9e);
}
var F7 = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = "box", n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i), this._initData();
    }, e.prototype.mergeOption = function(n) {
      t.prototype.mergeOption.apply(this, arguments), this._initData();
    }, e.prototype.setCurrentIndex = function(n) {
      n == null && (n = this.option.currentIndex);
      var r = this._data.count();
      this.option.loop ? n = (n % r + r) % r : (n >= r && (n = r - 1), n < 0 && (n = 0)), this.option.currentIndex = n;
    }, e.prototype.getCurrentIndex = function() {
      return this.option.currentIndex;
    }, e.prototype.isIndexMax = function() {
      return this.getCurrentIndex() >= this._data.count() - 1;
    }, e.prototype.setPlayState = function(n) {
      this.option.autoPlay = !!n;
    }, e.prototype.getPlayState = function() {
      return !!this.option.autoPlay;
    }, e.prototype._initData = function() {
      var n = this.option, r = n.data || [], i = n.axisType, a = this._names = [], o;
      i === "category" ? (o = [], k(r, function(u, c) {
        var f = Vn(fp(u), ""), d;
        Ie(u) ? (d = Le(u), d.value = c) : d = c, o.push(d), a.push(f);
      })) : o = r;
      var s = {
        category: "ordinal",
        time: "time",
        value: "number"
      }[i] || "number", l = this._data = new Lr([{
        name: "value",
        type: s
      }], this);
      l.initData(o, a);
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.getCategories = function() {
      if (this.get("axisType") === "category")
        return this._names.slice();
    }, e.type = "timeline", e.defaultOption = {
      // zlevel: 0,                  // 一级层叠
      z: 4,
      show: !0,
      axisType: "time",
      realtime: !0,
      left: "20%",
      top: null,
      right: "20%",
      bottom: 0,
      width: null,
      height: 40,
      padding: 5,
      controlPosition: "left",
      autoPlay: !1,
      rewind: !1,
      loop: !0,
      playInterval: 2e3,
      currentIndex: 0,
      itemStyle: {},
      label: {
        color: "#000"
      },
      data: []
    }, e;
  }(rt)
), Kre = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "timeline.slider", e.defaultOption = Pu(F7.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;
  }(F7)
);
xn(Kre, sw.prototype);
var tGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "timeline", e;
  }(Xt)
), nGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e(n, r, i, a) {
      var o = t.call(this, n, r, i) || this;
      return o.type = a || "value", o;
    }
    return e.prototype.getLabelModel = function() {
      return this.model.getModel("label");
    }, e.prototype.isHorizontal = function() {
      return this.model.get("orient") === "horizontal";
    }, e;
  }(Ba)
), qP = Math.PI, W7 = bt(), rGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function(n, r) {
      this.api = r;
    }, e.prototype.render = function(n, r, i) {
      if (this.model = n, this.api = i, this.ecModel = r, this.group.removeAll(), n.get("show", !0)) {
        var a = this._layout(n, i), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(a, n);
        n.formatTooltip = function(u) {
          var c = l.scale.getLabel({
            value: u
          });
          return tr("nameValue", {
            noName: !0,
            value: c
          });
        }, k(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
          this["_render" + u](a, o, l, n);
        }, this), this._renderAxisLabel(a, s, l, n), this._position(a, n);
      }
      this._doPlayStop(), this._updateTicksStatus();
    }, e.prototype.remove = function() {
      this._clearTimer(), this.group.removeAll();
    }, e.prototype.dispose = function() {
      this._clearTimer();
    }, e.prototype._layout = function(n, r) {
      var i = n.get(["label", "position"]), a = n.get("orient"), o = aGe(n, r), s;
      i == null || i === "auto" ? s = a === "horizontal" ? o.y + o.height / 2 < r.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < r.getWidth() / 2 ? "+" : "-" : Oe(i) ? s = {
        horizontal: {
          top: "-",
          bottom: "+"
        },
        vertical: {
          left: "-",
          right: "+"
        }
      }[a][i] : s = i;
      var l = {
        horizontal: "center",
        vertical: s >= 0 || s === "+" ? "left" : "right"
      }, u = {
        horizontal: s >= 0 || s === "+" ? "top" : "bottom",
        vertical: "middle"
      }, c = {
        horizontal: 0,
        vertical: qP / 2
      }, f = a === "vertical" ? o.height : o.width, d = n.getModel("controlStyle"), h = d.get("show", !0), p = h ? d.get("itemSize") : 0, v = h ? d.get("itemGap") : 0, g = p + v, m = n.get(["label", "rotate"]) || 0;
      m = m * qP / 180;
      var y, b, _, O = d.get("position", !0), S = h && d.get("showPlayBtn", !0), x = h && d.get("showPrevBtn", !0), C = h && d.get("showNextBtn", !0), T = 0, w = f;
      O === "left" || O === "bottom" ? (S && (y = [0, 0], T += g), x && (b = [T, 0], T += g), C && (_ = [w - p, 0], w -= g)) : (S && (y = [w - p, 0], w -= g), x && (b = [0, 0], T += g), C && (_ = [w - p, 0], w -= g));
      var P = [T, w];
      return n.get("inverse") && P.reverse(), {
        viewRect: o,
        mainLength: f,
        orient: a,
        rotation: c[a],
        labelRotation: m,
        labelPosOpt: s,
        labelAlign: n.get(["label", "align"]) || l[a],
        labelBaseline: n.get(["label", "verticalAlign"]) || n.get(["label", "baseline"]) || u[a],
        // Based on mainGroup.
        playPosition: y,
        prevBtnPosition: b,
        nextBtnPosition: _,
        axisExtent: P,
        controlSize: p,
        controlGap: v
      };
    }, e.prototype._position = function(n, r) {
      var i = this._mainGroup, a = this._labelGroup, o = n.viewRect;
      if (n.orient === "vertical") {
        var s = Si(), l = o.x, u = o.y + o.height;
        ao(s, s, [-l, -u]), Cu(s, s, -qP / 2), ao(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
      }
      var c = y(o), f = y(i.getBoundingRect()), d = y(a.getBoundingRect()), h = [i.x, i.y], p = [a.x, a.y];
      p[0] = h[0] = c[0][0];
      var v = n.labelPosOpt;
      if (v == null || Oe(v)) {
        var g = v === "+" ? 0 : 1;
        b(h, f, c, 1, g), b(p, d, c, 1, 1 - g);
      } else {
        var g = v >= 0 ? 0 : 1;
        b(h, f, c, 1, g), p[1] = h[1] + v;
      }
      i.setPosition(h), a.setPosition(p), i.rotation = a.rotation = n.rotation, m(i), m(a);
      function m(_) {
        _.originX = c[0][0] - _.x, _.originY = c[1][0] - _.y;
      }
      function y(_) {
        return [[_.x, _.x + _.width], [_.y, _.y + _.height]];
      }
      function b(_, O, S, x, C) {
        _[x] += S[x][C] - O[x][C];
      }
    }, e.prototype._createAxis = function(n, r) {
      var i = r.getData(), a = r.get("axisType"), o = iGe(r, a);
      o.getTicks = function() {
        return i.mapArray(["value"], function(u) {
          return {
            value: u
          };
        });
      };
      var s = i.getDataExtent("value");
      o.setExtent(s[0], s[1]), o.calcNiceTicks();
      var l = new nGe("value", o, n.axisExtent, a);
      return l.model = r, l;
    }, e.prototype._createGroup = function(n) {
      var r = this[n] = new Ve();
      return this.group.add(r), r;
    }, e.prototype._renderAxisLine = function(n, r, i, a) {
      var o = i.getExtent();
      if (a.get(["lineStyle", "show"])) {
        var s = new Un({
          shape: {
            x1: o[0],
            y1: 0,
            x2: o[1],
            y2: 0
          },
          style: le({
            lineCap: "round"
          }, a.getModel("lineStyle").getLineStyle()),
          silent: !0,
          z2: 1
        });
        r.add(s);
        var l = this._progressLine = new Un({
          shape: {
            x1: o[0],
            x2: this._currentPointer ? this._currentPointer.x : o[0],
            y1: 0,
            y2: 0
          },
          style: Re({
            lineCap: "round",
            lineWidth: s.style.lineWidth
          }, a.getModel(["progress", "lineStyle"]).getLineStyle()),
          silent: !0,
          z2: 1
        });
        r.add(l);
      }
    }, e.prototype._renderAxisTick = function(n, r, i, a) {
      var o = this, s = a.getData(), l = i.scale.getTicks();
      this._tickSymbols = [], k(l, function(u) {
        var c = i.dataToCoord(u.value), f = s.getItemModel(u.value), d = f.getModel("itemStyle"), h = f.getModel(["emphasis", "itemStyle"]), p = f.getModel(["progress", "itemStyle"]), v = {
          x: c,
          y: 0,
          onclick: xe(o._changeTimeline, o, u.value)
        }, g = Q7(f, d, r, v);
        g.ensureState("emphasis").style = h.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), Yl(g);
        var m = Fe(g);
        f.get("tooltip") ? (m.dataIndex = u.value, m.dataModel = a) : m.dataIndex = m.dataModel = null, o._tickSymbols.push(g);
      });
    }, e.prototype._renderAxisLabel = function(n, r, i, a) {
      var o = this, s = i.getLabelModel();
      if (s.get("show")) {
        var l = a.getData(), u = i.getViewLabels();
        this._tickLabels = [], k(u, function(c) {
          var f = c.tickValue, d = l.getItemModel(f), h = d.getModel("label"), p = d.getModel(["emphasis", "label"]), v = d.getModel(["progress", "label"]), g = i.dataToCoord(c.tickValue), m = new gt({
            x: g,
            y: 0,
            rotation: n.labelRotation - n.rotation,
            onclick: xe(o._changeTimeline, o, f),
            silent: !1,
            style: Zt(h, {
              text: c.formattedLabel,
              align: n.labelAlign,
              verticalAlign: n.labelBaseline
            })
          });
          m.ensureState("emphasis").style = Zt(p), m.ensureState("progress").style = Zt(v), r.add(m), Yl(m), W7(m).dataIndex = f, o._tickLabels.push(m);
        });
      }
    }, e.prototype._renderControl = function(n, r, i, a) {
      var o = n.controlSize, s = n.rotation, l = a.getModel("controlStyle").getItemStyle(), u = a.getModel(["emphasis", "controlStyle"]).getItemStyle(), c = a.getPlayState(), f = a.get("inverse", !0);
      d(n.nextBtnPosition, "next", xe(this._changeTimeline, this, f ? "-" : "+")), d(n.prevBtnPosition, "prev", xe(this._changeTimeline, this, f ? "+" : "-")), d(n.playPosition, c ? "stop" : "play", xe(this._handlePlayClick, this, !c), !0);
      function d(h, p, v, g) {
        if (h) {
          var m = oo(We(a.get(["controlStyle", p + "BtnSize"]), o), o), y = [0, -m / 2, m, m], b = oGe(a, p + "Icon", y, {
            x: h[0],
            y: h[1],
            originX: o / 2,
            originY: 0,
            rotation: g ? -s : 0,
            rectHover: !0,
            style: l,
            onclick: v
          });
          b.ensureState("emphasis").style = u, r.add(b), Yl(b);
        }
      }
    }, e.prototype._renderCurrentPointer = function(n, r, i, a) {
      var o = a.getData(), s = a.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, c = {
        onCreate: function(f) {
          f.draggable = !0, f.drift = xe(u._handlePointerDrag, u), f.ondragend = xe(u._handlePointerDragend, u), H7(f, u._progressLine, s, i, a, !0);
        },
        onUpdate: function(f) {
          H7(f, u._progressLine, s, i, a);
        }
      };
      this._currentPointer = Q7(l, l, this._mainGroup, {}, this._currentPointer, c);
    }, e.prototype._handlePlayClick = function(n) {
      this._clearTimer(), this.api.dispatchAction({
        type: "timelinePlayChange",
        playState: n,
        from: this.uid
      });
    }, e.prototype._handlePointerDrag = function(n, r, i) {
      this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY]);
    }, e.prototype._handlePointerDragend = function(n) {
      this._pointerChangeTimeline([n.offsetX, n.offsetY], !0);
    }, e.prototype._pointerChangeTimeline = function(n, r) {
      var i = this._toAxisCoord(n)[0], a = this._axis, o = Vi(a.getExtent().slice());
      i > o[1] && (i = o[1]), i < o[0] && (i = o[0]), this._currentPointer.x = i, this._currentPointer.markRedraw();
      var s = this._progressLine;
      s && (s.shape.x2 = i, s.dirty());
      var l = this._findNearestTick(i), u = this.model;
      (r || l !== u.getCurrentIndex() && u.get("realtime")) && this._changeTimeline(l);
    }, e.prototype._doPlayStop = function() {
      var n = this;
      this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
        var r = n.model;
        n._changeTimeline(r.getCurrentIndex() + (r.get("rewind", !0) ? -1 : 1));
      }, this.model.get("playInterval")));
    }, e.prototype._toAxisCoord = function(n) {
      var r = this._mainGroup.getLocalTransform();
      return to(n, r, !0);
    }, e.prototype._findNearestTick = function(n) {
      var r = this.model.getData(), i = 1 / 0, a, o = this._axis;
      return r.each(["value"], function(s, l) {
        var u = o.dataToCoord(s), c = Math.abs(u - n);
        c < i && (i = c, a = l);
      }), a;
    }, e.prototype._clearTimer = function() {
      this._timer && (clearTimeout(this._timer), this._timer = null);
    }, e.prototype._changeTimeline = function(n) {
      var r = this.model.getCurrentIndex();
      n === "+" ? n = r + 1 : n === "-" && (n = r - 1), this.api.dispatchAction({
        type: "timelineChange",
        currentIndex: n,
        from: this.uid
      });
    }, e.prototype._updateTicksStatus = function() {
      var n = this.model.getCurrentIndex(), r = this._tickSymbols, i = this._tickLabels;
      if (r)
        for (var a = 0; a < r.length; a++)
          r && r[a] && r[a].toggleState("progress", a < n);
      if (i)
        for (var a = 0; a < i.length; a++)
          i && i[a] && i[a].toggleState("progress", W7(i[a]).dataIndex <= n);
    }, e.type = "timeline.slider", e;
  }(tGe)
);
function iGe(t, e) {
  if (e = e || t.get("type"), e)
    switch (e) {
      case "category":
        return new vw({
          ordinalMeta: t.getCategories(),
          extent: [1 / 0, -1 / 0]
        });
      case "time":
        return new Ck({
          locale: t.ecModel.getLocaleModel(),
          useUTC: t.ecModel.get("useUTC")
        });
      default:
        return new Ys();
    }
}
function aGe(t, e) {
  return Rn(t.getBoxLayoutParams(), {
    width: e.getWidth(),
    height: e.getHeight()
  }, t.get("padding"));
}
function oGe(t, e, n, r) {
  var i = r.style, a = vp(t.get(["controlStyle", e]), r || {}, new Je(n[0], n[1], n[2], n[3]));
  return i && a.setStyle(i), a;
}
function Q7(t, e, n, r, i, a) {
  var o = e.get("color");
  if (i)
    i.setColor(o), n.add(i), a && a.onUpdate(i);
  else {
    var s = t.get("symbol");
    i = $n(s, -1, -1, 2, 2, o), i.setStyle("strokeNoScale", !0), n.add(i), a && a.onCreate(i);
  }
  var l = e.getItemStyle(["color"]);
  i.setStyle(l), r = qe({
    rectHover: !0,
    z2: 100
  }, r, !0);
  var u = xp(t.get("symbolSize"));
  r.scaleX = u[0] / 2, r.scaleY = u[1] / 2;
  var c = Vf(t.get("symbolOffset"), u);
  c && (r.x = (r.x || 0) + c[0], r.y = (r.y || 0) + c[1]);
  var f = t.get("symbolRotate");
  return r.rotation = (f || 0) * Math.PI / 180 || 0, i.attr(r), i.updateTransform(), i;
}
function H7(t, e, n, r, i, a) {
  if (!t.dragging) {
    var o = i.getModel("checkpointStyle"), s = r.dataToCoord(i.getData().get("value", n));
    if (a || !o.get("animation", !0))
      t.attr({
        x: s,
        y: 0
      }), e && e.attr({
        shape: {
          x2: s
        }
      });
    else {
      var l = {
        duration: o.get("animationDuration", !0),
        easing: o.get("animationEasing", !0)
      };
      t.stopAnimation(null, !0), t.animateTo({
        x: s,
        y: 0
      }, l), e && e.animateTo({
        shape: {
          x2: s
        }
      }, l);
    }
  }
}
function sGe(t) {
  t.registerAction({
    type: "timelineChange",
    event: "timelineChanged",
    update: "prepareAndUpdate"
  }, function(e, n, r) {
    var i = n.getComponent("timeline");
    return i && e.currentIndex != null && (i.setCurrentIndex(e.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.getPlayState() && (i.setPlayState(!1), r.dispatchAction({
      type: "timelinePlayChange",
      playState: !1,
      from: e.from
    }))), n.resetOption("timeline", {
      replaceMerge: i.get("replaceMerge", !0)
    }), Re({
      currentIndex: i.option.currentIndex
    }, e);
  }), t.registerAction({
    type: "timelinePlayChange",
    event: "timelinePlayChanged",
    update: "update"
  }, function(e, n) {
    var r = n.getComponent("timeline");
    r && e.playState != null && r.setPlayState(e.playState);
  });
}
function lGe(t) {
  var e = t && t.timeline;
  ue(e) || (e = e ? [e] : []), k(e, function(n) {
    n && uGe(n);
  });
}
function uGe(t) {
  var e = t.type, n = {
    number: "value",
    time: "time"
  };
  if (n[e] && (t.axisType = n[e], delete t.type), G7(t), Cc(t, "controlPosition")) {
    var r = t.controlStyle || (t.controlStyle = {});
    Cc(r, "position") || (r.position = t.controlPosition), r.position === "none" && !Cc(r, "show") && (r.show = !1, delete r.position), delete t.controlPosition;
  }
  k(t.data || [], function(i) {
    Ie(i) && !ue(i) && (!Cc(i, "value") && Cc(i, "name") && (i.value = i.name), G7(i));
  });
}
function G7(t) {
  var e = t.itemStyle || (t.itemStyle = {}), n = e.emphasis || (e.emphasis = {}), r = t.label || t.label || {}, i = r.normal || (r.normal = {}), a = {
    normal: 1,
    emphasis: 1
  };
  k(r, function(o, s) {
    !a[s] && !Cc(i, s) && (i[s] = o);
  }), n.label && !Cc(r, "emphasis") && (r.emphasis = n.label, delete n.label);
}
function Cc(t, e) {
  return t.hasOwnProperty(e);
}
function cGe(t) {
  t.registerComponentModel(Kre), t.registerComponentView(rGe), t.registerSubTypeDefaulter("timeline", function() {
    return "slider";
  }), sGe(t), t.registerPreprocessor(lGe);
}
function PL(t, e) {
  if (!t)
    return !1;
  for (var n = ue(t) ? t : [t], r = 0; r < n.length; r++)
    if (n[r] && n[r][e])
      return !0;
  return !1;
}
function kb(t) {
  gf(t, "label", ["show"]);
}
var Lb = bt(), Ks = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.createdBySelf = !1, n;
    }
    return e.prototype.init = function(n, r, i) {
      if (process.env.NODE_ENV !== "production" && this.type === "marker")
        throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
      this.mergeDefaultAndTheme(n, i), this._mergeOption(n, i, !1, !0);
    }, e.prototype.isAnimationEnabled = function() {
      if (vt.node)
        return !1;
      var n = this.__hostSeries;
      return this.getShallow("animation") && n && n.isAnimationEnabled();
    }, e.prototype.mergeOption = function(n, r) {
      this._mergeOption(n, r, !1, !1);
    }, e.prototype._mergeOption = function(n, r, i, a) {
      var o = this.mainType;
      i || r.eachSeries(function(s) {
        var l = s.get(this.mainType, !0), u = Lb(s)[o];
        if (!l || !l.data) {
          Lb(s)[o] = null;
          return;
        }
        u ? u._mergeOption(l, r, !0) : (a && kb(l), k(l.data, function(c) {
          c instanceof Array ? (kb(c[0]), kb(c[1])) : kb(c);
        }), u = this.createMarkerModelFromSeries(l, this, r), le(u, {
          mainType: this.mainType,
          // Use the same series index and name
          seriesIndex: s.seriesIndex,
          name: s.name,
          createdBySelf: !0
        }), u.__hostSeries = s), Lb(s)[o] = u;
      }, this);
    }, e.prototype.formatTooltip = function(n, r, i) {
      var a = this.getData(), o = this.getRawValue(n), s = a.getName(n);
      return tr("section", {
        header: this.name,
        blocks: [tr("nameValue", {
          name: s,
          value: o,
          noName: !s,
          noValue: o == null
        })]
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.setData = function(n) {
      this._data = n;
    }, e.prototype.getDataParams = function(n, r) {
      var i = sw.prototype.getDataParams.call(this, n, r), a = this.__hostSeries;
      return a && (i.seriesId = a.id, i.seriesName = a.name, i.seriesType = a.subType), i;
    }, e.getMarkerModelFromSeries = function(n, r) {
      return Lb(n)[r];
    }, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
  }(rt)
);
xn(Ks, sw.prototype);
var fGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markPoint", e.defaultOption = {
      // zlevel: 0,
      z: 5,
      symbol: "pin",
      symbolSize: 50,
      // symbolRotate: 0,
      // symbolOffset: [0, 0]
      tooltip: {
        trigger: "item"
      },
      label: {
        show: !0,
        position: "inside"
      },
      itemStyle: {
        borderWidth: 2
      },
      emphasis: {
        label: {
          show: !0
        }
      }
    }, e;
  }(Ks)
);
function BE(t) {
  return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
}
function dGe(t) {
  return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
}
function Nb(t, e, n, r, i, a) {
  var o = [], s = Xs(
    e,
    r
    /* , otherDataDim */
  ), l = s ? e.getCalculationInfo("stackResultDimension") : r, u = $L(e, l, t), c = e.indicesOfNearest(l, u)[0];
  o[i] = e.get(n, c), o[a] = e.get(l, c);
  var f = e.get(r, c), d = Ua(e.get(r, c));
  return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, f];
}
var KP = {
  min: Ue(Nb, "min"),
  max: Ue(Nb, "max"),
  average: Ue(Nb, "average"),
  median: Ue(Nb, "median")
};
function Wm(t, e) {
  if (e) {
    var n = t.getData(), r = t.coordinateSystem, i = r && r.dimensions;
    if (!dGe(e) && !ue(e.coord) && ue(i)) {
      var a = Jre(e, n, r, t);
      if (e = Le(e), e.type && KP[e.type] && a.baseAxis && a.valueAxis) {
        var o = et(i, a.baseAxis.dim), s = et(i, a.valueAxis.dim), l = KP[e.type](n, a.baseDataDim, a.valueDataDim, o, s);
        e.coord = l[0], e.value = l[1];
      } else
        e.coord = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis];
    }
    if (e.coord == null || !ue(i))
      e.coord = [];
    else
      for (var u = e.coord, c = 0; c < 2; c++)
        KP[u[c]] && (u[c] = $L(n, n.mapDimension(i[c]), u[c]));
    return e;
  }
}
function Jre(t, e, n, r) {
  var i = {};
  return t.valueIndex != null || t.valueDim != null ? (i.valueDataDim = t.valueIndex != null ? e.getDimension(t.valueIndex) : t.valueDim, i.valueAxis = n.getAxis(hGe(r, i.valueDataDim)), i.baseAxis = n.getOtherAxis(i.valueAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim)) : (i.baseAxis = r.getBaseAxis(), i.valueAxis = n.getOtherAxis(i.baseAxis), i.baseDataDim = e.mapDimension(i.baseAxis.dim), i.valueDataDim = e.mapDimension(i.valueAxis.dim)), i;
}
function hGe(t, e) {
  var n = t.getData().getDimensionInfo(e);
  return n && n.coordDim;
}
function Qm(t, e) {
  return t && t.containData && e.coord && !BE(e) ? t.containData(e.coord) : !0;
}
function pGe(t, e, n) {
  return t && t.containZone && e.coord && n.coord && !BE(e) && !BE(n) ? t.containZone(e.coord, n.coord) : !0;
}
function eie(t, e) {
  return t ? function(n, r, i, a) {
    var o = a < 2 ? n.coord && n.coord[a] : n.value;
    return Kl(o, e[a]);
  } : function(n, r, i, a) {
    return Kl(n.value, e[a]);
  };
}
function $L(t, e, n) {
  if (n === "average") {
    var r = 0, i = 0;
    return t.each(e, function(a, o) {
      isNaN(a) || (r += a, i++);
    }), r / i;
  } else return n === "median" ? t.getMedian(e) : t.getDataExtent(e)[n === "max" ? 1 : 0];
}
var JP = bt(), AL = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.init = function() {
      this.markerGroupMap = Pe();
    }, e.prototype.render = function(n, r, i) {
      var a = this, o = this.markerGroupMap;
      o.each(function(s) {
        JP(s).keep = !1;
      }), r.eachSeries(function(s) {
        var l = Ks.getMarkerModelFromSeries(s, a.type);
        l && a.renderSeries(s, l, r, i);
      }), o.each(function(s) {
        !JP(s).keep && a.group.remove(s.group);
      });
    }, e.prototype.markKeep = function(n) {
      JP(n).keep = !0;
    }, e.prototype.toggleBlurSeries = function(n, r) {
      var i = this;
      k(n, function(a) {
        var o = Ks.getMarkerModelFromSeries(a, i.type);
        if (o) {
          var s = o.getData();
          s.eachItemGraphicEl(function(l) {
            l && (r ? LK(l) : NR(l));
          });
        }
      });
    }, e.type = "marker", e;
  }(Xt)
);
function j7(t, e, n) {
  var r = e.coordinateSystem;
  t.each(function(i) {
    var a = t.getItemModel(i), o, s = _e(a.get("x"), n.getWidth()), l = _e(a.get("y"), n.getHeight());
    if (!isNaN(s) && !isNaN(l))
      o = [s, l];
    else if (e.getMarkerPosition)
      o = e.getMarkerPosition(t.getValues(t.dimensions, i));
    else if (r) {
      var u = t.get(r.dimensions[0], i), c = t.get(r.dimensions[1], i);
      o = r.dataToPoint([u, c]);
    }
    isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), t.setItemLayout(i, o);
  });
}
var vGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Ks.getMarkerModelFromSeries(a, "markPoint");
        o && (j7(o.getData(), a, i), this.markerGroupMap.get(a.id).updateLayout());
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Z0()), f = gGe(o, n, r);
      r.setData(f), j7(r.getData(), n, a), f.each(function(d) {
        var h = f.getItemModel(d), p = h.getShallow("symbol"), v = h.getShallow("symbolSize"), g = h.getShallow("symbolRotate"), m = h.getShallow("symbolOffset"), y = h.getShallow("symbolKeepAspect");
        if (Me(p) || Me(v) || Me(g) || Me(m)) {
          var b = r.getRawValue(d), _ = r.getDataParams(d);
          Me(p) && (p = p(b, _)), Me(v) && (v = v(b, _)), Me(g) && (g = g(b, _)), Me(m) && (m = m(b, _));
        }
        var O = h.getModel("itemStyle").getItemStyle(), S = H0(l, "color");
        O.fill || (O.fill = S), f.setItemVisual(d, {
          symbol: p,
          symbolSize: v,
          symbolRotate: g,
          symbolOffset: m,
          symbolKeepAspect: y,
          style: O
        });
      }), c.updateData(f), this.group.add(c.group), f.eachItemGraphicEl(function(d) {
        d.traverse(function(h) {
          Fe(h).dataModel = r;
        });
      }), this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markPoint", e;
  }(AL)
);
function gGe(t, e, n) {
  var r;
  t ? r = ce(t && t.dimensions, function(s) {
    var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
    return le(le({}, l), {
      name: s,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : r = [{
    name: "value",
    type: "float"
  }];
  var i = new Lr(r, n), a = ce(n.get("data"), Ue(Wm, e));
  t && (a = Nt(a, Ue(Qm, t)));
  var o = eie(!!t, r);
  return i.initData(a, null, o), i;
}
function mGe(t) {
  t.registerComponentModel(fGe), t.registerComponentView(vGe), t.registerPreprocessor(function(e) {
    PL(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
  });
}
var yGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markLine", e.defaultOption = {
      // zlevel: 0,
      z: 5,
      symbol: ["circle", "arrow"],
      symbolSize: [8, 16],
      // symbolRotate: 0,
      symbolOffset: 0,
      precision: 2,
      tooltip: {
        trigger: "item"
      },
      label: {
        show: !0,
        position: "end",
        distance: 5
      },
      lineStyle: {
        type: "dashed"
      },
      emphasis: {
        label: {
          show: !0
        },
        lineStyle: {
          width: 3
        }
      },
      animationEasing: "linear"
    }, e;
  }(Ks)
), Bb = bt(), bGe = function(t, e, n, r) {
  var i = t.getData(), a;
  if (ue(r))
    a = r;
  else {
    var o = r.type;
    if (o === "min" || o === "max" || o === "average" || o === "median" || r.xAxis != null || r.yAxis != null) {
      var s = void 0, l = void 0;
      if (r.yAxis != null || r.xAxis != null)
        s = e.getAxis(r.yAxis != null ? "y" : "x"), l = Tn(r.yAxis, r.xAxis);
      else {
        var u = Jre(r, i, e, t);
        s = u.valueAxis;
        var c = Sk(i, u.valueDataDim);
        l = $L(i, c, o);
      }
      var f = s.dim === "x" ? 0 : 1, d = 1 - f, h = Le(r), p = {
        coord: []
      };
      h.type = null, h.coord = [], h.coord[d] = -1 / 0, p.coord[d] = 1 / 0;
      var v = n.get("precision");
      v >= 0 && St(l) && (l = +l.toFixed(Math.min(v, 20))), h.coord[f] = p.coord[f] = l, a = [h, p, {
        type: o,
        valueIndex: r.valueIndex,
        // Force to use the value of calculated value.
        value: l
      }];
    } else
      process.env.NODE_ENV !== "production" && Oa("Invalid markLine data."), a = [];
  }
  var g = [Wm(t, a[0]), Wm(t, a[1]), le({}, a[2])];
  return g[2].type = g[2].type || null, qe(g[2], g[0]), qe(g[2], g[1]), g;
};
function QO(t) {
  return !isNaN(t) && !isFinite(t);
}
function Z7(t, e, n, r) {
  var i = 1 - t, a = r.dimensions[t];
  return QO(e[i]) && QO(n[i]) && e[t] === n[t] && r.getAxis(a).containData(e[t]);
}
function _Ge(t, e) {
  if (t.type === "cartesian2d") {
    var n = e[0].coord, r = e[1].coord;
    if (n && r && (Z7(1, n, r, t) || Z7(0, n, r, t)))
      return !0;
  }
  return Qm(t, e[0]) && Qm(t, e[1]);
}
function e$(t, e, n, r, i) {
  var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get("x"), i.getWidth()), u = _e(o.get("y"), i.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (r.getMarkerPosition)
      s = r.getMarkerPosition(t.getValues(t.dimensions, e));
    else {
      var c = a.dimensions, f = t.get(c[0], e), d = t.get(c[1], e);
      s = a.dataToPoint([f, d]);
    }
    if (Ff(a, "cartesian2d")) {
      var h = a.getAxis("x"), p = a.getAxis("y"), c = a.dimensions;
      QO(t.get(c[0], e)) ? s[0] = h.toGlobalCoord(h.getExtent()[n ? 0 : 1]) : QO(t.get(c[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[n ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  t.setItemLayout(e, s);
}
var OGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Ks.getMarkerModelFromSeries(a, "markLine");
        if (o) {
          var s = o.getData(), l = Bb(o).from, u = Bb(o).to;
          l.each(function(c) {
            e$(l, c, !0, a, i), e$(u, c, !1, a, i);
          }), s.each(function(c) {
            s.setItemLayout(c, [l.getItemLayout(c), u.getItemLayout(c)]);
          }), this.markerGroupMap.get(a.id).updateLayout();
        }
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, new Kk());
      this.group.add(c.group);
      var f = SGe(o, n, r), d = f.from, h = f.to, p = f.line;
      Bb(r).from = d, Bb(r).to = h, r.setData(p);
      var v = r.get("symbol"), g = r.get("symbolSize"), m = r.get("symbolRotate"), y = r.get("symbolOffset");
      ue(v) || (v = [v, v]), ue(g) || (g = [g, g]), ue(m) || (m = [m, m]), ue(y) || (y = [y, y]), f.from.each(function(_) {
        b(d, _, !0), b(h, _, !1);
      }), p.each(function(_) {
        var O = p.getItemModel(_).getModel("lineStyle").getLineStyle();
        p.setItemLayout(_, [d.getItemLayout(_), h.getItemLayout(_)]), O.stroke == null && (O.stroke = d.getItemVisual(_, "style").fill), p.setItemVisual(_, {
          fromSymbolKeepAspect: d.getItemVisual(_, "symbolKeepAspect"),
          fromSymbolOffset: d.getItemVisual(_, "symbolOffset"),
          fromSymbolRotate: d.getItemVisual(_, "symbolRotate"),
          fromSymbolSize: d.getItemVisual(_, "symbolSize"),
          fromSymbol: d.getItemVisual(_, "symbol"),
          toSymbolKeepAspect: h.getItemVisual(_, "symbolKeepAspect"),
          toSymbolOffset: h.getItemVisual(_, "symbolOffset"),
          toSymbolRotate: h.getItemVisual(_, "symbolRotate"),
          toSymbolSize: h.getItemVisual(_, "symbolSize"),
          toSymbol: h.getItemVisual(_, "symbol"),
          style: O
        });
      }), c.updateData(p), f.line.eachItemGraphicEl(function(_) {
        Fe(_).dataModel = r, _.traverse(function(O) {
          Fe(O).dataModel = r;
        });
      });
      function b(_, O, S) {
        var x = _.getItemModel(O);
        e$(_, O, S, n, a);
        var C = x.getModel("itemStyle").getItemStyle();
        C.fill == null && (C.fill = H0(l, "color")), _.setItemVisual(O, {
          symbolKeepAspect: x.get("symbolKeepAspect"),
          // `0` should be considered as a valid value, so use `retrieve2` instead of `||`
          symbolOffset: We(x.get("symbolOffset", !0), y[S ? 0 : 1]),
          symbolRotate: We(x.get("symbolRotate", !0), m[S ? 0 : 1]),
          // TODO: when 2d array is supported, it should ignore parent
          symbolSize: We(x.get("symbolSize"), g[S ? 0 : 1]),
          symbol: We(x.get("symbol", !0), v[S ? 0 : 1]),
          style: C
        });
      }
      this.markKeep(c), c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markLine", e;
  }(AL)
);
function SGe(t, e, n) {
  var r;
  t ? r = ce(t && t.dimensions, function(u) {
    var c = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
    return le(le({}, c), {
      name: u,
      // DON'T use ordinalMeta to parse and collect ordinal.
      ordinalMeta: null
    });
  }) : r = [{
    name: "value",
    type: "float"
  }];
  var i = new Lr(r, n), a = new Lr(r, n), o = new Lr([], n), s = ce(n.get("data"), Ue(bGe, e, t, n));
  t && (s = Nt(s, Ue(_Ge, t)));
  var l = eie(!!t, r);
  return i.initData(ce(s, function(u) {
    return u[0];
  }), null, l), a.initData(ce(s, function(u) {
    return u[1];
  }), null, l), o.initData(ce(s, function(u) {
    return u[2];
  })), o.hasItemOption = !0, {
    from: i,
    to: a,
    line: o
  };
}
function xGe(t) {
  t.registerComponentModel(yGe), t.registerComponentView(OGe), t.registerPreprocessor(function(e) {
    PL(e.series, "markLine") && (e.markLine = e.markLine || {});
  });
}
var wGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.createMarkerModelFromSeries = function(n, r, i) {
      return new e(n, r, i);
    }, e.type = "markArea", e.defaultOption = {
      // zlevel: 0,
      // PENDING
      z: 1,
      tooltip: {
        trigger: "item"
      },
      // markArea should fixed on the coordinate system
      animation: !1,
      label: {
        show: !0,
        position: "top"
      },
      itemStyle: {
        // color and borderColor default to use color from series
        // color: 'auto'
        // borderColor: 'auto'
        borderWidth: 0
      },
      emphasis: {
        label: {
          show: !0,
          position: "top"
        }
      }
    }, e;
  }(Ks)
), zb = bt(), CGe = function(t, e, n, r) {
  var i = r[0], a = r[1];
  if (!(!i || !a)) {
    var o = Wm(t, i), s = Wm(t, a), l = o.coord, u = s.coord;
    l[0] = Tn(l[0], -1 / 0), l[1] = Tn(l[1], -1 / 0), u[0] = Tn(u[0], 1 / 0), u[1] = Tn(u[1], 1 / 0);
    var c = Dx([{}, o, s]);
    return c.coord = [o.coord, s.coord], c.x0 = o.x, c.y0 = o.y, c.x1 = s.x, c.y1 = s.y, c;
  }
};
function HO(t) {
  return !isNaN(t) && !isFinite(t);
}
function U7(t, e, n, r) {
  var i = 1 - t;
  return HO(e[i]) && HO(n[i]);
}
function TGe(t, e) {
  var n = e.coord[0], r = e.coord[1], i = {
    coord: n,
    x: e.x0,
    y: e.y0
  }, a = {
    coord: r,
    x: e.x1,
    y: e.y1
  };
  return Ff(t, "cartesian2d") ? n && r && (U7(1, n, r) || U7(0, n, r)) ? !0 : pGe(t, i, a) : Qm(t, i) || Qm(t, a);
}
function X7(t, e, n, r, i) {
  var a = r.coordinateSystem, o = t.getItemModel(e), s, l = _e(o.get(n[0]), i.getWidth()), u = _e(o.get(n[1]), i.getHeight());
  if (!isNaN(l) && !isNaN(u))
    s = [l, u];
  else {
    if (r.getMarkerPosition) {
      var c = t.getValues(["x0", "y0"], e), f = t.getValues(["x1", "y1"], e), d = a.clampData(c), h = a.clampData(f), p = [];
      n[0] === "x0" ? p[0] = d[0] > h[0] ? f[0] : c[0] : p[0] = d[0] > h[0] ? c[0] : f[0], n[1] === "y0" ? p[1] = d[1] > h[1] ? f[1] : c[1] : p[1] = d[1] > h[1] ? c[1] : f[1], s = r.getMarkerPosition(p, n, !0);
    } else {
      var v = t.get(n[0], e), g = t.get(n[1], e), m = [v, g];
      a.clampData && a.clampData(m, m), s = a.dataToPoint(m, !0);
    }
    if (Ff(a, "cartesian2d")) {
      var y = a.getAxis("x"), b = a.getAxis("y"), v = t.get(n[0], e), g = t.get(n[1], e);
      HO(v) ? s[0] = y.toGlobalCoord(y.getExtent()[n[0] === "x0" ? 0 : 1]) : HO(g) && (s[1] = b.toGlobalCoord(b.getExtent()[n[1] === "y0" ? 0 : 1]));
    }
    isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
  }
  return s;
}
var Y7 = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], PGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.updateTransform = function(n, r, i) {
      r.eachSeries(function(a) {
        var o = Ks.getMarkerModelFromSeries(a, "markArea");
        if (o) {
          var s = o.getData();
          s.each(function(l) {
            var u = ce(Y7, function(f) {
              return X7(s, l, f, a, i);
            });
            s.setItemLayout(l, u);
            var c = s.getItemGraphicEl(l);
            c.setShape("points", u);
          });
        }
      }, this);
    }, e.prototype.renderSeries = function(n, r, i, a) {
      var o = n.coordinateSystem, s = n.id, l = n.getData(), u = this.markerGroupMap, c = u.get(s) || u.set(s, {
        group: new Ve()
      });
      this.group.add(c.group), this.markKeep(c);
      var f = $Ge(o, n, r);
      r.setData(f), f.each(function(d) {
        var h = ce(Y7, function(C) {
          return X7(f, d, C, n, a);
        }), p = o.getAxis("x").scale, v = o.getAxis("y").scale, g = p.getExtent(), m = v.getExtent(), y = [p.parse(f.get("x0", d)), p.parse(f.get("x1", d))], b = [v.parse(f.get("y0", d)), v.parse(f.get("y1", d))];
        Vi(y), Vi(b);
        var _ = !(g[0] > y[1] || g[1] < y[0] || m[0] > b[1] || m[1] < b[0]), O = !_;
        f.setItemLayout(d, {
          points: h,
          allClipped: O
        });
        var S = f.getItemModel(d).getModel("itemStyle").getItemStyle(), x = H0(l, "color");
        S.fill || (S.fill = x, Oe(S.fill) && (S.fill = _m(S.fill, 0.4))), S.stroke || (S.stroke = x), f.setItemVisual(d, "style", S);
      }), f.diff(zb(c).data).add(function(d) {
        var h = f.getItemLayout(d);
        if (!h.allClipped) {
          var p = new ii({
            shape: {
              points: h.points
            }
          });
          f.setItemGraphicEl(d, p), c.group.add(p);
        }
      }).update(function(d, h) {
        var p = zb(c).data.getItemGraphicEl(h), v = f.getItemLayout(d);
        v.allClipped ? p && c.group.remove(p) : (p ? Ct(p, {
          shape: {
            points: v.points
          }
        }, r, d) : p = new ii({
          shape: {
            points: v.points
          }
        }), f.setItemGraphicEl(d, p), c.group.add(p));
      }).remove(function(d) {
        var h = zb(c).data.getItemGraphicEl(d);
        c.group.remove(h);
      }).execute(), f.eachItemGraphicEl(function(d, h) {
        var p = f.getItemModel(h), v = f.getItemVisual(h, "style");
        d.useStyle(f.getItemVisual(h, "style")), Pr(d, er(p), {
          labelFetcher: r,
          labelDataIndex: h,
          defaultText: f.getName(h) || "",
          inheritColor: Oe(v.fill) ? _m(v.fill, 1) : "#000"
        }), Tr(d, p), bn(d, null, null, p.get(["emphasis", "disabled"])), Fe(d).dataModel = r;
      }), zb(c).data = f, c.group.silent = r.get("silent") || n.get("silent");
    }, e.type = "markArea", e;
  }(AL)
);
function $Ge(t, e, n) {
  var r, i, a = ["x0", "y0", "x1", "y1"];
  if (t) {
    var o = ce(t && t.dimensions, function(u) {
      var c = e.getData(), f = c.getDimensionInfo(c.mapDimension(u)) || {};
      return le(le({}, f), {
        name: u,
        // DON'T use ordinalMeta to parse and collect ordinal.
        ordinalMeta: null
      });
    });
    i = ce(a, function(u, c) {
      return {
        name: u,
        type: o[c % 2].type
      };
    }), r = new Lr(i, n);
  } else
    i = [{
      name: "value",
      type: "float"
    }], r = new Lr(i, n);
  var s = ce(n.get("data"), Ue(CGe, e, t, n));
  t && (s = Nt(s, Ue(TGe, t)));
  var l = t ? function(u, c, f, d) {
    var h = u.coord[Math.floor(d / 2)][d % 2];
    return Kl(h, i[d]);
  } : function(u, c, f, d) {
    return Kl(u.value, i[d]);
  };
  return r.initData(s, null, l), r.hasItemOption = !0, r;
}
function AGe(t) {
  t.registerComponentModel(wGe), t.registerComponentView(PGe), t.registerPreprocessor(function(e) {
    PL(e.series, "markArea") && (e.markArea = e.markArea || {});
  });
}
var EGe = function(t, e) {
  if (e === "all")
    return {
      type: "all",
      title: t.getLocaleModel().get(["legend", "selector", "all"])
    };
  if (e === "inverse")
    return {
      type: "inverse",
      title: t.getLocaleModel().get(["legend", "selector", "inverse"])
    };
}, zE = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.layoutMode = {
        type: "box",
        // legend.width/height are maxWidth/maxHeight actually,
        // whereas real width/height is calculated by its content.
        // (Setting {left: 10, right: 10} does not make sense).
        // So consider the case:
        // `setOption({legend: {left: 10});`
        // then `setOption({legend: {right: 10});`
        // The previous `left` should be cleared by setting `ignoreSize`.
        ignoreSize: !0
      }, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i), n.selected = n.selected || {}, this._updateSelector(n);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), this._updateSelector(n);
    }, e.prototype._updateSelector = function(n) {
      var r = n.selector, i = this.ecModel;
      r === !0 && (r = n.selector = ["all", "inverse"]), ue(r) && k(r, function(a, o) {
        Oe(a) && (a = {
          type: a
        }), r[o] = qe(a, EGe(i, a.type));
      });
    }, e.prototype.optionUpdated = function() {
      this._updateData(this.ecModel);
      var n = this._data;
      if (n[0] && this.get("selectedMode") === "single") {
        for (var r = !1, i = 0; i < n.length; i++) {
          var a = n[i].get("name");
          if (this.isSelected(a)) {
            this.select(a), r = !0;
            break;
          }
        }
        !r && this.select(n[0].get("name"));
      }
    }, e.prototype._updateData = function(n) {
      var r = [], i = [];
      n.eachRawSeries(function(l) {
        var u = l.name;
        i.push(u);
        var c;
        if (l.legendVisualProvider) {
          var f = l.legendVisualProvider, d = f.getAllNames();
          n.isSeriesFiltered(l) || (i = i.concat(d)), d.length ? r = r.concat(d) : c = !0;
        } else
          c = !0;
        c && AR(l) && r.push(l.name);
      }), this._availableNames = i;
      var a = this.get("data") || r, o = Pe(), s = ce(a, function(l) {
        return (Oe(l) || St(l)) && (l = {
          name: l
        }), o.get(l.name) ? null : (o.set(l.name, !0), new Wt(l, this, this.ecModel));
      }, this);
      this._data = Nt(s, function(l) {
        return !!l;
      });
    }, e.prototype.getData = function() {
      return this._data;
    }, e.prototype.select = function(n) {
      var r = this.option.selected, i = this.get("selectedMode");
      if (i === "single") {
        var a = this._data;
        k(a, function(o) {
          r[o.get("name")] = !1;
        });
      }
      r[n] = !0;
    }, e.prototype.unSelect = function(n) {
      this.get("selectedMode") !== "single" && (this.option.selected[n] = !1);
    }, e.prototype.toggleSelected = function(n) {
      var r = this.option.selected;
      r.hasOwnProperty(n) || (r[n] = !0), this[r[n] ? "unSelect" : "select"](n);
    }, e.prototype.allSelect = function() {
      var n = this._data, r = this.option.selected;
      k(n, function(i) {
        r[i.get("name", !0)] = !0;
      });
    }, e.prototype.inverseSelect = function() {
      var n = this._data, r = this.option.selected;
      k(n, function(i) {
        var a = i.get("name", !0);
        r.hasOwnProperty(a) || (r[a] = !0), r[a] = !r[a];
      });
    }, e.prototype.isSelected = function(n) {
      var r = this.option.selected;
      return !(r.hasOwnProperty(n) && !r[n]) && et(this._availableNames, n) >= 0;
    }, e.prototype.getOrient = function() {
      return this.get("orient") === "vertical" ? {
        index: 1,
        name: "vertical"
      } : {
        index: 0,
        name: "horizontal"
      };
    }, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
      // zlevel: 0,
      z: 4,
      show: !0,
      orient: "horizontal",
      left: "center",
      // right: 'center',
      top: 0,
      // bottom: null,
      align: "auto",
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      borderRadius: 0,
      borderWidth: 0,
      padding: 5,
      itemGap: 10,
      itemWidth: 25,
      itemHeight: 14,
      symbolRotate: "inherit",
      symbolKeepAspect: !0,
      inactiveColor: "#ccc",
      inactiveBorderColor: "#ccc",
      inactiveBorderWidth: "auto",
      itemStyle: {
        color: "inherit",
        opacity: "inherit",
        borderColor: "inherit",
        borderWidth: "auto",
        borderCap: "inherit",
        borderJoin: "inherit",
        borderDashOffset: "inherit",
        borderMiterLimit: "inherit"
      },
      lineStyle: {
        width: "auto",
        color: "inherit",
        inactiveColor: "#ccc",
        inactiveWidth: 2,
        opacity: "inherit",
        type: "inherit",
        cap: "inherit",
        join: "inherit",
        dashOffset: "inherit",
        miterLimit: "inherit"
      },
      textStyle: {
        color: "#333"
      },
      selectedMode: !0,
      selector: !1,
      selectorLabel: {
        show: !0,
        borderRadius: 10,
        padding: [3, 5, 3, 5],
        fontSize: 12,
        fontFamily: "sans-serif",
        color: "#666",
        borderWidth: 1,
        borderColor: "#666"
      },
      emphasis: {
        selectorLabel: {
          show: !0,
          color: "#eee",
          backgroundColor: "#666"
        }
      },
      selectorPosition: "auto",
      selectorItemGap: 7,
      selectorButtonGap: 10,
      tooltip: {
        show: !1
      }
    }, e;
  }(rt)
), bd = Ue, VE = k, Vb = Ve, tie = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.newlineDisabled = !1, n;
    }
    return e.prototype.init = function() {
      this.group.add(this._contentGroup = new Vb()), this.group.add(this._selectorGroup = new Vb()), this._isFirstRender = !0;
    }, e.prototype.getContentGroup = function() {
      return this._contentGroup;
    }, e.prototype.getSelectorGroup = function() {
      return this._selectorGroup;
    }, e.prototype.render = function(n, r, i) {
      var a = this._isFirstRender;
      if (this._isFirstRender = !1, this.resetInner(), !!n.get("show", !0)) {
        var o = n.get("align"), s = n.get("orient");
        (!o || o === "auto") && (o = n.get("left") === "right" && s === "vertical" ? "right" : "left");
        var l = n.get("selector", !0), u = n.get("selectorPosition", !0);
        l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, n, r, i, l, s, u);
        var c = n.getBoxLayoutParams(), f = {
          width: i.getWidth(),
          height: i.getHeight()
        }, d = n.get("padding"), h = Rn(c, f, d), p = this.layoutInner(n, o, h, a, l, u), v = Rn(Re({
          width: p.width,
          height: p.height
        }, c), f, d);
        this.group.x = v.x - p.x, this.group.y = v.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = Qre(p, n));
      }
    }, e.prototype.resetInner = function() {
      this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
    }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
      var u = this.getContentGroup(), c = Pe(), f = r.get("selectedMode"), d = [];
      i.eachRawSeries(function(h) {
        !h.get("legendHoverLink") && d.push(h.id);
      }), VE(r.getData(), function(h, p) {
        var v = h.get("name");
        if (!this.newlineDisabled && (v === "" || v === `
`)) {
          var g = new Vb();
          g.newline = !0, u.add(g);
          return;
        }
        var m = i.getSeriesByName(v)[0];
        if (!c.get(v)) {
          if (m) {
            var y = m.getData(), b = y.getVisual("legendLineStyle") || {}, _ = y.getVisual("legendIcon"), O = y.getVisual("style"), S = this._createItem(m, v, p, h, r, n, b, O, _, f, a);
            S.on("click", bd(q7, v, null, a, d)).on("mouseover", bd(FE, m.name, null, a, d)).on("mouseout", bd(WE, m.name, null, a, d)), i.ssr && S.eachChild(function(x) {
              var C = Fe(x);
              C.seriesIndex = m.seriesIndex, C.dataIndex = p, C.ssrType = "legend";
            }), c.set(v, !0);
          } else
            i.eachRawSeries(function(x) {
              if (!c.get(v) && x.legendVisualProvider) {
                var C = x.legendVisualProvider;
                if (!C.containName(v))
                  return;
                var T = C.indexOfName(v), w = C.getItemVisual(T, "style"), P = C.getItemVisual(T, "legendIcon"), $ = qr(w.fill);
                $ && $[3] === 0 && ($[3] = 0.2, w = le(le({}, w), {
                  fill: eo($, "rgba")
                }));
                var A = this._createItem(x, v, p, h, r, n, {}, w, P, f, a);
                A.on("click", bd(q7, null, v, a, d)).on("mouseover", bd(FE, null, v, a, d)).on("mouseout", bd(WE, null, v, a, d)), i.ssr && A.eachChild(function(D) {
                  var E = Fe(D);
                  E.seriesIndex = x.seriesIndex, E.dataIndex = p, E.ssrType = "legend";
                }), c.set(v, !0);
              }
            }, this);
          process.env.NODE_ENV !== "production" && (c.get(v) || console.warn(v + " series not exists. Legend data should be same with series name or data name."));
        }
      }, this), o && this._createSelector(o, r, a, s, l);
    }, e.prototype._createSelector = function(n, r, i, a, o) {
      var s = this.getSelectorGroup();
      VE(n, function(u) {
        var c = u.type, f = new gt({
          style: {
            x: 0,
            y: 0,
            align: "center",
            verticalAlign: "middle"
          },
          onclick: function() {
            i.dispatchAction({
              type: c === "all" ? "legendAllSelect" : "legendInverseSelect"
            });
          }
        });
        s.add(f);
        var d = r.getModel("selectorLabel"), h = r.getModel(["emphasis", "selectorLabel"]);
        Pr(f, {
          normal: d,
          emphasis: h
        }, {
          defaultText: u.title
        }), Yl(f);
      });
    }, e.prototype._createItem = function(n, r, i, a, o, s, l, u, c, f, d) {
      var h = n.visualDrawType, p = o.get("itemWidth"), v = o.get("itemHeight"), g = o.isSelected(r), m = a.get("symbolRotate"), y = a.get("symbolKeepAspect"), b = a.get("icon");
      c = b || c || "roundRect";
      var _ = MGe(c, a, l, u, h, g, d), O = new Vb(), S = a.getModel("textStyle");
      if (Me(n.getLegendIcon) && (!b || b === "inherit"))
        O.add(n.getLegendIcon({
          itemWidth: p,
          itemHeight: v,
          icon: c,
          iconRotate: m,
          itemStyle: _.itemStyle,
          lineStyle: _.lineStyle,
          symbolKeepAspect: y
        }));
      else {
        var x = b === "inherit" && n.getData().getVisual("symbol") ? m === "inherit" ? n.getData().getVisual("symbolRotate") : m : 0;
        O.add(IGe({
          itemWidth: p,
          itemHeight: v,
          icon: c,
          iconRotate: x,
          itemStyle: _.itemStyle,
          lineStyle: _.lineStyle,
          symbolKeepAspect: y
        }));
      }
      var C = s === "left" ? p + 5 : -5, T = s, w = o.get("formatter"), P = r;
      Oe(w) && w ? P = w.replace("{name}", r ?? "") : Me(w) && (P = w(r));
      var $ = g ? S.getTextColor() : a.get("inactiveColor");
      O.add(new gt({
        style: Zt(S, {
          text: P,
          x: C,
          y: v / 2,
          fill: $,
          align: T,
          verticalAlign: "middle"
        }, {
          inheritColor: $
        })
      }));
      var A = new mt({
        shape: O.getBoundingRect(),
        style: {
          // Cannot use 'invisible' because SVG SSR will miss the node
          fill: "transparent"
        }
      }), D = a.getModel("tooltip");
      return D.get("show") && gp({
        el: A,
        componentModel: o,
        itemName: r,
        itemTooltipOption: D.option
      }), O.add(A), O.eachChild(function(E) {
        E.silent = !0;
      }), A.silent = !f, this.getContentGroup().add(O), Yl(O), O.__legendDataIndex = i, O;
    }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
      var l = this.getContentGroup(), u = this.getSelectorGroup();
      ef(n.get("orient"), l, n.get("itemGap"), i.width, i.height);
      var c = l.getBoundingRect(), f = [-c.x, -c.y];
      if (u.markRedraw(), l.markRedraw(), o) {
        ef(
          // Buttons in selectorGroup always layout horizontally
          "horizontal",
          u,
          n.get("selectorItemGap", !0)
        );
        var d = u.getBoundingRect(), h = [-d.x, -d.y], p = n.get("selectorButtonGap", !0), v = n.getOrient().index, g = v === 0 ? "width" : "height", m = v === 0 ? "height" : "width", y = v === 0 ? "y" : "x";
        s === "end" ? h[v] += c[g] + p : f[v] += d[g] + p, h[1 - v] += c[m] / 2 - d[m] / 2, u.x = h[0], u.y = h[1], l.x = f[0], l.y = f[1];
        var b = {
          x: 0,
          y: 0
        };
        return b[g] = c[g] + p + d[g], b[m] = Math.max(c[m], d[m]), b[y] = Math.min(0, d[y] + h[1 - v]), b;
      } else
        return l.x = f[0], l.y = f[1], this.group.getBoundingRect();
    }, e.prototype.remove = function() {
      this.getContentGroup().removeAll(), this._isFirstRender = !0;
    }, e.type = "legend.plain", e;
  }(Xt)
);
function MGe(t, e, n, r, i, a, o) {
  function s(g, m) {
    g.lineWidth === "auto" && (g.lineWidth = m.lineWidth > 0 ? 2 : 0), VE(g, function(y, b) {
      g[b] === "inherit" && (g[b] = m[b]);
    });
  }
  var l = e.getModel("itemStyle"), u = l.getItemStyle(), c = t.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", f = l.getShallow("decal");
  u.decal = !f || f === "inherit" ? r.decal : Fh(f, o), u.fill === "inherit" && (u.fill = r[i]), u.stroke === "inherit" && (u.stroke = r[c]), u.opacity === "inherit" && (u.opacity = (i === "fill" ? r : n).opacity), s(u, r);
  var d = e.getModel("lineStyle"), h = d.getLineStyle();
  if (s(h, n), u.fill === "auto" && (u.fill = r.fill), u.stroke === "auto" && (u.stroke = r.fill), h.stroke === "auto" && (h.stroke = r.fill), !a) {
    var p = e.get("inactiveBorderWidth"), v = u[c];
    u.lineWidth = p === "auto" ? r.lineWidth > 0 && v ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), h.stroke = d.get("inactiveColor"), h.lineWidth = d.get("inactiveWidth");
  }
  return {
    itemStyle: u,
    lineStyle: h
  };
}
function IGe(t) {
  var e = t.icon || "roundRect", n = $n(e, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill, t.symbolKeepAspect);
  return n.setStyle(t.itemStyle), n.rotation = (t.iconRotate || 0) * Math.PI / 180, n.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), e.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = "#fff", n.style.lineWidth = 2), n;
}
function q7(t, e, n, r) {
  WE(t, e, n, r), n.dispatchAction({
    type: "legendToggleSelect",
    name: t ?? e
  }), FE(t, e, n, r);
}
function nie(t) {
  for (var e = t.getZr().storage.getDisplayList(), n, r = 0, i = e.length; r < i && !(n = e[r].states.emphasis); )
    r++;
  return n && n.hoverLayer;
}
function FE(t, e, n, r) {
  nie(n) || n.dispatchAction({
    type: "highlight",
    seriesName: t,
    name: e,
    excludeSeriesId: r
  });
}
function WE(t, e, n, r) {
  nie(n) || n.dispatchAction({
    type: "downplay",
    seriesName: t,
    name: e,
    excludeSeriesId: r
  });
}
function DGe(t) {
  var e = t.findComponents({
    mainType: "legend"
  });
  e && e.length && t.filterSeries(function(n) {
    for (var r = 0; r < e.length; r++)
      if (!e[r].isSelected(n.name))
        return !1;
    return !0;
  });
}
function xv(t, e, n) {
  var r = {}, i = t === "toggleSelected", a;
  return n.eachComponent("legend", function(o) {
    i && a != null ? o[a ? "select" : "unSelect"](e.name) : t === "allSelect" || t === "inverseSelect" ? o[t]() : (o[t](e.name), a = o.isSelected(e.name));
    var s = o.getData();
    k(s, function(l) {
      var u = l.get("name");
      if (!(u === `
` || u === "")) {
        var c = o.isSelected(u);
        r.hasOwnProperty(u) ? r[u] = r[u] && c : r[u] = c;
      }
    });
  }), t === "allSelect" || t === "inverseSelect" ? {
    selected: r
  } : {
    name: e.name,
    selected: r
  };
}
function RGe(t) {
  t.registerAction("legendToggleSelect", "legendselectchanged", Ue(xv, "toggleSelected")), t.registerAction("legendAllSelect", "legendselectall", Ue(xv, "allSelect")), t.registerAction("legendInverseSelect", "legendinverseselect", Ue(xv, "inverseSelect")), t.registerAction("legendSelect", "legendselected", Ue(xv, "select")), t.registerAction("legendUnSelect", "legendunselected", Ue(xv, "unSelect"));
}
function rie(t) {
  t.registerComponentModel(zE), t.registerComponentView(tie), t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER, DGe), t.registerSubTypeDefaulter("legend", function() {
    return "plain";
  }), RGe(t);
}
var kGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.setScrollDataIndex = function(n) {
      this.option.scrollDataIndex = n;
    }, e.prototype.init = function(n, r, i) {
      var a = bp(n);
      t.prototype.init.call(this, n, r, i), K7(this, n, a);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), K7(this, this.option, n);
    }, e.type = "legend.scroll", e.defaultOption = Pu(zE.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;
  }(zE)
);
function K7(t, e, n) {
  var r = t.getOrient(), i = [1, 1];
  i[r.index] = 0, cu(e, n, {
    type: "box",
    ignoreSize: !!i
  });
}
var J7 = Ve, t$ = ["width", "height"], n$ = ["x", "y"], LGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.newlineDisabled = !0, n._currentIndex = 0, n;
    }
    return e.prototype.init = function() {
      t.prototype.init.call(this), this.group.add(this._containerGroup = new J7()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new J7());
    }, e.prototype.resetInner = function() {
      t.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
    }, e.prototype.renderInner = function(n, r, i, a, o, s, l) {
      var u = this;
      t.prototype.renderInner.call(this, n, r, i, a, o, s, l);
      var c = this._controllerGroup, f = r.get("pageIconSize", !0), d = ue(f) ? f : [f, f];
      p("pagePrev", 0);
      var h = r.getModel("pageTextStyle");
      c.add(new gt({
        name: "pageText",
        style: {
          // Placeholder to calculate a proper layout.
          text: "xx/xx",
          fill: h.getTextColor(),
          font: h.getFont(),
          verticalAlign: "middle",
          align: "center"
        },
        silent: !0
      })), p("pageNext", 1);
      function p(v, g) {
        var m = v + "DataIndex", y = vp(r.get("pageIcons", !0)[r.getOrient().name][g], {
          // Buttons will be created in each render, so we do not need
          // to worry about avoiding using legendModel kept in scope.
          onclick: xe(u._pageGo, u, m, r, a)
        }, {
          x: -d[0] / 2,
          y: -d[1] / 2,
          width: d[0],
          height: d[1]
        });
        y.name = v, c.add(y);
      }
    }, e.prototype.layoutInner = function(n, r, i, a, o, s) {
      var l = this.getSelectorGroup(), u = n.getOrient().index, c = t$[u], f = n$[u], d = t$[1 - u], h = n$[1 - u];
      o && ef(
        // Buttons in selectorGroup always layout horizontally
        "horizontal",
        l,
        n.get("selectorItemGap", !0)
      );
      var p = n.get("selectorButtonGap", !0), v = l.getBoundingRect(), g = [-v.x, -v.y], m = Le(i);
      o && (m[c] = i[c] - v[c] - p);
      var y = this._layoutContentAndController(n, a, m, u, c, d, h, f);
      if (o) {
        if (s === "end")
          g[u] += y[c] + p;
        else {
          var b = v[c] + p;
          g[u] -= b, y[f] -= b;
        }
        y[c] += v[c] + p, g[1 - u] += y[h] + y[d] / 2 - v[d] / 2, y[d] = Math.max(y[d], v[d]), y[h] = Math.min(y[h], v[h] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
      }
      return y;
    }, e.prototype._layoutContentAndController = function(n, r, i, a, o, s, l, u) {
      var c = this.getContentGroup(), f = this._containerGroup, d = this._controllerGroup;
      ef(n.get("orient"), c, n.get("itemGap"), a ? i.width : null, a ? null : i.height), ef(
        // Buttons in controller are layout always horizontally.
        "horizontal",
        d,
        n.get("pageButtonItemGap", !0)
      );
      var h = c.getBoundingRect(), p = d.getBoundingRect(), v = this._showController = h[o] > i[o], g = [-h.x, -h.y];
      r || (g[a] = c[u]);
      var m = [0, 0], y = [-p.x, -p.y], b = We(n.get("pageButtonGap", !0), n.get("itemGap", !0));
      if (v) {
        var _ = n.get("pageButtonPosition", !0);
        _ === "end" ? y[a] += i[o] - p[o] : m[a] += p[o] + b;
      }
      y[1 - a] += h[s] / 2 - p[s] / 2, c.setPosition(g), f.setPosition(m), d.setPosition(y);
      var O = {
        x: 0,
        y: 0
      };
      if (O[o] = v ? i[o] : h[o], O[s] = Math.max(h[s], p[s]), O[l] = Math.min(0, p[l] + y[1 - a]), f.__rectSize = i[o], v) {
        var S = {
          x: 0,
          y: 0
        };
        S[o] = Math.max(i[o] - p[o] - b, 0), S[s] = O[s], f.setClipPath(new mt({
          shape: S
        })), f.__rectSize = S[o];
      } else
        d.eachChild(function(C) {
          C.attr({
            invisible: !0,
            silent: !0
          });
        });
      var x = this._getPageInfo(n);
      return x.pageIndex != null && Ct(
        c,
        {
          x: x.contentPosition[0],
          y: x.contentPosition[1]
        },
        // When switch from "show controller" to "not show controller", view should be
        // updated immediately without animation, otherwise causes weird effect.
        v ? n : null
      ), this._updatePageInfoView(n, x), O;
    }, e.prototype._pageGo = function(n, r, i) {
      var a = this._getPageInfo(r)[n];
      a != null && i.dispatchAction({
        type: "legendScroll",
        scrollDataIndex: a,
        legendId: r.id
      });
    }, e.prototype._updatePageInfoView = function(n, r) {
      var i = this._controllerGroup;
      k(["pagePrev", "pageNext"], function(c) {
        var f = c + "DataIndex", d = r[f] != null, h = i.childOfName(c);
        h && (h.setStyle("fill", d ? n.get("pageIconColor", !0) : n.get("pageIconInactiveColor", !0)), h.cursor = d ? "pointer" : "default");
      });
      var a = i.childOfName("pageText"), o = n.get("pageFormatter"), s = r.pageIndex, l = s != null ? s + 1 : 0, u = r.pageCount;
      a && o && a.setStyle("text", Oe(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
        current: l,
        total: u
      }));
    }, e.prototype._getPageInfo = function(n) {
      var r = n.get("scrollDataIndex", !0), i = this.getContentGroup(), a = this._containerGroup.__rectSize, o = n.getOrient().index, s = t$[o], l = n$[o], u = this._findTargetItemIndex(r), c = i.children(), f = c[u], d = c.length, h = d ? 1 : 0, p = {
        contentPosition: [i.x, i.y],
        pageCount: h,
        pageIndex: h - 1,
        pagePrevDataIndex: null,
        pageNextDataIndex: null
      };
      if (!f)
        return p;
      var v = _(f);
      p.contentPosition[o] = -v.s;
      for (var g = u + 1, m = v, y = v, b = null; g <= d; ++g)
        b = _(c[g]), // Half of the last item is out of the window.
        (!b && y.e > m.s + a || b && !O(b, m.s)) && (y.i > m.i ? m = y : m = b, m && (p.pageNextDataIndex == null && (p.pageNextDataIndex = m.i), ++p.pageCount)), y = b;
      for (var g = u - 1, m = v, y = v, b = null; g >= -1; --g)
        b = _(c[g]), // If the the end item does not intersect with the window started
        // from the current item, a page can be settled.
        (!b || !O(y, b.s)) && m.i < y.i && (y = m, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = m.i), ++p.pageCount, ++p.pageIndex), m = b;
      return p;
      function _(S) {
        if (S) {
          var x = S.getBoundingRect(), C = x[l] + S[l];
          return {
            s: C,
            e: C + x[s],
            i: S.__legendDataIndex
          };
        }
      }
      function O(S, x) {
        return S.e >= x && S.s <= x + a;
      }
    }, e.prototype._findTargetItemIndex = function(n) {
      if (!this._showController)
        return 0;
      var r, i = this.getContentGroup(), a;
      return i.eachChild(function(o, s) {
        var l = o.__legendDataIndex;
        a == null && l != null && (a = s), l === n && (r = s);
      }), r ?? a;
    }, e.type = "legend.scroll", e;
  }(tie)
);
function NGe(t) {
  t.registerAction("legendScroll", "legendscroll", function(e, n) {
    var r = e.scrollDataIndex;
    r != null && n.eachComponent({
      mainType: "legend",
      subType: "scroll",
      query: e
    }, function(i) {
      i.setScrollDataIndex(r);
    });
  });
}
function BGe(t) {
  at(rie), t.registerComponentModel(kGe), t.registerComponentView(LGe), NGe(t);
}
function zGe(t) {
  at(rie), at(BGe);
}
var VGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.inside", e.defaultOption = Pu(Fm.defaultOption, {
      disabled: !1,
      zoomLock: !1,
      zoomOnMouseWheel: !0,
      moveOnMouseMove: !0,
      moveOnMouseWheel: !1,
      preventDefaultMouseMove: !0
    }), e;
  }(Fm)
), EL = bt();
function FGe(t, e, n) {
  EL(t).coordSysRecordMap.each(function(r) {
    var i = r.dataZoomInfoMap.get(e.uid);
    i && (i.getRange = n);
  });
}
function WGe(t, e) {
  for (var n = EL(t).coordSysRecordMap, r = n.keys(), i = 0; i < r.length; i++) {
    var a = r[i], o = n.get(a), s = o.dataZoomInfoMap;
    if (s) {
      var l = e.uid, u = s.get(l);
      u && (s.removeKey(l), s.keys().length || iie(n, o));
    }
  }
}
function iie(t, e) {
  if (e) {
    t.removeKey(e.model.uid);
    var n = e.controller;
    n && n.dispose();
  }
}
function QGe(t, e) {
  var n = {
    model: e,
    containsPoint: Ue(GGe, e),
    dispatchAction: Ue(HGe, t),
    dataZoomInfoMap: null,
    controller: null
  }, r = n.controller = new K0(t.getZr());
  return k(["pan", "zoom", "scrollMove"], function(i) {
    r.on(i, function(a) {
      var o = [];
      n.dataZoomInfoMap.each(function(s) {
        if (a.isAvailableBehavior(s.model.option)) {
          var l = (s.getRange || {})[i], u = l && l(s.dzReferCoordSysInfo, n.model.mainType, n.controller, a);
          !s.model.get("disabled", !0) && u && o.push({
            dataZoomId: s.model.id,
            start: u[0],
            end: u[1]
          });
        }
      }), o.length && n.dispatchAction(o);
    });
  }), n;
}
function HGe(t, e) {
  t.isDisposed() || t.dispatchAction({
    type: "dataZoom",
    animation: {
      easing: "cubicOut",
      duration: 100
    },
    batch: e
  });
}
function GGe(t, e, n, r) {
  return t.coordinateSystem.containPoint([n, r]);
}
function jGe(t) {
  var e, n = "type_", r = {
    type_true: 2,
    type_move: 1,
    type_false: 0,
    type_undefined: -1
  }, i = !0;
  return t.each(function(a) {
    var o = a.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
    r[n + s] > r[n + e] && (e = s), i = i && o.get("preventDefaultMouseMove", !0);
  }), {
    controlType: e,
    opt: {
      // RoamController will enable all of these functionalities,
      // and the final behavior is determined by its event listener
      // provided by each inside zoom.
      zoomOnMouseWheel: !0,
      moveOnMouseMove: !0,
      moveOnMouseWheel: !0,
      preventDefaultMouseMove: !!i
    }
  };
}
function ZGe(t) {
  t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER, function(e, n) {
    var r = EL(n), i = r.coordSysRecordMap || (r.coordSysRecordMap = Pe());
    i.each(function(a) {
      a.dataZoomInfoMap = null;
    }), e.eachComponent({
      mainType: "dataZoom",
      subType: "inside"
    }, function(a) {
      var o = Vre(a);
      k(o.infoList, function(s) {
        var l = s.model.uid, u = i.get(l) || i.set(l, QGe(n, s.model)), c = u.dataZoomInfoMap || (u.dataZoomInfoMap = Pe());
        c.set(a.uid, {
          dzReferCoordSysInfo: s,
          model: a,
          getRange: null
        });
      });
    }), i.each(function(a) {
      var o = a.controller, s, l = a.dataZoomInfoMap;
      if (l) {
        var u = l.keys()[0];
        u != null && (s = l.get(u));
      }
      if (!s) {
        iie(i, a);
        return;
      }
      var c = jGe(l);
      o.enable(c.controlType, c.opt), o.setPointerChecker(a.containsPoint), Sp(a, "dispatchAction", s.model.get("throttle", !0), "fixRate");
    });
  });
}
var UGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataZoom.inside", n;
    }
    return e.prototype.render = function(n, r, i) {
      if (t.prototype.render.apply(this, arguments), n.noTarget()) {
        this._clear();
        return;
      }
      this.range = n.getPercentRange(), FGe(i, n, {
        pan: xe(r$.pan, this),
        zoom: xe(r$.zoom, this),
        scrollMove: xe(r$.scrollMove, this)
      });
    }, e.prototype.dispose = function() {
      this._clear(), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      WGe(this.api, this.dataZoomModel), this.range = null;
    }, e.type = "dataZoom.inside", e;
  }(OL)
), r$ = {
  zoom: function(t, e, n, r) {
    var i = this.range, a = i.slice(), o = t.axisModels[0];
    if (o) {
      var s = i$[e](null, [r.originX, r.originY], o, n, t), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (a[1] - a[0]) + a[0], u = Math.max(1 / r.scale, 0);
      a[0] = (a[0] - l) * u + l, a[1] = (a[1] - l) * u + l;
      var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
      if (Qf(0, a, [0, 100], 0, c.minSpan, c.maxSpan), this.range = a, i[0] !== a[0] || i[1] !== a[1])
        return a;
    }
  },
  pan: eQ(function(t, e, n, r, i, a) {
    var o = i$[r]([a.oldX, a.oldY], [a.newX, a.newY], e, i, n);
    return o.signal * (t[1] - t[0]) * o.pixel / o.pixelLength;
  }),
  scrollMove: eQ(function(t, e, n, r, i, a) {
    var o = i$[r]([0, 0], [a.scrollDelta, a.scrollDelta], e, i, n);
    return o.signal * (t[1] - t[0]) * a.scrollDelta;
  })
};
function eQ(t) {
  return function(e, n, r, i) {
    var a = this.range, o = a.slice(), s = e.axisModels[0];
    if (s) {
      var l = t(o, s, e, n, r, i);
      if (Qf(l, o, [0, 100], "all"), this.range = o, a[0] !== o[0] || a[1] !== o[1])
        return o;
    }
  };
}
var i$ = {
  grid: function(t, e, n, r, i) {
    var a = n.axis, o = {}, s = i.model.coordinateSystem.getRect();
    return t = t || [0, 0], a.dim === "x" ? (o.pixel = e[0] - t[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = a.inverse ? -1 : 1), o;
  },
  polar: function(t, e, n, r, i) {
    var a = n.axis, o = {}, s = i.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
    return t = t ? s.pointToCoord(t) : [0, 0], e = s.pointToCoord(e), n.mainType === "radiusAxis" ? (o.pixel = e[0] - t[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = a.inverse ? 1 : -1) : (o.pixel = e[1] - t[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = a.inverse ? -1 : 1), o;
  },
  singleAxis: function(t, e, n, r, i) {
    var a = n.axis, o = i.model.coordinateSystem.getRect(), s = {};
    return t = t || [0, 0], a.orient === "horizontal" ? (s.pixel = e[0] - t[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = a.inverse ? -1 : 1), s;
  }
};
function aie(t) {
  SL(t), t.registerComponentModel(VGe), t.registerComponentView(UGe), ZGe(t);
}
var XGe = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = Pu(Fm.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;
  }(Fm)
), wv = mt, tQ = 7, YGe = 1, a$ = 30, qGe = 7, Cv = "horizontal", nQ = "vertical", KGe = 5, JGe = ["line", "bar", "candlestick", "scatter"], eje = {
  easing: "cubicOut",
  duration: 100,
  delay: 0
}, tje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._displayables = {}, n;
    }
    return e.prototype.init = function(n, r) {
      this.api = r, this._onBrush = xe(this._onBrush, this), this._onBrushEnd = xe(this._onBrushEnd, this);
    }, e.prototype.render = function(n, r, i, a) {
      if (t.prototype.render.apply(this, arguments), Sp(this, "_dispatchZoomAction", n.get("throttle"), "fixRate"), this._orient = n.getOrient(), n.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      if (n.noTarget()) {
        this._clear(), this.group.removeAll();
        return;
      }
      (!a || a.type !== "dataZoom" || a.from !== this.uid) && this._buildView(), this._updateView();
    }, e.prototype.dispose = function() {
      this._clear(), t.prototype.dispose.apply(this, arguments);
    }, e.prototype._clear = function() {
      $m(this, "_dispatchZoomAction");
      var n = this.api.getZr();
      n.off("mousemove", this._onBrush), n.off("mouseup", this._onBrushEnd);
    }, e.prototype._buildView = function() {
      var n = this.group;
      n.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
      var r = this._displayables.sliderGroup = new Ve();
      this._renderBackground(), this._renderHandle(), this._renderDataShadow(), n.add(r), this._positionGroup();
    }, e.prototype._resetLocation = function() {
      var n = this.dataZoomModel, r = this.api, i = n.get("brushSelect"), a = i ? qGe : 0, o = this._findCoordRect(), s = {
        width: r.getWidth(),
        height: r.getHeight()
      }, l = this._orient === Cv ? {
        // 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 - a$ - tQ - a,
        width: o.width,
        height: a$
      } : {
        right: tQ,
        top: o.y,
        width: a$,
        height: o.height
      }, u = bp(n.option);
      k(["right", "top", "width", "height"], function(f) {
        u[f] === "ph" && (u[f] = l[f]);
      });
      var c = Rn(u, s);
      this._location = {
        x: c.x,
        y: c.y
      }, this._size = [c.width, c.height], this._orient === nQ && this._size.reverse();
    }, e.prototype._positionGroup = function() {
      var n = this.group, r = this._location, i = this._orient, a = this.dataZoomModel.getFirstTargetAxisModel(), o = a && a.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
      s.attr(i === Cv && !o ? {
        scaleY: l ? 1 : -1,
        scaleX: 1
      } : i === Cv && o ? {
        scaleY: l ? 1 : -1,
        scaleX: -1
      } : i === nQ && !o ? {
        scaleY: l ? -1 : 1,
        scaleX: 1,
        rotation: Math.PI / 2
      } : {
        scaleY: l ? -1 : 1,
        scaleX: -1,
        rotation: Math.PI / 2
      });
      var u = n.getBoundingRect([s]);
      n.x = r.x - u.x, n.y = r.y - u.y, n.markRedraw();
    }, e.prototype._getViewExtent = function() {
      return [0, this._size[0]];
    }, e.prototype._renderBackground = function() {
      var n = this.dataZoomModel, r = this._size, i = this._displayables.sliderGroup, a = n.get("brushSelect");
      i.add(new wv({
        silent: !0,
        shape: {
          x: 0,
          y: 0,
          width: r[0],
          height: r[1]
        },
        style: {
          fill: n.get("backgroundColor")
        },
        z2: -40
      }));
      var o = new wv({
        shape: {
          x: 0,
          y: 0,
          width: r[0],
          height: r[1]
        },
        style: {
          fill: "transparent"
        },
        z2: 0,
        onclick: xe(this._onClickPanel, this)
      }), s = this.api.getZr();
      a ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), i.add(o);
    }, e.prototype._renderDataShadow = function() {
      var n = this._dataShadowInfo = this._prepareDataShadowInfo();
      if (this._displayables.dataShadowSegs = [], !n)
        return;
      var r = this._size, i = this._shadowSize || [], a = n.series, o = a.getRawData(), s = a.getShadowDim && a.getShadowDim(), l = s && o.getDimensionInfo(s) ? a.getShadowDim() : n.otherDim;
      if (l == null)
        return;
      var u = this._shadowPolygonPts, c = this._shadowPolylinePts;
      if (o !== this._shadowData || l !== this._shadowDim || r[0] !== i[0] || r[1] !== i[1]) {
        var f = o.getDataExtent(l), d = (f[1] - f[0]) * 0.3;
        f = [f[0] - d, f[1] + d];
        var h = [0, r[1]], p = [0, r[0]], v = [[r[0], 0], [0, 0]], g = [], m = p[1] / (o.count() - 1), y = 0, b = Math.round(o.count() / r[0]), _;
        o.each([l], function(T, w) {
          if (b > 0 && w % b) {
            y += m;
            return;
          }
          var P = T == null || isNaN(T) || T === "", $ = P ? 0 : Lt(T, f, h, !0);
          P && !_ && w ? (v.push([v[v.length - 1][0], 0]), g.push([g[g.length - 1][0], 0])) : !P && _ && (v.push([y, 0]), g.push([y, 0])), v.push([y, $]), g.push([y, $]), y += m, _ = P;
        }), u = this._shadowPolygonPts = v, c = this._shadowPolylinePts = g;
      }
      this._shadowData = o, this._shadowDim = l, this._shadowSize = [r[0], r[1]];
      var O = this.dataZoomModel;
      function S(T) {
        var w = O.getModel(T ? "selectedDataBackground" : "dataBackground"), P = new Ve(), $ = new ii({
          shape: {
            points: u
          },
          segmentIgnoreThreshold: 1,
          style: w.getModel("areaStyle").getAreaStyle(),
          silent: !0,
          z2: -20
        }), A = new ai({
          shape: {
            points: c
          },
          segmentIgnoreThreshold: 1,
          style: w.getModel("lineStyle").getLineStyle(),
          silent: !0,
          z2: -19
        });
        return P.add($), P.add(A), P;
      }
      for (var x = 0; x < 3; x++) {
        var C = S(x === 1);
        this._displayables.sliderGroup.add(C), this._displayables.dataShadowSegs.push(C);
      }
    }, e.prototype._prepareDataShadowInfo = function() {
      var n = this.dataZoomModel, r = n.get("showDataShadow");
      if (r !== !1) {
        var i, a = this.ecModel;
        return n.eachTargetAxis(function(o, s) {
          var l = n.getAxisProxy(o, s).getTargetSeriesModels();
          k(l, function(u) {
            if (!i && !(r !== !0 && et(JGe, u.get("type")) < 0)) {
              var c = a.getComponent(Fl(o), s).axis, f = nje(o), d, h = u.coordinateSystem;
              f != null && h.getOtherAxis && (d = h.getOtherAxis(c).inverse), f = u.getData().mapDimension(f), i = {
                thisAxis: c,
                series: u,
                thisDim: o,
                otherDim: f,
                otherAxisInverse: d
              };
            }
          }, this);
        }, this), i;
      }
    }, e.prototype._renderHandle = function() {
      var n = this.group, r = this._displayables, i = r.handles = [null, null], a = r.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, c = l.get("borderRadius") || 0, f = l.get("brushSelect"), d = r.filler = new wv({
        silent: f,
        style: {
          fill: l.get("fillerColor")
        },
        textConfig: {
          position: "inside"
        }
      });
      o.add(d), o.add(new wv({
        silent: !0,
        subPixelOptimize: !0,
        shape: {
          x: 0,
          y: 0,
          width: s[0],
          height: s[1],
          r: c
        },
        style: {
          // deprecated option
          stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
          lineWidth: YGe,
          fill: "rgba(0,0,0,0)"
        }
      })), k([0, 1], function(b) {
        var _ = l.get("handleIcon");
        !gO[_] && _.indexOf("path://") < 0 && _.indexOf("image://") < 0 && (_ = "path://" + _, process.env.NODE_ENV !== "production" && Ea("handleIcon now needs 'path://' prefix when using a path string"));
        var O = $n(_, -1, 0, 2, 2, null, !0);
        O.attr({
          cursor: rQ(this._orient),
          draggable: !0,
          drift: xe(this._onDragMove, this, b),
          ondragend: xe(this._onDragEnd, this),
          onmouseover: xe(this._showDataInfo, this, !0),
          onmouseout: xe(this._showDataInfo, this, !1),
          z2: 5
        });
        var S = O.getBoundingRect(), x = l.get("handleSize");
        this._handleHeight = _e(x, this._size[1]), this._handleWidth = S.width / S.height * this._handleHeight, O.setStyle(l.getModel("handleStyle").getItemStyle()), O.style.strokeNoScale = !0, O.rectHover = !0, O.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), Yl(O);
        var C = l.get("handleColor");
        C != null && (O.style.fill = C), o.add(i[b] = O);
        var T = l.getModel("textStyle");
        n.add(a[b] = new gt({
          silent: !0,
          invisible: !0,
          style: Zt(T, {
            x: 0,
            y: 0,
            text: "",
            verticalAlign: "middle",
            align: "center",
            fill: T.getTextColor(),
            font: T.getFont()
          }),
          z2: 10
        }));
      }, this);
      var h = d;
      if (f) {
        var p = _e(l.get("moveHandleSize"), s[1]), v = r.moveHandle = new mt({
          style: l.getModel("moveHandleStyle").getItemStyle(),
          silent: !0,
          shape: {
            r: [0, 0, 2, 2],
            y: s[1] - 0.5,
            height: p
          }
        }), g = p * 0.8, m = r.moveHandleIcon = $n(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
        m.silent = !0, m.y = s[1] + p / 2 - 0.5, v.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
        var y = Math.min(s[1] / 2, Math.max(p, 10));
        h = r.moveZone = new mt({
          invisible: !0,
          shape: {
            y: s[1] - y,
            height: p + y
          }
        }), h.on("mouseover", function() {
          u.enterEmphasis(v);
        }).on("mouseout", function() {
          u.leaveEmphasis(v);
        }), o.add(v), o.add(m), o.add(h);
      }
      h.attr({
        draggable: !0,
        cursor: rQ(this._orient),
        drift: xe(this._onDragMove, this, "all"),
        ondragstart: xe(this._showDataInfo, this, !0),
        ondragend: xe(this._onDragEnd, this),
        onmouseover: xe(this._showDataInfo, this, !0),
        onmouseout: xe(this._showDataInfo, this, !1)
      });
    }, e.prototype._resetInterval = function() {
      var n = this._range = this.dataZoomModel.getPercentRange(), r = this._getViewExtent();
      this._handleEnds = [Lt(n[0], [0, 100], r, !0), Lt(n[1], [0, 100], r, !0)];
    }, e.prototype._updateInterval = function(n, r) {
      var i = this.dataZoomModel, a = this._handleEnds, o = this._getViewExtent(), s = i.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
      Qf(r, a, o, i.get("zoomLock") ? "all" : n, s.minSpan != null ? Lt(s.minSpan, l, o, !0) : null, s.maxSpan != null ? Lt(s.maxSpan, l, o, !0) : null);
      var u = this._range, c = this._range = Vi([Lt(a[0], o, l, !0), Lt(a[1], o, l, !0)]);
      return !u || u[0] !== c[0] || u[1] !== c[1];
    }, e.prototype._updateView = function(n) {
      var r = this._displayables, i = this._handleEnds, a = Vi(i.slice()), o = this._size;
      k([0, 1], function(h) {
        var p = r.handles[h], v = this._handleHeight;
        p.attr({
          scaleX: v / 2,
          scaleY: v / 2,
          // This is a trick, by adding an extra tiny offset to let the default handle's end point align to the drag window.
          // NOTE: It may affect some custom shapes a bit. But we prefer to have better result by default.
          x: i[h] + (h ? -1 : 1),
          y: o[1] / 2 - v / 2
        });
      }, this), r.filler.setShape({
        x: a[0],
        y: 0,
        width: a[1] - a[0],
        height: o[1]
      });
      var s = {
        x: a[0],
        width: a[1] - a[0]
      };
      r.moveHandle && (r.moveHandle.setShape(s), r.moveZone.setShape(s), r.moveZone.getBoundingRect(), r.moveHandleIcon && r.moveHandleIcon.attr("x", s.x + s.width / 2));
      for (var l = r.dataShadowSegs, u = [0, a[0], a[1], o[0]], c = 0; c < l.length; c++) {
        var f = l[c], d = f.getClipPath();
        d || (d = new mt(), f.setClipPath(d)), d.setShape({
          x: u[c],
          y: 0,
          width: u[c + 1] - u[c],
          height: o[1]
        });
      }
      this._updateDataInfo(n);
    }, e.prototype._updateDataInfo = function(n) {
      var r = this.dataZoomModel, i = this._displayables, a = i.handleLabels, o = this._orient, s = ["", ""];
      if (r.get("showDetail")) {
        var l = r.findRepresentativeAxisProxy();
        if (l) {
          var u = l.getAxisModel().axis, c = this._range, f = n ? l.calculateDataWindow({
            start: c[0],
            end: c[1]
          }).valueWindow : l.getDataValueWindow();
          s = [this._formatLabel(f[0], u), this._formatLabel(f[1], u)];
        }
      }
      var d = Vi(this._handleEnds.slice());
      h.call(this, 0), h.call(this, 1);
      function h(p) {
        var v = ql(i.handles[p].parent, this.group), g = Jx(p === 0 ? "right" : "left", v), m = this._handleWidth / 2 + KGe, y = to([d[p] + (p === 0 ? -m : m), this._size[1] / 2], v);
        a[p].setStyle({
          x: y[0],
          y: y[1],
          verticalAlign: o === Cv ? "middle" : g,
          align: o === Cv ? g : "center",
          text: s[p]
        });
      }
    }, e.prototype._formatLabel = function(n, r) {
      var i = this.dataZoomModel, a = i.get("labelFormatter"), o = i.get("labelPrecision");
      (o == null || o === "auto") && (o = r.getPixelPrecision());
      var s = n == null || isNaN(n) ? "" : r.type === "category" || r.type === "time" ? r.scale.getLabel({
        value: Math.round(n)
      }) : n.toFixed(Math.min(o, 20));
      return Me(a) ? a(n, s) : Oe(a) ? a.replace("{value}", s) : s;
    }, e.prototype._showDataInfo = function(n) {
      n = this._dragging || n;
      var r = this._displayables, i = r.handleLabels;
      i[0].attr("invisible", !n), i[1].attr("invisible", !n), r.moveHandle && this.api[n ? "enterEmphasis" : "leaveEmphasis"](r.moveHandle, 1);
    }, e.prototype._onDragMove = function(n, r, i, a) {
      this._dragging = !0, Gs(a.event);
      var o = this._displayables.sliderGroup.getLocalTransform(), s = to([r, i], o, !0), l = this._updateInterval(n, s[0]), u = this.dataZoomModel.get("realtime");
      this._updateView(!u), l && u && this._dispatchZoomAction(!0);
    }, e.prototype._onDragEnd = function() {
      this._dragging = !1, this._showDataInfo(!1);
      var n = this.dataZoomModel.get("realtime");
      !n && this._dispatchZoomAction(!1);
    }, e.prototype._onClickPanel = function(n) {
      var r = this._size, i = this._displayables.sliderGroup.transformCoordToLocal(n.offsetX, n.offsetY);
      if (!(i[0] < 0 || i[0] > r[0] || i[1] < 0 || i[1] > r[1])) {
        var a = this._handleEnds, o = (a[0] + a[1]) / 2, s = this._updateInterval("all", i[0] - o);
        this._updateView(), s && this._dispatchZoomAction(!1);
      }
    }, e.prototype._onBrushStart = function(n) {
      var r = n.offsetX, i = n.offsetY;
      this._brushStart = new Ke(r, i), this._brushing = !0, this._brushStartTime = +/* @__PURE__ */ new Date();
    }, e.prototype._onBrushEnd = function(n) {
      if (this._brushing) {
        var r = this._displayables.brushRect;
        if (this._brushing = !1, !!r) {
          r.attr("ignore", !0);
          var i = r.shape, a = +/* @__PURE__ */ new Date();
          if (!(a - this._brushStartTime < 200 && Math.abs(i.width) < 5)) {
            var o = this._getViewExtent(), s = [0, 100];
            this._range = Vi([Lt(i.x, o, s, !0), Lt(i.x + i.width, o, s, !0)]), this._handleEnds = [i.x, i.x + i.width], this._updateView(), this._dispatchZoomAction(!1);
          }
        }
      }
    }, e.prototype._onBrush = function(n) {
      this._brushing && (Gs(n.event), this._updateBrushRect(n.offsetX, n.offsetY));
    }, e.prototype._updateBrushRect = function(n, r) {
      var i = this._displayables, a = this.dataZoomModel, o = i.brushRect;
      o || (o = i.brushRect = new wv({
        silent: !0,
        style: a.getModel("brushStyle").getItemStyle()
      }), i.sliderGroup.add(o)), o.attr("ignore", !1);
      var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(n, r), c = l.transformCoordToLocal(s.x, s.y), f = this._size;
      u[0] = Math.max(Math.min(f[0], u[0]), 0), o.setShape({
        x: c[0],
        y: 0,
        width: u[0] - c[0],
        height: f[1]
      });
    }, e.prototype._dispatchZoomAction = function(n) {
      var r = this._range;
      this.api.dispatchAction({
        type: "dataZoom",
        from: this.uid,
        dataZoomId: this.dataZoomModel.id,
        animation: n ? eje : null,
        start: r[0],
        end: r[1]
      });
    }, e.prototype._findCoordRect = function() {
      var n, r = Vre(this.dataZoomModel).infoList;
      if (!n && r.length) {
        var i = r[0].model.coordinateSystem;
        n = i.getRect && i.getRect();
      }
      if (!n) {
        var a = this.api.getWidth(), o = this.api.getHeight();
        n = {
          x: a * 0.2,
          y: o * 0.2,
          width: a * 0.6,
          height: o * 0.6
        };
      }
      return n;
    }, e.type = "dataZoom.slider", e;
  }(OL)
);
function nje(t) {
  var e = {
    x: "y",
    y: "x",
    radius: "angle",
    angle: "radius"
  };
  return e[t];
}
function rQ(t) {
  return t === "vertical" ? "ns-resize" : "ew-resize";
}
function oie(t) {
  t.registerComponentModel(XGe), t.registerComponentView(tje), SL(t);
}
function rje(t) {
  at(aie), at(oie);
}
var sie = {
  /**
   * @public
   */
  get: function(t, e, n) {
    var r = Le((ije[t] || {})[e]);
    return n && ue(r) ? r[r.length - 1] : r;
  }
}, ije = {
  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]
  }
}, iQ = qn.mapVisual, aje = qn.eachVisual, oje = ue, aQ = k, sje = Vi, lje = Lt, GO = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.stateList = ["inRange", "outOfRange"], n.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], n.layoutMode = {
        type: "box",
        ignoreSize: !0
      }, n.dataBound = [-1 / 0, 1 / 0], n.targetVisuals = {}, n.controllerVisuals = {}, n;
    }
    return e.prototype.init = function(n, r, i) {
      this.mergeDefaultAndTheme(n, i);
    }, e.prototype.optionUpdated = function(n, r) {
      var i = this.option;
      !r && Yre(i, n, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
    }, e.prototype.resetVisual = function(n) {
      var r = this.stateList;
      n = xe(n, this), this.controllerVisuals = LE(this.option.controller, r, n), this.targetVisuals = LE(this.option.target, r, n);
    }, e.prototype.getItemSymbol = function() {
      return null;
    }, e.prototype.getTargetSeriesIndices = function() {
      var n = this.option.seriesIndex, r = [];
      return n == null || n === "all" ? this.ecModel.eachSeries(function(i, a) {
        r.push(a);
      }) : r = Qt(n), r;
    }, e.prototype.eachTargetSeries = function(n, r) {
      k(this.getTargetSeriesIndices(), function(i) {
        var a = this.ecModel.getSeriesByIndex(i);
        a && n.call(r, a);
      }, this);
    }, e.prototype.isTargetSeries = function(n) {
      var r = !1;
      return this.eachTargetSeries(function(i) {
        i === n && (r = !0);
      }), r;
    }, e.prototype.formatValueText = function(n, r, i) {
      var a = this.option, o = a.precision, s = this.dataBound, l = a.formatter, u;
      i = i || ["<", ">"], ue(n) && (n = n.slice(), u = !0);
      var c = r ? n : u ? [f(n[0]), f(n[1])] : f(n);
      if (Oe(l))
        return l.replace("{value}", u ? c[0] : c).replace("{value2}", u ? c[1] : c);
      if (Me(l))
        return u ? l(n[0], n[1]) : l(n);
      if (u)
        return n[0] === s[0] ? i[0] + " " + c[1] : n[1] === s[1] ? i[1] + " " + c[0] : c[0] + " - " + c[1];
      return c;
      function f(d) {
        return d === s[0] ? "min" : d === s[1] ? "max" : (+d).toFixed(Math.min(o, 20));
      }
    }, e.prototype.resetExtent = function() {
      var n = this.option, r = sje([n.min, n.max]);
      this._dataExtent = r;
    }, e.prototype.getDataDimensionIndex = function(n) {
      var r = this.option.dimension;
      if (r != null)
        return n.getDimensionIndex(r);
      for (var i = n.dimensions, a = i.length - 1; a >= 0; a--) {
        var o = i[a], s = n.getDimensionInfo(o);
        if (!s.isCalculationCoord)
          return s.storeDimIndex;
      }
    }, e.prototype.getExtent = function() {
      return this._dataExtent.slice();
    }, e.prototype.completeVisualOption = function() {
      var n = this.ecModel, r = this.option, i = {
        inRange: r.inRange,
        outOfRange: r.outOfRange
      }, a = r.target || (r.target = {}), o = r.controller || (r.controller = {});
      qe(a, i), qe(o, i);
      var s = this.isCategory();
      l.call(this, a), l.call(this, o), u.call(this, a, "inRange", "outOfRange"), c.call(this, o);
      function l(f) {
        oje(r.color) && !f.inRange && (f.inRange = {
          color: r.color.slice().reverse()
        }), f.inRange = f.inRange || {
          color: n.get("gradientColor")
        };
      }
      function u(f, d, h) {
        var p = f[d], v = f[h];
        p && !v && (v = f[h] = {}, aQ(p, function(g, m) {
          if (qn.isValidType(m)) {
            var y = sie.get(m, "inactive", s);
            y != null && (v[m] = y, m === "color" && !v.hasOwnProperty("opacity") && !v.hasOwnProperty("colorAlpha") && (v.opacity = [0, 0]));
          }
        }));
      }
      function c(f) {
        var d = (f.inRange || {}).symbol || (f.outOfRange || {}).symbol, h = (f.inRange || {}).symbolSize || (f.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), v = this.getItemSymbol(), g = v || "roundRect";
        aQ(this.stateList, function(m) {
          var y = this.itemSize, b = f[m];
          b || (b = f[m] = {
            color: s ? p : [p]
          }), b.symbol == null && (b.symbol = d && Le(d) || (s ? g : [g])), b.symbolSize == null && (b.symbolSize = h && Le(h) || (s ? y[0] : [y[0], y[0]])), b.symbol = iQ(b.symbol, function(S) {
            return S === "none" ? g : S;
          });
          var _ = b.symbolSize;
          if (_ != null) {
            var O = -1 / 0;
            aje(_, function(S) {
              S > O && (O = S);
            }), b.symbolSize = iQ(_, function(S) {
              return lje(S, [0, O], [0, y[0]], !0);
            });
          }
        }, this);
      }
    }, e.prototype.resetItemSize = function() {
      this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
    }, e.prototype.isCategory = function() {
      return !!this.option.categories;
    }, e.prototype.setSelected = function(n) {
    }, e.prototype.getSelected = function() {
      return null;
    }, e.prototype.getValueState = function(n) {
      return null;
    }, e.prototype.getVisualMeta = function(n) {
      return null;
    }, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
      show: !0,
      // zlevel: 0,
      z: 4,
      seriesIndex: "all",
      min: 0,
      max: 200,
      left: 0,
      right: null,
      top: null,
      bottom: 0,
      itemWidth: null,
      itemHeight: null,
      inverse: !1,
      orient: "vertical",
      backgroundColor: "rgba(0,0,0,0)",
      borderColor: "#ccc",
      contentColor: "#5793f3",
      inactiveColor: "#aaa",
      borderWidth: 0,
      padding: 5,
      // 接受数组分别设定上右下左边距，同css
      textGap: 10,
      precision: 0,
      textStyle: {
        color: "#333"
        // 值域文字颜色
      }
    }, e;
  }(rt)
), oQ = [20, 140], uje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      t.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(i) {
        i.mappingMethod = "linear", i.dataExtent = this.getExtent();
      }), this._resetRange();
    }, e.prototype.resetItemSize = function() {
      t.prototype.resetItemSize.apply(this, arguments);
      var n = this.itemSize;
      (n[0] == null || isNaN(n[0])) && (n[0] = oQ[0]), (n[1] == null || isNaN(n[1])) && (n[1] = oQ[1]);
    }, e.prototype._resetRange = function() {
      var n = this.getExtent(), r = this.option.range;
      !r || r.auto ? (n.auto = 1, this.option.range = n) : ue(r) && (r[0] > r[1] && r.reverse(), r[0] = Math.max(r[0], n[0]), r[1] = Math.min(r[1], n[1]));
    }, e.prototype.completeVisualOption = function() {
      t.prototype.completeVisualOption.apply(this, arguments), k(this.stateList, function(n) {
        var r = this.option.controller[n].symbolSize;
        r && r[0] !== r[1] && (r[0] = r[1] / 3);
      }, this);
    }, e.prototype.setSelected = function(n) {
      this.option.range = n.slice(), this._resetRange();
    }, e.prototype.getSelected = function() {
      var n = this.getExtent(), r = Vi((this.get("range") || []).slice());
      return r[0] > n[1] && (r[0] = n[1]), r[1] > n[1] && (r[1] = n[1]), r[0] < n[0] && (r[0] = n[0]), r[1] < n[0] && (r[1] = n[0]), r;
    }, e.prototype.getValueState = function(n) {
      var r = this.option.range, i = this.getExtent();
      return (r[0] <= i[0] || r[0] <= n) && (r[1] >= i[1] || n <= r[1]) ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(n) {
      var r = [];
      return this.eachTargetSeries(function(i) {
        var a = [], o = i.getData();
        o.each(this.getDataDimensionIndex(o), function(s, l) {
          n[0] <= s && s <= n[1] && a.push(l);
        }, this), r.push({
          seriesId: i.id,
          dataIndex: a
        });
      }, this), r;
    }, e.prototype.getVisualMeta = function(n) {
      var r = sQ(this, "outOfRange", this.getExtent()), i = sQ(this, "inRange", this.option.range.slice()), a = [];
      function o(h, p) {
        a.push({
          value: h,
          color: n(h, p)
        });
      }
      for (var s = 0, l = 0, u = i.length, c = r.length; l < c && (!i.length || r[l] <= i[0]); l++)
        r[l] < i[s] && o(r[l], "outOfRange");
      for (var f = 1; s < u; s++, f = 0)
        f && a.length && o(i[s], "outOfRange"), o(i[s], "inRange");
      for (var f = 1; l < c; l++)
        (!i.length || i[i.length - 1] < r[l]) && (f && (a.length && o(a[a.length - 1].value, "outOfRange"), f = 0), o(r[l], "outOfRange"));
      var d = a.length;
      return {
        stops: a,
        outerColors: [d ? a[0].color : "transparent", d ? a[d - 1].color : "transparent"]
      };
    }, e.type = "visualMap.continuous", e.defaultOption = Pu(GO.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;
  }(GO)
);
function sQ(t, e, n) {
  if (n[0] === n[1])
    return n.slice();
  for (var r = 200, i = (n[1] - n[0]) / r, a = n[0], o = [], s = 0; s <= r && a < n[1]; s++)
    o.push(a), a += i;
  return o.push(n[1]), o;
}
var lie = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n.autoPositionValues = {
        left: 1,
        right: 1,
        top: 1,
        bottom: 1
      }, n;
    }
    return e.prototype.init = function(n, r) {
      this.ecModel = n, this.api = r;
    }, e.prototype.render = function(n, r, i, a) {
      if (this.visualMapModel = n, n.get("show") === !1) {
        this.group.removeAll();
        return;
      }
      this.doRender(n, r, i, a);
    }, e.prototype.renderBackground = function(n) {
      var r = this.visualMapModel, i = Bf(r.get("padding") || 0), a = n.getBoundingRect();
      n.add(new mt({
        z2: -1,
        silent: !0,
        shape: {
          x: a.x - i[3],
          y: a.y - i[0],
          width: a.width + i[3] + i[1],
          height: a.height + i[0] + i[2]
        },
        style: {
          fill: r.get("backgroundColor"),
          stroke: r.get("borderColor"),
          lineWidth: r.get("borderWidth")
        }
      }));
    }, e.prototype.getControllerVisual = function(n, r, i) {
      i = i || {};
      var a = i.forceState, o = this.visualMapModel, s = {};
      if (r === "color") {
        var l = o.get("contentColor");
        s.color = l;
      }
      function u(h) {
        return s[h];
      }
      function c(h, p) {
        s[h] = p;
      }
      var f = o.controllerVisuals[a || o.getValueState(n)], d = qn.prepareVisualTypes(f);
      return k(d, function(h) {
        var p = f[h];
        i.convertOpacityToAlpha && h === "opacity" && (h = "colorAlpha", p = f.__alphaForOpacity), qn.dependsOn(h, r) && p && p.applyVisual(n, u, c);
      }), s[r];
    }, e.prototype.positionGroup = function(n) {
      var r = this.visualMapModel, i = this.api;
      aw(n, r.getBoxLayoutParams(), {
        width: i.getWidth(),
        height: i.getHeight()
      });
    }, e.prototype.doRender = function(n, r, i, a) {
    }, e.type = "visualMap", e;
  }(Xt)
), lQ = [["left", "right", "width"], ["top", "bottom", "height"]];
function uie(t, e, n) {
  var r = t.option, i = r.align;
  if (i != null && i !== "auto")
    return i;
  for (var a = {
    width: e.getWidth(),
    height: e.getHeight()
  }, o = r.orient === "horizontal" ? 1 : 0, s = lQ[o], l = [0, null, 10], u = {}, c = 0; c < 3; c++)
    u[lQ[1 - o][c]] = l[c], u[s[c]] = c === 2 ? n[0] : r[s[c]];
  var f = [["x", "width", 3], ["y", "height", 0]][o], d = Rn(u, a, r.padding);
  return s[(d.margin[f[2]] || 0) + d[f[0]] + d[f[1]] * 0.5 < a[f[1]] * 0.5 ? 0 : 1];
}
function K_(t, e) {
  return k(t || [], function(n) {
    n.dataIndex != null && (n.dataIndexInside = n.dataIndex, n.dataIndex = null), n.highlightKey = "visualMap" + (e ? e.componentIndex : "");
  }), t;
}
var Ao = Lt, cje = k, uQ = Math.min, o$ = Math.max, fje = 12, dje = 6, hje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._shapes = {}, n._dataInterval = [], n._handleEnds = [], n._hoverLinkDataIndices = [], n;
    }
    return e.prototype.init = function(n, r) {
      t.prototype.init.call(this, n, r), this._hoverLinkFromSeriesMouseOver = xe(this._hoverLinkFromSeriesMouseOver, this), this._hideIndicator = xe(this._hideIndicator, this);
    }, e.prototype.doRender = function(n, r, i, a) {
      (!a || a.type !== "selectDataRange" || a.from !== this.uid) && this._buildView();
    }, e.prototype._buildView = function() {
      this.group.removeAll();
      var n = this.visualMapModel, r = this.group;
      this._orient = n.get("orient"), this._useHandle = n.get("calculable"), this._resetInterval(), this._renderBar(r);
      var i = n.get("text");
      this._renderEndsText(r, i, 0), this._renderEndsText(r, i, 1), this._updateView(!0), this.renderBackground(r), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(r);
    }, e.prototype._renderEndsText = function(n, r, i) {
      if (r) {
        var a = r[1 - i];
        a = a != null ? a + "" : "";
        var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, c = this._applyTransform([l[0] / 2, i === 0 ? -s : l[1] + s], u), f = this._applyTransform(i === 0 ? "bottom" : "top", u), d = this._orient, h = this.visualMapModel.textStyleModel;
        this.group.add(new gt({
          style: Zt(h, {
            x: c[0],
            y: c[1],
            verticalAlign: d === "horizontal" ? "middle" : f,
            align: d === "horizontal" ? f : "center",
            text: a
          })
        }));
      }
    }, e.prototype._renderBar = function(n) {
      var r = this.visualMapModel, i = this._shapes, a = r.itemSize, o = this._orient, s = this._useHandle, l = uie(r, this.api, a), u = i.mainGroup = this._createBarGroup(l), c = new Ve();
      u.add(c), c.add(i.outOfRange = cQ()), c.add(i.inRange = cQ(null, s ? dQ(this._orient) : null, xe(this._dragHandle, this, "all", !1), xe(this._dragHandle, this, "all", !0))), c.setClipPath(new mt({
        shape: {
          x: 0,
          y: 0,
          width: a[0],
          height: a[1],
          r: 3
        }
      }));
      var f = r.textStyleModel.getTextRect("国"), d = o$(f.width, f.height);
      s && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(r, u, 0, a, d, o), this._createHandle(r, u, 1, a, d, o)), this._createIndicator(r, u, a, d, o), n.add(u);
    }, e.prototype._createHandle = function(n, r, i, a, o, s) {
      var l = xe(this._dragHandle, this, i, !1), u = xe(this._dragHandle, this, i, !0), c = oo(n.get("handleSize"), a[0]), f = $n(n.get("handleIcon"), -c / 2, -c / 2, c, c, null, !0), d = dQ(this._orient);
      f.attr({
        cursor: d,
        draggable: !0,
        drift: l,
        ondragend: u,
        onmousemove: function(m) {
          Gs(m.event);
        }
      }), f.x = a[0] / 2, f.useStyle(n.getModel("handleStyle").getItemStyle()), f.setStyle({
        strokeNoScale: !0,
        strokeFirst: !0
      }), f.style.lineWidth *= 2, f.ensureState("emphasis").style = n.getModel(["emphasis", "handleStyle"]).getItemStyle(), Lc(f, !0), r.add(f);
      var h = this.visualMapModel.textStyleModel, p = new gt({
        cursor: d,
        draggable: !0,
        drift: l,
        onmousemove: function(m) {
          Gs(m.event);
        },
        ondragend: u,
        style: Zt(h, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      p.ensureState("blur").style = {
        opacity: 0.1
      }, p.stateTransition = {
        duration: 200
      }, this.group.add(p);
      var v = [c, 0], g = this._shapes;
      g.handleThumbs[i] = f, g.handleLabelPoints[i] = v, g.handleLabels[i] = p;
    }, e.prototype._createIndicator = function(n, r, i, a, o) {
      var s = oo(n.get("indicatorSize"), i[0]), l = $n(n.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
      l.attr({
        cursor: "move",
        invisible: !0,
        silent: !0,
        x: i[0] / 2
      });
      var u = n.getModel("indicatorStyle").getItemStyle();
      if (l instanceof lr) {
        var c = l.style;
        l.useStyle(le({
          // TODO other properties like x, y ?
          image: c.image,
          x: c.x,
          y: c.y,
          width: c.width,
          height: c.height
        }, u));
      } else
        l.useStyle(u);
      r.add(l);
      var f = this.visualMapModel.textStyleModel, d = new gt({
        silent: !0,
        invisible: !0,
        style: Zt(f, {
          x: 0,
          y: 0,
          text: ""
        })
      });
      this.group.add(d);
      var h = [(o === "horizontal" ? a / 2 : dje) + i[0] / 2, 0], p = this._shapes;
      p.indicator = l, p.indicatorLabel = d, p.indicatorLabelPoint = h, this._firstShowIndicator = !0;
    }, e.prototype._dragHandle = function(n, r, i, a) {
      if (this._useHandle) {
        if (this._dragging = !r, !r) {
          var o = this._applyTransform([i, a], this._shapes.mainGroup, !0);
          this._updateInterval(n, o[1]), this._hideIndicator(), this._updateView();
        }
        r === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
          type: "selectDataRange",
          from: this.uid,
          visualMapId: this.visualMapModel.id,
          selected: this._dataInterval.slice()
        }), r ? !this._hovering && this._clearHoverLinkToSeries() : fQ(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[n], !1);
      }
    }, e.prototype._resetInterval = function() {
      var n = this.visualMapModel, r = this._dataInterval = n.getSelected(), i = n.getExtent(), a = [0, n.itemSize[1]];
      this._handleEnds = [Ao(r[0], i, a, !0), Ao(r[1], i, a, !0)];
    }, e.prototype._updateInterval = function(n, r) {
      r = r || 0;
      var i = this.visualMapModel, a = this._handleEnds, o = [0, i.itemSize[1]];
      Qf(
        r,
        a,
        o,
        n,
        // cross is forbidden
        0
      );
      var s = i.getExtent();
      this._dataInterval = [Ao(a[0], o, s, !0), Ao(a[1], o, s, !0)];
    }, e.prototype._updateView = function(n) {
      var r = this.visualMapModel, i = r.getExtent(), a = this._shapes, o = [0, r.itemSize[1]], s = n ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, i, s, "inRange"), u = this._createBarVisual(i, i, o, "outOfRange");
      a.inRange.setStyle({
        fill: l.barColor
        // opacity: visualInRange.opacity
      }).setShape("points", l.barPoints), a.outOfRange.setStyle({
        fill: u.barColor
        // opacity: visualOutOfRange.opacity
      }).setShape("points", u.barPoints), this._updateHandle(s, l);
    }, e.prototype._createBarVisual = function(n, r, i, a) {
      var o = {
        forceState: a,
        convertOpacityToAlpha: !0
      }, s = this._makeColorGradient(n, o), l = [this.getControllerVisual(n[0], "symbolSize", o), this.getControllerVisual(n[1], "symbolSize", o)], u = this._createBarPoints(i, l);
      return {
        barColor: new hp(0, 0, 0, 1, s),
        barPoints: u,
        handlesColor: [s[0].color, s[s.length - 1].color]
      };
    }, e.prototype._makeColorGradient = function(n, r) {
      var i = 100, a = [], o = (n[1] - n[0]) / i;
      a.push({
        color: this.getControllerVisual(n[0], "color", r),
        offset: 0
      });
      for (var s = 1; s < i; s++) {
        var l = n[0] + o * s;
        if (l > n[1])
          break;
        a.push({
          color: this.getControllerVisual(l, "color", r),
          offset: s / i
        });
      }
      return a.push({
        color: this.getControllerVisual(n[1], "color", r),
        offset: 1
      }), a;
    }, e.prototype._createBarPoints = function(n, r) {
      var i = this.visualMapModel.itemSize;
      return [[i[0] - r[0], n[0]], [i[0], n[0]], [i[0], n[1]], [i[0] - r[1], n[1]]];
    }, e.prototype._createBarGroup = function(n) {
      var r = this._orient, i = this.visualMapModel.get("inverse");
      return new Ve(r === "horizontal" && !i ? {
        scaleX: n === "bottom" ? 1 : -1,
        rotation: Math.PI / 2
      } : r === "horizontal" && i ? {
        scaleX: n === "bottom" ? -1 : 1,
        rotation: -Math.PI / 2
      } : r === "vertical" && !i ? {
        scaleX: n === "left" ? 1 : -1,
        scaleY: -1
      } : {
        scaleX: n === "left" ? 1 : -1
      });
    }, e.prototype._updateHandle = function(n, r) {
      if (this._useHandle) {
        var i = this._shapes, a = this.visualMapModel, o = i.handleThumbs, s = i.handleLabels, l = a.itemSize, u = a.getExtent();
        cje([0, 1], function(c) {
          var f = o[c];
          f.setStyle("fill", r.handlesColor[c]), f.y = n[c];
          var d = Ao(n[c], [0, l[1]], u, !0), h = this.getControllerVisual(d, "symbolSize");
          f.scaleX = f.scaleY = h / l[0], f.x = l[0] - h / 2;
          var p = to(i.handleLabelPoints[c], ql(f, this.group));
          s[c].setStyle({
            x: p[0],
            y: p[1],
            text: a.formatValueText(this._dataInterval[c]),
            verticalAlign: "middle",
            align: this._orient === "vertical" ? this._applyTransform("left", i.mainGroup) : "center"
          });
        }, this);
      }
    }, e.prototype._showIndicator = function(n, r, i, a) {
      var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], c = this._shapes, f = c.indicator;
      if (f) {
        f.attr("invisible", !1);
        var d = {
          convertOpacityToAlpha: !0
        }, h = this.getControllerVisual(n, "color", d), p = this.getControllerVisual(n, "symbolSize"), v = Ao(n, s, u, !0), g = l[0] - p / 2, m = {
          x: f.x,
          y: f.y
        };
        f.y = v, f.x = g;
        var y = to(c.indicatorLabelPoint, ql(f, this.group)), b = c.indicatorLabel;
        b.attr("invisible", !1);
        var _ = this._applyTransform("left", c.mainGroup), O = this._orient, S = O === "horizontal";
        b.setStyle({
          text: (i || "") + o.formatValueText(r),
          verticalAlign: S ? _ : "middle",
          align: S ? "center" : _
        });
        var x = {
          x: g,
          y: v,
          style: {
            fill: h
          }
        }, C = {
          style: {
            x: y[0],
            y: y[1]
          }
        };
        if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
          var T = {
            duration: 100,
            easing: "cubicInOut",
            additive: !0
          };
          f.x = m.x, f.y = m.y, f.animateTo(x, T), b.animateTo(C, T);
        } else
          f.attr(x), b.attr(C);
        this._firstShowIndicator = !1;
        var w = this._shapes.handleLabels;
        if (w)
          for (var P = 0; P < w.length; P++)
            this.api.enterBlur(w[P]);
      }
    }, e.prototype._enableHoverLinkToSeries = function() {
      var n = this;
      this._shapes.mainGroup.on("mousemove", function(r) {
        if (n._hovering = !0, !n._dragging) {
          var i = n.visualMapModel.itemSize, a = n._applyTransform([r.offsetX, r.offsetY], n._shapes.mainGroup, !0, !0);
          a[1] = uQ(o$(0, a[1]), i[1]), n._doHoverLinkToSeries(a[1], 0 <= a[0] && a[0] <= i[0]);
        }
      }).on("mouseout", function() {
        n._hovering = !1, !n._dragging && n._clearHoverLinkToSeries();
      });
    }, e.prototype._enableHoverLinkFromSeries = function() {
      var n = this.api.getZr();
      this.visualMapModel.option.hoverLink ? (n.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), n.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
    }, e.prototype._doHoverLinkToSeries = function(n, r) {
      var i = this.visualMapModel, a = i.itemSize;
      if (i.option.hoverLink) {
        var o = [0, a[1]], s = i.getExtent();
        n = uQ(o$(o[0], n), o[1]);
        var l = pje(i, s, o), u = [n - l, n + l], c = Ao(n, o, s, !0), f = [Ao(u[0], o, s, !0), Ao(u[1], o, s, !0)];
        u[0] < o[0] && (f[0] = -1 / 0), u[1] > o[1] && (f[1] = 1 / 0), r && (f[0] === -1 / 0 ? this._showIndicator(c, f[1], "< ", l) : f[1] === 1 / 0 ? this._showIndicator(c, f[0], "> ", l) : this._showIndicator(c, c, "≈ ", l));
        var d = this._hoverLinkDataIndices, h = [];
        (r || fQ(i)) && (h = this._hoverLinkDataIndices = i.findTargetDataIndices(f));
        var p = KDe(d, h);
        this._dispatchHighDown("downplay", K_(p[0], i)), this._dispatchHighDown("highlight", K_(p[1], i));
      }
    }, e.prototype._hoverLinkFromSeriesMouseOver = function(n) {
      var r;
      if (Bc(n.target, function(l) {
        var u = Fe(l);
        if (u.dataIndex != null)
          return r = u, !0;
      }, !0), !!r) {
        var i = this.ecModel.getSeriesByIndex(r.seriesIndex), a = this.visualMapModel;
        if (a.isTargetSeries(i)) {
          var o = i.getData(r.dataType), s = o.getStore().get(a.getDataDimensionIndex(o), r.dataIndex);
          isNaN(s) || this._showIndicator(s, s);
        }
      }
    }, e.prototype._hideIndicator = function() {
      var n = this._shapes;
      n.indicator && n.indicator.attr("invisible", !0), n.indicatorLabel && n.indicatorLabel.attr("invisible", !0);
      var r = this._shapes.handleLabels;
      if (r)
        for (var i = 0; i < r.length; i++)
          this.api.leaveBlur(r[i]);
    }, e.prototype._clearHoverLinkToSeries = function() {
      this._hideIndicator();
      var n = this._hoverLinkDataIndices;
      this._dispatchHighDown("downplay", K_(n, this.visualMapModel)), n.length = 0;
    }, e.prototype._clearHoverLinkFromSeries = function() {
      this._hideIndicator();
      var n = this.api.getZr();
      n.off("mouseover", this._hoverLinkFromSeriesMouseOver), n.off("mouseout", this._hideIndicator);
    }, e.prototype._applyTransform = function(n, r, i, a) {
      var o = ql(r, a ? null : this.group);
      return ue(n) ? to(n, o, i) : Jx(n, o, i);
    }, e.prototype._dispatchHighDown = function(n, r) {
      r && r.length && this.api.dispatchAction({
        type: n,
        batch: r
      });
    }, e.prototype.dispose = function() {
      this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
    }, e.type = "visualMap.continuous", e;
  }(lie)
);
function cQ(t, e, n, r) {
  return new ii({
    shape: {
      points: t
    },
    draggable: !!n,
    cursor: e,
    drift: n,
    onmousemove: function(i) {
      Gs(i.event);
    },
    ondragend: r
  });
}
function pje(t, e, n) {
  var r = fje / 2, i = t.get("hoverLinkDataSize");
  return i && (r = Ao(i, e, n, !0) / 2), r;
}
function fQ(t) {
  var e = t.get("hoverLinkOnHandle");
  return !!(e ?? t.get("realtime"));
}
function dQ(t) {
  return t === "vertical" ? "ns-resize" : "ew-resize";
}
var vje = {
  type: "selectDataRange",
  event: "dataRangeSelected",
  // FIXME use updateView appears wrong
  update: "update"
}, gje = function(t, e) {
  e.eachComponent({
    mainType: "visualMap",
    query: t
  }, function(n) {
    n.setSelected(t.selected);
  });
}, mje = [
  {
    createOnAllSeries: !0,
    reset: function(t, e) {
      var n = [];
      return e.eachComponent("visualMap", function(r) {
        var i = t.pipelineContext;
        !r.isTargetSeries(t) || i && i.large || n.push(z9e(r.stateList, r.targetVisuals, xe(r.getValueState, r), r.getDataDimensionIndex(t.getData())));
      }), n;
    }
  },
  // Only support color.
  {
    createOnAllSeries: !0,
    reset: function(t, e) {
      var n = t.getData(), r = [];
      e.eachComponent("visualMap", function(i) {
        if (i.isTargetSeries(t)) {
          var a = i.getVisualMeta(xe(yje, null, t, i)) || {
            stops: [],
            outerColors: []
          }, o = i.getDataDimensionIndex(n);
          o >= 0 && (a.dimension = o, r.push(a));
        }
      }), t.getData().setVisual("visualMeta", r);
    }
  }
];
function yje(t, e, n, r) {
  for (var i = e.targetVisuals[r], a = qn.prepareVisualTypes(i), o = {
    color: H0(t.getData(), "color")
    // default color.
  }, s = 0, l = a.length; s < l; s++) {
    var u = a[s], c = i[u === "opacity" ? "__alphaForOpacity" : u];
    c && c.applyVisual(n, f, d);
  }
  return o.color;
  function f(h) {
    return o[h];
  }
  function d(h, p) {
    o[h] = p;
  }
}
var hQ = k;
function bje(t) {
  var e = t && t.visualMap;
  ue(e) || (e = e ? [e] : []), hQ(e, function(n) {
    if (n) {
      _d(n, "splitList") && !_d(n, "pieces") && (n.pieces = n.splitList, delete n.splitList);
      var r = n.pieces;
      r && ue(r) && hQ(r, function(i) {
        Ie(i) && (_d(i, "start") && !_d(i, "min") && (i.min = i.start), _d(i, "end") && !_d(i, "max") && (i.max = i.end));
      });
    }
  });
}
function _d(t, e) {
  return t && t.hasOwnProperty && t.hasOwnProperty(e);
}
var pQ = !1;
function cie(t) {
  pQ || (pQ = !0, t.registerSubTypeDefaulter("visualMap", function(e) {
    return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
  }), t.registerAction(vje, gje), k(mje, function(e) {
    t.registerVisual(t.PRIORITY.VISUAL.COMPONENT, e);
  }), t.registerPreprocessor(bje));
}
function fie(t) {
  t.registerComponentModel(uje), t.registerComponentView(hje), cie(t);
}
var _je = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n._pieceList = [], n;
    }
    return e.prototype.optionUpdated = function(n, r) {
      t.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
      var i = this._mode = this._determineMode();
      this._pieceList = [], Oje[this._mode].call(this, this._pieceList), this._resetSelected(n, r);
      var a = this.option.categories;
      this.resetVisual(function(o, s) {
        i === "categories" ? (o.mappingMethod = "category", o.categories = Le(a)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = ce(this._pieceList, function(l) {
          return l = Le(l), s !== "inRange" && (l.visual = null), l;
        }));
      });
    }, e.prototype.completeVisualOption = function() {
      var n = this.option, r = {}, i = qn.listVisualTypes(), a = this.isCategory();
      k(n.pieces, function(s) {
        k(i, function(l) {
          s.hasOwnProperty(l) && (r[l] = 1);
        });
      }), k(r, function(s, l) {
        var u = !1;
        k(this.stateList, function(c) {
          u = u || o(n, c, l) || o(n.target, c, l);
        }, this), !u && k(this.stateList, function(c) {
          (n[c] || (n[c] = {}))[l] = sie.get(l, c === "inRange" ? "active" : "inactive", a);
        });
      }, this);
      function o(s, l, u) {
        return s && s[l] && s[l].hasOwnProperty(u);
      }
      t.prototype.completeVisualOption.apply(this, arguments);
    }, e.prototype._resetSelected = function(n, r) {
      var i = this.option, a = this._pieceList, o = (r ? i : n).selected || {};
      if (i.selected = o, k(a, function(l, u) {
        var c = this.getSelectedMapKey(l);
        o.hasOwnProperty(c) || (o[c] = !0);
      }, this), i.selectedMode === "single") {
        var s = !1;
        k(a, function(l, u) {
          var c = this.getSelectedMapKey(l);
          o[c] && (s ? o[c] = !1 : s = !0);
        }, this);
      }
    }, e.prototype.getItemSymbol = function() {
      return this.get("itemSymbol");
    }, e.prototype.getSelectedMapKey = function(n) {
      return this._mode === "categories" ? n.value + "" : n.index + "";
    }, e.prototype.getPieceList = function() {
      return this._pieceList;
    }, e.prototype._determineMode = function() {
      var n = this.option;
      return n.pieces && n.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
    }, e.prototype.setSelected = function(n) {
      this.option.selected = Le(n);
    }, e.prototype.getValueState = function(n) {
      var r = qn.findPieceIndex(n, this._pieceList);
      return r != null && this.option.selected[this.getSelectedMapKey(this._pieceList[r])] ? "inRange" : "outOfRange";
    }, e.prototype.findTargetDataIndices = function(n) {
      var r = [], i = this._pieceList;
      return this.eachTargetSeries(function(a) {
        var o = [], s = a.getData();
        s.each(this.getDataDimensionIndex(s), function(l, u) {
          var c = qn.findPieceIndex(l, i);
          c === n && o.push(u);
        }, this), r.push({
          seriesId: a.id,
          dataIndex: o
        });
      }, this), r;
    }, e.prototype.getRepresentValue = function(n) {
      var r;
      if (this.isCategory())
        r = n.value;
      else if (n.value != null)
        r = n.value;
      else {
        var i = n.interval || [];
        r = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2;
      }
      return r;
    }, e.prototype.getVisualMeta = function(n) {
      if (this.isCategory())
        return;
      var r = [], i = ["", ""], a = this;
      function o(c, f) {
        var d = a.getRepresentValue({
          interval: c
        });
        f || (f = a.getValueState(d));
        var h = n(d, f);
        c[0] === -1 / 0 ? i[0] = h : c[1] === 1 / 0 ? i[1] = h : r.push({
          value: c[0],
          color: h
        }, {
          value: c[1],
          color: h
        });
      }
      var s = this._pieceList.slice();
      if (!s.length)
        s.push({
          interval: [-1 / 0, 1 / 0]
        });
      else {
        var l = s[0].interval[0];
        l !== -1 / 0 && s.unshift({
          interval: [-1 / 0, l]
        }), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
          interval: [l, 1 / 0]
        });
      }
      var u = -1 / 0;
      return k(s, function(c) {
        var f = c.interval;
        f && (f[0] > u && o([u, f[0]], "outOfRange"), o(f.slice()), u = f[1]);
      }, this), {
        stops: r,
        outerColors: i
      };
    }, e.type = "visualMap.piecewise", e.defaultOption = Pu(GO.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;
  }(GO)
), Oje = {
  splitNumber: function(t) {
    var e = this.option, n = Math.min(e.precision, 20), r = this.getExtent(), i = e.splitNumber;
    i = Math.max(parseInt(i, 10), 1), e.splitNumber = i;
    for (var a = (r[1] - r[0]) / i; +a.toFixed(n) !== a && n < 5; )
      n++;
    e.precision = n, a = +a.toFixed(n), e.minOpen && t.push({
      interval: [-1 / 0, r[0]],
      close: [0, 0]
    });
    for (var o = 0, s = r[0]; o < i; s += a, o++) {
      var l = o === i - 1 ? r[1] : s + a;
      t.push({
        interval: [s, l],
        close: [1, 1]
      });
    }
    e.maxOpen && t.push({
      interval: [r[1], 1 / 0],
      close: [0, 0]
    }), TA(t), k(t, function(u, c) {
      u.index = c, u.text = this.formatValueText(u.interval);
    }, this);
  },
  categories: function(t) {
    var e = this.option;
    k(e.categories, function(n) {
      t.push({
        text: this.formatValueText(n, !0),
        value: n
      });
    }, this), vQ(e, t);
  },
  pieces: function(t) {
    var e = this.option;
    k(e.pieces, function(n, r) {
      Ie(n) || (n = {
        value: n
      });
      var i = {
        text: "",
        index: r
      };
      if (n.label != null && (i.text = n.label), n.hasOwnProperty("value")) {
        var a = i.value = n.value;
        i.interval = [a, a], i.close = [1, 1];
      } else {
        for (var o = i.interval = [], s = i.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], c = [], f = 0; f < 2; f++) {
          for (var d = [["gte", "gt", "min"], ["lte", "lt", "max"]][f], h = 0; h < 3 && o[f] == null; h++)
            o[f] = n[d[h]], s[f] = l[h], c[f] = h === 2;
          o[f] == null && (o[f] = u[f]);
        }
        c[0] && o[1] === 1 / 0 && (s[0] = 0), c[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + r + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (i.value = o[0]);
      }
      i.visual = qn.retrieveVisuals(n), t.push(i);
    }, this), vQ(e, t), TA(t), k(t, function(n) {
      var r = n.close, i = [["<", "≤"][r[1]], [">", "≥"][r[0]]];
      n.text = n.text || this.formatValueText(n.value != null ? n.value : n.interval, !1, i);
    }, this);
  }
};
function vQ(t, e) {
  var n = t.inverse;
  (t.orient === "vertical" ? !n : n) && e.reverse();
}
var Sje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = e.type, n;
    }
    return e.prototype.doRender = function() {
      var n = this.group;
      n.removeAll();
      var r = this.visualMapModel, i = r.get("textGap"), a = r.textStyleModel, o = a.getFont(), s = a.getTextColor(), l = this._getItemAlign(), u = r.itemSize, c = this._getViewData(), f = c.endsText, d = Tn(r.get("showLabel", !0), !f);
      f && this._renderEndsText(n, f[0], u, d, l), k(c.viewPieceList, function(h) {
        var p = h.piece, v = new Ve();
        v.onclick = xe(this._onItemClick, this, p), this._enableHoverLink(v, h.indexInModelPieceList);
        var g = r.getRepresentValue(p);
        if (this._createItemSymbol(v, g, [0, 0, u[0], u[1]]), d) {
          var m = this.visualMapModel.getValueState(g);
          v.add(new gt({
            style: {
              x: l === "right" ? -i : u[0] + i,
              y: u[1] / 2,
              text: p.text,
              verticalAlign: "middle",
              align: l,
              font: o,
              fill: s,
              opacity: m === "outOfRange" ? 0.5 : 1
            }
          }));
        }
        n.add(v);
      }, this), f && this._renderEndsText(n, f[1], u, d, l), ef(r.get("orient"), n, r.get("itemGap")), this.renderBackground(n), this.positionGroup(n);
    }, e.prototype._enableHoverLink = function(n, r) {
      var i = this;
      n.on("mouseover", function() {
        return a("highlight");
      }).on("mouseout", function() {
        return a("downplay");
      });
      var a = function(o) {
        var s = i.visualMapModel;
        s.option.hoverLink && i.api.dispatchAction({
          type: o,
          batch: K_(s.findTargetDataIndices(r), s)
        });
      };
    }, e.prototype._getItemAlign = function() {
      var n = this.visualMapModel, r = n.option;
      if (r.orient === "vertical")
        return uie(n, this.api, n.itemSize);
      var i = r.align;
      return (!i || i === "auto") && (i = "left"), i;
    }, e.prototype._renderEndsText = function(n, r, i, a, o) {
      if (r) {
        var s = new Ve(), l = this.visualMapModel.textStyleModel;
        s.add(new gt({
          style: Zt(l, {
            x: a ? o === "right" ? i[0] : 0 : i[0] / 2,
            y: i[1] / 2,
            verticalAlign: "middle",
            align: a ? o : "center",
            text: r
          })
        })), n.add(s);
      }
    }, e.prototype._getViewData = function() {
      var n = this.visualMapModel, r = ce(n.getPieceList(), function(s, l) {
        return {
          piece: s,
          indexInModelPieceList: l
        };
      }), i = n.get("text"), a = n.get("orient"), o = n.get("inverse");
      return (a === "horizontal" ? o : !o) ? r.reverse() : i && (i = i.slice().reverse()), {
        viewPieceList: r,
        endsText: i
      };
    }, e.prototype._createItemSymbol = function(n, r, i) {
      n.add($n(
        // symbol will be string
        this.getControllerVisual(r, "symbol"),
        i[0],
        i[1],
        i[2],
        i[3],
        // color will be string
        this.getControllerVisual(r, "color")
      ));
    }, e.prototype._onItemClick = function(n) {
      var r = this.visualMapModel, i = r.option, a = i.selectedMode;
      if (a) {
        var o = Le(i.selected), s = r.getSelectedMapKey(n);
        a === "single" || a === !0 ? (o[s] = !0, k(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;
  }(lie)
);
function die(t) {
  t.registerComponentModel(_je), t.registerComponentView(Sje), cie(t);
}
function xje(t) {
  at(fie), at(die);
}
var wje = {
  label: {
    enabled: !0
  },
  decal: {
    show: !1
  }
}, gQ = bt(), Cje = {};
function Tje(t, e) {
  var n = t.getModel("aria");
  if (!n.get("enabled"))
    return;
  var r = Le(wje);
  qe(r.label, t.getLocaleModel().get("aria"), !1), qe(n.option, r, !1), i(), a();
  function i() {
    var u = n.getModel("decal"), c = u.get("show");
    if (c) {
      var f = Pe();
      t.eachSeries(function(d) {
        if (!d.isColorBySeries()) {
          var h = f.get(d.type);
          h || (h = {}, f.set(d.type, h)), gQ(d).scope = h;
        }
      }), t.eachRawSeries(function(d) {
        if (t.isSeriesFiltered(d))
          return;
        if (Me(d.enableAriaDecal)) {
          d.enableAriaDecal();
          return;
        }
        var h = d.getData();
        if (d.isColorBySeries()) {
          var y = QA(d.ecModel, d.name, Cje, t.getSeriesCount()), b = h.getVisual("decal");
          h.setVisual("decal", _(b, y));
        } else {
          var p = d.getRawData(), v = {}, g = gQ(d).scope;
          h.each(function(O) {
            var S = h.getRawIndex(O);
            v[S] = O;
          });
          var m = p.count();
          p.each(function(O) {
            var S = v[O], x = p.getName(O) || O + "", C = QA(d.ecModel, x, g, m), T = h.getItemVisual(S, "decal");
            h.setItemVisual(S, "decal", _(T, C));
          });
        }
        function _(O, S) {
          var x = O ? le(le({}, S), O) : S;
          return x.dirty = !0, x;
        }
      });
    }
  }
  function a() {
    var u = e.getZr().dom;
    if (u) {
      var c = t.getLocaleModel().get("aria"), f = n.getModel("label");
      if (f.option = Re(f.option, c), !!f.get("enabled")) {
        if (f.get("description")) {
          u.setAttribute("aria-label", f.get("description"));
          return;
        }
        var d = t.getSeriesCount(), h = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, v = Math.min(d, p), g;
        if (!(d < 1)) {
          var m = s();
          if (m) {
            var y = f.get(["general", "withTitle"]);
            g = o(y, {
              title: m
            });
          } else
            g = f.get(["general", "withoutTitle"]);
          var b = [], _ = d > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
          g += o(_, {
            seriesCount: d
          }), t.eachSeries(function(C, T) {
            if (T < v) {
              var w = void 0, P = C.get("name"), $ = P ? "withName" : "withoutName";
              w = d > 1 ? f.get(["series", "multiple", $]) : f.get(["series", "single", $]), w = o(w, {
                seriesId: C.seriesIndex,
                seriesName: C.get("name"),
                seriesType: l(C.subType)
              });
              var A = C.getData();
              if (A.count() > h) {
                var D = f.get(["data", "partialData"]);
                w += o(D, {
                  displayCnt: h
                });
              } else
                w += f.get(["data", "allData"]);
              for (var E = f.get(["data", "separator", "middle"]), R = f.get(["data", "separator", "end"]), N = [], V = 0; V < A.count(); V++)
                if (V < h) {
                  var z = A.getName(V), W = A.getValues(V), F = f.get(["data", z ? "withName" : "withoutName"]);
                  N.push(o(F, {
                    name: z,
                    value: W.join(E)
                  }));
                }
              w += N.join(E) + R, b.push(w);
            }
          });
          var O = f.getModel(["series", "multiple", "separator"]), S = O.get("middle"), x = O.get("end");
          g += b.join(S) + x, u.setAttribute("aria-label", g);
        }
      }
    }
  }
  function o(u, c) {
    if (!Oe(u))
      return u;
    var f = u;
    return k(c, function(d, h) {
      f = f.replace(new RegExp("\\{\\s*" + h + "\\s*\\}", "g"), d);
    }), f;
  }
  function s() {
    var u = t.get("title");
    return u && u.length && (u = u[0]), u && u.text;
  }
  function l(u) {
    var c = t.getLocaleModel().get(["series", "typeNames"]);
    return c[u] || c.chart;
  }
}
function Pje(t) {
  if (!(!t || !t.aria)) {
    var e = t.aria;
    e.show != null && (e.enabled = e.show), e.label = e.label || {}, k(["description", "general", "series", "data"], function(n) {
      e[n] != null && (e.label[n] = e[n]);
    });
  }
}
function $je(t) {
  t.registerPreprocessor(Pje), t.registerVisual(t.PRIORITY.VISUAL.ARIA, Tje);
}
var mQ = {
  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',
}, Aje = (
  /** @class */
  function() {
    function t(e) {
      var n = this._condVal = Oe(e) ? new RegExp(e) : yR(e) ? e : null;
      if (n == null) {
        var r = "";
        process.env.NODE_ENV !== "production" && (r = ti("Illegal regexp", e, "in")), Et(r);
      }
    }
    return t.prototype.evaluate = function(e) {
      var n = typeof e;
      return Oe(n) ? this._condVal.test(e) : St(n) ? this._condVal.test(e + "") : !1;
    }, t;
  }()
), Eje = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      return this.value;
    }, t;
  }()
), Mje = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = this.children, n = 0; n < e.length; n++)
        if (!e[n].evaluate())
          return !1;
      return !0;
    }, t;
  }()
), Ije = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = this.children, n = 0; n < e.length; n++)
        if (e[n].evaluate())
          return !0;
      return !1;
    }, t;
  }()
), Dje = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      return !this.child.evaluate();
    }, t;
  }()
), Rje = (
  /** @class */
  function() {
    function t() {
    }
    return t.prototype.evaluate = function() {
      for (var e = !!this.valueParser, n = this.getValue, r = n(this.valueGetterParam), i = e ? this.valueParser(r) : null, a = 0; a < this.subCondList.length; a++)
        if (!this.subCondList[a].evaluate(e ? i : r))
          return !1;
      return !0;
    }, t;
  }()
);
function ML(t, e) {
  if (t === !0 || t === !1) {
    var n = new Eje();
    return n.value = t, n;
  }
  var r = "";
  return hie(t) || (process.env.NODE_ENV !== "production" && (r = ti("Illegal config. Expect a plain object but actually", t)), Et(r)), t.and ? yQ("and", t, e) : t.or ? yQ("or", t, e) : t.not ? kje(t, e) : Lje(t, e);
}
function yQ(t, e, n) {
  var r = e[t], i = "";
  process.env.NODE_ENV !== "production" && (i = ti('"and"/"or" condition should only be `' + t + ": [...]` and must not be empty array.", "Illegal condition:", e)), ue(r) || Et(i), r.length || Et(i);
  var a = t === "and" ? new Mje() : new Ije();
  return a.children = ce(r, function(o) {
    return ML(o, n);
  }), a.children.length || Et(i), a;
}
function kje(t, e) {
  var n = t.not, r = "";
  process.env.NODE_ENV !== "production" && (r = ti('"not" condition should only be `not: {}`.', "Illegal condition:", t)), hie(n) || Et(r);
  var i = new Dje();
  return i.child = ML(n, e), i.child || Et(r), i;
}
function Lje(t, e) {
  for (var n = "", r = e.prepareGetValue(t), i = [], a = st(t), o = t.parser, s = o ? HJ(o) : null, l = 0; l < a.length; l++) {
    var u = a[l];
    if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
      var c = Ce(mQ, u) ? mQ[u] : u, f = t[u], d = s ? s(f) : f, h = o4e(c, d) || c === "reg" && new Aje(d);
      h || (process.env.NODE_ENV !== "production" && (n = ti('Illegal relational operation: "' + u + '" in condition:', t)), Et(n)), i.push(h);
    }
  }
  i.length || (process.env.NODE_ENV !== "production" && (n = ti("Relational condition must have at least one operator.", "Illegal condition:", t)), Et(n));
  var p = new Rje();
  return p.valueGetterParam = r, p.valueParser = s, p.getValue = e.getValue, p.subCondList = i, p;
}
function hie(t) {
  return Ie(t) && !wr(t);
}
var Nje = (
  /** @class */
  function() {
    function t(e, n) {
      this._cond = ML(e, n);
    }
    return t.prototype.evaluate = function() {
      return this._cond.evaluate();
    }, t;
  }()
);
function Bje(t, e) {
  return new Nje(t, e);
}
var zje = {
  type: "echarts:filter",
  // PENDING: enhance to filter by index rather than create new data
  transform: function(t) {
    for (var e = t.upstream, n, r = Bje(t.config, {
      valueGetterAttrMap: Pe({
        dimension: !0
      }),
      prepareGetValue: function(s) {
        var l = "", u = s.dimension;
        Ce(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = ti('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Et(l));
        var c = e.getDimensionInfo(u);
        return c || (process.env.NODE_ENV !== "production" && (l = ti("Can not find dimension info via: " + u + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal condition:", s, `.
`)), Et(l)), {
          dimIdx: c.index
        };
      },
      getValue: function(s) {
        return e.retrieveValueFromItem(n, s.dimIdx);
      }
    }), i = [], a = 0, o = e.count(); a < o; a++)
      n = e.getRawDataItem(a), r.evaluate() && i.push(n);
    return {
      data: i
    };
  }
}, QE = "";
process.env.NODE_ENV !== "production" && (QE = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
var Vje = {
  type: "echarts:sort",
  transform: function(t) {
    var e = t.upstream, n = t.config, r = "", i = Qt(n);
    i.length || (process.env.NODE_ENV !== "production" && (r = "Empty `config` in sort transform."), Et(r));
    var a = [];
    k(i, function(c) {
      var f = c.dimension, d = c.order, h = c.parser, p = c.incomparable;
      if (f == null && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "dimension" specified.' + QE), Et(r)), d !== "asc" && d !== "desc" && (process.env.NODE_ENV !== "production" && (r = 'Sort transform config must has "order" specified.' + QE), Et(r)), p && p !== "min" && p !== "max") {
        var v = "";
        process.env.NODE_ENV !== "production" && (v = 'incomparable must be "min" or "max" rather than "' + p + '".'), Et(v);
      }
      if (d !== "asc" && d !== "desc") {
        var g = "";
        process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + d + '".'), Et(g);
      }
      var m = e.getDimensionInfo(f);
      m || (process.env.NODE_ENV !== "production" && (r = ti("Can not find dimension info via: " + f + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal config:", c, `.
`)), Et(r));
      var y = h ? HJ(h) : null;
      h && !y && (process.env.NODE_ENV !== "production" && (r = ti("Invalid parser name " + h + `.
`, "Illegal config:", c, `.
`)), Et(r)), a.push({
        dimIdx: m.index,
        parser: y,
        comparator: new jJ(d, p)
      });
    });
    var o = e.sourceFormat;
    o !== Br && o !== Na && (process.env.NODE_ENV !== "production" && (r = 'sourceFormat "' + o + '" is not supported yet'), Et(r));
    for (var s = [], l = 0, u = e.count(); l < u; l++)
      s.push(e.getRawDataItem(l));
    return s.sort(function(c, f) {
      for (var d = 0; d < a.length; d++) {
        var h = a[d], p = e.retrieveValueFromItem(c, h.dimIdx), v = e.retrieveValueFromItem(f, h.dimIdx);
        h.parser && (p = h.parser(p), v = h.parser(v));
        var g = h.comparator.evaluate(p, v);
        if (g !== 0)
          return g;
      }
      return 0;
    }), {
      data: s
    };
  }
};
function Fje(t) {
  t.registerTransform(zje), t.registerTransform(Vje);
}
var Wje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataset", n;
    }
    return e.prototype.init = function(n, r, i) {
      t.prototype.init.call(this, n, r, i), this._sourceManager = new YJ(this), yz(this);
    }, e.prototype.mergeOption = function(n, r) {
      t.prototype.mergeOption.call(this, n, r), yz(this);
    }, e.prototype.optionUpdated = function() {
      this._sourceManager.dirty();
    }, e.prototype.getSourceManager = function() {
      return this._sourceManager;
    }, e.type = "dataset", e.defaultOption = {
      seriesLayoutBy: Xo
    }, e;
  }(rt)
), Qje = (
  /** @class */
  function(t) {
    q(e, t);
    function e() {
      var n = t !== null && t.apply(this, arguments) || this;
      return n.type = "dataset", n;
    }
    return e.type = "dataset", e;
  }(Xt)
);
function Hje(t) {
  t.registerComponentModel(Wje), t.registerComponentView(Qje);
}
var xo = as.CMD;
function Wd(t, e) {
  return Math.abs(t - e) < 1e-5;
}
function HE(t) {
  var e = t.data, n = t.len(), r = [], i, a = 0, o = 0, s = 0, l = 0;
  function u(A, D) {
    i && i.length > 2 && r.push(i), i = [A, D];
  }
  function c(A, D, E, R) {
    Wd(A, E) && Wd(D, R) || i.push(A, D, E, R, E, R);
  }
  function f(A, D, E, R, N, V) {
    var z = Math.abs(D - A), W = Math.tan(z / 4) * 4 / 3, F = D < A ? -1 : 1, Q = Math.cos(A), Z = Math.sin(A), ne = Math.cos(D), ee = Math.sin(D), oe = Q * N + E, K = Z * V + R, ie = ne * N + E, X = ee * V + R, H = N * W * F, G = V * W * F;
    i.push(oe - H * Z, K + G * Q, ie + H * ee, X - G * ne, ie, X);
  }
  for (var d, h, p, v, g = 0; g < n; ) {
    var m = e[g++], y = g === 1;
    switch (y && (a = e[g], o = e[g + 1], s = a, l = o, (m === xo.L || m === xo.C || m === xo.Q) && (i = [s, l])), m) {
      case xo.M:
        a = s = e[g++], o = l = e[g++], u(s, l);
        break;
      case xo.L:
        d = e[g++], h = e[g++], c(a, o, d, h), a = d, o = h;
        break;
      case xo.C:
        i.push(e[g++], e[g++], e[g++], e[g++], a = e[g++], o = e[g++]);
        break;
      case xo.Q:
        d = e[g++], h = e[g++], p = e[g++], v = e[g++], i.push(a + 2 / 3 * (d - a), o + 2 / 3 * (h - o), p + 2 / 3 * (d - p), v + 2 / 3 * (h - v), p, v), a = p, o = v;
        break;
      case xo.A:
        var b = e[g++], _ = e[g++], O = e[g++], S = e[g++], x = e[g++], C = e[g++] + x;
        g += 1;
        var T = !e[g++];
        d = Math.cos(x) * O + b, h = Math.sin(x) * S + _, y ? (s = d, l = h, u(s, l)) : c(a, o, d, h), a = Math.cos(C) * O + b, o = Math.sin(C) * S + _;
        for (var w = (T ? -1 : 1) * Math.PI / 2, P = x; T ? P > C : P < C; P += w) {
          var $ = T ? Math.max(P + w, C) : Math.min(P + w, C);
          f(P, $, b, _, O, S);
        }
        break;
      case xo.R:
        s = a = e[g++], l = o = e[g++], d = s + e[g++], h = l + e[g++], u(d, l), c(d, l, d, h), c(d, h, s, h), c(s, h, s, l), c(s, l, d, l);
        break;
      case xo.Z:
        i && c(a, o, s, l), a = s, o = l;
        break;
    }
  }
  return i && i.length > 2 && r.push(i), r;
}
function GE(t, e, n, r, i, a, o, s, l, u) {
  if (Wd(t, n) && Wd(e, r) && Wd(i, o) && Wd(a, s)) {
    l.push(o, s);
    return;
  }
  var c = 2 / u, f = c * c, d = o - t, h = s - e, p = Math.sqrt(d * d + h * h);
  d /= p, h /= p;
  var v = n - t, g = r - e, m = i - o, y = a - s, b = v * v + g * g, _ = m * m + y * y;
  if (b < f && _ < f) {
    l.push(o, s);
    return;
  }
  var O = d * v + h * g, S = -d * m - h * y, x = b - O * O, C = _ - S * S;
  if (x < f && O >= 0 && C < f && S >= 0) {
    l.push(o, s);
    return;
  }
  var T = [], w = [];
  su(t, n, i, o, 0.5, T), su(e, r, a, s, 0.5, w), GE(T[0], w[0], T[1], w[1], T[2], w[2], T[3], w[3], l, u), GE(T[4], w[4], T[5], w[5], T[6], w[6], T[7], w[7], l, u);
}
function Gje(t, e) {
  var n = HE(t), r = [];
  e = e || 1;
  for (var i = 0; i < n.length; i++) {
    var a = n[i], o = [], s = a[0], l = a[1];
    o.push(s, l);
    for (var u = 2; u < a.length; ) {
      var c = a[u++], f = a[u++], d = a[u++], h = a[u++], p = a[u++], v = a[u++];
      GE(s, l, c, f, d, h, p, v, o, e), s = p, l = v;
    }
    r.push(o);
  }
  return r;
}
function pie(t, e, n) {
  var r = t[e], i = t[1 - e], a = Math.abs(r / i), o = Math.ceil(Math.sqrt(a * n)), s = Math.floor(n / o);
  s === 0 && (s = 1, o = n);
  for (var l = [], u = 0; u < o; u++)
    l.push(s);
  var c = o * s, f = n - c;
  if (f > 0)
    for (var u = 0; u < f; u++)
      l[u % o] += 1;
  return l;
}
function bQ(t, e, n) {
  for (var r = t.r0, i = t.r, a = t.startAngle, o = t.endAngle, s = Math.abs(o - a), l = s * i, u = i - r, c = l > Math.abs(u), f = pie([l, u], c ? 0 : 1, e), d = (c ? s : u) / f.length, h = 0; h < f.length; h++)
    for (var p = (c ? u : s) / f[h], v = 0; v < f[h]; v++) {
      var g = {};
      c ? (g.startAngle = a + d * h, g.endAngle = a + d * (h + 1), g.r0 = r + p * v, g.r = r + p * (v + 1)) : (g.startAngle = a + p * v, g.endAngle = a + p * (v + 1), g.r0 = r + d * h, g.r = r + d * (h + 1)), g.clockwise = t.clockwise, g.cx = t.cx, g.cy = t.cy, n.push(g);
    }
}
function jje(t, e, n) {
  for (var r = t.width, i = t.height, a = r > i, o = pie([r, i], a ? 0 : 1, e), s = a ? "width" : "height", l = a ? "height" : "width", u = a ? "x" : "y", c = a ? "y" : "x", f = t[s] / o.length, d = 0; d < o.length; d++)
    for (var h = t[l] / o[d], p = 0; p < o[d]; p++) {
      var v = {};
      v[u] = d * f, v[c] = p * h, v[s] = f, v[l] = h, v.x += t.x, v.y += t.y, n.push(v);
    }
}
function _Q(t, e, n, r) {
  return t * r - n * e;
}
function Zje(t, e, n, r, i, a, o, s) {
  var l = n - t, u = r - e, c = o - i, f = s - a, d = _Q(c, f, l, u);
  if (Math.abs(d) < 1e-6)
    return null;
  var h = t - i, p = e - a, v = _Q(h, p, c, f) / d;
  return v < 0 || v > 1 ? null : new Ke(v * l + t, v * u + e);
}
function Uje(t, e, n) {
  var r = new Ke();
  Ke.sub(r, n, e), r.normalize();
  var i = new Ke();
  Ke.sub(i, t, e);
  var a = i.dot(r);
  return a;
}
function Od(t, e) {
  var n = t[t.length - 1];
  n && n[0] === e[0] && n[1] === e[1] || t.push(e);
}
function Xje(t, e, n) {
  for (var r = t.length, i = [], a = 0; a < r; a++) {
    var o = t[a], s = t[(a + 1) % r], l = Zje(o[0], o[1], s[0], s[1], e.x, e.y, n.x, n.y);
    l && i.push({
      projPt: Uje(l, e, n),
      pt: l,
      idx: a
    });
  }
  if (i.length < 2)
    return [{ points: t }, { points: t }];
  i.sort(function(g, m) {
    return g.projPt - m.projPt;
  });
  var u = i[0], c = i[i.length - 1];
  if (c.idx < u.idx) {
    var f = u;
    u = c, c = f;
  }
  for (var d = [u.pt.x, u.pt.y], h = [c.pt.x, c.pt.y], p = [d], v = [h], a = u.idx + 1; a <= c.idx; a++)
    Od(p, t[a].slice());
  Od(p, h), Od(p, d);
  for (var a = c.idx + 1; a <= u.idx + r; a++)
    Od(v, t[a % r].slice());
  return Od(v, d), Od(v, h), [{
    points: p
  }, {
    points: v
  }];
}
function OQ(t) {
  var e = t.points, n = [], r = [];
  jx(e, n, r);
  var i = new Je(n[0], n[1], r[0] - n[0], r[1] - n[1]), a = i.width, o = i.height, s = i.x, l = i.y, u = new Ke(), c = new Ke();
  return a > o ? (u.x = c.x = s + a / 2, u.y = l, c.y = l + o) : (u.y = c.y = l + o / 2, u.x = s, c.x = s + a), Xje(e, u, c);
}
function jO(t, e, n, r) {
  if (n === 1)
    r.push(e);
  else {
    var i = Math.floor(n / 2), a = t(e);
    jO(t, a[0], i, r), jO(t, a[1], n - i, r);
  }
  return r;
}
function Yje(t, e) {
  for (var n = [], r = 0; r < e; r++)
    n.push(zR(t));
  return n;
}
function qje(t, e) {
  e.setStyle(t.style), e.z = t.z, e.z2 = t.z2, e.zlevel = t.zlevel;
}
function Kje(t) {
  for (var e = [], n = 0; n < t.length; )
    e.push([t[n++], t[n++]]);
  return e;
}
function Jje(t, e) {
  var n = [], r = t.shape, i;
  switch (t.type) {
    case "rect":
      jje(r, e, n), i = mt;
      break;
    case "sector":
      bQ(r, e, n), i = ri;
      break;
    case "circle":
      bQ({
        r0: 0,
        r: r.r,
        startAngle: 0,
        endAngle: Math.PI * 2,
        cx: r.cx,
        cy: r.cy
      }, e, n), i = ri;
      break;
    default:
      var a = t.getComputedTransform(), o = a ? Math.sqrt(Math.max(a[0] * a[0] + a[1] * a[1], a[2] * a[2] + a[3] * a[3])) : 1, s = ce(Gje(t.getUpdatedPathProxy(), o), function(m) {
        return Kje(m);
      }), l = s.length;
      if (l === 0)
        jO(OQ, {
          points: s[0]
        }, e, n);
      else if (l === e)
        for (var u = 0; u < l; u++)
          n.push({
            points: s[u]
          });
      else {
        var c = 0, f = ce(s, function(m) {
          var y = [], b = [];
          jx(m, y, b);
          var _ = (b[1] - y[1]) * (b[0] - y[0]);
          return c += _, { poly: m, area: _ };
        });
        f.sort(function(m, y) {
          return y.area - m.area;
        });
        for (var d = e, u = 0; u < l; u++) {
          var h = f[u];
          if (d <= 0)
            break;
          var p = u === l - 1 ? d : Math.ceil(h.area / c * e);
          p < 0 || (jO(OQ, {
            points: h.poly
          }, p, n), d -= p);
        }
      }
      i = ii;
      break;
  }
  if (!i)
    return Yje(t, e);
  for (var v = [], u = 0; u < n.length; u++) {
    var g = new i();
    g.setShape(n[u]), qje(t, g), v.push(g);
  }
  return v;
}
function eZe(t, e) {
  var n = t.length, r = e.length;
  if (n === r)
    return [t, e];
  for (var i = [], a = [], o = n < r ? t : e, s = Math.min(n, r), l = Math.abs(r - n) / 6, u = (s - 2) / 6, c = Math.ceil(l / u) + 1, f = [o[0], o[1]], d = l, h = 2; h < s; ) {
    var p = o[h - 2], v = o[h - 1], g = o[h++], m = o[h++], y = o[h++], b = o[h++], _ = o[h++], O = o[h++];
    if (d <= 0) {
      f.push(g, m, y, b, _, O);
      continue;
    }
    for (var S = Math.min(d, c - 1) + 1, x = 1; x <= S; x++) {
      var C = x / S;
      su(p, g, y, _, C, i), su(v, m, b, O, C, a), p = i[3], v = a[3], f.push(i[1], a[1], i[2], a[2], p, v), g = i[5], m = a[5], y = i[6], b = a[6];
    }
    d -= S - 1;
  }
  return o === t ? [f, e] : [t, f];
}
function SQ(t, e) {
  for (var n = t.length, r = t[n - 2], i = t[n - 1], a = [], o = 0; o < e.length; )
    a[o++] = r, a[o++] = i;
  return a;
}
function tZe(t, e) {
  for (var n, r, i, a = [], o = [], s = 0; s < Math.max(t.length, e.length); s++) {
    var l = t[s], u = e[s], c = void 0, f = void 0;
    l ? u ? (n = eZe(l, u), c = n[0], f = n[1], r = c, i = f) : (f = SQ(i || l, l), c = l) : (c = SQ(r || u, u), f = u), a.push(c), o.push(f);
  }
  return [a, o];
}
function xQ(t) {
  for (var e = 0, n = 0, r = 0, i = t.length, a = 0, o = i - 2; a < i; o = a, a += 2) {
    var s = t[o], l = t[o + 1], u = t[a], c = t[a + 1], f = s * c - u * l;
    e += f, n += (s + u) * f, r += (l + c) * f;
  }
  return e === 0 ? [t[0] || 0, t[1] || 0] : [n / e / 3, r / e / 3, e];
}
function nZe(t, e, n, r) {
  for (var i = (t.length - 2) / 6, a = 1 / 0, o = 0, s = t.length, l = s - 2, u = 0; u < i; u++) {
    for (var c = u * 6, f = 0, d = 0; d < s; d += 2) {
      var h = d === 0 ? c : (c + d - 2) % l + 2, p = t[h] - n[0], v = t[h + 1] - n[1], g = e[d] - r[0], m = e[d + 1] - r[1], y = g - p, b = m - v;
      f += y * y + b * b;
    }
    f < a && (a = f, o = u);
  }
  return o;
}
function rZe(t) {
  for (var e = [], n = t.length, r = 0; r < n; r += 2)
    e[r] = t[n - r - 2], e[r + 1] = t[n - r - 1];
  return e;
}
function iZe(t, e, n, r) {
  for (var i = [], a, o = 0; o < t.length; o++) {
    var s = t[o], l = e[o], u = xQ(s), c = xQ(l);
    a == null && (a = u[2] < 0 != c[2] < 0);
    var f = [], d = [], h = 0, p = 1 / 0, v = [], g = s.length;
    a && (s = rZe(s));
    for (var m = nZe(s, l, u, c) * 6, y = g - 2, b = 0; b < y; b += 2) {
      var _ = (m + b) % y + 2;
      f[b + 2] = s[_] - u[0], f[b + 3] = s[_ + 1] - u[1];
    }
    f[0] = s[m] - u[0], f[1] = s[m + 1] - u[1];
    for (var O = r / n, S = -r / 2; S <= r / 2; S += O) {
      for (var x = Math.sin(S), C = Math.cos(S), T = 0, b = 0; b < s.length; b += 2) {
        var w = f[b], P = f[b + 1], $ = l[b] - c[0], A = l[b + 1] - c[1], D = $ * C - A * x, E = $ * x + A * C;
        v[b] = D, v[b + 1] = E;
        var R = D - w, N = E - P;
        T += R * R + N * N;
      }
      if (T < p) {
        p = T, h = S;
        for (var V = 0; V < v.length; V++)
          d[V] = v[V];
      }
    }
    i.push({
      from: f,
      to: d,
      fromCp: u,
      toCp: c,
      rotation: -h
    });
  }
  return i;
}
function ZO(t) {
  return t.__isCombineMorphing;
}
var vie = "__mOriginal_";
function UO(t, e, n) {
  var r = vie + e, i = t[r] || t[e];
  t[r] || (t[r] = t[e]);
  var a = n.replace, o = n.after, s = n.before;
  t[e] = function() {
    var l = arguments, u;
    return s && s.apply(this, l), a ? u = a.apply(this, l) : u = i.apply(this, l), o && o.apply(this, l), u;
  };
}
function Ng(t, e) {
  var n = vie + e;
  t[n] && (t[e] = t[n], t[n] = null);
}
function wQ(t, e) {
  for (var n = 0; n < t.length; n++)
    for (var r = t[n], i = 0; i < r.length; ) {
      var a = r[i], o = r[i + 1];
      r[i++] = e[0] * a + e[2] * o + e[4], r[i++] = e[1] * a + e[3] * o + e[5];
    }
}
function gie(t, e) {
  var n = t.getUpdatedPathProxy(), r = e.getUpdatedPathProxy(), i = tZe(HE(n), HE(r)), a = i[0], o = i[1], s = t.getComputedTransform(), l = e.getComputedTransform();
  function u() {
    this.transform = null;
  }
  s && wQ(a, s), l && wQ(o, l), UO(e, "updateTransform", { replace: u }), e.transform = null;
  var c = iZe(a, o, 10, Math.PI), f = [];
  UO(e, "buildPath", { replace: function(d) {
    for (var h = e.__morphT, p = 1 - h, v = [], g = 0; g < c.length; g++) {
      var m = c[g], y = m.from, b = m.to, _ = m.rotation * h, O = m.fromCp, S = m.toCp, x = Math.sin(_), C = Math.cos(_);
      xg(v, O, S, h);
      for (var T = 0; T < y.length; T += 2) {
        var w = y[T], P = y[T + 1], $ = b[T], A = b[T + 1], D = w * p + $ * h, E = P * p + A * h;
        f[T] = D * C - E * x + v[0], f[T + 1] = D * x + E * C + v[1];
      }
      var R = f[0], N = f[1];
      d.moveTo(R, N);
      for (var T = 2; T < y.length; ) {
        var $ = f[T++], A = f[T++], V = f[T++], z = f[T++], W = f[T++], F = f[T++];
        R === $ && N === A && V === W && z === F ? d.lineTo(W, F) : d.bezierCurveTo($, A, V, z, W, F), R = W, N = F;
      }
    }
  } });
}
function IL(t, e, n) {
  if (!t || !e)
    return e;
  var r = n.done, i = n.during;
  gie(t, e), e.__morphT = 0;
  function a() {
    Ng(e, "buildPath"), Ng(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
  }
  return e.animateTo({
    __morphT: 1
  }, Re({
    during: function(o) {
      e.dirtyShape(), i && i(o);
    },
    done: function() {
      a(), r && r();
    }
  }, n)), e;
}
function aZe(t, e, n, r, i, a) {
  var o = 16;
  t = i === n ? 0 : Math.round(32767 * (t - n) / (i - n)), e = a === r ? 0 : Math.round(32767 * (e - r) / (a - r));
  for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
    var c = 0, f = 0;
    (t & u) > 0 && (c = 1), (e & u) > 0 && (f = 1), s += u * u * (3 * c ^ f), f === 0 && (c === 1 && (t = u - 1 - t, e = u - 1 - e), l = t, t = e, e = l);
  }
  return s;
}
function XO(t) {
  var e = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0, a = ce(t, function(s) {
    var l = s.getBoundingRect(), u = s.getComputedTransform(), c = l.x + l.width / 2 + (u ? u[4] : 0), f = l.y + l.height / 2 + (u ? u[5] : 0);
    return e = Math.min(c, e), n = Math.min(f, n), r = Math.max(c, r), i = Math.max(f, i), [c, f];
  }), o = ce(a, function(s, l) {
    return {
      cp: s,
      z: aZe(s[0], s[1], e, n, r, i),
      path: t[l]
    };
  });
  return o.sort(function(s, l) {
    return s.z - l.z;
  }).map(function(s) {
    return s.path;
  });
}
function mie(t) {
  return Jje(t.path, t.count);
}
function jE() {
  return {
    fromIndividuals: [],
    toIndividuals: [],
    count: 0
  };
}
function oZe(t, e, n) {
  var r = [];
  function i(O) {
    for (var S = 0; S < O.length; S++) {
      var x = O[S];
      ZO(x) ? i(x.childrenRef()) : x instanceof ot && r.push(x);
    }
  }
  i(t);
  var a = r.length;
  if (!a)
    return jE();
  var o = n.dividePath || mie, s = o({
    path: e,
    count: a
  });
  if (s.length !== a)
    return console.error("Invalid morphing: unmatched splitted path"), jE();
  r = XO(r), s = XO(s);
  for (var l = n.done, u = n.during, c = n.individualDelay, f = new As(), d = 0; d < a; d++) {
    var h = r[d], p = s[d];
    p.parent = e, p.copyTransform(f), c || gie(h, p);
  }
  e.__isCombineMorphing = !0, e.childrenRef = function() {
    return s;
  };
  function v(O) {
    for (var S = 0; S < s.length; S++)
      s[S].addSelfToZr(O);
  }
  UO(e, "addSelfToZr", {
    after: function(O) {
      v(O);
    }
  }), UO(e, "removeSelfFromZr", {
    after: function(O) {
      for (var S = 0; S < s.length; S++)
        s[S].removeSelfFromZr(O);
    }
  });
  function g() {
    e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, Ng(e, "addSelfToZr"), Ng(e, "removeSelfFromZr");
  }
  var m = s.length;
  if (c)
    for (var y = m, b = function() {
      y--, y === 0 && (g(), l && l());
    }, d = 0; d < m; d++) {
      var _ = c ? Re({
        delay: (n.delay || 0) + c(d, m, r[d], s[d]),
        done: b
      }, n) : n;
      IL(r[d], s[d], _);
    }
  else
    e.__morphT = 0, e.animateTo({
      __morphT: 1
    }, Re({
      during: function(O) {
        for (var S = 0; S < m; S++) {
          var x = s[S];
          x.__morphT = e.__morphT, x.dirtyShape();
        }
        u && u(O);
      },
      done: function() {
        g();
        for (var O = 0; O < t.length; O++)
          Ng(t[O], "updateTransform");
        l && l();
      }
    }, n));
  return e.__zr && v(e.__zr), {
    fromIndividuals: r,
    toIndividuals: s,
    count: m
  };
}
function sZe(t, e, n) {
  var r = e.length, i = [], a = n.dividePath || mie;
  function o(h) {
    for (var p = 0; p < h.length; p++) {
      var v = h[p];
      ZO(v) ? o(v.childrenRef()) : v instanceof ot && i.push(v);
    }
  }
  if (ZO(t)) {
    o(t.childrenRef());
    var s = i.length;
    if (s < r)
      for (var l = 0, u = s; u < r; u++)
        i.push(zR(i[l++ % s]));
    i.length = r;
  } else {
    i = a({ path: t, count: r });
    for (var c = t.getComputedTransform(), u = 0; u < i.length; u++)
      i[u].setLocalTransform(c);
    if (i.length !== r)
      return console.error("Invalid morphing: unmatched splitted path"), jE();
  }
  i = XO(i), e = XO(e);
  for (var f = n.individualDelay, u = 0; u < r; u++) {
    var d = f ? Re({
      delay: (n.delay || 0) + f(u, r, i[u], e[u])
    }, n) : n;
    IL(i[u], e[u], d);
  }
  return {
    fromIndividuals: i,
    toIndividuals: e,
    count: e.length
  };
}
function CQ(t) {
  return ue(t[0]);
}
function TQ(t, e) {
  for (var n = [], r = t.length, i = 0; i < r; i++)
    n.push({
      one: t[i],
      many: []
    });
  for (var i = 0; i < e.length; i++) {
    var a = e[i].length, o = void 0;
    for (o = 0; o < a; o++)
      n[o % r].many.push(e[i][o]);
  }
  for (var s = 0, i = r - 1; i >= 0; i--)
    if (!n[i].many.length) {
      var l = n[s].many;
      if (l.length <= 1)
        if (s)
          s = 0;
        else
          return n;
      var a = l.length, u = Math.ceil(a / 2);
      n[i].many = l.slice(u, a), n[s].many = l.slice(0, u), s++;
    }
  return n;
}
var lZe = {
  clone: function(t) {
    for (var e = [], n = 1 - Math.pow(1 - t.path.style.opacity, 1 / t.count), r = 0; r < t.count; r++) {
      var i = zR(t.path);
      i.setStyle("opacity", n), e.push(i);
    }
    return e;
  },
  // Use the default divider
  split: null
};
function s$(t, e, n, r, i, a) {
  if (!t.length || !e.length)
    return;
  var o = pp("update", r, i);
  if (!(o && o.duration > 0))
    return;
  var s = r.getModel("universalTransition").get("delay"), l = Object.assign({
    // Need to setToFinal so the further calculation based on the style can be correct.
    // Like emphasis color.
    setToFinal: !0
  }, o), u, c;
  CQ(t) && (u = t, c = e), CQ(e) && (u = e, c = t);
  function f(m, y, b, _, O) {
    var S = m.many, x = m.one;
    if (S.length === 1 && !O) {
      var C = y ? S[0] : x, T = y ? x : S[0];
      if (ZO(C))
        f({
          many: [C],
          one: T
        }, !0, b, _, !0);
      else {
        var w = s ? Re({
          delay: s(b, _)
        }, l) : l;
        IL(C, T, w), a(C, T, C, T, w);
      }
    } else
      for (var P = Re({
        dividePath: lZe[n],
        individualDelay: s && function(N, V, z, W) {
          return s(N + b, _);
        }
      }, l), $ = y ? oZe(S, x, P) : sZe(x, S, P), A = $.fromIndividuals, D = $.toIndividuals, E = A.length, R = 0; R < E; R++) {
        var w = s ? Re({
          delay: s(R, E)
        }, l) : l;
        a(A[R], D[R], y ? S[R] : m.one, y ? m.one : S[R], w);
      }
  }
  for (var d = u ? u === t : t.length > e.length, h = u ? TQ(c, u) : TQ(d ? e : t, [d ? t : e]), p = 0, v = 0; v < h.length; v++)
    p += h[v].many.length;
  for (var g = 0, v = 0; v < h.length; v++)
    f(h[v], d, g, p), g += h[v].many.length;
}
function mc(t) {
  if (!t)
    return [];
  if (ue(t)) {
    for (var e = [], n = 0; n < t.length; n++)
      e.push(mc(t[n]));
    return e;
  }
  var r = [];
  return t.traverse(function(i) {
    i instanceof ot && !i.disableMorphing && !i.invisible && !i.ignore && r.push(i);
  }), r;
}
var yie = 1e4, uZe = 0, PQ = 1, $Q = 2, cZe = bt();
function fZe(t, e) {
  for (var n = t.dimensions, r = 0; r < n.length; r++) {
    var i = t.getDimensionInfo(n[r]);
    if (i && i.otherDims[e] === 0)
      return n[r];
  }
}
function dZe(t, e, n) {
  var r = t.getDimensionInfo(n), i = r && r.ordinalMeta;
  if (r) {
    var a = t.get(r.name, e);
    return i && i.categories[a] || a + "";
  }
}
function AQ(t, e, n, r) {
  var i = r ? "itemChildGroupId" : "itemGroupId", a = fZe(t, i);
  if (a) {
    var o = dZe(t, e, a);
    return o;
  }
  var s = t.getRawDataItem(e), l = r ? "childGroupId" : "groupId";
  if (s && s[l])
    return s[l] + "";
  if (!r)
    return n || t.getId(e);
}
function EQ(t) {
  var e = [];
  return k(t, function(n) {
    var r = n.data, i = n.dataGroupId;
    if (r.count() > yie) {
      process.env.NODE_ENV !== "production" && dn("Universal transition is disabled on large data > 10k.");
      return;
    }
    for (var a = r.getIndices(), o = 0; o < a.length; o++)
      e.push({
        data: r,
        groupId: AQ(r, o, i, !1),
        childGroupId: AQ(r, o, i, !0),
        divide: n.divide,
        dataIndex: o
      });
  }), e;
}
function l$(t, e, n) {
  t.traverse(function(r) {
    r instanceof ot && Yt(r, {
      style: {
        opacity: 0
      }
    }, e, {
      dataIndex: n,
      isFrom: !0
    });
  });
}
function u$(t) {
  if (t.parent) {
    var e = t.getComputedTransform();
    t.setLocalTransform(e), t.parent.remove(t);
  }
}
function Sd(t) {
  t.stopAnimation(), t.isGroup && t.traverse(function(e) {
    e.stopAnimation();
  });
}
function hZe(t, e, n) {
  var r = pp("update", n, e);
  r && t.traverse(function(i) {
    if (i instanceof Ma) {
      var a = Wke(i);
      a && i.animateFrom({
        style: a
      }, r);
    }
  });
}
function pZe(t, e) {
  var n = t.length;
  if (n !== e.length)
    return !1;
  for (var r = 0; r < n; r++) {
    var i = t[r], a = e[r];
    if (i.data.getId(i.dataIndex) !== a.data.getId(a.dataIndex))
      return !1;
  }
  return !0;
}
function bie(t, e, n) {
  var r = EQ(t), i = EQ(e);
  function a(b, _, O, S, x) {
    (O || b) && _.animateFrom({
      style: O && O !== b ? le(le({}, O.style), b.style) : b.style
    }, x);
  }
  var o = !1, s = uZe, l = Pe(), u = Pe();
  r.forEach(function(b) {
    b.groupId && l.set(b.groupId, !0), b.childGroupId && u.set(b.childGroupId, !0);
  });
  for (var c = 0; c < i.length; c++) {
    var f = i[c].groupId;
    if (u.get(f)) {
      s = PQ;
      break;
    }
    var d = i[c].childGroupId;
    if (d && l.get(d)) {
      s = $Q;
      break;
    }
  }
  function h(b, _) {
    return function(O) {
      var S = O.data, x = O.dataIndex;
      return _ ? S.getId(x) : b ? s === PQ ? O.childGroupId : O.groupId : s === $Q ? O.childGroupId : O.groupId;
    };
  }
  var p = pZe(r, i), v = {};
  if (!p)
    for (var c = 0; c < i.length; c++) {
      var g = i[c], m = g.data.getItemGraphicEl(g.dataIndex);
      m && (v[m.id] = !0);
    }
  function y(b, _) {
    var O = r[_], S = i[b], x = S.data.hostModel, C = O.data.getItemGraphicEl(O.dataIndex), T = S.data.getItemGraphicEl(S.dataIndex);
    if (C === T) {
      T && hZe(T, S.dataIndex, x);
      return;
    }
    // We can't use the elements that already being morphed
    C && v[C.id] || T && (Sd(T), C ? (Sd(C), u$(C), o = !0, s$(mc(C), mc(T), S.divide, x, b, a)) : l$(T, x, b));
  }
  new Us(r, i, h(!0, p), h(!1, p), null, "multiple").update(y).updateManyToOne(function(b, _) {
    var O = i[b], S = O.data, x = S.hostModel, C = S.getItemGraphicEl(O.dataIndex), T = Nt(ce(_, function(w) {
      return r[w].data.getItemGraphicEl(r[w].dataIndex);
    }), function(w) {
      return w && w !== C && !v[w.id];
    });
    C && (Sd(C), T.length ? (k(T, function(w) {
      Sd(w), u$(w);
    }), o = !0, s$(mc(T), mc(C), O.divide, x, b, a)) : l$(C, x, O.dataIndex));
  }).updateOneToMany(function(b, _) {
    var O = r[_], S = O.data.getItemGraphicEl(O.dataIndex);
    if (!(S && v[S.id])) {
      var x = Nt(ce(b, function(T) {
        return i[T].data.getItemGraphicEl(i[T].dataIndex);
      }), function(T) {
        return T && T !== S;
      }), C = i[b[0]].data.hostModel;
      x.length && (k(x, function(T) {
        return Sd(T);
      }), S ? (Sd(S), u$(S), o = !0, s$(
        mc(S),
        mc(x),
        O.divide,
        // Use divide on old.
        C,
        b[0],
        a
      )) : k(x, function(T) {
        return l$(T, C, b[0]);
      }));
    }
  }).updateManyToMany(function(b, _) {
    new Us(_, b, function(O) {
      return r[O].data.getId(r[O].dataIndex);
    }, function(O) {
      return i[O].data.getId(i[O].dataIndex);
    }).update(function(O, S) {
      y(b[O], _[S]);
    }).execute();
  }).execute(), o && k(e, function(b) {
    var _ = b.data, O = _.hostModel, S = O && n.getViewOfSeriesModel(O), x = pp("update", O, 0);
    S && O.isAnimationEnabled() && x && x.duration > 0 && S.group.traverse(function(C) {
      C instanceof ot && !C.animators.length && C.animateFrom({
        style: {
          opacity: 0
        }
      }, x);
    });
  });
}
function MQ(t) {
  var e = t.getModel("universalTransition").get("seriesKey");
  return e || t.id;
}
function IQ(t) {
  return ue(t) ? t.sort().join(",") : t;
}
function Cl(t) {
  if (t.hostModel)
    return t.hostModel.getModel("universalTransition").get("divideShape");
}
function vZe(t, e) {
  var n = Pe(), r = Pe(), i = Pe();
  k(t.oldSeries, function(o, s) {
    var l = t.oldDataGroupIds[s], u = t.oldData[s], c = MQ(o), f = IQ(c);
    r.set(f, {
      dataGroupId: l,
      data: u
    }), ue(c) && k(c, function(d) {
      i.set(d, {
        key: f,
        dataGroupId: l,
        data: u
      });
    });
  });
  function a(o) {
    n.get(o) && dn("Duplicated seriesKey in universalTransition " + o);
  }
  return k(e.updatedSeries, function(o) {
    if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
      var s = o.get("dataGroupId"), l = o.getData(), u = MQ(o), c = IQ(u), f = r.get(c);
      if (f)
        process.env.NODE_ENV !== "production" && a(c), n.set(c, {
          oldSeries: [{
            dataGroupId: f.dataGroupId,
            divide: Cl(f.data),
            data: f.data
          }],
          newSeries: [{
            dataGroupId: s,
            divide: Cl(l),
            data: l
          }]
        });
      else if (ue(u)) {
        process.env.NODE_ENV !== "production" && a(c);
        var d = [];
        k(u, function(v) {
          var g = r.get(v);
          g.data && d.push({
            dataGroupId: g.dataGroupId,
            divide: Cl(g.data),
            data: g.data
          });
        }), d.length && n.set(c, {
          oldSeries: d,
          newSeries: [{
            dataGroupId: s,
            data: l,
            divide: Cl(l)
          }]
        });
      } else {
        var h = i.get(u);
        if (h) {
          var p = n.get(h.key);
          p || (p = {
            oldSeries: [{
              dataGroupId: h.dataGroupId,
              data: h.data,
              divide: Cl(h.data)
            }],
            newSeries: []
          }, n.set(h.key, p)), p.newSeries.push({
            dataGroupId: s,
            data: l,
            divide: Cl(l)
          });
        }
      }
    }
  }), n;
}
function DQ(t, e) {
  for (var n = 0; n < t.length; n++) {
    var r = e.seriesIndex != null && e.seriesIndex === t[n].seriesIndex || e.seriesId != null && e.seriesId === t[n].id;
    if (r)
      return n;
  }
}
function gZe(t, e, n, r) {
  var i = [], a = [];
  k(Qt(t.from), function(o) {
    var s = DQ(e.oldSeries, o);
    s >= 0 && i.push({
      dataGroupId: e.oldDataGroupIds[s],
      data: e.oldData[s],
      // TODO can specify divideShape in transition.
      divide: Cl(e.oldData[s]),
      groupIdDim: o.dimension
    });
  }), k(Qt(t.to), function(o) {
    var s = DQ(n.updatedSeries, o);
    if (s >= 0) {
      var l = n.updatedSeries[s].getData();
      a.push({
        dataGroupId: e.oldDataGroupIds[s],
        data: l,
        divide: Cl(l),
        groupIdDim: o.dimension
      });
    }
  }), i.length > 0 && a.length > 0 && bie(i, a, r);
}
function mZe(t) {
  t.registerUpdateLifecycle("series:beforeupdate", function(e, n, r) {
    k(Qt(r.seriesTransition), function(i) {
      k(Qt(i.to), function(a) {
        for (var o = r.updatedSeries, s = 0; s < o.length; s++)
          (a.seriesIndex != null && a.seriesIndex === o[s].seriesIndex || a.seriesId != null && a.seriesId === o[s].id) && (o[s][G_] = !0);
      });
    });
  }), t.registerUpdateLifecycle("series:transition", function(e, n, r) {
    var i = cZe(n);
    if (i.oldSeries && r.updatedSeries && r.optionChanged) {
      var a = r.seriesTransition;
      if (a)
        k(Qt(a), function(h) {
          gZe(h, i, r, n);
        });
      else {
        var o = vZe(i, r);
        k(o.keys(), function(h) {
          var p = o.get(h);
          bie(p.oldSeries, p.newSeries, n);
        });
      }
      k(r.updatedSeries, function(h) {
        h[G_] && (h[G_] = !1);
      });
    }
    for (var s = e.getSeries(), l = i.oldSeries = [], u = i.oldDataGroupIds = [], c = i.oldData = [], f = 0; f < s.length; f++) {
      var d = s[f].getData();
      d.count() < yie && (l.push(s[f]), u.push(s[f].get("dataGroupId")), c.push(d));
    }
  });
}
at([P3e]);
at([S3e]);
at([Z3e, l6e, y6e, q6e, lBe, UBe, Sze, aVe, PVe, DVe, WVe, LFe, sWe, yWe, RWe, BWe, UWe, t7e, d7e, y7e, $7e, cQe]);
at(AQe);
at(nHe);
at(gne);
at(vHe);
at(tre);
at(bHe);
at($He);
at(v9e);
at(R9e);
at(ey);
at(q9e);
at(eGe);
at(cGe);
at(mGe);
at(xGe);
at(AGe);
at(zGe);
at(rje);
at(aie);
at(oie);
at(xje);
at(fie);
at(die);
at($je);
at(Fje);
at(Hje);
at(mZe);
at(W5e);
const yZe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Axis: Ba,
  ChartView: zt,
  ComponentModel: rt,
  ComponentView: Xt,
  List: Lr,
  Model: Wt,
  PRIORITY: wee,
  SeriesModel: Ht,
  color: KIe,
  connect: U8e,
  dataTool: tNe,
  dependencies: M8e,
  disConnect: X8e,
  disconnect: Dee,
  dispose: Y8e,
  env: vt,
  extendChartView: A5e,
  extendComponentModel: T5e,
  extendComponentView: P5e,
  extendSeriesModel: $5e,
  format: p5e,
  getCoordinateSystemDimensions: K8e,
  getInstanceByDom: gk,
  getInstanceById: q8e,
  getMap: eNe,
  graphic: h5e,
  helper: a5e,
  init: Iee,
  innerDrawElementOnCanvas: dk,
  matrix: AIe,
  number: f5e,
  parseGeoJSON: iE,
  parseGeoJson: iE,
  registerAction: vo,
  registerCoordinateSystem: Lee,
  registerLayout: Nee,
  registerLoading: Ok,
  registerLocale: UR,
  registerMap: Bee,
  registerPostInit: Ree,
  registerPostUpdate: kee,
  registerPreprocessor: yk,
  registerProcessor: bk,
  registerTheme: mk,
  registerTransform: zee,
  registerUpdateLifecycle: fw,
  registerVisual: $u,
  setCanvasCreator: J8e,
  setPlatformAPI: Oq,
  throttle: uw,
  time: d5e,
  use: at,
  util: v5e,
  vector: vIe,
  version: E8e,
  zrUtil: lIe,
  zrender: RDe
}, Symbol.toStringTag, { value: "Module" }));
function bZe(t) {
  return jG() ? (f0(t), !0) : !1;
}
function YO(t) {
  return typeof t == "function" ? t() : B(t);
}
const _Ze = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const OZe = Object.prototype.toString, SZe = (t) => OZe.call(t) === "[object Object]", ZE = () => {
};
function xZe(t, e) {
  function n(...r) {
    return new Promise((i, a) => {
      Promise.resolve(t(() => e.apply(this, r), { fn: e, thisArg: this, args: r })).then(i).catch(a);
    });
  }
  return n;
}
function wZe(t, e = {}) {
  let n, r, i = ZE;
  const a = (s) => {
    clearTimeout(s), i(), i = ZE;
  };
  return (s) => {
    const l = YO(t), u = YO(e.maxWait);
    return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r && (a(r), r = null), Promise.resolve(s())) : new Promise((c, f) => {
      i = e.rejectOnCancel ? f : c, u && !r && (r = setTimeout(() => {
        n && a(n), r = null, c(s());
      }, u)), n = setTimeout(() => {
        r && a(r), r = null, c(s());
      }, l);
    });
  };
}
function CZe(t) {
  return vn();
}
function TZe(t, e = 200, n = {}) {
  return xZe(
    wZe(e, n),
    t
  );
}
function PZe(t, e) {
  CZe() && nl(t, e);
}
function $Ze(t) {
  var e;
  const n = YO(t);
  return (e = n == null ? void 0 : n.$el) != null ? e : n;
}
const AZe = _Ze ? window : void 0;
function EZe(...t) {
  let e, n, r, i;
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([n, r, i] = t, e = AZe) : [e, n, r, i] = t, !e)
    return ZE;
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
  const a = [], o = () => {
    a.forEach((c) => c()), a.length = 0;
  }, s = (c, f, d, h) => (c.addEventListener(f, d, h), () => c.removeEventListener(f, d, h)), l = se(
    () => [$Ze(e), YO(i)],
    ([c, f]) => {
      if (o(), !c)
        return;
      const d = SZe(f) ? { ...f } : f;
      a.push(
        ...n.flatMap((h) => r.map((p) => s(c, h, p, d)))
      );
    },
    { immediate: !0, flush: "post" }
  ), u = () => {
    l(), o();
  };
  return bZe(u), u;
}
function MZe(t, e = "default") {
  let n = null, r = s;
  const i = U({});
  let a;
  const o = L(() => i.value);
  r = TZe(s, 200);
  function s() {
    n == null || n.resize({
      animation: {
        duration: 300,
        easing: "quadraticIn"
      }
    });
  }
  function l(f = e) {
    const d = B(t);
    if (!d || !B(d))
      return;
    n = Iee(d, f), a = EZe(window, "resize", r);
  }
  function u(f, d = !1) {
    return i.value = f, new Promise((h) => {
      var p;
      ((p = B(t)) == null ? void 0 : p.offsetHeight) === 0 && setTimeout(() => {
        u(B(o)), h(null);
      }, 30), Tt(() => {
        setTimeout(() => {
          !n && (l("default"), !n) || (d && (n == null || n.clear()), n == null || n.setOption(B(o)), h(null));
        }, 30);
      });
    });
  }
  se(
    () => e,
    (f) => {
      n && (n.dispose(), l(f), u(i.value));
    }
  ), PZe(() => {
    n && (a(), n.dispose(), n = null);
  });
  function c() {
    return n || l("default"), n;
  }
  return {
    setOptions: u,
    resize: s,
    echarts: yZe,
    getInstance: c
  };
}
const DL = /* @__PURE__ */ te({
  __name: "Charts",
  props: {
    echartsOptions: {},
    width: {},
    height: {},
    loading: { type: Boolean }
  },
  setup(t) {
    const e = t, n = U(null), { setOptions: r, resize: i } = MZe(n), a = jg(ts, {
      style: {
        fontSize: "24px"
      }
    });
    return se(
      () => [e.width, e.height],
      Bbe(async () => {
        i();
      }, 200)
    ), se(
      () => e,
      async () => {
        await Tt();
        const { echartsOptions: o } = e;
        r(o);
      },
      {
        immediate: !0,
        deep: !0
      }
    ), (o, s) => (pe(), je(B(gg), {
      spinning: o.loading,
      indicator: B(a)
    }, {
      default: we(() => [
        He("div", {
          ref_key: "chartRef",
          ref: n,
          style: Sr({ width: o.width + "px", height: o.height + "px" })
        }, null, 4)
      ]),
      _: 1
    }, 8, ["spinning", "indicator"]));
  }
});
function RL(t) {
  return SU(t, xMe);
}
const kL = {
  type: Object,
  default: () => ({
    sourceType: Ri.STATIC,
    data: [],
    url: "",
    method: "GET",
    params: {},
    headers: {},
    refreshTime: 0,
    dataProcess: () => []
  })
}, IZe = (t, e) => new Promise((n, r) => {
  const i = new Blob([`
      self.onmessage = function(e) {
        self.postMessage((${t}).call(null, e.data));
      }
    `], { type: "application/javascript" }), a = new Worker(URL.createObjectURL(i));
  a.postMessage(JSON.parse(e)), a.onmessage = (o) => {
    a.terminate(), n(o.data);
  }, a.onerror = (o) => {
    a.terminate(), r(o);
  };
}), LL = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: kL,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // x轴数据
  xAxis: {
    type: Object
  },
  // y轴数据
  yAxis: {
    type: Object
  },
  // 折线
  series: {
    type: Array
  },
  // 数据集
  dataset: {
    type: Object
  }
}, _ie = [];
_ie.line = {
  lineStyle: {
    type: "solid",
    width: 1
  },
  symbol: "rect",
  symbolSize: 4,
  symbolRotate: 0,
  smooth: !1,
  step: !1
};
const DZe = RL({
  title: {
    text: "折线图标题"
  },
  xAxis: {
    data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  },
  series: _ie
}), RZe = {
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  props: {
    // 数据源
    dataSource: {
      sourceType: Ri.STATIC,
      data: {
        xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
        series: [
          {
            type: "line",
            name: "系列1",
            data: [89.3, 92.1, 94.4, 85.4]
          },
          {
            type: "line",
            name: "系列2",
            data: [95.8, 89.4, 91.2, 76.9]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/line",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;
          // x轴数据
          const xData = data.map((item) => item.name); 
          // 系列数据
          const series = [
            { type: 'line', name: '苹果', data: data.map(item => item.apple) },
            { type: 'line', name: 'VIVO', data: data.map(item => item.vivo) },
            { type: 'line', name: '小米', data: data.map(item => item.mi) },
          ];

          // 返回图表数据
          return { xData, series };
        }
      `
    },
    ...DZe
  }
}, Oie = (t, { manual: e, ready: n = !0, refreshDeps: r = [], refreshDepsAction: i }) => {
  const a = U(!1);
  return ht(() => {
    !e && t.options.refreshDeps !== !0 && (a.value = B(n));
  }), r instanceof Array ? se(
    [a, ...r],
    ([o]) => {
      o && !e && o && (i ? i() : t.refresh());
    },
    {
      deep: !0,
      immediate: !1
    }
  ) : se(a, (o) => {
    !e && o && (i ? i() : t.refresh());
  }), {
    name: "autoRunPlugin",
    onBefore: () => {
      if (!B(n))
        return {
          stopNow: !0
        };
    }
  };
};
Oie.onInit = ({ ready: t = !0, manual: e }) => ({
  loading: !e && B(t)
});
const J_ = /* @__PURE__ */ new Map(), kZe = (t, e, n) => {
  const r = J_.get(t);
  r != null && r.timer && clearTimeout(r.timer);
  let i;
  e > -1 && (i = setTimeout(() => {
    J_.delete(t);
  }, e)), J_.set(t, {
    ...n,
    timer: i
  });
}, LZe = (t) => J_.get(t), e1 = /* @__PURE__ */ new Map(), NZe = (t) => e1.get(t), BZe = (t, e) => {
  e1.set(t, e), e.then((n) => (e1.delete(t), n)).catch((n) => {
    throw e1.delete(t), n;
  });
}, Tc = {}, zZe = [], VZe = (t, e) => {
  Tc[t] && (Tc[t].forEach((n) => n(e)), zZe.forEach((n) => n({
    type: t,
    data: e
  })));
}, c$ = (t, e) => (Tc[t] || (Tc[t] = []), Tc[t].push(e), function() {
  const r = Tc[t].indexOf(e);
  Tc[t].splice(r, 1);
}), FZe = (t, {
  cacheKey: e,
  cacheTime: n = 5 * 60 * 1e3,
  staleTime: r = 0,
  setCache: i,
  getCache: a
}) => {
  const o = U(), s = U(), l = (c, f) => {
    i ? i(f) : kZe(c, n, f), VZe(c, f.data);
  }, u = (c, f = []) => a ? a(f) : LZe(c);
  return ht(() => {
    if (!e)
      return;
    const c = u(e);
    c && Object.hasOwnProperty.call(c, "data") && (t.state.data = c.data, t.state.params = c.params, (r === -1 || (/* @__PURE__ */ new Date()).getTime() - c.time <= r) && (t.state.loading = !1)), o.value = c$(e, (f) => {
      t.setState({ data: f });
    });
  }), f0(() => {
    var c;
    (c = o.value) == null || c.call(o);
  }), e ? {
    name: "cachePlugin",
    onBefore: (c) => {
      const f = u(e, c);
      return !f || !Object.hasOwnProperty.call(f, "data") ? {} : r === -1 || (/* @__PURE__ */ new Date()).getTime() - f.time <= r ? {
        loading: !1,
        data: f == null ? void 0 : f.data,
        returnNow: !0
      } : {
        data: f == null ? void 0 : f.data
      };
    },
    onRequest: (c, f) => {
      let d = NZe(e);
      return d && d !== s.value ? { servicePromise: d } : (d = c(...f), s.value = d, BZe(e, d), { servicePromise: d });
    },
    onSuccess: (c, f) => {
      var d;
      e && ((d = o.value) == null || d.call(o), l(e, {
        data: c,
        params: f,
        time: (/* @__PURE__ */ new Date()).getTime()
      }), o.value = c$(e, (h) => {
        t.setState({ data: h });
      }));
    },
    onMutate: (c) => {
      var f;
      e && ((f = o.value) == null || f.call(o), l(e, {
        data: c,
        params: t.state.params,
        time: (/* @__PURE__ */ new Date()).getTime()
      }), o.value = c$(e, (d) => {
        t.setState({ data: d });
      }));
    }
  } : {};
};
function WZe(t) {
  var e = typeof t;
  return t != null && (e == "object" || e == "function");
}
var go = WZe, QZe = typeof Iy == "object" && Iy && Iy.Object === Object && Iy, Sie = QZe, HZe = Sie, GZe = typeof self == "object" && self && self.Object === Object && self, jZe = HZe || GZe || Function("return this")(), mo = jZe, ZZe = mo, UZe = function() {
  return ZZe.Date.now();
}, XZe = UZe, YZe = /\s/;
function qZe(t) {
  for (var e = t.length; e-- && YZe.test(t.charAt(e)); )
    ;
  return e;
}
var KZe = qZe, JZe = KZe, eUe = /^\s+/;
function tUe(t) {
  return t && t.slice(0, JZe(t) + 1).replace(eUe, "");
}
var nUe = tUe, rUe = mo, iUe = rUe.Symbol, ww = iUe, RQ = ww, xie = Object.prototype, aUe = xie.hasOwnProperty, oUe = xie.toString, Tv = RQ ? RQ.toStringTag : void 0;
function sUe(t) {
  var e = aUe.call(t, Tv), n = t[Tv];
  try {
    t[Tv] = void 0;
    var r = !0;
  } catch {
  }
  var i = oUe.call(t);
  return r && (e ? t[Tv] = n : delete t[Tv]), i;
}
var lUe = sUe, uUe = Object.prototype, cUe = uUe.toString;
function fUe(t) {
  return cUe.call(t);
}
var dUe = fUe, kQ = ww, hUe = lUe, pUe = dUe, vUe = "[object Null]", gUe = "[object Undefined]", LQ = kQ ? kQ.toStringTag : void 0;
function mUe(t) {
  return t == null ? t === void 0 ? gUe : vUe : LQ && LQ in Object(t) ? hUe(t) : pUe(t);
}
var $p = mUe;
function yUe(t) {
  return t != null && typeof t == "object";
}
var Au = yUe, bUe = $p, _Ue = Au, OUe = "[object Symbol]";
function SUe(t) {
  return typeof t == "symbol" || _Ue(t) && bUe(t) == OUe;
}
var xUe = SUe, wUe = nUe, NQ = go, CUe = xUe, BQ = NaN, TUe = /^[-+]0x[0-9a-f]+$/i, PUe = /^0b[01]+$/i, $Ue = /^0o[0-7]+$/i, AUe = parseInt;
function EUe(t) {
  if (typeof t == "number")
    return t;
  if (CUe(t))
    return BQ;
  if (NQ(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = NQ(e) ? e + "" : e;
  }
  if (typeof t != "string")
    return t === 0 ? t : +t;
  t = wUe(t);
  var n = PUe.test(t);
  return n || $Ue.test(t) ? AUe(t.slice(2), n ? 2 : 8) : TUe.test(t) ? BQ : +t;
}
var MUe = EUe, IUe = go, f$ = XZe, zQ = MUe, DUe = "Expected a function", RUe = Math.max, kUe = Math.min;
function LUe(t, e, n) {
  var r, i, a, o, s, l, u = 0, c = !1, f = !1, d = !0;
  if (typeof t != "function")
    throw new TypeError(DUe);
  e = zQ(e) || 0, IUe(n) && (c = !!n.leading, f = "maxWait" in n, a = f ? RUe(zQ(n.maxWait) || 0, e) : a, d = "trailing" in n ? !!n.trailing : d);
  function h(S) {
    var x = r, C = i;
    return r = i = void 0, u = S, o = t.apply(C, x), o;
  }
  function p(S) {
    return u = S, s = setTimeout(m, e), c ? h(S) : o;
  }
  function v(S) {
    var x = S - l, C = S - u, T = e - x;
    return f ? kUe(T, a - C) : T;
  }
  function g(S) {
    var x = S - l, C = S - u;
    return l === void 0 || x >= e || x < 0 || f && C >= a;
  }
  function m() {
    var S = f$();
    if (g(S))
      return y(S);
    s = setTimeout(m, v(S));
  }
  function y(S) {
    return s = void 0, d && r ? h(S) : (r = i = void 0, o);
  }
  function b() {
    s !== void 0 && clearTimeout(s), u = 0, r = l = i = s = void 0;
  }
  function _() {
    return s === void 0 ? o : y(f$());
  }
  function O() {
    var S = f$(), x = g(S);
    if (r = arguments, i = this, l = S, x) {
      if (s === void 0)
        return p(l);
      if (f)
        return clearTimeout(s), s = setTimeout(m, e), h(l);
    }
    return s === void 0 && (s = setTimeout(m, e)), o;
  }
  return O.cancel = b, O.flush = _, O;
}
var wie = LUe;
const NUe = /* @__PURE__ */ vx(wie), BUe = (t, { debounceWait: e, debounceLeading: n, debounceTrailing: r, debounceMaxWait: i }) => {
  const a = U(), o = L(() => {
    const s = {}, l = B(n), u = B(r), c = B(i);
    return l !== void 0 && (s.leading = l), u !== void 0 && (s.trailing = u), c !== void 0 && (s.maxWait = c), s;
  });
  return ht((s) => {
    if (B(e)) {
      const l = t.runAsync.bind(t);
      a.value = NUe(
        (u) => {
          u();
        },
        B(e),
        o.value
      ), t.runAsync = (...u) => new Promise((c, f) => {
        var d;
        (d = a.value) == null || d.call(a, () => {
          l(...u).then(c).catch(f);
        });
      }), s(() => {
        var u;
        (u = a.value) == null || u.cancel(), t.runAsync = l;
      });
    }
  }), B(e) ? {
    name: "debouncePlugin",
    onCancel: () => {
      var s;
      (s = a.value) == null || s.cancel();
    }
  } : {};
};
var zUe = Object.defineProperty, VUe = (t, e, n) => e in t ? zUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, VQ = (t, e, n) => (VUe(t, typeof e != "symbol" ? e + "" : e, n), n);
class FUe {
  constructor() {
    VQ(this, "table", {}), VQ(this, "hashTable", {});
  }
  insert(e) {
    const n = Symbol(e);
    return this.table[e] = !0, this.hashTable[n] = e, n;
  }
  find(e) {
    return this.hashTable[e];
  }
}
new FUe();
function WUe(t) {
  const n = t.toString().match(/^function\s+([^\s(]+)/);
  return n ? n[1] : "";
}
function QUe(t) {
  const e = t.toString(), n = /([a-zA-Z$_][a-zA-Z0-9$_]*)\s*\(/, r = e.match(n);
  return r ? r[1].trim() : "";
}
var HUe = Object.defineProperty, GUe = (t, e, n) => e in t ? HUe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, FQ = (t, e, n) => (GUe(t, typeof e != "symbol" ? e + "" : e, n), n);
class jUe {
  constructor() {
    FQ(this, "requestInstances", /* @__PURE__ */ new Map()), FQ(this, "listeners", []);
  }
  emit(e) {
    this.listeners.forEach((n) => n(e));
  }
  subscribe(e) {
    return this.listeners.push(e), () => {
      const n = this.listeners.indexOf(e);
      this.listeners.splice(n, 1);
    };
  }
  insert(e, n) {
    this.requestInstances.set(e, { ...n }), this.emit({
      key: e,
      ...n
    });
  }
  update(e, n) {
    this.has(e) && this.requestInstances.set(e, { ...this.requestInstances.get(e), ...n });
  }
  has(e) {
    return this.requestInstances.has(e);
  }
  reset(e) {
    if (this.requestInstances.has(e)) {
      const n = this.requestInstances.get(e);
      this.requestInstances.clear(), this.insert(e, n);
    } else
      this.requestInstances.clear();
  }
  getAll() {
    return this.requestInstances;
  }
}
const li = new jUe(), ZUe = (t, { ready: e = !0, debugKey: n, ...r }) => {
  const i = () => {
    if (n && !li.has(n)) {
      const o = t.serviceRef.value.toString().includes("function") ? WUe(t.serviceRef.value.toString()) : QUe(t.serviceRef.value.toString());
      li.insert(n, {
        instance: t,
        requestName: o,
        time: Date.now()
      });
    }
  }, a = L(
    () => Object.fromEntries(
      Object.entries({ ready: e, ...r }).map(([o, s]) => [o, B(s)])
    )
  );
  return ht(() => {
    n && li.has(n) && li.emit({
      ...t,
      options: { ...t.options, ...a.value }
    });
  }), {
    name: "devtoolsPlugin",
    onBefore: (o) => {
      i(), n && li.has(n) && li.emit({
        ...t.state,
        key: n,
        params: o,
        loading: !0,
        time: Date.now(),
        type: "pending"
      });
    },
    onSuccess(o, s) {
      i(), n && li.has(n) && li.emit({
        ...t.state,
        key: n,
        data: o,
        params: s,
        loading: !1,
        time: Date.now(),
        type: "done"
      });
    },
    onCancel() {
      i(), n && li.has(n) && li.emit({
        ...t.state,
        key: n,
        loading: !1,
        time: Date.now(),
        type: "cancel"
      });
    },
    onError(o, s) {
      i(), n && li.has(n) && li.emit({
        ...t.state,
        key: n,
        params: s,
        loading: !1,
        error: o,
        time: Date.now(),
        type: "error"
      });
    },
    onMutate(o) {
      i(), n && li.has(n) && li.emit({
        ...t.state,
        key: n,
        data: o,
        loading: !1,
        time: Date.now(),
        type: "mutate"
      });
    }
  };
}, UUe = (t, { loadingDelay: e }) => {
  const n = U(), r = () => {
    n.value && (clearTimeout(B(n.value)), n.value = void 0);
  };
  return {
    name: "loadingDelayPlugin",
    onFinally: () => {
      r();
      const i = B(e);
      i && (t.setState({
        loading: !0
      }), n.value = setTimeout(() => {
        t.setState({
          loading: !1
        });
      }, i));
    },
    onError: () => {
      r();
    }
  };
};
function NL() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
const XUe = !!(typeof window < "u" && window.document && window.document.createElement);
function BL() {
  return NL() ? document.visibilityState !== "hidden" : !0;
}
const Bg = [];
function YUe(t) {
  return Bg.push(t), function() {
    const n = Bg.indexOf(t);
    Bg.splice(n, 1);
  };
}
if (NL()) {
  const t = () => {
    if (BL())
      for (let e = 0; e < Bg.length; e++) {
        const n = Bg[e];
        n();
      }
  };
  window.addEventListener("visibilitychange", t, !1);
}
const qUe = (t, { pollingInterval: e, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
  let i;
  const a = U(), o = U(0), s = () => {
    var l;
    i && clearTimeout(i), (l = a.value) == null || l.call(a);
  };
  return ht(() => {
    B(e) || s();
  }), B(e) ? {
    name: "pollingPlugin",
    onBefore: () => {
      s();
    },
    onError: () => {
      o.value += 1;
    },
    onSuccess: () => {
      o.value = 0;
    },
    onFinally: () => {
      r === -1 || r !== -1 && o.value <= r ? i = setTimeout(() => {
        !n && !BL() ? a.value = YUe(() => {
          t.refresh();
        }) : t.refresh();
      }, B(e)) : o.value = 0;
    },
    onCancel: () => {
      s();
    }
  } : {};
};
function KUe(t, e) {
  let n = !1;
  return (...r) => {
    n || (n = !0, t(...r), setTimeout(() => {
      n = !1;
    }, e));
  };
}
function JUe() {
  return NL() && typeof navigator.onLine < "u" ? navigator.onLine : !0;
}
const zg = [];
function eXe(t) {
  return zg.push(t), function() {
    const n = zg.indexOf(t);
    n > -1 && zg.splice(n, 1);
  };
}
if (XUe) {
  const t = () => {
    if (!(!BL() || !JUe()))
      for (let e = 0; e < zg.length; e++) {
        const n = zg[e];
        n();
      }
  };
  window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1);
}
const tXe = (t, { refreshOnWindowFocus: e, focusTimespan: n = 5e3 }) => {
  const r = U(), i = () => {
    var a;
    (a = r.value) == null || a.call(r);
  };
  return ht((a) => {
    if (B(e)) {
      const o = KUe(
        t.refresh.bind(t),
        B(n)
      );
      r.value = eXe(() => {
        o();
      });
    }
    a(() => {
      i();
    });
  }), f0(() => {
    i();
  }), {
    name: "refreshOnWindowFocusPlugin"
  };
}, nXe = (t, { retryInterval: e, retryCount: n }) => {
  const r = U(), i = U(0), a = U(!1);
  return n ? {
    name: "retryPlugin",
    onBefore: () => {
      a.value || (i.value = 0), a.value = !1, r.value && clearTimeout(r.value);
    },
    onSuccess: () => {
      i.value = 0;
    },
    onError: () => {
      if (i.value += 1, n === -1 || i.value <= n) {
        const o = e ?? Math.min(1e3 * 2 ** i.value, 3e4);
        r.value = setTimeout(() => {
          a.value = !0, t.refresh();
        }, o);
      } else
        i.value = 0;
    },
    onCancel: () => {
      i.value = 0, r.value && clearTimeout(r.value);
    }
  } : {};
};
var rXe = wie, iXe = go, aXe = "Expected a function";
function oXe(t, e, n) {
  var r = !0, i = !0;
  if (typeof t != "function")
    throw new TypeError(aXe);
  return iXe(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), rXe(t, e, {
    leading: r,
    maxWait: e,
    trailing: i
  });
}
var sXe = oXe;
const lXe = /* @__PURE__ */ vx(sXe), uXe = (t, { throttleWait: e, throttleLeading: n, throttleTrailing: r }) => {
  const i = L(() => {
    const o = {};
    return B(n) !== void 0 && (o.leading = B(n)), B(r) !== void 0 && (o.trailing = B(r)), o;
  }), a = L(
    () => lXe(
      (o) => {
        o();
      },
      B(e),
      i.value
    )
  );
  return ht((o) => {
    if (B(e)) {
      const s = t.runAsync.bind(t);
      t.runAsync = (...l) => new Promise((u, c) => {
        var f;
        (f = a.value) == null || f.call(a, () => {
          s(...l).then(u).catch(c);
        });
      }), o(() => {
        var l;
        t.runAsync = s, (l = a.value) == null || l.cancel();
      });
    }
  }), B(e) ? {
    name: "throttlePlugin",
    onCancel: () => {
      var o;
      (o = a.value) == null || o.cancel();
    }
  } : {};
}, WQ = (t) => typeof t == "function", cXe = (t) => typeof t == "boolean";
var fXe = Object.defineProperty, dXe = (t, e, n) => e in t ? fXe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Fb = (t, e, n) => (dXe(t, typeof e != "symbol" ? e + "" : e, n), n);
class hXe {
  constructor(e, n, r, i = {}) {
    Fb(this, "pluginImpls"), Fb(this, "count", 0), Fb(this, "state", {
      loading: !1,
      params: void 0,
      data: void 0,
      error: void 0
    }), Fb(this, "previousValidData"), this.serviceRef = e, this.options = n, this.setUpdateData = r, this.initState = i, this.state = {
      ...this.state,
      loading: !n.manual,
      ...i
    };
  }
  setState(e = {}) {
    this.state = {
      ...this.state,
      ...e
    }, this.setUpdateData(this.state);
  }
  setData(e, n) {
    console.warn("Please use 'setFetchState' instead of 'setData'"), n instanceof Array ? n.forEach((r) => {
      this.state[r] = e, this.setUpdateData(e, r);
    }) : (this.state[n] = e, this.setUpdateData(e, n));
  }
  setFetchState(e, n) {
    n instanceof Array ? n.forEach((r) => {
      this.state[r] = e, this.setUpdateData(e, r);
    }) : (this.state[n] = e, this.setUpdateData(e, n));
  }
  runPluginHandler(e, ...n) {
    var r, i, a;
    const o = (a = (i = (r = this.pluginImpls) == null ? void 0 : r.map((s) => {
      var l;
      return (l = s[e]) == null ? void 0 : l.call(s, ...n);
    })) != null ? i : []) == null ? void 0 : a.filter(Boolean);
    return Object.assign({}, ...o);
  }
  async runAsync(...e) {
    var n, r, i, a, o, s, l, u, c, f, d;
    this.count += 1;
    const h = this.count, { stopNow: p = !1, returnNow: v = !1, ...g } = this.runPluginHandler(
      "onBefore",
      e
    );
    if (p)
      return new Promise(() => {
      });
    if (this.setState({
      loading: !0,
      params: e,
      ...g
    }), v)
      return Promise.resolve(g.data);
    try {
      (r = (n = this.options).onBefore) == null || r.call(n, e);
    } catch (m) {
      return this.setState({
        error: m,
        loading: !1
      }), (a = (i = this.options).onError) == null || a.call(i, m, e), this.runPluginHandler("onError", m, e), new Promise(() => {
      });
    }
    try {
      let { servicePromise: m } = this.runPluginHandler("onRequest", this.serviceRef.value, e);
      const y = (_) => {
        var O, S, x, C;
        if (h !== this.count)
          return new Promise(() => {
          });
        const T = this.options.formatResult ? this.options.formatResult(_) : _;
        return this.setState({
          data: T,
          error: void 0,
          loading: !1
        }), (S = (O = this.options).onSuccess) == null || S.call(O, T, e), this.runPluginHandler("onSuccess", T, e), this.previousValidData = T, (C = (x = this.options).onFinally) == null || C.call(x, e, T, void 0), h === this.count && this.runPluginHandler("onFinally", e, T, void 0), T;
      };
      m || (m = this.serviceRef.value(...e));
      const b = await m;
      return y(b);
    } catch (m) {
      if (h !== this.count)
        return new Promise(() => {
        });
      throw this.setState({
        error: m,
        loading: !1
      }), (s = (o = this.options).onError) == null || s.call(o, m, e), this.runPluginHandler("onError", m, e), (WQ((l = this.options) == null ? void 0 : l.rollbackOnError) && ((u = this.options) != null && u.rollbackOnError(e)) || cXe((c = this.options) == null ? void 0 : c.rollbackOnError) && this.options.rollbackOnError) && this.setState({
        data: this.previousValidData
      }), (d = (f = this.options).onFinally) == null || d.call(f, e, void 0, m), h === this.count && this.runPluginHandler("onFinally", e, void 0, m), m;
    }
  }
  run(...e) {
    this.runAsync(...e).catch((n) => {
      this.options.onError || console.error(n);
    });
  }
  cancel() {
    this.count += 1, this.setState({
      loading: !1
    }), this.runPluginHandler("onCancel");
  }
  refresh() {
    this.run(...this.state.params || []);
  }
  refreshAsync() {
    return this.runAsync(...this.state.params || []);
  }
  mutate(e) {
    const n = WQ(e) ? e(this.state.data) : e;
    this.runPluginHandler("onMutate", n), this.setState({
      data: n
    });
  }
}
const pXe = Symbol(
  "USEREQUEST_GLOBAL_OPTIONS_PROVIDE_KEY"
);
function vXe(t) {
  return Object.keys(t).filter((n) => ["data", "loading", "params", "error"].includes(n)).length === 4;
}
function gXe(t, e = {}, n = []) {
  const r = Ge(
    pXe,
    {}
  ), { initialData: i = void 0, manual: a = !1, ready: o = !0, ...s } = {
    ...r ?? {},
    ...e ?? {}
  }, l = {
    manual: a,
    ready: o,
    initialData: i,
    ...s
  }, u = U(t), c = tn({
    data: i,
    loading: !1,
    params: void 0,
    error: void 0
  }), f = (v, g) => {
    g ? c[g] = v : vXe(v) && (c.data = v.data, c.loading = v.loading, c.error = v.error, c.params = v.params);
  }, d = n.map((v) => {
    var g;
    return (g = v == null ? void 0 : v.onInit) == null ? void 0 : g.call(v, l);
  }).filter(Boolean), h = new hXe(
    u,
    l,
    f,
    Object.assign({}, ...d, c)
  );
  h.options = l, h.pluginImpls = n.map((v) => v(h, l));
  const p = L(() => tp(o) ? o.value : o);
  if (ht(() => {
    if (!a) {
      const v = h.state.params || e.defaultParams || [];
      p.value && h.options.refreshDeps === !0 && u.value && h.run(...v);
    }
  }), !a && h.options.refreshDeps !== !0) {
    const v = h.state.params || e.defaultParams || [];
    B(o) && h.run(...v);
  }
  return f0(() => {
    h.cancel();
  }), {
    ...$S(c),
    cancel: h.cancel.bind(h),
    refresh: h.refresh.bind(h),
    refreshAsync: h.refreshAsync.bind(h),
    run: h.run.bind(h),
    runAsync: h.runAsync.bind(h),
    mutate: h.mutate.bind(h)
  };
}
const mXe = (t, e) => function(r, i = {}, a = []) {
  let o = t;
  const s = e || [];
  for (let l = s.length; l--; )
    o = s[l](o);
  return o(r, i, a);
};
function yXe(t, e, n) {
  var r;
  const i = (r = [
    process.env.NODE_ENV === "development" ? ZUe : null,
    BUe,
    UUe,
    qUe,
    tXe,
    uXe,
    Oie,
    FZe,
    nXe
  ]) == null ? void 0 : r.filter(Boolean);
  return mXe(gXe, e == null ? void 0 : e.use)(t, e, [
    ...i
  ]);
}
/*! js-cookie v3.0.5 | MIT */
function Wb(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e];
    for (var r in n)
      t[r] = n[r];
  }
  return t;
}
var bXe = {
  read: function(t) {
    return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
  },
  write: function(t) {
    return encodeURIComponent(t).replace(
      /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
      decodeURIComponent
    );
  }
};
function UE(t, e) {
  function n(i, a, o) {
    if (!(typeof document > "u")) {
      o = Wb({}, e, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
      var s = "";
      for (var l in o)
        o[l] && (s += "; " + l, o[l] !== !0 && (s += "=" + o[l].split(";")[0]));
      return document.cookie = i + "=" + t.write(a, i) + s;
    }
  }
  function r(i) {
    if (!(typeof document > "u" || arguments.length && !i)) {
      for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
        var l = a[s].split("="), u = l.slice(1).join("=");
        try {
          var c = decodeURIComponent(l[0]);
          if (o[c] = t.read(u, c), i === c)
            break;
        } catch {
        }
      }
      return i ? o[i] : o;
    }
  }
  return Object.create(
    {
      set: n,
      get: r,
      remove: function(i, a) {
        n(
          i,
          "",
          Wb({}, a, {
            expires: -1
          })
        );
      },
      withAttributes: function(i) {
        return UE(this.converter, Wb({}, this.attributes, i));
      },
      withConverter: function(i) {
        return UE(Wb({}, this.converter, i), this.attributes);
      }
    },
    {
      attributes: { value: Object.freeze(e) },
      converter: { value: Object.freeze(t) }
    }
  );
}
UE(bXe, { path: "/" });
function _Xe() {
  this.__data__ = [], this.size = 0;
}
var OXe = _Xe;
function SXe(t, e) {
  return t === e || t !== t && e !== e;
}
var Cw = SXe, xXe = Cw;
function wXe(t, e) {
  for (var n = t.length; n--; )
    if (xXe(t[n][0], e))
      return n;
  return -1;
}
var Tw = wXe, CXe = Tw, TXe = Array.prototype, PXe = TXe.splice;
function $Xe(t) {
  var e = this.__data__, n = CXe(e, t);
  if (n < 0)
    return !1;
  var r = e.length - 1;
  return n == r ? e.pop() : PXe.call(e, n, 1), --this.size, !0;
}
var AXe = $Xe, EXe = Tw;
function MXe(t) {
  var e = this.__data__, n = EXe(e, t);
  return n < 0 ? void 0 : e[n][1];
}
var IXe = MXe, DXe = Tw;
function RXe(t) {
  return DXe(this.__data__, t) > -1;
}
var kXe = RXe, LXe = Tw;
function NXe(t, e) {
  var n = this.__data__, r = LXe(n, t);
  return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
}
var BXe = NXe, zXe = OXe, VXe = AXe, FXe = IXe, WXe = kXe, QXe = BXe;
function Ap(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Ap.prototype.clear = zXe;
Ap.prototype.delete = VXe;
Ap.prototype.get = FXe;
Ap.prototype.has = WXe;
Ap.prototype.set = QXe;
var Pw = Ap, HXe = Pw;
function GXe() {
  this.__data__ = new HXe(), this.size = 0;
}
var jXe = GXe;
function ZXe(t) {
  var e = this.__data__, n = e.delete(t);
  return this.size = e.size, n;
}
var UXe = ZXe;
function XXe(t) {
  return this.__data__.get(t);
}
var YXe = XXe;
function qXe(t) {
  return this.__data__.has(t);
}
var KXe = qXe, JXe = $p, eYe = go, tYe = "[object AsyncFunction]", nYe = "[object Function]", rYe = "[object GeneratorFunction]", iYe = "[object Proxy]";
function aYe(t) {
  if (!eYe(t))
    return !1;
  var e = JXe(t);
  return e == nYe || e == rYe || e == tYe || e == iYe;
}
var zL = aYe, oYe = mo, sYe = oYe["__core-js_shared__"], lYe = sYe, d$ = lYe, QQ = function() {
  var t = /[^.]+$/.exec(d$ && d$.keys && d$.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function uYe(t) {
  return !!QQ && QQ in t;
}
var cYe = uYe, fYe = Function.prototype, dYe = fYe.toString;
function hYe(t) {
  if (t != null) {
    try {
      return dYe.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var Cie = hYe, pYe = zL, vYe = cYe, gYe = go, mYe = Cie, yYe = /[\\^$.*+?()[\]{}|]/g, bYe = /^\[object .+?Constructor\]$/, _Ye = Function.prototype, OYe = Object.prototype, SYe = _Ye.toString, xYe = OYe.hasOwnProperty, wYe = RegExp(
  "^" + SYe.call(xYe).replace(yYe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function CYe(t) {
  if (!gYe(t) || vYe(t))
    return !1;
  var e = pYe(t) ? wYe : bYe;
  return e.test(mYe(t));
}
var TYe = CYe;
function PYe(t, e) {
  return t == null ? void 0 : t[e];
}
var $Ye = PYe, AYe = TYe, EYe = $Ye;
function MYe(t, e) {
  var n = EYe(t, e);
  return AYe(n) ? n : void 0;
}
var Hf = MYe, IYe = Hf, DYe = mo, RYe = IYe(DYe, "Map"), VL = RYe, kYe = Hf, LYe = kYe(Object, "create"), $w = LYe, HQ = $w;
function NYe() {
  this.__data__ = HQ ? HQ(null) : {}, this.size = 0;
}
var BYe = NYe;
function zYe(t) {
  var e = this.has(t) && delete this.__data__[t];
  return this.size -= e ? 1 : 0, e;
}
var VYe = zYe, FYe = $w, WYe = "__lodash_hash_undefined__", QYe = Object.prototype, HYe = QYe.hasOwnProperty;
function GYe(t) {
  var e = this.__data__;
  if (FYe) {
    var n = e[t];
    return n === WYe ? void 0 : n;
  }
  return HYe.call(e, t) ? e[t] : void 0;
}
var jYe = GYe, ZYe = $w, UYe = Object.prototype, XYe = UYe.hasOwnProperty;
function YYe(t) {
  var e = this.__data__;
  return ZYe ? e[t] !== void 0 : XYe.call(e, t);
}
var qYe = YYe, KYe = $w, JYe = "__lodash_hash_undefined__";
function eqe(t, e) {
  var n = this.__data__;
  return this.size += this.has(t) ? 0 : 1, n[t] = KYe && e === void 0 ? JYe : e, this;
}
var tqe = eqe, nqe = BYe, rqe = VYe, iqe = jYe, aqe = qYe, oqe = tqe;
function Ep(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Ep.prototype.clear = nqe;
Ep.prototype.delete = rqe;
Ep.prototype.get = iqe;
Ep.prototype.has = aqe;
Ep.prototype.set = oqe;
var sqe = Ep, GQ = sqe, lqe = Pw, uqe = VL;
function cqe() {
  this.size = 0, this.__data__ = {
    hash: new GQ(),
    map: new (uqe || lqe)(),
    string: new GQ()
  };
}
var fqe = cqe;
function dqe(t) {
  var e = typeof t;
  return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
}
var hqe = dqe, pqe = hqe;
function vqe(t, e) {
  var n = t.__data__;
  return pqe(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
}
var Aw = vqe, gqe = Aw;
function mqe(t) {
  var e = gqe(this, t).delete(t);
  return this.size -= e ? 1 : 0, e;
}
var yqe = mqe, bqe = Aw;
function _qe(t) {
  return bqe(this, t).get(t);
}
var Oqe = _qe, Sqe = Aw;
function xqe(t) {
  return Sqe(this, t).has(t);
}
var wqe = xqe, Cqe = Aw;
function Tqe(t, e) {
  var n = Cqe(this, t), r = n.size;
  return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
}
var Pqe = Tqe, $qe = fqe, Aqe = yqe, Eqe = Oqe, Mqe = wqe, Iqe = Pqe;
function Mp(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++e < n; ) {
    var r = t[e];
    this.set(r[0], r[1]);
  }
}
Mp.prototype.clear = $qe;
Mp.prototype.delete = Aqe;
Mp.prototype.get = Eqe;
Mp.prototype.has = Mqe;
Mp.prototype.set = Iqe;
var Tie = Mp, Dqe = Pw, Rqe = VL, kqe = Tie, Lqe = 200;
function Nqe(t, e) {
  var n = this.__data__;
  if (n instanceof Dqe) {
    var r = n.__data__;
    if (!Rqe || r.length < Lqe - 1)
      return r.push([t, e]), this.size = ++n.size, this;
    n = this.__data__ = new kqe(r);
  }
  return n.set(t, e), this.size = n.size, this;
}
var Bqe = Nqe, zqe = Pw, Vqe = jXe, Fqe = UXe, Wqe = YXe, Qqe = KXe, Hqe = Bqe;
function Ip(t) {
  var e = this.__data__ = new zqe(t);
  this.size = e.size;
}
Ip.prototype.clear = Vqe;
Ip.prototype.delete = Fqe;
Ip.prototype.get = Wqe;
Ip.prototype.has = Qqe;
Ip.prototype.set = Hqe;
var Pie = Ip;
function Gqe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length; ++n < r && e(t[n], n, t) !== !1; )
    ;
  return t;
}
var jqe = Gqe, Zqe = Hf, Uqe = function() {
  try {
    var t = Zqe(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), $ie = Uqe, jQ = $ie;
function Xqe(t, e, n) {
  e == "__proto__" && jQ ? jQ(t, e, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : t[e] = n;
}
var FL = Xqe, Yqe = FL, qqe = Cw, Kqe = Object.prototype, Jqe = Kqe.hasOwnProperty;
function eKe(t, e, n) {
  var r = t[e];
  (!(Jqe.call(t, e) && qqe(r, n)) || n === void 0 && !(e in t)) && Yqe(t, e, n);
}
var Aie = eKe, tKe = Aie, nKe = FL;
function rKe(t, e, n, r) {
  var i = !n;
  n || (n = {});
  for (var a = -1, o = e.length; ++a < o; ) {
    var s = e[a], l = r ? r(n[s], t[s], s, n, t) : void 0;
    l === void 0 && (l = t[s]), i ? nKe(n, s, l) : tKe(n, s, l);
  }
  return n;
}
var ty = rKe;
function iKe(t, e) {
  for (var n = -1, r = Array(t); ++n < t; )
    r[n] = e(n);
  return r;
}
var aKe = iKe, oKe = $p, sKe = Au, lKe = "[object Arguments]";
function uKe(t) {
  return sKe(t) && oKe(t) == lKe;
}
var cKe = uKe, ZQ = cKe, fKe = Au, Eie = Object.prototype, dKe = Eie.hasOwnProperty, hKe = Eie.propertyIsEnumerable, pKe = ZQ(/* @__PURE__ */ function() {
  return arguments;
}()) ? ZQ : function(t) {
  return fKe(t) && dKe.call(t, "callee") && !hKe.call(t, "callee");
}, Mie = pKe, vKe = Array.isArray, Ew = vKe, qO = { exports: {} };
function gKe() {
  return !1;
}
var mKe = gKe;
qO.exports;
(function(t, e) {
  var n = mo, r = mKe, i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, o = a && a.exports === i, s = o ? n.Buffer : void 0, l = s ? s.isBuffer : void 0, u = l || r;
  t.exports = u;
})(qO, qO.exports);
var WL = qO.exports, yKe = 9007199254740991, bKe = /^(?:0|[1-9]\d*)$/;
function _Ke(t, e) {
  var n = typeof t;
  return e = e ?? yKe, !!e && (n == "number" || n != "symbol" && bKe.test(t)) && t > -1 && t % 1 == 0 && t < e;
}
var Iie = _Ke, OKe = 9007199254740991;
function SKe(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= OKe;
}
var Die = SKe, xKe = $p, wKe = Die, CKe = Au, TKe = "[object Arguments]", PKe = "[object Array]", $Ke = "[object Boolean]", AKe = "[object Date]", EKe = "[object Error]", MKe = "[object Function]", IKe = "[object Map]", DKe = "[object Number]", RKe = "[object Object]", kKe = "[object RegExp]", LKe = "[object Set]", NKe = "[object String]", BKe = "[object WeakMap]", zKe = "[object ArrayBuffer]", VKe = "[object DataView]", FKe = "[object Float32Array]", WKe = "[object Float64Array]", QKe = "[object Int8Array]", HKe = "[object Int16Array]", GKe = "[object Int32Array]", jKe = "[object Uint8Array]", ZKe = "[object Uint8ClampedArray]", UKe = "[object Uint16Array]", XKe = "[object Uint32Array]", un = {};
un[FKe] = un[WKe] = un[QKe] = un[HKe] = un[GKe] = un[jKe] = un[ZKe] = un[UKe] = un[XKe] = !0;
un[TKe] = un[PKe] = un[zKe] = un[$Ke] = un[VKe] = un[AKe] = un[EKe] = un[MKe] = un[IKe] = un[DKe] = un[RKe] = un[kKe] = un[LKe] = un[NKe] = un[BKe] = !1;
function YKe(t) {
  return CKe(t) && wKe(t.length) && !!un[xKe(t)];
}
var qKe = YKe;
function KKe(t) {
  return function(e) {
    return t(e);
  };
}
var QL = KKe, KO = { exports: {} };
KO.exports;
(function(t, e) {
  var n = Sie, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a && n.process, s = function() {
    try {
      var l = i && i.require && i.require("util").types;
      return l || o && o.binding && o.binding("util");
    } catch {
    }
  }();
  t.exports = s;
})(KO, KO.exports);
var HL = KO.exports, JKe = qKe, eJe = QL, UQ = HL, XQ = UQ && UQ.isTypedArray, tJe = XQ ? eJe(XQ) : JKe, Rie = tJe, nJe = aKe, rJe = Mie, iJe = Ew, aJe = WL, oJe = Iie, sJe = Rie, lJe = Object.prototype, uJe = lJe.hasOwnProperty;
function cJe(t, e) {
  var n = iJe(t), r = !n && rJe(t), i = !n && !r && aJe(t), a = !n && !r && !i && sJe(t), o = n || r || i || a, s = o ? nJe(t.length, String) : [], l = s.length;
  for (var u in t)
    (e || uJe.call(t, u)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
    (u == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    i && (u == "offset" || u == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    a && (u == "buffer" || u == "byteLength" || u == "byteOffset") || // Skip index properties.
    oJe(u, l))) && s.push(u);
  return s;
}
var kie = cJe, fJe = Object.prototype;
function dJe(t) {
  var e = t && t.constructor, n = typeof e == "function" && e.prototype || fJe;
  return t === n;
}
var GL = dJe;
function hJe(t, e) {
  return function(n) {
    return t(e(n));
  };
}
var Lie = hJe, pJe = Lie, vJe = pJe(Object.keys, Object), gJe = vJe, mJe = GL, yJe = gJe, bJe = Object.prototype, _Je = bJe.hasOwnProperty;
function OJe(t) {
  if (!mJe(t))
    return yJe(t);
  var e = [];
  for (var n in Object(t))
    _Je.call(t, n) && n != "constructor" && e.push(n);
  return e;
}
var SJe = OJe, xJe = zL, wJe = Die;
function CJe(t) {
  return t != null && wJe(t.length) && !xJe(t);
}
var Mw = CJe, TJe = kie, PJe = SJe, $Je = Mw;
function AJe(t) {
  return $Je(t) ? TJe(t) : PJe(t);
}
var jL = AJe, EJe = ty, MJe = jL;
function IJe(t, e) {
  return t && EJe(e, MJe(e), t);
}
var DJe = IJe;
function RJe(t) {
  var e = [];
  if (t != null)
    for (var n in Object(t))
      e.push(n);
  return e;
}
var kJe = RJe, LJe = go, NJe = GL, BJe = kJe, zJe = Object.prototype, VJe = zJe.hasOwnProperty;
function FJe(t) {
  if (!LJe(t))
    return BJe(t);
  var e = NJe(t), n = [];
  for (var r in t)
    r == "constructor" && (e || !VJe.call(t, r)) || n.push(r);
  return n;
}
var WJe = FJe, QJe = kie, HJe = WJe, GJe = Mw;
function jJe(t) {
  return GJe(t) ? QJe(t, !0) : HJe(t);
}
var ny = jJe, ZJe = ty, UJe = ny;
function XJe(t, e) {
  return t && ZJe(e, UJe(e), t);
}
var YJe = XJe, JO = { exports: {} };
JO.exports;
(function(t, e) {
  var n = mo, r = e && !e.nodeType && e, i = r && !0 && t && !t.nodeType && t, a = i && i.exports === r, o = a ? n.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
  function l(u, c) {
    if (c)
      return u.slice();
    var f = u.length, d = s ? s(f) : new u.constructor(f);
    return u.copy(d), d;
  }
  t.exports = l;
})(JO, JO.exports);
var Nie = JO.exports;
function qJe(t, e) {
  var n = -1, r = t.length;
  for (e || (e = Array(r)); ++n < r; )
    e[n] = t[n];
  return e;
}
var Bie = qJe;
function KJe(t, e) {
  for (var n = -1, r = t == null ? 0 : t.length, i = 0, a = []; ++n < r; ) {
    var o = t[n];
    e(o, n, t) && (a[i++] = o);
  }
  return a;
}
var JJe = KJe;
function eet() {
  return [];
}
var zie = eet, tet = JJe, net = zie, ret = Object.prototype, iet = ret.propertyIsEnumerable, YQ = Object.getOwnPropertySymbols, aet = YQ ? function(t) {
  return t == null ? [] : (t = Object(t), tet(YQ(t), function(e) {
    return iet.call(t, e);
  }));
} : net, ZL = aet, oet = ty, set = ZL;
function uet(t, e) {
  return oet(t, set(t), e);
}
var cet = uet;
function fet(t, e) {
  for (var n = -1, r = e.length, i = t.length; ++n < r; )
    t[i + n] = e[n];
  return t;
}
var Vie = fet, det = Lie, het = det(Object.getPrototypeOf, Object), UL = het, pet = Vie, vet = UL, get = ZL, met = zie, yet = Object.getOwnPropertySymbols, bet = yet ? function(t) {
  for (var e = []; t; )
    pet(e, get(t)), t = vet(t);
  return e;
} : met, Fie = bet, _et = ty, Oet = Fie;
function xet(t, e) {
  return _et(t, Oet(t), e);
}
var wet = xet, Cet = Vie, Tet = Ew;
function Pet(t, e, n) {
  var r = e(t);
  return Tet(t) ? r : Cet(r, n(t));
}
var Wie = Pet, $et = Wie, Aet = ZL, Eet = jL;
function Met(t) {
  return $et(t, Eet, Aet);
}
var Iet = Met, Det = Wie, Ret = Fie, ket = ny;
function Let(t) {
  return Det(t, ket, Ret);
}
var Net = Let, Bet = Hf, zet = mo, Vet = Bet(zet, "DataView"), Fet = Vet, Wet = Hf, Qet = mo, Het = Wet(Qet, "Promise"), Get = Het, jet = Hf, Zet = mo, Uet = jet(Zet, "Set"), Xet = Uet, Yet = Hf, qet = mo, Ket = Yet(qet, "WeakMap"), Jet = Ket, XE = Fet, YE = VL, qE = Get, KE = Xet, JE = Jet, Qie = $p, Dp = Cie, qQ = "[object Map]", ett = "[object Object]", KQ = "[object Promise]", JQ = "[object Set]", eH = "[object WeakMap]", tH = "[object DataView]", ttt = Dp(XE), ntt = Dp(YE), rtt = Dp(qE), itt = Dp(KE), att = Dp(JE), yc = Qie;
(XE && yc(new XE(new ArrayBuffer(1))) != tH || YE && yc(new YE()) != qQ || qE && yc(qE.resolve()) != KQ || KE && yc(new KE()) != JQ || JE && yc(new JE()) != eH) && (yc = function(t) {
  var e = Qie(t), n = e == ett ? t.constructor : void 0, r = n ? Dp(n) : "";
  if (r)
    switch (r) {
      case ttt:
        return tH;
      case ntt:
        return qQ;
      case rtt:
        return KQ;
      case itt:
        return JQ;
      case att:
        return eH;
    }
  return e;
});
var XL = yc, ott = Object.prototype, stt = ott.hasOwnProperty;
function ltt(t) {
  var e = t.length, n = new t.constructor(e);
  return e && typeof t[0] == "string" && stt.call(t, "index") && (n.index = t.index, n.input = t.input), n;
}
var utt = ltt, ctt = mo, ftt = ctt.Uint8Array, dtt = ftt, nH = dtt;
function htt(t) {
  var e = new t.constructor(t.byteLength);
  return new nH(e).set(new nH(t)), e;
}
var YL = htt, ptt = YL;
function vtt(t, e) {
  var n = e ? ptt(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.byteLength);
}
var gtt = vtt, mtt = /\w*$/;
function ytt(t) {
  var e = new t.constructor(t.source, mtt.exec(t));
  return e.lastIndex = t.lastIndex, e;
}
var btt = ytt, rH = ww, iH = rH ? rH.prototype : void 0, aH = iH ? iH.valueOf : void 0;
function _tt(t) {
  return aH ? Object(aH.call(t)) : {};
}
var Ott = _tt, Stt = YL;
function xtt(t, e) {
  var n = e ? Stt(t.buffer) : t.buffer;
  return new t.constructor(n, t.byteOffset, t.length);
}
var Hie = xtt, wtt = YL, Ctt = gtt, Ttt = btt, Ptt = Ott, $tt = Hie, Att = "[object Boolean]", Ett = "[object Date]", Mtt = "[object Map]", Itt = "[object Number]", Dtt = "[object RegExp]", Rtt = "[object Set]", ktt = "[object String]", Ltt = "[object Symbol]", Ntt = "[object ArrayBuffer]", Btt = "[object DataView]", ztt = "[object Float32Array]", Vtt = "[object Float64Array]", Ftt = "[object Int8Array]", Wtt = "[object Int16Array]", Qtt = "[object Int32Array]", Htt = "[object Uint8Array]", Gtt = "[object Uint8ClampedArray]", jtt = "[object Uint16Array]", Ztt = "[object Uint32Array]";
function Utt(t, e, n) {
  var r = t.constructor;
  switch (e) {
    case Ntt:
      return wtt(t);
    case Att:
    case Ett:
      return new r(+t);
    case Btt:
      return Ctt(t, n);
    case ztt:
    case Vtt:
    case Ftt:
    case Wtt:
    case Qtt:
    case Htt:
    case Gtt:
    case jtt:
    case Ztt:
      return $tt(t, n);
    case Mtt:
      return new r();
    case Itt:
    case ktt:
      return new r(t);
    case Dtt:
      return Ttt(t);
    case Rtt:
      return new r();
    case Ltt:
      return Ptt(t);
  }
}
var Xtt = Utt, Ytt = go, oH = Object.create, qtt = /* @__PURE__ */ function() {
  function t() {
  }
  return function(e) {
    if (!Ytt(e))
      return {};
    if (oH)
      return oH(e);
    t.prototype = e;
    var n = new t();
    return t.prototype = void 0, n;
  };
}(), Ktt = qtt, Jtt = Ktt, ent = UL, tnt = GL;
function nnt(t) {
  return typeof t.constructor == "function" && !tnt(t) ? Jtt(ent(t)) : {};
}
var Gie = nnt, rnt = XL, int = Au, ant = "[object Map]";
function ont(t) {
  return int(t) && rnt(t) == ant;
}
var snt = ont, lnt = snt, unt = QL, sH = HL, lH = sH && sH.isMap, cnt = lH ? unt(lH) : lnt, fnt = cnt, dnt = XL, hnt = Au, pnt = "[object Set]";
function vnt(t) {
  return hnt(t) && dnt(t) == pnt;
}
var gnt = vnt, mnt = gnt, ynt = QL, uH = HL, cH = uH && uH.isSet, bnt = cH ? ynt(cH) : mnt, _nt = bnt, Ont = Pie, Snt = jqe, xnt = Aie, wnt = DJe, Cnt = YJe, Tnt = Nie, Pnt = Bie, $nt = cet, Ant = wet, Ent = Iet, Mnt = Net, Int = XL, Dnt = utt, Rnt = Xtt, knt = Gie, Lnt = Ew, Nnt = WL, Bnt = fnt, znt = go, Vnt = _nt, Fnt = jL, Wnt = ny, Qnt = 1, Hnt = 2, Gnt = 4, jie = "[object Arguments]", jnt = "[object Array]", Znt = "[object Boolean]", Unt = "[object Date]", Xnt = "[object Error]", Zie = "[object Function]", Ynt = "[object GeneratorFunction]", qnt = "[object Map]", Knt = "[object Number]", Uie = "[object Object]", Jnt = "[object RegExp]", ert = "[object Set]", trt = "[object String]", nrt = "[object Symbol]", rrt = "[object WeakMap]", irt = "[object ArrayBuffer]", art = "[object DataView]", ort = "[object Float32Array]", srt = "[object Float64Array]", lrt = "[object Int8Array]", urt = "[object Int16Array]", crt = "[object Int32Array]", frt = "[object Uint8Array]", drt = "[object Uint8ClampedArray]", hrt = "[object Uint16Array]", prt = "[object Uint32Array]", an = {};
an[jie] = an[jnt] = an[irt] = an[art] = an[Znt] = an[Unt] = an[ort] = an[srt] = an[lrt] = an[urt] = an[crt] = an[qnt] = an[Knt] = an[Uie] = an[Jnt] = an[ert] = an[trt] = an[nrt] = an[frt] = an[drt] = an[hrt] = an[prt] = !0;
an[Xnt] = an[Zie] = an[rrt] = !1;
function t1(t, e, n, r, i, a) {
  var o, s = e & Qnt, l = e & Hnt, u = e & Gnt;
  if (n && (o = i ? n(t, r, i, a) : n(t)), o !== void 0)
    return o;
  if (!znt(t))
    return t;
  var c = Lnt(t);
  if (c) {
    if (o = Dnt(t), !s)
      return Pnt(t, o);
  } else {
    var f = Int(t), d = f == Zie || f == Ynt;
    if (Nnt(t))
      return Tnt(t, s);
    if (f == Uie || f == jie || d && !i) {
      if (o = l || d ? {} : knt(t), !s)
        return l ? Ant(t, Cnt(o, t)) : $nt(t, wnt(o, t));
    } else {
      if (!an[f])
        return i ? t : {};
      o = Rnt(t, f, s);
    }
  }
  a || (a = new Ont());
  var h = a.get(t);
  if (h)
    return h;
  a.set(t, o), Vnt(t) ? t.forEach(function(g) {
    o.add(t1(g, e, n, g, t, a));
  }) : Bnt(t) && t.forEach(function(g, m) {
    o.set(m, t1(g, e, n, m, t, a));
  });
  var p = u ? l ? Mnt : Ent : l ? Wnt : Fnt, v = c ? void 0 : p(t);
  return Snt(v || t, function(g, m) {
    v && (m = g, g = t[m]), xnt(o, m, t1(g, e, n, m, t, a));
  }), o;
}
var vrt = t1, grt = vrt, mrt = 1, yrt = 4;
function brt(t) {
  return grt(t, mrt | yrt);
}
var _rt = brt;
const fH = /* @__PURE__ */ vx(_rt);
var Ort = Object.defineProperty, Srt = (t, e, n) => e in t ? Ort(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, uc = (t, e, n) => (Srt(t, typeof e != "symbol" ? e + "" : e, n), n);
class xrt {
  constructor() {
    uc(this, "subscriptions", /* @__PURE__ */ new Map()), uc(this, "emitEffectCache", /* @__PURE__ */ new Map()), uc(this, "useSubscription", (e, n) => {
      const r = U();
      ht((i) => {
        var a, o;
        r.value = n;
        function s(u) {
          r.value && r.value(u);
        }
        const l = (o = (a = this.subscriptions) == null ? void 0 : a.get(e)) != null ? o : [];
        l.push(s), this.subscriptions.set(e, l), this.emitEffect(e), i(() => {
          this.subscriptions.delete(e);
        });
      });
    }), uc(this, "emit", (e, ...n) => {
      if (typeof e == "string" || typeof e == "number") {
        const r = this.subscriptions.get(e);
        r == null || r.forEach((i) => {
          i == null || i({
            params: fH(n),
            event: e
          });
        }), this.emitEffectCache.set(e, {
          params: fH(n),
          event: e
        });
      } else
        throw new TypeError("event must be string or number !");
    }), uc(this, "emitEffect", (e) => {
      const n = this.emitEffectCache.get(e), r = this.subscriptions.get(e);
      n && (r == null || r.forEach((i) => {
        i == null || i({
          ...n
        });
      }));
    }), uc(this, "removeListener", (e) => {
      this.subscriptions.delete(e);
    }), uc(this, "clear", () => {
      this.subscriptions.clear();
    }), this.clear();
  }
}
new xrt();
var wrt = { exports: {} };
/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/
(function(t) {
  (function() {
    var e = typeof window < "u" && typeof window.document < "u" ? window.document : {}, n = t.exports, r = function() {
      for (var o, s = [
        [
          "requestFullscreen",
          "exitFullscreen",
          "fullscreenElement",
          "fullscreenEnabled",
          "fullscreenchange",
          "fullscreenerror"
        ],
        // New WebKit
        [
          "webkitRequestFullscreen",
          "webkitExitFullscreen",
          "webkitFullscreenElement",
          "webkitFullscreenEnabled",
          "webkitfullscreenchange",
          "webkitfullscreenerror"
        ],
        // Old WebKit
        [
          "webkitRequestFullScreen",
          "webkitCancelFullScreen",
          "webkitCurrentFullScreenElement",
          "webkitCancelFullScreen",
          "webkitfullscreenchange",
          "webkitfullscreenerror"
        ],
        [
          "mozRequestFullScreen",
          "mozCancelFullScreen",
          "mozFullScreenElement",
          "mozFullScreenEnabled",
          "mozfullscreenchange",
          "mozfullscreenerror"
        ],
        [
          "msRequestFullscreen",
          "msExitFullscreen",
          "msFullscreenElement",
          "msFullscreenEnabled",
          "MSFullscreenChange",
          "MSFullscreenError"
        ]
      ], l = 0, u = s.length, c = {}; l < u; l++)
        if (o = s[l], o && o[1] in e) {
          for (l = 0; l < o.length; l++)
            c[s[0][l]] = o[l];
          return c;
        }
      return !1;
    }(), i = {
      change: r.fullscreenchange,
      error: r.fullscreenerror
    }, a = {
      request: function(o, s) {
        return new Promise((function(l, u) {
          var c = (function() {
            this.off("change", c), l();
          }).bind(this);
          this.on("change", c), o = o || e.documentElement;
          var f = o[r.requestFullscreen](s);
          f instanceof Promise && f.then(c).catch(u);
        }).bind(this));
      },
      exit: function() {
        return new Promise((function(o, s) {
          if (!this.isFullscreen) {
            o();
            return;
          }
          var l = (function() {
            this.off("change", l), o();
          }).bind(this);
          this.on("change", l);
          var u = e[r.exitFullscreen]();
          u instanceof Promise && u.then(l).catch(s);
        }).bind(this));
      },
      toggle: function(o, s) {
        return this.isFullscreen ? this.exit() : this.request(o, s);
      },
      onchange: function(o) {
        this.on("change", o);
      },
      onerror: function(o) {
        this.on("error", o);
      },
      on: function(o, s) {
        var l = i[o];
        l && e.addEventListener(l, s, !1);
      },
      off: function(o, s) {
        var l = i[o];
        l && e.removeEventListener(l, s, !1);
      },
      raw: r
    };
    if (!r) {
      n ? t.exports = { isEnabled: !1 } : window.screenfull = { isEnabled: !1 };
      return;
    }
    Object.defineProperties(a, {
      isFullscreen: {
        get: function() {
          return !!e[r.fullscreenElement];
        }
      },
      element: {
        enumerable: !0,
        get: function() {
          return e[r.fullscreenElement];
        }
      },
      isEnabled: {
        enumerable: !0,
        get: function() {
          return !!e[r.fullscreenEnabled];
        }
      }
    }), n ? t.exports = a : window.screenfull = a;
  })();
})(wrt);
var Crt = "__lodash_hash_undefined__";
function Trt(t) {
  return this.__data__.set(t, Crt), this;
}
var Prt = Trt;
function $rt(t) {
  return this.__data__.has(t);
}
var Art = $rt, Ert = Tie, Mrt = Prt, Irt = Art;
function eM(t) {
  var e = -1, n = t == null ? 0 : t.length;
  for (this.__data__ = new Ert(); ++e < n; )
    this.add(t[e]);
}
eM.prototype.add = eM.prototype.push = Mrt;
eM.prototype.has = Irt;
var dH = ww, hH = dH ? dH.prototype : void 0;
hH && hH.valueOf;
var Drt = FL, Rrt = Cw;
function krt(t, e, n) {
  (n !== void 0 && !Rrt(t[e], n) || n === void 0 && !(e in t)) && Drt(t, e, n);
}
var Xie = krt;
function Lrt(t) {
  return function(e, n, r) {
    for (var i = -1, a = Object(e), o = r(e), s = o.length; s--; ) {
      var l = o[t ? s : ++i];
      if (n(a[l], l, a) === !1)
        break;
    }
    return e;
  };
}
var Nrt = Lrt, Brt = Nrt, zrt = Brt(), Vrt = zrt, Frt = Mw, Wrt = Au;
function Qrt(t) {
  return Wrt(t) && Frt(t);
}
var Hrt = Qrt, Grt = $p, jrt = UL, Zrt = Au, Urt = "[object Object]", Xrt = Function.prototype, Yrt = Object.prototype, Yie = Xrt.toString, qrt = Yrt.hasOwnProperty, Krt = Yie.call(Object);
function Jrt(t) {
  if (!Zrt(t) || Grt(t) != Urt)
    return !1;
  var e = jrt(t);
  if (e === null)
    return !0;
  var n = qrt.call(e, "constructor") && e.constructor;
  return typeof n == "function" && n instanceof n && Yie.call(n) == Krt;
}
var eit = Jrt;
function tit(t, e) {
  if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
    return t[e];
}
var qie = tit, nit = ty, rit = ny;
function iit(t) {
  return nit(t, rit(t));
}
var ait = iit, pH = Xie, oit = Nie, sit = Hie, lit = Bie, uit = Gie, vH = Mie, gH = Ew, cit = Hrt, fit = WL, dit = zL, hit = go, pit = eit, vit = Rie, mH = qie, git = ait;
function mit(t, e, n, r, i, a, o) {
  var s = mH(t, n), l = mH(e, n), u = o.get(l);
  if (u) {
    pH(t, n, u);
    return;
  }
  var c = a ? a(s, l, n + "", t, e, o) : void 0, f = c === void 0;
  if (f) {
    var d = gH(l), h = !d && fit(l), p = !d && !h && vit(l);
    c = l, d || h || p ? gH(s) ? c = s : cit(s) ? c = lit(s) : h ? (f = !1, c = oit(l, !0)) : p ? (f = !1, c = sit(l, !0)) : c = [] : pit(l) || vH(l) ? (c = s, vH(s) ? c = git(s) : (!hit(s) || dit(s)) && (c = uit(l))) : f = !1;
  }
  f && (o.set(l, c), i(c, l, r, a, o), o.delete(l)), pH(t, n, c);
}
var yit = mit, bit = Pie, _it = Xie, Oit = Vrt, Sit = yit, xit = go, wit = ny, Cit = qie;
function Kie(t, e, n, r, i) {
  t !== e && Oit(e, function(a, o) {
    if (i || (i = new bit()), xit(a))
      Sit(t, e, o, n, Kie, r, i);
    else {
      var s = r ? r(Cit(t, o), a, o + "", t, e, i) : void 0;
      s === void 0 && (s = a), _it(t, o, s);
    }
  }, wit);
}
var Tit = Kie;
function Pit(t) {
  return t;
}
var Jie = Pit;
function $it(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
var Ait = $it, Eit = Ait, yH = Math.max;
function Mit(t, e, n) {
  return e = yH(e === void 0 ? t.length - 1 : e, 0), function() {
    for (var r = arguments, i = -1, a = yH(r.length - e, 0), o = Array(a); ++i < a; )
      o[i] = r[e + i];
    i = -1;
    for (var s = Array(e + 1); ++i < e; )
      s[i] = r[i];
    return s[e] = n(o), Eit(t, this, s);
  };
}
var Iit = Mit;
function Dit(t) {
  return function() {
    return t;
  };
}
var Rit = Dit, kit = Rit, bH = $ie, Lit = Jie, Nit = bH ? function(t, e) {
  return bH(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: kit(e),
    writable: !0
  });
} : Lit, Bit = Nit, zit = 800, Vit = 16, Fit = Date.now;
function Wit(t) {
  var e = 0, n = 0;
  return function() {
    var r = Fit(), i = Vit - (r - n);
    if (n = r, i > 0) {
      if (++e >= zit)
        return arguments[0];
    } else
      e = 0;
    return t.apply(void 0, arguments);
  };
}
var Qit = Wit, Hit = Bit, Git = Qit, jit = Git(Hit), Zit = jit, Uit = Jie, Xit = Iit, Yit = Zit;
function qit(t, e) {
  return Yit(Xit(t, e, Uit), t + "");
}
var Kit = qit, Jit = Cw, eat = Mw, tat = Iie, nat = go;
function rat(t, e, n) {
  if (!nat(n))
    return !1;
  var r = typeof e;
  return (r == "number" ? eat(n) && tat(e, n.length) : r == "string" && e in n) ? Jit(n[e], t) : !1;
}
var iat = rat, aat = Kit, oat = iat;
function sat(t) {
  return aat(function(e, n) {
    var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
    for (a = t.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && oat(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), e = Object(e); ++r < i; ) {
      var s = n[r];
      s && t(e, s, r, a);
    }
    return e;
  });
}
var lat = sat, uat = Tit, cat = lat;
cat(function(t, e, n) {
  uat(t, e, n);
});
const qL = (t) => {
  var d, h;
  const e = t.dataSource || {}, n = U(), r = U(), i = U((d = e == null ? void 0 : e.data) == null ? void 0 : d.series), a = L(() => async () => await fetch(t.dataSource.url, {
    method: t.dataSource.method
  }).then((p) => p.json())), { run: o, refresh: s, cancel: l, data: u, loading: c } = yXe(a.value, {
    defaultParams: t.dataSource.params,
    manual: !0,
    pollingInterval: (((h = t.dataSource) == null ? void 0 : h.refreshTime) || 0) * 1e3,
    // 刷新时间
    onError: (p) => {
      console.error(p), $h.error(t.dataSource.url + "请求失败");
    }
  });
  return t.dataSource.sourceType === Ri.API && o(), se(
    () => u.value,
    async (p) => {
      if (p && t.dataSource.sourceType === Ri.API) {
        let v = p;
        t.dataSource.dataProcess && (v = await IZe(t.dataSource.dataProcess, JSON.stringify(p))), n.value = v.xAxis || { data: v.xData }, r.value = v.yAxis || { data: v.yData }, i.value = v.series;
      }
    },
    {
      deep: !0
    }
  ), se(
    () => [
      t.dataSource.sourceType,
      t.dataSource.method
    ],
    () => {
      if (t.dataSource.sourceType === Ri.API)
        s();
      else {
        l();
        const p = t.dataSource || {}, { xData: v, yData: g, series: m } = (p == null ? void 0 : p.data) || {};
        v && (n.value = { data: v }), g && (r.value = { data: g }), m.value = m;
      }
    },
    {
      deep: !0
    }
  ), {
    options: L(() => {
      var m;
      const p = wU(t, [
        "width",
        "height",
        "dataSource"
      ]), v = (p == null ? void 0 : p.label) || {}, g = SU(
        {
          xAxis: n.value,
          yAxis: r.value,
          series: (m = i.value) == null ? void 0 : m.map((y) => {
            var _;
            const b = ((_ = p.series) == null ? void 0 : _[y.type]) || {};
            return {
              ...v,
              ...y,
              ...b
            };
          })
        },
        p
      );
      return console.log("option result:", g), g;
    }),
    loading: c
  };
}, Hm = /* @__PURE__ */ te({
  __name: "BasicLine",
  props: LL,
  setup(t) {
    const e = t, { options: n, loading: r } = qL(e);
    return (i, a) => (pe(), je(DL, {
      width: i.width,
      height: i.height,
      "echarts-options": B(n),
      loading: B(r)
    }, null, 8, ["width", "height", "echarts-options", "loading"]));
  }
});
class Ft {
  /**
  Get the line description around the given position.
  */
  lineAt(e) {
    if (e < 0 || e > this.length)
      throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
    return this.lineInner(e, !1, 1, 0);
  }
  /**
  Get the description for the given (1-based) line number.
  */
  line(e) {
    if (e < 1 || e > this.lines)
      throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
    return this.lineInner(e, !0, 1, 0);
  }
  /**
  Replace a range of the text with the given content.
  */
  replace(e, n, r) {
    [e, n] = Zh(this, e, n);
    let i = [];
    return this.decompose(
      0,
      e,
      i,
      2
      /* Open.To */
    ), r.length && r.decompose(
      0,
      r.length,
      i,
      3
      /* Open.To */
    ), this.decompose(
      n,
      this.length,
      i,
      1
      /* Open.From */
    ), No.from(i, this.length - (n - e) + r.length);
  }
  /**
  Append another document to this one.
  */
  append(e) {
    return this.replace(this.length, this.length, e);
  }
  /**
  Retrieve the text between the given points.
  */
  slice(e, n = this.length) {
    [e, n] = Zh(this, e, n);
    let r = [];
    return this.decompose(e, n, r, 0), No.from(r, n - e);
  }
  /**
  Test whether this text is equal to another instance.
  */
  eq(e) {
    if (e == this)
      return !0;
    if (e.length != this.length || e.lines != this.lines)
      return !1;
    let n = this.scanIdentical(e, 1), r = this.length - this.scanIdentical(e, -1), i = new Vg(this), a = new Vg(e);
    for (let o = n, s = n; ; ) {
      if (i.next(o), a.next(o), o = 0, i.lineBreak != a.lineBreak || i.done != a.done || i.value != a.value)
        return !1;
      if (s += i.value.length, i.done || s >= r)
        return !0;
    }
  }
  /**
  Iterate over the text. When `dir` is `-1`, iteration happens
  from end to start. This will return lines and the breaks between
  them as separate strings.
  */
  iter(e = 1) {
    return new Vg(this, e);
  }
  /**
  Iterate over a range of the text. When `from` > `to`, the
  iterator will run in reverse.
  */
  iterRange(e, n = this.length) {
    return new eae(this, e, n);
  }
  /**
  Return a cursor that iterates over the given range of lines,
  _without_ returning the line breaks between, and yielding empty
  strings for empty lines.
  
  When `from` and `to` are given, they should be 1-based line numbers.
  */
  iterLines(e, n) {
    let r;
    if (e == null)
      r = this.iter();
    else {
      n == null && (n = this.lines + 1);
      let i = this.line(e).from;
      r = this.iterRange(i, Math.max(i, n == this.lines + 1 ? this.length : n <= 1 ? 0 : this.line(n - 1).to));
    }
    return new tae(r);
  }
  /**
  Return the document as a string, using newline characters to
  separate lines.
  */
  toString() {
    return this.sliceString(0);
  }
  /**
  Convert the document to an array of lines (which can be
  deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
  */
  toJSON() {
    let e = [];
    return this.flatten(e), e;
  }
  /**
  @internal
  */
  constructor() {
  }
  /**
  Create a `Text` instance for the given array of lines.
  */
  static of(e) {
    if (e.length == 0)
      throw new RangeError("A document must have at least one line");
    return e.length == 1 && !e[0] ? Ft.empty : e.length <= 32 ? new Mn(e) : No.from(Mn.split(e, []));
  }
}
class Mn extends Ft {
  constructor(e, n = fat(e)) {
    super(), this.text = e, this.length = n;
  }
  get lines() {
    return this.text.length;
  }
  get children() {
    return null;
  }
  lineInner(e, n, r, i) {
    for (let a = 0; ; a++) {
      let o = this.text[a], s = i + o.length;
      if ((n ? r : s) >= e)
        return new dat(i, s, r, o);
      i = s + 1, r++;
    }
  }
  decompose(e, n, r, i) {
    let a = e <= 0 && n >= this.length ? this : new Mn(_H(this.text, e, n), Math.min(n, this.length) - Math.max(0, e));
    if (i & 1) {
      let o = r.pop(), s = n1(a.text, o.text.slice(), 0, a.length);
      if (s.length <= 32)
        r.push(new Mn(s, o.length + a.length));
      else {
        let l = s.length >> 1;
        r.push(new Mn(s.slice(0, l)), new Mn(s.slice(l)));
      }
    } else
      r.push(a);
  }
  replace(e, n, r) {
    if (!(r instanceof Mn))
      return super.replace(e, n, r);
    [e, n] = Zh(this, e, n);
    let i = n1(this.text, n1(r.text, _H(this.text, 0, e)), n), a = this.length + r.length - (n - e);
    return i.length <= 32 ? new Mn(i, a) : No.from(Mn.split(i, []), a);
  }
  sliceString(e, n = this.length, r = `
`) {
    [e, n] = Zh(this, e, n);
    let i = "";
    for (let a = 0, o = 0; a <= n && o < this.text.length; o++) {
      let s = this.text[o], l = a + s.length;
      a > e && o && (i += r), e < l && n > a && (i += s.slice(Math.max(0, e - a), n - a)), a = l + 1;
    }
    return i;
  }
  flatten(e) {
    for (let n of this.text)
      e.push(n);
  }
  scanIdentical() {
    return 0;
  }
  static split(e, n) {
    let r = [], i = -1;
    for (let a of e)
      r.push(a), i += a.length + 1, r.length == 32 && (n.push(new Mn(r, i)), r = [], i = -1);
    return i > -1 && n.push(new Mn(r, i)), n;
  }
}
class No extends Ft {
  constructor(e, n) {
    super(), this.children = e, this.length = n, this.lines = 0;
    for (let r of e)
      this.lines += r.lines;
  }
  lineInner(e, n, r, i) {
    for (let a = 0; ; a++) {
      let o = this.children[a], s = i + o.length, l = r + o.lines - 1;
      if ((n ? l : s) >= e)
        return o.lineInner(e, n, r, i);
      i = s + 1, r = l + 1;
    }
  }
  decompose(e, n, r, i) {
    for (let a = 0, o = 0; o <= n && a < this.children.length; a++) {
      let s = this.children[a], l = o + s.length;
      if (e <= l && n >= o) {
        let u = i & ((o <= e ? 1 : 0) | (l >= n ? 2 : 0));
        o >= e && l <= n && !u ? r.push(s) : s.decompose(e - o, n - o, r, u);
      }
      o = l + 1;
    }
  }
  replace(e, n, r) {
    if ([e, n] = Zh(this, e, n), r.lines < this.lines)
      for (let i = 0, a = 0; i < this.children.length; i++) {
        let o = this.children[i], s = a + o.length;
        if (e >= a && n <= s) {
          let l = o.replace(e - a, n - a, r), u = this.lines - o.lines + l.lines;
          if (l.lines < u >> 4 && l.lines > u >> 6) {
            let c = this.children.slice();
            return c[i] = l, new No(c, this.length - (n - e) + r.length);
          }
          return super.replace(a, s, l);
        }
        a = s + 1;
      }
    return super.replace(e, n, r);
  }
  sliceString(e, n = this.length, r = `
`) {
    [e, n] = Zh(this, e, n);
    let i = "";
    for (let a = 0, o = 0; a < this.children.length && o <= n; a++) {
      let s = this.children[a], l = o + s.length;
      o > e && a && (i += r), e < l && n > o && (i += s.sliceString(e - o, n - o, r)), o = l + 1;
    }
    return i;
  }
  flatten(e) {
    for (let n of this.children)
      n.flatten(e);
  }
  scanIdentical(e, n) {
    if (!(e instanceof No))
      return 0;
    let r = 0, [i, a, o, s] = n > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
    for (; ; i += n, a += n) {
      if (i == o || a == s)
        return r;
      let l = this.children[i], u = e.children[a];
      if (l != u)
        return r + l.scanIdentical(u, n);
      r += l.length + 1;
    }
  }
  static from(e, n = e.reduce((r, i) => r + i.length + 1, -1)) {
    let r = 0;
    for (let h of e)
      r += h.lines;
    if (r < 32) {
      let h = [];
      for (let p of e)
        p.flatten(h);
      return new Mn(h, n);
    }
    let i = Math.max(
      32,
      r >> 5
      /* Tree.BranchShift */
    ), a = i << 1, o = i >> 1, s = [], l = 0, u = -1, c = [];
    function f(h) {
      let p;
      if (h.lines > a && h instanceof No)
        for (let v of h.children)
          f(v);
      else h.lines > o && (l > o || !l) ? (d(), s.push(h)) : h instanceof Mn && l && (p = c[c.length - 1]) instanceof Mn && h.lines + p.lines <= 32 ? (l += h.lines, u += h.length + 1, c[c.length - 1] = new Mn(p.text.concat(h.text), p.length + 1 + h.length)) : (l + h.lines > i && d(), l += h.lines, u += h.length + 1, c.push(h));
    }
    function d() {
      l != 0 && (s.push(c.length == 1 ? c[0] : No.from(c, u)), u = -1, l = c.length = 0);
    }
    for (let h of e)
      f(h);
    return d(), s.length == 1 ? s[0] : new No(s, n);
  }
}
Ft.empty = /* @__PURE__ */ new Mn([""], 0);
function fat(t) {
  let e = -1;
  for (let n of t)
    e += n.length + 1;
  return e;
}
function n1(t, e, n = 0, r = 1e9) {
  for (let i = 0, a = 0, o = !0; a < t.length && i <= r; a++) {
    let s = t[a], l = i + s.length;
    l >= n && (l > r && (s = s.slice(0, r - i)), i < n && (s = s.slice(n - i)), o ? (e[e.length - 1] += s, o = !1) : e.push(s)), i = l + 1;
  }
  return e;
}
function _H(t, e, n) {
  return n1(t, [""], e, n);
}
class Vg {
  constructor(e, n = 1) {
    this.dir = n, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [n > 0 ? 1 : (e instanceof Mn ? e.text.length : e.children.length) << 1];
  }
  nextInner(e, n) {
    for (this.done = this.lineBreak = !1; ; ) {
      let r = this.nodes.length - 1, i = this.nodes[r], a = this.offsets[r], o = a >> 1, s = i instanceof Mn ? i.text.length : i.children.length;
      if (o == (n > 0 ? s : 0)) {
        if (r == 0)
          return this.done = !0, this.value = "", this;
        n > 0 && this.offsets[r - 1]++, this.nodes.pop(), this.offsets.pop();
      } else if ((a & 1) == (n > 0 ? 0 : 1)) {
        if (this.offsets[r] += n, e == 0)
          return this.lineBreak = !0, this.value = `
`, this;
        e--;
      } else if (i instanceof Mn) {
        let l = i.text[o + (n < 0 ? -1 : 0)];
        if (this.offsets[r] += n, l.length > Math.max(0, e))
          return this.value = e == 0 ? l : n > 0 ? l.slice(e) : l.slice(0, l.length - e), this;
        e -= l.length;
      } else {
        let l = i.children[o + (n < 0 ? -1 : 0)];
        e > l.length ? (e -= l.length, this.offsets[r] += n) : (n < 0 && this.offsets[r]--, this.nodes.push(l), this.offsets.push(n > 0 ? 1 : (l instanceof Mn ? l.text.length : l.children.length) << 1));
      }
    }
  }
  next(e = 0) {
    return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
  }
}
class eae {
  constructor(e, n, r) {
    this.value = "", this.done = !1, this.cursor = new Vg(e, n > r ? -1 : 1), this.pos = n > r ? e.length : 0, this.from = Math.min(n, r), this.to = Math.max(n, r);
  }
  nextInner(e, n) {
    if (n < 0 ? this.pos <= this.from : this.pos >= this.to)
      return this.value = "", this.done = !0, this;
    e += Math.max(0, n < 0 ? this.pos - this.to : this.from - this.pos);
    let r = n < 0 ? this.pos - this.from : this.to - this.pos;
    e > r && (e = r), r -= e;
    let { value: i } = this.cursor.next(e);
    return this.pos += (i.length + e) * n, this.value = i.length <= r ? i : n < 0 ? i.slice(i.length - r) : i.slice(0, r), this.done = !this.value, this;
  }
  next(e = 0) {
    return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
  }
  get lineBreak() {
    return this.cursor.lineBreak && this.value != "";
  }
}
class tae {
  constructor(e) {
    this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
  }
  next(e = 0) {
    let { done: n, lineBreak: r, value: i } = this.inner.next(e);
    return n && this.afterBreak ? (this.value = "", this.afterBreak = !1) : n ? (this.done = !0, this.value = "") : r ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
  }
  get lineBreak() {
    return !1;
  }
}
typeof Symbol < "u" && (Ft.prototype[Symbol.iterator] = function() {
  return this.iter();
}, Vg.prototype[Symbol.iterator] = eae.prototype[Symbol.iterator] = tae.prototype[Symbol.iterator] = function() {
  return this;
});
class dat {
  /**
  @internal
  */
  constructor(e, n, r, i) {
    this.from = e, this.to = n, this.number = r, this.text = i;
  }
  /**
  The length of the line (not including any line break after it).
  */
  get length() {
    return this.to - this.from;
  }
}
function Zh(t, e, n) {
  return e = Math.max(0, Math.min(t.length, e)), [e, Math.max(e, Math.min(t.length, n))];
}
let oh = /* @__PURE__ */ "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t) => t ? parseInt(t, 36) : 1);
for (let t = 1; t < oh.length; t++)
  oh[t] += oh[t - 1];
function hat(t) {
  for (let e = 1; e < oh.length; e += 2)
    if (oh[e] > t)
      return oh[e - 1] <= t;
  return !1;
}
function OH(t) {
  return t >= 127462 && t <= 127487;
}
const SH = 8205;
function _r(t, e, n = !0, r = !0) {
  return (n ? nae : pat)(t, e, r);
}
function nae(t, e, n) {
  if (e == t.length)
    return e;
  e && rae(t.charCodeAt(e)) && iae(t.charCodeAt(e - 1)) && e--;
  let r = gr(t, e);
  for (e += ga(r); e < t.length; ) {
    let i = gr(t, e);
    if (r == SH || i == SH || n && hat(i))
      e += ga(i), r = i;
    else if (OH(i)) {
      let a = 0, o = e - 2;
      for (; o >= 0 && OH(gr(t, o)); )
        a++, o -= 2;
      if (a % 2 == 0)
        break;
      e += 2;
    } else
      break;
  }
  return e;
}
function pat(t, e, n) {
  for (; e > 0; ) {
    let r = nae(t, e - 2, n);
    if (r < e)
      return r;
    e--;
  }
  return 0;
}
function rae(t) {
  return t >= 56320 && t < 57344;
}
function iae(t) {
  return t >= 55296 && t < 56320;
}
function gr(t, e) {
  let n = t.charCodeAt(e);
  if (!iae(n) || e + 1 == t.length)
    return n;
  let r = t.charCodeAt(e + 1);
  return rae(r) ? (n - 55296 << 10) + (r - 56320) + 65536 : n;
}
function KL(t) {
  return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
}
function ga(t) {
  return t < 65536 ? 1 : 2;
}
const tM = /\r\n?|\n/;
var yr = /* @__PURE__ */ function(t) {
  return t[t.Simple = 0] = "Simple", t[t.TrackDel = 1] = "TrackDel", t[t.TrackBefore = 2] = "TrackBefore", t[t.TrackAfter = 3] = "TrackAfter", t;
}(yr || (yr = {}));
class Yo {
  // Sections are encoded as pairs of integers. The first is the
  // length in the current document, and the second is -1 for
  // unaffected sections, and the length of the replacement content
  // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
  // 0), and a replacement two positive numbers.
  /**
  @internal
  */
  constructor(e) {
    this.sections = e;
  }
  /**
  The length of the document before the change.
  */
  get length() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2)
      e += this.sections[n];
    return e;
  }
  /**
  The length of the document after the change.
  */
  get newLength() {
    let e = 0;
    for (let n = 0; n < this.sections.length; n += 2) {
      let r = this.sections[n + 1];
      e += r < 0 ? this.sections[n] : r;
    }
    return e;
  }
  /**
  False when there are actual changes in this set.
  */
  get empty() {
    return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
  }
  /**
  Iterate over the unchanged parts left by these changes. `posA`
  provides the position of the range in the old document, `posB`
  the new position in the changed document.
  */
  iterGaps(e) {
    for (let n = 0, r = 0, i = 0; n < this.sections.length; ) {
      let a = this.sections[n++], o = this.sections[n++];
      o < 0 ? (e(r, i, a), i += a) : i += o, r += a;
    }
  }
  /**
  Iterate over the ranges changed by these changes. (See
  [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
  variant that also provides you with the inserted text.)
  `fromA`/`toA` provides the extent of the change in the starting
  document, `fromB`/`toB` the extent of the replacement in the
  changed document.
  
  When `individual` is true, adjacent changes (which are kept
  separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
  reported separately.
  */
  iterChangedRanges(e, n = !1) {
    nM(this, e, n);
  }
  /**
  Get a description of the inverted form of these changes.
  */
  get invertedDesc() {
    let e = [];
    for (let n = 0; n < this.sections.length; ) {
      let r = this.sections[n++], i = this.sections[n++];
      i < 0 ? e.push(r, i) : e.push(i, r);
    }
    return new Yo(e);
  }
  /**
  Compute the combined effect of applying another set of changes
  after this one. The length of the document after this set should
  match the length before `other`.
  */
  composeDesc(e) {
    return this.empty ? e : e.empty ? this : aae(this, e);
  }
  /**
  Map this description, which should start with the same document
  as `other`, over another set of changes, so that it can be
  applied after it. When `before` is true, map as if the changes
  in `other` happened before the ones in `this`.
  */
  mapDesc(e, n = !1) {
    return e.empty ? this : rM(this, e, n);
  }
  mapPos(e, n = -1, r = yr.Simple) {
    let i = 0, a = 0;
    for (let o = 0; o < this.sections.length; ) {
      let s = this.sections[o++], l = this.sections[o++], u = i + s;
      if (l < 0) {
        if (u > e)
          return a + (e - i);
        a += s;
      } else {
        if (r != yr.Simple && u >= e && (r == yr.TrackDel && i < e && u > e || r == yr.TrackBefore && i < e || r == yr.TrackAfter && u > e))
          return null;
        if (u > e || u == e && n < 0 && !s)
          return e == i || n < 0 ? a : a + l;
        a += l;
      }
      i = u;
    }
    if (e > i)
      throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
    return a;
  }
  /**
  Check whether these changes touch a given range. When one of the
  changes entirely covers the range, the string `"cover"` is
  returned.
  */
  touchesRange(e, n = e) {
    for (let r = 0, i = 0; r < this.sections.length && i <= n; ) {
      let a = this.sections[r++], o = this.sections[r++], s = i + a;
      if (o >= 0 && i <= n && s >= e)
        return i < e && s > n ? "cover" : !0;
      i = s;
    }
    return !1;
  }
  /**
  @internal
  */
  toString() {
    let e = "";
    for (let n = 0; n < this.sections.length; ) {
      let r = this.sections[n++], i = this.sections[n++];
      e += (e ? " " : "") + r + (i >= 0 ? ":" + i : "");
    }
    return e;
  }
  /**
  Serialize this change desc to a JSON-representable value.
  */
  toJSON() {
    return this.sections;
  }
  /**
  Create a change desc from its JSON representation (as produced
  by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e) || e.length % 2 || e.some((n) => typeof n != "number"))
      throw new RangeError("Invalid JSON representation of ChangeDesc");
    return new Yo(e);
  }
  /**
  @internal
  */
  static create(e) {
    return new Yo(e);
  }
}
class jn extends Yo {
  constructor(e, n) {
    super(e), this.inserted = n;
  }
  /**
  Apply the changes to a document, returning the modified
  document.
  */
  apply(e) {
    if (this.length != e.length)
      throw new RangeError("Applying change set to a document with the wrong length");
    return nM(this, (n, r, i, a, o) => e = e.replace(i, i + (r - n), o), !1), e;
  }
  mapDesc(e, n = !1) {
    return rM(this, e, n, !0);
  }
  /**
  Given the document as it existed _before_ the changes, return a
  change set that represents the inverse of this set, which could
  be used to go from the document created by the changes back to
  the document as it existed before the changes.
  */
  invert(e) {
    let n = this.sections.slice(), r = [];
    for (let i = 0, a = 0; i < n.length; i += 2) {
      let o = n[i], s = n[i + 1];
      if (s >= 0) {
        n[i] = s, n[i + 1] = o;
        let l = i >> 1;
        for (; r.length < l; )
          r.push(Ft.empty);
        r.push(o ? e.slice(a, a + o) : Ft.empty);
      }
      a += o;
    }
    return new jn(n, r);
  }
  /**
  Combine two subsequent change sets into a single set. `other`
  must start in the document produced by `this`. If `this` goes
  `docA` → `docB` and `other` represents `docB` → `docC`, the
  returned value will represent the change `docA` → `docC`.
  */
  compose(e) {
    return this.empty ? e : e.empty ? this : aae(this, e, !0);
  }
  /**
  Given another change set starting in the same document, maps this
  change set over the other, producing a new change set that can be
  applied to the document produced by applying `other`. When
  `before` is `true`, order changes as if `this` comes before
  `other`, otherwise (the default) treat `other` as coming first.
  
  Given two changes `A` and `B`, `A.compose(B.map(A))` and
  `B.compose(A.map(B, true))` will produce the same document. This
  provides a basic form of [operational
  transformation](https://en.wikipedia.org/wiki/Operational_transformation),
  and can be used for collaborative editing.
  */
  map(e, n = !1) {
    return e.empty ? this : rM(this, e, n, !0);
  }
  /**
  Iterate over the changed ranges in the document, calling `f` for
  each, with the range in the original document (`fromA`-`toA`)
  and the range that replaces it in the new document
  (`fromB`-`toB`).
  
  When `individual` is true, adjacent changes are reported
  separately.
  */
  iterChanges(e, n = !1) {
    nM(this, e, n);
  }
  /**
  Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
  set.
  */
  get desc() {
    return Yo.create(this.sections);
  }
  /**
  @internal
  */
  filter(e) {
    let n = [], r = [], i = [], a = new Gm(this);
    e: for (let o = 0, s = 0; ; ) {
      let l = o == e.length ? 1e9 : e[o++];
      for (; s < l || s == l && a.len == 0; ) {
        if (a.done)
          break e;
        let c = Math.min(a.len, l - s);
        Dr(i, c, -1);
        let f = a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0;
        Dr(n, c, f), f > 0 && Wl(r, n, a.text), a.forward(c), s += c;
      }
      let u = e[o++];
      for (; s < u; ) {
        if (a.done)
          break e;
        let c = Math.min(a.len, u - s);
        Dr(n, c, -1), Dr(i, c, a.ins == -1 ? -1 : a.off == 0 ? a.ins : 0), a.forward(c), s += c;
      }
    }
    return {
      changes: new jn(n, r),
      filtered: Yo.create(i)
    };
  }
  /**
  Serialize this change set to a JSON-representable value.
  */
  toJSON() {
    let e = [];
    for (let n = 0; n < this.sections.length; n += 2) {
      let r = this.sections[n], i = this.sections[n + 1];
      i < 0 ? e.push(r) : i == 0 ? e.push([r]) : e.push([r].concat(this.inserted[n >> 1].toJSON()));
    }
    return e;
  }
  /**
  Create a change set for the given changes, for a document of the
  given length, using `lineSep` as line separator.
  */
  static of(e, n, r) {
    let i = [], a = [], o = 0, s = null;
    function l(c = !1) {
      if (!c && !i.length)
        return;
      o < n && Dr(i, n - o, -1);
      let f = new jn(i, a);
      s = s ? s.compose(f.map(s)) : f, i = [], a = [], o = 0;
    }
    function u(c) {
      if (Array.isArray(c))
        for (let f of c)
          u(f);
      else if (c instanceof jn) {
        if (c.length != n)
          throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${n})`);
        l(), s = s ? s.compose(c.map(s)) : c;
      } else {
        let { from: f, to: d = f, insert: h } = c;
        if (f > d || f < 0 || d > n)
          throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${n})`);
        let p = h ? typeof h == "string" ? Ft.of(h.split(r || tM)) : h : Ft.empty, v = p.length;
        if (f == d && v == 0)
          return;
        f < o && l(), f > o && Dr(i, f - o, -1), Dr(i, d - f, v), Wl(a, i, p), o = d;
      }
    }
    return u(e), l(!s), s;
  }
  /**
  Create an empty changeset of the given length.
  */
  static empty(e) {
    return new jn(e ? [e, -1] : [], []);
  }
  /**
  Create a changeset from its JSON representation (as produced by
  [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
  */
  static fromJSON(e) {
    if (!Array.isArray(e))
      throw new RangeError("Invalid JSON representation of ChangeSet");
    let n = [], r = [];
    for (let i = 0; i < e.length; i++) {
      let a = e[i];
      if (typeof a == "number")
        n.push(a, -1);
      else {
        if (!Array.isArray(a) || typeof a[0] != "number" || a.some((o, s) => s && typeof o != "string"))
          throw new RangeError("Invalid JSON representation of ChangeSet");
        if (a.length == 1)
          n.push(a[0], 0);
        else {
          for (; r.length < i; )
            r.push(Ft.empty);
          r[i] = Ft.of(a.slice(1)), n.push(a[0], r[i].length);
        }
      }
    }
    return new jn(n, r);
  }
  /**
  @internal
  */
  static createSet(e, n) {
    return new jn(e, n);
  }
}
function Dr(t, e, n, r = !1) {
  if (e == 0 && n <= 0)
    return;
  let i = t.length - 2;
  i >= 0 && n <= 0 && n == t[i + 1] ? t[i] += e : e == 0 && t[i] == 0 ? t[i + 1] += n : r ? (t[i] += e, t[i + 1] += n) : t.push(e, n);
}
function Wl(t, e, n) {
  if (n.length == 0)
    return;
  let r = e.length - 2 >> 1;
  if (r < t.length)
    t[t.length - 1] = t[t.length - 1].append(n);
  else {
    for (; t.length < r; )
      t.push(Ft.empty);
    t.push(n);
  }
}
function nM(t, e, n) {
  let r = t.inserted;
  for (let i = 0, a = 0, o = 0; o < t.sections.length; ) {
    let s = t.sections[o++], l = t.sections[o++];
    if (l < 0)
      i += s, a += s;
    else {
      let u = i, c = a, f = Ft.empty;
      for (; u += s, c += l, l && r && (f = f.append(r[o - 2 >> 1])), !(n || o == t.sections.length || t.sections[o + 1] < 0); )
        s = t.sections[o++], l = t.sections[o++];
      e(i, u, a, c, f), i = u, a = c;
    }
  }
}
function rM(t, e, n, r = !1) {
  let i = [], a = r ? [] : null, o = new Gm(t), s = new Gm(e);
  for (let l = -1; ; )
    if (o.ins == -1 && s.ins == -1) {
      let u = Math.min(o.len, s.len);
      Dr(i, u, -1), o.forward(u), s.forward(u);
    } else if (s.ins >= 0 && (o.ins < 0 || l == o.i || o.off == 0 && (s.len < o.len || s.len == o.len && !n))) {
      let u = s.len;
      for (Dr(i, s.ins, -1); u; ) {
        let c = Math.min(o.len, u);
        o.ins >= 0 && l < o.i && o.len <= c && (Dr(i, 0, o.ins), a && Wl(a, i, o.text), l = o.i), o.forward(c), u -= c;
      }
      s.next();
    } else if (o.ins >= 0) {
      let u = 0, c = o.len;
      for (; c; )
        if (s.ins == -1) {
          let f = Math.min(c, s.len);
          u += f, c -= f, s.forward(f);
        } else if (s.ins == 0 && s.len < c)
          c -= s.len, s.next();
        else
          break;
      Dr(i, u, l < o.i ? o.ins : 0), a && l < o.i && Wl(a, i, o.text), l = o.i, o.forward(o.len - c);
    } else {
      if (o.done && s.done)
        return a ? jn.createSet(i, a) : Yo.create(i);
      throw new Error("Mismatched change set lengths");
    }
}
function aae(t, e, n = !1) {
  let r = [], i = n ? [] : null, a = new Gm(t), o = new Gm(e);
  for (let s = !1; ; ) {
    if (a.done && o.done)
      return i ? jn.createSet(r, i) : Yo.create(r);
    if (a.ins == 0)
      Dr(r, a.len, 0, s), a.next();
    else if (o.len == 0 && !o.done)
      Dr(r, 0, o.ins, s), i && Wl(i, r, o.text), o.next();
    else {
      if (a.done || o.done)
        throw new Error("Mismatched change set lengths");
      {
        let l = Math.min(a.len2, o.len), u = r.length;
        if (a.ins == -1) {
          let c = o.ins == -1 ? -1 : o.off ? 0 : o.ins;
          Dr(r, l, c, s), i && c && Wl(i, r, o.text);
        } else o.ins == -1 ? (Dr(r, a.off ? 0 : a.len, l, s), i && Wl(i, r, a.textBit(l))) : (Dr(r, a.off ? 0 : a.len, o.off ? 0 : o.ins, s), i && !o.off && Wl(i, r, o.text));
        s = (a.ins > l || o.ins >= 0 && o.len > l) && (s || r.length > u), a.forward2(l), o.forward(l);
      }
    }
  }
}
class Gm {
  constructor(e) {
    this.set = e, this.i = 0, this.next();
  }
  next() {
    let { sections: e } = this.set;
    this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
  }
  get done() {
    return this.ins == -2;
  }
  get len2() {
    return this.ins < 0 ? this.len : this.ins;
  }
  get text() {
    let { inserted: e } = this.set, n = this.i - 2 >> 1;
    return n >= e.length ? Ft.empty : e[n];
  }
  textBit(e) {
    let { inserted: n } = this.set, r = this.i - 2 >> 1;
    return r >= n.length && !e ? Ft.empty : n[r].slice(this.off, e == null ? void 0 : this.off + e);
  }
  forward(e) {
    e == this.len ? this.next() : (this.len -= e, this.off += e);
  }
  forward2(e) {
    this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
  }
}
class Wc {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.flags = r;
  }
  /**
  The anchor of the range—the side that doesn't move when you
  extend it.
  */
  get anchor() {
    return this.flags & 32 ? this.to : this.from;
  }
  /**
  The head of the range, which is moved when the range is
  [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
  */
  get head() {
    return this.flags & 32 ? this.from : this.to;
  }
  /**
  True when `anchor` and `head` are at the same position.
  */
  get empty() {
    return this.from == this.to;
  }
  /**
  If this is a cursor that is explicitly associated with the
  character on one of its sides, this returns the side. -1 means
  the character before its position, 1 the character after, and 0
  means no association.
  */
  get assoc() {
    return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
  }
  /**
  The bidirectional text level associated with this cursor, if
  any.
  */
  get bidiLevel() {
    let e = this.flags & 7;
    return e == 7 ? null : e;
  }
  /**
  The goal column (stored vertical offset) associated with a
  cursor. This is used to preserve the vertical position when
  [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
  lines of different length.
  */
  get goalColumn() {
    let e = this.flags >> 6;
    return e == 16777215 ? void 0 : e;
  }
  /**
  Map this range through a change, producing a valid range in the
  updated document.
  */
  map(e, n = -1) {
    let r, i;
    return this.empty ? r = i = e.mapPos(this.from, n) : (r = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), r == this.from && i == this.to ? this : new Wc(r, i, this.flags);
  }
  /**
  Extend this range to cover at least `from` to `to`.
  */
  extend(e, n = e) {
    if (e <= this.anchor && n >= this.anchor)
      return me.range(e, n);
    let r = Math.abs(e - this.anchor) > Math.abs(n - this.anchor) ? e : n;
    return me.range(this.anchor, r);
  }
  /**
  Compare this range to another range.
  */
  eq(e, n = !1) {
    return this.anchor == e.anchor && this.head == e.head && (!n || !this.empty || this.assoc == e.assoc);
  }
  /**
  Return a JSON-serializable object representing the range.
  */
  toJSON() {
    return { anchor: this.anchor, head: this.head };
  }
  /**
  Convert a JSON representation of a range to a `SelectionRange`
  instance.
  */
  static fromJSON(e) {
    if (!e || typeof e.anchor != "number" || typeof e.head != "number")
      throw new RangeError("Invalid JSON representation for SelectionRange");
    return me.range(e.anchor, e.head);
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new Wc(e, n, r);
  }
}
class me {
  constructor(e, n) {
    this.ranges = e, this.mainIndex = n;
  }
  /**
  Map a selection through a change. Used to adjust the selection
  position for changes.
  */
  map(e, n = -1) {
    return e.empty ? this : me.create(this.ranges.map((r) => r.map(e, n)), this.mainIndex);
  }
  /**
  Compare this selection to another selection. By default, ranges
  are compared only by position. When `includeAssoc` is true,
  cursor ranges must also have the same
  [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
  */
  eq(e, n = !1) {
    if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
      return !1;
    for (let r = 0; r < this.ranges.length; r++)
      if (!this.ranges[r].eq(e.ranges[r], n))
        return !1;
    return !0;
  }
  /**
  Get the primary selection range. Usually, you should make sure
  your code applies to _all_ ranges, by using methods like
  [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
  */
  get main() {
    return this.ranges[this.mainIndex];
  }
  /**
  Make sure the selection only has one range. Returns a selection
  holding only the main range from this selection.
  */
  asSingle() {
    return this.ranges.length == 1 ? this : new me([this.main], 0);
  }
  /**
  Extend this selection with an extra range.
  */
  addRange(e, n = !0) {
    return me.create([e].concat(this.ranges), n ? 0 : this.mainIndex + 1);
  }
  /**
  Replace a given range with another range, and then normalize the
  selection to merge and sort ranges if necessary.
  */
  replaceRange(e, n = this.mainIndex) {
    let r = this.ranges.slice();
    return r[n] = e, me.create(r, this.mainIndex);
  }
  /**
  Convert this selection to an object that can be serialized to
  JSON.
  */
  toJSON() {
    return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
  }
  /**
  Create a selection from a JSON representation.
  */
  static fromJSON(e) {
    if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
      throw new RangeError("Invalid JSON representation for EditorSelection");
    return new me(e.ranges.map((n) => Wc.fromJSON(n)), e.main);
  }
  /**
  Create a selection holding a single range.
  */
  static single(e, n = e) {
    return new me([me.range(e, n)], 0);
  }
  /**
  Sort and merge the given set of ranges, creating a valid
  selection.
  */
  static create(e, n = 0) {
    if (e.length == 0)
      throw new RangeError("A selection needs at least one range");
    for (let r = 0, i = 0; i < e.length; i++) {
      let a = e[i];
      if (a.empty ? a.from <= r : a.from < r)
        return me.normalized(e.slice(), n);
      r = a.to;
    }
    return new me(e, n);
  }
  /**
  Create a cursor selection range at the given position. You can
  safely ignore the optional arguments in most situations.
  */
  static cursor(e, n = 0, r, i) {
    return Wc.create(e, e, (n == 0 ? 0 : n < 0 ? 8 : 16) | (r == null ? 7 : Math.min(6, r)) | (i ?? 16777215) << 6);
  }
  /**
  Create a selection range.
  */
  static range(e, n, r, i) {
    let a = (r ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
    return n < e ? Wc.create(n, e, 48 | a) : Wc.create(e, n, (n > e ? 8 : 0) | a);
  }
  /**
  @internal
  */
  static normalized(e, n = 0) {
    let r = e[n];
    e.sort((i, a) => i.from - a.from), n = e.indexOf(r);
    for (let i = 1; i < e.length; i++) {
      let a = e[i], o = e[i - 1];
      if (a.empty ? a.from <= o.to : a.from < o.to) {
        let s = o.from, l = Math.max(a.to, o.to);
        i <= n && n--, e.splice(--i, 2, a.anchor > a.head ? me.range(l, s) : me.range(s, l));
      }
    }
    return new me(e, n);
  }
}
function oae(t, e) {
  for (let n of t.ranges)
    if (n.to > e)
      throw new RangeError("Selection points outside of document");
}
let JL = 0;
class Be {
  constructor(e, n, r, i, a) {
    this.combine = e, this.compareInput = n, this.compare = r, this.isStatic = i, this.id = JL++, this.default = e([]), this.extensions = typeof a == "function" ? a(this) : a;
  }
  /**
  Returns a facet reader for this facet, which can be used to
  [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
  */
  get reader() {
    return this;
  }
  /**
  Define a new facet.
  */
  static define(e = {}) {
    return new Be(e.combine || ((n) => n), e.compareInput || ((n, r) => n === r), e.compare || (e.combine ? (n, r) => n === r : e4), !!e.static, e.enables);
  }
  /**
  Returns an extension that adds the given value to this facet.
  */
  of(e) {
    return new r1([], this, 0, e);
  }
  /**
  Create an extension that computes a value for the facet from a
  state. You must take care to declare the parts of the state that
  this value depends on, since your function is only called again
  for a new state when one of those parts changed.
  
  In cases where your value depends only on a single field, you'll
  want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
  */
  compute(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new r1(e, this, 1, n);
  }
  /**
  Create an extension that computes zero or more values for this
  facet from a state.
  */
  computeN(e, n) {
    if (this.isStatic)
      throw new Error("Can't compute a static facet");
    return new r1(e, this, 2, n);
  }
  from(e, n) {
    return n || (n = (r) => r), this.compute([e], (r) => n(r.field(e)));
  }
}
function e4(t, e) {
  return t == e || t.length == e.length && t.every((n, r) => n === e[r]);
}
class r1 {
  constructor(e, n, r, i) {
    this.dependencies = e, this.facet = n, this.type = r, this.value = i, this.id = JL++;
  }
  dynamicSlot(e) {
    var n;
    let r = this.value, i = this.facet.compareInput, a = this.id, o = e[a] >> 1, s = this.type == 2, l = !1, u = !1, c = [];
    for (let f of this.dependencies)
      f == "doc" ? l = !0 : f == "selection" ? u = !0 : ((n = e[f.id]) !== null && n !== void 0 ? n : 1) & 1 || c.push(e[f.id]);
    return {
      create(f) {
        return f.values[o] = r(f), 1;
      },
      update(f, d) {
        if (l && d.docChanged || u && (d.docChanged || d.selection) || iM(f, c)) {
          let h = r(f);
          if (s ? !xH(h, f.values[o], i) : !i(h, f.values[o]))
            return f.values[o] = h, 1;
        }
        return 0;
      },
      reconfigure: (f, d) => {
        let h, p = d.config.address[a];
        if (p != null) {
          let v = tS(d, p);
          if (this.dependencies.every((g) => g instanceof Be ? d.facet(g) === f.facet(g) : g instanceof ur ? d.field(g, !1) == f.field(g, !1) : !0) || (s ? xH(h = r(f), v, i) : i(h = r(f), v)))
            return f.values[o] = v, 0;
        } else
          h = r(f);
        return f.values[o] = h, 1;
      }
    };
  }
}
function xH(t, e, n) {
  if (t.length != e.length)
    return !1;
  for (let r = 0; r < t.length; r++)
    if (!n(t[r], e[r]))
      return !1;
  return !0;
}
function iM(t, e) {
  let n = !1;
  for (let r of e)
    Fg(t, r) & 1 && (n = !0);
  return n;
}
function vat(t, e, n) {
  let r = n.map((l) => t[l.id]), i = n.map((l) => l.type), a = r.filter((l) => !(l & 1)), o = t[e.id] >> 1;
  function s(l) {
    let u = [];
    for (let c = 0; c < r.length; c++) {
      let f = tS(l, r[c]);
      if (i[c] == 2)
        for (let d of f)
          u.push(d);
      else
        u.push(f);
    }
    return e.combine(u);
  }
  return {
    create(l) {
      for (let u of r)
        Fg(l, u);
      return l.values[o] = s(l), 1;
    },
    update(l, u) {
      if (!iM(l, a))
        return 0;
      let c = s(l);
      return e.compare(c, l.values[o]) ? 0 : (l.values[o] = c, 1);
    },
    reconfigure(l, u) {
      let c = iM(l, r), f = u.config.facets[e.id], d = u.facet(e);
      if (f && !c && e4(n, f))
        return l.values[o] = d, 0;
      let h = s(l);
      return e.compare(h, d) ? (l.values[o] = d, 0) : (l.values[o] = h, 1);
    }
  };
}
const wH = /* @__PURE__ */ Be.define({ static: !0 });
class ur {
  constructor(e, n, r, i, a) {
    this.id = e, this.createF = n, this.updateF = r, this.compareF = i, this.spec = a, this.provides = void 0;
  }
  /**
  Define a state field.
  */
  static define(e) {
    let n = new ur(JL++, e.create, e.update, e.compare || ((r, i) => r === i), e);
    return e.provide && (n.provides = e.provide(n)), n;
  }
  create(e) {
    let n = e.facet(wH).find((r) => r.field == this);
    return ((n == null ? void 0 : n.create) || this.createF)(e);
  }
  /**
  @internal
  */
  slot(e) {
    let n = e[this.id] >> 1;
    return {
      create: (r) => (r.values[n] = this.create(r), 1),
      update: (r, i) => {
        let a = r.values[n], o = this.updateF(a, i);
        return this.compareF(a, o) ? 0 : (r.values[n] = o, 1);
      },
      reconfigure: (r, i) => i.config.address[this.id] != null ? (r.values[n] = i.field(this), 0) : (r.values[n] = this.create(r), 1)
    };
  }
  /**
  Returns an extension that enables this field and overrides the
  way it is initialized. Can be useful when you need to provide a
  non-default starting value for the field.
  */
  init(e) {
    return [this, wH.of({ field: this, create: e })];
  }
  /**
  State field instances can be used as
  [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
  given state.
  */
  get extension() {
    return this;
  }
}
const Pc = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
function Pv(t) {
  return (e) => new sae(e, t);
}
const Eu = {
  /**
  The highest precedence level, for extensions that should end up
  near the start of the precedence ordering.
  */
  highest: /* @__PURE__ */ Pv(Pc.highest),
  /**
  A higher-than-default precedence, for extensions that should
  come before those with default precedence.
  */
  high: /* @__PURE__ */ Pv(Pc.high),
  /**
  The default precedence, which is also used for extensions
  without an explicit precedence.
  */
  default: /* @__PURE__ */ Pv(Pc.default),
  /**
  A lower-than-default precedence.
  */
  low: /* @__PURE__ */ Pv(Pc.low),
  /**
  The lowest precedence level. Meant for things that should end up
  near the end of the extension order.
  */
  lowest: /* @__PURE__ */ Pv(Pc.lowest)
};
class sae {
  constructor(e, n) {
    this.inner = e, this.prec = n;
  }
}
class ry {
  /**
  Create an instance of this compartment to add to your [state
  configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
  */
  of(e) {
    return new aM(this, e);
  }
  /**
  Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
  reconfigures this compartment.
  */
  reconfigure(e) {
    return ry.reconfigure.of({ compartment: this, extension: e });
  }
  /**
  Get the current content of the compartment in the state, or
  `undefined` if it isn't present.
  */
  get(e) {
    return e.config.compartments.get(this);
  }
}
class aM {
  constructor(e, n) {
    this.compartment = e, this.inner = n;
  }
}
class eS {
  constructor(e, n, r, i, a, o) {
    for (this.base = e, this.compartments = n, this.dynamicSlots = r, this.address = i, this.staticValues = a, this.facets = o, this.statusTemplate = []; this.statusTemplate.length < r.length; )
      this.statusTemplate.push(
        0
        /* SlotStatus.Unresolved */
      );
  }
  staticFacet(e) {
    let n = this.address[e.id];
    return n == null ? e.default : this.staticValues[n >> 1];
  }
  static resolve(e, n, r) {
    let i = [], a = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
    for (let d of gat(e, n, o))
      d instanceof ur ? i.push(d) : (a[d.facet.id] || (a[d.facet.id] = [])).push(d);
    let s = /* @__PURE__ */ Object.create(null), l = [], u = [];
    for (let d of i)
      s[d.id] = u.length << 1, u.push((h) => d.slot(h));
    let c = r == null ? void 0 : r.config.facets;
    for (let d in a) {
      let h = a[d], p = h[0].facet, v = c && c[d] || [];
      if (h.every(
        (g) => g.type == 0
        /* Provider.Static */
      ))
        if (s[p.id] = l.length << 1 | 1, e4(v, h))
          l.push(r.facet(p));
        else {
          let g = p.combine(h.map((m) => m.value));
          l.push(r && p.compare(g, r.facet(p)) ? r.facet(p) : g);
        }
      else {
        for (let g of h)
          g.type == 0 ? (s[g.id] = l.length << 1 | 1, l.push(g.value)) : (s[g.id] = u.length << 1, u.push((m) => g.dynamicSlot(m)));
        s[p.id] = u.length << 1, u.push((g) => vat(g, p, h));
      }
    }
    let f = u.map((d) => d(s));
    return new eS(e, o, f, s, l, a);
  }
}
function gat(t, e, n) {
  let r = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
  function a(o, s) {
    let l = i.get(o);
    if (l != null) {
      if (l <= s)
        return;
      let u = r[l].indexOf(o);
      u > -1 && r[l].splice(u, 1), o instanceof aM && n.delete(o.compartment);
    }
    if (i.set(o, s), Array.isArray(o))
      for (let u of o)
        a(u, s);
    else if (o instanceof aM) {
      if (n.has(o.compartment))
        throw new RangeError("Duplicate use of compartment in extensions");
      let u = e.get(o.compartment) || o.inner;
      n.set(o.compartment, u), a(u, s);
    } else if (o instanceof sae)
      a(o.inner, o.prec);
    else if (o instanceof ur)
      r[s].push(o), o.provides && a(o.provides, s);
    else if (o instanceof r1)
      r[s].push(o), o.facet.extensions && a(o.facet.extensions, Pc.default);
    else {
      let u = o.extension;
      if (!u)
        throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
      a(u, s);
    }
  }
  return a(t, Pc.default), r.reduce((o, s) => o.concat(s));
}
function Fg(t, e) {
  if (e & 1)
    return 2;
  let n = e >> 1, r = t.status[n];
  if (r == 4)
    throw new Error("Cyclic dependency between fields and/or facets");
  if (r & 2)
    return r;
  t.status[n] = 4;
  let i = t.computeSlot(t, t.config.dynamicSlots[n]);
  return t.status[n] = 2 | i;
}
function tS(t, e) {
  return e & 1 ? t.config.staticValues[e >> 1] : t.values[e >> 1];
}
const lae = /* @__PURE__ */ Be.define(), oM = /* @__PURE__ */ Be.define({
  combine: (t) => t.some((e) => e),
  static: !0
}), uae = /* @__PURE__ */ Be.define({
  combine: (t) => t.length ? t[0] : void 0,
  static: !0
}), cae = /* @__PURE__ */ Be.define(), fae = /* @__PURE__ */ Be.define(), dae = /* @__PURE__ */ Be.define(), hae = /* @__PURE__ */ Be.define({
  combine: (t) => t.length ? t[0] : !1
});
class ul {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Define a new type of annotation.
  */
  static define() {
    return new mat();
  }
}
class mat {
  /**
  Create an instance of this annotation.
  */
  of(e) {
    return new ul(this, e);
  }
}
class yat {
  /**
  @internal
  */
  constructor(e) {
    this.map = e;
  }
  /**
  Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
  type.
  */
  of(e) {
    return new dt(this, e);
  }
}
class dt {
  /**
  @internal
  */
  constructor(e, n) {
    this.type = e, this.value = n;
  }
  /**
  Map this effect through a position mapping. Will return
  `undefined` when that ends up deleting the effect.
  */
  map(e) {
    let n = this.type.map(this.value, e);
    return n === void 0 ? void 0 : n == this.value ? this : new dt(this.type, n);
  }
  /**
  Tells you whether this effect object is of a given
  [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
  */
  is(e) {
    return this.type == e;
  }
  /**
  Define a new effect type. The type parameter indicates the type
  of values that his effect holds. It should be a type that
  doesn't include `undefined`, since that is used in
  [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
  removed.
  */
  static define(e = {}) {
    return new yat(e.map || ((n) => n));
  }
  /**
  Map an array of effects through a change set.
  */
  static mapEffects(e, n) {
    if (!e.length)
      return e;
    let r = [];
    for (let i of e) {
      let a = i.map(n);
      a && r.push(a);
    }
    return r;
  }
}
dt.reconfigure = /* @__PURE__ */ dt.define();
dt.appendConfig = /* @__PURE__ */ dt.define();
class Fn {
  constructor(e, n, r, i, a, o) {
    this.startState = e, this.changes = n, this.selection = r, this.effects = i, this.annotations = a, this.scrollIntoView = o, this._doc = null, this._state = null, r && oae(r, n.newLength), a.some((s) => s.type == Fn.time) || (this.annotations = a.concat(Fn.time.of(Date.now())));
  }
  /**
  @internal
  */
  static create(e, n, r, i, a, o) {
    return new Fn(e, n, r, i, a, o);
  }
  /**
  The new document produced by the transaction. Contrary to
  [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
  force the entire new state to be computed right away, so it is
  recommended that [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
  when they need to look at the new document.
  */
  get newDoc() {
    return this._doc || (this._doc = this.changes.apply(this.startState.doc));
  }
  /**
  The new selection produced by the transaction. If
  [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
  this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
  current selection through the changes made by the transaction.
  */
  get newSelection() {
    return this.selection || this.startState.selection.map(this.changes);
  }
  /**
  The new state created by the transaction. Computed on demand
  (but retained for subsequent access), so it is recommended not to
  access it in [transaction
  filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
  */
  get state() {
    return this._state || this.startState.applyTransaction(this), this._state;
  }
  /**
  Get the value of the given annotation type, if any.
  */
  annotation(e) {
    for (let n of this.annotations)
      if (n.type == e)
        return n.value;
  }
  /**
  Indicates whether the transaction changed the document.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Indicates whether this transaction reconfigures the state
  (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
  with a top-level configuration
  [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
  */
  get reconfigured() {
    return this.startState.config != this.state.config;
  }
  /**
  Returns true if the transaction has a [user
  event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
  or more specific than `event`. For example, if the transaction
  has `"select.pointer"` as user event, `"select"` and
  `"select.pointer"` will match it.
  */
  isUserEvent(e) {
    let n = this.annotation(Fn.userEvent);
    return !!(n && (n == e || n.length > e.length && n.slice(0, e.length) == e && n[e.length] == "."));
  }
}
Fn.time = /* @__PURE__ */ ul.define();
Fn.userEvent = /* @__PURE__ */ ul.define();
Fn.addToHistory = /* @__PURE__ */ ul.define();
Fn.remote = /* @__PURE__ */ ul.define();
function bat(t, e) {
  let n = [];
  for (let r = 0, i = 0; ; ) {
    let a, o;
    if (r < t.length && (i == e.length || e[i] >= t[r]))
      a = t[r++], o = t[r++];
    else if (i < e.length)
      a = e[i++], o = e[i++];
    else
      return n;
    !n.length || n[n.length - 1] < a ? n.push(a, o) : n[n.length - 1] < o && (n[n.length - 1] = o);
  }
}
function pae(t, e, n) {
  var r;
  let i, a, o;
  return n ? (i = e.changes, a = jn.empty(e.changes.length), o = t.changes.compose(e.changes)) : (i = e.changes.map(t.changes), a = t.changes.mapDesc(e.changes, !0), o = t.changes.compose(i)), {
    changes: o,
    selection: e.selection ? e.selection.map(a) : (r = t.selection) === null || r === void 0 ? void 0 : r.map(i),
    effects: dt.mapEffects(t.effects, i).concat(dt.mapEffects(e.effects, a)),
    annotations: t.annotations.length ? t.annotations.concat(e.annotations) : e.annotations,
    scrollIntoView: t.scrollIntoView || e.scrollIntoView
  };
}
function sM(t, e, n) {
  let r = e.selection, i = sh(e.annotations);
  return e.userEvent && (i = i.concat(Fn.userEvent.of(e.userEvent))), {
    changes: e.changes instanceof jn ? e.changes : jn.of(e.changes || [], n, t.facet(uae)),
    selection: r && (r instanceof me ? r : me.single(r.anchor, r.head)),
    effects: sh(e.effects),
    annotations: i,
    scrollIntoView: !!e.scrollIntoView
  };
}
function vae(t, e, n) {
  let r = sM(t, e.length ? e[0] : {}, t.doc.length);
  e.length && e[0].filter === !1 && (n = !1);
  for (let a = 1; a < e.length; a++) {
    e[a].filter === !1 && (n = !1);
    let o = !!e[a].sequential;
    r = pae(r, sM(t, e[a], o ? r.changes.newLength : t.doc.length), o);
  }
  let i = Fn.create(t, r.changes, r.selection, r.effects, r.annotations, r.scrollIntoView);
  return Oat(n ? _at(i) : i);
}
function _at(t) {
  let e = t.startState, n = !0;
  for (let i of e.facet(cae)) {
    let a = i(t);
    if (a === !1) {
      n = !1;
      break;
    }
    Array.isArray(a) && (n = n === !0 ? a : bat(n, a));
  }
  if (n !== !0) {
    let i, a;
    if (n === !1)
      a = t.changes.invertedDesc, i = jn.empty(e.doc.length);
    else {
      let o = t.changes.filter(n);
      i = o.changes, a = o.filtered.mapDesc(o.changes).invertedDesc;
    }
    t = Fn.create(e, i, t.selection && t.selection.map(a), dt.mapEffects(t.effects, a), t.annotations, t.scrollIntoView);
  }
  let r = e.facet(fae);
  for (let i = r.length - 1; i >= 0; i--) {
    let a = r[i](t);
    a instanceof Fn ? t = a : Array.isArray(a) && a.length == 1 && a[0] instanceof Fn ? t = a[0] : t = vae(e, sh(a), !1);
  }
  return t;
}
function Oat(t) {
  let e = t.startState, n = e.facet(dae), r = t;
  for (let i = n.length - 1; i >= 0; i--) {
    let a = n[i](t);
    a && Object.keys(a).length && (r = pae(r, sM(e, a, t.changes.newLength), !0));
  }
  return r == t ? t : Fn.create(e, t.changes, t.selection, r.effects, r.annotations, r.scrollIntoView);
}
const Sat = [];
function sh(t) {
  return t == null ? Sat : Array.isArray(t) ? t : [t];
}
var yn = /* @__PURE__ */ function(t) {
  return t[t.Word = 0] = "Word", t[t.Space = 1] = "Space", t[t.Other = 2] = "Other", t;
}(yn || (yn = {}));
const xat = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
let lM;
try {
  lM = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
} catch {
}
function wat(t) {
  if (lM)
    return lM.test(t);
  for (let e = 0; e < t.length; e++) {
    let n = t[e];
    if (/\w/.test(n) || n > "" && (n.toUpperCase() != n.toLowerCase() || xat.test(n)))
      return !0;
  }
  return !1;
}
function Cat(t) {
  return (e) => {
    if (!/\S/.test(e))
      return yn.Space;
    if (wat(e))
      return yn.Word;
    for (let n = 0; n < t.length; n++)
      if (e.indexOf(t[n]) > -1)
        return yn.Word;
    return yn.Other;
  };
}
class At {
  constructor(e, n, r, i, a, o) {
    this.config = e, this.doc = n, this.selection = r, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = a, o && (o._state = this);
    for (let s = 0; s < this.config.dynamicSlots.length; s++)
      Fg(this, s << 1);
    this.computeSlot = null;
  }
  field(e, n = !0) {
    let r = this.config.address[e.id];
    if (r == null) {
      if (n)
        throw new RangeError("Field is not present in this state");
      return;
    }
    return Fg(this, r), tS(this, r);
  }
  /**
  Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
  state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
  can be passed. Unless
  [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
  [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
  are assumed to start in the _current_ document (not the document
  produced by previous specs), and its
  [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
  [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
  to the document created by its _own_ changes. The resulting
  transaction contains the combined effect of all the different
  specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
  specs take precedence over earlier ones.
  */
  update(...e) {
    return vae(this, e, !0);
  }
  /**
  @internal
  */
  applyTransaction(e) {
    let n = this.config, { base: r, compartments: i } = n;
    for (let s of e.effects)
      s.is(ry.reconfigure) ? (n && (i = /* @__PURE__ */ new Map(), n.compartments.forEach((l, u) => i.set(u, l)), n = null), i.set(s.value.compartment, s.value.extension)) : s.is(dt.reconfigure) ? (n = null, r = s.value) : s.is(dt.appendConfig) && (n = null, r = sh(r).concat(s.value));
    let a;
    n ? a = e.startState.values.slice() : (n = eS.resolve(r, i, this), a = new At(n, this.doc, this.selection, n.dynamicSlots.map(() => null), (l, u) => u.reconfigure(l, this), null).values);
    let o = e.startState.facet(oM) ? e.newSelection : e.newSelection.asSingle();
    new At(n, e.newDoc, o, a, (s, l) => l.update(s, e), e);
  }
  /**
  Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
  replaces every selection range with the given content.
  */
  replaceSelection(e) {
    return typeof e == "string" && (e = this.toText(e)), this.changeByRange((n) => ({
      changes: { from: n.from, to: n.to, insert: e },
      range: me.cursor(n.from + e.length)
    }));
  }
  /**
  Create a set of changes and a new selection by running the given
  function for each range in the active selection. The function
  can return an optional set of changes (in the coordinate space
  of the start document), plus an updated range (in the coordinate
  space of the document produced by the call's own changes). This
  method will merge all the changes and ranges into a single
  changeset and selection, and return it as a [transaction
  spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
  [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
  */
  changeByRange(e) {
    let n = this.selection, r = e(n.ranges[0]), i = this.changes(r.changes), a = [r.range], o = sh(r.effects);
    for (let s = 1; s < n.ranges.length; s++) {
      let l = e(n.ranges[s]), u = this.changes(l.changes), c = u.map(i);
      for (let d = 0; d < s; d++)
        a[d] = a[d].map(c);
      let f = i.mapDesc(u, !0);
      a.push(l.range.map(f)), i = i.compose(c), o = dt.mapEffects(o, c).concat(dt.mapEffects(sh(l.effects), f));
    }
    return {
      changes: i,
      selection: me.create(a, n.mainIndex),
      effects: o
    };
  }
  /**
  Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
  description, taking the state's document length and line
  separator into account.
  */
  changes(e = []) {
    return e instanceof jn ? e : jn.of(e, this.doc.length, this.facet(At.lineSeparator));
  }
  /**
  Using the state's [line
  separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
  [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
  */
  toText(e) {
    return Ft.of(e.split(this.facet(At.lineSeparator) || tM));
  }
  /**
  Return the given range of the document as a string.
  */
  sliceDoc(e = 0, n = this.doc.length) {
    return this.doc.sliceString(e, n, this.lineBreak);
  }
  /**
  Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
  */
  facet(e) {
    let n = this.config.address[e.id];
    return n == null ? e.default : (Fg(this, n), tS(this, n));
  }
  /**
  Convert this state to a JSON-serializable object. When custom
  fields should be serialized, you can pass them in as an object
  mapping property names (in the resulting object, which should
  not use `doc` or `selection`) to fields.
  */
  toJSON(e) {
    let n = {
      doc: this.sliceDoc(),
      selection: this.selection.toJSON()
    };
    if (e)
      for (let r in e) {
        let i = e[r];
        i instanceof ur && this.config.address[i.id] != null && (n[r] = i.spec.toJSON(this.field(e[r]), this));
      }
    return n;
  }
  /**
  Deserialize a state from its JSON representation. When custom
  fields should be deserialized, pass the same object you passed
  to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
  third argument.
  */
  static fromJSON(e, n = {}, r) {
    if (!e || typeof e.doc != "string")
      throw new RangeError("Invalid JSON representation for EditorState");
    let i = [];
    if (r) {
      for (let a in r)
        if (Object.prototype.hasOwnProperty.call(e, a)) {
          let o = r[a], s = e[a];
          i.push(o.init((l) => o.spec.fromJSON(s, l)));
        }
    }
    return At.create({
      doc: e.doc,
      selection: me.fromJSON(e.selection),
      extensions: n.extensions ? i.concat([n.extensions]) : i
    });
  }
  /**
  Create a new state. You'll usually only need this when
  initializing an editor—updated states are created by applying
  transactions.
  */
  static create(e = {}) {
    let n = eS.resolve(e.extensions || [], /* @__PURE__ */ new Map()), r = e.doc instanceof Ft ? e.doc : Ft.of((e.doc || "").split(n.staticFacet(At.lineSeparator) || tM)), i = e.selection ? e.selection instanceof me ? e.selection : me.single(e.selection.anchor, e.selection.head) : me.single(0);
    return oae(i, r.length), n.staticFacet(oM) || (i = i.asSingle()), new At(n, r, i, n.dynamicSlots.map(() => null), (a, o) => o.create(a), null);
  }
  /**
  The size (in columns) of a tab in the document, determined by
  the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
  */
  get tabSize() {
    return this.facet(At.tabSize);
  }
  /**
  Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
  string for this state.
  */
  get lineBreak() {
    return this.facet(At.lineSeparator) || `
`;
  }
  /**
  Returns true when the editor is
  [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
  */
  get readOnly() {
    return this.facet(hae);
  }
  /**
  Look up a translation for the given phrase (via the
  [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
  original string if no translation is found.
  
  If additional arguments are passed, they will be inserted in
  place of markers like `$1` (for the first value) and `$2`, etc.
  A single `$` is equivalent to `$1`, and `$$` will produce a
  literal dollar sign.
  */
  phrase(e, ...n) {
    for (let r of this.facet(At.phrases))
      if (Object.prototype.hasOwnProperty.call(r, e)) {
        e = r[e];
        break;
      }
    return n.length && (e = e.replace(/\$(\$|\d*)/g, (r, i) => {
      if (i == "$")
        return "$";
      let a = +(i || 1);
      return !a || a > n.length ? r : n[a - 1];
    })), e;
  }
  /**
  Find the values for a given language data field, provided by the
  the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
  
  Examples of language data fields are...
  
  - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
    comment syntax.
  - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
    for providing language-specific completion sources.
  - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
    characters that should be considered part of words in this
    language.
  - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
    bracket closing behavior.
  */
  languageDataAt(e, n, r = -1) {
    let i = [];
    for (let a of this.facet(lae))
      for (let o of a(this, n, r))
        Object.prototype.hasOwnProperty.call(o, e) && i.push(o[e]);
    return i;
  }
  /**
  Return a function that can categorize strings (expected to
  represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
  into one of:
  
   - Word (contains an alphanumeric character or a character
     explicitly listed in the local language's `"wordChars"`
     language data, which should be a string)
   - Space (contains only whitespace)
   - Other (anything else)
  */
  charCategorizer(e) {
    return Cat(this.languageDataAt("wordChars", e).join(""));
  }
  /**
  Find the word at the given position, meaning the range
  containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
  around it. If no word characters are adjacent to the position,
  this returns null.
  */
  wordAt(e) {
    let { text: n, from: r, length: i } = this.doc.lineAt(e), a = this.charCategorizer(e), o = e - r, s = e - r;
    for (; o > 0; ) {
      let l = _r(n, o, !1);
      if (a(n.slice(l, o)) != yn.Word)
        break;
      o = l;
    }
    for (; s < i; ) {
      let l = _r(n, s);
      if (a(n.slice(s, l)) != yn.Word)
        break;
      s = l;
    }
    return o == s ? null : me.range(o + r, s + r);
  }
}
At.allowMultipleSelections = oM;
At.tabSize = /* @__PURE__ */ Be.define({
  combine: (t) => t.length ? t[0] : 4
});
At.lineSeparator = uae;
At.readOnly = hae;
At.phrases = /* @__PURE__ */ Be.define({
  compare(t, e) {
    let n = Object.keys(t), r = Object.keys(e);
    return n.length == r.length && n.every((i) => t[i] == e[i]);
  }
});
At.languageData = lae;
At.changeFilter = cae;
At.transactionFilter = fae;
At.transactionExtender = dae;
ry.reconfigure = /* @__PURE__ */ dt.define();
function fs(t, e, n = {}) {
  let r = {};
  for (let i of t)
    for (let a of Object.keys(i)) {
      let o = i[a], s = r[a];
      if (s === void 0)
        r[a] = o;
      else if (!(s === o || o === void 0)) if (Object.hasOwnProperty.call(n, a))
        r[a] = n[a](s, o);
      else
        throw new Error("Config merge conflict for field " + a);
    }
  for (let i in e)
    r[i] === void 0 && (r[i] = e[i]);
  return r;
}
class wf {
  /**
  Compare this value with another value. Used when comparing
  rangesets. The default implementation compares by identity.
  Unless you are only creating a fixed number of unique instances
  of your value type, it is a good idea to implement this
  properly.
  */
  eq(e) {
    return this == e;
  }
  /**
  Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
  */
  range(e, n = e) {
    return uM.create(e, n, this);
  }
}
wf.prototype.startSide = wf.prototype.endSide = 0;
wf.prototype.point = !1;
wf.prototype.mapMode = yr.TrackDel;
let uM = class gae {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.value = r;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new gae(e, n, r);
  }
};
function cM(t, e) {
  return t.from - e.from || t.value.startSide - e.value.startSide;
}
class t4 {
  constructor(e, n, r, i) {
    this.from = e, this.to = n, this.value = r, this.maxPoint = i;
  }
  get length() {
    return this.to[this.to.length - 1];
  }
  // Find the index of the given position and side. Use the ranges'
  // `from` pos when `end == false`, `to` when `end == true`.
  findIndex(e, n, r, i = 0) {
    let a = r ? this.to : this.from;
    for (let o = i, s = a.length; ; ) {
      if (o == s)
        return o;
      let l = o + s >> 1, u = a[l] - e || (r ? this.value[l].endSide : this.value[l].startSide) - n;
      if (l == o)
        return u >= 0 ? o : s;
      u >= 0 ? s = l : o = l + 1;
    }
  }
  between(e, n, r, i) {
    for (let a = this.findIndex(n, -1e9, !0), o = this.findIndex(r, 1e9, !1, a); a < o; a++)
      if (i(this.from[a] + e, this.to[a] + e, this.value[a]) === !1)
        return !1;
  }
  map(e, n) {
    let r = [], i = [], a = [], o = -1, s = -1;
    for (let l = 0; l < this.value.length; l++) {
      let u = this.value[l], c = this.from[l] + e, f = this.to[l] + e, d, h;
      if (c == f) {
        let p = n.mapPos(c, u.startSide, u.mapMode);
        if (p == null || (d = h = p, u.startSide != u.endSide && (h = n.mapPos(c, u.endSide), h < d)))
          continue;
      } else if (d = n.mapPos(c, u.startSide), h = n.mapPos(f, u.endSide), d > h || d == h && u.startSide > 0 && u.endSide <= 0)
        continue;
      (h - d || u.endSide - u.startSide) < 0 || (o < 0 && (o = d), u.point && (s = Math.max(s, h - d)), r.push(u), i.push(d - o), a.push(h - o));
    }
    return { mapped: r.length ? new t4(i, a, r, s) : null, pos: o };
  }
}
class Vt {
  constructor(e, n, r, i) {
    this.chunkPos = e, this.chunk = n, this.nextLayer = r, this.maxPoint = i;
  }
  /**
  @internal
  */
  static create(e, n, r, i) {
    return new Vt(e, n, r, i);
  }
  /**
  @internal
  */
  get length() {
    let e = this.chunk.length - 1;
    return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
  }
  /**
  The number of ranges in the set.
  */
  get size() {
    if (this.isEmpty)
      return 0;
    let e = this.nextLayer.size;
    for (let n of this.chunk)
      e += n.value.length;
    return e;
  }
  /**
  @internal
  */
  chunkEnd(e) {
    return this.chunkPos[e] + this.chunk[e].length;
  }
  /**
  Update the range set, optionally adding new ranges or filtering
  out existing ones.
  
  (Note: The type parameter is just there as a kludge to work
  around TypeScript variance issues that prevented `RangeSet<X>`
  from being a subtype of `RangeSet<Y>` when `X` is a subtype of
  `Y`.)
  */
  update(e) {
    let { add: n = [], sort: r = !1, filterFrom: i = 0, filterTo: a = this.length } = e, o = e.filter;
    if (n.length == 0 && !o)
      return this;
    if (r && (n = n.slice().sort(cM)), this.isEmpty)
      return n.length ? Vt.of(n) : this;
    let s = new mae(this, null, -1).goto(0), l = 0, u = [], c = new hu();
    for (; s.value || l < n.length; )
      if (l < n.length && (s.from - n[l].from || s.startSide - n[l].value.startSide) >= 0) {
        let f = n[l++];
        c.addInner(f.from, f.to, f.value) || u.push(f);
      } else s.rangeIndex == 1 && s.chunkIndex < this.chunk.length && (l == n.length || this.chunkEnd(s.chunkIndex) < n[l].from) && (!o || i > this.chunkEnd(s.chunkIndex) || a < this.chunkPos[s.chunkIndex]) && c.addChunk(this.chunkPos[s.chunkIndex], this.chunk[s.chunkIndex]) ? s.nextChunk() : ((!o || i > s.to || a < s.from || o(s.from, s.to, s.value)) && (c.addInner(s.from, s.to, s.value) || u.push(uM.create(s.from, s.to, s.value))), s.next());
    return c.finishInner(this.nextLayer.isEmpty && !u.length ? Vt.empty : this.nextLayer.update({ add: u, filter: o, filterFrom: i, filterTo: a }));
  }
  /**
  Map this range set through a set of changes, return the new set.
  */
  map(e) {
    if (e.empty || this.isEmpty)
      return this;
    let n = [], r = [], i = -1;
    for (let o = 0; o < this.chunk.length; o++) {
      let s = this.chunkPos[o], l = this.chunk[o], u = e.touchesRange(s, s + l.length);
      if (u === !1)
        i = Math.max(i, l.maxPoint), n.push(l), r.push(e.mapPos(s));
      else if (u === !0) {
        let { mapped: c, pos: f } = l.map(s, e);
        c && (i = Math.max(i, c.maxPoint), n.push(c), r.push(f));
      }
    }
    let a = this.nextLayer.map(e);
    return n.length == 0 ? a : new Vt(r, n, a || Vt.empty, i);
  }
  /**
  Iterate over the ranges that touch the region `from` to `to`,
  calling `f` for each. There is no guarantee that the ranges will
  be reported in any specific order. When the callback returns
  `false`, iteration stops.
  */
  between(e, n, r) {
    if (!this.isEmpty) {
      for (let i = 0; i < this.chunk.length; i++) {
        let a = this.chunkPos[i], o = this.chunk[i];
        if (n >= a && e <= a + o.length && o.between(a, e - a, n - a, r) === !1)
          return;
      }
      this.nextLayer.between(e, n, r);
    }
  }
  /**
  Iterate over the ranges in this set, in order, including all
  ranges that end at or after `from`.
  */
  iter(e = 0) {
    return jm.from([this]).goto(e);
  }
  /**
  @internal
  */
  get isEmpty() {
    return this.nextLayer == this;
  }
  /**
  Iterate over the ranges in a collection of sets, in order,
  starting from `from`.
  */
  static iter(e, n = 0) {
    return jm.from(e).goto(n);
  }
  /**
  Iterate over two groups of sets, calling methods on `comparator`
  to notify it of possible differences.
  */
  static compare(e, n, r, i, a = -1) {
    let o = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), s = n.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= a), l = CH(o, s, r), u = new $v(o, l, a), c = new $v(s, l, a);
    r.iterGaps((f, d, h) => TH(u, f, c, d, h, i)), r.empty && r.length == 0 && TH(u, 0, c, 0, 0, i);
  }
  /**
  Compare the contents of two groups of range sets, returning true
  if they are equivalent in the given range.
  */
  static eq(e, n, r = 0, i) {
    i == null && (i = 999999999);
    let a = e.filter((c) => !c.isEmpty && n.indexOf(c) < 0), o = n.filter((c) => !c.isEmpty && e.indexOf(c) < 0);
    if (a.length != o.length)
      return !1;
    if (!a.length)
      return !0;
    let s = CH(a, o), l = new $v(a, s, 0).goto(r), u = new $v(o, s, 0).goto(r);
    for (; ; ) {
      if (l.to != u.to || !fM(l.active, u.active) || l.point && (!u.point || !l.point.eq(u.point)))
        return !1;
      if (l.to > i)
        return !0;
      l.next(), u.next();
    }
  }
  /**
  Iterate over a group of range sets at the same time, notifying
  the iterator about the ranges covering every given piece of
  content. Returns the open count (see
  [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
  of the iteration.
  */
  static spans(e, n, r, i, a = -1) {
    let o = new $v(e, null, a).goto(n), s = n, l = o.openStart;
    for (; ; ) {
      let u = Math.min(o.to, r);
      if (o.point) {
        let c = o.activeForPoint(o.to), f = o.pointFrom < n ? c.length + 1 : o.point.startSide < 0 ? c.length : Math.min(c.length, l);
        i.point(s, u, o.point, c, f, o.pointRank), l = Math.min(o.openEnd(u), c.length);
      } else u > s && (i.span(s, u, o.active, l), l = o.openEnd(u));
      if (o.to > r)
        return l + (o.point && o.to > r ? 1 : 0);
      s = o.to, o.next();
    }
  }
  /**
  Create a range set for the given range or array of ranges. By
  default, this expects the ranges to be _sorted_ (by start
  position and, if two start at the same position,
  `value.startSide`). You can pass `true` as second argument to
  cause the method to sort them.
  */
  static of(e, n = !1) {
    let r = new hu();
    for (let i of e instanceof uM ? [e] : n ? Tat(e) : e)
      r.add(i.from, i.to, i.value);
    return r.finish();
  }
  /**
  Join an array of range sets into a single set.
  */
  static join(e) {
    if (!e.length)
      return Vt.empty;
    let n = e[e.length - 1];
    for (let r = e.length - 2; r >= 0; r--)
      for (let i = e[r]; i != Vt.empty; i = i.nextLayer)
        n = new Vt(i.chunkPos, i.chunk, n, Math.max(i.maxPoint, n.maxPoint));
    return n;
  }
}
Vt.empty = /* @__PURE__ */ new Vt([], [], null, -1);
function Tat(t) {
  if (t.length > 1)
    for (let e = t[0], n = 1; n < t.length; n++) {
      let r = t[n];
      if (cM(e, r) > 0)
        return t.slice().sort(cM);
      e = r;
    }
  return t;
}
Vt.empty.nextLayer = Vt.empty;
class hu {
  finishChunk(e) {
    this.chunks.push(new t4(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
  }
  /**
  Create an empty builder.
  */
  constructor() {
    this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
  }
  /**
  Add a range. Ranges should be added in sorted (by `from` and
  `value.startSide`) order.
  */
  add(e, n, r) {
    this.addInner(e, n, r) || (this.nextLayer || (this.nextLayer = new hu())).add(e, n, r);
  }
  /**
  @internal
  */
  addInner(e, n, r) {
    let i = e - this.lastTo || r.startSide - this.last.endSide;
    if (i <= 0 && (e - this.lastFrom || r.startSide - this.last.startSide) < 0)
      throw new Error("Ranges must be added sorted by `from` position and `startSide`");
    return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(n - this.chunkStart), this.last = r, this.lastFrom = e, this.lastTo = n, this.value.push(r), r.point && (this.maxPoint = Math.max(this.maxPoint, n - e)), !0);
  }
  /**
  @internal
  */
  addChunk(e, n) {
    if ((e - this.lastTo || n.value[0].startSide - this.last.endSide) < 0)
      return !1;
    this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, n.maxPoint), this.chunks.push(n), this.chunkPos.push(e);
    let r = n.value.length - 1;
    return this.last = n.value[r], this.lastFrom = n.from[r] + e, this.lastTo = n.to[r] + e, !0;
  }
  /**
  Finish the range set. Returns the new set. The builder can't be
  used anymore after this has been called.
  */
  finish() {
    return this.finishInner(Vt.empty);
  }
  /**
  @internal
  */
  finishInner(e) {
    if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
      return e;
    let n = Vt.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
    return this.from = null, n;
  }
}
function CH(t, e, n) {
  let r = /* @__PURE__ */ new Map();
  for (let a of t)
    for (let o = 0; o < a.chunk.length; o++)
      a.chunk[o].maxPoint <= 0 && r.set(a.chunk[o], a.chunkPos[o]);
  let i = /* @__PURE__ */ new Set();
  for (let a of e)
    for (let o = 0; o < a.chunk.length; o++) {
      let s = r.get(a.chunk[o]);
      s != null && (n ? n.mapPos(s) : s) == a.chunkPos[o] && !(n != null && n.touchesRange(s, s + a.chunk[o].length)) && i.add(a.chunk[o]);
    }
  return i;
}
class mae {
  constructor(e, n, r, i = 0) {
    this.layer = e, this.skip = n, this.minPoint = r, this.rank = i;
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  get endSide() {
    return this.value ? this.value.endSide : 0;
  }
  goto(e, n = -1e9) {
    return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, n, !1), this;
  }
  gotoInner(e, n, r) {
    for (; this.chunkIndex < this.layer.chunk.length; ) {
      let i = this.layer.chunk[this.chunkIndex];
      if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
        break;
      this.chunkIndex++, r = !1;
    }
    if (this.chunkIndex < this.layer.chunk.length) {
      let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], n, !0);
      (!r || this.rangeIndex < i) && this.setRangeIndex(i);
    }
    this.next();
  }
  forward(e, n) {
    (this.to - e || this.endSide - n) < 0 && this.gotoInner(e, n, !0);
  }
  next() {
    for (; ; )
      if (this.chunkIndex == this.layer.chunk.length) {
        this.from = this.to = 1e9, this.value = null;
        break;
      } else {
        let e = this.layer.chunkPos[this.chunkIndex], n = this.layer.chunk[this.chunkIndex], r = e + n.from[this.rangeIndex];
        if (this.from = r, this.to = e + n.to[this.rangeIndex], this.value = n.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
          break;
      }
  }
  setRangeIndex(e) {
    if (e == this.layer.chunk[this.chunkIndex].value.length) {
      if (this.chunkIndex++, this.skip)
        for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
          this.chunkIndex++;
      this.rangeIndex = 0;
    } else
      this.rangeIndex = e;
  }
  nextChunk() {
    this.chunkIndex++, this.rangeIndex = 0, this.next();
  }
  compare(e) {
    return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
  }
}
class jm {
  constructor(e) {
    this.heap = e;
  }
  static from(e, n = null, r = -1) {
    let i = [];
    for (let a = 0; a < e.length; a++)
      for (let o = e[a]; !o.isEmpty; o = o.nextLayer)
        o.maxPoint >= r && i.push(new mae(o, n, r, a));
    return i.length == 1 ? i[0] : new jm(i);
  }
  get startSide() {
    return this.value ? this.value.startSide : 0;
  }
  goto(e, n = -1e9) {
    for (let r of this.heap)
      r.goto(e, n);
    for (let r = this.heap.length >> 1; r >= 0; r--)
      h$(this.heap, r);
    return this.next(), this;
  }
  forward(e, n) {
    for (let r of this.heap)
      r.forward(e, n);
    for (let r = this.heap.length >> 1; r >= 0; r--)
      h$(this.heap, r);
    (this.to - e || this.value.endSide - n) < 0 && this.next();
  }
  next() {
    if (this.heap.length == 0)
      this.from = this.to = 1e9, this.value = null, this.rank = -1;
    else {
      let e = this.heap[0];
      this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), h$(this.heap, 0);
    }
  }
}
function h$(t, e) {
  for (let n = t[e]; ; ) {
    let r = (e << 1) + 1;
    if (r >= t.length)
      break;
    let i = t[r];
    if (r + 1 < t.length && i.compare(t[r + 1]) >= 0 && (i = t[r + 1], r++), n.compare(i) < 0)
      break;
    t[r] = n, t[e] = i, e = r;
  }
}
class $v {
  constructor(e, n, r) {
    this.minPoint = r, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = jm.from(e, n, r);
  }
  goto(e, n = -1e9) {
    return this.cursor.goto(e, n), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = n, this.openStart = -1, this.next(), this;
  }
  forward(e, n) {
    for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - n) < 0; )
      this.removeActive(this.minActive);
    this.cursor.forward(e, n);
  }
  removeActive(e) {
    Qb(this.active, e), Qb(this.activeTo, e), Qb(this.activeRank, e), this.minActive = PH(this.active, this.activeTo);
  }
  addActive(e) {
    let n = 0, { value: r, to: i, rank: a } = this.cursor;
    for (; n < this.activeRank.length && (a - this.activeRank[n] || i - this.activeTo[n]) > 0; )
      n++;
    Hb(this.active, n, r), Hb(this.activeTo, n, i), Hb(this.activeRank, n, a), e && Hb(e, n, this.cursor.from), this.minActive = PH(this.active, this.activeTo);
  }
  // After calling this, if `this.point` != null, the next range is a
  // point. Otherwise, it's a regular range, covered by `this.active`.
  next() {
    let e = this.to, n = this.point;
    this.point = null;
    let r = this.openStart < 0 ? [] : null;
    for (; ; ) {
      let i = this.minActive;
      if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
        if (this.activeTo[i] > e) {
          this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
          break;
        }
        this.removeActive(i), r && Qb(r, i);
      } else if (this.cursor.value)
        if (this.cursor.from > e) {
          this.to = this.cursor.from, this.endSide = this.cursor.startSide;
          break;
        } else {
          let a = this.cursor.value;
          if (!a.point)
            this.addActive(r), this.cursor.next();
          else if (n && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
            this.cursor.next();
          else {
            this.point = a, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = a.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
            break;
          }
        }
      else {
        this.to = this.endSide = 1e9;
        break;
      }
    }
    if (r) {
      this.openStart = 0;
      for (let i = r.length - 1; i >= 0 && r[i] < e; i--)
        this.openStart++;
    }
  }
  activeForPoint(e) {
    if (!this.active.length)
      return this.active;
    let n = [];
    for (let r = this.active.length - 1; r >= 0 && !(this.activeRank[r] < this.pointRank); r--)
      (this.activeTo[r] > e || this.activeTo[r] == e && this.active[r].endSide >= this.point.endSide) && n.push(this.active[r]);
    return n.reverse();
  }
  openEnd(e) {
    let n = 0;
    for (let r = this.activeTo.length - 1; r >= 0 && this.activeTo[r] > e; r--)
      n++;
    return n;
  }
}
function TH(t, e, n, r, i, a) {
  t.goto(e), n.goto(r);
  let o = r + i, s = r, l = r - e;
  for (; ; ) {
    let u = t.to + l - n.to || t.endSide - n.endSide, c = u < 0 ? t.to + l : n.to, f = Math.min(c, o);
    if (t.point || n.point ? t.point && n.point && (t.point == n.point || t.point.eq(n.point)) && fM(t.activeForPoint(t.to), n.activeForPoint(n.to)) || a.comparePoint(s, f, t.point, n.point) : f > s && !fM(t.active, n.active) && a.compareRange(s, f, t.active, n.active), c > o)
      break;
    s = c, u <= 0 && t.next(), u >= 0 && n.next();
  }
}
function fM(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (t[n] != e[n] && !t[n].eq(e[n]))
      return !1;
  return !0;
}
function Qb(t, e) {
  for (let n = e, r = t.length - 1; n < r; n++)
    t[n] = t[n + 1];
  t.pop();
}
function Hb(t, e, n) {
  for (let r = t.length - 1; r >= e; r--)
    t[r + 1] = t[r];
  t[e] = n;
}
function PH(t, e) {
  let n = -1, r = 1e9;
  for (let i = 0; i < e.length; i++)
    (e[i] - r || t[i].endSide - t[n].endSide) < 0 && (n = i, r = e[i]);
  return n;
}
function Rp(t, e, n = t.length) {
  let r = 0;
  for (let i = 0; i < n; )
    t.charCodeAt(i) == 9 ? (r += e - r % e, i++) : (r++, i = _r(t, i));
  return r;
}
function dM(t, e, n, r) {
  for (let i = 0, a = 0; ; ) {
    if (a >= e)
      return i;
    if (i == t.length)
      break;
    a += t.charCodeAt(i) == 9 ? n - a % n : 1, i = _r(t, i);
  }
  return r === !0 ? -1 : t.length;
}
const hM = "ͼ", $H = typeof Symbol > "u" ? "__" + hM : Symbol.for(hM), pM = typeof Symbol > "u" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet"), AH = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : {};
class pu {
  // :: (Object<Style>, ?{finish: ?(string) → string})
  // Create a style module from the given spec.
  //
  // When `finish` is given, it is called on regular (non-`@`)
  // selectors (after `&` expansion) to compute the final selector.
  constructor(e, n) {
    this.rules = [];
    let { finish: r } = n || {};
    function i(o) {
      return /^@/.test(o) ? [o] : o.split(/,\s*/);
    }
    function a(o, s, l, u) {
      let c = [], f = /^@(\w+)\b/.exec(o[0]), d = f && f[1] == "keyframes";
      if (f && s == null) return l.push(o[0] + ";");
      for (let h in s) {
        let p = s[h];
        if (/&/.test(h))
          a(
            h.split(/,\s*/).map((v) => o.map((g) => v.replace(/&/, g))).reduce((v, g) => v.concat(g)),
            p,
            l
          );
        else if (p && typeof p == "object") {
          if (!f) throw new RangeError("The value of a property (" + h + ") should be a primitive value.");
          a(i(h), p, c, d);
        } else p != null && c.push(h.replace(/_.*/, "").replace(/[A-Z]/g, (v) => "-" + v.toLowerCase()) + ": " + p + ";");
      }
      (c.length || d) && l.push((r && !f && !u ? o.map(r) : o).join(", ") + " {" + c.join(" ") + "}");
    }
    for (let o in e) a(i(o), e[o], this.rules);
  }
  // :: () → string
  // Returns a string containing the module's CSS rules.
  getRules() {
    return this.rules.join(`
`);
  }
  // :: () → string
  // Generate a new unique CSS class name.
  static newName() {
    let e = AH[$H] || 1;
    return AH[$H] = e + 1, hM + e.toString(36);
  }
  // :: (union<Document, ShadowRoot>, union<[StyleModule], StyleModule>, ?{nonce: ?string})
  //
  // Mount the given set of modules in the given DOM root, which ensures
  // that the CSS rules defined by the module are available in that
  // context.
  //
  // Rules are only added to the document once per root.
  //
  // Rule order will follow the order of the modules, so that rules from
  // modules later in the array take precedence of those from earlier
  // modules. If you call this function multiple times for the same root
  // in a way that changes the order of already mounted modules, the old
  // order will be changed.
  //
  // If a Content Security Policy nonce is provided, it is added to
  // the `<style>` tag generated by the library.
  static mount(e, n, r) {
    let i = e[pM], a = r && r.nonce;
    i ? a && i.setNonce(a) : i = new Pat(e, a), i.mount(Array.isArray(n) ? n : [n], e);
  }
}
let EH = /* @__PURE__ */ new Map();
class Pat {
  constructor(e, n) {
    let r = e.ownerDocument || e, i = r.defaultView;
    if (!e.head && e.adoptedStyleSheets && i.CSSStyleSheet) {
      let a = EH.get(r);
      if (a) return e[pM] = a;
      this.sheet = new i.CSSStyleSheet(), EH.set(r, this);
    } else
      this.styleTag = r.createElement("style"), n && this.styleTag.setAttribute("nonce", n);
    this.modules = [], e[pM] = this;
  }
  mount(e, n) {
    let r = this.sheet, i = 0, a = 0;
    for (let o = 0; o < e.length; o++) {
      let s = e[o], l = this.modules.indexOf(s);
      if (l < a && l > -1 && (this.modules.splice(l, 1), a--, l = -1), l == -1) {
        if (this.modules.splice(a++, 0, s), r) for (let u = 0; u < s.rules.length; u++)
          r.insertRule(s.rules[u], i++);
      } else {
        for (; a < l; ) i += this.modules[a++].rules.length;
        i += s.rules.length, a++;
      }
    }
    if (r)
      n.adoptedStyleSheets.indexOf(this.sheet) < 0 && (n.adoptedStyleSheets = [this.sheet, ...n.adoptedStyleSheets]);
    else {
      let o = "";
      for (let l = 0; l < this.modules.length; l++)
        o += this.modules[l].getRules() + `
`;
      this.styleTag.textContent = o;
      let s = n.head || n;
      this.styleTag.parentNode != s && s.insertBefore(this.styleTag, s.firstChild);
    }
  }
  setNonce(e) {
    this.styleTag && this.styleTag.getAttribute("nonce") != e && this.styleTag.setAttribute("nonce", e);
  }
}
var vu = {
  8: "Backspace",
  9: "Tab",
  10: "Enter",
  12: "NumLock",
  13: "Enter",
  16: "Shift",
  17: "Control",
  18: "Alt",
  20: "CapsLock",
  27: "Escape",
  32: " ",
  33: "PageUp",
  34: "PageDown",
  35: "End",
  36: "Home",
  37: "ArrowLeft",
  38: "ArrowUp",
  39: "ArrowRight",
  40: "ArrowDown",
  44: "PrintScreen",
  45: "Insert",
  46: "Delete",
  59: ";",
  61: "=",
  91: "Meta",
  92: "Meta",
  106: "*",
  107: "+",
  108: ",",
  109: "-",
  110: ".",
  111: "/",
  144: "NumLock",
  145: "ScrollLock",
  160: "Shift",
  161: "Shift",
  162: "Control",
  163: "Control",
  164: "Alt",
  165: "Alt",
  173: "-",
  186: ";",
  187: "=",
  188: ",",
  189: "-",
  190: ".",
  191: "/",
  192: "`",
  219: "[",
  220: "\\",
  221: "]",
  222: "'"
}, Zm = {
  48: ")",
  49: "!",
  50: "@",
  51: "#",
  52: "$",
  53: "%",
  54: "^",
  55: "&",
  56: "*",
  57: "(",
  59: ":",
  61: "+",
  173: "_",
  186: ":",
  187: "+",
  188: "<",
  189: "_",
  190: ">",
  191: "?",
  192: "~",
  219: "{",
  220: "|",
  221: "}",
  222: '"'
}, $at = typeof navigator < "u" && /Mac/.test(navigator.platform), Aat = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
for (var mr = 0; mr < 10; mr++) vu[48 + mr] = vu[96 + mr] = String(mr);
for (var mr = 1; mr <= 24; mr++) vu[mr + 111] = "F" + mr;
for (var mr = 65; mr <= 90; mr++)
  vu[mr] = String.fromCharCode(mr + 32), Zm[mr] = String.fromCharCode(mr);
for (var p$ in vu) Zm.hasOwnProperty(p$) || (Zm[p$] = vu[p$]);
function Eat(t) {
  var e = $at && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Aat && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? Zm : vu)[t.keyCode] || t.key || "Unidentified";
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
}
function Um(t) {
  let e;
  return t.nodeType == 11 ? e = t.getSelection ? t : t.ownerDocument : e = t, e.getSelection();
}
function vM(t, e) {
  return e ? t == e || t.contains(e.nodeType != 1 ? e.parentNode : e) : !1;
}
function Mat(t) {
  let e = t.activeElement;
  for (; e && e.shadowRoot; )
    e = e.shadowRoot.activeElement;
  return e;
}
function i1(t, e) {
  if (!e.anchorNode)
    return !1;
  try {
    return vM(t, e.anchorNode);
  } catch {
    return !1;
  }
}
function Uh(t) {
  return t.nodeType == 3 ? Tf(t, 0, t.nodeValue.length).getClientRects() : t.nodeType == 1 ? t.getClientRects() : [];
}
function Wg(t, e, n, r) {
  return n ? MH(t, e, n, r, -1) || MH(t, e, n, r, 1) : !1;
}
function Cf(t) {
  for (var e = 0; ; e++)
    if (t = t.previousSibling, !t)
      return e;
}
function nS(t) {
  return t.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName);
}
function MH(t, e, n, r, i) {
  for (; ; ) {
    if (t == n && e == r)
      return !0;
    if (e == (i < 0 ? 0 : Js(t))) {
      if (t.nodeName == "DIV")
        return !1;
      let a = t.parentNode;
      if (!a || a.nodeType != 1)
        return !1;
      e = Cf(t) + (i < 0 ? 0 : 1), t = a;
    } else if (t.nodeType == 1) {
      if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.nodeType == 1 && t.contentEditable == "false")
        return !1;
      e = i < 0 ? Js(t) : 0;
    } else
      return !1;
  }
}
function Js(t) {
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
}
function Iw(t, e) {
  let n = e ? t.left : t.right;
  return { left: n, right: n, top: t.top, bottom: t.bottom };
}
function Iat(t) {
  let e = t.visualViewport;
  return e ? {
    left: 0,
    right: e.width,
    top: 0,
    bottom: e.height
  } : {
    left: 0,
    right: t.innerWidth,
    top: 0,
    bottom: t.innerHeight
  };
}
function yae(t, e) {
  let n = e.width / t.offsetWidth, r = e.height / t.offsetHeight;
  return (n > 0.995 && n < 1.005 || !isFinite(n) || Math.abs(e.width - t.offsetWidth) < 1) && (n = 1), (r > 0.995 && r < 1.005 || !isFinite(r) || Math.abs(e.height - t.offsetHeight) < 1) && (r = 1), { scaleX: n, scaleY: r };
}
function Dat(t, e, n, r, i, a, o, s) {
  let l = t.ownerDocument, u = l.defaultView || window;
  for (let c = t, f = !1; c && !f; )
    if (c.nodeType == 1) {
      let d, h = c == l.body, p = 1, v = 1;
      if (h)
        d = Iat(u);
      else {
        if (/^(fixed|sticky)$/.test(getComputedStyle(c).position) && (f = !0), c.scrollHeight <= c.clientHeight && c.scrollWidth <= c.clientWidth) {
          c = c.assignedSlot || c.parentNode;
          continue;
        }
        let y = c.getBoundingClientRect();
        ({ scaleX: p, scaleY: v } = yae(c, y)), d = {
          left: y.left,
          right: y.left + c.clientWidth * p,
          top: y.top,
          bottom: y.top + c.clientHeight * v
        };
      }
      let g = 0, m = 0;
      if (i == "nearest")
        e.top < d.top ? (m = -(d.top - e.top + o), n > 0 && e.bottom > d.bottom + m && (m = e.bottom - d.bottom + m + o)) : e.bottom > d.bottom && (m = e.bottom - d.bottom + o, n < 0 && e.top - m < d.top && (m = -(d.top + m - e.top + o)));
      else {
        let y = e.bottom - e.top, b = d.bottom - d.top;
        m = (i == "center" && y <= b ? e.top + y / 2 - b / 2 : i == "start" || i == "center" && n < 0 ? e.top - o : e.bottom - b + o) - d.top;
      }
      if (r == "nearest" ? e.left < d.left ? (g = -(d.left - e.left + a), n > 0 && e.right > d.right + g && (g = e.right - d.right + g + a)) : e.right > d.right && (g = e.right - d.right + a, n < 0 && e.left < d.left + g && (g = -(d.left + g - e.left + a))) : g = (r == "center" ? e.left + (e.right - e.left) / 2 - (d.right - d.left) / 2 : r == "start" == s ? e.left - a : e.right - (d.right - d.left) + a) - d.left, g || m)
        if (h)
          u.scrollBy(g, m);
        else {
          let y = 0, b = 0;
          if (m) {
            let _ = c.scrollTop;
            c.scrollTop += m / v, b = (c.scrollTop - _) * v;
          }
          if (g) {
            let _ = c.scrollLeft;
            c.scrollLeft += g / p, y = (c.scrollLeft - _) * p;
          }
          e = {
            left: e.left - y,
            top: e.top - b,
            right: e.right - y,
            bottom: e.bottom - b
          }, y && Math.abs(y - g) < 1 && (r = "nearest"), b && Math.abs(b - m) < 1 && (i = "nearest");
        }
      if (h)
        break;
      c = c.assignedSlot || c.parentNode;
    } else if (c.nodeType == 11)
      c = c.host;
    else
      break;
}
function Rat(t) {
  let e = t.ownerDocument;
  for (let n = t.parentNode; n && n != e.body; )
    if (n.nodeType == 1) {
      if (n.scrollHeight > n.clientHeight || n.scrollWidth > n.clientWidth)
        return n;
      n = n.assignedSlot || n.parentNode;
    } else if (n.nodeType == 11)
      n = n.host;
    else
      break;
  return null;
}
class kat {
  constructor() {
    this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
  }
  eq(e) {
    return this.anchorNode == e.anchorNode && this.anchorOffset == e.anchorOffset && this.focusNode == e.focusNode && this.focusOffset == e.focusOffset;
  }
  setRange(e) {
    let { anchorNode: n, focusNode: r } = e;
    this.set(n, Math.min(e.anchorOffset, n ? Js(n) : 0), r, Math.min(e.focusOffset, r ? Js(r) : 0));
  }
  set(e, n, r, i) {
    this.anchorNode = e, this.anchorOffset = n, this.focusNode = r, this.focusOffset = i;
  }
}
let xd = null;
function bae(t) {
  if (t.setActive)
    return t.setActive();
  if (xd)
    return t.focus(xd);
  let e = [];
  for (let n = t; n && (e.push(n, n.scrollTop, n.scrollLeft), n != n.ownerDocument); n = n.parentNode)
    ;
  if (t.focus(xd == null ? {
    get preventScroll() {
      return xd = { preventScroll: !0 }, !0;
    }
  } : void 0), !xd) {
    xd = !1;
    for (let n = 0; n < e.length; ) {
      let r = e[n++], i = e[n++], a = e[n++];
      r.scrollTop != i && (r.scrollTop = i), r.scrollLeft != a && (r.scrollLeft = a);
    }
  }
}
let IH;
function Tf(t, e, n = e) {
  let r = IH || (IH = document.createRange());
  return r.setEnd(t, n), r.setStart(t, e), r;
}
function lh(t, e, n, r) {
  let i = { key: e, code: e, keyCode: n, which: n, cancelable: !0 };
  r && ({ altKey: i.altKey, ctrlKey: i.ctrlKey, shiftKey: i.shiftKey, metaKey: i.metaKey } = r);
  let a = new KeyboardEvent("keydown", i);
  a.synthetic = !0, t.dispatchEvent(a);
  let o = new KeyboardEvent("keyup", i);
  return o.synthetic = !0, t.dispatchEvent(o), a.defaultPrevented || o.defaultPrevented;
}
function Lat(t) {
  for (; t; ) {
    if (t && (t.nodeType == 9 || t.nodeType == 11 && t.host))
      return t;
    t = t.assignedSlot || t.parentNode;
  }
  return null;
}
function _ae(t) {
  for (; t.attributes.length; )
    t.removeAttributeNode(t.attributes[0]);
}
function Nat(t, e) {
  let n = e.focusNode, r = e.focusOffset;
  if (!n || e.anchorNode != n || e.anchorOffset != r)
    return !1;
  for (r = Math.min(r, Js(n)); ; )
    if (r) {
      if (n.nodeType != 1)
        return !1;
      let i = n.childNodes[r - 1];
      i.contentEditable == "false" ? r-- : (n = i, r = Js(n));
    } else {
      if (n == t)
        return !0;
      r = Cf(n), n = n.parentNode;
    }
}
function Oae(t) {
  return t.scrollTop > Math.max(1, t.scrollHeight - t.clientHeight - 4);
}
function Sae(t, e) {
  for (let n = t, r = e; ; ) {
    if (n.nodeType == 3 && r > 0)
      return { node: n, offset: r };
    if (n.nodeType == 1 && r > 0) {
      if (n.contentEditable == "false")
        return null;
      n = n.childNodes[r - 1], r = Js(n);
    } else if (n.parentNode && !nS(n))
      r = Cf(n), n = n.parentNode;
    else
      return null;
  }
}
function xae(t, e) {
  for (let n = t, r = e; ; ) {
    if (n.nodeType == 3 && r < n.nodeValue.length)
      return { node: n, offset: r };
    if (n.nodeType == 1 && r < n.childNodes.length) {
      if (n.contentEditable == "false")
        return null;
      n = n.childNodes[r], r = 0;
    } else if (n.parentNode && !nS(n))
      r = Cf(n) + 1, n = n.parentNode;
    else
      return null;
  }
}
class kr {
  constructor(e, n, r = !0) {
    this.node = e, this.offset = n, this.precise = r;
  }
  static before(e, n) {
    return new kr(e.parentNode, Cf(e), n);
  }
  static after(e, n) {
    return new kr(e.parentNode, Cf(e) + 1, n);
  }
}
const n4 = [];
class Jt {
  constructor() {
    this.parent = null, this.dom = null, this.flags = 2;
  }
  get overrideDOMText() {
    return null;
  }
  get posAtStart() {
    return this.parent ? this.parent.posBefore(this) : 0;
  }
  get posAtEnd() {
    return this.posAtStart + this.length;
  }
  posBefore(e) {
    let n = this.posAtStart;
    for (let r of this.children) {
      if (r == e)
        return n;
      n += r.length + r.breakAfter;
    }
    throw new RangeError("Invalid child in posBefore");
  }
  posAfter(e) {
    return this.posBefore(e) + e.length;
  }
  sync(e, n) {
    if (this.flags & 2) {
      let r = this.dom, i = null, a;
      for (let o of this.children) {
        if (o.flags & 7) {
          if (!o.dom && (a = i ? i.nextSibling : r.firstChild)) {
            let s = Jt.get(a);
            (!s || !s.parent && s.canReuseDOM(o)) && o.reuseDOM(a);
          }
          o.sync(e, n), o.flags &= -8;
        }
        if (a = i ? i.nextSibling : r.firstChild, n && !n.written && n.node == r && a != o.dom && (n.written = !0), o.dom.parentNode == r)
          for (; a && a != o.dom; )
            a = DH(a);
        else
          r.insertBefore(o.dom, a);
        i = o.dom;
      }
      for (a = i ? i.nextSibling : r.firstChild, a && n && n.node == r && (n.written = !0); a; )
        a = DH(a);
    } else if (this.flags & 1)
      for (let r of this.children)
        r.flags & 7 && (r.sync(e, n), r.flags &= -8);
  }
  reuseDOM(e) {
  }
  localPosFromDOM(e, n) {
    let r;
    if (e == this.dom)
      r = this.dom.childNodes[n];
    else {
      let i = Js(e) == 0 ? 0 : n == 0 ? -1 : 1;
      for (; ; ) {
        let a = e.parentNode;
        if (a == this.dom)
          break;
        i == 0 && a.firstChild != a.lastChild && (e == a.firstChild ? i = -1 : i = 1), e = a;
      }
      i < 0 ? r = e : r = e.nextSibling;
    }
    if (r == this.dom.firstChild)
      return 0;
    for (; r && !Jt.get(r); )
      r = r.nextSibling;
    if (!r)
      return this.length;
    for (let i = 0, a = 0; ; i++) {
      let o = this.children[i];
      if (o.dom == r)
        return a;
      a += o.length + o.breakAfter;
    }
  }
  domBoundsAround(e, n, r = 0) {
    let i = -1, a = -1, o = -1, s = -1;
    for (let l = 0, u = r, c = r; l < this.children.length; l++) {
      let f = this.children[l], d = u + f.length;
      if (u < e && d > n)
        return f.domBoundsAround(e, n, u);
      if (d >= e && i == -1 && (i = l, a = u), u > n && f.dom.parentNode == this.dom) {
        o = l, s = c;
        break;
      }
      c = d, u = d + f.breakAfter;
    }
    return {
      from: a,
      to: s < 0 ? r + this.length : s,
      startDOM: (i ? this.children[i - 1].dom.nextSibling : null) || this.dom.firstChild,
      endDOM: o < this.children.length && o >= 0 ? this.children[o].dom : null
    };
  }
  markDirty(e = !1) {
    this.flags |= 2, this.markParentsDirty(e);
  }
  markParentsDirty(e) {
    for (let n = this.parent; n; n = n.parent) {
      if (e && (n.flags |= 2), n.flags & 1)
        return;
      n.flags |= 1, e = !1;
    }
  }
  setParent(e) {
    this.parent != e && (this.parent = e, this.flags & 7 && this.markParentsDirty(!0));
  }
  setDOM(e) {
    this.dom != e && (this.dom && (this.dom.cmView = null), this.dom = e, e.cmView = this);
  }
  get rootView() {
    for (let e = this; ; ) {
      let n = e.parent;
      if (!n)
        return e;
      e = n;
    }
  }
  replaceChildren(e, n, r = n4) {
    this.markDirty();
    for (let i = e; i < n; i++) {
      let a = this.children[i];
      a.parent == this && r.indexOf(a) < 0 && a.destroy();
    }
    this.children.splice(e, n - e, ...r);
    for (let i = 0; i < r.length; i++)
      r[i].setParent(this);
  }
  ignoreMutation(e) {
    return !1;
  }
  ignoreEvent(e) {
    return !1;
  }
  childCursor(e = this.length) {
    return new wae(this.children, e, this.children.length);
  }
  childPos(e, n = 1) {
    return this.childCursor().findPos(e, n);
  }
  toString() {
    let e = this.constructor.name.replace("View", "");
    return e + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (e == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
  }
  static get(e) {
    return e.cmView;
  }
  get isEditable() {
    return !0;
  }
  get isWidget() {
    return !1;
  }
  get isHidden() {
    return !1;
  }
  merge(e, n, r, i, a, o) {
    return !1;
  }
  become(e) {
    return !1;
  }
  canReuseDOM(e) {
    return e.constructor == this.constructor && !((this.flags | e.flags) & 8);
  }
  // When this is a zero-length view with a side, this should return a
  // number <= 0 to indicate it is before its position, or a
  // number > 0 when after its position.
  getSide() {
    return 0;
  }
  destroy() {
    for (let e of this.children)
      e.parent == this && e.destroy();
    this.parent = null;
  }
}
Jt.prototype.breakAfter = 0;
function DH(t) {
  let e = t.nextSibling;
  return t.parentNode.removeChild(t), e;
}
class wae {
  constructor(e, n, r) {
    this.children = e, this.pos = n, this.i = r, this.off = 0;
  }
  findPos(e, n = 1) {
    for (; ; ) {
      if (e > this.pos || e == this.pos && (n > 0 || this.i == 0 || this.children[this.i - 1].breakAfter))
        return this.off = e - this.pos, this;
      let r = this.children[--this.i];
      this.pos -= r.length + r.breakAfter;
    }
  }
}
function Cae(t, e, n, r, i, a, o, s, l) {
  let { children: u } = t, c = u.length ? u[e] : null, f = a.length ? a[a.length - 1] : null, d = f ? f.breakAfter : o;
  if (!(e == r && c && !o && !d && a.length < 2 && c.merge(n, i, a.length ? f : null, n == 0, s, l))) {
    if (r < u.length) {
      let h = u[r];
      h && (i < h.length || h.breakAfter && (f != null && f.breakAfter)) ? (e == r && (h = h.split(i), i = 0), !d && f && h.merge(0, i, f, !0, 0, l) ? a[a.length - 1] = h : ((i || h.children.length && !h.children[0].length) && h.merge(0, i, null, !1, 0, l), a.push(h))) : h != null && h.breakAfter && (f ? f.breakAfter = 1 : o = 1), r++;
    }
    for (c && (c.breakAfter = o, n > 0 && (!o && a.length && c.merge(n, c.length, a[0], !1, s, 0) ? c.breakAfter = a.shift().breakAfter : (n < c.length || c.children.length && c.children[c.children.length - 1].length == 0) && c.merge(n, c.length, null, !1, s, 0), e++)); e < r && a.length; )
      if (u[r - 1].become(a[a.length - 1]))
        r--, a.pop(), l = a.length ? 0 : s;
      else if (u[e].become(a[0]))
        e++, a.shift(), s = a.length ? 0 : l;
      else
        break;
    !a.length && e && r < u.length && !u[e - 1].breakAfter && u[r].merge(0, 0, u[e - 1], !1, s, l) && e--, (e < r || a.length) && t.replaceChildren(e, r, a);
  }
}
function Tae(t, e, n, r, i, a) {
  let o = t.childCursor(), { i: s, off: l } = o.findPos(n, 1), { i: u, off: c } = o.findPos(e, -1), f = e - n;
  for (let d of r)
    f += d.length;
  t.length += f, Cae(t, u, c, s, l, r, 0, i, a);
}
let pi = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, gM = typeof document < "u" ? document : { documentElement: { style: {} } };
const mM = /* @__PURE__ */ /Edge\/(\d+)/.exec(pi.userAgent), Pae = /* @__PURE__ */ /MSIE \d/.test(pi.userAgent), yM = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pi.userAgent), Dw = !!(Pae || yM || mM), RH = !Dw && /* @__PURE__ */ /gecko\/(\d+)/i.test(pi.userAgent), v$ = !Dw && /* @__PURE__ */ /Chrome\/(\d+)/.exec(pi.userAgent), kH = "webkitFontSmoothing" in gM.documentElement.style, $ae = !Dw && /* @__PURE__ */ /Apple Computer/.test(pi.vendor), LH = $ae && (/* @__PURE__ */ /Mobile\/\w+/.test(pi.userAgent) || pi.maxTouchPoints > 2);
var Ne = {
  mac: LH || /* @__PURE__ */ /Mac/.test(pi.platform),
  windows: /* @__PURE__ */ /Win/.test(pi.platform),
  linux: /* @__PURE__ */ /Linux|X11/.test(pi.platform),
  ie: Dw,
  ie_version: Pae ? gM.documentMode || 6 : yM ? +yM[1] : mM ? +mM[1] : 0,
  gecko: RH,
  gecko_version: RH ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  chrome: !!v$,
  chrome_version: v$ ? +v$[1] : 0,
  ios: LH,
  android: /* @__PURE__ */ /Android\b/.test(pi.userAgent),
  webkit: kH,
  safari: $ae,
  webkit_version: kH ? +(/* @__PURE__ */ /\bAppleWebKit\/(\d+)/.exec(pi.userAgent) || [0, 0])[1] : 0,
  tabSize: gM.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
};
const Bat = 256;
class lo extends Jt {
  constructor(e) {
    super(), this.text = e;
  }
  get length() {
    return this.text.length;
  }
  createDOM(e) {
    this.setDOM(e || document.createTextNode(this.text));
  }
  sync(e, n) {
    this.dom || this.createDOM(), this.dom.nodeValue != this.text && (n && n.node == this.dom && (n.written = !0), this.dom.nodeValue = this.text);
  }
  reuseDOM(e) {
    e.nodeType == 3 && this.createDOM(e);
  }
  merge(e, n, r) {
    return this.flags & 8 || r && (!(r instanceof lo) || this.length - (n - e) + r.length > Bat || r.flags & 8) ? !1 : (this.text = this.text.slice(0, e) + (r ? r.text : "") + this.text.slice(n), this.markDirty(), !0);
  }
  split(e) {
    let n = new lo(this.text.slice(e));
    return this.text = this.text.slice(0, e), this.markDirty(), n.flags |= this.flags & 8, n;
  }
  localPosFromDOM(e, n) {
    return e == this.dom ? n : n ? this.text.length : 0;
  }
  domAtPos(e) {
    return new kr(this.dom, e);
  }
  domBoundsAround(e, n, r) {
    return { from: r, to: r + this.length, startDOM: this.dom, endDOM: this.dom.nextSibling };
  }
  coordsAt(e, n) {
    return zat(this.dom, e, n);
  }
}
class el extends Jt {
  constructor(e, n = [], r = 0) {
    super(), this.mark = e, this.children = n, this.length = r;
    for (let i of n)
      i.setParent(this);
  }
  setAttrs(e) {
    if (_ae(e), this.mark.class && (e.className = this.mark.class), this.mark.attrs)
      for (let n in this.mark.attrs)
        e.setAttribute(n, this.mark.attrs[n]);
    return e;
  }
  canReuseDOM(e) {
    return super.canReuseDOM(e) && !((this.flags | e.flags) & 8);
  }
  reuseDOM(e) {
    e.nodeName == this.mark.tagName.toUpperCase() && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    this.dom ? this.flags & 4 && this.setAttrs(this.dom) : this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))), super.sync(e, n);
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof el && r.mark.eq(this.mark)) || e && a <= 0 || n < this.length && o <= 0) ? !1 : (Tae(this, e, n, r ? r.children.slice() : [], a - 1, o - 1), this.markDirty(), !0);
  }
  split(e) {
    let n = [], r = 0, i = -1, a = 0;
    for (let s of this.children) {
      let l = r + s.length;
      l > e && n.push(r < e ? s.split(e - r) : s), i < 0 && r >= e && (i = a), r = l, a++;
    }
    let o = this.length - e;
    return this.length = e, i > -1 && (this.children.length = i, this.markDirty()), new el(this.mark, n, o);
  }
  domAtPos(e) {
    return Aae(this, e);
  }
  coordsAt(e, n) {
    return Mae(this, e, n);
  }
}
function zat(t, e, n) {
  let r = t.nodeValue.length;
  e > r && (e = r);
  let i = e, a = e, o = 0;
  e == 0 && n < 0 || e == r && n >= 0 ? Ne.chrome || Ne.gecko || (e ? (i--, o = 1) : a < r && (a++, o = -1)) : n < 0 ? i-- : a < r && a++;
  let s = Tf(t, i, a).getClientRects();
  if (!s.length)
    return null;
  let l = s[(o ? o < 0 : n >= 0) ? 0 : s.length - 1];
  return Ne.safari && !o && l.width == 0 && (l = Array.prototype.find.call(s, (u) => u.width) || l), o ? Iw(l, o < 0) : l || null;
}
class Ql extends Jt {
  static create(e, n, r) {
    return new Ql(e, n, r);
  }
  constructor(e, n, r) {
    super(), this.widget = e, this.length = n, this.side = r, this.prevWidget = null;
  }
  split(e) {
    let n = Ql.create(this.widget, this.length - e, this.side);
    return this.length -= e, n;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  getSide() {
    return this.side;
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof Ql) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  }
  become(e) {
    return e instanceof Ql && e.side == this.side && this.widget.constructor == e.widget.constructor ? (this.widget.compare(e.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get overrideDOMText() {
    if (this.length == 0)
      return Ft.empty;
    let e = this;
    for (; e.parent; )
      e = e.parent;
    let { view: n } = e, r = n && n.state.doc, i = this.posAtStart;
    return r ? r.slice(i, i + this.length) : Ft.empty;
  }
  domAtPos(e) {
    return (this.length ? e == 0 : this.side > 0) ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e, n) {
    let r = this.widget.coordsAt(this.dom, e, n);
    if (r)
      return r;
    let i = this.dom.getClientRects(), a = null;
    if (!i.length)
      return null;
    let o = this.side ? this.side < 0 : e > 0;
    for (let s = o ? i.length - 1 : 0; a = i[s], !(e > 0 ? s == 0 : s == i.length - 1 || a.top < a.bottom); s += o ? -1 : 1)
      ;
    return Iw(a, !o);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  get isHidden() {
    return this.widget.isHidden;
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
}
class Xh extends Jt {
  constructor(e) {
    super(), this.side = e;
  }
  get length() {
    return 0;
  }
  merge() {
    return !1;
  }
  become(e) {
    return e instanceof Xh && e.side == this.side;
  }
  split() {
    return new Xh(this.side);
  }
  sync() {
    if (!this.dom) {
      let e = document.createElement("img");
      e.className = "cm-widgetBuffer", e.setAttribute("aria-hidden", "true"), this.setDOM(e);
    }
  }
  getSide() {
    return this.side;
  }
  domAtPos(e) {
    return this.side > 0 ? kr.before(this.dom) : kr.after(this.dom);
  }
  localPosFromDOM() {
    return 0;
  }
  domBoundsAround() {
    return null;
  }
  coordsAt(e) {
    return this.dom.getBoundingClientRect();
  }
  get overrideDOMText() {
    return Ft.empty;
  }
  get isHidden() {
    return !0;
  }
}
lo.prototype.children = Ql.prototype.children = Xh.prototype.children = n4;
function Aae(t, e) {
  let n = t.dom, { children: r } = t, i = 0;
  for (let a = 0; i < r.length; i++) {
    let o = r[i], s = a + o.length;
    if (!(s == a && o.getSide() <= 0)) {
      if (e > a && e < s && o.dom.parentNode == n)
        return o.domAtPos(e - a);
      if (e <= a)
        break;
      a = s;
    }
  }
  for (let a = i; a > 0; a--) {
    let o = r[a - 1];
    if (o.dom.parentNode == n)
      return o.domAtPos(o.length);
  }
  for (let a = i; a < r.length; a++) {
    let o = r[a];
    if (o.dom.parentNode == n)
      return o.domAtPos(0);
  }
  return new kr(n, 0);
}
function Eae(t, e, n) {
  let r, { children: i } = t;
  n > 0 && e instanceof el && i.length && (r = i[i.length - 1]) instanceof el && r.mark.eq(e.mark) ? Eae(r, e.children[0], n - 1) : (i.push(e), e.setParent(t)), t.length += e.length;
}
function Mae(t, e, n) {
  let r = null, i = -1, a = null, o = -1;
  function s(u, c) {
    for (let f = 0, d = 0; f < u.children.length && d <= c; f++) {
      let h = u.children[f], p = d + h.length;
      p >= c && (h.children.length ? s(h, c - d) : (!a || a.isHidden && n > 0) && (p > c || d == p && h.getSide() > 0) ? (a = h, o = c - d) : (d < c || d == p && h.getSide() < 0 && !h.isHidden) && (r = h, i = c - d)), d = p;
    }
  }
  s(t, e);
  let l = (n < 0 ? r : a) || r || a;
  return l ? l.coordsAt(Math.max(0, l == r ? i : o), n) : Vat(t);
}
function Vat(t) {
  let e = t.dom.lastChild;
  if (!e)
    return t.dom.getBoundingClientRect();
  let n = Uh(e);
  return n[n.length - 1] || null;
}
function bM(t, e) {
  for (let n in t)
    n == "class" && e.class ? e.class += " " + t.class : n == "style" && e.style ? e.style += ";" + t.style : e[n] = t[n];
  return e;
}
const NH = /* @__PURE__ */ Object.create(null);
function rS(t, e, n) {
  if (t == e)
    return !0;
  t || (t = NH), e || (e = NH);
  let r = Object.keys(t), i = Object.keys(e);
  if (r.length - (n && r.indexOf(n) > -1 ? 1 : 0) != i.length - (n && i.indexOf(n) > -1 ? 1 : 0))
    return !1;
  for (let a of r)
    if (a != n && (i.indexOf(a) == -1 || t[a] !== e[a]))
      return !1;
  return !0;
}
function _M(t, e, n) {
  let r = !1;
  if (e)
    for (let i in e)
      n && i in n || (r = !0, i == "style" ? t.style.cssText = "" : t.removeAttribute(i));
  if (n)
    for (let i in n)
      e && e[i] == n[i] || (r = !0, i == "style" ? t.style.cssText = n[i] : t.setAttribute(i, n[i]));
  return r;
}
function Fat(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n = 0; n < t.attributes.length; n++) {
    let r = t.attributes[n];
    e[r.name] = r.value;
  }
  return e;
}
class Ln extends Jt {
  constructor() {
    super(...arguments), this.children = [], this.length = 0, this.prevAttrs = void 0, this.attrs = null, this.breakAfter = 0;
  }
  // Consumes source
  merge(e, n, r, i, a, o) {
    if (r) {
      if (!(r instanceof Ln))
        return !1;
      this.dom || r.transferDOM(this);
    }
    return i && this.setDeco(r ? r.attrs : null), Tae(this, e, n, r ? r.children.slice() : [], a, o), !0;
  }
  split(e) {
    let n = new Ln();
    if (n.breakAfter = this.breakAfter, this.length == 0)
      return n;
    let { i: r, off: i } = this.childPos(e);
    i && (n.append(this.children[r].split(i), 0), this.children[r].merge(i, this.children[r].length, null, !1, 0, 0), r++);
    for (let a = r; a < this.children.length; a++)
      n.append(this.children[a], 0);
    for (; r > 0 && this.children[r - 1].length == 0; )
      this.children[--r].destroy();
    return this.children.length = r, this.markDirty(), this.length = e, n;
  }
  transferDOM(e) {
    this.dom && (this.markDirty(), e.setDOM(this.dom), e.prevAttrs = this.prevAttrs === void 0 ? this.attrs : this.prevAttrs, this.prevAttrs = void 0, this.dom = null);
  }
  setDeco(e) {
    rS(this.attrs, e) || (this.dom && (this.prevAttrs = this.attrs, this.markDirty()), this.attrs = e);
  }
  append(e, n) {
    Eae(this, e, n);
  }
  // Only called when building a line view in ContentBuilder
  addLineDeco(e) {
    let n = e.spec.attributes, r = e.spec.class;
    n && (this.attrs = bM(n, this.attrs || {})), r && (this.attrs = bM({ class: r }, this.attrs || {}));
  }
  domAtPos(e) {
    return Aae(this, e);
  }
  reuseDOM(e) {
    e.nodeName == "DIV" && (this.setDOM(e), this.flags |= 6);
  }
  sync(e, n) {
    var r;
    this.dom ? this.flags & 4 && (_ae(this.dom), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0) : (this.setDOM(document.createElement("div")), this.dom.className = "cm-line", this.prevAttrs = this.attrs ? null : void 0), this.prevAttrs !== void 0 && (_M(this.dom, this.prevAttrs, this.attrs), this.dom.classList.add("cm-line"), this.prevAttrs = void 0), super.sync(e, n);
    let i = this.dom.lastChild;
    for (; i && Jt.get(i) instanceof el; )
      i = i.lastChild;
    if (!i || !this.length || i.nodeName != "BR" && ((r = Jt.get(i)) === null || r === void 0 ? void 0 : r.isEditable) == !1 && (!Ne.ios || !this.children.some((a) => a instanceof lo))) {
      let a = document.createElement("BR");
      a.cmIgnore = !0, this.dom.appendChild(a);
    }
  }
  measureTextSize() {
    if (this.children.length == 0 || this.length > 20)
      return null;
    let e = 0, n;
    for (let r of this.children) {
      if (!(r instanceof lo) || /[^ -~]/.test(r.text))
        return null;
      let i = Uh(r.dom);
      if (i.length != 1)
        return null;
      e += i[0].width, n = i[0].height;
    }
    return e ? {
      lineHeight: this.dom.getBoundingClientRect().height,
      charWidth: e / this.length,
      textHeight: n
    } : null;
  }
  coordsAt(e, n) {
    let r = Mae(this, e, n);
    if (!this.children.length && r && this.parent) {
      let { heightOracle: i } = this.parent.view.viewState, a = r.bottom - r.top;
      if (Math.abs(a - i.lineHeight) < 2 && i.textHeight < a) {
        let o = (a - i.textHeight) / 2;
        return { top: r.top + o, bottom: r.bottom - o, left: r.left, right: r.left };
      }
    }
    return r;
  }
  become(e) {
    return e instanceof Ln && this.children.length == 0 && e.children.length == 0 && rS(this.attrs, e.attrs) && this.breakAfter == e.breakAfter;
  }
  covers() {
    return !0;
  }
  static find(e, n) {
    for (let r = 0, i = 0; r < e.children.length; r++) {
      let a = e.children[r], o = i + a.length;
      if (o >= n) {
        if (a instanceof Ln)
          return a;
        if (o > n)
          break;
      }
      i = o + a.breakAfter;
    }
    return null;
  }
}
class Ls extends Jt {
  constructor(e, n, r) {
    super(), this.widget = e, this.length = n, this.deco = r, this.breakAfter = 0, this.prevWidget = null;
  }
  merge(e, n, r, i, a, o) {
    return r && (!(r instanceof Ls) || !this.widget.compare(r.widget) || e > 0 && a <= 0 || n < this.length && o <= 0) ? !1 : (this.length = e + (r ? r.length : 0) + (this.length - n), !0);
  }
  domAtPos(e) {
    return e == 0 ? kr.before(this.dom) : kr.after(this.dom, e == this.length);
  }
  split(e) {
    let n = this.length - e;
    this.length = e;
    let r = new Ls(this.widget, n, this.deco);
    return r.breakAfter = this.breakAfter, r;
  }
  get children() {
    return n4;
  }
  sync(e) {
    (!this.dom || !this.widget.updateDOM(this.dom, e)) && (this.dom && this.prevWidget && this.prevWidget.destroy(this.dom), this.prevWidget = null, this.setDOM(this.widget.toDOM(e)), this.widget.editable || (this.dom.contentEditable = "false"));
  }
  get overrideDOMText() {
    return this.parent ? this.parent.view.state.doc.slice(this.posAtStart, this.posAtEnd) : Ft.empty;
  }
  domBoundsAround() {
    return null;
  }
  become(e) {
    return e instanceof Ls && e.widget.constructor == this.widget.constructor ? (e.widget.compare(this.widget) || this.markDirty(!0), this.dom && !this.prevWidget && (this.prevWidget = this.widget), this.widget = e.widget, this.length = e.length, this.deco = e.deco, this.breakAfter = e.breakAfter, !0) : !1;
  }
  ignoreMutation() {
    return !0;
  }
  ignoreEvent(e) {
    return this.widget.ignoreEvent(e);
  }
  get isEditable() {
    return !1;
  }
  get isWidget() {
    return !0;
  }
  coordsAt(e, n) {
    return this.widget.coordsAt(this.dom, e, n);
  }
  destroy() {
    super.destroy(), this.dom && this.widget.destroy(this.dom);
  }
  covers(e) {
    let { startSide: n, endSide: r } = this.deco;
    return n == r ? !1 : e < 0 ? n < 0 : r > 0;
  }
}
class ds {
  /**
  Compare this instance to another instance of the same type.
  (TypeScript can't express this, but only instances of the same
  specific class will be passed to this method.) This is used to
  avoid redrawing widgets when they are replaced by a new
  decoration of the same type. The default implementation just
  returns `false`, which will cause new instances of the widget to
  always be redrawn.
  */
  eq(e) {
    return !1;
  }
  /**
  Update a DOM element created by a widget of the same type (but
  different, non-`eq` content) to reflect this widget. May return
  true to indicate that it could update, false to indicate it
  couldn't (in which case the widget will be redrawn). The default
  implementation just returns false.
  */
  updateDOM(e, n) {
    return !1;
  }
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  The estimated height this widget will have, to be used when
  estimating the height of content that hasn't been drawn. May
  return -1 to indicate you don't know. The default implementation
  returns -1.
  */
  get estimatedHeight() {
    return -1;
  }
  /**
  For inline widgets that are displayed inline (as opposed to
  `inline-block`) and introduce line breaks (through `<br>` tags
  or textual newlines), this must indicate the amount of line
  breaks they introduce. Defaults to 0.
  */
  get lineBreaks() {
    return 0;
  }
  /**
  Can be used to configure which kinds of events inside the widget
  should be ignored by the editor. The default is to ignore all
  events.
  */
  ignoreEvent(e) {
    return !0;
  }
  /**
  Override the way screen coordinates for positions at/in the
  widget are found. `pos` will be the offset into the widget, and
  `side` the side of the position that is being queried—less than
  zero for before, greater than zero for after, and zero for
  directly at that position.
  */
  coordsAt(e, n, r) {
    return null;
  }
  /**
  @internal
  */
  get isHidden() {
    return !1;
  }
  /**
  @internal
  */
  get editable() {
    return !1;
  }
  /**
  This is called when the an instance of the widget is removed
  from the editor view.
  */
  destroy(e) {
  }
}
var Jr = /* @__PURE__ */ function(t) {
  return t[t.Text = 0] = "Text", t[t.WidgetBefore = 1] = "WidgetBefore", t[t.WidgetAfter = 2] = "WidgetAfter", t[t.WidgetRange = 3] = "WidgetRange", t;
}(Jr || (Jr = {}));
class Ze extends wf {
  constructor(e, n, r, i) {
    super(), this.startSide = e, this.endSide = n, this.widget = r, this.spec = i;
  }
  /**
  @internal
  */
  get heightRelevant() {
    return !1;
  }
  /**
  Create a mark decoration, which influences the styling of the
  content in its range. Nested mark decorations will cause nested
  DOM elements to be created. Nesting order is determined by
  precedence of the [facet](https://codemirror.net/6/docs/ref/#view.EditorView^decorations), with
  the higher-precedence decorations creating the inner DOM nodes.
  Such elements are split on line boundaries and on the boundaries
  of lower-precedence decorations.
  */
  static mark(e) {
    return new iy(e);
  }
  /**
  Create a widget decoration, which displays a DOM element at the
  given position.
  */
  static widget(e) {
    let n = Math.max(-1e4, Math.min(1e4, e.side || 0)), r = !!e.block;
    return n += r && !e.inlineOrder ? n > 0 ? 3e8 : -4e8 : n > 0 ? 1e8 : -1e8, new gu(e, n, n, r, e.widget || null, !1);
  }
  /**
  Create a replace decoration which replaces the given range with
  a widget, or simply hides it.
  */
  static replace(e) {
    let n = !!e.block, r, i;
    if (e.isBlockGap)
      r = -5e8, i = 4e8;
    else {
      let { start: a, end: o } = Iae(e, n);
      r = (a ? n ? -3e8 : -1 : 5e8) - 1, i = (o ? n ? 2e8 : 1 : -6e8) + 1;
    }
    return new gu(e, r, i, n, e.widget || null, !0);
  }
  /**
  Create a line decoration, which can add DOM attributes to the
  line starting at the given position.
  */
  static line(e) {
    return new ay(e);
  }
  /**
  Build a [`DecorationSet`](https://codemirror.net/6/docs/ref/#view.DecorationSet) from the given
  decorated range or ranges. If the ranges aren't already sorted,
  pass `true` for `sort` to make the library sort them for you.
  */
  static set(e, n = !1) {
    return Vt.of(e, n);
  }
  /**
  @internal
  */
  hasHeight() {
    return this.widget ? this.widget.estimatedHeight > -1 : !1;
  }
}
Ze.none = Vt.empty;
class iy extends Ze {
  constructor(e) {
    let { start: n, end: r } = Iae(e);
    super(n ? -1 : 5e8, r ? 1 : -6e8, null, e), this.tagName = e.tagName || "span", this.class = e.class || "", this.attrs = e.attributes || null;
  }
  eq(e) {
    var n, r;
    return this == e || e instanceof iy && this.tagName == e.tagName && (this.class || ((n = this.attrs) === null || n === void 0 ? void 0 : n.class)) == (e.class || ((r = e.attrs) === null || r === void 0 ? void 0 : r.class)) && rS(this.attrs, e.attrs, "class");
  }
  range(e, n = e) {
    if (e >= n)
      throw new RangeError("Mark decorations may not be empty");
    return super.range(e, n);
  }
}
iy.prototype.point = !1;
class ay extends Ze {
  constructor(e) {
    super(-2e8, -2e8, null, e);
  }
  eq(e) {
    return e instanceof ay && this.spec.class == e.spec.class && rS(this.spec.attributes, e.spec.attributes);
  }
  range(e, n = e) {
    if (n != e)
      throw new RangeError("Line decoration ranges must be zero-length");
    return super.range(e, n);
  }
}
ay.prototype.mapMode = yr.TrackBefore;
ay.prototype.point = !0;
class gu extends Ze {
  constructor(e, n, r, i, a, o) {
    super(n, r, a, e), this.block = i, this.isReplace = o, this.mapMode = i ? n <= 0 ? yr.TrackBefore : yr.TrackAfter : yr.TrackDel;
  }
  // Only relevant when this.block == true
  get type() {
    return this.startSide != this.endSide ? Jr.WidgetRange : this.startSide <= 0 ? Jr.WidgetBefore : Jr.WidgetAfter;
  }
  get heightRelevant() {
    return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
  }
  eq(e) {
    return e instanceof gu && Wat(this.widget, e.widget) && this.block == e.block && this.startSide == e.startSide && this.endSide == e.endSide;
  }
  range(e, n = e) {
    if (this.isReplace && (e > n || e == n && this.startSide > 0 && this.endSide <= 0))
      throw new RangeError("Invalid range for replacement decoration");
    if (!this.isReplace && n != e)
      throw new RangeError("Widget decorations can only have zero-length ranges");
    return super.range(e, n);
  }
}
gu.prototype.point = !0;
function Iae(t, e = !1) {
  let { inclusiveStart: n, inclusiveEnd: r } = t;
  return n == null && (n = t.inclusive), r == null && (r = t.inclusive), { start: n ?? e, end: r ?? e };
}
function Wat(t, e) {
  return t == e || !!(t && e && t.compare(e));
}
function OM(t, e, n, r = 0) {
  let i = n.length - 1;
  i >= 0 && n[i] + r >= t ? n[i] = Math.max(n[i], e) : n.push(t, e);
}
class Qg {
  constructor(e, n, r, i) {
    this.doc = e, this.pos = n, this.end = r, this.disallowBlockEffectsFor = i, this.content = [], this.curLine = null, this.breakAtStart = 0, this.pendingBuffer = 0, this.bufferMarks = [], this.atCursorPos = !0, this.openStart = -1, this.openEnd = -1, this.text = "", this.textOff = 0, this.cursor = e.iter(), this.skip = n;
  }
  posCovered() {
    if (this.content.length == 0)
      return !this.breakAtStart && this.doc.lineAt(this.pos).from != this.pos;
    let e = this.content[this.content.length - 1];
    return !(e.breakAfter || e instanceof Ls && e.deco.endSide < 0);
  }
  getLine() {
    return this.curLine || (this.content.push(this.curLine = new Ln()), this.atCursorPos = !0), this.curLine;
  }
  flushBuffer(e = this.bufferMarks) {
    this.pendingBuffer && (this.curLine.append(Gb(new Xh(-1), e), e.length), this.pendingBuffer = 0);
  }
  addBlockWidget(e) {
    this.flushBuffer(), this.curLine = null, this.content.push(e);
  }
  finish(e) {
    this.pendingBuffer && e <= this.bufferMarks.length ? this.flushBuffer() : this.pendingBuffer = 0, !this.posCovered() && !(e && this.content.length && this.content[this.content.length - 1] instanceof Ls) && this.getLine();
  }
  buildText(e, n, r) {
    for (; e > 0; ) {
      if (this.textOff == this.text.length) {
        let { value: a, lineBreak: o, done: s } = this.cursor.next(this.skip);
        if (this.skip = 0, s)
          throw new Error("Ran out of text content when drawing inline views");
        if (o) {
          this.posCovered() || this.getLine(), this.content.length ? this.content[this.content.length - 1].breakAfter = 1 : this.breakAtStart = 1, this.flushBuffer(), this.curLine = null, this.atCursorPos = !0, e--;
          continue;
        } else
          this.text = a, this.textOff = 0;
      }
      let i = Math.min(
        this.text.length - this.textOff,
        e,
        512
        /* T.Chunk */
      );
      this.flushBuffer(n.slice(n.length - r)), this.getLine().append(Gb(new lo(this.text.slice(this.textOff, this.textOff + i)), n), r), this.atCursorPos = !0, this.textOff += i, e -= i, r = 0;
    }
  }
  span(e, n, r, i) {
    this.buildText(n - e, r, i), this.pos = n, this.openStart < 0 && (this.openStart = i);
  }
  point(e, n, r, i, a, o) {
    if (this.disallowBlockEffectsFor[o] && r instanceof gu) {
      if (r.block)
        throw new RangeError("Block decorations may not be specified via plugins");
      if (n > this.doc.lineAt(this.pos).to)
        throw new RangeError("Decorations that replace line breaks may not be specified via plugins");
    }
    let s = n - e;
    if (r instanceof gu)
      if (r.block)
        r.startSide > 0 && !this.posCovered() && this.getLine(), this.addBlockWidget(new Ls(r.widget || Yh.block, s, r));
      else {
        let l = Ql.create(r.widget || Yh.inline, s, s ? 0 : r.startSide), u = this.atCursorPos && !l.isEditable && a <= i.length && (e < n || r.startSide > 0), c = !l.isEditable && (e < n || a > i.length || r.startSide <= 0), f = this.getLine();
        this.pendingBuffer == 2 && !u && !l.isEditable && (this.pendingBuffer = 0), this.flushBuffer(i), u && (f.append(Gb(new Xh(1), i), a), a = i.length + Math.max(0, a - i.length)), f.append(Gb(l, i), a), this.atCursorPos = c, this.pendingBuffer = c ? e < n || a > i.length ? 1 : 2 : 0, this.pendingBuffer && (this.bufferMarks = i.slice());
      }
    else this.doc.lineAt(this.pos).from == this.pos && this.getLine().addLineDeco(r);
    s && (this.textOff + s <= this.text.length ? this.textOff += s : (this.skip += s - (this.text.length - this.textOff), this.text = "", this.textOff = 0), this.pos = n), this.openStart < 0 && (this.openStart = a);
  }
  static build(e, n, r, i, a) {
    let o = new Qg(e, n, r, a);
    return o.openEnd = Vt.spans(i, n, r, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
  }
}
function Gb(t, e) {
  for (let n of e)
    t = new el(n, [t], t.length);
  return t;
}
class Yh extends ds {
  constructor(e) {
    super(), this.tag = e;
  }
  eq(e) {
    return e.tag == this.tag;
  }
  toDOM() {
    return document.createElement(this.tag);
  }
  updateDOM(e) {
    return e.nodeName.toLowerCase() == this.tag;
  }
  get isHidden() {
    return !0;
  }
}
Yh.inline = /* @__PURE__ */ new Yh("span");
Yh.block = /* @__PURE__ */ new Yh("div");
var pn = /* @__PURE__ */ function(t) {
  return t[t.LTR = 0] = "LTR", t[t.RTL = 1] = "RTL", t;
}(pn || (pn = {}));
const Pf = pn.LTR, r4 = pn.RTL;
function Dae(t) {
  let e = [];
  for (let n = 0; n < t.length; n++)
    e.push(1 << +t[n]);
  return e;
}
const Qat = /* @__PURE__ */ Dae("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), Hat = /* @__PURE__ */ Dae("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), SM = /* @__PURE__ */ Object.create(null), wo = [];
for (let t of ["()", "[]", "{}"]) {
  let e = /* @__PURE__ */ t.charCodeAt(0), n = /* @__PURE__ */ t.charCodeAt(1);
  SM[e] = n, SM[n] = -e;
}
function Rae(t) {
  return t <= 247 ? Qat[t] : 1424 <= t && t <= 1524 ? 2 : 1536 <= t && t <= 1785 ? Hat[t - 1536] : 1774 <= t && t <= 2220 ? 4 : 8192 <= t && t <= 8204 ? 256 : 64336 <= t && t <= 65023 ? 4 : 1;
}
const Gat = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
class Hl {
  /**
  The direction of this span.
  */
  get dir() {
    return this.level % 2 ? r4 : Pf;
  }
  /**
  @internal
  */
  constructor(e, n, r) {
    this.from = e, this.to = n, this.level = r;
  }
  /**
  @internal
  */
  side(e, n) {
    return this.dir == n == e ? this.to : this.from;
  }
  /**
  @internal
  */
  forward(e, n) {
    return e == (this.dir == n);
  }
  /**
  @internal
  */
  static find(e, n, r, i) {
    let a = -1;
    for (let o = 0; o < e.length; o++) {
      let s = e[o];
      if (s.from <= n && s.to >= n) {
        if (s.level == r)
          return o;
        (a < 0 || (i != 0 ? i < 0 ? s.from < n : s.to > n : e[a].level > s.level)) && (a = o);
      }
    }
    if (a < 0)
      throw new RangeError("Index out of range");
    return a;
  }
}
function kae(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++) {
    let r = t[n], i = e[n];
    if (r.from != i.from || r.to != i.to || r.direction != i.direction || !kae(r.inner, i.inner))
      return !1;
  }
  return !0;
}
const qt = [];
function jat(t, e, n, r, i) {
  for (let a = 0; a <= r.length; a++) {
    let o = a ? r[a - 1].to : e, s = a < r.length ? r[a].from : n, l = a ? 256 : i;
    for (let u = o, c = l, f = l; u < s; u++) {
      let d = Rae(t.charCodeAt(u));
      d == 512 ? d = c : d == 8 && f == 4 && (d = 16), qt[u] = d == 4 ? 2 : d, d & 7 && (f = d), c = d;
    }
    for (let u = o, c = l, f = l; u < s; u++) {
      let d = qt[u];
      if (d == 128)
        u < s - 1 && c == qt[u + 1] && c & 24 ? d = qt[u] = c : qt[u] = 256;
      else if (d == 64) {
        let h = u + 1;
        for (; h < s && qt[h] == 64; )
          h++;
        let p = u && c == 8 || h < n && qt[h] == 8 ? f == 1 ? 1 : 8 : 256;
        for (let v = u; v < h; v++)
          qt[v] = p;
        u = h - 1;
      } else d == 8 && f == 1 && (qt[u] = 1);
      c = d, d & 7 && (f = d);
    }
  }
}
function Zat(t, e, n, r, i) {
  let a = i == 1 ? 2 : 1;
  for (let o = 0, s = 0, l = 0; o <= r.length; o++) {
    let u = o ? r[o - 1].to : e, c = o < r.length ? r[o].from : n;
    for (let f = u, d, h, p; f < c; f++)
      if (h = SM[d = t.charCodeAt(f)])
        if (h < 0) {
          for (let v = s - 3; v >= 0; v -= 3)
            if (wo[v + 1] == -h) {
              let g = wo[v + 2], m = g & 2 ? i : g & 4 ? g & 1 ? a : i : 0;
              m && (qt[f] = qt[wo[v]] = m), s = v;
              break;
            }
        } else {
          if (wo.length == 189)
            break;
          wo[s++] = f, wo[s++] = d, wo[s++] = l;
        }
      else if ((p = qt[f]) == 2 || p == 1) {
        let v = p == i;
        l = v ? 0 : 1;
        for (let g = s - 3; g >= 0; g -= 3) {
          let m = wo[g + 2];
          if (m & 2)
            break;
          if (v)
            wo[g + 2] |= 2;
          else {
            if (m & 4)
              break;
            wo[g + 2] |= 4;
          }
        }
      }
  }
}
function Uat(t, e, n, r) {
  for (let i = 0, a = r; i <= n.length; i++) {
    let o = i ? n[i - 1].to : t, s = i < n.length ? n[i].from : e;
    for (let l = o; l < s; ) {
      let u = qt[l];
      if (u == 256) {
        let c = l + 1;
        for (; ; )
          if (c == s) {
            if (i == n.length)
              break;
            c = n[i++].to, s = i < n.length ? n[i].from : e;
          } else if (qt[c] == 256)
            c++;
          else
            break;
        let f = a == 1, d = (c < e ? qt[c] : r) == 1, h = f == d ? f ? 1 : 2 : r;
        for (let p = c, v = i, g = v ? n[v - 1].to : t; p > l; )
          p == g && (p = n[--v].from, g = v ? n[v - 1].to : t), qt[--p] = h;
        l = c;
      } else
        a = u, l++;
    }
  }
}
function xM(t, e, n, r, i, a, o) {
  let s = r % 2 ? 2 : 1;
  if (r % 2 == i % 2)
    for (let l = e, u = 0; l < n; ) {
      let c = !0, f = !1;
      if (u == a.length || l < a[u].from) {
        let v = qt[l];
        v != s && (c = !1, f = v == 16);
      }
      let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
      e: for (; ; )
        if (u < a.length && p == a[u].from) {
          if (f)
            break e;
          let v = a[u];
          if (!c)
            for (let g = v.to, m = u + 1; ; ) {
              if (g == n)
                break e;
              if (m < a.length && a[m].from == g)
                g = a[m++].to;
              else {
                if (qt[g] == s)
                  break e;
                break;
              }
            }
          if (u++, d)
            d.push(v);
          else {
            v.from > l && o.push(new Hl(l, v.from, h));
            let g = v.direction == Pf != !(h % 2);
            wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.to;
          }
          p = v.to;
        } else {
          if (p == n || (c ? qt[p] != s : qt[p] == s))
            break;
          p++;
        }
      d ? xM(t, l, p, r + 1, i, d, o) : l < p && o.push(new Hl(l, p, h)), l = p;
    }
  else
    for (let l = n, u = a.length; l > e; ) {
      let c = !0, f = !1;
      if (!u || l > a[u - 1].to) {
        let v = qt[l - 1];
        v != s && (c = !1, f = v == 16);
      }
      let d = !c && s == 1 ? [] : null, h = c ? r : r + 1, p = l;
      e: for (; ; )
        if (u && p == a[u - 1].to) {
          if (f)
            break e;
          let v = a[--u];
          if (!c)
            for (let g = v.from, m = u; ; ) {
              if (g == e)
                break e;
              if (m && a[m - 1].to == g)
                g = a[--m].from;
              else {
                if (qt[g - 1] == s)
                  break e;
                break;
              }
            }
          if (d)
            d.push(v);
          else {
            v.to < l && o.push(new Hl(v.to, l, h));
            let g = v.direction == Pf != !(h % 2);
            wM(t, g ? r + 1 : r, i, v.inner, v.from, v.to, o), l = v.from;
          }
          p = v.from;
        } else {
          if (p == e || (c ? qt[p - 1] != s : qt[p - 1] == s))
            break;
          p--;
        }
      d ? xM(t, p, l, r + 1, i, d, o) : p < l && o.push(new Hl(p, l, h)), l = p;
    }
}
function wM(t, e, n, r, i, a, o) {
  let s = e % 2 ? 2 : 1;
  jat(t, i, a, r, s), Zat(t, i, a, r, s), Uat(i, a, r, s), xM(t, i, a, e, n, r, o);
}
function Xat(t, e, n) {
  if (!t)
    return [new Hl(0, 0, e == r4 ? 1 : 0)];
  if (e == Pf && !n.length && !Gat.test(t))
    return Lae(t.length);
  if (n.length)
    for (; t.length > qt.length; )
      qt[qt.length] = 256;
  let r = [], i = e == Pf ? 0 : 1;
  return wM(t, i, i, n, 0, t.length, r), r;
}
function Lae(t) {
  return [new Hl(0, t, 0)];
}
let Nae = "";
function Yat(t, e, n, r, i) {
  var a;
  let o = r.head - t.from, s = Hl.find(e, o, (a = r.bidiLevel) !== null && a !== void 0 ? a : -1, r.assoc), l = e[s], u = l.side(i, n);
  if (o == u) {
    let d = s += i ? 1 : -1;
    if (d < 0 || d >= e.length)
      return null;
    l = e[s = d], o = l.side(!i, n), u = l.side(i, n);
  }
  let c = _r(t.text, o, l.forward(i, n));
  (c < l.from || c > l.to) && (c = u), Nae = t.text.slice(Math.min(o, c), Math.max(o, c));
  let f = s == (i ? e.length - 1 : 0) ? null : e[s + (i ? 1 : -1)];
  return f && c == u && f.level + (i ? 0 : 1) < l.level ? me.cursor(f.side(!i, n) + t.from, f.forward(i, n) ? 1 : -1, f.level) : me.cursor(c + t.from, l.forward(i, n) ? -1 : 1, l.level);
}
function qat(t, e, n) {
  for (let r = e; r < n; r++) {
    let i = Rae(t.charCodeAt(r));
    if (i == 1)
      return Pf;
    if (i == 2 || i == 4)
      return r4;
  }
  return Pf;
}
const Bae = /* @__PURE__ */ Be.define(), zae = /* @__PURE__ */ Be.define(), Vae = /* @__PURE__ */ Be.define(), Fae = /* @__PURE__ */ Be.define(), CM = /* @__PURE__ */ Be.define(), Wae = /* @__PURE__ */ Be.define(), Qae = /* @__PURE__ */ Be.define(), Hae = /* @__PURE__ */ Be.define({
  combine: (t) => t.some((e) => e)
}), Gae = /* @__PURE__ */ Be.define({
  combine: (t) => t.some((e) => e)
}), jae = /* @__PURE__ */ Be.define();
class uh {
  constructor(e, n = "nearest", r = "nearest", i = 5, a = 5, o = !1) {
    this.range = e, this.y = n, this.x = r, this.yMargin = i, this.xMargin = a, this.isSnapshot = o;
  }
  map(e) {
    return e.empty ? this : new uh(this.range.map(e), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
  clip(e) {
    return this.range.to <= e.doc.length ? this : new uh(me.cursor(e.doc.length), this.y, this.x, this.yMargin, this.xMargin, this.isSnapshot);
  }
}
const jb = /* @__PURE__ */ dt.define({ map: (t, e) => t.map(e) }), Zae = /* @__PURE__ */ dt.define();
function mi(t, e, n) {
  let r = t.facet(Fae);
  r.length ? r[0](e) : window.onerror ? window.onerror(String(e), n, void 0, void 0, e) : n ? console.error(n + ":", e) : console.error(e);
}
const El = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : !0 });
let Kat = 0;
const Jv = /* @__PURE__ */ Be.define();
class kn {
  constructor(e, n, r, i, a) {
    this.id = e, this.create = n, this.domEventHandlers = r, this.domEventObservers = i, this.extension = a(this);
  }
  /**
  Define a plugin from a constructor function that creates the
  plugin's value, given an editor view.
  */
  static define(e, n) {
    const { eventHandlers: r, eventObservers: i, provide: a, decorations: o } = n || {};
    return new kn(Kat++, e, r, i, (s) => {
      let l = [Jv.of(s)];
      return o && l.push(Xm.of((u) => {
        let c = u.plugin(s);
        return c ? o(c) : Ze.none;
      })), a && l.push(a(s)), l;
    });
  }
  /**
  Create a plugin for a class whose constructor takes a single
  editor view as argument.
  */
  static fromClass(e, n) {
    return kn.define((r) => new e(r), n);
  }
}
class g$ {
  constructor(e) {
    this.spec = e, this.mustUpdate = null, this.value = null;
  }
  update(e) {
    if (this.value) {
      if (this.mustUpdate) {
        let n = this.mustUpdate;
        if (this.mustUpdate = null, this.value.update)
          try {
            this.value.update(n);
          } catch (r) {
            if (mi(n.state, r, "CodeMirror plugin crashed"), this.value.destroy)
              try {
                this.value.destroy();
              } catch {
              }
            this.deactivate();
          }
      }
    } else if (this.spec)
      try {
        this.value = this.spec.create(e);
      } catch (n) {
        mi(e.state, n, "CodeMirror plugin crashed"), this.deactivate();
      }
    return this;
  }
  destroy(e) {
    var n;
    if (!((n = this.value) === null || n === void 0) && n.destroy)
      try {
        this.value.destroy();
      } catch (r) {
        mi(e.state, r, "CodeMirror plugin crashed");
      }
  }
  deactivate() {
    this.spec = this.value = null;
  }
}
const Uae = /* @__PURE__ */ Be.define(), i4 = /* @__PURE__ */ Be.define(), Xm = /* @__PURE__ */ Be.define(), Xae = /* @__PURE__ */ Be.define(), a4 = /* @__PURE__ */ Be.define(), Yae = /* @__PURE__ */ Be.define();
function BH(t, e) {
  let n = t.state.facet(Yae);
  if (!n.length)
    return n;
  let r = n.map((a) => a instanceof Function ? a(t) : a), i = [];
  return Vt.spans(r, e.from, e.to, {
    point() {
    },
    span(a, o, s, l) {
      let u = a - e.from, c = o - e.from, f = i;
      for (let d = s.length - 1; d >= 0; d--, l--) {
        let h = s[d].spec.bidiIsolate, p;
        if (h == null && (h = qat(e.text, u, c)), l > 0 && f.length && (p = f[f.length - 1]).to == u && p.direction == h)
          p.to = c, f = p.inner;
        else {
          let v = { from: u, to: c, direction: h, inner: [] };
          f.push(v), f = v.inner;
        }
      }
    }
  }), i;
}
const qae = /* @__PURE__ */ Be.define();
function Kae(t) {
  let e = 0, n = 0, r = 0, i = 0;
  for (let a of t.state.facet(qae)) {
    let o = a(t);
    o && (o.left != null && (e = Math.max(e, o.left)), o.right != null && (n = Math.max(n, o.right)), o.top != null && (r = Math.max(r, o.top)), o.bottom != null && (i = Math.max(i, o.bottom)));
  }
  return { left: e, right: n, top: r, bottom: i };
}
const eg = /* @__PURE__ */ Be.define();
class xa {
  constructor(e, n, r, i) {
    this.fromA = e, this.toA = n, this.fromB = r, this.toB = i;
  }
  join(e) {
    return new xa(Math.min(this.fromA, e.fromA), Math.max(this.toA, e.toA), Math.min(this.fromB, e.fromB), Math.max(this.toB, e.toB));
  }
  addToSet(e) {
    let n = e.length, r = this;
    for (; n > 0; n--) {
      let i = e[n - 1];
      if (!(i.fromA > r.toA)) {
        if (i.toA < r.fromA)
          break;
        r = r.join(i), e.splice(n - 1, 1);
      }
    }
    return e.splice(n, 0, r), e;
  }
  static extendWithRanges(e, n) {
    if (n.length == 0)
      return e;
    let r = [];
    for (let i = 0, a = 0, o = 0, s = 0; ; i++) {
      let l = i == e.length ? null : e[i], u = o - s, c = l ? l.fromB : 1e9;
      for (; a < n.length && n[a] < c; ) {
        let f = n[a], d = n[a + 1], h = Math.max(s, f), p = Math.min(c, d);
        if (h <= p && new xa(h + u, p + u, h, p).addToSet(r), d > c)
          break;
        a += 2;
      }
      if (!l)
        return r;
      new xa(l.fromA, l.toA, l.fromB, l.toB).addToSet(r), o = l.toA, s = l.toB;
    }
  }
}
class iS {
  constructor(e, n, r) {
    this.view = e, this.state = n, this.transactions = r, this.flags = 0, this.startState = e.state, this.changes = jn.empty(this.startState.doc.length);
    for (let a of r)
      this.changes = this.changes.compose(a.changes);
    let i = [];
    this.changes.iterChangedRanges((a, o, s, l) => i.push(new xa(a, o, s, l))), this.changedRanges = i;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new iS(e, n, r);
  }
  /**
  Tells you whether the [viewport](https://codemirror.net/6/docs/ref/#view.EditorView.viewport) or
  [visible ranges](https://codemirror.net/6/docs/ref/#view.EditorView.visibleRanges) changed in this
  update.
  */
  get viewportChanged() {
    return (this.flags & 4) > 0;
  }
  /**
  Indicates whether the height of a block element in the editor
  changed in this update.
  */
  get heightChanged() {
    return (this.flags & 2) > 0;
  }
  /**
  Returns true when the document was modified or the size of the
  editor, or elements within the editor, changed.
  */
  get geometryChanged() {
    return this.docChanged || (this.flags & 10) > 0;
  }
  /**
  True when this update indicates a focus change.
  */
  get focusChanged() {
    return (this.flags & 1) > 0;
  }
  /**
  Whether the document changed in this update.
  */
  get docChanged() {
    return !this.changes.empty;
  }
  /**
  Whether the selection was explicitly set in this update.
  */
  get selectionSet() {
    return this.transactions.some((e) => e.selection);
  }
  /**
  @internal
  */
  get empty() {
    return this.flags == 0 && this.transactions.length == 0;
  }
}
class zH extends Jt {
  get length() {
    return this.view.state.doc.length;
  }
  constructor(e) {
    super(), this.view = e, this.decorations = [], this.dynamicDecorationMap = [!1], this.domChanged = null, this.hasComposition = null, this.markedForComposition = /* @__PURE__ */ new Set(), this.editContextFormatting = Ze.none, this.lastCompositionAfterCursor = !1, this.minWidth = 0, this.minWidthFrom = 0, this.minWidthTo = 0, this.impreciseAnchor = null, this.impreciseHead = null, this.forceSelection = !1, this.lastUpdate = Date.now(), this.setDOM(e.contentDOM), this.children = [new Ln()], this.children[0].setParent(this), this.updateDeco(), this.updateInner([new xa(0, 0, 0, e.state.doc.length)], 0, null);
  }
  // Update the document view to a given state.
  update(e) {
    var n;
    let r = e.changedRanges;
    this.minWidth > 0 && r.length && (r.every(({ fromA: u, toA: c }) => c < this.minWidthFrom || u > this.minWidthTo) ? (this.minWidthFrom = e.changes.mapPos(this.minWidthFrom, 1), this.minWidthTo = e.changes.mapPos(this.minWidthTo, 1)) : this.minWidth = this.minWidthFrom = this.minWidthTo = 0), this.updateEditContextFormatting(e);
    let i = -1;
    this.view.inputState.composing >= 0 && !this.view.observer.editContext && (!((n = this.domChanged) === null || n === void 0) && n.newSel ? i = this.domChanged.newSel.head : !aot(e.changes, this.hasComposition) && !e.selectionSet && (i = e.state.selection.main.head));
    let a = i > -1 ? eot(this.view, e.changes, i) : null;
    if (this.domChanged = null, this.hasComposition) {
      this.markedForComposition.clear();
      let { from: u, to: c } = this.hasComposition;
      r = new xa(u, c, e.changes.mapPos(u, -1), e.changes.mapPos(c, 1)).addToSet(r.slice());
    }
    this.hasComposition = a ? { from: a.range.fromB, to: a.range.toB } : null, (Ne.ie || Ne.chrome) && !a && e && e.state.doc.lines != e.startState.doc.lines && (this.forceSelection = !0);
    let o = this.decorations, s = this.updateDeco(), l = rot(o, s, e.changes);
    return r = xa.extendWithRanges(r, l), !(this.flags & 7) && r.length == 0 ? !1 : (this.updateInner(r, e.startState.doc.length, a), e.transactions.length && (this.lastUpdate = Date.now()), !0);
  }
  // Used by update and the constructor do perform the actual DOM
  // update
  updateInner(e, n, r) {
    this.view.viewState.mustMeasureContent = !0, this.updateChildren(e, n, r);
    let { observer: i } = this.view;
    i.ignore(() => {
      this.dom.style.height = this.view.viewState.contentHeight / this.view.scaleY + "px", this.dom.style.flexBasis = this.minWidth ? this.minWidth + "px" : "";
      let o = Ne.chrome || Ne.ios ? { node: i.selectionRange.focusNode, written: !1 } : void 0;
      this.sync(this.view, o), this.flags &= -8, o && (o.written || i.selectionRange.focusNode != o.node) && (this.forceSelection = !0), this.dom.style.height = "";
    }), this.markedForComposition.forEach(
      (o) => o.flags &= -9
      /* ViewFlag.Composition */
    );
    let a = [];
    if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
      for (let o of this.children)
        o instanceof Ls && o.widget instanceof VH && a.push(o.dom);
    i.updateGaps(a);
  }
  updateChildren(e, n, r) {
    let i = r ? r.range.addToSet(e.slice()) : e, a = this.childCursor(n);
    for (let o = i.length - 1; ; o--) {
      let s = o >= 0 ? i[o] : null;
      if (!s)
        break;
      let { fromA: l, toA: u, fromB: c, toB: f } = s, d, h, p, v;
      if (r && r.range.fromB < f && r.range.toB > c) {
        let _ = Qg.build(this.view.state.doc, c, r.range.fromB, this.decorations, this.dynamicDecorationMap), O = Qg.build(this.view.state.doc, r.range.toB, f, this.decorations, this.dynamicDecorationMap);
        h = _.breakAtStart, p = _.openStart, v = O.openEnd;
        let S = this.compositionView(r);
        O.breakAtStart ? S.breakAfter = 1 : O.content.length && S.merge(S.length, S.length, O.content[0], !1, O.openStart, 0) && (S.breakAfter = O.content[0].breakAfter, O.content.shift()), _.content.length && S.merge(0, 0, _.content[_.content.length - 1], !0, 0, _.openEnd) && _.content.pop(), d = _.content.concat(S).concat(O.content);
      } else
        ({ content: d, breakAtStart: h, openStart: p, openEnd: v } = Qg.build(this.view.state.doc, c, f, this.decorations, this.dynamicDecorationMap));
      let { i: g, off: m } = a.findPos(u, 1), { i: y, off: b } = a.findPos(l, -1);
      Cae(this, y, b, g, m, d, h, p, v);
    }
    r && this.fixCompositionDOM(r);
  }
  updateEditContextFormatting(e) {
    this.editContextFormatting = this.editContextFormatting.map(e.changes);
    for (let n of e.transactions)
      for (let r of n.effects)
        r.is(Zae) && (this.editContextFormatting = r.value);
  }
  compositionView(e) {
    let n = new lo(e.text.nodeValue);
    n.flags |= 8;
    for (let { deco: i } of e.marks)
      n = new el(i, [n], n.length);
    let r = new Ln();
    return r.append(n, 0), r;
  }
  fixCompositionDOM(e) {
    let n = (a, o) => {
      o.flags |= 8 | (o.children.some(
        (l) => l.flags & 7
        /* ViewFlag.Dirty */
      ) ? 1 : 0), this.markedForComposition.add(o);
      let s = Jt.get(a);
      s && s != o && (s.dom = null), o.setDOM(a);
    }, r = this.childPos(e.range.fromB, 1), i = this.children[r.i];
    n(e.line, i);
    for (let a = e.marks.length - 1; a >= -1; a--)
      r = i.childPos(r.off, 1), i = i.children[r.i], n(a >= 0 ? e.marks[a].node : e.text, i);
  }
  // Sync the DOM selection to this.state.selection
  updateSelection(e = !1, n = !1) {
    (e || !this.view.observer.selectionRange.focusNode) && this.view.observer.readSelectionRange();
    let r = this.view.root.activeElement, i = r == this.dom, a = !i && i1(this.dom, this.view.observer.selectionRange) && !(r && this.dom.contains(r));
    if (!(i || n || a))
      return;
    let o = this.forceSelection;
    this.forceSelection = !1;
    let s = this.view.state.selection.main, l = this.moveToLine(this.domAtPos(s.anchor)), u = s.empty ? l : this.moveToLine(this.domAtPos(s.head));
    if (Ne.gecko && s.empty && !this.hasComposition && Jat(l)) {
      let f = document.createTextNode("");
      this.view.observer.ignore(() => l.node.insertBefore(f, l.node.childNodes[l.offset] || null)), l = u = new kr(f, 0), o = !0;
    }
    let c = this.view.observer.selectionRange;
    (o || !c.focusNode || (!Wg(l.node, l.offset, c.anchorNode, c.anchorOffset) || !Wg(u.node, u.offset, c.focusNode, c.focusOffset)) && !this.suppressWidgetCursorChange(c, s)) && (this.view.observer.ignore(() => {
      Ne.android && Ne.chrome && this.dom.contains(c.focusNode) && iot(c.focusNode, this.dom) && (this.dom.blur(), this.dom.focus({ preventScroll: !0 }));
      let f = Um(this.view.root);
      if (f) if (s.empty) {
        if (Ne.gecko) {
          let d = tot(l.node, l.offset);
          if (d && d != 3) {
            let h = (d == 1 ? Sae : xae)(l.node, l.offset);
            h && (l = new kr(h.node, h.offset));
          }
        }
        f.collapse(l.node, l.offset), s.bidiLevel != null && f.caretBidiLevel !== void 0 && (f.caretBidiLevel = s.bidiLevel);
      } else if (f.extend) {
        f.collapse(l.node, l.offset);
        try {
          f.extend(u.node, u.offset);
        } catch {
        }
      } else {
        let d = document.createRange();
        s.anchor > s.head && ([l, u] = [u, l]), d.setEnd(u.node, u.offset), d.setStart(l.node, l.offset), f.removeAllRanges(), f.addRange(d);
      }
      a && this.view.root.activeElement == this.dom && (this.dom.blur(), r && r.focus());
    }), this.view.observer.setSelectionRange(l, u)), this.impreciseAnchor = l.precise ? null : new kr(c.anchorNode, c.anchorOffset), this.impreciseHead = u.precise ? null : new kr(c.focusNode, c.focusOffset);
  }
  // If a zero-length widget is inserted next to the cursor during
  // composition, avoid moving it across it and disrupting the
  // composition.
  suppressWidgetCursorChange(e, n) {
    return this.hasComposition && n.empty && Wg(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset) && this.posFromDOM(e.focusNode, e.focusOffset) == n.head;
  }
  enforceCursorAssoc() {
    if (this.hasComposition)
      return;
    let { view: e } = this, n = e.state.selection.main, r = Um(e.root), { anchorNode: i, anchorOffset: a } = e.observer.selectionRange;
    if (!r || !n.empty || !n.assoc || !r.modify)
      return;
    let o = Ln.find(this, n.head);
    if (!o)
      return;
    let s = o.posAtStart;
    if (n.head == s || n.head == s + o.length)
      return;
    let l = this.coordsAt(n.head, -1), u = this.coordsAt(n.head, 1);
    if (!l || !u || l.bottom > u.top)
      return;
    let c = this.domAtPos(n.head + n.assoc);
    r.collapse(c.node, c.offset), r.modify("move", n.assoc < 0 ? "forward" : "backward", "lineboundary"), e.observer.readSelectionRange();
    let f = e.observer.selectionRange;
    e.docView.posFromDOM(f.anchorNode, f.anchorOffset) != n.from && r.collapse(i, a);
  }
  // If a position is in/near a block widget, move it to a nearby text
  // line, since we don't want the cursor inside a block widget.
  moveToLine(e) {
    let n = this.dom, r;
    if (e.node != n)
      return e;
    for (let i = e.offset; !r && i < n.childNodes.length; i++) {
      let a = Jt.get(n.childNodes[i]);
      a instanceof Ln && (r = a.domAtPos(0));
    }
    for (let i = e.offset - 1; !r && i >= 0; i--) {
      let a = Jt.get(n.childNodes[i]);
      a instanceof Ln && (r = a.domAtPos(a.length));
    }
    return r ? new kr(r.node, r.offset, !0) : e;
  }
  nearest(e) {
    for (let n = e; n; ) {
      let r = Jt.get(n);
      if (r && r.rootView == this)
        return r;
      n = n.parentNode;
    }
    return null;
  }
  posFromDOM(e, n) {
    let r = this.nearest(e);
    if (!r)
      throw new RangeError("Trying to find position for a DOM position outside of the document");
    return r.localPosFromDOM(e, n) + r.posAtStart;
  }
  domAtPos(e) {
    let { i: n, off: r } = this.childCursor().findPos(e, -1);
    for (; n < this.children.length - 1; ) {
      let i = this.children[n];
      if (r < i.length || i instanceof Ln)
        break;
      n++, r = 0;
    }
    return this.children[n].domAtPos(r);
  }
  coordsAt(e, n) {
    let r = null, i = 0;
    for (let a = this.length, o = this.children.length - 1; o >= 0; o--) {
      let s = this.children[o], l = a - s.breakAfter, u = l - s.length;
      if (l < e)
        break;
      if (u <= e && (u < e || s.covers(-1)) && (l > e || s.covers(1)) && (!r || s instanceof Ln && !(r instanceof Ln && n >= 0)))
        r = s, i = u;
      else if (r && u == e && l == e && s instanceof Ls && Math.abs(n) < 2) {
        if (s.deco.startSide < 0)
          break;
        o && (r = null);
      }
      a = u;
    }
    return r ? r.coordsAt(e - i, n) : null;
  }
  coordsForChar(e) {
    let { i: n, off: r } = this.childPos(e, 1), i = this.children[n];
    if (!(i instanceof Ln))
      return null;
    for (; i.children.length; ) {
      let { i: s, off: l } = i.childPos(r, 1);
      for (; ; s++) {
        if (s == i.children.length)
          return null;
        if ((i = i.children[s]).length)
          break;
      }
      r = l;
    }
    if (!(i instanceof lo))
      return null;
    let a = _r(i.text, r);
    if (a == r)
      return null;
    let o = Tf(i.dom, r, a).getClientRects();
    for (let s = 0; s < o.length; s++) {
      let l = o[s];
      if (s == o.length - 1 || l.top < l.bottom && l.left < l.right)
        return l;
    }
    return null;
  }
  measureVisibleLineHeights(e) {
    let n = [], { from: r, to: i } = e, a = this.view.contentDOM.clientWidth, o = a > Math.max(this.view.scrollDOM.clientWidth, this.minWidth) + 1, s = -1, l = this.view.textDirection == pn.LTR;
    for (let u = 0, c = 0; c < this.children.length; c++) {
      let f = this.children[c], d = u + f.length;
      if (d > i)
        break;
      if (u >= r) {
        let h = f.dom.getBoundingClientRect();
        if (n.push(h.height), o) {
          let p = f.dom.lastChild, v = p ? Uh(p) : [];
          if (v.length) {
            let g = v[v.length - 1], m = l ? g.right - h.left : h.right - g.left;
            m > s && (s = m, this.minWidth = a, this.minWidthFrom = u, this.minWidthTo = d);
          }
        }
      }
      u = d + f.breakAfter;
    }
    return n;
  }
  textDirectionAt(e) {
    let { i: n } = this.childPos(e, 1);
    return getComputedStyle(this.children[n].dom).direction == "rtl" ? pn.RTL : pn.LTR;
  }
  measureTextSize() {
    for (let a of this.children)
      if (a instanceof Ln) {
        let o = a.measureTextSize();
        if (o)
          return o;
      }
    let e = document.createElement("div"), n, r, i;
    return e.className = "cm-line", e.style.width = "99999px", e.style.position = "absolute", e.textContent = "abc def ghi jkl mno pqr stu", this.view.observer.ignore(() => {
      this.dom.appendChild(e);
      let a = Uh(e.firstChild)[0];
      n = e.getBoundingClientRect().height, r = a ? a.width / 27 : 7, i = a ? a.height : n, e.remove();
    }), { lineHeight: n, charWidth: r, textHeight: i };
  }
  childCursor(e = this.length) {
    let n = this.children.length;
    return n && (e -= this.children[--n].length), new wae(this.children, e, n);
  }
  computeBlockGapDeco() {
    let e = [], n = this.view.viewState;
    for (let r = 0, i = 0; ; i++) {
      let a = i == n.viewports.length ? null : n.viewports[i], o = a ? a.from - 1 : this.length;
      if (o > r) {
        let s = (n.lineBlockAt(o).bottom - n.lineBlockAt(r).top) / this.view.scaleY;
        e.push(Ze.replace({
          widget: new VH(s),
          block: !0,
          inclusive: !0,
          isBlockGap: !0
        }).range(r, o));
      }
      if (!a)
        break;
      r = a.to + 1;
    }
    return Ze.set(e);
  }
  updateDeco() {
    let e = 1, n = this.view.state.facet(Xm).map((a) => (this.dynamicDecorationMap[e++] = typeof a == "function") ? a(this.view) : a), r = !1, i = this.view.state.facet(Xae).map((a, o) => {
      let s = typeof a == "function";
      return s && (r = !0), s ? a(this.view) : a;
    });
    for (i.length && (this.dynamicDecorationMap[e++] = r, n.push(Vt.join(i))), this.decorations = [
      this.editContextFormatting,
      ...n,
      this.computeBlockGapDeco(),
      this.view.viewState.lineGapDeco
    ]; e < this.decorations.length; )
      this.dynamicDecorationMap[e++] = !1;
    return this.decorations;
  }
  scrollIntoView(e) {
    if (e.isSnapshot) {
      let u = this.view.viewState.lineBlockAt(e.range.head);
      this.view.scrollDOM.scrollTop = u.top - e.yMargin, this.view.scrollDOM.scrollLeft = e.xMargin;
      return;
    }
    for (let u of this.view.state.facet(jae))
      try {
        if (u(this.view, e.range, e))
          return !0;
      } catch (c) {
        mi(this.view.state, c, "scroll handler");
      }
    let { range: n } = e, r = this.coordsAt(n.head, n.empty ? n.assoc : n.head > n.anchor ? -1 : 1), i;
    if (!r)
      return;
    !n.empty && (i = this.coordsAt(n.anchor, n.anchor > n.head ? -1 : 1)) && (r = {
      left: Math.min(r.left, i.left),
      top: Math.min(r.top, i.top),
      right: Math.max(r.right, i.right),
      bottom: Math.max(r.bottom, i.bottom)
    });
    let a = Kae(this.view), o = {
      left: r.left - a.left,
      top: r.top - a.top,
      right: r.right + a.right,
      bottom: r.bottom + a.bottom
    }, { offsetWidth: s, offsetHeight: l } = this.view.scrollDOM;
    Dat(this.view.scrollDOM, o, n.head < n.anchor ? -1 : 1, e.x, e.y, Math.max(Math.min(e.xMargin, s), -s), Math.max(Math.min(e.yMargin, l), -l), this.view.textDirection == pn.LTR);
  }
}
function Jat(t) {
  return t.node.nodeType == 1 && t.node.firstChild && (t.offset == 0 || t.node.childNodes[t.offset - 1].contentEditable == "false") && (t.offset == t.node.childNodes.length || t.node.childNodes[t.offset].contentEditable == "false");
}
class VH extends ds {
  constructor(e) {
    super(), this.height = e;
  }
  toDOM() {
    let e = document.createElement("div");
    return e.className = "cm-gap", this.updateDOM(e), e;
  }
  eq(e) {
    return e.height == this.height;
  }
  updateDOM(e) {
    return e.style.height = this.height + "px", !0;
  }
  get editable() {
    return !0;
  }
  get estimatedHeight() {
    return this.height;
  }
  ignoreEvent() {
    return !1;
  }
}
function Jae(t, e) {
  let n = t.observer.selectionRange;
  if (!n.focusNode)
    return null;
  let r = Sae(n.focusNode, n.focusOffset), i = xae(n.focusNode, n.focusOffset), a = r || i;
  if (i && r && i.node != r.node) {
    let s = Jt.get(i.node);
    if (!s || s instanceof lo && s.text != i.node.nodeValue)
      a = i;
    else if (t.docView.lastCompositionAfterCursor) {
      let l = Jt.get(r.node);
      !l || l instanceof lo && l.text != r.node.nodeValue || (a = i);
    }
  }
  if (t.docView.lastCompositionAfterCursor = a != r, !a)
    return null;
  let o = e - a.offset;
  return { from: o, to: o + a.node.nodeValue.length, node: a.node };
}
function eot(t, e, n) {
  let r = Jae(t, n);
  if (!r)
    return null;
  let { node: i, from: a, to: o } = r, s = i.nodeValue;
  if (/[\n\r]/.test(s) || t.state.doc.sliceString(r.from, r.to) != s)
    return null;
  let l = e.invertedDesc, u = new xa(l.mapPos(a), l.mapPos(o), a, o), c = [];
  for (let f = i.parentNode; ; f = f.parentNode) {
    let d = Jt.get(f);
    if (d instanceof el)
      c.push({ node: f, deco: d.mark });
    else {
      if (d instanceof Ln || f.nodeName == "DIV" && f.parentNode == t.contentDOM)
        return { range: u, text: i, marks: c, line: f };
      if (f != t.contentDOM)
        c.push({ node: f, deco: new iy({
          inclusive: !0,
          attributes: Fat(f),
          tagName: f.tagName.toLowerCase()
        }) });
      else
        return null;
    }
  }
}
function tot(t, e) {
  return t.nodeType != 1 ? 0 : (e && t.childNodes[e - 1].contentEditable == "false" ? 1 : 0) | (e < t.childNodes.length && t.childNodes[e].contentEditable == "false" ? 2 : 0);
}
let not = class {
  constructor() {
    this.changes = [];
  }
  compareRange(e, n) {
    OM(e, n, this.changes);
  }
  comparePoint(e, n) {
    OM(e, n, this.changes);
  }
};
function rot(t, e, n) {
  let r = new not();
  return Vt.compare(t, e, n, r), r.changes;
}
function iot(t, e) {
  for (let n = t; n && n != e; n = n.assignedSlot || n.parentNode)
    if (n.nodeType == 1 && n.contentEditable == "false")
      return !0;
  return !1;
}
function aot(t, e) {
  let n = !1;
  return e && t.iterChangedRanges((r, i) => {
    r < e.to && i > e.from && (n = !0);
  }), n;
}
function oot(t, e, n = 1) {
  let r = t.charCategorizer(e), i = t.doc.lineAt(e), a = e - i.from;
  if (i.length == 0)
    return me.cursor(e);
  a == 0 ? n = 1 : a == i.length && (n = -1);
  let o = a, s = a;
  n < 0 ? o = _r(i.text, a, !1) : s = _r(i.text, a);
  let l = r(i.text.slice(o, s));
  for (; o > 0; ) {
    let u = _r(i.text, o, !1);
    if (r(i.text.slice(u, o)) != l)
      break;
    o = u;
  }
  for (; s < i.length; ) {
    let u = _r(i.text, s);
    if (r(i.text.slice(s, u)) != l)
      break;
    s = u;
  }
  return me.range(o + i.from, s + i.from);
}
function sot(t, e) {
  return e.left > t ? e.left - t : Math.max(0, t - e.right);
}
function lot(t, e) {
  return e.top > t ? e.top - t : Math.max(0, t - e.bottom);
}
function m$(t, e) {
  return t.top < e.bottom - 1 && t.bottom > e.top + 1;
}
function FH(t, e) {
  return e < t.top ? { top: e, left: t.left, right: t.right, bottom: t.bottom } : t;
}
function WH(t, e) {
  return e > t.bottom ? { top: t.top, left: t.left, right: t.right, bottom: e } : t;
}
function TM(t, e, n) {
  let r, i, a, o, s = !1, l, u, c, f;
  for (let p = t.firstChild; p; p = p.nextSibling) {
    let v = Uh(p);
    for (let g = 0; g < v.length; g++) {
      let m = v[g];
      i && m$(i, m) && (m = FH(WH(m, i.bottom), i.top));
      let y = sot(e, m), b = lot(n, m);
      if (y == 0 && b == 0)
        return p.nodeType == 3 ? QH(p, e, n) : TM(p, e, n);
      if (!r || o > b || o == b && a > y) {
        r = p, i = m, a = y, o = b;
        let _ = b ? n < m.top ? -1 : 1 : y ? e < m.left ? -1 : 1 : 0;
        s = !_ || (_ > 0 ? g < v.length - 1 : g > 0);
      }
      y == 0 ? n > m.bottom && (!c || c.bottom < m.bottom) ? (l = p, c = m) : n < m.top && (!f || f.top > m.top) && (u = p, f = m) : c && m$(c, m) ? c = WH(c, m.bottom) : f && m$(f, m) && (f = FH(f, m.top));
    }
  }
  if (c && c.bottom >= n ? (r = l, i = c) : f && f.top <= n && (r = u, i = f), !r)
    return { node: t, offset: 0 };
  let d = Math.max(i.left, Math.min(i.right, e));
  if (r.nodeType == 3)
    return QH(r, d, n);
  if (s && r.contentEditable != "false")
    return TM(r, d, n);
  let h = Array.prototype.indexOf.call(t.childNodes, r) + (e >= (i.left + i.right) / 2 ? 1 : 0);
  return { node: t, offset: h };
}
function QH(t, e, n) {
  let r = t.nodeValue.length, i = -1, a = 1e9, o = 0;
  for (let s = 0; s < r; s++) {
    let l = Tf(t, s, s + 1).getClientRects();
    for (let u = 0; u < l.length; u++) {
      let c = l[u];
      if (c.top == c.bottom)
        continue;
      o || (o = e - c.left);
      let f = (c.top > n ? c.top - n : n - c.bottom) - 1;
      if (c.left - 1 <= e && c.right + 1 >= e && f < a) {
        let d = e >= (c.left + c.right) / 2, h = d;
        if ((Ne.chrome || Ne.gecko) && Tf(t, s).getBoundingClientRect().left == c.right && (h = !d), f <= 0)
          return { node: t, offset: s + (h ? 1 : 0) };
        i = s + (h ? 1 : 0), a = f;
      }
    }
  }
  return { node: t, offset: i > -1 ? i : o > 0 ? t.nodeValue.length : 0 };
}
function eoe(t, e, n, r = -1) {
  var i, a;
  let o = t.contentDOM.getBoundingClientRect(), s = o.top + t.viewState.paddingTop, l, { docHeight: u } = t.viewState, { x: c, y: f } = e, d = f - s;
  if (d < 0)
    return 0;
  if (d > u)
    return t.state.doc.length;
  for (let _ = t.viewState.heightOracle.textHeight / 2, O = !1; l = t.elementAtHeight(d), l.type != Jr.Text; )
    for (; d = r > 0 ? l.bottom + _ : l.top - _, !(d >= 0 && d <= u); ) {
      if (O)
        return n ? null : 0;
      O = !0, r = -r;
    }
  f = s + d;
  let h = l.from;
  if (h < t.viewport.from)
    return t.viewport.from == 0 ? 0 : n ? null : HH(t, o, l, c, f);
  if (h > t.viewport.to)
    return t.viewport.to == t.state.doc.length ? t.state.doc.length : n ? null : HH(t, o, l, c, f);
  let p = t.dom.ownerDocument, v = t.root.elementFromPoint ? t.root : p, g = v.elementFromPoint(c, f);
  g && !t.contentDOM.contains(g) && (g = null), g || (c = Math.max(o.left + 1, Math.min(o.right - 1, c)), g = v.elementFromPoint(c, f), g && !t.contentDOM.contains(g) && (g = null));
  let m, y = -1;
  if (g && ((i = t.docView.nearest(g)) === null || i === void 0 ? void 0 : i.isEditable) != !1) {
    if (p.caretPositionFromPoint) {
      let _ = p.caretPositionFromPoint(c, f);
      _ && ({ offsetNode: m, offset: y } = _);
    } else if (p.caretRangeFromPoint) {
      let _ = p.caretRangeFromPoint(c, f);
      _ && ({ startContainer: m, startOffset: y } = _, (!t.contentDOM.contains(m) || Ne.safari && uot(m, y, c) || Ne.chrome && cot(m, y, c)) && (m = void 0));
    }
  }
  if (!m || !t.docView.dom.contains(m)) {
    let _ = Ln.find(t.docView, h);
    if (!_)
      return d > l.top + l.height / 2 ? l.to : l.from;
    ({ node: m, offset: y } = TM(_.dom, c, f));
  }
  let b = t.docView.nearest(m);
  if (!b)
    return null;
  if (b.isWidget && ((a = b.dom) === null || a === void 0 ? void 0 : a.nodeType) == 1) {
    let _ = b.dom.getBoundingClientRect();
    return e.y < _.top || e.y <= _.bottom && e.x <= (_.left + _.right) / 2 ? b.posAtStart : b.posAtEnd;
  } else
    return b.localPosFromDOM(m, y) + b.posAtStart;
}
function HH(t, e, n, r, i) {
  let a = Math.round((r - e.left) * t.defaultCharacterWidth);
  if (t.lineWrapping && n.height > t.defaultLineHeight * 1.5) {
    let s = t.viewState.heightOracle.textHeight, l = Math.floor((i - n.top - (t.defaultLineHeight - s) * 0.5) / s);
    a += l * t.viewState.heightOracle.lineLength;
  }
  let o = t.state.sliceDoc(n.from, n.to);
  return n.from + dM(o, a, t.state.tabSize);
}
function uot(t, e, n) {
  let r;
  if (t.nodeType != 3 || e != (r = t.nodeValue.length))
    return !1;
  for (let i = t.nextSibling; i; i = i.nextSibling)
    if (i.nodeType != 1 || i.nodeName != "BR")
      return !1;
  return Tf(t, r - 1, r).getBoundingClientRect().left > n;
}
function cot(t, e, n) {
  if (e != 0)
    return !1;
  for (let i = t; ; ) {
    let a = i.parentNode;
    if (!a || a.nodeType != 1 || a.firstChild != i)
      return !1;
    if (a.classList.contains("cm-line"))
      break;
    i = a;
  }
  let r = t.nodeType == 1 ? t.getBoundingClientRect() : Tf(t, 0, Math.max(t.nodeValue.length, 1)).getBoundingClientRect();
  return n - r.left > 5;
}
function PM(t, e) {
  let n = t.lineBlockAt(e);
  if (Array.isArray(n.type)) {
    for (let r of n.type)
      if (r.to > e || r.to == e && (r.to == n.to || r.type == Jr.Text))
        return r;
  }
  return n;
}
function fot(t, e, n, r) {
  let i = PM(t, e.head), a = !r || i.type != Jr.Text || !(t.lineWrapping || i.widgetLineBreaks) ? null : t.coordsAtPos(e.assoc < 0 && e.head > i.from ? e.head - 1 : e.head);
  if (a) {
    let o = t.dom.getBoundingClientRect(), s = t.textDirectionAt(i.from), l = t.posAtCoords({
      x: n == (s == pn.LTR) ? o.right - 1 : o.left + 1,
      y: (a.top + a.bottom) / 2
    });
    if (l != null)
      return me.cursor(l, n ? -1 : 1);
  }
  return me.cursor(n ? i.to : i.from, n ? -1 : 1);
}
function GH(t, e, n, r) {
  let i = t.state.doc.lineAt(e.head), a = t.bidiSpans(i), o = t.textDirectionAt(i.from);
  for (let s = e, l = null; ; ) {
    let u = Yat(i, a, o, s, n), c = Nae;
    if (!u) {
      if (i.number == (n ? t.state.doc.lines : 1))
        return s;
      c = `
`, i = t.state.doc.line(i.number + (n ? 1 : -1)), a = t.bidiSpans(i), u = t.visualLineSide(i, !n);
    }
    if (l) {
      if (!l(c))
        return s;
    } else {
      if (!r)
        return u;
      l = r(c);
    }
    s = u;
  }
}
function dot(t, e, n) {
  let r = t.state.charCategorizer(e), i = r(n);
  return (a) => {
    let o = r(a);
    return i == yn.Space && (i = o), i == o;
  };
}
function hot(t, e, n, r) {
  let i = e.head, a = n ? 1 : -1;
  if (i == (n ? t.state.doc.length : 0))
    return me.cursor(i, e.assoc);
  let o = e.goalColumn, s, l = t.contentDOM.getBoundingClientRect(), u = t.coordsAtPos(i, e.assoc || -1), c = t.documentTop;
  if (u)
    o == null && (o = u.left - l.left), s = a < 0 ? u.top : u.bottom;
  else {
    let h = t.viewState.lineBlockAt(i);
    o == null && (o = Math.min(l.right - l.left, t.defaultCharacterWidth * (i - h.from))), s = (a < 0 ? h.top : h.bottom) + c;
  }
  let f = l.left + o, d = r ?? t.viewState.heightOracle.textHeight >> 1;
  for (let h = 0; ; h += 10) {
    let p = s + (d + h) * a, v = eoe(t, { x: f, y: p }, !1, a);
    if (p < l.top || p > l.bottom || (a < 0 ? v < i : v > i)) {
      let g = t.docView.coordsForChar(v), m = !g || p < g.top ? -1 : 1;
      return me.cursor(v, m, void 0, o);
    }
  }
}
function a1(t, e, n) {
  for (; ; ) {
    let r = 0;
    for (let i of t)
      i.between(e - 1, e + 1, (a, o, s) => {
        if (e > a && e < o) {
          let l = r || n || (e - a < o - e ? -1 : 1);
          e = l < 0 ? a : o, r = l;
        }
      });
    if (!r)
      return e;
  }
}
function y$(t, e, n) {
  let r = a1(t.state.facet(a4).map((i) => i(t)), n.from, e.head > n.from ? -1 : 1);
  return r == n.from ? n : me.cursor(r, r < n.from ? 1 : -1);
}
class pot {
  setSelectionOrigin(e) {
    this.lastSelectionOrigin = e, this.lastSelectionTime = Date.now();
  }
  constructor(e) {
    this.view = e, this.lastKeyCode = 0, this.lastKeyTime = 0, this.lastTouchTime = 0, this.lastFocusTime = 0, this.lastScrollTop = 0, this.lastScrollLeft = 0, this.pendingIOSKey = void 0, this.tabFocusMode = -1, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastContextMenu = 0, this.scrollHandlers = [], this.handlers = /* @__PURE__ */ Object.create(null), this.composing = -1, this.compositionFirstChange = null, this.compositionEndedAt = 0, this.compositionPendingKey = !1, this.compositionPendingChange = !1, this.mouseSelection = null, this.draggedContent = null, this.handleEvent = this.handleEvent.bind(this), this.notifiedFocused = e.hasFocus, Ne.safari && e.contentDOM.addEventListener("input", () => null), Ne.gecko && Eot(e.contentDOM.ownerDocument);
  }
  handleEvent(e) {
    !Sot(this.view, e) || this.ignoreDuringComposition(e) || e.type == "keydown" && this.keydown(e) || this.runHandlers(e.type, e);
  }
  runHandlers(e, n) {
    let r = this.handlers[e];
    if (r) {
      for (let i of r.observers)
        i(this.view, n);
      for (let i of r.handlers) {
        if (n.defaultPrevented)
          break;
        if (i(this.view, n)) {
          n.preventDefault();
          break;
        }
      }
    }
  }
  ensureHandlers(e) {
    let n = vot(e), r = this.handlers, i = this.view.contentDOM;
    for (let a in n)
      if (a != "scroll") {
        let o = !n[a].handlers.length, s = r[a];
        s && o != !s.handlers.length && (i.removeEventListener(a, this.handleEvent), s = null), s || i.addEventListener(a, this.handleEvent, { passive: o });
      }
    for (let a in r)
      a != "scroll" && !n[a] && i.removeEventListener(a, this.handleEvent);
    this.handlers = n;
  }
  keydown(e) {
    if (this.lastKeyCode = e.keyCode, this.lastKeyTime = Date.now(), e.keyCode == 9 && this.tabFocusMode > -1 && (!this.tabFocusMode || Date.now() <= this.tabFocusMode))
      return !0;
    if (this.tabFocusMode > 0 && e.keyCode != 27 && noe.indexOf(e.keyCode) < 0 && (this.tabFocusMode = -1), Ne.android && Ne.chrome && !e.synthetic && (e.keyCode == 13 || e.keyCode == 8))
      return this.view.observer.delayAndroidKey(e.key, e.keyCode), !0;
    let n;
    return Ne.ios && !e.synthetic && !e.altKey && !e.metaKey && ((n = toe.find((r) => r.keyCode == e.keyCode)) && !e.ctrlKey || got.indexOf(e.key) > -1 && e.ctrlKey && !e.shiftKey) ? (this.pendingIOSKey = n || e, setTimeout(() => this.flushIOSKey(), 250), !0) : (e.keyCode != 229 && this.view.observer.forceFlush(), !1);
  }
  flushIOSKey(e) {
    let n = this.pendingIOSKey;
    return !n || n.key == "Enter" && e && e.from < e.to && /^\S+$/.test(e.insert.toString()) ? !1 : (this.pendingIOSKey = void 0, lh(this.view.contentDOM, n.key, n.keyCode, n instanceof KeyboardEvent ? n : void 0));
  }
  ignoreDuringComposition(e) {
    return /^key/.test(e.type) ? this.composing > 0 ? !0 : Ne.safari && !Ne.ios && this.compositionPendingKey && Date.now() - this.compositionEndedAt < 100 ? (this.compositionPendingKey = !1, !0) : !1 : !1;
  }
  startMouseSelection(e) {
    this.mouseSelection && this.mouseSelection.destroy(), this.mouseSelection = e;
  }
  update(e) {
    this.view.observer.update(e), this.mouseSelection && this.mouseSelection.update(e), this.draggedContent && e.docChanged && (this.draggedContent = this.draggedContent.map(e.changes)), e.transactions.length && (this.lastKeyCode = this.lastSelectionTime = 0);
  }
  destroy() {
    this.mouseSelection && this.mouseSelection.destroy();
  }
}
function jH(t, e) {
  return (n, r) => {
    try {
      return e.call(t, r, n);
    } catch (i) {
      mi(n.state, i);
    }
  };
}
function vot(t) {
  let e = /* @__PURE__ */ Object.create(null);
  function n(r) {
    return e[r] || (e[r] = { observers: [], handlers: [] });
  }
  for (let r of t) {
    let i = r.spec;
    if (i && i.domEventHandlers)
      for (let a in i.domEventHandlers) {
        let o = i.domEventHandlers[a];
        o && n(a).handlers.push(jH(r.value, o));
      }
    if (i && i.domEventObservers)
      for (let a in i.domEventObservers) {
        let o = i.domEventObservers[a];
        o && n(a).observers.push(jH(r.value, o));
      }
  }
  for (let r in uo)
    n(r).handlers.push(uo[r]);
  for (let r in Ia)
    n(r).observers.push(Ia[r]);
  return e;
}
const toe = [
  { key: "Backspace", keyCode: 8, inputType: "deleteContentBackward" },
  { key: "Enter", keyCode: 13, inputType: "insertParagraph" },
  { key: "Enter", keyCode: 13, inputType: "insertLineBreak" },
  { key: "Delete", keyCode: 46, inputType: "deleteContentForward" }
], got = "dthko", noe = [16, 17, 18, 20, 91, 92, 224, 225], Zb = 6;
function Ub(t) {
  return Math.max(0, t) * 0.7 + 8;
}
function mot(t, e) {
  return Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY));
}
class yot {
  constructor(e, n, r, i) {
    this.view = e, this.startEvent = n, this.style = r, this.mustSelect = i, this.scrollSpeed = { x: 0, y: 0 }, this.scrolling = -1, this.lastEvent = n, this.scrollParent = Rat(e.contentDOM), this.atoms = e.state.facet(a4).map((o) => o(e));
    let a = e.contentDOM.ownerDocument;
    a.addEventListener("mousemove", this.move = this.move.bind(this)), a.addEventListener("mouseup", this.up = this.up.bind(this)), this.extend = n.shiftKey, this.multiple = e.state.facet(At.allowMultipleSelections) && bot(e, n), this.dragging = Oot(e, n) && ooe(n) == 1 ? null : !1;
  }
  start(e) {
    this.dragging === !1 && this.select(e);
  }
  move(e) {
    var n;
    if (e.buttons == 0)
      return this.destroy();
    if (this.dragging || this.dragging == null && mot(this.startEvent, e) < 10)
      return;
    this.select(this.lastEvent = e);
    let r = 0, i = 0, a = ((n = this.scrollParent) === null || n === void 0 ? void 0 : n.getBoundingClientRect()) || { left: 0, top: 0, right: this.view.win.innerWidth, bottom: this.view.win.innerHeight }, o = Kae(this.view);
    e.clientX - o.left <= a.left + Zb ? r = -Ub(a.left - e.clientX) : e.clientX + o.right >= a.right - Zb && (r = Ub(e.clientX - a.right)), e.clientY - o.top <= a.top + Zb ? i = -Ub(a.top - e.clientY) : e.clientY + o.bottom >= a.bottom - Zb && (i = Ub(e.clientY - a.bottom)), this.setScrollSpeed(r, i);
  }
  up(e) {
    this.dragging == null && this.select(this.lastEvent), this.dragging || e.preventDefault(), this.destroy();
  }
  destroy() {
    this.setScrollSpeed(0, 0);
    let e = this.view.contentDOM.ownerDocument;
    e.removeEventListener("mousemove", this.move), e.removeEventListener("mouseup", this.up), this.view.inputState.mouseSelection = this.view.inputState.draggedContent = null;
  }
  setScrollSpeed(e, n) {
    this.scrollSpeed = { x: e, y: n }, e || n ? this.scrolling < 0 && (this.scrolling = setInterval(() => this.scroll(), 50)) : this.scrolling > -1 && (clearInterval(this.scrolling), this.scrolling = -1);
  }
  scroll() {
    this.scrollParent ? (this.scrollParent.scrollLeft += this.scrollSpeed.x, this.scrollParent.scrollTop += this.scrollSpeed.y) : this.view.win.scrollBy(this.scrollSpeed.x, this.scrollSpeed.y), this.dragging === !1 && this.select(this.lastEvent);
  }
  skipAtoms(e) {
    let n = null;
    for (let r = 0; r < e.ranges.length; r++) {
      let i = e.ranges[r], a = null;
      if (i.empty) {
        let o = a1(this.atoms, i.from, 0);
        o != i.from && (a = me.cursor(o, -1));
      } else {
        let o = a1(this.atoms, i.from, -1), s = a1(this.atoms, i.to, 1);
        (o != i.from || s != i.to) && (a = me.range(i.from == i.anchor ? o : s, i.from == i.head ? o : s));
      }
      a && (n || (n = e.ranges.slice()), n[r] = a);
    }
    return n ? me.create(n, e.mainIndex) : e;
  }
  select(e) {
    let { view: n } = this, r = this.skipAtoms(this.style.get(e, this.extend, this.multiple));
    (this.mustSelect || !r.eq(n.state.selection, this.dragging === !1)) && this.view.dispatch({
      selection: r,
      userEvent: "select.pointer"
    }), this.mustSelect = !1;
  }
  update(e) {
    e.transactions.some((n) => n.isUserEvent("input.type")) ? this.destroy() : this.style.update(e) && setTimeout(() => this.select(this.lastEvent), 20);
  }
}
function bot(t, e) {
  let n = t.state.facet(Bae);
  return n.length ? n[0](e) : Ne.mac ? e.metaKey : e.ctrlKey;
}
function _ot(t, e) {
  let n = t.state.facet(zae);
  return n.length ? n[0](e) : Ne.mac ? !e.altKey : !e.ctrlKey;
}
function Oot(t, e) {
  let { main: n } = t.state.selection;
  if (n.empty)
    return !1;
  let r = Um(t.root);
  if (!r || r.rangeCount == 0)
    return !0;
  let i = r.getRangeAt(0).getClientRects();
  for (let a = 0; a < i.length; a++) {
    let o = i[a];
    if (o.left <= e.clientX && o.right >= e.clientX && o.top <= e.clientY && o.bottom >= e.clientY)
      return !0;
  }
  return !1;
}
function Sot(t, e) {
  if (!e.bubbles)
    return !0;
  if (e.defaultPrevented)
    return !1;
  for (let n = e.target, r; n != t.contentDOM; n = n.parentNode)
    if (!n || n.nodeType == 11 || (r = Jt.get(n)) && r.ignoreEvent(e))
      return !1;
  return !0;
}
const uo = /* @__PURE__ */ Object.create(null), Ia = /* @__PURE__ */ Object.create(null), roe = Ne.ie && Ne.ie_version < 15 || Ne.ios && Ne.webkit_version < 604;
function xot(t) {
  let e = t.dom.parentNode;
  if (!e)
    return;
  let n = e.appendChild(document.createElement("textarea"));
  n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus(), setTimeout(() => {
    t.focus(), n.remove(), ioe(t, n.value);
  }, 50);
}
function ioe(t, e) {
  let { state: n } = t, r, i = 1, a = n.toText(e), o = a.lines == n.selection.ranges.length;
  if ($M != null && n.selection.ranges.every((l) => l.empty) && $M == a.toString()) {
    let l = -1;
    r = n.changeByRange((u) => {
      let c = n.doc.lineAt(u.from);
      if (c.from == l)
        return { range: u };
      l = c.from;
      let f = n.toText((o ? a.line(i++).text : e) + n.lineBreak);
      return {
        changes: { from: c.from, insert: f },
        range: me.cursor(u.from + f.length)
      };
    });
  } else o ? r = n.changeByRange((l) => {
    let u = a.line(i++);
    return {
      changes: { from: l.from, to: l.to, insert: u.text },
      range: me.cursor(l.from + u.length)
    };
  }) : r = n.replaceSelection(a);
  t.dispatch(r, {
    userEvent: "input.paste",
    scrollIntoView: !0
  });
}
Ia.scroll = (t) => {
  t.inputState.lastScrollTop = t.scrollDOM.scrollTop, t.inputState.lastScrollLeft = t.scrollDOM.scrollLeft;
};
uo.keydown = (t, e) => (t.inputState.setSelectionOrigin("select"), e.keyCode == 27 && t.inputState.tabFocusMode != 0 && (t.inputState.tabFocusMode = Date.now() + 2e3), !1);
Ia.touchstart = (t, e) => {
  t.inputState.lastTouchTime = Date.now(), t.inputState.setSelectionOrigin("select.pointer");
};
Ia.touchmove = (t) => {
  t.inputState.setSelectionOrigin("select.pointer");
};
uo.mousedown = (t, e) => {
  if (t.observer.flush(), t.inputState.lastTouchTime > Date.now() - 2e3)
    return !1;
  let n = null;
  for (let r of t.state.facet(Vae))
    if (n = r(t, e), n)
      break;
  if (!n && e.button == 0 && (n = Tot(t, e)), n) {
    let r = !t.hasFocus;
    t.inputState.startMouseSelection(new yot(t, e, n, r)), r && t.observer.ignore(() => {
      bae(t.contentDOM);
      let a = t.root.activeElement;
      a && !a.contains(t.contentDOM) && a.blur();
    });
    let i = t.inputState.mouseSelection;
    if (i)
      return i.start(e), i.dragging === !1;
  }
  return !1;
};
function ZH(t, e, n, r) {
  if (r == 1)
    return me.cursor(e, n);
  if (r == 2)
    return oot(t.state, e, n);
  {
    let i = Ln.find(t.docView, e), a = t.state.doc.lineAt(i ? i.posAtEnd : e), o = i ? i.posAtStart : a.from, s = i ? i.posAtEnd : a.to;
    return s < t.state.doc.length && s == a.to && s++, me.range(o, s);
  }
}
let aoe = (t, e) => t >= e.top && t <= e.bottom, UH = (t, e, n) => aoe(e, n) && t >= n.left && t <= n.right;
function wot(t, e, n, r) {
  let i = Ln.find(t.docView, e);
  if (!i)
    return 1;
  let a = e - i.posAtStart;
  if (a == 0)
    return 1;
  if (a == i.length)
    return -1;
  let o = i.coordsAt(a, -1);
  if (o && UH(n, r, o))
    return -1;
  let s = i.coordsAt(a, 1);
  return s && UH(n, r, s) ? 1 : o && aoe(r, o) ? -1 : 1;
}
function XH(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1);
  return { pos: n, bias: wot(t, n, e.clientX, e.clientY) };
}
const Cot = Ne.ie && Ne.ie_version <= 11;
let YH = null, qH = 0, KH = 0;
function ooe(t) {
  if (!Cot)
    return t.detail;
  let e = YH, n = KH;
  return YH = t, KH = Date.now(), qH = !e || n > Date.now() - 400 && Math.abs(e.clientX - t.clientX) < 2 && Math.abs(e.clientY - t.clientY) < 2 ? (qH + 1) % 3 : 1;
}
function Tot(t, e) {
  let n = XH(t, e), r = ooe(e), i = t.state.selection;
  return {
    update(a) {
      a.docChanged && (n.pos = a.changes.mapPos(n.pos), i = i.map(a.changes));
    },
    get(a, o, s) {
      let l = XH(t, a), u, c = ZH(t, l.pos, l.bias, r);
      if (n.pos != l.pos && !o) {
        let f = ZH(t, n.pos, n.bias, r), d = Math.min(f.from, c.from), h = Math.max(f.to, c.to);
        c = d < c.from ? me.range(d, h) : me.range(h, d);
      }
      return o ? i.replaceRange(i.main.extend(c.from, c.to)) : s && r == 1 && i.ranges.length > 1 && (u = Pot(i, l.pos)) ? u : s ? i.addRange(c) : me.create([c]);
    }
  };
}
function Pot(t, e) {
  for (let n = 0; n < t.ranges.length; n++) {
    let { from: r, to: i } = t.ranges[n];
    if (r <= e && i >= e)
      return me.create(t.ranges.slice(0, n).concat(t.ranges.slice(n + 1)), t.mainIndex == n ? 0 : t.mainIndex - (t.mainIndex > n ? 1 : 0));
  }
  return null;
}
uo.dragstart = (t, e) => {
  let { selection: { main: n } } = t.state;
  if (e.target.draggable) {
    let i = t.docView.nearest(e.target);
    if (i && i.isWidget) {
      let a = i.posAtStart, o = a + i.length;
      (a >= n.to || o <= n.from) && (n = me.range(a, o));
    }
  }
  let { inputState: r } = t;
  return r.mouseSelection && (r.mouseSelection.dragging = !0), r.draggedContent = n, e.dataTransfer && (e.dataTransfer.setData("Text", t.state.sliceDoc(n.from, n.to)), e.dataTransfer.effectAllowed = "copyMove"), !1;
};
uo.dragend = (t) => (t.inputState.draggedContent = null, !1);
function JH(t, e, n, r) {
  if (!n)
    return;
  let i = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), { draggedContent: a } = t.inputState, o = r && a && _ot(t, e) ? { from: a.from, to: a.to } : null, s = { from: i, insert: n }, l = t.state.changes(o ? [o, s] : s);
  t.focus(), t.dispatch({
    changes: l,
    selection: { anchor: l.mapPos(i, -1), head: l.mapPos(i, 1) },
    userEvent: o ? "move.drop" : "input.drop"
  }), t.inputState.draggedContent = null;
}
uo.drop = (t, e) => {
  if (!e.dataTransfer)
    return !1;
  if (t.state.readOnly)
    return !0;
  let n = e.dataTransfer.files;
  if (n && n.length) {
    let r = Array(n.length), i = 0, a = () => {
      ++i == n.length && JH(t, e, r.filter((o) => o != null).join(t.state.lineBreak), !1);
    };
    for (let o = 0; o < n.length; o++) {
      let s = new FileReader();
      s.onerror = a, s.onload = () => {
        /[\x00-\x08\x0e-\x1f]{2}/.test(s.result) || (r[o] = s.result), a();
      }, s.readAsText(n[o]);
    }
    return !0;
  } else {
    let r = e.dataTransfer.getData("Text");
    if (r)
      return JH(t, e, r, !0), !0;
  }
  return !1;
};
uo.paste = (t, e) => {
  if (t.state.readOnly)
    return !0;
  t.observer.flush();
  let n = roe ? null : e.clipboardData;
  return n ? (ioe(t, n.getData("text/plain") || n.getData("text/uri-list")), !0) : (xot(t), !1);
};
function $ot(t, e) {
  let n = t.dom.parentNode;
  if (!n)
    return;
  let r = n.appendChild(document.createElement("textarea"));
  r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.value = e, r.focus(), r.selectionEnd = e.length, r.selectionStart = 0, setTimeout(() => {
    r.remove(), t.focus();
  }, 50);
}
function Aot(t) {
  let e = [], n = [], r = !1;
  for (let i of t.selection.ranges)
    i.empty || (e.push(t.sliceDoc(i.from, i.to)), n.push(i));
  if (!e.length) {
    let i = -1;
    for (let { from: a } of t.selection.ranges) {
      let o = t.doc.lineAt(a);
      o.number > i && (e.push(o.text), n.push({ from: o.from, to: Math.min(t.doc.length, o.to + 1) })), i = o.number;
    }
    r = !0;
  }
  return { text: e.join(t.lineBreak), ranges: n, linewise: r };
}
let $M = null;
uo.copy = uo.cut = (t, e) => {
  let { text: n, ranges: r, linewise: i } = Aot(t.state);
  if (!n && !i)
    return !1;
  $M = i ? n : null, e.type == "cut" && !t.state.readOnly && t.dispatch({
    changes: r,
    scrollIntoView: !0,
    userEvent: "delete.cut"
  });
  let a = roe ? null : e.clipboardData;
  return a ? (a.clearData(), a.setData("text/plain", n), !0) : ($ot(t, n), !1);
};
const soe = /* @__PURE__ */ ul.define();
function loe(t, e) {
  let n = [];
  for (let r of t.facet(Qae)) {
    let i = r(t, e);
    i && n.push(i);
  }
  return n ? t.update({ effects: n, annotations: soe.of(!0) }) : null;
}
function uoe(t) {
  setTimeout(() => {
    let e = t.hasFocus;
    if (e != t.inputState.notifiedFocused) {
      let n = loe(t.state, e);
      n ? t.dispatch(n) : t.update([]);
    }
  }, 10);
}
Ia.focus = (t) => {
  t.inputState.lastFocusTime = Date.now(), !t.scrollDOM.scrollTop && (t.inputState.lastScrollTop || t.inputState.lastScrollLeft) && (t.scrollDOM.scrollTop = t.inputState.lastScrollTop, t.scrollDOM.scrollLeft = t.inputState.lastScrollLeft), uoe(t);
};
Ia.blur = (t) => {
  t.observer.clearSelectionRange(), uoe(t);
};
Ia.compositionstart = Ia.compositionupdate = (t) => {
  t.observer.editContext || (t.inputState.compositionFirstChange == null && (t.inputState.compositionFirstChange = !0), t.inputState.composing < 0 && (t.inputState.composing = 0));
};
Ia.compositionend = (t) => {
  t.observer.editContext || (t.inputState.composing = -1, t.inputState.compositionEndedAt = Date.now(), t.inputState.compositionPendingKey = !0, t.inputState.compositionPendingChange = t.observer.pendingRecords().length > 0, t.inputState.compositionFirstChange = null, Ne.chrome && Ne.android ? t.observer.flushSoon() : t.inputState.compositionPendingChange ? Promise.resolve().then(() => t.observer.flush()) : setTimeout(() => {
    t.inputState.composing < 0 && t.docView.hasComposition && t.update([]);
  }, 50));
};
Ia.contextmenu = (t) => {
  t.inputState.lastContextMenu = Date.now();
};
uo.beforeinput = (t, e) => {
  var n;
  let r;
  if (Ne.chrome && Ne.android && (r = toe.find((i) => i.inputType == e.inputType)) && (t.observer.delayAndroidKey(r.key, r.keyCode), r.key == "Backspace" || r.key == "Delete")) {
    let i = ((n = window.visualViewport) === null || n === void 0 ? void 0 : n.height) || 0;
    setTimeout(() => {
      var a;
      (((a = window.visualViewport) === null || a === void 0 ? void 0 : a.height) || 0) > i + 10 && t.hasFocus && (t.contentDOM.blur(), t.focus());
    }, 100);
  }
  return Ne.ios && e.inputType == "deleteContentForward" && t.observer.flushSoon(), Ne.safari && e.inputType == "insertText" && t.inputState.composing >= 0 && setTimeout(() => Ia.compositionend(t, e), 20), !1;
};
const e9 = /* @__PURE__ */ new Set();
function Eot(t) {
  e9.has(t) || (e9.add(t), t.addEventListener("copy", () => {
  }), t.addEventListener("cut", () => {
  }));
}
const t9 = ["pre-wrap", "normal", "pre-line", "break-spaces"];
class Mot {
  constructor(e) {
    this.lineWrapping = e, this.doc = Ft.empty, this.heightSamples = {}, this.lineHeight = 14, this.charWidth = 7, this.textHeight = 14, this.lineLength = 30, this.heightChanged = !1;
  }
  heightForGap(e, n) {
    let r = this.doc.lineAt(n).number - this.doc.lineAt(e).number + 1;
    return this.lineWrapping && (r += Math.max(0, Math.ceil((n - e - r * this.lineLength * 0.5) / this.lineLength))), this.lineHeight * r;
  }
  heightForLine(e) {
    return this.lineWrapping ? (1 + Math.max(0, Math.ceil((e - this.lineLength) / (this.lineLength - 5)))) * this.lineHeight : this.lineHeight;
  }
  setDoc(e) {
    return this.doc = e, this;
  }
  mustRefreshForWrapping(e) {
    return t9.indexOf(e) > -1 != this.lineWrapping;
  }
  mustRefreshForHeights(e) {
    let n = !1;
    for (let r = 0; r < e.length; r++) {
      let i = e[r];
      i < 0 ? r++ : this.heightSamples[Math.floor(i * 10)] || (n = !0, this.heightSamples[Math.floor(i * 10)] = !0);
    }
    return n;
  }
  refresh(e, n, r, i, a, o) {
    let s = t9.indexOf(e) > -1, l = Math.round(n) != Math.round(this.lineHeight) || this.lineWrapping != s;
    if (this.lineWrapping = s, this.lineHeight = n, this.charWidth = r, this.textHeight = i, this.lineLength = a, l) {
      this.heightSamples = {};
      for (let u = 0; u < o.length; u++) {
        let c = o[u];
        c < 0 ? u++ : this.heightSamples[Math.floor(c * 10)] = !0;
      }
    }
    return l;
  }
}
class Iot {
  constructor(e, n) {
    this.from = e, this.heights = n, this.index = 0;
  }
  get more() {
    return this.index < this.heights.length;
  }
}
class Bo {
  /**
  @internal
  */
  constructor(e, n, r, i, a) {
    this.from = e, this.length = n, this.top = r, this.height = i, this._content = a;
  }
  /**
  The type of element this is. When querying lines, this may be
  an array of all the blocks that make up the line.
  */
  get type() {
    return typeof this._content == "number" ? Jr.Text : Array.isArray(this._content) ? this._content : this._content.type;
  }
  /**
  The end of the element as a document position.
  */
  get to() {
    return this.from + this.length;
  }
  /**
  The bottom position of the element.
  */
  get bottom() {
    return this.top + this.height;
  }
  /**
  If this is a widget block, this will return the widget
  associated with it.
  */
  get widget() {
    return this._content instanceof gu ? this._content.widget : null;
  }
  /**
  If this is a textblock, this holds the number of line breaks
  that appear in widgets inside the block.
  */
  get widgetLineBreaks() {
    return typeof this._content == "number" ? this._content : 0;
  }
  /**
  @internal
  */
  join(e) {
    let n = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(e._content) ? e._content : [e]);
    return new Bo(this.from, this.length + e.length, this.top, this.height + e.height, n);
  }
}
var cn = /* @__PURE__ */ function(t) {
  return t[t.ByPos = 0] = "ByPos", t[t.ByHeight = 1] = "ByHeight", t[t.ByPosNoHeight = 2] = "ByPosNoHeight", t;
}(cn || (cn = {}));
const o1 = 1e-3;
class ei {
  constructor(e, n, r = 2) {
    this.length = e, this.height = n, this.flags = r;
  }
  get outdated() {
    return (this.flags & 2) > 0;
  }
  set outdated(e) {
    this.flags = (e ? 2 : 0) | this.flags & -3;
  }
  setHeight(e, n) {
    this.height != n && (Math.abs(this.height - n) > o1 && (e.heightChanged = !0), this.height = n);
  }
  // Base case is to replace a leaf node, which simply builds a tree
  // from the new nodes and returns that (HeightMapBranch and
  // HeightMapGap override this to actually use from/to)
  replace(e, n, r) {
    return ei.of(r);
  }
  // Again, these are base cases, and are overridden for branch and gap nodes.
  decomposeLeft(e, n) {
    n.push(this);
  }
  decomposeRight(e, n) {
    n.push(this);
  }
  applyChanges(e, n, r, i) {
    let a = this, o = r.doc;
    for (let s = i.length - 1; s >= 0; s--) {
      let { fromA: l, toA: u, fromB: c, toB: f } = i[s], d = a.lineAt(l, cn.ByPosNoHeight, r.setDoc(n), 0, 0), h = d.to >= u ? d : a.lineAt(u, cn.ByPosNoHeight, r, 0, 0);
      for (f += h.to - u, u = h.to; s > 0 && d.from <= i[s - 1].toA; )
        l = i[s - 1].fromA, c = i[s - 1].fromB, s--, l < d.from && (d = a.lineAt(l, cn.ByPosNoHeight, r, 0, 0));
      c += d.from - l, l = d.from;
      let p = o4.build(r.setDoc(o), e, c, f);
      a = a.replace(l, u, p);
    }
    return a.updateHeight(r, 0);
  }
  static empty() {
    return new Di(0, 0);
  }
  // nodes uses null values to indicate the position of line breaks.
  // There are never line breaks at the start or end of the array, or
  // two line breaks next to each other, and the array isn't allowed
  // to be empty (same restrictions as return value from the builder).
  static of(e) {
    if (e.length == 1)
      return e[0];
    let n = 0, r = e.length, i = 0, a = 0;
    for (; ; )
      if (n == r)
        if (i > a * 2) {
          let s = e[n - 1];
          s.break ? e.splice(--n, 1, s.left, null, s.right) : e.splice(--n, 1, s.left, s.right), r += 1 + s.break, i -= s.size;
        } else if (a > i * 2) {
          let s = e[r];
          s.break ? e.splice(r, 1, s.left, null, s.right) : e.splice(r, 1, s.left, s.right), r += 2 + s.break, a -= s.size;
        } else
          break;
      else if (i < a) {
        let s = e[n++];
        s && (i += s.size);
      } else {
        let s = e[--r];
        s && (a += s.size);
      }
    let o = 0;
    return e[n - 1] == null ? (o = 1, n--) : e[n] == null && (o = 1, r++), new Dot(ei.of(e.slice(0, n)), o, ei.of(e.slice(r)));
  }
}
ei.prototype.size = 1;
class coe extends ei {
  constructor(e, n, r) {
    super(e, n), this.deco = r;
  }
  blockAt(e, n, r, i) {
    return new Bo(i, this.length, r, this.height, this.deco || 0);
  }
  lineAt(e, n, r, i, a) {
    return this.blockAt(0, r, i, a);
  }
  forEachLine(e, n, r, i, a, o) {
    e <= a + this.length && n >= a && o(this.blockAt(0, r, i, a));
  }
  updateHeight(e, n = 0, r = !1, i) {
    return i && i.from <= n && i.more && this.setHeight(e, i.heights[i.index++]), this.outdated = !1, this;
  }
  toString() {
    return `block(${this.length})`;
  }
}
class Di extends coe {
  constructor(e, n) {
    super(e, n, null), this.collapsed = 0, this.widgetHeight = 0, this.breaks = 0;
  }
  blockAt(e, n, r, i) {
    return new Bo(i, this.length, r, this.height, this.breaks);
  }
  replace(e, n, r) {
    let i = r[0];
    return r.length == 1 && (i instanceof Di || i instanceof fr && i.flags & 4) && Math.abs(this.length - i.length) < 10 ? (i instanceof fr ? i = new Di(i.length, this.height) : i.height = this.height, this.outdated || (i.outdated = !1), i) : ei.of(r);
  }
  updateHeight(e, n = 0, r = !1, i) {
    return i && i.from <= n && i.more ? this.setHeight(e, i.heights[i.index++]) : (r || this.outdated) && this.setHeight(e, Math.max(this.widgetHeight, e.heightForLine(this.length - this.collapsed)) + this.breaks * e.lineHeight), this.outdated = !1, this;
  }
  toString() {
    return `line(${this.length}${this.collapsed ? -this.collapsed : ""}${this.widgetHeight ? ":" + this.widgetHeight : ""})`;
  }
}
class fr extends ei {
  constructor(e) {
    super(e, 0);
  }
  heightMetrics(e, n) {
    let r = e.doc.lineAt(n).number, i = e.doc.lineAt(n + this.length).number, a = i - r + 1, o, s = 0;
    if (e.lineWrapping) {
      let l = Math.min(this.height, e.lineHeight * a);
      o = l / a, this.length > a + 1 && (s = (this.height - l) / (this.length - a - 1));
    } else
      o = this.height / a;
    return { firstLine: r, lastLine: i, perLine: o, perChar: s };
  }
  blockAt(e, n, r, i) {
    let { firstLine: a, lastLine: o, perLine: s, perChar: l } = this.heightMetrics(n, i);
    if (n.lineWrapping) {
      let u = i + (e < n.lineHeight ? 0 : Math.round(Math.max(0, Math.min(1, (e - r) / this.height)) * this.length)), c = n.doc.lineAt(u), f = s + c.length * l, d = Math.max(r, e - f / 2);
      return new Bo(c.from, c.length, d, f, 0);
    } else {
      let u = Math.max(0, Math.min(o - a, Math.floor((e - r) / s))), { from: c, length: f } = n.doc.line(a + u);
      return new Bo(c, f, r + s * u, s, 0);
    }
  }
  lineAt(e, n, r, i, a) {
    if (n == cn.ByHeight)
      return this.blockAt(e, r, i, a);
    if (n == cn.ByPosNoHeight) {
      let { from: h, to: p } = r.doc.lineAt(e);
      return new Bo(h, p - h, 0, 0, 0);
    }
    let { firstLine: o, perLine: s, perChar: l } = this.heightMetrics(r, a), u = r.doc.lineAt(e), c = s + u.length * l, f = u.number - o, d = i + s * f + l * (u.from - a - f);
    return new Bo(u.from, u.length, Math.max(i, Math.min(d, i + this.height - c)), c, 0);
  }
  forEachLine(e, n, r, i, a, o) {
    e = Math.max(e, a), n = Math.min(n, a + this.length);
    let { firstLine: s, perLine: l, perChar: u } = this.heightMetrics(r, a);
    for (let c = e, f = i; c <= n; ) {
      let d = r.doc.lineAt(c);
      if (c == e) {
        let p = d.number - s;
        f += l * p + u * (e - a - p);
      }
      let h = l + u * d.length;
      o(new Bo(d.from, d.length, f, h, 0)), f += h, c = d.to + 1;
    }
  }
  replace(e, n, r) {
    let i = this.length - n;
    if (i > 0) {
      let a = r[r.length - 1];
      a instanceof fr ? r[r.length - 1] = new fr(a.length + i) : r.push(null, new fr(i - 1));
    }
    if (e > 0) {
      let a = r[0];
      a instanceof fr ? r[0] = new fr(e + a.length) : r.unshift(new fr(e - 1), null);
    }
    return ei.of(r);
  }
  decomposeLeft(e, n) {
    n.push(new fr(e - 1), null);
  }
  decomposeRight(e, n) {
    n.push(null, new fr(this.length - e - 1));
  }
  updateHeight(e, n = 0, r = !1, i) {
    let a = n + this.length;
    if (i && i.from <= n + this.length && i.more) {
      let o = [], s = Math.max(n, i.from), l = -1;
      for (i.from > n && o.push(new fr(i.from - n - 1).updateHeight(e, n)); s <= a && i.more; ) {
        let c = e.doc.lineAt(s).length;
        o.length && o.push(null);
        let f = i.heights[i.index++];
        l == -1 ? l = f : Math.abs(f - l) >= o1 && (l = -2);
        let d = new Di(c, f);
        d.outdated = !1, o.push(d), s += c + 1;
      }
      s <= a && o.push(null, new fr(a - s).updateHeight(e, s));
      let u = ei.of(o);
      return (l < 0 || Math.abs(u.height - this.height) >= o1 || Math.abs(l - this.heightMetrics(e, n).perLine) >= o1) && (e.heightChanged = !0), u;
    } else (r || this.outdated) && (this.setHeight(e, e.heightForGap(n, n + this.length)), this.outdated = !1);
    return this;
  }
  toString() {
    return `gap(${this.length})`;
  }
}
class Dot extends ei {
  constructor(e, n, r) {
    super(e.length + n + r.length, e.height + r.height, n | (e.outdated || r.outdated ? 2 : 0)), this.left = e, this.right = r, this.size = e.size + r.size;
  }
  get break() {
    return this.flags & 1;
  }
  blockAt(e, n, r, i) {
    let a = r + this.left.height;
    return e < a ? this.left.blockAt(e, n, r, i) : this.right.blockAt(e, n, a, i + this.left.length + this.break);
  }
  lineAt(e, n, r, i, a) {
    let o = i + this.left.height, s = a + this.left.length + this.break, l = n == cn.ByHeight ? e < o : e < s, u = l ? this.left.lineAt(e, n, r, i, a) : this.right.lineAt(e, n, r, o, s);
    if (this.break || (l ? u.to < s : u.from > s))
      return u;
    let c = n == cn.ByPosNoHeight ? cn.ByPosNoHeight : cn.ByPos;
    return l ? u.join(this.right.lineAt(s, c, r, o, s)) : this.left.lineAt(s, c, r, i, a).join(u);
  }
  forEachLine(e, n, r, i, a, o) {
    let s = i + this.left.height, l = a + this.left.length + this.break;
    if (this.break)
      e < l && this.left.forEachLine(e, n, r, i, a, o), n >= l && this.right.forEachLine(e, n, r, s, l, o);
    else {
      let u = this.lineAt(l, cn.ByPos, r, i, a);
      e < u.from && this.left.forEachLine(e, u.from - 1, r, i, a, o), u.to >= e && u.from <= n && o(u), n > u.to && this.right.forEachLine(u.to + 1, n, r, s, l, o);
    }
  }
  replace(e, n, r) {
    let i = this.left.length + this.break;
    if (n < i)
      return this.balanced(this.left.replace(e, n, r), this.right);
    if (e > this.left.length)
      return this.balanced(this.left, this.right.replace(e - i, n - i, r));
    let a = [];
    e > 0 && this.decomposeLeft(e, a);
    let o = a.length;
    for (let s of r)
      a.push(s);
    if (e > 0 && n9(a, o - 1), n < this.length) {
      let s = a.length;
      this.decomposeRight(n, a), n9(a, s);
    }
    return ei.of(a);
  }
  decomposeLeft(e, n) {
    let r = this.left.length;
    if (e <= r)
      return this.left.decomposeLeft(e, n);
    n.push(this.left), this.break && (r++, e >= r && n.push(null)), e > r && this.right.decomposeLeft(e - r, n);
  }
  decomposeRight(e, n) {
    let r = this.left.length, i = r + this.break;
    if (e >= i)
      return this.right.decomposeRight(e - i, n);
    e < r && this.left.decomposeRight(e, n), this.break && e < i && n.push(null), n.push(this.right);
  }
  balanced(e, n) {
    return e.size > 2 * n.size || n.size > 2 * e.size ? ei.of(this.break ? [e, null, n] : [e, n]) : (this.left = e, this.right = n, this.height = e.height + n.height, this.outdated = e.outdated || n.outdated, this.size = e.size + n.size, this.length = e.length + this.break + n.length, this);
  }
  updateHeight(e, n = 0, r = !1, i) {
    let { left: a, right: o } = this, s = n + a.length + this.break, l = null;
    return i && i.from <= n + a.length && i.more ? l = a = a.updateHeight(e, n, r, i) : a.updateHeight(e, n, r), i && i.from <= s + o.length && i.more ? l = o = o.updateHeight(e, s, r, i) : o.updateHeight(e, s, r), l ? this.balanced(a, o) : (this.height = this.left.height + this.right.height, this.outdated = !1, this);
  }
  toString() {
    return this.left + (this.break ? " " : "-") + this.right;
  }
}
function n9(t, e) {
  let n, r;
  t[e] == null && (n = t[e - 1]) instanceof fr && (r = t[e + 1]) instanceof fr && t.splice(e - 1, 3, new fr(n.length + 1 + r.length));
}
const Rot = 5;
class o4 {
  constructor(e, n) {
    this.pos = e, this.oracle = n, this.nodes = [], this.lineStart = -1, this.lineEnd = -1, this.covering = null, this.writtenTo = e;
  }
  get isCovered() {
    return this.covering && this.nodes[this.nodes.length - 1] == this.covering;
  }
  span(e, n) {
    if (this.lineStart > -1) {
      let r = Math.min(n, this.lineEnd), i = this.nodes[this.nodes.length - 1];
      i instanceof Di ? i.length += r - this.pos : (r > this.pos || !this.isCovered) && this.nodes.push(new Di(r - this.pos, -1)), this.writtenTo = r, n > r && (this.nodes.push(null), this.writtenTo++, this.lineStart = -1);
    }
    this.pos = n;
  }
  point(e, n, r) {
    if (e < n || r.heightRelevant) {
      let i = r.widget ? r.widget.estimatedHeight : 0, a = r.widget ? r.widget.lineBreaks : 0;
      i < 0 && (i = this.oracle.lineHeight);
      let o = n - e;
      r.block ? this.addBlock(new coe(o, i, r)) : (o || a || i >= Rot) && this.addLineDeco(i, a, o);
    } else n > e && this.span(e, n);
    this.lineEnd > -1 && this.lineEnd < this.pos && (this.lineEnd = this.oracle.doc.lineAt(this.pos).to);
  }
  enterLine() {
    if (this.lineStart > -1)
      return;
    let { from: e, to: n } = this.oracle.doc.lineAt(this.pos);
    this.lineStart = e, this.lineEnd = n, this.writtenTo < e && ((this.writtenTo < e - 1 || this.nodes[this.nodes.length - 1] == null) && this.nodes.push(this.blankContent(this.writtenTo, e - 1)), this.nodes.push(null)), this.pos > e && this.nodes.push(new Di(this.pos - e, -1)), this.writtenTo = this.pos;
  }
  blankContent(e, n) {
    let r = new fr(n - e);
    return this.oracle.doc.lineAt(e).to == n && (r.flags |= 4), r;
  }
  ensureLine() {
    this.enterLine();
    let e = this.nodes.length ? this.nodes[this.nodes.length - 1] : null;
    if (e instanceof Di)
      return e;
    let n = new Di(0, -1);
    return this.nodes.push(n), n;
  }
  addBlock(e) {
    this.enterLine();
    let n = e.deco;
    n && n.startSide > 0 && !this.isCovered && this.ensureLine(), this.nodes.push(e), this.writtenTo = this.pos = this.pos + e.length, n && n.endSide > 0 && (this.covering = e);
  }
  addLineDeco(e, n, r) {
    let i = this.ensureLine();
    i.length += r, i.collapsed += r, i.widgetHeight = Math.max(i.widgetHeight, e), i.breaks += n, this.writtenTo = this.pos = this.pos + r;
  }
  finish(e) {
    let n = this.nodes.length == 0 ? null : this.nodes[this.nodes.length - 1];
    this.lineStart > -1 && !(n instanceof Di) && !this.isCovered ? this.nodes.push(new Di(0, -1)) : (this.writtenTo < this.pos || n == null) && this.nodes.push(this.blankContent(this.writtenTo, this.pos));
    let r = e;
    for (let i of this.nodes)
      i instanceof Di && i.updateHeight(this.oracle, r), r += i ? i.length : 1;
    return this.nodes;
  }
  // Always called with a region that on both sides either stretches
  // to a line break or the end of the document.
  // The returned array uses null to indicate line breaks, but never
  // starts or ends in a line break, or has multiple line breaks next
  // to each other.
  static build(e, n, r, i) {
    let a = new o4(r, e);
    return Vt.spans(n, r, i, a, 0), a.finish(r);
  }
}
function kot(t, e, n) {
  let r = new Lot();
  return Vt.compare(t, e, n, r, 0), r.changes;
}
class Lot {
  constructor() {
    this.changes = [];
  }
  compareRange() {
  }
  comparePoint(e, n, r, i) {
    (e < n || r && r.heightRelevant || i && i.heightRelevant) && OM(e, n, this.changes, 5);
  }
}
function Not(t, e) {
  let n = t.getBoundingClientRect(), r = t.ownerDocument, i = r.defaultView || window, a = Math.max(0, n.left), o = Math.min(i.innerWidth, n.right), s = Math.max(0, n.top), l = Math.min(i.innerHeight, n.bottom);
  for (let u = t.parentNode; u && u != r.body; )
    if (u.nodeType == 1) {
      let c = u, f = window.getComputedStyle(c);
      if ((c.scrollHeight > c.clientHeight || c.scrollWidth > c.clientWidth) && f.overflow != "visible") {
        let d = c.getBoundingClientRect();
        a = Math.max(a, d.left), o = Math.min(o, d.right), s = Math.max(s, d.top), l = u == t.parentNode ? d.bottom : Math.min(l, d.bottom);
      }
      u = f.position == "absolute" || f.position == "fixed" ? c.offsetParent : c.parentNode;
    } else if (u.nodeType == 11)
      u = u.host;
    else
      break;
  return {
    left: a - n.left,
    right: Math.max(a, o) - n.left,
    top: s - (n.top + e),
    bottom: Math.max(s, l) - (n.top + e)
  };
}
function Bot(t, e) {
  let n = t.getBoundingClientRect();
  return {
    left: 0,
    right: n.right - n.left,
    top: e,
    bottom: n.bottom - (n.top + e)
  };
}
class b$ {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.size = r;
  }
  static same(e, n) {
    if (e.length != n.length)
      return !1;
    for (let r = 0; r < e.length; r++) {
      let i = e[r], a = n[r];
      if (i.from != a.from || i.to != a.to || i.size != a.size)
        return !1;
    }
    return !0;
  }
  draw(e, n) {
    return Ze.replace({
      widget: new zot(this.size * (n ? e.scaleY : e.scaleX), n)
    }).range(this.from, this.to);
  }
}
class zot extends ds {
  constructor(e, n) {
    super(), this.size = e, this.vertical = n;
  }
  eq(e) {
    return e.size == this.size && e.vertical == this.vertical;
  }
  toDOM() {
    let e = document.createElement("div");
    return this.vertical ? e.style.height = this.size + "px" : (e.style.width = this.size + "px", e.style.height = "2px", e.style.display = "inline-block"), e;
  }
  get estimatedHeight() {
    return this.vertical ? this.size : -1;
  }
}
class r9 {
  constructor(e) {
    this.state = e, this.pixelViewport = { left: 0, right: window.innerWidth, top: 0, bottom: 0 }, this.inView = !0, this.paddingTop = 0, this.paddingBottom = 0, this.contentDOMWidth = 0, this.contentDOMHeight = 0, this.editorHeight = 0, this.editorWidth = 0, this.scrollTop = 0, this.scrolledToBottom = !1, this.scaleX = 1, this.scaleY = 1, this.scrollAnchorPos = 0, this.scrollAnchorHeight = -1, this.scaler = i9, this.scrollTarget = null, this.printing = !1, this.mustMeasureContent = !0, this.defaultTextDirection = pn.LTR, this.visibleRanges = [], this.mustEnforceCursorAssoc = !1;
    let n = e.facet(i4).some((r) => typeof r != "function" && r.class == "cm-lineWrapping");
    this.heightOracle = new Mot(n), this.stateDeco = e.facet(Xm).filter((r) => typeof r != "function"), this.heightMap = ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle.setDoc(e.doc), [new xa(0, 0, 0, e.doc.length)]);
    for (let r = 0; r < 2 && (this.viewport = this.getViewport(0, null), !!this.updateForViewport()); r++)
      ;
    this.updateViewportLines(), this.lineGaps = this.ensureLineGaps([]), this.lineGapDeco = Ze.set(this.lineGaps.map((r) => r.draw(this, !1))), this.computeVisibleRanges();
  }
  updateForViewport() {
    let e = [this.viewport], { main: n } = this.state.selection;
    for (let r = 0; r <= 1; r++) {
      let i = r ? n.head : n.anchor;
      if (!e.some(({ from: a, to: o }) => i >= a && i <= o)) {
        let { from: a, to: o } = this.lineBlockAt(i);
        e.push(new Xb(a, o));
      }
    }
    return this.viewports = e.sort((r, i) => r.from - i.from), this.updateScaler();
  }
  updateScaler() {
    let e = this.scaler;
    return this.scaler = this.heightMap.height <= 7e6 ? i9 : new s4(this.heightOracle, this.heightMap, this.viewports), e.eq(this.scaler) ? 0 : 2;
  }
  updateViewportLines() {
    this.viewportLines = [], this.heightMap.forEachLine(this.viewport.from, this.viewport.to, this.heightOracle.setDoc(this.state.doc), 0, 0, (e) => {
      this.viewportLines.push(tg(e, this.scaler));
    });
  }
  update(e, n = null) {
    this.state = e.state;
    let r = this.stateDeco;
    this.stateDeco = this.state.facet(Xm).filter((c) => typeof c != "function");
    let i = e.changedRanges, a = xa.extendWithRanges(i, kot(r, this.stateDeco, e ? e.changes : jn.empty(this.state.doc.length))), o = this.heightMap.height, s = this.scrolledToBottom ? null : this.scrollAnchorAt(this.scrollTop);
    this.heightMap = this.heightMap.applyChanges(this.stateDeco, e.startState.doc, this.heightOracle.setDoc(this.state.doc), a), this.heightMap.height != o && (e.flags |= 2), s ? (this.scrollAnchorPos = e.changes.mapPos(s.from, -1), this.scrollAnchorHeight = s.top) : (this.scrollAnchorPos = -1, this.scrollAnchorHeight = this.heightMap.height);
    let l = a.length ? this.mapViewport(this.viewport, e.changes) : this.viewport;
    (n && (n.range.head < l.from || n.range.head > l.to) || !this.viewportIsAppropriate(l)) && (l = this.getViewport(0, n));
    let u = l.from != this.viewport.from || l.to != this.viewport.to;
    this.viewport = l, e.flags |= this.updateForViewport(), (u || !e.changes.empty || e.flags & 2) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, e.changes))), e.flags |= this.computeVisibleRanges(), n && (this.scrollTarget = n), !this.mustEnforceCursorAssoc && e.selectionSet && e.view.lineWrapping && e.state.selection.main.empty && e.state.selection.main.assoc && !e.state.facet(Gae) && (this.mustEnforceCursorAssoc = !0);
  }
  measure(e) {
    let n = e.contentDOM, r = window.getComputedStyle(n), i = this.heightOracle, a = r.whiteSpace;
    this.defaultTextDirection = r.direction == "rtl" ? pn.RTL : pn.LTR;
    let o = this.heightOracle.mustRefreshForWrapping(a), s = n.getBoundingClientRect(), l = o || this.mustMeasureContent || this.contentDOMHeight != s.height;
    this.contentDOMHeight = s.height, this.mustMeasureContent = !1;
    let u = 0, c = 0;
    if (s.width && s.height) {
      let { scaleX: _, scaleY: O } = yae(n, s);
      (_ > 5e-3 && Math.abs(this.scaleX - _) > 5e-3 || O > 5e-3 && Math.abs(this.scaleY - O) > 5e-3) && (this.scaleX = _, this.scaleY = O, u |= 8, o = l = !0);
    }
    let f = (parseInt(r.paddingTop) || 0) * this.scaleY, d = (parseInt(r.paddingBottom) || 0) * this.scaleY;
    (this.paddingTop != f || this.paddingBottom != d) && (this.paddingTop = f, this.paddingBottom = d, u |= 10), this.editorWidth != e.scrollDOM.clientWidth && (i.lineWrapping && (l = !0), this.editorWidth = e.scrollDOM.clientWidth, u |= 8);
    let h = e.scrollDOM.scrollTop * this.scaleY;
    this.scrollTop != h && (this.scrollAnchorHeight = -1, this.scrollTop = h), this.scrolledToBottom = Oae(e.scrollDOM);
    let p = (this.printing ? Bot : Not)(n, this.paddingTop), v = p.top - this.pixelViewport.top, g = p.bottom - this.pixelViewport.bottom;
    this.pixelViewport = p;
    let m = this.pixelViewport.bottom > this.pixelViewport.top && this.pixelViewport.right > this.pixelViewport.left;
    if (m != this.inView && (this.inView = m, m && (l = !0)), !this.inView && !this.scrollTarget)
      return 0;
    let y = s.width;
    if ((this.contentDOMWidth != y || this.editorHeight != e.scrollDOM.clientHeight) && (this.contentDOMWidth = s.width, this.editorHeight = e.scrollDOM.clientHeight, u |= 8), l) {
      let _ = e.docView.measureVisibleLineHeights(this.viewport);
      if (i.mustRefreshForHeights(_) && (o = !0), o || i.lineWrapping && Math.abs(y - this.contentDOMWidth) > i.charWidth) {
        let { lineHeight: O, charWidth: S, textHeight: x } = e.docView.measureTextSize();
        o = O > 0 && i.refresh(a, O, S, x, y / S, _), o && (e.docView.minWidth = 0, u |= 8);
      }
      v > 0 && g > 0 ? c = Math.max(v, g) : v < 0 && g < 0 && (c = Math.min(v, g)), i.heightChanged = !1;
      for (let O of this.viewports) {
        let S = O.from == this.viewport.from ? _ : e.docView.measureVisibleLineHeights(O);
        this.heightMap = (o ? ei.empty().applyChanges(this.stateDeco, Ft.empty, this.heightOracle, [new xa(0, 0, 0, e.state.doc.length)]) : this.heightMap).updateHeight(i, 0, o, new Iot(O.from, S));
      }
      i.heightChanged && (u |= 2);
    }
    let b = !this.viewportIsAppropriate(this.viewport, c) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
    return b && (u & 2 && (u |= this.updateScaler()), this.viewport = this.getViewport(c, this.scrollTarget), u |= this.updateForViewport()), (u & 2 || b) && this.updateViewportLines(), (this.lineGaps.length || this.viewport.to - this.viewport.from > 4e3) && this.updateLineGaps(this.ensureLineGaps(o ? [] : this.lineGaps, e)), u |= this.computeVisibleRanges(), this.mustEnforceCursorAssoc && (this.mustEnforceCursorAssoc = !1, e.docView.enforceCursorAssoc()), u;
  }
  get visibleTop() {
    return this.scaler.fromDOM(this.pixelViewport.top);
  }
  get visibleBottom() {
    return this.scaler.fromDOM(this.pixelViewport.bottom);
  }
  getViewport(e, n) {
    let r = 0.5 - Math.max(-0.5, Math.min(0.5, e / 1e3 / 2)), i = this.heightMap, a = this.heightOracle, { visibleTop: o, visibleBottom: s } = this, l = new Xb(i.lineAt(o - r * 1e3, cn.ByHeight, a, 0, 0).from, i.lineAt(s + (1 - r) * 1e3, cn.ByHeight, a, 0, 0).to);
    if (n) {
      let { head: u } = n.range;
      if (u < l.from || u > l.to) {
        let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = i.lineAt(u, cn.ByPos, a, 0, 0), d;
        n.y == "center" ? d = (f.top + f.bottom) / 2 - c / 2 : n.y == "start" || n.y == "nearest" && u < l.from ? d = f.top : d = f.bottom - c, l = new Xb(i.lineAt(d - 1e3 / 2, cn.ByHeight, a, 0, 0).from, i.lineAt(d + c + 1e3 / 2, cn.ByHeight, a, 0, 0).to);
      }
    }
    return l;
  }
  mapViewport(e, n) {
    let r = n.mapPos(e.from, -1), i = n.mapPos(e.to, 1);
    return new Xb(this.heightMap.lineAt(r, cn.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(i, cn.ByPos, this.heightOracle, 0, 0).to);
  }
  // Checks if a given viewport covers the visible part of the
  // document and not too much beyond that.
  viewportIsAppropriate({ from: e, to: n }, r = 0) {
    if (!this.inView)
      return !0;
    let { top: i } = this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), { bottom: a } = this.heightMap.lineAt(n, cn.ByPos, this.heightOracle, 0, 0), { visibleTop: o, visibleBottom: s } = this;
    return (e == 0 || i <= o - Math.max(10, Math.min(
      -r,
      250
      /* VP.MaxCoverMargin */
    ))) && (n == this.state.doc.length || a >= s + Math.max(10, Math.min(
      r,
      250
      /* VP.MaxCoverMargin */
    ))) && i > o - 2 * 1e3 && a < s + 2 * 1e3;
  }
  mapLineGaps(e, n) {
    if (!e.length || n.empty)
      return e;
    let r = [];
    for (let i of e)
      n.touchesRange(i.from, i.to) || r.push(new b$(n.mapPos(i.from), n.mapPos(i.to), i.size));
    return r;
  }
  // Computes positions in the viewport where the start or end of a
  // line should be hidden, trying to reuse existing line gaps when
  // appropriate to avoid unneccesary redraws.
  // Uses crude character-counting for the positioning and sizing,
  // since actual DOM coordinates aren't always available and
  // predictable. Relies on generous margins (see LG.Margin) to hide
  // the artifacts this might produce from the user.
  ensureLineGaps(e, n) {
    let r = this.heightOracle.lineWrapping, i = r ? 1e4 : 2e3, a = i >> 1, o = i << 1;
    if (this.defaultTextDirection != pn.LTR && !r)
      return [];
    let s = [], l = (c, f, d, h) => {
      if (f - c < a)
        return;
      let p = this.state.selection.main, v = [p.from];
      p.empty || v.push(p.to);
      for (let m of v)
        if (m > c && m < f) {
          l(c, m - 10, d, h), l(m + 10, f, d, h);
          return;
        }
      let g = Fot(e, (m) => m.from >= d.from && m.to <= d.to && Math.abs(m.from - c) < a && Math.abs(m.to - f) < a && !v.some((y) => m.from < y && m.to > y));
      if (!g) {
        if (f < d.to && n && r && n.visibleRanges.some((m) => m.from <= f && m.to >= f)) {
          let m = n.moveToLineBoundary(me.cursor(f), !1, !0).head;
          m > c && (f = m);
        }
        g = new b$(c, f, this.gapSize(d, c, f, h));
      }
      s.push(g);
    }, u = (c) => {
      if (c.length < o || c.type != Jr.Text)
        return;
      let f = Vot(c.from, c.to, this.stateDeco);
      if (f.total < o)
        return;
      let d = this.scrollTarget ? this.scrollTarget.range.head : null, h, p;
      if (r) {
        let v = i / this.heightOracle.lineLength * this.heightOracle.lineHeight, g, m;
        if (d != null) {
          let y = qb(f, d), b = ((this.visibleBottom - this.visibleTop) / 2 + v) / c.height;
          g = y - b, m = y + b;
        } else
          g = (this.visibleTop - c.top - v) / c.height, m = (this.visibleBottom - c.top + v) / c.height;
        h = Yb(f, g), p = Yb(f, m);
      } else {
        let v = f.total * this.heightOracle.charWidth, g = i * this.heightOracle.charWidth, m, y;
        if (d != null) {
          let b = qb(f, d), _ = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + g) / v;
          m = b - _, y = b + _;
        } else
          m = (this.pixelViewport.left - g) / v, y = (this.pixelViewport.right + g) / v;
        h = Yb(f, m), p = Yb(f, y);
      }
      h > c.from && l(c.from, h, c, f), p < c.to && l(p, c.to, c, f);
    };
    for (let c of this.viewportLines)
      Array.isArray(c.type) ? c.type.forEach(u) : u(c);
    return s;
  }
  gapSize(e, n, r, i) {
    let a = qb(i, r) - qb(i, n);
    return this.heightOracle.lineWrapping ? e.height * a : i.total * this.heightOracle.charWidth * a;
  }
  updateLineGaps(e) {
    b$.same(e, this.lineGaps) || (this.lineGaps = e, this.lineGapDeco = Ze.set(e.map((n) => n.draw(this, this.heightOracle.lineWrapping))));
  }
  computeVisibleRanges() {
    let e = this.stateDeco;
    this.lineGaps.length && (e = e.concat(this.lineGapDeco));
    let n = [];
    Vt.spans(e, this.viewport.from, this.viewport.to, {
      span(i, a) {
        n.push({ from: i, to: a });
      },
      point() {
      }
    }, 20);
    let r = n.length != this.visibleRanges.length || this.visibleRanges.some((i, a) => i.from != n[a].from || i.to != n[a].to);
    return this.visibleRanges = n, r ? 4 : 0;
  }
  lineBlockAt(e) {
    return e >= this.viewport.from && e <= this.viewport.to && this.viewportLines.find((n) => n.from <= e && n.to >= e) || tg(this.heightMap.lineAt(e, cn.ByPos, this.heightOracle, 0, 0), this.scaler);
  }
  lineBlockAtHeight(e) {
    return e >= this.viewportLines[0].top && e <= this.viewportLines[this.viewportLines.length - 1].bottom && this.viewportLines.find((n) => n.top <= e && n.bottom >= e) || tg(this.heightMap.lineAt(this.scaler.fromDOM(e), cn.ByHeight, this.heightOracle, 0, 0), this.scaler);
  }
  scrollAnchorAt(e) {
    let n = this.lineBlockAtHeight(e + 8);
    return n.from >= this.viewport.from || this.viewportLines[0].top - e > 200 ? n : this.viewportLines[0];
  }
  elementAtHeight(e) {
    return tg(this.heightMap.blockAt(this.scaler.fromDOM(e), this.heightOracle, 0, 0), this.scaler);
  }
  get docHeight() {
    return this.scaler.toDOM(this.heightMap.height);
  }
  get contentHeight() {
    return this.docHeight + this.paddingTop + this.paddingBottom;
  }
}
class Xb {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
}
function Vot(t, e, n) {
  let r = [], i = t, a = 0;
  return Vt.spans(n, t, e, {
    span() {
    },
    point(o, s) {
      o > i && (r.push({ from: i, to: o }), a += o - i), i = s;
    }
  }, 20), i < e && (r.push({ from: i, to: e }), a += e - i), { total: a, ranges: r };
}
function Yb({ total: t, ranges: e }, n) {
  if (n <= 0)
    return e[0].from;
  if (n >= 1)
    return e[e.length - 1].to;
  let r = Math.floor(t * n);
  for (let i = 0; ; i++) {
    let { from: a, to: o } = e[i], s = o - a;
    if (r <= s)
      return a + r;
    r -= s;
  }
}
function qb(t, e) {
  let n = 0;
  for (let { from: r, to: i } of t.ranges) {
    if (e <= i) {
      n += e - r;
      break;
    }
    n += i - r;
  }
  return n / t.total;
}
function Fot(t, e) {
  for (let n of t)
    if (e(n))
      return n;
}
const i9 = {
  toDOM(t) {
    return t;
  },
  fromDOM(t) {
    return t;
  },
  scale: 1,
  eq(t) {
    return t == this;
  }
};
class s4 {
  constructor(e, n, r) {
    let i = 0, a = 0, o = 0;
    this.viewports = r.map(({ from: s, to: l }) => {
      let u = n.lineAt(s, cn.ByPos, e, 0, 0).top, c = n.lineAt(l, cn.ByPos, e, 0, 0).bottom;
      return i += c - u, { from: s, to: l, top: u, bottom: c, domTop: 0, domBottom: 0 };
    }), this.scale = (7e6 - i) / (n.height - i);
    for (let s of this.viewports)
      s.domTop = o + (s.top - a) * this.scale, o = s.domBottom = s.domTop + (s.bottom - s.top), a = s.bottom;
  }
  toDOM(e) {
    for (let n = 0, r = 0, i = 0; ; n++) {
      let a = n < this.viewports.length ? this.viewports[n] : null;
      if (!a || e < a.top)
        return i + (e - r) * this.scale;
      if (e <= a.bottom)
        return a.domTop + (e - a.top);
      r = a.bottom, i = a.domBottom;
    }
  }
  fromDOM(e) {
    for (let n = 0, r = 0, i = 0; ; n++) {
      let a = n < this.viewports.length ? this.viewports[n] : null;
      if (!a || e < a.domTop)
        return r + (e - i) / this.scale;
      if (e <= a.domBottom)
        return a.top + (e - a.domTop);
      r = a.bottom, i = a.domBottom;
    }
  }
  eq(e) {
    return e instanceof s4 ? this.scale == e.scale && this.viewports.length == e.viewports.length && this.viewports.every((n, r) => n.from == e.viewports[r].from && n.to == e.viewports[r].to) : !1;
  }
}
function tg(t, e) {
  if (e.scale == 1)
    return t;
  let n = e.toDOM(t.top), r = e.toDOM(t.bottom);
  return new Bo(t.from, t.length, n, r - n, Array.isArray(t._content) ? t._content.map((i) => tg(i, e)) : t._content);
}
const Kb = /* @__PURE__ */ Be.define({ combine: (t) => t.join(" ") }), AM = /* @__PURE__ */ Be.define({ combine: (t) => t.indexOf(!0) > -1 }), EM = /* @__PURE__ */ pu.newName(), foe = /* @__PURE__ */ pu.newName(), doe = /* @__PURE__ */ pu.newName(), hoe = { "&light": "." + foe, "&dark": "." + doe };
function MM(t, e, n) {
  return new pu(e, {
    finish(r) {
      return /&/.test(r) ? r.replace(/&\w*/, (i) => {
        if (i == "&")
          return t;
        if (!n || !n[i])
          throw new RangeError(`Unsupported selector: ${i}`);
        return n[i];
      }) : t + " " + r;
    }
  });
}
const Wot = /* @__PURE__ */ MM("." + EM, {
  "&": {
    position: "relative !important",
    boxSizing: "border-box",
    "&.cm-focused": {
      // Provide a simple default outline to make sure a focused
      // editor is visually distinct. Can't leave the default behavior
      // because that will apply to the content element, which is
      // inside the scrollable container and doesn't include the
      // gutters. We also can't use an 'auto' outline, since those
      // are, for some reason, drawn behind the element content, which
      // will cause things like the active line background to cover
      // the outline (#297).
      outline: "1px dotted #212121"
    },
    display: "flex !important",
    flexDirection: "column"
  },
  ".cm-scroller": {
    display: "flex !important",
    alignItems: "flex-start !important",
    fontFamily: "monospace",
    lineHeight: 1.4,
    height: "100%",
    overflowX: "auto",
    position: "relative",
    zIndex: 0
  },
  ".cm-content": {
    margin: 0,
    flexGrow: 2,
    flexShrink: 0,
    display: "block",
    whiteSpace: "pre",
    wordWrap: "normal",
    // https://github.com/codemirror/dev/issues/456
    boxSizing: "border-box",
    minHeight: "100%",
    padding: "4px 0",
    outline: "none",
    "&[contenteditable=true]": {
      WebkitUserModify: "read-write-plaintext-only"
    }
  },
  ".cm-lineWrapping": {
    whiteSpace_fallback: "pre-wrap",
    // For IE
    whiteSpace: "break-spaces",
    wordBreak: "break-word",
    // For Safari, which doesn't support overflow-wrap: anywhere
    overflowWrap: "anywhere",
    flexShrink: 1
  },
  "&light .cm-content": { caretColor: "black" },
  "&dark .cm-content": { caretColor: "white" },
  ".cm-line": {
    display: "block",
    padding: "0 2px 0 6px"
  },
  ".cm-layer": {
    position: "absolute",
    left: 0,
    top: 0,
    contain: "size style",
    "& > *": {
      position: "absolute"
    }
  },
  "&light .cm-selectionBackground": {
    background: "#d9d9d9"
  },
  "&dark .cm-selectionBackground": {
    background: "#222"
  },
  "&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#d7d4f0"
  },
  "&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
    background: "#233"
  },
  ".cm-cursorLayer": {
    pointerEvents: "none"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer": {
    animation: "steps(1) cm-blink 1.2s infinite"
  },
  // Two animations defined so that we can switch between them to
  // restart the animation without forcing another style
  // recomputation.
  "@keyframes cm-blink": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  "@keyframes cm-blink2": { "0%": {}, "50%": { opacity: 0 }, "100%": {} },
  ".cm-cursor, .cm-dropCursor": {
    borderLeft: "1.2px solid black",
    marginLeft: "-0.6px",
    pointerEvents: "none"
  },
  ".cm-cursor": {
    display: "none"
  },
  "&dark .cm-cursor": {
    borderLeftColor: "#444"
  },
  ".cm-dropCursor": {
    position: "absolute"
  },
  "&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor": {
    display: "block"
  },
  ".cm-iso": {
    unicodeBidi: "isolate"
  },
  ".cm-announced": {
    position: "fixed",
    top: "-10000px"
  },
  "@media print": {
    ".cm-announced": { display: "none" }
  },
  "&light .cm-activeLine": { backgroundColor: "#cceeff44" },
  "&dark .cm-activeLine": { backgroundColor: "#99eeff33" },
  "&light .cm-specialChar": { color: "red" },
  "&dark .cm-specialChar": { color: "#f78" },
  ".cm-gutters": {
    flexShrink: 0,
    display: "flex",
    height: "100%",
    boxSizing: "border-box",
    insetInlineStart: 0,
    zIndex: 200
  },
  "&light .cm-gutters": {
    backgroundColor: "#f5f5f5",
    color: "#6c6c6c",
    borderRight: "1px solid #ddd"
  },
  "&dark .cm-gutters": {
    backgroundColor: "#333338",
    color: "#ccc"
  },
  ".cm-gutter": {
    display: "flex !important",
    // Necessary -- prevents margin collapsing
    flexDirection: "column",
    flexShrink: 0,
    boxSizing: "border-box",
    minHeight: "100%",
    overflow: "hidden"
  },
  ".cm-gutterElement": {
    boxSizing: "border-box"
  },
  ".cm-lineNumbers .cm-gutterElement": {
    padding: "0 3px 0 5px",
    minWidth: "20px",
    textAlign: "right",
    whiteSpace: "nowrap"
  },
  "&light .cm-activeLineGutter": {
    backgroundColor: "#e2f2ff"
  },
  "&dark .cm-activeLineGutter": {
    backgroundColor: "#222227"
  },
  ".cm-panels": {
    boxSizing: "border-box",
    position: "sticky",
    left: 0,
    right: 0
  },
  "&light .cm-panels": {
    backgroundColor: "#f5f5f5",
    color: "black"
  },
  "&light .cm-panels-top": {
    borderBottom: "1px solid #ddd"
  },
  "&light .cm-panels-bottom": {
    borderTop: "1px solid #ddd"
  },
  "&dark .cm-panels": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tab": {
    display: "inline-block",
    overflow: "hidden",
    verticalAlign: "bottom"
  },
  ".cm-widgetBuffer": {
    verticalAlign: "text-top",
    height: "1em",
    width: 0,
    display: "inline"
  },
  ".cm-placeholder": {
    color: "#888",
    display: "inline-block",
    verticalAlign: "top"
  },
  ".cm-highlightSpace:before": {
    content: "attr(data-display)",
    position: "absolute",
    pointerEvents: "none",
    color: "#888"
  },
  ".cm-highlightTab": {
    backgroundImage: `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,
    backgroundSize: "auto 100%",
    backgroundPosition: "right 90%",
    backgroundRepeat: "no-repeat"
  },
  ".cm-trailingSpace": {
    backgroundColor: "#ff332255"
  },
  ".cm-button": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    padding: ".2em 1em",
    borderRadius: "1px"
  },
  "&light .cm-button": {
    backgroundImage: "linear-gradient(#eff1f5, #d9d9df)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#b4b4b4, #d0d3d6)"
    }
  },
  "&dark .cm-button": {
    backgroundImage: "linear-gradient(#393939, #111)",
    border: "1px solid #888",
    "&:active": {
      backgroundImage: "linear-gradient(#111, #333)"
    }
  },
  ".cm-textfield": {
    verticalAlign: "middle",
    color: "inherit",
    fontSize: "70%",
    border: "1px solid silver",
    padding: ".2em .5em"
  },
  "&light .cm-textfield": {
    backgroundColor: "white"
  },
  "&dark .cm-textfield": {
    border: "1px solid #555",
    backgroundColor: "inherit"
  }
}, hoe), ng = "";
class Qot {
  constructor(e, n) {
    this.points = e, this.text = "", this.lineSeparator = n.facet(At.lineSeparator);
  }
  append(e) {
    this.text += e;
  }
  lineBreak() {
    this.text += ng;
  }
  readRange(e, n) {
    if (!e)
      return this;
    let r = e.parentNode;
    for (let i = e; ; ) {
      this.findPointBefore(r, i);
      let a = this.text.length;
      this.readNode(i);
      let o = i.nextSibling;
      if (o == n)
        break;
      let s = Jt.get(i), l = Jt.get(o);
      (s && l ? s.breakAfter : (s ? s.breakAfter : nS(i)) || nS(o) && (i.nodeName != "BR" || i.cmIgnore) && this.text.length > a) && this.lineBreak(), i = o;
    }
    return this.findPointBefore(r, n), this;
  }
  readTextNode(e) {
    let n = e.nodeValue;
    for (let r of this.points)
      r.node == e && (r.pos = this.text.length + Math.min(r.offset, n.length));
    for (let r = 0, i = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
      let a = -1, o = 1, s;
      if (this.lineSeparator ? (a = n.indexOf(this.lineSeparator, r), o = this.lineSeparator.length) : (s = i.exec(n)) && (a = s.index, o = s[0].length), this.append(n.slice(r, a < 0 ? n.length : a)), a < 0)
        break;
      if (this.lineBreak(), o > 1)
        for (let l of this.points)
          l.node == e && l.pos > this.text.length && (l.pos -= o - 1);
      r = a + o;
    }
  }
  readNode(e) {
    if (e.cmIgnore)
      return;
    let n = Jt.get(e), r = n && n.overrideDOMText;
    if (r != null) {
      this.findPointInside(e, r.length);
      for (let i = r.iter(); !i.next().done; )
        i.lineBreak ? this.lineBreak() : this.append(i.value);
    } else e.nodeType == 3 ? this.readTextNode(e) : e.nodeName == "BR" ? e.nextSibling && this.lineBreak() : e.nodeType == 1 && this.readRange(e.firstChild, null);
  }
  findPointBefore(e, n) {
    for (let r of this.points)
      r.node == e && e.childNodes[r.offset] == n && (r.pos = this.text.length);
  }
  findPointInside(e, n) {
    for (let r of this.points)
      (e.nodeType == 3 ? r.node == e : e.contains(r.node)) && (r.pos = this.text.length + (Hot(e, r.node, r.offset) ? n : 0));
  }
}
function Hot(t, e, n) {
  for (; ; ) {
    if (!e || n < Js(e))
      return !1;
    if (e == t)
      return !0;
    n = Cf(e) + 1, e = e.parentNode;
  }
}
class a9 {
  constructor(e, n) {
    this.node = e, this.offset = n, this.pos = -1;
  }
}
class Got {
  constructor(e, n, r, i) {
    this.typeOver = i, this.bounds = null, this.text = "", this.domChanged = n > -1;
    let { impreciseHead: a, impreciseAnchor: o } = e.docView;
    if (e.state.readOnly && n > -1)
      this.newSel = null;
    else if (n > -1 && (this.bounds = e.docView.domBoundsAround(n, r, 0))) {
      let s = a || o ? [] : Uot(e), l = new Qot(s, e.state);
      l.readRange(this.bounds.startDOM, this.bounds.endDOM), this.text = l.text, this.newSel = Xot(s, this.bounds.from);
    } else {
      let s = e.observer.selectionRange, l = a && a.node == s.focusNode && a.offset == s.focusOffset || !vM(e.contentDOM, s.focusNode) ? e.state.selection.main.head : e.docView.posFromDOM(s.focusNode, s.focusOffset), u = o && o.node == s.anchorNode && o.offset == s.anchorOffset || !vM(e.contentDOM, s.anchorNode) ? e.state.selection.main.anchor : e.docView.posFromDOM(s.anchorNode, s.anchorOffset), c = e.viewport;
      if ((Ne.ios || Ne.chrome) && e.state.selection.main.empty && l != u && (c.from > 0 || c.to < e.state.doc.length)) {
        let f = Math.min(l, u), d = Math.max(l, u), h = c.from - f, p = c.to - d;
        (h == 0 || h == 1 || f == 0) && (p == 0 || p == -1 || d == e.state.doc.length) && (l = 0, u = e.state.doc.length);
      }
      this.newSel = me.single(u, l);
    }
  }
}
function poe(t, e) {
  let n, { newSel: r } = e, i = t.state.selection.main, a = t.inputState.lastKeyTime > Date.now() - 100 ? t.inputState.lastKeyCode : -1;
  if (e.bounds) {
    let { from: o, to: s } = e.bounds, l = i.from, u = null;
    (a === 8 || Ne.android && e.text.length < s - o) && (l = i.to, u = "end");
    let c = Zot(t.state.doc.sliceString(o, s, ng), e.text, l - o, u);
    c && (Ne.chrome && a == 13 && c.toB == c.from + 2 && e.text.slice(c.from, c.toB) == ng + ng && c.toB--, n = {
      from: o + c.from,
      to: o + c.toA,
      insert: Ft.of(e.text.slice(c.from, c.toB).split(ng))
    });
  } else r && (!t.hasFocus && t.state.facet(El) || r.main.eq(i)) && (r = null);
  if (!n && !r)
    return !1;
  if (!n && e.typeOver && !i.empty && r && r.main.empty ? n = { from: i.from, to: i.to, insert: t.state.doc.slice(i.from, i.to) } : n && n.from >= i.from && n.to <= i.to && (n.from != i.from || n.to != i.to) && i.to - i.from - (n.to - n.from) <= 4 ? n = {
    from: i.from,
    to: i.to,
    insert: t.state.doc.slice(i.from, n.from).append(n.insert).append(t.state.doc.slice(n.to, i.to))
  } : (Ne.mac || Ne.android) && n && n.from == n.to && n.from == i.head - 1 && /^\. ?$/.test(n.insert.toString()) && t.contentDOM.getAttribute("autocorrect") == "off" ? (r && n.insert.length == 2 && (r = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }) : Ne.chrome && n && n.from == n.to && n.from == i.head && n.insert.toString() == `
 ` && t.lineWrapping && (r && (r = me.single(r.main.anchor - 1, r.main.head - 1)), n = { from: i.from, to: i.to, insert: Ft.of([" "]) }), n)
    return voe(t, n, r, a);
  if (r && !r.main.eq(i)) {
    let o = !1, s = "select";
    return t.inputState.lastSelectionTime > Date.now() - 50 && (t.inputState.lastSelectionOrigin == "select" && (o = !0), s = t.inputState.lastSelectionOrigin), t.dispatch({ selection: r, scrollIntoView: o, userEvent: s }), !0;
  } else
    return !1;
}
function voe(t, e, n, r = -1) {
  if (Ne.ios && t.inputState.flushIOSKey(e))
    return !0;
  let i = t.state.selection.main;
  if (Ne.android && (e.to == i.to && // GBoard will sometimes remove a space it just inserted
  // after a completion when you press enter
  (e.from == i.from || e.from == i.from - 1 && t.state.sliceDoc(e.from, i.from) == " ") && e.insert.length == 1 && e.insert.lines == 2 && lh(t.contentDOM, "Enter", 13) || (e.from == i.from - 1 && e.to == i.to && e.insert.length == 0 || r == 8 && e.insert.length < e.to - e.from && e.to > i.head) && lh(t.contentDOM, "Backspace", 8) || e.from == i.from && e.to == i.to + 1 && e.insert.length == 0 && lh(t.contentDOM, "Delete", 46)))
    return !0;
  let a = e.insert.toString();
  t.inputState.composing >= 0 && t.inputState.composing++;
  let o, s = () => o || (o = jot(t, e, n));
  return t.state.facet(Wae).some((l) => l(t, e.from, e.to, a, s)) || t.dispatch(s()), !0;
}
function jot(t, e, n) {
  let r, i = t.state, a = i.selection.main;
  if (e.from >= a.from && e.to <= a.to && e.to - e.from >= (a.to - a.from) / 3 && (!n || n.main.empty && n.main.from == e.from + e.insert.length) && t.inputState.composing < 0) {
    let s = a.from < e.from ? i.sliceDoc(a.from, e.from) : "", l = a.to > e.to ? i.sliceDoc(e.to, a.to) : "";
    r = i.replaceSelection(t.state.toText(s + e.insert.sliceString(0, void 0, t.state.lineBreak) + l));
  } else {
    let s = i.changes(e), l = n && n.main.to <= s.newLength ? n.main : void 0;
    if (i.selection.ranges.length > 1 && t.inputState.composing >= 0 && e.to <= a.to && e.to >= a.to - 10) {
      let u = t.state.sliceDoc(e.from, e.to), c, f = n && Jae(t, n.main.head);
      if (f) {
        let p = e.insert.length - (e.to - e.from);
        c = { from: f.from, to: f.to - p };
      } else
        c = t.state.doc.lineAt(a.head);
      let d = a.to - e.to, h = a.to - a.from;
      r = i.changeByRange((p) => {
        if (p.from == a.from && p.to == a.to)
          return { changes: s, range: l || p.map(s) };
        let v = p.to - d, g = v - u.length;
        if (p.to - p.from != h || t.state.sliceDoc(g, v) != u || // Unfortunately, there's no way to make multiple
        // changes in the same node work without aborting
        // composition, so cursors in the composition range are
        // ignored.
        p.to >= c.from && p.from <= c.to)
          return { range: p };
        let m = i.changes({ from: g, to: v, insert: e.insert }), y = p.to - a.to;
        return {
          changes: m,
          range: l ? me.range(Math.max(0, l.anchor + y), Math.max(0, l.head + y)) : p.map(m)
        };
      });
    } else
      r = {
        changes: s,
        selection: l && i.selection.replaceRange(l)
      };
  }
  let o = "input.type";
  return (t.composing || t.inputState.compositionPendingChange && t.inputState.compositionEndedAt > Date.now() - 50) && (t.inputState.compositionPendingChange = !1, o += ".compose", t.inputState.compositionFirstChange && (o += ".start", t.inputState.compositionFirstChange = !1)), i.update(r, { userEvent: o, scrollIntoView: !0 });
}
function Zot(t, e, n, r) {
  let i = Math.min(t.length, e.length), a = 0;
  for (; a < i && t.charCodeAt(a) == e.charCodeAt(a); )
    a++;
  if (a == i && t.length == e.length)
    return null;
  let o = t.length, s = e.length;
  for (; o > 0 && s > 0 && t.charCodeAt(o - 1) == e.charCodeAt(s - 1); )
    o--, s--;
  if (r == "end") {
    let l = Math.max(0, a - Math.min(o, s));
    n -= o + l - a;
  }
  if (o < a && t.length < e.length) {
    let l = n <= a && n >= o ? a - n : 0;
    a -= l, s = a + (s - o), o = a;
  } else if (s < a) {
    let l = n <= a && n >= s ? a - n : 0;
    a -= l, o = a + (o - s), s = a;
  }
  return { from: a, toA: o, toB: s };
}
function Uot(t) {
  let e = [];
  if (t.root.activeElement != t.contentDOM)
    return e;
  let { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a } = t.observer.selectionRange;
  return n && (e.push(new a9(n, r)), (i != n || a != r) && e.push(new a9(i, a))), e;
}
function Xot(t, e) {
  if (t.length == 0)
    return null;
  let n = t[0].pos, r = t.length == 2 ? t[1].pos : n;
  return n > -1 && r > -1 ? me.single(n + e, r + e) : null;
}
const Yot = {
  childList: !0,
  characterData: !0,
  subtree: !0,
  attributes: !0,
  characterDataOldValue: !0
}, _$ = Ne.ie && Ne.ie_version <= 11;
class qot {
  constructor(e) {
    this.view = e, this.active = !1, this.editContext = null, this.selectionRange = new kat(), this.selectionChanged = !1, this.delayedFlush = -1, this.resizeTimeout = -1, this.queue = [], this.delayedAndroidKey = null, this.flushingAndroidKey = -1, this.lastChange = 0, this.scrollTargets = [], this.intersection = null, this.resizeScroll = null, this.intersecting = !1, this.gapIntersection = null, this.gaps = [], this.printQuery = null, this.parentCheck = -1, this.dom = e.contentDOM, this.observer = new MutationObserver((n) => {
      for (let r of n)
        this.queue.push(r);
      (Ne.ie && Ne.ie_version <= 11 || Ne.ios && e.composing) && n.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : this.flush();
    }), window.EditContext && e.constructor.EDIT_CONTEXT !== !1 && // Chrome <126 doesn't support inverted selections in edit context (#1392)
    !(Ne.chrome && Ne.chrome_version < 126) && (this.editContext = new Jot(e), e.state.facet(El) && (e.contentDOM.editContext = this.editContext.editContext)), _$ && (this.onCharData = (n) => {
      this.queue.push({
        target: n.target,
        type: "characterData",
        oldValue: n.prevValue
      }), this.flushSoon();
    }), this.onSelectionChange = this.onSelectionChange.bind(this), this.onResize = this.onResize.bind(this), this.onPrint = this.onPrint.bind(this), this.onScroll = this.onScroll.bind(this), window.matchMedia && (this.printQuery = window.matchMedia("print")), typeof ResizeObserver == "function" && (this.resizeScroll = new ResizeObserver(() => {
      var n;
      ((n = this.view.docView) === null || n === void 0 ? void 0 : n.lastUpdate) < Date.now() - 75 && this.onResize();
    }), this.resizeScroll.observe(e.scrollDOM)), this.addWindowListeners(this.win = e.win), this.start(), typeof IntersectionObserver == "function" && (this.intersection = new IntersectionObserver((n) => {
      this.parentCheck < 0 && (this.parentCheck = setTimeout(this.listenForScroll.bind(this), 1e3)), n.length > 0 && n[n.length - 1].intersectionRatio > 0 != this.intersecting && (this.intersecting = !this.intersecting, this.intersecting != this.view.inView && this.onScrollChanged(document.createEvent("Event")));
    }, { threshold: [0, 1e-3] }), this.intersection.observe(this.dom), this.gapIntersection = new IntersectionObserver((n) => {
      n.length > 0 && n[n.length - 1].intersectionRatio > 0 && this.onScrollChanged(document.createEvent("Event"));
    }, {})), this.listenForScroll(), this.readSelectionRange();
  }
  onScrollChanged(e) {
    this.view.inputState.runHandlers("scroll", e), this.intersecting && this.view.measure();
  }
  onScroll(e) {
    this.intersecting && this.flush(!1), this.editContext && this.view.requestMeasure(this.editContext.measureReq), this.onScrollChanged(e);
  }
  onResize() {
    this.resizeTimeout < 0 && (this.resizeTimeout = setTimeout(() => {
      this.resizeTimeout = -1, this.view.requestMeasure();
    }, 50));
  }
  onPrint(e) {
    e.type == "change" && !e.matches || (this.view.viewState.printing = !0, this.view.measure(), setTimeout(() => {
      this.view.viewState.printing = !1, this.view.requestMeasure();
    }, 500));
  }
  updateGaps(e) {
    if (this.gapIntersection && (e.length != this.gaps.length || this.gaps.some((n, r) => n != e[r]))) {
      this.gapIntersection.disconnect();
      for (let n of e)
        this.gapIntersection.observe(n);
      this.gaps = e;
    }
  }
  onSelectionChange(e) {
    let n = this.selectionChanged;
    if (!this.readSelectionRange() || this.delayedAndroidKey)
      return;
    let { view: r } = this, i = this.selectionRange;
    if (r.state.facet(El) ? r.root.activeElement != this.dom : !i1(r.dom, i))
      return;
    let a = i.anchorNode && r.docView.nearest(i.anchorNode);
    if (a && a.ignoreEvent(e)) {
      n || (this.selectionChanged = !1);
      return;
    }
    (Ne.ie && Ne.ie_version <= 11 || Ne.android && Ne.chrome) && !r.state.selection.main.empty && // (Selection.isCollapsed isn't reliable on IE)
    i.focusNode && Wg(i.focusNode, i.focusOffset, i.anchorNode, i.anchorOffset) ? this.flushSoon() : this.flush(!1);
  }
  readSelectionRange() {
    let { view: e } = this, n = Um(e.root);
    if (!n)
      return !1;
    let r = Ne.safari && e.root.nodeType == 11 && Mat(this.dom.ownerDocument) == this.dom && Kot(this.view, n) || n;
    if (!r || this.selectionRange.eq(r))
      return !1;
    let i = i1(this.dom, r);
    return i && !this.selectionChanged && e.inputState.lastFocusTime > Date.now() - 200 && e.inputState.lastTouchTime < Date.now() - 300 && Nat(this.dom, r) ? (this.view.inputState.lastFocusTime = 0, e.docView.updateSelection(), !1) : (this.selectionRange.setRange(r), i && (this.selectionChanged = !0), !0);
  }
  setSelectionRange(e, n) {
    this.selectionRange.set(e.node, e.offset, n.node, n.offset), this.selectionChanged = !1;
  }
  clearSelectionRange() {
    this.selectionRange.set(null, 0, null, 0);
  }
  listenForScroll() {
    this.parentCheck = -1;
    let e = 0, n = null;
    for (let r = this.dom; r; )
      if (r.nodeType == 1)
        !n && e < this.scrollTargets.length && this.scrollTargets[e] == r ? e++ : n || (n = this.scrollTargets.slice(0, e)), n && n.push(r), r = r.assignedSlot || r.parentNode;
      else if (r.nodeType == 11)
        r = r.host;
      else
        break;
    if (e < this.scrollTargets.length && !n && (n = this.scrollTargets.slice(0, e)), n) {
      for (let r of this.scrollTargets)
        r.removeEventListener("scroll", this.onScroll);
      for (let r of this.scrollTargets = n)
        r.addEventListener("scroll", this.onScroll);
    }
  }
  ignore(e) {
    if (!this.active)
      return e();
    try {
      return this.stop(), e();
    } finally {
      this.start(), this.clear();
    }
  }
  start() {
    this.active || (this.observer.observe(this.dom, Yot), _$ && this.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.active = !0);
  }
  stop() {
    this.active && (this.active = !1, this.observer.disconnect(), _$ && this.dom.removeEventListener("DOMCharacterDataModified", this.onCharData));
  }
  // Throw away any pending changes
  clear() {
    this.processRecords(), this.queue.length = 0, this.selectionChanged = !1;
  }
  // Chrome Android, especially in combination with GBoard, not only
  // doesn't reliably fire regular key events, but also often
  // surrounds the effect of enter or backspace with a bunch of
  // composition events that, when interrupted, cause text duplication
  // or other kinds of corruption. This hack makes the editor back off
  // from handling DOM changes for a moment when such a key is
  // detected (via beforeinput or keydown), and then tries to flush
  // them or, if that has no effect, dispatches the given key.
  delayAndroidKey(e, n) {
    var r;
    if (!this.delayedAndroidKey) {
      let i = () => {
        let a = this.delayedAndroidKey;
        a && (this.clearDelayedAndroidKey(), this.view.inputState.lastKeyCode = a.keyCode, this.view.inputState.lastKeyTime = Date.now(), !this.flush() && a.force && lh(this.dom, a.key, a.keyCode));
      };
      this.flushingAndroidKey = this.view.win.requestAnimationFrame(i);
    }
    (!this.delayedAndroidKey || e == "Enter") && (this.delayedAndroidKey = {
      key: e,
      keyCode: n,
      // Only run the key handler when no changes are detected if
      // this isn't coming right after another change, in which case
      // it is probably part of a weird chain of updates, and should
      // be ignored if it returns the DOM to its previous state.
      force: this.lastChange < Date.now() - 50 || !!(!((r = this.delayedAndroidKey) === null || r === void 0) && r.force)
    });
  }
  clearDelayedAndroidKey() {
    this.win.cancelAnimationFrame(this.flushingAndroidKey), this.delayedAndroidKey = null, this.flushingAndroidKey = -1;
  }
  flushSoon() {
    this.delayedFlush < 0 && (this.delayedFlush = this.view.win.requestAnimationFrame(() => {
      this.delayedFlush = -1, this.flush();
    }));
  }
  forceFlush() {
    this.delayedFlush >= 0 && (this.view.win.cancelAnimationFrame(this.delayedFlush), this.delayedFlush = -1), this.flush();
  }
  pendingRecords() {
    for (let e of this.observer.takeRecords())
      this.queue.push(e);
    return this.queue;
  }
  processRecords() {
    let e = this.pendingRecords();
    e.length && (this.queue = []);
    let n = -1, r = -1, i = !1;
    for (let a of e) {
      let o = this.readMutation(a);
      o && (o.typeOver && (i = !0), n == -1 ? { from: n, to: r } = o : (n = Math.min(o.from, n), r = Math.max(o.to, r)));
    }
    return { from: n, to: r, typeOver: i };
  }
  readChange() {
    let { from: e, to: n, typeOver: r } = this.processRecords(), i = this.selectionChanged && i1(this.dom, this.selectionRange);
    if (e < 0 && !i)
      return null;
    e > -1 && (this.lastChange = Date.now()), this.view.inputState.lastFocusTime = 0, this.selectionChanged = !1;
    let a = new Got(this.view, e, n, r);
    return this.view.docView.domChanged = { newSel: a.newSel ? a.newSel.main : null }, a;
  }
  // Apply pending changes, if any
  flush(e = !0) {
    if (this.delayedFlush >= 0 || this.delayedAndroidKey)
      return !1;
    e && this.readSelectionRange();
    let n = this.readChange();
    if (!n)
      return this.view.requestMeasure(), !1;
    let r = this.view.state, i = poe(this.view, n);
    return this.view.state == r && (n.domChanged || n.newSel && !n.newSel.main.eq(this.view.state.selection.main)) && this.view.update([]), i;
  }
  readMutation(e) {
    let n = this.view.docView.nearest(e.target);
    if (!n || n.ignoreMutation(e))
      return null;
    if (n.markDirty(e.type == "attributes"), e.type == "attributes" && (n.flags |= 4), e.type == "childList") {
      let r = o9(n, e.previousSibling || e.target.previousSibling, -1), i = o9(n, e.nextSibling || e.target.nextSibling, 1);
      return {
        from: r ? n.posAfter(r) : n.posAtStart,
        to: i ? n.posBefore(i) : n.posAtEnd,
        typeOver: !1
      };
    } else return e.type == "characterData" ? { from: n.posAtStart, to: n.posAtEnd, typeOver: e.target.nodeValue == e.oldValue } : null;
  }
  setWindow(e) {
    e != this.win && (this.removeWindowListeners(this.win), this.win = e, this.addWindowListeners(this.win));
  }
  addWindowListeners(e) {
    e.addEventListener("resize", this.onResize), this.printQuery ? this.printQuery.addEventListener("change", this.onPrint) : e.addEventListener("beforeprint", this.onPrint), e.addEventListener("scroll", this.onScroll), e.document.addEventListener("selectionchange", this.onSelectionChange);
  }
  removeWindowListeners(e) {
    e.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onResize), this.printQuery ? this.printQuery.removeEventListener("change", this.onPrint) : e.removeEventListener("beforeprint", this.onPrint), e.document.removeEventListener("selectionchange", this.onSelectionChange);
  }
  update(e) {
    this.editContext && (this.editContext.update(e), e.startState.facet(El) != e.state.facet(El) && (e.view.contentDOM.editContext = e.state.facet(El) ? this.editContext.editContext : null));
  }
  destroy() {
    var e, n, r;
    this.stop(), (e = this.intersection) === null || e === void 0 || e.disconnect(), (n = this.gapIntersection) === null || n === void 0 || n.disconnect(), (r = this.resizeScroll) === null || r === void 0 || r.disconnect();
    for (let i of this.scrollTargets)
      i.removeEventListener("scroll", this.onScroll);
    this.removeWindowListeners(this.win), clearTimeout(this.parentCheck), clearTimeout(this.resizeTimeout), this.win.cancelAnimationFrame(this.delayedFlush), this.win.cancelAnimationFrame(this.flushingAndroidKey);
  }
}
function o9(t, e, n) {
  for (; e; ) {
    let r = Jt.get(e);
    if (r && r.parent == t)
      return r;
    let i = e.parentNode;
    e = i != t.dom ? i : n > 0 ? e.nextSibling : e.previousSibling;
  }
  return null;
}
function s9(t, e) {
  let n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, o = t.docView.domAtPos(t.state.selection.main.anchor);
  return Wg(o.node, o.offset, i, a) && ([n, r, i, a] = [i, a, n, r]), { anchorNode: n, anchorOffset: r, focusNode: i, focusOffset: a };
}
function Kot(t, e) {
  if (e.getComposedRanges) {
    let i = e.getComposedRanges(t.root)[0];
    if (i)
      return s9(t, i);
  }
  let n = null;
  function r(i) {
    i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
  }
  return t.contentDOM.addEventListener("beforeinput", r, !0), t.dom.ownerDocument.execCommand("indent"), t.contentDOM.removeEventListener("beforeinput", r, !0), n ? s9(t, n) : null;
}
class Jot {
  constructor(e) {
    this.from = 0, this.to = 0, this.pendingContextChange = null, this.resetRange(e.state);
    let n = this.editContext = new window.EditContext({
      text: e.state.doc.sliceString(this.from, this.to),
      selectionStart: this.toContextPos(Math.max(this.from, Math.min(this.to, e.state.selection.main.anchor))),
      selectionEnd: this.toContextPos(e.state.selection.main.head)
    });
    n.addEventListener("textupdate", (r) => {
      let { anchor: i } = e.state.selection.main, a = {
        from: this.toEditorPos(r.updateRangeStart),
        to: this.toEditorPos(r.updateRangeEnd),
        insert: Ft.of(r.text.split(`
`))
      };
      a.from == this.from && i < this.from ? a.from = i : a.to == this.to && i > this.to && (a.to = i), !(a.from == a.to && !a.insert.length) && (this.pendingContextChange = a, voe(e, a, me.single(this.toEditorPos(r.selectionStart), this.toEditorPos(r.selectionEnd))), this.pendingContextChange && this.revertPending(e.state));
    }), n.addEventListener("characterboundsupdate", (r) => {
      let i = [], a = null;
      for (let o = this.toEditorPos(r.rangeStart), s = this.toEditorPos(r.rangeEnd); o < s; o++) {
        let l = e.coordsForChar(o);
        a = l && new DOMRect(l.left, l.top, l.right - l.left, l.bottom - l.top) || a || new DOMRect(), i.push(a);
      }
      n.updateCharacterBounds(r.rangeStart, i);
    }), n.addEventListener("textformatupdate", (r) => {
      let i = [];
      for (let a of r.getTextFormats()) {
        let o = a.underlineStyle, s = a.underlineThickness;
        if (o != "None" && s != "None") {
          let l = `text-decoration: underline ${o == "Dashed" ? "dashed " : o == "Squiggle" ? "wavy " : ""}${s == "Thin" ? 1 : 2}px`;
          i.push(Ze.mark({ attributes: { style: l } }).range(this.toEditorPos(a.rangeStart), this.toEditorPos(a.rangeEnd)));
        }
      }
      e.dispatch({ effects: Zae.of(Ze.set(i)) });
    }), n.addEventListener("compositionstart", () => {
      e.inputState.composing < 0 && (e.inputState.composing = 0, e.inputState.compositionFirstChange = !0);
    }), n.addEventListener("compositionend", () => {
      e.inputState.composing = -1, e.inputState.compositionFirstChange = null;
    }), this.measureReq = { read: (r) => {
      this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());
      let i = Um(r.root);
      i && i.rangeCount && this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect());
    } };
  }
  applyEdits(e) {
    let n = 0, r = !1, i = this.pendingContextChange;
    return e.changes.iterChanges((a, o, s, l, u) => {
      if (r)
        return;
      let c = u.length - (o - a);
      if (i && o >= i.to)
        if (i.from == a && i.to == o && i.insert.eq(u)) {
          i = this.pendingContextChange = null, n += c, this.to += c;
          return;
        } else
          i = null, this.revertPending(e.state);
      if (a += n, o += n, o <= this.from)
        this.from += c, this.to += c;
      else if (a < this.to) {
        if (a < this.from || o > this.to || this.to - this.from + u.length > 3e4) {
          r = !0;
          return;
        }
        this.editContext.updateText(this.toContextPos(a), this.toContextPos(o), u.toString()), this.to += c;
      }
      n += c;
    }), i && !r && this.revertPending(e.state), !r;
  }
  update(e) {
    !this.applyEdits(e) || !this.rangeIsValid(e.state) ? (this.pendingContextChange = null, this.resetRange(e.state), this.editContext.updateText(0, this.editContext.text.length, e.state.doc.sliceString(this.from, this.to)), this.setSelection(e.state)) : (e.docChanged || e.selectionSet) && this.setSelection(e.state), (e.geometryChanged || e.docChanged || e.selectionSet) && e.view.requestMeasure(this.measureReq);
  }
  resetRange(e) {
    let { head: n } = e.selection.main;
    this.from = Math.max(
      0,
      n - 1e4
      /* CxVp.Margin */
    ), this.to = Math.min(
      e.doc.length,
      n + 1e4
      /* CxVp.Margin */
    );
  }
  revertPending(e) {
    let n = this.pendingContextChange;
    this.pendingContextChange = null, this.editContext.updateText(this.toContextPos(n.from), this.toContextPos(n.to + n.insert.length), e.doc.sliceString(n.from, n.to));
  }
  setSelection(e) {
    let { main: n } = e.selection, r = this.toContextPos(Math.max(this.from, Math.min(this.to, n.anchor))), i = this.toContextPos(n.head);
    (this.editContext.selectionStart != r || this.editContext.selectionEnd != i) && this.editContext.updateSelection(r, i);
  }
  rangeIsValid(e) {
    let { head: n } = e.selection.main;
    return !(this.from > 0 && n - this.from < 500 || this.to < e.doc.length && this.to - n < 500 || this.to - this.from > 1e4 * 3);
  }
  toEditorPos(e) {
    return e + this.from;
  }
  toContextPos(e) {
    return e - this.from;
  }
}
class De {
  /**
  The current editor state.
  */
  get state() {
    return this.viewState.state;
  }
  /**
  To be able to display large documents without consuming too much
  memory or overloading the browser, CodeMirror only draws the
  code that is visible (plus a margin around it) to the DOM. This
  property tells you the extent of the current drawn viewport, in
  document positions.
  */
  get viewport() {
    return this.viewState.viewport;
  }
  /**
  When there are, for example, large collapsed ranges in the
  viewport, its size can be a lot bigger than the actual visible
  content. Thus, if you are doing something like styling the
  content in the viewport, it is preferable to only do so for
  these ranges, which are the subset of the viewport that is
  actually drawn.
  */
  get visibleRanges() {
    return this.viewState.visibleRanges;
  }
  /**
  Returns false when the editor is entirely scrolled out of view
  or otherwise hidden.
  */
  get inView() {
    return this.viewState.inView;
  }
  /**
  Indicates whether the user is currently composing text via
  [IME](https://en.wikipedia.org/wiki/Input_method), and at least
  one change has been made in the current composition.
  */
  get composing() {
    return this.inputState.composing > 0;
  }
  /**
  Indicates whether the user is currently in composing state. Note
  that on some platforms, like Android, this will be the case a
  lot, since just putting the cursor on a word starts a
  composition there.
  */
  get compositionStarted() {
    return this.inputState.composing >= 0;
  }
  /**
  The document or shadow root that the view lives in.
  */
  get root() {
    return this._root;
  }
  /**
  @internal
  */
  get win() {
    return this.dom.ownerDocument.defaultView || window;
  }
  /**
  Construct a new view. You'll want to either provide a `parent`
  option, or put `view.dom` into your document after creating a
  view, so that the user can see the editor.
  */
  constructor(e = {}) {
    this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.className = "cm-announced", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM), e.parent && e.parent.appendChild(this.dom);
    let { dispatch: n } = e;
    this.dispatchTransactions = e.dispatchTransactions || n && ((r) => r.forEach((i) => n(i, this))) || ((r) => this.update(r)), this.dispatch = this.dispatch.bind(this), this._root = e.root || Lat(e.parent) || document, this.viewState = new r9(e.state || At.create(e)), e.scrollTo && e.scrollTo.is(jb) && (this.viewState.scrollTarget = e.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(Jv).map((r) => new g$(r));
    for (let r of this.plugins)
      r.update(this);
    this.observer = new qot(this), this.inputState = new pot(this), this.inputState.ensureHandlers(this.plugins), this.docView = new zH(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure();
  }
  dispatch(...e) {
    let n = e.length == 1 && e[0] instanceof Fn ? e : e.length == 1 && Array.isArray(e[0]) ? e[0] : [this.state.update(...e)];
    this.dispatchTransactions(n, this);
  }
  /**
  Update the view for the given array of transactions. This will
  update the visible document and selection to match the state
  produced by the transactions, and notify view plugins of the
  change. You should usually call
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead, which uses this
  as a primitive.
  */
  update(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
    let n = !1, r = !1, i, a = this.state;
    for (let d of e) {
      if (d.startState != a)
        throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");
      a = d.state;
    }
    if (this.destroyed) {
      this.viewState.state = a;
      return;
    }
    let o = this.hasFocus, s = 0, l = null;
    e.some((d) => d.annotation(soe)) ? (this.inputState.notifiedFocused = o, s = 1) : o != this.inputState.notifiedFocused && (this.inputState.notifiedFocused = o, l = loe(a, o), l || (s = 1));
    let u = this.observer.delayedAndroidKey, c = null;
    if (u ? (this.observer.clearDelayedAndroidKey(), c = this.observer.readChange(), (c && !this.state.doc.eq(a.doc) || !this.state.selection.eq(a.selection)) && (c = null)) : this.observer.clear(), a.facet(At.phrases) != this.state.facet(At.phrases))
      return this.setState(a);
    i = iS.create(this, a, e), i.flags |= s;
    let f = this.viewState.scrollTarget;
    try {
      this.updateState = 2;
      for (let d of e) {
        if (f && (f = f.map(d.changes)), d.scrollIntoView) {
          let { main: h } = d.state.selection;
          f = new uh(h.empty ? h : me.cursor(h.head, h.head > h.anchor ? -1 : 1));
        }
        for (let h of d.effects)
          h.is(jb) && (f = h.value.clip(this.state));
      }
      this.viewState.update(i, f), this.bidiCache = aS.update(this.bidiCache, i.changes), i.empty || (this.updatePlugins(i), this.inputState.update(i)), n = this.docView.update(i), this.state.facet(eg) != this.styleModules && this.mountStyles(), r = this.updateAttrs(), this.showAnnouncements(e), this.docView.updateSelection(n, e.some((d) => d.isUserEvent("select.pointer")));
    } finally {
      this.updateState = 0;
    }
    if (i.startState.facet(Kb) != i.state.facet(Kb) && (this.viewState.mustMeasureContent = !0), (n || r || f || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) && this.requestMeasure(), n && this.docViewUpdate(), !i.empty)
      for (let d of this.state.facet(CM))
        try {
          d(i);
        } catch (h) {
          mi(this.state, h, "update listener");
        }
    (l || c) && Promise.resolve().then(() => {
      l && this.state == l.startState && this.dispatch(l), c && !poe(this, c) && u.force && lh(this.contentDOM, u.key, u.keyCode);
    });
  }
  /**
  Reset the view to the given state. (This will cause the entire
  document to be redrawn and all view plugins to be reinitialized,
  so you should probably only use it when the new state isn't
  derived from the old state. Otherwise, use
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
  */
  setState(e) {
    if (this.updateState != 0)
      throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
    if (this.destroyed) {
      this.viewState.state = e;
      return;
    }
    this.updateState = 2;
    let n = this.hasFocus;
    try {
      for (let r of this.plugins)
        r.destroy(this);
      this.viewState = new r9(e), this.plugins = e.facet(Jv).map((r) => new g$(r)), this.pluginMap.clear();
      for (let r of this.plugins)
        r.update(this);
      this.docView.destroy(), this.docView = new zH(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
    } finally {
      this.updateState = 0;
    }
    n && this.focus(), this.requestMeasure();
  }
  updatePlugins(e) {
    let n = e.startState.facet(Jv), r = e.state.facet(Jv);
    if (n != r) {
      let i = [];
      for (let a of r) {
        let o = n.indexOf(a);
        if (o < 0)
          i.push(new g$(a));
        else {
          let s = this.plugins[o];
          s.mustUpdate = e, i.push(s);
        }
      }
      for (let a of this.plugins)
        a.mustUpdate != e && a.destroy(this);
      this.plugins = i, this.pluginMap.clear();
    } else
      for (let i of this.plugins)
        i.mustUpdate = e;
    for (let i = 0; i < this.plugins.length; i++)
      this.plugins[i].update(this);
    n != r && this.inputState.ensureHandlers(this.plugins);
  }
  docViewUpdate() {
    for (let e of this.plugins) {
      let n = e.value;
      if (n && n.docViewUpdate)
        try {
          n.docViewUpdate(this);
        } catch (r) {
          mi(this.state, r, "doc view update listener");
        }
    }
  }
  /**
  @internal
  */
  measure(e = !0) {
    if (this.destroyed)
      return;
    if (this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.observer.delayedAndroidKey) {
      this.measureScheduled = -1, this.requestMeasure();
      return;
    }
    this.measureScheduled = 0, e && this.observer.forceFlush();
    let n = null, r = this.scrollDOM, i = r.scrollTop * this.scaleY, { scrollAnchorPos: a, scrollAnchorHeight: o } = this.viewState;
    Math.abs(i - this.viewState.scrollTop) > 1 && (o = -1), this.viewState.scrollAnchorHeight = -1;
    try {
      for (let s = 0; ; s++) {
        if (o < 0)
          if (Oae(r))
            a = -1, o = this.viewState.heightMap.height;
          else {
            let h = this.viewState.scrollAnchorAt(i);
            a = h.from, o = h.top;
          }
        this.updateState = 1;
        let l = this.viewState.measure(this);
        if (!l && !this.measureRequests.length && this.viewState.scrollTarget == null)
          break;
        if (s > 5) {
          console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
          break;
        }
        let u = [];
        l & 4 || ([this.measureRequests, u] = [u, this.measureRequests]);
        let c = u.map((h) => {
          try {
            return h.read(this);
          } catch (p) {
            return mi(this.state, p), l9;
          }
        }), f = iS.create(this, this.state, []), d = !1;
        f.flags |= l, n ? n.flags |= l : n = f, this.updateState = 2, f.empty || (this.updatePlugins(f), this.inputState.update(f), this.updateAttrs(), d = this.docView.update(f), d && this.docViewUpdate());
        for (let h = 0; h < u.length; h++)
          if (c[h] != l9)
            try {
              let p = u[h];
              p.write && p.write(c[h], this);
            } catch (p) {
              mi(this.state, p);
            }
        if (d && this.docView.updateSelection(!0), !f.viewportChanged && this.measureRequests.length == 0) {
          if (this.viewState.editorHeight)
            if (this.viewState.scrollTarget) {
              this.docView.scrollIntoView(this.viewState.scrollTarget), this.viewState.scrollTarget = null, o = -1;
              continue;
            } else {
              let p = (a < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(a).top) - o;
              if (p > 1 || p < -1) {
                i = i + p, r.scrollTop = i / this.scaleY, o = -1;
                continue;
              }
            }
          break;
        }
      }
    } finally {
      this.updateState = 0, this.measureScheduled = -1;
    }
    if (n && !n.empty)
      for (let s of this.state.facet(CM))
        s(n);
  }
  /**
  Get the CSS classes for the currently active editor themes.
  */
  get themeClasses() {
    return EM + " " + (this.state.facet(AM) ? doe : foe) + " " + this.state.facet(Kb);
  }
  updateAttrs() {
    let e = u9(this, Uae, {
      class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
    }), n = {
      spellcheck: "false",
      autocorrect: "off",
      autocapitalize: "off",
      translate: "no",
      contenteditable: this.state.facet(El) ? "true" : "false",
      class: "cm-content",
      style: `${Ne.tabSize}: ${this.state.tabSize}`,
      role: "textbox",
      "aria-multiline": "true"
    };
    this.state.readOnly && (n["aria-readonly"] = "true"), u9(this, i4, n);
    let r = this.observer.ignore(() => {
      let i = _M(this.contentDOM, this.contentAttrs, n), a = _M(this.dom, this.editorAttrs, e);
      return i || a;
    });
    return this.editorAttrs = e, this.contentAttrs = n, r;
  }
  showAnnouncements(e) {
    let n = !0;
    for (let r of e)
      for (let i of r.effects)
        if (i.is(De.announce)) {
          n && (this.announceDOM.textContent = ""), n = !1;
          let a = this.announceDOM.appendChild(document.createElement("div"));
          a.textContent = i.value;
        }
  }
  mountStyles() {
    this.styleModules = this.state.facet(eg);
    let e = this.state.facet(De.cspNonce);
    pu.mount(this.root, this.styleModules.concat(Wot).reverse(), e ? { nonce: e } : void 0);
  }
  readMeasured() {
    if (this.updateState == 2)
      throw new Error("Reading the editor layout isn't allowed during an update");
    this.updateState == 0 && this.measureScheduled > -1 && this.measure(!1);
  }
  /**
  Schedule a layout measurement, optionally providing callbacks to
  do custom DOM measuring followed by a DOM write phase. Using
  this is preferable reading DOM layout directly from, for
  example, an event handler, because it'll make sure measuring and
  drawing done by other components is synchronized, avoiding
  unnecessary DOM layout computations.
  */
  requestMeasure(e) {
    if (this.measureScheduled < 0 && (this.measureScheduled = this.win.requestAnimationFrame(() => this.measure())), e) {
      if (this.measureRequests.indexOf(e) > -1)
        return;
      if (e.key != null) {
        for (let n = 0; n < this.measureRequests.length; n++)
          if (this.measureRequests[n].key === e.key) {
            this.measureRequests[n] = e;
            return;
          }
      }
      this.measureRequests.push(e);
    }
  }
  /**
  Get the value of a specific plugin, if present. Note that
  plugins that crash can be dropped from a view, so even when you
  know you registered a given plugin, it is recommended to check
  the return value of this method.
  */
  plugin(e) {
    let n = this.pluginMap.get(e);
    return (n === void 0 || n && n.spec != e) && this.pluginMap.set(e, n = this.plugins.find((r) => r.spec == e) || null), n && n.update(this).value;
  }
  /**
  The top position of the document, in screen coordinates. This
  may be negative when the editor is scrolled down. Points
  directly to the top of the first line, not above the padding.
  */
  get documentTop() {
    return this.contentDOM.getBoundingClientRect().top + this.viewState.paddingTop;
  }
  /**
  Reports the padding above and below the document.
  */
  get documentPadding() {
    return { top: this.viewState.paddingTop, bottom: this.viewState.paddingBottom };
  }
  /**
  If the editor is transformed with CSS, this provides the scale
  along the X axis. Otherwise, it will just be 1. Note that
  transforms other than translation and scaling are not supported.
  */
  get scaleX() {
    return this.viewState.scaleX;
  }
  /**
  Provide the CSS transformed scale along the Y axis.
  */
  get scaleY() {
    return this.viewState.scaleY;
  }
  /**
  Find the text line or block widget at the given vertical
  position (which is interpreted as relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop)).
  */
  elementAtHeight(e) {
    return this.readMeasured(), this.viewState.elementAtHeight(e);
  }
  /**
  Find the line block (see
  [`lineBlockAt`](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) at the given
  height, again interpreted relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop).
  */
  lineBlockAtHeight(e) {
    return this.readMeasured(), this.viewState.lineBlockAtHeight(e);
  }
  /**
  Get the extent and vertical position of all [line
  blocks](https://codemirror.net/6/docs/ref/#view.EditorView.lineBlockAt) in the viewport. Positions
  are relative to the [top of the
  document](https://codemirror.net/6/docs/ref/#view.EditorView.documentTop);
  */
  get viewportLineBlocks() {
    return this.viewState.viewportLines;
  }
  /**
  Find the line block around the given document position. A line
  block is a range delimited on both sides by either a
  non-[hidden](https://codemirror.net/6/docs/ref/#view.Decoration^replace) line breaks, or the
  start/end of the document. It will usually just hold a line of
  text, but may be broken into multiple textblocks by block
  widgets.
  */
  lineBlockAt(e) {
    return this.viewState.lineBlockAt(e);
  }
  /**
  The editor's total content height.
  */
  get contentHeight() {
    return this.viewState.contentHeight;
  }
  /**
  Move a cursor position by [grapheme
  cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak). `forward` determines whether
  the motion is away from the line start, or towards it. In
  bidirectional text, the line is traversed in visual order, using
  the editor's [text direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection).
  When the start position was the last one on the line, the
  returned position will be across the line break. If there is no
  further line, the original position is returned.
  
  By default, this method moves over a single cluster. The
  optional `by` argument can be used to move across more. It will
  be called with the first cluster as argument, and should return
  a predicate that determines, for each subsequent cluster,
  whether it should also be moved over.
  */
  moveByChar(e, n, r) {
    return y$(this, e, GH(this, e, n, r));
  }
  /**
  Move a cursor position across the next group of either
  [letters](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) or non-letter
  non-whitespace characters.
  */
  moveByGroup(e, n) {
    return y$(this, e, GH(this, e, n, (r) => dot(this, e.head, r)));
  }
  /**
  Get the cursor position visually at the start or end of a line.
  Note that this may differ from the _logical_ position at its
  start or end (which is simply at `line.from`/`line.to`) if text
  at the start or end goes against the line's base text direction.
  */
  visualLineSide(e, n) {
    let r = this.bidiSpans(e), i = this.textDirectionAt(e.from), a = r[n ? r.length - 1 : 0];
    return me.cursor(a.side(n, i) + e.from, a.forward(!n, i) ? 1 : -1);
  }
  /**
  Move to the next line boundary in the given direction. If
  `includeWrap` is true, line wrapping is on, and there is a
  further wrap point on the current line, the wrap point will be
  returned. Otherwise this function will return the start or end
  of the line.
  */
  moveToLineBoundary(e, n, r = !0) {
    return fot(this, e, n, r);
  }
  /**
  Move a cursor position vertically. When `distance` isn't given,
  it defaults to moving to the next line (including wrapped
  lines). Otherwise, `distance` should provide a positive distance
  in pixels.
  
  When `start` has a
  [`goalColumn`](https://codemirror.net/6/docs/ref/#state.SelectionRange.goalColumn), the vertical
  motion will use that as a target horizontal position. Otherwise,
  the cursor's own horizontal position is used. The returned
  cursor will have its goal column set to whichever column was
  used.
  */
  moveVertically(e, n, r) {
    return y$(this, e, hot(this, e, n, r));
  }
  /**
  Find the DOM parent node and offset (child offset if `node` is
  an element, character offset when it is a text node) at the
  given document position.
  
  Note that for positions that aren't currently in
  `visibleRanges`, the resulting DOM position isn't necessarily
  meaningful (it may just point before or after a placeholder
  element).
  */
  domAtPos(e) {
    return this.docView.domAtPos(e);
  }
  /**
  Find the document position at the given DOM node. Can be useful
  for associating positions with DOM events. Will raise an error
  when `node` isn't part of the editor content.
  */
  posAtDOM(e, n = 0) {
    return this.docView.posFromDOM(e, n);
  }
  posAtCoords(e, n = !0) {
    return this.readMeasured(), eoe(this, e, n);
  }
  /**
  Get the screen coordinates at the given document position.
  `side` determines whether the coordinates are based on the
  element before (-1) or after (1) the position (if no element is
  available on the given side, the method will transparently use
  another strategy to get reasonable coordinates).
  */
  coordsAtPos(e, n = 1) {
    this.readMeasured();
    let r = this.docView.coordsAt(e, n);
    if (!r || r.left == r.right)
      return r;
    let i = this.state.doc.lineAt(e), a = this.bidiSpans(i), o = a[Hl.find(a, e - i.from, -1, n)];
    return Iw(r, o.dir == pn.LTR == n > 0);
  }
  /**
  Return the rectangle around a given character. If `pos` does not
  point in front of a character that is in the viewport and
  rendered (i.e. not replaced, not a line break), this will return
  null. For space characters that are a line wrap point, this will
  return the position before the line break.
  */
  coordsForChar(e) {
    return this.readMeasured(), this.docView.coordsForChar(e);
  }
  /**
  The default width of a character in the editor. May not
  accurately reflect the width of all characters (given variable
  width fonts or styling of invididual ranges).
  */
  get defaultCharacterWidth() {
    return this.viewState.heightOracle.charWidth;
  }
  /**
  The default height of a line in the editor. May not be accurate
  for all lines.
  */
  get defaultLineHeight() {
    return this.viewState.heightOracle.lineHeight;
  }
  /**
  The text direction
  ([`direction`](https://developer.mozilla.org/en-US/docs/Web/CSS/direction)
  CSS property) of the editor's content element.
  */
  get textDirection() {
    return this.viewState.defaultTextDirection;
  }
  /**
  Find the text direction of the block at the given position, as
  assigned by CSS. If
  [`perLineTextDirection`](https://codemirror.net/6/docs/ref/#view.EditorView^perLineTextDirection)
  isn't enabled, or the given position is outside of the viewport,
  this will always return the same as
  [`textDirection`](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection). Note that
  this may trigger a DOM layout.
  */
  textDirectionAt(e) {
    return !this.state.facet(Hae) || e < this.viewport.from || e > this.viewport.to ? this.textDirection : (this.readMeasured(), this.docView.textDirectionAt(e));
  }
  /**
  Whether this editor [wraps lines](https://codemirror.net/6/docs/ref/#view.EditorView.lineWrapping)
  (as determined by the
  [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)
  CSS property of its content element).
  */
  get lineWrapping() {
    return this.viewState.heightOracle.lineWrapping;
  }
  /**
  Returns the bidirectional text structure of the given line
  (which should be in the current document) as an array of span
  objects. The order of these spans matches the [text
  direction](https://codemirror.net/6/docs/ref/#view.EditorView.textDirection)—if that is
  left-to-right, the leftmost spans come first, otherwise the
  rightmost spans come first.
  */
  bidiSpans(e) {
    if (e.length > est)
      return Lae(e.length);
    let n = this.textDirectionAt(e.from), r;
    for (let a of this.bidiCache)
      if (a.from == e.from && a.dir == n && (a.fresh || kae(a.isolates, r = BH(this, e))))
        return a.order;
    r || (r = BH(this, e));
    let i = Xat(e.text, n, r);
    return this.bidiCache.push(new aS(e.from, e.to, n, r, !0, i)), i;
  }
  /**
  Check whether the editor has focus.
  */
  get hasFocus() {
    var e;
    return (this.dom.ownerDocument.hasFocus() || Ne.safari && ((e = this.inputState) === null || e === void 0 ? void 0 : e.lastContextMenu) > Date.now() - 3e4) && this.root.activeElement == this.contentDOM;
  }
  /**
  Put focus on the editor.
  */
  focus() {
    this.observer.ignore(() => {
      bae(this.contentDOM), this.docView.updateSelection();
    });
  }
  /**
  Update the [root](https://codemirror.net/6/docs/ref/##view.EditorViewConfig.root) in which the editor lives. This is only
  necessary when moving the editor's existing DOM to a new window or shadow root.
  */
  setRoot(e) {
    this._root != e && (this._root = e, this.observer.setWindow((e.nodeType == 9 ? e : e.ownerDocument).defaultView || window), this.mountStyles());
  }
  /**
  Clean up this editor view, removing its element from the
  document, unregistering event handlers, and notifying
  plugins. The view instance can no longer be used after
  calling this.
  */
  destroy() {
    this.root.activeElement == this.contentDOM && this.contentDOM.blur();
    for (let e of this.plugins)
      e.destroy(this);
    this.plugins = [], this.inputState.destroy(), this.docView.destroy(), this.dom.remove(), this.observer.destroy(), this.measureScheduled > -1 && this.win.cancelAnimationFrame(this.measureScheduled), this.destroyed = !0;
  }
  /**
  Returns an effect that can be
  [added](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) to a transaction to
  cause it to scroll the given position or range into view.
  */
  static scrollIntoView(e, n = {}) {
    return jb.of(new uh(typeof e == "number" ? me.cursor(e) : e, n.y, n.x, n.yMargin, n.xMargin));
  }
  /**
  Return an effect that resets the editor to its current (at the
  time this method was called) scroll position. Note that this
  only affects the editor's own scrollable element, not parents.
  See also
  [`EditorViewConfig.scrollTo`](https://codemirror.net/6/docs/ref/#view.EditorViewConfig.scrollTo).
  
  The effect should be used with a document identical to the one
  it was created for. Failing to do so is not an error, but may
  not scroll to the expected position. You can
  [map](https://codemirror.net/6/docs/ref/#state.StateEffect.map) the effect to account for changes.
  */
  scrollSnapshot() {
    let { scrollTop: e, scrollLeft: n } = this.scrollDOM, r = this.viewState.scrollAnchorAt(e);
    return jb.of(new uh(me.cursor(r.from), "start", "start", r.top - e, n, !0));
  }
  /**
  Enable or disable tab-focus mode, which disables key bindings
  for Tab and Shift-Tab, letting the browser's default
  focus-changing behavior go through instead. This is useful to
  prevent trapping keyboard users in your editor.
  
  Without argument, this toggles the mode. With a boolean, it
  enables (true) or disables it (false). Given a number, it
  temporarily enables the mode until that number of milliseconds
  have passed or another non-Tab key is pressed.
  */
  setTabFocusMode(e) {
    e == null ? this.inputState.tabFocusMode = this.inputState.tabFocusMode < 0 ? 0 : -1 : typeof e == "boolean" ? this.inputState.tabFocusMode = e ? 0 : -1 : this.inputState.tabFocusMode != 0 && (this.inputState.tabFocusMode = Date.now() + e);
  }
  /**
  Returns an extension that can be used to add DOM event handlers.
  The value should be an object mapping event names to handler
  functions. For any given event, such functions are ordered by
  extension precedence, and the first handler to return true will
  be assumed to have handled that event, and no other handlers or
  built-in behavior will be activated for it. These are registered
  on the [content element](https://codemirror.net/6/docs/ref/#view.EditorView.contentDOM), except
  for `scroll` handlers, which will be called any time the
  editor's [scroll element](https://codemirror.net/6/docs/ref/#view.EditorView.scrollDOM) or one of
  its parent nodes is scrolled.
  */
  static domEventHandlers(e) {
    return kn.define(() => ({}), { eventHandlers: e });
  }
  /**
  Create an extension that registers DOM event observers. Contrary
  to event [handlers](https://codemirror.net/6/docs/ref/#view.EditorView^domEventHandlers),
  observers can't be prevented from running by a higher-precedence
  handler returning true. They also don't prevent other handlers
  and observers from running when they return true, and should not
  call `preventDefault`.
  */
  static domEventObservers(e) {
    return kn.define(() => ({}), { eventObservers: e });
  }
  /**
  Create a theme extension. The first argument can be a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)
  style spec providing the styles for the theme. These will be
  prefixed with a generated class for the style.
  
  Because the selectors will be prefixed with a scope class, rule
  that directly match the editor's [wrapper
  element](https://codemirror.net/6/docs/ref/#view.EditorView.dom)—to which the scope class will be
  added—need to be explicitly differentiated by adding an `&` to
  the selector for that element—for example
  `&.cm-focused`.
  
  When `dark` is set to true, the theme will be marked as dark,
  which will cause the `&dark` rules from [base
  themes](https://codemirror.net/6/docs/ref/#view.EditorView^baseTheme) to be used (as opposed to
  `&light` when a light theme is active).
  */
  static theme(e, n) {
    let r = pu.newName(), i = [Kb.of(r), eg.of(MM(`.${r}`, e))];
    return n && n.dark && i.push(AM.of(!0)), i;
  }
  /**
  Create an extension that adds styles to the base theme. Like
  with [`theme`](https://codemirror.net/6/docs/ref/#view.EditorView^theme), use `&` to indicate the
  place of the editor wrapper element when directly targeting
  that. You can also use `&dark` or `&light` instead to only
  target editors with a dark or light theme.
  */
  static baseTheme(e) {
    return Eu.lowest(eg.of(MM("." + EM, e, hoe)));
  }
  /**
  Retrieve an editor view instance from the view's DOM
  representation.
  */
  static findFromDOM(e) {
    var n;
    let r = e.querySelector(".cm-content"), i = r && Jt.get(r) || Jt.get(e);
    return ((n = i == null ? void 0 : i.rootView) === null || n === void 0 ? void 0 : n.view) || null;
  }
}
De.styleModule = eg;
De.inputHandler = Wae;
De.scrollHandler = jae;
De.focusChangeEffect = Qae;
De.perLineTextDirection = Hae;
De.exceptionSink = Fae;
De.updateListener = CM;
De.editable = El;
De.mouseSelectionStyle = Vae;
De.dragMovesSelection = zae;
De.clickAddsSelectionRange = Bae;
De.decorations = Xm;
De.outerDecorations = Xae;
De.atomicRanges = a4;
De.bidiIsolatedRanges = Yae;
De.scrollMargins = qae;
De.darkTheme = AM;
De.cspNonce = /* @__PURE__ */ Be.define({ combine: (t) => t.length ? t[0] : "" });
De.contentAttributes = i4;
De.editorAttributes = Uae;
De.lineWrapping = /* @__PURE__ */ De.contentAttributes.of({ class: "cm-lineWrapping" });
De.announce = /* @__PURE__ */ dt.define();
const est = 4096, l9 = {};
class aS {
  constructor(e, n, r, i, a, o) {
    this.from = e, this.to = n, this.dir = r, this.isolates = i, this.fresh = a, this.order = o;
  }
  static update(e, n) {
    if (n.empty && !e.some((a) => a.fresh))
      return e;
    let r = [], i = e.length ? e[e.length - 1].dir : pn.LTR;
    for (let a = Math.max(0, e.length - 10); a < e.length; a++) {
      let o = e[a];
      o.dir == i && !n.touchesRange(o.from, o.to) && r.push(new aS(n.mapPos(o.from, 1), n.mapPos(o.to, -1), o.dir, o.isolates, !1, o.order));
    }
    return r;
  }
}
function u9(t, e, n) {
  for (let r = t.state.facet(e), i = r.length - 1; i >= 0; i--) {
    let a = r[i], o = typeof a == "function" ? a(t) : a;
    o && bM(o, n);
  }
  return n;
}
const tst = Ne.mac ? "mac" : Ne.windows ? "win" : Ne.linux ? "linux" : "key";
function nst(t, e) {
  const n = t.split(/-(?!$)/);
  let r = n[n.length - 1];
  r == "Space" && (r = " ");
  let i, a, o, s;
  for (let l = 0; l < n.length - 1; ++l) {
    const u = n[l];
    if (/^(cmd|meta|m)$/i.test(u))
      s = !0;
    else if (/^a(lt)?$/i.test(u))
      i = !0;
    else if (/^(c|ctrl|control)$/i.test(u))
      a = !0;
    else if (/^s(hift)?$/i.test(u))
      o = !0;
    else if (/^mod$/i.test(u))
      e == "mac" ? s = !0 : a = !0;
    else
      throw new Error("Unrecognized modifier name: " + u);
  }
  return i && (r = "Alt-" + r), a && (r = "Ctrl-" + r), s && (r = "Meta-" + r), o && (r = "Shift-" + r), r;
}
function Jb(t, e, n) {
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n !== !1 && e.shiftKey && (t = "Shift-" + t), t;
}
const rst = /* @__PURE__ */ Eu.default(/* @__PURE__ */ De.domEventHandlers({
  keydown(t, e) {
    return moe(goe(e.state), t, e, "editor");
  }
})), oy = /* @__PURE__ */ Be.define({ enables: rst }), c9 = /* @__PURE__ */ new WeakMap();
function goe(t) {
  let e = t.facet(oy), n = c9.get(e);
  return n || c9.set(e, n = ost(e.reduce((r, i) => r.concat(i), []))), n;
}
function ist(t, e, n) {
  return moe(goe(t.state), e, t, n);
}
let Ml = null;
const ast = 4e3;
function ost(t, e = tst) {
  let n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), i = (o, s) => {
    let l = r[o];
    if (l == null)
      r[o] = s;
    else if (l != s)
      throw new Error("Key binding " + o + " is used both as a regular binding and as a multi-stroke prefix");
  }, a = (o, s, l, u, c) => {
    var f, d;
    let h = n[o] || (n[o] = /* @__PURE__ */ Object.create(null)), p = s.split(/ (?!$)/).map((m) => nst(m, e));
    for (let m = 1; m < p.length; m++) {
      let y = p.slice(0, m).join(" ");
      i(y, !0), h[y] || (h[y] = {
        preventDefault: !0,
        stopPropagation: !1,
        run: [(b) => {
          let _ = Ml = { view: b, prefix: y, scope: o };
          return setTimeout(() => {
            Ml == _ && (Ml = null);
          }, ast), !0;
        }]
      });
    }
    let v = p.join(" ");
    i(v, !1);
    let g = h[v] || (h[v] = {
      preventDefault: !1,
      stopPropagation: !1,
      run: ((d = (f = h._any) === null || f === void 0 ? void 0 : f.run) === null || d === void 0 ? void 0 : d.slice()) || []
    });
    l && g.run.push(l), u && (g.preventDefault = !0), c && (g.stopPropagation = !0);
  };
  for (let o of t) {
    let s = o.scope ? o.scope.split(" ") : ["editor"];
    if (o.any)
      for (let u of s) {
        let c = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
        c._any || (c._any = { preventDefault: !1, stopPropagation: !1, run: [] });
        let { any: f } = o;
        for (let d in c)
          c[d].run.push((h) => f(h, IM));
      }
    let l = o[e] || o.key;
    if (l)
      for (let u of s)
        a(u, l, o.run, o.preventDefault, o.stopPropagation), o.shift && a(u, "Shift-" + l, o.shift, o.preventDefault, o.stopPropagation);
  }
  return n;
}
let IM = null;
function moe(t, e, n, r) {
  IM = e;
  let i = Eat(e), a = gr(i, 0), o = ga(a) == i.length && i != " ", s = "", l = !1, u = !1, c = !1;
  Ml && Ml.view == n && Ml.scope == r && (s = Ml.prefix + " ", noe.indexOf(e.keyCode) < 0 && (u = !0, Ml = null));
  let f = /* @__PURE__ */ new Set(), d = (g) => {
    if (g) {
      for (let m of g.run)
        if (!f.has(m) && (f.add(m), m(n)))
          return g.stopPropagation && (c = !0), !0;
      g.preventDefault && (g.stopPropagation && (c = !0), u = !0);
    }
    return !1;
  }, h = t[r], p, v;
  return h && (d(h[s + Jb(i, e, !o)]) ? l = !0 : o && (e.altKey || e.metaKey || e.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
  !(Ne.windows && e.ctrlKey && e.altKey) && (p = vu[e.keyCode]) && p != i ? (d(h[s + Jb(p, e, !0)]) || e.shiftKey && (v = Zm[e.keyCode]) != i && v != p && d(h[s + Jb(v, e, !1)])) && (l = !0) : o && e.shiftKey && d(h[s + Jb(i, e, !0)]) && (l = !0), !l && d(h._any) && (l = !0)), u && (l = !0), l && c && e.stopPropagation(), IM = null, l;
}
class sy {
  /**
  Create a marker with the given class and dimensions. If `width`
  is null, the DOM element will get no width style.
  */
  constructor(e, n, r, i, a) {
    this.className = e, this.left = n, this.top = r, this.width = i, this.height = a;
  }
  draw() {
    let e = document.createElement("div");
    return e.className = this.className, this.adjust(e), e;
  }
  update(e, n) {
    return n.className != this.className ? !1 : (this.adjust(e), !0);
  }
  adjust(e) {
    e.style.left = this.left + "px", e.style.top = this.top + "px", this.width != null && (e.style.width = this.width + "px"), e.style.height = this.height + "px";
  }
  eq(e) {
    return this.left == e.left && this.top == e.top && this.width == e.width && this.height == e.height && this.className == e.className;
  }
  /**
  Create a set of rectangles for the given selection range,
  assigning them theclass`className`. Will create a single
  rectangle for empty ranges, and a set of selection-style
  rectangles covering the range's content (in a bidi-aware
  way) for non-empty ones.
  */
  static forRange(e, n, r) {
    if (r.empty) {
      let i = e.coordsAtPos(r.head, r.assoc || 1);
      if (!i)
        return [];
      let a = yoe(e);
      return [new sy(n, i.left - a.left, i.top - a.top, null, i.bottom - i.top)];
    } else
      return sst(e, n, r);
  }
}
function yoe(t) {
  let e = t.scrollDOM.getBoundingClientRect();
  return { left: (t.textDirection == pn.LTR ? e.left : e.right - t.scrollDOM.clientWidth * t.scaleX) - t.scrollDOM.scrollLeft * t.scaleX, top: e.top - t.scrollDOM.scrollTop * t.scaleY };
}
function f9(t, e, n, r) {
  let i = t.coordsAtPos(e, n * 2);
  if (!i)
    return r;
  let a = t.dom.getBoundingClientRect(), o = (i.top + i.bottom) / 2, s = t.posAtCoords({ x: a.left + 1, y: o }), l = t.posAtCoords({ x: a.right - 1, y: o });
  return s == null || l == null ? r : { from: Math.max(r.from, Math.min(s, l)), to: Math.min(r.to, Math.max(s, l)) };
}
function sst(t, e, n) {
  if (n.to <= t.viewport.from || n.from >= t.viewport.to)
    return [];
  let r = Math.max(n.from, t.viewport.from), i = Math.min(n.to, t.viewport.to), a = t.textDirection == pn.LTR, o = t.contentDOM, s = o.getBoundingClientRect(), l = yoe(t), u = o.querySelector(".cm-line"), c = u && window.getComputedStyle(u), f = s.left + (c ? parseInt(c.paddingLeft) + Math.min(0, parseInt(c.textIndent)) : 0), d = s.right - (c ? parseInt(c.paddingRight) : 0), h = PM(t, r), p = PM(t, i), v = h.type == Jr.Text ? h : null, g = p.type == Jr.Text ? p : null;
  if (v && (t.lineWrapping || h.widgetLineBreaks) && (v = f9(t, r, 1, v)), g && (t.lineWrapping || p.widgetLineBreaks) && (g = f9(t, i, -1, g)), v && g && v.from == g.from && v.to == g.to)
    return y(b(n.from, n.to, v));
  {
    let O = v ? b(n.from, null, v) : _(h, !1), S = g ? b(null, n.to, g) : _(p, !0), x = [];
    return (v || h).to < (g || p).from - (v && g ? 1 : 0) || h.widgetLineBreaks > 1 && O.bottom + t.defaultLineHeight / 2 < S.top ? x.push(m(f, O.bottom, d, S.top)) : O.bottom < S.top && t.elementAtHeight((O.bottom + S.top) / 2).type == Jr.Text && (O.bottom = S.top = (O.bottom + S.top) / 2), y(O).concat(x).concat(y(S));
  }
  function m(O, S, x, C) {
    return new sy(
      e,
      O - l.left,
      S - l.top - 0.01,
      x - O,
      C - S + 0.01
      /* C.Epsilon */
    );
  }
  function y({ top: O, bottom: S, horizontal: x }) {
    let C = [];
    for (let T = 0; T < x.length; T += 2)
      C.push(m(x[T], O, x[T + 1], S));
    return C;
  }
  function b(O, S, x) {
    let C = 1e9, T = -1e9, w = [];
    function P(D, E, R, N, V) {
      let z = t.coordsAtPos(D, D == x.to ? -2 : 2), W = t.coordsAtPos(R, R == x.from ? 2 : -2);
      !z || !W || (C = Math.min(z.top, W.top, C), T = Math.max(z.bottom, W.bottom, T), V == pn.LTR ? w.push(a && E ? f : z.left, a && N ? d : W.right) : w.push(!a && N ? f : W.left, !a && E ? d : z.right));
    }
    let $ = O ?? x.from, A = S ?? x.to;
    for (let D of t.visibleRanges)
      if (D.to > $ && D.from < A)
        for (let E = Math.max(D.from, $), R = Math.min(D.to, A); ; ) {
          let N = t.state.doc.lineAt(E);
          for (let V of t.bidiSpans(N)) {
            let z = V.from + N.from, W = V.to + N.from;
            if (z >= R)
              break;
            W > E && P(Math.max(z, E), O == null && z <= $, Math.min(W, R), S == null && W >= A, V.dir);
          }
          if (E = N.to + 1, E >= R)
            break;
        }
    return w.length == 0 && P($, O == null, A, S == null, t.textDirection), { top: C, bottom: T, horizontal: w };
  }
  function _(O, S) {
    let x = s.top + (S ? O.top : O.bottom);
    return { top: x, bottom: x, horizontal: [] };
  }
}
function lst(t, e) {
  return t.constructor == e.constructor && t.eq(e);
}
class ust {
  constructor(e, n) {
    this.view = e, this.layer = n, this.drawn = [], this.scaleX = 1, this.scaleY = 1, this.measureReq = { read: this.measure.bind(this), write: this.draw.bind(this) }, this.dom = e.scrollDOM.appendChild(document.createElement("div")), this.dom.classList.add("cm-layer"), n.above && this.dom.classList.add("cm-layer-above"), n.class && this.dom.classList.add(n.class), this.scale(), this.dom.setAttribute("aria-hidden", "true"), this.setOrder(e.state), e.requestMeasure(this.measureReq), n.mount && n.mount(this.dom, e);
  }
  update(e) {
    e.startState.facet(s1) != e.state.facet(s1) && this.setOrder(e.state), (this.layer.update(e, this.dom) || e.geometryChanged) && (this.scale(), e.view.requestMeasure(this.measureReq));
  }
  docViewUpdate(e) {
    this.layer.updateOnDocViewUpdate !== !1 && e.requestMeasure(this.measureReq);
  }
  setOrder(e) {
    let n = 0, r = e.facet(s1);
    for (; n < r.length && r[n] != this.layer; )
      n++;
    this.dom.style.zIndex = String((this.layer.above ? 150 : -1) - n);
  }
  measure() {
    return this.layer.markers(this.view);
  }
  scale() {
    let { scaleX: e, scaleY: n } = this.view;
    (e != this.scaleX || n != this.scaleY) && (this.scaleX = e, this.scaleY = n, this.dom.style.transform = `scale(${1 / e}, ${1 / n})`);
  }
  draw(e) {
    if (e.length != this.drawn.length || e.some((n, r) => !lst(n, this.drawn[r]))) {
      let n = this.dom.firstChild, r = 0;
      for (let i of e)
        i.update && n && i.constructor && this.drawn[r].constructor && i.update(n, this.drawn[r]) ? (n = n.nextSibling, r++) : this.dom.insertBefore(i.draw(), n);
      for (; n; ) {
        let i = n.nextSibling;
        n.remove(), n = i;
      }
      this.drawn = e;
    }
  }
  destroy() {
    this.layer.destroy && this.layer.destroy(this.dom, this.view), this.dom.remove();
  }
}
const s1 = /* @__PURE__ */ Be.define();
function boe(t) {
  return [
    kn.define((e) => new ust(e, t)),
    s1.of(t)
  ];
}
const _oe = !Ne.ios, Ym = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, {
      cursorBlinkRate: 1200,
      drawRangeCursor: !0
    }, {
      cursorBlinkRate: (e, n) => Math.min(e, n),
      drawRangeCursor: (e, n) => e || n
    });
  }
});
function cst(t = {}) {
  return [
    Ym.of(t),
    fst,
    dst,
    hst,
    Gae.of(!0)
  ];
}
function Ooe(t) {
  return t.startState.facet(Ym) != t.state.facet(Ym);
}
const fst = /* @__PURE__ */ boe({
  above: !0,
  markers(t) {
    let { state: e } = t, n = e.facet(Ym), r = [];
    for (let i of e.selection.ranges) {
      let a = i == e.selection.main;
      if (i.empty ? !a || _oe : n.drawRangeCursor) {
        let o = a ? "cm-cursor cm-cursor-primary" : "cm-cursor cm-cursor-secondary", s = i.empty ? i : me.cursor(i.head, i.head > i.anchor ? -1 : 1);
        for (let l of sy.forRange(t, o, s))
          r.push(l);
      }
    }
    return r;
  },
  update(t, e) {
    t.transactions.some((r) => r.selection) && (e.style.animationName = e.style.animationName == "cm-blink" ? "cm-blink2" : "cm-blink");
    let n = Ooe(t);
    return n && d9(t.state, e), t.docChanged || t.selectionSet || n;
  },
  mount(t, e) {
    d9(e.state, t);
  },
  class: "cm-cursorLayer"
});
function d9(t, e) {
  e.style.animationDuration = t.facet(Ym).cursorBlinkRate + "ms";
}
const dst = /* @__PURE__ */ boe({
  above: !1,
  markers(t) {
    return t.state.selection.ranges.map((e) => e.empty ? [] : sy.forRange(t, "cm-selectionBackground", e)).reduce((e, n) => e.concat(n));
  },
  update(t, e) {
    return t.docChanged || t.selectionSet || t.viewportChanged || Ooe(t);
  },
  class: "cm-selectionLayer"
}), DM = {
  ".cm-line": {
    "& ::selection, &::selection": { backgroundColor: "transparent !important" }
  },
  ".cm-content": {
    "& :focus": {
      caretColor: "initial !important",
      "&::selection, & ::selection": {
        backgroundColor: "Highlight !important"
      }
    }
  }
};
_oe && (DM[".cm-line"].caretColor = DM[".cm-content"].caretColor = "transparent !important");
const hst = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.theme(DM)), Soe = /* @__PURE__ */ dt.define({
  map(t, e) {
    return t == null ? null : e.mapPos(t);
  }
}), rg = /* @__PURE__ */ ur.define({
  create() {
    return null;
  },
  update(t, e) {
    return t != null && (t = e.changes.mapPos(t)), e.effects.reduce((n, r) => r.is(Soe) ? r.value : n, t);
  }
}), pst = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.view = t, this.cursor = null, this.measureReq = { read: this.readPos.bind(this), write: this.drawCursor.bind(this) };
  }
  update(t) {
    var e;
    let n = t.state.field(rg);
    n == null ? this.cursor != null && ((e = this.cursor) === null || e === void 0 || e.remove(), this.cursor = null) : (this.cursor || (this.cursor = this.view.scrollDOM.appendChild(document.createElement("div")), this.cursor.className = "cm-dropCursor"), (t.startState.field(rg) != n || t.docChanged || t.geometryChanged) && this.view.requestMeasure(this.measureReq));
  }
  readPos() {
    let { view: t } = this, e = t.state.field(rg), n = e != null && t.coordsAtPos(e);
    if (!n)
      return null;
    let r = t.scrollDOM.getBoundingClientRect();
    return {
      left: n.left - r.left + t.scrollDOM.scrollLeft * t.scaleX,
      top: n.top - r.top + t.scrollDOM.scrollTop * t.scaleY,
      height: n.bottom - n.top
    };
  }
  drawCursor(t) {
    if (this.cursor) {
      let { scaleX: e, scaleY: n } = this.view;
      t ? (this.cursor.style.left = t.left / e + "px", this.cursor.style.top = t.top / n + "px", this.cursor.style.height = t.height / n + "px") : this.cursor.style.left = "-100000px";
    }
  }
  destroy() {
    this.cursor && this.cursor.remove();
  }
  setDropPos(t) {
    this.view.state.field(rg) != t && this.view.dispatch({ effects: Soe.of(t) });
  }
}, {
  eventObservers: {
    dragover(t) {
      this.setDropPos(this.view.posAtCoords({ x: t.clientX, y: t.clientY }));
    },
    dragleave(t) {
      (t.target == this.view.contentDOM || !this.view.contentDOM.contains(t.relatedTarget)) && this.setDropPos(null);
    },
    dragend() {
      this.setDropPos(null);
    },
    drop() {
      this.setDropPos(null);
    }
  }
});
function vst() {
  return [rg, pst];
}
function h9(t, e, n, r, i) {
  e.lastIndex = 0;
  for (let a = t.iterRange(n, r), o = n, s; !a.next().done; o += a.value.length)
    if (!a.lineBreak)
      for (; s = e.exec(a.value); )
        i(o + s.index, s);
}
function gst(t, e) {
  let n = t.visibleRanges;
  if (n.length == 1 && n[0].from == t.viewport.from && n[0].to == t.viewport.to)
    return n;
  let r = [];
  for (let { from: i, to: a } of n)
    i = Math.max(t.state.doc.lineAt(i).from, i - e), a = Math.min(t.state.doc.lineAt(a).to, a + e), r.length && r[r.length - 1].to >= i ? r[r.length - 1].to = a : r.push({ from: i, to: a });
  return r;
}
class mst {
  /**
  Create a decorator.
  */
  constructor(e) {
    const { regexp: n, decoration: r, decorate: i, boundary: a, maxLength: o = 1e3 } = e;
    if (!n.global)
      throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");
    if (this.regexp = n, i)
      this.addMatch = (s, l, u, c) => i(c, u, u + s[0].length, s, l);
    else if (typeof r == "function")
      this.addMatch = (s, l, u, c) => {
        let f = r(s, l, u);
        f && c(u, u + s[0].length, f);
      };
    else if (r)
      this.addMatch = (s, l, u, c) => c(u, u + s[0].length, r);
    else
      throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");
    this.boundary = a, this.maxLength = o;
  }
  /**
  Compute the full set of decorations for matches in the given
  view's viewport. You'll want to call this when initializing your
  plugin.
  */
  createDeco(e) {
    let n = new hu(), r = n.add.bind(n);
    for (let { from: i, to: a } of gst(e, this.maxLength))
      h9(e.state.doc, this.regexp, i, a, (o, s) => this.addMatch(s, e, o, r));
    return n.finish();
  }
  /**
  Update a set of decorations for a view update. `deco` _must_ be
  the set of decorations produced by _this_ `MatchDecorator` for
  the view state before the update.
  */
  updateDeco(e, n) {
    let r = 1e9, i = -1;
    return e.docChanged && e.changes.iterChanges((a, o, s, l) => {
      l > e.view.viewport.from && s < e.view.viewport.to && (r = Math.min(s, r), i = Math.max(l, i));
    }), e.viewportChanged || i - r > 1e3 ? this.createDeco(e.view) : i > -1 ? this.updateRange(e.view, n.map(e.changes), r, i) : n;
  }
  updateRange(e, n, r, i) {
    for (let a of e.visibleRanges) {
      let o = Math.max(a.from, r), s = Math.min(a.to, i);
      if (s > o) {
        let l = e.state.doc.lineAt(o), u = l.to < s ? e.state.doc.lineAt(s) : l, c = Math.max(a.from, l.from), f = Math.min(a.to, u.to);
        if (this.boundary) {
          for (; o > l.from; o--)
            if (this.boundary.test(l.text[o - 1 - l.from])) {
              c = o;
              break;
            }
          for (; s < u.to; s++)
            if (this.boundary.test(u.text[s - u.from])) {
              f = s;
              break;
            }
        }
        let d = [], h, p = (v, g, m) => d.push(m.range(v, g));
        if (l == u)
          for (this.regexp.lastIndex = c - l.from; (h = this.regexp.exec(l.text)) && h.index < f - l.from; )
            this.addMatch(h, e, h.index + l.from, p);
        else
          h9(e.state.doc, this.regexp, c, f, (v, g) => this.addMatch(g, e, v, p));
        n = n.update({ filterFrom: c, filterTo: f, filter: (v, g) => v < c || g > f, add: d });
      }
    }
    return n;
  }
}
const RM = /x/.unicode != null ? "gu" : "g", yst = /* @__PURE__ */ new RegExp(`[\0-\b
--­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF￹-￼]`, RM), bst = {
  0: "null",
  7: "bell",
  8: "backspace",
  10: "newline",
  11: "vertical tab",
  13: "carriage return",
  27: "escape",
  8203: "zero width space",
  8204: "zero width non-joiner",
  8205: "zero width joiner",
  8206: "left-to-right mark",
  8207: "right-to-left mark",
  8232: "line separator",
  8237: "left-to-right override",
  8238: "right-to-left override",
  8294: "left-to-right isolate",
  8295: "right-to-left isolate",
  8297: "pop directional isolate",
  8233: "paragraph separator",
  65279: "zero width no-break space",
  65532: "object replacement"
};
let O$ = null;
function _st() {
  var t;
  if (O$ == null && typeof document < "u" && document.body) {
    let e = document.body.style;
    O$ = ((t = e.tabSize) !== null && t !== void 0 ? t : e.MozTabSize) != null;
  }
  return O$ || !1;
}
const l1 = /* @__PURE__ */ Be.define({
  combine(t) {
    let e = fs(t, {
      render: null,
      specialChars: yst,
      addSpecialChars: null
    });
    return (e.replaceTabs = !_st()) && (e.specialChars = new RegExp("	|" + e.specialChars.source, RM)), e.addSpecialChars && (e.specialChars = new RegExp(e.specialChars.source + "|" + e.addSpecialChars.source, RM)), e;
  }
});
function Ost(t = {}) {
  return [l1.of(t), Sst()];
}
let p9 = null;
function Sst() {
  return p9 || (p9 = kn.fromClass(class {
    constructor(t) {
      this.view = t, this.decorations = Ze.none, this.decorationCache = /* @__PURE__ */ Object.create(null), this.decorator = this.makeDecorator(t.state.facet(l1)), this.decorations = this.decorator.createDeco(t);
    }
    makeDecorator(t) {
      return new mst({
        regexp: t.specialChars,
        decoration: (e, n, r) => {
          let { doc: i } = n.state, a = gr(e[0], 0);
          if (a == 9) {
            let o = i.lineAt(r), s = n.state.tabSize, l = Rp(o.text, s, r - o.from);
            return Ze.replace({
              widget: new Tst((s - l % s) * this.view.defaultCharacterWidth / this.view.scaleX)
            });
          }
          return this.decorationCache[a] || (this.decorationCache[a] = Ze.replace({ widget: new Cst(t, a) }));
        },
        boundary: t.replaceTabs ? void 0 : /[^]/
      });
    }
    update(t) {
      let e = t.state.facet(l1);
      t.startState.facet(l1) != e ? (this.decorator = this.makeDecorator(e), this.decorations = this.decorator.createDeco(t.view)) : this.decorations = this.decorator.updateDeco(t, this.decorations);
    }
  }, {
    decorations: (t) => t.decorations
  }));
}
const xst = "•";
function wst(t) {
  return t >= 32 ? xst : t == 10 ? "␤" : String.fromCharCode(9216 + t);
}
class Cst extends ds {
  constructor(e, n) {
    super(), this.options = e, this.code = n;
  }
  eq(e) {
    return e.code == this.code;
  }
  toDOM(e) {
    let n = wst(this.code), r = e.state.phrase("Control character") + " " + (bst[this.code] || "0x" + this.code.toString(16)), i = this.options.render && this.options.render(this.code, r, n);
    if (i)
      return i;
    let a = document.createElement("span");
    return a.textContent = n, a.title = r, a.setAttribute("aria-label", r), a.className = "cm-specialChar", a;
  }
  ignoreEvent() {
    return !1;
  }
}
class Tst extends ds {
  constructor(e) {
    super(), this.width = e;
  }
  eq(e) {
    return e.width == this.width;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.textContent = "	", e.className = "cm-tab", e.style.width = this.width + "px", e;
  }
  ignoreEvent() {
    return !1;
  }
}
function Pst() {
  return Ast;
}
const $st = /* @__PURE__ */ Ze.line({ class: "cm-activeLine" }), Ast = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.docChanged || t.selectionSet) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = -1, n = [];
    for (let r of t.state.selection.ranges) {
      let i = t.lineBlockAt(r.head);
      i.from > e && (n.push($st.range(i.from)), e = i.from);
    }
    return Ze.set(n);
  }
}, {
  decorations: (t) => t.decorations
});
class Est extends ds {
  constructor(e) {
    super(), this.content = e;
  }
  toDOM() {
    let e = document.createElement("span");
    return e.className = "cm-placeholder", e.style.pointerEvents = "none", e.appendChild(typeof this.content == "string" ? document.createTextNode(this.content) : this.content), typeof this.content == "string" ? e.setAttribute("aria-label", "placeholder " + this.content) : e.setAttribute("aria-hidden", "true"), e;
  }
  coordsAt(e) {
    let n = e.firstChild ? Uh(e.firstChild) : [];
    if (!n.length)
      return null;
    let r = window.getComputedStyle(e.parentNode), i = Iw(n[0], r.direction != "rtl"), a = parseInt(r.lineHeight);
    return i.bottom - i.top > a * 1.5 ? { left: i.left, right: i.right, top: i.top, bottom: i.top + a } : i;
  }
  ignoreEvent() {
    return !1;
  }
}
function Mst(t) {
  return kn.fromClass(class {
    constructor(e) {
      this.view = e, this.placeholder = t ? Ze.set([Ze.widget({ widget: new Est(t), side: 1 }).range(0)]) : Ze.none;
    }
    get decorations() {
      return this.view.state.doc.length ? Ze.none : this.placeholder;
    }
  }, { decorations: (e) => e.decorations });
}
const kM = 2e3;
function Ist(t, e, n) {
  let r = Math.min(e.line, n.line), i = Math.max(e.line, n.line), a = [];
  if (e.off > kM || n.off > kM || e.col < 0 || n.col < 0) {
    let o = Math.min(e.off, n.off), s = Math.max(e.off, n.off);
    for (let l = r; l <= i; l++) {
      let u = t.doc.line(l);
      u.length <= s && a.push(me.range(u.from + o, u.to + s));
    }
  } else {
    let o = Math.min(e.col, n.col), s = Math.max(e.col, n.col);
    for (let l = r; l <= i; l++) {
      let u = t.doc.line(l), c = dM(u.text, o, t.tabSize, !0);
      if (c < 0)
        a.push(me.cursor(u.to));
      else {
        let f = dM(u.text, s, t.tabSize);
        a.push(me.range(u.from + c, u.from + f));
      }
    }
  }
  return a;
}
function Dst(t, e) {
  let n = t.coordsAtPos(t.viewport.from);
  return n ? Math.round(Math.abs((n.left - e) / t.defaultCharacterWidth)) : -1;
}
function v9(t, e) {
  let n = t.posAtCoords({ x: e.clientX, y: e.clientY }, !1), r = t.state.doc.lineAt(n), i = n - r.from, a = i > kM ? -1 : i == r.length ? Dst(t, e.clientX) : Rp(r.text, t.state.tabSize, n - r.from);
  return { line: r.number, col: a, off: i };
}
function Rst(t, e) {
  let n = v9(t, e), r = t.state.selection;
  return n ? {
    update(i) {
      if (i.docChanged) {
        let a = i.changes.mapPos(i.startState.doc.line(n.line).from), o = i.state.doc.lineAt(a);
        n = { line: o.number, col: n.col, off: Math.min(n.off, o.length) }, r = r.map(i.changes);
      }
    },
    get(i, a, o) {
      let s = v9(t, i);
      if (!s)
        return r;
      let l = Ist(t.state, n, s);
      return l.length ? o ? me.create(l.concat(r.ranges)) : me.create(l) : r;
    }
  } : null;
}
function kst(t) {
  let e = (n) => n.altKey && n.button == 0;
  return De.mouseSelectionStyle.of((n, r) => e(r) ? Rst(n, r) : null);
}
const Lst = {
  Alt: [18, (t) => !!t.altKey],
  Control: [17, (t) => !!t.ctrlKey],
  Shift: [16, (t) => !!t.shiftKey],
  Meta: [91, (t) => !!t.metaKey]
}, Nst = { style: "cursor: crosshair" };
function Bst(t = {}) {
  let [e, n] = Lst[t.key || "Alt"], r = kn.fromClass(class {
    constructor(i) {
      this.view = i, this.isDown = !1;
    }
    set(i) {
      this.isDown != i && (this.isDown = i, this.view.update([]));
    }
  }, {
    eventObservers: {
      keydown(i) {
        this.set(i.keyCode == e || n(i));
      },
      keyup(i) {
        (i.keyCode == e || !n(i)) && this.set(!1);
      },
      mousemove(i) {
        this.set(n(i));
      }
    }
  });
  return [
    r,
    De.contentAttributes.of((i) => {
      var a;
      return !((a = i.plugin(r)) === null || a === void 0) && a.isDown ? Nst : null;
    })
  ];
}
const Av = "-10000px";
class xoe {
  constructor(e, n, r, i) {
    this.facet = n, this.createTooltipView = r, this.removeTooltipView = i, this.input = e.state.facet(n), this.tooltips = this.input.filter((o) => o);
    let a = null;
    this.tooltipViews = this.tooltips.map((o) => a = r(o, a));
  }
  update(e, n) {
    var r;
    let i = e.state.facet(this.facet), a = i.filter((l) => l);
    if (i === this.input) {
      for (let l of this.tooltipViews)
        l.update && l.update(e);
      return !1;
    }
    let o = [], s = n ? [] : null;
    for (let l = 0; l < a.length; l++) {
      let u = a[l], c = -1;
      if (u) {
        for (let f = 0; f < this.tooltips.length; f++) {
          let d = this.tooltips[f];
          d && d.create == u.create && (c = f);
        }
        if (c < 0)
          o[l] = this.createTooltipView(u, l ? o[l - 1] : null), s && (s[l] = !!u.above);
        else {
          let f = o[l] = this.tooltipViews[c];
          s && (s[l] = n[c]), f.update && f.update(e);
        }
      }
    }
    for (let l of this.tooltipViews)
      o.indexOf(l) < 0 && (this.removeTooltipView(l), (r = l.destroy) === null || r === void 0 || r.call(l));
    return n && (s.forEach((l, u) => n[u] = l), n.length = s.length), this.input = i, this.tooltips = a, this.tooltipViews = o, !0;
  }
}
function zst(t) {
  let { win: e } = t;
  return { top: 0, left: 0, bottom: e.innerHeight, right: e.innerWidth };
}
const S$ = /* @__PURE__ */ Be.define({
  combine: (t) => {
    var e, n, r;
    return {
      position: Ne.ios ? "absolute" : ((e = t.find((i) => i.position)) === null || e === void 0 ? void 0 : e.position) || "fixed",
      parent: ((n = t.find((i) => i.parent)) === null || n === void 0 ? void 0 : n.parent) || null,
      tooltipSpace: ((r = t.find((i) => i.tooltipSpace)) === null || r === void 0 ? void 0 : r.tooltipSpace) || zst
    };
  }
}), g9 = /* @__PURE__ */ new WeakMap(), l4 = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.view = t, this.above = [], this.inView = !0, this.madeAbsolute = !1, this.lastTransaction = 0, this.measureTimeout = -1;
    let e = t.state.facet(S$);
    this.position = e.position, this.parent = e.parent, this.classes = t.themeClasses, this.createContainer(), this.measureReq = { read: this.readMeasure.bind(this), write: this.writeMeasure.bind(this), key: this }, this.resizeObserver = typeof ResizeObserver == "function" ? new ResizeObserver(() => this.measureSoon()) : null, this.manager = new xoe(t, u4, (n, r) => this.createTooltip(n, r), (n) => {
      this.resizeObserver && this.resizeObserver.unobserve(n.dom), n.dom.remove();
    }), this.above = this.manager.tooltips.map((n) => !!n.above), this.intersectionObserver = typeof IntersectionObserver == "function" ? new IntersectionObserver((n) => {
      Date.now() > this.lastTransaction - 50 && n.length > 0 && n[n.length - 1].intersectionRatio < 1 && this.measureSoon();
    }, { threshold: [1] }) : null, this.observeIntersection(), t.win.addEventListener("resize", this.measureSoon = this.measureSoon.bind(this)), this.maybeMeasure();
  }
  createContainer() {
    this.parent ? (this.container = document.createElement("div"), this.container.style.position = "relative", this.container.className = this.view.themeClasses, this.parent.appendChild(this.container)) : this.container = this.view.dom;
  }
  observeIntersection() {
    if (this.intersectionObserver) {
      this.intersectionObserver.disconnect();
      for (let t of this.manager.tooltipViews)
        this.intersectionObserver.observe(t.dom);
    }
  }
  measureSoon() {
    this.measureTimeout < 0 && (this.measureTimeout = setTimeout(() => {
      this.measureTimeout = -1, this.maybeMeasure();
    }, 50));
  }
  update(t) {
    t.transactions.length && (this.lastTransaction = Date.now());
    let e = this.manager.update(t, this.above);
    e && this.observeIntersection();
    let n = e || t.geometryChanged, r = t.state.facet(S$);
    if (r.position != this.position && !this.madeAbsolute) {
      this.position = r.position;
      for (let i of this.manager.tooltipViews)
        i.dom.style.position = this.position;
      n = !0;
    }
    if (r.parent != this.parent) {
      this.parent && this.container.remove(), this.parent = r.parent, this.createContainer();
      for (let i of this.manager.tooltipViews)
        this.container.appendChild(i.dom);
      n = !0;
    } else this.parent && this.view.themeClasses != this.classes && (this.classes = this.container.className = this.view.themeClasses);
    n && this.maybeMeasure();
  }
  createTooltip(t, e) {
    let n = t.create(this.view), r = e ? e.dom : null;
    if (n.dom.classList.add("cm-tooltip"), t.arrow && !n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
      let i = document.createElement("div");
      i.className = "cm-tooltip-arrow", n.dom.appendChild(i);
    }
    return n.dom.style.position = this.position, n.dom.style.top = Av, n.dom.style.left = "0px", this.container.insertBefore(n.dom, r), n.mount && n.mount(this.view), this.resizeObserver && this.resizeObserver.observe(n.dom), n;
  }
  destroy() {
    var t, e, n;
    this.view.win.removeEventListener("resize", this.measureSoon);
    for (let r of this.manager.tooltipViews)
      r.dom.remove(), (t = r.destroy) === null || t === void 0 || t.call(r);
    this.parent && this.container.remove(), (e = this.resizeObserver) === null || e === void 0 || e.disconnect(), (n = this.intersectionObserver) === null || n === void 0 || n.disconnect(), clearTimeout(this.measureTimeout);
  }
  readMeasure() {
    let t = this.view.dom.getBoundingClientRect(), e = 1, n = 1, r = !1;
    if (this.position == "fixed" && this.manager.tooltipViews.length) {
      let { dom: i } = this.manager.tooltipViews[0];
      if (Ne.gecko)
        r = i.offsetParent != this.container.ownerDocument.body;
      else if (i.style.top == Av && i.style.left == "0px") {
        let a = i.getBoundingClientRect();
        r = Math.abs(a.top + 1e4) > 1 || Math.abs(a.left) > 1;
      }
    }
    if (r || this.position == "absolute")
      if (this.parent) {
        let i = this.parent.getBoundingClientRect();
        i.width && i.height && (e = i.width / this.parent.offsetWidth, n = i.height / this.parent.offsetHeight);
      } else
        ({ scaleX: e, scaleY: n } = this.view.viewState);
    return {
      editor: t,
      parent: this.parent ? this.container.getBoundingClientRect() : t,
      pos: this.manager.tooltips.map((i, a) => {
        let o = this.manager.tooltipViews[a];
        return o.getCoords ? o.getCoords(i.pos) : this.view.coordsAtPos(i.pos);
      }),
      size: this.manager.tooltipViews.map(({ dom: i }) => i.getBoundingClientRect()),
      space: this.view.state.facet(S$).tooltipSpace(this.view),
      scaleX: e,
      scaleY: n,
      makeAbsolute: r
    };
  }
  writeMeasure(t) {
    var e;
    if (t.makeAbsolute) {
      this.madeAbsolute = !0, this.position = "absolute";
      for (let s of this.manager.tooltipViews)
        s.dom.style.position = "absolute";
    }
    let { editor: n, space: r, scaleX: i, scaleY: a } = t, o = [];
    for (let s = 0; s < this.manager.tooltips.length; s++) {
      let l = this.manager.tooltips[s], u = this.manager.tooltipViews[s], { dom: c } = u, f = t.pos[s], d = t.size[s];
      if (!f || f.bottom <= Math.max(n.top, r.top) || f.top >= Math.min(n.bottom, r.bottom) || f.right < Math.max(n.left, r.left) - 0.1 || f.left > Math.min(n.right, r.right) + 0.1) {
        c.style.top = Av;
        continue;
      }
      let h = l.arrow ? u.dom.querySelector(".cm-tooltip-arrow") : null, p = h ? 7 : 0, v = d.right - d.left, g = (e = g9.get(u)) !== null && e !== void 0 ? e : d.bottom - d.top, m = u.offset || Fst, y = this.view.textDirection == pn.LTR, b = d.width > r.right - r.left ? y ? r.left : r.right - d.width : y ? Math.min(f.left - (h ? 14 : 0) + m.x, r.right - v) : Math.max(r.left, f.left - v + (h ? 14 : 0) - m.x), _ = this.above[s];
      !l.strictSide && (_ ? f.top - (d.bottom - d.top) - m.y < r.top : f.bottom + (d.bottom - d.top) + m.y > r.bottom) && _ == r.bottom - f.bottom > f.top - r.top && (_ = this.above[s] = !_);
      let O = (_ ? f.top - r.top : r.bottom - f.bottom) - p;
      if (O < g && u.resize !== !1) {
        if (O < this.view.defaultLineHeight) {
          c.style.top = Av;
          continue;
        }
        g9.set(u, g), c.style.height = (g = O) / a + "px";
      } else c.style.height && (c.style.height = "");
      let S = _ ? f.top - g - p - m.y : f.bottom + p + m.y, x = b + v;
      if (u.overlap !== !0)
        for (let C of o)
          C.left < x && C.right > b && C.top < S + g && C.bottom > S && (S = _ ? C.top - g - 2 - p : C.bottom + p + 2);
      if (this.position == "absolute" ? (c.style.top = (S - t.parent.top) / a + "px", c.style.left = (b - t.parent.left) / i + "px") : (c.style.top = S / a + "px", c.style.left = b / i + "px"), h) {
        let C = f.left + (y ? m.x : -m.x) - (b + 14 - 7);
        h.style.left = C / i + "px";
      }
      u.overlap !== !0 && o.push({ left: b, top: S, right: x, bottom: S + g }), c.classList.toggle("cm-tooltip-above", _), c.classList.toggle("cm-tooltip-below", !_), u.positioned && u.positioned(t.space);
    }
  }
  maybeMeasure() {
    if (this.manager.tooltips.length && (this.view.inView && this.view.requestMeasure(this.measureReq), this.inView != this.view.inView && (this.inView = this.view.inView, !this.inView)))
      for (let t of this.manager.tooltipViews)
        t.dom.style.top = Av;
  }
}, {
  eventObservers: {
    scroll() {
      this.maybeMeasure();
    }
  }
}), Vst = /* @__PURE__ */ De.baseTheme({
  ".cm-tooltip": {
    zIndex: 100,
    boxSizing: "border-box"
  },
  "&light .cm-tooltip": {
    border: "1px solid #bbb",
    backgroundColor: "#f5f5f5"
  },
  "&light .cm-tooltip-section:not(:first-child)": {
    borderTop: "1px solid #bbb"
  },
  "&dark .cm-tooltip": {
    backgroundColor: "#333338",
    color: "white"
  },
  ".cm-tooltip-arrow": {
    height: "7px",
    width: `${7 * 2}px`,
    position: "absolute",
    zIndex: -1,
    overflow: "hidden",
    "&:before, &:after": {
      content: "''",
      position: "absolute",
      width: 0,
      height: 0,
      borderLeft: "7px solid transparent",
      borderRight: "7px solid transparent"
    },
    ".cm-tooltip-above &": {
      bottom: "-7px",
      "&:before": {
        borderTop: "7px solid #bbb"
      },
      "&:after": {
        borderTop: "7px solid #f5f5f5",
        bottom: "1px"
      }
    },
    ".cm-tooltip-below &": {
      top: "-7px",
      "&:before": {
        borderBottom: "7px solid #bbb"
      },
      "&:after": {
        borderBottom: "7px solid #f5f5f5",
        top: "1px"
      }
    }
  },
  "&dark .cm-tooltip .cm-tooltip-arrow": {
    "&:before": {
      borderTopColor: "#333338",
      borderBottomColor: "#333338"
    },
    "&:after": {
      borderTopColor: "transparent",
      borderBottomColor: "transparent"
    }
  }
}), Fst = { x: 0, y: 0 }, u4 = /* @__PURE__ */ Be.define({
  enables: [l4, Vst]
}), oS = /* @__PURE__ */ Be.define({
  combine: (t) => t.reduce((e, n) => e.concat(n), [])
});
class Rw {
  // Needs to be static so that host tooltip instances always match
  static create(e) {
    return new Rw(e);
  }
  constructor(e) {
    this.view = e, this.mounted = !1, this.dom = document.createElement("div"), this.dom.classList.add("cm-tooltip-hover"), this.manager = new xoe(e, oS, (n, r) => this.createHostedView(n, r), (n) => n.dom.remove());
  }
  createHostedView(e, n) {
    let r = e.create(this.view);
    return r.dom.classList.add("cm-tooltip-section"), this.dom.insertBefore(r.dom, n ? n.dom.nextSibling : this.dom.firstChild), this.mounted && r.mount && r.mount(this.view), r;
  }
  mount(e) {
    for (let n of this.manager.tooltipViews)
      n.mount && n.mount(e);
    this.mounted = !0;
  }
  positioned(e) {
    for (let n of this.manager.tooltipViews)
      n.positioned && n.positioned(e);
  }
  update(e) {
    this.manager.update(e);
  }
  destroy() {
    var e;
    for (let n of this.manager.tooltipViews)
      (e = n.destroy) === null || e === void 0 || e.call(n);
  }
  passProp(e) {
    let n;
    for (let r of this.manager.tooltipViews) {
      let i = r[e];
      if (i !== void 0) {
        if (n === void 0)
          n = i;
        else if (n !== i)
          return;
      }
    }
    return n;
  }
  get offset() {
    return this.passProp("offset");
  }
  get getCoords() {
    return this.passProp("getCoords");
  }
  get overlap() {
    return this.passProp("overlap");
  }
  get resize() {
    return this.passProp("resize");
  }
}
const Wst = /* @__PURE__ */ u4.compute([oS], (t) => {
  let e = t.facet(oS);
  return e.length === 0 ? null : {
    pos: Math.min(...e.map((n) => n.pos)),
    end: Math.max(...e.map((n) => {
      var r;
      return (r = n.end) !== null && r !== void 0 ? r : n.pos;
    })),
    create: Rw.create,
    above: e[0].above,
    arrow: e.some((n) => n.arrow)
  };
});
class Qst {
  constructor(e, n, r, i, a) {
    this.view = e, this.source = n, this.field = r, this.setHover = i, this.hoverTime = a, this.hoverTimeout = -1, this.restartTimeout = -1, this.pending = null, this.lastMove = { x: 0, y: 0, target: e.dom, time: 0 }, this.checkHover = this.checkHover.bind(this), e.dom.addEventListener("mouseleave", this.mouseleave = this.mouseleave.bind(this)), e.dom.addEventListener("mousemove", this.mousemove = this.mousemove.bind(this));
  }
  update() {
    this.pending && (this.pending = null, clearTimeout(this.restartTimeout), this.restartTimeout = setTimeout(() => this.startHover(), 20));
  }
  get active() {
    return this.view.state.field(this.field);
  }
  checkHover() {
    if (this.hoverTimeout = -1, this.active.length)
      return;
    let e = Date.now() - this.lastMove.time;
    e < this.hoverTime ? this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime - e) : this.startHover();
  }
  startHover() {
    clearTimeout(this.restartTimeout);
    let { view: e, lastMove: n } = this, r = e.docView.nearest(n.target);
    if (!r)
      return;
    let i, a = 1;
    if (r instanceof Ql)
      i = r.posAtStart;
    else {
      if (i = e.posAtCoords(n), i == null)
        return;
      let s = e.coordsAtPos(i);
      if (!s || n.y < s.top || n.y > s.bottom || n.x < s.left - e.defaultCharacterWidth || n.x > s.right + e.defaultCharacterWidth)
        return;
      let l = e.bidiSpans(e.state.doc.lineAt(i)).find((c) => c.from <= i && c.to >= i), u = l && l.dir == pn.RTL ? -1 : 1;
      a = n.x < s.left ? -u : u;
    }
    let o = this.source(e, i, a);
    if (o != null && o.then) {
      let s = this.pending = { pos: i };
      o.then((l) => {
        this.pending == s && (this.pending = null, l && !(Array.isArray(l) && !l.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(l) ? l : [l]) }));
      }, (l) => mi(e.state, l, "hover tooltip"));
    } else o && !(Array.isArray(o) && !o.length) && e.dispatch({ effects: this.setHover.of(Array.isArray(o) ? o : [o]) });
  }
  get tooltip() {
    let e = this.view.plugin(l4), n = e ? e.manager.tooltips.findIndex((r) => r.create == Rw.create) : -1;
    return n > -1 ? e.manager.tooltipViews[n] : null;
  }
  mousemove(e) {
    var n, r;
    this.lastMove = { x: e.clientX, y: e.clientY, target: e.target, time: Date.now() }, this.hoverTimeout < 0 && (this.hoverTimeout = setTimeout(this.checkHover, this.hoverTime));
    let { active: i, tooltip: a } = this;
    if (i.length && a && !Hst(a.dom, e) || this.pending) {
      let { pos: o } = i[0] || this.pending, s = (r = (n = i[0]) === null || n === void 0 ? void 0 : n.end) !== null && r !== void 0 ? r : o;
      (o == s ? this.view.posAtCoords(this.lastMove) != o : !Gst(this.view, o, s, e.clientX, e.clientY)) && (this.view.dispatch({ effects: this.setHover.of([]) }), this.pending = null);
    }
  }
  mouseleave(e) {
    clearTimeout(this.hoverTimeout), this.hoverTimeout = -1;
    let { active: n } = this;
    if (n.length) {
      let { tooltip: r } = this;
      r && r.dom.contains(e.relatedTarget) ? this.watchTooltipLeave(r.dom) : this.view.dispatch({ effects: this.setHover.of([]) });
    }
  }
  watchTooltipLeave(e) {
    let n = (r) => {
      e.removeEventListener("mouseleave", n), this.active.length && !this.view.dom.contains(r.relatedTarget) && this.view.dispatch({ effects: this.setHover.of([]) });
    };
    e.addEventListener("mouseleave", n);
  }
  destroy() {
    clearTimeout(this.hoverTimeout), this.view.dom.removeEventListener("mouseleave", this.mouseleave), this.view.dom.removeEventListener("mousemove", this.mousemove);
  }
}
const e_ = 4;
function Hst(t, e) {
  let n = t.getBoundingClientRect();
  return e.clientX >= n.left - e_ && e.clientX <= n.right + e_ && e.clientY >= n.top - e_ && e.clientY <= n.bottom + e_;
}
function Gst(t, e, n, r, i, a) {
  let o = t.scrollDOM.getBoundingClientRect(), s = t.documentTop + t.documentPadding.top + t.contentHeight;
  if (o.left > r || o.right < r || o.top > i || Math.min(o.bottom, s) < i)
    return !1;
  let l = t.posAtCoords({ x: r, y: i }, !1);
  return l >= e && l <= n;
}
function jst(t, e = {}) {
  let n = dt.define(), r = ur.define({
    create() {
      return [];
    },
    update(i, a) {
      if (i.length && (e.hideOnChange && (a.docChanged || a.selection) ? i = [] : e.hideOn && (i = i.filter((o) => !e.hideOn(a, o))), a.docChanged)) {
        let o = [];
        for (let s of i) {
          let l = a.changes.mapPos(s.pos, -1, yr.TrackDel);
          if (l != null) {
            let u = Object.assign(/* @__PURE__ */ Object.create(null), s);
            u.pos = l, u.end != null && (u.end = a.changes.mapPos(u.end)), o.push(u);
          }
        }
        i = o;
      }
      for (let o of a.effects)
        o.is(n) && (i = o.value), o.is(Zst) && (i = []);
      return i;
    },
    provide: (i) => oS.from(i)
  });
  return [
    r,
    kn.define((i) => new Qst(
      i,
      t,
      r,
      n,
      e.hoverTime || 300
      /* Hover.Time */
    )),
    Wst
  ];
}
function woe(t, e) {
  let n = t.plugin(l4);
  if (!n)
    return null;
  let r = n.manager.tooltips.indexOf(e);
  return r < 0 ? null : n.manager.tooltipViews[r];
}
const Zst = /* @__PURE__ */ dt.define(), m9 = /* @__PURE__ */ Be.define({
  combine(t) {
    let e, n;
    for (let r of t)
      e = e || r.topContainer, n = n || r.bottomContainer;
    return { topContainer: e, bottomContainer: n };
  }
});
function qm(t, e) {
  let n = t.plugin(Coe), r = n ? n.specs.indexOf(e) : -1;
  return r > -1 ? n.panels[r] : null;
}
const Coe = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.input = t.state.facet(Km), this.specs = this.input.filter((n) => n), this.panels = this.specs.map((n) => n(t));
    let e = t.state.facet(m9);
    this.top = new t_(t, !0, e.topContainer), this.bottom = new t_(t, !1, e.bottomContainer), this.top.sync(this.panels.filter((n) => n.top)), this.bottom.sync(this.panels.filter((n) => !n.top));
    for (let n of this.panels)
      n.dom.classList.add("cm-panel"), n.mount && n.mount();
  }
  update(t) {
    let e = t.state.facet(m9);
    this.top.container != e.topContainer && (this.top.sync([]), this.top = new t_(t.view, !0, e.topContainer)), this.bottom.container != e.bottomContainer && (this.bottom.sync([]), this.bottom = new t_(t.view, !1, e.bottomContainer)), this.top.syncClasses(), this.bottom.syncClasses();
    let n = t.state.facet(Km);
    if (n != this.input) {
      let r = n.filter((l) => l), i = [], a = [], o = [], s = [];
      for (let l of r) {
        let u = this.specs.indexOf(l), c;
        u < 0 ? (c = l(t.view), s.push(c)) : (c = this.panels[u], c.update && c.update(t)), i.push(c), (c.top ? a : o).push(c);
      }
      this.specs = r, this.panels = i, this.top.sync(a), this.bottom.sync(o);
      for (let l of s)
        l.dom.classList.add("cm-panel"), l.mount && l.mount();
    } else
      for (let r of this.panels)
        r.update && r.update(t);
  }
  destroy() {
    this.top.sync([]), this.bottom.sync([]);
  }
}, {
  provide: (t) => De.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return n && { top: n.top.scrollMargin(), bottom: n.bottom.scrollMargin() };
  })
});
class t_ {
  constructor(e, n, r) {
    this.view = e, this.top = n, this.container = r, this.dom = void 0, this.classes = "", this.panels = [], this.syncClasses();
  }
  sync(e) {
    for (let n of this.panels)
      n.destroy && e.indexOf(n) < 0 && n.destroy();
    this.panels = e, this.syncDOM();
  }
  syncDOM() {
    if (this.panels.length == 0) {
      this.dom && (this.dom.remove(), this.dom = void 0);
      return;
    }
    if (!this.dom) {
      this.dom = document.createElement("div"), this.dom.className = this.top ? "cm-panels cm-panels-top" : "cm-panels cm-panels-bottom", this.dom.style[this.top ? "top" : "bottom"] = "0";
      let n = this.container || this.view.dom;
      n.insertBefore(this.dom, this.top ? n.firstChild : null);
    }
    let e = this.dom.firstChild;
    for (let n of this.panels)
      if (n.dom.parentNode == this.dom) {
        for (; e != n.dom; )
          e = y9(e);
        e = e.nextSibling;
      } else
        this.dom.insertBefore(n.dom, e);
    for (; e; )
      e = y9(e);
  }
  scrollMargin() {
    return !this.dom || this.container ? 0 : Math.max(0, this.top ? this.dom.getBoundingClientRect().bottom - Math.max(0, this.view.scrollDOM.getBoundingClientRect().top) : Math.min(innerHeight, this.view.scrollDOM.getBoundingClientRect().bottom) - this.dom.getBoundingClientRect().top);
  }
  syncClasses() {
    if (!(!this.container || this.classes == this.view.themeClasses)) {
      for (let e of this.classes.split(" "))
        e && this.container.classList.remove(e);
      for (let e of (this.classes = this.view.themeClasses).split(" "))
        e && this.container.classList.add(e);
    }
  }
}
function y9(t) {
  let e = t.nextSibling;
  return t.remove(), e;
}
const Km = /* @__PURE__ */ Be.define({
  enables: Coe
});
class tl extends wf {
  /**
  @internal
  */
  compare(e) {
    return this == e || this.constructor == e.constructor && this.eq(e);
  }
  /**
  Compare this marker to another marker of the same type.
  */
  eq(e) {
    return !1;
  }
  /**
  Called if the marker has a `toDOM` method and its representation
  was removed from a gutter.
  */
  destroy(e) {
  }
}
tl.prototype.elementClass = "";
tl.prototype.toDOM = void 0;
tl.prototype.mapMode = yr.TrackBefore;
tl.prototype.startSide = tl.prototype.endSide = -1;
tl.prototype.point = !0;
const u1 = /* @__PURE__ */ Be.define(), Ust = {
  class: "",
  renderEmptyElements: !1,
  elementStyle: "",
  markers: () => Vt.empty,
  lineMarker: () => null,
  widgetMarker: () => null,
  lineMarkerChange: null,
  initialSpacer: null,
  updateSpacer: null,
  domEventHandlers: {}
}, Hg = /* @__PURE__ */ Be.define();
function Xst(t) {
  return [Toe(), Hg.of(Object.assign(Object.assign({}, Ust), t))];
}
const b9 = /* @__PURE__ */ Be.define({
  combine: (t) => t.some((e) => e)
});
function Toe(t) {
  return [
    Yst
  ];
}
const Yst = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.view = t, this.prevViewport = t.viewport, this.dom = document.createElement("div"), this.dom.className = "cm-gutters", this.dom.setAttribute("aria-hidden", "true"), this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px", this.gutters = t.state.facet(Hg).map((e) => new O9(t, e));
    for (let e of this.gutters)
      this.dom.appendChild(e.dom);
    this.fixed = !t.state.facet(b9), this.fixed && (this.dom.style.position = "sticky"), this.syncGutters(!1), t.scrollDOM.insertBefore(this.dom, t.contentDOM);
  }
  update(t) {
    if (this.updateGutters(t)) {
      let e = this.prevViewport, n = t.view.viewport, r = Math.min(e.to, n.to) - Math.max(e.from, n.from);
      this.syncGutters(r < (n.to - n.from) * 0.8);
    }
    t.geometryChanged && (this.dom.style.minHeight = this.view.contentHeight / this.view.scaleY + "px"), this.view.state.facet(b9) != !this.fixed && (this.fixed = !this.fixed, this.dom.style.position = this.fixed ? "sticky" : ""), this.prevViewport = t.view.viewport;
  }
  syncGutters(t) {
    let e = this.dom.nextSibling;
    t && this.dom.remove();
    let n = Vt.iter(this.view.state.facet(u1), this.view.viewport.from), r = [], i = this.gutters.map((a) => new qst(a, this.view.viewport, -this.view.documentPadding.top));
    for (let a of this.view.viewportLineBlocks)
      if (r.length && (r = []), Array.isArray(a.type)) {
        let o = !0;
        for (let s of a.type)
          if (s.type == Jr.Text && o) {
            LM(n, r, s.from);
            for (let l of i)
              l.line(this.view, s, r);
            o = !1;
          } else if (s.widget)
            for (let l of i)
              l.widget(this.view, s);
      } else if (a.type == Jr.Text) {
        LM(n, r, a.from);
        for (let o of i)
          o.line(this.view, a, r);
      } else if (a.widget)
        for (let o of i)
          o.widget(this.view, a);
    for (let a of i)
      a.finish();
    t && this.view.scrollDOM.insertBefore(this.dom, e);
  }
  updateGutters(t) {
    let e = t.startState.facet(Hg), n = t.state.facet(Hg), r = t.docChanged || t.heightChanged || t.viewportChanged || !Vt.eq(t.startState.facet(u1), t.state.facet(u1), t.view.viewport.from, t.view.viewport.to);
    if (e == n)
      for (let i of this.gutters)
        i.update(t) && (r = !0);
    else {
      r = !0;
      let i = [];
      for (let a of n) {
        let o = e.indexOf(a);
        o < 0 ? i.push(new O9(this.view, a)) : (this.gutters[o].update(t), i.push(this.gutters[o]));
      }
      for (let a of this.gutters)
        a.dom.remove(), i.indexOf(a) < 0 && a.destroy();
      for (let a of i)
        this.dom.appendChild(a.dom);
      this.gutters = i;
    }
    return r;
  }
  destroy() {
    for (let t of this.gutters)
      t.destroy();
    this.dom.remove();
  }
}, {
  provide: (t) => De.scrollMargins.of((e) => {
    let n = e.plugin(t);
    return !n || n.gutters.length == 0 || !n.fixed ? null : e.textDirection == pn.LTR ? { left: n.dom.offsetWidth * e.scaleX } : { right: n.dom.offsetWidth * e.scaleX };
  })
});
function _9(t) {
  return Array.isArray(t) ? t : [t];
}
function LM(t, e, n) {
  for (; t.value && t.from <= n; )
    t.from == n && e.push(t.value), t.next();
}
class qst {
  constructor(e, n, r) {
    this.gutter = e, this.height = r, this.i = 0, this.cursor = Vt.iter(e.markers, n.from);
  }
  addElement(e, n, r) {
    let { gutter: i } = this, a = (n.top - this.height) / e.scaleY, o = n.height / e.scaleY;
    if (this.i == i.elements.length) {
      let s = new Poe(e, o, a, r);
      i.elements.push(s), i.dom.appendChild(s.dom);
    } else
      i.elements[this.i].update(e, o, a, r);
    this.height = n.bottom, this.i++;
  }
  line(e, n, r) {
    let i = [];
    LM(this.cursor, i, n.from), r.length && (i = i.concat(r));
    let a = this.gutter.config.lineMarker(e, n, i);
    a && i.unshift(a);
    let o = this.gutter;
    i.length == 0 && !o.config.renderEmptyElements || this.addElement(e, n, i);
  }
  widget(e, n) {
    let r = this.gutter.config.widgetMarker(e, n.widget, n);
    r && this.addElement(e, n, [r]);
  }
  finish() {
    let e = this.gutter;
    for (; e.elements.length > this.i; ) {
      let n = e.elements.pop();
      e.dom.removeChild(n.dom), n.destroy();
    }
  }
}
class O9 {
  constructor(e, n) {
    this.view = e, this.config = n, this.elements = [], this.spacer = null, this.dom = document.createElement("div"), this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
    for (let r in n.domEventHandlers)
      this.dom.addEventListener(r, (i) => {
        let a = i.target, o;
        if (a != this.dom && this.dom.contains(a)) {
          for (; a.parentNode != this.dom; )
            a = a.parentNode;
          let l = a.getBoundingClientRect();
          o = (l.top + l.bottom) / 2;
        } else
          o = i.clientY;
        let s = e.lineBlockAtHeight(o - e.documentTop);
        n.domEventHandlers[r](e, s, i) && i.preventDefault();
      });
    this.markers = _9(n.markers(e)), n.initialSpacer && (this.spacer = new Poe(e, 0, 0, [n.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
  }
  update(e) {
    let n = this.markers;
    if (this.markers = _9(this.config.markers(e.view)), this.spacer && this.config.updateSpacer) {
      let i = this.config.updateSpacer(this.spacer.markers[0], e);
      i != this.spacer.markers[0] && this.spacer.update(e.view, 0, 0, [i]);
    }
    let r = e.view.viewport;
    return !Vt.eq(this.markers, n, r.from, r.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(e) : !1);
  }
  destroy() {
    for (let e of this.elements)
      e.destroy();
  }
}
class Poe {
  constructor(e, n, r, i) {
    this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, n, r, i);
  }
  update(e, n, r, i) {
    this.height != n && (this.height = n, this.dom.style.height = n + "px"), this.above != r && (this.dom.style.marginTop = (this.above = r) ? r + "px" : ""), Kst(this.markers, i) || this.setMarkers(e, i);
  }
  setMarkers(e, n) {
    let r = "cm-gutterElement", i = this.dom.firstChild;
    for (let a = 0, o = 0; ; ) {
      let s = o, l = a < n.length ? n[a++] : null, u = !1;
      if (l) {
        let c = l.elementClass;
        c && (r += " " + c);
        for (let f = o; f < this.markers.length; f++)
          if (this.markers[f].compare(l)) {
            s = f, u = !0;
            break;
          }
      } else
        s = this.markers.length;
      for (; o < s; ) {
        let c = this.markers[o++];
        if (c.toDOM) {
          c.destroy(i);
          let f = i.nextSibling;
          i.remove(), i = f;
        }
      }
      if (!l)
        break;
      l.toDOM && (u ? i = i.nextSibling : this.dom.insertBefore(l.toDOM(e), i)), u && o++;
    }
    this.dom.className = r, this.markers = n;
  }
  destroy() {
    this.setMarkers(null, []);
  }
}
function Kst(t, e) {
  if (t.length != e.length)
    return !1;
  for (let n = 0; n < t.length; n++)
    if (!t[n].compare(e[n]))
      return !1;
  return !0;
}
const Jst = /* @__PURE__ */ Be.define(), Qd = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, { formatNumber: String, domEventHandlers: {} }, {
      domEventHandlers(e, n) {
        let r = Object.assign({}, e);
        for (let i in n) {
          let a = r[i], o = n[i];
          r[i] = a ? (s, l, u) => a(s, l, u) || o(s, l, u) : o;
        }
        return r;
      }
    });
  }
});
class x$ extends tl {
  constructor(e) {
    super(), this.number = e;
  }
  eq(e) {
    return this.number == e.number;
  }
  toDOM() {
    return document.createTextNode(this.number);
  }
}
function w$(t, e) {
  return t.state.facet(Qd).formatNumber(e, t.state);
}
const elt = /* @__PURE__ */ Hg.compute([Qd], (t) => ({
  class: "cm-lineNumbers",
  renderEmptyElements: !1,
  markers(e) {
    return e.state.facet(Jst);
  },
  lineMarker(e, n, r) {
    return r.some((i) => i.toDOM) ? null : new x$(w$(e, e.state.doc.lineAt(n.from).number));
  },
  widgetMarker: () => null,
  lineMarkerChange: (e) => e.startState.facet(Qd) != e.state.facet(Qd),
  initialSpacer(e) {
    return new x$(w$(e, S9(e.state.doc.lines)));
  },
  updateSpacer(e, n) {
    let r = w$(n.view, S9(n.view.state.doc.lines));
    return r == e.number ? e : new x$(r);
  },
  domEventHandlers: t.facet(Qd).domEventHandlers
}));
function tlt(t = {}) {
  return [
    Qd.of(t),
    Toe(),
    elt
  ];
}
function S9(t) {
  let e = 9;
  for (; e < t; )
    e = e * 10 + 9;
  return e;
}
const nlt = /* @__PURE__ */ new class extends tl {
  constructor() {
    super(...arguments), this.elementClass = "cm-activeLineGutter";
  }
}(), rlt = /* @__PURE__ */ u1.compute(["selection"], (t) => {
  let e = [], n = -1;
  for (let r of t.selection.ranges) {
    let i = t.doc.lineAt(r.head).from;
    i > n && (n = i, e.push(nlt.range(i)));
  }
  return Vt.of(e);
});
function ilt() {
  return rlt;
}
const $oe = 1024;
let alt = 0;
class C$ {
  constructor(e, n) {
    this.from = e, this.to = n;
  }
}
class Pt {
  /**
  Create a new node prop type.
  */
  constructor(e = {}) {
    this.id = alt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
      throw new Error("This node type doesn't define a deserialize function");
    });
  }
  /**
  This is meant to be used with
  [`NodeSet.extend`](#common.NodeSet.extend) or
  [`LRParser.configure`](#lr.ParserConfig.props) to compute
  prop values for each node type in the set. Takes a [match
  object](#common.NodeType^match) or function that returns undefined
  if the node type doesn't get this prop, and the prop's value if
  it does.
  */
  add(e) {
    if (this.perNode)
      throw new RangeError("Can't add per-node props to node types");
    return typeof e != "function" && (e = Ci.match(e)), (n) => {
      let r = e(n);
      return r === void 0 ? null : [this, r];
    };
  }
}
Pt.closedBy = new Pt({ deserialize: (t) => t.split(" ") });
Pt.openedBy = new Pt({ deserialize: (t) => t.split(" ") });
Pt.group = new Pt({ deserialize: (t) => t.split(" ") });
Pt.isolate = new Pt({ deserialize: (t) => {
  if (t && t != "rtl" && t != "ltr" && t != "auto")
    throw new RangeError("Invalid value for isolate: " + t);
  return t || "auto";
} });
Pt.contextHash = new Pt({ perNode: !0 });
Pt.lookAhead = new Pt({ perNode: !0 });
Pt.mounted = new Pt({ perNode: !0 });
class sS {
  constructor(e, n, r) {
    this.tree = e, this.overlay = n, this.parser = r;
  }
  /**
  @internal
  */
  static get(e) {
    return e && e.props && e.props[Pt.mounted.id];
  }
}
const olt = /* @__PURE__ */ Object.create(null);
class Ci {
  /**
  @internal
  */
  constructor(e, n, r, i = 0) {
    this.name = e, this.props = n, this.id = r, this.flags = i;
  }
  /**
  Define a node type.
  */
  static define(e) {
    let n = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : olt, r = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new Ci(e.name || "", n, e.id, r);
    if (e.props) {
      for (let a of e.props)
        if (Array.isArray(a) || (a = a(i)), a) {
          if (a[0].perNode)
            throw new RangeError("Can't store a per-node prop on a node type");
          n[a[0].id] = a[1];
        }
    }
    return i;
  }
  /**
  Retrieves a node prop for this type. Will return `undefined` if
  the prop isn't present on this node.
  */
  prop(e) {
    return this.props[e.id];
  }
  /**
  True when this is the top node of a grammar.
  */
  get isTop() {
    return (this.flags & 1) > 0;
  }
  /**
  True when this node is produced by a skip rule.
  */
  get isSkipped() {
    return (this.flags & 2) > 0;
  }
  /**
  Indicates whether this is an error node.
  */
  get isError() {
    return (this.flags & 4) > 0;
  }
  /**
  When true, this node type doesn't correspond to a user-declared
  named node, for example because it is used to cache repetition.
  */
  get isAnonymous() {
    return (this.flags & 8) > 0;
  }
  /**
  Returns true when this node's name or one of its
  [groups](#common.NodeProp^group) matches the given string.
  */
  is(e) {
    if (typeof e == "string") {
      if (this.name == e)
        return !0;
      let n = this.prop(Pt.group);
      return n ? n.indexOf(e) > -1 : !1;
    }
    return this.id == e;
  }
  /**
  Create a function from node types to arbitrary values by
  specifying an object whose property names are node or
  [group](#common.NodeProp^group) names. Often useful with
  [`NodeProp.add`](#common.NodeProp.add). You can put multiple
  names, separated by spaces, in a single property name to map
  multiple node names to a single value.
  */
  static match(e) {
    let n = /* @__PURE__ */ Object.create(null);
    for (let r in e)
      for (let i of r.split(" "))
        n[i] = e[r];
    return (r) => {
      for (let i = r.prop(Pt.group), a = -1; a < (i ? i.length : 0); a++) {
        let o = n[a < 0 ? r.name : i[a]];
        if (o)
          return o;
      }
    };
  }
}
Ci.none = new Ci(
  "",
  /* @__PURE__ */ Object.create(null),
  0,
  8
  /* NodeFlag.Anonymous */
);
class c4 {
  /**
  Create a set with the given types. The `id` property of each
  type should correspond to its position within the array.
  */
  constructor(e) {
    this.types = e;
    for (let n = 0; n < e.length; n++)
      if (e[n].id != n)
        throw new RangeError("Node type ids should correspond to array positions when creating a node set");
  }
  /**
  Create a copy of this set with some node properties added. The
  arguments to this method can be created with
  [`NodeProp.add`](#common.NodeProp.add).
  */
  extend(...e) {
    let n = [];
    for (let r of this.types) {
      let i = null;
      for (let a of e) {
        let o = a(r);
        o && (i || (i = Object.assign({}, r.props)), i[o[0].id] = o[1]);
      }
      n.push(i ? new Ci(r.name, i, r.id, r.flags) : r);
    }
    return new c4(n);
  }
}
const n_ = /* @__PURE__ */ new WeakMap(), x9 = /* @__PURE__ */ new WeakMap();
var Zn;
(function(t) {
  t[t.ExcludeBuffers = 1] = "ExcludeBuffers", t[t.IncludeAnonymous = 2] = "IncludeAnonymous", t[t.IgnoreMounts = 4] = "IgnoreMounts", t[t.IgnoreOverlays = 8] = "IgnoreOverlays";
})(Zn || (Zn = {}));
class Wn {
  /**
  Construct a new tree. See also [`Tree.build`](#common.Tree^build).
  */
  constructor(e, n, r, i, a) {
    if (this.type = e, this.children = n, this.positions = r, this.length = i, this.props = null, a && a.length) {
      this.props = /* @__PURE__ */ Object.create(null);
      for (let [o, s] of a)
        this.props[typeof o == "number" ? o : o.id] = s;
    }
  }
  /**
  @internal
  */
  toString() {
    let e = sS.get(this);
    if (e && !e.overlay)
      return e.tree.toString();
    let n = "";
    for (let r of this.children) {
      let i = r.toString();
      i && (n && (n += ","), n += i);
    }
    return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (n.length ? "(" + n + ")" : "") : n;
  }
  /**
  Get a [tree cursor](#common.TreeCursor) positioned at the top of
  the tree. Mode can be used to [control](#common.IterMode) which
  nodes the cursor visits.
  */
  cursor(e = 0) {
    return new BM(this.topNode, e);
  }
  /**
  Get a [tree cursor](#common.TreeCursor) pointing into this tree
  at the given position and side (see
  [`moveTo`](#common.TreeCursor.moveTo).
  */
  cursorAt(e, n = 0, r = 0) {
    let i = n_.get(this) || this.topNode, a = new BM(i);
    return a.moveTo(e, n), n_.set(this, a._tree), a;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) object for the top of the
  tree.
  */
  get topNode() {
    return new xi(this, 0, 0, null);
  }
  /**
  Get the [syntax node](#common.SyntaxNode) at the given position.
  If `side` is -1, this will move into nodes that end at the
  position. If 1, it'll move into nodes that start at the
  position. With 0, it'll only enter nodes that cover the position
  from both sides.
  
  Note that this will not enter
  [overlays](#common.MountedTree.overlay), and you often want
  [`resolveInner`](#common.Tree.resolveInner) instead.
  */
  resolve(e, n = 0) {
    let r = Jm(n_.get(this) || this.topNode, e, n, !1);
    return n_.set(this, r), r;
  }
  /**
  Like [`resolve`](#common.Tree.resolve), but will enter
  [overlaid](#common.MountedTree.overlay) nodes, producing a syntax node
  pointing into the innermost overlaid tree at the given position
  (with parent links going through all parent structure, including
  the host trees).
  */
  resolveInner(e, n = 0) {
    let r = Jm(x9.get(this) || this.topNode, e, n, !0);
    return x9.set(this, r), r;
  }
  /**
  In some situations, it can be useful to iterate through all
  nodes around a position, including those in overlays that don't
  directly cover the position. This method gives you an iterator
  that will produce all nodes, from small to big, around the given
  position.
  */
  resolveStack(e, n = 0) {
    return ult(this, e, n);
  }
  /**
  Iterate over the tree and its children, calling `enter` for any
  node that touches the `from`/`to` region (if given) before
  running over such a node's children, and `leave` (if given) when
  leaving the node. When `enter` returns `false`, that node will
  not have its children iterated over (or `leave` called).
  */
  iterate(e) {
    let { enter: n, leave: r, from: i = 0, to: a = this.length } = e, o = e.mode || 0, s = (o & Zn.IncludeAnonymous) > 0;
    for (let l = this.cursor(o | Zn.IncludeAnonymous); ; ) {
      let u = !1;
      if (l.from <= a && l.to >= i && (!s && l.type.isAnonymous || n(l) !== !1)) {
        if (l.firstChild())
          continue;
        u = !0;
      }
      for (; u && r && (s || !l.type.isAnonymous) && r(l), !l.nextSibling(); ) {
        if (!l.parent())
          return;
        u = !0;
      }
    }
  }
  /**
  Get the value of the given [node prop](#common.NodeProp) for this
  node. Works with both per-node and per-type props.
  */
  prop(e) {
    return e.perNode ? this.props ? this.props[e.id] : void 0 : this.type.prop(e);
  }
  /**
  Returns the node's [per-node props](#common.NodeProp.perNode) in a
  format that can be passed to the [`Tree`](#common.Tree)
  constructor.
  */
  get propValues() {
    let e = [];
    if (this.props)
      for (let n in this.props)
        e.push([+n, this.props[n]]);
    return e;
  }
  /**
  Balance the direct children of this tree, producing a copy of
  which may have children grouped into subtrees with type
  [`NodeType.none`](#common.NodeType^none).
  */
  balance(e = {}) {
    return this.children.length <= 8 ? this : h4(Ci.none, this.children, this.positions, 0, this.children.length, 0, this.length, (n, r, i) => new Wn(this.type, n, r, i, this.propValues), e.makeTree || ((n, r, i) => new Wn(Ci.none, n, r, i)));
  }
  /**
  Build a tree from a postfix-ordered buffer of node information,
  or a cursor over such a buffer.
  */
  static build(e) {
    return clt(e);
  }
}
Wn.empty = new Wn(Ci.none, [], [], 0);
class f4 {
  constructor(e, n) {
    this.buffer = e, this.index = n;
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  get pos() {
    return this.index;
  }
  next() {
    this.index -= 4;
  }
  fork() {
    return new f4(this.buffer, this.index);
  }
}
class mu {
  /**
  Create a tree buffer.
  */
  constructor(e, n, r) {
    this.buffer = e, this.length = n, this.set = r;
  }
  /**
  @internal
  */
  get type() {
    return Ci.none;
  }
  /**
  @internal
  */
  toString() {
    let e = [];
    for (let n = 0; n < this.buffer.length; )
      e.push(this.childString(n)), n = this.buffer[n + 3];
    return e.join(",");
  }
  /**
  @internal
  */
  childString(e) {
    let n = this.buffer[e], r = this.buffer[e + 3], i = this.set.types[n], a = i.name;
    if (/\W/.test(a) && !i.isError && (a = JSON.stringify(a)), e += 4, r == e)
      return a;
    let o = [];
    for (; e < r; )
      o.push(this.childString(e)), e = this.buffer[e + 3];
    return a + "(" + o.join(",") + ")";
  }
  /**
  @internal
  */
  findChild(e, n, r, i, a) {
    let { buffer: o } = this, s = -1;
    for (let l = e; l != n && !(Aoe(a, i, o[l + 1], o[l + 2]) && (s = l, r > 0)); l = o[l + 3])
      ;
    return s;
  }
  /**
  @internal
  */
  slice(e, n, r) {
    let i = this.buffer, a = new Uint16Array(n - e), o = 0;
    for (let s = e, l = 0; s < n; ) {
      a[l++] = i[s++], a[l++] = i[s++] - r;
      let u = a[l++] = i[s++] - r;
      a[l++] = i[s++] - e, o = Math.max(o, u);
    }
    return new mu(a, o, this.set);
  }
}
function Aoe(t, e, n, r) {
  switch (t) {
    case -2:
      return n < e;
    case -1:
      return r >= e && n < e;
    case 0:
      return n < e && r > e;
    case 1:
      return n <= e && r > e;
    case 2:
      return r > e;
    case 4:
      return !0;
  }
}
function Jm(t, e, n, r) {
  for (var i; t.from == t.to || (n < 1 ? t.from >= e : t.from > e) || (n > -1 ? t.to <= e : t.to < e); ) {
    let o = !r && t instanceof xi && t.index < 0 ? null : t.parent;
    if (!o)
      return t;
    t = o;
  }
  let a = r ? 0 : Zn.IgnoreOverlays;
  if (r)
    for (let o = t, s = o.parent; s; o = s, s = o.parent)
      o instanceof xi && o.index < 0 && ((i = s.enter(e, n, a)) === null || i === void 0 ? void 0 : i.from) != o.from && (t = s);
  for (; ; ) {
    let o = t.enter(e, n, a);
    if (!o)
      return t;
    t = o;
  }
}
class Eoe {
  cursor(e = 0) {
    return new BM(this, e);
  }
  getChild(e, n = null, r = null) {
    let i = w9(this, e, n, r);
    return i.length ? i[0] : null;
  }
  getChildren(e, n = null, r = null) {
    return w9(this, e, n, r);
  }
  resolve(e, n = 0) {
    return Jm(this, e, n, !1);
  }
  resolveInner(e, n = 0) {
    return Jm(this, e, n, !0);
  }
  matchContext(e) {
    return NM(this, e);
  }
  enterUnfinishedNodesBefore(e) {
    let n = this.childBefore(e), r = this;
    for (; n; ) {
      let i = n.lastChild;
      if (!i || i.to != n.to)
        break;
      i.type.isError && i.from == i.to ? (r = n, n = i.prevSibling) : n = i;
    }
    return r;
  }
  get node() {
    return this;
  }
  get next() {
    return this.parent;
  }
}
class xi extends Eoe {
  constructor(e, n, r, i) {
    super(), this._tree = e, this.from = n, this.index = r, this._parent = i;
  }
  get type() {
    return this._tree.type;
  }
  get name() {
    return this._tree.type.name;
  }
  get to() {
    return this.from + this._tree.length;
  }
  nextChild(e, n, r, i, a = 0) {
    for (let o = this; ; ) {
      for (let { children: s, positions: l } = o._tree, u = n > 0 ? s.length : -1; e != u; e += n) {
        let c = s[e], f = l[e] + o.from;
        if (Aoe(i, r, f, f + c.length)) {
          if (c instanceof mu) {
            if (a & Zn.ExcludeBuffers)
              continue;
            let d = c.findChild(0, c.buffer.length, n, r - f, i);
            if (d > -1)
              return new Qo(new slt(o, c, e, f), null, d);
          } else if (a & Zn.IncludeAnonymous || !c.type.isAnonymous || d4(c)) {
            let d;
            if (!(a & Zn.IgnoreMounts) && (d = sS.get(c)) && !d.overlay)
              return new xi(d.tree, f, e, o);
            let h = new xi(c, f, e, o);
            return a & Zn.IncludeAnonymous || !h.type.isAnonymous ? h : h.nextChild(n < 0 ? c.children.length - 1 : 0, n, r, i);
          }
        }
      }
      if (a & Zn.IncludeAnonymous || !o.type.isAnonymous || (o.index >= 0 ? e = o.index + n : e = n < 0 ? -1 : o._parent._tree.children.length, o = o._parent, !o))
        return null;
    }
  }
  get firstChild() {
    return this.nextChild(
      0,
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.nextChild(
      0,
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.nextChild(
      this._tree.children.length - 1,
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, r = 0) {
    let i;
    if (!(r & Zn.IgnoreOverlays) && (i = sS.get(this._tree)) && i.overlay) {
      let a = e - this.from;
      for (let { from: o, to: s } of i.overlay)
        if ((n > 0 ? o <= a : o < a) && (n < 0 ? s >= a : s > a))
          return new xi(i.tree, i.overlay[0].from + this.from, -1, this);
    }
    return this.nextChild(0, 1, e, n, r);
  }
  nextSignificantParent() {
    let e = this;
    for (; e.type.isAnonymous && e._parent; )
      e = e._parent;
    return e;
  }
  get parent() {
    return this._parent ? this._parent.nextSignificantParent() : null;
  }
  get nextSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index + 1,
      1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get prevSibling() {
    return this._parent && this.index >= 0 ? this._parent.nextChild(
      this.index - 1,
      -1,
      0,
      4
      /* Side.DontCare */
    ) : null;
  }
  get tree() {
    return this._tree;
  }
  toTree() {
    return this._tree;
  }
  /**
  @internal
  */
  toString() {
    return this._tree.toString();
  }
}
function w9(t, e, n, r) {
  let i = t.cursor(), a = [];
  if (!i.firstChild())
    return a;
  if (n != null) {
    for (let o = !1; !o; )
      if (o = i.type.is(n), !i.nextSibling())
        return a;
  }
  for (; ; ) {
    if (r != null && i.type.is(r))
      return a;
    if (i.type.is(e) && a.push(i.node), !i.nextSibling())
      return r == null ? a : [];
  }
}
function NM(t, e, n = e.length - 1) {
  for (let r = t.parent; n >= 0; r = r.parent) {
    if (!r)
      return !1;
    if (!r.type.isAnonymous) {
      if (e[n] && e[n] != r.name)
        return !1;
      n--;
    }
  }
  return !0;
}
class slt {
  constructor(e, n, r, i) {
    this.parent = e, this.buffer = n, this.index = r, this.start = i;
  }
}
class Qo extends Eoe {
  get name() {
    return this.type.name;
  }
  get from() {
    return this.context.start + this.context.buffer.buffer[this.index + 1];
  }
  get to() {
    return this.context.start + this.context.buffer.buffer[this.index + 2];
  }
  constructor(e, n, r) {
    super(), this.context = e, this._parent = n, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
  }
  child(e, n, r) {
    let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.context.start, r);
    return a < 0 ? null : new Qo(this.context, this, a);
  }
  get firstChild() {
    return this.child(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  get lastChild() {
    return this.child(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  childAfter(e) {
    return this.child(
      1,
      e,
      2
      /* Side.After */
    );
  }
  childBefore(e) {
    return this.child(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  enter(e, n, r = 0) {
    if (r & Zn.ExcludeBuffers)
      return null;
    let { buffer: i } = this.context, a = i.findChild(this.index + 4, i.buffer[this.index + 3], n > 0 ? 1 : -1, e - this.context.start, n);
    return a < 0 ? null : new Qo(this.context, this, a);
  }
  get parent() {
    return this._parent || this.context.parent.nextSignificantParent();
  }
  externalSibling(e) {
    return this._parent ? null : this.context.parent.nextChild(
      this.context.index + e,
      e,
      0,
      4
      /* Side.DontCare */
    );
  }
  get nextSibling() {
    let { buffer: e } = this.context, n = e.buffer[this.index + 3];
    return n < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Qo(this.context, this._parent, n) : this.externalSibling(1);
  }
  get prevSibling() {
    let { buffer: e } = this.context, n = this._parent ? this._parent.index + 4 : 0;
    return this.index == n ? this.externalSibling(-1) : new Qo(this.context, this._parent, e.findChild(
      n,
      this.index,
      -1,
      0,
      4
      /* Side.DontCare */
    ));
  }
  get tree() {
    return null;
  }
  toTree() {
    let e = [], n = [], { buffer: r } = this.context, i = this.index + 4, a = r.buffer[this.index + 3];
    if (a > i) {
      let o = r.buffer[this.index + 1];
      e.push(r.slice(i, a, o)), n.push(0);
    }
    return new Wn(this.type, e, n, this.to - this.from);
  }
  /**
  @internal
  */
  toString() {
    return this.context.buffer.childString(this.index);
  }
}
function Moe(t) {
  if (!t.length)
    return null;
  let e = 0, n = t[0];
  for (let a = 1; a < t.length; a++) {
    let o = t[a];
    (o.from > n.from || o.to < n.to) && (n = o, e = a);
  }
  let r = n instanceof xi && n.index < 0 ? null : n.parent, i = t.slice();
  return r ? i[e] = r : i.splice(e, 1), new llt(i, n);
}
class llt {
  constructor(e, n) {
    this.heads = e, this.node = n;
  }
  get next() {
    return Moe(this.heads);
  }
}
function ult(t, e, n) {
  let r = t.resolveInner(e, n), i = null;
  for (let a = r instanceof xi ? r : r.context.parent; a; a = a.parent)
    if (a.index < 0) {
      let o = a.parent;
      (i || (i = [r])).push(o.resolve(e, n)), a = o;
    } else {
      let o = sS.get(a.tree);
      if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
        let s = new xi(o.tree, o.overlay[0].from + a.from, -1, a);
        (i || (i = [r])).push(Jm(s, e, n, !1));
      }
    }
  return i ? Moe(i) : r;
}
class BM {
  /**
  Shorthand for `.type.name`.
  */
  get name() {
    return this.type.name;
  }
  /**
  @internal
  */
  constructor(e, n = 0) {
    if (this.mode = n, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof xi)
      this.yieldNode(e);
    else {
      this._tree = e.context.parent, this.buffer = e.context;
      for (let r = e._parent; r; r = r._parent)
        this.stack.unshift(r.index);
      this.bufferNode = e, this.yieldBuf(e.index);
    }
  }
  yieldNode(e) {
    return e ? (this._tree = e, this.type = e.type, this.from = e.from, this.to = e.to, !0) : !1;
  }
  yieldBuf(e, n) {
    this.index = e;
    let { start: r, buffer: i } = this.buffer;
    return this.type = n || i.set.types[i.buffer[e]], this.from = r + i.buffer[e + 1], this.to = r + i.buffer[e + 2], !0;
  }
  /**
  @internal
  */
  yield(e) {
    return e ? e instanceof xi ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
  }
  /**
  @internal
  */
  toString() {
    return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
  }
  /**
  @internal
  */
  enterChild(e, n, r) {
    if (!this.buffer)
      return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, n, r, this.mode));
    let { buffer: i } = this.buffer, a = i.findChild(this.index + 4, i.buffer[this.index + 3], e, n - this.buffer.start, r);
    return a < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(a));
  }
  /**
  Move the cursor to this node's first child. When this returns
  false, the node has no child, and the cursor has not been moved.
  */
  firstChild() {
    return this.enterChild(
      1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to this node's last child.
  */
  lastChild() {
    return this.enterChild(
      -1,
      0,
      4
      /* Side.DontCare */
    );
  }
  /**
  Move the cursor to the first child that ends after `pos`.
  */
  childAfter(e) {
    return this.enterChild(
      1,
      e,
      2
      /* Side.After */
    );
  }
  /**
  Move to the last child that starts before `pos`.
  */
  childBefore(e) {
    return this.enterChild(
      -1,
      e,
      -2
      /* Side.Before */
    );
  }
  /**
  Move the cursor to the child around `pos`. If side is -1 the
  child may end at that position, when 1 it may start there. This
  will also enter [overlaid](#common.MountedTree.overlay)
  [mounted](#common.NodeProp^mounted) trees unless `overlays` is
  set to false.
  */
  enter(e, n, r = this.mode) {
    return this.buffer ? r & Zn.ExcludeBuffers ? !1 : this.enterChild(1, e, n) : this.yield(this._tree.enter(e, n, r));
  }
  /**
  Move to the node's parent node, if this isn't the top node.
  */
  parent() {
    if (!this.buffer)
      return this.yieldNode(this.mode & Zn.IncludeAnonymous ? this._tree._parent : this._tree.parent);
    if (this.stack.length)
      return this.yieldBuf(this.stack.pop());
    let e = this.mode & Zn.IncludeAnonymous ? this.buffer.parent : this.buffer.parent.nextSignificantParent();
    return this.buffer = null, this.yieldNode(e);
  }
  /**
  @internal
  */
  sibling(e) {
    if (!this.buffer)
      return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
    let { buffer: n } = this.buffer, r = this.stack.length - 1;
    if (e < 0) {
      let i = r < 0 ? 0 : this.stack[r] + 4;
      if (this.index != i)
        return this.yieldBuf(n.findChild(
          i,
          this.index,
          -1,
          0,
          4
          /* Side.DontCare */
        ));
    } else {
      let i = n.buffer[this.index + 3];
      if (i < (r < 0 ? n.buffer.length : n.buffer[this.stack[r] + 3]))
        return this.yieldBuf(i);
    }
    return r < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
  }
  /**
  Move to this node's next sibling, if any.
  */
  nextSibling() {
    return this.sibling(1);
  }
  /**
  Move to this node's previous sibling, if any.
  */
  prevSibling() {
    return this.sibling(-1);
  }
  atLastNode(e) {
    let n, r, { buffer: i } = this;
    if (i) {
      if (e > 0) {
        if (this.index < i.buffer.buffer.length)
          return !1;
      } else
        for (let a = 0; a < this.index; a++)
          if (i.buffer.buffer[a + 3] < this.index)
            return !1;
      ({ index: n, parent: r } = i);
    } else
      ({ index: n, _parent: r } = this._tree);
    for (; r; { index: n, _parent: r } = r)
      if (n > -1)
        for (let a = n + e, o = e < 0 ? -1 : r._tree.children.length; a != o; a += e) {
          let s = r._tree.children[a];
          if (this.mode & Zn.IncludeAnonymous || s instanceof mu || !s.type.isAnonymous || d4(s))
            return !1;
        }
    return !0;
  }
  move(e, n) {
    if (n && this.enterChild(
      e,
      0,
      4
      /* Side.DontCare */
    ))
      return !0;
    for (; ; ) {
      if (this.sibling(e))
        return !0;
      if (this.atLastNode(e) || !this.parent())
        return !1;
    }
  }
  /**
  Move to the next node in a
  [pre-order](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order,_NLR)
  traversal, going from a node to its first child or, if the
  current node is empty or `enter` is false, its next sibling or
  the next sibling of the first parent node that has one.
  */
  next(e = !0) {
    return this.move(1, e);
  }
  /**
  Move to the next node in a last-to-first pre-order traveral. A
  node is followed by its last child or, if it has none, its
  previous sibling or the previous sibling of the first parent
  node that has one.
  */
  prev(e = !0) {
    return this.move(-1, e);
  }
  /**
  Move the cursor to the innermost node that covers `pos`. If
  `side` is -1, it will enter nodes that end at `pos`. If it is 1,
  it will enter nodes that start at `pos`.
  */
  moveTo(e, n = 0) {
    for (; (this.from == this.to || (n < 1 ? this.from >= e : this.from > e) || (n > -1 ? this.to <= e : this.to < e)) && this.parent(); )
      ;
    for (; this.enterChild(1, e, n); )
      ;
    return this;
  }
  /**
  Get a [syntax node](#common.SyntaxNode) at the cursor's current
  position.
  */
  get node() {
    if (!this.buffer)
      return this._tree;
    let e = this.bufferNode, n = null, r = 0;
    if (e && e.context == this.buffer)
      e: for (let i = this.index, a = this.stack.length; a >= 0; ) {
        for (let o = e; o; o = o._parent)
          if (o.index == i) {
            if (i == this.index)
              return o;
            n = o, r = a + 1;
            break e;
          }
        i = this.stack[--a];
      }
    for (let i = r; i < this.stack.length; i++)
      n = new Qo(this.buffer, n, this.stack[i]);
    return this.bufferNode = new Qo(this.buffer, n, this.index);
  }
  /**
  Get the [tree](#common.Tree) that represents the current node, if
  any. Will return null when the node is in a [tree
  buffer](#common.TreeBuffer).
  */
  get tree() {
    return this.buffer ? null : this._tree._tree;
  }
  /**
  Iterate over the current node and all its descendants, calling
  `enter` when entering a node and `leave`, if given, when leaving
  one. When `enter` returns `false`, any children of that node are
  skipped, and `leave` isn't called for it.
  */
  iterate(e, n) {
    for (let r = 0; ; ) {
      let i = !1;
      if (this.type.isAnonymous || e(this) !== !1) {
        if (this.firstChild()) {
          r++;
          continue;
        }
        this.type.isAnonymous || (i = !0);
      }
      for (; i && n && n(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
        if (!r)
          return;
        this.parent(), r--, i = !0;
      }
    }
  }
  /**
  Test whether the current node matches a given context—a sequence
  of direct parent node names. Empty strings in the context array
  are treated as wildcards.
  */
  matchContext(e) {
    if (!this.buffer)
      return NM(this.node, e);
    let { buffer: n } = this.buffer, { types: r } = n.set;
    for (let i = e.length - 1, a = this.stack.length - 1; i >= 0; a--) {
      if (a < 0)
        return NM(this.node, e, i);
      let o = r[n.buffer[this.stack[a]]];
      if (!o.isAnonymous) {
        if (e[i] && e[i] != o.name)
          return !1;
        i--;
      }
    }
    return !0;
  }
}
function d4(t) {
  return t.children.some((e) => e instanceof mu || !e.type.isAnonymous || d4(e));
}
function clt(t) {
  var e;
  let { buffer: n, nodeSet: r, maxBufferLength: i = $oe, reused: a = [], minRepeatType: o = r.types.length } = t, s = Array.isArray(n) ? new f4(n, n.length) : n, l = r.types, u = 0, c = 0;
  function f(O, S, x, C, T, w) {
    let { id: P, start: $, end: A, size: D } = s, E = c;
    for (; D < 0; )
      if (s.next(), D == -1) {
        let W = a[P];
        x.push(W), C.push($ - O);
        return;
      } else if (D == -3) {
        u = P;
        return;
      } else if (D == -4) {
        c = P;
        return;
      } else
        throw new RangeError(`Unrecognized record size: ${D}`);
    let R = l[P], N, V, z = $ - O;
    if (A - $ <= i && (V = g(s.pos - S, T))) {
      let W = new Uint16Array(V.size - V.skip), F = s.pos - V.size, Q = W.length;
      for (; s.pos > F; )
        Q = m(V.start, W, Q);
      N = new mu(W, A - V.start, r), z = V.start - O;
    } else {
      let W = s.pos - D;
      s.next();
      let F = [], Q = [], Z = P >= o ? P : -1, ne = 0, ee = A;
      for (; s.pos > W; )
        Z >= 0 && s.id == Z && s.size >= 0 ? (s.end <= ee - i && (p(F, Q, $, ne, s.end, ee, Z, E), ne = F.length, ee = s.end), s.next()) : w > 2500 ? d($, W, F, Q) : f($, W, F, Q, Z, w + 1);
      if (Z >= 0 && ne > 0 && ne < F.length && p(F, Q, $, ne, $, ee, Z, E), F.reverse(), Q.reverse(), Z > -1 && ne > 0) {
        let oe = h(R);
        N = h4(R, F, Q, 0, F.length, 0, A - $, oe, oe);
      } else
        N = v(R, F, Q, A - $, E - A);
    }
    x.push(N), C.push(z);
  }
  function d(O, S, x, C) {
    let T = [], w = 0, P = -1;
    for (; s.pos > S; ) {
      let { id: $, start: A, end: D, size: E } = s;
      if (E > 4)
        s.next();
      else {
        if (P > -1 && A < P)
          break;
        P < 0 && (P = D - i), T.push($, A, D), w++, s.next();
      }
    }
    if (w) {
      let $ = new Uint16Array(w * 4), A = T[T.length - 2];
      for (let D = T.length - 3, E = 0; D >= 0; D -= 3)
        $[E++] = T[D], $[E++] = T[D + 1] - A, $[E++] = T[D + 2] - A, $[E++] = E;
      x.push(new mu($, T[2] - A, r)), C.push(A - O);
    }
  }
  function h(O) {
    return (S, x, C) => {
      let T = 0, w = S.length - 1, P, $;
      if (w >= 0 && (P = S[w]) instanceof Wn) {
        if (!w && P.type == O && P.length == C)
          return P;
        ($ = P.prop(Pt.lookAhead)) && (T = x[w] + P.length + $);
      }
      return v(O, S, x, C, T);
    };
  }
  function p(O, S, x, C, T, w, P, $) {
    let A = [], D = [];
    for (; O.length > C; )
      A.push(O.pop()), D.push(S.pop() + x - T);
    O.push(v(r.types[P], A, D, w - T, $ - w)), S.push(T - x);
  }
  function v(O, S, x, C, T = 0, w) {
    if (u) {
      let P = [Pt.contextHash, u];
      w = w ? [P].concat(w) : [P];
    }
    if (T > 25) {
      let P = [Pt.lookAhead, T];
      w = w ? [P].concat(w) : [P];
    }
    return new Wn(O, S, x, C, w);
  }
  function g(O, S) {
    let x = s.fork(), C = 0, T = 0, w = 0, P = x.end - i, $ = { size: 0, start: 0, skip: 0 };
    e: for (let A = x.pos - O; x.pos > A; ) {
      let D = x.size;
      if (x.id == S && D >= 0) {
        $.size = C, $.start = T, $.skip = w, w += 4, C += 4, x.next();
        continue;
      }
      let E = x.pos - D;
      if (D < 0 || E < A || x.start < P)
        break;
      let R = x.id >= o ? 4 : 0, N = x.start;
      for (x.next(); x.pos > E; ) {
        if (x.size < 0)
          if (x.size == -3)
            R += 4;
          else
            break e;
        else x.id >= o && (R += 4);
        x.next();
      }
      T = N, C += D, w += R;
    }
    return (S < 0 || C == O) && ($.size = C, $.start = T, $.skip = w), $.size > 4 ? $ : void 0;
  }
  function m(O, S, x) {
    let { id: C, start: T, end: w, size: P } = s;
    if (s.next(), P >= 0 && C < o) {
      let $ = x;
      if (P > 4) {
        let A = s.pos - (P - 4);
        for (; s.pos > A; )
          x = m(O, S, x);
      }
      S[--x] = $, S[--x] = w - O, S[--x] = T - O, S[--x] = C;
    } else P == -3 ? u = C : P == -4 && (c = C);
    return x;
  }
  let y = [], b = [];
  for (; s.pos > 0; )
    f(t.start || 0, t.bufferStart || 0, y, b, -1, 0);
  let _ = (e = t.length) !== null && e !== void 0 ? e : y.length ? b[0] + y[0].length : 0;
  return new Wn(l[t.topID], y.reverse(), b.reverse(), _);
}
const C9 = /* @__PURE__ */ new WeakMap();
function c1(t, e) {
  if (!t.isAnonymous || e instanceof mu || e.type != t)
    return 1;
  let n = C9.get(e);
  if (n == null) {
    n = 1;
    for (let r of e.children) {
      if (r.type != t || !(r instanceof Wn)) {
        n = 1;
        break;
      }
      n += c1(t, r);
    }
    C9.set(e, n);
  }
  return n;
}
function h4(t, e, n, r, i, a, o, s, l) {
  let u = 0;
  for (let p = r; p < i; p++)
    u += c1(t, e[p]);
  let c = Math.ceil(
    u * 1.5 / 8
    /* Balance.BranchFactor */
  ), f = [], d = [];
  function h(p, v, g, m, y) {
    for (let b = g; b < m; ) {
      let _ = b, O = v[b], S = c1(t, p[b]);
      for (b++; b < m; b++) {
        let x = c1(t, p[b]);
        if (S + x >= c)
          break;
        S += x;
      }
      if (b == _ + 1) {
        if (S > c) {
          let x = p[_];
          h(x.children, x.positions, 0, x.children.length, v[_] + y);
          continue;
        }
        f.push(p[_]);
      } else {
        let x = v[b - 1] + p[b - 1].length - O;
        f.push(h4(t, p, v, _, b, O, x, null, l));
      }
      d.push(O + y - a);
    }
  }
  return h(e, n, r, i, 0), (s || l)(f, d, o);
}
class flt {
  constructor() {
    this.map = /* @__PURE__ */ new WeakMap();
  }
  setBuffer(e, n, r) {
    let i = this.map.get(e);
    i || this.map.set(e, i = /* @__PURE__ */ new Map()), i.set(n, r);
  }
  getBuffer(e, n) {
    let r = this.map.get(e);
    return r && r.get(n);
  }
  /**
  Set the value for this syntax node.
  */
  set(e, n) {
    e instanceof Qo ? this.setBuffer(e.context.buffer, e.index, n) : e instanceof xi && this.map.set(e.tree, n);
  }
  /**
  Retrieve value for this syntax node, if it exists in the map.
  */
  get(e) {
    return e instanceof Qo ? this.getBuffer(e.context.buffer, e.index) : e instanceof xi ? this.map.get(e.tree) : void 0;
  }
  /**
  Set the value for the node that a cursor currently points to.
  */
  cursorSet(e, n) {
    e.buffer ? this.setBuffer(e.buffer.buffer, e.index, n) : this.map.set(e.tree, n);
  }
  /**
  Retrieve the value for the node that a cursor currently points
  to.
  */
  cursorGet(e) {
    return e.buffer ? this.getBuffer(e.buffer.buffer, e.index) : this.map.get(e.tree);
  }
}
class af {
  /**
  Construct a tree fragment. You'll usually want to use
  [`addTree`](#common.TreeFragment^addTree) and
  [`applyChanges`](#common.TreeFragment^applyChanges) instead of
  calling this directly.
  */
  constructor(e, n, r, i, a = !1, o = !1) {
    this.from = e, this.to = n, this.tree = r, this.offset = i, this.open = (a ? 1 : 0) | (o ? 2 : 0);
  }
  /**
  Whether the start of the fragment represents the start of a
  parse, or the end of a change. (In the second case, it may not
  be safe to reuse some nodes at the start, depending on the
  parsing algorithm.)
  */
  get openStart() {
    return (this.open & 1) > 0;
  }
  /**
  Whether the end of the fragment represents the end of a
  full-document parse, or the start of a change.
  */
  get openEnd() {
    return (this.open & 2) > 0;
  }
  /**
  Create a set of fragments from a freshly parsed tree, or update
  an existing set of fragments by replacing the ones that overlap
  with a tree with content from the new tree. When `partial` is
  true, the parse is treated as incomplete, and the resulting
  fragment has [`openEnd`](#common.TreeFragment.openEnd) set to
  true.
  */
  static addTree(e, n = [], r = !1) {
    let i = [new af(0, e.length, e, 0, !1, r)];
    for (let a of n)
      a.to > e.length && i.push(a);
    return i;
  }
  /**
  Apply a set of edits to an array of fragments, removing or
  splitting fragments as necessary to remove edited ranges, and
  adjusting offsets for fragments that moved.
  */
  static applyChanges(e, n, r = 128) {
    if (!n.length)
      return e;
    let i = [], a = 1, o = e.length ? e[0] : null;
    for (let s = 0, l = 0, u = 0; ; s++) {
      let c = s < n.length ? n[s] : null, f = c ? c.fromA : 1e9;
      if (f - l >= r)
        for (; o && o.from < f; ) {
          let d = o;
          if (l >= d.from || f <= d.to || u) {
            let h = Math.max(d.from, l) - u, p = Math.min(d.to, f) - u;
            d = h >= p ? null : new af(h, p, d.tree, d.offset + u, s > 0, !!c);
          }
          if (d && i.push(d), o.to > f)
            break;
          o = a < e.length ? e[a++] : null;
        }
      if (!c)
        break;
      l = c.toA, u = c.toA - c.toB;
    }
    return i;
  }
}
class Ioe {
  /**
  Start a parse, returning a [partial parse](#common.PartialParse)
  object. [`fragments`](#common.TreeFragment) can be passed in to
  make the parse incremental.
  
  By default, the entire input is parsed. You can pass `ranges`,
  which should be a sorted array of non-empty, non-overlapping
  ranges, to parse only those ranges. The tree returned in that
  case will start at `ranges[0].from`.
  */
  startParse(e, n, r) {
    return typeof e == "string" && (e = new dlt(e)), r = r ? r.length ? r.map((i) => new C$(i.from, i.to)) : [new C$(0, 0)] : [new C$(0, e.length)], this.createParse(e, n || [], r);
  }
  /**
  Run a full parse, returning the resulting tree.
  */
  parse(e, n, r) {
    let i = this.startParse(e, n, r);
    for (; ; ) {
      let a = i.advance();
      if (a)
        return a;
    }
  }
}
class dlt {
  constructor(e) {
    this.string = e;
  }
  get length() {
    return this.string.length;
  }
  chunk(e) {
    return this.string.slice(e);
  }
  get lineChunks() {
    return !1;
  }
  read(e, n) {
    return this.string.slice(e, n);
  }
}
new Pt({ perNode: !0 });
let hlt = 0;
class Ro {
  /**
  @internal
  */
  constructor(e, n, r) {
    this.set = e, this.base = n, this.modified = r, this.id = hlt++;
  }
  /**
  Define a new tag. If `parent` is given, the tag is treated as a
  sub-tag of that parent, and
  [highlighters](#highlight.tagHighlighter) that don't mention
  this tag will try to fall back to the parent tag (or grandparent
  tag, etc).
  */
  static define(e) {
    if (e != null && e.base)
      throw new Error("Can not derive from a modified tag");
    let n = new Ro([], null, []);
    if (n.set.push(n), e)
      for (let r of e.set)
        n.set.push(r);
    return n;
  }
  /**
  Define a tag _modifier_, which is a function that, given a tag,
  will return a tag that is a subtag of the original. Applying the
  same modifier to a twice tag will return the same value (`m1(t1)
  == m1(t1)`) and applying multiple modifiers will, regardless or
  order, produce the same tag (`m1(m2(t1)) == m2(m1(t1))`).
  
  When multiple modifiers are applied to a given base tag, each
  smaller set of modifiers is registered as a parent, so that for
  example `m1(m2(m3(t1)))` is a subtype of `m1(m2(t1))`,
  `m1(m3(t1)`, and so on.
  */
  static defineModifier() {
    let e = new lS();
    return (n) => n.modified.indexOf(e) > -1 ? n : lS.get(n.base || n, n.modified.concat(e).sort((r, i) => r.id - i.id));
  }
}
let plt = 0;
class lS {
  constructor() {
    this.instances = [], this.id = plt++;
  }
  static get(e, n) {
    if (!n.length)
      return e;
    let r = n[0].instances.find((s) => s.base == e && vlt(n, s.modified));
    if (r)
      return r;
    let i = [], a = new Ro(i, e, n);
    for (let s of n)
      s.instances.push(a);
    let o = glt(n);
    for (let s of e.set)
      if (!s.modified.length)
        for (let l of o)
          i.push(lS.get(s, l));
    return a;
  }
}
function vlt(t, e) {
  return t.length == e.length && t.every((n, r) => n == e[r]);
}
function glt(t) {
  let e = [[]];
  for (let n = 0; n < t.length; n++)
    for (let r = 0, i = e.length; r < i; r++)
      e.push(e[r].concat(t[n]));
  return e.sort((n, r) => r.length - n.length);
}
function p4(t) {
  let e = /* @__PURE__ */ Object.create(null);
  for (let n in t) {
    let r = t[n];
    Array.isArray(r) || (r = [r]);
    for (let i of n.split(" "))
      if (i) {
        let a = [], o = 2, s = i;
        for (let f = 0; ; ) {
          if (s == "..." && f > 0 && f + 3 == i.length) {
            o = 1;
            break;
          }
          let d = /^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);
          if (!d)
            throw new RangeError("Invalid path: " + i);
          if (a.push(d[0] == "*" ? "" : d[0][0] == '"' ? JSON.parse(d[0]) : d[0]), f += d[0].length, f == i.length)
            break;
          let h = i[f++];
          if (f == i.length && h == "!") {
            o = 0;
            break;
          }
          if (h != "/")
            throw new RangeError("Invalid path: " + i);
          s = i.slice(f);
        }
        let l = a.length - 1, u = a[l];
        if (!u)
          throw new RangeError("Invalid path: " + i);
        let c = new uS(r, o, l > 0 ? a.slice(0, l) : null);
        e[u] = c.sort(e[u]);
      }
  }
  return Doe.add(e);
}
const Doe = new Pt();
class uS {
  constructor(e, n, r, i) {
    this.tags = e, this.mode = n, this.context = r, this.next = i;
  }
  get opaque() {
    return this.mode == 0;
  }
  get inherit() {
    return this.mode == 1;
  }
  sort(e) {
    return !e || e.depth < this.depth ? (this.next = e, this) : (e.next = this.sort(e.next), e);
  }
  get depth() {
    return this.context ? this.context.length : 0;
  }
}
uS.empty = new uS([], 2, null);
function Roe(t, e) {
  let n = /* @__PURE__ */ Object.create(null);
  for (let a of t)
    if (!Array.isArray(a.tag))
      n[a.tag.id] = a.class;
    else
      for (let o of a.tag)
        n[o.id] = a.class;
  let { scope: r, all: i = null } = e || {};
  return {
    style: (a) => {
      let o = i;
      for (let s of a)
        for (let l of s.set) {
          let u = n[l.id];
          if (u) {
            o = o ? o + " " + u : u;
            break;
          }
        }
      return o;
    },
    scope: r
  };
}
function mlt(t, e) {
  let n = null;
  for (let r of t) {
    let i = r.style(e);
    i && (n = n ? n + " " + i : i);
  }
  return n;
}
function ylt(t, e, n, r = 0, i = t.length) {
  let a = new blt(r, Array.isArray(e) ? e : [e], n);
  a.highlightRange(t.cursor(), r, i, "", a.highlighters), a.flush(i);
}
class blt {
  constructor(e, n, r) {
    this.at = e, this.highlighters = n, this.span = r, this.class = "";
  }
  startSpan(e, n) {
    n != this.class && (this.flush(e), e > this.at && (this.at = e), this.class = n);
  }
  flush(e) {
    e > this.at && this.class && this.span(this.at, e, this.class);
  }
  highlightRange(e, n, r, i, a) {
    let { type: o, from: s, to: l } = e;
    if (s >= r || l <= n)
      return;
    o.isTop && (a = this.highlighters.filter((h) => !h.scope || h.scope(o)));
    let u = i, c = _lt(e) || uS.empty, f = mlt(a, c.tags);
    if (f && (u && (u += " "), u += f, c.mode == 1 && (i += (i ? " " : "") + f)), this.startSpan(Math.max(n, s), u), c.opaque)
      return;
    let d = e.tree && e.tree.prop(Pt.mounted);
    if (d && d.overlay) {
      let h = e.node.enter(d.overlay[0].from + s, 1), p = this.highlighters.filter((g) => !g.scope || g.scope(d.tree.type)), v = e.firstChild();
      for (let g = 0, m = s; ; g++) {
        let y = g < d.overlay.length ? d.overlay[g] : null, b = y ? y.from + s : l, _ = Math.max(n, m), O = Math.min(r, b);
        if (_ < O && v)
          for (; e.from < O && (this.highlightRange(e, _, O, i, a), this.startSpan(Math.min(O, e.to), u), !(e.to >= b || !e.nextSibling())); )
            ;
        if (!y || b > r)
          break;
        m = y.to + s, m > n && (this.highlightRange(h.cursor(), Math.max(n, y.from + s), Math.min(r, m), "", p), this.startSpan(Math.min(r, m), u));
      }
      v && e.parent();
    } else if (e.firstChild()) {
      d && (i = "");
      do
        if (!(e.to <= n)) {
          if (e.from >= r)
            break;
          this.highlightRange(e, n, r, i, a), this.startSpan(Math.min(r, e.to), u);
        }
      while (e.nextSibling());
      e.parent();
    }
  }
}
function _lt(t) {
  let e = t.type.prop(Doe);
  for (; e && e.context && !t.matchContext(e.context); )
    e = e.next;
  return e || null;
}
const Ae = Ro.define, r_ = Ae(), Tl = Ae(), T9 = Ae(Tl), P9 = Ae(Tl), Pl = Ae(), i_ = Ae(Pl), T$ = Ae(Pl), Eo = Ae(), cc = Ae(Eo), Co = Ae(), To = Ae(), zM = Ae(), Ev = Ae(zM), a_ = Ae(), J = {
  /**
  A comment.
  */
  comment: r_,
  /**
  A line [comment](#highlight.tags.comment).
  */
  lineComment: Ae(r_),
  /**
  A block [comment](#highlight.tags.comment).
  */
  blockComment: Ae(r_),
  /**
  A documentation [comment](#highlight.tags.comment).
  */
  docComment: Ae(r_),
  /**
  Any kind of identifier.
  */
  name: Tl,
  /**
  The [name](#highlight.tags.name) of a variable.
  */
  variableName: Ae(Tl),
  /**
  A type [name](#highlight.tags.name).
  */
  typeName: T9,
  /**
  A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
  */
  tagName: Ae(T9),
  /**
  A property or field [name](#highlight.tags.name).
  */
  propertyName: P9,
  /**
  An attribute name (subtag of [`propertyName`](#highlight.tags.propertyName)).
  */
  attributeName: Ae(P9),
  /**
  The [name](#highlight.tags.name) of a class.
  */
  className: Ae(Tl),
  /**
  A label [name](#highlight.tags.name).
  */
  labelName: Ae(Tl),
  /**
  A namespace [name](#highlight.tags.name).
  */
  namespace: Ae(Tl),
  /**
  The [name](#highlight.tags.name) of a macro.
  */
  macroName: Ae(Tl),
  /**
  A literal value.
  */
  literal: Pl,
  /**
  A string [literal](#highlight.tags.literal).
  */
  string: i_,
  /**
  A documentation [string](#highlight.tags.string).
  */
  docString: Ae(i_),
  /**
  A character literal (subtag of [string](#highlight.tags.string)).
  */
  character: Ae(i_),
  /**
  An attribute value (subtag of [string](#highlight.tags.string)).
  */
  attributeValue: Ae(i_),
  /**
  A number [literal](#highlight.tags.literal).
  */
  number: T$,
  /**
  An integer [number](#highlight.tags.number) literal.
  */
  integer: Ae(T$),
  /**
  A floating-point [number](#highlight.tags.number) literal.
  */
  float: Ae(T$),
  /**
  A boolean [literal](#highlight.tags.literal).
  */
  bool: Ae(Pl),
  /**
  Regular expression [literal](#highlight.tags.literal).
  */
  regexp: Ae(Pl),
  /**
  An escape [literal](#highlight.tags.literal), for example a
  backslash escape in a string.
  */
  escape: Ae(Pl),
  /**
  A color [literal](#highlight.tags.literal).
  */
  color: Ae(Pl),
  /**
  A URL [literal](#highlight.tags.literal).
  */
  url: Ae(Pl),
  /**
  A language keyword.
  */
  keyword: Co,
  /**
  The [keyword](#highlight.tags.keyword) for the self or this
  object.
  */
  self: Ae(Co),
  /**
  The [keyword](#highlight.tags.keyword) for null.
  */
  null: Ae(Co),
  /**
  A [keyword](#highlight.tags.keyword) denoting some atomic value.
  */
  atom: Ae(Co),
  /**
  A [keyword](#highlight.tags.keyword) that represents a unit.
  */
  unit: Ae(Co),
  /**
  A modifier [keyword](#highlight.tags.keyword).
  */
  modifier: Ae(Co),
  /**
  A [keyword](#highlight.tags.keyword) that acts as an operator.
  */
  operatorKeyword: Ae(Co),
  /**
  A control-flow related [keyword](#highlight.tags.keyword).
  */
  controlKeyword: Ae(Co),
  /**
  A [keyword](#highlight.tags.keyword) that defines something.
  */
  definitionKeyword: Ae(Co),
  /**
  A [keyword](#highlight.tags.keyword) related to defining or
  interfacing with modules.
  */
  moduleKeyword: Ae(Co),
  /**
  An operator.
  */
  operator: To,
  /**
  An [operator](#highlight.tags.operator) that dereferences something.
  */
  derefOperator: Ae(To),
  /**
  Arithmetic-related [operator](#highlight.tags.operator).
  */
  arithmeticOperator: Ae(To),
  /**
  Logical [operator](#highlight.tags.operator).
  */
  logicOperator: Ae(To),
  /**
  Bit [operator](#highlight.tags.operator).
  */
  bitwiseOperator: Ae(To),
  /**
  Comparison [operator](#highlight.tags.operator).
  */
  compareOperator: Ae(To),
  /**
  [Operator](#highlight.tags.operator) that updates its operand.
  */
  updateOperator: Ae(To),
  /**
  [Operator](#highlight.tags.operator) that defines something.
  */
  definitionOperator: Ae(To),
  /**
  Type-related [operator](#highlight.tags.operator).
  */
  typeOperator: Ae(To),
  /**
  Control-flow [operator](#highlight.tags.operator).
  */
  controlOperator: Ae(To),
  /**
  Program or markup punctuation.
  */
  punctuation: zM,
  /**
  [Punctuation](#highlight.tags.punctuation) that separates
  things.
  */
  separator: Ae(zM),
  /**
  Bracket-style [punctuation](#highlight.tags.punctuation).
  */
  bracket: Ev,
  /**
  Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
  tokens).
  */
  angleBracket: Ae(Ev),
  /**
  Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
  tokens).
  */
  squareBracket: Ae(Ev),
  /**
  Parentheses (usually `(` and `)` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  paren: Ae(Ev),
  /**
  Braces (usually `{` and `}` tokens). Subtag of
  [bracket](#highlight.tags.bracket).
  */
  brace: Ae(Ev),
  /**
  Content, for example plain text in XML or markup documents.
  */
  content: Eo,
  /**
  [Content](#highlight.tags.content) that represents a heading.
  */
  heading: cc,
  /**
  A level 1 [heading](#highlight.tags.heading).
  */
  heading1: Ae(cc),
  /**
  A level 2 [heading](#highlight.tags.heading).
  */
  heading2: Ae(cc),
  /**
  A level 3 [heading](#highlight.tags.heading).
  */
  heading3: Ae(cc),
  /**
  A level 4 [heading](#highlight.tags.heading).
  */
  heading4: Ae(cc),
  /**
  A level 5 [heading](#highlight.tags.heading).
  */
  heading5: Ae(cc),
  /**
  A level 6 [heading](#highlight.tags.heading).
  */
  heading6: Ae(cc),
  /**
  A prose separator (such as a horizontal rule).
  */
  contentSeparator: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that represents a list.
  */
  list: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that represents a quote.
  */
  quote: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that is emphasized.
  */
  emphasis: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that is styled strong.
  */
  strong: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that is part of a link.
  */
  link: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that is styled as code or
  monospace.
  */
  monospace: Ae(Eo),
  /**
  [Content](#highlight.tags.content) that has a strike-through
  style.
  */
  strikethrough: Ae(Eo),
  /**
  Inserted text in a change-tracking format.
  */
  inserted: Ae(),
  /**
  Deleted text.
  */
  deleted: Ae(),
  /**
  Changed text.
  */
  changed: Ae(),
  /**
  An invalid or unsyntactic element.
  */
  invalid: Ae(),
  /**
  Metadata or meta-instruction.
  */
  meta: a_,
  /**
  [Metadata](#highlight.tags.meta) that applies to the entire
  document.
  */
  documentMeta: Ae(a_),
  /**
  [Metadata](#highlight.tags.meta) that annotates or adds
  attributes to a given syntactic element.
  */
  annotation: Ae(a_),
  /**
  Processing instruction or preprocessor directive. Subtag of
  [meta](#highlight.tags.meta).
  */
  processingInstruction: Ae(a_),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that a
  given element is being defined. Expected to be used with the
  various [name](#highlight.tags.name) tags.
  */
  definition: Ro.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates that
  something is constant. Mostly expected to be used with
  [variable names](#highlight.tags.variableName).
  */
  constant: Ro.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) used to indicate that
  a [variable](#highlight.tags.variableName) or [property
  name](#highlight.tags.propertyName) is being called or defined
  as a function.
  */
  function: Ro.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that can be applied to
  [names](#highlight.tags.name) to indicate that they belong to
  the language's standard environment.
  */
  standard: Ro.defineModifier(),
  /**
  [Modifier](#highlight.Tag^defineModifier) that indicates a given
  [names](#highlight.tags.name) is local to some scope.
  */
  local: Ro.defineModifier(),
  /**
  A generic variant [modifier](#highlight.Tag^defineModifier) that
  can be used to tag language-specific alternative variants of
  some common tag. It is recommended for themes to define special
  forms of at least the [string](#highlight.tags.string) and
  [variable name](#highlight.tags.variableName) tags, since those
  come up a lot.
  */
  special: Ro.defineModifier()
};
Roe([
  { tag: J.link, class: "tok-link" },
  { tag: J.heading, class: "tok-heading" },
  { tag: J.emphasis, class: "tok-emphasis" },
  { tag: J.strong, class: "tok-strong" },
  { tag: J.keyword, class: "tok-keyword" },
  { tag: J.atom, class: "tok-atom" },
  { tag: J.bool, class: "tok-bool" },
  { tag: J.url, class: "tok-url" },
  { tag: J.labelName, class: "tok-labelName" },
  { tag: J.inserted, class: "tok-inserted" },
  { tag: J.deleted, class: "tok-deleted" },
  { tag: J.literal, class: "tok-literal" },
  { tag: J.string, class: "tok-string" },
  { tag: J.number, class: "tok-number" },
  { tag: [J.regexp, J.escape, J.special(J.string)], class: "tok-string2" },
  { tag: J.variableName, class: "tok-variableName" },
  { tag: J.local(J.variableName), class: "tok-variableName tok-local" },
  { tag: J.definition(J.variableName), class: "tok-variableName tok-definition" },
  { tag: J.special(J.variableName), class: "tok-variableName2" },
  { tag: J.definition(J.propertyName), class: "tok-propertyName tok-definition" },
  { tag: J.typeName, class: "tok-typeName" },
  { tag: J.namespace, class: "tok-namespace" },
  { tag: J.className, class: "tok-className" },
  { tag: J.macroName, class: "tok-macroName" },
  { tag: J.propertyName, class: "tok-propertyName" },
  { tag: J.operator, class: "tok-operator" },
  { tag: J.comment, class: "tok-comment" },
  { tag: J.meta, class: "tok-meta" },
  { tag: J.invalid, class: "tok-invalid" },
  { tag: J.punctuation, class: "tok-punctuation" }
]);
var P$;
const Hd = /* @__PURE__ */ new Pt();
function koe(t) {
  return Be.define({
    combine: t ? (e) => e.concat(t) : void 0
  });
}
const v4 = /* @__PURE__ */ new Pt();
class Ya {
  /**
  Construct a language object. If you need to invoke this
  directly, first define a data facet with
  [`defineLanguageFacet`](https://codemirror.net/6/docs/ref/#language.defineLanguageFacet), and then
  configure your parser to [attach](https://codemirror.net/6/docs/ref/#language.languageDataProp) it
  to the language's outer syntax node.
  */
  constructor(e, n, r = [], i = "") {
    this.data = e, this.name = i, At.prototype.hasOwnProperty("tree") || Object.defineProperty(At.prototype, "tree", { get() {
      return nr(this);
    } }), this.parser = n, this.extension = [
      yu.of(this),
      At.languageData.of((a, o, s) => {
        let l = $9(a, o, s), u = l.type.prop(Hd);
        if (!u)
          return [];
        let c = a.facet(u), f = l.type.prop(v4);
        if (f) {
          let d = l.resolve(o - l.from, s);
          for (let h of f)
            if (h.test(d, a)) {
              let p = a.facet(h.facet);
              return h.type == "replace" ? p : p.concat(c);
            }
        }
        return c;
      })
    ].concat(r);
  }
  /**
  Query whether this language is active at the given position.
  */
  isActiveAt(e, n, r = -1) {
    return $9(e, n, r).type.prop(Hd) == this.data;
  }
  /**
  Find the document regions that were parsed using this language.
  The returned regions will _include_ any nested languages rooted
  in this language, when those exist.
  */
  findRegions(e) {
    let n = e.facet(yu);
    if ((n == null ? void 0 : n.data) == this.data)
      return [{ from: 0, to: e.doc.length }];
    if (!n || !n.allowsNesting)
      return [];
    let r = [], i = (a, o) => {
      if (a.prop(Hd) == this.data) {
        r.push({ from: o, to: o + a.length });
        return;
      }
      let s = a.prop(Pt.mounted);
      if (s) {
        if (s.tree.prop(Hd) == this.data) {
          if (s.overlay)
            for (let l of s.overlay)
              r.push({ from: l.from + o, to: l.to + o });
          else
            r.push({ from: o, to: o + a.length });
          return;
        } else if (s.overlay) {
          let l = r.length;
          if (i(s.tree, s.overlay[0].from + o), r.length > l)
            return;
        }
      }
      for (let l = 0; l < a.children.length; l++) {
        let u = a.children[l];
        u instanceof Wn && i(u, a.positions[l] + o);
      }
    };
    return i(nr(e), 0), r;
  }
  /**
  Indicates whether this language allows nested languages. The
  default implementation returns true.
  */
  get allowsNesting() {
    return !0;
  }
}
Ya.setState = /* @__PURE__ */ dt.define();
function $9(t, e, n) {
  let r = t.facet(yu), i = nr(t).topNode;
  if (!r || r.allowsNesting)
    for (let a = i; a; a = a.enter(e, n, Zn.ExcludeBuffers))
      a.type.isTop && (i = a);
  return i;
}
class e0 extends Ya {
  constructor(e, n, r) {
    super(e, n, [], r), this.parser = n;
  }
  /**
  Define a language from a parser.
  */
  static define(e) {
    let n = koe(e.languageData);
    return new e0(n, e.parser.configure({
      props: [Hd.add((r) => r.isTop ? n : void 0)]
    }), e.name);
  }
  /**
  Create a new instance of this language with a reconfigured
  version of its parser and optionally a new name.
  */
  configure(e, n) {
    return new e0(this.data, this.parser.configure(e), n || this.name);
  }
  get allowsNesting() {
    return this.parser.hasWrappers();
  }
}
function nr(t) {
  let e = t.field(Ya.state, !1);
  return e ? e.tree : Wn.empty;
}
class Olt {
  /**
  Create an input object for the given document.
  */
  constructor(e) {
    this.doc = e, this.cursorPos = 0, this.string = "", this.cursor = e.iter();
  }
  get length() {
    return this.doc.length;
  }
  syncTo(e) {
    return this.string = this.cursor.next(e - this.cursorPos).value, this.cursorPos = e + this.string.length, this.cursorPos - this.string.length;
  }
  chunk(e) {
    return this.syncTo(e), this.string;
  }
  get lineChunks() {
    return !0;
  }
  read(e, n) {
    let r = this.cursorPos - this.string.length;
    return e < r || n >= this.cursorPos ? this.doc.sliceString(e, n) : this.string.slice(e - r, n - r);
  }
}
let Mv = null;
class cS {
  constructor(e, n, r = [], i, a, o, s, l) {
    this.parser = e, this.state = n, this.fragments = r, this.tree = i, this.treeLen = a, this.viewport = o, this.skipped = s, this.scheduleOn = l, this.parse = null, this.tempSkipped = [];
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new cS(e, n, [], Wn.empty, 0, r, [], null);
  }
  startParse() {
    return this.parser.startParse(new Olt(this.state.doc), this.fragments);
  }
  /**
  @internal
  */
  work(e, n) {
    return n != null && n >= this.state.doc.length && (n = void 0), this.tree != Wn.empty && this.isDone(n ?? this.state.doc.length) ? (this.takeTree(), !0) : this.withContext(() => {
      var r;
      if (typeof e == "number") {
        let i = Date.now() + e;
        e = () => Date.now() > i;
      }
      for (this.parse || (this.parse = this.startParse()), n != null && (this.parse.stoppedAt == null || this.parse.stoppedAt > n) && n < this.state.doc.length && this.parse.stopAt(n); ; ) {
        let i = this.parse.advance();
        if (i)
          if (this.fragments = this.withoutTempSkipped(af.addTree(i, this.fragments, this.parse.stoppedAt != null)), this.treeLen = (r = this.parse.stoppedAt) !== null && r !== void 0 ? r : this.state.doc.length, this.tree = i, this.parse = null, this.treeLen < (n ?? this.state.doc.length))
            this.parse = this.startParse();
          else
            return !0;
        if (e())
          return !1;
      }
    });
  }
  /**
  @internal
  */
  takeTree() {
    let e, n;
    this.parse && (e = this.parse.parsedPos) >= this.treeLen && ((this.parse.stoppedAt == null || this.parse.stoppedAt > e) && this.parse.stopAt(e), this.withContext(() => {
      for (; !(n = this.parse.advance()); )
        ;
    }), this.treeLen = e, this.tree = n, this.fragments = this.withoutTempSkipped(af.addTree(this.tree, this.fragments, !0)), this.parse = null);
  }
  withContext(e) {
    let n = Mv;
    Mv = this;
    try {
      return e();
    } finally {
      Mv = n;
    }
  }
  withoutTempSkipped(e) {
    for (let n; n = this.tempSkipped.pop(); )
      e = A9(e, n.from, n.to);
    return e;
  }
  /**
  @internal
  */
  changes(e, n) {
    let { fragments: r, tree: i, treeLen: a, viewport: o, skipped: s } = this;
    if (this.takeTree(), !e.empty) {
      let l = [];
      if (e.iterChangedRanges((u, c, f, d) => l.push({ fromA: u, toA: c, fromB: f, toB: d })), r = af.applyChanges(r, l), i = Wn.empty, a = 0, o = { from: e.mapPos(o.from, -1), to: e.mapPos(o.to, 1) }, this.skipped.length) {
        s = [];
        for (let u of this.skipped) {
          let c = e.mapPos(u.from, 1), f = e.mapPos(u.to, -1);
          c < f && s.push({ from: c, to: f });
        }
      }
    }
    return new cS(this.parser, n, r, i, a, o, s, this.scheduleOn);
  }
  /**
  @internal
  */
  updateViewport(e) {
    if (this.viewport.from == e.from && this.viewport.to == e.to)
      return !1;
    this.viewport = e;
    let n = this.skipped.length;
    for (let r = 0; r < this.skipped.length; r++) {
      let { from: i, to: a } = this.skipped[r];
      i < e.to && a > e.from && (this.fragments = A9(this.fragments, i, a), this.skipped.splice(r--, 1));
    }
    return this.skipped.length >= n ? !1 : (this.reset(), !0);
  }
  /**
  @internal
  */
  reset() {
    this.parse && (this.takeTree(), this.parse = null);
  }
  /**
  Notify the parse scheduler that the given region was skipped
  because it wasn't in view, and the parse should be restarted
  when it comes into view.
  */
  skipUntilInView(e, n) {
    this.skipped.push({ from: e, to: n });
  }
  /**
  Returns a parser intended to be used as placeholder when
  asynchronously loading a nested parser. It'll skip its input and
  mark it as not-really-parsed, so that the next update will parse
  it again.
  
  When `until` is given, a reparse will be scheduled when that
  promise resolves.
  */
  static getSkippingParser(e) {
    return new class extends Ioe {
      createParse(n, r, i) {
        let a = i[0].from, o = i[i.length - 1].to;
        return {
          parsedPos: a,
          advance() {
            let l = Mv;
            if (l) {
              for (let u of i)
                l.tempSkipped.push(u);
              e && (l.scheduleOn = l.scheduleOn ? Promise.all([l.scheduleOn, e]) : e);
            }
            return this.parsedPos = o, new Wn(Ci.none, [], [], o - a);
          },
          stoppedAt: null,
          stopAt() {
          }
        };
      }
    }();
  }
  /**
  @internal
  */
  isDone(e) {
    e = Math.min(e, this.state.doc.length);
    let n = this.fragments;
    return this.treeLen >= e && n.length && n[0].from == 0 && n[0].to >= e;
  }
  /**
  Get the context for the current parse, or `null` if no editor
  parse is in progress.
  */
  static get() {
    return Mv;
  }
}
function A9(t, e, n) {
  return af.applyChanges(t, [{ fromA: e, toA: n, fromB: e, toB: n }]);
}
class qh {
  constructor(e) {
    this.context = e, this.tree = e.tree;
  }
  apply(e) {
    if (!e.docChanged && this.tree == this.context.tree)
      return this;
    let n = this.context.changes(e.changes, e.state), r = this.context.treeLen == e.startState.doc.length ? void 0 : Math.max(e.changes.mapPos(this.context.treeLen), n.viewport.to);
    return n.work(20, r) || n.takeTree(), new qh(n);
  }
  static init(e) {
    let n = Math.min(3e3, e.doc.length), r = cS.create(e.facet(yu).parser, e, { from: 0, to: n });
    return r.work(20, n) || r.takeTree(), new qh(r);
  }
}
Ya.state = /* @__PURE__ */ ur.define({
  create: qh.init,
  update(t, e) {
    for (let n of e.effects)
      if (n.is(Ya.setState))
        return n.value;
    return e.startState.facet(yu) != e.state.facet(yu) ? qh.init(e.state) : t.apply(e);
  }
});
let Loe = (t) => {
  let e = setTimeout(
    () => t(),
    500
    /* Work.MaxPause */
  );
  return () => clearTimeout(e);
};
typeof requestIdleCallback < "u" && (Loe = (t) => {
  let e = -1, n = setTimeout(
    () => {
      e = requestIdleCallback(t, {
        timeout: 400
        /* Work.MinPause */
      });
    },
    100
    /* Work.MinPause */
  );
  return () => e < 0 ? clearTimeout(n) : cancelIdleCallback(e);
});
const $$ = typeof navigator < "u" && (!((P$ = navigator.scheduling) === null || P$ === void 0) && P$.isInputPending) ? () => navigator.scheduling.isInputPending() : null, Slt = /* @__PURE__ */ kn.fromClass(class {
  constructor(e) {
    this.view = e, this.working = null, this.workScheduled = 0, this.chunkEnd = -1, this.chunkBudget = -1, this.work = this.work.bind(this), this.scheduleWork();
  }
  update(e) {
    let n = this.view.state.field(Ya.state).context;
    (n.updateViewport(e.view.viewport) || this.view.viewport.to > n.treeLen) && this.scheduleWork(), (e.docChanged || e.selectionSet) && (this.view.hasFocus && (this.chunkBudget += 50), this.scheduleWork()), this.checkAsyncSchedule(n);
  }
  scheduleWork() {
    if (this.working)
      return;
    let { state: e } = this.view, n = e.field(Ya.state);
    (n.tree != n.context.tree || !n.context.isDone(e.doc.length)) && (this.working = Loe(this.work));
  }
  work(e) {
    this.working = null;
    let n = Date.now();
    if (this.chunkEnd < n && (this.chunkEnd < 0 || this.view.hasFocus) && (this.chunkEnd = n + 3e4, this.chunkBudget = 3e3), this.chunkBudget <= 0)
      return;
    let { state: r, viewport: { to: i } } = this.view, a = r.field(Ya.state);
    if (a.tree == a.context.tree && a.context.isDone(
      i + 1e5
      /* Work.MaxParseAhead */
    ))
      return;
    let o = Date.now() + Math.min(this.chunkBudget, 100, e && !$$ ? Math.max(25, e.timeRemaining() - 5) : 1e9), s = a.context.treeLen < i && r.doc.length > i + 1e3, l = a.context.work(() => $$ && $$() || Date.now() > o, i + (s ? 0 : 1e5));
    this.chunkBudget -= Date.now() - n, (l || this.chunkBudget <= 0) && (a.context.takeTree(), this.view.dispatch({ effects: Ya.setState.of(new qh(a.context)) })), this.chunkBudget > 0 && !(l && !s) && this.scheduleWork(), this.checkAsyncSchedule(a.context);
  }
  checkAsyncSchedule(e) {
    e.scheduleOn && (this.workScheduled++, e.scheduleOn.then(() => this.scheduleWork()).catch((n) => mi(this.view.state, n)).then(() => this.workScheduled--), e.scheduleOn = null);
  }
  destroy() {
    this.working && this.working();
  }
  isWorking() {
    return !!(this.working || this.workScheduled > 0);
  }
}, {
  eventHandlers: { focus() {
    this.scheduleWork();
  } }
}), yu = /* @__PURE__ */ Be.define({
  combine(t) {
    return t.length ? t[0] : null;
  },
  enables: (t) => [
    Ya.state,
    Slt,
    De.contentAttributes.compute([t], (e) => {
      let n = e.facet(t);
      return n && n.name ? { "data-language": n.name } : {};
    })
  ]
});
class Noe {
  /**
  Create a language support object.
  */
  constructor(e, n = []) {
    this.language = e, this.support = n, this.extension = [e, n];
  }
}
const xlt = /* @__PURE__ */ Be.define(), ly = /* @__PURE__ */ Be.define({
  combine: (t) => {
    if (!t.length)
      return "  ";
    let e = t[0];
    if (!e || /\S/.test(e) || Array.from(e).some((n) => n != e[0]))
      throw new Error("Invalid indent unit: " + JSON.stringify(t[0]));
    return e;
  }
});
function fS(t) {
  let e = t.facet(ly);
  return e.charCodeAt(0) == 9 ? t.tabSize * e.length : e.length;
}
function t0(t, e) {
  let n = "", r = t.tabSize, i = t.facet(ly)[0];
  if (i == "	") {
    for (; e >= r; )
      n += "	", e -= r;
    i = " ";
  }
  for (let a = 0; a < e; a++)
    n += i;
  return n;
}
function g4(t, e) {
  t instanceof At && (t = new kw(t));
  for (let r of t.state.facet(xlt)) {
    let i = r(t, e);
    if (i !== void 0)
      return i;
  }
  let n = nr(t.state);
  return n.length >= e ? wlt(t, n, e) : null;
}
class kw {
  /**
  Create an indent context.
  */
  constructor(e, n = {}) {
    this.state = e, this.options = n, this.unit = fS(e);
  }
  /**
  Get a description of the line at the given position, taking
  [simulated line
  breaks](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  into account. If there is such a break at `pos`, the `bias`
  argument determines whether the part of the line line before or
  after the break is used.
  */
  lineAt(e, n = 1) {
    let r = this.state.doc.lineAt(e), { simulateBreak: i, simulateDoubleBreak: a } = this.options;
    return i != null && i >= r.from && i <= r.to ? a && i == e ? { text: "", from: e } : (n < 0 ? i < e : i <= e) ? { text: r.text.slice(i - r.from), from: i } : { text: r.text.slice(0, i - r.from), from: r.from } : r;
  }
  /**
  Get the text directly after `pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  textAfterPos(e, n = 1) {
    if (this.options.simulateDoubleBreak && e == this.options.simulateBreak)
      return "";
    let { text: r, from: i } = this.lineAt(e, n);
    return r.slice(e - i, Math.min(r.length, e + 100 - i));
  }
  /**
  Find the column for the given position.
  */
  column(e, n = 1) {
    let { text: r, from: i } = this.lineAt(e, n), a = this.countColumn(r, e - i), o = this.options.overrideIndentation ? this.options.overrideIndentation(i) : -1;
    return o > -1 && (a += o - this.countColumn(r, r.search(/\S|$/))), a;
  }
  /**
  Find the column position (taking tabs into account) of the given
  position in the given string.
  */
  countColumn(e, n = e.length) {
    return Rp(e, this.state.tabSize, n);
  }
  /**
  Find the indentation column of the line at the given point.
  */
  lineIndent(e, n = 1) {
    let { text: r, from: i } = this.lineAt(e, n), a = this.options.overrideIndentation;
    if (a) {
      let o = a(i);
      if (o > -1)
        return o;
    }
    return this.countColumn(r, r.search(/\S|$/));
  }
  /**
  Returns the [simulated line
  break](https://codemirror.net/6/docs/ref/#language.IndentContext.constructor^options.simulateBreak)
  for this context, if any.
  */
  get simulatedBreak() {
    return this.options.simulateBreak || null;
  }
}
const m4 = /* @__PURE__ */ new Pt();
function wlt(t, e, n) {
  let r = e.resolveStack(n), i = r.node.enterUnfinishedNodesBefore(n);
  if (i != r.node) {
    let a = [];
    for (let o = i; o != r.node; o = o.parent)
      a.push(o);
    for (let o = a.length - 1; o >= 0; o--)
      r = { node: a[o], next: r };
  }
  return Boe(r, t, n);
}
function Boe(t, e, n) {
  for (let r = t; r; r = r.next) {
    let i = Tlt(r.node);
    if (i)
      return i(y4.create(e, n, r));
  }
  return 0;
}
function Clt(t) {
  return t.pos == t.options.simulateBreak && t.options.simulateDoubleBreak;
}
function Tlt(t) {
  let e = t.type.prop(m4);
  if (e)
    return e;
  let n = t.firstChild, r;
  if (n && (r = n.type.prop(Pt.closedBy))) {
    let i = t.lastChild, a = i && r.indexOf(i.name) > -1;
    return (o) => zoe(o, !0, 1, void 0, a && !Clt(o) ? i.from : void 0);
  }
  return t.parent == null ? Plt : null;
}
function Plt() {
  return 0;
}
class y4 extends kw {
  constructor(e, n, r) {
    super(e.state, e.options), this.base = e, this.pos = n, this.context = r;
  }
  /**
  The syntax tree node to which the indentation strategy
  applies.
  */
  get node() {
    return this.context.node;
  }
  /**
  @internal
  */
  static create(e, n, r) {
    return new y4(e, n, r);
  }
  /**
  Get the text directly after `this.pos`, either the entire line
  or the next 100 characters, whichever is shorter.
  */
  get textAfter() {
    return this.textAfterPos(this.pos);
  }
  /**
  Get the indentation at the reference line for `this.node`, which
  is the line on which it starts, unless there is a node that is
  _not_ a parent of this node covering the start of that line. If
  so, the line at the start of that node is tried, again skipping
  on if it is covered by another such node.
  */
  get baseIndent() {
    return this.baseIndentFor(this.node);
  }
  /**
  Get the indentation for the reference line of the given node
  (see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
  */
  baseIndentFor(e) {
    let n = this.state.doc.lineAt(e.from);
    for (; ; ) {
      let r = e.resolve(n.from);
      for (; r.parent && r.parent.from == r.from; )
        r = r.parent;
      if ($lt(r, e))
        break;
      n = this.state.doc.lineAt(r.from);
    }
    return this.lineIndent(n.from);
  }
  /**
  Continue looking for indentations in the node's parent nodes,
  and return the result of that.
  */
  continue() {
    return Boe(this.context.next, this.base, this.pos);
  }
}
function $lt(t, e) {
  for (let n = e; n; n = n.parent)
    if (t == n)
      return !0;
  return !1;
}
function Alt(t) {
  let e = t.node, n = e.childAfter(e.from), r = e.lastChild;
  if (!n)
    return null;
  let i = t.options.simulateBreak, a = t.state.doc.lineAt(n.from), o = i == null || i <= a.from ? a.to : Math.min(a.to, i);
  for (let s = n.to; ; ) {
    let l = e.childAfter(s);
    if (!l || l == r)
      return null;
    if (!l.type.isSkipped)
      return l.from < o ? n : null;
    s = l.to;
  }
}
function Elt({ closing: t, align: e = !0, units: n = 1 }) {
  return (r) => zoe(r, e, n, t);
}
function zoe(t, e, n, r, i) {
  let a = t.textAfter, o = a.match(/^\s*/)[0].length, s = r && a.slice(o, o + r.length) == r || i == t.pos + o, l = e ? Alt(t) : null;
  return l ? s ? t.column(l.from) : t.column(l.to) : t.baseIndent + (s ? 0 : t.unit * n);
}
const Mlt = (t) => t.baseIndent;
function Gg({ except: t, units: e = 1 } = {}) {
  return (n) => {
    let r = t && t.test(n.textAfter);
    return n.baseIndent + (r ? 0 : e * n.unit);
  };
}
const Ilt = 200;
function Dlt() {
  return At.transactionFilter.of((t) => {
    if (!t.docChanged || !t.isUserEvent("input.type") && !t.isUserEvent("input.complete"))
      return t;
    let e = t.startState.languageDataAt("indentOnInput", t.startState.selection.main.head);
    if (!e.length)
      return t;
    let n = t.newDoc, { head: r } = t.newSelection.main, i = n.lineAt(r);
    if (r > i.from + Ilt)
      return t;
    let a = n.sliceString(i.from, r);
    if (!e.some((u) => u.test(a)))
      return t;
    let { state: o } = t, s = -1, l = [];
    for (let { head: u } of o.selection.ranges) {
      let c = o.doc.lineAt(u);
      if (c.from == s)
        continue;
      s = c.from;
      let f = g4(o, c.from);
      if (f == null)
        continue;
      let d = /^\s*/.exec(c.text)[0], h = t0(o, f);
      d != h && l.push({ from: c.from, to: c.from + d.length, insert: h });
    }
    return l.length ? [t, { changes: l, sequential: !0 }] : t;
  });
}
const Rlt = /* @__PURE__ */ Be.define(), b4 = /* @__PURE__ */ new Pt();
function Voe(t) {
  let e = t.firstChild, n = t.lastChild;
  return e && e.to < n.from ? { from: e.to, to: n.type.isError ? t.to : n.from } : null;
}
function klt(t, e, n) {
  let r = nr(t);
  if (r.length < n)
    return null;
  let i = r.resolveStack(n, 1), a = null;
  for (let o = i; o; o = o.next) {
    let s = o.node;
    if (s.to <= n || s.from > n)
      continue;
    if (a && s.from < e)
      break;
    let l = s.type.prop(b4);
    if (l && (s.to < r.length - 50 || r.length == t.doc.length || !Llt(s))) {
      let u = l(s, t);
      u && u.from <= n && u.from >= e && u.to > n && (a = u);
    }
  }
  return a;
}
function Llt(t) {
  let e = t.lastChild;
  return e && e.to == t.to && e.type.isError;
}
function dS(t, e, n) {
  for (let r of t.facet(Rlt)) {
    let i = r(t, e, n);
    if (i)
      return i;
  }
  return klt(t, e, n);
}
function Foe(t, e) {
  let n = e.mapPos(t.from, 1), r = e.mapPos(t.to, -1);
  return n >= r ? void 0 : { from: n, to: r };
}
const Lw = /* @__PURE__ */ dt.define({ map: Foe }), uy = /* @__PURE__ */ dt.define({ map: Foe });
function Woe(t) {
  let e = [];
  for (let { head: n } of t.state.selection.ranges)
    e.some((r) => r.from <= n && r.to >= n) || e.push(t.lineBlockAt(n));
  return e;
}
const $f = /* @__PURE__ */ ur.define({
  create() {
    return Ze.none;
  },
  update(t, e) {
    t = t.map(e.changes);
    for (let n of e.effects)
      if (n.is(Lw) && !Nlt(t, n.value.from, n.value.to)) {
        let { preparePlaceholder: r } = e.state.facet(Goe), i = r ? Ze.replace({ widget: new Hlt(r(e.state, n.value)) }) : E9;
        t = t.update({ add: [i.range(n.value.from, n.value.to)] });
      } else n.is(uy) && (t = t.update({
        filter: (r, i) => n.value.from != r || n.value.to != i,
        filterFrom: n.value.from,
        filterTo: n.value.to
      }));
    if (e.selection) {
      let n = !1, { head: r } = e.selection.main;
      t.between(r, r, (i, a) => {
        i < r && a > r && (n = !0);
      }), n && (t = t.update({
        filterFrom: r,
        filterTo: r,
        filter: (i, a) => a <= r || i >= r
      }));
    }
    return t;
  },
  provide: (t) => De.decorations.from(t),
  toJSON(t, e) {
    let n = [];
    return t.between(0, e.doc.length, (r, i) => {
      n.push(r, i);
    }), n;
  },
  fromJSON(t) {
    if (!Array.isArray(t) || t.length % 2)
      throw new RangeError("Invalid JSON for fold state");
    let e = [];
    for (let n = 0; n < t.length; ) {
      let r = t[n++], i = t[n++];
      if (typeof r != "number" || typeof i != "number")
        throw new RangeError("Invalid JSON for fold state");
      e.push(E9.range(r, i));
    }
    return Ze.set(e, !0);
  }
});
function hS(t, e, n) {
  var r;
  let i = null;
  return (r = t.field($f, !1)) === null || r === void 0 || r.between(e, n, (a, o) => {
    (!i || i.from > a) && (i = { from: a, to: o });
  }), i;
}
function Nlt(t, e, n) {
  let r = !1;
  return t.between(e, e, (i, a) => {
    i == e && a == n && (r = !0);
  }), r;
}
function Qoe(t, e) {
  return t.field($f, !1) ? e : e.concat(dt.appendConfig.of(joe()));
}
const Blt = (t) => {
  for (let e of Woe(t)) {
    let n = dS(t.state, e.from, e.to);
    if (n)
      return t.dispatch({ effects: Qoe(t.state, [Lw.of(n), Hoe(t, n)]) }), !0;
  }
  return !1;
}, zlt = (t) => {
  if (!t.state.field($f, !1))
    return !1;
  let e = [];
  for (let n of Woe(t)) {
    let r = hS(t.state, n.from, n.to);
    r && e.push(uy.of(r), Hoe(t, r, !1));
  }
  return e.length && t.dispatch({ effects: e }), e.length > 0;
};
function Hoe(t, e, n = !0) {
  let r = t.state.doc.lineAt(e.from).number, i = t.state.doc.lineAt(e.to).number;
  return De.announce.of(`${t.state.phrase(n ? "Folded lines" : "Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`);
}
const Vlt = (t) => {
  let { state: e } = t, n = [];
  for (let r = 0; r < e.doc.length; ) {
    let i = t.lineBlockAt(r), a = dS(e, i.from, i.to);
    a && n.push(Lw.of(a)), r = (a ? t.lineBlockAt(a.to) : i).to + 1;
  }
  return n.length && t.dispatch({ effects: Qoe(t.state, n) }), !!n.length;
}, Flt = (t) => {
  let e = t.state.field($f, !1);
  if (!e || !e.size)
    return !1;
  let n = [];
  return e.between(0, t.state.doc.length, (r, i) => {
    n.push(uy.of({ from: r, to: i }));
  }), t.dispatch({ effects: n }), !0;
}, Wlt = [
  { key: "Ctrl-Shift-[", mac: "Cmd-Alt-[", run: Blt },
  { key: "Ctrl-Shift-]", mac: "Cmd-Alt-]", run: zlt },
  { key: "Ctrl-Alt-[", run: Vlt },
  { key: "Ctrl-Alt-]", run: Flt }
], Qlt = {
  placeholderDOM: null,
  preparePlaceholder: null,
  placeholderText: "…"
}, Goe = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, Qlt);
  }
});
function joe(t) {
  return [$f, Zlt];
}
function Zoe(t, e) {
  let { state: n } = t, r = n.facet(Goe), i = (o) => {
    let s = t.lineBlockAt(t.posAtDOM(o.target)), l = hS(t.state, s.from, s.to);
    l && t.dispatch({ effects: uy.of(l) }), o.preventDefault();
  };
  if (r.placeholderDOM)
    return r.placeholderDOM(t, i, e);
  let a = document.createElement("span");
  return a.textContent = r.placeholderText, a.setAttribute("aria-label", n.phrase("folded code")), a.title = n.phrase("unfold"), a.className = "cm-foldPlaceholder", a.onclick = i, a;
}
const E9 = /* @__PURE__ */ Ze.replace({ widget: /* @__PURE__ */ new class extends ds {
  toDOM(t) {
    return Zoe(t, null);
  }
}() });
class Hlt extends ds {
  constructor(e) {
    super(), this.value = e;
  }
  eq(e) {
    return this.value == e.value;
  }
  toDOM(e) {
    return Zoe(e, this.value);
  }
}
const Glt = {
  openText: "⌄",
  closedText: "›",
  markerDOM: null,
  domEventHandlers: {},
  foldingChanged: () => !1
};
class A$ extends tl {
  constructor(e, n) {
    super(), this.config = e, this.open = n;
  }
  eq(e) {
    return this.config == e.config && this.open == e.open;
  }
  toDOM(e) {
    if (this.config.markerDOM)
      return this.config.markerDOM(this.open);
    let n = document.createElement("span");
    return n.textContent = this.open ? this.config.openText : this.config.closedText, n.title = e.state.phrase(this.open ? "Fold line" : "Unfold line"), n;
  }
}
function jlt(t = {}) {
  let e = Object.assign(Object.assign({}, Glt), t), n = new A$(e, !0), r = new A$(e, !1), i = kn.fromClass(class {
    constructor(o) {
      this.from = o.viewport.from, this.markers = this.buildMarkers(o);
    }
    update(o) {
      (o.docChanged || o.viewportChanged || o.startState.facet(yu) != o.state.facet(yu) || o.startState.field($f, !1) != o.state.field($f, !1) || nr(o.startState) != nr(o.state) || e.foldingChanged(o)) && (this.markers = this.buildMarkers(o.view));
    }
    buildMarkers(o) {
      let s = new hu();
      for (let l of o.viewportLineBlocks) {
        let u = hS(o.state, l.from, l.to) ? r : dS(o.state, l.from, l.to) ? n : null;
        u && s.add(l.from, l.from, u);
      }
      return s.finish();
    }
  }), { domEventHandlers: a } = e;
  return [
    i,
    Xst({
      class: "cm-foldGutter",
      markers(o) {
        var s;
        return ((s = o.plugin(i)) === null || s === void 0 ? void 0 : s.markers) || Vt.empty;
      },
      initialSpacer() {
        return new A$(e, !1);
      },
      domEventHandlers: Object.assign(Object.assign({}, a), { click: (o, s, l) => {
        if (a.click && a.click(o, s, l))
          return !0;
        let u = hS(o.state, s.from, s.to);
        if (u)
          return o.dispatch({ effects: uy.of(u) }), !0;
        let c = dS(o.state, s.from, s.to);
        return c ? (o.dispatch({ effects: Lw.of(c) }), !0) : !1;
      } })
    }),
    joe()
  ];
}
const Zlt = /* @__PURE__ */ De.baseTheme({
  ".cm-foldPlaceholder": {
    backgroundColor: "#eee",
    border: "1px solid #ddd",
    color: "#888",
    borderRadius: ".2em",
    margin: "0 1px",
    padding: "0 1px",
    cursor: "pointer"
  },
  ".cm-foldGutter span": {
    padding: "0 1px",
    cursor: "pointer"
  }
});
class cy {
  constructor(e, n) {
    this.specs = e;
    let r;
    function i(s) {
      let l = pu.newName();
      return (r || (r = /* @__PURE__ */ Object.create(null)))["." + l] = s, l;
    }
    const a = typeof n.all == "string" ? n.all : n.all ? i(n.all) : void 0, o = n.scope;
    this.scope = o instanceof Ya ? (s) => s.prop(Hd) == o.data : o ? (s) => s == o : void 0, this.style = Roe(e.map((s) => ({
      tag: s.tag,
      class: s.class || i(Object.assign({}, s, { tag: null }))
    })), {
      all: a
    }).style, this.module = r ? new pu(r) : null, this.themeType = n.themeType;
  }
  /**
  Create a highlighter style that associates the given styles to
  the given tags. The specs must be objects that hold a style tag
  or array of tags in their `tag` property, and either a single
  `class` property providing a static CSS class (for highlighter
  that rely on external styling), or a
  [`style-mod`](https://github.com/marijnh/style-mod#documentation)-style
  set of CSS properties (which define the styling for those tags).
  
  The CSS rules created for a highlighter will be emitted in the
  order of the spec's properties. That means that for elements that
  have multiple tags associated with them, styles defined further
  down in the list will have a higher CSS precedence than styles
  defined earlier.
  */
  static define(e, n) {
    return new cy(e, n || {});
  }
}
const VM = /* @__PURE__ */ Be.define(), Uoe = /* @__PURE__ */ Be.define({
  combine(t) {
    return t.length ? [t[0]] : null;
  }
});
function E$(t) {
  let e = t.facet(VM);
  return e.length ? e : t.facet(Uoe);
}
function Xoe(t, e) {
  let n = [Xlt], r;
  return t instanceof cy && (t.module && n.push(De.styleModule.of(t.module)), r = t.themeType), e != null && e.fallback ? n.push(Uoe.of(t)) : r ? n.push(VM.computeN([De.darkTheme], (i) => i.facet(De.darkTheme) == (r == "dark") ? [t] : [])) : n.push(VM.of(t)), n;
}
class Ult {
  constructor(e) {
    this.markCache = /* @__PURE__ */ Object.create(null), this.tree = nr(e.state), this.decorations = this.buildDeco(e, E$(e.state)), this.decoratedTo = e.viewport.to;
  }
  update(e) {
    let n = nr(e.state), r = E$(e.state), i = r != E$(e.startState), { viewport: a } = e.view, o = e.changes.mapPos(this.decoratedTo, 1);
    n.length < a.to && !i && n.type == this.tree.type && o >= a.to ? (this.decorations = this.decorations.map(e.changes), this.decoratedTo = o) : (n != this.tree || e.viewportChanged || i) && (this.tree = n, this.decorations = this.buildDeco(e.view, r), this.decoratedTo = a.to);
  }
  buildDeco(e, n) {
    if (!n || !this.tree.length)
      return Ze.none;
    let r = new hu();
    for (let { from: i, to: a } of e.visibleRanges)
      ylt(this.tree, n, (o, s, l) => {
        r.add(o, s, this.markCache[l] || (this.markCache[l] = Ze.mark({ class: l })));
      }, i, a);
    return r.finish();
  }
}
const Xlt = /* @__PURE__ */ Eu.high(/* @__PURE__ */ kn.fromClass(Ult, {
  decorations: (t) => t.decorations
})), Ylt = /* @__PURE__ */ cy.define([
  {
    tag: J.meta,
    color: "#404740"
  },
  {
    tag: J.link,
    textDecoration: "underline"
  },
  {
    tag: J.heading,
    textDecoration: "underline",
    fontWeight: "bold"
  },
  {
    tag: J.emphasis,
    fontStyle: "italic"
  },
  {
    tag: J.strong,
    fontWeight: "bold"
  },
  {
    tag: J.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: J.keyword,
    color: "#708"
  },
  {
    tag: [J.atom, J.bool, J.url, J.contentSeparator, J.labelName],
    color: "#219"
  },
  {
    tag: [J.literal, J.inserted],
    color: "#164"
  },
  {
    tag: [J.string, J.deleted],
    color: "#a11"
  },
  {
    tag: [J.regexp, J.escape, /* @__PURE__ */ J.special(J.string)],
    color: "#e40"
  },
  {
    tag: /* @__PURE__ */ J.definition(J.variableName),
    color: "#00f"
  },
  {
    tag: /* @__PURE__ */ J.local(J.variableName),
    color: "#30a"
  },
  {
    tag: [J.typeName, J.namespace],
    color: "#085"
  },
  {
    tag: J.className,
    color: "#167"
  },
  {
    tag: [/* @__PURE__ */ J.special(J.variableName), J.macroName],
    color: "#256"
  },
  {
    tag: /* @__PURE__ */ J.definition(J.propertyName),
    color: "#00c"
  },
  {
    tag: J.comment,
    color: "#940"
  },
  {
    tag: J.invalid,
    color: "#f00"
  }
]), qlt = /* @__PURE__ */ De.baseTheme({
  "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
  "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
}), Yoe = 1e4, qoe = "()[]{}", Koe = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, {
      afterCursor: !0,
      brackets: qoe,
      maxScanDistance: Yoe,
      renderMatch: eut
    });
  }
}), Klt = /* @__PURE__ */ Ze.mark({ class: "cm-matchingBracket" }), Jlt = /* @__PURE__ */ Ze.mark({ class: "cm-nonmatchingBracket" });
function eut(t) {
  let e = [], n = t.matched ? Klt : Jlt;
  return e.push(n.range(t.start.from, t.start.to)), t.end && e.push(n.range(t.end.from, t.end.to)), e;
}
const tut = /* @__PURE__ */ ur.define({
  create() {
    return Ze.none;
  },
  update(t, e) {
    if (!e.docChanged && !e.selection)
      return t;
    let n = [], r = e.state.facet(Koe);
    for (let i of e.state.selection.ranges) {
      if (!i.empty)
        continue;
      let a = Ho(e.state, i.head, -1, r) || i.head > 0 && Ho(e.state, i.head - 1, 1, r) || r.afterCursor && (Ho(e.state, i.head, 1, r) || i.head < e.state.doc.length && Ho(e.state, i.head + 1, -1, r));
      a && (n = n.concat(r.renderMatch(a, e.state)));
    }
    return Ze.set(n, !0);
  },
  provide: (t) => De.decorations.from(t)
}), nut = [
  tut,
  qlt
];
function rut(t = {}) {
  return [Koe.of(t), nut];
}
const iut = /* @__PURE__ */ new Pt();
function FM(t, e, n) {
  let r = t.prop(e < 0 ? Pt.openedBy : Pt.closedBy);
  if (r)
    return r;
  if (t.name.length == 1) {
    let i = n.indexOf(t.name);
    if (i > -1 && i % 2 == (e < 0 ? 1 : 0))
      return [n[i + e]];
  }
  return null;
}
function WM(t) {
  let e = t.type.prop(iut);
  return e ? e(t.node) : t;
}
function Ho(t, e, n, r = {}) {
  let i = r.maxScanDistance || Yoe, a = r.brackets || qoe, o = nr(t), s = o.resolveInner(e, n);
  for (let l = s; l; l = l.parent) {
    let u = FM(l.type, n, a);
    if (u && l.from < l.to) {
      let c = WM(l);
      if (c && (n > 0 ? e >= c.from && e < c.to : e > c.from && e <= c.to))
        return aut(t, e, n, l, c, u, a);
    }
  }
  return out(t, e, n, o, s.type, i, a);
}
function aut(t, e, n, r, i, a, o) {
  let s = r.parent, l = { from: i.from, to: i.to }, u = 0, c = s == null ? void 0 : s.cursor();
  if (c && (n < 0 ? c.childBefore(r.from) : c.childAfter(r.to)))
    do
      if (n < 0 ? c.to <= r.from : c.from >= r.to) {
        if (u == 0 && a.indexOf(c.type.name) > -1 && c.from < c.to) {
          let f = WM(c);
          return { start: l, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
        } else if (FM(c.type, n, o))
          u++;
        else if (FM(c.type, -n, o)) {
          if (u == 0) {
            let f = WM(c);
            return {
              start: l,
              end: f && f.from < f.to ? { from: f.from, to: f.to } : void 0,
              matched: !1
            };
          }
          u--;
        }
      }
    while (n < 0 ? c.prevSibling() : c.nextSibling());
  return { start: l, matched: !1 };
}
function out(t, e, n, r, i, a, o) {
  let s = n < 0 ? t.sliceDoc(e - 1, e) : t.sliceDoc(e, e + 1), l = o.indexOf(s);
  if (l < 0 || l % 2 == 0 != n > 0)
    return null;
  let u = { from: n < 0 ? e - 1 : e, to: n > 0 ? e + 1 : e }, c = t.doc.iterRange(e, n > 0 ? t.doc.length : 0), f = 0;
  for (let d = 0; !c.next().done && d <= a; ) {
    let h = c.value;
    n < 0 && (d += h.length);
    let p = e + d * n;
    for (let v = n > 0 ? 0 : h.length - 1, g = n > 0 ? h.length : -1; v != g; v += n) {
      let m = o.indexOf(h[v]);
      if (!(m < 0 || r.resolveInner(p + v, 1).type != i))
        if (m % 2 == 0 == n > 0)
          f++;
        else {
          if (f == 1)
            return { start: u, end: { from: p + v, to: p + v + 1 }, matched: m >> 1 == l >> 1 };
          f--;
        }
    }
    n > 0 && (d += h.length);
  }
  return c.done ? { start: u, matched: !1 } : null;
}
const sut = /* @__PURE__ */ Object.create(null), M9 = [Ci.none], I9 = [], D9 = /* @__PURE__ */ Object.create(null), lut = /* @__PURE__ */ Object.create(null);
for (let [t, e] of [
  ["variable", "variableName"],
  ["variable-2", "variableName.special"],
  ["string-2", "string.special"],
  ["def", "variableName.definition"],
  ["tag", "tagName"],
  ["attribute", "attributeName"],
  ["type", "typeName"],
  ["builtin", "variableName.standard"],
  ["qualifier", "modifier"],
  ["error", "invalid"],
  ["header", "heading"],
  ["property", "propertyName"]
])
  lut[t] = /* @__PURE__ */ uut(sut, e);
function M$(t, e) {
  I9.indexOf(t) > -1 || (I9.push(t), console.warn(e));
}
function uut(t, e) {
  let n = [];
  for (let s of e.split(" ")) {
    let l = [];
    for (let u of s.split(".")) {
      let c = t[u] || J[u];
      c ? typeof c == "function" ? l.length ? l = l.map(c) : M$(u, `Modifier ${u} used at start of tag`) : l.length ? M$(u, `Tag ${u} used as modifier`) : l = Array.isArray(c) ? c : [c] : M$(u, `Unknown highlighting tag ${u}`);
    }
    for (let u of l)
      n.push(u);
  }
  if (!n.length)
    return 0;
  let r = e.replace(/ /g, "_"), i = r + " " + n.map((s) => s.id), a = D9[i];
  if (a)
    return a.id;
  let o = D9[i] = Ci.define({
    id: M9.length,
    name: r,
    props: [p4({ [r]: n })]
  });
  return M9.push(o), o.id;
}
pn.RTL, pn.LTR;
const cut = (t) => {
  let { state: e } = t, n = e.doc.lineAt(e.selection.main.from), r = O4(t.state, n.from);
  return r.line ? fut(t) : r.block ? hut(t) : !1;
};
function _4(t, e) {
  return ({ state: n, dispatch: r }) => {
    if (n.readOnly)
      return !1;
    let i = t(e, n);
    return i ? (r(n.update(i)), !0) : !1;
  };
}
const fut = /* @__PURE__ */ _4(
  gut,
  0
  /* CommentOption.Toggle */
), dut = /* @__PURE__ */ _4(
  Joe,
  0
  /* CommentOption.Toggle */
), hut = /* @__PURE__ */ _4(
  (t, e) => Joe(t, e, vut(e)),
  0
  /* CommentOption.Toggle */
);
function O4(t, e) {
  let n = t.languageDataAt("commentTokens", e);
  return n.length ? n[0] : {};
}
const Iv = 50;
function put(t, { open: e, close: n }, r, i) {
  let a = t.sliceDoc(r - Iv, r), o = t.sliceDoc(i, i + Iv), s = /\s*$/.exec(a)[0].length, l = /^\s*/.exec(o)[0].length, u = a.length - s;
  if (a.slice(u - e.length, u) == e && o.slice(l, l + n.length) == n)
    return {
      open: { pos: r - s, margin: s && 1 },
      close: { pos: i + l, margin: l && 1 }
    };
  let c, f;
  i - r <= 2 * Iv ? c = f = t.sliceDoc(r, i) : (c = t.sliceDoc(r, r + Iv), f = t.sliceDoc(i - Iv, i));
  let d = /^\s*/.exec(c)[0].length, h = /\s*$/.exec(f)[0].length, p = f.length - h - n.length;
  return c.slice(d, d + e.length) == e && f.slice(p, p + n.length) == n ? {
    open: {
      pos: r + d + e.length,
      margin: /\s/.test(c.charAt(d + e.length)) ? 1 : 0
    },
    close: {
      pos: i - h - n.length,
      margin: /\s/.test(f.charAt(p - 1)) ? 1 : 0
    }
  } : null;
}
function vut(t) {
  let e = [];
  for (let n of t.selection.ranges) {
    let r = t.doc.lineAt(n.from), i = n.to <= r.to ? r : t.doc.lineAt(n.to), a = e.length - 1;
    a >= 0 && e[a].to > r.from ? e[a].to = i.to : e.push({ from: r.from + /^\s*/.exec(r.text)[0].length, to: i.to });
  }
  return e;
}
function Joe(t, e, n = e.selection.ranges) {
  let r = n.map((a) => O4(e, a.from).block);
  if (!r.every((a) => a))
    return null;
  let i = n.map((a, o) => put(e, r[o], a.from, a.to));
  if (t != 2 && !i.every((a) => a))
    return { changes: e.changes(n.map((a, o) => i[o] ? [] : [{ from: a.from, insert: r[o].open + " " }, { from: a.to, insert: " " + r[o].close }])) };
  if (t != 1 && i.some((a) => a)) {
    let a = [];
    for (let o = 0, s; o < i.length; o++)
      if (s = i[o]) {
        let l = r[o], { open: u, close: c } = s;
        a.push({ from: u.pos - l.open.length, to: u.pos + u.margin }, { from: c.pos - c.margin, to: c.pos + l.close.length });
      }
    return { changes: a };
  }
  return null;
}
function gut(t, e, n = e.selection.ranges) {
  let r = [], i = -1;
  for (let { from: a, to: o } of n) {
    let s = r.length, l = 1e9, u = O4(e, a).line;
    if (u) {
      for (let c = a; c <= o; ) {
        let f = e.doc.lineAt(c);
        if (f.from > i && (a == o || o > f.from)) {
          i = f.from;
          let d = /^\s*/.exec(f.text)[0].length, h = d == f.length, p = f.text.slice(d, d + u.length) == u ? d : -1;
          d < f.text.length && d < l && (l = d), r.push({ line: f, comment: p, token: u, indent: d, empty: h, single: !1 });
        }
        c = f.to + 1;
      }
      if (l < 1e9)
        for (let c = s; c < r.length; c++)
          r[c].indent < r[c].line.text.length && (r[c].indent = l);
      r.length == s + 1 && (r[s].single = !0);
    }
  }
  if (t != 2 && r.some((a) => a.comment < 0 && (!a.empty || a.single))) {
    let a = [];
    for (let { line: s, token: l, indent: u, empty: c, single: f } of r)
      (f || !c) && a.push({ from: s.from + u, insert: l + " " });
    let o = e.changes(a);
    return { changes: o, selection: e.selection.map(o, 1) };
  } else if (t != 1 && r.some((a) => a.comment >= 0)) {
    let a = [];
    for (let { line: o, comment: s, token: l } of r)
      if (s >= 0) {
        let u = o.from + s, c = u + l.length;
        o.text[c - o.from] == " " && c++, a.push({ from: u, to: c });
      }
    return { changes: a };
  }
  return null;
}
const QM = /* @__PURE__ */ ul.define(), mut = /* @__PURE__ */ ul.define(), yut = /* @__PURE__ */ Be.define(), ese = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, {
      minDepth: 100,
      newGroupDelay: 500,
      joinToEvent: (e, n) => n
    }, {
      minDepth: Math.max,
      newGroupDelay: Math.min,
      joinToEvent: (e, n) => (r, i) => e(r, i) || n(r, i)
    });
  }
}), tse = /* @__PURE__ */ ur.define({
  create() {
    return Go.empty;
  },
  update(t, e) {
    let n = e.state.facet(ese), r = e.annotation(QM);
    if (r) {
      let l = yi.fromTransaction(e, r.selection), u = r.side, c = u == 0 ? t.undone : t.done;
      return l ? c = pS(c, c.length, n.minDepth, l) : c = ise(c, e.startState.selection), new Go(u == 0 ? r.rest : c, u == 0 ? c : r.rest);
    }
    let i = e.annotation(mut);
    if ((i == "full" || i == "before") && (t = t.isolate()), e.annotation(Fn.addToHistory) === !1)
      return e.changes.empty ? t : t.addMapping(e.changes.desc);
    let a = yi.fromTransaction(e), o = e.annotation(Fn.time), s = e.annotation(Fn.userEvent);
    return a ? t = t.addChanges(a, o, s, n, e) : e.selection && (t = t.addSelection(e.startState.selection, o, s, n.newGroupDelay)), (i == "full" || i == "after") && (t = t.isolate()), t;
  },
  toJSON(t) {
    return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
  },
  fromJSON(t) {
    return new Go(t.done.map(yi.fromJSON), t.undone.map(yi.fromJSON));
  }
});
function but(t = {}) {
  return [
    tse,
    ese.of(t),
    De.domEventHandlers({
      beforeinput(e, n) {
        let r = e.inputType == "historyUndo" ? nse : e.inputType == "historyRedo" ? HM : null;
        return r ? (e.preventDefault(), r(n)) : !1;
      }
    })
  ];
}
function Nw(t, e) {
  return function({ state: n, dispatch: r }) {
    if (!e && n.readOnly)
      return !1;
    let i = n.field(tse, !1);
    if (!i)
      return !1;
    let a = i.pop(t, n, e);
    return a ? (r(a), !0) : !1;
  };
}
const nse = /* @__PURE__ */ Nw(0, !1), HM = /* @__PURE__ */ Nw(1, !1), _ut = /* @__PURE__ */ Nw(0, !0), Out = /* @__PURE__ */ Nw(1, !0);
class yi {
  constructor(e, n, r, i, a) {
    this.changes = e, this.effects = n, this.mapped = r, this.startSelection = i, this.selectionsAfter = a;
  }
  setSelAfter(e) {
    return new yi(this.changes, this.effects, this.mapped, this.startSelection, e);
  }
  toJSON() {
    var e, n, r;
    return {
      changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
      mapped: (n = this.mapped) === null || n === void 0 ? void 0 : n.toJSON(),
      startSelection: (r = this.startSelection) === null || r === void 0 ? void 0 : r.toJSON(),
      selectionsAfter: this.selectionsAfter.map((i) => i.toJSON())
    };
  }
  static fromJSON(e) {
    return new yi(e.changes && jn.fromJSON(e.changes), [], e.mapped && Yo.fromJSON(e.mapped), e.startSelection && me.fromJSON(e.startSelection), e.selectionsAfter.map(me.fromJSON));
  }
  // This does not check `addToHistory` and such, it assumes the
  // transaction needs to be converted to an item. Returns null when
  // there are no changes or effects in the transaction.
  static fromTransaction(e, n) {
    let r = ya;
    for (let i of e.startState.facet(yut)) {
      let a = i(e);
      a.length && (r = r.concat(a));
    }
    return !r.length && e.changes.empty ? null : new yi(e.changes.invert(e.startState.doc), r, void 0, n || e.startState.selection, ya);
  }
  static selection(e) {
    return new yi(void 0, ya, void 0, void 0, e);
  }
}
function pS(t, e, n, r) {
  let i = e + 1 > n + 20 ? e - n - 1 : 0, a = t.slice(i, e);
  return a.push(r), a;
}
function Sut(t, e) {
  let n = [], r = !1;
  return t.iterChangedRanges((i, a) => n.push(i, a)), e.iterChangedRanges((i, a, o, s) => {
    for (let l = 0; l < n.length; ) {
      let u = n[l++], c = n[l++];
      s >= u && o <= c && (r = !0);
    }
  }), r;
}
function xut(t, e) {
  return t.ranges.length == e.ranges.length && t.ranges.filter((n, r) => n.empty != e.ranges[r].empty).length === 0;
}
function rse(t, e) {
  return t.length ? e.length ? t.concat(e) : t : e;
}
const ya = [], wut = 200;
function ise(t, e) {
  if (t.length) {
    let n = t[t.length - 1], r = n.selectionsAfter.slice(Math.max(0, n.selectionsAfter.length - wut));
    return r.length && r[r.length - 1].eq(e) ? t : (r.push(e), pS(t, t.length - 1, 1e9, n.setSelAfter(r)));
  } else
    return [yi.selection([e])];
}
function Cut(t) {
  let e = t[t.length - 1], n = t.slice();
  return n[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), n;
}
function I$(t, e) {
  if (!t.length)
    return t;
  let n = t.length, r = ya;
  for (; n; ) {
    let i = Tut(t[n - 1], e, r);
    if (i.changes && !i.changes.empty || i.effects.length) {
      let a = t.slice(0, n);
      return a[n - 1] = i, a;
    } else
      e = i.mapped, n--, r = i.selectionsAfter;
  }
  return r.length ? [yi.selection(r)] : ya;
}
function Tut(t, e, n) {
  let r = rse(t.selectionsAfter.length ? t.selectionsAfter.map((s) => s.map(e)) : ya, n);
  if (!t.changes)
    return yi.selection(r);
  let i = t.changes.map(e), a = e.mapDesc(t.changes, !0), o = t.mapped ? t.mapped.composeDesc(a) : a;
  return new yi(i, dt.mapEffects(t.effects, e), o, t.startSelection.map(a), r);
}
const Put = /^(input\.type|delete)($|\.)/;
class Go {
  constructor(e, n, r = 0, i = void 0) {
    this.done = e, this.undone = n, this.prevTime = r, this.prevUserEvent = i;
  }
  isolate() {
    return this.prevTime ? new Go(this.done, this.undone) : this;
  }
  addChanges(e, n, r, i, a) {
    let o = this.done, s = o[o.length - 1];
    return s && s.changes && !s.changes.empty && e.changes && (!r || Put.test(r)) && (!s.selectionsAfter.length && n - this.prevTime < i.newGroupDelay && i.joinToEvent(a, Sut(s.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
    r == "input.type.compose") ? o = pS(o, o.length - 1, i.minDepth, new yi(e.changes.compose(s.changes), rse(e.effects, s.effects), s.mapped, s.startSelection, ya)) : o = pS(o, o.length, i.minDepth, e), new Go(o, ya, n, r);
  }
  addSelection(e, n, r, i) {
    let a = this.done.length ? this.done[this.done.length - 1].selectionsAfter : ya;
    return a.length > 0 && n - this.prevTime < i && r == this.prevUserEvent && r && /^select($|\.)/.test(r) && xut(a[a.length - 1], e) ? this : new Go(ise(this.done, e), this.undone, n, r);
  }
  addMapping(e) {
    return new Go(I$(this.done, e), I$(this.undone, e), this.prevTime, this.prevUserEvent);
  }
  pop(e, n, r) {
    let i = e == 0 ? this.done : this.undone;
    if (i.length == 0)
      return null;
    let a = i[i.length - 1], o = a.selectionsAfter[0] || n.selection;
    if (r && a.selectionsAfter.length)
      return n.update({
        selection: a.selectionsAfter[a.selectionsAfter.length - 1],
        annotations: QM.of({ side: e, rest: Cut(i), selection: o }),
        userEvent: e == 0 ? "select.undo" : "select.redo",
        scrollIntoView: !0
      });
    if (a.changes) {
      let s = i.length == 1 ? ya : i.slice(0, i.length - 1);
      return a.mapped && (s = I$(s, a.mapped)), n.update({
        changes: a.changes,
        selection: a.startSelection,
        effects: a.effects,
        annotations: QM.of({ side: e, rest: s, selection: o }),
        filter: !1,
        userEvent: e == 0 ? "undo" : "redo",
        scrollIntoView: !0
      });
    } else
      return null;
  }
}
Go.empty = /* @__PURE__ */ new Go(ya, ya);
const $ut = [
  { key: "Mod-z", run: nse, preventDefault: !0 },
  { key: "Mod-y", mac: "Mod-Shift-z", run: HM, preventDefault: !0 },
  { linux: "Ctrl-Shift-z", run: HM, preventDefault: !0 },
  { key: "Mod-u", run: _ut, preventDefault: !0 },
  { key: "Alt-u", mac: "Mod-Shift-u", run: Out, preventDefault: !0 }
];
function kp(t, e) {
  return me.create(t.ranges.map(e), t.mainIndex);
}
function hs(t, e) {
  return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
}
function yo({ state: t, dispatch: e }, n) {
  let r = kp(t.selection, n);
  return r.eq(t.selection, !0) ? !1 : (e(hs(t, r)), !0);
}
function Bw(t, e) {
  return me.cursor(e ? t.to : t.from);
}
function ase(t, e) {
  return yo(t, (n) => n.empty ? t.moveByChar(n, e) : Bw(n, e));
}
function zr(t) {
  return t.textDirectionAt(t.state.selection.main.head) == pn.LTR;
}
const ose = (t) => ase(t, !zr(t)), sse = (t) => ase(t, zr(t));
function lse(t, e) {
  return yo(t, (n) => n.empty ? t.moveByGroup(n, e) : Bw(n, e));
}
const Aut = (t) => lse(t, !zr(t)), Eut = (t) => lse(t, zr(t));
function Mut(t, e, n) {
  if (e.type.prop(n))
    return !0;
  let r = e.to - e.from;
  return r && (r > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
}
function zw(t, e, n) {
  let r = nr(t).resolveInner(e.head), i = n ? Pt.closedBy : Pt.openedBy;
  for (let l = e.head; ; ) {
    let u = n ? r.childAfter(l) : r.childBefore(l);
    if (!u)
      break;
    Mut(t, u, i) ? r = u : l = n ? u.to : u.from;
  }
  let a = r.type.prop(i), o, s;
  return a && (o = n ? Ho(t, r.from, 1) : Ho(t, r.to, -1)) && o.matched ? s = n ? o.end.to : o.end.from : s = n ? r.to : r.from, me.cursor(s, n ? -1 : 1);
}
const Iut = (t) => yo(t, (e) => zw(t.state, e, !zr(t))), Dut = (t) => yo(t, (e) => zw(t.state, e, zr(t)));
function use(t, e) {
  return yo(t, (n) => {
    if (!n.empty)
      return Bw(n, e);
    let r = t.moveVertically(n, e);
    return r.head != n.head ? r : t.moveToLineBoundary(n, e);
  });
}
const cse = (t) => use(t, !1), fse = (t) => use(t, !0);
function dse(t) {
  let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, n = 0, r = 0, i;
  if (e) {
    for (let a of t.state.facet(De.scrollMargins)) {
      let o = a(t);
      o != null && o.top && (n = Math.max(o == null ? void 0 : o.top, n)), o != null && o.bottom && (r = Math.max(o == null ? void 0 : o.bottom, r));
    }
    i = t.scrollDOM.clientHeight - n - r;
  } else
    i = (t.dom.ownerDocument.defaultView || window).innerHeight;
  return {
    marginTop: n,
    marginBottom: r,
    selfScroll: e,
    height: Math.max(t.defaultLineHeight, i - 5)
  };
}
function hse(t, e) {
  let n = dse(t), { state: r } = t, i = kp(r.selection, (o) => o.empty ? t.moveVertically(o, e, n.height) : Bw(o, e));
  if (i.eq(r.selection))
    return !1;
  let a;
  if (n.selfScroll) {
    let o = t.coordsAtPos(r.selection.main.head), s = t.scrollDOM.getBoundingClientRect(), l = s.top + n.marginTop, u = s.bottom - n.marginBottom;
    o && o.top > l && o.bottom < u && (a = De.scrollIntoView(i.main.head, { y: "start", yMargin: o.top - l }));
  }
  return t.dispatch(hs(r, i), { effects: a }), !0;
}
const R9 = (t) => hse(t, !1), GM = (t) => hse(t, !0);
function Mu(t, e, n) {
  let r = t.lineBlockAt(e.head), i = t.moveToLineBoundary(e, n);
  if (i.head == e.head && i.head != (n ? r.to : r.from) && (i = t.moveToLineBoundary(e, n, !1)), !n && i.head == r.from && r.length) {
    let a = /^\s*/.exec(t.state.sliceDoc(r.from, Math.min(r.from + 100, r.to)))[0].length;
    a && e.head != r.from + a && (i = me.cursor(r.from + a));
  }
  return i;
}
const Rut = (t) => yo(t, (e) => Mu(t, e, !0)), kut = (t) => yo(t, (e) => Mu(t, e, !1)), Lut = (t) => yo(t, (e) => Mu(t, e, !zr(t))), Nut = (t) => yo(t, (e) => Mu(t, e, zr(t))), But = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).from, 1)), zut = (t) => yo(t, (e) => me.cursor(t.lineBlockAt(e.head).to, -1));
function Vut(t, e, n) {
  let r = !1, i = kp(t.selection, (a) => {
    let o = Ho(t, a.head, -1) || Ho(t, a.head, 1) || a.head > 0 && Ho(t, a.head - 1, 1) || a.head < t.doc.length && Ho(t, a.head + 1, -1);
    if (!o || !o.end)
      return a;
    r = !0;
    let s = o.start.from == a.head ? o.end.to : o.end.from;
    return me.cursor(s);
  });
  return r ? (e(hs(t, i)), !0) : !1;
}
const Fut = ({ state: t, dispatch: e }) => Vut(t, e);
function za(t, e) {
  let n = kp(t.state.selection, (r) => {
    let i = e(r);
    return me.range(r.anchor, i.head, i.goalColumn, i.bidiLevel || void 0);
  });
  return n.eq(t.state.selection) ? !1 : (t.dispatch(hs(t.state, n)), !0);
}
function pse(t, e) {
  return za(t, (n) => t.moveByChar(n, e));
}
const vse = (t) => pse(t, !zr(t)), gse = (t) => pse(t, zr(t));
function mse(t, e) {
  return za(t, (n) => t.moveByGroup(n, e));
}
const Wut = (t) => mse(t, !zr(t)), Qut = (t) => mse(t, zr(t)), Hut = (t) => za(t, (e) => zw(t.state, e, !zr(t))), Gut = (t) => za(t, (e) => zw(t.state, e, zr(t)));
function yse(t, e) {
  return za(t, (n) => t.moveVertically(n, e));
}
const bse = (t) => yse(t, !1), _se = (t) => yse(t, !0);
function Ose(t, e) {
  return za(t, (n) => t.moveVertically(n, e, dse(t).height));
}
const k9 = (t) => Ose(t, !1), L9 = (t) => Ose(t, !0), jut = (t) => za(t, (e) => Mu(t, e, !0)), Zut = (t) => za(t, (e) => Mu(t, e, !1)), Uut = (t) => za(t, (e) => Mu(t, e, !zr(t))), Xut = (t) => za(t, (e) => Mu(t, e, zr(t))), Yut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).from)), qut = (t) => za(t, (e) => me.cursor(t.lineBlockAt(e.head).to)), N9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: 0 })), !0), B9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.doc.length })), !0), z9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: 0 })), !0), V9 = ({ state: t, dispatch: e }) => (e(hs(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), Kut = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), Jut = ({ state: t, dispatch: e }) => {
  let n = Vw(t).map(({ from: r, to: i }) => me.range(r, Math.min(i + 1, t.doc.length)));
  return e(t.update({ selection: me.create(n), userEvent: "select" })), !0;
}, ect = ({ state: t, dispatch: e }) => {
  let n = kp(t.selection, (r) => {
    var i;
    let a = nr(t).resolveStack(r.from, 1);
    for (let o = a; o; o = o.next) {
      let { node: s } = o;
      if ((s.from < r.from && s.to >= r.to || s.to > r.to && s.from <= r.from) && (!((i = s.parent) === null || i === void 0) && i.parent))
        return me.range(s.to, s.from);
    }
    return r;
  });
  return e(hs(t, n)), !0;
}, tct = ({ state: t, dispatch: e }) => {
  let n = t.selection, r = null;
  return n.ranges.length > 1 ? r = me.create([n.main]) : n.main.empty || (r = me.create([me.cursor(n.main.head)])), r ? (e(hs(t, r)), !0) : !1;
};
function fy(t, e) {
  if (t.state.readOnly)
    return !1;
  let n = "delete.selection", { state: r } = t, i = r.changeByRange((a) => {
    let { from: o, to: s } = a;
    if (o == s) {
      let l = e(a);
      l < o ? (n = "delete.backward", l = o_(t, l, !1)) : l > o && (n = "delete.forward", l = o_(t, l, !0)), o = Math.min(o, l), s = Math.max(s, l);
    } else
      o = o_(t, o, !1), s = o_(t, s, !0);
    return o == s ? { range: a } : { changes: { from: o, to: s }, range: me.cursor(o, o < a.head ? -1 : 1) };
  });
  return i.changes.empty ? !1 : (t.dispatch(r.update(i, {
    scrollIntoView: !0,
    userEvent: n,
    effects: n == "delete.selection" ? De.announce.of(r.phrase("Selection deleted")) : void 0
  })), !0);
}
function o_(t, e, n) {
  if (t instanceof De)
    for (let r of t.state.facet(De.atomicRanges).map((i) => i(t)))
      r.between(e, e, (i, a) => {
        i < e && a > e && (e = n ? a : i);
      });
  return e;
}
const Sse = (t, e, n) => fy(t, (r) => {
  let i = r.from, { state: a } = t, o = a.doc.lineAt(i), s, l;
  if (n && !e && i > o.from && i < o.from + 200 && !/[^ \t]/.test(s = o.text.slice(0, i - o.from))) {
    if (s[s.length - 1] == "	")
      return i - 1;
    let u = Rp(s, a.tabSize), c = u % fS(a) || fS(a);
    for (let f = 0; f < c && s[s.length - 1 - f] == " "; f++)
      i--;
    l = i;
  } else
    l = _r(o.text, i - o.from, e, e) + o.from, l == i && o.number != (e ? a.doc.lines : 1) ? l += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(o.text.slice(l - o.from, i - o.from)) && (l = _r(o.text, l - o.from, !1, !1) + o.from);
  return l;
}), jM = (t) => Sse(t, !1, !0), xse = (t) => Sse(t, !0, !1), wse = (t, e) => fy(t, (n) => {
  let r = n.head, { state: i } = t, a = i.doc.lineAt(r), o = i.charCategorizer(r);
  for (let s = null; ; ) {
    if (r == (e ? a.to : a.from)) {
      r == n.head && a.number != (e ? i.doc.lines : 1) && (r += e ? 1 : -1);
      break;
    }
    let l = _r(a.text, r - a.from, e) + a.from, u = a.text.slice(Math.min(r, l) - a.from, Math.max(r, l) - a.from), c = o(u);
    if (s != null && c != s)
      break;
    (u != " " || r != n.head) && (s = c), r = l;
  }
  return r;
}), Cse = (t) => wse(t, !1), nct = (t) => wse(t, !0), rct = (t) => fy(t, (e) => {
  let n = t.lineBlockAt(e.head).to;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), ict = (t) => fy(t, (e) => {
  let n = t.moveToLineBoundary(e, !1).head;
  return e.head > n ? n : Math.max(0, e.head - 1);
}), act = (t) => fy(t, (e) => {
  let n = t.moveToLineBoundary(e, !0).head;
  return e.head < n ? n : Math.min(t.state.doc.length, e.head + 1);
}), oct = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((r) => ({
    changes: { from: r.from, to: r.to, insert: Ft.of(["", ""]) },
    range: me.cursor(r.from)
  }));
  return e(t.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
}, sct = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = t.changeByRange((r) => {
    if (!r.empty || r.from == 0 || r.from == t.doc.length)
      return { range: r };
    let i = r.from, a = t.doc.lineAt(i), o = i == a.from ? i - 1 : _r(a.text, i - a.from, !1) + a.from, s = i == a.to ? i + 1 : _r(a.text, i - a.from, !0) + a.from;
    return {
      changes: { from: o, to: s, insert: t.doc.slice(i, s).append(t.doc.slice(o, i)) },
      range: me.cursor(s)
    };
  });
  return n.changes.empty ? !1 : (e(t.update(n, { scrollIntoView: !0, userEvent: "move.character" })), !0);
};
function Vw(t) {
  let e = [], n = -1;
  for (let r of t.selection.ranges) {
    let i = t.doc.lineAt(r.from), a = t.doc.lineAt(r.to);
    if (!r.empty && r.to == a.from && (a = t.doc.lineAt(r.to - 1)), n >= i.number) {
      let o = e[e.length - 1];
      o.to = a.to, o.ranges.push(r);
    } else
      e.push({ from: i.from, to: a.to, ranges: [r] });
    n = a.number + 1;
  }
  return e;
}
function Tse(t, e, n) {
  if (t.readOnly)
    return !1;
  let r = [], i = [];
  for (let a of Vw(t)) {
    if (n ? a.to == t.doc.length : a.from == 0)
      continue;
    let o = t.doc.lineAt(n ? a.to + 1 : a.from - 1), s = o.length + 1;
    if (n) {
      r.push({ from: a.to, to: o.to }, { from: a.from, insert: o.text + t.lineBreak });
      for (let l of a.ranges)
        i.push(me.range(Math.min(t.doc.length, l.anchor + s), Math.min(t.doc.length, l.head + s)));
    } else {
      r.push({ from: o.from, to: a.from }, { from: a.to, insert: t.lineBreak + o.text });
      for (let l of a.ranges)
        i.push(me.range(l.anchor - s, l.head - s));
    }
  }
  return r.length ? (e(t.update({
    changes: r,
    scrollIntoView: !0,
    selection: me.create(i, t.selection.mainIndex),
    userEvent: "move.line"
  })), !0) : !1;
}
const lct = ({ state: t, dispatch: e }) => Tse(t, e, !1), uct = ({ state: t, dispatch: e }) => Tse(t, e, !0);
function Pse(t, e, n) {
  if (t.readOnly)
    return !1;
  let r = [];
  for (let i of Vw(t))
    n ? r.push({ from: i.from, insert: t.doc.slice(i.from, i.to) + t.lineBreak }) : r.push({ from: i.to, insert: t.lineBreak + t.doc.slice(i.from, i.to) });
  return e(t.update({ changes: r, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
}
const cct = ({ state: t, dispatch: e }) => Pse(t, e, !1), fct = ({ state: t, dispatch: e }) => Pse(t, e, !0), dct = (t) => {
  if (t.state.readOnly)
    return !1;
  let { state: e } = t, n = e.changes(Vw(e).map(({ from: i, to: a }) => (i > 0 ? i-- : a < e.doc.length && a++, { from: i, to: a }))), r = kp(e.selection, (i) => {
    let a;
    if (t.lineWrapping) {
      let o = t.lineBlockAt(i.head), s = t.coordsAtPos(i.head, i.assoc || 1);
      s && (a = o.bottom + t.documentTop - s.bottom + t.defaultLineHeight / 2);
    }
    return t.moveVertically(i, !0, a);
  }).map(n);
  return t.dispatch({ changes: n, selection: r, scrollIntoView: !0, userEvent: "delete.line" }), !0;
};
function hct(t, e) {
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
    return { from: e, to: e };
  let n = nr(t).resolveInner(e), r = n.childBefore(e), i = n.childAfter(e), a;
  return r && i && r.to <= e && i.from >= e && (a = r.type.prop(Pt.closedBy)) && a.indexOf(i.name) > -1 && t.doc.lineAt(r.to).from == t.doc.lineAt(i.from).from && !/\S/.test(t.sliceDoc(r.to, i.from)) ? { from: r.to, to: i.from } : null;
}
const pct = /* @__PURE__ */ $se(!1), vct = /* @__PURE__ */ $se(!0);
function $se(t) {
  return ({ state: e, dispatch: n }) => {
    if (e.readOnly)
      return !1;
    let r = e.changeByRange((i) => {
      let { from: a, to: o } = i, s = e.doc.lineAt(a), l = !t && a == o && hct(e, a);
      t && (a = o = (o <= s.to ? s : e.doc.lineAt(o)).to);
      let u = new kw(e, { simulateBreak: a, simulateDoubleBreak: !!l }), c = g4(u, a);
      for (c == null && (c = Rp(/^\s*/.exec(e.doc.lineAt(a).text)[0], e.tabSize)); o < s.to && /\s/.test(s.text[o - s.from]); )
        o++;
      l ? { from: a, to: o } = l : a > s.from && a < s.from + 100 && !/\S/.test(s.text.slice(0, a)) && (a = s.from);
      let f = ["", t0(e, c)];
      return l && f.push(t0(e, u.lineIndent(s.from, -1))), {
        changes: { from: a, to: o, insert: Ft.of(f) },
        range: me.cursor(a + 1 + f[1].length)
      };
    });
    return n(e.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
  };
}
function S4(t, e) {
  let n = -1;
  return t.changeByRange((r) => {
    let i = [];
    for (let o = r.from; o <= r.to; ) {
      let s = t.doc.lineAt(o);
      s.number > n && (r.empty || r.to > s.from) && (e(s, i, r), n = s.number), o = s.to + 1;
    }
    let a = t.changes(i);
    return {
      changes: i,
      range: me.range(a.mapPos(r.anchor, 1), a.mapPos(r.head, 1))
    };
  });
}
const gct = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let n = /* @__PURE__ */ Object.create(null), r = new kw(t, { overrideIndentation: (a) => {
    let o = n[a];
    return o ?? -1;
  } }), i = S4(t, (a, o, s) => {
    let l = g4(r, a.from);
    if (l == null)
      return;
    /\S/.test(a.text) || (l = 0);
    let u = /^\s*/.exec(a.text)[0], c = t0(t, l);
    (u != c || s.from < a.from + u.length) && (n[a.from] = l, o.push({ from: a.from, to: a.from + u.length, insert: c }));
  });
  return i.changes.empty || e(t.update(i, { userEvent: "indent" })), !0;
}, Ase = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  r.push({ from: n.from, insert: t.facet(ly) });
}), { userEvent: "input.indent" })), !0), Ese = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(S4(t, (n, r) => {
  let i = /^\s*/.exec(n.text)[0];
  if (!i)
    return;
  let a = Rp(i, t.tabSize), o = 0, s = t0(t, Math.max(0, a - fS(t)));
  for (; o < i.length && o < s.length && i.charCodeAt(o) == s.charCodeAt(o); )
    o++;
  r.push({ from: n.from + o, to: n.from + i.length, insert: s.slice(o) });
}), { userEvent: "delete.dedent" })), !0), mct = (t) => (t.setTabFocusMode(), !0), yct = [
  { key: "Ctrl-b", run: ose, shift: vse, preventDefault: !0 },
  { key: "Ctrl-f", run: sse, shift: gse },
  { key: "Ctrl-p", run: cse, shift: bse },
  { key: "Ctrl-n", run: fse, shift: _se },
  { key: "Ctrl-a", run: But, shift: Yut },
  { key: "Ctrl-e", run: zut, shift: qut },
  { key: "Ctrl-d", run: xse },
  { key: "Ctrl-h", run: jM },
  { key: "Ctrl-k", run: rct },
  { key: "Ctrl-Alt-h", run: Cse },
  { key: "Ctrl-o", run: oct },
  { key: "Ctrl-t", run: sct },
  { key: "Ctrl-v", run: GM }
], bct = /* @__PURE__ */ [
  { key: "ArrowLeft", run: ose, shift: vse, preventDefault: !0 },
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Aut, shift: Wut, preventDefault: !0 },
  { mac: "Cmd-ArrowLeft", run: Lut, shift: Uut, preventDefault: !0 },
  { key: "ArrowRight", run: sse, shift: gse, preventDefault: !0 },
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Eut, shift: Qut, preventDefault: !0 },
  { mac: "Cmd-ArrowRight", run: Nut, shift: Xut, preventDefault: !0 },
  { key: "ArrowUp", run: cse, shift: bse, preventDefault: !0 },
  { mac: "Cmd-ArrowUp", run: N9, shift: z9 },
  { mac: "Ctrl-ArrowUp", run: R9, shift: k9 },
  { key: "ArrowDown", run: fse, shift: _se, preventDefault: !0 },
  { mac: "Cmd-ArrowDown", run: B9, shift: V9 },
  { mac: "Ctrl-ArrowDown", run: GM, shift: L9 },
  { key: "PageUp", run: R9, shift: k9 },
  { key: "PageDown", run: GM, shift: L9 },
  { key: "Home", run: kut, shift: Zut, preventDefault: !0 },
  { key: "Mod-Home", run: N9, shift: z9 },
  { key: "End", run: Rut, shift: jut, preventDefault: !0 },
  { key: "Mod-End", run: B9, shift: V9 },
  { key: "Enter", run: pct },
  { key: "Mod-a", run: Kut },
  { key: "Backspace", run: jM, shift: jM },
  { key: "Delete", run: xse },
  { key: "Mod-Backspace", mac: "Alt-Backspace", run: Cse },
  { key: "Mod-Delete", mac: "Alt-Delete", run: nct },
  { mac: "Mod-Backspace", run: ict },
  { mac: "Mod-Delete", run: act }
].concat(/* @__PURE__ */ yct.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), _ct = /* @__PURE__ */ [
  { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Iut, shift: Hut },
  { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Dut, shift: Gut },
  { key: "Alt-ArrowUp", run: lct },
  { key: "Shift-Alt-ArrowUp", run: cct },
  { key: "Alt-ArrowDown", run: uct },
  { key: "Shift-Alt-ArrowDown", run: fct },
  { key: "Escape", run: tct },
  { key: "Mod-Enter", run: vct },
  { key: "Alt-l", mac: "Ctrl-l", run: Jut },
  { key: "Mod-i", run: ect, preventDefault: !0 },
  { key: "Mod-[", run: Ese },
  { key: "Mod-]", run: Ase },
  { key: "Mod-Alt-\\", run: gct },
  { key: "Shift-Mod-k", run: dct },
  { key: "Shift-Mod-\\", run: Fut },
  { key: "Mod-/", run: cut },
  { key: "Alt-A", run: dut },
  { key: "Ctrl-m", mac: "Shift-Alt-m", run: mct }
].concat(bct), Oct = { key: "Tab", run: Ase, shift: Ese };
function on() {
  var t = arguments[0];
  typeof t == "string" && (t = document.createElement(t));
  var e = 1, n = arguments[1];
  if (n && typeof n == "object" && n.nodeType == null && !Array.isArray(n)) {
    for (var r in n) if (Object.prototype.hasOwnProperty.call(n, r)) {
      var i = n[r];
      typeof i == "string" ? t.setAttribute(r, i) : i != null && (t[r] = i);
    }
    e++;
  }
  for (; e < arguments.length; e++) Mse(t, arguments[e]);
  return t;
}
function Mse(t, e) {
  if (typeof e == "string")
    t.appendChild(document.createTextNode(e));
  else if (e != null) if (e.nodeType != null)
    t.appendChild(e);
  else if (Array.isArray(e))
    for (var n = 0; n < e.length; n++) Mse(t, e[n]);
  else
    throw new RangeError("Unsupported child node: " + e);
}
const F9 = typeof String.prototype.normalize == "function" ? (t) => t.normalize("NFKD") : (t) => t;
class Kh {
  /**
  Create a text cursor. The query is the search string, `from` to
  `to` provides the region to search.
  
  When `normalize` is given, it will be called, on both the query
  string and the content it is matched against, before comparing.
  You can, for example, create a case-insensitive search by
  passing `s => s.toLowerCase()`.
  
  Text is always normalized with
  [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
  (when supported).
  */
  constructor(e, n, r = 0, i = e.length, a, o) {
    this.test = o, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(r, i), this.bufferStart = r, this.normalize = a ? (s) => a(F9(s)) : F9, this.query = this.normalize(n);
  }
  peek() {
    if (this.bufferPos == this.buffer.length) {
      if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
        return -1;
      this.bufferPos = 0, this.buffer = this.iter.value;
    }
    return gr(this.buffer, this.bufferPos);
  }
  /**
  Look for the next match. Updates the iterator's
  [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
  [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
  at least once before using the cursor.
  */
  next() {
    for (; this.matches.length; )
      this.matches.pop();
    return this.nextOverlapping();
  }
  /**
  The `next` method will ignore matches that partially overlap a
  previous match. This method behaves like `next`, but includes
  such matches.
  */
  nextOverlapping() {
    for (; ; ) {
      let e = this.peek();
      if (e < 0)
        return this.done = !0, this;
      let n = KL(e), r = this.bufferStart + this.bufferPos;
      this.bufferPos += ga(e);
      let i = this.normalize(n);
      for (let a = 0, o = r; ; a++) {
        let s = i.charCodeAt(a), l = this.match(s, o, this.bufferPos + this.bufferStart);
        if (a == i.length - 1) {
          if (l)
            return this.value = l, this;
          break;
        }
        o == r && a < n.length && n.charCodeAt(a) == s && o++;
      }
    }
  }
  match(e, n, r) {
    let i = null;
    for (let a = 0; a < this.matches.length; a += 2) {
      let o = this.matches[a], s = !1;
      this.query.charCodeAt(o) == e && (o == this.query.length - 1 ? i = { from: this.matches[a + 1], to: r } : (this.matches[a]++, s = !0)), s || (this.matches.splice(a, 2), a -= 2);
    }
    return this.query.charCodeAt(0) == e && (this.query.length == 1 ? i = { from: n, to: r } : this.matches.push(1, n)), i && this.test && !this.test(i.from, i.to, this.buffer, this.bufferStart) && (i = null), i;
  }
}
typeof Symbol < "u" && (Kh.prototype[Symbol.iterator] = function() {
  return this;
});
const Ise = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, x4 = "gm" + (/x/.unicode == null ? "" : "u");
class Dse {
  /**
  Create a cursor that will search the given range in the given
  document. `query` should be the raw pattern (as you'd pass it to
  `new RegExp`).
  */
  constructor(e, n, r, i = 0, a = e.length) {
    if (this.text = e, this.to = a, this.curLine = "", this.done = !1, this.value = Ise, /\\[sWDnr]|\n|\r|\[\^/.test(n))
      return new Rse(e, n, r, i, a);
    this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.iter = e.iter();
    let o = e.lineAt(i);
    this.curLineStart = o.from, this.matchPos = vS(e, i), this.getLine(this.curLineStart);
  }
  getLine(e) {
    this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
  }
  nextLine() {
    this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
  }
  /**
  Move to the next match, if there is one.
  */
  next() {
    for (let e = this.matchPos - this.curLineStart; ; ) {
      this.re.lastIndex = e;
      let n = this.matchPos <= this.to && this.re.exec(this.curLine);
      if (n) {
        let r = this.curLineStart + n.index, i = r + n[0].length;
        if (this.matchPos = vS(this.text, i + (r == i ? 1 : 0)), r == this.curLineStart + this.curLine.length && this.nextLine(), (r < i || r > this.value.to) && (!this.test || this.test(r, i, n)))
          return this.value = { from: r, to: i, match: n }, this;
        e = this.matchPos - this.curLineStart;
      } else if (this.curLineStart + this.curLine.length < this.to)
        this.nextLine(), e = 0;
      else
        return this.done = !0, this;
    }
  }
}
const D$ = /* @__PURE__ */ new WeakMap();
class ch {
  constructor(e, n) {
    this.from = e, this.text = n;
  }
  get to() {
    return this.from + this.text.length;
  }
  static get(e, n, r) {
    let i = D$.get(e);
    if (!i || i.from >= r || i.to <= n) {
      let s = new ch(n, e.sliceString(n, r));
      return D$.set(e, s), s;
    }
    if (i.from == n && i.to == r)
      return i;
    let { text: a, from: o } = i;
    return o > n && (a = e.sliceString(n, o) + a, o = n), i.to < r && (a += e.sliceString(i.to, r)), D$.set(e, new ch(o, a)), new ch(n, a.slice(n - o, r - o));
  }
}
class Rse {
  constructor(e, n, r, i, a) {
    this.text = e, this.to = a, this.done = !1, this.value = Ise, this.matchPos = vS(e, i), this.re = new RegExp(n, x4 + (r != null && r.ignoreCase ? "i" : "")), this.test = r == null ? void 0 : r.test, this.flat = ch.get(e, i, this.chunkEnd(
      i + 5e3
      /* Chunk.Base */
    ));
  }
  chunkEnd(e) {
    return e >= this.to ? this.to : this.text.lineAt(e).to;
  }
  next() {
    for (; ; ) {
      let e = this.re.lastIndex = this.matchPos - this.flat.from, n = this.re.exec(this.flat.text);
      if (n && !n[0] && n.index == e && (this.re.lastIndex = e + 1, n = this.re.exec(this.flat.text)), n) {
        let r = this.flat.from + n.index, i = r + n[0].length;
        if ((this.flat.to >= this.to || n.index + n[0].length <= this.flat.text.length - 10) && (!this.test || this.test(r, i, n)))
          return this.value = { from: r, to: i, match: n }, this.matchPos = vS(this.text, i + (r == i ? 1 : 0)), this;
      }
      if (this.flat.to == this.to)
        return this.done = !0, this;
      this.flat = ch.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
    }
  }
}
typeof Symbol < "u" && (Dse.prototype[Symbol.iterator] = Rse.prototype[Symbol.iterator] = function() {
  return this;
});
function Sct(t) {
  try {
    return new RegExp(t, x4), !0;
  } catch {
    return !1;
  }
}
function vS(t, e) {
  if (e >= t.length)
    return e;
  let n = t.lineAt(e), r;
  for (; e < n.to && (r = n.text.charCodeAt(e - n.from)) >= 56320 && r < 57344; )
    e++;
  return e;
}
function ZM(t) {
  let e = String(t.state.doc.lineAt(t.state.selection.main.head).number), n = on("input", { class: "cm-textfield", name: "line", value: e }), r = on("form", {
    class: "cm-gotoLine",
    onkeydown: (a) => {
      a.keyCode == 27 ? (a.preventDefault(), t.dispatch({ effects: gS.of(!1) }), t.focus()) : a.keyCode == 13 && (a.preventDefault(), i());
    },
    onsubmit: (a) => {
      a.preventDefault(), i();
    }
  }, on("label", t.state.phrase("Go to line"), ": ", n), " ", on("button", { class: "cm-button", type: "submit" }, t.state.phrase("go")));
  function i() {
    let a = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);
    if (!a)
      return;
    let { state: o } = t, s = o.doc.lineAt(o.selection.main.head), [, l, u, c, f] = a, d = c ? +c.slice(1) : 0, h = u ? +u : s.number;
    if (u && f) {
      let g = h / 100;
      l && (g = g * (l == "-" ? -1 : 1) + s.number / o.doc.lines), h = Math.round(o.doc.lines * g);
    } else u && l && (h = h * (l == "-" ? -1 : 1) + s.number);
    let p = o.doc.line(Math.max(1, Math.min(o.doc.lines, h))), v = me.cursor(p.from + Math.max(0, Math.min(d, p.length)));
    t.dispatch({
      effects: [gS.of(!1), De.scrollIntoView(v.from, { y: "center" })],
      selection: v
    }), t.focus();
  }
  return { dom: r };
}
const gS = /* @__PURE__ */ dt.define(), W9 = /* @__PURE__ */ ur.define({
  create() {
    return !0;
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(gS) && (t = n.value);
    return t;
  },
  provide: (t) => Km.from(t, (e) => e ? ZM : null)
}), xct = (t) => {
  let e = qm(t, ZM);
  if (!e) {
    let n = [gS.of(!0)];
    t.state.field(W9, !1) == null && n.push(dt.appendConfig.of([W9, wct])), t.dispatch({ effects: n }), e = qm(t, ZM);
  }
  return e && e.dom.querySelector("input").select(), !0;
}, wct = /* @__PURE__ */ De.baseTheme({
  ".cm-panel.cm-gotoLine": {
    padding: "2px 6px 4px",
    "& label": { fontSize: "80%" }
  }
}), Cct = {
  highlightWordAroundCursor: !1,
  minSelectionLength: 1,
  maxMatches: 100,
  wholeWords: !1
}, Tct = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, Cct, {
      highlightWordAroundCursor: (e, n) => e || n,
      minSelectionLength: Math.min,
      maxMatches: Math.min
    });
  }
});
function Pct(t) {
  return [Ict, Mct];
}
const $ct = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch" }), Act = /* @__PURE__ */ Ze.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
function Q9(t, e, n, r) {
  return (n == 0 || t(e.sliceDoc(n - 1, n)) != yn.Word) && (r == e.doc.length || t(e.sliceDoc(r, r + 1)) != yn.Word);
}
function Ect(t, e, n, r) {
  return t(e.sliceDoc(n, n + 1)) == yn.Word && t(e.sliceDoc(r - 1, r)) == yn.Word;
}
const Mct = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.decorations = this.getDeco(t);
  }
  update(t) {
    (t.selectionSet || t.docChanged || t.viewportChanged) && (this.decorations = this.getDeco(t.view));
  }
  getDeco(t) {
    let e = t.state.facet(Tct), { state: n } = t, r = n.selection;
    if (r.ranges.length > 1)
      return Ze.none;
    let i = r.main, a, o = null;
    if (i.empty) {
      if (!e.highlightWordAroundCursor)
        return Ze.none;
      let l = n.wordAt(i.head);
      if (!l)
        return Ze.none;
      o = n.charCategorizer(i.head), a = n.sliceDoc(l.from, l.to);
    } else {
      let l = i.to - i.from;
      if (l < e.minSelectionLength || l > 200)
        return Ze.none;
      if (e.wholeWords) {
        if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(Q9(o, n, i.from, i.to) && Ect(o, n, i.from, i.to)))
          return Ze.none;
      } else if (a = n.sliceDoc(i.from, i.to), !a)
        return Ze.none;
    }
    let s = [];
    for (let l of t.visibleRanges) {
      let u = new Kh(n.doc, a, l.from, l.to);
      for (; !u.next().done; ) {
        let { from: c, to: f } = u.value;
        if ((!o || Q9(o, n, c, f)) && (i.empty && c <= i.from && f >= i.to ? s.push(Act.range(c, f)) : (c >= i.to || f <= i.from) && s.push($ct.range(c, f)), s.length > e.maxMatches))
          return Ze.none;
      }
    }
    return Ze.set(s);
  }
}, {
  decorations: (t) => t.decorations
}), Ict = /* @__PURE__ */ De.baseTheme({
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
}), Dct = ({ state: t, dispatch: e }) => {
  let { selection: n } = t, r = me.create(n.ranges.map((i) => t.wordAt(i.head) || me.cursor(i.head)), n.mainIndex);
  return r.eq(n) ? !1 : (e(t.update({ selection: r })), !0);
};
function Rct(t, e) {
  let { main: n, ranges: r } = t.selection, i = t.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
  for (let o = !1, s = new Kh(t.doc, e, r[r.length - 1].to); ; )
    if (s.next(), s.done) {
      if (o)
        return null;
      s = new Kh(t.doc, e, 0, Math.max(0, r[r.length - 1].from - 1)), o = !0;
    } else {
      if (o && r.some((l) => l.from == s.value.from))
        continue;
      if (a) {
        let l = t.wordAt(s.value.from);
        if (!l || l.from != s.value.from || l.to != s.value.to)
          continue;
      }
      return s.value;
    }
}
const kct = ({ state: t, dispatch: e }) => {
  let { ranges: n } = t.selection;
  if (n.some((a) => a.from === a.to))
    return Dct({ state: t, dispatch: e });
  let r = t.sliceDoc(n[0].from, n[0].to);
  if (t.selection.ranges.some((a) => t.sliceDoc(a.from, a.to) != r))
    return !1;
  let i = Rct(t, r);
  return i ? (e(t.update({
    selection: t.selection.addRange(me.range(i.from, i.to), !1),
    effects: De.scrollIntoView(i.to)
  })), !0) : !1;
}, Lp = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, {
      top: !1,
      caseSensitive: !1,
      literal: !1,
      regexp: !1,
      wholeWord: !1,
      createPanel: (e) => new Zct(e),
      scrollToMatch: (e) => De.scrollIntoView(e)
    });
  }
});
class kse {
  /**
  Create a query object.
  */
  constructor(e) {
    this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || Sct(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord;
  }
  /**
  @internal
  */
  unquote(e) {
    return this.literal ? e : e.replace(/\\([nrt\\])/g, (n, r) => r == "n" ? `
` : r == "r" ? "\r" : r == "t" ? "	" : "\\");
  }
  /**
  Compare this query to another query.
  */
  eq(e) {
    return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord;
  }
  /**
  @internal
  */
  create() {
    return this.regexp ? new zct(this) : new Nct(this);
  }
  /**
  Get a search cursor for this query, searching through the given
  range in the given state.
  */
  getCursor(e, n = 0, r) {
    let i = e.doc ? e : At.create({ doc: e });
    return r == null && (r = i.doc.length), this.regexp ? Rd(this, i, n, r) : Dd(this, i, n, r);
  }
}
class Lse {
  constructor(e) {
    this.spec = e;
  }
}
function Dd(t, e, n, r) {
  return new Kh(e.doc, t.unquoted, n, r, t.caseSensitive ? void 0 : (i) => i.toLowerCase(), t.wholeWord ? Lct(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
}
function Lct(t, e) {
  return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = t.sliceString(a, Math.min(t.length, r + 2))), (e(mS(i, n - a)) != yn.Word || e(yS(i, n - a)) != yn.Word) && (e(yS(i, r - a)) != yn.Word || e(mS(i, r - a)) != yn.Word));
}
class Nct extends Lse {
  constructor(e) {
    super(e);
  }
  nextMatch(e, n, r) {
    let i = Dd(this.spec, e, r, e.doc.length).nextOverlapping();
    return i.done && (i = Dd(this.spec, e, 0, n).nextOverlapping()), i.done ? null : i.value;
  }
  // Searching in reverse is, rather than implementing an inverted search
  // cursor, done by scanning chunk after chunk forward.
  prevMatchInRange(e, n, r) {
    for (let i = r; ; ) {
      let a = Math.max(n, i - 1e4 - this.spec.unquoted.length), o = Dd(this.spec, e, a, i), s = null;
      for (; !o.nextOverlapping().done; )
        s = o.value;
      if (s)
        return s;
      if (a == n)
        return null;
      i -= 1e4;
    }
  }
  prevMatch(e, n, r) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace);
  }
  matchAll(e, n) {
    let r = Dd(this.spec, e, 0, e.doc.length), i = [];
    for (; !r.next().done; ) {
      if (i.length >= n)
        return null;
      i.push(r.value);
    }
    return i;
  }
  highlight(e, n, r, i) {
    let a = Dd(this.spec, e, Math.max(0, n - this.spec.unquoted.length), Math.min(r + this.spec.unquoted.length, e.doc.length));
    for (; !a.next().done; )
      i(a.value.from, a.value.to);
  }
}
function Rd(t, e, n, r) {
  return new Dse(e.doc, t.search, {
    ignoreCase: !t.caseSensitive,
    test: t.wholeWord ? Bct(e.charCategorizer(e.selection.main.head)) : void 0
  }, n, r);
}
function mS(t, e) {
  return t.slice(_r(t, e, !1), e);
}
function yS(t, e) {
  return t.slice(e, _r(t, e));
}
function Bct(t) {
  return (e, n, r) => !r[0].length || (t(mS(r.input, r.index)) != yn.Word || t(yS(r.input, r.index)) != yn.Word) && (t(yS(r.input, r.index + r[0].length)) != yn.Word || t(mS(r.input, r.index + r[0].length)) != yn.Word);
}
class zct extends Lse {
  nextMatch(e, n, r) {
    let i = Rd(this.spec, e, r, e.doc.length).next();
    return i.done && (i = Rd(this.spec, e, 0, n).next()), i.done ? null : i.value;
  }
  prevMatchInRange(e, n, r) {
    for (let i = 1; ; i++) {
      let a = Math.max(
        n,
        r - i * 1e4
        /* FindPrev.ChunkSize */
      ), o = Rd(this.spec, e, a, r), s = null;
      for (; !o.next().done; )
        s = o.value;
      if (s && (a == n || s.from > a + 10))
        return s;
      if (a == n)
        return null;
    }
  }
  prevMatch(e, n, r) {
    return this.prevMatchInRange(e, 0, n) || this.prevMatchInRange(e, r, e.doc.length);
  }
  getReplacement(e) {
    return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (n, r) => r == "$" ? "$" : r == "&" ? e.match[0] : r != "0" && +r < e.match.length ? e.match[r] : n);
  }
  matchAll(e, n) {
    let r = Rd(this.spec, e, 0, e.doc.length), i = [];
    for (; !r.next().done; ) {
      if (i.length >= n)
        return null;
      i.push(r.value);
    }
    return i;
  }
  highlight(e, n, r, i) {
    let a = Rd(this.spec, e, Math.max(
      0,
      n - 250
      /* RegExp.HighlightMargin */
    ), Math.min(r + 250, e.doc.length));
    for (; !a.next().done; )
      i(a.value.from, a.value.to);
  }
}
const n0 = /* @__PURE__ */ dt.define(), w4 = /* @__PURE__ */ dt.define(), eu = /* @__PURE__ */ ur.define({
  create(t) {
    return new R$(UM(t).create(), null);
  },
  update(t, e) {
    for (let n of e.effects)
      n.is(n0) ? t = new R$(n.value.create(), t.panel) : n.is(w4) && (t = new R$(t.query, n.value ? C4 : null));
    return t;
  },
  provide: (t) => Km.from(t, (e) => e.panel)
});
class R$ {
  constructor(e, n) {
    this.query = e, this.panel = n;
  }
}
const Vct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch" }), Fct = /* @__PURE__ */ Ze.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Wct = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.view = t, this.decorations = this.highlight(t.state.field(eu));
  }
  update(t) {
    let e = t.state.field(eu);
    (e != t.startState.field(eu) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
  }
  highlight({ query: t, panel: e }) {
    if (!e || !t.spec.valid)
      return Ze.none;
    let { view: n } = this, r = new hu();
    for (let i = 0, a = n.visibleRanges, o = a.length; i < o; i++) {
      let { from: s, to: l } = a[i];
      for (; i < o - 1 && l > a[i + 1].from - 2 * 250; )
        l = a[++i].to;
      t.highlight(n.state, s, l, (u, c) => {
        let f = n.state.selection.ranges.some((d) => d.from == u && d.to == c);
        r.add(u, c, f ? Fct : Vct);
      });
    }
    return r.finish();
  }
}, {
  decorations: (t) => t.decorations
});
function dy(t) {
  return (e) => {
    let n = e.state.field(eu, !1);
    return n && n.query.spec.valid ? t(e, n) : zse(e);
  };
}
const bS = /* @__PURE__ */ dy((t, { query: e }) => {
  let { to: n } = t.state.selection.main, r = e.nextMatch(t.state, n, n);
  if (!r)
    return !1;
  let i = me.single(r.from, r.to), a = t.state.facet(Lp);
  return t.dispatch({
    selection: i,
    effects: [T4(t, r), a.scrollToMatch(i.main, t)],
    userEvent: "select.search"
  }), Bse(t), !0;
}), _S = /* @__PURE__ */ dy((t, { query: e }) => {
  let { state: n } = t, { from: r } = n.selection.main, i = e.prevMatch(n, r, r);
  if (!i)
    return !1;
  let a = me.single(i.from, i.to), o = t.state.facet(Lp);
  return t.dispatch({
    selection: a,
    effects: [T4(t, i), o.scrollToMatch(a.main, t)],
    userEvent: "select.search"
  }), Bse(t), !0;
}), Qct = /* @__PURE__ */ dy((t, { query: e }) => {
  let n = e.matchAll(t.state, 1e3);
  return !n || !n.length ? !1 : (t.dispatch({
    selection: me.create(n.map((r) => me.range(r.from, r.to))),
    userEvent: "select.search.matches"
  }), !0);
}), Hct = ({ state: t, dispatch: e }) => {
  let n = t.selection;
  if (n.ranges.length > 1 || n.main.empty)
    return !1;
  let { from: r, to: i } = n.main, a = [], o = 0;
  for (let s = new Kh(t.doc, t.sliceDoc(r, i)); !s.next().done; ) {
    if (a.length > 1e3)
      return !1;
    s.value.from == r && (o = a.length), a.push(me.range(s.value.from, s.value.to));
  }
  return e(t.update({
    selection: me.create(a, o),
    userEvent: "select.search.matches"
  })), !0;
}, H9 = /* @__PURE__ */ dy((t, { query: e }) => {
  let { state: n } = t, { from: r, to: i } = n.selection.main;
  if (n.readOnly)
    return !1;
  let a = e.nextMatch(n, r, r);
  if (!a)
    return !1;
  let o = [], s, l, u = [];
  if (a.from == r && a.to == i && (l = n.toText(e.getReplacement(a)), o.push({ from: a.from, to: a.to, insert: l }), a = e.nextMatch(n, a.from, a.to), u.push(De.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))), a) {
    let c = o.length == 0 || o[0].from >= a.to ? 0 : a.to - a.from - l.length;
    s = me.single(a.from - c, a.to - c), u.push(T4(t, a)), u.push(n.facet(Lp).scrollToMatch(s.main, t));
  }
  return t.dispatch({
    changes: o,
    selection: s,
    effects: u,
    userEvent: "input.replace"
  }), !0;
}), Gct = /* @__PURE__ */ dy((t, { query: e }) => {
  if (t.state.readOnly)
    return !1;
  let n = e.matchAll(t.state, 1e9).map((i) => {
    let { from: a, to: o } = i;
    return { from: a, to: o, insert: e.getReplacement(i) };
  });
  if (!n.length)
    return !1;
  let r = t.state.phrase("replaced $ matches", n.length) + ".";
  return t.dispatch({
    changes: n,
    effects: De.announce.of(r),
    userEvent: "input.replace.all"
  }), !0;
});
function C4(t) {
  return t.state.facet(Lp).createPanel(t);
}
function UM(t, e) {
  var n, r, i, a, o;
  let s = t.selection.main, l = s.empty || s.to > s.from + 100 ? "" : t.sliceDoc(s.from, s.to);
  if (e && !l)
    return e;
  let u = t.facet(Lp);
  return new kse({
    search: ((n = e == null ? void 0 : e.literal) !== null && n !== void 0 ? n : u.literal) ? l : l.replace(/\n/g, "\\n"),
    caseSensitive: (r = e == null ? void 0 : e.caseSensitive) !== null && r !== void 0 ? r : u.caseSensitive,
    literal: (i = e == null ? void 0 : e.literal) !== null && i !== void 0 ? i : u.literal,
    regexp: (a = e == null ? void 0 : e.regexp) !== null && a !== void 0 ? a : u.regexp,
    wholeWord: (o = e == null ? void 0 : e.wholeWord) !== null && o !== void 0 ? o : u.wholeWord
  });
}
function Nse(t) {
  let e = qm(t, C4);
  return e && e.dom.querySelector("[main-field]");
}
function Bse(t) {
  let e = Nse(t);
  e && e == t.root.activeElement && e.select();
}
const zse = (t) => {
  let e = t.state.field(eu, !1);
  if (e && e.panel) {
    let n = Nse(t);
    if (n && n != t.root.activeElement) {
      let r = UM(t.state, e.query.spec);
      r.valid && t.dispatch({ effects: n0.of(r) }), n.focus(), n.select();
    }
  } else
    t.dispatch({ effects: [
      w4.of(!0),
      e ? n0.of(UM(t.state, e.query.spec)) : dt.appendConfig.of(Xct)
    ] });
  return !0;
}, Vse = (t) => {
  let e = t.state.field(eu, !1);
  if (!e || !e.panel)
    return !1;
  let n = qm(t, C4);
  return n && n.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: w4.of(!1) }), !0;
}, jct = [
  { key: "Mod-f", run: zse, scope: "editor search-panel" },
  { key: "F3", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  { key: "Mod-g", run: bS, shift: _S, scope: "editor search-panel", preventDefault: !0 },
  { key: "Escape", run: Vse, scope: "editor search-panel" },
  { key: "Mod-Shift-l", run: Hct },
  { key: "Mod-Alt-g", run: xct },
  { key: "Mod-d", run: kct, preventDefault: !0 }
];
class Zct {
  constructor(e) {
    this.view = e;
    let n = this.query = e.state.field(eu).query.spec;
    this.commit = this.commit.bind(this), this.searchField = on("input", {
      value: n.search,
      placeholder: Ai(e, "Find"),
      "aria-label": Ai(e, "Find"),
      class: "cm-textfield",
      name: "search",
      form: "",
      "main-field": "true",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.replaceField = on("input", {
      value: n.replace,
      placeholder: Ai(e, "Replace"),
      "aria-label": Ai(e, "Replace"),
      class: "cm-textfield",
      name: "replace",
      form: "",
      onchange: this.commit,
      onkeyup: this.commit
    }), this.caseField = on("input", {
      type: "checkbox",
      name: "case",
      form: "",
      checked: n.caseSensitive,
      onchange: this.commit
    }), this.reField = on("input", {
      type: "checkbox",
      name: "re",
      form: "",
      checked: n.regexp,
      onchange: this.commit
    }), this.wordField = on("input", {
      type: "checkbox",
      name: "word",
      form: "",
      checked: n.wholeWord,
      onchange: this.commit
    });
    function r(i, a, o) {
      return on("button", { class: "cm-button", name: i, onclick: a, type: "button" }, o);
    }
    this.dom = on("div", { onkeydown: (i) => this.keydown(i), class: "cm-search" }, [
      this.searchField,
      r("next", () => bS(e), [Ai(e, "next")]),
      r("prev", () => _S(e), [Ai(e, "previous")]),
      r("select", () => Qct(e), [Ai(e, "all")]),
      on("label", null, [this.caseField, Ai(e, "match case")]),
      on("label", null, [this.reField, Ai(e, "regexp")]),
      on("label", null, [this.wordField, Ai(e, "by word")]),
      ...e.state.readOnly ? [] : [
        on("br"),
        this.replaceField,
        r("replace", () => H9(e), [Ai(e, "replace")]),
        r("replaceAll", () => Gct(e), [Ai(e, "replace all")])
      ],
      on("button", {
        name: "close",
        onclick: () => Vse(e),
        "aria-label": Ai(e, "close"),
        type: "button"
      }, ["×"])
    ]);
  }
  commit() {
    let e = new kse({
      search: this.searchField.value,
      caseSensitive: this.caseField.checked,
      regexp: this.reField.checked,
      wholeWord: this.wordField.checked,
      replace: this.replaceField.value
    });
    e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: n0.of(e) }));
  }
  keydown(e) {
    ist(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? _S : bS)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), H9(this.view));
  }
  update(e) {
    for (let n of e.transactions)
      for (let r of n.effects)
        r.is(n0) && !r.value.eq(this.query) && this.setQuery(r.value);
  }
  setQuery(e) {
    this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
  }
  mount() {
    this.searchField.select();
  }
  get pos() {
    return 80;
  }
  get top() {
    return this.view.state.facet(Lp).top;
  }
}
function Ai(t, e) {
  return t.state.phrase(e);
}
const s_ = 30, l_ = /[\s\.,:;?!]/;
function T4(t, { from: e, to: n }) {
  let r = t.state.doc.lineAt(e), i = t.state.doc.lineAt(n).to, a = Math.max(r.from, e - s_), o = Math.min(i, n + s_), s = t.state.sliceDoc(a, o);
  if (a != r.from) {
    for (let l = 0; l < s_; l++)
      if (!l_.test(s[l + 1]) && l_.test(s[l])) {
        s = s.slice(l);
        break;
      }
  }
  if (o != i) {
    for (let l = s.length - 1; l > s.length - s_; l--)
      if (!l_.test(s[l - 1]) && l_.test(s[l])) {
        s = s.slice(0, l);
        break;
      }
  }
  return De.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`);
}
const Uct = /* @__PURE__ */ De.baseTheme({
  ".cm-panel.cm-search": {
    padding: "2px 6px 4px",
    position: "relative",
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "4px",
      backgroundColor: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    },
    "& input, & button, & label": {
      margin: ".2em .6em .2em 0"
    },
    "& input[type=checkbox]": {
      marginRight: ".2em"
    },
    "& label": {
      fontSize: "80%",
      whiteSpace: "pre"
    }
  },
  "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
  "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
}), Xct = [
  eu,
  /* @__PURE__ */ Eu.low(Wct),
  Uct
];
class Fse {
  /**
  Create a new completion context. (Mostly useful for testing
  completion sources—in the editor, the extension will create
  these for you.)
  */
  constructor(e, n, r, i) {
    this.state = e, this.pos = n, this.explicit = r, this.view = i, this.abortListeners = [];
  }
  /**
  Get the extent, content, and (if there is a token) type of the
  token before `this.pos`.
  */
  tokenBefore(e) {
    let n = nr(this.state).resolveInner(this.pos, -1);
    for (; n && e.indexOf(n.name) < 0; )
      n = n.parent;
    return n ? {
      from: n.from,
      to: this.pos,
      text: this.state.sliceDoc(n.from, this.pos),
      type: n.type
    } : null;
  }
  /**
  Get the match of the given expression directly before the
  cursor.
  */
  matchBefore(e) {
    let n = this.state.doc.lineAt(this.pos), r = Math.max(n.from, this.pos - 250), i = n.text.slice(r - n.from, this.pos - n.from), a = i.search(Qse(e, !1));
    return a < 0 ? null : { from: r + a, to: this.pos, text: i.slice(a) };
  }
  /**
  Yields true when the query has been aborted. Can be useful in
  asynchronous queries to avoid doing work that will be ignored.
  */
  get aborted() {
    return this.abortListeners == null;
  }
  /**
  Allows you to register abort handlers, which will be called when
  the query is
  [aborted](https://codemirror.net/6/docs/ref/#autocomplete.CompletionContext.aborted).
  */
  addEventListener(e, n) {
    e == "abort" && this.abortListeners && this.abortListeners.push(n);
  }
}
function G9(t) {
  let e = Object.keys(t).join(""), n = /\w/.test(e);
  return n && (e = e.replace(/\w/g, "")), `[${n ? "\\w" : ""}${e.replace(/[^\w\s]/g, "\\$&")}]`;
}
function Yct(t) {
  let e = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
  for (let { label: i } of t) {
    e[i[0]] = !0;
    for (let a = 1; a < i.length; a++)
      n[i[a]] = !0;
  }
  let r = G9(e) + G9(n) + "*$";
  return [new RegExp("^" + r), new RegExp(r)];
}
function Wse(t) {
  let e = t.map((i) => typeof i == "string" ? { label: i } : i), [n, r] = e.every((i) => /^\w+$/.test(i.label)) ? [/\w*$/, /\w+$/] : Yct(e);
  return (i) => {
    let a = i.matchBefore(r);
    return a || i.explicit ? { from: a ? a.from : i.pos, options: e, validFor: n } : null;
  };
}
function qct(t, e) {
  return (n) => {
    for (let r = nr(n.state).resolveInner(n.pos, -1); r; r = r.parent) {
      if (t.indexOf(r.name) > -1)
        return null;
      if (r.type.isTop)
        break;
    }
    return e(n);
  };
}
class j9 {
  constructor(e, n, r, i) {
    this.completion = e, this.source = n, this.match = r, this.score = i;
  }
}
function tu(t) {
  return t.selection.main.from;
}
function Qse(t, e) {
  var n;
  let { source: r } = t, i = e && r[0] != "^", a = r[r.length - 1] != "$";
  return !i && !a ? t : new RegExp(`${i ? "^" : ""}(?:${r})${a ? "$" : ""}`, (n = t.flags) !== null && n !== void 0 ? n : t.ignoreCase ? "i" : "");
}
const P4 = /* @__PURE__ */ ul.define();
function Kct(t, e, n, r) {
  let { main: i } = t.selection, a = n - i.from, o = r - i.from;
  return Object.assign(Object.assign({}, t.changeByRange((s) => s != i && n != r && t.sliceDoc(s.from + a, s.from + o) != t.sliceDoc(n, r) ? { range: s } : {
    changes: { from: s.from + a, to: r == i.from ? s.to : s.from + o, insert: e },
    range: me.cursor(s.from + a + e.length)
  })), { scrollIntoView: !0, userEvent: "input.complete" });
}
const Z9 = /* @__PURE__ */ new WeakMap();
function Jct(t) {
  if (!Array.isArray(t))
    return t;
  let e = Z9.get(t);
  return e || Z9.set(t, e = Wse(t)), e;
}
const OS = /* @__PURE__ */ dt.define(), r0 = /* @__PURE__ */ dt.define();
class eft {
  constructor(e) {
    this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
    for (let n = 0; n < e.length; ) {
      let r = gr(e, n), i = ga(r);
      this.chars.push(r);
      let a = e.slice(n, n + i), o = a.toUpperCase();
      this.folded.push(gr(o == a ? a.toLowerCase() : o, 0)), n += i;
    }
    this.astral = e.length != this.chars.length;
  }
  ret(e, n) {
    return this.score = e, this.matched = n, this;
  }
  // Matches a given word (completion) against the pattern (input).
  // Will return a boolean indicating whether there was a match and,
  // on success, set `this.score` to the score, `this.matched` to an
  // array of `from, to` pairs indicating the matched parts of `word`.
  //
  // The score is a number that is more negative the worse the match
  // is. See `Penalty` above.
  match(e) {
    if (this.pattern.length == 0)
      return this.ret(-100, []);
    if (e.length < this.pattern.length)
      return null;
    let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
    if (n.length == 1) {
      let y = gr(e, 0), b = ga(y), _ = b == e.length ? 0 : -100;
      if (y != n[0]) if (y == r[0])
        _ += -200;
      else
        return null;
      return this.ret(_, [0, b]);
    }
    let s = e.indexOf(this.pattern);
    if (s == 0)
      return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
    let l = n.length, u = 0;
    if (s < 0) {
      for (let y = 0, b = Math.min(e.length, 200); y < b && u < l; ) {
        let _ = gr(e, y);
        (_ == n[u] || _ == r[u]) && (i[u++] = y), y += ga(_);
      }
      if (u < l)
        return null;
    }
    let c = 0, f = 0, d = !1, h = 0, p = -1, v = -1, g = /[a-z]/.test(e), m = !0;
    for (let y = 0, b = Math.min(e.length, 200), _ = 0; y < b && f < l; ) {
      let O = gr(e, y);
      s < 0 && (c < l && O == n[c] && (a[c++] = y), h < l && (O == n[h] || O == r[h] ? (h == 0 && (p = y), v = y + 1, h++) : h = 0));
      let S, x = O < 255 ? O >= 48 && O <= 57 || O >= 97 && O <= 122 ? 2 : O >= 65 && O <= 90 ? 1 : 0 : (S = KL(O)) != S.toLowerCase() ? 1 : S != S.toUpperCase() ? 2 : 0;
      (!y || x == 1 && g || _ == 0 && x != 0) && (n[f] == O || r[f] == O && (d = !0) ? o[f++] = y : o.length && (m = !1)), _ = x, y += ga(O);
    }
    return f == l && o[0] == 0 && m ? this.result(-100 + (d ? -200 : 0), o, e) : h == l && p == 0 ? this.ret(-200 - e.length + (v == e.length ? 0 : -100), [0, v]) : s > -1 ? this.ret(-700 - e.length, [s, s + this.pattern.length]) : h == l ? this.ret(-900 - e.length, [p, v]) : f == l ? this.result(-100 + (d ? -200 : 0) + -700 + (m ? 0 : -1100), o, e) : n.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e);
  }
  result(e, n, r) {
    let i = [], a = 0;
    for (let o of n) {
      let s = o + (this.astral ? ga(gr(r, o)) : 1);
      a && i[a - 1] == o ? i[a - 1] = s : (i[a++] = o, i[a++] = s);
    }
    return this.ret(e - r.length, i);
  }
}
class tft {
  constructor(e) {
    this.pattern = e, this.matched = [], this.score = 0, this.folded = e.toLowerCase();
  }
  match(e) {
    if (e.length < this.pattern.length)
      return null;
    let n = e.slice(0, this.pattern.length), r = n == this.pattern ? 0 : n.toLowerCase() == this.folded ? -200 : null;
    return r == null ? null : (this.matched = [0, n.length], this.score = r + (e.length == this.pattern.length ? 0 : -100), this);
  }
}
const br = /* @__PURE__ */ Be.define({
  combine(t) {
    return fs(t, {
      activateOnTyping: !0,
      activateOnCompletion: () => !1,
      activateOnTypingDelay: 100,
      selectOnOpen: !0,
      override: null,
      closeOnBlur: !0,
      maxRenderedOptions: 100,
      defaultKeymap: !0,
      tooltipClass: () => "",
      optionClass: () => "",
      aboveCursor: !1,
      icons: !0,
      addToOptions: [],
      positionInfo: nft,
      filterStrict: !1,
      compareCompletions: (e, n) => e.label.localeCompare(n.label),
      interactionDelay: 75,
      updateSyncTime: 100
    }, {
      defaultKeymap: (e, n) => e && n,
      closeOnBlur: (e, n) => e && n,
      icons: (e, n) => e && n,
      tooltipClass: (e, n) => (r) => U9(e(r), n(r)),
      optionClass: (e, n) => (r) => U9(e(r), n(r)),
      addToOptions: (e, n) => e.concat(n),
      filterStrict: (e, n) => e || n
    });
  }
});
function U9(t, e) {
  return t ? e ? t + " " + e : t : e;
}
function nft(t, e, n, r, i, a) {
  let o = t.textDirection == pn.RTL, s = o, l = !1, u = "top", c, f, d = e.left - i.left, h = i.right - e.right, p = r.right - r.left, v = r.bottom - r.top;
  if (s && d < Math.min(p, h) ? s = !1 : !s && h < Math.min(p, d) && (s = !0), p <= (s ? d : h))
    c = Math.max(i.top, Math.min(n.top, i.bottom - v)) - e.top, f = Math.min(400, s ? d : h);
  else {
    l = !0, f = Math.min(
      400,
      (o ? e.right : i.right - e.left) - 30
      /* Info.Margin */
    );
    let y = i.bottom - e.bottom;
    y >= v || y > e.top ? c = n.bottom - e.top : (u = "bottom", c = e.bottom - n.top);
  }
  let g = (e.bottom - e.top) / a.offsetHeight, m = (e.right - e.left) / a.offsetWidth;
  return {
    style: `${u}: ${c / g}px; max-width: ${f / m}px`,
    class: "cm-completionInfo-" + (l ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
  };
}
function rft(t) {
  let e = t.addToOptions.slice();
  return t.icons && e.push({
    render(n) {
      let r = document.createElement("div");
      return r.classList.add("cm-completionIcon"), n.type && r.classList.add(...n.type.split(/\s+/g).map((i) => "cm-completionIcon-" + i)), r.setAttribute("aria-hidden", "true"), r;
    },
    position: 20
  }), e.push({
    render(n, r, i, a) {
      let o = document.createElement("span");
      o.className = "cm-completionLabel";
      let s = n.displayLabel || n.label, l = 0;
      for (let u = 0; u < a.length; ) {
        let c = a[u++], f = a[u++];
        c > l && o.appendChild(document.createTextNode(s.slice(l, c)));
        let d = o.appendChild(document.createElement("span"));
        d.appendChild(document.createTextNode(s.slice(c, f))), d.className = "cm-completionMatchedText", l = f;
      }
      return l < s.length && o.appendChild(document.createTextNode(s.slice(l))), o;
    },
    position: 50
  }, {
    render(n) {
      if (!n.detail)
        return null;
      let r = document.createElement("span");
      return r.className = "cm-completionDetail", r.textContent = n.detail, r;
    },
    position: 80
  }), e.sort((n, r) => n.position - r.position).map((n) => n.render);
}
function k$(t, e, n) {
  if (t <= n)
    return { from: 0, to: t };
  if (e < 0 && (e = 0), e <= t >> 1) {
    let i = Math.floor(e / n);
    return { from: i * n, to: (i + 1) * n };
  }
  let r = Math.floor((t - e) / n);
  return { from: t - (r + 1) * n, to: t - r * n };
}
class ift {
  constructor(e, n, r) {
    this.view = e, this.stateField = n, this.applyCompletion = r, this.info = null, this.infoDestroy = null, this.placeInfoReq = {
      read: () => this.measureInfo(),
      write: (l) => this.placeInfo(l),
      key: this
    }, this.space = null, this.currentClass = "";
    let i = e.state.field(n), { options: a, selected: o } = i.open, s = e.state.facet(br);
    this.optionContent = rft(s), this.optionClass = s.optionClass, this.tooltipClass = s.tooltipClass, this.range = k$(a.length, o, s.maxRenderedOptions), this.dom = document.createElement("div"), this.dom.className = "cm-tooltip-autocomplete", this.updateTooltipClass(e.state), this.dom.addEventListener("mousedown", (l) => {
      let { options: u } = e.state.field(n).open;
      for (let c = l.target, f; c && c != this.dom; c = c.parentNode)
        if (c.nodeName == "LI" && (f = /-(\d+)$/.exec(c.id)) && +f[1] < u.length) {
          this.applyCompletion(e, u[+f[1]]), l.preventDefault();
          return;
        }
    }), this.dom.addEventListener("focusout", (l) => {
      let u = e.state.field(this.stateField, !1);
      u && u.tooltip && e.state.facet(br).closeOnBlur && l.relatedTarget != e.contentDOM && e.dispatch({ effects: r0.of(null) });
    }), this.showOptions(a, i.id);
  }
  mount() {
    this.updateSel();
  }
  showOptions(e, n) {
    this.list && this.list.remove(), this.list = this.dom.appendChild(this.createListBox(e, n, this.range)), this.list.addEventListener("scroll", () => {
      this.info && this.view.requestMeasure(this.placeInfoReq);
    });
  }
  update(e) {
    var n;
    let r = e.state.field(this.stateField), i = e.startState.field(this.stateField);
    if (this.updateTooltipClass(e.state), r != i) {
      let { options: a, selected: o, disabled: s } = r.open;
      (!i.open || i.open.options != a) && (this.range = k$(a.length, o, e.state.facet(br).maxRenderedOptions), this.showOptions(a, r.id)), this.updateSel(), s != ((n = i.open) === null || n === void 0 ? void 0 : n.disabled) && this.dom.classList.toggle("cm-tooltip-autocomplete-disabled", !!s);
    }
  }
  updateTooltipClass(e) {
    let n = this.tooltipClass(e);
    if (n != this.currentClass) {
      for (let r of this.currentClass.split(" "))
        r && this.dom.classList.remove(r);
      for (let r of n.split(" "))
        r && this.dom.classList.add(r);
      this.currentClass = n;
    }
  }
  positioned(e) {
    this.space = e, this.info && this.view.requestMeasure(this.placeInfoReq);
  }
  updateSel() {
    let e = this.view.state.field(this.stateField), n = e.open;
    if ((n.selected > -1 && n.selected < this.range.from || n.selected >= this.range.to) && (this.range = k$(n.options.length, n.selected, this.view.state.facet(br).maxRenderedOptions), this.showOptions(n.options, e.id)), this.updateSelectedOption(n.selected)) {
      this.destroyInfo();
      let { completion: r } = n.options[n.selected], { info: i } = r;
      if (!i)
        return;
      let a = typeof i == "string" ? document.createTextNode(i) : i(r);
      if (!a)
        return;
      "then" in a ? a.then((o) => {
        o && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(o, r);
      }).catch((o) => mi(this.view.state, o, "completion info")) : this.addInfoPane(a, r);
    }
  }
  addInfoPane(e, n) {
    this.destroyInfo();
    let r = this.info = document.createElement("div");
    if (r.className = "cm-tooltip cm-completionInfo", e.nodeType != null)
      r.appendChild(e), this.infoDestroy = null;
    else {
      let { dom: i, destroy: a } = e;
      r.appendChild(i), this.infoDestroy = a || null;
    }
    this.dom.appendChild(r), this.view.requestMeasure(this.placeInfoReq);
  }
  updateSelectedOption(e) {
    let n = null;
    for (let r = this.list.firstChild, i = this.range.from; r; r = r.nextSibling, i++)
      r.nodeName != "LI" || !r.id ? i-- : i == e ? r.hasAttribute("aria-selected") || (r.setAttribute("aria-selected", "true"), n = r) : r.hasAttribute("aria-selected") && r.removeAttribute("aria-selected");
    return n && oft(this.list, n), n;
  }
  measureInfo() {
    let e = this.dom.querySelector("[aria-selected]");
    if (!e || !this.info)
      return null;
    let n = this.dom.getBoundingClientRect(), r = this.info.getBoundingClientRect(), i = e.getBoundingClientRect(), a = this.space;
    if (!a) {
      let o = this.dom.ownerDocument.defaultView || window;
      a = { left: 0, top: 0, right: o.innerWidth, bottom: o.innerHeight };
    }
    return i.top > Math.min(a.bottom, n.bottom) - 10 || i.bottom < Math.max(a.top, n.top) + 10 ? null : this.view.state.facet(br).positionInfo(this.view, n, i, r, a, this.dom);
  }
  placeInfo(e) {
    this.info && (e ? (e.style && (this.info.style.cssText = e.style), this.info.className = "cm-tooltip cm-completionInfo " + (e.class || "")) : this.info.style.cssText = "top: -1e6px");
  }
  createListBox(e, n, r) {
    const i = document.createElement("ul");
    i.id = n, i.setAttribute("role", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-label", this.view.state.phrase("Completions"));
    let a = null;
    for (let o = r.from; o < r.to; o++) {
      let { completion: s, match: l } = e[o], { section: u } = s;
      if (u) {
        let d = typeof u == "string" ? u : u.name;
        if (d != a && (o > r.from || r.from == 0))
          if (a = d, typeof u != "string" && u.header)
            i.appendChild(u.header(u));
          else {
            let h = i.appendChild(document.createElement("completion-section"));
            h.textContent = d;
          }
      }
      const c = i.appendChild(document.createElement("li"));
      c.id = n + "-" + o, c.setAttribute("role", "option");
      let f = this.optionClass(s);
      f && (c.className = f);
      for (let d of this.optionContent) {
        let h = d(s, this.view.state, this.view, l);
        h && c.appendChild(h);
      }
    }
    return r.from && i.classList.add("cm-completionListIncompleteTop"), r.to < e.length && i.classList.add("cm-completionListIncompleteBottom"), i;
  }
  destroyInfo() {
    this.info && (this.infoDestroy && this.infoDestroy(), this.info.remove(), this.info = null);
  }
  destroy() {
    this.destroyInfo();
  }
}
function aft(t, e) {
  return (n) => new ift(n, t, e);
}
function oft(t, e) {
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = n.height / t.offsetHeight;
  r.top < n.top ? t.scrollTop -= (n.top - r.top) / i : r.bottom > n.bottom && (t.scrollTop += (r.bottom - n.bottom) / i);
}
function X9(t) {
  return (t.boost || 0) * 100 + (t.apply ? 10 : 0) + (t.info ? 5 : 0) + (t.type ? 1 : 0);
}
function sft(t, e) {
  let n = [], r = null, i = (u) => {
    n.push(u);
    let { section: c } = u.completion;
    if (c) {
      r || (r = []);
      let f = typeof c == "string" ? c : c.name;
      r.some((d) => d.name == f) || r.push(typeof c == "string" ? { name: f } : c);
    }
  }, a = e.facet(br);
  for (let u of t)
    if (u.hasResult()) {
      let c = u.result.getMatch;
      if (u.result.filter === !1)
        for (let f of u.result.options)
          i(new j9(f, u.source, c ? c(f) : [], 1e9 - n.length));
      else {
        let f = e.sliceDoc(u.from, u.to), d, h = a.filterStrict ? new tft(f) : new eft(f);
        for (let p of u.result.options)
          if (d = h.match(p.label)) {
            let v = p.displayLabel ? c ? c(p, d.matched) : [] : d.matched;
            i(new j9(p, u.source, v, d.score + (p.boost || 0)));
          }
      }
    }
  if (r) {
    let u = /* @__PURE__ */ Object.create(null), c = 0, f = (d, h) => {
      var p, v;
      return ((p = d.rank) !== null && p !== void 0 ? p : 1e9) - ((v = h.rank) !== null && v !== void 0 ? v : 1e9) || (d.name < h.name ? -1 : 1);
    };
    for (let d of r.sort(f))
      c -= 1e5, u[d.name] = c;
    for (let d of n) {
      let { section: h } = d.completion;
      h && (d.score += u[typeof h == "string" ? h : h.name]);
    }
  }
  let o = [], s = null, l = a.compareCompletions;
  for (let u of n.sort((c, f) => f.score - c.score || l(c.completion, f.completion))) {
    let c = u.completion;
    !s || s.label != c.label || s.detail != c.detail || s.type != null && c.type != null && s.type != c.type || s.apply != c.apply || s.boost != c.boost ? o.push(u) : X9(u.completion) > X9(s) && (o[o.length - 1] = u), s = u.completion;
  }
  return o;
}
class Gd {
  constructor(e, n, r, i, a, o) {
    this.options = e, this.attrs = n, this.tooltip = r, this.timestamp = i, this.selected = a, this.disabled = o;
  }
  setSelected(e, n) {
    return e == this.selected || e >= this.options.length ? this : new Gd(this.options, Y9(n, e), this.tooltip, this.timestamp, e, this.disabled);
  }
  static build(e, n, r, i, a) {
    let o = sft(e, n);
    if (!o.length)
      return i && e.some(
        (l) => l.state == 1
        /* State.Pending */
      ) ? new Gd(i.options, i.attrs, i.tooltip, i.timestamp, i.selected, !0) : null;
    let s = n.facet(br).selectOnOpen ? 0 : -1;
    if (i && i.selected != s && i.selected != -1) {
      let l = i.options[i.selected].completion;
      for (let u = 0; u < o.length; u++)
        if (o[u].completion == l) {
          s = u;
          break;
        }
    }
    return new Gd(o, Y9(r, s), {
      pos: e.reduce((l, u) => u.hasResult() ? Math.min(l, u.from) : l, 1e8),
      create: hft,
      above: a.aboveCursor
    }, i ? i.timestamp : Date.now(), s, !1);
  }
  map(e) {
    return new Gd(this.options, this.attrs, Object.assign(Object.assign({}, this.tooltip), { pos: e.mapPos(this.tooltip.pos) }), this.timestamp, this.selected, this.disabled);
  }
}
class SS {
  constructor(e, n, r) {
    this.active = e, this.id = n, this.open = r;
  }
  static start() {
    return new SS(fft, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
  }
  update(e) {
    let { state: n } = e, r = n.facet(br), a = (r.override || n.languageDataAt("autocomplete", tu(n)).map(Jct)).map((s) => (this.active.find((u) => u.source == s) || new Ni(
      s,
      this.active.some(
        (u) => u.state != 0
        /* State.Inactive */
      ) ? 1 : 0
      /* State.Inactive */
    )).update(e, r));
    a.length == this.active.length && a.every((s, l) => s == this.active[l]) && (a = this.active);
    let o = this.open;
    o && e.docChanged && (o = o.map(e.changes)), e.selection || a.some((s) => s.hasResult() && e.changes.touchesRange(s.from, s.to)) || !lft(a, this.active) ? o = Gd.build(a, n, this.id, o, r) : o && o.disabled && !a.some(
      (s) => s.state == 1
      /* State.Pending */
    ) && (o = null), !o && a.every(
      (s) => s.state != 1
      /* State.Pending */
    ) && a.some((s) => s.hasResult()) && (a = a.map((s) => s.hasResult() ? new Ni(
      s.source,
      0
      /* State.Inactive */
    ) : s));
    for (let s of e.effects)
      s.is(jse) && (o = o && o.setSelected(s.value, this.id));
    return a == this.active && o == this.open ? this : new SS(a, this.id, o);
  }
  get tooltip() {
    return this.open ? this.open.tooltip : null;
  }
  get attrs() {
    return this.open ? this.open.attrs : this.active.length ? uft : cft;
  }
}
function lft(t, e) {
  if (t == e)
    return !0;
  for (let n = 0, r = 0; ; ) {
    for (; n < t.length && !t[n].hasResult; )
      n++;
    for (; r < e.length && !e[r].hasResult; )
      r++;
    let i = n == t.length, a = r == e.length;
    if (i || a)
      return i == a;
    if (t[n++].result != e[r++].result)
      return !1;
  }
}
const uft = {
  "aria-autocomplete": "list"
}, cft = {};
function Y9(t, e) {
  let n = {
    "aria-autocomplete": "list",
    "aria-haspopup": "listbox",
    "aria-controls": t
  };
  return e > -1 && (n["aria-activedescendant"] = t + "-" + e), n;
}
const fft = [];
function Hse(t, e) {
  if (t.isUserEvent("input.complete")) {
    let r = t.annotation(P4);
    if (r && e.activateOnCompletion(r))
      return 12;
  }
  let n = t.isUserEvent("input.type");
  return n && e.activateOnTyping ? 5 : n ? 1 : t.isUserEvent("delete.backward") ? 2 : t.selection ? 8 : t.docChanged ? 16 : 0;
}
class Ni {
  constructor(e, n, r = -1) {
    this.source = e, this.state = n, this.explicitPos = r;
  }
  hasResult() {
    return !1;
  }
  update(e, n) {
    let r = Hse(e, n), i = this;
    (r & 8 || r & 16 && this.touches(e)) && (i = new Ni(
      i.source,
      0
      /* State.Inactive */
    )), r & 4 && i.state == 0 && (i = new Ni(
      this.source,
      1
      /* State.Pending */
    )), i = i.updateFor(e, r);
    for (let a of e.effects)
      if (a.is(OS))
        i = new Ni(i.source, 1, a.value ? tu(e.state) : -1);
      else if (a.is(r0))
        i = new Ni(
          i.source,
          0
          /* State.Inactive */
        );
      else if (a.is(Gse))
        for (let o of a.value)
          o.source == i.source && (i = o);
    return i;
  }
  updateFor(e, n) {
    return this.map(e.changes);
  }
  map(e) {
    return e.empty || this.explicitPos < 0 ? this : new Ni(this.source, this.state, e.mapPos(this.explicitPos));
  }
  touches(e) {
    return e.changes.touchesRange(tu(e.state));
  }
}
class fh extends Ni {
  constructor(e, n, r, i, a) {
    super(e, 2, n), this.result = r, this.from = i, this.to = a;
  }
  hasResult() {
    return !0;
  }
  updateFor(e, n) {
    var r;
    if (!(n & 3))
      return this.map(e.changes);
    let i = this.result;
    i.map && !e.changes.empty && (i = i.map(i, e.changes));
    let a = e.changes.mapPos(this.from), o = e.changes.mapPos(this.to, 1), s = tu(e.state);
    if ((this.explicitPos < 0 ? s <= a : s < this.from) || s > o || !i || n & 2 && tu(e.startState) == this.from)
      return new Ni(
        this.source,
        n & 4 ? 1 : 0
        /* State.Inactive */
      );
    let l = this.explicitPos < 0 ? -1 : e.changes.mapPos(this.explicitPos);
    return dft(i.validFor, e.state, a, o) ? new fh(this.source, l, i, a, o) : i.update && (i = i.update(i, a, o, new Fse(e.state, s, l >= 0))) ? new fh(this.source, l, i, i.from, (r = i.to) !== null && r !== void 0 ? r : tu(e.state)) : new Ni(this.source, 1, l);
  }
  map(e) {
    return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new fh(this.source, this.explicitPos < 0 ? -1 : e.mapPos(this.explicitPos), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new Ni(
      this.source,
      0
      /* State.Inactive */
    );
  }
  touches(e) {
    return e.changes.touchesRange(this.from, this.to);
  }
}
function dft(t, e, n, r) {
  if (!t)
    return !1;
  let i = e.sliceDoc(n, r);
  return typeof t == "function" ? t(i, n, r, e) : Qse(t, !0).test(i);
}
const Gse = /* @__PURE__ */ dt.define({
  map(t, e) {
    return t.map((n) => n.map(e));
  }
}), jse = /* @__PURE__ */ dt.define(), vi = /* @__PURE__ */ ur.define({
  create() {
    return SS.start();
  },
  update(t, e) {
    return t.update(e);
  },
  provide: (t) => [
    u4.from(t, (e) => e.tooltip),
    De.contentAttributes.from(t, (e) => e.attrs)
  ]
});
function $4(t, e) {
  const n = e.completion.apply || e.completion.label;
  let r = t.state.field(vi).active.find((i) => i.source == e.source);
  return r instanceof fh ? (typeof n == "string" ? t.dispatch(Object.assign(Object.assign({}, Kct(t.state, n, r.from, r.to)), { annotations: P4.of(e.completion) })) : n(t, e.completion, r.from, r.to), !0) : !1;
}
const hft = /* @__PURE__ */ aft(vi, $4);
function u_(t, e = "option") {
  return (n) => {
    let r = n.state.field(vi, !1);
    if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(br).interactionDelay)
      return !1;
    let i = 1, a;
    e == "page" && (a = woe(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
    let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (t ? 1 : -1) : t ? 0 : o - 1;
    return s < 0 ? s = e == "page" ? 0 : o - 1 : s >= o && (s = e == "page" ? o - 1 : 0), n.dispatch({ effects: jse.of(s) }), !0;
  };
}
const pft = (t) => {
  let e = t.state.field(vi, !1);
  return t.state.readOnly || !e || !e.open || e.open.selected < 0 || e.open.disabled || Date.now() - e.open.timestamp < t.state.facet(br).interactionDelay ? !1 : $4(t, e.open.options[e.open.selected]);
}, vft = (t) => t.state.field(vi, !1) ? (t.dispatch({ effects: OS.of(!0) }), !0) : !1, gft = (t) => {
  let e = t.state.field(vi, !1);
  return !e || !e.active.some(
    (n) => n.state != 0
    /* State.Inactive */
  ) ? !1 : (t.dispatch({ effects: r0.of(null) }), !0);
};
class mft {
  constructor(e, n) {
    this.active = e, this.context = n, this.time = Date.now(), this.updates = [], this.done = void 0;
  }
}
const yft = 50, bft = 1e3, _ft = /* @__PURE__ */ kn.fromClass(class {
  constructor(t) {
    this.view = t, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
    for (let e of t.state.field(vi).active)
      e.state == 1 && this.startQuery(e);
  }
  update(t) {
    let e = t.state.field(vi), n = t.state.facet(br);
    if (!t.selectionSet && !t.docChanged && t.startState.field(vi) == e)
      return;
    let r = t.transactions.some((a) => {
      let o = Hse(a, n);
      return o & 8 || (a.selection || a.docChanged) && !(o & 3);
    });
    for (let a = 0; a < this.running.length; a++) {
      let o = this.running[a];
      if (r || o.updates.length + t.transactions.length > yft && Date.now() - o.time > bft) {
        for (let s of o.context.abortListeners)
          try {
            s();
          } catch (l) {
            mi(this.view.state, l);
          }
        o.context.abortListeners = null, this.running.splice(a--, 1);
      } else
        o.updates.push(...t.transactions);
    }
    this.debounceUpdate > -1 && clearTimeout(this.debounceUpdate), t.transactions.some((a) => a.effects.some((o) => o.is(OS))) && (this.pendingStart = !0);
    let i = this.pendingStart ? 50 : n.activateOnTypingDelay;
    if (this.debounceUpdate = e.active.some((a) => a.state == 1 && !this.running.some((o) => o.active.source == a.source)) ? setTimeout(() => this.startUpdate(), i) : -1, this.composing != 0)
      for (let a of t.transactions)
        a.isUserEvent("input.type") ? this.composing = 2 : this.composing == 2 && a.selection && (this.composing = 3);
  }
  startUpdate() {
    this.debounceUpdate = -1, this.pendingStart = !1;
    let { state: t } = this.view, e = t.field(vi);
    for (let n of e.active)
      n.state == 1 && !this.running.some((r) => r.active.source == n.source) && this.startQuery(n);
  }
  startQuery(t) {
    let { state: e } = this.view, n = tu(e), r = new Fse(e, n, t.explicitPos == n, this.view), i = new mft(t, r);
    this.running.push(i), Promise.resolve(t.source(r)).then((a) => {
      i.context.aborted || (i.done = a || null, this.scheduleAccept());
    }, (a) => {
      this.view.dispatch({ effects: r0.of(null) }), mi(this.view.state, a);
    });
  }
  scheduleAccept() {
    this.running.every((t) => t.done !== void 0) ? this.accept() : this.debounceAccept < 0 && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(br).updateSyncTime));
  }
  // For each finished query in this.running, try to create a result
  // or, if appropriate, restart the query.
  accept() {
    var t;
    this.debounceAccept > -1 && clearTimeout(this.debounceAccept), this.debounceAccept = -1;
    let e = [], n = this.view.state.facet(br);
    for (let r = 0; r < this.running.length; r++) {
      let i = this.running[r];
      if (i.done === void 0)
        continue;
      if (this.running.splice(r--, 1), i.done) {
        let o = new fh(i.active.source, i.active.explicitPos, i.done, i.done.from, (t = i.done.to) !== null && t !== void 0 ? t : tu(i.updates.length ? i.updates[0].startState : this.view.state));
        for (let s of i.updates)
          o = o.update(s, n);
        if (o.hasResult()) {
          e.push(o);
          continue;
        }
      }
      let a = this.view.state.field(vi).active.find((o) => o.source == i.active.source);
      if (a && a.state == 1)
        if (i.done == null) {
          let o = new Ni(
            i.active.source,
            0
            /* State.Inactive */
          );
          for (let s of i.updates)
            o = o.update(s, n);
          o.state != 1 && e.push(o);
        } else
          this.startQuery(a);
    }
    e.length && this.view.dispatch({ effects: Gse.of(e) });
  }
}, {
  eventHandlers: {
    blur(t) {
      let e = this.view.state.field(vi, !1);
      if (e && e.tooltip && this.view.state.facet(br).closeOnBlur) {
        let n = e.open && woe(this.view, e.open.tooltip);
        (!n || !n.dom.contains(t.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: r0.of(null) }), 10);
      }
    },
    compositionstart() {
      this.composing = 1;
    },
    compositionend() {
      this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: OS.of(!1) }), 20), this.composing = 0;
    }
  }
}), Oft = typeof navigator == "object" && /* @__PURE__ */ /Win/.test(navigator.platform), Sft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ De.domEventHandlers({
  keydown(t, e) {
    let n = e.state.field(vi, !1);
    if (!n || !n.open || n.open.disabled || n.open.selected < 0 || t.key.length > 1 || t.ctrlKey && !(Oft && t.altKey) || t.metaKey)
      return !1;
    let r = n.open.options[n.open.selected], i = n.active.find((o) => o.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
    return a && a.indexOf(t.key) > -1 && $4(e, r), !1;
  }
})), Zse = /* @__PURE__ */ De.baseTheme({
  ".cm-tooltip.cm-tooltip-autocomplete": {
    "& > ul": {
      fontFamily: "monospace",
      whiteSpace: "nowrap",
      overflow: "hidden auto",
      maxWidth_fallback: "700px",
      maxWidth: "min(700px, 95vw)",
      minWidth: "250px",
      maxHeight: "10em",
      height: "100%",
      listStyle: "none",
      margin: 0,
      padding: 0,
      "& > li, & > completion-section": {
        padding: "1px 3px",
        lineHeight: 1.2
      },
      "& > li": {
        overflowX: "hidden",
        textOverflow: "ellipsis",
        cursor: "pointer"
      },
      "& > completion-section": {
        display: "list-item",
        borderBottom: "1px solid silver",
        paddingLeft: "0.5em",
        opacity: 0.7
      }
    }
  },
  "&light .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#17c",
    color: "white"
  },
  "&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#777"
  },
  "&dark .cm-tooltip-autocomplete ul li[aria-selected]": {
    background: "#347",
    color: "white"
  },
  "&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]": {
    background: "#444"
  },
  ".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after": {
    content: '"···"',
    opacity: 0.5,
    display: "block",
    textAlign: "center"
  },
  ".cm-tooltip.cm-completionInfo": {
    position: "absolute",
    padding: "3px 9px",
    width: "max-content",
    maxWidth: "400px",
    boxSizing: "border-box"
  },
  ".cm-completionInfo.cm-completionInfo-left": { right: "100%" },
  ".cm-completionInfo.cm-completionInfo-right": { left: "100%" },
  ".cm-completionInfo.cm-completionInfo-left-narrow": { right: "30px" },
  ".cm-completionInfo.cm-completionInfo-right-narrow": { left: "30px" },
  "&light .cm-snippetField": { backgroundColor: "#00000022" },
  "&dark .cm-snippetField": { backgroundColor: "#ffffff22" },
  ".cm-snippetFieldPosition": {
    verticalAlign: "text-top",
    width: 0,
    height: "1.15em",
    display: "inline-block",
    margin: "0 -0.7px -.7em",
    borderLeft: "1.4px dotted #888"
  },
  ".cm-completionMatchedText": {
    textDecoration: "underline"
  },
  ".cm-completionDetail": {
    marginLeft: "0.5em",
    fontStyle: "italic"
  },
  ".cm-completionIcon": {
    fontSize: "90%",
    width: ".8em",
    display: "inline-block",
    textAlign: "center",
    paddingRight: ".6em",
    opacity: "0.6",
    boxSizing: "content-box"
  },
  ".cm-completionIcon-function, .cm-completionIcon-method": {
    "&:after": { content: "'ƒ'" }
  },
  ".cm-completionIcon-class": {
    "&:after": { content: "'○'" }
  },
  ".cm-completionIcon-interface": {
    "&:after": { content: "'◌'" }
  },
  ".cm-completionIcon-variable": {
    "&:after": { content: "'𝑥'" }
  },
  ".cm-completionIcon-constant": {
    "&:after": { content: "'𝐶'" }
  },
  ".cm-completionIcon-type": {
    "&:after": { content: "'𝑡'" }
  },
  ".cm-completionIcon-enum": {
    "&:after": { content: "'∪'" }
  },
  ".cm-completionIcon-property": {
    "&:after": { content: "'□'" }
  },
  ".cm-completionIcon-keyword": {
    "&:after": { content: "'🔑︎'" }
    // Disable emoji rendering
  },
  ".cm-completionIcon-namespace": {
    "&:after": { content: "'▢'" }
  },
  ".cm-completionIcon-text": {
    "&:after": { content: "'abc'", fontSize: "50%", verticalAlign: "middle" }
  }
});
class xft {
  constructor(e, n, r, i) {
    this.field = e, this.line = n, this.from = r, this.to = i;
  }
}
class A4 {
  constructor(e, n, r) {
    this.field = e, this.from = n, this.to = r;
  }
  map(e) {
    let n = e.mapPos(this.from, -1, yr.TrackDel), r = e.mapPos(this.to, 1, yr.TrackDel);
    return n == null || r == null ? null : new A4(this.field, n, r);
  }
}
class E4 {
  constructor(e, n) {
    this.lines = e, this.fieldPositions = n;
  }
  instantiate(e, n) {
    let r = [], i = [n], a = e.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
    for (let l of this.lines) {
      if (r.length) {
        let u = o, c = /^\t*/.exec(l)[0].length;
        for (let f = 0; f < c; f++)
          u += e.facet(ly);
        i.push(n + u.length - c), l = u + l.slice(c);
      }
      r.push(l), n += l.length + 1;
    }
    let s = this.fieldPositions.map((l) => new A4(l.field, i[l.line] + l.from, i[l.line] + l.to));
    return { text: r, ranges: s };
  }
  static parse(e) {
    let n = [], r = [], i = [], a;
    for (let o of e.split(/\r\n?|\n/)) {
      for (; a = /[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o); ) {
        let s = a[1] ? +a[1] : null, l = a[2] || a[3] || "", u = -1, c = l.replace(/\\[{}]/g, (f) => f[1]);
        for (let f = 0; f < n.length; f++)
          (s != null ? n[f].seq == s : c && n[f].name == c) && (u = f);
        if (u < 0) {
          let f = 0;
          for (; f < n.length && (s == null || n[f].seq != null && n[f].seq < s); )
            f++;
          n.splice(f, 0, { seq: s, name: c }), u = f;
          for (let d of i)
            d.field >= u && d.field++;
        }
        i.push(new xft(u, r.length, a.index, a.index + c.length)), o = o.slice(0, a.index) + l + o.slice(a.index + a[0].length);
      }
      o = o.replace(/\\([{}])/g, (s, l, u) => {
        for (let c of i)
          c.line == r.length && c.from > u && (c.from--, c.to--);
        return l;
      }), r.push(o);
    }
    return new E4(r, i);
  }
}
let wft = /* @__PURE__ */ Ze.widget({ widget: /* @__PURE__ */ new class extends ds {
  toDOM() {
    let t = document.createElement("span");
    return t.className = "cm-snippetFieldPosition", t;
  }
  ignoreEvent() {
    return !1;
  }
}() }), Cft = /* @__PURE__ */ Ze.mark({ class: "cm-snippetField" });
class Np {
  constructor(e, n) {
    this.ranges = e, this.active = n, this.deco = Ze.set(e.map((r) => (r.from == r.to ? wft : Cft).range(r.from, r.to)));
  }
  map(e) {
    let n = [];
    for (let r of this.ranges) {
      let i = r.map(e);
      if (!i)
        return null;
      n.push(i);
    }
    return new Np(n, this.active);
  }
  selectionInsideField(e) {
    return e.ranges.every((n) => this.ranges.some((r) => r.field == this.active && r.from <= n.from && r.to >= n.to));
  }
}
const hy = /* @__PURE__ */ dt.define({
  map(t, e) {
    return t && t.map(e);
  }
}), Tft = /* @__PURE__ */ dt.define(), i0 = /* @__PURE__ */ ur.define({
  create() {
    return null;
  },
  update(t, e) {
    for (let n of e.effects) {
      if (n.is(hy))
        return n.value;
      if (n.is(Tft) && t)
        return new Np(t.ranges, n.value);
    }
    return t && e.docChanged && (t = t.map(e.changes)), t && e.selection && !t.selectionInsideField(e.selection) && (t = null), t;
  },
  provide: (t) => De.decorations.from(t, (e) => e ? e.deco : Ze.none)
});
function M4(t, e) {
  return me.create(t.filter((n) => n.field == e).map((n) => me.range(n.from, n.to)));
}
function Pft(t) {
  let e = E4.parse(t);
  return (n, r, i, a) => {
    let { text: o, ranges: s } = e.instantiate(n.state, i), l = {
      changes: { from: i, to: a, insert: Ft.of(o) },
      scrollIntoView: !0,
      annotations: r ? [P4.of(r), Fn.userEvent.of("input.complete")] : void 0
    };
    if (s.length && (l.selection = M4(s, 0)), s.some((u) => u.field > 0)) {
      let u = new Np(s, 0), c = l.effects = [hy.of(u)];
      n.state.field(i0, !1) === void 0 && c.push(dt.appendConfig.of([i0, Ift, Dft, Zse]));
    }
    n.dispatch(n.state.update(l));
  };
}
function Use(t) {
  return ({ state: e, dispatch: n }) => {
    let r = e.field(i0, !1);
    if (!r || t < 0 && r.active == 0)
      return !1;
    let i = r.active + t, a = t > 0 && !r.ranges.some((o) => o.field == i + t);
    return n(e.update({
      selection: M4(r.ranges, i),
      effects: hy.of(a ? null : new Np(r.ranges, i)),
      scrollIntoView: !0
    })), !0;
  };
}
const $ft = ({ state: t, dispatch: e }) => t.field(i0, !1) ? (e(t.update({ effects: hy.of(null) })), !0) : !1, Aft = /* @__PURE__ */ Use(1), Eft = /* @__PURE__ */ Use(-1), Mft = [
  { key: "Tab", run: Aft, shift: Eft },
  { key: "Escape", run: $ft }
], q9 = /* @__PURE__ */ Be.define({
  combine(t) {
    return t.length ? t[0] : Mft;
  }
}), Ift = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.compute([q9], (t) => t.facet(q9)));
function ui(t, e) {
  return Object.assign(Object.assign({}, e), { apply: Pft(t) });
}
const Dft = /* @__PURE__ */ De.domEventHandlers({
  mousedown(t, e) {
    let n = e.state.field(i0, !1), r;
    if (!n || (r = e.posAtCoords({ x: t.clientX, y: t.clientY })) == null)
      return !1;
    let i = n.ranges.find((a) => a.from <= r && a.to >= r);
    return !i || i.field == n.active ? !1 : (e.dispatch({
      selection: M4(n.ranges, i.field),
      effects: hy.of(n.ranges.some((a) => a.field > i.field) ? new Np(n.ranges, i.field) : null),
      scrollIntoView: !0
    }), !0);
  }
}), a0 = {
  brackets: ["(", "[", "{", "'", '"'],
  before: ")]}:;>",
  stringPrefixes: []
}, Qc = /* @__PURE__ */ dt.define({
  map(t, e) {
    let n = e.mapPos(t, -1, yr.TrackAfter);
    return n ?? void 0;
  }
}), I4 = /* @__PURE__ */ new class extends wf {
}();
I4.startSide = 1;
I4.endSide = -1;
const Xse = /* @__PURE__ */ ur.define({
  create() {
    return Vt.empty;
  },
  update(t, e) {
    if (t = t.map(e.changes), e.selection) {
      let n = e.state.doc.lineAt(e.selection.main.head);
      t = t.update({ filter: (r) => r >= n.from && r <= n.to });
    }
    for (let n of e.effects)
      n.is(Qc) && (t = t.update({ add: [I4.range(n.value, n.value + 1)] }));
    return t;
  }
});
function Rft() {
  return [Lft, Xse];
}
const L$ = "()[]{}<>";
function Yse(t) {
  for (let e = 0; e < L$.length; e += 2)
    if (L$.charCodeAt(e) == t)
      return L$.charAt(e + 1);
  return KL(t < 128 ? t : t + 1);
}
function qse(t, e) {
  return t.languageDataAt("closeBrackets", e)[0] || a0;
}
const kft = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Lft = /* @__PURE__ */ De.inputHandler.of((t, e, n, r) => {
  if ((kft ? t.composing : t.compositionStarted) || t.state.readOnly)
    return !1;
  let i = t.state.selection.main;
  if (r.length > 2 || r.length == 2 && ga(gr(r, 0)) == 1 || e != i.from || n != i.to)
    return !1;
  let a = zft(t.state, r);
  return a ? (t.dispatch(a), !0) : !1;
}), Nft = ({ state: t, dispatch: e }) => {
  if (t.readOnly)
    return !1;
  let r = qse(t, t.selection.main.head).brackets || a0.brackets, i = null, a = t.changeByRange((o) => {
    if (o.empty) {
      let s = Vft(t.doc, o.head);
      for (let l of r)
        if (l == s && Fw(t.doc, o.head) == Yse(gr(l, 0)))
          return {
            changes: { from: o.head - l.length, to: o.head + l.length },
            range: me.cursor(o.head - l.length)
          };
    }
    return { range: i = o };
  });
  return i || e(t.update(a, { scrollIntoView: !0, userEvent: "delete.backward" })), !i;
}, Bft = [
  { key: "Backspace", run: Nft }
];
function zft(t, e) {
  let n = qse(t, t.selection.main.head), r = n.brackets || a0.brackets;
  for (let i of r) {
    let a = Yse(gr(i, 0));
    if (e == i)
      return a == i ? Qft(t, i, r.indexOf(i + i + i) > -1, n) : Fft(t, i, a, n.before || a0.before);
    if (e == a && Kse(t, t.selection.main.from))
      return Wft(t, i, a);
  }
  return null;
}
function Kse(t, e) {
  let n = !1;
  return t.field(Xse).between(0, t.doc.length, (r) => {
    r == e && (n = !0);
  }), n;
}
function Fw(t, e) {
  let n = t.sliceString(e, e + 2);
  return n.slice(0, ga(gr(n, 0)));
}
function Vft(t, e) {
  let n = t.sliceString(e - 2, e);
  return ga(gr(n, 0)) == n.length ? n : n.slice(1);
}
function Fft(t, e, n, r) {
  let i = null, a = t.changeByRange((o) => {
    if (!o.empty)
      return {
        changes: [{ insert: e, from: o.from }, { insert: n, from: o.to }],
        effects: Qc.of(o.to + e.length),
        range: me.range(o.anchor + e.length, o.head + e.length)
      };
    let s = Fw(t.doc, o.head);
    return !s || /\s/.test(s) || r.indexOf(s) > -1 ? {
      changes: { insert: e + n, from: o.head },
      effects: Qc.of(o.head + e.length),
      range: me.cursor(o.head + e.length)
    } : { range: i = o };
  });
  return i ? null : t.update(a, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function Wft(t, e, n) {
  let r = null, i = t.changeByRange((a) => a.empty && Fw(t.doc, a.head) == n ? {
    changes: { from: a.head, to: a.head + n.length, insert: n },
    range: me.cursor(a.head + n.length)
  } : r = { range: a });
  return r ? null : t.update(i, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function Qft(t, e, n, r) {
  let i = r.stringPrefixes || a0.stringPrefixes, a = null, o = t.changeByRange((s) => {
    if (!s.empty)
      return {
        changes: [{ insert: e, from: s.from }, { insert: e, from: s.to }],
        effects: Qc.of(s.to + e.length),
        range: me.range(s.anchor + e.length, s.head + e.length)
      };
    let l = s.head, u = Fw(t.doc, l), c;
    if (u == e) {
      if (K9(t, l))
        return {
          changes: { insert: e + e, from: l },
          effects: Qc.of(l + e.length),
          range: me.cursor(l + e.length)
        };
      if (Kse(t, l)) {
        let d = n && t.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
        return {
          changes: { from: l, to: l + d.length, insert: d },
          range: me.cursor(l + d.length)
        };
      }
    } else {
      if (n && t.sliceDoc(l - 2 * e.length, l) == e + e && (c = J9(t, l - 2 * e.length, i)) > -1 && K9(t, c))
        return {
          changes: { insert: e + e + e + e, from: l },
          effects: Qc.of(l + e.length),
          range: me.cursor(l + e.length)
        };
      if (t.charCategorizer(l)(u) != yn.Word && J9(t, l, i) > -1 && !Hft(t, l, e, i))
        return {
          changes: { insert: e + e, from: l },
          effects: Qc.of(l + e.length),
          range: me.cursor(l + e.length)
        };
    }
    return { range: a = s };
  });
  return a ? null : t.update(o, {
    scrollIntoView: !0,
    userEvent: "input.type"
  });
}
function K9(t, e) {
  let n = nr(t).resolveInner(e + 1);
  return n.parent && n.from == e;
}
function Hft(t, e, n, r) {
  let i = nr(t).resolveInner(e, -1), a = r.reduce((o, s) => Math.max(o, s.length), 0);
  for (let o = 0; o < 5; o++) {
    let s = t.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), l = s.indexOf(n);
    if (!l || l > -1 && r.indexOf(s.slice(0, l)) > -1) {
      let c = i.firstChild;
      for (; c && c.from == i.from && c.to - c.from > n.length + l; ) {
        if (t.sliceDoc(c.to - n.length, c.to) == n)
          return !1;
        c = c.firstChild;
      }
      return !0;
    }
    let u = i.to == e && i.parent;
    if (!u)
      break;
    i = u;
  }
  return !1;
}
function J9(t, e, n) {
  let r = t.charCategorizer(e);
  if (r(t.sliceDoc(e - 1, e)) != yn.Word)
    return e;
  for (let i of n) {
    let a = e - i.length;
    if (t.sliceDoc(a, e) == i && r(t.sliceDoc(a - 1, a)) != yn.Word)
      return a;
  }
  return -1;
}
function Gft(t = {}) {
  return [
    Sft,
    vi,
    br.of(t),
    _ft,
    jft,
    Zse
  ];
}
const Jse = [
  { key: "Ctrl-Space", run: vft },
  { key: "Escape", run: gft },
  { key: "ArrowDown", run: /* @__PURE__ */ u_(!0) },
  { key: "ArrowUp", run: /* @__PURE__ */ u_(!1) },
  { key: "PageDown", run: /* @__PURE__ */ u_(!0, "page") },
  { key: "PageUp", run: /* @__PURE__ */ u_(!1, "page") },
  { key: "Enter", run: pft }
], jft = /* @__PURE__ */ Eu.highest(/* @__PURE__ */ oy.computeN([br], (t) => t.facet(br).defaultKeymap ? [Jse] : []));
class Zft {
  constructor(e, n, r) {
    this.from = e, this.to = n, this.diagnostic = r;
  }
}
class $c {
  constructor(e, n, r) {
    this.diagnostics = e, this.panel = n, this.selected = r;
  }
  static init(e, n, r) {
    let i = e, a = r.facet(o0).markerFilter;
    a && (i = a(i, r));
    let o = Ze.set(i.map((s) => s.from == s.to || s.from == s.to - 1 && r.doc.lineAt(s.from).to == s.from ? Ze.widget({
      widget: new ndt(s),
      diagnostic: s
    }).range(s.from) : Ze.mark({
      attributes: { class: "cm-lintRange cm-lintRange-" + s.severity + (s.markClass ? " " + s.markClass : "") },
      diagnostic: s
    }).range(s.from, s.to)), !0);
    return new $c(o, n, Jh(o));
  }
}
function Jh(t, e = null, n = 0) {
  let r = null;
  return t.between(n, 1e9, (i, a, { spec: o }) => {
    if (!(e && o.diagnostic != e))
      return r = new Zft(i, a, o.diagnostic), !1;
  }), r;
}
function Uft(t, e) {
  let n = e.pos, r = e.end || n, i = t.state.facet(o0).hideOn(t, n, r);
  if (i != null)
    return i;
  let a = t.startState.doc.lineAt(e.pos);
  return !!(t.effects.some((o) => o.is(ele)) || t.changes.touchesRange(a.from, Math.max(a.to, r)));
}
function Xft(t, e) {
  return t.field(Wi, !1) ? e : e.concat(dt.appendConfig.of(adt));
}
const ele = /* @__PURE__ */ dt.define(), D4 = /* @__PURE__ */ dt.define(), tle = /* @__PURE__ */ dt.define(), Wi = /* @__PURE__ */ ur.define({
  create() {
    return new $c(Ze.none, null, null);
  },
  update(t, e) {
    if (e.docChanged && t.diagnostics.size) {
      let n = t.diagnostics.map(e.changes), r = null, i = t.panel;
      if (t.selected) {
        let a = e.changes.mapPos(t.selected.from, 1);
        r = Jh(n, t.selected.diagnostic, a) || Jh(n, null, a);
      }
      !n.size && i && e.state.facet(o0).autoPanel && (i = null), t = new $c(n, i, r);
    }
    for (let n of e.effects)
      if (n.is(ele)) {
        let r = e.state.facet(o0).autoPanel ? n.value.length ? s0.open : null : t.panel;
        t = $c.init(n.value, r, e.state);
      } else n.is(D4) ? t = new $c(t.diagnostics, n.value ? s0.open : null, t.selected) : n.is(tle) && (t = new $c(t.diagnostics, t.panel, n.value));
    return t;
  },
  provide: (t) => [
    Km.from(t, (e) => e.panel),
    De.decorations.from(t, (e) => e.diagnostics)
  ]
}), Yft = /* @__PURE__ */ Ze.mark({ class: "cm-lintRange cm-lintRange-active" });
function qft(t, e, n) {
  let { diagnostics: r } = t.state.field(Wi), i = [], a = 2e8, o = 0;
  r.between(e - (n < 0 ? 1 : 0), e + (n > 0 ? 1 : 0), (l, u, { spec: c }) => {
    e >= l && e <= u && (l == u || (e > l || n > 0) && (e < u || n < 0)) && (i.push(c.diagnostic), a = Math.min(l, a), o = Math.max(u, o));
  });
  let s = t.state.facet(o0).tooltipFilter;
  return s && (i = s(i, t.state)), i.length ? {
    pos: a,
    end: o,
    above: t.state.doc.lineAt(a).to < o,
    create() {
      return { dom: Kft(t, i) };
    }
  } : null;
}
function Kft(t, e) {
  return on("ul", { class: "cm-tooltip-lint" }, e.map((n) => rle(t, n, !1)));
}
const Jft = (t) => {
  let e = t.state.field(Wi, !1);
  (!e || !e.panel) && t.dispatch({ effects: Xft(t.state, [D4.of(!0)]) });
  let n = qm(t, s0.open);
  return n && n.dom.querySelector(".cm-panel-lint ul").focus(), !0;
}, eG = (t) => {
  let e = t.state.field(Wi, !1);
  return !e || !e.panel ? !1 : (t.dispatch({ effects: D4.of(!1) }), !0);
}, edt = (t) => {
  let e = t.state.field(Wi, !1);
  if (!e)
    return !1;
  let n = t.state.selection.main, r = e.diagnostics.iter(n.to + 1);
  return !r.value && (r = e.diagnostics.iter(0), !r.value || r.from == n.from && r.to == n.to) ? !1 : (t.dispatch({ selection: { anchor: r.from, head: r.to }, scrollIntoView: !0 }), !0);
}, tdt = [
  { key: "Mod-Shift-m", run: Jft, preventDefault: !0 },
  { key: "F8", run: edt }
], o0 = /* @__PURE__ */ Be.define({
  combine(t) {
    return Object.assign({ sources: t.map((e) => e.source).filter((e) => e != null) }, fs(t.map((e) => e.config), {
      delay: 750,
      markerFilter: null,
      tooltipFilter: null,
      needsRefresh: null,
      hideOn: () => null
    }, {
      needsRefresh: (e, n) => e ? n ? (r) => e(r) || n(r) : e : n
    }));
  }
});
function nle(t) {
  let e = [];
  if (t)
    e: for (let { name: n } of t) {
      for (let r = 0; r < n.length; r++) {
        let i = n[r];
        if (/[a-zA-Z]/.test(i) && !e.some((a) => a.toLowerCase() == i.toLowerCase())) {
          e.push(i);
          continue e;
        }
      }
      e.push("");
    }
  return e;
}
function rle(t, e, n) {
  var r;
  let i = n ? nle(e.actions) : [];
  return on("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, on("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(t) : e.message), (r = e.actions) === null || r === void 0 ? void 0 : r.map((a, o) => {
    let s = !1, l = (d) => {
      if (d.preventDefault(), s)
        return;
      s = !0;
      let h = Jh(t.state.field(Wi).diagnostics, e);
      h && a.apply(t, h.from, h.to);
    }, { name: u } = a, c = i[o] ? u.indexOf(i[o]) : -1, f = c < 0 ? u : [
      u.slice(0, c),
      on("u", u.slice(c, c + 1)),
      u.slice(c + 1)
    ];
    return on("button", {
      type: "button",
      class: "cm-diagnosticAction",
      onclick: l,
      onmousedown: l,
      "aria-label": ` Action: ${u}${c < 0 ? "" : ` (access key "${i[o]})"`}.`
    }, f);
  }), e.source && on("div", { class: "cm-diagnosticSource" }, e.source));
}
class ndt extends ds {
  constructor(e) {
    super(), this.diagnostic = e;
  }
  eq(e) {
    return e.diagnostic == this.diagnostic;
  }
  toDOM() {
    return on("span", { class: "cm-lintPoint cm-lintPoint-" + this.diagnostic.severity });
  }
}
class tG {
  constructor(e, n) {
    this.diagnostic = n, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = rle(e, n, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
  }
}
class s0 {
  constructor(e) {
    this.view = e, this.items = [];
    let n = (i) => {
      if (i.keyCode == 27)
        eG(this.view), this.view.focus();
      else if (i.keyCode == 38 || i.keyCode == 33)
        this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
      else if (i.keyCode == 40 || i.keyCode == 34)
        this.moveSelection((this.selectedIndex + 1) % this.items.length);
      else if (i.keyCode == 36)
        this.moveSelection(0);
      else if (i.keyCode == 35)
        this.moveSelection(this.items.length - 1);
      else if (i.keyCode == 13)
        this.view.focus();
      else if (i.keyCode >= 65 && i.keyCode <= 90 && this.selectedIndex >= 0) {
        let { diagnostic: a } = this.items[this.selectedIndex], o = nle(a.actions);
        for (let s = 0; s < o.length; s++)
          if (o[s].toUpperCase().charCodeAt(0) == i.keyCode) {
            let l = Jh(this.view.state.field(Wi).diagnostics, a);
            l && a.actions[s].apply(e, l.from, l.to);
          }
      } else
        return;
      i.preventDefault();
    }, r = (i) => {
      for (let a = 0; a < this.items.length; a++)
        this.items[a].dom.contains(i.target) && this.moveSelection(a);
    };
    this.list = on("ul", {
      tabIndex: 0,
      role: "listbox",
      "aria-label": this.view.state.phrase("Diagnostics"),
      onkeydown: n,
      onclick: r
    }), this.dom = on("div", { class: "cm-panel-lint" }, this.list, on("button", {
      type: "button",
      name: "close",
      "aria-label": this.view.state.phrase("close"),
      onclick: () => eG(this.view)
    }, "×")), this.update();
  }
  get selectedIndex() {
    let e = this.view.state.field(Wi).selected;
    if (!e)
      return -1;
    for (let n = 0; n < this.items.length; n++)
      if (this.items[n].diagnostic == e.diagnostic)
        return n;
    return -1;
  }
  update() {
    let { diagnostics: e, selected: n } = this.view.state.field(Wi), r = 0, i = !1, a = null;
    for (e.between(0, this.view.state.doc.length, (o, s, { spec: l }) => {
      let u = -1, c;
      for (let f = r; f < this.items.length; f++)
        if (this.items[f].diagnostic == l.diagnostic) {
          u = f;
          break;
        }
      u < 0 ? (c = new tG(this.view, l.diagnostic), this.items.splice(r, 0, c), i = !0) : (c = this.items[u], u > r && (this.items.splice(r, u - r), i = !0)), n && c.diagnostic == n.diagnostic ? c.dom.hasAttribute("aria-selected") || (c.dom.setAttribute("aria-selected", "true"), a = c) : c.dom.hasAttribute("aria-selected") && c.dom.removeAttribute("aria-selected"), r++;
    }); r < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0); )
      i = !0, this.items.pop();
    this.items.length == 0 && (this.items.push(new tG(this.view, {
      from: -1,
      to: -1,
      severity: "info",
      message: this.view.state.phrase("No diagnostics")
    })), i = !0), a ? (this.list.setAttribute("aria-activedescendant", a.id), this.view.requestMeasure({
      key: this,
      read: () => ({ sel: a.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
      write: ({ sel: o, panel: s }) => {
        let l = s.height / this.list.offsetHeight;
        o.top < s.top ? this.list.scrollTop -= (s.top - o.top) / l : o.bottom > s.bottom && (this.list.scrollTop += (o.bottom - s.bottom) / l);
      }
    })) : this.selectedIndex < 0 && this.list.removeAttribute("aria-activedescendant"), i && this.sync();
  }
  sync() {
    let e = this.list.firstChild;
    function n() {
      let r = e;
      e = r.nextSibling, r.remove();
    }
    for (let r of this.items)
      if (r.dom.parentNode == this.list) {
        for (; e != r.dom; )
          n();
        e = r.dom.nextSibling;
      } else
        this.list.insertBefore(r.dom, e);
    for (; e; )
      n();
  }
  moveSelection(e) {
    if (this.selectedIndex < 0)
      return;
    let n = this.view.state.field(Wi), r = Jh(n.diagnostics, this.items[e].diagnostic);
    r && this.view.dispatch({
      selection: { anchor: r.from, head: r.to },
      scrollIntoView: !0,
      effects: tle.of(r)
    });
  }
  static open(e) {
    return new s0(e);
  }
}
function rdt(t, e = 'viewBox="0 0 40 40"') {
  return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
}
function c_(t) {
  return rdt(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
}
const idt = /* @__PURE__ */ De.baseTheme({
  ".cm-diagnostic": {
    padding: "3px 6px 3px 8px",
    marginLeft: "-1px",
    display: "block",
    whiteSpace: "pre-wrap"
  },
  ".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
  ".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
  ".cm-diagnostic-info": { borderLeft: "5px solid #999" },
  ".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
  ".cm-diagnosticAction": {
    font: "inherit",
    border: "none",
    padding: "2px 4px",
    backgroundColor: "#444",
    color: "white",
    borderRadius: "3px",
    marginLeft: "8px",
    cursor: "pointer"
  },
  ".cm-diagnosticSource": {
    fontSize: "70%",
    opacity: 0.7
  },
  ".cm-lintRange": {
    backgroundPosition: "left bottom",
    backgroundRepeat: "repeat-x",
    paddingBottom: "0.7px"
  },
  ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ c_("#d11") },
  ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ c_("orange") },
  ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ c_("#999") },
  ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ c_("#66d") },
  ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
  ".cm-tooltip-lint": {
    padding: 0,
    margin: 0
  },
  ".cm-lintPoint": {
    position: "relative",
    "&:after": {
      content: '""',
      position: "absolute",
      bottom: 0,
      left: "-2px",
      borderLeft: "3px solid transparent",
      borderRight: "3px solid transparent",
      borderBottom: "4px solid #d11"
    }
  },
  ".cm-lintPoint-warning": {
    "&:after": { borderBottomColor: "orange" }
  },
  ".cm-lintPoint-info": {
    "&:after": { borderBottomColor: "#999" }
  },
  ".cm-lintPoint-hint": {
    "&:after": { borderBottomColor: "#66d" }
  },
  ".cm-panel.cm-panel-lint": {
    position: "relative",
    "& ul": {
      maxHeight: "100px",
      overflowY: "auto",
      "& [aria-selected]": {
        backgroundColor: "#ddd",
        "& u": { textDecoration: "underline" }
      },
      "&:focus [aria-selected]": {
        background_fallback: "#bdf",
        backgroundColor: "Highlight",
        color_fallback: "white",
        color: "HighlightText"
      },
      "& u": { textDecoration: "none" },
      padding: 0,
      margin: 0
    },
    "& [name=close]": {
      position: "absolute",
      top: "0",
      right: "2px",
      background: "inherit",
      border: "none",
      font: "inherit",
      padding: 0,
      margin: 0
    }
  }
}), adt = [
  Wi,
  /* @__PURE__ */ De.decorations.compute([Wi], (t) => {
    let { selected: e, panel: n } = t.field(Wi);
    return !e || !n || e.from == e.to ? Ze.none : Ze.set([
      Yft.range(e.from, e.to)
    ]);
  }),
  /* @__PURE__ */ jst(qft, { hideOn: Uft }),
  idt
], odt = [
  tlt(),
  ilt(),
  Ost(),
  but(),
  jlt(),
  cst(),
  vst(),
  At.allowMultipleSelections.of(!0),
  Dlt(),
  Xoe(Ylt, { fallback: !0 }),
  rut(),
  Rft(),
  Gft(),
  kst(),
  Bst(),
  Pst(),
  Pct(),
  oy.of([
    ...Bft,
    ..._ct,
    ...jct,
    ...$ut,
    ...Wlt,
    ...Jse,
    ...tdt
  ])
];
/*!
* VueCodemirror v6.1.1
* Copyright (c) Surmon. All rights reserved.
* Released under the MIT License.
* Surmon
*/
var sdt = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [odt] }), ldt = Symbol("vue-codemirror-global-config"), jr, udt = function(t) {
  var e = t.onUpdate, n = t.onChange, r = t.onFocus, i = t.onBlur, a = function(o, s) {
    var l = {};
    for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && s.indexOf(u) < 0 && (l[u] = o[u]);
    if (o != null && typeof Object.getOwnPropertySymbols == "function") {
      var c = 0;
      for (u = Object.getOwnPropertySymbols(o); c < u.length; c++) s.indexOf(u[c]) < 0 && Object.prototype.propertyIsEnumerable.call(o, u[c]) && (l[u[c]] = o[u[c]]);
    }
    return l;
  }(t, ["onUpdate", "onChange", "onFocus", "onBlur"]);
  return At.create({ doc: a.doc, selection: a.selection, extensions: (Array.isArray(a.extensions) ? a.extensions : [a.extensions]).concat([De.updateListener.of(function(o) {
    e(o), o.docChanged && n(o.state.doc.toString(), o), o.focusChanged && (o.view.hasFocus ? r(o) : i(o));
  })]) });
}, kd = function(t) {
  var e = new ry();
  return { compartment: e, run: function(n) {
    e.get(t.state) ? t.dispatch({ effects: e.reconfigure(n) }) : t.dispatch({ effects: dt.appendConfig.of(e.of(n)) });
  } };
}, nG = function(t, e) {
  var n = kd(t), r = n.compartment, i = n.run;
  return function(a) {
    var o = r.get(t.state);
    i(a ?? o !== e ? e : []);
  };
}, f_ = { type: Boolean, default: void 0 }, cdt = { autofocus: f_, disabled: f_, indentWithTab: f_, tabSize: Number, placeholder: String, style: Object, autoDestroy: f_, phrases: Object, root: Object, extensions: Array, selection: Object }, fdt = { modelValue: { type: String, default: "" } }, ddt = Object.assign(Object.assign({}, cdt), fdt);
(function(t) {
  t.Change = "change", t.Update = "update", t.Focus = "focus", t.Blur = "blur", t.Ready = "ready", t.ModelUpdate = "update:modelValue";
})(jr || (jr = {}));
var Ac = {};
Ac[jr.Change] = function(t, e) {
  return !0;
}, Ac[jr.Update] = function(t) {
  return !0;
}, Ac[jr.Focus] = function(t) {
  return !0;
}, Ac[jr.Blur] = function(t) {
  return !0;
}, Ac[jr.Ready] = function(t) {
  return !0;
};
var ile = {};
ile[jr.ModelUpdate] = Ac[jr.Change];
var hdt = Object.assign(Object.assign({}, Ac), ile), pdt = te({ name: "VueCodemirror", props: Object.assign({}, ddt), emits: Object.assign({}, hdt), setup: function(t, e) {
  var n = ae(), r = ae(), i = ae(), a = Object.assign(Object.assign({}, sdt), Ge(ldt, {})), o = L(function() {
    var s = {};
    return Object.keys(qo(t)).forEach(function(l) {
      var u;
      l !== "modelValue" && (s[l] = (u = t[l]) !== null && u !== void 0 ? u : a[l]);
    }), s;
  });
  return it(function() {
    var s;
    r.value = udt({ doc: t.modelValue, selection: o.value.selection, extensions: (s = a.extensions) !== null && s !== void 0 ? s : [], onFocus: function(u) {
      return e.emit(jr.Focus, u);
    }, onBlur: function(u) {
      return e.emit(jr.Blur, u);
    }, onUpdate: function(u) {
      return e.emit(jr.Update, u);
    }, onChange: function(u, c) {
      u !== t.modelValue && (e.emit(jr.Change, u, c), e.emit(jr.ModelUpdate, u, c));
    } }), i.value = function(u) {
      return new De(Object.assign({}, u));
    }({ state: r.value, parent: n.value, root: o.value.root });
    var l = function(u) {
      var c = function() {
        return u.state.doc.toString();
      }, f = kd(u).run, d = nG(u, [De.editable.of(!1), At.readOnly.of(!0)]), h = nG(u, oy.of([Oct])), p = kd(u).run, v = kd(u).run, g = kd(u).run, m = kd(u).run;
      return { focus: function() {
        return u.focus();
      }, getDoc: c, setDoc: function(y) {
        y !== c() && u.dispatch({ changes: { from: 0, to: u.state.doc.length, insert: y } });
      }, reExtensions: f, toggleDisabled: d, toggleIndentWithTab: h, setTabSize: function(y) {
        p([At.tabSize.of(y), ly.of(" ".repeat(y))]);
      }, setPhrases: function(y) {
        v([At.phrases.of(y)]);
      }, setPlaceholder: function(y) {
        g(Mst(y));
      }, setStyle: function(y) {
        y === void 0 && (y = {}), m(De.theme({ "&": Object.assign({}, y) }));
      } };
    }(i.value);
    se(function() {
      return t.modelValue;
    }, function(u) {
      u !== l.getDoc() && l.setDoc(u);
    }), se(function() {
      return t.extensions;
    }, function(u) {
      return l.reExtensions(u || []);
    }, { immediate: !0 }), se(function() {
      return o.value.disabled;
    }, function(u) {
      return l.toggleDisabled(u);
    }, { immediate: !0 }), se(function() {
      return o.value.indentWithTab;
    }, function(u) {
      return l.toggleIndentWithTab(u);
    }, { immediate: !0 }), se(function() {
      return o.value.tabSize;
    }, function(u) {
      return l.setTabSize(u);
    }, { immediate: !0 }), se(function() {
      return o.value.phrases;
    }, function(u) {
      return l.setPhrases(u || {});
    }, { immediate: !0 }), se(function() {
      return o.value.placeholder;
    }, function(u) {
      return l.setPlaceholder(u);
    }, { immediate: !0 }), se(function() {
      return o.value.style;
    }, function(u) {
      return l.setStyle(u);
    }, { immediate: !0 }), o.value.autofocus && l.focus(), e.emit(jr.Ready, { state: r.value, view: i.value, container: n.value });
  }), yt(function() {
    o.value.autoDestroy && i.value && function(s) {
      s.destroy();
    }(i.value);
  }), function() {
    return jg("div", { class: "v-codemirror", style: { display: "contents" }, ref: n });
  };
} }), vdt = pdt;
const gdt = "#e5c07b", rG = "#e06c75", mdt = "#56b6c2", ydt = "#ffffff", f1 = "#abb2bf", XM = "#7d8799", bdt = "#61afef", _dt = "#98c379", iG = "#d19a66", Odt = "#c678dd", Sdt = "#21252b", aG = "#2c313a", oG = "#282c34", N$ = "#353a42", xdt = "#3E4451", sG = "#528bff", wdt = /* @__PURE__ */ De.theme({
  "&": {
    color: f1,
    backgroundColor: oG
  },
  ".cm-content": {
    caretColor: sG
  },
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: sG },
  "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: xdt },
  ".cm-panels": { backgroundColor: Sdt, color: f1 },
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
  ".cm-searchMatch": {
    backgroundColor: "#72a1ff59",
    outline: "1px solid #457dff"
  },
  ".cm-searchMatch.cm-searchMatch-selected": {
    backgroundColor: "#6199ff2f"
  },
  ".cm-activeLine": { backgroundColor: "#6699ff0b" },
  ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
  "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
    backgroundColor: "#bad0f847"
  },
  ".cm-gutters": {
    backgroundColor: oG,
    color: XM,
    border: "none"
  },
  ".cm-activeLineGutter": {
    backgroundColor: aG
  },
  ".cm-foldPlaceholder": {
    backgroundColor: "transparent",
    border: "none",
    color: "#ddd"
  },
  ".cm-tooltip": {
    border: "none",
    backgroundColor: N$
  },
  ".cm-tooltip .cm-tooltip-arrow:before": {
    borderTopColor: "transparent",
    borderBottomColor: "transparent"
  },
  ".cm-tooltip .cm-tooltip-arrow:after": {
    borderTopColor: N$,
    borderBottomColor: N$
  },
  ".cm-tooltip-autocomplete": {
    "& > ul > li[aria-selected]": {
      backgroundColor: aG,
      color: f1
    }
  }
}, { dark: !0 }), Cdt = /* @__PURE__ */ cy.define([
  {
    tag: J.keyword,
    color: Odt
  },
  {
    tag: [J.name, J.deleted, J.character, J.propertyName, J.macroName],
    color: rG
  },
  {
    tag: [/* @__PURE__ */ J.function(J.variableName), J.labelName],
    color: bdt
  },
  {
    tag: [J.color, /* @__PURE__ */ J.constant(J.name), /* @__PURE__ */ J.standard(J.name)],
    color: iG
  },
  {
    tag: [/* @__PURE__ */ J.definition(J.name), J.separator],
    color: f1
  },
  {
    tag: [J.typeName, J.className, J.number, J.changed, J.annotation, J.modifier, J.self, J.namespace],
    color: gdt
  },
  {
    tag: [J.operator, J.operatorKeyword, J.url, J.escape, J.regexp, J.link, /* @__PURE__ */ J.special(J.string)],
    color: mdt
  },
  {
    tag: [J.meta, J.comment],
    color: XM
  },
  {
    tag: J.strong,
    fontWeight: "bold"
  },
  {
    tag: J.emphasis,
    fontStyle: "italic"
  },
  {
    tag: J.strikethrough,
    textDecoration: "line-through"
  },
  {
    tag: J.link,
    color: XM,
    textDecoration: "underline"
  },
  {
    tag: J.heading,
    fontWeight: "bold",
    color: rG
  },
  {
    tag: [J.atom, J.bool, /* @__PURE__ */ J.special(J.variableName)],
    color: iG
  },
  {
    tag: [J.processingInstruction, J.string, J.inserted],
    color: _dt
  },
  {
    tag: J.invalid,
    color: ydt
  }
]), Tdt = [wdt, /* @__PURE__ */ Xoe(Cdt)];
class xS {
  /**
  @internal
  */
  constructor(e, n, r, i, a, o, s, l, u, c = 0, f) {
    this.p = e, this.stack = n, this.state = r, this.reducePos = i, this.pos = a, this.score = o, this.buffer = s, this.bufferBase = l, this.curContext = u, this.lookAhead = c, this.parent = f;
  }
  /**
  @internal
  */
  toString() {
    return `[${this.stack.filter((e, n) => n % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
  }
  // Start an empty stack
  /**
  @internal
  */
  static start(e, n, r = 0) {
    let i = e.parser.context;
    return new xS(e, [], n, r, r, 0, [], 0, i ? new lG(i, i.start) : null, 0, null);
  }
  /**
  The stack's current [context](#lr.ContextTracker) value, if
  any. Its type will depend on the context tracker's type
  parameter, or it will be `null` if there is no context
  tracker.
  */
  get context() {
    return this.curContext ? this.curContext.context : null;
  }
  // Push a state onto the stack, tracking its start position as well
  // as the buffer base at that point.
  /**
  @internal
  */
  pushState(e, n) {
    this.stack.push(this.state, n, this.bufferBase + this.buffer.length), this.state = e;
  }
  // Apply a reduce action
  /**
  @internal
  */
  reduce(e) {
    var n;
    let r = e >> 19, i = e & 65535, { parser: a } = this.p;
    this.reducePos < this.pos - 25 && this.setLookAhead(this.pos);
    let o = a.dynamicPrecedence(i);
    if (o && (this.score += o), r == 0) {
      this.pushState(a.getGoto(this.state, i, !0), this.reducePos), i < a.minRepeatTerm && this.storeNode(i, this.reducePos, this.reducePos, 4, !0), this.reduceContext(i, this.reducePos);
      return;
    }
    let s = this.stack.length - (r - 1) * 3 - (e & 262144 ? 6 : 0), l = s ? this.stack[s - 2] : this.p.ranges[0].from, u = this.reducePos - l;
    u >= 2e3 && !(!((n = this.p.parser.nodeSet.types[i]) === null || n === void 0) && n.isAnonymous) && (l == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = u) : this.p.lastBigReductionSize < u && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = l, this.p.lastBigReductionSize = u));
    let c = s ? this.stack[s - 1] : 0, f = this.bufferBase + this.buffer.length - c;
    if (i < a.minRepeatTerm || e & 131072) {
      let d = a.stateFlag(
        this.state,
        1
        /* StateFlag.Skipped */
      ) ? this.pos : this.reducePos;
      this.storeNode(i, l, d, f + 4, !0);
    }
    if (e & 262144)
      this.state = this.stack[s];
    else {
      let d = this.stack[s - 3];
      this.state = a.getGoto(d, i, !0);
    }
    for (; this.stack.length > s; )
      this.stack.pop();
    this.reduceContext(i, l);
  }
  // Shift a value into the buffer
  /**
  @internal
  */
  storeNode(e, n, r, i = 4, a = !1) {
    if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
      let o = this, s = this.buffer.length;
      if (s == 0 && o.parent && (s = o.bufferBase - o.parent.bufferBase, o = o.parent), s > 0 && o.buffer[s - 4] == 0 && o.buffer[s - 1] > -1) {
        if (n == r)
          return;
        if (o.buffer[s - 2] >= n) {
          o.buffer[s - 2] = r;
          return;
        }
      }
    }
    if (!a || this.pos == r)
      this.buffer.push(e, n, r, i);
    else {
      let o = this.buffer.length;
      if (o > 0 && this.buffer[o - 4] != 0)
        for (; o > 0 && this.buffer[o - 2] > r; )
          this.buffer[o] = this.buffer[o - 4], this.buffer[o + 1] = this.buffer[o - 3], this.buffer[o + 2] = this.buffer[o - 2], this.buffer[o + 3] = this.buffer[o - 1], o -= 4, i > 4 && (i -= 4);
      this.buffer[o] = e, this.buffer[o + 1] = n, this.buffer[o + 2] = r, this.buffer[o + 3] = i;
    }
  }
  // Apply a shift action
  /**
  @internal
  */
  shift(e, n, r, i) {
    if (e & 131072)
      this.pushState(e & 65535, this.pos);
    else if (e & 262144)
      this.pos = i, this.shiftContext(n, r), n <= this.p.parser.maxNode && this.buffer.push(n, r, i, 4);
    else {
      let a = e, { parser: o } = this.p;
      (i > this.pos || n <= o.maxNode) && (this.pos = i, o.stateFlag(
        a,
        1
        /* StateFlag.Skipped */
      ) || (this.reducePos = i)), this.pushState(a, r), this.shiftContext(n, r), n <= o.maxNode && this.buffer.push(n, r, i, 4);
    }
  }
  // Apply an action
  /**
  @internal
  */
  apply(e, n, r, i) {
    e & 65536 ? this.reduce(e) : this.shift(e, n, r, i);
  }
  // Add a prebuilt (reused) node into the buffer.
  /**
  @internal
  */
  useNode(e, n) {
    let r = this.p.reused.length - 1;
    (r < 0 || this.p.reused[r] != e) && (this.p.reused.push(e), r++);
    let i = this.pos;
    this.reducePos = this.pos = i + e.length, this.pushState(n, i), this.buffer.push(
      r,
      i,
      this.reducePos,
      -1
      /* size == -1 means this is a reused value */
    ), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
  }
  // Split the stack. Due to the buffer sharing and the fact
  // that `this.stack` tends to stay quite shallow, this isn't very
  // expensive.
  /**
  @internal
  */
  split() {
    let e = this, n = e.buffer.length;
    for (; n > 0 && e.buffer[n - 2] > e.reducePos; )
      n -= 4;
    let r = e.buffer.slice(n), i = e.bufferBase + n;
    for (; e && i == e.bufferBase; )
      e = e.parent;
    return new xS(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, r, i, this.curContext, this.lookAhead, e);
  }
  // Try to recover from an error by 'deleting' (ignoring) one token.
  /**
  @internal
  */
  recoverByDelete(e, n) {
    let r = e <= this.p.parser.maxNode;
    r && this.storeNode(e, this.pos, n, 4), this.storeNode(0, this.pos, n, r ? 8 : 4), this.pos = this.reducePos = n, this.score -= 190;
  }
  /**
  Check if the given term would be able to be shifted (optionally
  after some reductions) on this stack. This can be useful for
  external tokenizers that want to make sure they only provide a
  given token when it applies.
  */
  canShift(e) {
    for (let n = new Pdt(this); ; ) {
      let r = this.p.parser.stateSlot(
        n.state,
        4
        /* ParseState.DefaultReduce */
      ) || this.p.parser.hasAction(n.state, e);
      if (r == 0)
        return !1;
      if (!(r & 65536))
        return !0;
      n.reduce(r);
    }
  }
  // Apply up to Recover.MaxNext recovery actions that conceptually
  // inserts some missing token or rule.
  /**
  @internal
  */
  recoverByInsert(e) {
    if (this.stack.length >= 300)
      return [];
    let n = this.p.parser.nextStates(this.state);
    if (n.length > 8 || this.stack.length >= 120) {
      let i = [];
      for (let a = 0, o; a < n.length; a += 2)
        (o = n[a + 1]) != this.state && this.p.parser.hasAction(o, e) && i.push(n[a], o);
      if (this.stack.length < 120)
        for (let a = 0; i.length < 8 && a < n.length; a += 2) {
          let o = n[a + 1];
          i.some((s, l) => l & 1 && s == o) || i.push(n[a], o);
        }
      n = i;
    }
    let r = [];
    for (let i = 0; i < n.length && r.length < 4; i += 2) {
      let a = n[i + 1];
      if (a == this.state)
        continue;
      let o = this.split();
      o.pushState(a, this.pos), o.storeNode(0, o.pos, o.pos, 4, !0), o.shiftContext(n[i], this.pos), o.reducePos = this.pos, o.score -= 200, r.push(o);
    }
    return r;
  }
  // Force a reduce, if possible. Return false if that can't
  // be done.
  /**
  @internal
  */
  forceReduce() {
    let { parser: e } = this.p, n = e.stateSlot(
      this.state,
      5
      /* ParseState.ForcedReduce */
    );
    if (!(n & 65536))
      return !1;
    if (!e.validAction(this.state, n)) {
      let r = n >> 19, i = n & 65535, a = this.stack.length - r * 3;
      if (a < 0 || e.getGoto(this.stack[a], i, !1) < 0) {
        let o = this.findForcedReduction();
        if (o == null)
          return !1;
        n = o;
      }
      this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
    }
    return this.reducePos = this.pos, this.reduce(n), !0;
  }
  /**
  Try to scan through the automaton to find some kind of reduction
  that can be applied. Used when the regular ForcedReduce field
  isn't a valid action. @internal
  */
  findForcedReduction() {
    let { parser: e } = this.p, n = [], r = (i, a) => {
      if (!n.includes(i))
        return n.push(i), e.allActions(i, (o) => {
          if (!(o & 393216)) if (o & 65536) {
            let s = (o >> 19) - a;
            if (s > 1) {
              let l = o & 65535, u = this.stack.length - s * 3;
              if (u >= 0 && e.getGoto(this.stack[u], l, !1) >= 0)
                return s << 19 | 65536 | l;
            }
          } else {
            let s = r(o, a + 1);
            if (s != null)
              return s;
          }
        });
    };
    return r(this.state, 0);
  }
  /**
  @internal
  */
  forceAll() {
    for (; !this.p.parser.stateFlag(
      this.state,
      2
      /* StateFlag.Accepting */
    ); )
      if (!this.forceReduce()) {
        this.storeNode(0, this.pos, this.pos, 4, !0);
        break;
      }
    return this;
  }
  /**
  Check whether this state has no further actions (assumed to be a direct descendant of the
  top state, since any other states must be able to continue
  somehow). @internal
  */
  get deadEnd() {
    if (this.stack.length != 3)
      return !1;
    let { parser: e } = this.p;
    return e.data[e.stateSlot(
      this.state,
      1
      /* ParseState.Actions */
    )] == 65535 && !e.stateSlot(
      this.state,
      4
      /* ParseState.DefaultReduce */
    );
  }
  /**
  Restart the stack (put it back in its start state). Only safe
  when this.stack.length == 3 (state is directly below the top
  state). @internal
  */
  restart() {
    this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
  }
  /**
  @internal
  */
  sameState(e) {
    if (this.state != e.state || this.stack.length != e.stack.length)
      return !1;
    for (let n = 0; n < this.stack.length; n += 3)
      if (this.stack[n] != e.stack[n])
        return !1;
    return !0;
  }
  /**
  Get the parser used by this stack.
  */
  get parser() {
    return this.p.parser;
  }
  /**
  Test whether a given dialect (by numeric ID, as exported from
  the terms file) is enabled.
  */
  dialectEnabled(e) {
    return this.p.parser.dialect.flags[e];
  }
  shiftContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  reduceContext(e, n) {
    this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(n)));
  }
  /**
  @internal
  */
  emitContext() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
  }
  /**
  @internal
  */
  emitLookAhead() {
    let e = this.buffer.length - 1;
    (e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
  }
  updateContext(e) {
    if (e != this.curContext.context) {
      let n = new lG(this.curContext.tracker, e);
      n.hash != this.curContext.hash && this.emitContext(), this.curContext = n;
    }
  }
  /**
  @internal
  */
  setLookAhead(e) {
    e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
  }
  /**
  @internal
  */
  close() {
    this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
  }
}
class lG {
  constructor(e, n) {
    this.tracker = e, this.context = n, this.hash = e.strict ? e.hash(n) : 0;
  }
}
class Pdt {
  constructor(e) {
    this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
  }
  reduce(e) {
    let n = e & 65535, r = e >> 19;
    r == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (r - 1) * 3;
    let i = this.start.p.parser.getGoto(this.stack[this.base - 3], n, !0);
    this.state = i;
  }
}
class wS {
  constructor(e, n, r) {
    this.stack = e, this.pos = n, this.index = r, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
  }
  static create(e, n = e.bufferBase + e.buffer.length) {
    return new wS(e, n, n - e.bufferBase);
  }
  maybeNext() {
    let e = this.stack.parent;
    e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
  }
  get id() {
    return this.buffer[this.index - 4];
  }
  get start() {
    return this.buffer[this.index - 3];
  }
  get end() {
    return this.buffer[this.index - 2];
  }
  get size() {
    return this.buffer[this.index - 1];
  }
  next() {
    this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
  }
  fork() {
    return new wS(this.stack, this.pos, this.index);
  }
}
function ig(t, e = Uint16Array) {
  if (typeof t != "string")
    return t;
  let n = null;
  for (let r = 0, i = 0; r < t.length; ) {
    let a = 0;
    for (; ; ) {
      let o = t.charCodeAt(r++), s = !1;
      if (o == 126) {
        a = 65535;
        break;
      }
      o >= 92 && o--, o >= 34 && o--;
      let l = o - 32;
      if (l >= 46 && (l -= 46, s = !0), a += l, s)
        break;
      a *= 46;
    }
    n ? n[i++] = a : n = new e(a);
  }
  return n;
}
class d1 {
  constructor() {
    this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
  }
}
const uG = new d1();
class $dt {
  /**
  @internal
  */
  constructor(e, n) {
    this.input = e, this.ranges = n, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = uG, this.rangeIndex = 0, this.pos = this.chunkPos = n[0].from, this.range = n[0], this.end = n[n.length - 1].to, this.readNext();
  }
  /**
  @internal
  */
  resolveOffset(e, n) {
    let r = this.range, i = this.rangeIndex, a = this.pos + e;
    for (; a < r.from; ) {
      if (!i)
        return null;
      let o = this.ranges[--i];
      a -= r.from - o.to, r = o;
    }
    for (; n < 0 ? a > r.to : a >= r.to; ) {
      if (i == this.ranges.length - 1)
        return null;
      let o = this.ranges[++i];
      a += o.from - r.to, r = o;
    }
    return a;
  }
  /**
  @internal
  */
  clipPos(e) {
    if (e >= this.range.from && e < this.range.to)
      return e;
    for (let n of this.ranges)
      if (n.to > e)
        return Math.max(e, n.from);
    return this.end;
  }
  /**
  Look at a code unit near the stream position. `.peek(0)` equals
  `.next`, `.peek(-1)` gives you the previous character, and so
  on.
  
  Note that looking around during tokenizing creates dependencies
  on potentially far-away content, which may reduce the
  effectiveness incremental parsing—when looking forward—or even
  cause invalid reparses when looking backward more than 25 code
  units, since the library does not track lookbehind.
  */
  peek(e) {
    let n = this.chunkOff + e, r, i;
    if (n >= 0 && n < this.chunk.length)
      r = this.pos + e, i = this.chunk.charCodeAt(n);
    else {
      let a = this.resolveOffset(e, 1);
      if (a == null)
        return -1;
      if (r = a, r >= this.chunk2Pos && r < this.chunk2Pos + this.chunk2.length)
        i = this.chunk2.charCodeAt(r - this.chunk2Pos);
      else {
        let o = this.rangeIndex, s = this.range;
        for (; s.to <= r; )
          s = this.ranges[++o];
        this.chunk2 = this.input.chunk(this.chunk2Pos = r), r + this.chunk2.length > s.to && (this.chunk2 = this.chunk2.slice(0, s.to - r)), i = this.chunk2.charCodeAt(0);
      }
    }
    return r >= this.token.lookAhead && (this.token.lookAhead = r + 1), i;
  }
  /**
  Accept a token. By default, the end of the token is set to the
  current stream position, but you can pass an offset (relative to
  the stream position) to change that.
  */
  acceptToken(e, n = 0) {
    let r = n ? this.resolveOffset(n, -1) : this.pos;
    if (r == null || r < this.token.start)
      throw new RangeError("Token end out of bounds");
    this.token.value = e, this.token.end = r;
  }
  /**
  Accept a token ending at a specific given position.
  */
  acceptTokenTo(e, n) {
    this.token.value = e, this.token.end = n;
  }
  getChunk() {
    if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
      let { chunk: e, chunkPos: n } = this;
      this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = n, this.chunkOff = this.pos - this.chunkPos;
    } else {
      this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
      let e = this.input.chunk(this.pos), n = this.pos + e.length;
      this.chunk = n > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
    }
  }
  readNext() {
    return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
  }
  /**
  Move the stream forward N (defaults to 1) code units. Returns
  the new value of [`next`](#lr.InputStream.next).
  */
  advance(e = 1) {
    for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
      if (this.rangeIndex == this.ranges.length - 1)
        return this.setDone();
      e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
    }
    return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
  }
  setDone() {
    return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
  }
  /**
  @internal
  */
  reset(e, n) {
    if (n ? (this.token = n, n.start = e, n.lookAhead = e + 1, n.value = n.extended = -1) : this.token = uG, this.pos != e) {
      if (this.pos = e, e == this.end)
        return this.setDone(), this;
      for (; e < this.range.from; )
        this.range = this.ranges[--this.rangeIndex];
      for (; e >= this.range.to; )
        this.range = this.ranges[++this.rangeIndex];
      e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
    }
    return this;
  }
  /**
  @internal
  */
  read(e, n) {
    if (e >= this.chunkPos && n <= this.chunkPos + this.chunk.length)
      return this.chunk.slice(e - this.chunkPos, n - this.chunkPos);
    if (e >= this.chunk2Pos && n <= this.chunk2Pos + this.chunk2.length)
      return this.chunk2.slice(e - this.chunk2Pos, n - this.chunk2Pos);
    if (e >= this.range.from && n <= this.range.to)
      return this.input.read(e, n);
    let r = "";
    for (let i of this.ranges) {
      if (i.from >= n)
        break;
      i.to > e && (r += this.input.read(Math.max(i.from, e), Math.min(i.to, n)));
    }
    return r;
  }
}
class dh {
  constructor(e, n) {
    this.data = e, this.id = n;
  }
  token(e, n) {
    let { parser: r } = n.p;
    ale(this.data, e, n, this.id, r.data, r.tokenPrecTable);
  }
}
dh.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
class YM {
  constructor(e, n, r) {
    this.precTable = n, this.elseToken = r, this.data = typeof e == "string" ? ig(e) : e;
  }
  token(e, n) {
    let r = e.pos, i = 0;
    for (; ; ) {
      let a = e.next < 0, o = e.resolveOffset(1, 1);
      if (ale(this.data, e, n, 0, this.data, this.precTable), e.token.value > -1)
        break;
      if (this.elseToken == null)
        return;
      if (a || i++, o == null)
        break;
      e.reset(o, e.token);
    }
    i && (e.reset(r, e.token), e.acceptToken(this.elseToken, i));
  }
}
YM.prototype.contextual = dh.prototype.fallback = dh.prototype.extend = !1;
class Ww {
  /**
  Create a tokenizer. The first argument is the function that,
  given an input stream, scans for the types of tokens it
  recognizes at the stream's position, and calls
  [`acceptToken`](#lr.InputStream.acceptToken) when it finds
  one.
  */
  constructor(e, n = {}) {
    this.token = e, this.contextual = !!n.contextual, this.fallback = !!n.fallback, this.extend = !!n.extend;
  }
}
function ale(t, e, n, r, i, a) {
  let o = 0, s = 1 << r, { dialect: l } = n.p.parser;
  e: for (; s & t[o]; ) {
    let u = t[o + 1];
    for (let h = o + 3; h < u; h += 2)
      if ((t[h + 1] & s) > 0) {
        let p = t[h];
        if (l.allows(p) && (e.token.value == -1 || e.token.value == p || Adt(p, e.token.value, i, a))) {
          e.acceptToken(p);
          break;
        }
      }
    let c = e.next, f = 0, d = t[o + 2];
    if (e.next < 0 && d > f && t[u + d * 3 - 3] == 65535) {
      o = t[u + d * 3 - 1];
      continue e;
    }
    for (; f < d; ) {
      let h = f + d >> 1, p = u + h + (h << 1), v = t[p], g = t[p + 1] || 65536;
      if (c < v)
        d = h;
      else if (c >= g)
        f = h + 1;
      else {
        o = t[p + 2], e.advance();
        continue e;
      }
    }
    break;
  }
}
function cG(t, e, n) {
  for (let r = e, i; (i = t[r]) != 65535; r++)
    if (i == n)
      return r - e;
  return -1;
}
function Adt(t, e, n, r) {
  let i = cG(n, r, e);
  return i < 0 || cG(n, r, t) < i;
}
const Ei = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
let B$ = null;
function fG(t, e, n) {
  let r = t.cursor(Zn.IncludeAnonymous);
  for (r.moveTo(e); ; )
    if (!(n < 0 ? r.childBefore(e) : r.childAfter(e)))
      for (; ; ) {
        if ((n < 0 ? r.to < e : r.from > e) && !r.type.isError)
          return n < 0 ? Math.max(0, Math.min(
            r.to - 1,
            e - 25
            /* Lookahead.Margin */
          )) : Math.min(t.length, Math.max(
            r.from + 1,
            e + 25
            /* Lookahead.Margin */
          ));
        if (n < 0 ? r.prevSibling() : r.nextSibling())
          break;
        if (!r.parent())
          return n < 0 ? 0 : t.length;
      }
}
class Edt {
  constructor(e, n) {
    this.fragments = e, this.nodeSet = n, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
  }
  nextFragment() {
    let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
    if (e) {
      for (this.safeFrom = e.openStart ? fG(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? fG(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
        this.trees.pop(), this.start.pop(), this.index.pop();
      this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
    } else
      this.nextStart = 1e9;
  }
  // `pos` must be >= any previously given `pos` for this cursor
  nodeAt(e) {
    if (e < this.nextStart)
      return null;
    for (; this.fragment && this.safeTo <= e; )
      this.nextFragment();
    if (!this.fragment)
      return null;
    for (; ; ) {
      let n = this.trees.length - 1;
      if (n < 0)
        return this.nextFragment(), null;
      let r = this.trees[n], i = this.index[n];
      if (i == r.children.length) {
        this.trees.pop(), this.start.pop(), this.index.pop();
        continue;
      }
      let a = r.children[i], o = this.start[n] + r.positions[i];
      if (o > e)
        return this.nextStart = o, null;
      if (a instanceof Wn) {
        if (o == e) {
          if (o < this.safeFrom)
            return null;
          let s = o + a.length;
          if (s <= this.safeTo) {
            let l = a.prop(Pt.lookAhead);
            if (!l || s + l < this.fragment.to)
              return a;
          }
        }
        this.index[n]++, o + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(o), this.index.push(0));
      } else
        this.index[n]++, this.nextStart = o + a.length;
    }
  }
}
class Mdt {
  constructor(e, n) {
    this.stream = n, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((r) => new d1());
  }
  getActions(e) {
    let n = 0, r = null, { parser: i } = e.p, { tokenizers: a } = i, o = i.stateSlot(
      e.state,
      3
      /* ParseState.TokenizerMask */
    ), s = e.curContext ? e.curContext.hash : 0, l = 0;
    for (let u = 0; u < a.length; u++) {
      if (!(1 << u & o))
        continue;
      let c = a[u], f = this.tokens[u];
      if (!(r && !c.fallback) && ((c.contextual || f.start != e.pos || f.mask != o || f.context != s) && (this.updateCachedToken(f, c, e), f.mask = o, f.context = s), f.lookAhead > f.end + 25 && (l = Math.max(f.lookAhead, l)), f.value != 0)) {
        let d = n;
        if (f.extended > -1 && (n = this.addActions(e, f.extended, f.end, n)), n = this.addActions(e, f.value, f.end, n), !c.extend && (r = f, n > d))
          break;
      }
    }
    for (; this.actions.length > n; )
      this.actions.pop();
    return l && e.setLookAhead(l), !r && e.pos == this.stream.end && (r = new d1(), r.value = e.p.parser.eofTerm, r.start = r.end = e.pos, n = this.addActions(e, r.value, r.end, n)), this.mainToken = r, this.actions;
  }
  getMainToken(e) {
    if (this.mainToken)
      return this.mainToken;
    let n = new d1(), { pos: r, p: i } = e;
    return n.start = r, n.end = Math.min(r + 1, i.stream.end), n.value = r == i.stream.end ? i.parser.eofTerm : 0, n;
  }
  updateCachedToken(e, n, r) {
    let i = this.stream.clipPos(r.pos);
    if (n.token(this.stream.reset(i, e), r), e.value > -1) {
      let { parser: a } = r.p;
      for (let o = 0; o < a.specialized.length; o++)
        if (a.specialized[o] == e.value) {
          let s = a.specializers[o](this.stream.read(e.start, e.end), r);
          if (s >= 0 && r.p.parser.dialect.allows(s >> 1)) {
            s & 1 ? e.extended = s >> 1 : e.value = s >> 1;
            break;
          }
        }
    } else
      e.value = 0, e.end = this.stream.clipPos(i + 1);
  }
  putAction(e, n, r, i) {
    for (let a = 0; a < i; a += 3)
      if (this.actions[a] == e)
        return i;
    return this.actions[i++] = e, this.actions[i++] = n, this.actions[i++] = r, i;
  }
  addActions(e, n, r, i) {
    let { state: a } = e, { parser: o } = e.p, { data: s } = o;
    for (let l = 0; l < 2; l++)
      for (let u = o.stateSlot(
        a,
        l ? 2 : 1
        /* ParseState.Actions */
      ); ; u += 3) {
        if (s[u] == 65535)
          if (s[u + 1] == 1)
            u = xs(s, u + 2);
          else {
            i == 0 && s[u + 1] == 2 && (i = this.putAction(xs(s, u + 2), n, r, i));
            break;
          }
        s[u] == n && (i = this.putAction(xs(s, u + 1), n, r, i));
      }
    return i;
  }
}
class Idt {
  constructor(e, n, r, i) {
    this.parser = e, this.input = n, this.ranges = i, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new $dt(n, i), this.tokens = new Mdt(e, this.stream), this.topTerm = e.top[1];
    let { from: a } = i[0];
    this.stacks = [xS.start(this, e.top[0], a)], this.fragments = r.length && this.stream.end - a > e.bufferLength * 4 ? new Edt(r, e.nodeSet) : null;
  }
  get parsedPos() {
    return this.minStackPos;
  }
  // Move the parser forward. This will process all parse stacks at
  // `this.pos` and try to advance them to a further position. If no
  // stack for such a position is found, it'll start error-recovery.
  //
  // When the parse is finished, this will return a syntax tree. When
  // not, it returns `null`.
  advance() {
    let e = this.stacks, n = this.minStackPos, r = this.stacks = [], i, a;
    if (this.bigReductionCount > 300 && e.length == 1) {
      let [o] = e;
      for (; o.forceReduce() && o.stack.length && o.stack[o.stack.length - 2] >= this.lastBigReductionStart; )
        ;
      this.bigReductionCount = this.lastBigReductionSize = 0;
    }
    for (let o = 0; o < e.length; o++) {
      let s = e[o];
      for (; ; ) {
        if (this.tokens.mainToken = null, s.pos > n)
          r.push(s);
        else {
          if (this.advanceStack(s, r, e))
            continue;
          {
            i || (i = [], a = []), i.push(s);
            let l = this.tokens.getMainToken(s);
            a.push(l.value, l.end);
          }
        }
        break;
      }
    }
    if (!r.length) {
      let o = i && kdt(i);
      if (o)
        return Ei && console.log("Finish with " + this.stackID(o)), this.stackToTree(o);
      if (this.parser.strict)
        throw Ei && i && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + n);
      this.recovering || (this.recovering = 5);
    }
    if (this.recovering && i) {
      let o = this.stoppedAt != null && i[0].pos > this.stoppedAt ? i[0] : this.runRecovery(i, a, r);
      if (o)
        return Ei && console.log("Force-finish " + this.stackID(o)), this.stackToTree(o.forceAll());
    }
    if (this.recovering) {
      let o = this.recovering == 1 ? 1 : this.recovering * 3;
      if (r.length > o)
        for (r.sort((s, l) => l.score - s.score); r.length > o; )
          r.pop();
      r.some((s) => s.reducePos > n) && this.recovering--;
    } else if (r.length > 1) {
      e: for (let o = 0; o < r.length - 1; o++) {
        let s = r[o];
        for (let l = o + 1; l < r.length; l++) {
          let u = r[l];
          if (s.sameState(u) || s.buffer.length > 500 && u.buffer.length > 500)
            if ((s.score - u.score || s.buffer.length - u.buffer.length) > 0)
              r.splice(l--, 1);
            else {
              r.splice(o--, 1);
              continue e;
            }
        }
      }
      r.length > 12 && r.splice(
        12,
        r.length - 12
        /* Rec.MaxStackCount */
      );
    }
    this.minStackPos = r[0].pos;
    for (let o = 1; o < r.length; o++)
      r[o].pos < this.minStackPos && (this.minStackPos = r[o].pos);
    return null;
  }
  stopAt(e) {
    if (this.stoppedAt != null && this.stoppedAt < e)
      throw new RangeError("Can't move stoppedAt forward");
    this.stoppedAt = e;
  }
  // Returns an updated version of the given stack, or null if the
  // stack can't advance normally. When `split` and `stacks` are
  // given, stacks split off by ambiguous operations will be pushed to
  // `split`, or added to `stacks` if they move `pos` forward.
  advanceStack(e, n, r) {
    let i = e.pos, { parser: a } = this, o = Ei ? this.stackID(e) + " -> " : "";
    if (this.stoppedAt != null && i > this.stoppedAt)
      return e.forceReduce() ? e : null;
    if (this.fragments) {
      let u = e.curContext && e.curContext.tracker.strict, c = u ? e.curContext.hash : 0;
      for (let f = this.fragments.nodeAt(i); f; ) {
        let d = this.parser.nodeSet.types[f.type.id] == f.type ? a.getGoto(e.state, f.type.id) : -1;
        if (d > -1 && f.length && (!u || (f.prop(Pt.contextHash) || 0) == c))
          return e.useNode(f, d), Ei && console.log(o + this.stackID(e) + ` (via reuse of ${a.getName(f.type.id)})`), !0;
        if (!(f instanceof Wn) || f.children.length == 0 || f.positions[0] > 0)
          break;
        let h = f.children[0];
        if (h instanceof Wn && f.positions[0] == 0)
          f = h;
        else
          break;
      }
    }
    let s = a.stateSlot(
      e.state,
      4
      /* ParseState.DefaultReduce */
    );
    if (s > 0)
      return e.reduce(s), Ei && console.log(o + this.stackID(e) + ` (via always-reduce ${a.getName(
        s & 65535
        /* Action.ValueMask */
      )})`), !0;
    if (e.stack.length >= 8400)
      for (; e.stack.length > 6e3 && e.forceReduce(); )
        ;
    let l = this.tokens.getActions(e);
    for (let u = 0; u < l.length; ) {
      let c = l[u++], f = l[u++], d = l[u++], h = u == l.length || !r, p = h ? e : e.split(), v = this.tokens.mainToken;
      if (p.apply(c, f, v ? v.start : p.pos, d), Ei && console.log(o + this.stackID(p) + ` (via ${c & 65536 ? `reduce of ${a.getName(
        c & 65535
        /* Action.ValueMask */
      )}` : "shift"} for ${a.getName(f)} @ ${i}${p == e ? "" : ", split"})`), h)
        return !0;
      p.pos > i ? n.push(p) : r.push(p);
    }
    return !1;
  }
  // Advance a given stack forward as far as it will go. Returns the
  // (possibly updated) stack if it got stuck, or null if it moved
  // forward and was given to `pushStackDedup`.
  advanceFully(e, n) {
    let r = e.pos;
    for (; ; ) {
      if (!this.advanceStack(e, null, null))
        return !1;
      if (e.pos > r)
        return dG(e, n), !0;
    }
  }
  runRecovery(e, n, r) {
    let i = null, a = !1;
    for (let o = 0; o < e.length; o++) {
      let s = e[o], l = n[o << 1], u = n[(o << 1) + 1], c = Ei ? this.stackID(s) + " -> " : "";
      if (s.deadEnd && (a || (a = !0, s.restart(), Ei && console.log(c + this.stackID(s) + " (restarted)"), this.advanceFully(s, r))))
        continue;
      let f = s.split(), d = c;
      for (let h = 0; f.forceReduce() && h < 10 && (Ei && console.log(d + this.stackID(f) + " (via force-reduce)"), !this.advanceFully(f, r)); h++)
        Ei && (d = this.stackID(f) + " -> ");
      for (let h of s.recoverByInsert(l))
        Ei && console.log(c + this.stackID(h) + " (via recover-insert)"), this.advanceFully(h, r);
      this.stream.end > s.pos ? (u == s.pos && (u++, l = 0), s.recoverByDelete(l, u), Ei && console.log(c + this.stackID(s) + ` (via recover-delete ${this.parser.getName(l)})`), dG(s, r)) : (!i || i.score < s.score) && (i = s);
    }
    return i;
  }
  // Convert the stack's buffer to a syntax tree.
  stackToTree(e) {
    return e.close(), Wn.build({
      buffer: wS.create(e),
      nodeSet: this.parser.nodeSet,
      topID: this.topTerm,
      maxBufferLength: this.parser.bufferLength,
      reused: this.reused,
      start: this.ranges[0].from,
      length: e.pos - this.ranges[0].from,
      minRepeatType: this.parser.minRepeatTerm
    });
  }
  stackID(e) {
    let n = (B$ || (B$ = /* @__PURE__ */ new WeakMap())).get(e);
    return n || B$.set(e, n = String.fromCodePoint(this.nextStackID++)), n + e;
  }
}
function dG(t, e) {
  for (let n = 0; n < e.length; n++) {
    let r = e[n];
    if (r.pos == t.pos && r.sameState(t)) {
      e[n].score < t.score && (e[n] = t);
      return;
    }
  }
  e.push(t);
}
class Ddt {
  constructor(e, n, r) {
    this.source = e, this.flags = n, this.disabled = r;
  }
  allows(e) {
    return !this.disabled || this.disabled[e] == 0;
  }
}
const z$ = (t) => t;
class Rdt {
  /**
  Define a context tracker.
  */
  constructor(e) {
    this.start = e.start, this.shift = e.shift || z$, this.reduce = e.reduce || z$, this.reuse = e.reuse || z$, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
  }
}
class l0 extends Ioe {
  /**
  @internal
  */
  constructor(e) {
    if (super(), this.wrappers = [], e.version != 14)
      throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
    let n = e.nodeNames.split(" ");
    this.minRepeatTerm = n.length;
    for (let s = 0; s < e.repeatNodeCount; s++)
      n.push("");
    let r = Object.keys(e.topRules).map((s) => e.topRules[s][1]), i = [];
    for (let s = 0; s < n.length; s++)
      i.push([]);
    function a(s, l, u) {
      i[s].push([l, l.deserialize(String(u))]);
    }
    if (e.nodeProps)
      for (let s of e.nodeProps) {
        let l = s[0];
        typeof l == "string" && (l = Pt[l]);
        for (let u = 1; u < s.length; ) {
          let c = s[u++];
          if (c >= 0)
            a(c, l, s[u++]);
          else {
            let f = s[u + -c];
            for (let d = -c; d > 0; d--)
              a(s[u++], l, f);
            u++;
          }
        }
      }
    this.nodeSet = new c4(n.map((s, l) => Ci.define({
      name: l >= this.minRepeatTerm ? void 0 : s,
      id: l,
      props: i[l],
      top: r.indexOf(l) > -1,
      error: l == 0,
      skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
    }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = $oe;
    let o = ig(e.tokenData);
    this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
    for (let s = 0; s < this.specializerSpecs.length; s++)
      this.specialized[s] = this.specializerSpecs[s].term;
    this.specializers = this.specializerSpecs.map(hG), this.states = ig(e.states, Uint32Array), this.data = ig(e.stateData), this.goto = ig(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((s) => typeof s == "number" ? new dh(o, s) : s), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
  }
  createParse(e, n, r) {
    let i = new Idt(this, e, n, r);
    for (let a of this.wrappers)
      i = a(i, e, n, r);
    return i;
  }
  /**
  Get a goto table entry @internal
  */
  getGoto(e, n, r = !1) {
    let i = this.goto;
    if (n >= i[0])
      return -1;
    for (let a = i[n + 1]; ; ) {
      let o = i[a++], s = o & 1, l = i[a++];
      if (s && r)
        return l;
      for (let u = a + (o >> 1); a < u; a++)
        if (i[a] == e)
          return l;
      if (s)
        return -1;
    }
  }
  /**
  Check if this state has an action for a given terminal @internal
  */
  hasAction(e, n) {
    let r = this.data;
    for (let i = 0; i < 2; i++)
      for (let a = this.stateSlot(
        e,
        i ? 2 : 1
        /* ParseState.Actions */
      ), o; ; a += 3) {
        if ((o = r[a]) == 65535)
          if (r[a + 1] == 1)
            o = r[a = xs(r, a + 2)];
          else {
            if (r[a + 1] == 2)
              return xs(r, a + 2);
            break;
          }
        if (o == n || o == 0)
          return xs(r, a + 1);
      }
    return 0;
  }
  /**
  @internal
  */
  stateSlot(e, n) {
    return this.states[e * 6 + n];
  }
  /**
  @internal
  */
  stateFlag(e, n) {
    return (this.stateSlot(
      e,
      0
      /* ParseState.Flags */
    ) & n) > 0;
  }
  /**
  @internal
  */
  validAction(e, n) {
    return !!this.allActions(e, (r) => r == n ? !0 : null);
  }
  /**
  @internal
  */
  allActions(e, n) {
    let r = this.stateSlot(
      e,
      4
      /* ParseState.DefaultReduce */
    ), i = r ? n(r) : void 0;
    for (let a = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); i == null; a += 3) {
      if (this.data[a] == 65535)
        if (this.data[a + 1] == 1)
          a = xs(this.data, a + 2);
        else
          break;
      i = n(xs(this.data, a + 1));
    }
    return i;
  }
  /**
  Get the states that can follow this one through shift actions or
  goto jumps. @internal
  */
  nextStates(e) {
    let n = [];
    for (let r = this.stateSlot(
      e,
      1
      /* ParseState.Actions */
    ); ; r += 3) {
      if (this.data[r] == 65535)
        if (this.data[r + 1] == 1)
          r = xs(this.data, r + 2);
        else
          break;
      if (!(this.data[r + 2] & 1)) {
        let i = this.data[r + 1];
        n.some((a, o) => o & 1 && a == i) || n.push(this.data[r], i);
      }
    }
    return n;
  }
  /**
  Configure the parser. Returns a new parser instance that has the
  given settings modified. Settings not provided in `config` are
  kept from the original parser.
  */
  configure(e) {
    let n = Object.assign(Object.create(l0.prototype), this);
    if (e.props && (n.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
      let r = this.topRules[e.top];
      if (!r)
        throw new RangeError(`Invalid top rule name ${e.top}`);
      n.top = r;
    }
    return e.tokenizers && (n.tokenizers = this.tokenizers.map((r) => {
      let i = e.tokenizers.find((a) => a.from == r);
      return i ? i.to : r;
    })), e.specializers && (n.specializers = this.specializers.slice(), n.specializerSpecs = this.specializerSpecs.map((r, i) => {
      let a = e.specializers.find((s) => s.from == r.external);
      if (!a)
        return r;
      let o = Object.assign(Object.assign({}, r), { external: a.to });
      return n.specializers[i] = hG(o), o;
    })), e.contextTracker && (n.context = e.contextTracker), e.dialect && (n.dialect = this.parseDialect(e.dialect)), e.strict != null && (n.strict = e.strict), e.wrap && (n.wrappers = n.wrappers.concat(e.wrap)), e.bufferLength != null && (n.bufferLength = e.bufferLength), n;
  }
  /**
  Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
  are registered for this parser.
  */
  hasWrappers() {
    return this.wrappers.length > 0;
  }
  /**
  Returns the name associated with a given term. This will only
  work for all terms when the parser was generated with the
  `--names` option. By default, only the names of tagged terms are
  stored.
  */
  getName(e) {
    return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
  }
  /**
  The eof term id is always allocated directly after the node
  types. @internal
  */
  get eofTerm() {
    return this.maxNode + 1;
  }
  /**
  The type of top node produced by the parser.
  */
  get topNode() {
    return this.nodeSet.types[this.top[1]];
  }
  /**
  @internal
  */
  dynamicPrecedence(e) {
    let n = this.dynamicPrecedences;
    return n == null ? 0 : n[e] || 0;
  }
  /**
  @internal
  */
  parseDialect(e) {
    let n = Object.keys(this.dialects), r = n.map(() => !1);
    if (e)
      for (let a of e.split(" ")) {
        let o = n.indexOf(a);
        o >= 0 && (r[o] = !0);
      }
    let i = null;
    for (let a = 0; a < n.length; a++)
      if (!r[a])
        for (let o = this.dialects[n[a]], s; (s = this.data[o++]) != 65535; )
          (i || (i = new Uint8Array(this.maxTerm + 1)))[s] = 1;
    return new Ddt(e, r, i);
  }
  /**
  Used by the output of the parser generator. Not available to
  user code. @hide
  */
  static deserialize(e) {
    return new l0(e);
  }
}
function xs(t, e) {
  return t[e] | t[e + 1] << 16;
}
function kdt(t) {
  let e = null;
  for (let n of t) {
    let r = n.p.stoppedAt;
    (n.pos == n.p.stream.end || r != null && n.pos > r) && n.p.parser.stateFlag(
      n.state,
      2
      /* StateFlag.Accepting */
    ) && (!e || e.score < n.score) && (e = n);
  }
  return e;
}
function hG(t) {
  if (t.external) {
    let e = t.extend ? 1 : 0;
    return (n, r) => t.external(n, r) << 1 | e;
  }
  return t.get;
}
const Ldt = 312, pG = 1, Ndt = 2, Bdt = 3, zdt = 4, Vdt = 313, Fdt = 315, Wdt = 316, Qdt = 5, Hdt = 6, Gdt = 0, qM = [
  9,
  10,
  11,
  12,
  13,
  32,
  133,
  160,
  5760,
  8192,
  8193,
  8194,
  8195,
  8196,
  8197,
  8198,
  8199,
  8200,
  8201,
  8202,
  8232,
  8233,
  8239,
  8287,
  12288
], ole = 125, jdt = 59, KM = 47, Zdt = 42, Udt = 43, Xdt = 45, Ydt = 60, qdt = 44, Kdt = 63, Jdt = 46, eht = new Rdt({
  start: !1,
  shift(t, e) {
    return e == Qdt || e == Hdt || e == Fdt ? t : e == Wdt;
  },
  strict: !1
}), tht = new Ww((t, e) => {
  let { next: n } = t;
  (n == ole || n == -1 || e.context) && t.acceptToken(Vdt);
}, { contextual: !0, fallback: !0 }), nht = new Ww((t, e) => {
  let { next: n } = t, r;
  qM.indexOf(n) > -1 || n == KM && ((r = t.peek(1)) == KM || r == Zdt) || n != ole && n != jdt && n != -1 && !e.context && t.acceptToken(Ldt);
}, { contextual: !0 }), rht = new Ww((t, e) => {
  let { next: n } = t;
  if (n == Udt || n == Xdt) {
    if (t.advance(), n == t.next) {
      t.advance();
      let r = !e.context && e.canShift(pG);
      t.acceptToken(r ? pG : Ndt);
    }
  } else n == Kdt && t.peek(1) == Jdt && (t.advance(), t.advance(), (t.next < 48 || t.next > 57) && t.acceptToken(Bdt));
}, { contextual: !0 });
function V$(t, e) {
  return t >= 65 && t <= 90 || t >= 97 && t <= 122 || t == 95 || t >= 192 || !e && t >= 48 && t <= 57;
}
const iht = new Ww((t, e) => {
  if (t.next != Ydt || !e.dialectEnabled(Gdt) || (t.advance(), t.next == KM)) return;
  let n = 0;
  for (; qM.indexOf(t.next) > -1; )
    t.advance(), n++;
  if (V$(t.next, !0)) {
    for (t.advance(), n++; V$(t.next, !1); )
      t.advance(), n++;
    for (; qM.indexOf(t.next) > -1; )
      t.advance(), n++;
    if (t.next == qdt) return;
    for (let r = 0; ; r++) {
      if (r == 7) {
        if (!V$(t.next, !0)) return;
        break;
      }
      if (t.next != "extends".charCodeAt(r)) break;
      t.advance(), n++;
    }
  }
  t.acceptToken(zdt, -n);
}), aht = p4({
  "get set async static": J.modifier,
  "for while do if else switch try catch finally return throw break continue default case": J.controlKeyword,
  "in of await yield void typeof delete instanceof": J.operatorKeyword,
  "let var const using function class extends": J.definitionKeyword,
  "import export from": J.moduleKeyword,
  "with debugger as new": J.keyword,
  TemplateString: J.special(J.string),
  super: J.atom,
  BooleanLiteral: J.bool,
  this: J.self,
  null: J.null,
  Star: J.modifier,
  VariableName: J.variableName,
  "CallExpression/VariableName TaggedTemplateExpression/VariableName": J.function(J.variableName),
  VariableDefinition: J.definition(J.variableName),
  Label: J.labelName,
  PropertyName: J.propertyName,
  PrivatePropertyName: J.special(J.propertyName),
  "CallExpression/MemberExpression/PropertyName": J.function(J.propertyName),
  "FunctionDeclaration/VariableDefinition": J.function(J.definition(J.variableName)),
  "ClassDeclaration/VariableDefinition": J.definition(J.className),
  PropertyDefinition: J.definition(J.propertyName),
  PrivatePropertyDefinition: J.definition(J.special(J.propertyName)),
  UpdateOp: J.updateOperator,
  "LineComment Hashbang": J.lineComment,
  BlockComment: J.blockComment,
  Number: J.number,
  String: J.string,
  Escape: J.escape,
  ArithOp: J.arithmeticOperator,
  LogicOp: J.logicOperator,
  BitOp: J.bitwiseOperator,
  CompareOp: J.compareOperator,
  RegExp: J.regexp,
  Equals: J.definitionOperator,
  Arrow: J.function(J.punctuation),
  ": Spread": J.punctuation,
  "( )": J.paren,
  "[ ]": J.squareBracket,
  "{ }": J.brace,
  "InterpolationStart InterpolationEnd": J.special(J.brace),
  ".": J.derefOperator,
  ", ;": J.separator,
  "@": J.meta,
  TypeName: J.typeName,
  TypeDefinition: J.definition(J.typeName),
  "type enum interface implements namespace module declare": J.definitionKeyword,
  "abstract global Privacy readonly override": J.modifier,
  "is keyof unique infer": J.operatorKeyword,
  JSXAttributeValue: J.attributeValue,
  JSXText: J.content,
  "JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": J.angleBracket,
  "JSXIdentifier JSXNameSpacedName": J.tagName,
  "JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": J.attributeName,
  "JSXBuiltin/JSXIdentifier": J.standard(J.tagName)
}), oht = { __proto__: null, export: 20, as: 25, from: 33, default: 36, async: 41, function: 42, extends: 54, this: 58, true: 66, false: 66, null: 78, void: 82, typeof: 86, super: 102, new: 136, delete: 148, yield: 157, await: 161, class: 166, public: 229, private: 229, protected: 229, readonly: 231, instanceof: 250, satisfies: 253, in: 254, const: 256, import: 290, keyof: 345, unique: 349, infer: 355, is: 391, abstract: 411, implements: 413, type: 415, let: 418, var: 420, using: 423, interface: 429, enum: 433, namespace: 439, module: 441, declare: 445, global: 449, for: 468, of: 477, while: 480, with: 484, do: 488, if: 492, else: 494, switch: 498, case: 504, try: 510, catch: 514, finally: 518, return: 522, throw: 526, break: 530, continue: 534, debugger: 538 }, sht = { __proto__: null, async: 123, get: 125, set: 127, declare: 189, public: 191, private: 191, protected: 191, static: 193, abstract: 195, override: 197, readonly: 203, accessor: 205, new: 395 }, lht = { __proto__: null, "<": 187 }, uht = l0.deserialize({
  version: 14,
  states: "$@QO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQWO'#HtO>yQ?MyO'#HzO%[Q^O'#H|O?UQ?MyO'#IOO?aQ?MyO'#IQO9hQ?MxO'#ISO?lQ?NdO'#CiO@nQ`O'#DiQOQWOOO%[Q^O'#D}OAUQWO'#EQO:VQ7[O'#EkOAaQWO'#EkOAlQpO'#FdOOQU'#Cg'#CgOOQ?Mp'#Dn'#DnOOQ?Mp'#Jq'#JqO%[Q^O'#JqOOQO'#Jt'#JtOOQO'#Id'#IdOBlQ`O'#EdOOQ?Mp'#Ec'#EcOOQ?Mp'#Jx'#JxOChQ?NQO'#EdOCrQ`O'#ETOOQO'#Js'#JsODWQ`O'#JtOEeQ`O'#ETOCrQ`O'#EdPErO#@ItO'#CbPOOO)CDx)CDxOOOO'#I['#I[OE}O!bO,59UOOQ?Mr,59U,59UOOOO'#I]'#I]OF]O#tO,59UO%[Q^O'#D`OOOO'#I_'#I_OFkO!0LbO,59xOOQ?Mr,59x,59xOFyQ^O'#I`OG^QWO'#JoOI]QrO'#JoO+}Q^O'#JoOIdQWO,5:OOIzQWO'#EmOJXQWO'#KOOJdQWO'#J}OJdQWO'#J}OJlQWO,5;ZOJqQWO'#J|OOQ?Mv,5:Z,5:ZOJxQ^O,5:ZOLvQ?NdO,5:cOMgQWO,5:kONQQ?MxO'#J{ONXQWO'#JzO9WQWO'#JzONmQWO'#JzONuQWO,5;YONzQWO'#JzO!#PQrO'#JnOOQ?Mr'#Ci'#CiO%[Q^O'#EPO!#oQrO,5:pOOQQ'#Ju'#JuOOQO-E<f-E<fO9^QWO,5=[O!$VQWO,5=[O!$[Q^O,5;WO!&_Q7[O'#EhO!'xQWO,5;WO!'}Q^O'#DvO!(XQ`O,5;aO!(aQ`O,5;aO%[Q^O,5;aOOQU'#FS'#FSOOQU'#FU'#FUO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bO%[Q^O,5;bOOQU'#FY'#FYO!(oQ^O,5;sOOQ?Mr,5;x,5;xOOQ?Mr,5;y,5;yOOQ?Mr,5;{,5;{O%[Q^O'#IlO!*rQ?MxO,5<gO%[Q^O,5;bO!&_Q7[O,5;bO!+aQ7[O,5;bO!-RQ7[O'#EZO%[Q^O,5;vOOQ?Mr,5;z,5;zO!-YQ&jO'#FiO!.VQ&jO'#KSO!-qQ&jO'#KSO!.^Q&jO'#KSOOQO'#KS'#KSO!.rQ&jO,5<ROOOS,5<_,5<_O!/TQ^O'#FuOOOS'#Ik'#IkO7VO,YO,5<PO!/[Q&jO'#FwOOQ?Mr,5<P,5<PO!/{Q!LQO'#CvOOQ?Mr'#Cz'#CzO!0`O!0LbO'#DOO!0|Q7[O,5<dO!1TQWO,5<fO!2pQ$ISO'#GVO!2}QWO'#GWO!3SQWO'#GWO!4rQ$ISO'#G[O!5nQ`O'#G`OOQO'#Gk'#GkO!+hQ7[O'#GjOOQO'#Gm'#GmO!+hQ7[O'#GlO!6aQ!LQO'#JgOOQ?Mr'#Jg'#JgO!6kQWO'#JfO!6yQWO'#JeO!7RQWO'#CuOOQ?Mr'#Cx'#CxO!7ZQWO'#CzOOQ?Mr'#DS'#DSOOQ?Mr'#DU'#DUO1SQWO'#DWO!+hQ7[O'#F}O!+hQ7[O'#GPO!7`QWO'#GRO!7eQWO'#GSO!3SQWO'#GYO!+hQ7[O'#G_O!7jQWO'#EnO!8XQWO,5<eOOQ?Mp'#Cr'#CrO!8aQWO'#EoO!9ZQ`O'#EpOOQ?Mp'#J|'#J|O!9bQ?MxO'#K]O9hQ?MxO,5=`O`Q^O,5>pOOQU'#Jc'#JcOOQU,5>q,5>qOOQU-E<X-E<XO!;aQ?NdO,5:_O!9UQ`O,5:]O!=zQ?NdO,5:gO%[Q^O,5:gO!@bQ?NdO,5:iOOQO,5@v,5@vO!ARQ7[O,5=[O!AaQ?MxO'#JdO9RQWO'#JdO!ArQ?MxO,59ZO!A}Q`O,59ZO!BVQ7[O,59ZO:VQ7[O,59ZO!BbQWO,5;WO!BjQWO'#H^O!COQWO'#K`O%[Q^O,5;|O!9UQ`O,5<OO!CWQWO,5=wO!C]QWO,5=wO!CbQWO,5=wO9hQ?MxO,5=wO;wQWO,5=gOOQO'#Cv'#CvO!CpQ`O,5=dO!CxQ7[O,5=eO!DTQWO,5=gO!DYQpO,5=jO!DbQWO'#K[O>tQWO'#HTO9^QWO'#HVO!DgQWO'#HVO:VQ7[O'#HXO!DlQWO'#HXOOQU,5=m,5=mO!DqQWO'#HYO!ESQWO'#CoO!EXQWO,59PO!EcQWO,59PO!GhQ^O,59POOQU,59P,59PO!GxQ?MxO,59PO%[Q^O,59PO!JTQ^O'#HaOOQU'#Hb'#HbOOQU'#Hc'#HcO`Q^O,5=yO!JkQWO,5=yO`Q^O,5>PO`Q^O,5>RO!JpQWO,5>TO`Q^O,5>VO!JuQWO,5>YO!JzQ^O,5>`OOQU,5>f,5>fO%[Q^O,5>fO9hQ?MxO,5>hOOQU,5>j,5>jO# UQWO,5>jOOQU,5>l,5>lO# UQWO,5>lOOQU,5>n,5>nO# rQ`O'#D[O%[Q^O'#JqO# |Q`O'#JqO#!kQ`O'#DjO#!|Q`O'#DjO#%_Q^O'#DjO#%fQWO'#JpO#%nQWO,5:TO#%sQWO'#EqO#&RQWO'#KPO#&ZQWO,5;[O#&`Q`O'#DjO#&mQ`O'#ESOOQ?Mr,5:l,5:lO%[Q^O,5:lO#&tQWO,5:lO>tQWO,5;VO!A}Q`O,5;VO!BVQ7[O,5;VO:VQ7[O,5;VO#&|QWO,5@]O#'RQ(CYO,5:pOOQO-E<b-E<bO#(XQ?NQO,5;OOCrQ`O,5:oO#(cQ`O,5:oOCrQ`O,5;OO!ArQ?MxO,5:oOOQ?Mp'#Eg'#EgOOQO,5;O,5;OO%[Q^O,5;OO#(pQ?MxO,5;OO#({Q?MxO,5;OO!A}Q`O,5:oOOQO,5;U,5;UO#)ZQ?MxO,5;OPOOO'#IY'#IYP#)oO#@ItO,58|POOO,58|,58|OOOO-E<Y-E<YOOQ?Mr1G.p1G.pOOOO-E<Z-E<ZO#)zQpO,59zOOOO-E<]-E<]OOQ?Mr1G/d1G/dO#*PQrO,5>zO+}Q^O,5>zOOQO,5?Q,5?QO#*ZQ^O'#I`OOQO-E<^-E<^O#*hQWO,5@ZO#*pQrO,5@ZO#*wQWO,5@iOOQ?Mr1G/j1G/jO%[Q^O,5@jO#+PQWO'#IfOOQO-E<d-E<dO#*wQWO,5@iOOQ?Mp1G0u1G0uOOQ?Mv1G/u1G/uOOQ?Mv1G0V1G0VO%[Q^O,5@gO#+eQ?MxO,5@gO#+vQ?MxO,5@gO#+}QWO,5@fO9WQWO,5@fO#,VQWO,5@fO#,eQWO'#IiO#+}QWO,5@fOOQ?Mp1G0t1G0tO!(XQ`O,5:rO!(dQ`O,5:rOOQQ,5:t,5:tO#-VQYO,5:tO#-_Q7[O1G2vO9^QWO1G2vOOQ?Mr1G0r1G0rO#-mQ?NdO1G0rO#.rQ?NbO,5;SOOQ?Mr'#GU'#GUO#/`Q?NdO'#JgO!$[Q^O1G0rO#1hQrO'#JrO%[Q^O'#JrO#1rQWO,5:bOOQ?Mr'#D['#D[OOQ?Mr1G0{1G0{O%[Q^O1G0{OOQ?Mr1G1e1G1eO#1wQWO1G0{O#4]Q?NdO1G0|O#4dQ?NdO1G0|O#6zQ?NdO1G0|O#7RQ?NdO1G0|O#9iQ?NdO1G0|O#<PQ?NdO1G0|O#<WQ?NdO1G0|O#<_Q?NdO1G0|O#>uQ?NdO1G0|O#>|Q?NdO1G0|O#AZQ07bO'#CiO#CUQ07bO1G1_O#C]Q07bO'#JnO#CpQ?NdO,5?WOOQ?Mp-E<j-E<jO#E}Q?NdO1G0|O#FzQ?NdO1G0|OOQ?Mr1G0|1G0|O#GzQ7[O'#JwO#HUQWO,5:uO#HZQ?NdO1G1bO#H}Q&jO,5<VO#IVQ&jO,5<WO#I_Q&jO'#FnO#IvQWO'#FmOOQO'#KT'#KTOOQO'#Ij'#IjO#I{Q&jO1G1mOOQ?Mr1G1m1G1mOOOS1G1x1G1xO#J^Q07bO'#JmO#JhQWO,5<aO!(oQ^O,5<aOOOS-E<i-E<iOOQ?Mr1G1k1G1kO#JmQ`O'#KSOOQ?Mr,5<c,5<cO#JuQ`O,5<cO!&_Q7[O'#DQOOOO'#I^'#I^O#JzO!0LbO,59jOOQ?Mr,59j,59jO%[Q^O1G2OO!7eQWO'#InO#KVQ7[O,5<xOOQ?Mr,5<u,5<uO!+hQ7[O'#IqO#KuQ7[O,5=UO!+hQ7[O'#IsO#LhQ7[O,5=WO!&_Q7[O,5=YOOQO1G2Q1G2QO#LrQpO'#CrO#MVQ$ISO'#EoO#NUQ`O'#G`O#NrQpO,5<qO#NyQWO'#KWO9WQWO'#KWO$ XQWO,5<sO!+hQ7[O,5<rO$ ^QWO'#GXO$ oQWO,5<rO$ tQpO'#GUO$!RQpO'#KXO$!]QWO'#KXO!&_Q7[O'#KXO$!bQWO,5<vO$!gQ`O'#GaO!5iQ`O'#GaO$!xQWO'#GcO$!}QWO'#GeO!3SQWO'#GhO$#SQ?MxO'#IpO$#_Q`O,5<zOOQ?Mv,5<z,5<zO$#fQ`O'#GaO$#tQ`O'#GbO$#|Q`O'#GbO$$RQ7[O,5=UO$$cQ7[O,5=WOOQ?Mr,5=Z,5=ZO!+hQ7[O,5@QO!+hQ7[O,5@QO$$sQWO'#IuO$%OQWO,5@PO$%WQWO,59aOOQ?Mr,59f,59fO$%zQ!LSO,59rOOQ?Mr'#Jk'#JkO$&mQ7[O,5<iO$'`Q7[O,5<kO@fQWO,5<mOOQ?Mr,5<n,5<nO$'jQWO,5<tO$'oQ7[O,5<yO$(PQWO'#JzO!$[Q^O1G2PO$(UQWO1G2PO9WQWO'#J}O9WQWO'#EqO%[Q^O'#EqO9WQWO'#IwO$(ZQ?MxO,5@wOOQU1G2z1G2zOOQU1G4[1G4[OOQ?Mr1G/y1G/yOOQ?Mr1G/w1G/wO$*]Q?NdO1G0ROOQU1G2v1G2vO!&_Q7[O1G2vO%[Q^O1G2vO#-bQWO1G2vO$,aQ7[O'#EhOOQ?Mp,5@O,5@OO$,kQ?MxO,5@OOOQU1G.u1G.uO!ArQ?MxO1G.uO!A}Q`O1G.uO!BVQ7[O1G.uO$,|QWO1G0rO$-RQWO'#CiO$-^QWO'#KaO$-fQWO,5=xO$-kQWO'#KaO$-pQWO'#KaO$.OQWO'#I}O$.^QWO,5@zO$.fQrO1G1hOOQ?Mr1G1j1G1jO9^QWO1G3cO@fQWO1G3cO$.mQWO1G3cO$.rQWO1G3cOOQU1G3c1G3cO!DTQWO1G3RO!&_Q7[O1G3OO$.wQWO1G3OOOQU1G3P1G3PO!&_Q7[O1G3PO$.|QWO1G3PO$/UQ`O'#G}OOQU1G3R1G3RO!5iQ`O'#IyO!DYQpO1G3UOOQU1G3U1G3UOOQU,5=o,5=oO$/^Q7[O,5=qO9^QWO,5=qO$!}QWO,5=sO9RQWO,5=sO!A}Q`O,5=sO!BVQ7[O,5=sO:VQ7[O,5=sO$/lQWO'#K_O$/wQWO,5=tOOQU1G.k1G.kO$/|Q?MxO1G.kO@fQWO1G.kO$0XQWO1G.kO9hQ?MxO1G.kO$2aQrO,5@|O$2nQWO,5@|O9WQWO,5@|O$2yQ^O,5={O$3QQWO,5={OOQU1G3e1G3eO`Q^O1G3eOOQU1G3k1G3kOOQU1G3m1G3mO>oQWO1G3oO$3VQ^O1G3qO$7ZQ^O'#HpOOQU1G3t1G3tO$7hQWO'#HvO>tQWO'#HxOOQU1G3z1G3zO$7pQ^O1G3zO9hQ?MxO1G4QOOQU1G4S1G4SOOQ?Mp'#G]'#G]O9hQ?MxO1G4UO9hQ?MxO1G4WO$;wQWO,5@]O!(oQ^O,5;]O9WQWO,5;]O>tQWO,5:UO!(oQ^O,5:UO!A}Q`O,5:UO$;|Q07bO,5:UOOQO,5;],5;]O$<WQ`O'#IaO$<nQWO,5@[OOQ?Mr1G/o1G/oO$<vQ`O'#IgO$=QQWO,5@kOOQ?Mp1G0v1G0vO#!|Q`O,5:UOOQO'#Ic'#IcO$=YQ`O,5:nOOQ?Mv,5:n,5:nO#&wQWO1G0WOOQ?Mr1G0W1G0WO%[Q^O1G0WOOQ?Mr1G0q1G0qO>tQWO1G0qO!A}Q`O1G0qO!BVQ7[O1G0qOOQ?Mp1G5w1G5wO!ArQ?MxO1G0ZOOQO1G0j1G0jO%[Q^O1G0jO$=aQ?MxO1G0jO$=lQ?MxO1G0jO!A}Q`O1G0ZOCrQ`O1G0ZO$=zQ?MxO1G0jOOQO1G0Z1G0ZO$>`Q?NdO1G0jPOOO-E<W-E<WPOOO1G.h1G.hOOOO1G/f1G/fO$>jQpO,5<gO$>rQrO1G4fOOQO1G4l1G4lO%[Q^O,5>zO$>|QWO1G5uO$?UQWO1G6TO$?^QrO1G6UO9WQWO,5?QO$?hQ?NdO1G6RO%[Q^O1G6RO$?xQ?MxO1G6RO$@ZQWO1G6QO$@ZQWO1G6QO9WQWO1G6QO$@cQWO,5?TO9WQWO,5?TOOQO,5?T,5?TO$@wQWO,5?TO$(PQWO,5?TOOQO-E<g-E<gOOQQ1G0^1G0^OOQQ1G0`1G0`O#-YQWO1G0`OOQU7+(b7+(bO!&_Q7[O7+(bO%[Q^O7+(bO$AVQWO7+(bO$AbQ7[O7+(bO$ApQ?NdO,5=UO$CxQ?NdO,5=WO$FQQ?NdO,5=UO$H`Q?NdO,5=WO$JnQ?NdO,59rO$LsQ?NdO,5<iO$N{Q?NdO,5<kO%#TQ?NdO,5<yOOQ?Mr7+&^7+&^O%%cQ?NdO7+&^O%&VQ^O'#IbO%&dQWO,5@^O%&lQrO,5@^OOQ?Mr1G/|1G/|O%&vQWO7+&gOOQ?Mr7+&g7+&gO%&{Q07bO,5:cO%[Q^O7+&yO%'VQ07bO,5:_O%'dQ07bO,5:gO%'nQ07bO,5:iO%'xQ7[O'#IeO%(SQWO,5@cOOQ?Mr1G0a1G0aOOQO1G1q1G1qOOQO1G1r1G1rO%([QtO,5<YO!(oQ^O,5<XOOQO-E<h-E<hOOQ?Mr7+'X7+'XOOOS7+'d7+'dOOOS1G1{1G1{O%(gQWO1G1{OOQ?Mr1G1}1G1}O%(lQpO,59lOOOO-E<[-E<[OOQ?Mr1G/U1G/UO%(sQ?NdO7+'jOOQ?Mr,5?Y,5?YO%)gQpO,5?YOOQ?Mr1G2d1G2dP!&_Q7[O'#InPOQ?Mr-E<l-E<lO%*VQ7[O,5?]OOQ?Mr-E<o-E<oO%*xQ7[O,5?_OOQ?Mr-E<q-E<qO%+SQpO1G2tO%+ZQpO'#CrO%+qQ7[O'#J}O%+xQ^O'#EqOOQ?Mr1G2]1G2]O%,SQWO'#ImO%,hQWO,5@rO%,hQWO,5@rO%,pQWO,5@rO%,{QWO,5@rOOQO1G2_1G2_O%-ZQ7[O1G2^O!+hQ7[O1G2^O%-kQ$ISO'#IoO%-xQWO,5@sO!&_Q7[O,5@sO%.QQpO,5@sOOQ?Mr1G2b1G2bOOQ?Mp,5<{,5<{OOQ?Mp,5<|,5<|O$(PQWO,5<|OCcQWO,5<|O!A}Q`O,5<{OOQO'#Gd'#GdO%.[QWO,5<}OOQ?Mp,5=P,5=PO$(PQWO,5=SOOQO,5?[,5?[OOQO-E<n-E<nOOQ?Mv1G2f1G2fO!5iQ`O,5<{O%.dQWO,5<|O$!xQWO,5<}O%.oQ`O,5<|O!+hQ7[O'#IqO%/`Q7[O1G2pO!+hQ7[O'#IsO%0RQ7[O1G2rO%0]Q7[O1G5lO%0gQ7[O1G5lOOQO,5?a,5?aOOQO-E<s-E<sOOQO1G.{1G.{O!9UQ`O,59tO%[Q^O,59tOOQ?Mr,5<h,5<hO%0tQWO1G2XO!+hQ7[O1G2`O%0yQ?NdO7+'kOOQ?Mr7+'k7+'kO!$[Q^O7+'kO%1mQWO,5;]OOQ?Mp,5?c,5?cOOQ?Mp-E<u-E<uO%1rQpO'#KYO#&wQWO7+(bO4UQrO7+(bO$AYQWO7+(bO%1|Q?NbO'#CiO%2aQ?NbO,5=QO%3RQWO,5=QOOQ?Mp1G5j1G5jOOQU7+$a7+$aO!ArQ?MxO7+$aO!A}Q`O7+$aO!$[Q^O7+&^O%3WQWO'#I|O%3oQWO,5@{OOQO1G3d1G3dO9^QWO,5@{O%3oQWO,5@{O%3wQWO,5@{OOQO,5?i,5?iOOQO-E<{-E<{OOQ?Mr7+'S7+'SO%3|QWO7+(}O9hQ?MxO7+(}O9^QWO7+(}O@fQWO7+(}OOQU7+(m7+(mO%4RQ?NbO7+(jO!&_Q7[O7+(jO%4]QpO7+(kOOQU7+(k7+(kO!&_Q7[O7+(kO%4dQWO'#K^O%4oQWO,5=iOOQO,5?e,5?eOOQO-E<w-E<wOOQU7+(p7+(pO%6RQ`O'#HWOOQU1G3]1G3]O!&_Q7[O1G3]O%[Q^O1G3]O%6YQWO1G3]O%6eQ7[O1G3]O9hQ?MxO1G3_O$!}QWO1G3_O9RQWO1G3_O!A}Q`O1G3_O!BVQ7[O1G3_O%6sQWO'#I{O%7XQWO,5@yO%7aQ`O,5@yOOQ?Mp1G3`1G3`OOQU7+$V7+$VO@fQWO7+$VO9hQ?MxO7+$VO%7lQWO7+$VO%[Q^O1G6hO%[Q^O1G6iO%7qQ?MxO1G6hO%7{Q^O1G3gO%8SQWO1G3gO%8XQ^O1G3gOOQU7+)P7+)PO9hQ?MxO7+)ZO`Q^O7+)]OOQU'#Kd'#KdOOQU'#JO'#JOO%8`Q^O,5>[OOQU,5>[,5>[O%[Q^O'#HqO%8mQWO'#HsOOQU,5>b,5>bO9WQWO,5>bOOQU,5>d,5>dOOQU7+)f7+)fOOQU7+)l7+)lOOQU7+)p7+)pOOQU7+)r7+)rO%8rQ`O1G5wO%9WQ07bO1G0wO%9bQWO1G0wOOQO1G/p1G/pO%9mQ07bO1G/pO>tQWO1G/pO!(oQ^O'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-E<e-E<eO!A}Q`O1G/pOOQO-E<a-E<aOOQ?Mv1G0Y1G0YOOQ?Mr7+%r7+%rO#&wQWO7+%rOOQ?Mr7+&]7+&]O>tQWO7+&]O!A}Q`O7+&]OOQO7+%u7+%uO$>`Q?NdO7+&UOOQO7+&U7+&UO%[Q^O7+&UO%9wQ?MxO7+&UO!ArQ?MxO7+%uO!A}Q`O7+%uO%:SQ?MxO7+&UO%:bQ?NdO7++mO%[Q^O7++mO%:rQWO7++lO%:rQWO7++lOOQO1G4o1G4oO9WQWO1G4oO%:zQWO1G4oOOQQ7+%z7+%zO#&wQWO<<K|O4UQrO<<K|O%;YQWO<<K|OOQU<<K|<<K|O!&_Q7[O<<K|O%[Q^O<<K|O%;bQWO<<K|O%;mQ?NdO,5?]O%=uQ?NdO,5?_O%?}Q?NdO1G2^O%B]Q?NdO1G2pO%DeQ?NdO1G2rO%FmQrO,5>|O%[Q^O,5>|OOQO-E<`-E<`O%FwQWO1G5xOOQ?Mr<<JR<<JRO%GPQ07bO1G0rO%IWQ07bO1G0|O%I_Q07bO1G0|O%K`Q07bO1G0|O%KgQ07bO1G0|O%MhQ07bO1G0|O& iQ07bO1G0|O& pQ07bO1G0|O& wQ07bO1G0|O&#xQ07bO1G0|O&$PQ07bO1G0|O&$WQ?NdO<<JeO&&OQ07bO1G0|O&&{Q07bO1G0|O&'{Q07bO'#JgO&*OQ07bO1G1bO&*]Q07bO1G0RO&*gQ7[O,5?POOQO-E<c-E<cO!(oQ^O'#FpOOQO'#KU'#KUOOQO1G1t1G1tO&*qQWO1G1sO&*vQ07bO,5?WOOOS7+'g7+'gOOOO1G/W1G/WOOQ?Mr1G4t1G4tO!+hQ7[O7+(`O&-WQrO'#CiO&-bQWO,5?XO9WQWO,5?XOOQO-E<k-E<kO&-pQWO1G6^O&-pQWO1G6^O&-xQWO1G6^O&.TQ7[O7+'xO&.eQpO,5?ZO&.oQWO,5?ZO!&_Q7[O,5?ZOOQO-E<m-E<mO&.tQpO1G6_O&/OQWO1G6_OOQ?Mp1G2h1G2hO$(PQWO1G2hOOQ?Mp1G2g1G2gO&/WQWO1G2iO!&_Q7[O1G2iOOQ?Mp1G2n1G2nO!A}Q`O1G2gOCcQWO1G2hO&/]QWO1G2iO&/eQWO1G2hO$!xQWO1G2iO&0XQ7[O,5?]OOQ?Mr-E<p-E<pO&0zQ7[O,5?_OOQ?Mr-E<r-E<rO!+hQ7[O7++WOOQ?Mr1G/`1G/`O&1UQWO1G/`OOQ?Mr7+'s7+'sO&1ZQ7[O7+'zO&1kQ?NdO<<KVOOQ?Mr<<KV<<KVO&2_QWO1G0wO!&_Q7[O'#IvO&2dQWO,5@tO&4fQrO<<K|O!&_Q7[O1G2lOOQU<<G{<<G{O!ArQ?MxO<<G{O&4mQ?NdO<<IxOOQ?Mr<<Ix<<IxOOQO,5?h,5?hO&5aQWO,5?hO&5fQWO,5?hOOQO-E<z-E<zO&5tQWO1G6gO&5tQWO1G6gO9^QWO1G6gO@fQWO<<LiOOQU<<Li<<LiO&5|QWO<<LiO9hQ?MxO<<LiOOQU<<LU<<LUO%4RQ?NbO<<LUOOQU<<LV<<LVO%4]QpO<<LVO&6RQ`O'#IxO&6^QWO,5@xO!(oQ^O,5@xOOQU1G3T1G3TO%+xQ^O'#JqOOQO'#Iz'#IzO9hQ?MxO'#IzO&6fQ`O,5=rOOQU,5=r,5=rO&6mQ`O'#EdO&7RQ`O'#GcO&7WQWO7+(wO&7]QWO7+(wOOQU7+(w7+(wO!&_Q7[O7+(wO%[Q^O7+(wO&7eQWO7+(wOOQU7+(y7+(yO9hQ?MxO7+(yO$!}QWO7+(yO9RQWO7+(yO!A}Q`O7+(yO&7pQWO,5?gOOQO-E<y-E<yOOQO'#HZ'#HZO&7{QWO1G6eO9hQ?MxO<<GqOOQU<<Gq<<GqO@fQWO<<GqO&8TQWO7+,SO&8YQWO7+,TO%[Q^O7+,SO%[Q^O7+,TOOQU7+)R7+)RO&8_QWO7+)RO&8dQ^O7+)RO&8kQWO7+)ROOQU<<Lu<<LuOOQU<<Lw<<LwOOQU-E<|-E<|OOQU1G3v1G3vO&8pQWO,5>]OOQU,5>_,5>_O&8uQWO1G3|O9WQWO7+&cO!(oQ^O7+&cOOQO7+%[7+%[O&8zQ07bO1G6UO>tQWO7+%[OOQ?Mr<<I^<<I^OOQ?Mr<<Iw<<IwO>tQWO<<IwOOQO<<Ip<<IpO$>`Q?NdO<<IpO%[Q^O<<IpOOQO<<Ia<<IaO!ArQ?MxO<<IaO&9UQ?MxO<<IpO&9aQ?NdO<= XO&9qQWO<= WOOQO7+*Z7+*ZO9WQWO7+*ZOOQUANAhANAhO&9yQrOANAhO!&_Q7[OANAhO#&wQWOANAhO4UQrOANAhO&:QQWOANAhO%[Q^OANAhO&:YQ?NdO7+'xO&<hQ?NdO,5?]O&>pQ?NdO,5?_O&@xQ?NdO7+'zO&CWQrO1G4hO&CbQ07bO7+&^O&EcQ07bO,5=UO&GgQ07bO,5=WO&GwQ07bO,5=UO&HXQ07bO,5=WO&HiQ07bO,59rO&JlQ07bO,5<iO&LlQ07bO,5<kO&N}Q07bO,5<yO'!pQ07bO7+'jO'!}Q07bO7+'kO'#[QWO,5<[OOQO7+'_7+'_O'#aQ7[O<<KzOOQO1G4s1G4sO'#hQWO1G4sO'#sQWO1G4sO'$RQWO7++xO'$RQWO7++xO!&_Q7[O1G4uO'$ZQpO1G4uO'$eQWO7++yOOQ?Mp7+(S7+(SO'$mQWO7+(TO'$xQpO7+(TOOQ?Mp7+(R7+(RO$(PQWO7+(SO'%PQWO7+(TO!&_Q7[O7+(TOCcQWO7+(SO'%UQWO7+(TO'%^Q7[O<<NrOOQ?Mr7+$z7+$zO'%hQpO,5?bOOQO-E<t-E<tO'%rQ?NbO7+(WOOQUAN=gAN=gO9^QWO1G5SOOQO1G5S1G5SO'&SQWO1G5SO'&XQWO7+,RO'&XQWO7+,RO9hQ?MxOANBTO@fQWOANBTOOQUANBTANBTOOQUANApANApOOQUANAqANAqO'&aQWO,5?dOOQO-E<v-E<vO'&lQ07bO1G6dOOQO,5?f,5?fOOQO-E<x-E<xOOQU1G3^1G3^O%+xQ^O,5<}O'&vQWO,5<}OOQU<<Lc<<LcO!&_Q7[O<<LcO&7WQWO<<LcO'&{QWO<<LcO%[Q^O<<LcOOQU<<Le<<LeO9hQ?MxO<<LeO$!}QWO<<LeO9RQWO<<LeO''TQ`O1G5RO''`QWO7+,POOQUAN=]AN=]O9hQ?MxOAN=]OOQU<= n<= nOOQU<= o<= oO''hQWO<= nO''mQWO<= oOOQU<<Lm<<LmO''rQWO<<LmO''wQ^O<<LmOOQU1G3w1G3wO>tQWO7+)hO'(OQWO<<I}O'(ZQ07bO<<I}OOQO<<Hv<<HvOOQ?MrAN?cAN?cOOQOAN?[AN?[O$>`Q?NdOAN?[OOQOAN>{AN>{O%[Q^OAN?[OOQO<<Mu<<MuOOQUG27SG27SO!&_Q7[OG27SO#&wQWOG27SO'(eQrOG27SO4UQrOG27SO'(lQWOG27SO'(tQ07bO<<JeO')RQ07bO1G2^O'*tQ07bO,5?]O',tQ07bO,5?_O'.tQ07bO1G2pO'0tQ07bO1G2rO'2tQ07bO<<KVO'3RQ07bO<<IxOOQO1G1v1G1vO!+hQ7[OANAfOOQO7+*_7+*_O'3`QWO7+*_O'3kQWO<= dO'3sQpO7+*aOOQ?Mp<<Ko<<KoO$(PQWO<<KoOCcQWO<<KoO'3}QWO<<KoOOQ?Mp<<Kn<<KnO'4YQpO<<KoO$(PQWO<<KnO'4aQWO<<KoO!&_Q7[O<<KoOOQO7+*n7+*nO9^QWO7+*nO'4fQWO<= mOOQUG27oG27oO9hQ?MxOG27oO!(oQ^O1G5OO'4nQWO7+,OO&7WQWOANA}OOQUANA}ANA}O!&_Q7[OANA}O'4vQWOANA}OOQUANBPANBPO9hQ?MxOANBPO$!}QWOANBPOOQO'#H['#H[OOQO7+*m7+*mOOQUG22wG22wOOQUANEYANEYOOQUANEZANEZOOQUANBXANBXO'5OQWOANBXOOQU<<MS<<MSO!(oQ^OAN?iOOQOG24vG24vO$>`Q?NdOG24vO#&wQWOLD,nOOQULD,nLD,nO!&_Q7[OLD,nO'5TQrOLD,nO'5[Q07bO7+'xO'6}Q07bO,5?]O'8}Q07bO,5?_O':}Q07bO7+'zO'<pQ7[OG27QOOQO<<My<<MyOOQ?MpANAZANAZO$(PQWOANAZOCcQWOANAZO'=QQWOANAZOOQ?MpANAYANAYO'=]QpOANAZOOQO<<NY<<NYOOQULD-ZLD-ZO'=dQ07bO7+*jOOQUG27iG27iO&7WQWOG27iO!&_Q7[OG27iOOQUG27kG27kO9hQ?MxOG27kOOQUG27sG27sO'=nQ07bOG25TOOQOLD*bLD*bOOQU!$(!Y!$(!YO#&wQWO!$(!YO!&_Q7[O!$(!YO'=xQ?NdOG27QOOQ?MpG26uG26uO$(PQWOG26uOCcQWOG26uO'@WQWOG26uOOQULD-TLD-TO&7WQWOLD-TOOQULD-VLD-VOOQU!)9Et!)9EtO#&wQWO!)9EtOOQ?MpLD,aLD,aO$(PQWOLD,aOCcQWOLD,aOOQU!$(!o!$(!oOOQU!.K;`!.K;`O'@cQ07bOG27QOOQ?Mp!$( {!$( {O$(PQWO!$( {OOQ?Mp!)9Eg!)9EgO!(oQ^O'#DwO1PQWO'#EUO'BUQrO'#JmO'B]QMnO'#DsO'BdQ^O'#D{O'BkQrO'#CiO'ERQrO'#CiO!(oQ^O'#D}O'EcQ^O,5;WO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O,5;bO!(oQ^O'#IlO'GfQWO,5<gO!(oQ^O,5;bO'GnQ7[O,5;bO'IXQ7[O,5;bO!(oQ^O,5;vO!&_Q7[O'#GjO'GnQ7[O'#GjO!&_Q7[O'#GlO'GnQ7[O'#GlO1SQWO'#DWO1SQWO'#DWO!&_Q7[O'#F}O'GnQ7[O'#F}O!&_Q7[O'#GPO'GnQ7[O'#GPO!&_Q7[O'#G_O'GnQ7[O'#G_O!(oQ^O,5:gO'I`Q`O'#D[O!(oQ^O,5@jO'EcQ^O1G0rO'IjQ07bO'#CiO!(oQ^O1G2OO!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO'ItQpO'#CrO!&_Q7[O,5<rO'GnQ7[O,5<rO'EcQ^O1G2PO!(oQ^O7+&yO!&_Q7[O1G2^O'GnQ7[O1G2^O!&_Q7[O'#IqO'GnQ7[O'#IqO!&_Q7[O'#IsO'GnQ7[O'#IsO!&_Q7[O1G2`O'GnQ7[O1G2`O'EcQ^O7+'kO'EcQ^O7+&^O!&_Q7[OANAfO'GnQ7[OANAfO'JXQWO'#ElO'J^QWO'#ElO'JfQWO'#F[O'JkQWO'#EvO'JpQWO'#KOO'J{QWO'#J|O'KWQWO,5;WO'K]Q7[O,5<dO'KdQWO'#GWO'KiQWO'#GWO'KnQWO,5<eO'KvQWO,5;WO'LOQ07bO1G1_O'LVQWO,5<rO'L[QWO,5<rO'LaQWO,5<tO'LfQWO,5<tO'LkQWO1G2PO'LpQWO1G0rO'LuQ7[O<<KzO'L|Q7[O<<KzO7eQ7[O'#FzO9RQWO'#FyOAaQWO'#EkO!(oQ^O,5;sO!3SQWO'#GWO!3SQWO'#GWO!3SQWO'#GYO!3SQWO'#GYO!+hQ7[O7+(`O!+hQ7[O7+(`O%+SQpO1G2tO%+SQpO1G2tO!&_Q7[O,5=YO!&_Q7[O,5=Y",
  stateData: "'NQ~O'wOS'xOSTOS'yRQ~OPYOQYOSfOY!VOaqOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!rwO!uxO!y]O#t!PO$V|O%e}O%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO&S!WO&Y!XO&[!YO&^!ZO&`![O&c!]O&i!^O&o!_O&q!`O&s!aO&u!bO&w!cO(OSO(QTO(TUO([VO(j[O(yiO~OWtO~P`OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa!wOp!nO!P!oO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!xO#T!pO#U!pO#X!zO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O'y!{O~OP]XR]X[]Xa]Xo]X}]X!P]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X'u]X([]X(m]X(t]X(u]X~O!d%PX~P(qO_!}O(Q#PO(R!}O(S#PO~O_#QO(S#PO(T#PO(U#QO~Ou#SO!R#TO(]#TO(^#VO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O;UO(QTO(TUO([VO(j[O(yiO~O!X#ZO!Y#WO!V(cP!V(qP~P+}O!Z#cO~P`OPYOQYOSfOd!jOe!iOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(QTO(TUO([VO(j[O(yiO~Om#mO!X#iO!y]O#f#lO#g#iO(O;VO!h(nP~P.iO!i#oO(O#nO~O!u#sO!y]O%e#tO~O#h#uO~O!d#vO#h#uO~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y$_O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa(aX'u(aX's(aX!h(aX!V(aX![(aX%f(aX!d(aX~P1qO#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX![(bX%f(bX~Oa(bX'u(bX's(bX!V(bX!h(bXs(bX!d(bX~P4UO#]$eO~O$[$hO$^$gO$e$mO~OSfO![$nO$h$oO$j$qO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O$sO(QTO(TUO([$uO(t$}O(u%POg(XP~O!i%cO~O!P%fO![%gO(O%eO~O!d%kO~Oa%lO'u%lO~O}%pO~P%[O(P!lO~P%[O%k%tO~P%[Oh%VO!i%cO(O%eO(P!lO~Oe%{O!i%cO(O%eO~O#s$RO~O}&QO![%}O!i&PO%g&TO(O%eO(P!lO(QTO(TUO`)SP~O!u#sO~O%p&VO!P)OX![)OX(O)OX~O(O&WO~O!r&]O#t!PO%g!QO%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO~Od&bOe&aO!u&_O%e&`O%x&^O~P;|Od&eOeyO![&dO!r&]O!uxO!y]O#t!PO%e}O%i!OO%j!OO%k!OO%n!RO%p!SO%s!TO%t!TO%v!UO~Ob&hO#]&kO%g&fO(P!lO~P=RO!i&lO!r&pO~O!i#oO~O![XO~Oa%lO't&xO'u%lO~Oa%lO't&{O'u%lO~Oa%lO't&}O'u%lO~O's]X!V]Xs]X!h]X&W]X![]X%f]X!d]X~P(qO!_'[O!`'TO!a'TO(P!lO(QTO(TUO~Op'RO!P'QO!X'UO(`'PO!Z(dP!Z(sP~P@YOk'_O![']O(O%eO~Oe'dO!i%cO(O%eO~O}&QO!i&PO~Op!nO!P!oO!y;QO#Q!pO#R!pO#T!pO#U!pO(P!lO(QTO(TUO(`!mO(j!sO~O!_'jO!`'iO!a'iO#S!pO#X'kO#Y'kO~PAtOa%lOh%VO!d#vO!i%cO'u%lO(m'mO~O!m'qO#]'oO~PCSOp!nO!P!oO(QTO(TUO(`!mO(j!sO~O![XOp(hX!P(hX!_(hX!`(hX!a(hX!y(hX#Q(hX#R(hX#S(hX#T(hX#U(hX#X(hX#Y(hX(P(hX(Q(hX(T(hX(`(hX(j(hX~O!`'iO!a'iO(P!lO~PCrO'z'uO'{'uO'|'wO~O_!}O(Q'yO(R!}O(S'yO~O_#QO(S'yO(T'yO(U#QO~Ou#SO!R#TO(]#TO(^'}O~O!X(PO!V'SX!V'YX!Y'SX!Y'YX~P+}O!Y(RO!V(cX~OP$[OR#zO[$cOo$aO}#yO!P#{O!Y(RO!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~O!V(cX~PGfO!V(WO~O!V(pX!Y(pX!d(pX!h(pX(m(pX~O#](pX#h#aX!Z(pX~PIiO#](XO!V(rX!Y(rX~O!Y(YO!V(qX~O!V(]O~O#]$eO~PIiO!Z(^O~P`OR#zO}#yO!P#{O!i#xO([VOP!ka[!kao!ka!Y!ka!m!ka#O!ka#k!ka#l!ka#m!ka#n!ka#o!ka#p!ka#q!ka#r!ka#s!ka#u!ka#w!ka#y!ka#z!ka(m!ka(t!ka(u!ka~Oa!ka'u!ka's!ka!V!ka!h!kas!ka![!ka%f!ka!d!ka~PKPO!h(_O~O!d#vO#](`O(m'mO!Y(oXa(oX'u(oX~O!h(oX~PMlO!P%fO![%gO!y]O#f(eO#g(dO(O%eO~O!Y(fO!h(nX~O!h(hO~O!P%fO![%gO#g(dO(O%eO~OP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#s(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O!d#vO!h(bX~P! YOR(jO}(iO!i#xO#P$dO!y!xa!P!xa~O!u!xa%e!xa![!xa#f!xa#g!xa(O!xa~P!#ZO!u(nO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![XO!fuO!iZO!lYO!mYO!nYO!pvO!r!gO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#h(tO~O!X(vO!h(fP~P%[O(`(xO(j[O~O!P(zO!i#xO(`(xO(j[O~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y$_Oa$oa'u$oa's$oa!h$oa!V$oa![$oa%f$oa!d$oa~O#t)`O~P!&_Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{%[O!P${O![$|O!f%aO!i$xO#g%bO$V%_O$r%]O$t%^O$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~Og(kP~P!+hO})eO!d)dO![$]X$Y$]X$[$]X$^$]X$e$]X~O!d)dO![(vX$Y(vX$[(vX$^(vX$e(vX~O})eO~P!-qO})eO![(vX$Y(vX$[(vX$^(vX$e(vX~O![)gO$Y)kO$[)fO$^)fO$e)lO~O!X)oO~P!(oO$[$hO$^$gO$e)sO~Ok$xX}$xX!P$xX#P$xX(t$xX(u$xX~OgjXg$xXkjX!YjX#]jX~P!/gOu)uO(])vO(^)xO~Ok*RO})zO!P){O(t$}O(u%PO~Og)yO~P!0kOg*SO~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P*UO![*VO!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~O!X*YO(O*TO!h(zP~P!1YO#h*[O~O!i*]O~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(O*_O(QTO(TUO([$uO(t$}O(u%PO~O!X*bO!V({P~P!3XOo*nO!P*fO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO(`!mO~O!Z*kO~P!4|O#P$dOk(ZX}(ZX!P(ZX(t(ZX(u(ZX!Y(ZX#](ZX~Og(ZX#}(ZX~P!5uOk*sO#]*rOg(YX!Y(YX~O!Y*tOg(XX~O(O&WOg(XP~Op*wO~O!i*|O~O(O(rO~Om+QO!P%fO!X#iO![%gO!y]O#f#lO#g#iO(O%eO!h(nP~O!d#vO#h+RO~O!P%fO!X+TO!Y(YO![%gO(O%eO!V(qP~Op'XO!P+VO!X+UO(QTO(TUO(`(xO~O!Z(sP~P!8uO!Y+WOa)PX'u)PX~OP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO#y$WO#z$XO([VO(m$YO(t#|O(u#}O~Oa!ga!Y!ga'u!ga's!ga!V!ga!h!gas!ga![!ga%f!ga!d!ga~P!9mOR#zO}#yO!P#{O!i#xO([VOP!oa[!oao!oa!Y!oa!m!oa#O!oa#k!oa#l!oa#m!oa#n!oa#o!oa#p!oa#q!oa#r!oa#s!oa#u!oa#w!oa#y!oa#z!oa(m!oa(t!oa(u!oa~Oa!oa'u!oa's!oa!V!oa!h!oas!oa![!oa%f!oa!d!oa~P!<TOR#zO}#yO!P#{O!i#xO([VOP!qa[!qao!qa!Y!qa!m!qa#O!qa#k!qa#l!qa#m!qa#n!qa#o!qa#p!qa#q!qa#r!qa#s!qa#u!qa#w!qa#y!qa#z!qa(m!qa(t!qa(u!qa~Oa!qa'u!qa's!qa!V!qa!h!qas!qa![!qa%f!qa!d!qa~P!>kOh%VOk+aO![']O%f+`O~O!d+cOa(WX![(WX'u(WX!Y(WX~Oa%lO![XO'u%lO~Oh%VO!i%cO~Oh%VO!i%cO(O%eO~O!d#vO#h(tO~Ob+nO%g+oO(O+kO(QTO(TUO!Z)TP~O!Y+pO`)SX~O[+tO~O`+uO~O![%}O(O%eO(P!lO`)SP~Oh%VO#]+zO~Oh%VOk+}O![$|O~O![,PO~O},RO![XO~O%k%tO~O!u,WO~Oe,]O~Ob,^O(O#nO(QTO(TUO!Z)RP~Oe%{O~O%g!QO(O&WO~P=RO[,cO`,bO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(QTO(TUO([VO(j[O(yiO~O![!eO!r!gO$V!kO(O!dO~P!EkO`,bOa%lO'u%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(O!dO(QTO(TUO([VO(j[O(yiO~Oa,hO!rwO#t!OO%i!OO%j!OO%k!OO~P!HTO!i&lO~O&Y,nO~O![,pO~O&k,rO&m,sOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(O&ha(Q&ha(T&ha([&ha(j&ha(y&ha!Z&ha&a&hab&ha&f&ha~O(O,xO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# ZO!d,}O#],|Oh(eX!Y#eX!Y(eX!Z#eX!Z(eX!d(eX!i(eX~Oh%VO!d-PO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(QTO(TUO(`!mO~OP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![!eO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(QTO(TUO([VO(j[O(y<xO~O(O;zO~P##_O!Y-TO!Z(dX~O!Z-VO~O!d,}O#],|O!Y#eX!Z#eX~O!Y-WO!Z(sX~O!Z-YO~O!`-ZO!a-ZO(P!lO~P#!|O!Z-^O~P'_Ok-aO![']O~O!V-fO~Op!xa!_!xa!`!xa!a!xa#Q!xa#R!xa#S!xa#T!xa#U!xa#X!xa#Y!xa(P!xa(Q!xa(T!xa(`!xa(j!xa~P!#ZO!m-kO#]-iO~PCSO!`-mO!a-mO(P!lO~PCrOa%lO#]-iO'u%lO~Oa%lO!d#vO#]-iO'u%lO~Oa%lO!d#vO!m-kO#]-iO'u%lO(m'mO~O'z'uO'{'uO'|-rO~Os-sO~O!V'Sa!Y'Sa~P!9mO!X-wO!V'SX!Y'SX~P%[O!Y(RO!V(ca~O!V(ca~PGfO!Y(YO!V(qa~O!P%fO!X-{O![%gO(O%eO!V'YX!Y'YX~O#]-}O!Y(oa!h(oaa(oa'u(oa~O!d#vO~P#+eO!Y(fO!h(na~O!P%fO![%gO#g.RO(O%eO~Om.WO!P%fO!X.TO![%gO!y]O#f.VO#g.TO(O%eO!Y']X!h']X~OR.[O!i#xO~Oh%VOk._O![']O%f.^O~Oa#`i!Y#`i'u#`i's#`i!V#`i!h#`is#`i![#`i%f#`i!d#`i~P!9mOk=UO})zO!P){O(t$}O(u%PO~O#h#[aa#[a#]#[a'u#[a!Y#[a!h#[a![#[a!V#[a~P#.aO#h(ZXP(ZXR(ZX[(ZXa(ZXo(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX'u(ZX([(ZX(m(ZX!h(ZX!V(ZX's(ZXs(ZX![(ZX%f(ZX!d(ZX~P!5uO!Y.lO!h(fX~P!9mO!h.oO~O!V.qO~OP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jia#jio#ji!Y#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#k#ji~P#1|O#k$OO~P#1|OP$[OR#zOo$aO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO[#jia#ji!Y#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#o#ji~P#4kO#o$QO~P#4kOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO([VOa#ji!Y#ji#w#ji#y#ji#z#ji'u#ji(m#ji(t#ji(u#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#u#ji~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO([VO(u#}Oa#ji!Y#ji#y#ji#z#ji'u#ji(m#ji(t#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#w$UO~P#9pO#w#ji~P#9pO#u$SO~P#7YOP$[OR#zO[$cOo$aO}#yO!P#{O!i#xO!m$[O#O$RO#k$OO#l$PO#m$PO#n$PO#o$QO#p$RO#q$RO#r$bO#s$RO#u$SO#w$UO([VO(t#|O(u#}Oa#ji!Y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~O#y#ji~P#<fO#y$WO~P#<fOP]XR]X[]Xo]X}]X!P]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X!Y]X!Z]X~O#}]X~P#?TOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O#y;bO#z;cO([VO(m$YO(t#|O(u#}O~O#}.sO~P#AbO#P$dO#];iO$P;iO#}(bX!Z(bX~P! YOa'`a!Y'`a'u'`a's'`a!h'`a!V'`as'`a!['`a%f'`a!d'`a~P!9mO[#jia#jio#ji!Y#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji'u#ji(m#ji's#ji!V#ji!h#jis#ji![#ji%f#ji!d#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k$OO#l$PO#m$PO#n$PO([VO(t#ji(u#ji~P#DdOk=UO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P#DdO!Y.wOg(kX~P!0kOg.yO~Oa$Oi!Y$Oi'u$Oi's$Oi!V$Oi!h$Ois$Oi![$Oi%f$Oi!d$Oi~P!9mO$[.zO$^.zO~O$[.{O$^.{O~O!d)dO#].|O![$bX$Y$bX$[$bX$^$bX$e$bX~O!X.}O~O![)gO$Y/PO$[)fO$^)fO$e/QO~O!Y;dO!Z(aX~P#AbO!Z/RO~O!d)dO$e(vX~O$e/TO~Ou)uO(])vO(^/WO~O!V/[O~P!&_O(t$}Ok%^a}%^a!P%^a(u%^a!Y%^a#]%^a~Og%^a#}%^a~P#K^O(u%POk%`a}%`a!P%`a(t%`a!Y%`a#]%`a~Og%`a#}%`a~P#LPO!YfX!dfX!hfX!h$xX(mfX~P!/gO!X/eO!Y(YO(O/dO!V(qP!V({P~P!1YOo*nO!_*lO!`*eO!a*eO!i*]O#X*mO%]*hO(P!lO~Op'XO!P/fO!X+UO!Z*kO(QTO(TUO(`;wO!Z(sP~P#MjO!h/gO~P#.aO!Y/hO!d#vO(m'mO!h(zX~O!h/mO~O!P%fO!X*YO![%gO(O%eO!h(zP~O#h/oO~O!V$xX!Y$xX!d%PX~P!/gO!Y/pO!V({X~P#.aO!d/rO~O!V/tO~Oh%VOo/xO!d#vO!i%cO(m'mO~O(O/zO~O!d+cO~Oa%lO!Y0OO'u%lO~O!Z0QO~P!4|O!`0RO!a0RO(P!lO(`!mO~O!P0TO(`!mO~O#X0UO~Og%^a!Y%^a#]%^a#}%^a~P!0kOg%`a!Y%`a#]%`a#}%`a~P!0kO(O&WOg'iX!Y'iX~O!Y*tOg(Xa~Og0_O~OR0`O}0`O!P0aO#P$dOkza(tza(uza!Yza#]za~Ogza#}za~P$%]O})zO!P){Ok$qa(t$qa(u$qa!Y$qa#]$qa~Og$qa#}$qa~P$&UO})zO!P){Ok$sa(t$sa(u$sa!Y$sa#]$sa~Og$sa#}$sa~P$&wO#h0dO~Og%Ra!Y%Ra#]%Ra#}%Ra~P!0kO!d#vO~O#h0gO~O!Y+WOa)Pa'u)Pa~OR#zO}#yO!P#{O!i#xO([VOP!oi[!oio!oi!Y!oi!m!oi#O!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#q!oi#r!oi#s!oi#u!oi#w!oi#y!oi#z!oi(m!oi(t!oi(u!oi~Oa!oi'u!oi's!oi!V!oi!h!ois!oi![!oi%f!oi!d!oi~P$(fOh%VOo%XOp$tOq$tOw%YOy%ZO{;nO!P${O![$|O!f=OO!i$xO#g;tO$V%_O$r;pO$t;rO$w%`O(QTO(TUO([$uO(t$}O(u%PO~Om0pO(O0oO~P$*|O!d+cOa(Wa![(Wa'u(Wa!Y(Wa~O#h0vO~O[]X!YfX!ZfX~O!Y0wO!Z)TX~O!Z0yO~O[0zO~Ob0|O(O+kO(QTO(TUO~O![%}O(O%eO`'qX!Y'qX~O!Y+pO`)Sa~O!h1PO~P!9mO[1SO~O`1TO~O#]1WO~Ok1ZO![$|O~O(`(xO!Z)QP~Oh%VOk1dO![1aO%f1cO~O[1nO!Y1lO!Z)RX~O!Z1oO~O`1qOa%lO'u%lO~O(O#nO(QTO(TUO~O#P$dO#]$eO$P$eOP(bXR(bX[(bXo(bX}(bX!P(bX!Y(bX!i(bX!m(bX#O(bX#k(bX#l(bX#m(bX#n(bX#o(bX#p(bX#q(bX#r(bX#u(bX#w(bX#y(bX#z(bX([(bX(m(bX(t(bX(u(bX~O#s1tO&W1uOa(bX~P$0dO#]$eO#s1tO&W1uO~Oa1wO~P%[Oa1yO~O&a1|OP&_iQ&_iS&_iY&_ia&_id&_ie&_im&_io&_ip&_iq&_iw&_iy&_i{&_i!P&_i!T&_i!U&_i![&_i!f&_i!i&_i!l&_i!m&_i!n&_i!p&_i!r&_i!u&_i!y&_i#t&_i$V&_i%e&_i%g&_i%i&_i%j&_i%k&_i%n&_i%p&_i%s&_i%t&_i%v&_i&S&_i&Y&_i&[&_i&^&_i&`&_i&c&_i&i&_i&o&_i&q&_i&s&_i&u&_i&w&_i's&_i(O&_i(Q&_i(T&_i([&_i(j&_i(y&_i!Z&_ib&_i&f&_i~Ob2SO!Z2QO&f2RO~P`O![XO!i2UO~O&m,sOP&hiQ&hiS&hiY&hia&hid&hie&him&hio&hip&hiq&hiw&hiy&hi{&hi!P&hi!T&hi!U&hi![&hi!f&hi!i&hi!l&hi!m&hi!n&hi!p&hi!r&hi!u&hi!y&hi#t&hi$V&hi%e&hi%g&hi%i&hi%j&hi%k&hi%n&hi%p&hi%s&hi%t&hi%v&hi&S&hi&Y&hi&[&hi&^&hi&`&hi&c&hi&i&hi&o&hi&q&hi&s&hi&u&hi&w&hi's&hi(O&hi(Q&hi(T&hi([&hi(j&hi(y&hi!Z&hi&a&hib&hi&f&hi~O!V2[O~O!Y!^a!Z!^a~P#AbOp!nO!P!oO!X2bO(`!mO!Y'TX!Z'TX~P@YO!Y-TO!Z(da~O!Y'ZX!Z'ZX~P!8uO!Y-WO!Z(sa~O!Z2iO~P'_Oa%lO#]2rO'u%lO~Oa%lO!d#vO#]2rO'u%lO~Oa%lO!d#vO!m2vO#]2rO'u%lO(m'mO~Oa%lO'u%lO~P!9mO!Y$_Os$oa~O!V'Si!Y'Si~P!9mO!Y(RO!V(ci~O!Y(YO!V(qi~O!V(ri!Y(ri~P!9mO!Y(oi!h(oia(oi'u(oi~P!9mO#]2xO!Y(oi!h(oia(oi'u(oi~O!Y(fO!h(ni~O!P%fO![%gO!y]O#f2}O#g2|O(O%eO~O!P%fO![%gO#g2|O(O%eO~Ok3UO![']O%f3TO~Oh%VOk3UO![']O%f3TO~O#h%^aP%^aR%^a[%^aa%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^as%^a![%^a%f%^a!d%^a~P#K^O#h%`aP%`aR%`a[%`aa%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`as%`a![%`a%f%`a!d%`a~P#LPO#h%^aP%^aR%^a[%^aa%^ao%^a!Y%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a'u%^a([%^a(m%^a!h%^a!V%^a's%^a#]%^as%^a![%^a%f%^a!d%^a~P#.aO#h%`aP%`aR%`a[%`aa%`ao%`a!Y%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a'u%`a([%`a(m%`a!h%`a!V%`a's%`a#]%`as%`a![%`a%f%`a!d%`a~P#.aO#hzaPza[zaazaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza'uza([za(mza!hza!Vza'szasza![za%fza!dza~P$%]O#h$qaP$qaR$qa[$qaa$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa'u$qa([$qa(m$qa!h$qa!V$qa's$qas$qa![$qa%f$qa!d$qa~P$&UO#h$saP$saR$sa[$saa$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa'u$sa([$sa(m$sa!h$sa!V$sa's$sas$sa![$sa%f$sa!d$sa~P$&wO#h%RaP%RaR%Ra[%Raa%Rao%Ra!Y%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra'u%Ra([%Ra(m%Ra!h%Ra!V%Ra's%Ra#]%Ras%Ra![%Ra%f%Ra!d%Ra~P#.aOa#`q!Y#`q'u#`q's#`q!V#`q!h#`qs#`q![#`q%f#`q!d#`q~P!9mO!X3^O!Y'UX!h'UX~P%[O!Y.lO!h(fa~O!Y.lO!h(fa~P!9mO!V3aO~O#}!ka!Z!ka~PKPO#}!ga!Y!ga!Z!ga~P#AbO#}!oa!Z!oa~P!<TO#}!qa!Z!qa~P!>kOg'XX!Y'XX~P!+hO!Y.wOg(ka~OSfO![3uO$c3vO~O!Z3zO~Os3{O~P#.aOa$lq!Y$lq'u$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9mO!V3|O~P#.aO})zO!P){O(u%POk'ea(t'ea!Y'ea#]'ea~Og'ea#}'ea~P%)nO})zO!P){Ok'ga(t'ga(u'ga!Y'ga#]'ga~Og'ga#}'ga~P%*aO(m$YO~P#.aO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/gO(O<QO~P!1YOmkO(O4OO~P.iO!P%fO!X4QO![%gO(O%eO!Y'aX!h'aX~O!Y/hO!h(za~O!Y/hO!d#vO!h(za~O!Y/hO!d#vO(m'mO!h(za~Og$zi!Y$zi#]$zi#}$zi~P!0kO!X4YO!V'cX!Y'cX~P!3XO!Y/pO!V({a~O!Y/pO!V({a~P#.aO!d#vO#s4bO~Oo4eO!d#vO(m'mO~O!P4hO(`!mO~O(t$}Ok%^i}%^i!P%^i(u%^i!Y%^i#]%^i~Og%^i#}%^i~P%.wO(u%POk%`i}%`i!P%`i(t%`i!Y%`i#]%`i~Og%`i#}%`i~P%/jOg(Yi!Y(Yi~P!0kO#]4mOg(Yi!Y(Yi~P!0kO!h4pO~Oa$mq!Y$mq'u$mq's$mq!V$mq!h$mqs$mq![$mq%f$mq!d$mq~P!9mO!V4tO~O!Y4uO![(|X~P#.aOa$xX![$xX%Z]X'u$xX!Y$xX~P!/gO%Z4xOalXklX}lX!PlX![lX'ulX(tlX(ulX!YlX~O%Z4xO~Ob5OO%g5PO(O+kO(QTO(TUO!Y'pX!Z'pX~O!Y0wO!Z)Ta~O[5TO~O`5UO~Oa%lO'u%lO~P#.aO![$|O~P#.aO!Y5^O#]5`O!Z)QX~O!Z5aO~Oo5hOp!nO!P5bO!_!yO!`!vO!a!vO!y;QO#Q!pO#R!pO#S!pO#T!pO#U!pO#X5gO#Y!zO(P!lO(QTO(TUO(`!mO(j!sO~O!Z5fO~P%4tOk5mO![1aO%f5lO~Oh%VOk5mO![1aO%f5lO~Ob5tO(O#nO(QTO(TUO!Y'oX!Z'oX~O!Y1lO!Z)Ra~O(QTO(TUO(`5vO~O`5zO~O#s5}O&W6OO~PMlO!h6PO~P%[Oa6RO~Oa6RO~P%[Ob2SO!Z6WO&f2RO~P`O!d6YO~O!d6[Oh(ei!Y(ei!Z(ei!d(ei!i(ei~O!Y#ei!Z#ei~P#AbO#]6]O!Y#ei!Z#ei~O!Y!^i!Z!^i~P#AbOa%lO#]6fO'u%lO~Oa%lO!d#vO#]6fO'u%lO~O!Y(oq!h(oqa(oq'u(oq~P!9mO!Y(fO!h(nq~O!P%fO![%gO#g6mO(O%eO~O![']O%f6pO~Ok6tO![']O%f6pO~O#h'eaP'eaR'ea['eaa'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea'u'ea(['ea(m'ea!h'ea!V'ea's'eas'ea!['ea%f'ea!d'ea~P%)nO#h'gaP'gaR'ga['gaa'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga'u'ga(['ga(m'ga!h'ga!V'ga's'gas'ga!['ga%f'ga!d'ga~P%*aO#h$ziP$ziR$zi[$zia$zio$zi!Y$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi'u$zi([$zi(m$zi!h$zi!V$zi's$zi#]$zis$zi![$zi%f$zi!d$zi~P#.aO#h%^iP%^iR%^i[%^ia%^io%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i'u%^i([%^i(m%^i!h%^i!V%^i's%^is%^i![%^i%f%^i!d%^i~P%.wO#h%`iP%`iR%`i[%`ia%`io%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i'u%`i([%`i(m%`i!h%`i!V%`i's%`is%`i![%`i%f%`i!d%`i~P%/jO!Y'Ua!h'Ua~P!9mO!Y.lO!h(fi~O#}#`i!Y#`i!Z#`i~P#AbOP$[OR#zO}#yO!P#{O!i#xO!m$[O([VO[#jio#ji#O#ji#l#ji#m#ji#n#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#k#ji~P%G^O#k;YO~P%G^OP$[OR#zOo;fO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO[#ji#O#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#o#ji~P%IfO#o;[O~P%IfOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O([VO#w#ji#y#ji#z#ji#}#ji(m#ji(t#ji(u#ji!Y#ji!Z#ji~O#u#ji~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O([VO(u#}O#y#ji#z#ji#}#ji(m#ji(t#ji!Y#ji!Z#ji~O#w;`O~P%MoO#w#ji~P%MoO#u;^O~P%KnOP$[OR#zO[;hOo;fO}#yO!P#{O!i#xO!m$[O#O;]O#k;YO#l;ZO#m;ZO#n;ZO#o;[O#p;]O#q;]O#r;gO#s;]O#u;^O#w;`O([VO(t#|O(u#}O#z#ji#}#ji(m#ji!Y#ji!Z#ji~O#y#ji~P&!OO#y;bO~P&!OOa#{y!Y#{y'u#{y's#{y!V#{y!h#{ys#{y![#{y%f#{y!d#{y~P!9mO[#jio#ji#O#ji#o#ji#p#ji#q#ji#r#ji#s#ji#u#ji#w#ji#y#ji#z#ji#}#ji(m#ji!Y#ji!Z#ji~OP$[OR#zO}#yO!P#{O!i#xO!m$[O#k;YO#l;ZO#m;ZO#n;ZO([VO(t#ji(u#ji~P&$zOk=VO})zO!P){O(t$}O(u%POP#jiR#ji!i#ji!m#ji#k#ji#l#ji#m#ji#n#ji([#ji~P&$zO#P$dOP(ZXR(ZX[(ZXk(ZXo(ZX}(ZX!P(ZX!i(ZX!m(ZX#O(ZX#k(ZX#l(ZX#m(ZX#n(ZX#o(ZX#p(ZX#q(ZX#r(ZX#s(ZX#u(ZX#w(ZX#y(ZX#z(ZX#}(ZX([(ZX(m(ZX(t(ZX(u(ZX!Y(ZX!Z(ZX~O#}$Oi!Y$Oi!Z$Oi~P#AbO#}!oi!Z!oi~P$(fOg'Xa!Y'Xa~P!0kO!Z7WO~O!Y'`a!Z'`a~P#AbOP]XR]X[]Xo]X}]X!P]X!V]X!Y]X!i]X!m]X#O]X#P]X#]]X#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!d%WX#s%WX~P&+QO!d#vO(m'mO!Y'aa!h'aa~O!Y/hO!h(zi~O!Y/hO!d#vO!h(zi~Og$zq!Y$zq#]$zq#}$zq~P!0kO!V'ca!Y'ca~P#.aO!d7_O~O!Y/pO!V({i~P#.aO!Y/pO!V({i~O!V7cO~O!d#vO#s7hO~Oo7iO!d#vO(m'mO~O})zO!P){O(u%POk'fa(t'fa!Y'fa#]'fa~Og'fa#}'fa~P&/pO})zO!P){Ok'ha(t'ha(u'ha!Y'ha#]'ha~Og'ha#}'ha~P&0cO!V7lO~Og$|q!Y$|q#]$|q#}$|q~P!0kOa$my!Y$my'u$my's$my!V$my!h$mys$my![$my%f$my!d$my~P!9mO!d6[O~O!Y4uO![(|a~O![']OP$SaR$Sa[$Sao$Sa}$Sa!P$Sa!Y$Sa!i$Sa!m$Sa#O$Sa#k$Sa#l$Sa#m$Sa#n$Sa#o$Sa#p$Sa#q$Sa#r$Sa#s$Sa#u$Sa#w$Sa#y$Sa#z$Sa([$Sa(m$Sa(t$Sa(u$Sa~O%f6pO~P&2lOa#`y!Y#`y'u#`y's#`y!V#`y!h#`ys#`y![#`y%f#`y!d#`y~P!9mO[7qO~Ob7sO(O+kO(QTO(TUO~O!Y0wO!Z)Ti~O`7wO~O(`(xO!Y'lX!Z'lX~O!Y5^O!Z)Qa~O!Z8QO~P%4tOp!nO!P8RO(QTO(TUO(`!mO(j!sO~O#X8SO~O![1aO~O![1aO%f8UO~Ok8XO![1aO%f8UO~O[8^O!Y'oa!Z'oa~O!Y1lO!Z)Ri~O!h8bO~O!h8cO~O!h8fO~O!h8fO~P%[Oa8hO~O!d8iO~O!h8jO~O!Y(ri!Z(ri~P#AbOa%lO#]8rO'u%lO~O!Y(oy!h(oya(oy'u(oy~P!9mO!Y(fO!h(ny~O%f8uO~P&2lO![']O%f8uO~O#h$zqP$zqR$zq[$zqa$zqo$zq!Y$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq'u$zq([$zq(m$zq!h$zq!V$zq's$zq#]$zqs$zq![$zq%f$zq!d$zq~P#.aO#h'faP'faR'fa['faa'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa'u'fa(['fa(m'fa!h'fa!V'fa's'fas'fa!['fa%f'fa!d'fa~P&/pO#h'haP'haR'ha['haa'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha'u'ha(['ha(m'ha!h'ha!V'ha's'has'ha!['ha%f'ha!d'ha~P&0cO#h$|qP$|qR$|q[$|qa$|qo$|q!Y$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q'u$|q([$|q(m$|q!h$|q!V$|q's$|q#]$|qs$|q![$|q%f$|q!d$|q~P#.aO!Y'Ui!h'Ui~P!9mO#}#`q!Y#`q!Z#`q~P#AbO(t$}OP%^aR%^a[%^ao%^a!i%^a!m%^a#O%^a#k%^a#l%^a#m%^a#n%^a#o%^a#p%^a#q%^a#r%^a#s%^a#u%^a#w%^a#y%^a#z%^a#}%^a([%^a(m%^a!Y%^a!Z%^a~Ok%^a}%^a!P%^a(u%^a~P&CoO(u%POP%`aR%`a[%`ao%`a!i%`a!m%`a#O%`a#k%`a#l%`a#m%`a#n%`a#o%`a#p%`a#q%`a#r%`a#s%`a#u%`a#w%`a#y%`a#z%`a#}%`a([%`a(m%`a!Y%`a!Z%`a~Ok%`a}%`a!P%`a(t%`a~P&EsOk=VO})zO!P){O(u%PO~P&CoOk=VO})zO!P){O(t$}O~P&EsOR0`O}0`O!P0aO#P$dOPza[zakzaoza!iza!mza#Oza#kza#lza#mza#nza#oza#pza#qza#rza#sza#uza#wza#yza#zza#}za([za(mza(tza(uza!Yza!Zza~O})zO!P){OP$qaR$qa[$qak$qao$qa!i$qa!m$qa#O$qa#k$qa#l$qa#m$qa#n$qa#o$qa#p$qa#q$qa#r$qa#s$qa#u$qa#w$qa#y$qa#z$qa#}$qa([$qa(m$qa(t$qa(u$qa!Y$qa!Z$qa~O})zO!P){OP$saR$sa[$sak$sao$sa!i$sa!m$sa#O$sa#k$sa#l$sa#m$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#u$sa#w$sa#y$sa#z$sa#}$sa([$sa(m$sa(t$sa(u$sa!Y$sa!Z$sa~Ok=VO})zO!P){O(t$}O(u%PO~OP%RaR%Ra[%Rao%Ra!i%Ra!m%Ra#O%Ra#k%Ra#l%Ra#m%Ra#n%Ra#o%Ra#p%Ra#q%Ra#r%Ra#s%Ra#u%Ra#w%Ra#y%Ra#z%Ra#}%Ra([%Ra(m%Ra!Y%Ra!Z%Ra~P&NlO#}$lq!Y$lq!Z$lq~P#AbO#}$mq!Y$mq!Z$mq~P#AbO!Z9SO~O#}9TO~P!0kO!d#vO!Y'ai!h'ai~O!d#vO(m'mO!Y'ai!h'ai~O!Y/hO!h(zq~O!V'ci!Y'ci~P#.aO!Y/pO!V({q~Oo9[O!d#vO(m'mO~O!V9]O~P#.aO!V9]O~O!d#vO#s9bO~Og(Yy!Y(Yy~P!0kO!Y'ja!['ja~P#.aOa%Yq![%Yq'u%Yq!Y%Yq~P#.aO[9dO~O!Y0wO!Z)Tq~O#]9hO!Y'la!Z'la~O!Y5^O!Z)Qi~P#AbO!P4hO~O![1aO%f9lO~O(QTO(TUO(`9qO~O!Y1lO!Z)Rq~O!h9tO~O!h9uO~O!h9vO~O!h9vO~P%[O#]9yO!Y#ey!Z#ey~O!Y#ey!Z#ey~P#AbO%f:OO~P&2lO![']O%f:OO~O#}#{y!Y#{y!Z#{y~P#AbOP$ziR$zi[$zio$zi!i$zi!m$zi#O$zi#k$zi#l$zi#m$zi#n$zi#o$zi#p$zi#q$zi#r$zi#s$zi#u$zi#w$zi#y$zi#z$zi#}$zi([$zi(m$zi!Y$zi!Z$zi~P&NlO})zO!P){O(u%POP'eaR'ea['eak'eao'ea!i'ea!m'ea#O'ea#k'ea#l'ea#m'ea#n'ea#o'ea#p'ea#q'ea#r'ea#s'ea#u'ea#w'ea#y'ea#z'ea#}'ea(['ea(m'ea(t'ea!Y'ea!Z'ea~O})zO!P){OP'gaR'ga['gak'gao'ga!i'ga!m'ga#O'ga#k'ga#l'ga#m'ga#n'ga#o'ga#p'ga#q'ga#r'ga#s'ga#u'ga#w'ga#y'ga#z'ga#}'ga(['ga(m'ga(t'ga(u'ga!Y'ga!Z'ga~O(t$}OP%^iR%^i[%^ik%^io%^i}%^i!P%^i!i%^i!m%^i#O%^i#k%^i#l%^i#m%^i#n%^i#o%^i#p%^i#q%^i#r%^i#s%^i#u%^i#w%^i#y%^i#z%^i#}%^i([%^i(m%^i(u%^i!Y%^i!Z%^i~O(u%POP%`iR%`i[%`ik%`io%`i}%`i!P%`i!i%`i!m%`i#O%`i#k%`i#l%`i#m%`i#n%`i#o%`i#p%`i#q%`i#r%`i#s%`i#u%`i#w%`i#y%`i#z%`i#}%`i([%`i(m%`i(t%`i!Y%`i!Z%`i~O#}$my!Y$my!Z$my~P#AbO#}#`y!Y#`y!Z#`y~P#AbO!d#vO!Y'aq!h'aq~O!Y/hO!h(zy~O!V'cq!Y'cq~P#.aOo:YO!d#vO(m'mO~O!V:ZO~P#.aO!V:ZO~O!Y0wO!Z)Ty~O!Y5^O!Z)Qq~O![1aO%f:cO~O!h:fO~O%f:kO~P&2lOP$zqR$zq[$zqo$zq!i$zq!m$zq#O$zq#k$zq#l$zq#m$zq#n$zq#o$zq#p$zq#q$zq#r$zq#s$zq#u$zq#w$zq#y$zq#z$zq#}$zq([$zq(m$zq!Y$zq!Z$zq~P&NlO})zO!P){O(u%POP'faR'fa['fak'fao'fa!i'fa!m'fa#O'fa#k'fa#l'fa#m'fa#n'fa#o'fa#p'fa#q'fa#r'fa#s'fa#u'fa#w'fa#y'fa#z'fa#}'fa(['fa(m'fa(t'fa!Y'fa!Z'fa~O})zO!P){OP'haR'ha['hak'hao'ha!i'ha!m'ha#O'ha#k'ha#l'ha#m'ha#n'ha#o'ha#p'ha#q'ha#r'ha#s'ha#u'ha#w'ha#y'ha#z'ha#}'ha(['ha(m'ha(t'ha(u'ha!Y'ha!Z'ha~OP$|qR$|q[$|qo$|q!i$|q!m$|q#O$|q#k$|q#l$|q#m$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#u$|q#w$|q#y$|q#z$|q#}$|q([$|q(m$|q!Y$|q!Z$|q~P&NlOg%b!Z!Y%b!Z#]%b!Z#}%b!Z~P!0kOo:oO!d#vO(m'mO~O!V:pO~P#.aO!Y'lq!Z'lq~P#AbO!Y#e!Z!Z#e!Z~P#AbO#h%b!ZP%b!ZR%b!Z[%b!Za%b!Zo%b!Z!Y%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z'u%b!Z([%b!Z(m%b!Z!h%b!Z!V%b!Z's%b!Z#]%b!Zs%b!Z![%b!Z%f%b!Z!d%b!Z~P#.aOo:xO!d#vO(m'mO~OP%b!ZR%b!Z[%b!Zo%b!Z!i%b!Z!m%b!Z#O%b!Z#k%b!Z#l%b!Z#m%b!Z#n%b!Z#o%b!Z#p%b!Z#q%b!Z#r%b!Z#s%b!Z#u%b!Z#w%b!Z#y%b!Z#z%b!Z#}%b!Z([%b!Z(m%b!Z!Y%b!Z!Z%b!Z~P&NlOs(aX~P1qO}%pO~P!(oO(P!lO~P!(oO!VfX!YfX#]fX~P&+QOP]XR]X[]Xo]X}]X!P]X!Y]X!YfX!i]X!m]X#O]X#P]X#]]X#]fX#hfX#k]X#l]X#m]X#n]X#o]X#p]X#q]X#r]X#s]X#u]X#w]X#y]X#z]X$P]X([]X(m]X(t]X(u]X~O!dfX!h]X!hfX(mfX~P'BxOP;POQ;POSfOd<zOe!iOmkOo;POpkOqkOwkOy;PO{;PO!PWO!TkO!UkO![XO!f;SO!iZO!l;PO!m;PO!n;PO!p;TO!r;WO!u!hO$V!kO(O)XO(QTO(TUO([VO(j[O(y<xO~O!Y;dO!Z$oa~Oh%VOm%WOo%XOp$tOq$tOw%YOy%ZO{;oO!P${O![$|O!f=PO!i$xO#g;uO$V%_O$r;qO$t;sO$w%`O(O(rO(QTO(TUO([$uO(t$}O(u%PO~O#t)`O~P'GnOo!bX(m!bX~P# ZO!Z]X!ZfX~P'BxO!VfX!V$xX!YfX!Y$xX#]fX~P!/gO#h;XO~O!d#vO#h;XO~O#];iO~O#s;]O~O#];xO!Y(rX!Z(rX~O#];iO!Y(pX!Z(pX~O#h;yO~Og;{O~P!0kO#h<RO~O#h<SO~O!d#vO#h<TO~O!d#vO#h;yO~O#}<UO~P#AbO#h<VO~O#h<WO~O#h<]O~O#h<^O~O#h<_O~O#h<`O~O#}<aO~P!0kO#}<bO~P!0kO#P#Q#R#T#U#X#f#g#r(y$r$t$w%Z%e%f%g%n%p%s%t%v%x~'yT#l!U'w(P#mp#k#no}'x$['x(O$^(`~",
  goto: "$4Q)XPPPPPP)YPP)]P)nP+O/PPPPP5xPP6`PP<V?mP@QP@QPPP@QPBRP@QP@QP@QPBVPB[PByPGrPPPGvPPPPGvJxPPPKOKzPGvPGvPPNYGvPPPGvPGvP!!aGvP!%v!&{!'UP!'x!'|!'x!+YPPPPPPP!+y!&{PP!,Z!-gP!0jGvGv!0o!3z!8b!8b!<`PPP!<hGvPPPPPPPPPPP!?vP!ATPPGv!BfPGvPGvGvGvGvGvPGv!CxP!GRP!JWP!J[!Jf!Jj!JjP!GOP!Jn!JnP!MsP!MwGvGv!M}##RBV@QP@QP@Q@QP#$_@Q@Q#&j@Q#)Z@Q#+`@Q@Q#,O#.]#.]#.b#.k#.]#.wP#.]P@Q#/a@Q#3S@Q@Q5xPPP#6{PPP#7f#7fP#7fP#7|#7fPP#8SP#7yP#7y#8g#7y#9R#9X5u)]#9[)]P#9c#9c#9cP)]P)]P)]P)]PP)]P#9i#9lP#9l)]P#9pP#9sP)]P)]P)]P)]P)]P)])]PP#9y#:P#:[#:b#:h#:n#:t#;S#;Y#;d#;j#;t#;z#<[#<b#=S#=f#=l#=r#>Q#>g#@V#@e#@l#BR#Ba#C|#D[#Db#Dh#Dn#Dx#EO#EU#E`#Er#ExPPPPPPPPPP#FOPPPPPPP#Fs#Iz#KZ#Kb#KjPPP$!sP$!|$%t$,^$,a$,d$-P$-S$-Z$-cP$-i$-lP$.Y$.^$/U$0d$0i$1PPP$1U$1[$1`P$1c$1g$1k$2a$2x$3a$3e$3h$3k$3q$3t$3x$3|R!|RoqOXst!Z#d%k&o&q&r&t,k,p1|2PY!vQ']-]1a5eQ%rvQ%zyQ&R|Q&g!VS'T!e-TQ'c!iS'i!r!yU*e$|*V*jQ+i%{Q+v&TQ,[&aQ-Z'[Q-e'dQ-m'jQ0R*lQ1k,]R;v;T%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8rS#q];Q!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U*y%[;n;oQ+n%}Q,^&dQ,e&lQ0m+aQ0q+cQ0|+oQ1s,cQ3Q._Q5O0wQ5t1lQ6r3UQ7s5PR8x6t'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{t!nQ!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5g$|$ti#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ&U|Q'R!eU'X%g*V-WQ+n%}Q,^&dQ0c*|Q0|+oQ1R+uQ1r,bQ1s,cQ5O0wQ5X1TQ5t1lQ5w1nQ5x1qQ7s5PQ7v5UQ8a5zQ9g7wR9r8^rnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR,`&h&x^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<z<{[#]WZ#W#Z'U(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ%uxQ%yyS&O|&TQ&[!TQ'`!hQ'b!iQ(m#sS+h%z%{Q+l%}Q,V&_Q,Z&aS-d'c'dQ.a(nQ0u+iQ0{+oQ0}+pQ1Q+tQ1f,WS1j,[,]Q2n-eQ4}0wQ5R0zQ5W1SQ5s1kQ7r5PQ7u5TQ9c7qR:^9d!O$zi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R!S%wy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dQ+b%uQ+{&XQ,O&YQ,Y&aQ.`(mQ1e,VU1i,Z,[,]Q3V.aQ5n1fS5r1j1kQ8]5s#^<|#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo<};g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bW%Ti%V*t<xS&X!Q&fQ&Y!RQ&Z!SR+y&V$}%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VT)v$u)wV*y%[;n;oW'X!e%g*V-WS(y#y#zQ+]%pQ+s&QS.Y(i(jQ1[,PQ4n0`R7{5^'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{$i$^c#Y#e%o%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.t.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oT#TV#U'PkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q'V!eR2c-Tv!nQ!e!r!v!y!z'T'[']'i'j'k-T-Z-]-m1a5e5gU*d$|*V*jS/y*e*lQ0S*mQ1^,RQ4d0RR4g0UnqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&v!^Q's!xS(o#u;XQ+f%xQ,T&[Q,U&^Q-b'aQ-o'lS.j(t;yS0f+R<TQ0s+gQ1`,SQ2T,rQ2V,sQ2_-OQ2l-cQ2o-gS4s0g<_Q4y0tS4|0v<`Q6^2aQ6b2mQ6g2tQ7p4zQ8m6`Q8n6cQ8q6hR9x8j$d$]c#Y#e%q%s(O(U(p(u(})O)P)Q)R)S)T)U)V)W)Y)[)^)c)m+^+r-R-p-u-z-|.k.n.r.u.v/X0e2]2`2p2w3]3b3c3d3e3f3g3h3i3j3k3l3m3n3q3r3y4r4{6_6e6j6y6z7T7U7}8l8p8z9Q9R9{:`:g;R<oS(k#p'fQ({#zS+[%o.tS.Z(j(lR3O.['OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S#q];QQ&q!XQ&r!YQ&t![Q&u!]R1{,nQ'^!hQ+_%uQ-`'`S.](m+bQ2j-_W3S.`.a0l0nQ6a2kW6n3P3R3V4wU8t6o6q6sU9}8v8w8yS:i9|:PQ:t:jR:z:uU!wQ']-]T5c1a5e!Q_OXZ`st!V!Z#d#h%c%k&f&h&o&q&r&t(f,k,p.S1|2P]!pQ!r']-]1a5eT#q];Q%[{OPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS(y#y#zS.Y(i(j!s<f$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{U$fd)Z,eS(l#p'fU*q%R(s3pU0b*x.f7PQ4w0mQ6o3QQ8w6rR:P8xm!tQ!r!v!y!z']'i'j'k-]-m1a5e5gQ'q!uS(b#g1vS-k'h'tQ/k*XQ/w*dQ2v-nQ4U/lS4_/x0SQ7Z4PS7f4e4gQ9V7[Q9Z7cQ9`7iS:X9[9]S:n:Y:ZS:w:o:pR:}:xQ#wbQ'p!uS(a#g1vS(c#m+QQ+S%dQ+d%vQ+j%|U-j'h'q'tQ.O(bQ/j*XQ/v*dQ/|*gQ0r+eQ1g,XS2s-k-nQ2{.WS4T/k/lS4^/w0SQ4a/{Q4c/}Q5p1hQ6i2vQ7Y4PQ7^4US7b4_4gQ7g4fQ8Z5qS9U7Z7[Q9Y7cQ9^7fQ9a7jQ9o8[Q:V9VS:W9Z9]Q:[9`Q:e9pS:m:X:ZS:v:n:pQ:|:wQ;O:}Q<i<dQ<t<mR<u<nV!wQ']-]%[aOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rS#wz!j!r<c$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<i<z%[bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rQ%dj!S%vy!i!u%y%z%{'S'b'c'd'h'r*d+h+i-Q-d-e-l/y0u2g2n2u4dS%|z!jQ+e%wQ,X&aW1h,Y,Z,[,]U5q1i1j1kS8[5r5sQ9p8]!r<d$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q<m<yR<n<z%OeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8rY#bWZ#W#Z(P!b%hm#h#i#l$x%c%f(Y(d(e(f*U*Y*]+T+U+W,g,}-{.R.S.T.V/e/h2U2|2}4Q6[6mQ,f&l!p<e$Z$n)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{R<h'UU'Y!e%g*VR2e-W%QdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V,h,k,p-a-i-w-}.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3^5b5m5}6O6R6f8R8X8h8r!r)Z$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{Q,e&lQ0m+aQ3Q._Q6r3UR8x6t!b$Tc#Y%o(O(U(p(u)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!P;_)Y)m-R.t2]2`3b3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!f$Vc#Y%o(O(U(p(u)S)T)V)W)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;R!T;a)Y)m-R.t2]2`3b3h3i3k3l3q3y6_6z7T7U7}8l8z9Q9R:`:g<o!^$Zc#Y%o(O(U(p(u)[)c+r-p-u-z-|.k.n/X0e2p2w3]3m4r4{6e6j6y8p9{;RQ3}/cz<{)Y)m-R.t2]2`3b3q3y6_6z7T7U7}8l8z9Q9R:`:g<oQ=Q=SR=R=T'OkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{S$oh$pR3v.|'VgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$kf$qQ$ifS)f$l)jR)r$qT$jf$qT)h$l)j'VhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%k%r&P&h&k&l&o&q&r&t&x'Q'U'_'o(P(R(X(`(t(v(z)o)y+R+V+a,h,k,p,|-P-a-i-w-}._.l.s.|.}/f0a0g0v1d1t1u1w1y1|2P2R2b2r2x3U3^3u5`5b5m5}6O6R6]6f6t8R8X8h8r9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{T$oh$pQ$rhR)q$p%[jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%k%r&P&h&k&l&o&q&r&t&x'Q'_'o(P(R(X(`(t(v(z)y+R+V+a,h,k,p-a-i-w-}._.l.s/f0a0g0v1d1t1u1w1y1|2P2R2r2x3U3^5b5m5}6O6R6f6t8R8X8h8r!s<y$Z$n'U)o,|-P.}2b3u5`6]9h9y;P;S;T;W;X;Y;Z;[;];^;_;`;a;b;c;d;f;i;v;x;y;{<T<U<_<`<{#elOPXZst!Z!`!o#S#d#o#{$n%k&h&k&l&o&q&r&t&x'Q'_(z)o+V+a,h,k,p-a._.}/f0a1d1t1u1w1y1|2P2R3U3u5b5m5}6O6R6t8R8X8h!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=VQ*}%`Q/Y)zo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!O$yi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=RQ*^$zU*g$|*V*jQ+O%aQ/}*h#^<k#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn<l;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bQ<p<|Q<q<}Q<r=OR<s=P!O%Ri$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=R#^(s#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vo3p;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<bnoOXst!Z#d%k&o&q&r&t,k,p1|2PS*a${*UQ,y&{Q,z&}R4X/p$|%Si#v$b$c$d$x${%O%Q%]%^%b)u){)}*P*R*U*[*b*r*s+`+c+z+}.^.w/]/e/o/p/r0V0X0d1W1Z1c3T3}4Y4b4m4u4x5l6p7_7h8U8u9T9b9l:O:c:k;g;h;j;k;l;m;p;q;r;s;t;u;|;}<O<P<R<S<V<W<X<Y<Z<[<]<^<a<b<x=Q=R=U=VQ+|&YQ1Y,OQ5[1XR7z5]V*i$|*V*jU*i$|*V*jT5d1a5eU/{*f/f5bS4f0T8RR7j4hQ+d%vQ/|*gQ0r+eQ1g,XQ5p1hQ8Z5qQ9o8[R:e9p!O%Oi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rr)}$v)a*O*p+P/n0Z0[3s4V4q7X7k:U<j<v<wS0V*o0W#^;j#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;k;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!`;|(q)_*W*`.b.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=T`;}3o6{7O7S8{:Q:T:{S<X.d3ZT<Y6}9O!O%Qi$d%O%Q%]%^%b)}*P*[*r*s.w/o0V0X0d3}4m9T<x=Q=Rv*P$v)a*Q*o+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<wS0X*p0Y#^;l#v$b$c$x${)u){*R*U*b+`+c+z+}.^/]/e/p/r1W1Z1c3T4Y4b4u4x5l6p7_7h8U8u9b9l:O:c:k;j;l;p;r;t;|<O<R<V<X<Z<]<a=U=Vn;m;g;h;k;m;q;s;u;}<P<S<W<Y<[<^<b!d<O(q)_*W*`.c.d.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=Td<P3o6|6}7S8{8|:Q:R:T:{S<Z.e3[T<[7O9PrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ&c!UR,h&lrnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PR&c!UQ,Q&ZR1U+ysnOXst!V!Z#d%k&f&o&q&r&t,k,p1|2PQ1b,VS5k1e1fU8T5i5j5nS9k8V8WS:a9j9mQ:q:bR:y:rQ&j!VR,a&fR5w1nS&O|&TR0}+pQ&o!WR,k&pR,q&uT1},p2PR,u&vQ,t&vR2W,uQ'v!{R-q'vSsOtQ#dXT%ns#dQ#OTR'x#OQ#RUR'z#RQ)w$uR/V)wQ#UVR'|#UQ#XWU(S#X(T-xQ(T#YR-x(UQ-U'VR2d-UQ.m(uS3_.m3`R3`.nQ-]']R2h-]Y!rQ']-]1a5eR'g!rQ.x)aR3t.xU#_W%f*UU(Z#_([-yQ([#`R-y(VQ-X'YR2f-Xt`OXst!V!Z#d%k&f&h&o&q&r&t,k,p1|2PS#hZ%cU#r`#h.SR.S(fQ(g#jQ.P(cW.X(g.P2y6kQ2y.QR6k2zQ)j$lR/O)jQ$phR)p$pQ$`cU)]$`-t;eQ-t;RR;e)mQ/i*XW4R/i4S7]9WU4S/j/k/lS7]4T4UR9W7^$Z)|$v(q)_)a*W*`*o*p*z*{+P.d.e.g.h.i/U/Z/_/a/c/n/s0Z0[0k1V1X3W3X3Y3o3s4V4W4[4i4k4q5Z5]6u6v6w6x6}7O7Q7R7S7X7`7d7k7m7o8{8|8}9X9_:Q:R:S:T:U:]:l:{<j<v<w=S=TQ/q*`U4Z/q4]7aQ4]/sR7a4[S*j$|*VR0P*jr*O$v)a*o*p+P/n0Z0[3s4V4q7X7k:U<j<v<w!`.b(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3Y4W4[5Z5]6u6x7`7d7m7o9X9_:]:l=S=TU/`*O.b6{a6{3o6}7O7S8{:Q:T:{Q0W*oQ3Z.dU4j0W3Z9OR9O6}v*Q$v)a*o*p+P/_/n0Z0[3s4V4i4q7X7k:U<j<v<w!d.c(q)_*W*`.d.e.i/U/Z/c/s0k1V1X3W3Y4W4[5Z5]6u6v6x7`7d7m7o9X9_:]:l=S=TU/b*Q.c6|e6|3o6}7O7S8{8|:Q:R:T:{Q0Y*pQ3[.eU4l0Y3[9PR9P7OQ*u%UR0^*uQ4v0kR7n4vQ+X%iR0j+XQ5_1[S7|5_9iR9i7}Q,S&[R1_,SQ5e1aR8P5eQ1m,^S5u1m8_R8_5wQ0x+lW5Q0x5S7t9eQ5S0{Q7t5RR9e7uQ+q&OR1O+qQ2P,pR6V2PYrOXst#dQ&s!ZQ+Z%kQ,j&oQ,l&qQ,m&rQ,o&tQ1z,kS1},p2PR6U1|Q%mpQ&w!_Q&z!aQ&|!bQ'O!cQ'n!uQ+Y%jQ+f%xQ+x&UQ,`&jQ,w&yW-h'h'p'q'tQ-o'lQ0O*iQ0s+gS1p,a,dQ2X,vQ2Y,yQ2Z,zQ2o-gW2q-j-k-n-pQ4y0tQ5V1RQ5Y1VQ5o1gQ5y1rQ6T1{U6d2p2s2vQ6g2tQ7p4zQ7x5XQ7y5ZQ8O5dQ8Y5pQ8`5xS8o6e6iQ8q6hQ9f7vQ9n8ZQ9s8aQ9z8pQ:_9gQ:d9oQ:h9{R:s:eQ%xyQ'a!iQ'l!uU+g%y%z%{Q-O'SU-c'b'c'dS-g'h'rQ/u*dS0t+h+iQ2a-QS2m-d-eQ2t-lQ4`/yQ4z0uQ6`2gQ6c2nQ6h2uR7e4dS$wi<xR*v%VU%Ui%V<xR0]*tQ$viS(q#v+cS)_$b$cQ)a$dQ*W$xS*`${*UQ*o%OQ*p%QQ*z%]Q*{%^Q+P%bQ.d;jQ.e;lQ.g;pQ.h;rQ.i;tQ/U)uS/Z){/]Q/_)}Q/a*PQ/c*RQ/n*[S/s*b/eQ0Z*rQ0[*sh0k+`.^1c3T5l6p8U8u9l:O:c:kQ1V+zQ1X+}Q3W;|Q3X<OQ3Y<RS3o;g;hQ3s.wQ4V/oQ4W/pQ4[/rQ4i0VQ4k0XQ4q0dQ5Z1WQ5]1ZQ6u<VQ6v<XQ6w<ZQ6x<]Q6};kQ7O;mQ7Q;qQ7R;sQ7S;uQ7X3}Q7`4YQ7d4bQ7k4mQ7m4uQ7o4xQ8{<SQ8|;}Q8}<PQ9X7_Q9_7hQ:Q<WQ:R<YQ:S<[Q:T<^Q:U9TQ:]9bQ:l<aQ:{<bQ<j<xQ<v=QQ<w=RQ=S=UR=T=VQ*x%[Q.f;nR7P;onpOXst!Z#d%k&o&q&r&t,k,p1|2PQ!fPS#fZ#oQ&y!`U'e!o5b8RQ'{#SQ(|#{Q)n$nS,d&h&kQ,i&lQ,v&xQ,{'QQ-_'_Q.p(zQ/S)oS0h+V/fQ0n+aQ1x,hQ2k-aQ3R._Q3x.}Q4o0aQ5j1dQ5{1tQ5|1uQ6Q1wQ6S1yQ6X2RQ6s3UQ7V3uQ8W5mQ8d5}Q8e6OQ8g6RQ8y6tQ9m8XR9w8h#YcOPXZst!Z!`!o#d#o#{%k&h&k&l&o&q&r&t&x'Q'_(z+V+a,h,k,p-a._/f0a1d1t1u1w1y1|2P2R3U5b5m5}6O6R6t8R8X8hQ#YWQ#eYQ%ouQ%qvS%sw!gS(O#W(RQ(U#ZQ(p#uQ(u#xQ(}$OQ)O$PQ)P$QQ)Q$RQ)R$SQ)S$TQ)T$UQ)U$VQ)V$WQ)W$XQ)Y$ZQ)[$_Q)^$aQ)c$eW)m$n)o.}3uQ+^%rQ+r&PS-R'U2bQ-p'oS-u(P-wQ-z(XQ-|(`Q.k(tQ.n(vQ.r;PQ.t;SQ.u;TQ.v;WQ/X)yQ0e+RQ2],|Q2`-PQ2p-iQ2w-}Q3].lQ3b;XQ3c;YQ3d;ZQ3e;[Q3f;]Q3g;^Q3h;_Q3i;`Q3j;aQ3k;bQ3l;cQ3m.sQ3n;fQ3q;iQ3r;vQ3y;dQ4r0gQ4{0vQ6_;xQ6e2rQ6j2xQ6y3^Q6z;yQ7T;{Q7U<TQ7}5`Q8l6]Q8p6fQ8z<UQ9Q<_Q9R<`Q9{8rQ:`9hQ:g9yQ;R#SR<o<{R#[WR'W!el!tQ!r!v!y!z']'i'j'k-]-m1a5e5gS'S!e-TS-Q'T'[R2g-ZR(w#xQ!fQT-[']-]]!qQ!r']-]1a5eQ#p]R'f;QR)b$dY!uQ']-]1a5eQ'h!rS'r!v!yS't!z5gS-l'i'jQ-n'kR2u-mT#kZ%cS#jZ%cS%im,gU(c#h#i#lS.Q(d(eQ.U(fQ0i+WQ2z.RU2{.S.T.VS6l2|2}R8s6md#^W#W#Z%f(P(Y*U+T-{/er#gZm#h#i#l%c(d(e(f+W.R.S.T.V2|2}6mS*X$x*]Q/l*YQ1v,gQ2^,}Q4P/hQ6Z2UQ7[4QQ8k6[T<g'U+UV#aW%f*UU#`W%f*US(Q#W(YU(V#Z+T/eS-S'U+UT-v(P-{V'Z!e%g*VQ$lfR)t$qT)i$l)jR3w.|T*Z$x*]T*c${*UQ0l+`Q3P.^Q5i1cQ6q3TQ8V5lQ8v6pQ9j8UQ9|8uQ:b9lQ:j:OQ:r:cR:u:knqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&i!VR,`&ftmOXst!U!V!Z#d%k&f&o&q&r&t,k,p1|2PR,g&lT%jm,gR1],PR,_&dQ&S|R+w&TR+m%}T&m!W&pT&n!W&pT2O,p2P",
  nodeNames: "⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",
  maxTerm: 376,
  context: eht,
  nodeProps: [
    ["isolate", -8, 5, 6, 14, 34, 36, 48, 50, 52, ""],
    ["group", -26, 9, 17, 19, 65, 204, 208, 212, 213, 215, 218, 221, 231, 233, 239, 241, 243, 245, 248, 254, 260, 262, 264, 266, 268, 270, 271, "Statement", -34, 13, 14, 29, 32, 33, 39, 48, 51, 52, 54, 59, 67, 69, 73, 77, 79, 81, 82, 107, 108, 117, 118, 135, 138, 140, 141, 142, 143, 144, 146, 147, 166, 167, 169, "Expression", -23, 28, 30, 34, 38, 40, 42, 171, 173, 175, 176, 178, 179, 180, 182, 183, 184, 186, 187, 188, 198, 200, 202, 203, "Type", -3, 85, 100, 106, "ClassItem"],
    ["openedBy", 23, "<", 35, "InterpolationStart", 53, "[", 57, "{", 70, "(", 159, "JSXStartCloseTag"],
    ["closedBy", 24, ">", 37, "InterpolationEnd", 47, "]", 58, "}", 71, ")", 164, "JSXEndTag"]
  ],
  propSources: [aht],
  skippedNodes: [0, 5, 6, 274],
  repeatNodeCount: 37,
  tokenData: "$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Rp(U!b'w0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(S#S$h&j'x0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Rp(U!b'x0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(Q':f$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(U!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(U!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Rp(U!bOY%ZYZ&cZq%Zqr<Srs&}st%ZtuCruw%Zwx(rx!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr(r<__WS$h&j(Rp(U!bOY<SYZ&cZr<Srs=^sw<Swx@nx!^<S!^!_Bm!_#O<S#O#P>`#P#o<S#o#pBm#p;'S<S;'S;=`Cl<%lO<S(Q=g]WS$h&j(U!bOY=^YZ&cZw=^wx>`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(U!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(RpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(RpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Rp(U!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l<S%9[C}i$h&j(j%1l(Rp(U!bOY%ZYZ&cZr%Zrs&}st%ZtuCruw%Zwx(rx!Q%Z!Q![Cr![!^%Z!^!_*g!_!c%Z!c!}Cr!}#O%Z#O#P&c#P#R%Z#R#SCr#S#T%Z#T#oCr#o#p*g#p$g%Z$g;'SCr;'S;=`El<%lOCr%9[EoP;=`<%lCr07[FRk$h&j(Rp(U!b$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr+dHRk$h&j(Rp(U!b$[#tOY%ZYZ&cZr%Zrs&}st%ZtuGvuw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Gv![!^%Z!^!_*g!_!c%Z!c!}Gv!}#O%Z#O#P&c#P#R%Z#R#SGv#S#T%Z#T#oGv#o#p*g#p$g%Z$g;'SGv;'S;=`Iv<%lOGv+dIyP;=`<%lGv07[JPP;=`<%lEr(KWJ_`$h&j(Rp(U!b#m(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWKl_$h&j$P(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,#xLva(u+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sv%ZvwM{wx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KWNW`$h&j#y(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At! c_(T';W$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b'l!!i_$h&j(RpOY!!bYZ!#hZr!!brs!#hsw!!bwx!$xx!^!!b!^!_!%z!_#O!!b#O#P!#h#P#o!!b#o#p!%z#p;'S!!b;'S;=`!'c<%lO!!b&z!#mX$h&jOw!#hwx6cx!^!#h!^!_!$Y!_#o!#h#o#p!$Y#p;'S!#h;'S;=`!$r<%lO!#h`!$]TOw!$Ywx7]x;'S!$Y;'S;=`!$l<%lO!$Y`!$oP;=`<%l!$Y&z!$uP;=`<%l!#h'l!%R]$c`$h&j(RpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r!Q!&PZ(RpOY!%zYZ!$YZr!%zrs!$Ysw!%zwx!&rx#O!%z#O#P!$Y#P;'S!%z;'S;=`!']<%lO!%z!Q!&yU$c`(RpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)r!Q!'`P;=`<%l!%z'l!'fP;=`<%l!!b/5|!'t_!i/.^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#&U!)O_!h!Lf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z-!n!*[b$h&j(Rp(U!b(P%&f#n(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rxz%Zz{!+d{!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW!+o`$h&j(Rp(U!b#k(ChOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;x!,|`$h&j(Rp(U!bo+4YOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z,$U!.Z_!Y+Jf$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!/ec$h&j(Rp(U!b}.2^OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!0p!P!Q%Z!Q![!3Y![!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!0ya$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!2O!P!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z#%|!2Z_!X!L^$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!3eg$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!3Y![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S!3Y#S#X%Z#X#Y!4|#Y#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!5Vg$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx{%Z{|!6n|}%Z}!O!6n!O!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!6wc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad!8_c$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![!8S![!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S!8S#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[!9uf$h&j(Rp(U!b#l(ChOY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcxz!;Zz{#-}{!P!;Z!P!Q#/d!Q!^!;Z!^!_#(i!_!`#7S!`!a#8i!a!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z?O!;fb$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z>^!<w`$h&j(U!b!U7`OY!<nYZ&cZw!<nwx!=yx!P!<n!P!Q!Eq!Q!^!<n!^!_!Gr!_!}!<n!}#O!KS#O#P!Dy#P#o!<n#o#p!Gr#p;'S!<n;'S;=`!L]<%lO!<n<z!>Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!?Td$h&j!U7`O!^&c!_#W&c#W#X!>|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c<z!C][$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#O!CW#O#P!DR#P#Q!=y#Q#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DWX$h&jOY!CWYZ&cZ!^!CW!^!_!Ar!_#o!CW#o#p!Ar#p;'S!CW;'S;=`!Ds<%lO!CW<z!DvP;=`<%l!CW<z!EOX$h&jOY!=yYZ&cZ!^!=y!^!_!@c!_#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y<z!EnP;=`<%l!=y>^!Ezl$h&j(U!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(U!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(U!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(U!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(U!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!<n#Q#o!KS#o#p!JU#p;'S!KS;'S;=`!LV<%lO!KS>^!LYP;=`<%l!KS>^!L`P;=`<%l!<n=l!Ll`$h&j(Rp!U7`OY!LcYZ&cZr!Lcrs!=ys!P!Lc!P!Q!Mn!Q!^!Lc!^!_# o!_!}!Lc!}#O#%P#O#P!Dy#P#o!Lc#o#p# o#p;'S!Lc;'S;=`#&Y<%lO!Lc=l!Mwl$h&j(Rp!U7`OY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#W(r#W#X!Mn#X#Z(r#Z#[!Mn#[#](r#]#^!Mn#^#a(r#a#b!Mn#b#g(r#g#h!Mn#h#i(r#i#j!Mn#j#k!Mn#k#m(r#m#n!Mn#n#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(r8Q# vZ(Rp!U7`OY# oZr# ors!@cs!P# o!P!Q#!i!Q!}# o!}#O#$R#O#P!Bq#P;'S# o;'S;=`#$y<%lO# o8Q#!pe(Rp!U7`OY)rZr)rs#O)r#P#W)r#W#X#!i#X#Z)r#Z#[#!i#[#])r#]#^#!i#^#a)r#a#b#!i#b#g)r#g#h#!i#h#i)r#i#j#!i#j#k#!i#k#m)r#m#n#!i#n;'S)r;'S;=`*Z<%lO)r8Q#$WX(RpOY#$RZr#$Rrs!Ars#O#$R#O#P!B[#P#Q# o#Q;'S#$R;'S;=`#$s<%lO#$R8Q#$vP;=`<%l#$R8Q#$|P;=`<%l# o=l#%W^$h&j(RpOY#%PYZ&cZr#%Prs!CWs!^#%P!^!_#$R!_#O#%P#O#P!DR#P#Q!Lc#Q#o#%P#o#p#$R#p;'S#%P;'S;=`#&S<%lO#%P=l#&VP;=`<%l#%P=l#&]P;=`<%l!Lc?O#&kn$h&j(Rp(U!b!U7`OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#W%Z#W#X#&`#X#Z%Z#Z#[#&`#[#]%Z#]#^#&`#^#a%Z#a#b#&`#b#g%Z#g#h#&`#h#i%Z#i#j#&`#j#k#&`#k#m%Z#m#n#&`#n#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z9d#(r](Rp(U!b!U7`OY#(iZr#(irs!Grsw#(iwx# ox!P#(i!P!Q#)k!Q!}#(i!}#O#+`#O#P!Bq#P;'S#(i;'S;=`#,`<%lO#(i9d#)th(Rp(U!b!U7`OY*gZr*grs'}sw*gwx)rx#O*g#P#W*g#W#X#)k#X#Z*g#Z#[#)k#[#]*g#]#^#)k#^#a*g#a#b#)k#b#g*g#g#h#)k#h#i*g#i#j#)k#j#k#)k#k#m*g#m#n#)k#n;'S*g;'S;=`+Z<%lO*g9d#+gZ(Rp(U!bOY#+`Zr#+`rs!JUsw#+`wx#$Rx#O#+`#O#P!B[#P#Q#(i#Q;'S#+`;'S;=`#,Y<%lO#+`9d#,]P;=`<%l#+`9d#,cP;=`<%l#(i?O#,o`$h&j(Rp(U!bOY#,fYZ&cZr#,frs!KSsw#,fwx#%Px!^#,f!^!_#+`!_#O#,f#O#P!DR#P#Q!;Z#Q#o#,f#o#p#+`#p;'S#,f;'S;=`#-q<%lO#,f?O#-tP;=`<%l#,f?O#-zP;=`<%l!;Z07[#.[b$h&j(Rp(U!b'y0/l!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z07[#/o_$h&j(Rp(U!bT0/lOY#/dYZ&cZr#/drs#0nsw#/dwx#4Ox!^#/d!^!_#5}!_#O#/d#O#P#1p#P#o#/d#o#p#5}#p;'S#/d;'S;=`#6|<%lO#/d06j#0w]$h&j(U!bT0/lOY#0nYZ&cZw#0nwx#1px!^#0n!^!_#3R!_#O#0n#O#P#1p#P#o#0n#o#p#3R#p;'S#0n;'S;=`#3x<%lO#0n05W#1wX$h&jT0/lOY#1pYZ&cZ!^#1p!^!_#2d!_#o#1p#o#p#2d#p;'S#1p;'S;=`#2{<%lO#1p0/l#2iST0/lOY#2dZ;'S#2d;'S;=`#2u<%lO#2d0/l#2xP;=`<%l#2d05W#3OP;=`<%l#1p01O#3YW(U!bT0/lOY#3RZw#3Rwx#2dx#O#3R#O#P#2d#P;'S#3R;'S;=`#3r<%lO#3R01O#3uP;=`<%l#3R06j#3{P;=`<%l#0n05x#4X]$h&j(RpT0/lOY#4OYZ&cZr#4Ors#1ps!^#4O!^!_#5Q!_#O#4O#O#P#1p#P#o#4O#o#p#5Q#p;'S#4O;'S;=`#5w<%lO#4O00^#5XW(RpT0/lOY#5QZr#5Qrs#2ds#O#5Q#O#P#2d#P;'S#5Q;'S;=`#5q<%lO#5Q00^#5tP;=`<%l#5Q05x#5zP;=`<%l#4O01p#6WY(Rp(U!bT0/lOY#5}Zr#5}rs#3Rsw#5}wx#5Qx#O#5}#O#P#2d#P;'S#5};'S;=`#6v<%lO#5}01p#6yP;=`<%l#5}07[#7PP;=`<%l#/d)3h#7ab$h&j$P(Ch(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;ZAt#8vb$Y#t$h&j(Rp(U!b!U7`OY!;ZYZ&cZr!;Zrs!<nsw!;Zwx!Lcx!P!;Z!P!Q#&`!Q!^!;Z!^!_#(i!_!}!;Z!}#O#,f#O#P!Dy#P#o!;Z#o#p#(i#p;'S!;Z;'S;=`#-w<%lO!;Z'Ad#:Zp$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#U%Z#U#V#?i#V#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#<jk$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!O%Z!O!P!3Y!P!Q%Z!Q![#<_![!^%Z!^!_*g!_!g%Z!g!h!4|!h#O%Z#O#P&c#P#R%Z#R#S#<_#S#X%Z#X#Y!4|#Y#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Rp(U!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-<U(Rp(U!b(y7`OY*gZr*grs'}sw*gwx)rx!P*g!P!Q#MO!Q!^*g!^!_#Mt!_!`$ f!`#O*g#P;'S*g;'S;=`+Z<%lO*g(n#MXX$j&j(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El#M}Z#o(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx!_*g!_!`#Np!`#O*g#P;'S*g;'S;=`+Z<%lO*g(El#NyX$P(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g(El$ oX#p(Ch(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g*)x$!ga#]*!Y$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`!a$#l!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(K[$#w_#h(Cl$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x$%Vag!*r#p(Ch$e#|$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`$&[!`!a$'f!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$&g_#p(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$'qa#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`!a$(v!a#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$)R`#o(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(Kd$*`a(m(Ct$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!a%Z!a!b$+e!b#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$+p`$h&j#z(Ch(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`$,}_!y$Ip$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f$.X_!P0,v$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(n$/]Z$h&jO!^$0O!^!_$0f!_#i$0O#i#j$0k#j#l$0O#l#m$2^#m#o$0O#o#p$0f#p;'S$0O;'S;=`$4i<%lO$0O(n$0VT_#S$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#S$0kO_#S(n$0p[$h&jO!Q&c!Q![$1f![!^&c!_!c&c!c!i$1f!i#T&c#T#Z$1f#Z#o&c#o#p$3|#p;'S&c;'S;=`&w<%lO&c(n$1kZ$h&jO!Q&c!Q![$2^![!^&c!_!c&c!c!i$2^!i#T&c#T#Z$2^#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$2cZ$h&jO!Q&c!Q![$3U![!^&c!_!c&c!c!i$3U!i#T&c#T#Z$3U#Z#o&c#p;'S&c;'S;=`&w<%lO&c(n$3ZZ$h&jO!Q&c!Q![$0O![!^&c!_!c&c!c!i$0O!i#T&c#T#Z$0O#Z#o&c#p;'S&c;'S;=`&w<%lO&c#S$4PR!Q![$4Y!c!i$4Y#T#Z$4Y#S$4]S!Q![$4Y!c!i$4Y#T#Z$4Y#q#r$0f(n$4lP;=`<%l$0O#1[$4z_!V#)l$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW$6U`#w(Ch$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z+;p$7c_$h&j(Rp(U!b([+4QOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$8qk$h&j(Rp(U!b(O,2j$^#t(`$I[OY%ZYZ&cZr%Zrs&}st%Ztu$8buw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$8b![!^%Z!^!_*g!_!c%Z!c!}$8b!}#O%Z#O#P&c#P#R%Z#R#S$8b#S#T%Z#T#o$8b#o#p*g#p$g%Z$g;'S$8b;'S;=`$<l<%lO$8b+d$:qk$h&j(Rp(U!b$^#tOY%ZYZ&cZr%Zrs&}st%Ztu$:fuw%Zwx(rx}%Z}!O$:f!O!Q%Z!Q![$:f![!^%Z!^!_*g!_!c%Z!c!}$:f!}#O%Z#O#P&c#P#R%Z#R#S$:f#S#T%Z#T#o$:f#o#p*g#p$g%Z$g;'S$:f;'S;=`$<f<%lO$:f+d$<iP;=`<%l$:f07[$<oP;=`<%l$8b#Jf$<{X![#Hb(Rp(U!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g,#x$=sa(t+JY$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Ka!`#O%Z#O#P&c#P#o%Z#o#p*g#p#q$+e#q;'S%Z;'S;=`+a<%lO%Z(Kd$?V_!Z(Cds`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Rp(U!b'w0/l$[#t(O,2j(`$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Rp(U!b'x0/l$[#t(O,2j(`$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",
  tokenizers: [nht, rht, iht, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, tht, new YM("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~", 141, 335), new YM("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~", 25, 318)],
  topRules: { Script: [0, 7], SingleExpression: [1, 272], SingleClassItem: [2, 273] },
  dialects: { jsx: 0, ts: 14725 },
  dynamicPrecedences: { 77: 1, 79: 1, 91: 1, 167: 1, 196: 1 },
  specialized: [{ term: 322, get: (t) => oht[t] || -1 }, { term: 338, get: (t) => sht[t] || -1 }, { term: 92, get: (t) => lht[t] || -1 }],
  tokenPrec: 14749
}), sle = [
  /* @__PURE__ */ ui("function ${name}(${params}) {\n	${}\n}", {
    label: "function",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n	${}\n}", {
    label: "for",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("for (let ${name} of ${collection}) {\n	${}\n}", {
    label: "for",
    detail: "of loop",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("do {\n	${}\n} while (${})", {
    label: "do",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("while (${}) {\n	${}\n}", {
    label: "while",
    detail: "loop",
    type: "keyword"
  }),
  /* @__PURE__ */ ui(`try {
	\${}
} catch (\${error}) {
	\${}
}`, {
    label: "try",
    detail: "/ catch block",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("if (${}) {\n	${}\n}", {
    label: "if",
    detail: "block",
    type: "keyword"
  }),
  /* @__PURE__ */ ui(`if (\${}) {
	\${}
} else {
	\${}
}`, {
    label: "if",
    detail: "/ else block",
    type: "keyword"
  }),
  /* @__PURE__ */ ui(`class \${name} {
	constructor(\${params}) {
		\${}
	}
}`, {
    label: "class",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ ui('import {${names}} from "${module}"\n${}', {
    label: "import",
    detail: "named",
    type: "keyword"
  }),
  /* @__PURE__ */ ui('import ${name} from "${module}"\n${}', {
    label: "import",
    detail: "default",
    type: "keyword"
  })
], cht = /* @__PURE__ */ sle.concat([
  /* @__PURE__ */ ui("interface ${name} {\n	${}\n}", {
    label: "interface",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("type ${name} = ${type}", {
    label: "type",
    detail: "definition",
    type: "keyword"
  }),
  /* @__PURE__ */ ui("enum ${name} {\n	${}\n}", {
    label: "enum",
    detail: "definition",
    type: "keyword"
  })
]), vG = /* @__PURE__ */ new flt(), lle = /* @__PURE__ */ new Set([
  "Script",
  "Block",
  "FunctionExpression",
  "FunctionDeclaration",
  "ArrowFunction",
  "MethodDeclaration",
  "ForStatement"
]);
function Dv(t) {
  return (e, n) => {
    let r = e.node.getChild("VariableDefinition");
    return r && n(r, t), !0;
  };
}
const fht = ["FunctionDeclaration"], dht = {
  FunctionDeclaration: /* @__PURE__ */ Dv("function"),
  ClassDeclaration: /* @__PURE__ */ Dv("class"),
  ClassExpression: () => !0,
  EnumDeclaration: /* @__PURE__ */ Dv("constant"),
  TypeAliasDeclaration: /* @__PURE__ */ Dv("type"),
  NamespaceDeclaration: /* @__PURE__ */ Dv("namespace"),
  VariableDefinition(t, e) {
    t.matchContext(fht) || e(t, "variable");
  },
  TypeDefinition(t, e) {
    e(t, "type");
  },
  __proto__: null
};
function ule(t, e) {
  let n = vG.get(e);
  if (n)
    return n;
  let r = [], i = !0;
  function a(o, s) {
    let l = t.sliceString(o.from, o.to);
    r.push({ label: l, type: s });
  }
  return e.cursor(Zn.IncludeAnonymous).iterate((o) => {
    if (i)
      i = !1;
    else if (o.name) {
      let s = dht[o.name];
      if (s && s(o, a) || lle.has(o.name))
        return !1;
    } else if (o.to - o.from > 8192) {
      for (let s of ule(t, o.node))
        r.push(s);
      return !1;
    }
  }), vG.set(e, r), r;
}
const gG = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, cle = [
  "TemplateString",
  "String",
  "RegExp",
  "LineComment",
  "BlockComment",
  "VariableDefinition",
  "TypeDefinition",
  "Label",
  "PropertyDefinition",
  "PropertyName",
  "PrivatePropertyDefinition",
  "PrivatePropertyName",
  ".",
  "?."
];
function hht(t) {
  let e = nr(t.state).resolveInner(t.pos, -1);
  if (cle.indexOf(e.name) > -1)
    return null;
  let n = e.name == "VariableName" || e.to - e.from < 20 && gG.test(t.state.sliceDoc(e.from, e.to));
  if (!n && !t.explicit)
    return null;
  let r = [];
  for (let i = e; i; i = i.parent)
    lle.has(i.name) && (r = r.concat(ule(t.state.doc, i)));
  return {
    options: r,
    from: n ? e.from : t.pos,
    validFor: gG
  };
}
const of = /* @__PURE__ */ e0.define({
  name: "javascript",
  parser: /* @__PURE__ */ uht.configure({
    props: [
      /* @__PURE__ */ m4.add({
        IfStatement: /* @__PURE__ */ Gg({ except: /^\s*({|else\b)/ }),
        TryStatement: /* @__PURE__ */ Gg({ except: /^\s*({|catch\b|finally\b)/ }),
        LabeledStatement: Mlt,
        SwitchBody: (t) => {
          let e = t.textAfter, n = /^\s*\}/.test(e), r = /^\s*(case|default)\b/.test(e);
          return t.baseIndent + (n ? 0 : r ? 1 : 2) * t.unit;
        },
        Block: /* @__PURE__ */ Elt({ closing: "}" }),
        ArrowFunction: (t) => t.baseIndent + t.unit,
        "TemplateString BlockComment": () => null,
        "Statement Property": /* @__PURE__ */ Gg({ except: /^{/ }),
        JSXElement(t) {
          let e = /^\s*<\//.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        JSXEscape(t) {
          let e = /\s*\}/.test(t.textAfter);
          return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
        },
        "JSXOpenTag JSXSelfClosingTag"(t) {
          return t.column(t.node.from) + t.unit;
        }
      }),
      /* @__PURE__ */ b4.add({
        "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": Voe,
        BlockComment(t) {
          return { from: t.from + 2, to: t.to - 2 };
        }
      })
    ]
  }),
  languageData: {
    closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
    commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
    indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
    wordChars: "$"
  }
}), fle = {
  test: (t) => /^JSX/.test(t.name),
  facet: /* @__PURE__ */ koe({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
}, pht = /* @__PURE__ */ of.configure({ dialect: "ts" }, "typescript"), vht = /* @__PURE__ */ of.configure({
  dialect: "jsx",
  props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
}), ght = /* @__PURE__ */ of.configure({
  dialect: "jsx ts",
  props: [/* @__PURE__ */ v4.add((t) => t.isTop ? [fle] : void 0)]
}, "typescript");
let dle = (t) => ({ label: t, type: "keyword" });
const hle = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(dle), mht = /* @__PURE__ */ hle.concat(/* @__PURE__ */ ["declare", "implements", "private", "protected", "public"].map(dle));
function yht(t = {}) {
  let e = t.jsx ? t.typescript ? ght : vht : t.typescript ? pht : of, n = t.typescript ? cht.concat(mht) : sle.concat(hle);
  return new Noe(e, [
    of.data.of({
      autocomplete: qct(cle, Wse(n))
    }),
    of.data.of({
      autocomplete: hht
    }),
    t.jsx ? Oht : []
  ]);
}
function bht(t) {
  for (; ; ) {
    if (t.name == "JSXOpenTag" || t.name == "JSXSelfClosingTag" || t.name == "JSXFragmentTag")
      return t;
    if (t.name == "JSXEscape" || !t.parent)
      return null;
    t = t.parent;
  }
}
function mG(t, e, n = t.length) {
  for (let r = e == null ? void 0 : e.firstChild; r; r = r.nextSibling)
    if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression")
      return t.sliceString(r.from, Math.min(r.to, n));
  return "";
}
const _ht = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), Oht = /* @__PURE__ */ De.inputHandler.of((t, e, n, r, i) => {
  if ((_ht ? t.composing : t.compositionStarted) || t.state.readOnly || e != n || r != ">" && r != "/" || !of.isActiveAt(t.state, e, -1))
    return !1;
  let a = i(), { state: o } = a, s = o.changeByRange((l) => {
    var u;
    let { head: c } = l, f = nr(o).resolveInner(c - 1, -1), d;
    if (f.name == "JSXStartTag" && (f = f.parent), !(o.doc.sliceString(c - 1, c) != r || f.name == "JSXAttributeValue" && f.to > c)) {
      if (r == ">" && f.name == "JSXFragmentTag")
        return { range: l, changes: { from: c, insert: "</>" } };
      if (r == "/" && f.name == "JSXStartCloseTag") {
        let h = f.parent, p = h.parent;
        if (p && h.from == c - 2 && ((d = mG(o.doc, p.firstChild, c)) || ((u = p.firstChild) === null || u === void 0 ? void 0 : u.name) == "JSXFragmentTag")) {
          let v = `${d}>`;
          return { range: me.cursor(c + v.length, -1), changes: { from: c, insert: v } };
        }
      } else if (r == ">") {
        let h = bht(f);
        if (h && h.name == "JSXOpenTag" && !/^\/?>|^<\//.test(o.doc.sliceString(c, c + 2)) && (d = mG(o.doc, h, c)))
          return { range: l, changes: { from: c, insert: `</${d}>` } };
      }
    }
    return { range: l };
  });
  return s.changes.empty ? !1 : (t.dispatch([
    a,
    o.update(s, { userEvent: "input.complete", scrollIntoView: !0 })
  ]), !0);
}), Sht = p4({
  String: J.string,
  Number: J.number,
  "True False": J.bool,
  PropertyName: J.propertyName,
  Null: J.null,
  ",": J.separator,
  "[ ]": J.squareBracket,
  "{ }": J.brace
}), xht = l0.deserialize({
  version: 14,
  states: "$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",
  stateData: "#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",
  goto: "!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",
  nodeNames: "⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",
  maxTerm: 25,
  nodeProps: [
    ["isolate", -2, 6, 11, ""],
    ["openedBy", 7, "{", 12, "["],
    ["closedBy", 8, "}", 13, "]"]
  ],
  propSources: [Sht],
  skippedNodes: [0],
  repeatNodeCount: 2,
  tokenData: "(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",
  tokenizers: [0],
  topRules: { JsonText: [0, 1] },
  tokenPrec: 0
}), wht = /* @__PURE__ */ e0.define({
  name: "json",
  parser: /* @__PURE__ */ xht.configure({
    props: [
      /* @__PURE__ */ m4.add({
        Object: /* @__PURE__ */ Gg({ except: /^\s*\}/ }),
        Array: /* @__PURE__ */ Gg({ except: /^\s*\]/ })
      }),
      /* @__PURE__ */ b4.add({
        "Object Array": Voe
      })
    ]
  }),
  languageData: {
    closeBrackets: { brackets: ["[", "{", '"'] },
    indentOnInput: /^\s*[\}\]]$/
  }
});
function Cht() {
  return new Noe(wht);
}
var ple = { exports: {} }, Rv = {}, d_ = { exports: {} }, F$ = {}, W$ = {}, yG;
function R4() {
  if (yG) return W$;
  yG = 1;
  function t(r) {
    this.__parent = r, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = [];
  }
  t.prototype.clone_empty = function() {
    var r = new t(this.__parent);
    return r.set_indent(this.__indent_count, this.__alignment_count), r;
  }, t.prototype.item = function(r) {
    return r < 0 ? this.__items[this.__items.length + r] : this.__items[r];
  }, t.prototype.has_match = function(r) {
    for (var i = this.__items.length - 1; i >= 0; i--)
      if (this.__items[i].match(r))
        return !0;
    return !1;
  }, t.prototype.set_indent = function(r, i) {
    this.is_empty() && (this.__indent_count = r || 0, this.__alignment_count = i || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
  }, t.prototype._set_wrap_point = function() {
    this.__parent.wrap_line_length && (this.__wrap_point_index = this.__items.length, this.__wrap_point_character_count = this.__character_count, this.__wrap_point_indent_count = this.__parent.next_line.__indent_count, this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count);
  }, t.prototype._should_wrap = function() {
    return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
  }, t.prototype._allow_wrap = function() {
    if (this._should_wrap()) {
      this.__parent.add_new_line();
      var r = this.__parent.current_line;
      return r.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count), r.__items = this.__items.slice(this.__wrap_point_index), this.__items = this.__items.slice(0, this.__wrap_point_index), r.__character_count += this.__character_count - this.__wrap_point_character_count, this.__character_count = this.__wrap_point_character_count, r.__items[0] === " " && (r.__items.splice(0, 1), r.__character_count -= 1), !0;
    }
    return !1;
  }, t.prototype.is_empty = function() {
    return this.__items.length === 0;
  }, t.prototype.last = function() {
    return this.is_empty() ? null : this.__items[this.__items.length - 1];
  }, t.prototype.push = function(r) {
    this.__items.push(r);
    var i = r.lastIndexOf(`
`);
    i !== -1 ? this.__character_count = r.length - i : this.__character_count += r.length;
  }, t.prototype.pop = function() {
    var r = null;
    return this.is_empty() || (r = this.__items.pop(), this.__character_count -= r.length), r;
  }, t.prototype._remove_indent = function() {
    this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
  }, t.prototype._remove_wrap_indent = function() {
    this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
  }, t.prototype.trim = function() {
    for (; this.last() === " "; )
      this.__items.pop(), this.__character_count -= 1;
  }, t.prototype.toString = function() {
    var r = "";
    return this.is_empty() ? this.__parent.indent_empty_lines && (r = this.__parent.get_indent_string(this.__indent_count)) : (r = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count), r += this.__items.join("")), r;
  };
  function e(r, i) {
    this.__cache = [""], this.__indent_size = r.indent_size, this.__indent_string = r.indent_char, r.indent_with_tabs || (this.__indent_string = new Array(r.indent_size + 1).join(r.indent_char)), i = i || "", r.indent_level > 0 && (i = new Array(r.indent_level + 1).join(this.__indent_string)), this.__base_string = i, this.__base_string_length = i.length;
  }
  e.prototype.get_indent_size = function(r, i) {
    var a = this.__base_string_length;
    return i = i || 0, r < 0 && (a = 0), a += r * this.__indent_size, a += i, a;
  }, e.prototype.get_indent_string = function(r, i) {
    var a = this.__base_string;
    return i = i || 0, r < 0 && (r = 0, a = ""), i += r * this.__indent_size, this.__ensure_cache(i), a += this.__cache[i], a;
  }, e.prototype.__ensure_cache = function(r) {
    for (; r >= this.__cache.length; )
      this.__add_column();
  }, e.prototype.__add_column = function() {
    var r = this.__cache.length, i = 0, a = "";
    this.__indent_size && r >= this.__indent_size && (i = Math.floor(r / this.__indent_size), r -= i * this.__indent_size, a = new Array(i + 1).join(this.__indent_string)), r && (a += new Array(r + 1).join(" ")), this.__cache.push(a);
  };
  function n(r, i) {
    this.__indent_cache = new e(r, i), this.raw = !1, this._end_with_newline = r.end_with_newline, this.indent_size = r.indent_size, this.wrap_line_length = r.wrap_line_length, this.indent_empty_lines = r.indent_empty_lines, this.__lines = [], this.previous_line = null, this.current_line = null, this.next_line = new t(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
  }
  return n.prototype.__add_outputline = function() {
    this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
  }, n.prototype.get_line_number = function() {
    return this.__lines.length;
  }, n.prototype.get_indent_string = function(r, i) {
    return this.__indent_cache.get_indent_string(r, i);
  }, n.prototype.get_indent_size = function(r, i) {
    return this.__indent_cache.get_indent_size(r, i);
  }, n.prototype.is_empty = function() {
    return !this.previous_line && this.current_line.is_empty();
  }, n.prototype.add_new_line = function(r) {
    return this.is_empty() || !r && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
  }, n.prototype.get_code = function(r) {
    this.trim(!0);
    var i = this.current_line.pop();
    i && (i[i.length - 1] === `
` && (i = i.replace(/\n+$/g, "")), this.current_line.push(i)), this._end_with_newline && this.__add_outputline();
    var a = this.__lines.join(`
`);
    return r !== `
` && (a = a.replace(/[\n]/g, r)), a;
  }, n.prototype.set_wrap_point = function() {
    this.current_line._set_wrap_point();
  }, n.prototype.set_indent = function(r, i) {
    return r = r || 0, i = i || 0, this.next_line.set_indent(r, i), this.__lines.length > 1 ? (this.current_line.set_indent(r, i), !0) : (this.current_line.set_indent(), !1);
  }, n.prototype.add_raw_token = function(r) {
    for (var i = 0; i < r.newlines; i++)
      this.__add_outputline();
    this.current_line.set_indent(-1), this.current_line.push(r.whitespace_before), this.current_line.push(r.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1;
  }, n.prototype.add_token = function(r) {
    this.__add_space_before_token(), this.current_line.push(r), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap();
  }, n.prototype.__add_space_before_token = function() {
    this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
  }, n.prototype.remove_indent = function(r) {
    for (var i = this.__lines.length; r < i; )
      this.__lines[r]._remove_indent(), r++;
    this.current_line._remove_wrap_indent();
  }, n.prototype.trim = function(r) {
    for (r = r === void 0 ? !1 : r, this.current_line.trim(); r && this.__lines.length > 1 && this.current_line.is_empty(); )
      this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
    this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
  }, n.prototype.just_added_newline = function() {
    return this.current_line.is_empty();
  }, n.prototype.just_added_blankline = function() {
    return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
  }, n.prototype.ensure_empty_line_above = function(r, i) {
    for (var a = this.__lines.length - 2; a >= 0; ) {
      var o = this.__lines[a];
      if (o.is_empty())
        break;
      if (o.item(0).indexOf(r) !== 0 && o.item(-1) !== i) {
        this.__lines.splice(a + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
        break;
      }
      a--;
    }
  }, W$.Output = n, W$;
}
var Q$ = {}, bG;
function vle() {
  if (bG) return Q$;
  bG = 1;
  function t(e, n, r, i) {
    this.type = e, this.text = n, this.comments_before = null, this.newlines = r || 0, this.whitespace_before = i || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
  }
  return Q$.Token = t, Q$;
}
var H$ = {}, _G;
function gle() {
  return _G || (_G = 1, function(t) {
    var e = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", n = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", r = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc", i = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f", a = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}", o = "(?:" + a + "|[" + e + r + "])", s = "(?:" + a + "|[" + n + r + i + "])*";
    t.identifier = new RegExp(o + s, "g"), t.identifierStart = new RegExp(o), t.identifierMatch = new RegExp("(?:" + a + "|[" + n + r + i + "])+"), t.newline = /[\n\r\u2028\u2029]/, t.lineBreak = new RegExp(`\r
|` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
  }(H$)), H$;
}
var G$ = {}, kv = {}, OG;
function k4() {
  if (OG) return kv;
  OG = 1;
  function t(r, i) {
    this.raw_options = e(r, i), this.disabled = this._get_boolean("disabled"), this.eol = this._get_characters("eol", "auto"), this.end_with_newline = this._get_boolean("end_with_newline"), this.indent_size = this._get_number("indent_size", 4), this.indent_char = this._get_characters("indent_char", " "), this.indent_level = this._get_number("indent_level"), this.preserve_newlines = this._get_boolean("preserve_newlines", !0), this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786), this.preserve_newlines || (this.max_preserve_newlines = 0), this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === "	"), this.indent_with_tabs && (this.indent_char = "	", this.indent_size === 1 && (this.indent_size = 4)), this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char")), this.indent_empty_lines = this._get_boolean("indent_empty_lines"), this.templating = this._get_selection_list("templating", ["auto", "none", "angular", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
  }
  t.prototype._get_array = function(r, i) {
    var a = this.raw_options[r], o = i || [];
    return typeof a == "object" ? a !== null && typeof a.concat == "function" && (o = a.concat()) : typeof a == "string" && (o = a.split(/[^a-zA-Z0-9_\/\-]+/)), o;
  }, t.prototype._get_boolean = function(r, i) {
    var a = this.raw_options[r], o = a === void 0 ? !!i : !!a;
    return o;
  }, t.prototype._get_characters = function(r, i) {
    var a = this.raw_options[r], o = i || "";
    return typeof a == "string" && (o = a.replace(/\\r/, "\r").replace(/\\n/, `
`).replace(/\\t/, "	")), o;
  }, t.prototype._get_number = function(r, i) {
    var a = this.raw_options[r];
    i = parseInt(i, 10), isNaN(i) && (i = 0);
    var o = parseInt(a, 10);
    return isNaN(o) && (o = i), o;
  }, t.prototype._get_selection = function(r, i, a) {
    var o = this._get_selection_list(r, i, a);
    if (o.length !== 1)
      throw new Error(
        "Invalid Option Value: The option '" + r + `' can only be one of the following values:
` + i + `
You passed in: '` + this.raw_options[r] + "'"
      );
    return o[0];
  }, t.prototype._get_selection_list = function(r, i, a) {
    if (!i || i.length === 0)
      throw new Error("Selection list cannot be empty.");
    if (a = a || [i[0]], !this._is_valid_selection(a, i))
      throw new Error("Invalid Default Value!");
    var o = this._get_array(r, a);
    if (!this._is_valid_selection(o, i))
      throw new Error(
        "Invalid Option Value: The option '" + r + `' can contain only the following values:
` + i + `
You passed in: '` + this.raw_options[r] + "'"
      );
    return o;
  }, t.prototype._is_valid_selection = function(r, i) {
    return r.length && i.length && !r.some(function(a) {
      return i.indexOf(a) === -1;
    });
  };
  function e(r, i) {
    var a = {};
    r = n(r);
    var o;
    for (o in r)
      o !== i && (a[o] = r[o]);
    if (i && r[i])
      for (o in r[i])
        a[o] = r[i][o];
    return a;
  }
  function n(r) {
    var i = {}, a;
    for (a in r) {
      var o = a.replace(/-/g, "_");
      i[o] = r[a];
    }
    return i;
  }
  return kv.Options = t, kv.normalizeOpts = n, kv.mergeOpts = e, kv;
}
var SG;
function mle() {
  if (SG) return G$;
  SG = 1;
  var t = k4().Options, e = ["before-newline", "after-newline", "preserve-newline"];
  function n(r) {
    t.call(this, r, "js");
    var i = this.raw_options.brace_style || null;
    i === "expand-strict" ? this.raw_options.brace_style = "expand" : i === "collapse-preserve-inline" ? this.raw_options.brace_style = "collapse,preserve-inline" : this.raw_options.braces_on_own_line !== void 0 && (this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse");
    var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
    this.brace_preserve_inline = !1, this.brace_style = "collapse";
    for (var o = 0; o < a.length; o++)
      a[o] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[o];
    this.unindent_chained_methods = this._get_boolean("unindent_chained_methods"), this.break_chained_methods = this._get_boolean("break_chained_methods"), this.space_in_paren = this._get_boolean("space_in_paren"), this.space_in_empty_paren = this._get_boolean("space_in_empty_paren"), this.jslint_happy = this._get_boolean("jslint_happy"), this.space_after_anon_function = this._get_boolean("space_after_anon_function"), this.space_after_named_function = this._get_boolean("space_after_named_function"), this.keep_array_indentation = this._get_boolean("keep_array_indentation"), this.space_before_conditional = this._get_boolean("space_before_conditional", !0), this.unescape_strings = this._get_boolean("unescape_strings"), this.e4x = this._get_boolean("e4x"), this.comma_first = this._get_boolean("comma_first"), this.operator_position = this._get_selection("operator_position", e), this.test_output_raw = this._get_boolean("test_output_raw"), this.jslint_happy && (this.space_after_anon_function = !0);
  }
  return n.prototype = new t(), G$.Options = n, G$;
}
var wd = {}, j$ = {}, xG;
function L4() {
  if (xG) return j$;
  xG = 1;
  var t = RegExp.prototype.hasOwnProperty("sticky");
  function e(n) {
    this.__input = n || "", this.__input_length = this.__input.length, this.__position = 0;
  }
  return e.prototype.restart = function() {
    this.__position = 0;
  }, e.prototype.back = function() {
    this.__position > 0 && (this.__position -= 1);
  }, e.prototype.hasNext = function() {
    return this.__position < this.__input_length;
  }, e.prototype.next = function() {
    var n = null;
    return this.hasNext() && (n = this.__input.charAt(this.__position), this.__position += 1), n;
  }, e.prototype.peek = function(n) {
    var r = null;
    return n = n || 0, n += this.__position, n >= 0 && n < this.__input_length && (r = this.__input.charAt(n)), r;
  }, e.prototype.__match = function(n, r) {
    n.lastIndex = r;
    var i = n.exec(this.__input);
    return i && !(t && n.sticky) && i.index !== r && (i = null), i;
  }, e.prototype.test = function(n, r) {
    return r = r || 0, r += this.__position, r >= 0 && r < this.__input_length ? !!this.__match(n, r) : !1;
  }, e.prototype.testChar = function(n, r) {
    var i = this.peek(r);
    return n.lastIndex = 0, i !== null && n.test(i);
  }, e.prototype.match = function(n) {
    var r = this.__match(n, this.__position);
    return r ? this.__position += r[0].length : r = null, r;
  }, e.prototype.read = function(n, r, i) {
    var a = "", o;
    return n && (o = this.match(n), o && (a += o[0])), r && (o || !n) && (a += this.readUntil(r, i)), a;
  }, e.prototype.readUntil = function(n, r) {
    var i = "", a = this.__position;
    n.lastIndex = this.__position;
    var o = n.exec(this.__input);
    return o ? (a = o.index, r && (a += o[0].length)) : a = this.__input_length, i = this.__input.substring(this.__position, a), this.__position = a, i;
  }, e.prototype.readUntilAfter = function(n) {
    return this.readUntil(n, !0);
  }, e.prototype.get_regexp = function(n, r) {
    var i = null, a = "g";
    return r && t && (a = "y"), typeof n == "string" && n !== "" ? i = new RegExp(n, a) : n && (i = new RegExp(n.source, a)), i;
  }, e.prototype.get_literal_regexp = function(n) {
    return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
  }, e.prototype.peekUntilAfter = function(n) {
    var r = this.__position, i = this.readUntilAfter(n);
    return this.__position = r, i;
  }, e.prototype.lookBack = function(n) {
    var r = this.__position - 1;
    return r >= n.length && this.__input.substring(r - n.length, r).toLowerCase() === n;
  }, j$.InputScanner = e, j$;
}
var h_ = {}, Z$ = {}, wG;
function Tht() {
  if (wG) return Z$;
  wG = 1;
  function t(e) {
    this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = e;
  }
  return t.prototype.restart = function() {
    this.__position = 0;
  }, t.prototype.isEmpty = function() {
    return this.__tokens_length === 0;
  }, t.prototype.hasNext = function() {
    return this.__position < this.__tokens_length;
  }, t.prototype.next = function() {
    var e = null;
    return this.hasNext() && (e = this.__tokens[this.__position], this.__position += 1), e;
  }, t.prototype.peek = function(e) {
    var n = null;
    return e = e || 0, e += this.__position, e >= 0 && e < this.__tokens_length && (n = this.__tokens[e]), n;
  }, t.prototype.add = function(e) {
    this.__parent_token && (e.parent = this.__parent_token), this.__tokens.push(e), this.__tokens_length += 1;
  }, Z$.TokenStream = t, Z$;
}
var U$ = {}, X$ = {}, CG;
function Qw() {
  if (CG) return X$;
  CG = 1;
  function t(e, n) {
    this._input = e, this._starting_pattern = null, this._match_pattern = null, this._until_pattern = null, this._until_after = !1, n && (this._starting_pattern = this._input.get_regexp(n._starting_pattern, !0), this._match_pattern = this._input.get_regexp(n._match_pattern, !0), this._until_pattern = this._input.get_regexp(n._until_pattern), this._until_after = n._until_after);
  }
  return t.prototype.read = function() {
    var e = this._input.read(this._starting_pattern);
    return (!this._starting_pattern || e) && (e += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), e;
  }, t.prototype.read_match = function() {
    return this._input.match(this._match_pattern);
  }, t.prototype.until_after = function(e) {
    var n = this._create();
    return n._until_after = !0, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  }, t.prototype.until = function(e) {
    var n = this._create();
    return n._until_after = !1, n._until_pattern = this._input.get_regexp(e), n._update(), n;
  }, t.prototype.starting_with = function(e) {
    var n = this._create();
    return n._starting_pattern = this._input.get_regexp(e, !0), n._update(), n;
  }, t.prototype.matching = function(e) {
    var n = this._create();
    return n._match_pattern = this._input.get_regexp(e, !0), n._update(), n;
  }, t.prototype._create = function() {
    return new t(this._input, this);
  }, t.prototype._update = function() {
  }, X$.Pattern = t, X$;
}
var TG;
function Pht() {
  if (TG) return U$;
  TG = 1;
  var t = Qw().Pattern;
  function e(n, r) {
    t.call(this, n, r), r ? this._line_regexp = this._input.get_regexp(r._line_regexp) : this.__set_whitespace_patterns("", ""), this.newline_count = 0, this.whitespace_before_token = "";
  }
  return e.prototype = new t(), e.prototype.__set_whitespace_patterns = function(n, r) {
    n += "\\t ", r += "\\n\\r", this._match_pattern = this._input.get_regexp(
      "[" + n + r + "]+",
      !0
    ), this._newline_regexp = this._input.get_regexp(
      "\\r\\n|[" + r + "]"
    );
  }, e.prototype.read = function() {
    this.newline_count = 0, this.whitespace_before_token = "";
    var n = this._input.read(this._match_pattern);
    if (n === " ")
      this.whitespace_before_token = " ";
    else if (n) {
      var r = this.__split(this._newline_regexp, n);
      this.newline_count = r.length - 1, this.whitespace_before_token = r[this.newline_count];
    }
    return n;
  }, e.prototype.matching = function(n, r) {
    var i = this._create();
    return i.__set_whitespace_patterns(n, r), i._update(), i;
  }, e.prototype._create = function() {
    return new e(this._input, this);
  }, e.prototype.__split = function(n, r) {
    n.lastIndex = 0;
    for (var i = 0, a = [], o = n.exec(r); o; )
      a.push(r.substring(i, o.index)), i = o.index + o[0].length, o = n.exec(r);
    return i < r.length ? a.push(r.substring(i, r.length)) : a.push(""), a;
  }, U$.WhitespacePattern = e, U$;
}
var PG;
function CS() {
  if (PG) return h_;
  PG = 1;
  var t = L4().InputScanner, e = vle().Token, n = Tht().TokenStream, r = Pht().WhitespacePattern, i = {
    START: "TK_START",
    RAW: "TK_RAW",
    EOF: "TK_EOF"
  }, a = function(o, s) {
    this._input = new t(o), this._options = s || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new r(this._input);
  };
  return a.prototype.tokenize = function() {
    this._input.restart(), this.__tokens = new n(), this._reset();
    for (var o, s = new e(i.START, ""), l = null, u = [], c = new n(); s.type !== i.EOF; ) {
      for (o = this._get_next_token(s, l); this._is_comment(o); )
        c.add(o), o = this._get_next_token(s, l);
      c.isEmpty() || (o.comments_before = c, c = new n()), o.parent = l, this._is_opening(o) ? (u.push(l), l = o) : l && this._is_closing(o, l) && (o.opened = l, l.closed = o, l = u.pop(), o.parent = l), o.previous = s, s.next = o, this.__tokens.add(o), s = o;
    }
    return this.__tokens;
  }, a.prototype._is_first_token = function() {
    return this.__tokens.isEmpty();
  }, a.prototype._reset = function() {
  }, a.prototype._get_next_token = function(o, s) {
    this._readWhitespace();
    var l = this._input.read(/.+/g);
    return l ? this._create_token(i.RAW, l) : this._create_token(i.EOF, "");
  }, a.prototype._is_comment = function(o) {
    return !1;
  }, a.prototype._is_opening = function(o) {
    return !1;
  }, a.prototype._is_closing = function(o, s) {
    return !1;
  }, a.prototype._create_token = function(o, s) {
    var l = new e(
      o,
      s,
      this._patterns.whitespace.newline_count,
      this._patterns.whitespace.whitespace_before_token
    );
    return l;
  }, a.prototype._readWhitespace = function() {
    return this._patterns.whitespace.read();
  }, h_.Tokenizer = a, h_.TOKEN = i, h_;
}
var Y$ = {}, $G;
function N4() {
  if ($G) return Y$;
  $G = 1;
  function t(e, n) {
    e = typeof e == "string" ? e : e.source, n = typeof n == "string" ? n : n.source, this.__directives_block_pattern = new RegExp(e + / beautify( \w+[:]\w+)+ /.source + n, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(e + /\sbeautify\signore:end\s/.source + n, "g");
  }
  return t.prototype.get_directives = function(e) {
    if (!e.match(this.__directives_block_pattern))
      return null;
    var n = {};
    this.__directive_pattern.lastIndex = 0;
    for (var r = this.__directive_pattern.exec(e); r; )
      n[r[1]] = r[2], r = this.__directive_pattern.exec(e);
    return n;
  }, t.prototype.readIgnored = function(e) {
    return e.readUntilAfter(this.__directives_end_ignore_pattern);
  }, Y$.Directives = t, Y$;
}
var q$ = {}, AG;
function yle() {
  if (AG) return q$;
  AG = 1;
  var t = Qw().Pattern, e = {
    django: !1,
    erb: !1,
    handlebars: !1,
    php: !1,
    smarty: !1,
    angular: !1
  };
  function n(r, i) {
    t.call(this, r, i), this.__template_pattern = null, this._disabled = Object.assign({}, e), this._excluded = Object.assign({}, e), i && (this.__template_pattern = this._input.get_regexp(i.__template_pattern), this._excluded = Object.assign(this._excluded, i._excluded), this._disabled = Object.assign(this._disabled, i._disabled));
    var a = new t(r);
    this.__patterns = {
      handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
      handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
      handlebars: a.starting_with(/{{/).until_after(/}}/),
      php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
      erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
      // django coflicts with handlebars a bit.
      django: a.starting_with(/{%/).until_after(/%}/),
      django_value: a.starting_with(/{{/).until_after(/}}/),
      django_comment: a.starting_with(/{#/).until_after(/#}/),
      smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
      smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
      smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
    };
  }
  return n.prototype = new t(), n.prototype._create = function() {
    return new n(this._input, this);
  }, n.prototype._update = function() {
    this.__set_templated_pattern();
  }, n.prototype.disable = function(r) {
    var i = this._create();
    return i._disabled[r] = !0, i._update(), i;
  }, n.prototype.read_options = function(r) {
    var i = this._create();
    for (var a in e)
      i._disabled[a] = r.templating.indexOf(a) === -1;
    return i._update(), i;
  }, n.prototype.exclude = function(r) {
    var i = this._create();
    return i._excluded[r] = !0, i._update(), i;
  }, n.prototype.read = function() {
    var r = "";
    this._match_pattern ? r = this._input.read(this._starting_pattern) : r = this._input.read(this._starting_pattern, this.__template_pattern);
    for (var i = this._read_template(); i; )
      this._match_pattern ? i += this._input.read(this._match_pattern) : i += this._input.readUntil(this.__template_pattern), r += i, i = this._read_template();
    return this._until_after && (r += this._input.readUntilAfter(this._until_pattern)), r;
  }, n.prototype.__set_templated_pattern = function() {
    var r = [];
    this._disabled.php || r.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || r.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.erb || r.push(this.__patterns.erb._starting_pattern.source), this._disabled.django || (r.push(this.__patterns.django._starting_pattern.source), r.push(this.__patterns.django_value._starting_pattern.source), r.push(this.__patterns.django_comment._starting_pattern.source)), this._disabled.smarty || r.push(this.__patterns.smarty._starting_pattern.source), this._until_pattern && r.push(this._until_pattern.source), this.__template_pattern = this._input.get_regexp("(?:" + r.join("|") + ")");
  }, n.prototype._read_template = function() {
    var r = "", i = this._input.peek();
    if (i === "<") {
      var a = this._input.peek(1);
      !this._disabled.php && !this._excluded.php && a === "?" && (r = r || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && a === "%" && (r = r || this.__patterns.erb.read());
    } else i === "{" && (!this._disabled.handlebars && !this._excluded.handlebars && (r = r || this.__patterns.handlebars_comment.read(), r = r || this.__patterns.handlebars_unescaped.read(), r = r || this.__patterns.handlebars.read()), this._disabled.django || (!this._excluded.django && !this._excluded.handlebars && (r = r || this.__patterns.django_value.read()), this._excluded.django || (r = r || this.__patterns.django_comment.read(), r = r || this.__patterns.django.read())), this._disabled.smarty || this._disabled.django && this._disabled.handlebars && (r = r || this.__patterns.smarty_comment.read(), r = r || this.__patterns.smarty_literal.read(), r = r || this.__patterns.smarty.read()));
    return r;
  }, q$.TemplatablePattern = n, q$;
}
var EG;
function p_() {
  if (EG) return wd;
  EG = 1;
  var t = L4().InputScanner, e = CS().Tokenizer, n = CS().TOKEN, r = N4().Directives, i = gle(), a = Qw().Pattern, o = yle().TemplatablePattern;
  function s(S, x) {
    return x.indexOf(S) !== -1;
  }
  var l = {
    START_EXPR: "TK_START_EXPR",
    END_EXPR: "TK_END_EXPR",
    START_BLOCK: "TK_START_BLOCK",
    END_BLOCK: "TK_END_BLOCK",
    WORD: "TK_WORD",
    RESERVED: "TK_RESERVED",
    SEMICOLON: "TK_SEMICOLON",
    STRING: "TK_STRING",
    EQUALS: "TK_EQUALS",
    OPERATOR: "TK_OPERATOR",
    COMMA: "TK_COMMA",
    BLOCK_COMMENT: "TK_BLOCK_COMMENT",
    COMMENT: "TK_COMMENT",
    DOT: "TK_DOT",
    UNKNOWN: "TK_UNKNOWN",
    START: n.START,
    RAW: n.RAW,
    EOF: n.EOF
  }, u = new r(/\/\*/, /\*\//), c = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, f = /[0-9]/, d = /[^\d\.]/, h = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), p = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
  p = p.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), p = "\\?\\.(?!\\d) " + p, p = p.replace(/ /g, "|");
  var v = new RegExp(p), g = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), m = g.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), y = new RegExp("^(?:" + m.join("|") + ")$"), b, _ = function(S, x) {
    e.call(this, S, x), this._patterns.whitespace = this._patterns.whitespace.matching(
      /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
      /\u2028\u2029/.source
    );
    var C = new a(this._input), T = new o(this._input).read_options(this._options);
    this.__patterns = {
      template: T,
      identifier: T.starting_with(i.identifier).matching(i.identifierMatch),
      number: C.matching(c),
      punct: C.matching(v),
      // comment ends just before nearest linefeed or end of file
      comment: C.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
      //  /* ... */ comment ends with nearest */ or end of file
      block_comment: C.starting_with(/\/\*/).until_after(/\*\//),
      html_comment_start: C.matching(/<!--/),
      html_comment_end: C.matching(/-->/),
      include: C.starting_with(/#include/).until_after(i.lineBreak),
      shebang: C.starting_with(/#!/).until_after(i.lineBreak),
      xml: C.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
      single_quote: T.until(/['\\\n\r\u2028\u2029]/),
      double_quote: T.until(/["\\\n\r\u2028\u2029]/),
      template_text: T.until(/[`\\$]/),
      template_expression: T.until(/[`}\\]/)
    };
  };
  _.prototype = new e(), _.prototype._is_comment = function(S) {
    return S.type === l.COMMENT || S.type === l.BLOCK_COMMENT || S.type === l.UNKNOWN;
  }, _.prototype._is_opening = function(S) {
    return S.type === l.START_BLOCK || S.type === l.START_EXPR;
  }, _.prototype._is_closing = function(S, x) {
    return (S.type === l.END_BLOCK || S.type === l.END_EXPR) && x && (S.text === "]" && x.text === "[" || S.text === ")" && x.text === "(" || S.text === "}" && x.text === "{");
  }, _.prototype._reset = function() {
    b = !1;
  }, _.prototype._get_next_token = function(S, x) {
    var C = null;
    this._readWhitespace();
    var T = this._input.peek();
    return T === null ? this._create_token(l.EOF, "") : (C = C || this._read_non_javascript(T), C = C || this._read_string(T), C = C || this._read_pair(T, this._input.peek(1)), C = C || this._read_word(S), C = C || this._read_singles(T), C = C || this._read_comment(T), C = C || this._read_regexp(T, S), C = C || this._read_xml(T, S), C = C || this._read_punctuation(), C = C || this._create_token(l.UNKNOWN, this._input.next()), C);
  }, _.prototype._read_word = function(S) {
    var x;
    if (x = this.__patterns.identifier.read(), x !== "")
      return x = x.replace(i.allLineBreaks, `
`), !(S.type === l.DOT || S.type === l.RESERVED && (S.text === "set" || S.text === "get")) && y.test(x) ? (x === "in" || x === "of") && (S.type === l.WORD || S.type === l.STRING) ? this._create_token(l.OPERATOR, x) : this._create_token(l.RESERVED, x) : this._create_token(l.WORD, x);
    if (x = this.__patterns.number.read(), x !== "")
      return this._create_token(l.WORD, x);
  }, _.prototype._read_singles = function(S) {
    var x = null;
    return S === "(" || S === "[" ? x = this._create_token(l.START_EXPR, S) : S === ")" || S === "]" ? x = this._create_token(l.END_EXPR, S) : S === "{" ? x = this._create_token(l.START_BLOCK, S) : S === "}" ? x = this._create_token(l.END_BLOCK, S) : S === ";" ? x = this._create_token(l.SEMICOLON, S) : S === "." && d.test(this._input.peek(1)) ? x = this._create_token(l.DOT, S) : S === "," && (x = this._create_token(l.COMMA, S)), x && this._input.next(), x;
  }, _.prototype._read_pair = function(S, x) {
    var C = null;
    return S === "#" && x === "{" && (C = this._create_token(l.START_BLOCK, S + x)), C && (this._input.next(), this._input.next()), C;
  }, _.prototype._read_punctuation = function() {
    var S = this.__patterns.punct.read();
    if (S !== "")
      return S === "=" ? this._create_token(l.EQUALS, S) : S === "?." ? this._create_token(l.DOT, S) : this._create_token(l.OPERATOR, S);
  }, _.prototype._read_non_javascript = function(S) {
    var x = "";
    if (S === "#") {
      if (this._is_first_token() && (x = this.__patterns.shebang.read(), x))
        return this._create_token(l.UNKNOWN, x.trim() + `
`);
      if (x = this.__patterns.include.read(), x)
        return this._create_token(l.UNKNOWN, x.trim() + `
`);
      S = this._input.next();
      var C = "#";
      if (this._input.hasNext() && this._input.testChar(f)) {
        do
          S = this._input.next(), C += S;
        while (this._input.hasNext() && S !== "#" && S !== "=");
        return S === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (C += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (C += "{}", this._input.next(), this._input.next())), this._create_token(l.WORD, C);
      }
      this._input.back();
    } else if (S === "<" && this._is_first_token()) {
      if (x = this.__patterns.html_comment_start.read(), x) {
        for (; this._input.hasNext() && !this._input.testChar(i.newline); )
          x += this._input.next();
        return b = !0, this._create_token(l.COMMENT, x);
      }
    } else if (b && S === "-" && (x = this.__patterns.html_comment_end.read(), x))
      return b = !1, this._create_token(l.COMMENT, x);
    return null;
  }, _.prototype._read_comment = function(S) {
    var x = null;
    if (S === "/") {
      var C = "";
      if (this._input.peek(1) === "*") {
        C = this.__patterns.block_comment.read();
        var T = u.get_directives(C);
        T && T.ignore === "start" && (C += u.readIgnored(this._input)), C = C.replace(i.allLineBreaks, `
`), x = this._create_token(l.BLOCK_COMMENT, C), x.directives = T;
      } else this._input.peek(1) === "/" && (C = this.__patterns.comment.read(), x = this._create_token(l.COMMENT, C));
    }
    return x;
  }, _.prototype._read_string = function(S) {
    if (S === "`" || S === "'" || S === '"') {
      var x = this._input.next();
      return this.has_char_escapes = !1, S === "`" ? x += this._read_string_recursive("`", !0, "${") : x += this._read_string_recursive(S), this.has_char_escapes && this._options.unescape_strings && (x = O(x)), this._input.peek() === S && (x += this._input.next()), x = x.replace(i.allLineBreaks, `
`), this._create_token(l.STRING, x);
    }
    return null;
  }, _.prototype._allow_regexp_or_xml = function(S) {
    return S.type === l.RESERVED && s(S.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || S.type === l.END_EXPR && S.text === ")" && S.opened.previous.type === l.RESERVED && s(S.opened.previous.text, ["if", "while", "for"]) || s(S.type, [
      l.COMMENT,
      l.START_EXPR,
      l.START_BLOCK,
      l.START,
      l.END_BLOCK,
      l.OPERATOR,
      l.EQUALS,
      l.EOF,
      l.SEMICOLON,
      l.COMMA
    ]);
  }, _.prototype._read_regexp = function(S, x) {
    if (S === "/" && this._allow_regexp_or_xml(x)) {
      for (var C = this._input.next(), T = !1, w = !1; this._input.hasNext() && (T || w || this._input.peek() !== S) && !this._input.testChar(i.newline); )
        C += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ? w = !0 : this._input.peek() === "]" && (w = !1)), this._input.next();
      return this._input.peek() === S && (C += this._input.next(), C += this._input.read(i.identifier)), this._create_token(l.STRING, C);
    }
    return null;
  }, _.prototype._read_xml = function(S, x) {
    if (this._options.e4x && S === "<" && this._allow_regexp_or_xml(x)) {
      var C = "", T = this.__patterns.xml.read_match();
      if (T) {
        for (var w = T[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), P = w.indexOf("{") === 0, $ = 0; T; ) {
          var A = !!T[1], D = T[2], E = !!T[T.length - 1] || D.slice(0, 8) === "![CDATA[";
          if (!E && (D === w || P && D.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (A ? --$ : ++$), C += T[0], $ <= 0)
            break;
          T = this.__patterns.xml.read_match();
        }
        return T || (C += this._input.match(/[\s\S]*/g)[0]), C = C.replace(i.allLineBreaks, `
`), this._create_token(l.STRING, C);
      }
    }
    return null;
  };
  function O(S) {
    for (var x = "", C = 0, T = new t(S), w = null; T.hasNext(); )
      if (w = T.match(/([\s]|[^\\]|\\\\)+/g), w && (x += w[0]), T.peek() === "\\") {
        if (T.next(), T.peek() === "x")
          w = T.match(/x([0-9A-Fa-f]{2})/g);
        else if (T.peek() === "u")
          w = T.match(/u([0-9A-Fa-f]{4})/g), w || (w = T.match(/u\{([0-9A-Fa-f]+)\}/g));
        else {
          x += "\\", T.hasNext() && (x += T.next());
          continue;
        }
        if (!w || (C = parseInt(w[1], 16), C > 126 && C <= 255 && w[0].indexOf("x") === 0))
          return S;
        C >= 0 && C < 32 || C > 1114111 ? x += "\\" + w[0] : C === 34 || C === 39 || C === 92 ? x += "\\" + String.fromCharCode(C) : x += String.fromCharCode(C);
      }
    return x;
  }
  return _.prototype._read_string_recursive = function(S, x, C) {
    var T, w;
    S === "'" ? w = this.__patterns.single_quote : S === '"' ? w = this.__patterns.double_quote : S === "`" ? w = this.__patterns.template_text : S === "}" && (w = this.__patterns.template_expression);
    for (var P = w.read(), $ = ""; this._input.hasNext(); ) {
      if ($ = this._input.next(), $ === S || !x && i.newline.test($)) {
        this._input.back();
        break;
      } else $ === "\\" && this._input.hasNext() ? (T = this._input.peek(), T === "x" || T === "u" ? this.has_char_escapes = !0 : T === "\r" && this._input.peek(1) === `
` && this._input.next(), $ += this._input.next()) : C && (C === "${" && $ === "$" && this._input.peek() === "{" && ($ += this._input.next()), C === $ && (S === "`" ? $ += this._read_string_recursive("}", x, "`") : $ += this._read_string_recursive("`", x, "${"), this._input.hasNext() && ($ += this._input.next())));
      $ += w.read(), P += $;
    }
    return P;
  }, wd.Tokenizer = _, wd.TOKEN = l, wd.positionable_operators = h.slice(), wd.line_starters = g.slice(), wd;
}
var MG;
function $ht() {
  if (MG) return F$;
  MG = 1;
  var t = R4().Output, e = vle().Token, n = gle(), r = mle().Options, i = p_().Tokenizer, a = p_().line_starters, o = p_().positionable_operators, s = p_().TOKEN;
  function l(w, P) {
    return P.indexOf(w) !== -1;
  }
  function u(w) {
    return w.replace(/^\s+/g, "");
  }
  function c(w) {
    for (var P = {}, $ = 0; $ < w.length; $++)
      P[w[$].replace(/-/g, "_")] = w[$];
    return P;
  }
  function f(w, P) {
    return w && w.type === s.RESERVED && w.text === P;
  }
  function d(w, P) {
    return w && w.type === s.RESERVED && l(w.text, P);
  }
  var h = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], p = ["before-newline", "after-newline", "preserve-newline"], v = c(p), g = [v.before_newline, v.preserve_newline], m = {
    BlockStatement: "BlockStatement",
    // 'BLOCK'
    Statement: "Statement",
    // 'STATEMENT'
    ObjectLiteral: "ObjectLiteral",
    // 'OBJECT',
    ArrayLiteral: "ArrayLiteral",
    //'[EXPRESSION]',
    ForInitializer: "ForInitializer",
    //'(FOR-EXPRESSION)',
    Conditional: "Conditional",
    //'(COND-EXPRESSION)',
    Expression: "Expression"
    //'(EXPRESSION)'
  };
  function y(w, P) {
    P.multiline_frame || P.mode === m.ForInitializer || P.mode === m.Conditional || w.remove_indent(P.start_line_index);
  }
  function b(w) {
    w = w.replace(n.allLineBreaks, `
`);
    for (var P = [], $ = w.indexOf(`
`); $ !== -1; )
      P.push(w.substring(0, $)), w = w.substring($ + 1), $ = w.indexOf(`
`);
    return w.length && P.push(w), P;
  }
  function _(w) {
    return w === m.ArrayLiteral;
  }
  function O(w) {
    return l(w, [m.Expression, m.ForInitializer, m.Conditional]);
  }
  function S(w, P) {
    for (var $ = 0; $ < w.length; $++) {
      var A = w[$].trim();
      if (A.charAt(0) !== P)
        return !1;
    }
    return !0;
  }
  function x(w, P) {
    for (var $ = 0, A = w.length, D; $ < A; $++)
      if (D = w[$], D && D.indexOf(P) !== 0)
        return !1;
    return !0;
  }
  function C(w, P) {
    P = P || {}, this._source_text = w || "", this._output = null, this._tokens = null, this._last_last_text = null, this._flags = null, this._previous_flags = null, this._flag_store = null, this._options = new r(P);
  }
  C.prototype.create_flags = function(w, P) {
    var $ = 0;
    w && ($ = w.indentation_level, !this._output.just_added_newline() && w.line_indent_level > $ && ($ = w.line_indent_level));
    var A = {
      mode: P,
      parent: w,
      last_token: w ? w.last_token : new e(s.START_BLOCK, ""),
      // last token text
      last_word: w ? w.last_word : "",
      // last TOKEN.WORD passed
      declaration_statement: !1,
      declaration_assignment: !1,
      multiline_frame: !1,
      inline_frame: !1,
      if_block: !1,
      else_block: !1,
      class_start_block: !1,
      // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
      do_block: !1,
      do_while: !1,
      import_block: !1,
      in_case_statement: !1,
      // switch(..){ INSIDE HERE }
      in_case: !1,
      // we're on the exact line with "case 0:"
      case_body: !1,
      // the indented case-action block
      case_block: !1,
      // the indented case-action block is wrapped with {}
      indentation_level: $,
      alignment: 0,
      line_indent_level: w ? w.line_indent_level : $,
      start_line_index: this._output.get_line_number(),
      ternary_depth: 0
    };
    return A;
  }, C.prototype._reset = function(w) {
    var P = w.match(/^[\t ]*/)[0];
    this._last_last_text = "", this._output = new t(this._options, P), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(m.BlockStatement);
    var $ = new i(w, this._options);
    return this._tokens = $.tokenize(), w;
  }, C.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var w, P = this._reset(this._source_text), $ = this._options.eol;
    this._options.eol === "auto" && ($ = `
`, P && n.lineBreak.test(P || "") && ($ = P.match(n.lineBreak)[0]));
    for (var A = this._tokens.next(); A; )
      this.handle_token(A), this._last_last_text = this._flags.last_token.text, this._flags.last_token = A, A = this._tokens.next();
    return w = this._output.get_code($), w;
  }, C.prototype.handle_token = function(w, P) {
    w.type === s.START_EXPR ? this.handle_start_expr(w) : w.type === s.END_EXPR ? this.handle_end_expr(w) : w.type === s.START_BLOCK ? this.handle_start_block(w) : w.type === s.END_BLOCK ? this.handle_end_block(w) : w.type === s.WORD ? this.handle_word(w) : w.type === s.RESERVED ? this.handle_word(w) : w.type === s.SEMICOLON ? this.handle_semicolon(w) : w.type === s.STRING ? this.handle_string(w) : w.type === s.EQUALS ? this.handle_equals(w) : w.type === s.OPERATOR ? this.handle_operator(w) : w.type === s.COMMA ? this.handle_comma(w) : w.type === s.BLOCK_COMMENT ? this.handle_block_comment(w, P) : w.type === s.COMMENT ? this.handle_comment(w, P) : w.type === s.DOT ? this.handle_dot(w) : w.type === s.EOF ? this.handle_eof(w) : w.type === s.UNKNOWN ? this.handle_unknown(w, P) : this.handle_unknown(w, P);
  }, C.prototype.handle_whitespace_and_comments = function(w, P) {
    var $ = w.newlines, A = this._options.keep_array_indentation && _(this._flags.mode);
    if (w.comments_before)
      for (var D = w.comments_before.next(); D; )
        this.handle_whitespace_and_comments(D, P), this.handle_token(D, P), D = w.comments_before.next();
    if (A)
      for (var E = 0; E < $; E += 1)
        this.print_newline(E > 0, P);
    else if (this._options.max_preserve_newlines && $ > this._options.max_preserve_newlines && ($ = this._options.max_preserve_newlines), this._options.preserve_newlines && $ > 1) {
      this.print_newline(!1, P);
      for (var R = 1; R < $; R += 1)
        this.print_newline(!0, P);
    }
  };
  var T = ["async", "break", "continue", "return", "throw", "yield"];
  return C.prototype.allow_wrap_or_preserved_newline = function(w, P) {
    if (P = P === void 0 ? !1 : P, !this._output.just_added_newline()) {
      var $ = this._options.preserve_newlines && w.newlines || P, A = l(this._flags.last_token.text, o) || l(w.text, o);
      if (A) {
        var D = l(this._flags.last_token.text, o) && l(this._options.operator_position, g) || l(w.text, o);
        $ = $ && D;
      }
      if ($)
        this.print_newline(!1, !0);
      else if (this._options.wrap_line_length) {
        if (d(this._flags.last_token, T))
          return;
        this._output.set_wrap_point();
      }
    }
  }, C.prototype.print_newline = function(w, P) {
    if (!P && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
      for (var $ = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f($, "else")) && !this._flags.do_block; )
        this.restore_mode();
    this._output.add_new_line(w) && (this._flags.multiline_frame = !0);
  }, C.prototype.print_token_line_indentation = function(w) {
    this._output.just_added_newline() && (this._options.keep_array_indentation && w.newlines && (w.text === "[" || _(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(w.whitespace_before), this._output.space_before_token = !1) : this._output.set_indent(this._flags.indentation_level, this._flags.alignment) && (this._flags.line_indent_level = this._flags.indentation_level));
  }, C.prototype.print_token = function(w) {
    if (this._output.raw) {
      this._output.add_raw_token(w);
      return;
    }
    if (this._options.comma_first && w.previous && w.previous.type === s.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
      var P = this._output.previous_line.pop();
      this._output.previous_line.is_empty() && (this._output.previous_line.push(P), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(w), this._output.add_token(","), this._output.space_before_token = !0;
    }
    this.print_token_line_indentation(w), this._output.non_breaking_space = !0, this._output.add_token(w.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
  }, C.prototype.indent = function() {
    this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  }, C.prototype.deindent = function() {
    this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level) && (this._flags.indentation_level -= 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  }, C.prototype.set_mode = function(w) {
    this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, w), this._flags = this.create_flags(this._previous_flags, w), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
  }, C.prototype.restore_mode = function() {
    this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === m.Statement && y(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
  }, C.prototype.start_of_object_property = function() {
    return this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"]));
  }, C.prototype.start_of_statement = function(w) {
    var P = !1;
    return P = P || d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD, P = P || f(this._flags.last_token, "do"), P = P || !(this._flags.parent.mode === m.ObjectLiteral && this._flags.mode === m.Statement) && d(this._flags.last_token, T) && !w.newlines, P = P || f(this._flags.last_token, "else") && !(f(w, "if") && !w.comments_before), P = P || this._flags.last_token.type === s.END_EXPR && (this._previous_flags.mode === m.ForInitializer || this._previous_flags.mode === m.Conditional), P = P || this._flags.last_token.type === s.WORD && this._flags.mode === m.BlockStatement && !this._flags.in_case && !(w.text === "--" || w.text === "++") && this._last_last_text !== "function" && w.type !== s.WORD && w.type !== s.RESERVED, P = P || this._flags.mode === m.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || d(this._flags.last_token, ["get", "set"])), P ? (this.set_mode(m.Statement), this.indent(), this.handle_whitespace_and_comments(w, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
      w,
      d(w, ["do", "for", "if", "while"])
    ), !0) : !1;
  }, C.prototype.handle_start_expr = function(w) {
    this.start_of_statement(w) || this.handle_whitespace_and_comments(w);
    var P = m.Expression;
    if (w.text === "[") {
      if (this._flags.last_token.type === s.WORD || this._flags.last_token.text === ")") {
        d(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(w), this.set_mode(P), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
        return;
      }
      P = m.ArrayLiteral, _(this._flags.mode) && (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) && (this._options.keep_array_indentation || this.print_newline()), l(this._flags.last_token.type, [s.START_EXPR, s.END_EXPR, s.WORD, s.OPERATOR, s.DOT]) || (this._output.space_before_token = !0);
    } else {
      if (this._flags.last_token.type === s.RESERVED)
        this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, P = m.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, P = m.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && w.whitespace_before === "" ? this._output.space_before_token = !1 : (l(this._flags.last_token.text, a) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
      else if (this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR)
        this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w);
      else if (this._flags.last_token.type === s.WORD) {
        this._output.space_before_token = !1;
        var $ = this._tokens.peek(-3);
        if (this._options.space_after_named_function && $) {
          var A = this._tokens.peek(-4);
          d($, ["async", "function"]) || $.text === "*" && d(A, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === m.ObjectLiteral ? ($.text === "{" || $.text === "," || $.text === "*" && (A.text === "{" || A.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
        }
      } else
        this.allow_wrap_or_preserved_newline(w);
      (this._flags.last_token.type === s.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
    }
    this._flags.last_token.text === ";" || this._flags.last_token.type === s.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === s.END_EXPR || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === s.COMMA) && this.allow_wrap_or_preserved_newline(w, w.newlines), this.print_token(w), this.set_mode(P), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
  }, C.prototype.handle_end_expr = function(w) {
    for (; this._flags.mode === m.Statement; )
      this.restore_mode();
    this.handle_whitespace_and_comments(w), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
      w,
      w.text === "]" && _(this._flags.mode) && !this._options.keep_array_indentation
    ), this._options.space_in_paren && (this._flags.last_token.type === s.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(w), this.restore_mode(), y(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === m.Conditional && (this._previous_flags.mode = m.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
  }, C.prototype.handle_start_block = function(w) {
    this.handle_whitespace_and_comments(w);
    var P = this._tokens.peek(), $ = this._tokens.peek(1);
    this._flags.last_word === "switch" && this._flags.last_token.type === s.END_EXPR ? (this.set_mode(m.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(m.BlockStatement) : $ && (l($.text, [":", ","]) && l(P.type, [s.STRING, s.WORD, s.RESERVED]) || l(P.text, ["get", "set", "..."]) && l($.type, [s.WORD, s.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l($.text, [":", ","]) ? this.set_mode(m.BlockStatement) : this.set_mode(m.ObjectLiteral) : this._flags.last_token.type === s.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(m.BlockStatement) : l(this._flags.last_token.type, [s.EQUALS, s.START_EXPR, s.COMMA, s.OPERATOR]) || d(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(m.ObjectLiteral) : this.set_mode(m.BlockStatement), this._flags.last_token && d(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
    var A = !P.comments_before && P.text === "}", D = A && this._flags.last_word === "function" && this._flags.last_token.type === s.END_EXPR;
    if (this._options.brace_preserve_inline) {
      var E = 0, R = null;
      this._flags.inline_frame = !0;
      do
        if (E += 1, R = this._tokens.peek(E - 1), R.newlines) {
          this._flags.inline_frame = !1;
          break;
        }
      while (R.type !== s.EOF && !(R.type === s.END_BLOCK && R.opened === w));
    }
    (this._options.brace_style === "expand" || this._options.brace_style === "none" && w.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== s.OPERATOR && (D || this._flags.last_token.type === s.EQUALS || d(this._flags.last_token, h) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (_(this._previous_flags.mode) && (this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.COMMA) && ((this._flags.last_token.type === s.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(w), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== s.OPERATOR && this._flags.last_token.type !== s.START_EXPR && (l(this._flags.last_token.type, [s.START_BLOCK, s.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(w), this.indent(), !A && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
  }, C.prototype.handle_end_block = function(w) {
    for (this.handle_whitespace_and_comments(w); this._flags.mode === m.Statement; )
      this.restore_mode();
    var P = this._flags.last_token.type === s.START_BLOCK;
    this._flags.inline_frame && !P ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? P || this.print_newline() : P || (_(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(w);
  }, C.prototype.handle_word = function(w) {
    if (w.type === s.RESERVED) {
      if (l(w.text, ["set", "get"]) && this._flags.mode !== m.ObjectLiteral)
        w.type = s.WORD;
      else if (w.text === "import" && l(this._tokens.peek().text, ["(", "."]))
        w.type = s.WORD;
      else if (l(w.text, ["as", "from"]) && !this._flags.import_block)
        w.type = s.WORD;
      else if (this._flags.mode === m.ObjectLiteral) {
        var P = this._tokens.peek();
        P.text === ":" && (w.type = s.WORD);
      }
    }
    if (this.start_of_statement(w) ? d(this._flags.last_token, ["var", "let", "const"]) && w.type === s.WORD && (this._flags.declaration_statement = !0) : w.newlines && !O(this._flags.mode) && (this._flags.last_token.type !== s.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== s.EQUALS && (this._options.preserve_newlines || !d(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(w), this.print_newline()) : this.handle_whitespace_and_comments(w), this._flags.do_block && !this._flags.do_while)
      if (f(w, "while")) {
        this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0, this._flags.do_while = !0;
        return;
      } else
        this.print_newline(), this._flags.do_block = !1;
    if (this._flags.if_block)
      if (!this._flags.else_block && f(w, "else"))
        this._flags.else_block = !0;
      else {
        for (; this._flags.mode === m.Statement; )
          this.restore_mode();
        this._flags.if_block = !1, this._flags.else_block = !1;
      }
    if (this._flags.in_case_statement && d(w, ["case", "default"])) {
      this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(w), this._flags.in_case = !0;
      return;
    }
    if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR) && !this.start_of_object_property() && !// start of object property is different for numeric values with +/- prefix operators
    (l(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === m.ObjectLiteral) && this.allow_wrap_or_preserved_newline(w), f(w, "function")) {
      (l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === s.OPERATOR)) && !this._output.just_added_blankline() && !w.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD ? d(this._flags.last_token, ["get", "set", "new", "export"]) || d(this._flags.last_token, T) ? this._output.space_before_token = !0 : f(this._flags.last_token, "default") && this._last_last_text === "export" ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" ? this._output.space_before_token = !0 : this.print_newline() : this._flags.last_token.type === s.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (O(this._flags.mode) || _(this._flags.mode)) || this.print_newline(), this.print_token(w), this._flags.last_word = w.text;
      return;
    }
    var $ = "NONE";
    if (this._flags.last_token.type === s.END_BLOCK ? this._previous_flags.inline_frame ? $ = "SPACE" : d(w, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && w.newlines ? $ = "NEWLINE" : ($ = "SPACE", this._output.space_before_token = !0) : $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && this._flags.mode === m.BlockStatement ? $ = "NEWLINE" : this._flags.last_token.type === s.SEMICOLON && O(this._flags.mode) ? $ = "SPACE" : this._flags.last_token.type === s.STRING ? $ = "NEWLINE" : this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === m.ObjectLiteral && l(this._last_last_text, ["{", ","])) ? $ = "SPACE" : this._flags.last_token.type === s.START_BLOCK ? this._flags.inline_frame ? $ = "SPACE" : $ = "NEWLINE" : this._flags.last_token.type === s.END_EXPR && (this._output.space_before_token = !0, $ = "NEWLINE"), d(w, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? $ = "SPACE" : $ = "NEWLINE"), d(w, ["else", "catch", "finally"]))
      if ((!(this._flags.last_token.type === s.END_BLOCK && this._previous_flags.mode === m.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && w.newlines) && !this._flags.inline_frame)
        this.print_newline();
      else {
        this._output.trim(!0);
        var A = this._output.current_line;
        A.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
      }
    else $ === "NEWLINE" ? d(this._flags.last_token, h) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && d(w, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== s.END_EXPR ? (this._flags.last_token.type !== s.START_EXPR || !d(w, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (f(w, "if") && f(w.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : d(w, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && _(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : $ === "SPACE" && (this._output.space_before_token = !0);
    w.previous && (w.previous.type === s.WORD || w.previous.type === s.RESERVED) && (this._output.space_before_token = !0), this.print_token(w), this._flags.last_word = w.text, w.type === s.RESERVED && (w.text === "do" ? this._flags.do_block = !0 : w.text === "if" ? this._flags.if_block = !0 : w.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && f(w, "from") && (this._flags.import_block = !1));
  }, C.prototype.handle_semicolon = function(w) {
    this.start_of_statement(w) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(w);
    for (var P = this._tokens.peek(); this._flags.mode === m.Statement && !(this._flags.if_block && f(P, "else")) && !this._flags.do_block; )
      this.restore_mode();
    this._flags.import_block && (this._flags.import_block = !1), this.print_token(w);
  }, C.prototype.handle_string = function(w) {
    w.text.startsWith("`") && w.newlines === 0 && w.whitespace_before === "" && (w.previous.text === ")" || this._flags.last_token.type === s.WORD) || (this.start_of_statement(w) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(w), this._flags.last_token.type === s.RESERVED || this._flags.last_token.type === s.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR || this._flags.last_token.type === s.EQUALS || this._flags.last_token.type === s.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(w) : w.text.startsWith("`") && this._flags.last_token.type === s.END_EXPR && (w.previous.text === "]" || w.previous.text === ")") && w.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(w);
  }, C.prototype.handle_equals = function(w) {
    this.start_of_statement(w) || this.handle_whitespace_and_comments(w), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
  }, C.prototype.handle_comma = function(w) {
    this.handle_whitespace_and_comments(w, !0), this.print_token(w), this._output.space_before_token = !0, this._flags.declaration_statement ? (O(this._flags.parent.mode) && (this._flags.declaration_assignment = !1), this._flags.declaration_assignment ? (this._flags.declaration_assignment = !1, this.print_newline(!1, !0)) : this._options.comma_first && this.allow_wrap_or_preserved_newline(w)) : this._flags.mode === m.ObjectLiteral || this._flags.mode === m.Statement && this._flags.parent.mode === m.ObjectLiteral ? (this._flags.mode === m.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(w);
  }, C.prototype.handle_operator = function(w) {
    var P = w.text === "*" && (d(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [s.START_BLOCK, s.COMMA, s.END_BLOCK, s.SEMICOLON])), $ = l(w.text, ["-", "+"]) && (l(this._flags.last_token.type, [s.START_BLOCK, s.START_EXPR, s.EQUALS, s.OPERATOR]) || l(this._flags.last_token.text, a) || this._flags.last_token.text === ",");
    if (!this.start_of_statement(w)) {
      var A = !P;
      this.handle_whitespace_and_comments(w, A);
    }
    if (w.text === "*" && this._flags.last_token.type === s.DOT) {
      this.print_token(w);
      return;
    }
    if (w.text === "::") {
      this.print_token(w);
      return;
    }
    if (l(w.text, ["-", "+"]) && this.start_of_object_property()) {
      this.print_token(w);
      return;
    }
    if (this._flags.last_token.type === s.OPERATOR && l(this._options.operator_position, g) && this.allow_wrap_or_preserved_newline(w), w.text === ":" && this._flags.in_case) {
      this.print_token(w), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== s.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
      return;
    }
    var D = !0, E = !0, R = !1;
    if (w.text === ":" ? this._flags.ternary_depth === 0 ? D = !1 : (this._flags.ternary_depth -= 1, R = !0) : w.text === "?" && (this._flags.ternary_depth += 1), !$ && !P && this._options.preserve_newlines && l(w.text, o)) {
      var N = w.text === ":", V = N && R, z = N && !R;
      switch (this._options.operator_position) {
        case v.before_newline:
          this._output.space_before_token = !z, this.print_token(w), (!N || V) && this.allow_wrap_or_preserved_newline(w), this._output.space_before_token = !0;
          return;
        case v.after_newline:
          this._output.space_before_token = !0, !N || V ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(w) : this._output.space_before_token = !1, this.print_token(w), this._output.space_before_token = !0;
          return;
        case v.preserve_newline:
          z || this.allow_wrap_or_preserved_newline(w), D = !(this._output.just_added_newline() || z), this._output.space_before_token = D, this.print_token(w), this._output.space_before_token = !0;
          return;
      }
    }
    if (P) {
      this.allow_wrap_or_preserved_newline(w), D = !1;
      var W = this._tokens.peek();
      E = W && l(W.type, [s.WORD, s.RESERVED]);
    } else if (w.text === "...")
      this.allow_wrap_or_preserved_newline(w), D = this._flags.last_token.type === s.START_BLOCK, E = !1;
    else if (l(w.text, ["--", "++", "!", "~"]) || $) {
      if ((this._flags.last_token.type === s.COMMA || this._flags.last_token.type === s.START_EXPR) && this.allow_wrap_or_preserved_newline(w), D = !1, E = !1, w.newlines && (w.text === "--" || w.text === "++" || w.text === "~")) {
        var F = d(this._flags.last_token, h) && w.newlines;
        F && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(F, !0);
      }
      this._flags.last_token.text === ";" && O(this._flags.mode) && (D = !0), this._flags.last_token.type === s.RESERVED ? D = !0 : this._flags.last_token.type === s.END_EXPR ? D = !(this._flags.last_token.text === "]" && (w.text === "--" || w.text === "++")) : this._flags.last_token.type === s.OPERATOR && (D = l(w.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(w.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (E = !0)), (this._flags.mode === m.BlockStatement && !this._flags.inline_frame || this._flags.mode === m.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
    }
    this._output.space_before_token = this._output.space_before_token || D, this.print_token(w), this._output.space_before_token = E;
  }, C.prototype.handle_block_comment = function(w, P) {
    if (this._output.raw) {
      this._output.add_raw_token(w), w.directives && w.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
      return;
    }
    if (w.directives) {
      this.print_newline(!1, P), this.print_token(w), w.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
      return;
    }
    if (!n.newline.test(w.text) && !w.newlines) {
      this._output.space_before_token = !0, this.print_token(w), this._output.space_before_token = !0;
      return;
    } else
      this.print_block_commment(w, P);
  }, C.prototype.print_block_commment = function(w, P) {
    var $ = b(w.text), A, D = !1, E = !1, R = w.whitespace_before, N = R.length;
    if (this.print_newline(!1, P), this.print_token_line_indentation(w), this._output.add_token($[0]), this.print_newline(!1, P), $.length > 1) {
      for ($ = $.slice(1), D = S($, "*"), E = x($, R), D && (this._flags.alignment = 1), A = 0; A < $.length; A++)
        D ? (this.print_token_line_indentation(w), this._output.add_token(u($[A]))) : E && $[A] ? (this.print_token_line_indentation(w), this._output.add_token($[A].substring(N))) : (this._output.current_line.set_indent(-1), this._output.add_token($[A])), this.print_newline(!1, P);
      this._flags.alignment = 0;
    }
  }, C.prototype.handle_comment = function(w, P) {
    w.newlines ? this.print_newline(!1, P) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(w), this.print_newline(!1, P);
  }, C.prototype.handle_dot = function(w) {
    this.start_of_statement(w) || this.handle_whitespace_and_comments(w, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), d(this._flags.last_token, h) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
      w,
      this._flags.last_token.text === ")" && this._options.break_chained_methods
    ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(w);
  }, C.prototype.handle_unknown = function(w, P) {
    this.print_token(w), w.text[w.text.length - 1] === `
` && this.print_newline(!1, P);
  }, C.prototype.handle_eof = function(w) {
    for (; this._flags.mode === m.Statement; )
      this.restore_mode();
    this.handle_whitespace_and_comments(w);
  }, F$.Beautifier = C, F$;
}
var IG;
function Aht() {
  if (IG) return d_.exports;
  IG = 1;
  var t = $ht().Beautifier, e = mle().Options;
  function n(r, i) {
    var a = new t(r, i);
    return a.beautify();
  }
  return d_.exports = n, d_.exports.defaultOptions = function() {
    return new e();
  }, d_.exports;
}
var v_ = { exports: {} }, K$ = {}, J$ = {}, DG;
function ble() {
  if (DG) return J$;
  DG = 1;
  var t = k4().Options;
  function e(n) {
    t.call(this, n, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
    var r = this._get_boolean("space_around_selector_separator");
    this.space_around_combinator = this._get_boolean("space_around_combinator") || r;
    var i = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
    this.brace_style = "collapse";
    for (var a = 0; a < i.length; a++)
      i[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = i[a];
  }
  return e.prototype = new t(), J$.Options = e, J$;
}
var RG;
function Eht() {
  if (RG) return K$;
  RG = 1;
  var t = ble().Options, e = R4().Output, n = L4().InputScanner, r = N4().Directives, i = new r(/\/\*/, /\*\//), a = /\r\n|[\r\n]/, o = /\r\n|[\r\n]/g, s = /\s/, l = /(?:\s|\n)+/g, u = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, c = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
  function f(d, h) {
    this._source_text = d || "", this._options = new t(h), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
      page: !0,
      "font-face": !0,
      keyframes: !0,
      // also in CONDITIONAL_GROUP_RULE below
      media: !0,
      supports: !0,
      document: !0
    }, this.CONDITIONAL_GROUP_RULE = {
      media: !0,
      supports: !0,
      document: !0
    }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
      "grid-template-areas",
      "grid-template"
    ];
  }
  return f.prototype.eatString = function(d) {
    var h = "";
    for (this._ch = this._input.next(); this._ch; ) {
      if (h += this._ch, this._ch === "\\")
        h += this._input.next();
      else if (d.indexOf(this._ch) !== -1 || this._ch === `
`)
        break;
      this._ch = this._input.next();
    }
    return h;
  }, f.prototype.eatWhitespace = function(d) {
    for (var h = s.test(this._input.peek()), p = 0; s.test(this._input.peek()); )
      this._ch = this._input.next(), d && this._ch === `
` && (p === 0 || p < this._options.max_preserve_newlines) && (p++, this._output.add_new_line(!0));
    return h;
  }, f.prototype.foundNestedPseudoClass = function() {
    for (var d = 0, h = 1, p = this._input.peek(h); p; ) {
      if (p === "{")
        return !0;
      if (p === "(")
        d += 1;
      else if (p === ")") {
        if (d === 0)
          return !1;
        d -= 1;
      } else if (p === ";" || p === "}")
        return !1;
      h++, p = this._input.peek(h);
    }
    return !1;
  }, f.prototype.print_string = function(d) {
    this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(d);
  }, f.prototype.preserveSingleSpace = function(d) {
    d && (this._output.space_before_token = !0);
  }, f.prototype.indent = function() {
    this._indentLevel++;
  }, f.prototype.outdent = function() {
    this._indentLevel > 0 && this._indentLevel--;
  }, f.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var d = this._source_text, h = this._options.eol;
    h === "auto" && (h = `
`, d && a.test(d || "") && (h = d.match(a)[0])), d = d.replace(o, `
`);
    var p = d.match(/^[\t ]*/)[0];
    this._output = new e(this._options, p), this._input = new n(d), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
    for (var v = 0, g = !1, m = !1, y = !1, b = !1, _ = !1, O = this._ch, S = !1, x, C, T; x = this._input.read(l), C = x !== "", T = O, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), O = this._ch, this._ch; )
      if (this._ch === "/" && this._input.peek() === "*") {
        this._output.add_new_line(), this._input.back();
        var w = this._input.read(u), P = i.get_directives(w);
        P && P.ignore === "start" && (w += i.readIgnored(this._input)), this.print_string(w), this.eatWhitespace(!0), this._output.add_new_line();
      } else if (this._ch === "/" && this._input.peek() === "/")
        this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(c)), this.eatWhitespace(!0);
      else if (this._ch === "$") {
        this.preserveSingleSpace(C), this.print_string(this._ch);
        var $ = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
        $.match(/[ :]$/) && ($ = this.eatString(": ").replace(/\s+$/, ""), this.print_string($), this._output.space_before_token = !0), v === 0 && $.indexOf(":") !== -1 && (m = !0, this.indent());
      } else if (this._ch === "@")
        if (this.preserveSingleSpace(C), this._input.peek() === "{")
          this.print_string(this._ch + this.eatString("}"));
        else {
          this.print_string(this._ch);
          var A = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
          A.match(/[ :]$/) && (A = this.eatString(": ").replace(/\s+$/, ""), this.print_string(A), this._output.space_before_token = !0), v === 0 && A.indexOf(":") !== -1 ? (m = !0, this.indent()) : A in this.NESTED_AT_RULE ? (this._nestedLevel += 1, A in this.CONDITIONAL_GROUP_RULE && (y = !0)) : v === 0 && !m && (b = !0);
        }
      else if (this._ch === "#" && this._input.peek() === "{")
        this.preserveSingleSpace(C), this.print_string(this._ch + this.eatString("}"));
      else if (this._ch === "{")
        m && (m = !1, this.outdent()), b = !1, y ? (y = !1, g = this._indentLevel >= this._nestedLevel) : g = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && g && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : (T === "(" ? this._output.space_before_token = !1 : T !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
      else if (this._ch === "}")
        this.outdent(), this._output.add_new_line(), T === "{" && this._output.trim(!0), m && (this.outdent(), m = !1), this.print_string(this._ch), g = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0), this._input.peek() === ")" && (this._output.trim(!0), this._options.brace_style === "expand" && this._output.add_new_line(!0));
      else if (this._ch === ":") {
        for (var D = 0; D < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; D++)
          if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[D])) {
            S = !0;
            break;
          }
        (g || y) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !b && v === 0 ? (this.print_string(":"), m || (m = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":"));
      } else if (this._ch === '"' || this._ch === "'") {
        var E = T === '"' || T === "'";
        this.preserveSingleSpace(E || C), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
      } else if (this._ch === ";")
        S = !1, v === 0 ? (m && (this.outdent(), m = !1), b = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0);
      else if (this._ch === "(")
        if (this._input.lookBack("url"))
          this.print_string(this._ch), this.eatWhitespace(), v++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), v && (v--, this.outdent()));
        else {
          var R = !1;
          this._input.lookBack("with") && (R = !0), this.preserveSingleSpace(C || R), this.print_string(this._ch), m && T === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), _ = !0) : (this.eatWhitespace(), v++, this.indent());
        }
      else if (this._ch === ")")
        v && (v--, this.outdent()), _ && this._input.peek() === ";" && this._options.selector_separator_newline && (_ = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
      else if (this._ch === ",")
        this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!m || _) && v === 0 && !b ? this._output.add_new_line() : this._output.space_before_token = !0;
      else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !m && v === 0)
        this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && s.test(this._ch) && (this._ch = ""));
      else if (this._ch === "]")
        this.print_string(this._ch);
      else if (this._ch === "[")
        this.preserveSingleSpace(C), this.print_string(this._ch);
      else if (this._ch === "=")
        this.eatWhitespace(), this.print_string("="), s.test(this._ch) && (this._ch = "");
      else if (this._ch === "!" && !this._input.lookBack("\\"))
        this._output.space_before_token = !0, this.print_string(this._ch);
      else {
        var N = T === '"' || T === "'";
        this.preserveSingleSpace(N || C), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
` && S && this._output.add_new_line();
      }
    var V = this._output.get_code(h);
    return V;
  }, K$.Beautifier = f, K$;
}
var kG;
function Mht() {
  if (kG) return v_.exports;
  kG = 1;
  var t = Eht().Beautifier, e = ble().Options;
  function n(r, i) {
    var a = new t(r, i);
    return a.beautify();
  }
  return v_.exports = n, v_.exports.defaultOptions = function() {
    return new e();
  }, v_.exports;
}
var g_ = { exports: {} }, e2 = {}, t2 = {}, LG;
function _le() {
  if (LG) return t2;
  LG = 1;
  var t = k4().Options;
  function e(n) {
    t.call(this, n, "html"), this.templating.length === 1 && this.templating[0] === "auto" && (this.templating = ["django", "erb", "handlebars", "php"]), this.indent_inner_html = this._get_boolean("indent_inner_html"), this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", !0), this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", !0), this.indent_handlebars = this._get_boolean("indent_handlebars", !0), this.wrap_attributes = this._get_selection(
      "wrap_attributes",
      ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
    ), this.wrap_attributes_min_attrs = this._get_number("wrap_attributes_min_attrs", 2), this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size), this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]), this.inline = this._get_array("inline", [
      "a",
      "abbr",
      "area",
      "audio",
      "b",
      "bdi",
      "bdo",
      "br",
      "button",
      "canvas",
      "cite",
      "code",
      "data",
      "datalist",
      "del",
      "dfn",
      "em",
      "embed",
      "i",
      "iframe",
      "img",
      "input",
      "ins",
      "kbd",
      "keygen",
      "label",
      "map",
      "mark",
      "math",
      "meter",
      "noscript",
      "object",
      "output",
      "progress",
      "q",
      "ruby",
      "s",
      "samp",
      /* 'script', */
      "select",
      "small",
      "span",
      "strong",
      "sub",
      "sup",
      "svg",
      "template",
      "textarea",
      "time",
      "u",
      "var",
      "video",
      "wbr",
      "text",
      // obsolete inline tags
      "acronym",
      "big",
      "strike",
      "tt"
    ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
      // HTLM void elements - aka self-closing tags - aka singletons
      // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
      "area",
      "base",
      "br",
      "col",
      "embed",
      "hr",
      "img",
      "input",
      "keygen",
      "link",
      "menuitem",
      "meta",
      "param",
      "source",
      "track",
      "wbr",
      // NOTE: Optional tags are too complex for a simple list
      // they are hard coded in _do_optional_end_element
      // Doctype and xml elements
      "!doctype",
      "?xml",
      // obsolete tags
      // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
      // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
      "basefont",
      "isindex"
    ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
      "pre",
      "textarea"
    ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
  }
  return e.prototype = new t(), t2.Options = e, t2;
}
var m_ = {}, NG;
function BG() {
  if (NG) return m_;
  NG = 1;
  var t = CS().Tokenizer, e = CS().TOKEN, n = N4().Directives, r = yle().TemplatablePattern, i = Qw().Pattern, a = {
    TAG_OPEN: "TK_TAG_OPEN",
    TAG_CLOSE: "TK_TAG_CLOSE",
    CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
    CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
    ATTRIBUTE: "TK_ATTRIBUTE",
    EQUALS: "TK_EQUALS",
    VALUE: "TK_VALUE",
    COMMENT: "TK_COMMENT",
    TEXT: "TK_TEXT",
    UNKNOWN: "TK_UNKNOWN",
    START: e.START,
    RAW: e.RAW,
    EOF: e.EOF
  }, o = new n(/<\!--/, /-->/), s = function(l, u) {
    t.call(this, l, u), this._current_tag_name = "";
    var c = new r(this._input).read_options(this._options), f = new i(this._input);
    if (this.__patterns = {
      word: c.until(/[\n\r\t <]/),
      word_control_flow_close_excluded: c.until(/[\n\r\t <}]/),
      single_quote: c.until_after(/'/),
      double_quote: c.until_after(/"/),
      attribute: c.until(/[\n\r\t =>]|\/>/),
      element_name: c.until(/[\n\r\t >\/]/),
      angular_control_flow_start: f.matching(/\@[a-zA-Z]+[^({]*[({]/),
      handlebars_comment: f.starting_with(/{{!--/).until_after(/--}}/),
      handlebars: f.starting_with(/{{/).until_after(/}}/),
      handlebars_open: f.until(/[\n\r\t }]/),
      handlebars_raw_close: f.until(/}}/),
      comment: f.starting_with(/<!--/).until_after(/-->/),
      cdata: f.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
      // https://en.wikipedia.org/wiki/Conditional_comment
      conditional_comment: f.starting_with(/<!\[/).until_after(/]>/),
      processing: f.starting_with(/<\?/).until_after(/\?>/)
    }, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars"), this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
      var d = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
      this.__patterns.unformatted_content_delimiter = f.matching(d).until_after(d);
    }
  };
  return s.prototype = new t(), s.prototype._is_comment = function(l) {
    return !1;
  }, s.prototype._is_opening = function(l) {
    return l.type === a.TAG_OPEN || l.type === a.CONTROL_FLOW_OPEN;
  }, s.prototype._is_closing = function(l, u) {
    return l.type === a.TAG_CLOSE && u && ((l.text === ">" || l.text === "/>") && u.text[0] === "<" || l.text === "}}" && u.text[0] === "{" && u.text[1] === "{") || l.type === a.CONTROL_FLOW_CLOSE && l.text === "}" && u.text.endsWith("{");
  }, s.prototype._reset = function() {
    this._current_tag_name = "";
  }, s.prototype._get_next_token = function(l, u) {
    var c = null;
    this._readWhitespace();
    var f = this._input.peek();
    return f === null ? this._create_token(a.EOF, "") : (c = c || this._read_open_handlebars(f, u), c = c || this._read_attribute(f, l, u), c = c || this._read_close(f, u), c = c || this._read_control_flows(f, u), c = c || this._read_raw_content(f, l, u), c = c || this._read_content_word(f, u), c = c || this._read_comment_or_cdata(f), c = c || this._read_processing(f), c = c || this._read_open(f, u), c = c || this._create_token(a.UNKNOWN, this._input.next()), c);
  }, s.prototype._read_comment_or_cdata = function(l) {
    var u = null, c = null, f = null;
    if (l === "<") {
      var d = this._input.peek(1);
      d === "!" && (c = this.__patterns.comment.read(), c ? (f = o.get_directives(c), f && f.ignore === "start" && (c += o.readIgnored(this._input))) : c = this.__patterns.cdata.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
    }
    return u;
  }, s.prototype._read_processing = function(l) {
    var u = null, c = null, f = null;
    if (l === "<") {
      var d = this._input.peek(1);
      (d === "!" || d === "?") && (c = this.__patterns.conditional_comment.read(), c = c || this.__patterns.processing.read()), c && (u = this._create_token(a.COMMENT, c), u.directives = f);
    }
    return u;
  }, s.prototype._read_open = function(l, u) {
    var c = null, f = null;
    return (!u || u.type === a.CONTROL_FLOW_OPEN) && l === "<" && (c = this._input.next(), this._input.peek() === "/" && (c += this._input.next()), c += this.__patterns.element_name.read(), f = this._create_token(a.TAG_OPEN, c)), f;
  }, s.prototype._read_open_handlebars = function(l, u) {
    var c = null, f = null;
    return (!u || u.type === a.CONTROL_FLOW_OPEN) && this._options.indent_handlebars && l === "{" && this._input.peek(1) === "{" && (this._input.peek(2) === "!" ? (c = this.__patterns.handlebars_comment.read(), c = c || this.__patterns.handlebars.read(), f = this._create_token(a.COMMENT, c)) : (c = this.__patterns.handlebars_open.read(), f = this._create_token(a.TAG_OPEN, c))), f;
  }, s.prototype._read_control_flows = function(l, u) {
    var c = "", f = null;
    if (!this._options.templating.includes("angular") || !this._options.indent_handlebars)
      return f;
    if (l === "@") {
      if (c = this.__patterns.angular_control_flow_start.read(), c === "")
        return f;
      for (var d = c.endsWith("(") ? 1 : 0, h = 0; !(c.endsWith("{") && d === h); ) {
        var p = this._input.next();
        if (p === null)
          break;
        p === "(" ? d++ : p === ")" && h++, c += p;
      }
      f = this._create_token(a.CONTROL_FLOW_OPEN, c);
    } else l === "}" && u && u.type === a.CONTROL_FLOW_OPEN && (c = this._input.next(), f = this._create_token(a.CONTROL_FLOW_CLOSE, c));
    return f;
  }, s.prototype._read_close = function(l, u) {
    var c = null, f = null;
    return u && u.type === a.TAG_OPEN && (u.text[0] === "<" && (l === ">" || l === "/" && this._input.peek(1) === ">") ? (c = this._input.next(), l === "/" && (c += this._input.next()), f = this._create_token(a.TAG_CLOSE, c)) : u.text[0] === "{" && l === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), f = this._create_token(a.TAG_CLOSE, "}}"))), f;
  }, s.prototype._read_attribute = function(l, u, c) {
    var f = null, d = "";
    if (c && c.text[0] === "<")
      if (l === "=")
        f = this._create_token(a.EQUALS, this._input.next());
      else if (l === '"' || l === "'") {
        var h = this._input.next();
        l === '"' ? h += this.__patterns.double_quote.read() : h += this.__patterns.single_quote.read(), f = this._create_token(a.VALUE, h);
      } else
        d = this.__patterns.attribute.read(), d && (u.type === a.EQUALS ? f = this._create_token(a.VALUE, d) : f = this._create_token(a.ATTRIBUTE, d));
    return f;
  }, s.prototype._is_content_unformatted = function(l) {
    return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
  }, s.prototype._read_raw_content = function(l, u, c) {
    var f = "";
    if (c && c.text[0] === "{")
      f = this.__patterns.handlebars_raw_close.read();
    else if (u.type === a.TAG_CLOSE && u.opened.text[0] === "<" && u.text[0] !== "/") {
      var d = u.opened.text.substr(1).toLowerCase();
      if (d === "script" || d === "style") {
        var h = this._read_comment_or_cdata(l);
        if (h)
          return h.type = a.TEXT, h;
        f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig"));
      } else this._is_content_unformatted(d) && (f = this._input.readUntil(new RegExp("</" + d + "[\\n\\r\\t ]*?>", "ig")));
    }
    return f ? this._create_token(a.TEXT, f) : null;
  }, s.prototype._read_content_word = function(l, u) {
    var c = "";
    if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (c = this.__patterns.unformatted_content_delimiter.read()), c || (c = u && u.type === a.CONTROL_FLOW_OPEN ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read()), c)
      return this._create_token(a.TEXT, c);
  }, m_.Tokenizer = s, m_.TOKEN = a, m_;
}
var zG;
function Iht() {
  if (zG) return e2;
  zG = 1;
  var t = _le().Options, e = R4().Output, n = BG().Tokenizer, r = BG().TOKEN, i = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, o = function(g, m) {
    this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = g.max_preserve_newlines, this.preserve_newlines = g.preserve_newlines, this._output = new e(g, m);
  };
  o.prototype.current_line_has_match = function(g) {
    return this._output.current_line.has_match(g);
  }, o.prototype.set_space_before_token = function(g, m) {
    this._output.space_before_token = g, this._output.non_breaking_space = m;
  }, o.prototype.set_wrap_point = function() {
    this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
  }, o.prototype.add_raw_token = function(g) {
    this._output.add_raw_token(g);
  }, o.prototype.print_preserved_newlines = function(g) {
    var m = 0;
    g.type !== r.TEXT && g.previous.type !== r.TEXT && (m = g.newlines ? 1 : 0), this.preserve_newlines && (m = g.newlines < this.max_preserve_newlines + 1 ? g.newlines : this.max_preserve_newlines + 1);
    for (var y = 0; y < m; y++)
      this.print_newline(y > 0);
    return m !== 0;
  }, o.prototype.traverse_whitespace = function(g) {
    return g.whitespace_before || g.newlines ? (this.print_preserved_newlines(g) || (this._output.space_before_token = !0), !0) : !1;
  }, o.prototype.previous_token_wrapped = function() {
    return this._output.previous_token_wrapped;
  }, o.prototype.print_newline = function(g) {
    this._output.add_new_line(g);
  }, o.prototype.print_token = function(g) {
    g.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(g.text));
  }, o.prototype.indent = function() {
    this.indent_level++;
  }, o.prototype.deindent = function() {
    this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
  }, o.prototype.get_full_indent = function(g) {
    return g = this.indent_level + (g || 0), g < 1 ? "" : this._output.get_indent_string(g);
  };
  var s = function(g) {
    for (var m = null, y = g.next; y.type !== r.EOF && g.closed !== y; ) {
      if (y.type === r.ATTRIBUTE && y.text === "type") {
        y.next && y.next.type === r.EQUALS && y.next.next && y.next.next.type === r.VALUE && (m = y.next.next.text);
        break;
      }
      y = y.next;
    }
    return m;
  }, l = function(g, m) {
    var y = null, b = null;
    return m.closed ? (g === "script" ? y = "text/javascript" : g === "style" && (y = "text/css"), y = s(m) || y, y.search("text/css") > -1 ? b = "css" : y.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? b = "javascript" : y.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? b = "html" : y.search(/test\/null/) > -1 && (b = "null"), b) : null;
  };
  function u(g, m) {
    return m.indexOf(g) !== -1;
  }
  function c(g, m, y) {
    this.parent = g || null, this.tag = m ? m.tag_name : "", this.indent_level = y || 0, this.parser_token = m || null;
  }
  function f(g) {
    this._printer = g, this._current_frame = null;
  }
  f.prototype.get_parser_token = function() {
    return this._current_frame ? this._current_frame.parser_token : null;
  }, f.prototype.record_tag = function(g) {
    var m = new c(this._current_frame, g, this._printer.indent_level);
    this._current_frame = m;
  }, f.prototype._try_pop_frame = function(g) {
    var m = null;
    return g && (m = g.parser_token, this._printer.indent_level = g.indent_level, this._current_frame = g.parent), m;
  }, f.prototype._get_frame = function(g, m) {
    for (var y = this._current_frame; y && g.indexOf(y.tag) === -1; ) {
      if (m && m.indexOf(y.tag) !== -1) {
        y = null;
        break;
      }
      y = y.parent;
    }
    return y;
  }, f.prototype.try_pop = function(g, m) {
    var y = this._get_frame([g], m);
    return this._try_pop_frame(y);
  }, f.prototype.indent_to_tag = function(g) {
    var m = this._get_frame(g);
    m && (this._printer.indent_level = m.indent_level);
  };
  function d(g, m, y, b) {
    this._source_text = g || "", m = m || {}, this._js_beautify = y, this._css_beautify = b, this._tag_stack = null;
    var _ = new t(m, "html");
    this._options = _, this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 5) === "force", this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline", this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned", this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple", this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 8) === "preserve", this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
  }
  d.prototype.beautify = function() {
    if (this._options.disabled)
      return this._source_text;
    var g = this._source_text, m = this._options.eol;
    this._options.eol === "auto" && (m = `
`, g && i.test(g) && (m = g.match(i)[0])), g = g.replace(a, `
`);
    var y = g.match(/^[\t ]*/)[0], b = {
      text: "",
      type: ""
    }, _ = new h(), O = new o(this._options, y), S = new n(g, this._options).tokenize();
    this._tag_stack = new f(O);
    for (var x = null, C = S.next(); C.type !== r.EOF; )
      C.type === r.TAG_OPEN || C.type === r.COMMENT ? (x = this._handle_tag_open(O, C, _, b, S), _ = x) : C.type === r.ATTRIBUTE || C.type === r.EQUALS || C.type === r.VALUE || C.type === r.TEXT && !_.tag_complete ? x = this._handle_inside_tag(O, C, _, b) : C.type === r.TAG_CLOSE ? x = this._handle_tag_close(O, C, _) : C.type === r.TEXT ? x = this._handle_text(O, C, _) : C.type === r.CONTROL_FLOW_OPEN ? x = this._handle_control_flow_open(O, C) : C.type === r.CONTROL_FLOW_CLOSE ? x = this._handle_control_flow_close(O, C) : O.add_raw_token(C), b = x, C = S.next();
    var T = O._output.get_code(m);
    return T;
  }, d.prototype._handle_control_flow_open = function(g, m) {
    var y = {
      text: m.text,
      type: m.type
    };
    return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), g.indent(), y;
  }, d.prototype._handle_control_flow_close = function(g, m) {
    var y = {
      text: m.text,
      type: m.type
    };
    return g.deindent(), m.newlines ? g.print_preserved_newlines(m) : g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), g.print_token(m), y;
  }, d.prototype._handle_tag_close = function(g, m, y) {
    var b = {
      text: m.text,
      type: m.type
    };
    return g.alignment_size = 0, y.tag_complete = !0, g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : (y.tag_start_char === "<" && (g.set_space_before_token(m.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && y.has_wrapped_attrs && g.print_newline(!1)), g.print_token(m)), y.indent_content && !(y.is_unformatted || y.is_content_unformatted) && (g.indent(), y.indent_content = !1), !y.is_inline_element && !(y.is_unformatted || y.is_content_unformatted) && g.set_wrap_point(), b;
  }, d.prototype._handle_inside_tag = function(g, m, y, b) {
    var _ = y.has_wrapped_attrs, O = {
      text: m.text,
      type: m.type
    };
    return g.set_space_before_token(m.newlines || m.whitespace_before !== "", !0), y.is_unformatted ? g.add_raw_token(m) : y.tag_start_char === "{" && m.type === r.TEXT ? g.print_preserved_newlines(m) ? (m.newlines = 0, g.add_raw_token(m)) : g.print_token(m) : (m.type === r.ATTRIBUTE ? g.set_space_before_token(!0) : (m.type === r.EQUALS || m.type === r.VALUE && m.previous.type === r.EQUALS) && g.set_space_before_token(!1), m.type === r.ATTRIBUTE && y.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (g.traverse_whitespace(m), _ = _ || m.newlines !== 0), this._is_wrap_attributes_force && y.attr_count >= this._options.wrap_attributes_min_attrs && (b.type !== r.TAG_OPEN || // ie. second attribute and beyond
    this._is_wrap_attributes_force_expand_multiline) && (g.print_newline(!1), _ = !0)), g.print_token(m), _ = _ || g.previous_token_wrapped(), y.has_wrapped_attrs = _), O;
  }, d.prototype._handle_text = function(g, m, y) {
    var b = {
      text: m.text,
      type: "TK_CONTENT"
    };
    return y.custom_beautifier_name ? this._print_custom_beatifier_text(g, m, y) : y.is_unformatted || y.is_content_unformatted ? g.add_raw_token(m) : (g.traverse_whitespace(m), g.print_token(m)), b;
  }, d.prototype._print_custom_beatifier_text = function(g, m, y) {
    var b = this;
    if (m.text !== "") {
      var _ = m.text, O, S = 1, x = "", C = "";
      y.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? O = this._js_beautify : y.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? O = this._css_beautify : y.custom_beautifier_name === "html" && (O = function(D, E) {
        var R = new d(D, E, b._js_beautify, b._css_beautify);
        return R.beautify();
      }), this._options.indent_scripts === "keep" ? S = 0 : this._options.indent_scripts === "separate" && (S = -g.indent_level);
      var T = g.get_full_indent(S);
      if (_ = _.replace(/\n[ \t]*$/, ""), y.custom_beautifier_name !== "html" && _[0] === "<" && _.match(/^(<!--|<!\[CDATA\[)/)) {
        var w = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(_);
        if (!w) {
          g.add_raw_token(m);
          return;
        }
        x = T + w[1] + `
`, _ = w[4], w[5] && (C = T + w[5]), _ = _.replace(/\n[ \t]*$/, ""), (w[2] || w[3].indexOf(`
`) !== -1) && (w = w[3].match(/[ \t]+$/), w && (m.whitespace_before = w[0]));
      }
      if (_)
        if (O) {
          var P = function() {
            this.eol = `
`;
          };
          P.prototype = this._options.raw_options;
          var $ = new P();
          _ = O(T + _, $);
        } else {
          var A = m.whitespace_before;
          A && (_ = _.replace(new RegExp(`
(` + A + ")?", "g"), `
`)), _ = T + _.replace(/\n/g, `
` + T);
        }
      x && (_ ? _ = x + _ + `
` + C : _ = x + C), g.print_newline(!1), _ && (m.text = _, m.whitespace_before = "", m.newlines = 0, g.add_raw_token(m), g.print_newline(!0));
    }
  }, d.prototype._handle_tag_open = function(g, m, y, b, _) {
    var O = this._get_tag_open_token(m);
    if ((y.is_unformatted || y.is_content_unformatted) && !y.is_empty_element && m.type === r.TAG_OPEN && !O.is_start_tag ? (g.add_raw_token(m), O.start_tag_token = this._tag_stack.try_pop(O.tag_name)) : (g.traverse_whitespace(m), this._set_tag_position(g, m, O, y, b), O.is_inline_element || g.set_wrap_point(), g.print_token(m)), O.is_start_tag && this._is_wrap_attributes_force) {
      var S = 0, x;
      do
        x = _.peek(S), x.type === r.ATTRIBUTE && (O.attr_count += 1), S += 1;
      while (x.type !== r.EOF && x.type !== r.TAG_CLOSE);
    }
    return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (O.alignment_size = m.text.length + 1), !O.tag_complete && !O.is_unformatted && (g.alignment_size = O.alignment_size), O;
  };
  var h = function(g, m) {
    if (this.parent = g || null, this.text = "", this.type = "TK_TAG_OPEN", this.tag_name = "", this.is_inline_element = !1, this.is_unformatted = !1, this.is_content_unformatted = !1, this.is_empty_element = !1, this.is_start_tag = !1, this.is_end_tag = !1, this.indent_content = !1, this.multiline_content = !1, this.custom_beautifier_name = null, this.start_tag_token = null, this.attr_count = 0, this.has_wrapped_attrs = !1, this.alignment_size = 0, this.tag_complete = !1, this.tag_start_char = "", this.tag_check = "", !m)
      this.tag_complete = !0;
    else {
      var y;
      this.tag_start_char = m.text[0], this.text = m.text, this.tag_start_char === "<" ? (y = m.text.match(/^<([^\s>]*)/), this.tag_check = y ? y[1] : "") : (y = m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/), this.tag_check = y ? y[1] : "", (m.text.startsWith("{{#>") || m.text.startsWith("{{~#>")) && this.tag_check[0] === ">" && (this.tag_check === ">" && m.next !== null ? this.tag_check = m.next.text.split(" ")[0] : this.tag_check = m.text.split(">")[1])), this.tag_check = this.tag_check.toLowerCase(), m.type === r.COMMENT && (this.tag_complete = !0), this.is_start_tag = this.tag_check.charAt(0) !== "/", this.tag_name = this.is_start_tag ? this.tag_check : this.tag_check.substr(1), this.is_end_tag = !this.is_start_tag || m.closed && m.closed.text === "/>";
      var b = 2;
      this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (b = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(b)));
    }
  };
  d.prototype._get_tag_open_token = function(g) {
    var m = new h(this._tag_stack.get_parser_token(), g);
    return m.alignment_size = this._options.wrap_attributes_indent_size, m.is_end_tag = m.is_end_tag || u(m.tag_check, this._options.void_elements), m.is_empty_element = m.tag_complete || m.is_start_tag && m.is_end_tag, m.is_unformatted = !m.tag_complete && u(m.tag_check, this._options.unformatted), m.is_content_unformatted = !m.is_empty_element && u(m.tag_check, this._options.content_unformatted), m.is_inline_element = u(m.tag_name, this._options.inline) || this._options.inline_custom_elements && m.tag_name.includes("-") || m.tag_start_char === "{", m;
  }, d.prototype._set_tag_position = function(g, m, y, b, _) {
    if (y.is_empty_element || (y.is_end_tag ? y.start_tag_token = this._tag_stack.try_pop(y.tag_name) : (this._do_optional_end_element(y) && (y.is_inline_element || g.print_newline(!1)), this._tag_stack.record_tag(y), (y.tag_name === "script" || y.tag_name === "style") && !(y.is_unformatted || y.is_content_unformatted) && (y.custom_beautifier_name = l(y.tag_check, m)))), u(y.tag_check, this._options.extra_liners) && (g.print_newline(!1), g._output.just_added_blankline() || g.print_newline(!0)), y.is_empty_element) {
      if (y.tag_start_char === "{" && y.tag_check === "else") {
        this._tag_stack.indent_to_tag(["if", "unless", "each"]), y.indent_content = !0;
        var O = g.current_line_has_match(/{{#if/);
        O || g.print_newline(!1);
      }
      y.tag_name === "!--" && _.type === r.TAG_CLOSE && b.is_end_tag && y.text.indexOf(`
`) === -1 || (y.is_inline_element || y.is_unformatted || g.print_newline(!1), this._calcluate_parent_multiline(g, y));
    } else if (y.is_end_tag) {
      var S = !1;
      S = y.start_tag_token && y.start_tag_token.multiline_content, S = S || !y.is_inline_element && !(b.is_inline_element || b.is_unformatted) && !(_.type === r.TAG_CLOSE && y.start_tag_token === b) && _.type !== "TK_CONTENT", (y.is_content_unformatted || y.is_unformatted) && (S = !1), S && g.print_newline(!1);
    } else
      y.indent_content = !y.custom_beautifier_name, y.tag_start_char === "<" && (y.tag_name === "html" ? y.indent_content = this._options.indent_inner_html : y.tag_name === "head" ? y.indent_content = this._options.indent_head_inner_html : y.tag_name === "body" && (y.indent_content = this._options.indent_body_inner_html)), !(y.is_inline_element || y.is_unformatted) && (_.type !== "TK_CONTENT" || y.is_content_unformatted) && g.print_newline(!1), this._calcluate_parent_multiline(g, y);
  }, d.prototype._calcluate_parent_multiline = function(g, m) {
    m.parent && g._output.just_added_newline() && !((m.is_inline_element || m.is_unformatted) && m.parent.is_inline_element) && (m.parent.multiline_content = !0);
  };
  var p = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"], v = ["a", "audio", "del", "ins", "map", "noscript", "video"];
  return d.prototype._do_optional_end_element = function(g) {
    var m = null;
    if (!(g.is_empty_element || !g.is_start_tag || !g.parent)) {
      if (g.tag_name === "body")
        m = m || this._tag_stack.try_pop("head");
      else if (g.tag_name === "li")
        m = m || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
      else if (g.tag_name === "dd" || g.tag_name === "dt")
        m = m || this._tag_stack.try_pop("dt", ["dl"]), m = m || this._tag_stack.try_pop("dd", ["dl"]);
      else if (g.parent.tag_name === "p" && p.indexOf(g.tag_name) !== -1) {
        var y = g.parent.parent;
        (!y || v.indexOf(y.tag_name) === -1) && (m = m || this._tag_stack.try_pop("p"));
      } else g.tag_name === "rp" || g.tag_name === "rt" ? (m = m || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), m = m || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : g.tag_name === "optgroup" ? m = m || this._tag_stack.try_pop("optgroup", ["select"]) : g.tag_name === "option" ? m = m || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : g.tag_name === "colgroup" ? m = m || this._tag_stack.try_pop("caption", ["table"]) : g.tag_name === "thead" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"])) : g.tag_name === "tbody" || g.tag_name === "tfoot" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("thead", ["table"]), m = m || this._tag_stack.try_pop("tbody", ["table"])) : g.tag_name === "tr" ? (m = m || this._tag_stack.try_pop("caption", ["table"]), m = m || this._tag_stack.try_pop("colgroup", ["table"]), m = m || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (g.tag_name === "th" || g.tag_name === "td") && (m = m || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), m = m || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
      return g.parent = this._tag_stack.get_parser_token(), m;
    }
  }, e2.Beautifier = d, e2;
}
var VG;
function Dht() {
  if (VG) return g_.exports;
  VG = 1;
  var t = Iht().Beautifier, e = _le().Options;
  function n(r, i, a, o) {
    var s = new t(r, i, a, o);
    return s.beautify();
  }
  return g_.exports = n, g_.exports.defaultOptions = function() {
    return new e();
  }, g_.exports;
}
var FG;
function Rht() {
  if (FG) return Rv;
  FG = 1;
  var t = Aht(), e = Mht(), n = Dht();
  function r(i, a, o, s) {
    return o = o || t, s = s || e, n(i, a, o, s);
  }
  return r.defaultOptions = n.defaultOptions, Rv.js = t, Rv.css = e, Rv.html = r, Rv;
}
(function(t) {
  function e(n, r, i) {
    var a = function(o, s) {
      return n.js_beautify(o, s);
    };
    return a.js = n.js_beautify, a.css = r.css_beautify, a.html = i.html_beautify, a.js_beautify = n.js_beautify, a.css_beautify = r.css_beautify, a.html_beautify = i.html_beautify, a;
  }
  (function(n) {
    var r = Rht();
    r.js_beautify = r.js, r.css_beautify = r.css, r.html_beautify = r.html, n.exports = e(r, r, r);
  })(t);
})(ple);
var kht = ple.exports;
const Lht = /* @__PURE__ */ vx(kht), Nht = /* @__PURE__ */ te({
  __name: "Editor",
  props: {
    code: {
      type: String,
      default: ""
    }
  },
  emits: ["update:code", "change"],
  setup(t, { emit: e }) {
    const n = t, r = e, i = U(null), a = U(n.code);
    se(
      () => n.code,
      (s) => {
        a.value = Lht.js(s, { indent_size: 2 });
      },
      { immediate: !0 }
    );
    const o = (s) => {
      try {
        r("update:code", s), r("change", s);
      } catch (l) {
        console.error(l);
        return;
      }
    };
    return (s, l) => (pe(), je(B(vdt), {
      ref_key: "editorRef",
      ref: i,
      placeholder: "请输入",
      style: { height: "500px" },
      "model-value": a.value,
      "tab-size": 2,
      "auto-focus": !0,
      "indent-with-tabs": !0,
      extensions: [
        B(Tdt),
        B(yht)(),
        B(Cht)()
      ],
      onChange: o
    }, null, 8, ["model-value", "extensions"]));
  }
}), Bht = /* @__PURE__ */ te({
  __name: "index",
  props: {
    title: { default: "编辑" },
    width: { default: 800 }
  },
  emits: ["ok"],
  setup(t, { expose: e, emit: n }) {
    const r = n, i = U(!1), a = U(""), o = () => {
      r("ok", a.value), i.value = !1;
    };
    return e({
      open: (s) => {
        i.value = !0, a.value = s;
      },
      close: () => {
        i.value = !1;
      }
    }), (s, l) => (pe(), je(B(Hi), {
      open: i.value,
      "onUpdate:open": l[1] || (l[1] = (u) => i.value = u),
      title: s.title,
      width: s.width,
      onOk: o
    }, {
      default: we(() => [
        M(Nht, {
          code: a.value,
          "onUpdate:code": l[0] || (l[0] = (u) => a.value = u)
        }, null, 8, ["code"])
      ]),
      _: 1
    }, 8, ["open", "title", "width"]));
  }
}), zht = /* @__PURE__ */ He("span", { class: "text-gray-500" }, "秒", -1), B4 = /* @__PURE__ */ te({
  __name: "DataConfig",
  props: {
    dataSource: {}
  },
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = e, r = t, i = U({
      sourceType: Ri.STATIC,
      // 静态数据相关
      data: "",
      // 接口相关
      url: "",
      method: "",
      params: {},
      headers: {},
      refreshTime: 0,
      // 数据处理
      dataProcess: ""
    }), a = (c) => {
      i.value.refreshTime = c === 0 || c >= 60 ? c : 60;
    };
    let o;
    const s = U(null), l = (c) => {
      var f;
      o = c, (f = s.value) == null || f.open(JSON.stringify(i.value[c]));
    }, u = (c) => {
      i.value[o] = JSON.parse(c);
    };
    return se(
      () => r.dataSource,
      (c) => {
        Object.assign(i.value, c || {});
      },
      { immediate: !0 }
    ), se(
      () => i.value,
      (c) => {
        n("change", c);
      },
      { deep: !0 }
    ), (c, f) => (pe(), Qe(wt, null, [
      M(B(dr), {
        size: "small",
        layout: "horizontal",
        model: i.value,
        "label-col": { span: 8 },
        "wrapper-col": { span: 16 }
      }, {
        default: we(() => [
          M(B(dr).Item, {
            label: "类型",
            name: "sourceType"
          }, {
            default: we(() => [
              M(B(ci), {
                value: i.value.sourceType,
                "onUpdate:value": f[0] || (f[0] = (d) => i.value.sourceType = d)
              }, {
                default: we(() => [
                  M(B(M1), {
                    value: B(Ri).STATIC
                  }, {
                    default: we(() => [
                      Kt("静态数据")
                    ]),
                    _: 1
                  }, 8, ["value"]),
                  M(B(M1), {
                    value: B(Ri).API
                  }, {
                    default: we(() => [
                      Kt("动态数据")
                    ]),
                    _: 1
                  }, 8, ["value"])
                ]),
                _: 1
              }, 8, ["value"])
            ]),
            _: 1
          }),
          i.value.sourceType === B(Ri).STATIC ? (pe(), je(B(dr).Item, {
            key: 0,
            label: "数据",
            name: "data"
          }, {
            default: we(() => [
              M(B(Ur), {
                type: "default",
                size: "small",
                onClick: f[1] || (f[1] = (d) => l("data"))
              }, {
                default: we(() => [
                  Kt("编辑")
                ]),
                _: 1
              })
            ]),
            _: 1
          })) : i.value.sourceType === B(Ri).API ? (pe(), Qe(wt, { key: 1 }, [
            M(B(dr).Item, {
              label: "接口地址",
              name: "url"
            }, {
              default: we(() => [
                M(B(Hn).TextArea, {
                  "auto-size": { minRows: 5 },
                  placeholder: "请输入接口地址",
                  value: i.value.url,
                  "onUpdate:value": f[2] || (f[2] = (d) => i.value.url = d)
                }, null, 8, ["value"])
              ]),
              _: 1
            }),
            M(B(dr).Item, {
              label: "请求方式",
              name: "method"
            }, {
              default: we(() => [
                M(B(vf), {
                  value: i.value.method,
                  "onUpdate:value": f[3] || (f[3] = (d) => i.value.method = d)
                }, {
                  default: we(() => [
                    M(B(fi), { value: "GET" }, {
                      default: we(() => [
                        Kt("GET")
                      ]),
                      _: 1
                    }),
                    M(B(fi), { value: "POST" }, {
                      default: we(() => [
                        Kt("POST")
                      ]),
                      _: 1
                    })
                  ]),
                  _: 1
                }, 8, ["value"])
              ]),
              _: 1
            }),
            M(B(dr).Item, {
              label: "刷新时间",
              name: "refreshTime"
            }, {
              default: we(() => [
                M(B(O0), {
                  value: i.value.refreshTime,
                  "onUpdate:value": f[4] || (f[4] = (d) => i.value.refreshTime = d),
                  step: 1,
                  style: { width: "100%" },
                  onChange: a
                }, {
                  addonAfter: we(() => [
                    zht
                  ]),
                  _: 1
                }, 8, ["value"])
              ]),
              _: 1
            }),
            M(B(dr).Item, {
              label: "请求参数",
              name: "params"
            }, {
              default: we(() => [
                M(B(Ur), {
                  type: "default",
                  size: "small",
                  onClick: f[5] || (f[5] = (d) => l("params"))
                }, {
                  default: we(() => [
                    Kt("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            M(B(dr).Item, {
              label: "请求头",
              name: "headers"
            }, {
              default: we(() => [
                M(B(Ur), {
                  type: "default",
                  size: "small",
                  onClick: f[6] || (f[6] = (d) => l("headers"))
                }, {
                  default: we(() => [
                    Kt("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            }),
            M(B(dr).Item, {
              label: "数据处理",
              name: "dataProcess"
            }, {
              default: we(() => [
                M(B(Ur), {
                  type: "default",
                  size: "small",
                  onClick: f[7] || (f[7] = (d) => l("dataProcess"))
                }, {
                  default: we(() => [
                    Kt("编辑")
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ], 64)) : _t("", !0)
        ]),
        _: 1
      }, 8, ["model"]),
      M(B(Bht), {
        ref_key: "codeEditorRef",
        ref: s,
        title: "编辑数据",
        onOk: u
      }, null, 512)
    ], 64));
  }
}), In = {
  /* 标题 */
  title: {
    label: "标题",
    prop: "title",
    type: "group",
    children: [
      {
        label: " ",
        prop: "title.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "标题可见", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          t.value["title.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        type: "dependency",
        label: "",
        prop: "",
        name: ["title.show"],
        children: (t) => t["title.show"].length ? [
          {
            label: "文本",
            prop: "title.text",
            type: "input",
            defaultValue: "图表标题"
          },
          {
            label: "位置",
            prop: "title.left",
            type: "position",
            defaultValue: "center"
          },
          {
            label: "样式",
            prop: "title.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#ffffffff",
              size: 18,
              bold: !0,
              italic: !1
            },
            format: (e, n) => {
              e.value["title.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: kt(n, "title.textStyle.color", "#FFFFFF"),
              size: kt(n, "title.textStyle.size", 16),
              bold: kt(n, "title.textStyle.fontWeight") === "bold",
              italic: kt(n, "title.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "填充",
            prop: "title.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#FFFFFF00"
            },
            format: (e, n) => {
              e.value["title.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none",
              color: "#000000ff"
            } : {
              type: "color",
              color: e.color
            }
          },
          {
            label: "圆角",
            prop: "title.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          }
        ] : []
      }
    ]
  },
  /* 图例 */
  legend: {
    label: "图例",
    prop: "legend",
    type: "group",
    children: [
      {
        label: " ",
        prop: "legend.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "图例可见", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["legend.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        type: "dependency",
        label: "",
        prop: "",
        name: ["legend.show"],
        children: (t) => t["legend.show"].length ? [
          {
            label: "位置",
            prop: "legend.position",
            type: "position",
            fieldProps: {
              type: "round"
            },
            defaultValue: "top",
            format: (e, n) => {
              switch (["left", "right"].includes(n) ? e.value["legend.orient"] = "vertical" : e.value["legend.orient"] = "horizontal", n) {
                case "bottom":
                  e.value["legend.top"] = "auto", e.value["legend.right"] = "auto", e.value["legend.bottom"] = 8, e.value["legend.left"] = "center";
                  break;
                case "left":
                  e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.left"] = 8, e.value["legend.top"] = "center";
                  break;
                case "right":
                  e.value["legend.bottom"] = "auto", e.value["legend.left"] = "auto", e.value["legend.right"] = 8, e.value["legend.top"] = "center";
                  break;
                default:
                  e.value["legend.bottom"] = "auto", e.value["legend.right"] = "auto", e.value["legend.top"] = 32, e.value["legend.left"] = "center";
              }
            },
            valueToForm: (e, n) => kt(n, "legend.orient") === "vertical" ? e === "top" ? "top" : e === "bottom" ? "bottom" : "left" : kt(n, "legend.bottom") === 8 && kt(n, "legend.left") === "center" ? "bottom" : "top"
          },
          {
            label: "样式",
            prop: "legend.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["legend.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: kt(n, "legend.textStyle.color", "#000000ff"),
              size: kt(n, "legend.textStyle.fontSize", 12),
              bold: kt(n, "legend.textStyle.fontWeight") === "bold",
              italic: kt(n, "legend.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "legend.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "颜色",
            prop: "legend.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "legend.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "背景",
            prop: "legend.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#fff"
            },
            format: (e, n) => {
              e.value["legend.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none"
            } : {
              type: "color",
              color: e.color
            }
          },
          {
            label: "阴影",
            prop: "legend.shadowBlur",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "开启", value: !0 },
                { label: "关闭", value: !1 }
              ]
            },
            defaultValue: !1,
            format: (e, n) => {
              n ? (e.value["legend.shadowBlur"] = 10, e.value["legend.shadowColor"] = e.value["legend.backgroundColor"] || "#000000ff", e.value["legend.shadowOffsetX"] = 3, e.value["legend.shadowOffsetY"] = 3) : (e.value["legend.shadowBlur"] = 0, e.value["legend.shadowColor"] = "transparent", e.value["legend.shadowOffsetX"] = 0, e.value["legend.shadowOffsetY"] = 0);
            },
            valueToForm: (e) => !!e
          }
        ] : []
      }
    ]
  },
  /* 系列 */
  series: {
    label: "系列",
    prop: "series",
    type: "group",
    children: [
      {
        label: "配色",
        prop: "color",
        type: "colorScheme",
        defaultValue: Z1[0].color
      }
    ]
  },
  /* X轴 */
  xAxis: {
    label: "X 轴",
    prop: "xAxis",
    type: "group",
    children: [
      {
        label: "类型",
        prop: "xAxis.type",
        type: "select",
        fieldProps: {
          options: [
            { label: "类目坐标轴", value: "category" },
            { label: "数值坐标轴", value: "value" },
            { label: "时间坐标轴", value: "time" }
          ]
        },
        defaultValue: "category"
      },
      {
        label: " ",
        prop: "xAxis.showName",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴标题", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          e != null && e.length ? (t.value["xAxis.showName"] = !0, t.value["xAxis.name"] = "X轴标题", t.value["xAxis.nameGap"] = 25) : (t.value["xAxis.showName"] = !1, t.value["xAxis.name"] = "", t.value["xAxis.nameGap"] = 15, t.value["xAxis.nameGap"] = 15);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.showName"],
        children: (t) => t["xAxis.showName"].length ? [
          {
            label: "标题内容",
            prop: "xAxis.name",
            type: "input",
            defaultValue: "X 轴标题",
            format: (e, n) => {
              e.value["xAxis.showName"] && (e.value["xAxis.name"] = n, e.value["xAxis.nameGap"] = 25);
            },
            valueToForm: (e) => e || "X 轴标题"
          },
          {
            label: "标题位置",
            prop: "xAxis.nameLocation",
            type: "position",
            defaultValue: "center",
            format: (e, n) => {
              const r = {
                left: "start",
                center: "middle",
                right: "end"
              };
              e.value["xAxis.nameLocation"] = n ? r[n] : "middle";
            },
            valueToForm: (e) => ({
              start: "left",
              middle: "center",
              end: "right"
            })[e] || "center"
          },
          {
            label: "标题样式",
            prop: "xAxis.nameTextStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["xAxis.nameTextStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e) => ({
              color: (e == null ? void 0 : e.color) || "#000000ff",
              size: (e == null ? void 0 : e.fontSize) || 12,
              bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
              italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
            })
          }
        ] : []
      },
      {
        label: "轴线",
        prop: "",
        type: "divider"
      },
      {
        label: "线宽",
        prop: "xAxis.axisLine.lineStyle.width",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 1
      },
      {
        label: "颜色",
        prop: "xAxis.axisLine.lineStyle.color",
        type: "colorSelect",
        defaultValue: "#ccc"
      },
      {
        label: "刻度",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "xAxis.axisTick.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示刻度", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["xAxis.axisTick.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.axisTick.show"],
        children: (t) => t["xAxis.axisTick.show"].length ? [
          {
            label: "刻度宽度",
            prop: "xAxis.axisTick.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 5
          },
          {
            label: "刻度颜色",
            prop: "xAxis.axisTick.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "标签",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "xAxis.axisLabel.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示标签", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["xAxis.axisLabel.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["xAxis.axisLabel.show"],
        children: (t) => t["xAxis.axisLabel.show"].length ? [
          {
            label: "样式",
            prop: "xAxis.axisLabel",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["xAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["xAxis.axisLabel.fontSize"] = n.size, e.value["xAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["xAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: kt(n, "xAxis.axisLabel.color", "#000000ff"),
              size: kt(n, "xAxis.axisLabel.fontSize", 12),
              bold: kt(n, "xAxis.axisLabel.fontWeight") === "bold",
              italic: kt(n, "xAxis.axisLabel.fontStyle") === "italic"
            })
          }
        ] : []
      }
    ]
  },
  /* Y 轴 */
  yAxis: {
    label: "Y 轴",
    prop: "yAxis",
    type: "group",
    children: [
      {
        label: " ",
        prop: "yAxis.showName",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴标题", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          e != null && e.length ? (t.value["yAxis.showName"] = !0, t.value["yAxis.name"] = "Y轴标题", t.value["yAxis.nameGap"] = 25) : (t.value["yAxis.showName"] = !1, t.value["yAxis.name"] = "", t.value["yAxis.nameGap"] = 15);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.showName"],
        children: (t) => t["yAxis.showName"].length ? [
          {
            label: "标题内容",
            prop: "yAxis.name",
            type: "input",
            defaultValue: "Y 轴标题",
            format: (e, n) => {
              e.value["yAxis.showName"] ? (e.value["yAxis.name"] = n, e.value["yAxis.nameGap"] = 25) : (e.value["yAxis.name"] = "", e.value["yAxis.nameGap"] = 15);
            },
            valueToForm: (e) => e || "Y 轴标题"
          },
          {
            label: "标题位置",
            prop: "yAxis.nameLocation",
            type: "position",
            defaultValue: "center",
            format: (e, n) => {
              const r = {
                left: "start",
                center: "middle",
                right: "end"
              };
              e.value["yAxis.nameLocation"] = n ? r[n] : "middle";
            },
            valueToForm: (e) => ({
              start: "left",
              middle: "center",
              end: "right"
            })[e] || "center "
          },
          {
            label: "标题样式",
            prop: "yAxis.nameTextStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#FFFFFFFF",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["yAxis.nameTextStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e) => ({
              color: (e == null ? void 0 : e.color) || "#000000ff",
              size: (e == null ? void 0 : e.fontSize) || 12,
              bold: (e == null ? void 0 : e.fontWeight) === "bold" || !1,
              italic: (e == null ? void 0 : e.fontStyle) === "italic" || !1
            })
          }
        ] : []
      },
      {
        label: "轴线",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisLine.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示轴线", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisLine.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisLine.show"],
        children: (t) => t["yAxis.axisLine.show"].length ? [
          {
            label: "线宽",
            prop: "yAxis.axisLine.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 1
          },
          {
            label: "颜色",
            prop: "yAxis.axisLine.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "刻度",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisTick.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示刻度", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisTick.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisTick.show"],
        children: (t) => t["yAxis.axisTick.show"].length ? [
          {
            label: "刻度长度",
            prop: "yAxis.axisTick.lineStyle.width",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 5
          },
          {
            label: "刻度颜色",
            prop: "yAxis.axisTick.lineStyle.color",
            type: "colorSelect",
            defaultValue: "#ccc"
          }
        ] : []
      },
      {
        label: "标签",
        prop: "",
        type: "divider"
      },
      {
        label: " ",
        prop: "yAxis.axisLabel.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "显示标签", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["yAxis.axisLabel.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["yAxis.axisLabel.show"],
        children: (t) => t["yAxis.axisLabel.show"].length ? [
          {
            label: "样式",
            prop: "yAxis.axisLabel",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["yAxis.axisLabel.color"] = n == null ? void 0 : n.color, e.value["yAxis.axisLabel.fontSize"] = n.size, e.value["yAxis.axisLabel.fontWeight"] = n.bold ? "bold" : "normal", e.value["yAxis.axisLabel.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: kt(n, "yAxis.axisLabel.color", "#000000ff"),
              size: kt(n, "yAxis.axisLabel.fontSize", 12),
              bold: kt(n, "yAxis.axisLabel.fontWeight") === "bold",
              italic: kt(n, "yAxis.axisLabel.fontStyle") === "italic"
            })
          },
          {
            label: "旋转角度",
            prop: "yAxis.axisLabel.rotate",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "°",
              min: -90,
              max: 90,
              step: 1
            }
          }
        ] : []
      }
    ]
  },
  /* 提示 */
  tooltip: {
    label: "提示",
    prop: "tooltip",
    type: "group",
    children: [
      {
        label: " ",
        prop: "tooltip.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "提示可见", value: !0 }]
        },
        defaultValue: [!0],
        format: (t, e) => {
          t.value["tooltip.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["tooltip.show"],
        children: (t) => t["tooltip.show"].length ? [
          {
            label: "文本",
            prop: "tooltip.formatter",
            type: "checkboxGroup",
            fieldProps: {
              options: [
                { label: "分类名", value: "b" },
                { label: "系列名", value: "a" },
                { label: "数值", value: "c" }
              ]
            },
            defaultValue: ["b"],
            format: (e, n) => {
              e.value["tooltip.formatter"] = n.map((r) => `{${r}}`).join(" ");
            },
            valueToForm: (e, n) => {
              var r, i;
              return (i = (r = kt(n, "tooltip.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
            }
          },
          // {
          //   label: "格式化",
          //   prop: "tooltip.valueFormatter",
          //   type: "input",
          //   tip: "支持字符串模板和回调函数",
          //   defaultValue: "(value, dataIndex) => value",
          // },
          {
            label: "样式",
            prop: "tooltip.textStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["tooltip.textStyle"] = {
                color: n.color,
                fontSize: n.size,
                fontWeight: n.bold ? "bold" : "normal",
                fontStyle: n.italic ? "italic" : "normal"
              };
            },
            valueToForm: (e, n) => ({
              color: kt(n, "tooltip.textStyle.color", "#000000ff"),
              size: kt(n, "tooltip.textStyle.fontSize", 12),
              bold: kt(n, "tooltip.textStyle.fontWeight") === "bold",
              italic: kt(n, "tooltip.textStyle.fontStyle") === "italic"
            })
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "tooltip.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 1
          },
          {
            label: "颜色",
            prop: "tooltip.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "tooltip.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 4
          },
          {
            label: "背景",
            prop: "",
            type: "divider"
          },
          {
            label: "填充",
            prop: "tooltip.backgroundColor",
            type: "backgroundSelect",
            fieldProps: {
              filterOptions: ["image"]
            },
            defaultValue: {
              type: "color",
              color: "#fff"
            },
            format: (e, n) => {
              e.value["tooltip.backgroundColor"] = (n == null ? void 0 : n.type) === "color" ? n.color : "none";
            },
            valueToForm: (e) => !e || e === "none" ? {
              type: "none"
            } : {
              type: "color",
              color: e
            }
          },
          {
            label: "阴影",
            prop: "tooltip.extraCssText",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "开启", value: !0 },
                { label: "关闭", value: !1 }
              ]
            },
            defaultValue: !1,
            format: (e, n) => {
              e.value["tooltip.extraCssText"] = n ? "box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);" : "";
            },
            valueToForm: (e, n) => !!kt(n, "tooltip.extraCssText")
          }
        ] : []
      }
    ]
  },
  /* 标签 */
  label: {
    label: "标签",
    prop: "label",
    type: "group",
    children: [
      {
        label: " ",
        prop: "label.show",
        type: "checkboxGroup",
        fieldProps: {
          options: [{ label: "标签可见", value: !0 }]
        },
        defaultValue: [],
        format: (t, e) => {
          t.value["label.show"] = !!(e != null && e.length);
        },
        valueToForm: (t) => t ? [!0] : []
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["label.show"],
        children: (t) => t["label.show"].length ? [
          {
            label: "文本",
            prop: "label.formatter",
            type: "checkboxGroup",
            fieldProps: {
              options: [
                { label: "分类名", value: "b" },
                { label: "系列名", value: "a" },
                { label: "数值", value: "c" }
                // { label: "百分比", value: "percent" },
              ]
            },
            defaultValue: ["a"],
            format: (e, n) => {
              e.value["label.formatter"] = `{${n}}`;
            },
            valueToForm: (e, n) => {
              var r, i;
              return (i = (r = kt(n, "label.formatter")) == null ? void 0 : r.replace(/\{|\}/g, "")) == null ? void 0 : i.split(" ");
            }
          },
          {
            label: "样式",
            prop: "label.fontStyle",
            type: "fontStyle",
            defaultValue: {
              color: "#000000ff",
              size: 12,
              bold: !1,
              italic: !1
            },
            format: (e, n) => {
              e.value["label.color"] = n == null ? void 0 : n.color, e.value["label.fontSize"] = n.size, e.value["label.fontWeight"] = n.bold ? "bold" : "normal", e.value["label.fontStyle"] = n.italic ? "italic" : "normal";
            },
            valueToForm: (e, n) => ({
              color: kt(n, "label.color", "#000000ff"),
              size: kt(n, "label.fontSize", 12),
              bold: kt(n, "label.fontWeight") === "bold",
              italic: kt(n, "label.fontStyle") === "italic"
            })
          },
          {
            label: "布局",
            prop: "",
            type: "divider"
          },
          {
            label: "位置",
            prop: "label.position",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "顶部", value: "top" },
                { label: "左侧", value: "left" },
                { label: "右侧", value: "right" },
                { label: "底部", value: "bottom" },
                { label: "内部", value: "inside" },
                { label: "内部左侧", value: "insideLeft" },
                { label: "内部右侧", value: "insideRight" },
                { label: "内部顶部", value: "insideTop" },
                { label: "内部底部", value: "insideBottom" }
              ]
            },
            defaultValue: "top"
          },
          {
            label: "文本方向",
            prop: "label.rotate",
            type: "radioGroup",
            fieldProps: {
              options: [
                { label: "水平", value: "horizontal" },
                { label: "垂直", value: "vertical" }
              ]
            },
            defaultValue: "horizontal",
            format: (e, n) => {
              e.value["label.rotate"] = n === "horizontal" ? 0 : 90;
            },
            valueToForm: (e) => e === 0 ? "horizontal" : "vertical"
          },
          {
            label: "边框",
            prop: "",
            type: "divider"
          },
          {
            label: "线宽",
            prop: "label.borderWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          },
          {
            label: "颜色",
            prop: "label.borderColor",
            type: "colorSelect",
            defaultValue: "#ccc"
          },
          {
            label: "圆角",
            prop: "label.borderRadius",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 0
          }
        ] : []
      }
    ]
  }
}, Ole = (t) => (AS("data-v-0b356b47"), t = t(), ES(), t), Vht = { class: "chart-config" }, Fht = { class: "config-tab" }, Wht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), Qht = /* @__PURE__ */ Ole(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Hht = /* @__PURE__ */ te({
  __name: "Config",
  props: LL,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = U("1"), i = e, a = [
      {
        label: "线",
        prop: "",
        type: "divider"
      },
      {
        label: "线条样式",
        prop: "series.line.lineStyle.type",
        type: "select",
        fieldProps: {
          options: [
            { label: "实线", value: "solid" },
            { label: "虚线", value: "dashed" },
            { label: "点线", value: "dotted" }
          ]
        }
      },
      {
        label: "线宽",
        prop: "series.line.lineStyle.width",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "px"
        }
      },
      {
        label: "形态",
        prop: "series.line.lineType",
        type: "radioGroupButton",
        fieldProps: {
          options: [
            { label: "普通", value: "normal" },
            { label: "平滑", value: "smooth" },
            { label: "阶梯", value: "step" }
          ]
        },
        format: (u, c) => {
          switch (c) {
            case "smooth":
              u.value["series.line.smooth"] = !0, u.value["series.line.step"] = !1;
              break;
            case "step":
              u.value["series.line.smooth"] = !1, u.value["series.line.step"] = "end";
              break;
            default:
              u.value["series.line.smooth"] = !1, u.value["series.line.step"] = !1;
          }
        },
        valueToForm: (u, c) => {
          const f = kt(c, "series.line.step"), d = kt(c, "series.line.smooth");
          return f ? "step" : d ? "smooth" : "normal";
        }
      },
      {
        label: "标记点",
        prop: "",
        type: "divider"
      },
      {
        label: "图形",
        prop: "series.line.symbol",
        type: "select",
        fieldProps: {
          options: [
            { label: "圆", value: "circle" },
            { label: "方", value: "rect" },
            { label: "三角", value: "triangle" },
            { label: "菱形", value: "diamond" },
            { label: "标记", value: "pin" },
            { label: "箭头", value: "arrow" },
            { label: "无", value: "none" }
          ]
        }
      },
      {
        label: "大小",
        prop: "series.line.symbolSize",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "px"
        }
      },
      {
        label: "旋转",
        prop: "series.line.symbolRotate",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          addonAfter: "°"
        }
      }
    ], o = [
      In.title,
      In.legend,
      In.label,
      {
        ...In.series,
        children: In.series.children.concat(
          a
        )
      },
      In.tooltip,
      In.background
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = Zc(n);
      Object.keys(u).forEach((f) => {
        YI(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (pe(), Qe("div", Vht, [
      He("div", Fht, [
        M(B(Uc), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: we(() => [
            M(B(Fs), { key: "1" }, {
              tab: we(() => [
                M(B(x0)),
                Wht
              ]),
              _: 1
            }),
            M(B(Fs), { key: "2" }, {
              tab: we(() => [
                M(B(w0)),
                Qht
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (pe(), je(B4, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : _t("", !0),
      r.value === "2" ? (pe(), je(B(Mx), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : _t("", !0)
    ]));
  }
}), Sle = /* @__PURE__ */ po(Hht, [["__scopeId", "data-v-0b356b47"]]);
Hm.Config = Sle;
Hm.install = (t) => (t.component("FmBasicLine", Hm), t);
const Ght = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: Sle,
  basicLineProps: LL,
  default: Hm,
  defaultPropsValue: RZe
}, Symbol.toStringTag, { value: "Module" })), z4 = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: kL,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // x轴数据
  xAxis: {
    type: Object
  },
  // y轴数据
  yAxis: {
    type: Object
  },
  // 折线
  series: {
    type: Array
  },
  // color
  color: {
    type: Object
  }
}, xle = [];
xle.bar = {
  // @ts-ignore
  fixedBarWidth: !1,
  barWidth: "auto",
  barGap: "30%",
  barCategoryGap: "20%",
  itemStyle: {
    borderColor: "#ccc",
    borderRadius: 0,
    borderWidth: 0
  }
};
const jht = RL({
  title: {
    text: "柱状图标题"
  },
  xAxis: {
    data: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"]
  },
  series: xle
}), Zht = {
  // 组件容器默认属性
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  // 图表默认属性
  props: {
    // 数据源
    dataSource: {
      sourceType: Ri.STATIC,
      data: {
        xData: ["轴标签A", "轴标签B", "轴标签C", "轴标签D"],
        series: [
          {
            type: "bar",
            name: "系列1",
            data: [89.3, 92.1, 94.4, 85.4]
          },
          {
            type: "bar",
            name: "系列2",
            data: [95.8, 89.4, 91.2, 76.9]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/bar",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;
          // x轴数据
          const xData = data.map((item) => item.name); 
          // 系列数据
          const series = [
            { type: 'bar', name: '价格', data: data.map(item => item.price) },
            { type: 'bar', name: '总量', data: data.map(item => item.count) },
          ];

          // 返回图表数据
          return { xData, series };
        }
      `
    },
    ...jht
  }
}, u0 = /* @__PURE__ */ te({
  __name: "BasicBar",
  props: z4,
  setup(t) {
    const e = t, { options: n, loading: r } = qL(e);
    return (i, a) => (pe(), je(DL, {
      width: i.width,
      height: i.height,
      "echarts-options": B(n),
      loading: B(r)
    }, null, 8, ["width", "height", "echarts-options", "loading"]));
  }
}), wle = (t) => (AS("data-v-d6923dbc"), t = t(), ES(), t), Uht = { class: "chart-config" }, Xht = { class: "config-tab" }, Yht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), qht = /* @__PURE__ */ wle(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), Kht = /* @__PURE__ */ te({
  __name: "Config",
  props: z4,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = U("1"), i = e, a = [
      {
        label: "样式",
        prop: "",
        type: "divider"
      },
      {
        label: "固定柱宽",
        prop: "series.bar.fixedBarWidth",
        type: "radioGroup",
        fieldProps: {
          options: [
            { label: "是", value: !0 },
            { label: "否", value: !1 }
          ]
        },
        defaultValue: !1,
        format: (u, c) => {
          var f, d;
          u.value["series.bar.barWidth"] = c && ((f = u.value) == null ? void 0 : f["series.bar.barWidth"]) !== "auto" ? ((d = u.value) == null ? void 0 : d["series.bar.barWidth"]) || 20 : "auto";
        }
      },
      {
        label: "",
        prop: "",
        type: "dependency",
        name: ["series.bar.fixedBarWidth"],
        children: (u) => u["series.bar.fixedBarWidth"] ? [
          {
            label: "柱宽",
            prop: "series.bar.barWidth",
            type: "inputNumber",
            fieldProps: {
              addonAfter: "px"
            },
            defaultValue: 20
          }
        ] : []
      },
      {
        label: "系列间隔",
        prop: "series.bar.barGap",
        type: "slider",
        defaultValue: 30,
        format: (u, c) => {
          u.value["series.bar.barGap"] = c + "%";
        },
        valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
      },
      {
        label: "分类间隔",
        prop: "series.bar.barCategoryGap",
        type: "slider",
        defaultValue: 20,
        format: (u, c) => {
          u.value["series.bar.barCategoryGap"] = c + "%";
        },
        valueToForm: (u) => +((u == null ? void 0 : u.replace("%", "")) || 0)
      },
      {
        label: "边框",
        prop: "",
        type: "divider"
      },
      {
        label: "线宽",
        prop: "series.bar.itemStyle.borderWidth",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 0
      },
      {
        label: "颜色",
        prop: "series.bar.itemStyle.borderColor",
        type: "colorSelect",
        defaultValue: "#ccc"
      },
      {
        label: "圆角",
        prop: "series.bar.itemStyle.borderRadius",
        type: "inputNumber",
        fieldProps: {
          addonAfter: "px"
        },
        defaultValue: 0
      }
    ], o = [
      In.title,
      In.legend,
      In.label,
      {
        ...In.series,
        children: In.series.children.concat(
          a
        )
      },
      In.xAxis,
      In.yAxis,
      In.tooltip
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = Zc(n);
      Object.keys(u).forEach((f) => {
        YI(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (pe(), Qe("div", Uht, [
      He("div", Xht, [
        M(B(Uc), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: we(() => [
            M(B(Fs), { key: "1" }, {
              tab: we(() => [
                M(B(x0)),
                Yht
              ]),
              _: 1
            }),
            M(B(Fs), { key: "2" }, {
              tab: we(() => [
                M(B(w0)),
                qht
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (pe(), je(B4, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : _t("", !0),
      r.value === "2" ? (pe(), je(B(Mx), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : _t("", !0)
    ]));
  }
}), Cle = /* @__PURE__ */ po(Kht, [["__scopeId", "data-v-d6923dbc"]]);
u0.Config = Cle;
u0.install = (t) => (t.component("FmBasicBar", u0), t);
const Jht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: Cle,
  basicBarProps: z4,
  default: u0,
  defaultPropsValue: Zht
}, Symbol.toStringTag, { value: "Module" })), V4 = {
  width: {
    type: Number,
    default: 400
  },
  height: {
    type: Number,
    default: 260
  },
  dataSource: kL,
  // 标题
  title: {
    type: Object
  },
  // 图例
  legend: {
    type: Object
  },
  // 背景
  backgroundColor: {
    type: String
  },
  // 边框
  grid: {
    type: Object
  },
  // 提示框
  tooltip: {
    type: Object
  },
  // 饼图数据
  series: {
    type: Array
  },
  // color
  color: {
    type: Object
  }
}, Tle = [];
Tle.pie = {
  top: 70,
  startAngle: 0,
  endAngle: 360,
  radius: ["0%", "75%"]
};
const ept = RL({
  title: {
    text: "饼图标题"
  },
  grid: {
    show: !1
  },
  xAxis: {
    show: !1
  },
  yAxis: {
    show: !1
  },
  series: Tle
}), tpt = {
  // 组件容器默认属性
  container: {
    props: {
      width: 400,
      height: 260
    }
  },
  // 图表默认属性
  props: {
    // 数据源
    dataSource: {
      sourceType: Ri.STATIC,
      data: {
        series: [
          {
            type: "pie",
            name: "系列1",
            data: [
              { value: 335, name: "直接访问" },
              { value: 310, name: "邮件营销" },
              { value: 234, name: "联盟广告" },
              { value: 135, name: "视频广告" }
            ]
          }
        ]
      },
      url: location.origin + "/mock/api/get/example/pie",
      method: "POST",
      params: {},
      headers: {},
      refreshTime: 0,
      dataProcess: `
        (res) => {
          // 取出列表
          const data = res.data;

          // 系列数据
          const series = [
            { type: 'pie', name: '价格', data: data.map(item => item.price) },
          ];

          // 返回图表数据
          return { series };
        }
      `
    },
    ...ept
  }
}, c0 = /* @__PURE__ */ te({
  __name: "BasicPie",
  props: V4,
  setup(t) {
    const e = t, { options: n, loading: r } = qL(e);
    return (i, a) => (pe(), je(DL, {
      width: i.width,
      height: i.height,
      "echarts-options": B(n),
      loading: B(r)
    }, null, 8, ["width", "height", "echarts-options", "loading"]));
  }
}), Ple = (t) => (AS("data-v-bd423688"), t = t(), ES(), t), npt = { class: "chart-config" }, rpt = { class: "config-tab" }, ipt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "数据设置", -1)), apt = /* @__PURE__ */ Ple(() => /* @__PURE__ */ He("span", null, "样式设置", -1)), opt = /* @__PURE__ */ te({
  __name: "Config",
  props: V4,
  emits: ["change"],
  setup(t, { emit: e }) {
    const n = t, r = U("1"), i = e, a = [
      {
        label: "样式",
        prop: "",
        type: "divider"
      },
      {
        label: "起始角度",
        prop: "series.pie.startAngle",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          max: 360,
          addonAfter: "°"
        }
      },
      {
        label: "完结角度",
        prop: "series.pie.endAngle",
        type: "inputNumber",
        fieldProps: {
          min: 0,
          max: 360,
          addonAfter: "°"
        }
      },
      {
        label: "内径占比",
        prop: "series.pie.radius",
        type: "slider",
        format: (u, c) => {
          console.log("formatModel", u);
          const f = c * 0.75;
          return u.value["series.pie.radius"] = [f + "%", "75%"], c * 100;
        },
        valueToForm: (u) => (u || ["0%", "75%"])[0].replace("%", "") / 0.75
      }
    ], o = [
      In.title,
      In.legend,
      In.label,
      {
        ...In.series,
        children: In.series.children.concat(
          a
        )
      },
      In.tooltip
    ], s = (u) => {
      i("change", {
        ...n,
        dataSource: u
      });
    }, l = (u) => {
      const c = Zc(n);
      Object.keys(u).forEach((f) => {
        YI(c, f, u[f]);
      }), i("change", c);
    };
    return (u, c) => (pe(), Qe("div", npt, [
      He("div", rpt, [
        M(B(Uc), {
          activeKey: r.value,
          "onUpdate:activeKey": c[0] || (c[0] = (f) => r.value = f),
          size: "small",
          centered: ""
        }, {
          default: we(() => [
            M(B(Fs), { key: "1" }, {
              tab: we(() => [
                M(B(x0)),
                ipt
              ]),
              _: 1
            }),
            M(B(Fs), { key: "2" }, {
              tab: we(() => [
                M(B(w0)),
                apt
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["activeKey"])
      ]),
      r.value === "1" ? (pe(), je(B4, {
        key: 0,
        dataSource: u.dataSource,
        onChange: s
      }, null, 8, ["dataSource"])) : _t("", !0),
      r.value === "2" ? (pe(), je(B(Mx), {
        key: 1,
        columns: o,
        formModel: n,
        onChange: l
      }, null, 8, ["formModel"])) : _t("", !0)
    ]));
  }
}), $le = /* @__PURE__ */ po(opt, [["__scopeId", "data-v-bd423688"]]);
c0.Config = $le;
c0.install = (t) => (t.component("FmBasicPie", c0), t);
const spt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Config: $le,
  basicPieProps: V4,
  default: c0,
  defaultPropsValue: tpt
}, Symbol.toStringTag, { value: "Module" })), mpt = {
  Title: () => Promise.resolve().then(() => GMe),
  BasicLine: () => Promise.resolve().then(() => Ght),
  BasicBar: () => Promise.resolve().then(() => Jht),
  BasicPie: () => Promise.resolve().then(() => spt)
}, WG = {
  BasicLine: Hm,
  BasicBar: u0,
  Title: Zg,
  BasicPie: c0
}, lpt = function(t) {
  return Object.keys(WG).forEach((e) => {
    const n = WG[e];
    n != null && n.install && (console.log("注册组件：", e), t.use(n));
  }), t;
}, ypt = {
  version: "1.0.0",
  install: lpt
};
export {
  u0 as BasicBar,
  Cle as BasicBarConfig,
  Zht as BasicBarDefaultProps,
  z4 as BasicBarProps,
  Hm as BasicLine,
  Sle as BasicLineConfig,
  RZe as BasicLineDefaultProps,
  LL as BasicLineProps,
  c0 as BasicPie,
  $le as BasicPieConfig,
  tpt as BasicPieDefaultProps,
  V4 as BasicPieProps,
  Mx as CusForm,
  Ri as DataSourceType,
  Zg as Title,
  mpt as asyncComponentAll,
  WG as components,
  ypt as default,
  lpt as install
};
//# sourceMappingURL=shalu-dashboard-ui.js.map
