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