import { computed as g, ref as c, watch as je, onMounted as Ue, onBeforeUnmount as Ve, openBlock as u, createElementBlock as r, normalizeClass as W, normalizeStyle as T, createBlock as M, createCommentVNode as m, unref as z, createSlots as Ge, withCtx as x, renderSlot as b, normalizeProps as B, guardReactiveProps as E, createVNode as $e, Fragment as C, renderList as I, createElementVNode as F, toDisplayString as D, createTextVNode as He } from "vue";
import { u as Xe, c as Z, t as Ye, a as qe, p as G, o as Qe, e as Ae, g as Je, b as Ke, d as Ze, D as et, Q as tt, R as at, S as lt, X as ot, x as _e, i as Te, f as Me, y as st, q as nt, r as ut, F as H } from "./index-Cm2_6s9o.js";
import { t as rt, u as it } from "./useResponsive-CoxXLe23.js";
import { _ as ct } from "./Title-Coit3NcT.js";
import { L as vt } from "./Legend-DRozxv9L.js";
import { _ as dt } from "./Tooltip-BBgfUr4a.js";
import { _ as ht } from "./Shape-C-sY_hlc.js";
import { u as pt, U as mt } from "./usePrinter-Cx8U1e30.js";
import { D as yt } from "./DataTable-NGi-FgLM.js";
import ft from "./vue-ui-accordion-CxrNF8BI.js";
import gt from "./vue-ui-skeleton-BUS6A44x.js";
import { u as ze } from "./useNestedProp-BYPZJNhi.js";
import { _ as bt } from "./PackageVersion-CTMY4zeY.js";
import { P as xt } from "./PenAndPaper-DJ_d10S-.js";
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Ct = ["id"], wt = ["xmlns", "viewBox"], $t = { style: { "pointer-events": "none" } }, At = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "fill", "font-size", "font-weight"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Mt = ["x", "y", "fill", "font-size", "font-weight"], zt = { key: 0 }, It = ["x", "y", "font-size", "fill"], Ft = ["width", "x", "y"], Pt = { style: { width: "100%" } }, Nt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], Lt = ["d", "stroke", "stroke-width", "onMouseenter"], St = ["d", "onMouseenter"], Ot = {
  key: 5,
  class: "vue-data-ui-watermark"
}, Dt = ["onClick"], Wt = ["innerHTML"], Bt = {
  __name: "vue-ui-parallel-coordinate-plot",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectLegend", "selectDatapoint"],
  setup(Ie, { expose: Fe, emit: ee }) {
    const A = Ie, { vue_ui_parallel_coordinate_plot: Pe } = Xe(), P = g({
      get() {
        return !!A.dataset && A.dataset.length;
      },
      set(t) {
        return t;
      }
    }), te = c(0), N = c(null), ae = c(null), le = c(null), oe = c(null), se = c(null), ne = c(0), ue = c(0), re = c(0), X = c(Z()), L = c(!1);
    function Ne(t) {
      L.value = t, te.value += 1;
    }
    const e = g({
      get: () => ie(),
      set: (t) => t
    });
    function ie() {
      const t = ze({
        userConfig: A.config,
        defaultConfig: Pe
      });
      return t.theme ? {
        ...ze({
          userConfig: Ye.vue_ui_parallel_coordinate_plot[t.theme] || A.config,
          defaultConfig: t
        }),
        customPalette: qe[t.theme] || G
      } : t;
    }
    je(() => A.config, (t) => {
      e.value = ie(), ce(), ne.value += 1, re.value += 1, ue.value += 1;
    }, { deep: !0 });
    const R = c(null);
    Ue(() => {
      ce();
    });
    function ce() {
      if (Qe(A.dataset) ? Ae({
        componentName: "VueUiParallelCoordinatePlot",
        type: "dataset"
      }) : A.dataset.forEach((t, l) => {
        Je({
          datasetObject: t,
          requiredAttributes: ["name", "series"]
        }).forEach((a) => {
          P.value = !1, Ae({
            componentName: "VueUiParallelCoordinatePlot",
            type: "datasetSerieAttribute",
            property: a,
            index: l
          });
        });
      }), e.value.responsive) {
        const t = rt(() => {
          const { width: l, height: a } = it({
            chart: N.value,
            title: e.value.style.chart.title.text ? ae.value : null,
            legend: e.value.style.chart.legend.show ? le.value : null,
            source: oe.value,
            noTitle: se.value
          });
          v.value.width = l, v.value.height = a, v.value.plotSize = H({
            relator: Math.min(l, a),
            adjuster: 600,
            source: e.value.style.chart.plots.radius,
            threshold: 2,
            fallback: 2
          }), v.value.ticksFontSize = H({
            relator: Math.min(l, a),
            adjuster: 600,
            source: e.value.style.chart.yAxis.labels.ticks.fontSize,
            threshold: 10,
            fallback: 10
          }), v.value.datapointFontSize = H({
            relator: Math.min(l, a),
            adjuster: 600,
            source: e.value.style.chart.yAxis.labels.datapoints.fontSize,
            threshold: 10,
            fallback: 10
          }), v.value.axisNameFontSize = H({
            relator: Math.min(l, a),
            adjuster: 600,
            source: e.value.style.chart.yAxis.labels.axisNamesFontSize,
            threshold: 12,
            fallback: 12
          });
        });
        R.value = new ResizeObserver(t), R.value.observe(N.value.parentNode);
      }
    }
    Ve(() => {
      R.value && R.value.disconnect();
    });
    const { isPrinting: ve, isImaging: de, generatePdf: he, generateImage: pe } = pt({
      elementId: `pcp_${X.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-parallel-coordinate-plot"
    }), Le = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), v = c({
      height: e.value.style.chart.height,
      width: e.value.style.chart.width,
      plotSize: e.value.style.chart.plots.radius,
      // ratio 100
      ticksFontSize: e.value.style.chart.yAxis.labels.ticks.fontSize,
      // ratio 42.85
      datapointFontSize: e.value.style.chart.yAxis.labels.datapoints.fontSize,
      axisNameFontSize: e.value.style.chart.yAxis.labels.axisNamesFontSize
    }), d = g(() => {
      const { top: t, right: l, bottom: a, left: o } = e.value.style.chart.padding, n = v.value.height, s = v.value.width;
      return {
        chartHeight: n,
        chartWidth: s,
        height: n - t - a,
        width: s - o - l,
        top: t,
        left: o,
        right: s - l,
        bottom: n - a
      };
    }), Se = g(() => Ke(e.value.customPalette)), y = c({
      dataLabels: {
        show: e.value.style.chart.yAxis.labels.datapoints.show
      },
      showTable: e.value.table.show,
      showTooltip: e.value.style.chart.tooltip.show
    }), w = c([]);
    function me(t) {
      w.value.includes(t) ? w.value = w.value.filter((l) => l !== t) : w.value.push(t);
    }
    const _ = g(() => A.dataset.map((t, l) => {
      const a = Ze(t.color) || Se.value[l] || G[l] || G[l % G.length];
      return {
        ...t,
        series: t.series.map((o) => ({
          ...o,
          id: Z(),
          color: a
        })),
        seriesIndex: l,
        color: a,
        id: Z(),
        shape: t.shape || "circle"
      };
    })), Oe = g(() => _.value.map((t) => ({
      ...t,
      opacity: w.value.includes(t.id) ? 0.5 : 1,
      segregate: () => me(t.id),
      isSegregated: w.value.includes(t.id)
    }))), De = g(() => ({
      cy: "pcp-div-legend",
      backgroundColor: e.value.style.chart.legend.backgroundColor,
      color: e.value.style.chart.legend.color,
      fontSize: e.value.style.chart.legend.fontSize,
      paddingBottom: 12,
      fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
    })), ye = g(() => Math.max(
      ..._.value.filter((t) => !w.value.includes(t.id)).map((t) => Math.max(...t.series.flatMap((l) => l.values.length)))
    )), k = g(() => d.value.width / ye.value), Y = g(() => _.value.filter((t) => !w.value.includes(t.id))), f = g(() => {
      let t = [];
      for (let l = 0; l < ye.value; l += 1) {
        const a = Math.min(...Y.value.flatMap((h) => h.series.map((V) => V.values[l] || 0) || 0)), o = Math.max(...Y.value.flatMap((h) => h.series.map((V) => V.values[l] || 0) || 0)), n = o === a ? a / 4 : a, s = o === a ? o * 2 : o, i = et(n, s, e.value.style.chart.yAxis.scaleTicks), $ = i.ticks.map((h, V) => {
          const Ee = i.min < 0 ? h + Math.abs(i.min) : h - Math.abs(i.min), Re = i.min < 0 ? i.max + Math.abs(i.min) : i.max - Math.abs(i.min);
          return {
            y: d.value.bottom - d.value.height * (Ee / Re),
            x: d.value.left + k.value * l + k.value / 2,
            value: h
          };
        });
        t.push({
          scale: i,
          ticks: $,
          name: e.value.style.chart.yAxis.labels.axisNames[l] || `Y-${l + 1}`
        });
      }
      return t;
    }), q = g(() => Y.value.map((t, l) => ({
      ...t,
      series: t.series.map((a, o) => ({
        ...a,
        datapoints: a.values.map((n, s) => {
          const i = f.value[s].scale.min < 0 ? (n || 0) + Math.abs(f.value[s].scale.min) : (n || 0) - Math.abs(f.value[s].scale.min), $ = f.value[s].scale.min < 0 ? f.value[s].scale.max + Math.abs(f.value[s].scale.min) : f.value[s].scale.max - Math.abs(f.value[s].scale.min);
          return {
            name: a.name,
            seriesName: t.name,
            axisIndex: s,
            datapointIndex: o,
            seriesIndex: l,
            value: n || 0,
            x: d.value.left + k.value * s + k.value / 2,
            y: d.value.bottom - d.value.height * (i / $),
            comment: a.comments && a.comments[s] || ""
          };
        })
      }))
    })).map((t) => ({
      ...t,
      series: t.series.map((l) => {
        const a = tt(l.datapoints), o = at(l.datapoints), n = lt(e.value.style.chart.lines.smooth ? `M ${o}` : `M ${a}`);
        return {
          ...l,
          smoothPath: o,
          straightPath: a,
          pathLength: n
        };
      })
    })));
    function fe({ value: t, index: l, datapoint: a }) {
      return Te(
        e.value.style.chart.yAxis.labels.formatters[l] || null,
        t,
        Me({
          p: e.value.style.chart.yAxis.labels.prefixes[l] || "",
          v: t,
          s: e.value.style.chart.yAxis.labels.suffixes[l] || "",
          r: e.value.style.chart.yAxis.labels.roundings[l] || 0
        }),
        { datapoint: a, seriesIndex: l }
      );
    }
    const p = c(null), Q = c(null), S = c(!1), J = c("");
    function j({ shape: t, serieName: l, serie: a, relativeIndex: o, seriesIndex: n }) {
      Q.value = { serie: a, relativeIndex: o, seriesIndex: n, series: _.value, scales: f.value }, S.value = !0, p.value = a.id;
      let s = "";
      const i = e.value.style.chart.tooltip.customFormat;
      _e(i) && st(() => i({
        serie: a,
        seriesIndex: a.seriesIndex,
        series: _.value,
        config: e.value,
        scales: f.value
      })) ? J.value = i({
        serie: a,
        seriesIndex: a.seriesIndex,
        series: _.value,
        config: e.value,
        scales: f.value
      }) : (s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l ? l + " - " : ""}${a.name}</div>`, f.value.map(($) => $.name).forEach(($, h) => {
        s += `
                <div class="vue-ui-tooltip-item" style="text-align:left">
                    <span>${$}: </span>
                    <span>
                        ${Te(
          e.value.style.chart.yAxis.labels.formatters[h] || null,
          a.datapoints[h].value,
          Me({
            p: e.value.style.chart.yAxis.labels.prefixes[h] || "",
            v: a.datapoints[h].value,
            s: e.value.style.chart.yAxis.labels.suffixes[h] || "",
            r: e.value.style.chart.yAxis.labels.roundings[h] || ""
          }),
          { datapoint: a.datapoints[h], seriesIndex: h }
        )}    
                    </span>
                </div>
            `, e.value.style.chart.comments.showInTooltip && a.datapoints[h].comment && (s += `<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.datapoints[h].comment}</div>`);
      }), J.value = `<div>${s}</div>`);
    }
    function We() {
      return _.value;
    }
    const O = g(() => {
      const t = [e.value.table.columnNames.series].concat([e.value.table.columnNames.item]).concat(f.value.map((n) => n.name)), l = q.value.flatMap((n, s) => n.series.map((i) => [n.name].concat([i.name]).concat(i.values))), a = {
        th: {
          backgroundColor: e.value.table.th.backgroundColor,
          color: e.value.table.th.color,
          outline: e.value.table.th.outline
        },
        td: {
          backgroundColor: e.value.table.td.backgroundColor,
          color: e.value.table.td.color,
          outline: e.value.table.td.outline
        },
        breakpoint: e.value.table.responsiveBreakpoint
      }, o = [e.value.table.columnNames.series].concat([e.value.table.columnNames.item]).concat(f.value.map((n) => n.name));
      return {
        body: l,
        head: t,
        config: a,
        colNames: o
      };
    }), ge = g(() => q.value.length === 0 ? { head: [], body: [], config: {}, columnNames: [] } : {
      head: O.value.head,
      body: O.value.body
    });
    function be() {
      const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = ge.value.head, a = ge.value.body, o = t.concat([l]).concat(a), n = nt(o);
      ut({ csvContent: n, title: e.value.style.chart.title.text || "vue-ui-parallel-coordinate-plot" });
    }
    function Be(t) {
      ee("selectDatapoint", t);
    }
    function xe(t) {
      ee("selectLegend", {
        ...t,
        isSegregated: !t.isSegregated,
        opacity: t.isSegregated ? 1 : 0.5
      });
    }
    function ke() {
      y.value.showTable = !y.value.showTable;
    }
    function Ce() {
      y.value.dataLabels.show = !y.value.dataLabels.show;
    }
    function we() {
      y.value.showTooltip = !y.value.showTooltip;
    }
    const U = c(!1);
    function K() {
      U.value = !U.value;
    }
    return Fe({
      getData: We,
      generateCsv: be,
      generatePdf: he,
      generateImage: pe,
      toggleTable: ke,
      toggleLabels: Ce,
      toggleTooltip: we,
      toggleAnnotator: K
    }), (t, l) => (u(), r("div", {
      ref_key: "pcpChart",
      ref: N,
      class: W(`vue-ui-pcp ${L.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      style: T(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
      id: `pcp_${X.value}`
    }, [
      e.value.userOptions.buttons.annotator ? (u(), M(xt, {
        key: 0,
        parent: N.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: U.value,
        onClose: K
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : m("", !0),
      Le.value ? (u(), r("div", {
        key: 1,
        ref_key: "noTitle",
        ref: se,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : m("", !0),
      e.value.style.chart.title.text ? (u(), r("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: ae,
        style: "width:100%;background:transparent;padding-bottom:24px"
      }, [
        (u(), M(ct, {
          key: `title_${ne.value}`,
          config: {
            title: {
              cy: "pcp-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "pcp-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : m("", !0),
      e.value.userOptions.show && P.value ? (u(), M(mt, {
        ref: "details",
        key: `user_options_${te.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: z(ve),
        isImaging: z(de),
        uid: X.value,
        hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasXls: e.value.userOptions.buttons.csv,
        hasImg: e.value.userOptions.buttons.img,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: e.value.userOptions.buttons.labels,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: L.value,
        isTooltip: y.value.showTooltip,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: N.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: U.value,
        onToggleFullscreen: Ne,
        onGeneratePdf: z(he),
        onGenerateCsv: be,
        onGenerateImage: z(pe),
        onToggleTable: ke,
        onToggleLabels: Ce,
        onToggleTooltip: we,
        onToggleAnnotator: K
      }, Ge({ _: 2 }, [
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: x(() => [
            b(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: x(() => [
            b(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: x(() => [
            b(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: x(() => [
            b(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: x(() => [
            b(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: x(({ toggleFullscreen: a, isFullscreen: o }) => [
            b(t.$slots, "optionFullscreen", B(E({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: x(({ toggleAnnotator: a, isAnnotator: o }) => [
            b(t.$slots, "optionAnnotator", B(E({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
          ]),
          key: "6"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
      P.value ? (u(), r("svg", {
        key: 4,
        xmlns: z(ot),
        class: W({ "vue-data-ui-fullscreen--on": L.value, "vue-data-ui-fulscreen--off": !L.value }),
        viewBox: `0 0 ${d.value.chartWidth <= 0 ? 10 : d.value.chartWidth} ${d.value.chartHeight <= 0 ? 10 : d.value.chartHeight}`,
        style: T(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
      }, [
        $e(bt),
        (u(!0), r(C, null, I(f.value, (a, o) => (u(), r("g", $t, [
          F("line", {
            x1: d.value.left + k.value * o + k.value / 2,
            x2: d.value.left + k.value * o + k.value / 2,
            y1: d.value.top,
            y2: d.value.bottom,
            stroke: e.value.style.chart.yAxis.stroke,
            "stroke-width": e.value.style.chart.yAxis.strokeWidth
          }, null, 8, At),
          F("text", {
            x: d.value.left + k.value * o + k.value / 2,
            y: d.value.top - 24,
            fill: e.value.style.chart.yAxis.labels.axisNamesColor,
            "font-size": v.value.axisNameFontSize,
            "font-weight": e.value.style.chart.yAxis.labels.axisNamesBold ? "bold" : "",
            "text-anchor": "middle"
          }, D(a.name), 9, _t),
          e.value.style.chart.yAxis.labels.ticks.show ? (u(), r(C, { key: 0 }, [
            (u(!0), r(C, null, I(a.ticks, (n) => (u(), r("line", {
              x1: n.x,
              x2: n.x - 10,
              y1: n.y,
              y2: n.y,
              stroke: e.value.style.chart.yAxis.stroke,
              "stroke-width": e.value.style.chart.yAxis.strokeWidth,
              style: T(`opacity:${p.value && !y.value.showTooltip ? 0.2 : 1}`)
            }, null, 12, Tt))), 256)),
            (u(!0), r(C, null, I(a.ticks, (n) => (u(), r("text", {
              x: n.x - 12 + e.value.style.chart.yAxis.labels.ticks.offsetX,
              y: n.y + e.value.style.chart.yAxis.labels.ticks.offsetY + v.value.ticksFontSize / 3,
              fill: e.value.style.chart.yAxis.labels.ticks.color,
              "text-anchor": "end",
              "font-size": v.value.ticksFontSize,
              "font-weight": e.value.style.chart.yAxis.labels.ticks.bold ? "bold" : "normal",
              style: T(`opacity:${p.value && !y.value.showTooltip ? 0.2 : 1}`)
            }, D(fe({ value: n.value, index: o, datapoint: n })), 13, Mt))), 256))
          ], 64)) : m("", !0)
        ]))), 256)),
        (u(!0), r(C, null, I(q.value, (a) => (u(), r("g", null, [
          (u(!0), r(C, null, I(a.series, (o, n) => (u(), r("g", null, [
            e.value.style.chart.plots.show ? (u(), r("g", zt, [
              (u(!0), r(C, null, I(o.datapoints, (s) => (u(), M(ht, {
                plot: { x: s.x, y: s.y },
                color: a.color,
                shape: a.shape,
                radius: a.shape === "triangle" ? v.value.plotSize * 1.2 : v.value.plotSize,
                stroke: e.value.style.chart.backgroundColor,
                strokeWidth: 0.5,
                onMouseenter: (i) => j({
                  shape: a.shape,
                  serieName: a.name,
                  serie: o,
                  relativeIndex: n,
                  seriesIndex: o.seriesIndex
                }),
                onMouseleave: l[0] || (l[0] = (i) => {
                  p.value = null, S.value = !1;
                }),
                style: T(`opacity:${p.value ? p.value === o.id ? e.value.style.chart.plots.opacity : 0.2 : e.value.style.chart.plots.opacity}`),
                onClick: () => Be(s)
              }, null, 8, ["plot", "color", "shape", "radius", "stroke", "onMouseenter", "style", "onClick"]))), 256)),
              y.value.showTooltip ? m("", !0) : (u(), r(C, { key: 0 }, [
                p.value && p.value === o.id && o.datapoints.length ? (u(), r("text", {
                  key: 0,
                  x: o.datapoints[0].x - v.value.ticksFontSize,
                  y: o.datapoints[0].y + v.value.ticksFontSize / 3,
                  "text-anchor": "end",
                  "font-size": v.value.ticksFontSize,
                  fill: a.color,
                  "font-weight": "bold"
                }, D(o.name), 9, It)) : m("", !0)
              ], 64)),
              e.value.style.chart.comments.show ? (u(!0), r(C, { key: 1 }, I(o.datapoints, (s) => (u(), r("g", null, [
                s.comment ? (u(), r("foreignObject", {
                  key: 0,
                  style: { overflow: "visible" },
                  height: "12",
                  width: e.value.style.chart.comments.width,
                  x: s.x - e.value.style.chart.comments.width / 2 + e.value.style.chart.comments.offsetX,
                  y: s.y + e.value.style.chart.comments.offsetY + 6
                }, [
                  F("div", Pt, [
                    b(t.$slots, "plot-comment", {
                      plot: { ...s, color: a.color }
                    }, void 0, !0)
                  ])
                ], 8, Ft)) : m("", !0)
              ]))), 256)) : m("", !0)
            ])) : m("", !0),
            y.value.dataLabels.show || p.value && p.value === o.id ? (u(!0), r(C, { key: 1 }, I(o.datapoints, (s, i) => (u(), r("text", {
              x: s.x + 12 + e.value.style.chart.yAxis.labels.datapoints.offsetX,
              y: s.y + e.value.style.chart.yAxis.labels.datapoints.offsetY + v.value.datapointFontSize / 3,
              fill: e.value.style.chart.yAxis.labels.datapoints.useSerieColor ? a.color : e.value.style.chart.yAxis.labels.datapoints.color,
              "text-anchor": "start",
              "font-weight": e.value.style.chart.yAxis.labels.datapoints.bold ? "bold" : "normal",
              class: W({ "vue-ui-pcp-animated": !1, "vue-ui-pcp-transition": !0 }),
              "font-size": v.value.datapointFontSize,
              onMouseenter: ($) => j({
                shape: a.shape,
                serieName: a.name,
                serie: o,
                relativeIndex: n,
                seriesIndex: o.seriesIndex
              }),
              onMouseleave: l[1] || (l[1] = ($) => {
                p.value = null, S.value = !1;
              }),
              style: T(`opacity:${p.value ? p.value === o.id ? 1 : 0.2 : 1}`)
            }, D(fe({ value: s.value, index: i, datapoint: s })), 45, Nt))), 256)) : m("", !0),
            F("path", {
              d: `M${e.value.style.chart.lines.smooth ? o.smoothPath : o.straightPath}`,
              stroke: a.color,
              "stroke-width": e.value.style.chart.lines.strokeWidth,
              fill: "none",
              class: W({ "vue-ui-pcp-animated vue-data-ui-line-animated": e.value.useCssAnimation, "vue-ui-pcp-transition": !0 }),
              onMouseenter: (s) => j({
                shape: a.shape,
                serieName: a.name,
                serie: o,
                relativeIndex: n,
                seriesIndex: o.seriesIndex
              }),
              onMouseleave: l[2] || (l[2] = (s) => {
                p.value = null, S.value = !1;
              }),
              style: T(`opacity:${p.value ? p.value === o.id ? e.value.style.chart.lines.opacity : 0.2 : e.value.style.chart.lines.opacity}; stroke-dasharray:${o.pathLength}; stroke-dashoffset: ${e.value.useCssAnimation ? o.pathLength : 0}`)
            }, null, 46, Lt),
            y.value.showTooltip ? (u(), r("path", {
              key: 2,
              d: `M${e.value.style.chart.lines.smooth ? o.smoothPath : o.straightPath}`,
              stroke: "transparent",
              "stroke-width": 12,
              fill: "none",
              class: W({ "vue-ui-pcp-animated vue-data-ui-line-animated": e.value.useCssAnimation, "vue-ui-pcp-transition": !0 }),
              onMouseenter: (s) => j({
                shape: a.shape,
                serieName: a.name,
                serie: o,
                relativeIndex: n,
                seriesIndex: o.seriesIndex
              }),
              onMouseleave: l[3] || (l[3] = (s) => {
                p.value = null, S.value = !1;
              }),
              style: { opacity: "0" }
            }, null, 42, St)) : m("", !0)
          ]))), 256))
        ]))), 256)),
        b(t.$slots, "svg", { svg: d.value }, void 0, !0)
      ], 14, wt)) : m("", !0),
      t.$slots.watermark ? (u(), r("div", Ot, [
        b(t.$slots, "watermark", B(E({ isPrinting: z(ve) || z(de) })), void 0, !0)
      ])) : m("", !0),
      P.value ? m("", !0) : (u(), M(gt, {
        key: 6,
        config: {
          type: "parallelCoordinatePlot",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor
          }
        }
      }, null, 8, ["config"])),
      F("div", {
        ref_key: "chartLegend",
        ref: le
      }, [
        e.value.style.chart.legend.show && P.value ? (u(), M(vt, {
          key: `legend_${ue.value}`,
          legendSet: Oe.value,
          config: De.value,
          onClickMarker: l[4] || (l[4] = ({ legend: a }) => {
            me(a.id), xe(a);
          })
        }, {
          item: x(({ legend: a, index: o }) => [
            F("div", {
              onClick: (n) => {
                a.segregate(), xe(a);
              },
              style: T(`opacity:${w.value.includes(a.id) ? 0.5 : 1}`)
            }, D(a.name), 13, Dt)
          ]),
          _: 1
        }, 8, ["legendSet", "config"])) : b(t.$slots, "legend", {
          key: 1,
          legend: _.value
        }, void 0, !0)
      ], 512),
      t.$slots.source ? (u(), r("div", {
        key: 7,
        ref_key: "source",
        ref: oe,
        dir: "auto"
      }, [
        b(t.$slots, "source", {}, void 0, !0)
      ], 512)) : m("", !0),
      $e(dt, {
        show: y.value.showTooltip && S.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        fontSize: e.value.style.chart.tooltip.fontSize,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: N.value,
        content: J.value,
        isFullscreen: L.value,
        isCustom: z(_e)(e.value.style.chart.tooltip.customFormat)
      }, {
        "tooltip-before": x(() => [
          b(t.$slots, "tooltip-before", B(E({ ...Q.value })), void 0, !0)
        ]),
        "tooltip-after": x(() => [
          b(t.$slots, "tooltip-after", B(E({ ...Q.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      P.value ? (u(), M(ft, {
        key: 8,
        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: x(() => [
          (u(), M(yt, {
            key: `table_${re.value}`,
            colNames: O.value.colNames,
            head: O.value.head,
            body: O.value.body,
            config: O.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: l[5] || (l[5] = (a) => y.value.showTable = !1)
          }, {
            th: x(({ th: a }) => [
              F("div", { innerHTML: a }, null, 8, Wt)
            ]),
            td: x(({ td: a }) => [
              He(D(a), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : m("", !0)
    ], 14, Ct));
  }
}, ta = /* @__PURE__ */ kt(Bt, [["__scopeId", "data-v-0ac822d4"]]);
export {
  ta as default
};
