import { g as Bt } from "./index-KdycyCO9.js";
function Gt(U, q) {
  for (var k = 0; k < q.length; k++) {
    const F = q[k];
    if (typeof F != "string" && !Array.isArray(F)) {
      for (const R in F)
        if (R !== "default" && !(R in U)) {
          const N = Object.getOwnPropertyDescriptor(F, R);
          N && Object.defineProperty(U, R, N.get ? N : {
            enumerable: !0,
            get: () => F[R]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(U, Symbol.toStringTag, { value: "Module" }));
}
var $ = { exports: {} }, Vt = $.exports, st;
function $t() {
  return st || (st = 1, function(U, q) {
    /**
    * Highcharts JS v12.3.0 (2025-06-21)
    * @module highcharts/modules/exporting
    * @requires highcharts
    *
    * Exporting module
    *
    * (c) 2010-2025 Torstein Honsi
    *
    * License: www.highcharts.com/license
    */
    (function(k, F) {
      U.exports = F(k._Highcharts, k._Highcharts.AST, k._Highcharts.Chart);
    })(typeof window > "u" ? Vt : window, (k, F, R) => (() => {
      var N, W, ct = { 660: (a) => {
        a.exports = F;
      }, 944: (a) => {
        a.exports = k;
      }, 960: (a) => {
        a.exports = R;
      } }, Y = {};
      function w(a) {
        var t = Y[a];
        if (t !== void 0) return t.exports;
        var e = Y[a] = { exports: {} };
        return ct[a](e, e.exports, w), e.exports;
      }
      w.n = (a) => {
        var t = a && a.__esModule ? () => a.default : () => a;
        return w.d(t, { a: t }), t;
      }, w.d = (a, t) => {
        for (var e in t) w.o(t, e) && !w.o(a, e) && Object.defineProperty(a, e, { enumerable: !0, get: t[e] });
      }, w.o = (a, t) => Object.prototype.hasOwnProperty.call(a, t);
      var Z = {};
      w.d(Z, { default: () => It });
      var pt = w(944), E = w.n(pt), dt = w(660), G = w.n(dt), ut = w(960), ht = w.n(ut);
      (function(a) {
        a.compose = function(e) {
          return e.navigation || (e.navigation = new t(e)), e;
        };
        class t {
          constructor(o) {
            this.updates = [], this.chart = o;
          }
          addUpdate(o) {
            this.chart.navigation.updates.push(o);
          }
          update(o, n) {
            this.updates.forEach((i) => {
              i.call(this.chart, o, n);
            });
          }
        }
        a.Additions = t;
      })(N || (N = {}));
      let gt = N, { isSafari: ft, win: S, win: { document: j } } = E(), { error: mt } = E(), Q = S.URL || S.webkitURL || S;
      function xt(a) {
        let t = a.replace(/filename=.*;/, "").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
        if (t && t.length > 3 && S.atob && S.ArrayBuffer && S.Uint8Array && S.Blob && Q.createObjectURL) {
          let e = S.atob(t[3]), o = new S.ArrayBuffer(e.length), n = new S.Uint8Array(o);
          for (let i = 0; i < n.length; ++i) n[i] = e.charCodeAt(i);
          return Q.createObjectURL(new S.Blob([n], { type: t[1] }));
        }
      }
      let { isTouchDevice: yt } = E(), bt = { exporting: { allowTableSorting: !0, libURL: "https://code.highcharts.com/12.3.0/lib/", local: !0, type: "image/png", url: `https://export-svg.highcharts.com?v=${E().version}`, pdfFont: { normal: void 0, bold: void 0, bolditalic: void 0, italic: void 0 }, printMaxWidth: 780, scale: 2, buttons: { contextButton: { className: "highcharts-contextbutton", menuClassName: "highcharts-contextmenu", symbol: "menu", titleKey: "contextButtonTitle", menuItems: ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"] } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
        this.fullscreen?.toggle();
      } }, printChart: { textKey: "printChart", onclick: function() {
        this.exporting?.print();
      } }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: async function() {
        await this.exporting?.exportChart();
      } }, downloadJPEG: { textKey: "downloadJPEG", onclick: async function() {
        await this.exporting?.exportChart({ type: "image/jpeg" });
      } }, downloadPDF: { textKey: "downloadPDF", onclick: async function() {
        await this.exporting?.exportChart({ type: "application/pdf" });
      } }, downloadSVG: { textKey: "downloadSVG", onclick: async function() {
        await this.exporting?.exportChart({ type: "image/svg+xml" });
      } } } }, lang: { viewFullscreen: "View in full screen", exitFullscreen: "Exit from full screen", printChart: "Print chart", downloadPNG: "Download PNG image", downloadJPEG: "Download JPEG image", downloadPDF: "Download PDF document", downloadSVG: "Download SVG vector image", contextButtonTitle: "Chart context menu" }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 14.5, symbolY: 13.5, align: "right", buttonSpacing: 5, height: 28, y: -5, verticalAlign: "top", width: 28, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { fill: "#ffffff", padding: 5, stroke: "none", "stroke-linecap": "round" } }, menuStyle: { border: "none", borderRadius: "3px", background: "#ffffff", padding: "0.5em" }, menuItemStyle: { background: "none", borderRadius: "3px", color: "#333333", padding: "0.5em", fontSize: yt ? "0.9em" : "0.8em", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: { background: "#f2f2f2" } } };
      (function(a) {
        let t = [];
        function e(n, i, r, c) {
          return [["M", n, i + 2.5], ["L", n + r, i + 2.5], ["M", n, i + c / 2 + 0.5], ["L", n + r, i + c / 2 + 0.5], ["M", n, i + c - 1.5], ["L", n + r, i + c - 1.5]];
        }
        function o(n, i, r, c) {
          let s = c / 3 - 2;
          return [].concat(this.circle(r - s, i, s, s), this.circle(r - s, i + s + 4, s, s), this.circle(r - s, i + 2 * (s + 4), s, s));
        }
        a.compose = function(n) {
          if (t.indexOf(n) === -1) {
            t.push(n);
            let i = n.prototype.symbols;
            i.menu = e, i.menuball = o.bind(i);
          }
        };
      })(W || (W = {}));
      let vt = W, { composed: wt } = E(), { addEvent: z, fireEvent: _, pushUnique: St } = E();
      function Et() {
        this.fullscreen = new tt(this);
      }
      class tt {
        static compose(t) {
          St(wt, "Fullscreen") && z(t, "beforeRender", Et);
        }
        constructor(t) {
          this.chart = t, this.isOpen = !1;
          let e = t.renderTo;
          !this.browserProps && (typeof e.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : e.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : e.webkitRequestFullScreen ? this.browserProps = { fullscreenChange: "webkitfullscreenchange", requestFullscreen: "webkitRequestFullScreen", exitFullscreen: "webkitExitFullscreen" } : e.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
        }
        close() {
          let t = this, e = t.chart, o = e.options.chart;
          _(e, "fullscreenClose", null, function() {
            t.isOpen && t.browserProps && e.container.ownerDocument instanceof Document && e.container.ownerDocument[t.browserProps.exitFullscreen](), t.unbindFullscreenEvent && (t.unbindFullscreenEvent = t.unbindFullscreenEvent()), e.setSize(t.origWidth, t.origHeight, !1), t.origWidth = void 0, t.origHeight = void 0, o.width = t.origWidthOption, o.height = t.origHeightOption, t.origWidthOption = void 0, t.origHeightOption = void 0, t.isOpen = !1, t.setButtonText();
          });
        }
        open() {
          let t = this, e = t.chart, o = e.options.chart;
          _(e, "fullscreenOpen", null, function() {
            if (o && (t.origWidthOption = o.width, t.origHeightOption = o.height), t.origWidth = e.chartWidth, t.origHeight = e.chartHeight, t.browserProps) {
              let n = z(e.container.ownerDocument, t.browserProps.fullscreenChange, function() {
                t.isOpen ? (t.isOpen = !1, t.close()) : (e.setSize(null, null, !1), t.isOpen = !0, t.setButtonText());
              }), i = z(e, "destroy", n);
              t.unbindFullscreenEvent = () => {
                n(), i();
              };
              let r = e.renderTo[t.browserProps.requestFullscreen]();
              r && r.catch(function() {
                alert("Full screen is not supported inside a frame.");
              });
            }
          });
        }
        setButtonText() {
          let t = this.chart, e = t.exporting?.divElements, o = t.options.exporting, n = o && o.buttons && o.buttons.contextButton.menuItems, i = t.options.lang;
          if (o && o.menuItemDefinitions && i && i.exitFullscreen && i.viewFullscreen && n && e) {
            let r = e[n.indexOf("viewFullscreen")];
            r && G().setElementHTML(r, this.isOpen ? i.exitFullscreen : o.menuItemDefinitions.viewFullscreen.text || i.viewFullscreen);
          }
        }
        toggle() {
          this.isOpen ? this.close() : this.open();
        }
      }
      let { win: et } = E(), { discardElement: Ot, objectEach: nt } = E(), K = { ajax: function(a) {
        let t = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" }, e = new XMLHttpRequest();
        function o(n, i) {
          a.error && a.error(n, i);
        }
        if (!a.url) return !1;
        e.open((a.type || "get").toUpperCase(), a.url, !0), a.headers?.["Content-Type"] || e.setRequestHeader("Content-Type", t[a.dataType || "json"] || t.text), nt(a.headers, function(n, i) {
          e.setRequestHeader(i, n);
        }), a.responseType && (e.responseType = a.responseType), e.onreadystatechange = function() {
          let n;
          if (e.readyState === 4) {
            if (e.status === 200) {
              if (a.responseType !== "blob" && (n = e.responseText, a.dataType === "json")) try {
                n = JSON.parse(n);
              } catch (i) {
                if (i instanceof Error) return o(e, i);
              }
              return a.success?.(n, e);
            }
            o(e, e.responseText);
          }
        }, a.data && typeof a.data != "string" && (a.data = JSON.stringify(a.data)), e.send(a.data);
      }, getJSON: function(a, t) {
        K.ajax({ url: a, success: t, dataType: "json", headers: { "Content-Type": "text/plain" } });
      }, post: async function(a, t, e) {
        let o = new et.FormData();
        nt(t, function(i, r) {
          o.append(r, i);
        }), o.append("b64", "true");
        let n = await et.fetch(a, { method: "POST", body: o, ...e });
        if (n.ok) {
          let i = await n.text(), r = document.createElement("a");
          r.href = `data:${t.type};base64,${i}`, r.download = t.filename, r.click(), Ot(r);
        }
      } }, { defaultOptions: Ct, setOptions: Tt } = E(), { downloadURL: J, getScript: kt } = { downloadURL: function(a, t) {
        let e = S.navigator, o = j.createElement("a");
        if (typeof a != "string" && !(a instanceof String) && e.msSaveOrOpenBlob) return void e.msSaveOrOpenBlob(a, t);
        if (a = "" + a, e.userAgent.length > 1e3) throw Error("Input too long");
        let n = /Edge\/\d+/.test(e.userAgent);
        if ((ft && typeof a == "string" && a.indexOf("data:application/pdf") === 0 || n || a.length > 2e6) && !(a = xt(a) || "")) throw Error("Failed to convert to blob");
        if (o.download !== void 0) o.href = a, o.download = t, j.body.appendChild(o), o.click(), j.body.removeChild(o);
        else try {
          if (!S.open(a, "chart")) throw Error("Failed to open window");
        } catch {
          S.location.href = a;
        }
      }, getScript: function(a) {
        return new Promise((t, e) => {
          let o = j.getElementsByTagName("head")[0], n = j.createElement("script");
          n.type = "text/javascript", n.src = a, n.onload = () => {
            t();
          }, n.onerror = () => {
            e(mt(`Error loading script ${a}`));
          }, o.appendChild(n);
        });
      } }, { composed: Ft, doc: D, isFirefox: Pt, isMS: I, isSafari: V, SVG_NS: Rt, win: b } = E(), { addEvent: P, clearTimeout: X, createElement: A, css: O, discardElement: it, error: Nt, extend: L, find: Lt, fireEvent: H, isObject: Mt, merge: C, objectEach: Dt, pick: B, pushUnique: At, removeEvent: Ht, splat: Ut, uniqueKey: jt } = E();
      G().allowedAttributes.push("data-z-index", "fill-opacity", "filter", "preserveAspectRatio", "rx", "ry", "stroke-dasharray", "stroke-linejoin", "stroke-opacity", "text-anchor", "transform", "transform-origin", "version", "viewBox", "visibility", "xmlns", "xmlns:xlink"), G().allowedTags.push("desc", "clippath", "fedropshadow", "femorphology", "g", "image");
      let ot = b.URL || b.webkitURL || b;
      class h {
        constructor(t, e) {
          this.options = {}, this.chart = t, this.options = e, this.btnCount = 0, this.buttonOffset = 0, this.divElements = [], this.svgElements = [];
        }
        static hyphenate(t) {
          return t.replace(/[A-Z]/g, function(e) {
            return "-" + e.toLowerCase();
          });
        }
        static async imageToDataURL(t, e, o) {
          let n = await h.loadImage(t), i = D.createElement("canvas"), r = i?.getContext("2d");
          if (r) return i.height = n.height * e, i.width = n.width * e, r.drawImage(n, 0, 0, i.width, i.height), i.toDataURL(o);
          throw Error("No canvas found!");
        }
        static loadImage(t) {
          return new Promise((e, o) => {
            let n = new b.Image();
            n.crossOrigin = "Anonymous", n.onload = () => {
              setTimeout(() => {
                e(n);
              }, h.loadEventDeferDelay);
            }, n.onerror = (i) => {
              o(i);
            }, n.src = t;
          });
        }
        static prepareImageOptions(t) {
          let e = t?.type || "image/png", o = t?.libURL || Ct.exporting?.libURL;
          return { type: e, filename: (t?.filename || "chart") + "." + (e === "image/svg+xml" ? "svg" : e.split("/")[1]), scale: t?.scale || 1, libURL: o?.slice(-1) !== "/" ? o + "/" : o };
        }
        static sanitizeSVG(t, e) {
          let o = t.indexOf("</svg>") + 6, n = t.indexOf("<foreignObject") > -1, i = t.substr(o);
          return t = t.substr(0, o), n ? t = t.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />") : i && e?.exporting?.allowHTML && (i = '<foreignObject x="0" y="0" width="' + e.chart.width + '" height="' + e.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + i.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />") + "</body></foreignObject>", t = t.replace("</svg>", i + "</svg>")), t = t.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery\d+="[^"]+"/g, "").replace(/url\(("|&quot;)(.*?)("|&quot;)\;?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g, " xlink:href=").replace(/\n+/g, " ").replace(/&nbsp;/g, " ").replace(/&shy;/g, "­");
        }
        static svgToDataURL(t) {
          let e = b.navigator.userAgent, o = e.indexOf("WebKit") > -1 && 0 > e.indexOf("Chrome");
          try {
            if (!o && t.indexOf("<foreignObject") === -1) return ot.createObjectURL(new b.Blob([t], { type: "image/svg+xml;charset-utf-16" }));
          } catch {
          }
          return "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(t);
        }
        addButton(t) {
          let e, o = this, n = o.chart, i = n.renderer, r = C(n.options.navigation?.buttonOptions, t), c = r.onclick, s = r.menuItems, l = r.symbolSize || 12;
          if (r.enabled === !1 || !r.theme) return;
          let f = n.styledMode ? {} : r.theme, m = () => {
          };
          c ? m = function(p) {
            p && p.stopPropagation(), c.call(n, p);
          } : s && (m = function(p) {
            p && p.stopPropagation(), o.contextMenu(d.menuClassName, s, d.translateX || 0, d.translateY || 0, d.width || 0, d.height || 0, d), d.setState(2);
          }), r.text && r.symbol ? f.paddingLeft = B(f.paddingLeft, 30) : r.text || L(f, { width: r.width, height: r.height, padding: 0 });
          let d = i.button(r.text || "", 0, 0, m, f, void 0, void 0, void 0, void 0, r.useHTML).addClass(t.className || "").attr({ title: B(n.options.lang[r._titleKey || r.titleKey], "") });
          d.menuClassName = t.menuClassName || "highcharts-menu-" + o.btnCount++, r.symbol && (e = i.symbol(r.symbol, Math.round((r.symbolX || 0) - l / 2), Math.round((r.symbolY || 0) - l / 2), l, l, { width: l, height: l }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(d), n.styledMode || e.attr({ stroke: r.symbolStroke, fill: r.symbolFill, "stroke-width": r.symbolStrokeWidth || 1 })), d.add(o.group).align(L(r, { width: d.width, x: B(r.x, o.buttonOffset) }), !0, "spacingBox"), o.buttonOffset += ((d.width || 0) + (r.buttonSpacing || 0)) * (r.align === "right" ? -1 : 1), o.svgElements.push(d, e);
        }
        afterPrint() {
          let t = this.chart;
          if (!this.printReverseInfo) return;
          let { childNodes: e, origDisplay: o, resetParams: n } = this.printReverseInfo;
          this.moveContainers(t.renderTo), [].forEach.call(e, function(i, r) {
            i.nodeType === 1 && (i.style.display = o[r] || "");
          }), this.isPrinting = !1, n && t.setSize.apply(t, n), delete this.printReverseInfo, h.printingChart = void 0, H(t, "afterPrint");
        }
        beforePrint() {
          let t = this.chart, e = D.body, o = this.options.printMaxWidth, n = { childNodes: e.childNodes, origDisplay: [], resetParams: void 0 };
          this.isPrinting = !0, t.pointer?.reset(void 0, 0), H(t, "beforePrint"), o && t.chartWidth > o && (n.resetParams = [t.options.chart.width, void 0, !1], t.setSize(o, void 0, !1)), [].forEach.call(n.childNodes, function(i, r) {
            i.nodeType === 1 && (n.origDisplay[r] = i.style.display, i.style.display = "none");
          }), this.moveContainers(e), this.printReverseInfo = n;
        }
        contextMenu(t, e, o, n, i, r, c) {
          let s = this, l = s.chart, f = l.options.navigation, m = l.chartWidth, d = l.chartHeight, p = "cache-" + t, y = Math.max(i, r), v, g = l[p];
          g || (s.contextMenuEl = l[p] = g = A("div", { className: t }, { position: "absolute", zIndex: 1e3, padding: y + "px", pointerEvents: "auto", ...l.renderer.style }, l.scrollablePlotArea?.fixedDiv || l.container), v = A("ul", { className: "highcharts-menu" }, l.styledMode ? {} : { listStyle: "none", margin: 0, padding: 0 }, g), l.styledMode || O(v, L({ MozBoxShadow: "3px 3px 10px #0008", WebkitBoxShadow: "3px 3px 10px #0008", boxShadow: "3px 3px 10px #0008" }, f?.menuStyle || {})), g.hideMenu = function() {
            O(g, { display: "none" }), c && c.setState(0), l.exporting && (l.exporting.openMenu = !1), O(l.renderTo, { overflow: "hidden" }), O(l.container, { overflow: "hidden" }), X(g.hideTimer), H(l, "exportMenuHidden");
          }, s.events?.push(P(g, "mouseleave", function() {
            g.hideTimer = b.setTimeout(g.hideMenu, 500);
          }), P(g, "mouseenter", function() {
            X(g.hideTimer);
          }), P(D, "mouseup", function(u) {
            l.pointer?.inClass(u.target, t) || g.hideMenu();
          }), P(g, "click", function() {
            l.exporting?.openMenu && g.hideMenu();
          })), e.forEach(function(u) {
            if (typeof u == "string" && s.options.menuItemDefinitions?.[u] && (u = s.options.menuItemDefinitions[u]), Mt(u, !0)) {
              let M;
              u.separator ? M = A("hr", void 0, void 0, v) : (u.textKey === "viewData" && s.isDataTableVisible && (u.textKey = "hideData"), M = A("li", { className: "highcharts-menu-item", onclick: function(at) {
                at && at.stopPropagation(), g.hideMenu(), typeof u != "string" && u.onclick && u.onclick.apply(l, arguments);
              } }, void 0, v), G().setElementHTML(M, u.text || l.options.lang[u.textKey]), l.styledMode || (M.onmouseover = function() {
                O(this, f?.menuItemHoverStyle || {});
              }, M.onmouseout = function() {
                O(this, f?.menuItemStyle || {});
              }, O(M, L({ cursor: "pointer" }, f?.menuItemStyle || {})))), s.divElements.push(M);
            }
          }), s.divElements.push(v, g), s.menuHeight = g.offsetHeight, s.menuWidth = g.offsetWidth);
          let x = { display: "block" };
          o + (s.menuWidth || 0) > m ? x.right = m - o - i - y + "px" : x.left = o - y + "px", n + r + (s.menuHeight || 0) > d && c.alignOptions?.verticalAlign !== "top" ? x.bottom = d - n - y + "px" : x.top = n + r - y + "px", O(g, x), O(l.renderTo, { overflow: "" }), O(l.container, { overflow: "" }), l.exporting && (l.exporting.openMenu = !0), H(l, "exportMenuShown");
        }
        destroy(t) {
          let e, o = t ? t.target : this.chart, { divElements: n, events: i, svgElements: r } = this;
          r.forEach((c, s) => {
            c && (c.onclick = c.ontouchstart = null, o[e = "cache-" + c.menuClassName] && delete o[e], r[s] = c.destroy());
          }), r.length = 0, this.group && (this.group.destroy(), delete this.group), n.forEach(function(c, s) {
            c && (X(c.hideTimer), Ht(c, "mouseleave"), n[s] = c.onmouseout = c.onmouseover = c.ontouchstart = c.onclick = null, it(c));
          }), n.length = 0, i && (i.forEach(function(c) {
            c();
          }), i.length = 0);
        }
        async downloadSVG(t, e) {
          let o, n = { svg: t, exportingOptions: e, exporting: this };
          if (H(h.prototype, "downloadSVG", n), n.defaultPrevented) return;
          let { type: i, filename: r, scale: c, libURL: s } = h.prepareImageOptions(e);
          if (i === "application/pdf") throw Error("Offline exporting logic for PDF type is not found.");
          if (i === "image/svg+xml") {
            if (b.MSBlobBuilder !== void 0) {
              let l = new b.MSBlobBuilder();
              l.append(t), o = l.getBlob("image/svg+xml");
            } else o = h.svgToDataURL(t);
            J(o, r);
          } else {
            o = h.svgToDataURL(t);
            try {
              h.objectURLRevoke = !0;
              let l = await h.imageToDataURL(o, c, i);
              J(l, r);
            } catch (l) {
              if (l.message === "No canvas found!") throw l;
              if (t.length > 1e8) throw Error("Input too long");
              let f = D.createElement("canvas"), m = f.getContext("2d"), d = t.match(/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), p = t.match(/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
              if (m && d && p) {
                let y = d[1] * c, v = p[1] * c;
                f.width = y, f.height = v, b.canvg || (h.objectURLRevoke = !0, await kt(s + "canvg.js")), b.canvg.Canvg.fromString(m, t).start(), J(b.navigator.msSaveOrOpenBlob ? f.msToBlob() : f.toDataURL(i), r);
              }
            } finally {
              if (h.objectURLRevoke) try {
                ot.revokeObjectURL(o);
              } catch {
              }
            }
          }
        }
        async exportChart(t, e) {
          if ((t = C(this.options, t)).local) await this.localExport(t, e || {});
          else {
            let o = this.getSVGForExport(t, e);
            t.url && await K.post(t.url, { filename: t.filename ? t.filename.replace(/\//g, "-") : this.getFilename(), type: t.type, width: t.width, scale: t.scale, svg: o }, t.fetchOptions);
          }
        }
        async fallbackToServer(t, e) {
          t.fallbackToExportServer === !1 ? t.error ? t.error(t, e) : Nt(28, !0) : t.type === "application/pdf" && (t.local = !1, await this.exportChart(t));
        }
        getChartHTML(t) {
          let e = this.chart;
          return t && this.inlineStyles(), this.resolveCSSVariables(), e.container.innerHTML;
        }
        getFilename() {
          let t = this.chart.userOptions.title?.text, e = this.options.filename;
          return e ? e.replace(/\//g, "-") : (typeof t == "string" && (e = t.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(/[^a-z\d\-]/g, "").replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!e || e.length < 5) && (e = "chart"), e);
        }
        getSVG(t) {
          let e = this.chart, o, n, i = C(e.options, t);
          i.plotOptions = C(e.userOptions.plotOptions, t?.plotOptions), i.time = C(e.userOptions.time, t?.time);
          let r = A("div", void 0, { position: "absolute", top: "-9999em", width: e.chartWidth + "px", height: e.chartHeight + "px" }, D.body), c = e.renderTo.style.width, s = e.renderTo.style.height, l = i.exporting?.sourceWidth || i.chart.width || /px$/.test(c) && parseInt(c, 10) || (i.isGantt ? 800 : 600), f = i.exporting?.sourceHeight || i.chart.height || /px$/.test(s) && parseInt(s, 10) || 400;
          L(i.chart, { animation: !1, renderTo: r, forExport: !0, renderer: "SVGRenderer", width: l, height: f }), i.exporting && (i.exporting.enabled = !1), delete i.data, i.series = [], e.series.forEach(function(p) {
            (n = C(p.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: p.visible })).isInternal || i?.series?.push(n);
          });
          let m = {};
          e.axes.forEach(function(p) {
            p.userOptions.internalKey || (p.userOptions.internalKey = jt()), i && !p.options.isInternal && (m[p.coll] || (m[p.coll] = !0, i[p.coll] = []), i[p.coll].push(C(p.userOptions, { visible: p.visible, type: p.type, uniqueNames: p.uniqueNames })));
          }), i.colorAxis = e.userOptions.colorAxis;
          let d = new e.constructor(i, e.callback);
          return t && ["xAxis", "yAxis", "series"].forEach(function(p) {
            t[p] && d.update({ [p]: t[p] });
          }), e.axes.forEach(function(p) {
            let y = Lt(d.axes, (v) => v.options.internalKey === p.userOptions.internalKey);
            if (y) {
              let v = p.getExtremes(), g = Ut(t?.[p.coll] || {})[0], x = "min" in g ? g.min : v.userMin, u = "max" in g ? g.max : v.userMax;
              (x !== void 0 && x !== y.min || u !== void 0 && u !== y.max) && y.setExtremes(x ?? void 0, u ?? void 0, !0, !1);
            }
          }), o = d.exporting?.getChartHTML(e.styledMode || i.exporting?.applyStyleSheets) || "", H(e, "getSVG", { chartCopy: d }), o = h.sanitizeSVG(o, i), i = void 0, d.destroy(), it(r), o;
        }
        getSVGForExport(t, e) {
          let o = this.options;
          return this.getSVG(C({ chart: { borderRadius: 0 } }, o.chartOptions, e, { exporting: { sourceWidth: t?.sourceWidth || o.sourceWidth, sourceHeight: t?.sourceHeight || o.sourceHeight } }));
        }
        inlineStyles() {
          let t, e = h.inlineDenylist, o = h.inlineAllowlist, n = {}, i = A("iframe", void 0, { width: "1px", height: "1px", visibility: "hidden" }, D.body), r = i.contentWindow?.document;
          r && r.body.appendChild(r.createElementNS(Rt, "svg")), function c(s) {
            let l, f, m, d, p, y, v = {};
            if (r && s.nodeType === 1 && h.unstyledElements.indexOf(s.nodeName) === -1) {
              if (l = b.getComputedStyle(s, null), f = s.nodeName === "svg" ? {} : b.getComputedStyle(s.parentNode, null), !n[s.nodeName]) {
                t = r.getElementsByTagName("svg")[0], m = r.createElementNS(s.namespaceURI, s.nodeName), t.appendChild(m);
                let g = b.getComputedStyle(m, null), x = {};
                for (let u in g) u.length < 1e3 && typeof g[u] == "string" && !/^\d+$/.test(u) && (x[u] = g[u]);
                n[s.nodeName] = x, s.nodeName === "text" && delete n.text.fill, t.removeChild(m);
              }
              for (let g in l) (Pt || I || V || Object.hasOwnProperty.call(l, g)) && function(x, u) {
                if (d = p = !1, o.length) {
                  for (y = o.length; y-- && !p; ) p = o[y].test(u);
                  d = !p;
                }
                for (u === "transform" && x === "none" && (d = !0), y = e.length; y-- && !d; ) {
                  if (u.length > 1e3) throw Error("Input too long");
                  d = e[y].test(u) || typeof x == "function";
                }
                !d && (f[u] !== x || s.nodeName === "svg") && n[s.nodeName][u] !== x && (h.inlineToAttributes && h.inlineToAttributes.indexOf(u) === -1 ? v[u] = x : x && s.setAttribute(h.hyphenate(u), x));
              }(l[g], g);
              if (O(s, v), s.nodeName === "svg" && s.setAttribute("stroke-width", "1px"), s.nodeName === "text") return;
              [].forEach.call(s.children || s.childNodes, c);
            }
          }(this.chart.container.querySelector("svg")), t.parentNode.removeChild(t), i.parentNode.removeChild(i);
        }
        async localExport(t, e) {
          let o = this.chart, n, i, r = null, c;
          if (I && o.styledMode && !h.inlineAllowlist.length && h.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/), I && (t.type === "application/pdf" || o.container.getElementsByTagName("image").length && t.type !== "image/svg+xml") || t.type === "application/pdf" && [].some.call(o.container.getElementsByTagName("image"), function(l) {
            let f = l.getAttribute("href");
            return f !== "" && typeof f == "string" && f.indexOf("data:") !== 0;
          })) return void await this.fallbackToServer(t, Error("Image type not supported for this chart/browser."));
          let s = P(o, "getSVG", (l) => {
            i = l.chartCopy.options, c = (n = l.chartCopy.container.cloneNode(!0)) && n.getElementsByTagName("image") || [];
          });
          try {
            let l;
            for (let m of (this.getSVGForExport(t, e), c ? Array.from(c) : [])) if (r = m.getAttributeNS("http://www.w3.org/1999/xlink", "href")) {
              h.objectURLRevoke = !1;
              let d = await h.imageToDataURL(r, t?.scale || 1, t?.type || "image/png");
              m.setAttributeNS("http://www.w3.org/1999/xlink", "href", d);
            } else m.parentNode.removeChild(m);
            let f = (l = n?.innerHTML, h.sanitizeSVG(l || "", i));
            if (f.indexOf("<foreignObject") > -1 && t.type !== "image/svg+xml" && (I || t.type === "application/pdf")) throw Error("Image type not supported for charts with embedded HTML");
            return await this.downloadSVG(f, L({ filename: this.getFilename() }, t)), f;
          } catch (l) {
            await this.fallbackToServer(t, l);
          } finally {
            s();
          }
        }
        moveContainers(t) {
          let e = this.chart, { scrollablePlotArea: o } = e;
          (o ? [o.fixedDiv, o.scrollingContainer] : [e.container]).forEach(function(n) {
            t.appendChild(n);
          });
        }
        print() {
          let t = this.chart;
          this.isPrinting || (h.printingChart = t, V || this.beforePrint(), setTimeout(() => {
            b.focus(), b.print(), V || setTimeout(() => {
              t.exporting?.afterPrint();
            }, 1e3);
          }, 1));
        }
        render() {
          let t = this, { chart: e, options: o } = t, n = t?.isDirty || !t?.svgElements.length;
          t.buttonOffset = 0, t.isDirty && t.destroy(), n && o.enabled !== !1 && (t.events = [], t.group || (t.group = e.renderer.g("exporting-group").attr({ zIndex: 3 }).add()), Dt(o?.buttons, function(i) {
            t.addButton(i);
          }), t.isDirty = !1);
        }
        resolveCSSVariables() {
          Array.from(this.chart.container.querySelectorAll("*")).forEach((t) => {
            ["color", "fill", "stop-color", "stroke"].forEach((e) => {
              t.getAttribute(e)?.includes("var(") && t.setAttribute(e, getComputedStyle(t).getPropertyValue(e)), t.style?.[e]?.includes("var(") && (t.style[e] = getComputedStyle(t).getPropertyValue(e));
            });
          });
        }
        update(t, e) {
          this.isDirty = !0, C(!0, this.options, t), B(e, !0) && this.chart.redraw();
        }
      }
      h.inlineAllowlist = [], h.inlineDenylist = [/-/, /^(clipPath|cssText|d|height|width)$/, /^font$/, /[lL]ogical(Width|Height)$/, /^parentRule$/, /^(cssRules|ownerRules)$/, /perspective/, /TapHighlightColor/, /^transition/, /^length$/, /^\d+$/], h.inlineToAttributes = ["fill", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "textAnchor", "x", "y"], h.loadEventDeferDelay = 150 * !!I, h.unstyledElements = ["clipPath", "defs", "desc"], function(a) {
        function t(n) {
          let i = n.exporting;
          i && (i.render(), P(n, "redraw", function() {
            this.exporting?.render();
          }), P(n, "destroy", function() {
            this.exporting?.destroy();
          }));
        }
        function e() {
          let n = this;
          n.options.exporting && (n.exporting = new a(n, n.options.exporting), gt.compose(n).navigation.addUpdate((i, r) => {
            n.exporting && (n.exporting.isDirty = !0, C(!0, n.options.navigation, i), B(r, !0) && n.redraw());
          }));
        }
        function o({ alignTo: n, key: i, textPxLength: r }) {
          let c = this.options.exporting, { align: s, buttonSpacing: l = 0, verticalAlign: f, width: m = 0 } = C(this.options.navigation?.buttonOptions, c?.buttons?.contextButton), d = n.width - r, p = m + l;
          (c?.enabled ?? !0) && i === "title" && s === "right" && f === "top" && d < 2 * p && (d < p ? n.width -= p : this.title?.alignValue !== "left" && (n.x -= p - d / 2));
        }
        a.compose = function(n, i) {
          vt.compose(i), tt.compose(n), At(Ft, "Exporting") && (L(ht().prototype, { exportChart: async function(r, c) {
            await this.exporting?.exportChart(r, c);
          }, getChartHTML: function(r) {
            return this.exporting?.getChartHTML(r);
          }, getFilename: function() {
            return this.exporting?.getFilename();
          }, getSVG: function(r) {
            return this.exporting?.getSVG(r);
          }, print: function() {
            return this.exporting?.print();
          } }), n.prototype.callbacks.push(t), P(n, "afterInit", e), P(n, "layOutTitle", o), V && b.matchMedia("print").addListener(function(r) {
            a.printingChart && (r.matches ? a.printingChart.exporting?.beforePrint() : a.printingChart.exporting?.afterPrint());
          }), Tt(bt));
        };
      }(h || (h = {}));
      let rt = h, T = E();
      T.Exporting = rt, T.HttpUtilities = T.HttpUtilities || K, T.ajax = T.HttpUtilities.ajax, T.getJSON = T.HttpUtilities.getJSON, T.post = T.HttpUtilities.post, rt.compose(T.Chart, T.Renderer);
      let It = E();
      return Z.default;
    })());
  }($)), $.exports;
}
var lt = $t();
const qt = /* @__PURE__ */ Bt(lt), zt = /* @__PURE__ */ Gt({
  __proto__: null,
  default: qt
}, [lt]);
export {
  zt as e
};
