import { computed as p, ref as n, watch as Ve, onMounted as Ee, onBeforeUnmount as Re, createElementBlock as u, openBlock as s, unref as v, normalizeStyle as B, normalizeClass as F, createBlock as T, createCommentVNode as c, createVNode as $e, createSlots as He, withCtx as y, renderSlot as f, normalizeProps as M, guardReactiveProps as W, createElementVNode as k, Fragment as g, renderList as w, toDisplayString as L, mergeProps as Be, createTextVNode as Xe, nextTick as je } from "vue";
import { u as Ye, c as ee, t as qe, p as A, a as Je, o as Ke, e as te, g as _e, b as Qe, d as Te, v as Ze, D as et, f as X, X as tt, i as le, l as lt, h as at, x as Le, F as ot, q as st, r as rt, y as ut } from "./index-CjXfhpMA.js";
import { t as it, u as nt } from "./useResponsive-BWapHhVH.js";
import { _ as vt } from "./Title-BfzkycPl.js";
import { u as ct, U as ht } from "./usePrinter-bLtFFBkj.js";
import { _ as dt } from "./Tooltip-p85hmQvg.js";
import { D as pt } from "./DataTable-BfXSoPx-.js";
import ft from "./vue-ui-skeleton-B1q5j9VT.js";
import { _ as yt } from "./Shape-C8uhInZ8.js";
import bt from "./vue-ui-accordion-CEdZMQD4.js";
import { u as Ae } from "./useNestedProp-CmXi5M93.js";
import { _ as mt } from "./PackageVersion-ChIRiDpv.js";
import { P as gt } from "./PenAndPaper-OV0eQPcd.js";
import { u as kt } from "./useUserOptionState-BIvW1Kz7.js";
import { u as xt } from "./useChartAccessibility-BWojgys7.js";
import { _ as wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Ct = ["id"], $t = ["xmlns", "viewBox"], _t = ["x", "y", "width", "height"], Tt = { key: 1 }, Lt = { key: 0 }, At = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Pt = { key: 1 }, St = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Ot = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Nt = ["x", "y", "fill", "font-size"], Ft = ["x", "y", "font-size", "fill"], Mt = ["fill", "font-size", "transform"], Wt = ["fill", "font-size", "x", "y"], It = ["x1", "x2", "y1", "y2", "stroke"], Dt = ["cx", "cy", "fill"], Gt = ["cx", "cy", "fill"], Ut = ["id"], Vt = ["stop-color"], Et = ["stop-color"], Rt = ["stop-color"], Ht = { key: 0 }, Bt = ["x", "y", "font-size", "fill"], Xt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, jt = ["innerHTML"], Yt = {
  __name: "vue-ui-strip-plot",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectDatapoint"],
  setup(Pe, { expose: Se, emit: Oe }) {
    const { vue_ui_strip_plot: ze } = Ye(), b = Pe, Ne = Oe, C = p({
      get() {
        return !!b.dataset && b.dataset.length;
      },
      set(t) {
        return t;
      }
    }), j = n(ee()), ae = n(0), Y = n(!1), q = n(""), P = n(null), oe = n(null), se = n(null), re = n(null), ue = n(!1), ie = n(0), ne = n(0), e = p({
      get: () => he(),
      set: (t) => t
    }), { userOptionsVisible: J, setUserOptionsVisibility: ve, keepUserOptionState: ce } = kt({ config: e.value }), { svgRef: Fe } = xt({ config: e.value.style.chart.title });
    function he() {
      const t = Ae({
        userConfig: b.config,
        defaultConfig: ze
      });
      return t.theme ? {
        ...Ae({
          userConfig: Je.vue_ui_strip_plot[t.theme] || b.config,
          defaultConfig: t
        }),
        customPalette: qe[t.theme] || A
      } : t;
    }
    Ve(() => b.config, (t) => {
      e.value = he(), J.value = !e.value.userOptions.showOnChartHover, de(), ie.value += 1, ne.value += 1, d.value.dataLabels.show = e.value.style.chart.labels.bestPlotLabel.show, d.value.showTable = e.value.table.show, d.value.showTooltip = e.value.style.chart.tooltip.show;
    }, { deep: !0 });
    const I = n(null);
    Ee(() => {
      de();
    });
    function de() {
      if (Ke(b.dataset) ? te({
        componentName: "VueUiStripPlot",
        type: "dataset"
      }) : b.dataset.forEach((t, o) => {
        _e({
          datasetObject: t,
          requiredAttributes: ["name", "plots"]
        }).forEach((l) => {
          C.value = !1, te({
            componentName: "VueUiStripPlot",
            type: "datasetSerieAttribute",
            property: l,
            index: o
          });
        }), t.plots && t.plots.forEach((l, r) => {
          _e({
            datasetObject: l,
            requiredAttributes: ["name", "value"]
          }).forEach((i) => {
            C.value = !1, te({
              componentName: "VueUiStripPlot",
              type: "datasetSerieAttribute",
              property: i,
              index: `${o},${r}`
            });
          });
        });
      }), e.value.responsive) {
        const t = it(() => {
          const { width: o, height: l } = nt({
            chart: P.value,
            title: e.value.style.chart.title.text ? oe.value : null,
            source: se.value,
            noTitle: re.value
          });
          requestAnimationFrame(() => {
            D.value = l, S.value.width = o, S.value.height = l, N.value = (o - m.value.left - m.value.right) / b.dataset.length, G.value = ot({
              relator: Math.min(l, o),
              adjuster: 600,
              source: e.value.style.chart.plots.radius,
              threshold: 6,
              fallback: 6
            });
          });
        });
        I.value = new ResizeObserver(t), I.value.observe(P.value.parentNode);
      }
      ue.value = !0, setTimeout(() => {
        z.value = !1;
      }, We.value * 50);
    }
    Re(() => {
      I.value && I.value.disconnect();
    });
    const { isPrinting: pe, isImaging: fe, generatePdf: ye, generateImage: be } = ct({
      elementId: `strip-plot_${j.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-strip-plot"
    }), Me = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), me = p(() => Qe(e.value.customPalette)), z = n(e.value.useCssAnimation), d = n({
      showTable: e.value.table.show,
      dataLabels: {
        show: e.value.style.chart.labels.bestPlotLabel.show
      },
      showTooltip: e.value.style.chart.tooltip.show
    }), m = n({
      top: e.value.style.chart.padding.top,
      bottom: e.value.style.chart.padding.bottom,
      left: e.value.style.chart.padding.left,
      right: e.value.style.chart.padding.right
    }), N = n(e.value.style.chart.stripWidth), D = n(e.value.style.chart.height), G = n(e.value.style.chart.plots.radius), S = n({
      width: N.value * b.dataset.length + m.value.left + m.value.right,
      height: e.value.style.chart.height
    }), a = p(() => {
      const t = N.value * b.dataset.length + m.value.left + m.value.right;
      return {
        left: m.value.left,
        right: t - m.value.right,
        top: m.value.top,
        bottom: D.value - m.value.bottom,
        width: N.value * b.dataset.length,
        height: D.value - m.value.top - m.value.bottom,
        stripWidth: N.value,
        absoluteHeight: D.value,
        absoluteWidth: t
      };
    }), U = p(() => C.value ? b.dataset.map((t, o) => {
      const l = ee();
      return {
        ...t,
        id: l,
        color: t.color ? Te(t.color) : me.value[o] || A[o] || A[o % A.length],
        plots: t.plots.map((r) => ({
          ...r,
          value: Ze(r.value),
          parentId: l,
          color: t.color ? Te(t.color) : me.value[o] || A[o] || A[o % A.length],
          id: ee()
        })).sort((r, i) => r.value - i.value)
      };
    }) : null), x = p(() => (U.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        x: a.value.left + (o + 1) * a.value.stripWidth - a.value.stripWidth / 2
      }))
    }))), We = p(() => Math.max(...x.value.map((t) => t.plots.length))), K = p(() => {
      const t = x.value.flatMap((o) => o.plots.map((l) => l.value));
      return {
        max: Math.max(...t),
        min: Math.min(...t)
      };
    }), $ = p(() => et(K.value.min < 0 ? K.value.min : 0, K.value.max, e.value.style.chart.grid.scaleSteps)), Ie = p(() => (x.value || []).map((t, o) => ({
      ...t,
      plots: t.plots.map((l) => ({
        ...l,
        y: a.value.bottom - (l.value + Math.abs($.value.min)) / ($.value.max + Math.abs($.value.min)) * a.value.height
      }))
    }))), ge = p(() => $.value.ticks.map((t) => ({
      y: a.value.bottom - a.value.height * ((t + Math.abs($.value.min)) / ($.value.max + Math.abs($.value.min))),
      x1: a.value.left,
      x2: a.value.right,
      value: t
    }))), Q = n(null), h = n(null);
    function De({ datapoint: t, seriesIndex: o }) {
      Q.value = { datapoint: t, seriesIndex: o, config: e.value, series: U.value }, Y.value = !0, h.value = t;
      const l = e.value.style.chart.tooltip.customFormat;
      if (Le(l) && ut(() => l({
        seriesIndex: o,
        datapoint: t,
        series: U.value,
        config: e.value
      })))
        q.value = l({
          seriesIndex: o,
          datapoint: t,
          series: U.value,
          config: e.value
        });
      else {
        let r = "";
        r += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.value.style.chart.plots.gradient.show ? `url(#${t.parentId})` : t.color}"/></svg>${t.name}</div>`, r += `<div>${le(
          e.value.style.chart.labels.formatter,
          t.value,
          X({
            p: e.value.style.chart.labels.prefix,
            v: t.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.tooltip.roundingValue
          }),
          { datapoint: t, seriesIndex: o }
        )}</div>`, q.value = `<div>${r}</div>`;
      }
    }
    const V = p(() => {
      const t = x.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, i) => i.value - r.value).map((r) => ({
        name: `${l.name} - ${r.name}`,
        color: r.color
      }))), o = x.value.flatMap((l) => JSON.parse(JSON.stringify(l.plots)).sort((r, i) => i.value - r.value).map((r) => r.value));
      return { head: t, body: o };
    });
    function ke() {
      je(() => {
        const t = V.value.head.map((r, i) => [[
          r.name
        ], [V.value.body[i]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value]]].concat(t), l = st(o);
        rt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-strip-plot" });
      });
    }
    const E = p(() => {
      const t = [
        e.value.table.columnNames.series,
        e.value.table.columnNames.value
      ], o = V.value.head.map((i, _) => {
        const H = X({
          p: e.value.style.chart.labels.prefix,
          v: V.value.body[_],
          s: e.value.style.chart.labels.suffix,
          r: e.value.table.td.roundingValue
        });
        return [
          {
            color: i.color,
            name: i.name
          },
          H
        ];
      }), l = {
        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
      };
      return {
        colNames: [
          e.value.table.columnNames.series,
          e.value.table.columnNames.value
        ],
        head: t,
        body: o,
        config: l
      };
    }), O = n(!1);
    function Ge(t) {
      O.value = t, ae.value += 1;
    }
    function Ue() {
      return x.value;
    }
    function xe() {
      d.value.showTable = !d.value.showTable;
    }
    function we() {
      d.value.dataLabels.show = !d.value.dataLabels.show;
    }
    function Ce() {
      d.value.showTooltip = !d.value.showTooltip;
    }
    const R = n(!1);
    function Z() {
      R.value = !R.value;
    }
    return Se({
      getData: Ue,
      generatePdf: ye,
      generateCsv: ke,
      generateImage: be,
      toggleTable: xe,
      toggleLabels: we,
      toggleTooltip: Ce,
      toggleAnnotator: Z
    }), (t, o) => (s(), u("div", {
      ref_key: "stripPlotChart",
      ref: P,
      class: F(`vue-ui-strip-plot ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
      style: B(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
      id: `strip-plot_${j.value}`,
      onMouseenter: o[2] || (o[2] = () => v(ve)(!0)),
      onMouseleave: o[3] || (o[3] = () => v(ve)(!1))
    }, [
      e.value.userOptions.buttons.annotator ? (s(), T(gt, {
        key: 0,
        parent: P.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: R.value,
        onClose: Z
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : c("", !0),
      Me.value ? (s(), u("div", {
        key: 1,
        ref_key: "noTitle",
        ref: re,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : c("", !0),
      e.value.style.chart.title.text ? (s(), u("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: oe,
        style: "width:100%;background:transparent;padding-bottom:24px"
      }, [
        (s(), T(vt, {
          key: `title_${ie.value}`,
          config: {
            title: {
              cy: "donut-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "donut-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : c("", !0),
      e.value.userOptions.show && C.value && (v(ce) || v(J)) ? (s(), T(ht, {
        ref: "details",
        key: `user_option_${ae.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: v(pe),
        isImaging: v(fe),
        uid: j.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,
        isTooltip: d.value.showTooltip,
        isFullscreen: O.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: P.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: R.value,
        onToggleFullscreen: Ge,
        onGeneratePdf: v(ye),
        onGenerateCsv: ke,
        onGenerateImage: v(be),
        onToggleTable: xe,
        onToggleLabels: we,
        onToggleTooltip: Ce,
        onToggleAnnotator: Z,
        style: B({
          visibility: v(ce) ? v(J) ? "visible" : "hidden" : "visible"
        })
      }, He({ _: 2 }, [
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: y(() => [
            f(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: y(() => [
            f(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: y(() => [
            f(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: y(() => [
            f(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: y(() => [
            f(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionLabels ? {
          name: "optionLabels",
          fn: y(() => [
            f(t.$slots, "optionLabels", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: y(({ toggleFullscreen: l, isFullscreen: r }) => [
            f(t.$slots, "optionFullscreen", M(W({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
          ]),
          key: "6"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: y(({ toggleAnnotator: l, isAnnotator: r }) => [
            f(t.$slots, "optionAnnotator", M(W({ toggleAnnotator: l, isAnnotator: r })), void 0, !0)
          ]),
          key: "7"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
      C.value ? (s(), u("svg", {
        key: 4,
        ref_key: "svgRef",
        ref: Fe,
        xmlns: v(tt),
        class: F({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
        viewBox: `0 0 ${S.value.width <= 0 ? 10 : S.value.width} ${S.value.height <= 0 ? 10 : S.value.height}`,
        style: B(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
      }, [
        $e(mt),
        t.$slots["chart-background"] ? (s(), u("foreignObject", {
          key: 0,
          x: a.value.left,
          y: a.value.top,
          width: a.value.width,
          height: a.value.height,
          style: {
            pointerEvents: "none"
          }
        }, [
          f(t.$slots, "chart-background", {}, void 0, !0)
        ], 8, _t)) : c("", !0),
        e.value.style.chart.grid.show ? (s(), u("g", Tt, [
          e.value.style.chart.grid.horizontalGrid.show ? (s(), u("g", Lt, [
            (s(!0), u(g, null, w(ge.value, (l) => (s(), u("line", {
              x1: l.x1,
              x2: l.x2,
              y1: l.y,
              y2: l.y,
              stroke: e.value.style.chart.grid.horizontalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.horizontalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.horizontalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, At))), 256))
          ])) : c("", !0),
          e.value.style.chart.grid.verticalGrid.show ? (s(), u("g", Pt, [
            (s(!0), u(g, null, w(x.value, (l, r) => (s(), u("line", {
              x1: a.value.left + (r + 1) * a.value.stripWidth,
              x2: a.value.left + (r + 1) * a.value.stripWidth,
              y1: a.value.top,
              y2: a.value.bottom,
              stroke: e.value.style.chart.grid.verticalGrid.stroke,
              "stroke-width": e.value.style.chart.grid.verticalGrid.strokeWidth,
              "stroke-dasharray": e.value.style.chart.grid.verticalGrid.strokeDasharray,
              "stroke-linecap": "round"
            }, null, 8, St))), 256))
          ])) : c("", !0),
          k("line", {
            x1: a.value.left,
            x2: a.value.left,
            y1: a.value.top,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, Ot),
          k("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: a.value.bottom,
            y2: a.value.bottom,
            stroke: e.value.style.chart.grid.stroke,
            "stroke-width": e.value.style.chart.grid.strokeWidth,
            "stroke-linecap": "round"
          }, null, 8, zt)
        ])) : c("", !0),
        e.value.style.chart.labels.yAxisLabels.show ? (s(!0), u(g, { key: 2 }, w(ge.value, (l, r) => (s(), u("text", {
          x: l.x1 - e.value.style.chart.labels.yAxisLabels.fontSize / 2 + e.value.style.chart.labels.yAxisLabels.offsetX,
          y: l.y + e.value.style.chart.labels.yAxisLabels.fontSize / 3,
          fill: e.value.style.chart.labels.yAxisLabels.color,
          "font-size": e.value.style.chart.labels.yAxisLabels.fontSize,
          "text-anchor": "end"
        }, L(v(le)(
          e.value.style.chart.labels.formatter,
          l.value,
          v(X)({
            p: e.value.style.chart.labels.prefix,
            v: l.value,
            s: e.value.style.chart.labels.suffix,
            r: e.value.style.chart.labels.yAxisLabels.rounding
          }),
          { datapoint: l, seriesIndex: r }
        )), 9, Nt))), 256)) : c("", !0),
        e.value.style.chart.labels.xAxisLabels.show ? (s(!0), u(g, { key: 3 }, w(x.value, (l, r) => (s(), u("text", {
          x: a.value.left + (r + 1) * a.value.stripWidth - a.value.stripWidth / 2,
          y: a.value.bottom + e.value.style.chart.labels.xAxisLabels.fontSize * 2 + e.value.style.chart.labels.xAxisLabels.offsetY,
          "font-size": e.value.style.chart.labels.xAxisLabels.fontSize,
          fill: e.value.style.chart.labels.xAxisLabels.color,
          "text-anchor": "middle"
        }, L(l.name), 9, Ft))), 256)) : c("", !0),
        e.value.style.chart.labels.axis.yLabel ? (s(), u("text", {
          key: 4,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          transform: `translate(${e.value.style.chart.labels.axis.fontSize + e.value.style.chart.labels.axis.yLabelOffsetX}, ${a.value.top + a.value.height / 2}) rotate(-90)`,
          "text-anchor": "middle"
        }, L(e.value.style.chart.labels.axis.yLabel), 9, Mt)) : c("", !0),
        e.value.style.chart.labels.axis.xLabel ? (s(), u("text", {
          key: 5,
          fill: e.value.style.chart.labels.axis.color,
          "font-size": e.value.style.chart.labels.axis.fontSize,
          x: a.value.left + a.value.width / 2,
          y: a.value.absoluteHeight,
          "text-anchor": "middle"
        }, L(e.value.style.chart.labels.axis.xLabel), 9, Wt)) : c("", !0),
        h.value ? (s(), u(g, { key: 6 }, [
          k("line", {
            x1: a.value.left,
            x2: a.value.right,
            y1: h.value.y,
            y2: h.value.y,
            stroke: h.value.color,
            "stroke-width": 1,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, It),
          k("circle", {
            cx: a.value.left,
            cy: h.value.y,
            r: 3,
            fill: h.value.color,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, Dt),
          k("circle", {
            cx: a.value.right,
            cy: h.value.y,
            r: 3,
            fill: h.value.color,
            class: F({ "select-circle": e.value.useCssAnimation })
          }, null, 10, Gt)
        ], 64)) : c("", !0),
        k("defs", null, [
          (s(!0), u(g, null, w(x.value, (l) => (s(), u("radialGradient", {
            id: l.id,
            fy: "30%"
          }, [
            k("stop", {
              offset: "10%",
              "stop-color": v(lt)(l.color, e.value.style.chart.plots.gradient.intensity / 100)
            }, null, 8, Vt),
            k("stop", {
              offset: "90%",
              "stop-color": v(at)(l.color, 0.1)
            }, null, 8, Et),
            k("stop", {
              offset: "100%",
              "stop-color": l.color
            }, null, 8, Rt)
          ], 8, Ut))), 256))
        ]),
        (s(!0), u(g, null, w(Ie.value, (l, r) => (s(), u(g, null, [
          (s(!0), u(g, null, w(l.plots, (i, _) => (s(), T(yt, Be({
            plot: { x: i.x, y: ue.value ? i.y : a.value.top },
            radius: h.value && h.value.id === i.id ? G.value * 1.5 : G.value,
            shape: e.value.style.chart.plots.shape,
            stroke: e.value.style.chart.plots.stroke,
            strokeWidth: e.value.style.chart.plots.strokeWidth,
            color: e.value.style.chart.plots.gradient.show ? `url(#${l.id})` : l.color,
            onMouseenter: (H) => De({ datapoint: i, seriesIndex: _ }),
            onMouseleave: o[0] || (o[0] = (H) => {
              Y.value = !1, h.value = null;
            }),
            onClick: (H) => Ne("selectDatapoint", i),
            style: `transition: all 0.2s ease-in-out; opacity:${h.value ? h.value.id === i.id ? 1 : 0.2 : e.value.style.chart.plots.opacity};${z.value ? `transition-delay:${_ * 50}ms` : ""}`,
            class: { "vue-ui-strip-plot-animated": e.value.useCssAnimation && z.value, "vue-ui-strip-plot-select-circle": e.value.useCssAnimation && !z.value },
            ref_for: !0
          }, t.$attrs), null, 16, ["plot", "radius", "shape", "stroke", "strokeWidth", "color", "onMouseenter", "onClick", "style", "class"]))), 256)),
          d.value.dataLabels.show ? (s(), u("g", Ht, [
            (s(!0), u(g, null, w(l.plots, (i, _) => (s(), u(g, null, [
              _ === l.plots.length - 1 || h.value && h.value.id === i.id && !d.value.showTooltip ? (s(), u("text", {
                key: 0,
                x: i.x,
                y: i.y + e.value.style.chart.labels.bestPlotLabel.offsetY - G.value * (h.value && h.value.id === i.id && !d.value.showTooltip ? 2 : 1.5),
                "font-size": e.value.style.chart.labels.bestPlotLabel.fontSize,
                fill: e.value.style.chart.labels.bestPlotLabel.color,
                "text-anchor": "middle",
                style: B(`opacity:${e.value.useCssAnimation && z.value ? 0 : 1};transition:opacity 0.2s ease-in;`)
              }, L(i.name) + " " + L(e.value.style.chart.labels.bestPlotLabel.showValue ? v(le)(
                e.value.style.chart.labels.formatter,
                i.value,
                v(X)({
                  p: `(${e.value.style.chart.labels.prefix}`,
                  v: i.value,
                  s: `${e.value.style.chart.labels.suffix})`,
                  r: e.value.style.chart.labels.bestPlotLabel.rounding
                }),
                { datapoint: i, seriesIndex: _ }
              ) : ""), 13, Bt)) : c("", !0)
            ], 64))), 256))
          ])) : c("", !0)
        ], 64))), 256)),
        f(t.$slots, "svg", { svg: a.value }, void 0, !0)
      ], 14, $t)) : c("", !0),
      t.$slots.watermark ? (s(), u("div", Xt, [
        f(t.$slots, "watermark", M(W({ isPrinting: v(pe) || v(fe) })), void 0, !0)
      ])) : c("", !0),
      C.value ? c("", !0) : (s(), T(ft, {
        key: 6,
        config: {
          type: "stripPlot",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            stripPlot: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      t.$slots.source ? (s(), u("div", {
        key: 7,
        ref_key: "source",
        ref: se,
        dir: "auto"
      }, [
        f(t.$slots, "source", {}, void 0, !0)
      ], 512)) : c("", !0),
      $e(dt, {
        show: d.value.showTooltip && Y.value,
        backgroundColor: e.value.style.chart.tooltip.backgroundColor,
        color: e.value.style.chart.tooltip.color,
        borderRadius: e.value.style.chart.tooltip.borderRadius,
        borderColor: e.value.style.chart.tooltip.borderColor,
        borderWidth: e.value.style.chart.tooltip.borderWidth,
        fontSize: e.value.style.chart.tooltip.fontSize,
        backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
        position: e.value.style.chart.tooltip.position,
        offsetY: e.value.style.chart.tooltip.offsetY,
        parent: P.value,
        content: q.value,
        isFullscreen: O.value,
        isCustom: v(Le)(e.value.style.chart.tooltip.customFormat)
      }, {
        "tooltip-before": y(() => [
          f(t.$slots, "tooltip-before", M(W({ ...Q.value })), void 0, !0)
        ]),
        "tooltip-after": y(() => [
          f(t.$slots, "tooltip-after", M(W({ ...Q.value })), void 0, !0)
        ]),
        _: 3
      }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
      C.value ? (s(), T(bt, {
        key: 8,
        hideDetails: "",
        config: {
          open: d.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: y(() => [
          (s(), T(pt, {
            key: `table_${ne.value}`,
            colNames: E.value.colNames,
            head: E.value.head,
            body: E.value.body,
            config: E.value.config,
            title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
            onClose: o[1] || (o[1] = (l) => d.value.showTable = !1)
          }, {
            th: y(({ th: l }) => [
              k("div", {
                innerHTML: l,
                style: { display: "flex", "align-items": "center" }
              }, null, 8, jt)
            ]),
            td: y(({ td: l }) => [
              Xe(L(l.name || l), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title"]))
        ]),
        _: 1
      }, 8, ["config"])) : c("", !0)
    ], 46, Ct));
  }
}, cl = /* @__PURE__ */ wt(Yt, [["__scopeId", "data-v-a6cdb6b5"]]);
export {
  cl as default
};
