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