import { toRef as re, resolveComponent as ie, openBlock as s, createElementBlock as r, Fragment as y, renderList as z, withModifiers as H, createBlock as F, createCommentVNode as m, createElementVNode as $, toDisplayString as Le, normalizeStyle as ne, createVNode as S, computed as O, onMounted as Ze, ref as f, watch as Je, normalizeClass as Pe, unref as N, createSlots as Ke, withCtx as C, renderSlot as P, normalizeProps as J, guardReactiveProps as K, createTextVNode as Qe, nextTick as Te } from "vue";
import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, O as rt, q as it, r as ut, x as ct, y as dt } from "./index-DK7qqHGP.js";
import { _ as vt } from "./Title-Cxlu3Etv.js";
import { u as ft, U as pt } from "./usePrinter-Cza87yNE.js";
import { D as ht } from "./DataTable-B9SSwFM2.js";
import { _ as gt } from "./Tooltip-Bt9pHzBM.js";
import W from "./BaseIcon-ZChy8GeS.js";
import yt from "./vue-ui-skeleton-CQnYuosp.js";
import mt from "./vue-ui-accordion-5C4CP3gA.js";
import { u as Se } from "./useNestedProp-0nRX_rTi.js";
import { _ as bt } from "./PackageVersion-I1_4jcn_.js";
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], $t = {
  __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: ["zoom", "hover"],
  setup(a, { emit: k }) {
    const b = a;
    function u(n) {
      k("zoom", n);
    }
    function c(n) {
      k("hover", n);
    }
    return re(b, "dataset").value.forEach((n) => {
      n.nodes && n.nodes.length > 0 && n.nodes.forEach((v) => {
        v.ancestor = n;
      });
    }), (n, v) => {
      const R = ie("RecursiveCircles", !0);
      return s(!0), r(y, null, z(a.dataset, (p) => (s(), r(y, null, [
        p.polygonPath && p.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
          (s(!0), r(y, null, z(p.polygonPath.coordinates, (B, q) => (s(), r("circle", {
            cx: B.x,
            cy: B.y,
            r: p.circleRadius,
            fill: `url(#gradient_${p.color})`,
            stroke: a.hoveredUid && a.hoveredUid === p.uid ? a.strokeHovered : a.stroke,
            "stroke-width": a.hoveredUid && a.hoveredUid === p.uid ? p.circleRadius / 6 : p.circleRadius / 12,
            style: { cursor: "pointer" },
            onClick: H((D) => u(p), ["stop"]),
            onMouseover: (D) => c(p),
            onMouseleave: v[0] || (v[0] = (D) => c(null))
          }, null, 40, Ct))), 256)),
          p.nodes && p.nodes.length > 0 ? (s(), F(R, {
            key: 0,
            dataset: p.nodes,
            color: a.color,
            stroke: a.stroke,
            strokeHovered: a.strokeHovered,
            hoveredUid: a.hoveredUid,
            onZoom: u,
            onHover: c
          }, null, 8, ["dataset", "color", "stroke", "strokeHovered", "hoveredUid"])) : m("", !0)
        ], 64)) : m("", !0)
      ], 64))), 256);
    };
  }
}, xt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], wt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Pt = {
  __name: "RecursiveLinks",
  props: {
    dataset: {
      type: Array,
      default: () => []
    },
    color: {
      type: String,
      default: "#DDDDDD"
    },
    backgroundColor: {
      type: String,
      default: "#FFFFFF"
    }
  },
  setup(a) {
    return re(a, "dataset").value.forEach((u) => {
      u.nodes && u.nodes.length > 0 && u.nodes.forEach((c) => {
        c.ancestor = u;
      });
    }), (u, c) => {
      const L = ie("RecursiveLinks", !0);
      return s(), r(y, null, [
        (s(!0), r(y, null, z(a.dataset, (n) => (s(), r(y, null, [
          n.polygonPath && n.polygonPath.coordinates ? (s(!0), r(y, { key: 0 }, z(n.polygonPath.coordinates, (v, R) => (s(), r(y, null, [
            n.ancestor && n.ancestor.polygonPath ? (s(), r(y, { key: 0 }, [
              $("line", {
                x1: v.x,
                y1: v.y,
                x2: n.ancestor.polygonPath.coordinates[0].x,
                y2: n.ancestor.polygonPath.coordinates[0].y,
                stroke: a.backgroundColor,
                "stroke-width": n.circleRadius / 1.5
              }, null, 8, xt),
              $("line", {
                x1: v.x,
                y1: v.y,
                x2: n.ancestor.polygonPath.coordinates[0].x,
                y2: n.ancestor.polygonPath.coordinates[0].y,
                stroke: a.color,
                "stroke-width": n.circleRadius / 2
              }, null, 8, wt)
            ], 64)) : m("", !0)
          ], 64))), 256)) : m("", !0)
        ], 64))), 256)),
        (s(!0), r(y, null, z(a.dataset, (n) => (s(), r(y, null, [
          n.polygonPath && n.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
            n.nodes && n.nodes.length > 0 ? (s(), F(L, {
              key: 0,
              dataset: n.nodes,
              color: a.color,
              backgroundColor: a.backgroundColor
            }, null, 8, ["dataset", "color", "backgroundColor"])) : m("", !0)
          ], 64)) : m("", !0)
        ], 64))), 256))
      ], 64);
    };
  }
}, Tt = ["x", "y", "fill", "font-size"], Ft = {
  __name: "RecursiveLabels",
  props: {
    color: {
      type: String,
      default: "#000000"
    },
    dataset: {
      type: Array,
      default: () => []
    },
    hoveredUid: {
      type: String,
      default: null
    }
  },
  emits: ["zoom", "hover"],
  setup(a, { emit: k }) {
    return re(a, "dataset").value.forEach((c) => {
      c.nodes && c.nodes.length > 0 && c.nodes.forEach((L) => {
        L.ancestor = c;
      });
    }), (c, L) => {
      const n = ie("RecursiveLabels", !0);
      return s(!0), r(y, null, z(a.dataset, (v) => (s(), r(y, null, [
        v.polygonPath && v.polygonPath.coordinates ? (s(), r(y, { key: 0 }, [
          (s(!0), r(y, null, z(v.polygonPath.coordinates, (R) => (s(), r("text", {
            x: R.x,
            y: R.y + v.circleRadius * 2,
            fill: a.color,
            "font-size": v.circleRadius,
            "text-anchor": "middle",
            style: { opacity: "0.8", "pointer-events": "none" }
          }, Le(v.name), 9, Tt))), 256)),
          v.nodes && v.nodes.length > 0 ? (s(), F(n, {
            key: 0,
            dataset: v.nodes,
            color: a.color,
            hoveredUid: a.hoveredUid
          }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0)
        ], 64)) : m("", !0)
      ], 64))), 256);
    };
  }
}, Rt = { style: { position: "relative", height: "100%", width: "100%" } }, St = {
  __name: "BaseDirectionPad",
  props: {
    color: {
      type: String,
      default: "#FF0000"
    },
    isFullscreen: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
  setup(a, { emit: k }) {
    return (b, u) => (s(), r("div", {
      style: ne(`position: ${a.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${a.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
      "data-html2canvas-ignore": ""
    }, [
      $("div", Rt, [
        $("button", {
          onClick: u[0] || (u[0] = H((c) => k("moveLeft"), ["stop"])),
          style: { position: "absolute", left: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(W, {
            stroke: a.color,
            name: "arrowLeft",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        $("button", {
          onClick: u[1] || (u[1] = H((c) => k("moveTop"), ["stop"])),
          style: { position: "absolute", top: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(W, {
            stroke: a.color,
            name: "arrowTop",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        $("button", {
          onClick: u[2] || (u[2] = H((c) => k("moveRight"), ["stop"])),
          style: { position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(W, {
            stroke: a.color,
            name: "arrowRight",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        $("button", {
          onClick: u[3] || (u[3] = H((c) => k("moveBottom"), ["stop"])),
          style: { position: "absolute", bottom: "0", left: "50%", transform: "translateX(-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(W, {
            stroke: a.color,
            name: "arrowBottom",
            style: { cursor: "pointer" }
          }, null, 8, ["stroke"])
        ]),
        $("button", {
          onClick: u[4] || (u[4] = H((c) => k("reset"), ["stop"])),
          style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%,-50%)", height: "24px", width: "24px", padding: "0", background: "transparent", border: "none", display: "flex", "align-items": "center", "justify-content": "center" }
        }, [
          S(W, {
            stroke: a.color,
            name: "close",
            style: { cursor: "pointer" },
            strokeWidth: 2
          }, null, 8, ["stroke"])
        ])
      ])
    ], 4));
  }
}, Lt = ["id"], Dt = {
  key: 0,
  style: "width:100%;background:transparent;"
}, It = ["xmlns", "viewBox"], Ut = ["id"], Nt = ["stop-color"], zt = ["stop-color"], Bt = {
  key: 4,
  class: "vue-data-ui-watermark"
}, Mt = ["innerHTML"], Ot = {
  __name: "vue-ui-molecule",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(a, { expose: k }) {
    const b = a, { vue_ui_molecule: u } = _e(), c = O(() => !!b.dataset && b.dataset.length);
    Ze(() => {
      L();
    });
    function L() {
      et(b.dataset) && tt({
        componentName: "VueUiMolecule",
        type: "dataset"
      });
    }
    const n = f(Fe()), v = f(null), R = f(!1), p = f(""), B = f(null), q = f(null), D = f(!1), x = f(null), ue = f(null), Q = f(0), ce = f(0), de = f(0), t = O({
      get: () => ve(),
      set: (e) => e
    });
    function ve() {
      const e = Se({
        userConfig: b.config,
        defaultConfig: u
      });
      return e.theme ? {
        ...Se({
          userConfig: ot.vue_ui_molecule[e.theme] || b.config,
          defaultConfig: e
        }),
        customPalette: lt[e.theme] || Re
      } : e;
    }
    Je(() => b.config, (e) => {
      t.value = ve(), L(), ce.value += 1, de.value += 1;
    }, { deep: !0 });
    const { isPrinting: fe, isImaging: pe, generatePdf: he, generateImage: ge } = ft({
      elementId: `cluster_${n.value}`,
      fileName: t.value.style.chart.title.text || "vue-ui-molecule"
    }), De = O(() => at(t.value.customPalette)), w = f({
      showTable: t.value.table.show,
      showDataLabels: !0,
      showTooltip: t.value.style.chart.tooltip.show
    });
    function ye(e, o = 0) {
      return Array.isArray(e) && e.length > 0 && e[0].nodes ? ye(e[0].nodes, o + 1) : o;
    }
    function Ie() {
      const e = ye(b.dataset);
      let o = 100, l = o;
      for (let d = 0; d < e; d += 1)
        o /= 1, l += o;
      return {
        height: l,
        width: l
      };
    }
    const I = f(Ie()), _ = f(`0 0 ${I.value.width} ${I.value.height}`);
    function me(e, o = { x: -I.value.width / 2.43, y: I.value.height / 2 }, l = I.value.width / 1.1, d = 24, i = 0, h = 0, j = "#BBBBBB") {
      if (e && e.length > 0) {
        const ae = rt({
          plot: o,
          radius: l,
          sides: e.length,
          rotation: i
        });
        e.forEach((g, M) => {
          const V = ae.coordinates[M];
          let U;
          if (g.ancestor ? g.ancestor.ancestor ? U = g.ancestor.color || j : (U = De.value[h] || Re[h] || j, h += 1) : U = j, g.polygonPath = {
            coordinates: [V]
          }, g.circleRadius = d, g.color = U, g.uid = Fe(), g.nodes && g.nodes.length > 0) {
            const se = !g.ancestor || !g.ancestor.ancestor ? h : 0;
            g.nodes = me(
              g.nodes,
              V,
              l / 2.9,
              d / 2.2,
              i + Math.PI * M / g.nodes.length,
              se,
              U
            );
          }
        });
      }
      return e;
    }
    function Ue(e) {
      const o = /* @__PURE__ */ new Set();
      function l(i) {
        i.forEach((h) => {
          h.color && !o.has(h.color) && o.add(h.color), h.nodes && h.nodes.length > 0 && l(h.nodes);
        });
      }
      l(e);
      const d = {};
      return Array.from(o).forEach((i, h) => {
        d[i] = `gradient_${h}`;
      }), d;
    }
    const Ne = O(() => Ue(T.value)), T = O(() => me(b.dataset));
    function ee() {
      D.value = !1, q.value = null, ue.value = null, x.value = null, oe({
        polygonPath: {
          coordinates: [{ x: I.value.width / 2, y: I.value.height / 2 }]
        },
        circleRadius: 24
      });
    }
    const te = f(null);
    function oe(e) {
      B.value.focus(), Te(() => {
        te.value && cancelAnimationFrame(te.value);
        const o = _.value.split(" "), l = parseFloat(o[0]), d = parseFloat(o[1]), i = parseFloat(o[2]), h = parseFloat(o[3]), { x: j, y: ae } = e.polygonPath.coordinates[0], { circleRadius: g } = e, M = 8.34, V = j - g * M, U = ae - g * M, se = g * M * 2, Ge = g * M * 2, je = Math.sqrt((V - l) ** 2 + (U - d) ** 2), Y = Math.min(1200, Math.max(20, Math.floor(je / 10))), Ve = (V - l) / Y, Ye = (U - d) / Y, We = (se - i) / Y, qe = (Ge - h) / Y;
        let A = 0;
        function we() {
          _.value = `${l + Ve * A} ${d + Ye * A} ${i + We * A} ${h + qe * A}`, A += t.value.style.chart.zoom.speed, A <= Y && (te.value = requestAnimationFrame(we));
        }
        we();
      });
    }
    function ze(e) {
      q.value === e.uid ? ee() : (q.value = e.uid, ue.value = e, x.value = {
        circleRadius: e.circleRadius,
        polygonPath: {
          coordinates: [{ x: e.polygonPath.coordinates[0].x, y: e.polygonPath.coordinates[0].y }]
        }
      }, oe(e), D.value = e.uid !== T.value[0].uid);
    }
    function Be(e) {
      if (e.target.nodeName !== "circle")
        ee(), D.value = !1;
      else
        return;
    }
    const le = f(null);
    function Me(e) {
      le.value = {
        datapoint: e,
        seriesIndex: -1,
        series: T.value,
        config: t.value
      };
      const o = t.value.style.chart.tooltip.customFormat;
      if (ct(o) && dt(() => o({
        seriesIndex: -1,
        datapoint: e,
        series: T.value,
        config: t.value
      })))
        p.value = o({
          seriesIndex: -1,
          // well, ok
          datapoint: e,
          series: T.value,
          config: t.value
        });
      else {
        let l = "";
        l += `<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`, e.details && (l += `<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${e.details}</div>`), p.value = `<div style="font-family:inherit">${l}</div>`;
      }
    }
    const be = f(null), X = f(null);
    function Oe(e) {
      be.value = e, e ? (R.value = !0, Me(e), X.value = e.uid) : (R.value = !1, p.value = "", X.value = null);
    }
    function Z(e) {
      e === "right" && (x.value.polygonPath.coordinates[0].x += x.value.circleRadius), e === "left" && (x.value.polygonPath.coordinates[0].x -= x.value.circleRadius), e === "top" && (x.value.polygonPath.coordinates[0].y -= x.value.circleRadius), e === "bottom" && (x.value.polygonPath.coordinates[0].y += x.value.circleRadius), oe(x.value);
    }
    function He(e) {
      const o = [];
      function l(d) {
        d.forEach((i) => {
          const h = {
            name: i.name,
            details: i.details || "-",
            ancestor: i.ancestor && i.ancestor.name || "-",
            color: i.color || ""
          };
          o.push(h), i.nodes && i.nodes.length > 0 && l(i.nodes, i.name);
        });
      }
      return l(e), o;
    }
    const Ee = O(() => He(T.value)), E = O(() => {
      const e = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ], o = Ee.value.map((i, h) => [
        {
          color: i.color,
          name: i.name
        },
        i.details,
        i.ancestor || ""
      ]), l = {
        th: {
          backgroundColor: t.value.table.th.backgroundColor,
          color: t.value.table.th.color,
          outline: t.value.table.th.outline
        },
        td: {
          backgroundColor: t.value.table.td.backgroundColor,
          color: t.value.table.td.color,
          outline: t.value.table.td.outline
        },
        breakpoint: t.value.table.responsiveBreakpoint
      }, d = [
        t.value.table.translations.nodeName,
        t.value.table.translations.details,
        t.value.table.translations.ancestor
      ];
      return {
        head: e,
        body: o,
        config: l,
        colNames: d
      };
    });
    function ke() {
      Te(() => {
        const e = E.value.body.map((d, i) => [[d[0].name], [d[1]], [d[2]]]), o = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [[...E.value.head]]].concat(e), l = it(o);
        ut({ csvContent: l, title: t.value.style.chart.title.text || "vue-ui-molecule" });
      });
    }
    function Ae() {
      return T.value;
    }
    const G = f(!1);
    function Xe(e) {
      G.value = e, Q.value += 1;
    }
    function Ce() {
      w.value.showTable = !w.value.showTable;
    }
    function $e() {
      w.value.showDataLabels = !w.value.showDataLabels;
    }
    function xe() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    return k({
      getData: Ae,
      generatePdf: he,
      generateCsv: ke,
      generateImage: ge,
      toggleTable: Ce,
      toggleLabels: $e,
      toggleTooltip: xe
    }), (e, o) => (s(), r("div", {
      onMouseleave: o[7] || (o[7] = (l) => {
        be.value = null, X.value = null;
      }),
      ref_key: "moleculeChart",
      ref: B,
      class: Pe(`vue-ui-molecule ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: ne(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
      id: `cluster_${n.value}`
    }, [
      t.value.style.chart.title.text ? (s(), r("div", Dt, [
        (s(), F(vt, {
          key: `title_${ce.value}`,
          config: {
            title: {
              cy: "molecule-div-title",
              ...t.value.style.chart.title
            },
            subtitle: {
              cy: "molecule-div-subtitle",
              ...t.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : m("", !0),
      t.value.userOptions.show && c.value ? (s(), F(pt, {
        ref_key: "details",
        ref: v,
        key: `user_options_${Q.value}`,
        backgroundColor: t.value.style.chart.backgroundColor,
        color: t.value.style.chart.color,
        isPrinting: N(fe),
        isImaging: N(pe),
        uid: n.value,
        hasTooltip: t.value.userOptions.buttons.tooltip && t.value.style.chart.tooltip.show,
        hasPdf: t.value.userOptions.buttons.pdf,
        hasXls: t.value.userOptions.buttons.csv,
        hasImg: t.value.userOptions.buttons.img,
        hasTable: t.value.userOptions.buttons.table,
        hasLabel: t.value.userOptions.buttons.labels,
        hasFullscreen: t.value.userOptions.buttons.fullscreen,
        isTooltip: w.value.showTooltip,
        titles: { ...t.value.userOptions.buttonTitles },
        chartElement: B.value,
        position: t.value.userOptions.position,
        onToggleFullscreen: Xe,
        onGeneratePdf: N(he),
        onGenerateCsv: ke,
        onGenerateImage: N(ge),
        onToggleTable: Ce,
        onToggleLabels: $e,
        onToggleTooltip: xe
      }, Ke({ _: 2 }, [
        e.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: C(() => [
            P(e.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        e.$slots.optionPdf ? {
          name: "optionPdf",
          fn: C(() => [
            P(e.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        e.$slots.optionCsv ? {
          name: "optionCsv",
          fn: C(() => [
            P(e.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        e.$slots.optionImg ? {
          name: "optionImg",
          fn: C(() => [
            P(e.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        e.$slots.optionTable ? {
          name: "optionTable",
          fn: C(() => [
            P(e.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        e.$slots.optionLabels ? {
          name: "optionLabels",
          fn: C(() => [
            P(e.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        e.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: C(({ toggleFullscreen: l, isFullscreen: d }) => [
            P(e.$slots, "optionFullscreen", J(K({ toggleFullscreen: l, isFullscreen: d })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
      c.value ? (s(), r("svg", {
        key: 2,
        xmlns: N(st),
        viewBox: _.value,
        class: Pe({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
        style: ne(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`),
        onClick: o[0] || (o[0] = H((l) => Be(l), ["stop"]))
      }, [
        S(bt),
        $("defs", null, [
          (s(!0), r(y, null, z(Object.keys(Ne.value), (l) => (s(), r("radialGradient", {
            id: `gradient_${l}`,
            cx: "50%",
            cy: "30%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            $("stop", {
              offset: "0%",
              "stop-color": N(nt)(l, 0.5)
            }, null, 8, Nt),
            $("stop", {
              offset: "100%",
              "stop-color": l
            }, null, 8, zt)
          ], 8, Ut))), 256))
        ]),
        S(Pt, {
          dataset: T.value,
          color: t.value.style.chart.links.stroke,
          backgroundColor: t.value.style.chart.backgroundColor
        }, null, 8, ["dataset", "color", "backgroundColor"]),
        S($t, {
          dataset: T.value,
          hoveredUid: X.value,
          stroke: t.value.style.chart.nodes.stroke,
          strokeHovered: t.value.style.chart.nodes.strokeHovered,
          onZoom: ze,
          onHover: Oe
        }, null, 8, ["dataset", "hoveredUid", "stroke", "strokeHovered"]),
        w.value.showDataLabels ? (s(), F(Ft, {
          key: 0,
          dataset: T.value,
          color: t.value.style.chart.color,
          hoveredUid: X.value
        }, null, 8, ["dataset", "color", "hoveredUid"])) : m("", !0),
        P(e.$slots, "svg", { svg: I.value }, void 0, !0)
      ], 14, It)) : m("", !0),
      D.value ? (s(), F(St, {
        key: `direction_pad_${Q.value}`,
        color: t.value.style.chart.color,
        isFullscreen: G.value,
        onMoveLeft: o[1] || (o[1] = (l) => Z("left")),
        onMoveRight: o[2] || (o[2] = (l) => Z("right")),
        onMoveTop: o[3] || (o[3] = (l) => Z("top")),
        onMoveBottom: o[4] || (o[4] = (l) => Z("bottom")),
        onReset: o[5] || (o[5] = (l) => {
          ee(), D.value = !1;
        })
      }, null, 8, ["color", "isFullscreen"])) : m("", !0),
      e.$slots.watermark ? (s(), r("div", Bt, [
        P(e.$slots, "watermark", J(K({ isPrinting: N(fe) || N(pe) })), void 0, !0)
      ])) : m("", !0),
      c.value ? m("", !0) : (s(), F(yt, {
        key: 5,
        config: {
          type: "molecule",
          style: {
            backgroundColor: t.value.style.chart.backgroundColor,
            molecule: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      S(gt, {
        show: w.value.showTooltip && R.value,
        backgroundColor: t.value.style.chart.tooltip.backgroundColor,
        color: t.value.style.chart.tooltip.color,
        borderRadius: t.value.style.chart.tooltip.borderRadius,
        borderColor: t.value.style.chart.tooltip.borderColor,
        borderWidth: t.value.style.chart.tooltip.borderWidth,
        fontSize: t.value.style.chart.tooltip.fontSize,
        backgroundOpacity: t.value.style.chart.tooltip.backgroundOpacity,
        position: t.value.style.chart.tooltip.position,
        offsetY: t.value.style.chart.tooltip.offsetY,
        parent: B.value,
        content: p.value,
        isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
      }, {
        "tooltip-before": C(() => [
          P(e.$slots, "tooltip-before", J(K({ ...le.value })), void 0, !0)
        ]),
        "tooltip-after": C(() => [
          P(e.$slots, "tooltip-after", J(K({ ...le.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      c.value ? (s(), F(mt, {
        key: 6,
        hideDetails: "",
        config: {
          open: w.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          },
          head: {
            backgroundColor: t.value.style.chart.backgroundColor,
            color: t.value.style.chart.color
          }
        }
      }, {
        content: C(() => [
          (s(), F(ht, {
            key: `table_${de.value}`,
            colNames: E.value.colNames,
            head: E.value.head,
            body: E.value.body,
            config: E.value.config,
            title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: o[6] || (o[6] = (l) => w.value.showTable = !1)
          }, {
            th: C(({ th: l }) => [
              $("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Mt)
            ]),
            td: C(({ td: l }) => [
              Qe(Le(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : m("", !0)
    ], 46, Lt));
  }
}, Kt = /* @__PURE__ */ kt(Ot, [["__scopeId", "data-v-aafaabe0"]]);
export {
  Kt as default
};
