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