import { useCssVars as Me, computed as $, ref as z, onMounted as je, openBlock as a, createElementBlock as o, normalizeClass as m, normalizeStyle as h, createBlock as te, unref as n, createSlots as Xe, withCtx as U, renderSlot as j, normalizeProps as be, guardReactiveProps as pe, createCommentVNode as b, toDisplayString as c, createElementVNode as s, Fragment as p, renderList as g, createTextVNode as W, withKeys as Oe, createVNode as Ee, nextTick as ge } from "vue";
import { u as Ge, c as Ae, t as Ue, a as De, p as I, b as Ye, g as le, e as K, d as ae, o as qe, X as He, v as _e, w as S, i as E, f as T, E as xe, m as me, j as We, k as P, n as H, q as Ke, r as Je } from "./index-CguVaFlt.js";
import { u as Qe, U as Ze } from "./usePrinter-ClsMRVJG.js";
import et from "./vue-ui-skeleton-ChHLL5Hw.js";
import tt from "./BaseIcon-BNFf4B_v.js";
import lt from "./vue-ui-accordion-w15FGKRN.js";
import { u as ke } from "./useNestedProp-BbEbJmgv.js";
import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const ot = ["id"], st = ["xmlns", "viewBox"], ut = { key: 0 }, nt = ["fill", "font-weight", "font-size", "x", "y"], rt = ["fill", "font-weight", "font-size", "x", "y"], it = ["id"], ct = ["stop-color"], dt = ["stop-color"], vt = ["id"], yt = ["stop-color"], ht = ["stop-color"], ft = ["id"], bt = ["stop-color"], pt = ["stop-color"], gt = ["stop-color"], _t = ["id"], xt = ["stop-color"], mt = ["stop-color"], kt = ["stop-color"], wt = ["id"], $t = ["stop-color"], Ct = ["stop-color"], zt = ["stop-color"], Tt = { key: 1 }, Nt = ["x", "y", "font-size", "font-weight", "fill"], St = ["x", "y", "font-size", "font-weight", "fill"], Ft = ["d", "stroke"], Lt = ["cx", "cy", "r", "fill"], It = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick"], Pt = { key: 2 }, Vt = ["x", "y", "font-size", "fill", "onClick"], Rt = { key: 0 }, Bt = ["x", "y", "fill", "font-size", "font-weight"], Mt = ["x", "y", "height", "width", "fill", "rx", "onClick"], jt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick"], Xt = { key: 3 }, Ot = ["x", "y", "fill", "font-size", "onClick"], Et = ["d", "stroke"], Gt = ["cx", "cy", "fill", "onClick"], At = ["fill", "cx", "cy", "r", "onClick"], Ut = { key: 4 }, Dt = ["x", "y", "font-size", "font-weight", "fill"], Yt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], qt = ["y", "height", "width"], Ht = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, Wt = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, Kt = {
  viewBox: "0 0 20 20",
  height: "16",
  width: "16"
}, Jt = ["fill"], Qt = { key: 6 }, Zt = ["y", "height", "width"], el = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, tl = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, ll = {
  viewBox: "0 0 20 20",
  height: "16",
  width: "16"
}, al = ["fill"], ol = ["d", "stroke"], sl = ["cx", "cy", "fill"], ul = ["cx", "cy", "fill"], nl = ["d", "stroke"], rl = ["cx", "cy", "fill"], il = ["cx", "cy", "fill"], cl = ["x", "y", "fill", "font-size", "font-weight"], dl = ["x", "y", "fill", "font-size", "font-weight"], vl = ["x", "text-anchor", "y", "fill", "font-size"], yl = ["x", "text-anchor", "y", "fill", "font-size"], hl = ["x", "text-anchor", "y", "fill", "font-size"], fl = ["x", "text-anchor", "y", "fill", "font-size"], bl = ["x", "text-anchor", "y", "fill", "font-size"], pl = ["x", "y", "font-size", "fill"], gl = ["x", "y", "font-size", "fill"], _l = ["x", "y", "font-size", "fill"], xl = {
  key: 2,
  class: "vue-data-ui-watermark"
}, ml = { style: { "padding-top": "36px", position: "relative" } }, kl = { class: "vue-ui-data-table" }, wl = { key: 0 }, $l = ["data-cell"], Cl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, zl = { key: 0 }, Tl = { key: 1 }, Nl = ["data-cell"], Sl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Fl = { key: 0 }, Ll = { key: 1 }, Il = ["data-cell"], Pl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Vl = { key: 0 }, Rl = { key: 1 }, Bl = ["data-cell"], Ml = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, jl = { key: 0 }, Xl = { key: 1 }, Ol = ["data-cell"], El = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gl = { key: 0 }, Al = { key: 1 }, Ul = ["data-cell"], Dl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Yl = { key: 0 }, ql = { key: 1 }, Hl = ["data-cell"], Wl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Kl = { key: 0 }, Jl = { key: 1 }, Ql = ["data-cell"], Zl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ea = ["data-cell"], ta = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, la = ["data-cell"], aa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, oa = ["data-cell"], sa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ua = ["data-cell"], na = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ra = {
  __name: "vue-ui-chestnut",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectRoot", "selectBranch", "selectNut"],
  setup(we, { expose: $e, emit: G }) {
    const R = we;
    Me((l) => ({
      "5c2f10c9": l.tdo
    }));
    const { vue_ui_chestnut: Ce } = Ge(), D = $(() => !!R.dataset && R.dataset.length), k = z(Ae()), oe = z(null), ze = z(null), se = z(0), e = $(() => {
      const l = ke({
        userConfig: R.config,
        defaultConfig: Ce
      });
      return l.theme ? {
        ...ke({
          userConfig: Ue.vue_ui_chestnut[l.theme] || R.config,
          defaultConfig: l
        }),
        customPalette: De[l.theme] || I
      } : l;
    }), { isPrinting: ue, isImaging: ne, generatePdf: re, generateImage: ie } = Qe({
      elementId: `vue-ui-chestnut_${k.value}`,
      fileName: e.value.style.chart.layout.title.text || "vue-ui-chestnut"
    }), J = $(() => Ye(e.value.customPalette)), Y = z({
      showTable: e.value.table.show
    }), Q = z(null), ce = z(!1), Te = $(() => e.value.table.responsiveBreakpoint), r = z({
      gap: 6,
      padding: {
        top: 102,
        left: 12,
        right: 12,
        bottom: 96
      },
      width: 1024,
      height: 0,
      branchSize: 32,
      branchStart: 128
    }), C = $(() => ({
      left: r.value.padding.left,
      top: r.value.padding.top,
      right: r.value.width - r.value.padding.right,
      bottom: r.value.height - r.value.padding.bottom,
      width: r.value.width - (r.value.padding.left + r.value.padding.right),
      height: r.value.height - (r.value.padding.top + r.value.padding.bottom),
      seedX: r.value.padding.left + 64
    })), V = $(() => D.value ? R.dataset.flatMap((l) => (l.branches || []).map((i) => i.value || 0)).reduce((l, i) => l + i, 0) : 0), N = $(() => (R.dataset.forEach((l, i) => {
      le({
        datasetObject: l,
        requiredAttributes: ["name", "branches"]
      }).forEach((t) => {
        K({
          componentName: "VueUiChestnut",
          type: "datasetSerieAttribute",
          property: t,
          index: i
        });
      }), l.branches && l.branches.forEach((t, u) => {
        le({
          datasetObject: t,
          requiredAttributes: ["name", "value"]
        }).forEach((f) => {
          K({
            componentName: "VueUiChestnut",
            type: "datasetSerieAttribute",
            property: f,
            index: `${i} - ${u}`
          });
        }), t.breakdown && t.breakdown.forEach((f, y) => {
          le({
            datasetObject: f,
            requiredAttributes: ["name", "value"]
          }).forEach((_) => {
            K({
              componentName: "VueUiChestnut",
              type: "datasetSerieAttribute",
              property: _,
              index: `${i} - ${u} - ${y}`
            });
          });
        });
      });
    }), R.dataset.map((l, i) => {
      const t = (l.branches || []).map((u) => u.value || 0).reduce((u, f) => u + f, 0);
      return {
        ...l,
        color: ae(l.color) || J.value[i] || I[i] || I[i % I.length],
        id: l.id || `root_${i}_${k.value}`,
        type: "root",
        total: t,
        rootIndex: i,
        branches: (l.branches || []).map((u, f) => ({
          ...u,
          rootName: l.name,
          rootIndex: i,
          color: ae(l.color) || J.value[i] || I[i] || I[i % I.length],
          value: u.value >= 0 ? u.value : 0,
          id: u.id || `branch_${i}_${f}_${k.value}`,
          proportionToRoot: u.value / t,
          type: "branch",
          breakdown: (u.breakdown || []).map((y, _) => ({
            table: {
              rootName: l.name,
              rootValue: t,
              rootToTotal: t / V.value,
              branchName: u.name,
              branchValue: u.value,
              branchToTotal: u.value / V.value,
              branchToRoot: u.value / t,
              nutName: y.name,
              nutValue: y.value,
              nutToTotal: y.value / V.value,
              nutToRoot: y.value / t,
              nutToBranch: y.value / u.value
            },
            ...y,
            type: "nut",
            branchName: u.name,
            rootName: l.name,
            branchTotal: u.value >= 0 ? u.value : 0,
            proportionToBranch: y.value / u.value,
            proportionToRoot: y.value / t,
            proportionToTree: y.value / V.value,
            rootIndex: i,
            id: y.id || `nut_${i}_${f}_${_}_${k.value}`,
            color: ae(y.color) || J.value[_] || I[_] || I[_ % I.length],
            value: y.value >= 0 ? y.value : 0
          }))
        }))
      };
    })));
    function Ne() {
      return N.value;
    }
    const Se = $(() => N.value.flatMap((l) => l.branches).length), Fe = $(() => Math.max(...N.value.map((l) => l.branches.map((i) => i.value).reduce((i, t) => i + t, 0)))), Le = $(() => Math.max(...N.value.flatMap((l) => l.branches.map((i) => i.value)))), de = $(() => 256 + r.value.padding.left), X = $(() => N.value.sort((l, i) => i.total - l.total).map((l, i) => {
      const t = C.value.height / N.value.length / 2, u = l.total / Fe.value * (t > 64 ? 64 : t);
      return {
        ...l,
        x: C.value.seedX,
        y: C.value.top + C.value.height / N.value.length * (i + 1) - (C.value.height / N.value.length / 2 + r.value.gap / 2),
        r: u < r.value.branchSize / 2 ? r.value.branchSize / 2 : u
      };
    })), Ie = $(() => e.value.style.chart.layout.branches.widthRatio <= 0 ? 0.1 : e.value.style.chart.layout.branches.widthRatio > 1.8 ? 1.8 : e.value.style.chart.layout.branches.widthRatio), Pe = $(() => X.value.flatMap((l) => l.branches)), B = $(() => Pe.value.sort((l, i) => i.value - l.value).map((l, i) => ({
      ...l,
      y1: i * r.value.branchSize + C.value.top + i * r.value.gap,
      y2: i * r.value.branchSize + r.value.branchSize,
      x1: de.value,
      x2: 384 * l.value / Le.value * Ie.value + de.value
    })));
    function Z(l) {
      const i = X.value.find((t) => t.rootIndex === l.rootIndex);
      return { x: i.x, y: i.y, r: i.r };
    }
    const v = z(null), M = z(null), x = z(null), F = z(null);
    function w() {
      v.value = null, x.value = null, F.value = null;
    }
    function L(l) {
      return F.value ? F.value === null ? !0 : l.type === "root" ? l.id === F.value.id : l.rootIndex === F.value.rootIndex : v.value === null && x.value === null ? !0 : l.type === "nut" ? v.value.id === l.id : l.type === "branch" ? x.value.id === l.id : l.type === "root" ? x.value && x.value.rootIndex === l.rootIndex || v.value && v.value.rootIndex === l.rootIndex : !1;
    }
    function ve(l) {
      w(), ge(() => {
        v.value = l, x.value = l, M.value = me(
          { series: l.breakdown, base: 1 },
          l.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
          l.y1 + r.value.branchSize / 2,
          80,
          80
        ), G("selectNut", l.breakdown);
      });
    }
    function O() {
      v.value = null, M.value = null, G("selectNut", null);
    }
    function ee(l) {
      x.value && x.value.id === l.id ? (x.value = null, w(), G("selectBranch", null)) : (w(), x.value = l, G("selectBranch", l));
    }
    function ye(l) {
      F.value && F.value.id === l.id ? (w(), G("selectRoot", null)) : (w(), F.value = l, G("selectRoot", l));
    }
    function Ve() {
      return C.value.bottom - (v.value.y1 + 180) < 0 ? 0 : C.value.bottom;
    }
    function A(l) {
      return l.proportion * 100 > e.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue;
    }
    function Re() {
      const l = new ResizeObserver((i) => {
        i.forEach((t) => {
          ce.value = t.contentRect.width < Te.value;
        });
      });
      Q.value && l.observe(Q.value);
    }
    je(() => {
      qe(R.dataset) && K({
        componentName: "VueUiChestnut",
        type: "dataset"
      });
      const l = Se.value * (r.value.branchSize + r.value.gap) + r.value.padding.top + r.value.padding.bottom;
      r.value.height = l, Re();
    });
    const d = $(() => {
      const l = [
        e.value.table.th.translations.rootName,
        e.value.table.th.translations.rootValue,
        e.value.table.th.translations.rootToTotal,
        e.value.table.th.translations.branchName,
        e.value.table.th.translations.branchValue,
        e.value.table.th.translations.branchToRoot,
        e.value.table.th.translations.branchToTotal,
        e.value.table.th.translations.nutName,
        e.value.table.th.translations.nutValue,
        e.value.table.th.translations.nutToBranch,
        e.value.table.th.translations.nutToRoot,
        e.value.table.th.translations.nutToTotal
      ], i = N.value.flatMap((t, u) => t.branches.flatMap((f, y) => f.breakdown.flatMap((_, ia) => _.table)));
      return { head: l, body: i };
    });
    function he() {
      ge(() => {
        const l = [[e.value.style.chart.layout.title.text], [e.value.style.chart.layout.title.subtitle.text], [""], ["Grand total", V.value], [""]], i = d.value.head, t = d.value.body.map((y, _) => [
          d.value.body[_ - 1] && d.value.body[_ - 1].rootName === y.rootName ? "" : y.rootName,
          d.value.body[_ - 1] && d.value.body[_ - 1].rootName === y.rootName ? "" : y.rootValue,
          d.value.body[_ - 1] && d.value.body[_ - 1].rootName === y.rootName ? "" : y.rootToTotal,
          d.value.body[_ - 1] && d.value.body[_ - 1].branchName === y.branchName ? "" : y.branchName,
          d.value.body[_ - 1] && d.value.body[_ - 1].branchName === y.branchName ? "" : y.branchValue,
          d.value.body[_ - 1] && d.value.body[_ - 1].branchName === y.branchName ? "" : y.branchToRoot,
          d.value.body[_ - 1] && d.value.body[_ - 1].branchName === y.branchName ? "" : y.branchToTotal,
          y.nutName,
          y.nutValue,
          y.nutToBranch,
          y.nutToRoot,
          y.nutToTotal
        ]), u = l.concat([i]).concat(t), f = Ke(u);
        Je({ csvContent: f, title: e.value.style.chart.layout.title.text || "vue-ui-chestnut" });
      });
    }
    const q = z(!1);
    function Be(l) {
      q.value = l, se.value += 1;
    }
    function fe() {
      Y.value.showTable = !Y.value.showTable;
    }
    return $e({
      getData: Ne,
      generatePdf: re,
      generateCsv: he,
      generateImage: ie,
      toggleTable: fe
    }), (l, i) => (a(), o("div", {
      class: m(`vue-ui-chestnut ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "chestnutChart",
      ref: oe,
      id: `vue-ui-chestnut_${k.value}`,
      style: h(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${e.value.style.chart.backgroundColor}`)
    }, [
      e.value.userOptions.show && D.value ? (a(), te(Ze, {
        ref_key: "details",
        ref: ze,
        key: `user_options_${se.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isImaging: n(ne),
        isPrinting: n(ue),
        uid: k.value,
        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: q.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: oe.value,
        onToggleFullscreen: Be,
        onGeneratePdf: n(re),
        onGenerateCsv: he,
        onGenerateImage: n(ie),
        onToggleTable: fe
      }, Xe({ _: 2 }, [
        l.$slots.optionPdf ? {
          name: "optionPdf",
          fn: U(() => [
            j(l.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        l.$slots.optionCsv ? {
          name: "optionCsv",
          fn: U(() => [
            j(l.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        l.$slots.optionImg ? {
          name: "optionImg",
          fn: U(() => [
            j(l.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        l.$slots.optionTable ? {
          name: "optionTable",
          fn: U(() => [
            j(l.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        l.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: U(({ toggleFullscreen: t, isFullscreen: u }) => [
            j(l.$slots, "optionFullscreen", be(pe({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
          ]),
          key: "4"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : b("", !0),
      r.value.height > 0 && D.value ? (a(), o("svg", {
        key: 1,
        xmlns: n(He),
        class: m({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
        viewBox: `0 0 ${r.value.width} ${r.value.height}`,
        style: h(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
      }, [
        v.value ? b("", !0) : (a(), o("g", ut, [
          e.value.style.chart.layout.title.text ? (a(), o("text", {
            key: 0,
            "text-anchor": "middle",
            fill: e.value.style.chart.layout.title.color,
            "font-weight": e.value.style.chart.layout.title.bold ? "bold" : "normal",
            "font-size": e.value.style.chart.layout.title.fontSize,
            x: r.value.width / 2,
            y: 12 + e.value.style.chart.layout.title.fontSize + e.value.style.chart.layout.title.offsetY,
            onClick: w
          }, c(e.value.style.chart.layout.title.text), 9, nt)) : b("", !0),
          e.value.style.chart.layout.title.subtitle.text ? (a(), o("text", {
            key: 1,
            "text-anchor": "middle",
            fill: e.value.style.chart.layout.title.subtitle.color,
            "font-weight": e.value.style.chart.layout.title.subtitle.bold ? "bold" : "normal",
            "font-size": e.value.style.chart.layout.title.subtitle.fontSize,
            x: r.value.width / 2,
            y: 48 + e.value.style.chart.layout.title.subtitle.fontSize + e.value.style.chart.layout.title.subtitle.offsetY,
            onClick: w
          }, c(e.value.style.chart.layout.title.subtitle.text), 9, rt)) : b("", !0)
        ])),
        s("defs", null, [
          (a(!0), o(p, null, g(N.value, (t, u) => (a(), o("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `root_gradient_${k.value}_${t.rootIndex}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": `${n(_e)(t.color, 0.05)}${n(S)[100 - e.value.style.chart.layout.roots.gradientIntensity]}`
            }, null, 8, ct),
            s("stop", {
              offset: "100%",
              "stop-color": t.color
            }, null, 8, dt)
          ], 8, it))), 256)),
          (a(!0), o(p, null, g(N.value, (t) => (a(), o("linearGradient", {
            x1: "0%",
            y1: "0%",
            x2: "100%",
            y2: "0%",
            id: `branch_gradient_${k.value}_${t.rootIndex}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": t.color
            }, null, 8, yt),
            s("stop", {
              offset: "100%",
              "stop-color": `${n(_e)(t.color, 0.02)}${n(S)[100 - e.value.style.chart.layout.branches.gradientIntensity]}`
            }, null, 8, ht)
          ], 8, vt))), 256)),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nutpick_${k.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": `#FFFFFF${n(S)[0]}`
            }, null, 8, bt),
            s("stop", {
              offset: "80%",
              "stop-color": `#FFFFFF${n(S)[e.value.style.chart.layout.nuts.selected.gradientIntensity]}`
            }, null, 8, pt),
            s("stop", {
              offset: "100%",
              "stop-color": `#FFFFFF${n(S)[0]}`
            }, null, 8, gt)
          ], 8, ft),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nut_${k.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": `#FFFFFF${n(S)[0]}`
            }, null, 8, xt),
            s("stop", {
              offset: "80%",
              "stop-color": `#FFFFFF${n(S)[e.value.style.chart.layout.nuts.gradientIntensity]}`
            }, null, 8, mt),
            s("stop", {
              offset: "100%",
              "stop-color": `#FFFFFF${n(S)[0]}`
            }, null, 8, kt)
          ], 8, _t),
          s("radialGradient", {
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%",
            id: `nut_underlayer_${k.value}`
          }, [
            s("stop", {
              offset: "0%",
              "stop-color": `${e.value.style.chart.backgroundColor}${n(S)[100]}`
            }, null, 8, $t),
            s("stop", {
              offset: "80%",
              "stop-color": `${e.value.style.chart.backgroundColor}${n(S)[60]}`
            }, null, 8, Ct),
            s("stop", {
              offset: "100%",
              "stop-color": `${e.value.style.chart.backgroundColor}${n(S)[0]}`
            }, null, 8, zt)
          ], 8, wt)
        ]),
        e.value.style.chart.layout.grandTotal.show ? (a(), o("g", Tt, [
          s("text", {
            x: C.value.seedX,
            y: 32 + e.value.style.chart.layout.grandTotal.offsetY,
            "font-size": e.value.style.chart.layout.grandTotal.fontSize,
            "font-weight": e.value.style.chart.layout.grandTotal.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.grandTotal.color,
            "text-anchor": "middle",
            onClick: w
          }, c(e.value.style.chart.layout.grandTotal.text), 9, Nt),
          s("text", {
            x: C.value.seedX,
            y: 38 + e.value.style.chart.layout.grandTotal.fontSize + e.value.style.chart.layout.grandTotal.offsetY,
            "font-size": e.value.style.chart.layout.grandTotal.fontSize,
            "font-weight": e.value.style.chart.layout.grandTotal.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.grandTotal.color,
            "text-anchor": "middle",
            onClick: w
          }, c(n(E)(
            e.value.style.chart.layout.grandTotal.formatter,
            V.value,
            n(T)({
              p: e.value.style.chart.layout.grandTotal.prefix,
              v: V.value,
              s: e.value.style.chart.layout.grandTotal.suffix,
              r: e.value.style.chart.layout.grandTotal.roundingValue
            })
          )), 9, St)
        ])) : b("", !0),
        (a(!0), o(p, null, g(B.value, (t) => (a(), o("g", null, [
          (a(!0), o(p, null, g(r.value.branchSize, (u, f) => (a(), o("path", {
            d: `M
                    ${t.x1},${t.y1 + f}
                    C${t.x1 - 20},${t.y1 + f} 
                    ${t.x1 - 80},${t.y1 + f} 
                    ${Z(t).x + Z(t).r / 2}, ${Z(t).y}
                `,
            stroke: `${t.color}${n(S)[e.value.style.chart.layout.links.opacity]}`,
            fill: "none",
            "stroke-width": "2",
            "shape-rendering": "cirspEdges",
            style: h(`opacity:${L(t) ? 1 : 0}`),
            onClick: w
          }, null, 12, Ft))), 256))
        ]))), 256)),
        (a(!0), o(p, null, g(X.value, (t) => (a(), o("circle", {
          cx: t.x,
          cy: t.y,
          r: t.r,
          fill: e.value.style.chart.layout.roots.underlayerColor,
          stroke: "none",
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`)
        }, null, 12, Lt))), 256)),
        (a(!0), o(p, null, g(X.value, (t, u) => (a(), o("circle", {
          cx: t.x,
          cy: t.y,
          r: t.r,
          fill: e.value.style.chart.layout.roots.useGradient ? `url(#root_gradient_${k.value}_${t.rootIndex})` : t.color,
          stroke: e.value.style.chart.layout.roots.stroke,
          "stroke-width": e.value.style.chart.layout.roots.strokeWidth,
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
          onClick: (f) => ye(t)
        }, null, 12, It))), 256)),
        e.value.style.chart.layout.roots.labels.show ? (a(), o("g", Pt, [
          (a(!0), o(p, null, g(X.value, (t, u) => (a(), o("text", {
            x: t.x,
            y: t.y + e.value.style.chart.layout.roots.labels.fontSize / 2.6,
            "text-anchor": "middle",
            "font-size": e.value.style.chart.layout.roots.labels.fontSize,
            fill: e.value.style.chart.layout.roots.labels.adaptColorToBackground ? n(xe)(t.color) : e.value.style.chart.layout.roots.labels.color,
            "font-weight": "bold",
            style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
            onClick: (f) => ye(t)
          }, c(n(E)(
            e.value.style.chart.layout.roots.labels.formatter,
            t.total,
            n(T)({
              p: e.value.style.chart.layout.roots.labels.prefix,
              v: t.total,
              s: e.value.style.chart.layout.roots.labels.suffix,
              r: e.value.style.chart.layout.roots.labels.roundingValue
            }),
            { datapoint: t }
          )), 13, Vt))), 256)),
          (a(!0), o(p, null, g(X.value, (t) => (a(), o("g", null, [
            v.value && t.rootIndex === v.value.rootIndex || x.value && t.rootIndex === x.value.rootIndex || F.value && t.rootIndex === F.value.rootIndex ? (a(), o("g", Rt, [
              s("text", {
                x: t.x,
                y: t.y + t.r + 24,
                "text-anchor": "middle",
                fill: e.value.style.chart.layout.roots.labels.name.color,
                "font-size": e.value.style.chart.layout.roots.labels.name.fontSize,
                "font-weight": e.value.style.chart.layout.roots.labels.name.bold ? "bold" : "normal",
                onClick: w
              }, c(t.name), 9, Bt)
            ])) : b("", !0)
          ]))), 256))
        ])) : b("", !0),
        (a(!0), o(p, null, g(B.value, (t) => (a(), o("rect", {
          x: t.x1,
          y: t.y1,
          height: r.value.branchSize,
          width: t.x2 - t.x1,
          fill: e.value.style.chart.layout.branches.underlayerColor,
          rx: e.value.style.chart.layout.branches.borderRadius,
          stroke: "none",
          style: h(`opacity:${L(t) ? 1 : 0.05}`),
          onClick: (u) => ee(t)
        }, null, 12, Mt))), 256)),
        (a(!0), o(p, null, g(B.value, (t, u) => (a(), o("rect", {
          x: t.x1,
          y: t.y1,
          height: r.value.branchSize,
          width: t.x2 - t.x1,
          fill: e.value.style.chart.layout.branches.useGradient ? `url(#branch_gradient_${k.value}_${t.rootIndex})` : t.color,
          rx: e.value.style.chart.layout.branches.borderRadius,
          stroke: e.value.style.chart.layout.branches.stroke,
          "stroke-width": e.value.style.chart.layout.branches.strokeWidth,
          style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
          onClick: (f) => ee(t)
        }, null, 12, jt))), 256)),
        e.value.style.chart.layout.branches.labels.dataLabels.show ? (a(), o("g", Xt, [
          (a(!0), o(p, null, g(B.value, (t) => (a(), o("g", null, [
            t.proportionToRoot * 100 > e.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue ? (a(), o("text", {
              key: 0,
              x: t.x1 + 6,
              y: t.y1 + r.value.branchSize / 1.5,
              "text-anchor": "start",
              fill: n(xe)(t.color),
              "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
              "font-weight": "bold",
              style: h(`cursor:pointer; opacity:${L(t) ? 1 : 0.05}`),
              onClick: (u) => ee(t)
            }, c(n(E)(
              e.value.style.chart.layout.branches.labels.dataLabels.formatter,
              t.value,
              n(T)({
                p: e.value.style.chart.layout.branches.labels.dataLabels.prefix,
                v: t.value,
                s: e.value.style.chart.layout.branches.labels.dataLabels.suffix,
                r: e.value.style.chart.layout.branches.labels.dataLabels.roundingValue
              }),
              { datapoint: t }
            )), 13, Ot)) : b("", !0)
          ]))), 256))
        ])) : b("", !0),
        (a(!0), o(p, null, g(B.value, (t, u) => (a(), o("g", null, [
          (a(!0), o(p, null, g(n(me)(
            { series: t.breakdown, base: 1 },
            t.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            t.y1 + r.value.branchSize / 2,
            r.value.branchSize / 3,
            r.value.branchSize / 3
          ), (f, y) => (a(), o("path", {
            d: f.path,
            stroke: f.color,
            "stroke-width": 10,
            fill: "none",
            style: h(`opacity:${L(t) ? 1 : 0.1}`)
          }, null, 12, Et))), 256)),
          (a(!0), o(p, null, g(B.value, (f) => (a(), o("circle", {
            cx: f.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: f.y1 + r.value.branchSize / 2,
            r: 6,
            fill: e.value.style.chart.backgroundColor,
            onClick: (y) => ve(f),
            style: { cursor: "pointer" }
          }, null, 8, Gt))), 256)),
          s("circle", {
            fill: e.value.style.chart.layout.nuts.useGradient ? `url(#nut_${k.value})` : "transparent",
            cx: t.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: t.y1 + r.value.branchSize / 2,
            r: r.value.branchSize / 2 + 2,
            onClick: (f) => ve(t),
            style: h(`cursor:pointer;opacity:${L(t) ? 1 : 0.1}`)
          }, null, 12, At)
        ]))), 256)),
        e.value.style.chart.layout.branches.labels.show && !x.value ? (a(), o("g", Ut, [
          (a(!0), o(p, null, g(B.value, (t) => (a(), o("text", {
            x: t.x2 + r.value.branchSize + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: t.y1 + r.value.branchSize / 2 + 5,
            "font-size": e.value.style.chart.layout.branches.labels.fontSize,
            "font-weight": e.value.style.chart.layout.branches.labels.bold ? "bold" : "normal",
            fill: e.value.style.chart.layout.branches.labels.color,
            "text-anchor": "start",
            style: h(`opacity:${L(t) ? 1 : 0.1}`)
          }, c(t.name), 13, Dt))), 256))
        ])) : b("", !0),
        s("line", {
          x1: 256 + r.value.padding.left,
          x2: 256 + r.value.padding.left,
          y1: C.value.top,
          y2: C.value.bottom,
          stroke: e.value.style.chart.layout.verticalSeparator.stroke,
          "stroke-width": e.value.style.chart.layout.verticalSeparator.strokeWidth
        }, null, 8, Yt),
        !v.value && !x.value ? (a(), o("foreignObject", {
          key: 5,
          x: 0,
          y: C.value.bottom,
          height: r.value.height - C.value.bottom,
          width: r.value.width,
          style: { overflow: "visible" },
          onClick: w
        }, [
          s("div", Ht, [
            s("div", Wt, [
              (a(!0), o(p, null, g(X.value, (t) => (a(), o("div", {
                style: h(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${e.value.style.chart.layout.legend.fontSize}px;`)
              }, [
                (a(), o("svg", Kt, [
                  s("circle", {
                    cx: "10",
                    cy: "10",
                    r: "10",
                    fill: t.color,
                    stroke: "none"
                  }, null, 8, Jt)
                ])),
                s("span", null, c(t.name) + ":", 1),
                s("b", null, c(n(E)(
                  e.value.style.chart.layout.roots.labels.formatter,
                  t.total,
                  n(T)({
                    p: e.value.style.chart.layout.legend.prefix,
                    v: t.total,
                    s: e.value.style.chart.layout.legend.suffix,
                    r: e.value.style.chart.layout.legend.roundingValue
                  }),
                  { datapoint: t }
                )), 1),
                W(" (" + c(n(T)({
                  v: t.total / V.value * 100,
                  s: "%",
                  r: e.value.style.chart.layout.legend.roundingPercentage
                })) + ") ", 1)
              ], 4))), 256))
            ])
          ])
        ], 8, qt)) : b("", !0),
        v.value && M.value ? (a(), o("g", Qt, [
          (a(), o("foreignObject", {
            x: 0,
            y: Ve(),
            height: r.value.height - C.value.bottom,
            width: r.value.width,
            style: { overflow: "visible" },
            onClick: w
          }, [
            s("div", el, [
              s("b", null, c(v.value.name), 1),
              s("div", tl, [
                (a(!0), o(p, null, g(v.value.breakdown, (t, u) => (a(), o("div", {
                  style: h(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${e.value.style.chart.layout.legend.fontSize}px;`)
                }, [
                  (a(), o("svg", ll, [
                    s("circle", {
                      cx: "10",
                      cy: "10",
                      r: "10",
                      fill: t.color,
                      stroke: "none"
                    }, null, 8, al)
                  ])),
                  s("span", null, [
                    W(c(t.name) + ": ", 1),
                    s("b", null, c(e.value.style.chart.layout.legend.prefix) + " " + c(t.value.toFixed(e.value.style.chart.layout.nuts.selected.labels.roundingValue)) + " " + c(e.value.style.chart.layout.legend.suffix), 1),
                    W(" (" + c((t.proportionToBranch * 100).toFixed(e.value.style.chart.layout.nuts.selected.labels.roundingPercentage)) + "%)", 1)
                  ])
                ], 4))), 256))
              ])
            ])
          ], 8, Zt)),
          (a(!0), o(p, null, g(M.value, (t) => (a(), o("g", null, [
            A(t) ? (a(), o("path", {
              key: 0,
              d: n(We)(t),
              stroke: t.color,
              "stroke-width": "1",
              "stroke-linecap": "round",
              "stroke-linejoin": "round",
              fill: "none",
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, null, 10, ol)) : b("", !0)
          ]))), 256)),
          s("circle", {
            cx: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: v.value.y1 + r.value.branchSize / 2,
            r: 256,
            fill: `url(#nut_underlayer_${k.value})`,
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, sl),
          s("circle", {
            cx: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: v.value.y1 + r.value.branchSize / 2,
            r: 118,
            fill: e.value.style.chart.backgroundColor,
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, ul),
          (a(!0), o(p, null, g(M.value, (t) => (a(), o("path", {
            d: t.path,
            stroke: t.color,
            "stroke-width": 64,
            fill: "none",
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, nl))), 256)),
          s("circle", {
            cx: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: v.value.y1 + r.value.branchSize / 2,
            r: 100,
            fill: `url(#nutpick_${k.value})`,
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, rl),
          s("circle", {
            cx: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            cy: v.value.y1 + r.value.branchSize / 2,
            r: 48,
            fill: e.value.style.chart.backgroundColor,
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, null, 10, il),
          s("text", {
            x: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: v.value.y1 + 8,
            fill: e.value.style.chart.layout.nuts.selected.labels.core.total.color,
            "font-size": e.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,
            "font-weight": e.value.style.chart.layout.nuts.selected.labels.core.total.bold ? "bold" : "normal",
            "text-anchor": "middle",
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, c(e.value.translations.total), 11, cl),
          s("text", {
            x: v.value.x2 + 24 + e.value.style.chart.layout.nuts.offsetX,
            y: v.value.y1 + 36,
            fill: e.value.style.chart.layout.nuts.selected.labels.core.value.color,
            "font-size": e.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,
            "font-weight": e.value.style.chart.layout.nuts.selected.labels.core.value.bold ? "bold" : "normal",
            "text-anchor": "middle",
            onClick: O,
            class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
          }, c(n(E)(
            e.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,
            v.value.value,
            n(T)({
              p: e.value.style.chart.layout.nuts.selected.labels.core.value.prefix,
              v: v.value.value,
              s: e.value.style.chart.layout.nuts.selected.labels.core.value.suffix,
              r: e.value.style.chart.layout.nuts.selected.roundingValue
            }),
            { datapoint: v.value }
          )), 11, dl),
          (a(!0), o(p, null, g(M.value, (t, u) => (a(), o("g", null, [
            A(t) ? (a(), o("text", {
              key: 0,
              x: n(P)(t).x,
              "text-anchor": n(P)(t).anchor,
              y: n(H)(t),
              fill: t.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, " ⬤ ", 14, vl)) : b("", !0),
            A(t) ? (a(), o("text", {
              key: 1,
              x: n(P)(t, !0).x,
              "text-anchor": n(P)(t, !0).anchor,
              y: n(H)(t),
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(v.value.breakdown[u].name), 15, yl)) : b("", !0)
          ]))), 256)),
          (a(!0), o(p, null, g(M.value, (t, u) => (a(), o("g", null, [
            A(t) ? (a(), o("text", {
              key: 0,
              x: n(P)(t, !0).x,
              "text-anchor": n(P)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(T)({
              v: v.value.breakdown[u].value / v.value.value * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.of) + " " + c(v.value.breakdown[u].branchName) + " " + c(n(E)(
              e.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,
              v.value.breakdown[u].value,
              n(T)({
                p: e.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix,
                v: v.value.breakdown[u].value,
                s: e.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix,
                r: e.value.style.chart.layout.nuts.selected.roundingValue
              }),
              { datapoint: M.value, seriesIndex: u }
            )), 15, hl)) : b("", !0),
            A(t) ? (a(), o("text", {
              key: 1,
              x: n(P)(t, !0).x,
              "text-anchor": n(P)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize * 2,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(T)({
              v: v.value.breakdown[u].proportionToRoot * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.of) + " " + c(v.value.breakdown[u].rootName), 15, fl)) : b("", !0),
            A(t) ? (a(), o("text", {
              key: 2,
              x: n(P)(t, !0).x,
              "text-anchor": n(P)(t).anchor,
              y: n(H)(t) + e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize * 3,
              fill: e.value.style.chart.layout.nuts.selected.labels.dataLabels.color,
              "font-size": e.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,
              style: h(`font-weight:${e.value.style.chart.layout.nuts.selected.labels.dataLabels.bold ? "bold" : ""}`),
              class: m(e.value.style.chart.layout.nuts.selected.useMotion ? "vue-ui-chestnut-animated" : "")
            }, c(n(T)({
              v: v.value.breakdown[u].proportionToTree * 100,
              s: "%",
              r: e.value.style.chart.layout.nuts.selected.labels.roundingPercentage
            })) + " " + c(e.value.translations.proportionToTree), 15, bl)) : b("", !0)
          ]))), 256))
        ])) : b("", !0),
        (a(!0), o(p, null, g(B.value, (t) => (a(), o("g", null, [
          x.value && x.value.id === t.id && !v.value ? (a(), o("text", {
            key: 0,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 24,
            "font-weight": "bold",
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: w
          }, c(t.name) + ": " + c(n(E)(
            e.value.style.chart.layout.branches.labels.dataLabels.formatter,
            t.value,
            n(T)({
              p: e.value.style.chart.layout.branches.labels.dataLabels.prefix,
              v: t.value,
              s: e.value.style.chart.layout.branches.labels.dataLabels.suffix,
              r: e.value.style.chart.layout.branches.labels.dataLabels.roundingValue
            }),
            { datapoint: t }
          )), 9, pl)) : b("", !0),
          x.value && x.value.id === t.id && !v.value ? (a(), o("text", {
            key: 1,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 48,
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: w
          }, c(n(T)({
            v: t.proportionToRoot * 100,
            s: "%",
            r: e.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage
          })) + " " + c(e.value.translations.of) + " " + c(t.rootName), 9, gl)) : b("", !0),
          x.value && x.value.id === t.id && !v.value ? (a(), o("text", {
            key: 2,
            x: t.x1 + 6,
            y: t.y1 + r.value.branchSize + 72,
            "text-anchor": "start",
            "font-size": e.value.style.chart.layout.branches.labels.dataLabels.fontSize,
            fill: e.value.style.chart.layout.branches.labels.color,
            onClick: w
          }, c(n(T)({
            v: t.value / V.value * 100,
            s: "%",
            r: e.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage
          })) + " " + c(e.value.translations.proportionToTree), 9, _l)) : b("", !0)
        ]))), 256)),
        j(l.$slots, "svg", { svg: r.value }, void 0, !0)
      ], 14, st)) : b("", !0),
      l.$slots.watermark ? (a(), o("div", xl, [
        j(l.$slots, "watermark", be(pe({ isPrinting: n(ue) || n(ne) })), void 0, !0)
      ])) : b("", !0),
      D.value ? b("", !0) : (a(), te(et, {
        key: 3,
        config: {
          type: "chestnut",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            chestnut: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      j(l.$slots, "legend", { legend: N.value }, void 0, !0),
      D.value ? (a(), te(lt, {
        key: 4,
        hideDetails: "",
        config: {
          open: Y.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: U(() => [
          s("div", {
            ref_key: "tableContainer",
            ref: Q,
            class: "vue-ui-chestnut-table"
          }, [
            s("div", ml, [
              s("div", {
                role: "button",
                tabindex: "0",
                style: h(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
                onClick: i[0] || (i[0] = (t) => Y.value.showTable = !1),
                onKeypress: i[1] || (i[1] = Oe((t) => Y.value.showTable = !1, ["enter"]))
              }, [
                Ee(tt, {
                  name: "close",
                  stroke: e.value.table.th.color,
                  "stroke-width": 2
                }, null, 8, ["stroke"])
              ], 36),
              s("div", {
                style: { width: "100%" },
                class: m({ "vue-ui-responsive": ce.value })
              }, [
                s("table", kl, [
                  s("caption", {
                    style: h({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
                    class: "vue-ui-data-table__caption"
                  }, [
                    W(c(e.value.style.chart.layout.title.text) + " ", 1),
                    e.value.style.chart.layout.title.subtitle.text ? (a(), o("span", wl, c(e.value.style.chart.layout.title.subtitle.text), 1)) : b("", !0)
                  ], 4),
                  s("thead", null, [
                    s("tr", {
                      role: "row",
                      style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
                    }, [
                      (a(!0), o(p, null, g(d.value.head, (t) => (a(), o("th", {
                        style: h(`outline:${e.value.table.th.outline}`)
                      }, c(t), 5))), 256))
                    ], 4)
                  ]),
                  s("tbody", null, [
                    (a(!0), o(p, null, g(d.value.body, (t, u) => (a(), o("tr", {
                      class: m({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": u % 2 === 0, "vue-ui-data-table__tbody__row-odd": u % 2 !== 0 }),
                      style: h(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
                    }, [
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[0]
                      }, [
                        s("div", Cl, [
                          d.value.body[u - 1] && d.value.body[u - 1].rootName === t.rootName ? (a(), o("span", zl)) : (a(), o("span", Tl, c(t.rootName), 1))
                        ])
                      ], 12, $l),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[1]
                      }, [
                        s("div", Sl, [
                          d.value.body[u - 1] && d.value.body[u - 1].rootName === t.rootName ? (a(), o("span", Fl)) : (a(), o("span", Ll, c(t.rootValue.toFixed(e.value.table.td.roundingValue)), 1))
                        ])
                      ], 12, Nl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[2]
                      }, [
                        s("div", Pl, [
                          d.value.body[u - 1] && d.value.body[u - 1].rootName === t.rootName ? (a(), o("span", Vl)) : (a(), o("span", Rl, c((t.rootToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, Il),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[3]
                      }, [
                        s("div", Ml, [
                          d.value.body[u - 1] && d.value.body[u - 1].branchName === t.branchName ? (a(), o("span", jl)) : (a(), o("span", Xl, c(t.branchName), 1))
                        ])
                      ], 12, Bl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[4]
                      }, [
                        s("div", El, [
                          d.value.body[u - 1] && d.value.body[u - 1].branchName === t.branchName ? (a(), o("span", Gl)) : (a(), o("span", Al, c(t.branchValue.toFixed(e.value.table.td.roundingValue)), 1))
                        ])
                      ], 12, Ol),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[5]
                      }, [
                        s("div", Dl, [
                          d.value.body[u - 1] && d.value.body[u - 1].branchName === t.branchName ? (a(), o("span", Yl)) : (a(), o("span", ql, c((t.branchToRoot * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, Ul),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[6]
                      }, [
                        s("div", Wl, [
                          d.value.body[u - 1] && d.value.body[u - 1].branchName === t.branchName ? (a(), o("span", Kl)) : (a(), o("span", Jl, c((t.branchToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1))
                        ])
                      ], 12, Hl),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[7]
                      }, [
                        s("div", Zl, c(t.nutName), 1)
                      ], 12, Ql),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[8]
                      }, [
                        s("div", ta, c(t.nutValue.toFixed(e.value.table.td.roundingValue)), 1)
                      ], 12, ea),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[9]
                      }, [
                        s("div", aa, c((t.nutToBranch * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, la),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[10]
                      }, [
                        s("div", sa, c((t.nutToRoot * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, oa),
                      s("td", {
                        class: "vue-ui-data-table__tbody__td",
                        style: h(`outline:${e.value.table.td.outline}`),
                        "data-cell": d.value.head[11]
                      }, [
                        s("div", na, c((t.nutToTotal * 100).toFixed(e.value.table.td.roundingPercentage)) + "% ", 1)
                      ], 12, ua)
                    ], 6))), 256))
                  ])
                ])
              ], 2)
            ])
          ], 512)
        ]),
        _: 1
      }, 8, ["config"])) : b("", !0)
    ], 14, ot));
  }
}, ga = /* @__PURE__ */ at(ra, [["__scopeId", "data-v-3571ba27"]]);
export {
  ga as default
};
