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