import { toRef as ee, resolveComponent as te, createElementBlock as r, openBlock as l, Fragment as p, renderList as U, createCommentVNode as h, createBlock as O, createElementVNode as N, withModifiers as Be, renderSlot as y, mergeProps as Ce, withCtx as m, toDisplayString as Fe, computed as A, onMounted as Ge, ref as g, watch as Ve, unref as f, normalizeStyle as K, normalizeClass as $e, createVNode as j, createSlots as je, normalizeProps as D, guardReactiveProps as I, createTextVNode as We, nextTick as Xe } from "vue";
import { u as Ye, o as qe, e as Qe, c as we, t as Ze, p as Te, a as Je, b as Ke, P as et, X as tt, l as ot, Q as lt, d as Pe, q as st, r as at, x as rt, y as nt } from "./index-C7spnOfS.js";
import { _ as it } from "./Title-Ch602IT9.js";
import { u as ut, U as ct } from "./usePrinter-BDUIRBP4.js";
import { D as dt } from "./DataTable-CmnlvDKM.js";
import { _ as vt } from "./Tooltip-0IaPNa9t.js";
import ht from "./vue-ui-skeleton-Bn49rVXa.js";
import ft from "./vue-ui-accordion-Bk2aYAD-.js";
import { u as xe } from "./useNestedProp-BXHzK3EV.js";
import { _ as pt } from "./PackageVersion-DavVl5j6.js";
import { P as yt } from "./PenAndPaper-CGAd_cD9.js";
import { u as gt } from "./useUserOptionState-BIvW1Kz7.js";
import { u as mt } from "./useChartAccessibility-BWojgys7.js";
import { u as bt } from "./usePanZoom-CWL8SzZN.js";
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], $t = ["x", "y", "height", "width", "onClick", "onMouseover"], wt = {
  __name: "RecursiveCircles",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    },
    linkColor: {
      type: String,
      default: "#CCCCCC"
    },
    stroke: {
      type: String,
      default: "#FFFFFF"
    },
    strokeHovered: {
      type: String,
      default: "#000000"
    }
  },
  emits: ["click", "hover"],
  setup(n, { emit: E }) {
    const H = n, T = E;
    function v(s) {
      T("click", s);
    }
    function w(s) {
      T("hover", s);
    }
    return ee(H, "dataset").value.forEach((s) => {
      s.nodes && s.nodes.length > 0 && s.nodes.forEach((k) => {
        k.ancestor = s;
      });
    }), (s, k) => {
      const W = te("RecursiveCircles", !0);
      return l(!0), r(p, null, U(n.dataset, (u) => (l(), r(p, null, [
        u.polygonPath && u.polygonPath.coordinates ? (l(), r(p, { key: 0 }, [
          (l(!0), r(p, null, U(u.polygonPath.coordinates, (P, G) => (l(), r(p, null, [
            N("circle", {
              cx: P.x,
              cy: P.y,
              r: u.circleRadius,
              fill: `url(#gradient_${u.color})`,
              stroke: n.hoveredUid && n.hoveredUid === u.uid ? n.strokeHovered : n.stroke,
              "stroke-width": n.hoveredUid && n.hoveredUid === u.uid ? u.circleRadius / 6 : u.circleRadius / 12,
              style: { cursor: "pointer" },
              onClick: (S) => v(u),
              onMouseover: (S) => w(u),
              onMouseleave: k[0] || (k[0] = (S) => w(null))
            }, null, 40, Ct),
            s.$slots.node ? (l(), r("foreignObject", {
              key: 0,
              x: P.x - u.circleRadius,
              y: P.y - u.circleRadius,
              height: u.circleRadius * 2,
              width: u.circleRadius * 2,
              style: { overflow: "visible" },
              onClick: Be((S) => v(u), ["stop"]),
              onMouseover: (S) => w(u),
              onMouseleave: k[1] || (k[1] = (S) => w(null))
            }, [
              y(s.$slots, "node", Ce({ ref_for: !0 }, { node: u }))
            ], 40, $t)) : h("", !0)
          ], 64))), 256)),
          u.nodes && u.nodes.length > 0 ? (l(), O(W, {
            key: 0,
            dataset: u.nodes,
            color: n.color,
            stroke: n.stroke,
            strokeHovered: n.strokeHovered,
            hoveredUid: n.hoveredUid,
            onClick: v,
            onHover: w
          }, {
            node: m(({ node: P }) => [
              y(s.$slots, "node", Ce({ ref_for: !0 }, { node: P }))
            ]),
            _: 2
          }, 1032, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : h("", !0)
        ], 64)) : h("", !0)
      ], 64))), 256);
    };
  }
}, Tt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Pt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], xt = {
  __name: "RecursiveLinks",
  props: {
    dataset: {
      type: Array,
      default: () => []
    },
    color: {
      type: String,
      default: "#DDDDDD"
    },
    backgroundColor: {
      type: String,
      default: "#FFFFFF"
    }
  },
  setup(n) {
    return ee(n, "dataset").value.forEach((T) => {
      T.nodes && T.nodes.length > 0 && T.nodes.forEach((v) => {
        v.ancestor = T;
      });
    }), (T, v) => {
      const w = te("RecursiveLinks", !0);
      return l(), r(p, null, [
        (l(!0), r(p, null, U(n.dataset, (i) => (l(), r(p, null, [
          i.polygonPath && i.polygonPath.coordinates ? (l(!0), r(p, { key: 0 }, U(i.polygonPath.coordinates, (s, k) => (l(), r(p, null, [
            i.ancestor && i.ancestor.polygonPath ? (l(), r(p, { key: 0 }, [
              N("line", {
                x1: s.x,
                y1: s.y,
                x2: i.ancestor.polygonPath.coordinates[0].x,
                y2: i.ancestor.polygonPath.coordinates[0].y,
                stroke: n.backgroundColor,
                "stroke-width": i.circleRadius / 1.5
              }, null, 8, Tt),
              N("line", {
                x1: s.x,
                y1: s.y,
                x2: i.ancestor.polygonPath.coordinates[0].x,
                y2: i.ancestor.polygonPath.coordinates[0].y,
                stroke: n.color,
                "stroke-width": i.circleRadius / 2
              }, null, 8, Pt)
            ], 64)) : h("", !0)
          ], 64))), 256)) : h("", !0)
        ], 64))), 256)),
        (l(!0), r(p, null, U(n.dataset, (i) => (l(), r(p, null, [
          i.polygonPath && i.polygonPath.coordinates ? (l(), r(p, { key: 0 }, [
            i.nodes && i.nodes.length > 0 ? (l(), O(w, {
              key: 0,
              dataset: i.nodes,
              color: n.color,
              backgroundColor: n.backgroundColor
            }, null, 8, ["dataset", "color", "backgroundColor"])) : h("", !0)
          ], 64)) : h("", !0)
        ], 64))), 256))
      ], 64);
    };
  }
}, Ft = ["x", "y", "fill", "font-size"], Ot = {
  __name: "RecursiveLabels",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    }
  },
  emits: ["zoom", "hover"],
  setup(n, { emit: E }) {
    return ee(n, "dataset").value.forEach((v) => {
      v.nodes && v.nodes.length > 0 && v.nodes.forEach((w) => {
        w.ancestor = v;
      });
    }), (v, w) => {
      const i = te("RecursiveLabels", !0);
      return l(!0), r(p, null, U(n.dataset, (s) => (l(), r(p, null, [
        s.polygonPath && s.polygonPath.coordinates ? (l(), r(p, { key: 0 }, [
          (l(!0), r(p, null, U(s.polygonPath.coordinates, (k) => (l(), r("text", {
            x: k.x,
            y: k.y + s.circleRadius * 2,
            fill: n.color,
            "font-size": s.circleRadius,
            "text-anchor": "middle",
            style: { opacity: "0.8", "pointer-events": "none" }
          }, Fe(s.name), 9, Ft))), 256)),
          s.nodes && s.nodes.length > 0 ? (l(), O(i, {
            key: 0,
            dataset: s.nodes,
            color: n.color,
            hoveredUid: n.hoveredUid
          }, null, 8, ["dataset", "color", "hoveredUid"])) : h("", !0)
        ], 64)) : h("", !0)
      ], 64))), 256);
    };
  }
}, Rt = ["id"], At = {
  key: 1,
  ref: "noTitle",
  class: "vue-data-ui-no-title-space",
  style: "height:36px; width: 100%;background:transparent"
}, St = {
  key: 2,
  style: "width:100%;background:transparent;"
}, Ut = ["xmlns", "viewBox"], Dt = ["width", "height"], It = ["id"], Nt = ["stop-color"], Lt = ["stop-color"], _t = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Et = {
  key: 7,
  ref: "source",
  dir: "auto"
}, Ht = ["innerHTML"], Mt = {
  __name: "vue-ui-molecule",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectNode"],
  setup(n, { expose: E, emit: H }) {
    const { vue_ui_molecule: T } = Ye(), v = n, w = H, i = A(() => !!v.dataset && v.dataset.length);
    Ge(() => {
      s();
    });
    function s() {
      qe(v.dataset) && Qe({
        componentName: "VueUiMolecule",
        type: "dataset"
      });
    }
    const k = g(we()), W = g(null), u = g(!1), P = g(""), G = g(null), S = g(0), oe = g(0), le = g(0), e = A({
      get: () => re(),
      set: (t) => t
    }), { userOptionsVisible: X, setUserOptionsVisibility: se, keepUserOptionState: ae } = gt({ config: e.value }), { svgRef: Y } = mt({ config: e.value.style.chart.title });
    function re() {
      const t = xe({
        userConfig: v.config,
        defaultConfig: T
      });
      return t.theme ? {
        ...xe({
          userConfig: Je.vue_ui_molecule[t.theme] || v.config,
          defaultConfig: t
        }),
        customPalette: Ze[t.theme] || Te
      } : t;
    }
    Ve(() => v.config, (t) => {
      e.value = re(), X.value = !e.value.userOptions.showOnChartHover, s(), oe.value += 1, le.value += 1, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show;
    }, { deep: !0 });
    const { isPrinting: ne, isImaging: ie, generatePdf: ue, generateImage: ce } = ut({
      elementId: `cluster_${k.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-molecule",
      options: e.value.userOptions.print
    }), Oe = A(() => e.value.userOptions.show && !e.value.style.chart.title.text), Re = A(() => Ke(e.value.customPalette)), $ = g({
      showTable: e.value.table.show,
      showDataLabels: !0,
      showTooltip: e.value.style.chart.tooltip.show
    });
    function de(t, a = 0) {
      return Array.isArray(t) && t.length > 0 && t[0].nodes ? de(t[0].nodes, a + 1) : a;
    }
    function Ae() {
      const t = de(v.dataset);
      let a = 100, o = a;
      for (let d = 0; d < t; d += 1)
        a /= 1, o += a;
      return {
        height: o,
        width: o
      };
    }
    const C = g(Ae());
    g(`0 0 ${C.value.width} ${C.value.height}`);
    function ve(t, a = { x: -C.value.width / 2.43, y: C.value.height / 2 }, o = C.value.width / 1.1, d = 24, c = 0, b = 0, x = "#BBBBBB", Z = 0) {
      if (!Array.isArray(t) || t.length === 0) return t;
      const ze = lt({
        plot: a,
        radius: o,
        sides: t.length,
        rotation: c
      });
      return t.forEach((F, me) => {
        const be = ze.coordinates[me], ke = F.color ? (() => {
          let J = Pe(F.color);
          return J.startsWith("#") ? J : `#${J}`;
        })() : null;
        let _;
        ke ? _ = ke : Z === 0 ? _ = x : Z === 1 ? (_ = Re.value[b] || Te[b] || x, b += 1) : _ = x, F.polygonPath = { coordinates: [be] }, F.circleRadius = d, F.color = _, F.uid = we(), Array.isArray(F.nodes) && F.nodes.length && (F.nodes = ve(
          F.nodes,
          be,
          o / 2.9,
          d / 2.2,
          c + Math.PI * me / F.nodes.length,
          b,
          _,
          Z + 1
        ));
      }), t;
    }
    function Se(t) {
      const a = /* @__PURE__ */ new Set();
      function o(c) {
        c.forEach((b) => {
          if (!b.color) return;
          let x = b.color;
          /^#?[0-9A-F]{6}$/i.test(x) || (x = Pe(x)), x.startsWith("#") || (x = `#${x}`), a.add(x), Array.isArray(b.nodes) && b.nodes.length && o(b.nodes);
        });
      }
      o(t);
      const d = {};
      return Array.from(a).forEach((c) => {
        const b = c.slice(1);
        d[c] = `gradient_${b}`;
      }), d;
    }
    const Ue = A(() => Se(R.value)), R = A(() => {
      const t = et(v.dataset);
      return ve(t);
    }), q = g(null);
    function De(t) {
      q.value = {
        datapoint: t,
        seriesIndex: -1,
        series: R.value,
        config: e.value
      };
      const a = e.value.style.chart.tooltip.customFormat;
      if (rt(a) && nt(() => a({
        seriesIndex: -1,
        datapoint: t,
        series: R.value,
        config: e.value
      })))
        P.value = a({
          seriesIndex: -1,
          // well, ok
          datapoint: t,
          series: R.value,
          config: e.value
        });
      else {
        let o = "";
        o += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`, t.details && (o += `<div style="width:100%;border-top:1px solid ${e.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`), P.value = `<div style="font-family:inherit">${o}</div>`;
      }
    }
    const he = g(null), M = g(null);
    function Ie(t) {
      he.value = t, t ? (u.value = !0, De(t), M.value = t.uid) : (u.value = !1, P.value = "", M.value = null);
    }
    function Ne(t) {
      const a = [];
      function o(d) {
        d.forEach((c) => {
          const b = {
            name: c.name,
            details: c.details || "-",
            ancestor: c.ancestor && c.ancestor.name || "-",
            color: c.color || ""
          };
          a.push(b), c.nodes && c.nodes.length > 0 && o(c.nodes, c.name);
        });
      }
      return o(t), a;
    }
    const Le = A(() => Ne(R.value)), L = A(() => {
      const t = [
        e.value.table.translations.nodeName,
        e.value.table.translations.details,
        e.value.table.translations.ancestor
      ], a = Le.value.map((c, b) => [
        {
          color: c.color,
          name: c.name
        },
        c.details,
        c.ancestor || ""
      ]), o = {
        th: {
          backgroundColor: e.value.table.th.backgroundColor,
          color: e.value.table.th.color,
          outline: e.value.table.th.outline
        },
        td: {
          backgroundColor: e.value.table.td.backgroundColor,
          color: e.value.table.td.color,
          outline: e.value.table.td.outline
        },
        breakpoint: e.value.table.responsiveBreakpoint
      }, d = [
        e.value.table.translations.nodeName,
        e.value.table.translations.details,
        e.value.table.translations.ancestor
      ];
      return {
        head: t,
        body: a,
        config: o,
        colNames: d
      };
    });
    function fe() {
      Xe(() => {
        const t = L.value.body.map((d, c) => [[d[0].name], [d[1]], [d[2]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[...L.value.head]]].concat(t), o = st(a);
        at({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-molecule" });
      });
    }
    function _e() {
      return R.value;
    }
    const z = g(!1);
    function Ee(t) {
      z.value = t, S.value += 1;
    }
    function pe() {
      $.value.showTable = !$.value.showTable;
    }
    function ye() {
      $.value.showDataLabels = !$.value.showDataLabels;
    }
    function ge() {
      $.value.showTooltip = !$.value.showTooltip;
    }
    const B = g(!1);
    function Q() {
      B.value = !B.value;
    }
    const He = A(() => !B.value), { viewBox: V } = bt(Y, {
      x: 0,
      y: 0,
      width: C.value.width <= 0 ? 10 : C.value.width,
      height: C.value.height <= 0 ? 10 : C.value.height
    }, e.value.style.chart.zoom.speed, He);
    function Me(t) {
      w("selectNode", t);
    }
    return E({
      getData: _e,
      generatePdf: ue,
      generateCsv: fe,
      generateImage: ce,
      toggleTable: pe,
      toggleLabels: ye,
      toggleTooltip: ge,
      toggleAnnotator: Q
    }), (t, a) => (l(), r("div", {
      ref_key: "moleculeChart",
      ref: G,
      class: $e(`vue-ui-molecule ${z.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
      id: `cluster_${k.value}`,
      onMouseleave: a[1] || (a[1] = (o) => {
        he.value = null, M.value = null, f(se)(!1);
      }),
      onMouseenter: a[2] || (a[2] = () => f(se)(!0))
    }, [
      e.value.userOptions.buttons.annotator ? (l(), O(yt, {
        key: 0,
        svgRef: f(Y),
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: B.value,
        onClose: Q
      }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : h("", !0),
      Oe.value ? (l(), r("div", At, null, 512)) : h("", !0),
      e.value.style.chart.title.text ? (l(), r("div", St, [
        (l(), O(it, {
          key: `title_${oe.value}`,
          config: {
            title: {
              cy: "molecule-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "molecule-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : h("", !0),
      e.value.userOptions.show && i.value && (f(ae) || f(X)) ? (l(), O(ct, {
        ref_key: "details",
        ref: W,
        key: `user_options_${S.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: f(ne),
        isImaging: f(ie),
        uid: k.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isTooltip: $.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: G.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: B.value,
        onToggleFullscreen: Ee,
        onGeneratePdf: f(ue),
        onGenerateCsv: fe,
        onGenerateImage: f(ce),
        onToggleTable: pe,
        onToggleLabels: ye,
        onToggleTooltip: ge,
        onToggleAnnotator: Q,
        style: K({
          visibility: f(ae) ? f(X) ? "visible" : "hidden" : "visible"
        })
      }, je({ _: 2 }, [
        t.$slots.menuIcon ? {
          name: "menuIcon",
          fn: m(({ isOpen: o, color: d }) => [
            y(t.$slots, "menuIcon", D(I({ isOpen: o, color: d })), void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: m(() => [
            y(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: m(() => [
            y(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: m(() => [
            y(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: m(() => [
            y(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: m(() => [
            y(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: m(() => [
            y(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "6"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: m(({ toggleFullscreen: o, isFullscreen: d }) => [
            y(t.$slots, "optionFullscreen", D(I({ toggleFullscreen: o, isFullscreen: d })), void 0, !0)
          ]),
          key: "7"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: m(({ toggleAnnotator: o, isAnnotator: d }) => [
            y(t.$slots, "optionAnnotator", D(I({ toggleAnnotator: o, isAnnotator: d })), void 0, !0)
          ]),
          key: "8"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
      i.value ? (l(), r("svg", {
        key: 4,
        ref_key: "svgRef",
        ref: Y,
        xmlns: f(tt),
        viewBox: `${f(V).x} ${f(V).y} ${f(V).width} ${f(V).height}`,
        class: $e({ "vue-data-ui-fullscreen--on": z.value, "vue-data-ui-fulscreen--off": !z.value }),
        style: K(`overflow: hidden; background:transparent;color:${e.value.style.chart.color}`)
      }, [
        j(pt),
        t.$slots["chart-background"] ? (l(), r("foreignObject", {
          key: 0,
          x: 0,
          y: 0,
          width: C.value.width <= 0 ? 10 : C.value.width,
          height: C.value.height <= 0 ? 10 : C.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          y(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, Dt)) : h("", !0),
        N("defs", null, [
          (l(!0), r(p, null, U(Object.keys(Ue.value), (o) => (l(), r("radialGradient", {
            id: `gradient_${o}`,
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            N("stop", {
              offset: "0%",
              "stop-color": f(ot)(o, 0.5)
            }, null, 8, Nt),
            N("stop", {
              offset: "100%",
              "stop-color": o
            }, null, 8, Lt)
          ], 8, It))), 256))
        ]),
        j(xt, {
          dataset: R.value,
          color: e.value.style.chart.links.stroke,
          backgroundColor: e.value.style.chart.backgroundColor
        }, null, 8, ["dataset", "color", "backgroundColor"]),
        j(wt, {
          dataset: R.value,
          hoveredUid: M.value,
          stroke: e.value.style.chart.nodes.stroke,
          strokeHovered: e.value.style.chart.nodes.strokeHovered,
          onClick: Me,
          onHover: Ie
        }, {
          node: m(({ node: o }) => [
            y(t.$slots, "node", D(I({ node: o })), void 0, !0)
          ]),
          _: 3
        }, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
        $.value.showDataLabels ? (l(), O(Ot, {
          key: 1,
          dataset: R.value,
          color: e.value.style.chart.color,
          hoveredUid: M.value
        }, null, 8, ["dataset", "color", "hoveredUid"])) : h("", !0),
        y(t.$slots, "svg", { svg: C.value }, void 0, !0)
      ], 14, Ut)) : h("", !0),
      t.$slots.watermark ? (l(), r("div", _t, [
        y(t.$slots, "watermark", D(I({ isPrinting: f(ne) || f(ie) })), void 0, !0)
      ])) : h("", !0),
      i.value ? h("", !0) : (l(), O(ht, {
        key: 6,
        config: {
          type: "molecule",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            molecule: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      t.$slots.source ? (l(), r("div", Et, [
        y(t.$slots, "source", {}, void 0, !0)
      ], 512)) : h("", !0),
      j(vt, {
        show: $.value.showTooltip && u.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        fontSize: e.value.style.chart.tooltip.fontSize,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: G.value,
        content: P.value,
        isFullscreen: z.value,
        isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": m(() => [
          y(t.$slots, "tooltip-before", D(I({ ...q.value })), void 0, !0)
        ]),
        "tooltip-after": m(() => [
          y(t.$slots, "tooltip-after", D(I({ ...q.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      i.value ? (l(), O(ft, {
        key: 8,
        hideDetails: "",
        config: {
          open: $.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          },
          head: {
            backgroundColor: e.value.style.chart.backgroundColor,
            color: e.value.style.chart.color
          }
        }
      }, {
        content: m(() => [
          (l(), O(dt, {
            key: `table_${le.value}`,
            colNames: L.value.colNames,
            head: L.value.head,
            body: L.value.body,
            config: L.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: a[0] || (a[0] = (o) => $.value.showTable = !1)
          }, {
            th: m(({ th: o }) => [
              N("div", {
                innerHTML: o,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Ht)
            ]),
            td: m(({ td: o }) => [
              We(Fe(o.name || o), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : h("", !0)
    ], 46, Rt));
  }
}, oo = /* @__PURE__ */ kt(Mt, [["__scopeId", "data-v-d296dc0b"]]);
export {
  oo as default
};
