import { useCssVars as Me, computed as h, ref as p, watch as me, onMounted as Se, openBlock as s, createElementBlock as n, normalizeClass as U, normalizeStyle as m, createBlock as Y, createCommentVNode as c, unref as i, createSlots as Ne, withCtx as k, renderSlot as x, normalizeProps as j, guardReactiveProps as W, createVNode as le, Fragment as A, renderList as S, createElementVNode as u, toDisplayString as f, withKeys as Oe, createTextVNode as Fe, nextTick as Ve } from "vue";
import { u as Pe, o as Ie, e as xe, c as ae, t as Be, M as Re, g as Ee, N as oe, X as Ge, F as se, i as F, f as N, v as z, x as Xe, y as He, q as De, r as Ue } from "./index-DK7qqHGP.js";
import { _ as Ye } from "./Title-Cxlu3Etv.js";
import { u as je, U as We } from "./usePrinter-Cza87yNE.js";
import { _ as qe } from "./Tooltip-Bt9pHzBM.js";
import Ke from "./vue-ui-skeleton-CQnYuosp.js";
import Je from "./BaseIcon-ZChy8GeS.js";
import Qe from "./vue-ui-accordion-5C4CP3gA.js";
import { u as we } from "./useNestedProp-0nRX_rTi.js";
import { _ as Ze } from "./PackageVersion-I1_4jcn_.js";
import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const tt = ["id"], lt = {
  key: 0,
  style: "width:100%;background:transparent"
}, at = ["xmlns", "viewBox"], ot = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], st = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], ut = ["font-size", "font-weight", "fill", "x", "y"], nt = ["x", "y", "width", "height", "onMouseover"], it = { key: 0 }, rt = ["font-size", "fill", "x", "y", "font-weight"], vt = { key: 0 }, dt = ["text-anchor", "font-size", "fill", "font-weight", "transform"], yt = { key: 1 }, ct = ["x", "y", "width", "height", "stroke", "stroke-width"], ht = { key: 2 }, pt = ["id"], gt = ["stop-color"], ft = ["stop-color"], bt = ["x", "y", "font-size", "fill"], mt = ["x", "y", "height", "rx", "fill"], xt = ["x", "y", "font-size", "fill"], wt = ["stroke", "x1", "x2", "y1", "y2"], _t = ["fill", "d"], kt = { key: 3 }, $t = {
  id: "colorScaleHorizontal",
  x1: "0%",
  x2: "100%",
  y1: "0%",
  y2: "0%"
}, Ct = ["stop-color"], Lt = ["stop-color"], At = ["x", "y", "width", "height", "rx"], zt = ["x", "y", "font-size", "fill"], Tt = ["x", "y", "font-size", "fill"], Mt = ["stroke", "x1", "x2", "y1", "y2"], St = ["fill", "d"], Nt = {
  key: 3,
  class: "vue-data-ui-watermark"
}, Ot = { class: "vue-ui-data-table" }, Ft = { key: 0 }, Vt = ["data-cell"], Pt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, It = ["data-cell"], Bt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = {
  __name: "vue-ui-heatmap",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  setup(G, { expose: _e }) {
    const r = G;
    Me((t) => ({
      "1678b056": t.tdo
    }));
    const { vue_ui_heatmap: ke } = Pe(), X = h(() => !!r.dataset && r.dataset.length);
    Ie(r.dataset) && xe({
      componentName: "VueUiHeatmap",
      type: "dataset"
    });
    const V = p(ae()), q = p(null), $e = p(null), K = p(!1), J = p(""), ue = p(void 0), P = p(null), ne = p(0), ie = p(null), re = p(!1), ve = p(0), e = h({
      get: () => de(),
      set: (t) => t
    });
    function de() {
      const t = we({
        userConfig: r.config,
        defaultConfig: ke
      });
      let a = {};
      return t.theme ? a = {
        ...we({
          userConfig: Be.vue_ui_heatmap[t.theme] || r.config,
          defaultConfig: t
        })
      } : a = t, r.config && Re(r.config, "style.layout.dataLabels.xAxis.showOnlyAtModulo") ? a.style.layout.dataLabels.xAxis.showOnlyAtModulo = r.config.style.layout.dataLabels.xAxis.showOnlyAtModulo : a.style.layout.dataLabels.xAxis.showOnlyAtModulo = null, a;
    }
    me(() => r.config, (t) => {
      e.value = de(), Q(), ve.value += 1;
    }, { deep: !0 }), me(() => r.dataset, () => {
      Q();
    }, { deep: !0 });
    const { isPrinting: ye, isImaging: ce, generatePdf: he, generateImage: pe } = je({
      elementId: `heatmap__${V.value}`,
      fileName: e.value.style.title.text || "vue-ui-heatmap"
    }), w = p({
      showTable: e.value.table.show,
      showTooltip: e.value.style.tooltip.show
    }), Ce = h(() => e.value.table.responsiveBreakpoint);
    function Le() {
      new ResizeObserver((a) => {
        a.forEach((o) => {
          re.value = o.contentRect.width < Ce.value;
        });
      }).observe(ie.value);
    }
    Se(Q);
    function Q() {
      Le();
    }
    const O = h(() => Math.max(...r.dataset.flatMap((t) => (t.values || []).length))), _ = h(() => {
      const t = e.value.style.layout.padding.top + e.value.style.layout.padding.bottom + r.dataset.length * e.value.style.layout.cells.height, a = e.value.style.layout.padding.left + e.value.style.layout.padding.right + (O.value < r.dataset.length ? r.dataset.length : O.value) * e.value.style.layout.cells.height, o = t + (e.value.style.legend.show ? e.value.style.legend.position === "right" ? 0 : e.value.style.layout.cells.height * 2 : 0);
      return {
        height: t,
        heightWithLegend: o,
        width: a
      };
    }), H = h(() => e.value.style.legend.position), l = h(() => ({
      top: e.value.style.layout.padding.top,
      left: e.value.style.layout.padding.left,
      right: _.value.width - e.value.style.layout.padding.right - (H.value === "right" && e.value.style.legend.show ? 92 : 0),
      bottom: _.value.height - e.value.style.layout.padding.bottom,
      height: _.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom,
      width: _.value.width - e.value.style.layout.padding.right - e.value.style.layout.padding.left - (H.value === "right" && e.value.style.legend.show ? 92 : 0)
    })), Z = h(() => d.value.height * r.dataset.length), b = h(() => Math.max(...r.dataset.flatMap((t) => t.values))), T = h(() => Math.min(...r.dataset.flatMap((t) => t.values))), M = h(() => {
      const t = r.dataset.flatMap((o) => o.values);
      return t.reduce((o, v) => o + v, 0) / t.length;
    }), d = h(() => ({
      width: l.value.width / O.value,
      height: l.value.width / (O.value < r.dataset.length ? r.dataset.length : O.value)
    })), $ = h(() => {
      const t = e.value.style.layout.dataLabels.yAxis.values.length ? e.value.style.layout.dataLabels.yAxis.values : r.dataset.map((o) => o.name), a = e.value.style.layout.dataLabels.xAxis.values;
      return {
        yLabels: t,
        xLabels: a.slice(0, O.value)
      };
    }), D = h(() => (r.dataset.forEach((t, a) => {
      Ee({
        datasetObject: t,
        requiredAttributes: ["values"]
      }).forEach((o) => {
        xe({
          componentName: "VueUiHeatmap",
          type: "datasetSerieAttribute",
          property: "values",
          index: a
        });
      });
    }), r.dataset.map((t) => ({
      ...t,
      temperatures: (t.values || []).map((a, o) => a >= M.value ? {
        side: "up",
        color: oe(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, a),
        ratio: Math.abs(Math.abs(a - M.value) / Math.abs(b.value - M.value)) > 1 ? 1 : Math.abs(Math.abs(a - M.value) / Math.abs(b.value - M.value)),
        value: a,
        yAxisName: t.name,
        xAxisName: $.value.xLabels[o],
        id: `vue-data-ui-heatmap-cell-${ae()}`
      } : {
        side: "down",
        ratio: Math.abs(1 - Math.abs(a) / Math.abs(M.value)) > 1 ? 1 : Math.abs(1 - Math.abs(a) / Math.abs(M.value)),
        color: oe(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, a),
        value: a,
        yAxisName: t.name,
        xAxisName: $.value.xLabels[o],
        id: `vue-data-ui-heatmap-cell-${ae()}`
      })
    })))), C = p(null), I = p(null);
    function Ae(t, a, o, v) {
      P.value = { x: o, y: v };
      const { value: y, yAxisName: g, xAxisName: L, id: Te } = t;
      ue.value = Te, C.value = y, I.value = {
        datapoint: t,
        seriesIndex: a,
        series: D.value,
        config: e.value
      }, K.value = !0;
      let ee = "";
      const te = e.value.style.tooltip.customFormat;
      Xe(te) && He(() => te({
        datapoint: t,
        seriesIndex: a,
        series: D.value,
        config: e.value
      })) ? J.value = te({
        datapoint: t,
        seriesIndex: a,
        series: D.value,
        config: e.value
      }) : (ee += `<div>${g} ${L ? `${L}` : ""}</div>`, ee += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${oe(e.value.style.layout.cells.colors.cold, e.value.style.layout.cells.colors.hot, T.value, b.value, y)}">⬤</span><span>${isNaN(y) ? "-" : F(
        e.value.style.layout.cells.value.formatter,
        y,
        N({
          p: e.value.style.layout.dataLabels.prefix,
          v: y,
          s: e.value.style.layout.dataLabels.suffix,
          r: e.value.style.tooltip.roundingValue
        }),
        { datapoint: t, seriesIndex: a }
      )}</span></div>`, J.value = `<div style="font-size:${e.value.style.tooltip.fontSize}px">${ee}</div>`);
    }
    const B = h(() => l.value.top + Z.value * (1 - C.value / b.value)), R = h(() => l.value.left + (_.value.width - l.value.left - e.value.style.layout.padding.right) * (C.value / b.value));
    h(() => {
      const t = r.dataset.map((o) => ({
        name: o.name
      })), a = r.dataset.map((o) => o.values);
      return { head: t, body: a };
    });
    function ge() {
      Ve(() => {
        const t = ["", ...r.dataset.map((y, g) => y.name)], a = [];
        for (let y = 0; y < $.value.xLabels.length; y += 1) {
          const g = [$.value.xLabels[y]];
          for (let L = 0; L < r.dataset.length; L += 1)
            g.push([r.dataset[L].values[y]]);
          a.push(g);
        }
        const o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([t]).concat(a), v = De(o);
        Ue({ csvContent: v, title: e.value.style.title.text || "vue-ui-heatmap" });
      });
    }
    const E = p(!1);
    function ze(t) {
      E.value = t, ne.value += 1;
    }
    function fe() {
      w.value.showTable = !w.value.showTable;
    }
    function be() {
      w.value.showTooltip = !w.value.showTooltip;
    }
    return _e({
      generatePdf: he,
      generateCsv: ge,
      generateImage: pe,
      toggleTable: fe,
      toggleTooltip: be
    }), (t, a) => (s(), n("div", {
      ref_key: "heatmapChart",
      ref: q,
      class: U(`vue-ui-heatmap ${E.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      style: m(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor}`),
      id: `heatmap__${V.value}`
    }, [
      e.value.style.title.text ? (s(), n("div", lt, [
        (s(), Y(Ye, {
          key: `title_${ve.value}`,
          config: {
            title: {
              cy: "heatmap-div-title",
              ...e.value.style.title
            },
            subtitle: {
              cy: "heatmap-div-subtitle",
              ...e.value.style.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ])) : c("", !0),
      e.value.userOptions.show && X.value ? (s(), Y(We, {
        ref_key: "details",
        ref: $e,
        key: `user_options_${ne.value}`,
        backgroundColor: e.value.style.backgroundColor,
        color: e.value.style.color,
        isImaging: i(ce),
        isPrinting: i(ye),
        uid: V.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
        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: E.value,
        isTooltip: w.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: q.value,
        position: e.value.userOptions.position,
        onToggleFullscreen: ze,
        onGeneratePdf: i(he),
        onGenerateCsv: ge,
        onGenerateImage: i(pe),
        onToggleTable: fe,
        onToggleTooltip: be
      }, Ne({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: k(() => [
            x(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: k(() => [
            x(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: k(() => [
            x(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: k(() => [
            x(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: k(() => [
            x(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: k(({ toggleFullscreen: o, isFullscreen: v }) => [
            x(t.$slots, "optionFullscreen", j(W({ toggleFullscreen: o, isFullscreen: v })), void 0, !0)
          ]),
          key: "5"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : c("", !0),
      X.value ? (s(), n("svg", {
        key: 2,
        xmlns: i(Ge),
        class: U({ "vue-data-ui-fullscreen--on": E.value, "vue-data-ui-fulscreen--off": !E.value }),
        viewBox: `0 0 ${_.value.width} ${_.value.heightWithLegend}`,
        style: m(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
      }, [
        le(Ze),
        (s(!0), n(A, null, S(D.value, (o, v) => (s(), n("g", null, [
          (s(!0), n(A, null, S(o.temperatures, (y, g) => (s(), n("g", null, [
            u("rect", {
              x: l.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: l.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: e.value.style.layout.cells.colors.underlayer,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, ot),
            u("rect", {
              x: l.value.left + d.value.width * g + e.value.style.layout.cells.spacing / 2,
              y: l.value.top + d.value.height * v + e.value.style.layout.cells.spacing / 2,
              width: d.value.width - e.value.style.layout.cells.spacing,
              height: d.value.height - e.value.style.layout.cells.spacing,
              fill: y.color,
              stroke: e.value.style.backgroundColor,
              "stroke-width": e.value.style.layout.cells.spacing
            }, null, 8, st),
            e.value.style.layout.cells.value.show ? (s(), n("text", {
              key: 0,
              "text-anchor": "middle",
              "font-size": e.value.style.layout.cells.value.fontSize,
              "font-weight": e.value.style.layout.cells.value.bold ? "bold" : "normal",
              fill: i(se)(y.color),
              x: l.value.left + d.value.width * g + d.value.width / 2,
              y: l.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.cells.value.fontSize / 3
            }, f(i(F)(
              e.value.style.layout.cells.value.formatter,
              y.value,
              i(N)({
                p: e.value.style.layout.dataLabels.prefix,
                v: y.value,
                s: e.value.style.layout.dataLabels.suffix,
                r: e.value.style.layout.cells.value.roundingValue
              }),
              { datapoint: y }
            )), 9, ut)) : c("", !0)
          ]))), 256)),
          (s(!0), n(A, null, S(o.temperatures, (y, g) => (s(), n("g", null, [
            u("rect", {
              x: l.value.left + d.value.width * g,
              y: l.value.top + d.value.height * v,
              width: d.value.width,
              height: d.value.height,
              fill: "transparent",
              stroke: "none",
              onMouseover: (L) => Ae(y, v, l.value.left + d.value.width * g, l.value.top + d.value.height * v),
              onMouseout: a[0] || (a[0] = (L) => {
                K.value = !1, ue.value = void 0, C.value = null, P.value = null;
              })
            }, null, 40, nt)
          ]))), 256)),
          e.value.style.layout.dataLabels.yAxis.show ? (s(), n("g", it, [
            u("text", {
              "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
              fill: e.value.style.layout.dataLabels.yAxis.color,
              x: l.value.left + e.value.style.layout.dataLabels.yAxis.offsetX - 6,
              y: l.value.top + d.value.height * v + d.value.height / 2 + e.value.style.layout.dataLabels.yAxis.fontSize / 3 + e.value.style.layout.dataLabels.yAxis.offsetY,
              "text-anchor": "end",
              "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal"
            }, f($.value.yLabels[v]), 9, rt)
          ])) : c("", !0)
        ]))), 256)),
        e.value.style.layout.dataLabels.xAxis.show ? (s(), n("g", vt, [
          (s(!0), n(A, null, S($.value.xLabels, (o, v) => (s(), n(A, null, [
            !e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo || e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo && v % e.value.style.layout.dataLabels.xAxis.showOnlyAtModulo === 0 ? (s(), n("text", {
              key: 0,
              "text-anchor": e.value.style.layout.dataLabels.xAxis.rotation === 0 ? "middle" : e.value.style.layout.dataLabels.xAxis.rotation < 0 ? "start" : "end",
              "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
              fill: e.value.style.layout.dataLabels.xAxis.color,
              "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
              transform: `translate(${l.value.left + d.value.width / 2 + l.value.width / $.value.xLabels.length * v + e.value.style.layout.dataLabels.xAxis.offsetX}, ${l.value.top + e.value.style.layout.dataLabels.xAxis.offsetY - 6}), rotate(${e.value.style.layout.dataLabels.xAxis.rotation})`
            }, f(o), 9, dt)) : c("", !0)
          ], 64))), 256))
        ])) : c("", !0),
        P.value ? (s(), n("g", yt, [
          u("rect", {
            style: { "pointer-events": "none" },
            x: P.value.x - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            y: P.value.y - e.value.style.layout.cells.selected.border / 2 + e.value.style.layout.cells.spacing,
            width: d.value.width - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            height: d.value.height - e.value.style.layout.cells.spacing + e.value.style.layout.cells.selected.border - e.value.style.layout.cells.spacing,
            fill: "transparent",
            stroke: e.value.style.layout.cells.selected.color,
            "stroke-width": e.value.style.layout.cells.selected.border,
            rx: 1
          }, null, 8, ct)
        ])) : c("", !0),
        e.value.style.legend.show && H.value === "right" ? (s(), n("g", ht, [
          u("defs", null, [
            u("linearGradient", {
              id: `colorScaleVertical_${V.value}`,
              x2: "0%",
              y2: "100%"
            }, [
              u("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, gt),
              u("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, ft)
            ], 8, pt)
          ]),
          u("text", {
            x: l.value.right + 36 + 18,
            y: l.value.top - e.value.style.legend.fontSize * 1.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(b.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(b.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, bt),
          u("rect", {
            x: l.value.right + 36,
            y: l.value.top,
            width: 36,
            height: Z.value,
            rx: e.value.style.legend.scaleBorderRadius,
            fill: `url(#colorScaleVertical_${V.value})`
          }, null, 8, mt),
          u("text", {
            x: l.value.right + 36 + 18,
            y: l.value.top + Z.value + e.value.style.legend.fontSize * 2.5,
            "text-anchor": "middle",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(T.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(T.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, xt),
          C.value !== null ? (s(), n("line", {
            key: 0,
            stroke: i(se)(I.value.datapoint.color),
            "stroke-width": "2",
            x1: l.value.right + 36,
            x2: l.value.right + 72,
            y1: B.value,
            y2: B.value
          }, null, 8, wt)) : c("", !0),
          C.value !== null ? (s(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${l.value.right + 36},${B.value} ${l.value.right + 26},${B.value - 8} ${l.value.right + 26},${B.value + 8}z`
          }, null, 8, _t)) : c("", !0)
        ])) : c("", !0),
        e.value.style.legend.show && H.value === "bottom" ? (s(), n("g", kt, [
          u("defs", null, [
            u("linearGradient", $t, [
              u("stop", {
                offset: "0%",
                "stop-color": e.value.style.layout.cells.colors.cold
              }, null, 8, Ct),
              u("stop", {
                offset: "100%",
                "stop-color": e.value.style.layout.cells.colors.hot
              }, null, 8, Lt)
            ])
          ]),
          u("rect", {
            x: l.value.left,
            y: l.value.bottom + e.value.style.layout.cells.height,
            width: _.value.width - l.value.left - e.value.style.layout.padding.right,
            height: e.value.style.layout.cells.height,
            rx: e.value.style.legend.scaleBorderRadius > e.value.style.layout.cells.height / 2 ? e.value.style.layout.cells.height / 2 : e.value.style.legend.scaleBorderRadius,
            fill: "url(#colorScaleHorizontal)"
          }, null, 8, At),
          u("text", {
            x: l.value.left,
            y: l.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "start",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(T.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(T.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, zt),
          u("text", {
            x: l.value.right,
            y: l.value.bottom + e.value.style.layout.cells.height * 2 + e.value.style.legend.fontSize * 2,
            "text-anchor": "end",
            "font-size": e.value.style.legend.fontSize * 2,
            fill: e.value.style.legend.color
          }, f(i(F)(
            e.value.style.layout.cells.value.formatter,
            i(z)(b.value),
            i(N)({
              p: e.value.style.layout.dataLabels.prefix,
              v: i(z)(b.value),
              s: e.value.style.layout.dataLabels.suffix,
              r: e.value.style.legend.roundingValue
            })
          )), 9, Tt),
          C.value !== null ? (s(), n("line", {
            key: 0,
            stroke: i(se)(I.value.datapoint.color),
            "stroke-width": "2",
            x1: R.value,
            x2: R.value,
            y1: l.value.bottom + e.value.style.layout.cells.height,
            y2: l.value.bottom + e.value.style.layout.cells.height * 2
          }, null, 8, Mt)) : c("", !0),
          C.value !== null ? (s(), n("path", {
            key: 1,
            fill: e.value.style.color,
            stroke: "none",
            d: `M ${R.value},${l.value.bottom + e.value.style.layout.cells.height} ${R.value - 12},${l.value.bottom + e.value.style.layout.cells.height - 20} ${R.value + 12},${l.value.bottom + e.value.style.layout.cells.height - 20}z`
          }, null, 8, St)) : c("", !0)
        ])) : c("", !0),
        x(t.$slots, "svg", { svg: _.value }, void 0, !0)
      ], 14, at)) : c("", !0),
      t.$slots.watermark ? (s(), n("div", Nt, [
        x(t.$slots, "watermark", j(W({ isPrinting: i(ye) || i(ce) })), void 0, !0)
      ])) : c("", !0),
      X.value ? c("", !0) : (s(), Y(Ke, {
        key: 4,
        config: {
          type: "heatmap",
          style: {
            backgroundColor: e.value.style.backgroundColor,
            heatmap: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      le(qe, {
        show: w.value.showTooltip && K.value,
        backgroundColor: e.value.style.tooltip.backgroundColor,
        color: e.value.style.tooltip.color,
        borderRadius: e.value.style.tooltip.borderRadius,
        borderColor: e.value.style.tooltip.borderColor,
        borderWidth: e.value.style.tooltip.borderWidth,
        fontSize: e.value.style.tooltip.fontSize,
        backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
        position: e.value.style.tooltip.position,
        offsetY: e.value.style.tooltip.offsetY,
        parent: q.value,
        content: J.value,
        isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
      }, {
        "tooltip-before": k(() => [
          x(t.$slots, "tooltip-before", j(W({ ...I.value })), void 0, !0)
        ]),
        "tooltip-after": k(() => [
          x(t.$slots, "tooltip-after", j(W({ ...I.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
      X.value ? (s(), Y(Qe, {
        key: 5,
        hideDetails: "",
        config: {
          open: w.value.showTable,
          maxHeight: 1e4,
          body: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          },
          head: {
            backgroundColor: e.value.style.backgroundColor,
            color: e.value.style.color
          }
        }
      }, {
        content: k(() => [
          u("div", {
            ref_key: "tableContainer",
            ref: ie,
            class: "vue-ui-heatmap-table"
          }, [
            u("div", {
              style: "width:100%;overflow-x:auto;padding-top:36px;position:relative",
              class: U({ "vue-ui-responsive": re.value })
            }, [
              u("div", {
                role: "button",
                tabindex: "0",
                style: m(`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: a[1] || (a[1] = (o) => w.value.showTable = !1),
                onKeypress: a[2] || (a[2] = Oe((o) => w.value.showTable = !1, ["enter"]))
              }, [
                le(Je, {
                  name: "close",
                  stroke: e.value.table.th.color,
                  "stroke-width": 2
                }, null, 8, ["stroke"])
              ], 36),
              u("table", Ot, [
                u("caption", {
                  style: m(`backgroundColor:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
                }, [
                  Fe(f(e.value.style.title.text) + " ", 1),
                  e.value.style.title.subtitle.text ? (s(), n("span", Ft, f(e.value.style.title.subtitle.text), 1)) : c("", !0)
                ], 4),
                u("thead", null, [
                  u("tr", {
                    role: "row",
                    style: m(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
                  }, [
                    u("th", {
                      style: m(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, null, 4),
                    (s(!0), n(A, null, S(G.dataset, (o, v) => (s(), n("th", {
                      align: "right",
                      style: m(`outline:${e.value.table.th.outline};padding-right:6px`)
                    }, f(o.name), 5))), 256))
                  ], 4)
                ]),
                u("tbody", null, [
                  (s(!0), n(A, null, S($.value.xLabels, (o, v) => (s(), n("tr", {
                    role: "row",
                    class: U({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": v % 2 === 0, "vue-ui-data-table__tbody__row-odd": v % 2 !== 0 }),
                    style: m(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
                  }, [
                    u("td", {
                      "data-cell": e.value.table.colNames.xAxis,
                      class: "vue-ui-data-table__tbody__td",
                      style: m(`outline:${e.value.table.td.outline}`)
                    }, [
                      u("div", Pt, f(o), 1)
                    ], 12, Vt),
                    (s(!0), n(A, null, S(G.dataset, (y, g) => (s(), n("td", {
                      class: "vue-ui-data-table__tbody__td",
                      "data-cell": G.dataset[g].name,
                      style: m(`outline:${e.value.table.td.outline}`)
                    }, [
                      u("div", Bt, f(isNaN(y.values[v]) ? "-" : i(N)({ p: e.value.style.layout.dataLabels.prefix, v: y.values[v], s: e.value.style.layout.dataLabels.suffix, r: e.value.table.td.roundingValue })), 1)
                    ], 12, It))), 256))
                  ], 6))), 256))
                ])
              ])
            ], 2)
          ], 512)
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 14, tt));
  }
}, Jt = /* @__PURE__ */ et(Rt, [["__scopeId", "data-v-c67467bd"]]);
export {
  Jt as default
};
