import { g as Ct } from "./index-g8L_ObLu.js";
function _t(W, R) {
  for (var T = 0; T < R.length; T++) {
    const v = R[T];
    if (typeof v != "string" && !Array.isArray(v)) {
      for (const Y in v)
        if (Y !== "default" && !(Y in W)) {
          const _ = Object.getOwnPropertyDescriptor(v, Y);
          _ && Object.defineProperty(W, Y, _.get ? _ : {
            enumerable: !0,
            get: () => v[Y]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(W, Symbol.toStringTag, { value: "Module" }));
}
var B = { exports: {} }, Dt = B.exports, nt;
function Wt() {
  return nt || (nt = 1, function(W, R) {
    /**
    * Highcharts JS v12.3.0 (2025-06-21)
    * @module highcharts/modules/wordcloud
    * @requires highcharts
    *
    * (c) 2016-2025 Highsoft AS
    * Authors: Jon Arild Nygard
    *
    * License: www.highcharts.com/license
    */
    (function(T, v) {
      W.exports = v(T._Highcharts, T._Highcharts.SeriesRegistry);
    })(typeof window > "u" ? Dt : window, (T, v) => (() => {
      var Y = { 512: (e) => {
        e.exports = v;
      }, 944: (e) => {
        e.exports = T;
      } }, _ = {};
      function M(e) {
        var t = _[e];
        if (t !== void 0) return t.exports;
        var o = _[e] = { exports: {} };
        return Y[e](o, o.exports, M), o.exports;
      }
      M.n = (e) => {
        var t = e && e.__esModule ? () => e.default : () => e;
        return M.d(t, { a: t }), t;
      }, M.d = (e, t) => {
        for (var o in t) M.o(t, o) && !M.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
      }, M.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
      var V = {};
      M.d(V, { default: () => Yt });
      var st = M(944), C = M.n(st);
      let ht = { draw: function(e, t) {
        let { animatableAttribs: o, onComplete: i, css: r, renderer: a } = t, n = e.series && e.series.chart.hasRendered ? void 0 : e.series && e.series.options.animation, l = e.graphic;
        if (t.attribs = { ...t.attribs, class: e.getClassName() }, e.shouldDraw()) l || (e.graphic = l = t.shapeType === "text" ? a.text() : t.shapeType === "image" ? a.image(t.imageUrl || "").attr(t.shapeArgs || {}) : a[t.shapeType](t.shapeArgs || {}), l.add(t.group)), r && l.css(r), l.attr(t.attribs).animate(o, !t.isNew && n, i);
        else if (l) {
          let u = () => {
            e.graphic = l = l && l.destroy(), typeof i == "function" && i();
          };
          Object.keys(o).length ? l.animate(o, void 0, () => u()) : u();
        }
      } };
      var dt = M(512), E = M.n(dt);
      let { column: { prototype: { pointClass: pt } } } = E().seriesTypes, { extend: ut } = C();
      class k extends pt {
        isValid() {
          return !0;
        }
      }
      ut(k.prototype, { weight: 1 });
      let { deg2rad: ct } = C(), { extend: gt, find: q, isNumber: F, isObject: H, merge: ft } = C();
      function mt(e, t) {
        return !(t.left > e.right || t.right < e.left || t.top > e.bottom || t.bottom < e.top);
      }
      function $(e) {
        let t = e.axes || [];
        return t.length || (t = [], e.concat([e[0]]).reduce((o, i) => {
          let r = function(a, n) {
            let l = n[0] - a[0], u = n[1] - a[1];
            return [[-u, l], [u, -l]];
          }(o, i)[0];
          return q(t, (a) => a[0] === r[0] && a[1] === r[1]) || t.push(r), i;
        }), e.axes = t), t;
      }
      function I(e, t) {
        let o = e.map((i) => {
          let r = i[0], a = i[1];
          return r * t[0] + a * t[1];
        });
        return { min: Math.min.apply(this, o), max: Math.max.apply(this, o) };
      }
      function G(e, t) {
        let o = $(e), i = $(t);
        return !q(o.concat(i), (r) => function(a, n, l) {
          let u = I(n, a), h = I(l, a);
          return h.min > u.max || h.max < u.min;
        }(r, e, t));
      }
      function J(e, t) {
        let o = 4 * e, i = Math.ceil((Math.sqrt(o) - 1) / 2), r = 2 * i + 1, a = Math.pow(r, 2), n = !1;
        return r -= 1, e <= 1e4 && (typeof n == "boolean" && o >= a - r && (n = { x: i - (a - o), y: -i }), a -= r, typeof n == "boolean" && o >= a - r && (n = { x: -i, y: -i + (a - o) }), a -= r, typeof n == "boolean" && (n = o >= a - r ? { x: -i + (a - o), y: i } : { x: i, y: i - (a - o - r) }), n.x *= 5, n.y *= 5), n;
      }
      function K(e, t) {
        let o = Math.pow(10, F(t) ? t : 14);
        return Math.round(e * o) / o;
      }
      function Q(e, t) {
        let o = e[0], i = e[1], r = -(ct * t), a = Math.cos(r), n = Math.sin(r);
        return [K(o * a - i * n), K(o * n + i * a)];
      }
      function Z(e, t, o) {
        let i = Q([e[0] - t[0], e[1] - t[1]], o);
        return [i[0] + t[0], i[1] + t[1]];
      }
      let { noop: N } = C(), { column: tt } = E().seriesTypes, { extend: j, isArray: xt, isNumber: D, isObject: et, merge: yt } = C(), { archimedeanSpiral: bt, extendPlayingField: ot, getBoundingBoxFromPolygon: Mt, getPlayingField: wt, getPolygon: St, getRandomPosition: it, getRotation: L, getScale: Pt, getSpiral: At, intersectionTesting: rt, isPolygonsColliding: vt, rectangularSpiral: Ft, rotate2DToOrigin: Xt, rotate2DToPoint: Tt, squareSpiral: zt, updateFieldBoundaries: Ot } = { archimedeanSpiral: function(e, t) {
        let o = t.field, i = o.width * o.width + o.height * o.height, r = 0.8 * e, a = !1;
        return e <= 1e4 && (Math.min(Math.abs((a = { x: r * Math.cos(r), y: r * Math.sin(r) }).x), Math.abs(a.y)) < i || (a = !1)), a;
      }, extendPlayingField: function(e, t) {
        let o, i, r, a, n, l;
        return H(e) && H(t) ? (o = t.bottom - t.top, i = t.right - t.left, n = i * (r = e.ratioX) > o * (a = e.ratioY) ? i : o, l = ft(e, { width: e.width + n * r * 2, height: e.height + n * a * 2 })) : l = e, l;
      }, getBoundingBoxFromPolygon: function(e) {
        return e.reduce(function(t, o) {
          let i = o[0], r = o[1];
          return t.left = Math.min(i, t.left), t.right = Math.max(i, t.right), t.bottom = Math.max(r, t.bottom), t.top = Math.min(r, t.top), t;
        }, { left: Number.MAX_VALUE, right: -Number.MAX_VALUE, bottom: -Number.MAX_VALUE, top: Number.MAX_VALUE });
      }, getPlayingField: function(e, t, o) {
        let i = o.reduce(function(l, u) {
          let h = u.dimensions, s = Math.max(h.width, h.height);
          return l.maxHeight = Math.max(l.maxHeight, h.height), l.maxWidth = Math.max(l.maxWidth, h.width), l.area += s * s, l;
        }, { maxHeight: 0, maxWidth: 0, area: 0 }), r = Math.max(i.maxHeight, i.maxWidth, 0.85 * Math.sqrt(i.area)), a = e > t ? e / t : 1, n = t > e ? t / e : 1;
        return { width: r * a, height: r * n, ratioX: a, ratioY: n };
      }, getPolygon: function(e, t, o, i, r) {
        let a = [e, t], n = e - o / 2, l = e + o / 2, u = t - i / 2, h = t + i / 2;
        return [[n, u], [l, u], [l, h], [n, h]].map(function(s) {
          return Z(s, a, -r);
        });
      }, getRandomPosition: function(e) {
        return Math.round(e * (Math.random() + 0.5) / 2);
      }, getRotation: function(e, t, o, i) {
        let r = !1, a;
        return F(e) && F(t) && F(o) && F(i) && e > 0 && t > -1 && i > o && (a = (i - o) / (e - 1 || 1), r = o + t % e * a), r;
      }, getScale: function(e, t, o) {
        let i = 2 * Math.max(Math.abs(o.top), Math.abs(o.bottom)), r = 2 * Math.max(Math.abs(o.left), Math.abs(o.right));
        return Math.min(r > 0 ? 1 / r * e : 1, i > 0 ? 1 / i * t : 1);
      }, getSpiral: function(e, t) {
        let o = [];
        for (let i = 1; i < 1e4; i++) o.push(e(i, t));
        return (i) => i <= 1e4 && o[i - 1];
      }, intersectionTesting: function(e, t) {
        let o = t.placed, i = t.field, r = t.rectangle, a = t.polygon, n = t.spiral, l = e.rect = gt({}, r), u = 1, h = { x: 0, y: 0 };
        for (e.polygon = a, e.rotation = t.rotation; h !== !1 && (function(s, f) {
          let x = s.rect, S = s.polygon, P = s.lastCollidedWith, A = function(d) {
            let m = mt(x, d.rect);
            return m && (s.rotation % 90 || d.rotation % 90) && (m = G(S, d.polygon)), m;
          }, y = !1;
          return P && ((y = A(P)) || delete s.lastCollidedWith), y || (y = !!q(f, function(d) {
            let m = A(d);
            return m && (s.lastCollidedWith = d), m;
          })), y;
        }(e, o) || function(s, f) {
          let x = { left: -(f.width / 2), right: f.width / 2, top: -(f.height / 2), bottom: f.height / 2 };
          return !(x.left < s.left && x.right > s.right && x.top < s.top && x.bottom > s.bottom);
        }(l, i)); ) H(h = n(u)) && (l.left = r.left + h.x, l.right = r.right + h.x, l.top = r.top + h.y, l.bottom = r.bottom + h.y, e.polygon = function(s, f, x) {
          return x.map(function(S) {
            return [S[0] + s, S[1] + f];
          });
        }(h.x, h.y, a)), u++;
        return h;
      }, isPolygonsColliding: G, rectangularSpiral: function(e, t) {
        let o = J(e), i = t.field;
        return o && (o.x *= i.ratioX, o.y *= i.ratioY), o;
      }, rotate2DToOrigin: Q, rotate2DToPoint: Z, squareSpiral: J, updateFieldBoundaries: function(e, t) {
        return (!F(e.left) || e.left > t.left) && (e.left = t.left), (!F(e.right) || e.right < t.right) && (e.right = t.right), (!F(e.top) || e.top > t.top) && (e.top = t.top), (!F(e.bottom) || e.bottom < t.bottom) && (e.bottom = t.bottom), e;
      } };
      class U extends tt {
        pointAttribs(t, o) {
          let i = C().seriesTypes.column.prototype.pointAttribs.call(this, t, o);
          return delete i.stroke, delete i["stroke-width"], i;
        }
        deriveFontSize(t, o, i) {
          let r = D(t) ? t : 0, a = D(o) ? o : 1;
          return Math.floor(Math.max(D(i) ? i : 1, r * a));
        }
        drawPoints() {
          if (this.zooming || this.defaultScale && this.group.scaleX !== this.defaultScale) return;
          let t = this.hasRendered, o = this.xAxis, i = this.yAxis, r = this.chart, a = this.group, n = this.options, l = n.animation, u = n.allowExtendPlayingField, h = r.renderer, s = [], f = this.placementStrategy[n.placementStrategy], x = n.rotation, S = this.points.map(function(p) {
            return p.weight;
          }), P = Math.max.apply(null, S), A = this.points.concat().sort((p, z) => z.weight - p.weight), y = h.text().add(a), d;
          for (let p of (this.group.attr({ scaleX: 1, scaleY: 1 }), A)) {
            let z = 1 / P * p.weight, X = j({ fontSize: this.deriveFontSize(z, n.maxFontSize, n.minFontSize) + "px" }, n.style);
            y.css(X).attr({ x: 0, y: 0, text: p.name });
            let c = y.getBBox(!0);
            p.dimensions = { height: c.height, width: c.width };
          }
          d = wt(o.len, i.len, A);
          let m = At(this.spirals[n.spiral], { field: d });
          for (let p of A) {
            let z = 1 / P * p.weight, X = j({ fontSize: this.deriveFontSize(z, n.maxFontSize, n.minFontSize) + "px" }, n.style), c = f(p, { data: A, field: d, placed: s, rotation: x }), g = j(this.pointAttribs(p, p.selected && "select"), { align: "center", "alignment-baseline": "middle", "dominant-baseline": "middle", x: c.x, y: c.y, text: p.name, rotation: D(c.rotation) ? c.rotation : void 0 }), O = St(c.x, c.y, p.dimensions.width, p.dimensions.height, c.rotation), b = Mt(O), w = rt(p, { rectangle: b, polygon: O, field: d, placed: s, spiral: m, rotation: c.rotation }), at;
            !w && u && (d = ot(d, b), w = rt(p, { rectangle: b, polygon: O, field: d, placed: s, spiral: m, rotation: c.rotation })), et(w) ? (g.x = (g.x || 0) + w.x, g.y = (g.y || 0) + w.y, b.left += w.x, b.right += w.x, b.top += w.y, b.bottom += w.y, d = Ot(d, b), s.push(p), p.isNull = !1, p.isInside = !0) : p.isNull = !0, l && (at = { x: g.x, y: g.y }, t ? (delete g.x, delete g.y) : (g.x = 0, g.y = 0)), ht.draw(p, { animatableAttribs: at, attribs: g, css: X, group: a, renderer: h, shapeArgs: void 0, shapeType: "text" });
          }
          y = y.destroy(), this.defaultScale = Pt(o.len, i.len, d), this.field = d, this.group.attr({ scaleX: this.defaultScale, scaleY: this.defaultScale });
        }
        hasData() {
          return et(this) && this.visible === !0 && xt(this.points) && this.points.length > 0;
        }
        getPlotBox(t) {
          let { chart: o, group: i, zooming: r } = this, { plotSizeX: a = 0, plotSizeY: n = 0, inverted: l } = o, u = this[l ? "yAxis" : "xAxis"], h = this[l ? "xAxis" : "yAxis"], s = u ? u.len : o.plotWidth, f = h ? h.len : o.plotHeight, x = u ? u.left : o.plotLeft, S = h ? h.top : o.plotTop, P = this.field, A = 0, y = 0, d = x + s / 2, m = S + f / 2, p = d, z = m, X = this.defaultScale || 1, c = 0, g = 0;
          if (P && (c = 2 * Math.max(Math.abs(P.top), Math.abs(P.bottom)), g = 2 * Math.max(Math.abs(P.left), Math.abs(P.right))), l && ([g, c] = [c, g]), i && r) {
            let O = x + Math.max(g * (X = Math.max(r.scale, this.defaultScale || 1)), s) / 2, b = S + Math.max(c * X, f) / 2, w = X - (i.scaleX || 1);
            A = w * ((a - g) / 2 + r.zoomX * a - s / 2), y = w * ((n - c) / 2 + r.zoomY * n - f / 2), t === "series" && (r.x = Math.max(0, Math.min(1 - r.width, r.x + r.panX / r.scale)), A += r.panX * a, r.panX = 0, r.y = Math.max(0, Math.min(1 - r.height, r.y + r.panY / r.scale)), y += r.panY * n, r.panY = 0), D(i.translateX) && D(i.translateY) && (p = i.translateX, z = i.translateY), d = p - A, (m = z - y) > b ? m = b : m < 2 * S + f - b && (m = 2 * S + f - b), d > O ? d = O : d < 2 * x + s - O && (d = 2 * x + s - O);
          }
          return { translateX: d, translateY: m, scaleX: X, scaleY: X };
        }
      }
      U.defaultOptions = yt(tt.defaultOptions, { allowExtendPlayingField: !0, animation: { duration: 500 }, borderWidth: 0, clip: !1, colorByPoint: !0, cropThreshold: 1 / 0, minFontSize: 1, maxFontSize: 25, placementStrategy: "center", rotation: { from: 0, orientations: 2, to: 90 }, showInLegend: !1, spiral: "rectangular", style: { fontFamily: "sans-serif", fontWeight: "900", whiteSpace: "nowrap" }, tooltip: { followPointer: !0, pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.weight}</b><br/>' } }), j(U.prototype, { animate: N, animateDrilldown: N, animateDrillupFrom: N, isCartesian: !1, pointClass: k, setClip: N, placementStrategy: { random: function(e, t) {
        let o = t.field, i = t.rotation;
        return { x: it(o.width) - o.width / 2, y: it(o.height) - o.height / 2, rotation: L(i.orientations, e.index, i.from, i.to) };
      }, center: function(e, t) {
        let o = t.rotation;
        return { x: 0, y: 0, rotation: L(o.orientations, e.index, o.from, o.to) };
      } }, pointArrayMap: ["weight"], spirals: { archimedean: bt, rectangular: Ft, square: zt }, utils: { extendPlayingField: ot, getRotation: L, isPolygonsColliding: vt, rotate2DToOrigin: Xt, rotate2DToPoint: Tt } }), E().registerSeriesType("wordcloud", U);
      let Yt = C();
      return V.default;
    })());
  }(B)), B.exports;
}
var lt = Wt();
const Nt = /* @__PURE__ */ Ct(lt), Bt = /* @__PURE__ */ _t({
  __proto__: null,
  default: Nt
}, [lt]);
export {
  Bt as w
};
