UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

1,303 lines • 62.4 kB
import { defineAsyncComponent as L, computed as c, ref as u, shallowRef as ut, toRefs as Cl, onBeforeUnmount as ct, watch as te, nextTick as De, watchEffect as yl, createElementBlock as n, openBlock as s, unref as i, normalizeStyle as F, normalizeClass as ne, createBlock as _, createCommentVNode as v, renderSlot as g, createElementVNode as b, withCtx as d, normalizeProps as B, guardReactiveProps as E, createSlots as $e, createVNode as _e, Fragment as y, renderList as p, mergeProps as Be, toDisplayString as H, resolveDynamicComponent as Al, createTextVNode as Ee } from "vue";
import { c as Te, t as ml, k as pl, m as kl, j as ie, as as dt, V as xl, C as ht, A as wl, ah as Fl, X as Dl, x as $l, $ as _l, a as ue, d as ce, i as Bl, g as Se, l as vt, o as El, v as Tl, r as Sl, aa as Ll } from "./lib-BwysEpWI.js";
import { t as gt, u as zl } from "./useResponsive-DfdjqQps.js";
import { u as Ol, a as Le } from "./useNestedProp-OFRiX4kU.js";
import { u as Ml, B as Pl } from "./BaseScanner-BMpwQAfz.js";
import { u as Nl } from "./usePrinter-BJzHDpYF.js";
import { u as Rl } from "./useSvgExport-ByUukOZt.js";
import { u as Il } from "./useTimeLabels-DKoynYae.js";
import { u as Hl } from "./useThemeCheck-DGJ31Vi5.js";
import { u as Vl } from "./useUserOptionState-BIvW1Kz7.js";
import { u as Xl } from "./useChartAccessibility-9icAAmYg.js";
import { u as Ul } from "./useTimeLabelCollider-CIsgDrl9.js";
import jl from "./Legend-D6z73edh.js";
import Gl from "./Title-DGnfNZuO.js";
import { _ as Wl } from "./Shape-DAHhCEdg.js";
import Yl from "./img-DKigoPDs.js";
import { _ as ql } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const ft = { table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } }, style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, areas: { stroke: { color: "#1A1A1A" } }, dialog: { backgroundColor: "#1A1A1A", color: "#CCCCCC", header: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, xyChart: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", zoom: { color: "#4A4A4A", highlightColor: "#9A9A9A", minimap: { selectedColor: "#8A8A8A", lineColor: "#424242", indicatorColor: "#CCCCCC" } }, highlighter: { color: "#CCCCCC" }, timeTag: { backgroundColor: "#2A2A2A", color: "#CCCCCC", circleMarker: { color: "#2A2A2A" } }, grid: { stroke: "#5A5A5A", showVerticalLines: !1, labels: { color: "#CCCCCC", xAxisLabels: { color: "#CCCCCC" }, xAxis: { showBaseline: !1 } } }, legend: { color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } }, bar: { border: { stroke: "#1A1A1A" }, labels: { color: "#CCCCCC" }, serieName: { color: "#CCCCCC" } }, line: { labels: { color: "#CCCCCC" } }, plot: { labels: { color: "#CCCCCC" } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, selector: { stroke: "#CCCCCC", dot: { fill: "#CCCCCC", stroke: "#1A1A1A" }, labels: { color: "#CCCCCC" } }, xAxis: { labels: { color: "#CCCCCC" } }, yAxis: { labels: { color: "#CCCCCC" } }, zeroLine: { stroke: "#5A5A5A" } } } }, bt = { table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } }, style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", title: { color: "#424242", subtitle: { color: "#757575" } }, areas: { stroke: { color: "#8F837A" } }, dialog: { backgroundColor: "#FFF8E1", color: "#424242", header: { backgroundColor: "#FFF8E1", color: "#424242" }, xyChart: { chart: { backgroundColor: "#FFF8E1", color: "#424242", zoom: { color: "#5D4037", highlightColor: "#FF8A65", minimap: { selectedColor: "#FF8A65", lineColor: "#424242", indicatorColor: "#FF8A65" } }, highlighter: { color: "#424242" }, timeTag: { backgroundColor: "#424242", color: "#FFF8E1", circleMarker: { color: "#424242" } }, grid: { stroke: "#5D4037", showVerticalLines: !1, labels: { color: "#424242", xAxisLabels: { color: "#424242" }, xAxis: { showBaseline: !1 } } }, legend: { color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } }, bar: { borderRadius: 2, border: { stroke: "#FFF8E1" }, labels: { color: "#424242" }, serieName: { color: "#424242" } }, line: { labels: { color: "#424242" } }, plot: { labels: { color: "#424242" } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, selector: { stroke: "#FF8A65", dot: { fill: "#424242", stroke: "#FFF8E1" }, labels: { color: "#424242" } }, xAxis: { labels: { color: "#424242" } }, yAxis: { labels: { color: "#424242" } }, zeroLine: { stroke: "#5D4037" } } } }, Ct = { table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } }, style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, areas: { stroke: { color: "#8F837A" } }, dialog: { backgroundColor: "#1E1E1E", color: "#BDBDBD", header: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, xyChart: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", zoom: { color: "#5D4037", highlightColor: "#FF8A65", minimap: { selectedColor: "#FF8A65", lineColor: "#FF6B6B", indicatorColor: "#FF8A65" } }, highlighter: { color: "#FFF8E1" }, timeTag: { backgroundColor: "#5D4037", color: "#FFF8E1", circleMarker: { color: "#5D4037" } }, grid: { stroke: "#5D4037", showVerticalLines: !1, labels: { color: "#BDBDBD", xAxisLabels: { color: "#BDBDBD" }, xAxis: { showBaseline: !1 } } }, legend: { color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } }, bar: { borderRadius: 2, border: { stroke: "#1E1E1E" }, labels: { color: "#BDBDBD" }, serieName: { color: "#BDBDBD" } }, line: { labels: { color: "#BDBDBD" } }, plot: { labels: { color: "#BDBDBD" } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, selector: { stroke: "#FF8A65", dot: { fill: "#424242", stroke: "#1E1E1E" }, labels: { color: "#BDBDBD" } }, xAxis: { labels: { color: "#BDBDBD" } }, yAxis: { labels: { color: "#BDBDBD" } }, zeroLine: { stroke: "#5D4037" } } } }, yt = { table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } }, style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, areas: { stroke: { color: "#66CC66" } }, dialog: { backgroundColor: "#1A1A1A", color: "#99AA99", header: { backgroundColor: "#1A1A1A", color: "#99AA99" }, xyChart: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", zoom: { color: "#5F6A5F", highlightColor: "#66CC66" }, highlighter: { color: "#66CC66" }, timeTag: { backgroundColor: "#1A1A1A", color: "#66CC66", circleMarker: { color: "#66CC66" } }, grid: { stroke: "#5F6A5F", showVerticalLines: !1, labels: { color: "#99AA99", xAxisLabels: { color: "#99AA99" }, xAxis: { showBaseline: !1 } } }, legend: { color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } }, bar: { borderRadius: 0, border: { stroke: "#66CC66" }, labels: { color: "#AACCAA" }, serieName: { color: "#99CC99" } }, line: { labels: { color: "#AACCAA" } }, plot: { labels: { color: "#AACCAA" } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, selector: { stroke: "#99AA99", dot: { fill: "#4A4A4A", stroke: "#1A1A1A" }, labels: { color: "#99AA99" } }, xAxis: { labels: { color: "#99AA99" } }, yAxis: { labels: { color: "#99AA99" } }, zeroLine: { stroke: "#2A2A2A" } } } }, At = { table: { th: { backgroundColor: "#fbfafa", color: "#8A9892" }, td: { backgroundColor: "#fbfafa", color: "#8A9892" } }, style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, areas: { stroke: { color: "#8F837A" } }, dialog: { backgroundColor: "#fbfafa", color: "#8A9892", header: { backgroundColor: "#fbfafa", color: "#8A9892" }, xyChart: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", zoom: { color: "#E0CFC3", highlightColor: "#8F837A" }, highlighter: { color: "#8F837A" }, timeTag: { backgroundColor: "#fbfafa", color: "#8A9892", circleMarker: { color: "#8A9892" } }, grid: { stroke: "transparent", labels: { show: !1, color: "#99AA99", xAxisLabels: { show: !1, color: "#99AA99" }, zeroLine: { show: !1 }, yAxis: { showBaseline: !1 } } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } }, bar: { borderRadius: 4, border: { stroke: "#D7E0D2" }, labels: { color: "#8F837A" }, serieName: { color: "#858480" } }, line: { labels: { color: "#8F837A" } }, plot: { labels: { color: "#8F837A" } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } } }, legend: { backgroundColor: "#fbfafa", color: "#8A9892" }, selector: { stroke: "#8F837A", dot: { fill: "#8F837A", stroke: "#fbfafa" }, labels: { color: "#8F837A" } }, xAxis: { labels: { color: "#8F837A" } }, yAxis: { labels: { color: "#8F837A" } }, zeroLine: { stroke: "#8F837A" } } } }, mt = { table: { th: { backgroundColor: "#fbfafa", color: "#8A9892" }, td: { backgroundColor: "#fbfafa", color: "#8A9892" } }, style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", title: { color: "#50606C", subtitle: { color: "#718890" } }, areas: { stroke: { color: "#829C98" } }, dialog: { backgroundColor: "#f6f6fb", color: "#50606C", header: { backgroundColor: "#f6f6fb", color: "#50606C" }, xyChart: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", zoom: { color: "#92B0AB", highlightColor: "#50606C" }, highlighter: { color: "#7DA9B5" }, timeTag: { backgroundColor: "#f6f6fb", color: "#50606C", circleMarker: { color: "#50606C" } }, grid: { stroke: "#829C98", showVerticalLines: !0, showHorizontalLines: !0, labels: { color: "#50606C", xAxisLabels: { color: "#50606C" } } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } }, bar: { borderRadius: 2, border: { stroke: "#404C4D" }, labels: { color: "#50606C" }, serieName: { color: "#61747E" } }, line: { labels: { color: "#50606C" } }, plot: { labels: { color: "#50606C" } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } } }, legend: { backgroundColor: "#f6f6fb", color: "#50606C" }, selector: { stroke: "#7DA9B5", dot: { fill: "#7DA9B5", stroke: "#f6f6fb" }, labels: { color: "#50606C" } }, xAxis: { labels: { color: "#50606C" } }, yAxis: { labels: { color: "#50606C" } }, zeroLine: { stroke: "#829C98" } } } }, pt = {
  default: {},
  dark: ft,
  celebration: bt,
  celebrationNight: Ct,
  hack: yt,
  zen: At,
  concrete: mt
}, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  celebration: bt,
  celebrationNight: Ct,
  concrete: mt,
  dark: ft,
  default: pt,
  hack: yt,
  zen: At
}, Symbol.toStringTag, { value: "Module" })), Jl = ["id"], Kl = ["xmlns", "viewBox"], Ql = ["id"], Zl = ["stop-color"], eo = ["stop-color"], to = ["stop-color"], lo = ["stop-color"], oo = ["id"], ao = ["stop-color"], ro = ["stop-color"], so = ["stop-color"], no = ["stop-color"], io = { key: 0 }, uo = ["fill", "d"], co = ["stroke", "stroke-width", "d"], ho = ["fill", "d"], vo = ["stroke", "stroke-dasharray", "stroke-width", "d"], go = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], fo = ["cx", "cy", "stroke", "stroke-width", "r", "fill"], bo = ["x", "y", "font-size", "font-weight", "fill", "text-decoration", "onMouseenter", "onClick"], Co = { key: 0 }, yo = ["font-size", "fill", "font-weight", "transform", "text-anchor"], Ao = ["font-size", "fill", "font-weight", "transform", "text-anchor", "innerHTML"], mo = ["x", "y", "width", "height", "onMouseenter", "onMouseleave", "onClick"], po = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ko = ["cx", "cy", "stroke", "stroke-width", "r", "fill"], xo = ["x", "y", "text-anchor", "font-size", "fill"], wo = {
  key: 4,
  class: "vue-data-ui-watermark"
}, Fo = ["onClick"], Do = ["innerHTML"], $o = {
  __name: "vue-ui-ridgeline",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  emits: ["selectLegend", "selectDatapoint", "selectX"],
  setup(kt, { expose: xt, emit: wt }) {
    const Ft = L(() => import("./vue-ui-xy-COxHwrGr.js").then((t) => t.a)), Dt = L(() => import("./BaseIcon-4i3dd7Ty.js")), $t = L(() => import("./vue-ui-accordion-DUuwVsuJ.js")), _t = L(() => import("./DataTable-WrXCJkfE.js")), Bt = L(() => import("./PenAndPaper-DxIUvoQ8.js")), Et = L(() => import("./UserOptions-CzJWRC4s.js")), Tt = L(() => import("./PackageVersion-BLzm8l_I.js")), ze = L(() => import("./BaseDraggableDialog-CAJxIF6g.js")), { vue_ui_ridgeline: St } = Ol(), { isThemeValid: Lt, warnInvalidTheme: zt } = Hl(), z = kt, G = c({
      get() {
        return Array.isArray(M.value) && M.value.length > 0;
      },
      set(t) {
        return t;
      }
    }), de = wt, D = u(null), Oe = u(null), Me = u(null), T = ut(null), O = ut(null), Pe = u(null), Ne = u(null), he = u(0), Ot = u(0), ve = u(0), k = u(Te()), Re = u(0), Mt = u(0), Ie = u(512), f = u(null), V = u(null), ge = u(null), He = u(0), fe = u(null), W = u(null), be = u(null);
    function Ce() {
      const t = Le({
        userConfig: z.config,
        defaultConfig: St
      }), o = t.theme;
      if (!o) return t;
      if (!Lt.value(t))
        return zt(t), t;
      const l = Le({
        userConfig: pt[o] || z.config,
        defaultConfig: t
      }), r = Le({
        userConfig: z.config,
        defaultConfig: l
      });
      return {
        ...r,
        customPalette: r.customPalette.length ? r.customPalette : Bl[o] || ie
      };
    }
    const e = u(Ce()), { loading: Y, FINAL_DATASET: M, manualLoading: ye } = Ml({
      ...Cl(z),
      FINAL_CONFIG: e,
      prepareConfig: Ce,
      skeletonDataset: [
        {
          name: "_",
          datapoints: [
            {
              name: "__",
              color: "#999999",
              values: [28.639, 32.04, 41.134, 44.525, 21.151, 2.436, 0.218, 0.024, 2e-3, 0, 0, 0]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [13.253, 15.621, 23.36, 33.698, 29.935, 10.874, 2.364, 0.561, 0.107, 0.02, 6e-3, 4e-3]
            }
          ]
        },
        {
          name: "_",
          datapoints: [
            {
              name: "_",
              color: "#999999",
              values: [10.851, 13.195, 21.617, 36.556, 42.292, 21.006, 3.398, 0.223, 0.013, 1e-3, 0, 0]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [3.171, 4.115, 8.108, 18.248, 31.641, 29.063, 12.031, 2.742, 0.504, 0.102, 0.032, 0.021]
            }
          ]
        },
        {
          name: "_",
          datapoints: [
            {
              name: "_",
              color: "#999999",
              values: [1.731, 2.334, 5.125, 13.626, 29.911, 38.524, 24.168, 7.646, 1.575, 0.317, 0.097, 0.063]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [0.25, 0.367, 1.026, 3.944, 13.635, 28.891, 30.149, 15.419, 4.714, 1.246, 0.442, 0.299]
            }
          ]
        },
        {
          name: "_",
          datapoints: [
            {
              name: "_",
              color: "#999999",
              values: [0.034, 0.054, 0.194, 1.065, 5.747, 20.735, 38.306, 32.899, 15.318, 5.566, 2.422, 1.76]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [1e-3, 2e-3, 9e-3, 0.095, 1.124, 8.342, 27.115, 35.08, 21.449, 9.093, 4.243, 3.143]
            }
          ]
        },
        {
          name: "_",
          datapoints: [
            {
              name: "_",
              color: "#999999",
              values: [0, 1e-3, 4e-3, 0.051, 0.567, 3.322, 14.215, 44.783, 40.351, 20.377, 9.866, 7.378]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [0, 0, 0, 0, 1e-3, 0.11, 4.136, 27.498, 43.24, 29.807, 17.345, 13.678]
            }
          ]
        },
        {
          name: "_",
          datapoints: [
            {
              name: "_",
              color: "#999999",
              values: [0, 0, 0, 0, 0.025, 0.598, 3.886, 10.645, 54.479, 45.953, 30.814, 24.55]
            },
            {
              name: "_",
              color: "#CACACA",
              values: [0, 0, 0, 0, 0, 0, 7e-3, 1.655, 26.63, 52.017, 45.192, 39.651]
            }
          ]
        }
      ],
      skeletonConfig: ml({
        defaultConfig: e.value,
        userConfig: {
          userOptions: { show: !1 },
          table: { show: !1 },
          style: {
            chart: {
              backgroundColor: "#99999930",
              areas: {
                maxPoint: {
                  show: !1
                },
                opacity: 0.9,
                stroke: {
                  useSerieColor: !0
                }
              },
              legend: {
                backgroundColor: "transparent"
              },
              padding: {
                right: -24,
                left: 0
              },
              xAxis: {
                labels: {
                  values: []
                }
              },
              yAxis: {
                labels: {
                  fontSize: 0
                }
              },
              zeroLine: { show: !1 }
            }
          }
        }
      })
    }), x = u(Math.min(
      e.value.style.chart.areas.height,
      e.value.style.chart.areas.rowHeight
    )), {
      userOptionsVisible: le,
      setUserOptionsVisibility: Ve,
      keepUserOptionState: Xe
    } = Vl({ config: e.value }), { svgRef: oe } = Xl({ config: e.value.style.chart.title }), Ae = c(() => !!e.value.debug);
    function Ue() {
      const t = M.value || [];
      if (!Array.isArray(t) || t.length === 0) {
        Se({ componentName: "VueUiRidgeline", type: "dataset", debug: Ae.value }), ye.value = !0;
        return;
      }
      if (t.forEach((o, l) => {
        vt({
          datasetObject: o,
          requiredAttributes: ["name", "datapoints"]
        }).forEach((r) => {
          G.value = !1, Se({
            componentName: "VueUiRidgeline",
            type: "datasetSerieAttribute",
            property: r,
            index: l,
            debug: Ae.value
          });
        }), Array.isArray(o.datapoints) && o.datapoints.length && o.datapoints.forEach((r, a) => {
          vt({
            datasetObject: r,
            requiredAttributes: ["name", "values"]
          }).forEach((h) => {
            G.value = !1, Se({
              componentName: "VueUiRidgeline",
              type: "datasetSerieAttribute",
              property: `datapoint.${h}`,
              index: `${l}-${a}`,
              debug: Ae.value
            });
          });
        });
      }), Mt.value = t.length, x.value = Math.min(
        e.value.style.chart.areas.height,
        e.value.style.chart.areas.rowHeight
      ), El(z.dataset) || (ye.value = e.value.loading), e.value.responsive) {
        const o = gt(() => {
          const { width: l, height: r } = zl({
            chart: D.value,
            title: e.value.style.chart.title.text ? Oe.value : null,
            legend: e.value.style.chart.legend.show ? Me.value : null,
            source: Pe.value,
            noTitle: Ne.value,
            padding: e.value.style.chart.padding
          });
          requestAnimationFrame(() => {
            Ie.value = l, x.value = t.length ? r / t.length : 0, He.value = r - 12;
          });
        });
        T.value && (O.value && T.value.unobserve(O.value), T.value.disconnect()), T.value = new ResizeObserver(o), O.value = D.value?.parentNode || null, O.value && T.value.observe(O.value);
      }
    }
    ct(() => {
      T.value && (O.value && T.value.unobserve(O.value), T.value.disconnect());
    });
    const { isPrinting: je, isImaging: Ge, generatePdf: We, generateImage: Ye } = Nl({
      elementId: `vue-ui-ridgeline_${k.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-ridgeline",
      options: e.value.userOptions.print
    }), Pt = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), Nt = c(() => pl(e.value.customPalette)), P = u({
      showTable: e.value.table.show
    });
    te(
      () => M.value,
      async (t) => {
        Array.isArray(t) && t.length && (le.value = !e.value.userOptions.showOnChartHover, await De(), Ue(), he.value += 1, ve.value += 1, P.value.showTable = e.value.table.show);
      },
      { deep: !0, immediate: !0 }
    ), te(() => z.dataset, (t) => {
      Array.isArray(t) && t.length > 0 && (ye.value = !1);
    }, { deep: !0 }), te(
      () => Y.value,
      async (t) => {
        t || (await De(), Ue());
      },
      { immediate: !0 }
    ), te(
      () => z.config,
      () => {
        e.value = Ce(M.value || null), le.value = !e.value.userOptions.showOnChartHover, x.value = Math.min(e.value.style.chart.areas.height, e.value.style.chart.areas.rowHeight), P.value.showTable = e.value.table.show, he.value += 1, ve.value += 1;
      },
      { deep: !0 }
    );
    const me = c(() => e.value.style.chart.areas.height / e.value.style.chart.areas.rowHeight);
    function ae(t) {
      w.value.includes(t) ? w.value = w.value.filter((o) => o !== t) : w.value.push(t), de("selectLegend", U.value);
    }
    function qe(t) {
      if (!j.value.length)
        return e.value.debug && console.warn("VueUiRidgeline - There are no series to show."), null;
      const o = j.value.find((l) => l.name === t);
      return o || (e.value.debug && console.warn(`VueUiRidgeline - Series name not found "${t}"`), null);
    }
    function Rt(t) {
      const o = qe(t);
      o !== null && w.value.includes(o.id) && ae(o.id);
    }
    function It(t) {
      const o = qe(t);
      o !== null && (w.value.includes(o.id) || ae(o.id));
    }
    const S = c(() => G.value ? (M.value || []).map((t) => ({
      ...t,
      labelLen: Yt(t.name, e.value.style.chart.yAxis.labels.fontSize),
      uid: Te(),
      datapoints: t.datapoints.map((o, l) => {
        const r = o.color ? kl(o.color) : Nt.value[l] || ie[l] || ie[l % ie.length], a = dt(o.name);
        return { ...o, color: r, id: a };
      })
    })) : []), Je = c(() => e.value.style.chart.padding.top + x.value * (M.value || []).length + x.value * me.value + e.value.style.chart.padding.bottom), C = c(() => {
      const t = e.value.style.chart.padding;
      return {
        width: Ie.value,
        height: Je.value,
        padding: t
      };
    }), Ht = c(() => C.value.width), Vt = c(() => C.value.height), pe = u(0), Xt = gt((t) => {
      pe.value = t;
    }, 100);
    yl((t) => {
      const o = fe.value;
      if (!o) return;
      const l = new ResizeObserver((r) => {
        Xt(r[0].contentRect.height);
      });
      l.observe(o), t(() => l.disconnect());
    }), ct(() => {
      pe.value = 0;
    });
    const A = c(() => ({
      fullHeight: C.value.height + pe.value,
      top: C.value.padding.top,
      left: C.value.padding.left,
      right: C.value.width - C.value.padding.right,
      bottom: C.value.height - e.value.style.chart.padding.bottom,
      width: C.value.width - (C.value.padding.left + C.value.padding.right)
    })), q = c(() => Math.max(...S.value.flatMap((t) => t.datapoints.map((o) => o.values.length)))), J = c(() => Il({
      values: e.value.style.chart.xAxis.labels.values,
      maxDatapoints: q.value,
      formatter: e.value.style.chart.xAxis.labels.datetimeFormatter,
      start: 0,
      end: e.value.style.chart.xAxis.labels.values.length
    })), X = c(() => {
      const t = Math.max(...S.value.map((a) => a.labelLen)), o = C.value.padding.left + t + 16 + e.value.style.chart.yAxis.labels.offsetX, l = (A.value.width - o) / q.value, r = [];
      for (let a = 0; a < q.value; a += 1)
        r.push({
          selectorX: o + l * a,
          x: o + l * a - l / 2,
          y: A.value.top,
          label: e.value.style.chart.xAxis.labels.values[a] ? J.value[a].text : "",
          index: a,
          width: l,
          height: Je.value
        });
      return r;
    });
    function ke(t) {
      return S.value.map((o) => o.datapoints.map((l) => ({
        dp: l,
        selected: l.values[t.index]
      })));
    }
    function Ut(t) {
      f.value = t;
      const o = ke(t);
      e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: o, seriesIndex: t.index });
    }
    function jt(t) {
      f.value = null;
      const o = ke(t);
      e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: o, seriesIndex: t.index });
    }
    function Gt(t) {
      const o = ke(t);
      e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: o, seriesIndex: t.index }), de("selectX", o);
    }
    function Wt(t, o) {
      return t.length * o / 2 + o;
    }
    function Ke(t, o, l) {
      const r = Wt(o, l);
      return t + r > A.value.right;
    }
    function Yt(t, o, l = "sans-serif") {
      const a = document.createElement("canvas").getContext("2d"), h = typeof o == "number" ? `${o}px` : o;
      return a.font = `${h} ${l}`, a.measureText(t).width;
    }
    const U = c(() => {
      x.value;
      const t = Math.max(...S.value.map((m) => m.labelLen)), o = Math.max(...S.value.flatMap((m) => m.datapoints.flatMap((Q) => Q.values))), l = Math.min(...S.value.flatMap((m) => m.datapoints.flatMap((Q) => Q.values))), r = C.value.padding.left + t + 16 + e.value.style.chart.yAxis.labels.offsetX, a = (A.value.width - r) / q.value, h = Math.abs(Math.min(l, 0)), $ = o + h;
      function rt(m) {
        return isNaN(m / $) ? 0 : m / $;
      }
      return S.value.map((m, Q) => {
        const st = A.value.top + x.value * Q, R = A.value.top + st + x.value * me.value * (1 - rt(h));
        return {
          ...m,
          label: {
            x: r - e.value.style.chart.yAxis.labels.fontSize,
            y: R
          },
          datapoints: m.datapoints.map((Z) => {
            const I = Z.values.map((ee, hl) => {
              const vl = isNaN(ee) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(ee) ? 0 : ee || 0, gl = r + a * hl, fl = A.value.top + st + x.value * me.value * (1 - rt(vl + h)), bl = ee === Math.max(...Z.values);
              return {
                x: gl,
                y: fl,
                value: ee,
                isMaxPoint: bl,
                zero: R
              };
            }), il = `${xl(I, R, !1, !1)}`, ul = `M ${r},${R} ${ht(I)} ${I.at(-1).x},${R}`, cl = `M ${r},${R} ${I.at(-1).x},${R}`, nt = `M ${wl(I)}`, it = `M ${ht(I)}`, dl = Fl(
              e.value.style.chart.areas.smooth ? nt : it
            );
            return {
              ...Z,
              uid: Te(),
              plots: I,
              smoothPath: il,
              straightPath: ul,
              zeroPath: cl,
              pathLength: dl,
              smoothPathRidge: nt,
              straightPathRidge: it
            };
          }).filter((Z) => !w.value.includes(Z.id))
        };
      });
    }), w = u([]);
    function qt(t) {
      const o = /* @__PURE__ */ new Map();
      return t.forEach((l) => {
        l.datapoints.forEach((r, a) => {
          const h = dt(r.name);
          o.has(h) || o.set(h, {
            id: h,
            name: r.name,
            color: r.color,
            shape: "circle",
            segregate: () => ae(h),
            isSegregated: w.value.includes(h),
            opacity: w.value.includes(h) ? 0.5 : 1
          });
        });
      }), Array.from(o.values());
    }
    const j = c(() => qt(S.value)), Jt = c(() => ({
      cy: "donut-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" : ""
    })), N = u(!1);
    function Qe(t) {
      N.value = t, Re.value += 1;
    }
    const Ze = u({}), et = u([]);
    function Kt(t) {
      de("selectDatapoint", t), e.value.style.chart.dialog.show && (et.value = t.datapoints.map((o) => ({
        name: o.name,
        color: o.color,
        type: "line",
        useArea: !0,
        smooth: e.value.style.chart.areas.smooth,
        series: o.values
      })), V.value = t, Ze.value = Ll({
        ...e.value.style.chart.dialog.xyChart,
        responsive: !0,
        // Overriding 
        chart: {
          ...e.value.style.chart.dialog.xyChart.chart,
          grid: {
            ...e.value.style.chart.dialog.xyChart.chart.grid,
            labels: {
              ...e.value.style.chart.dialog.xyChart.chart.grid.labels,
              xAxisLabels: {
                ...e.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,
                values: e.value.style.chart.xAxis.labels.values,
                // Overriding
                autoRotate: {
                  enable: !0,
                  angle: e.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle
                },
                // overriding
                datetimeFormatter: e.value.style.chart.xAxis.labels.datetimeFormatter
                // Overriding
              }
            }
          },
          tooltip: {
            ...e.value.style.chart.dialog.xyChart.chart.tooltip,
            showTimeLabel: e.value.style.chart.xAxis.labels.values.length > 0
            // Overriding
          }
        }
      }), ge.value && ge.value.open());
    }
    const xe = u(null);
    function Qt(t) {
      xe.value = t;
    }
    function Zt() {
      xe.value = null;
    }
    const re = u(!1);
    function we() {
      re.value = !re.value;
    }
    function tt() {
      P.value.showTable = !P.value.showTable;
    }
    const lt = c(() => ({ body: U.value.flatMap((l) => l.datapoints.flatMap((r) => ({
      ...r,
      rowName: `${l.name}: ${r.name}`
    }))).map((l) => [
      {
        name: l.rowName,
        color: l.color
      },
      ...l.values
    ]) })), se = c(() => {
      const t = [
        e.value.table.columnNames.series,
        ...J.value.map((r) => r.text)
      ], o = {
        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,
          ...J.value.map((r) => r.text)
        ],
        head: t,
        body: lt.value.body,
        config: o
      };
    });
    function Fe(t = null) {
      De(() => {
        const o = [
          [e.value.table.columnNames.series, ...J.map((a) => [a.text])],
          ...lt.value.body.map((a, h) => [a[0].name, ...a.slice(1)])
        ], l = [
          [e.value.style.chart.title.text],
          [e.value.style.chart.title.subtitle.text]
        ].concat(o), r = Tl(l);
        t ? t(r) : Sl({
          csvContent: r,
          title: e.value.style.chart.title.text || "vue-ui-ridgeline"
        });
      });
    }
    function el() {
      return U.value;
    }
    async function tl({ scale: t = 2 } = {}) {
      if (!D.value) return;
      const { width: o, height: l } = D.value.getBoundingClientRect(), r = o / l, { imageUri: a, base64: h } = await Yl({ domElement: D.value, base64: !0, img: !0, scale: t });
      return {
        imageUri: a,
        base64: h,
        title: e.value.style.chart.title.text,
        width: o,
        height: l,
        aspectRatio: r
      };
    }
    const ll = c(() => ({ min: 0, max: q.value }));
    Ul({
      timeLabelsEls: fe,
      timeLabels: J,
      slicer: ll,
      configRef: e,
      rotationPath: ["style", "chart", "xAxis", "labels", "rotation"],
      autoRotatePath: ["style", "chart", "xAxis", "labels", "autoRotate", "enable"],
      isAutoSize: !1,
      width: Ht,
      height: Vt,
      targetClass: ".vue-ui-ridgeline-x-axis-label",
      angle: e.value.style.chart.xAxis.labels.autoRotate.angle
    });
    const K = c(() => {
      const t = e.value.table.useDialog && !e.value.table.show, o = P.value.showTable;
      return {
        component: t ? ze : $t,
        title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
        props: t ? {
          backgroundColor: e.value.table.th.backgroundColor,
          color: e.value.table.th.color,
          headerColor: e.value.table.th.color,
          headerBg: e.value.table.th.backgroundColor,
          isFullscreen: N.value,
          fullscreenParent: D.value,
          forcedWidth: Math.min(800, window.innerWidth * 0.8)
        } : {
          hideDetails: !0,
          config: {
            open: o,
            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
            }
          }
        }
      };
    });
    te(() => P.value.showTable, (t) => {
      e.value.table.show || (t && e.value.table.useDialog && W.value ? W.value.open() : "close" in W.value && W.value.close());
    });
    function ot() {
      P.value.showTable = !1, be.value && be.value.setTableIconState(!1);
    }
    const ol = c(() => e.value.style.chart.backgroundColor), al = c(() => ({
      ...e.value.style.chart.legend,
      position: "bottom"
    })), rl = c(() => e.value.style.chart.title), { exportSvg: sl, getSvg: nl } = Rl({
      svg: oe,
      title: rl,
      legend: al,
      legendItems: j,
      backgroundColor: ol
    });
    async function at({ isCb: t }) {
      if (t) {
        const { blob: o, url: l, text: r, dataUrl: a } = await nl();
        e.value.userOptions.callbacks.svg({ blob: o, url: l, text: r, dataUrl: a });
      } else
        sl();
    }
    return xt({
      getData: el,
      getImage: tl,
      generateImage: Ye,
      generateSvg: at,
      generatePdf: We,
      generateCsv: Fe,
      hideSeries: It,
      showSeries: Rt,
      toggleAnnotator: we,
      toggleTable: tt,
      toggleFullscreen: Qe
    }), (t, o) => (s(), n("div", {
      ref_key: "ridgelineChart",
      ref: D,
      class: ne(`vue-data-ui-component vue-ui-ridgeline ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      id: `vue-ui-ridgeline_${k.value}`,
      style: F({
        fontFamily: e.value.style.fontFamily,
        width: "100%",
        textAlign: "center",
        background: e.value.style.chart.backgroundColor,
        height: e.value.responsive ? "100%" : void 0
      }),
      onMouseenter: o[3] || (o[3] = () => i(Ve)(!0)),
      onMouseleave: o[4] || (o[4] = () => i(Ve)(!1))
    }, [
      e.value.userOptions.buttons.annotator && i(oe) ? (s(), _(i(Bt), {
        key: 0,
        color: e.value.style.chart.color,
        backgroundColor: e.value.style.chart.backgroundColor,
        active: re.value,
        svgRef: i(oe),
        onClose: we
      }, {
        "annotator-action-close": d(() => [
          g(t.$slots, "annotator-action-close", {}, void 0, !0)
        ]),
        "annotator-action-color": d(({ color: l }) => [
          g(t.$slots, "annotator-action-color", B(E({ color: l })), void 0, !0)
        ]),
        "annotator-action-draw": d(({ mode: l }) => [
          g(t.$slots, "annotator-action-draw", B(E({ mode: l })), void 0, !0)
        ]),
        "annotator-action-undo": d(({ disabled: l }) => [
          g(t.$slots, "annotator-action-undo", B(E({ disabled: l })), void 0, !0)
        ]),
        "annotator-action-redo": d(({ disabled: l }) => [
          g(t.$slots, "annotator-action-redo", B(E({ disabled: l })), void 0, !0)
        ]),
        "annotator-action-delete": d(({ disabled: l }) => [
          g(t.$slots, "annotator-action-delete", B(E({ disabled: l })), void 0, !0)
        ]),
        _: 3
      }, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
      g(t.$slots, "userConfig", {}, void 0, !0),
      Pt.value ? (s(), n("div", {
        key: 1,
        ref_key: "noTitle",
        ref: Ne,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : v("", !0),
      e.value.style.chart.title.text ? (s(), n("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: Oe,
        style: "width:100%;background:transparent;padding-bottom:24px"
      }, [
        (s(), _(Gl, {
          key: `title_${he.value}`,
          config: {
            title: {
              cy: "ridgeline-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "ridgeline-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, null, 8, ["config"]))
      ], 512)) : v("", !0),
      e.value.userOptions.show && G.value && (i(Xe) || i(le)) ? (s(), _(i(Et), {
        ref_key: "userOptionsRef",
        ref: be,
        key: `user_option_${Re.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isPrinting: i(je),
        isImaging: i(Ge),
        uid: k.value,
        hasTooltip: !1,
        callbacks: e.value.userOptions.callbacks,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasSvg: e.value.userOptions.buttons.svg,
        hasXls: e.value.userOptions.buttons.csv,
        hasTable: e.value.userOptions.buttons.table,
        hasLabel: !1,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: N.value,
        printScale: e.value.userOptions.print.scale,
        chartElement: D.value,
        position: e.value.userOptions.position,
        isTooltip: !1,
        titles: { ...e.value.userOptions.buttonTitles },
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: re.value,
        tableDialog: e.value.table.useDialog,
        style: F({ visibility: i(Xe) ? i(le) ? "visible" : "hidden" : "visible" }),
        onToggleFullscreen: Qe,
        onGeneratePdf: i(We),
        onGenerateCsv: Fe,
        onGenerateImage: i(Ye),
        onGenerateSvg: at,
        onToggleTable: tt,
        onToggleAnnotator: we
      }, $e({ _: 2 }, [
        t.$slots.menuIcon ? {
          name: "menuIcon",
          fn: d(({ isOpen: l, color: r }) => [
            g(t.$slots, "menuIcon", B(E({ isOpen: l, color: r })), void 0, !0)
          ]),
          key: "0"
        } : void 0,
        t.$slots.optionTooltip ? {
          name: "optionTooltip",
          fn: d(() => [
            g(t.$slots, "optionTooltip", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        t.$slots.optionPdf ? {
          name: "optionPdf",
          fn: d(() => [
            g(t.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "2"
        } : void 0,
        t.$slots.optionCsv ? {
          name: "optionCsv",
          fn: d(() => [
            g(t.$slots, "optionCsv", {}, void 0, !0)
          ]),
          key: "3"
        } : void 0,
        t.$slots.optionImg ? {
          name: "optionImg",
          fn: d(() => [
            g(t.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "4"
        } : void 0,
        t.$slots.optionSvg ? {
          name: "optionSvg",
          fn: d(() => [
            g(t.$slots, "optionSvg", {}, void 0, !0)
          ]),
          key: "5"
        } : void 0,
        t.$slots.optionTable ? {
          name: "optionTable",
          fn: d(() => [
            g(t.$slots, "optionTable", {}, void 0, !0)
          ]),
          key: "6"
        } : void 0,
        t.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: d(({ toggleFullscreen: l, isFullscreen: r }) => [
            g(t.$slots, "optionFullscreen", B(E({ toggleFullscreen: l, isFullscreen: r })), void 0, !0)
          ]),
          key: "7"
        } : void 0,
        t.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: d(({ toggleAnnotator: l, isAnnotator: r }) => [
            g(t.$slots, "optionAnnotator", B(E({ toggleAnnotator: l, isAnnotator: r })), void 0, !0)
          ]),
          key: "8"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "callbacks", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "printScale", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "tableDialog", "style", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
      (s(), n("svg", {
        ref_key: "svgRef",
        ref: oe,
        xmlns: i(Dl),
        class: ne({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
        viewBox: `0 0 ${C.value.width <= 0 ? 10 : C.value.width} ${A.value.fullHeight <= 0 ? 10 : A.value.fullHeight}`,
        style: F(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};${e.value.responsive ? `height: ${He.value}px; width: 100%;` : ""}`)
      }, [
        _e(i(Tt)),
        b("defs", null, [
          (s(!0), n(y, null, p(j.value, (l, r) => (s(), n("linearGradient", {
            id: `gradient-${l.id}-${k.value}`,
            x1: "50%",
            y1: "0%",
            x2: "50%",
            y2: "100%"
          }, [
            b("stop", {
              offset: "0%",
              "stop-color": l.color,
              "stop-opacity": "1"
            }, null, 8, Zl),
            b("stop", {
              offset: "30%",
              "stop-color": l.color,
              "stop-opacity": "0.7"
            }, null, 8, eo),
            b("stop", {
              offset: "70%",
              "stop-color": l.color,
              "stop-opacity": "0.3"
            }, null, 8, to),
            b("stop", {
              offset: "100%",
              "stop-color": l.color,
              "stop-opacity": "0.1"
            }, null, 8, lo)
          ], 8, Ql))), 256)),
          (s(!0), n(y, null, p(U.value, (l, r) => (s(), n(y, null, [
            (s(!0), n(y, null, p(l.datapoints, (a, h) => (s(), n("linearGradient", {
              key: `grad${a.id}`,
              id: `gradient-single-${k.value}-${a.uid}`,
              x1: "50%",
              y1: "0%",
              x2: "50%",
              y2: "100%"
            }, [
              b("stop", {
                offset: "0%",
                "stop-color": a.color,
                "stop-opacity": "1"
              }, null, 8, ao),
              b("stop", {
                offset: "30%",
                "stop-color": a.color,
                "stop-opacity": "0.7"
              }, null, 8, ro),
              b("stop", {
                offset: "70%",
                "stop-color": a.color,
                "stop-opacity": "0.3"
              }, null, 8, so),
              b("stop", {
                offset: "100%",
                "stop-color": a.color,
                "stop-opacity": "0.1"
              }, null, 8, no)
            ], 8, oo))), 128))
          ], 64))), 256))
        ]),
        (s(!0), n(y, null, p(U.value, (l, r) => (s(), n("g", {
          key: `ds-${r}`
        }, [
          (s(!0), n(y, null, p(l.datapoints, (a, h) => (s(), n("g", {
            key: a.id
          }, [
            t.$slots.pattern ? (s(), n("g", io, [
              b("defs", null, [
                g(t.$slots, "pattern", Be({ ref_for: !0 }, { datapointIndex: r, seriesIndex: h, patternId: `pattern_${k.value}_${a.uid}` }), void 0, !0)
              ])
            ])) : v("", !0),
            b("path", {
              fill: t.$slots.pattern ? `url(#pattern_${k.value}_${a.uid})` : e.value.style.chart.backgroundColor,
              stroke: "none",
              "stroke-linecap": "round",
              d: e.value.style.chart.areas.smooth ? a.smoothPath : a.straightPath,
              style: F({
                opacity: e.value.style.chart.areas.opacity
              })
            }, null, 12, uo),
            b("path", {
              fill: "none",
              stroke: e.value.style.chart.areas.stroke.useSerieColor ? a.color : e.value.style.chart.areas.stroke.color,
              "stroke-width": e.value.style.chart.areas.strokeWidth,
              d: e.value.style.chart.areas.smooth ? a.smoothPathRidge : a.straightPathRidge,
              "stroke-linecap": "round",
              "stroke-linejoin": "round",
              class: ne({ "vue-ui-ridgeline-animate": e.value.useCssAnimation && !i(Y) }),
              style: F({
                strokeDasharray: a.pathLength,
                strokeDashoffset: e.value.useCssAnimation ? a.pathLength : 0
              })
            }, null, 14, co),
            b("path", {
              fill: e.value.style.chart.areas.useGradient ? e.value.style.chart.areas.useCommonColor ? `url(#gradient-${a.id}-${k.value})` : `url(#gradient-single-${k.value}-${a.uid})` : a.color,
              stroke: "none",
              d: e.value.style.chart.areas.smooth ? a.smoothPath : a.straightPath,
              "stroke-linecap": "round",
              "stroke-linejoin": "round",
              class: ne({ "vue-ui-ridgeline-animate": e.value.useCssAnimation && !i(Y) }),
              style: F({
                strokeDasharray: a.pathLength,
                strokeDashoffset: e.value.useCssAnimation ? a.pathLength : 0
              })
            }, null, 14, ho),
            e.value.style.chart.zeroLine.show ? (s(), n("path", {
              key: 1,
              stroke: e.value.style.chart.zeroLine.useSerieColor ? a.color : e.value.style.chart.zeroLine.stroke,
              "stroke-dasharray": e.value.style.chart.zeroLine.strokeDasharray,
              "stroke-width": e.value.style.chart.zeroLine.strokeWidth,
              d: a.zeroPath,
              "stroke-linecap": "round"
            }, null, 8, vo)) : v("", !0),
            e.value.style.chart.areas.maxPoint.show && a.plots.length > 1 ? (s(!0), n(y, { key: 2 }, p(a.plots, ($) => (s(), n(y, null, [
              $.isMaxPoint ? (s(), n("line", {
                key: 0,
                x1: $.x,
                y1: $.y,
                x2: $.x,
                y2: $.zero,
                stroke: e.value.style.chart.areas.maxPoint.adaptStrokeToBackground ? i($l)(a.color) : e.value.style.chart.areas.maxPoint.stroke,
                "stroke-width": e.value.style.chart.areas.maxPoint.strokeWidth,
                "stroke-linecap": "round",
                "stroke-dasharray": e.value.style.chart.areas.maxPoint.strokeDasharray
              }, null, 8, go)) : v("", !0)
            ], 64))), 256)) : v("", !0),
            a.plots.length === 1 ? (s(), n("circle", {
              key: 3,
              cx: a.plots[0].x,
              cy: a.plots[0].y,
              stroke: e.value.style.chart.selector.dot.stroke,
              "stroke-width": e.value.style.chart.selector.dot.strokeWidth,
              r: e.value.style.chart.selector.dot.radius,
              fill: e.value.style.chart.selector.dot.useDatapointColor ? a.color : e.value.style.chart.selector.dot.fill,
              style: {
                pointerEvents: "none"
              }
            }, null, 8, fo)) : v("", !0)
          ]))), 128)),
          b("text", {
            x: l.label.x,
            y: l.label.y,
            "text-anchor": "end",
            "font-size": e.value.style.chart.yAxis.labels.fontSize,
            "font-weight": e.value.style.chart.yAxis.labels.bold ? "bold" : "normal",
            fill: e.value.style.chart.yAxis.labels.color,
            style: F({
              cursor: e.value.style.chart.dialog.show ? "pointer" : "default"
            }),
            "text-decoration": e.value.style.chart.dialog.show && (xe.value === r || V.value && l.uid === V.value.uid) ? "underline" : "",
            onMouseenter: (a) => Qt(r),
            onMouseleave: Zt,
            onClick: (a) => Kt(l)
          }, H(l.name), 45, bo)
        ]))), 128)),
        e.value.style.chart.xAxis.labels.values.length ? (s(), n("g", {
          key: 0,
          ref_key: "timeLabelsEls",
          ref: fe
        }, [
          (s(!0), n(y, null, p(X.value, (l, r) => g(t.$slots, "time-label", Be({ ref_for: !0 }, {
            show: l && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && !e.value.style.chart.xAxis.labels.showOnlyAtModulo || l && e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && (r === 0 || r === X.value.length - 1) || l && f.value && f.value.index === r || l && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && e.value.style.chart.xAxis.labels.showOnlyAtModulo && r % Math.floor(X.value.length / e.value.style.chart.xAxis.labels.modulo) === 0,
            fontSize: e.value.style.chart.xAxis.labels.fontSize,
            content: l.label,
            textAnchor: e.value.style.chart.xAxis.labels.rotation > 0 ? "start" : e.value.style.chart.xAxis.labels.rotation < 0 ? "end" : "middle",
            fill: e.value.style.chart.xAxis.labels.color,
            transform: `translate(${l.selectorX}, ${A.value.top + l.height + e.value.style.chart.xAxis.labels.offsetY}), rotate(${e.value.style.chart.xAxis.labels.rotation})`,
            x: l.selectorX,
            y: A.value.bottom + e.value.style.chart.xAxis.labels.offsetY
          }), () => [
            l && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && !e.value.style.chart.xAxis.labels.showOnlyAtModulo || l && e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && (r === 0 || r === X.value.length - 1) || l && f.value && f.value.index === r || l && !e.value.style.chart.xAxis.labels.showOnlyFirstAndLast && e.value.style.chart.xAxis.labels.showOnlyAtModulo && r % Math.floor(X.value.length / e.value.style.chart.xAxis.labels.modulo) === 0 ? (s(), n("g", Co, [
              String(l.label).includes(`
`) ? (s(), n("text", {
                key: 1,
                class: "vue-ui-ridgeline-x-axis-label",
                "font-size": e.value.style.chart.xAxis.labels.fontSize,
                fill: e.value.style.chart.xAxis.labels.color,
                "font-weight": e.value.style.chart.xAxis.labels.bold ? "bold" : "normal",
                transform: `translate(${l.selectorX}, ${A.value.bottom + e.value.style.chart.xAxis.labels.offsetY}), rotate(${e.value.style.chart.xAxis.labels.rotation})`,
                "text-anchor": e.value.style.chart.xAxis.labels.rotation > 0 ? "start" : e.value.style.chart.xAxis.labels.rotation < 0 ? "end" : "middle",
                style: F({
                  opacity: f.value ? f.value.index === r ? 1 : 0.2 : 1
                }),
                innerHTML: i(_l)({
                  content: String(l.label),
                  fontSize: e.value.style.chart.xAxis.labels.fontSize,
                  fill: e.value.style.chart.xAxis.labels.color,
                  x: 0,
                  y: 0
                })
              }, null, 12, Ao)) : (s(), n("text", {
                key: 0,
                class: "vue-ui-ridgeline-x-axis-label",
                "font-size": e.value.style.chart.xAxis.labels.fontSize,
                fill: e.value.style.chart.xAxis.labels.color,
                "font-weight": e.value.style.chart.xAxis.labels.bold ? "bold" : "normal",
                transform: `translate(${l.selectorX}, ${A.value.bottom + e.value.style.chart.xAxis.labels.offsetY}), rotate(${e.value.style.chart.xAxis.labels.rotation})`,
                "text-anchor": e.value.style.chart.xAxis.labels.rotation > 0 ? "start" : e.value.style.chart.xAxis.labels.rotation < 0 ? "end" : "middle",
                style: F({
                  opacity: f.value ? f.value.index === r ? 1 : 0.2 : 1
                })
              }, H(l.label), 13, yo))
            ])) : v("", !0)
          ], !0)), 256))
        ], 512)) : v("", !0),
        b("g", null, [
          (s(!0), n(y, null, p(X.value, (l, r) => (s(), n("rect", {
            x: l.x,
            y: l.y,
            width: l.width < 0 ? 0.1 : l.width,
            height: l.height < 0 ? 0.1 : l.height,
            fill: "transparent",
            onMouseenter: (a) => Ut(l),
            onMouseleave: (a) => jt(l),
            onClick: () => Gt(l)
          }, null, 40, mo))), 256)),
          e.value.style.chart.selector.show && f.value ? (s(), n("line", {
            key: 0,
            x1: f.value.selectorX,
            x2: f.value.selectorX,
            y1: f.value.y,
            y2: f.value.y + f.value.height - x.value / 2,
            stroke: e.value.style.chart.selector.stroke,
            "stroke-width": e.value.style.chart.selector.strokeWidth,
            "stroke-dasharray": e.value.style.chart.selector.strokeDasharray,
            "stroke-linecap": "round",
            style: { pointerEvents: "none" }
          }, null, 8, po)) : v("", !0),
          f.value ? (s(!0), n(y, { key: 1 }, p(U.value, (l) => (s(), n(y, null, [
            (s(!0), n(y, null, p(l.datapoints, (r) => (s(), n(y, null, [
              (s(!0), n(y, null, p(r.plots, (a, h) => (s(), n(y, null, [
                f.value && f.value.index === h ? (s(), n("circle", {
                  key: 0,
                  cx: a.x,
                  cy: a.y,
                  stroke: e.value.style.chart.selector.dot.stroke,
                  "stroke-width": e.value.style.chart.selector.dot.strokeWidth,
                  r: e.value.style.chart.selector.dot.radius,
                  fill: e.value.style.chart.selector.dot.useDatapointColor ? r.color : e.value.style.chart.selector.dot.fill,
                  style: {
                    pointerEvents: "none"
                  }
                }, null, 8, ko)) : v("", !0),
                f.value && f.value.index === h ? (s(), n("text", {
                  key: 1,
                  x: Ke(
                    a.x,
                    i(ue)(
                      e.value.style.chart.selector.labels.formatter,
                      a.value,
                      i(ce)({
                        p: e.value.style.chart.xAxis.labels.prefix,
                        v: a.value,
                        s: e.value.style.chart.xAxis.labels.suffix,
                        r: e.value.style.chart.selector.labels.rounding
                      })
                    ),
                    e.value.style.chart.selector.labels.fontSize
                  ) ? a.x - e.value.style.chart.selector.labels.fontSize / 2 : a.x + e.value.style.chart.selector.labels.fontSize / 2,
                  y: a.y + e.value.style.chart.selector.labels.fontSize / 3,
                  "text-anchor": Ke(
                    a.x,
                    i(ue)(
                      e.value.style.chart.selector.labels.formatter,
                      a.value,
                      i(ce)({
                        p: e.value.style.chart.xAxis.labels.prefix,
                        v: a.value,
                        s: e.value.style.chart.xAxis.labels.suffix,
                        r: e.value.style.chart.selector.labels.rounding
                      })
                    ),
                    e.value.style.chart.selector.labels.fontSize
                  ) ? "end" : "start",
                  "font-size": e.value.style.chart.selector.labels.fontSize,
                  fill: e.value.style.chart.selector.labels.color,
                  style: {
                    pointerEvents: "none"
                  }
                }, H(i(ue)(
                  e.value.style.chart.selector.labels.formatter,
                  a.value,
                  i(ce)({
                    p: e.value.style.chart.xAxis.labels.prefix,
                    v: a.value,
                    s: e.value.style.chart.xAxis.labels.suffix,
                    r: e.value.style.chart.selector.labels.rounding
                  })
                )), 9, xo)) : v("", !0)
              ], 64))), 256))
            ], 64))), 256))
          ], 64))), 256)) : v("", !0)
        ]),
        g(t.$slots, "svg", { svg: C.value }, void 0, !0)
      ], 14, Kl)),
      t.$slots.watermark ? (s(), n("div", wo, [
        g(t.$slots, "watermark", B(E({ isPrinting: i(je) || i(Ge) })), void 0, !0)
      ])) : v("", !0),
      b("div", {
        ref_key: "chartLegend",
        ref: Me
      }, [
        e.value.style.chart.legend.show ? (s(), _(jl, {
          key: `legend_${ve.value}`,
          legendSet: j.value,
          config: Jt.value,
          onClickMarker: o[0] || (o[0] = ({ legend: l }) => ae(l.id))
        }, $e({
          item: d(({ legend: l }) => [
            i(Y) ? v("", !0) : (s(), n("div", {
              key: 0,
              style: F(`opacity:${w.value.includes(l.id) ? 0.5 : 1}`),
              onClick: (r) => l.segregate()
            }, H(l.name), 13, Fo))
          ]),
          _: 2
        }, [
          t.$slots.pattern ? {
            name: "legend-pattern",
            fn: d(({ legend: l, index: r }) => [
              _e(Wl, {
                shape: l.shape,
                radius: 30,
                stroke: "none",
                plot: { x: 30, y: 30 },
                fill: `url(#pattern_${k.value}_${r})`
              }, null, 8, ["shape", "fill"])
            ]),
            key: "0"
          } : void 0
        ]), 1032, ["legendSet", "config"])) : v("", !0),
        g(t.$slots, "legend", { legend: j.value }, void 0, !0)
      ], 512),
      t.$slots.source ? (s(), n("div", {
        key: 5,
        ref_key: "source",
        ref: Pe,
        dir: "auto"
      }, [
        g(t.$slots, "source", {}, void 0, !0)
      ], 512)) : v("", !0),
      G.value && e.value.userOptions.buttons.table ? (s(), _(Al(K.value.component), Be({ key: 6 }, K.value.props, {
        ref_key: "tableUnit",
        ref: W,
        onClose: ot
      }), $e({
        content: d(() => [
          (s(), _(i(_t), {
            key: `table_${Ot.value}`,
            colNames: se.value.colNames,
            head: se.value.head,
            body: se.value.body,
            config: se.value.config,
            title: e.value.table.useDialog ? "" : K.value.title,
            withCloseButton: !e.value.table.useDialog,
            onClose: ot
          }, {
            th: d(({ th: l }) => [
              b("div", { innerHTML: l }, null, 8, Do)
            ]),
            td: d(({ td: l }) => [
              Ee(H(l.name ? l.name : i(ue)(
                e.value.style.chart.selector.labels.formatter,
                l,
                i(ce)({
                  p: e.value.style.chart.xAxis.labels.prefix,
                  v: l,
                  s: e.value.style.chart.xAxis.labels.suffix,
                  r: e.value.table.td.roundingValue
                })
              )), 1)
            ]),
            _: 1
          }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
        ]),
        _: 2
      }, [
        e.value.table.useDialog ? {
          name: "title",
          fn: d(() => [
            Ee(H(K.value.title), 1)
          ]),
          key: "0"
        } : void 0,
        e.value.table.useDialog ? {
          name: "actions",
          fn: d(() => [
            b("button", {
              tabindex: "0",
              class: "vue-ui-user-options-button",
              onClick: o[1] || (o[1] = (l) => Fe(e.value.userOptions.callbacks.csv))
            }, [
              _e(i(Dt), {
                name: "excel",
                stroke: K.value.props.color
              }, null, 8, ["stroke"])
            ])
          ]),
          key: "1"
        } : void 0
      ]), 1040)) : v("", !0),
      e.value.style.chart.dialog.show ? (s(), _(i(ze), {
        key: 7,
        ref_key: "dialog",
        ref: ge,
        onClose: o[2] || (o[2] = (l) => V.value = null),
        backgroundColor: e.value.style.chart.dialog.backgroundColor,
        color: e.value.style.chart.dialog.color,
        headerBg: e.value.style.chart.dialog.header.backgroundColor,
        headerColor: e.value.style.chart.dialog.header.color,
        isFullscreen: N.value,
        fullscreenParent: D.value,
        withPadding: ""
      }, {
        title: d(() => [
          Ee(H(V.value.name), 1)
        ]),
        content: d(() => [
          V.value ? (s(), _(i(Ft), {
            key: 0,
            config: Ze.value,
            dataset: et.value
          }, null, 8, ["config", "dataset"])) : v("", !0)
        ]),
        _: 1
      }, 8, ["backgroundColor", "color", "headerBg", "headerColor", "isFullscreen", "fullscreenParent"])) : v("", !0),
      i(Y) ? (s(), _(Pl, { key: 8 })) : v("", !0)
    ], 46, Jl));
  }
}, _o = /* @__PURE__ */ ql($o, [["__scopeId", "data-v-e547ab5e"]]), Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: _o
}, Symbol.toStringTag, { value: "Module" }));
export {
  Go as a,
  Wo as b,
  _o as v
};