import { useCssVars as Qe, computed as y, ref as h, watch as Ie, onMounted as et, watchEffect as tt, openBlock as s, createElementBlock as i, normalizeClass as Fe, normalizeStyle as W, unref as c, createBlock as T, createCommentVNode as f, renderSlot as m, createSlots as lt, withCtx as C, normalizeProps as D, guardReactiveProps as L, createVNode as at, Fragment as O, renderList as se, createElementVNode as k, toDisplayString as G, createTextVNode as ot, nextTick as st } from "vue";
import { u as nt, c as Ne, t as rt, a as ne, p as P, o as ut, e as it, b as ct, d as Se, m as vt, h as Me, f as re, X as dt, l as ht, G as Y, i as _e, q as ft, r as yt } from "./index-CxkSLqkR.js";
import { u as Ae } from "./useNestedProp-Cl0RLl8U.js";
import { u as pt, U as mt } from "./usePrinter-C6iBjau1.js";
import { _ as bt } from "./Title-DlWf9Ddn.js";
import { P as gt } from "./PenAndPaper-B-Xy37LR.js";
import { u as kt } from "./useUserOptionState-BIvW1Kz7.js";
import { _ as wt } from "./PackageVersion-CZWTAkjP.js";
import xt from "./vue-ui-accordion-ElsMWD7y.js";
import { D as Ct } from "./DataTable-BE81z-1L.js";
import $t from "./vue-ui-skeleton-BNcyfNtG.js";
import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Pt = ["id"], Tt = ["xmlns", "viewBox"], Ot = ["x", "y", "width", "height"], It = ["id"], Ft = ["stop-color"], Nt = ["stop-color"], St = ["stop-color"], Mt = { key: 0 }, _t = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter"], At = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Et = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Dt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Lt = ["d", "fill"], Gt = ["cx", "cy", "r", "opacity", "stroke", "fill"], Ut = {
  key: 0,
  style: { pointerEvents: "none" }
}, Bt = { key: 1 }, Vt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Ht = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Rt = {
  key: 6,
  class: "vue-data-ui-watermark"
}, Xt = ["innerHTML"], Wt = {
  __name: "vue-ui-circle-pack",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(Ee, { expose: De }) {
    const $ = Ee;
    Qe((t) => ({
      "49c9a662": N.value,
      "0c7b2888": K.value
    }));
    const { vue_ui_circle_pack: Le } = nt(), U = y(() => !!$.dataset && $.dataset.length), I = h(Ne()), j = h(null), Ge = h(null), Ue = h(null), ue = h(0), ie = h(0), ce = h(0), Be = h(null), e = y({
      get: () => he(),
      set: (t) => t
    }), {
      userOptionsVisible: q,
      setUserOptionsVisibility: ve,
      keepUserOptionState: de
    } = kt({ config: e.value });
    function he() {
      const t = Ae({
        userConfig: $.config,
        defaultConfig: Le
      });
      return t.theme ? {
        ...Ae({
          userConfig: rt.vue_ui_circle_pack[t.theme] || $.config,
          defaultConfig: t
        }),
        customPalette: ne[t.theme] || P
      } : t;
    }
    Ie(() => $.config, (t) => {
      e.value = he(), q.value = !e.value.userOptions.showOnChartHover, Z(), ue.value += 1, ie.value += 1, F.value.showTable = e.value.table.show;
    }, { deep: !0 });
    const { isPrinting: fe, isImaging: ye, generatePdf: pe, generateImage: me } = pt({
      elementId: `vue-ui-circle-pack_${I.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-circle-pack"
    }), Ve = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), F = h({
      showTable: e.value.table.show
    });
    async function Z() {
      ut($.dataset) && it({
        componentName: "VueUiCirclePack",
        type: "dataset"
      }), await Xe();
    }
    et(Z), Ie(() => $.dataset, async (t) => {
      await Z();
    }, { deep: !0 });
    const be = y(() => ct(e.value.customPalette));
    function ge(t, a) {
      return Math.hypot(a.x - t.x, a.y - t.y);
    }
    function ke(t, a) {
      return a.some((l) => ge(t, l) < t.radius + l.radius);
    }
    function He(t, a, l, r) {
      const v = a * 2;
      for (let w of t)
        for (let x = 0; x < 360; x += 30) {
          let E = x * Math.PI / 180, u = w.x + v * Math.cos(E), o = w.y + v * Math.sin(E), b = { x: u, y: o, radius: a };
          if (u - a >= 0 && u + a <= l && o - a >= 0 && o + a <= r && !ke(b, t))
            return { x: u, y: o };
        }
      return null;
    }
    function Re(t, a, l, r, v = 0, w = 0) {
      const x = Math.max(...t.map((b) => b.value)), u = t.map((b, d) => ({
        ...b,
        radius: b.value / x * r,
        index: d
      })).map((b, d) => ({ ...b, index: d })).toSorted((b, d) => d.radius - b.radius);
      let o = [];
      o.push({
        ...u[0],
        x: a / 2 + v,
        y: l / 2 + w
      });
      for (let b of u.slice(1)) {
        let { radius: d, ...$e } = b, ee = He(o, d, a, l);
        if (ee)
          o.push({ ...$e, x: ee.x, y: ee.y, radius: d });
        else {
          let te = null, ze = 1 / 0;
          for (let R of o)
            for (let le = 0; le < 360; le += 15) {
              let Pe = le * Math.PI / 180, ae = R.x + (d + R.radius) * Math.cos(Pe), oe = R.y + (d + R.radius) * Math.sin(Pe), X = { ...$e, x: ae, y: oe, radius: d };
              if (ae - d >= 0 && ae + d <= a && oe - d >= 0 && oe + d <= l && !ke(X, o)) {
                let Te = o.reduce(
                  (Ke, Oe) => Ke + (ge(X, Oe) < X.radius + Oe.radius ? 1 : 0),
                  0
                );
                Te < ze && (ze = Te, te = X);
              }
            }
          te && o.push(te);
        }
      }
      return o;
    }
    const J = y(() => $.dataset.map((t, a) => {
      const l = Se(t.color) || be.value[a] || ne[e.value.theme || "default"][a % ne[e.value.theme || "default"].length] || P[a] || P[a % P.length];
      return {
        ...t,
        id: Ne(),
        color: l
      };
    }).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), g = h([]);
    async function Xe() {
      g.value = Re(
        J.value,
        // Huge plane size to place all datapoints
        1e4,
        1e4,
        32
      );
    }
    const we = y(() => ({
      width: 100,
      height: 100
    })), p = y(() => {
      const t = g.value.reduce((u, o) => o.x - o.radius < u.x - u.radius ? o : u, g.value[0]), a = g.value.reduce((u, o) => o.y - o.radius < u.y - u.radius ? o : u, g.value[0]), l = g.value.reduce((u, o) => o.x + o.radius > u.x + u.radius ? o : u, g.value[0]), r = g.value.reduce((u, o) => o.y + o.radius > u.y + u.radius ? o : u, g.value[0]), v = (t == null ? void 0 : t.x) || 0, w = (l == null ? void 0 : l.x) || we.value.width, x = (a == null ? void 0 : a.y) || 0, E = (r == null ? void 0 : r.y) || we.value.height;
      return {
        maxX: w,
        minX: v,
        width: Math.abs(w - v) + (t ? t.radius : 0) + (l ? l.radius : 0) + e.value.style.chart.circles.strokeWidth * 4,
        height: Math.abs(E - x) + (a ? a.radius : 0) + (r ? r.radius : 0) + e.value.style.chart.circles.strokeWidth * 4,
        x: t ? (t == null ? void 0 : t.x) - (t == null ? void 0 : t.radius) - e.value.style.chart.circles.strokeWidth * 2 : 0,
        y: a ? (a == null ? void 0 : a.y) - (a == null ? void 0 : a.radius) - e.value.style.chart.circles.strokeWidth * 2 : 0
      };
    }), We = y(() => g.value.map((t) => {
      if (t.breakdown)
        return vt(
          { series: t.breakdown.map((a, l) => ({
            ...a,
            color: Se(a.color) || be.value[l] || P[l] || P[l % P.length]
          })) },
          t.x,
          t.y,
          t.radius,
          t.radius,
          1.99999,
          2,
          1,
          360,
          105.25,
          t.radius / 2
        );
    })), n = h(null);
    function Ye(t) {
      e.value.style.chart.circles.zoom.show && (n.value = t);
    }
    const N = y(() => n.value ? n.value.radius : 0), K = y(() => n.value ? n.value.radius > p.value.width / 6 * e.value.style.chart.circles.zoom.zoomRatio ? n.value.radius : p.value.width / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), z = h(0), je = y(() => ({
      pointerEvents: "none",
      opacity: z.value,
      filter: `drop-shadow(0px 0px 6px ${Me(n.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
    })), S = h(N.value);
    tt(() => {
      S.value = N.value, z.value = 0;
      let t = null;
      function a(l) {
        t || (t = l);
        const r = (l - t) / e.value.style.chart.circles.zoom.animationFrameMs;
        r < 1 ? (S.value = N.value + (K.value - N.value) * r, z.value = 0 + e.value.style.chart.circles.zoom.opacity * r, requestAnimationFrame(a)) : (S.value = K.value, z.value = e.value.style.chart.circles.zoom.opacity);
      }
      requestAnimationFrame(a);
    });
    const M = y(() => ({
      name: e.value.style.chart.circles.zoom.label.name.fontSize * p.value.width / 300,
      value: e.value.style.chart.circles.zoom.label.value.fontSize * p.value.width / 300
    }));
    function _(t) {
      return _e(
        e.value.style.chart.circles.labels.value.formatter,
        t.value,
        re({
          p: e.value.style.chart.circles.labels.value.prefix,
          v: t.value,
          s: e.value.style.chart.circles.labels.value.suffix,
          r: e.value.style.chart.circles.labels.value.rounding
        })
      );
    }
    function qe() {
      return _e(
        e.value.style.chart.circles.zoom.label.value.formatter,
        n.value.value,
        re({
          p: e.value.style.chart.circles.zoom.label.value.prefix,
          v: n.value.value,
          s: e.value.style.chart.circles.zoom.label.value.suffix,
          r: e.value.style.chart.circles.zoom.label.rounding
        })
      );
    }
    const A = h(!1);
    function Ze(t) {
      A.value = t, ce.value += 1;
    }
    const B = h(!1);
    function Q() {
      B.value = !B.value;
    }
    const V = y(() => {
      const t = J.value.map((l) => ({
        name: l.name,
        value: l.value,
        color: l.color
      })).toSorted((l, r) => r.value - l.value), a = t.map((l) => l.value);
      return { head: t, body: a };
    });
    function xe() {
      st(() => {
        const t = V.value.head.map((r, v) => [[
          r.name
        ], [V.value.body[v]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), l = ft(a);
        yt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
      });
    }
    const H = y(() => {
      const t = [
        e.value.table.columnNames.datapoint,
        e.value.table.columnNames.value
      ], a = V.value.head.map((v, w) => {
        const x = re({
          p: e.value.style.chart.circles.labels.value.prefix,
          v: V.value.body[w],
          s: e.value.style.chart.circles.labels.value.suffix,
          r: e.value.style.chart.circles.labels.value.rounding
        });
        return [
          {
            color: v.color,
            name: v.name
          },
          x
        ];
      }), l = {
        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
      };
      return {
        colNames: [
          e.value.table.columnNames.datapoint,
          e.value.table.columnNames.value
        ],
        head: t,
        body: a,
        config: l
      };
    });
    function Ce() {
      F.value.showTable = !F.value.showTable;
    }
    function Je() {
      return J.value;
    }
    return De({
      getData: Je,
      generateCsv: xe,
      generatePdf: pe,
      generateImage: me,
      toggleTable: Ce,
      toggleAnnotator: Q
    }), (t, a) => (s(), i("div", {
      id: `vue-ui-circle-pack_${I.value}`,
      class: Fe(`vue-ui-circle-pack ${A.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "circlePackChart",
      ref: j,
      style: W(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
      onMouseenter: a[2] || (a[2] = () => c(ve)(!0)),
      onMouseleave: a[3] || (a[3] = () => c(ve)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (s(), T(gt, {
        key: 0,
        parent: j.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: B.value,
        onClose: Q
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
      m(t.$slots, "userConfig", {}, void 0, !0),
      Ve.value ? (s(), i("div", {
        key: 1,
        ref_key: "noTitle",
        ref: Ue,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : f("", !0),
      e.value.style.chart.title.text ? (s(), i("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: Ge,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (s(), T(bt, {
          key: `title_${ue.value}`,
          config: {
            title: {
              cy: "donut-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "donut-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : f("", !0),
      e.value.userOptions.show && U.value && (c(de) || c(q)) ? (s(), T(mt, {
        ref: "details",
        key: `user_option_${ce.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: c(fe),
        isImaging: c(ye),
        uid: I.value,
        hasTooltip: !1,
        hasLabel: !1,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: A.value,
        chartElement: j.value,
        position: e.value.userOptions.position,
        titles: { ...e.value.userOptions.buttonTitles },
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: B.value,
        onToggleFullscreen: Ze,
        onGeneratePdf: c(pe),
        onGenerateCsv: xe,
        onGenerateImage: c(me),
        onToggleTable: Ce,
        onToggleAnnotator: Q,
        style: W({
          visibility: c(de) ? c(q) ? "visible" : "hidden" : "visible"
        })
      }, lt({ _: 2 }, [
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: C(() => [
            m(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: C(() => [
            m(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: C(() => [
            m(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: C(() => [
            m(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: C(({ toggleFullscreen: l, isFullscreen: r }) => [
            m(t.$slots, "optionFullscreen", D(L({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: C(({ toggleAnnotator: l, isAnnotator: r }) => [
            m(t.$slots, "optionAnnotator", D(L({ toggleAnnotator: l, isAnnotator: r })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
      U.value ? (s(), i("svg", {
        key: 4,
        xmlns: c(dt),
        viewBox: `${p.value.x} ${p.value.y} ${p.value.width} ${p.value.height}`,
        width: "100%",
        class: Fe({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
        style: W(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};`)
      }, [
        at(wt),
        t.$slots["chart-background"] ? (s(), i("foreignObject", {
          key: 0,
          x: p.value.x,
          y: p.value.y,
          width: p.value.width,
          height: p.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          m(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, Ot)) : f("", !0),
        (s(!0), i(O, null, se(g.value, (l) => (s(), i(O, null, [
          k("defs", null, [
            k("radialGradient", {
              id: l.id,
              fy: "30%"
            }, [
              k("stop", {
                offset: "10%",
                "stop-color": c(ht)(l.color, e.value.style.chart.circles.gradient.intensity / 100)
              }, null, 8, Ft),
              k("stop", {
                offset: "90%",
                "stop-color": c(Me)(l.color, 0.1)
              }, null, 8, Nt),
              k("stop", {
                offset: "100%",
                "stop-color": l.color
              }, null, 8, St)
            ], 8, It)
          ]),
          t.$slots.pattern ? (s(), i("g", Mt, [
            k("defs", null, [
              m(t.$slots, "pattern", D(L({ ...l, patternId: `pattern_${I.value}_${l.id}` })), void 0, !0)
            ])
          ])) : f("", !0),
          k("rect", {
            x: l.x - l.radius,
            y: l.y - l.radius,
            width: l.radius * 2,
            height: l.radius * 2,
            stroke: e.value.style.chart.circles.stroke,
            "stroke-width": e.value.style.chart.circles.strokeWidth,
            fill: e.value.style.chart.circles.gradient.show ? `url(#${l.id})` : l.color,
            rx: l.radius,
            onMouseenter: () => Ye(l),
            onMouseout: a[0] || (a[0] = (r) => n.value = null)
          }, null, 40, _t),
          t.$slots.pattern ? (s(), i("rect", {
            key: 1,
            x: l.x - l.radius,
            y: l.y - l.radius,
            width: l.radius * 2,
            height: l.radius * 2,
            stroke: e.value.style.chart.circles.stroke,
            "stroke-width": e.value.style.chart.circles.strokeWidth,
            fill: `url(#pattern_${I.value}_${l.id})`,
            rx: l.radius,
            style: {
              pointerEvents: "none"
            }
          }, null, 8, At)) : f("", !0),
          e.value.style.chart.circles.labels.name.show && l.name ? (s(), i("text", {
            key: 2,
            style: {
              pointerEvents: "none",
              transition: "opacity 0.2s ease-in-out"
            },
            opacity: n.value ? 0.2 : 1,
            x: l.x,
            y: l.y - l.radius / 2.5 + e.value.style.chart.circles.labels.name.offsetY,
            "font-size": l.radius / l.name.length * 2,
            fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : c(Y)(l.color),
            "font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
            "text-anchor": "middle"
          }, G(l.name), 9, Et)) : f("", !0),
          e.value.style.chart.circles.labels.value.show ? (s(), i("text", {
            key: 3,
            style: {
              pointerEvents: "none",
              transition: "opacity 0.2s ease-in-out"
            },
            opacity: n.value ? 0.2 : 1,
            x: l.x,
            y: l.y + l.radius / _(l).length * (_(l).length === 1 ? 1 : 2) / 2 + e.value.style.chart.circles.labels.value.offsetY,
            "font-size": l.radius / _(l).length * (_(l).length === 1 ? 1 : 2),
            fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : c(Y)(l.color),
            "font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
            "text-anchor": "middle"
          }, G(_(l)), 9, Dt)) : f("", !0),
          (s(!0), i(O, null, se(We.value, (r) => (s(), i(O, null, [
            (s(!0), i(O, null, se(r, (v) => (s(), i("path", {
              d: v.arcSlice,
              fill: v.color,
              stroke: "black"
            }, null, 8, Lt))), 256))
          ], 64))), 256))
        ], 64))), 256)),
        n.value && e.value.style.chart.circles.zoom.show ? (s(), i(O, { key: 1 }, [
          k("circle", {
            style: W(je.value),
            cx: n.value.x,
            cy: n.value.y,
            r: S.value,
            opacity: z.value,
            stroke: e.value.style.chart.circles.stroke,
            fill: e.value.style.chart.circles.gradient.show ? `url(#${n.value.id})` : n.value.color
          }, null, 12, Gt),
          t.$slots["zoom-label"] ? (s(), i("g", Ut, [
            m(t.$slots, "zoom-label", D(L({ ...n.value, zoomOpacity: z.value, currentRadius: S.value, fontSize: M.value })), void 0, !0)
          ])) : (s(), i("g", Bt, [
            k("text", {
              style: {
                pointerEvents: "none"
              },
              opacity: z.value,
              x: n.value.x,
              y: n.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - M.value.name / 4,
              "text-anchor": "middle",
              "font-size": M.value.name,
              fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : c(Y)(n.value.color),
              "font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
            }, G(n.value.name), 9, Vt),
            k("text", {
              style: {
                pointerEvents: "none"
              },
              opacity: z.value,
              x: n.value.x,
              y: n.value.y + M.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
              "text-anchor": "middle",
              "font-size": M.value.value,
              fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : c(Y)(n.value.color),
              "font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
            }, G(qe()), 9, Ht)
          ]))
        ], 64)) : f("", !0),
        m(t.$slots, "svg", {
          svg: { ...p.value }
        }, void 0, !0)
      ], 14, Tt)) : f("", !0),
      U.value ? f("", !0) : (s(), T($t, {
        key: 5,
        config: {
          type: "circlePack",
          style: {
            color: "#CCCCCC"
          }
        }
      })),
      t.$slots.watermark ? (s(), i("div", Rt, [
        m(t.$slots, "watermark", D(L({ isPrinting: c(fe) || c(ye) })), void 0, !0)
      ])) : f("", !0),
      t.$slots.source ? (s(), i("div", {
        key: 7,
        ref_key: "source",
        ref: Be,
        dir: "auto"
      }, [
        m(t.$slots, "source", {}, void 0, !0)
      ], 512)) : f("", !0),
      U.value ? (s(), T(xt, {
        key: 8,
        hideDetails: "",
        config: {
          open: F.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: C(() => [
          (s(), T(Ct, {
            key: `table_${ie.value}`,
            colNames: H.value.colNames,
            head: H.value.head,
            body: H.value.body,
            config: H.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[1] || (a[1] = (l) => F.value.showTable = !1)
          }, {
            th: C(({ th: l }) => [
              k("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, Xt)
            ]),
            td: C(({ td: l }) => [
              ot(G(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : f("", !0)
    ], 46, Pt));
  }
}, sl = /* @__PURE__ */ zt(Wt, [["__scopeId", "data-v-0106231a"]]);
export {
  sl as default
};
