@gkucmierz/nano-ui 1.5.3 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nano-ui.js CHANGED
@@ -101,9 +101,7 @@ typeof window < "u" && (window.Analytics = k);
101
101
  var A = { mounted(e, t) {
102
102
  e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", function(n) {
103
103
  let r = e.getBoundingClientRect(), i = n.clientX - r.left, a = n.clientY - r.top, o = document.createElement("span"), s = Math.max(r.width, r.height), c = s / 2;
104
- o.style.width = o.style.height = `${s}px`, o.style.left = `${i - c}px`, o.style.top = `${a - c}px`, o.classList.add("ripple"), t.value && typeof t.value == "string" && (o.style.backgroundColor = t.value), e.appendChild(o), setTimeout(() => {
105
- o.remove();
106
- }, 600);
104
+ o.style.width = o.style.height = `${s}px`, o.style.left = `${i - c}px`, o.style.top = `${a - c}px`, o.classList.add("ripple"), t.value && typeof t.value == "string" && (o.style.backgroundColor = t.value), o.addEventListener("animationend", () => o.remove(), { once: !0 }), e.appendChild(o);
107
105
  });
108
106
  } }, j = _({
109
107
  isVisible: !1,
@@ -206,13 +204,13 @@ var P = {
206
204
  })
207
205
  }, S(C(j).text), 7));
208
206
  }
209
- }, [["__scopeId", "data-v-37c91a21"]]), L = { class: "nano-modal-title" }, R = {
207
+ }, [["__scopeId", "data-v-e67d9c3b"]]), L = { class: "nano-modal-title" }, R = {
210
208
  key: 1,
211
209
  class: "nano-modal-body"
212
210
  }, z = {
213
211
  key: 2,
214
212
  class: "nano-modal-footer"
215
- }, B = { class: "nano-modal-actions" }, V = {
213
+ }, B = { class: "nano-modal-actions" }, V = /* @__PURE__ */ F({
216
214
  __name: "NanoModal",
217
215
  props: {
218
216
  visible: {
@@ -294,48 +292,48 @@ var P = {
294
292
  "cancel"
295
293
  ],
296
294
  setup(e, { emit: u }) {
297
- let m = e, _ = u, y = v(null), C = v(null), k = v(null), A = v(null), j = v(null), M = v(null), N = v(!1), P = v(!1), F = 0, I = 0, V = 0, ee = 0, H = 0, te = 0, ne = 0, re = 0, ie = r(() => {
295
+ let m = e, _ = u, y = v(null), C = v(null), k = v(null), A = v(null), j = v(null), M = v(null), N = v(!1), P = v(!1), F = 0, I = 0, V = 0, ee = 0, te = 0, ne = 0, re = 0, ie = 0, ae = r(() => {
298
296
  let e = {};
299
297
  return j.value === null ? (e.maxWidth = typeof m.width == "number" ? `${m.width}px` : m.width, e.width = "100%") : (e.width = `${j.value}px`, e.maxWidth = "none"), M.value === null ? m.height !== "auto" && (e.height = typeof m.height == "number" ? `${m.height}px` : m.height) : (e.height = `${M.value}px`, e.maxHeight = "none"), k.value !== null && A.value !== null && (e.position = "absolute", e.left = `${k.value}px`, e.top = `${A.value}px`, e.transform = "none", e.margin = "0"), e;
300
- }), ae = (e) => {
298
+ }), oe = (e) => {
301
299
  if (m.draggable && !(e.target.tagName === "BUTTON" || e.target.closest("button"))) {
302
300
  if (N.value = !0, F = e.clientX, I = e.clientY, k.value === null) {
303
301
  let e = C.value.getBoundingClientRect();
304
302
  k.value = e.left, A.value = e.top, j.value === null && (j.value = e.width), M.value === null && (M.value = e.height);
305
303
  }
306
- V = k.value, ee = A.value, window.addEventListener("mousemove", oe), window.addEventListener("mouseup", se);
304
+ V = k.value, ee = A.value, window.addEventListener("mousemove", se), window.addEventListener("mouseup", ce);
307
305
  }
308
- }, oe = (e) => {
306
+ }, se = (e) => {
309
307
  if (!N.value) return;
310
308
  let t = V + (e.clientX - F), n = ee + (e.clientY - I), r = window.innerWidth, i = window.innerHeight, a = C.value.getBoundingClientRect();
311
309
  t < 0 && (t = 0), n < 0 && (n = 0), t + a.width > r && (t = r - a.width), n + a.height > i && (n = i - a.height), k.value = t, A.value = n;
312
- }, se = () => {
313
- N.value = !1, window.removeEventListener("mousemove", oe), window.removeEventListener("mouseup", se);
314
- }, ce = (e) => {
310
+ }, ce = () => {
311
+ N.value = !1, window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", ce);
312
+ }, le = (e) => {
315
313
  if (!m.resizable) return;
316
- e.preventDefault(), e.stopPropagation(), P.value = !0, H = e.clientX, te = e.clientY;
314
+ e.preventDefault(), e.stopPropagation(), P.value = !0, te = e.clientX, ne = e.clientY;
317
315
  let t = C.value.getBoundingClientRect();
318
- k.value === null && (k.value = t.left, A.value = t.top), ne = t.width, re = t.height, window.addEventListener("mousemove", le), window.addEventListener("mouseup", ue);
319
- }, le = (e) => {
316
+ k.value === null && (k.value = t.left, A.value = t.top), re = t.width, ie = t.height, window.addEventListener("mousemove", ue), window.addEventListener("mouseup", de);
317
+ }, ue = (e) => {
320
318
  if (!P.value) return;
321
- let t = ne + (e.clientX - H), n = re + (e.clientY - te);
319
+ let t = re + (e.clientX - te), n = ie + (e.clientY - ne);
322
320
  t < m.minWidth && (t = m.minWidth), n < m.minHeight && (n = m.minHeight);
323
321
  let r = window.innerWidth - k.value, i = window.innerHeight - A.value;
324
322
  t > r && (t = r), n > i && (n = i), j.value = t, M.value = n;
325
- }, ue = () => {
326
- P.value = !1, window.removeEventListener("mousemove", le), window.removeEventListener("mouseup", ue);
327
- }, de = (e) => {
328
- m.visible && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), fe());
323
+ }, de = () => {
324
+ P.value = !1, window.removeEventListener("mousemove", ue), window.removeEventListener("mouseup", de);
325
+ }, fe = (e) => {
326
+ m.visible && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), pe());
329
327
  };
330
328
  w(() => m.visible, async (e) => {
331
- e ? (k.value = null, A.value = null, j.value = null, M.value = null, document.body.style.overflow = "hidden", window.addEventListener("keydown", de, { capture: !0 }), await d(), y.value && y.value.focus()) : (document.body.style.overflow = "", window.removeEventListener("keydown", de, { capture: !0 }), se(), ue());
329
+ e ? (k.value = null, A.value = null, j.value = null, M.value = null, document.body.style.overflow = "hidden", window.addEventListener("keydown", fe, { capture: !0 }), await d(), y.value && y.value.focus()) : (document.body.style.overflow = "", window.removeEventListener("keydown", fe, { capture: !0 }), ce(), de());
332
330
  }), h(() => {
333
- document.body.style.overflow = "", window.removeEventListener("keydown", de, { capture: !0 }), se(), ue();
331
+ document.body.style.overflow = "", window.removeEventListener("keydown", fe, { capture: !0 }), ce(), de();
334
332
  });
335
- let fe = () => _("close"), pe = () => {
336
- m.closeOnBackdrop && fe();
337
- }, me = () => _("ok"), he = () => {
338
- _("cancel"), fe();
333
+ let pe = () => _("close"), me = () => {
334
+ m.closeOnBackdrop && pe();
335
+ }, he = () => _("ok"), ge = () => {
336
+ _("cancel"), pe();
339
337
  };
340
338
  return (r, u) => {
341
339
  let d = x("ripple");
@@ -343,7 +341,7 @@ var P = {
343
341
  default: T(() => [e.visible ? (g(), o("div", {
344
342
  key: 0,
345
343
  class: f(["nano-modal-overlay", { "nano-glass": e.glassmorphism }]),
346
- onClick: O(pe, ["self"]),
344
+ onClick: O(me, ["self"]),
347
345
  onKeydown: u[1] ||= D(O((...e) => r.handleEsc && r.handleEsc(...e), ["stop"]), ["esc"]),
348
346
  tabindex: "-1",
349
347
  ref_key: "modalOverlay",
@@ -353,17 +351,17 @@ var P = {
353
351
  "is-dragging": N.value,
354
352
  "is-resizing": P.value
355
353
  }]),
356
- style: p(ie.value),
354
+ style: p(ae.value),
357
355
  ref_key: "modalWindow",
358
356
  ref: C
359
357
  }, [
360
358
  e.showHeader ? (g(), o("div", {
361
359
  key: 0,
362
360
  class: f(["nano-modal-header", { "is-draggable": e.draggable }]),
363
- onMousedown: ae
364
- }, [b(r.$slots, "header", {}, () => [s("h2", L, S(e.title), 1)]), s("button", {
361
+ onMousedown: oe
362
+ }, [b(r.$slots, "header", {}, () => [s("h2", L, S(e.title), 1)], !0), s("button", {
365
363
  class: "nano-modal-close-btn",
366
- onClick: O(fe, ["stop"]),
364
+ onClick: O(pe, ["stop"]),
367
365
  "aria-label": "Close",
368
366
  onMousedown: u[0] ||= O(() => {}, ["stop"])
369
367
  }, [...u[2] ||= [s("svg", {
@@ -387,20 +385,20 @@ var P = {
387
385
  x2: "18",
388
386
  y2: "18"
389
387
  })], -1)]], 32)], 34)) : a("", !0),
390
- e.showBody ? (g(), o("div", R, [b(r.$slots, "body")])) : a("", !0),
388
+ e.showBody ? (g(), o("div", R, [b(r.$slots, "body", {}, void 0, !0)])) : a("", !0),
391
389
  e.showFooter ? (g(), o("div", z, [b(r.$slots, "footer", {}, () => [s("div", B, [e.showCancel ? E((g(), o("button", {
392
390
  key: 0,
393
391
  class: "nano-btn nano-btn-secondary",
394
- onClick: he
392
+ onClick: ge
395
393
  }, [c(S(e.cancelText), 1)])), [[d]]) : a("", !0), e.showOk ? E((g(), o("button", {
396
394
  key: 1,
397
395
  class: f(["nano-btn", "nano-btn-" + e.okVariant]),
398
- onClick: me
399
- }, [c(S(e.okText), 1)], 2)), [[d]]) : a("", !0)])])])) : a("", !0),
396
+ onClick: he
397
+ }, [c(S(e.okText), 1)], 2)), [[d]]) : a("", !0)])], !0)])) : a("", !0),
400
398
  e.resizable ? (g(), o("div", {
401
399
  key: 3,
402
400
  class: "nano-modal-resizer",
403
- onMousedown: ce
401
+ onMousedown: le
404
402
  }, [...u[3] ||= [s("svg", {
405
403
  width: "10",
406
404
  height: "10",
@@ -419,21 +417,21 @@ var P = {
419
417
  })]);
420
418
  };
421
419
  }
422
- }, ee = ["viewBox"], H = { key: 0 }, te = [
420
+ }, [["__scopeId", "data-v-52e94a15"]]), ee = ["viewBox"], te = { key: 0 }, ne = [
423
421
  "id",
424
422
  "x1",
425
423
  "y1",
426
424
  "x2",
427
425
  "y2"
428
- ], ne = ["stop-color"], re = ["stop-color"], ie = [
426
+ ], re = ["stop-color"], ie = ["stop-color"], ae = [
429
427
  "id",
430
428
  "y1",
431
429
  "y2"
432
- ], ae = ["stop-color"], oe = ["stop-color"], se = [
430
+ ], oe = ["stop-color"], se = ["stop-color"], ce = [
433
431
  "id",
434
432
  "y1",
435
433
  "y2"
436
- ], ce = ["stop-color"], le = ["stop-color"], ue = { key: 1 }, de = ["x", "y"], fe = { key: 2 }, pe = ["d", "fill"], me = ["d", "stroke"], he = ["d", "fill"], ge = ["d", "fill"], _e = ["d", "fill"], ve = ["d", "stroke"], ye = ["d", "fill"], be = ["d", "stroke"], xe = ["d", "stroke-width"], Se = ["transform"], Ce = ["font-size"], we = ["font-size"], Te = ["d", "fill"], Ee = ["d", "stroke"], De = ["d", "fill"], Oe = ["d", "fill"], ke = ["d", "fill"], Ae = ["d", "stroke"], je = ["d", "fill"], Me = ["d", "stroke"], Ne = ["d", "stroke-width"], Pe = ["onMouseenter", "onClick"], Fe = ["d"], Ie = ["d"], Le = ["onMouseenter", "onClick"], Re = ["d", "stroke"], ze = ["y", "fill"], Be = ["onMouseenter", "onClick"], Ve = ["d", "stroke"], He = ["y", "fill"], Ue = /* @__PURE__ */ F({
434
+ ], le = ["stop-color"], ue = ["stop-color"], de = { key: 1 }, fe = ["x", "y"], pe = { key: 2 }, me = ["d", "fill"], he = ["d", "stroke"], ge = ["d", "fill"], _e = ["d", "fill"], ve = ["d", "fill"], ye = ["d", "stroke"], be = ["d", "fill"], xe = ["d", "stroke"], Se = ["d", "stroke-width"], Ce = ["transform"], we = ["font-size"], Te = ["font-size"], Ee = ["d", "fill"], De = ["d", "stroke"], Oe = ["d", "fill"], ke = ["d", "fill"], Ae = ["d", "fill"], je = ["d", "stroke"], Me = ["d", "fill"], Ne = ["d", "stroke"], Pe = ["d", "stroke-width"], Fe = ["onMouseenter", "onClick"], Ie = ["d"], Le = ["d"], Re = ["onMouseenter", "onClick"], ze = ["d", "stroke"], Be = ["y", "fill"], Ve = ["onMouseenter", "onClick"], He = ["d", "stroke"], Ue = ["y", "fill"], We = /* @__PURE__ */ F({
437
435
  __name: "ThreeDDonutChart",
438
436
  props: {
439
437
  data: {
@@ -631,14 +629,14 @@ var P = {
631
629
  percentage: n
632
630
  };
633
631
  });
634
- }), V = r(() => A.value.reduce((e, t) => e + t.value, 0)), Ue = r(() => {
632
+ }), V = r(() => A.value.reduce((e, t) => e + t.value, 0)), We = r(() => {
635
633
  if (c.centerValue !== void 0 && c.centerValue !== "") return c.centerValue;
636
- let e = $.value.find((e) => e.item.id === C.value);
634
+ let e = at.value.find((e) => e.item.id === C.value);
637
635
  return e ? c.centerValueFormatter ? c.centerValueFormatter(e.item.value, e.item) : L(e.item.value) : c.centerValueFormatter ? c.centerValueFormatter(V.value, null) : c.valueDecimals === void 0 ? Math.round(V.value) : L(V.value);
638
- }), We = r(() => {
639
- let e = $.value.find((e) => e.item.id === C.value);
636
+ }), Ge = r(() => {
637
+ let e = at.value.find((e) => e.item.id === C.value);
640
638
  return e ? R(e.item.name, 12).toUpperCase() : (c.centerLabel || "").toUpperCase();
641
- }), Ge = (e, t = !1) => {
639
+ }), Ke = (e, t = !1) => {
642
640
  let n = new Map(A.value.map((e) => [e.id, e])), r = new Map(e.map((e) => [e.id, e])), i = [];
643
641
  e.forEach((e) => {
644
642
  let r = n.get(e.id);
@@ -679,7 +677,7 @@ var P = {
679
677
  unit: e.unit
680
678
  });
681
679
  }), A.value = i, t && (A.value = A.value.filter((e) => e.targetValue > 0));
682
- }, Ke = (e, t = -90) => {
680
+ }, qe = (e, t = -90) => {
683
681
  if (!e || e.length === 0) return t;
684
682
  let n = e.reduce((e, t) => e + (t.value || 0), 0);
685
683
  if (n === 0) return t;
@@ -697,22 +695,22 @@ var P = {
697
695
  l < o ? (o = l, a = e, s = u) : l === o && u < s && (a = e, s = u);
698
696
  }
699
697
  return a;
700
- }, qe = r(() => c.autoRotate && B.value && B.value.length > 0 ? Ke(B.value, c.rotationAngle) : c.rotationAngle), U = v(qe.value), Je = v(!1), Ye = v(!1), Xe = null, W = c.is3D, G = v(c.isExpanded ? 380 : 60), K = v(c.isExpanded ? 160 : 60), q = v(c.isExpanded ? 180 : 48), J = v(c.isExpanded ? W ? 180 * c.slopeRatio : 180 : W ? 48 * c.slopeRatio : 48), Y = v(c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness)), X = v(c.isExpanded ? W ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : W ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness)), Ze = c.isExpanded && W ? 32 : 0, Z = v(W && c.slopeRatio > .5 ? Ze * (2 - 2 * c.slopeRatio) : Ze), Qe = v(c.isExpanded ? 760 : 120), $e = v(c.isExpanded ? 320 : 120), Q = v(c.isExpanded && c.showLabels ? 1 : 0), et = r(() => {
701
- let e = (q.value - 48) / 132;
698
+ }, Je = r(() => c.autoRotate && B.value && B.value.length > 0 ? qe(B.value, c.rotationAngle) : c.rotationAngle), H = v(Je.value), Ye = v(!1), Xe = v(!1), Ze = null, U = c.is3D, W = v(c.isExpanded ? 380 : 60), G = v(c.isExpanded ? 160 : 60), K = v(c.isExpanded ? 180 : 48), Qe = v(c.isExpanded ? U ? 180 * c.slopeRatio : 180 : U ? 48 * c.slopeRatio : 48), q = v(c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness)), J = v(c.isExpanded ? U ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : U ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness)), $e = c.isExpanded && U ? 32 : 0, Y = v(U && c.slopeRatio > .5 ? $e * (2 - 2 * c.slopeRatio) : $e), et = v(c.isExpanded ? 760 : 120), tt = v(c.isExpanded ? 320 : 120), X = v(c.isExpanded && c.showLabels ? 1 : 0), nt = r(() => {
699
+ let e = (K.value - 48) / 132;
702
700
  return 13 + 6 * Math.max(0, Math.min(1, e));
703
- }), tt = r(() => {
704
- let e = (q.value - 48) / 132;
701
+ }), rt = r(() => {
702
+ let e = (K.value - 48) / 132;
705
703
  return 7 + 1.5 * Math.max(0, Math.min(1, e));
706
- }), nt = r(() => K.value - Z.value / 2), $ = r(() => {
704
+ }), it = r(() => G.value - Y.value / 2), at = r(() => {
707
705
  let e = A.value, t = V.value;
708
706
  if (t === 0) return [];
709
- let n = [], r = U.value * Math.PI / 180, i = G.value;
710
- K.value;
711
- let a = q.value, o = J.value, s = Y.value, l = X.value, u = Z.value, d = nt.value, f = e.filter((e) => e.value > .001);
707
+ let n = [], r = H.value * Math.PI / 180, i = W.value;
708
+ G.value;
709
+ let a = K.value, o = Qe.value, s = q.value, l = J.value, u = Y.value, d = it.value, f = e.filter((e) => e.value > .001);
712
710
  if (f.length === 1) {
713
711
  let t = f[0], n = e.indexOf(t), r = F(t, n), p = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, m = "", h = "";
714
712
  u > 0 && (m = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - a} ${d + u} A ${a} ${o} 0 0 0 ${i + a} ${d + u} Z`, h = `M ${i - s} ${d} A ${s} ${l} 0 0 1 ${i + s} ${d} L ${i + s} ${d + u} A ${s} ${l} 0 0 0 ${i - s} ${d + u} Z`);
715
- let g = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} L ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, _ = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} M ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d}`, v = h, y = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} Z`, b = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d}`, x = m, S = U.value * Math.PI / 180 + Math.PI, C = i + a * Math.cos(S), w = d + o * Math.sin(S), T = i + (a + 25) * Math.cos(S), E = d + (o + 35 * c.slopeRatio) * Math.sin(S), D = i + (a + s) / 2 * Math.cos(S), O = d + (o + l) / 2 * Math.sin(S), k = a - s, A = o - l;
713
+ let g = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} L ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, _ = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} M ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d}`, v = h, y = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} Z`, b = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d}`, x = m, S = H.value * Math.PI / 180 + Math.PI, C = i + a * Math.cos(S), w = d + o * Math.sin(S), T = i + (a + 25) * Math.cos(S), E = d + (o + 35 * c.slopeRatio) * Math.sin(S), D = i + (a + s) / 2 * Math.cos(S), O = d + (o + l) / 2 * Math.sin(S), k = a - s, A = o - l;
716
714
  return [{
717
715
  item: t,
718
716
  index: n,
@@ -806,7 +804,7 @@ var P = {
806
804
  M ? (P = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} M ${x} ${S} A ${s} ${l} 0 ${T} 0 ${C} ${w}`, N || (P += ` L ${h} ${v}`)) : (P = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${x} ${S} A ${s} ${l} 0 ${T} 0 ${C} ${w}`, N || (P += " Z"));
807
805
  let F = "", I = "", L = "", R = "", z = "", B = "";
808
806
  u > 0 && (F = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u} Z`, I = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} L ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u} Z`, M ? (L = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} M ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u}`, N || (L += ` L ${h} ${v}`)) : (L = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u}`, N || (L += " Z")), M ? (R = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} M ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u}`, N || (R += ` L ${C} ${w}`)) : (R = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} L ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u}`, N || (R += " Z")), Math.abs(r - A) < .001 && (z = `M ${h} ${v} L ${C} ${w} L ${C} ${w + u} L ${h} ${v + u} Z`), Math.abs(p - j) < .001 && (B = `M ${y} ${b} L ${x} ${S} L ${x} ${S + u} L ${y} ${b + u} Z`));
809
- let V = d + o * Math.sin(m), ee = i + a * Math.cos(g), H = d + o * Math.sin(g), te = i + (a + 25) * Math.cos(g), ne = d + (o + 35 * c.slopeRatio) * Math.sin(g), re = i + (a + s) / 2 * Math.cos(g), ie = d + (o + l) / 2 * Math.sin(g), ae = a - s, oe = o - l;
807
+ let V = d + o * Math.sin(m), ee = i + a * Math.cos(g), te = d + o * Math.sin(g), ne = i + (a + 25) * Math.cos(g), re = d + (o + 35 * c.slopeRatio) * Math.sin(g), ie = i + (a + s) / 2 * Math.cos(g), ae = d + (o + l) / 2 * Math.sin(g), oe = a - s, se = o - l;
810
808
  n.push({
811
809
  item: e,
812
810
  index: f,
@@ -826,34 +824,31 @@ var P = {
826
824
  startCutPath: z,
827
825
  endCutPath: B,
828
826
  x0: ee,
829
- y0: H,
830
- x1: te,
831
- y1: ne,
832
- topGradX1: re - ae / 2,
833
- topGradY1: ie - oe / 2,
834
- topGradX2: re + ae / 2,
835
- topGradY2: ie + oe / 2,
836
- wallY1: H,
837
- wallY2: H + u
827
+ y0: te,
828
+ x1: ne,
829
+ y1: re,
830
+ topGradX1: ie - oe / 2,
831
+ topGradY1: ae - se / 2,
832
+ topGradX2: ie + oe / 2,
833
+ topGradY2: ae + se / 2,
834
+ wallY1: te,
835
+ wallY2: te + u
838
836
  });
839
837
  }), r += p;
840
- }), n.sort((e, t) => {
841
- let n = C.value === e.item.id, r = C.value === t.item.id;
842
- return n && !r ? 1 : !n && r ? -1 : e.midY - t.midY;
843
- });
844
- }), rt = r(() => {
838
+ }), n.sort((e, t) => e.midY - t.midY);
839
+ }), ot = r(() => {
845
840
  let e = /* @__PURE__ */ new Set(), t = [];
846
- return $.value.forEach((n) => {
841
+ return at.value.forEach((n) => {
847
842
  e.has(n.item.id) || (e.add(n.item.id), t.push(n));
848
843
  }), t;
849
- }), it = (e) => C.value === e.item.id ? { transform: `translate(${10 * Math.cos(e.originalMidAngle)}px, ${10 * Math.sin(e.originalMidAngle)}px)` } : {}, at = r(() => {
850
- if (Q.value <= .001) return {
844
+ }), st = (e) => C.value === e.item.id ? { transform: `translate(${10 * Math.cos(e.originalMidAngle)}px, ${10 * Math.sin(e.originalMidAngle)}px)` } : {}, ct = r(() => {
845
+ if (X.value <= .001) return {
851
846
  left: [],
852
847
  right: []
853
848
  };
854
849
  let e = [], t = [];
855
- return rt.value.forEach((n) => {
856
- let r = Math.cos(n.originalMidAngle) < 0, i = Math.sin(n.originalMidAngle) > 0, a = Z.value, o = n.y0 + (i ? a : 0), s = n.y1 + (i ? a : 0), c = {
850
+ return ot.value.forEach((n) => {
851
+ let r = Math.cos(n.originalMidAngle) < 0, i = Math.sin(n.originalMidAngle) > 0, a = Y.value, o = n.y0 + (i ? a : 0), s = n.y1 + (i ? a : 0), c = {
857
852
  item: n.item,
858
853
  index: n.index,
859
854
  color: n.color,
@@ -871,40 +866,40 @@ var P = {
871
866
  left: e,
872
867
  right: t
873
868
  };
874
- }), ot = r(() => at.value.left), st = r(() => at.value.right), ct = (e) => {
869
+ }), Z = r(() => ct.value.left), Q = r(() => ct.value.right), $ = (e) => {
875
870
  let t = C.value === e.item.id, n = e.x0, r = e.y0, i = e.finalY;
876
871
  if (t) {
877
872
  let t = 10 * Math.cos(e.originalMidAngle || 0), a = 10 * Math.sin(e.originalMidAngle || 0);
878
873
  n += t, r += a, i -= 5;
879
874
  }
880
- let a = n + 30 * Math.cos(e.originalMidAngle || 0), o = r + 30 * Math.sin(e.originalMidAngle || 0), s = e.isLeft, c = Math.sin(e.originalMidAngle || 0) < 0, l = G.value, u = q.value, d = s ? l - u - 15 : l + u + 15, f = s ? Math.min(d, a - 30) : Math.max(d, a + 30);
875
+ let a = n + 30 * Math.cos(e.originalMidAngle || 0), o = r + 30 * Math.sin(e.originalMidAngle || 0), s = e.isLeft, c = Math.sin(e.originalMidAngle || 0) < 0, l = W.value, u = K.value, d = s ? l - u - 15 : l + u + 15, f = s ? Math.min(d, a - 30) : Math.max(d, a + 30);
881
876
  return `M ${n} ${r} C ${a} ${o}, ${f} ${c ? Math.min(o, i) : Math.max(o, i)}, ${s ? 90 : 670} ${i}`;
882
877
  }, lt = (e = 450) => {
883
878
  if (c.currentLowFxMode || c.immediate) {
884
879
  A.value.forEach((e) => {
885
880
  e.value = e.targetValue, e.percentage = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
886
- }), A.value = A.value.filter((e) => e.targetValue > 0), U.value = qe.value;
881
+ }), A.value = A.value.filter((e) => e.targetValue > 0), H.value = Je.value;
887
882
  let e = c.is3D;
888
- G.value = c.isExpanded ? 380 : 60, K.value = c.isExpanded ? 160 : 60, q.value = c.isExpanded ? 180 : 48, J.value = c.isExpanded ? e ? 180 * c.slopeRatio : 180 : e ? 48 * c.slopeRatio : 48, Y.value = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), X.value = c.isExpanded ? e ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : e ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness);
883
+ W.value = c.isExpanded ? 380 : 60, G.value = c.isExpanded ? 160 : 60, K.value = c.isExpanded ? 180 : 48, Qe.value = c.isExpanded ? e ? 180 * c.slopeRatio : 180 : e ? 48 * c.slopeRatio : 48, q.value = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), J.value = c.isExpanded ? e ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : e ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness);
889
884
  let t = c.isExpanded && e ? 32 : 0;
890
- Z.value = e && c.slopeRatio > .5 ? t * (2 - 2 * c.slopeRatio) : t, Qe.value = c.isExpanded ? 760 : 120, $e.value = c.isExpanded ? 320 : 120, Q.value = c.isExpanded && c.showLabels ? 1 : 0, Je.value = !1;
885
+ Y.value = e && c.slopeRatio > .5 ? t * (2 - 2 * c.slopeRatio) : t, et.value = c.isExpanded ? 760 : 120, tt.value = c.isExpanded ? 320 : 120, X.value = c.isExpanded && c.showLabels ? 1 : 0, Ye.value = !1;
891
886
  return;
892
887
  }
893
- u && cancelAnimationFrame(u), Je.value = !0;
894
- let t = performance.now(), n = U.value, r = qe.value, i = G.value, a = K.value, o = q.value, s = J.value, l = Y.value, d = X.value, f = Z.value, p = Qe.value, m = $e.value, h = Q.value, g = c.is3D, _ = c.isExpanded ? 380 : 60, v = c.isExpanded ? 160 : 60, y = c.isExpanded ? 180 : 48, b = c.isExpanded ? g ? 180 * c.slopeRatio : 180 : g ? 48 * c.slopeRatio : 48, x = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), S = c.isExpanded ? g ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : g ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness), C = c.isExpanded && g ? 32 : 0, w = g && c.slopeRatio > .5 ? C * (2 - 2 * c.slopeRatio) : C, T = c.isExpanded ? 760 : 120, E = c.isExpanded ? 320 : 120, D = c.isExpanded && c.showLabels ? 1 : 0, O = (c) => {
888
+ u && cancelAnimationFrame(u), Ye.value = !0;
889
+ let t = performance.now(), n = H.value, r = Je.value, i = W.value, a = G.value, o = K.value, s = Qe.value, l = q.value, d = J.value, f = Y.value, p = et.value, m = tt.value, h = X.value, g = c.is3D, _ = c.isExpanded ? 380 : 60, v = c.isExpanded ? 160 : 60, y = c.isExpanded ? 180 : 48, b = c.isExpanded ? g ? 180 * c.slopeRatio : 180 : g ? 48 * c.slopeRatio : 48, x = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), S = c.isExpanded ? g ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : g ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness), C = c.isExpanded && g ? 32 : 0, w = g && c.slopeRatio > .5 ? C * (2 - 2 * c.slopeRatio) : C, T = c.isExpanded ? 760 : 120, E = c.isExpanded ? 320 : 120, D = c.isExpanded && c.showLabels ? 1 : 0, O = (c) => {
895
890
  let g = c - t, C = Math.min(1, g / e), k = 1 - (1 - C) ** 3;
896
891
  A.value.forEach((e) => {
897
892
  e.value = e.startValue + (e.targetValue - e.startValue) * k;
898
893
  let t = e.startPercentage === void 0 ? 0 : e.startPercentage, n = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
899
894
  e.percentage = Math.round(t + (n - t) * k);
900
- }), U.value = n + (r - n) * k, G.value = i + (_ - i) * k, K.value = a + (v - a) * k, q.value = o + (y - o) * k, J.value = s + (b - s) * k, Y.value = l + (x - l) * k, X.value = d + (S - d) * k, Z.value = f + (w - f) * k, Qe.value = p + (T - p) * k, $e.value = m + (E - m) * k, Q.value = h + (D - h) * k, C < 1 ? u = requestAnimationFrame(O) : (u = null, A.value.forEach((e) => {
895
+ }), H.value = n + (r - n) * k, W.value = i + (_ - i) * k, G.value = a + (v - a) * k, K.value = o + (y - o) * k, Qe.value = s + (b - s) * k, q.value = l + (x - l) * k, J.value = d + (S - d) * k, Y.value = f + (w - f) * k, et.value = p + (T - p) * k, tt.value = m + (E - m) * k, X.value = h + (D - h) * k, C < 1 ? u = requestAnimationFrame(O) : (u = null, A.value.forEach((e) => {
901
896
  e.value = e.targetValue, e.percentage = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
902
- }), A.value = A.value.filter((e) => e.targetValue > 0), G.value = _, K.value = v, q.value = y, J.value = b, Y.value = x, X.value = S, Z.value = w, Qe.value = T, $e.value = E, Q.value = D, Je.value = !1);
897
+ }), A.value = A.value.filter((e) => e.targetValue > 0), W.value = _, G.value = v, K.value = y, Qe.value = b, q.value = x, J.value = S, Y.value = w, et.value = T, tt.value = E, X.value = D, Ye.value = !1);
903
898
  };
904
899
  u = requestAnimationFrame(O);
905
900
  }, ut = (e) => {
906
901
  if (e.isSingleSlice) return !0;
907
- let t = $.value, n = -1;
902
+ let t = at.value, n = -1;
908
903
  for (let r = t.length - 1; r >= 0; r--) if (t[r].item.id === e.item.id) {
909
904
  n = r;
910
905
  break;
@@ -913,16 +908,16 @@ var P = {
913
908
  };
914
909
  return w(B, (e) => {
915
910
  let t = c.immediate || c.currentLowFxMode;
916
- Ge(e || [], t), t || lt();
911
+ Ke(e || [], t), t || lt();
917
912
  }, {
918
913
  deep: !0,
919
914
  immediate: !0
920
915
  }), w(() => c.rotationAngle, () => {
921
- Ye.value = !0, Xe && clearTimeout(Xe), Xe = setTimeout(() => {
922
- Ye.value = !1;
916
+ Xe.value = !0, Ze && clearTimeout(Ze), Ze = setTimeout(() => {
917
+ Xe.value = !1;
923
918
  }, 100);
924
- }), w(qe, (e) => {
925
- c.immediate || c.currentLowFxMode ? U.value = e : lt();
919
+ }), w(Je, (e) => {
920
+ c.immediate || c.currentLowFxMode ? H.value = e : lt();
926
921
  }), w(() => c.isExpanded, () => {
927
922
  d(() => {
928
923
  lt();
@@ -937,15 +932,15 @@ var P = {
937
932
  });
938
933
  }), w(() => c.slopeRatio, (e) => {
939
934
  if (c.is3D) {
940
- J.value = c.isExpanded ? 180 * e : 48;
935
+ Qe.value = c.isExpanded ? 180 * e : 48;
941
936
  let t = c.isExpanded ? 180 : 48, n = c.isExpanded ? 180 * e : 48;
942
- Y.value = t * (1 - c.thickness), X.value = n * (1 - c.thickness);
937
+ q.value = t * (1 - c.thickness), J.value = n * (1 - c.thickness);
943
938
  let r = c.isExpanded ? 32 : 0;
944
- Z.value = e > .5 ? r * (2 - 2 * e) : r;
939
+ Y.value = e > .5 ? r * (2 - 2 * e) : r;
945
940
  }
946
941
  }), w(() => c.thickness, (e) => {
947
942
  let t = c.is3D, n = c.isExpanded ? 180 : 48, r = c.isExpanded ? t ? 180 * c.slopeRatio : 180 : t ? 48 * c.slopeRatio : 48;
948
- Y.value = n * (1 - e), X.value = r * (1 - e);
943
+ q.value = n * (1 - e), J.value = r * (1 - e);
949
944
  }), w(() => c.hoveredItemId, (e) => {
950
945
  _.value !== e && (_.value = e);
951
946
  }), w(_, (e) => {
@@ -965,14 +960,14 @@ var P = {
965
960
  ref: O,
966
961
  class: f(["donut-canvas-wrapper", {
967
962
  "is-expanded": t.isExpanded,
968
- "no-transitions": Je.value || Ye.value || t.immediate
963
+ "no-transitions": Ye.value || Xe.value || t.immediate
969
964
  }])
970
965
  }, [(g(), o("svg", {
971
- viewBox: `0 0 ${Qe.value} ${$e.value}`,
966
+ viewBox: `0 0 ${et.value} ${tt.value}`,
972
967
  class: "items-svg-chart",
973
968
  xmlns: "http://www.w3.org/2000/svg"
974
- }, [B.value && B.value.length > 0 ? (g(), o("defs", H, [
975
- (g(!0), o(e, null, y(rt.value, (e) => (g(), o("linearGradient", {
969
+ }, [B.value && B.value.length > 0 ? (g(), o("defs", te, [
970
+ (g(!0), o(e, null, y(ot.value, (e) => (g(), o("linearGradient", {
976
971
  key: "top-grad-" + z(e.item.id),
977
972
  id: "top-grad-" + z(e.item.id),
978
973
  gradientUnits: "userSpaceOnUse",
@@ -983,11 +978,11 @@ var P = {
983
978
  }, [s("stop", {
984
979
  offset: "0%",
985
980
  "stop-color": P(e.color, 1.15)
986
- }, null, 8, ne), s("stop", {
981
+ }, null, 8, re), s("stop", {
987
982
  offset: "100%",
988
983
  "stop-color": N(e.color, .85)
989
- }, null, 8, re)], 8, te))), 128)),
990
- (g(!0), o(e, null, y(rt.value, (e) => (g(), o("linearGradient", {
984
+ }, null, 8, ie)], 8, ne))), 128)),
985
+ (g(!0), o(e, null, y(ot.value, (e) => (g(), o("linearGradient", {
991
986
  key: "outer-grad-" + z(e.item.id),
992
987
  id: "outer-grad-" + z(e.item.id),
993
988
  gradientUnits: "userSpaceOnUse",
@@ -998,11 +993,11 @@ var P = {
998
993
  }, [s("stop", {
999
994
  offset: "0%",
1000
995
  "stop-color": N(e.color, .75)
1001
- }, null, 8, ae), s("stop", {
996
+ }, null, 8, oe), s("stop", {
1002
997
  offset: "100%",
1003
998
  "stop-color": N(e.color, .5)
1004
- }, null, 8, oe)], 8, ie))), 128)),
1005
- (g(!0), o(e, null, y(rt.value, (e) => (g(), o("linearGradient", {
999
+ }, null, 8, se)], 8, ae))), 128)),
1000
+ (g(!0), o(e, null, y(ot.value, (e) => (g(), o("linearGradient", {
1006
1001
  key: "inner-grad-" + z(e.item.id),
1007
1002
  id: "inner-grad-" + z(e.item.id),
1008
1003
  gradientUnits: "userSpaceOnUse",
@@ -1013,11 +1008,11 @@ var P = {
1013
1008
  }, [s("stop", {
1014
1009
  offset: "0%",
1015
1010
  "stop-color": N(e.color, .6)
1016
- }, null, 8, ce), s("stop", {
1011
+ }, null, 8, le), s("stop", {
1017
1012
  offset: "100%",
1018
1013
  "stop-color": N(e.color, .4)
1019
- }, null, 8, le)], 8, se))), 128))
1020
- ])) : a("", !0), !B.value || B.value.length === 0 ? (g(), o("g", ue, [s("text", {
1014
+ }, null, 8, ue)], 8, ce))), 128))
1015
+ ])) : a("", !0), !B.value || B.value.length === 0 ? (g(), o("g", de, [s("text", {
1021
1016
  x: t.isExpanded ? 380 : 60,
1022
1017
  y: t.isExpanded ? 160 : 60,
1023
1018
  fill: "#64748b",
@@ -1025,20 +1020,20 @@ var P = {
1025
1020
  "font-family": "system-ui, -apple-system, sans-serif",
1026
1021
  "text-anchor": "middle",
1027
1022
  "dominant-baseline": "middle"
1028
- }, S(t.emptyText || "No data"), 9, de)])) : (g(), o("g", fe, [
1029
- (g(!0), o(e, null, y($.value.filter((e) => e.midY < nt.value), (e) => (g(), o("g", {
1023
+ }, S(t.emptyText || "No data"), 9, fe)])) : (g(), o("g", pe, [
1024
+ (g(!0), o(e, null, y(at.value.filter((e) => e.midY < it.value), (e) => (g(), o("g", {
1030
1025
  key: "slice-sub-back-" + e.item.id + "-" + e.midAngle,
1031
1026
  class: f(["slice-group-3d", {
1032
1027
  "is-hovered": C.value === e.item.id,
1033
1028
  "is-dimmed": C.value !== null && C.value !== e.item.id
1034
1029
  }]),
1035
- style: p(it(e))
1030
+ style: p(st(e))
1036
1031
  }, [
1037
1032
  t.isExpanded && e.innerWallPath ? (g(), o("path", {
1038
1033
  key: 0,
1039
1034
  d: e.innerWallPath,
1040
1035
  fill: `url(#inner-grad-${z(e.item.id)})`
1041
- }, null, 8, pe)) : a("", !0),
1036
+ }, null, 8, me)) : a("", !0),
1042
1037
  t.isExpanded && e.innerWallStrokePath ? (g(), o("path", {
1043
1038
  key: 1,
1044
1039
  d: e.innerWallStrokePath,
@@ -1046,22 +1041,22 @@ var P = {
1046
1041
  stroke: `url(#inner-grad-${z(e.item.id)})`,
1047
1042
  "stroke-width": "0.8",
1048
1043
  "stroke-linejoin": "round"
1049
- }, null, 8, me)) : a("", !0),
1044
+ }, null, 8, he)) : a("", !0),
1050
1045
  t.isExpanded && e.startCutPath ? (g(), o("path", {
1051
1046
  key: 2,
1052
1047
  d: e.startCutPath,
1053
1048
  fill: N(e.color, .65)
1054
- }, null, 8, he)) : a("", !0),
1049
+ }, null, 8, ge)) : a("", !0),
1055
1050
  t.isExpanded && e.endCutPath ? (g(), o("path", {
1056
1051
  key: 3,
1057
1052
  d: e.endCutPath,
1058
1053
  fill: N(e.color, .75)
1059
- }, null, 8, ge)) : a("", !0),
1054
+ }, null, 8, _e)) : a("", !0),
1060
1055
  t.isExpanded && e.outerWallPath ? (g(), o("path", {
1061
1056
  key: 4,
1062
1057
  d: e.outerWallPath,
1063
1058
  fill: `url(#outer-grad-${z(e.item.id)})`
1064
- }, null, 8, _e)) : a("", !0),
1059
+ }, null, 8, ve)) : a("", !0),
1065
1060
  t.isExpanded && e.outerWallStrokePath ? (g(), o("path", {
1066
1061
  key: 5,
1067
1062
  d: e.outerWallStrokePath,
@@ -1069,12 +1064,12 @@ var P = {
1069
1064
  stroke: `url(#outer-grad-${z(e.item.id)})`,
1070
1065
  "stroke-width": "0.8",
1071
1066
  "stroke-linejoin": "round"
1072
- }, null, 8, ve)) : a("", !0),
1067
+ }, null, 8, ye)) : a("", !0),
1073
1068
  ut(e) ? (g(), o("path", {
1074
1069
  key: 6,
1075
1070
  d: e.originalTopPath,
1076
1071
  fill: `url(#top-grad-${z(e.item.id)})`
1077
- }, null, 8, ye)) : a("", !0),
1072
+ }, null, 8, be)) : a("", !0),
1078
1073
  ut(e) ? (g(), o("path", {
1079
1074
  key: 7,
1080
1075
  d: e.topStrokePath,
@@ -1082,7 +1077,7 @@ var P = {
1082
1077
  stroke: `url(#top-grad-${z(e.item.id)})`,
1083
1078
  "stroke-width": "0.8",
1084
1079
  "stroke-linejoin": "round"
1085
- }, null, 8, be)) : a("", !0),
1080
+ }, null, 8, xe)) : a("", !0),
1086
1081
  ut(e) ? (g(), o("path", {
1087
1082
  key: 8,
1088
1083
  d: e.topStrokePath,
@@ -1090,44 +1085,44 @@ var P = {
1090
1085
  stroke: "rgba(255, 255, 255, 0.16)",
1091
1086
  "stroke-width": t.isExpanded ? .8 : .5,
1092
1087
  "stroke-linejoin": "round"
1093
- }, null, 8, xe)) : a("", !0)
1088
+ }, null, 8, Se)) : a("", !0)
1094
1089
  ], 6))), 128)),
1095
1090
  c.showCenterText ? (g(), o("g", {
1096
1091
  key: 0,
1097
- transform: `translate(${G.value}, ${K.value})`,
1092
+ transform: `translate(${W.value}, ${G.value})`,
1098
1093
  class: "center-text-group"
1099
1094
  }, [s("text", {
1100
1095
  x: "0",
1101
1096
  y: "-3",
1102
1097
  class: "center-text-value",
1103
- "font-size": et.value,
1098
+ "font-size": nt.value,
1104
1099
  "font-weight": "bold",
1105
1100
  "font-family": "'JetBrains Mono', monospace",
1106
1101
  "text-anchor": "middle",
1107
1102
  "dominant-baseline": "middle"
1108
- }, S(Ue.value), 9, Ce), s("text", {
1103
+ }, S(We.value), 9, we), s("text", {
1109
1104
  x: "0",
1110
1105
  y: "10",
1111
1106
  class: "center-text-label",
1112
- "font-size": tt.value,
1107
+ "font-size": rt.value,
1113
1108
  "font-family": "system-ui, -apple-system, sans-serif",
1114
1109
  "font-weight": "600",
1115
1110
  "text-anchor": "middle",
1116
1111
  "dominant-baseline": "middle"
1117
- }, S(We.value), 9, we)], 8, Se)) : a("", !0),
1118
- (g(!0), o(e, null, y($.value.filter((e) => e.midY >= nt.value), (e) => (g(), o("g", {
1112
+ }, S(Ge.value), 9, Te)], 8, Ce)) : a("", !0),
1113
+ (g(!0), o(e, null, y(at.value.filter((e) => e.midY >= it.value), (e) => (g(), o("g", {
1119
1114
  key: "slice-sub-front-" + e.item.id + "-" + e.midAngle,
1120
1115
  class: f(["slice-group-3d", {
1121
1116
  "is-hovered": C.value === e.item.id,
1122
1117
  "is-dimmed": C.value !== null && C.value !== e.item.id
1123
1118
  }]),
1124
- style: p(it(e))
1119
+ style: p(st(e))
1125
1120
  }, [
1126
1121
  t.isExpanded && e.innerWallPath ? (g(), o("path", {
1127
1122
  key: 0,
1128
1123
  d: e.innerWallPath,
1129
1124
  fill: `url(#inner-grad-${z(e.item.id)})`
1130
- }, null, 8, Te)) : a("", !0),
1125
+ }, null, 8, Ee)) : a("", !0),
1131
1126
  t.isExpanded && e.innerWallStrokePath ? (g(), o("path", {
1132
1127
  key: 1,
1133
1128
  d: e.innerWallStrokePath,
@@ -1135,22 +1130,22 @@ var P = {
1135
1130
  stroke: `url(#inner-grad-${z(e.item.id)})`,
1136
1131
  "stroke-width": "0.8",
1137
1132
  "stroke-linejoin": "round"
1138
- }, null, 8, Ee)) : a("", !0),
1133
+ }, null, 8, De)) : a("", !0),
1139
1134
  t.isExpanded && e.startCutPath ? (g(), o("path", {
1140
1135
  key: 2,
1141
1136
  d: e.startCutPath,
1142
1137
  fill: N(e.color, .65)
1143
- }, null, 8, De)) : a("", !0),
1138
+ }, null, 8, Oe)) : a("", !0),
1144
1139
  t.isExpanded && e.endCutPath ? (g(), o("path", {
1145
1140
  key: 3,
1146
1141
  d: e.endCutPath,
1147
1142
  fill: N(e.color, .75)
1148
- }, null, 8, Oe)) : a("", !0),
1143
+ }, null, 8, ke)) : a("", !0),
1149
1144
  t.isExpanded && e.outerWallPath ? (g(), o("path", {
1150
1145
  key: 4,
1151
1146
  d: e.outerWallPath,
1152
1147
  fill: `url(#outer-grad-${z(e.item.id)})`
1153
- }, null, 8, ke)) : a("", !0),
1148
+ }, null, 8, Ae)) : a("", !0),
1154
1149
  t.isExpanded && e.outerWallStrokePath ? (g(), o("path", {
1155
1150
  key: 5,
1156
1151
  d: e.outerWallStrokePath,
@@ -1158,12 +1153,12 @@ var P = {
1158
1153
  stroke: `url(#outer-grad-${z(e.item.id)})`,
1159
1154
  "stroke-width": "0.8",
1160
1155
  "stroke-linejoin": "round"
1161
- }, null, 8, Ae)) : a("", !0),
1156
+ }, null, 8, je)) : a("", !0),
1162
1157
  ut(e) ? (g(), o("path", {
1163
1158
  key: 6,
1164
1159
  d: e.originalTopPath,
1165
1160
  fill: `url(#top-grad-${z(e.item.id)})`
1166
- }, null, 8, je)) : a("", !0),
1161
+ }, null, 8, Me)) : a("", !0),
1167
1162
  ut(e) ? (g(), o("path", {
1168
1163
  key: 7,
1169
1164
  d: e.topStrokePath,
@@ -1171,7 +1166,7 @@ var P = {
1171
1166
  stroke: `url(#top-grad-${z(e.item.id)})`,
1172
1167
  "stroke-width": "0.8",
1173
1168
  "stroke-linejoin": "round"
1174
- }, null, 8, Me)) : a("", !0),
1169
+ }, null, 8, Ne)) : a("", !0),
1175
1170
  ut(e) ? (g(), o("path", {
1176
1171
  key: 8,
1177
1172
  d: e.topStrokePath,
@@ -1179,9 +1174,9 @@ var P = {
1179
1174
  stroke: "rgba(255, 255, 255, 0.16)",
1180
1175
  "stroke-width": t.isExpanded ? .8 : .5,
1181
1176
  "stroke-linejoin": "round"
1182
- }, null, 8, Ne)) : a("", !0)
1177
+ }, null, 8, Pe)) : a("", !0)
1183
1178
  ], 6))), 128)),
1184
- (g(!0), o(e, null, y(rt.value, (e) => (g(), o("g", {
1179
+ (g(!0), o(e, null, y(ot.value, (e) => (g(), o("g", {
1185
1180
  key: "hover-trigger-" + e.item.id,
1186
1181
  class: "hover-trigger-group",
1187
1182
  style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" }),
@@ -1191,18 +1186,18 @@ var P = {
1191
1186
  }, [s("path", {
1192
1187
  d: e.hoverPath || e.originalTopPath,
1193
1188
  fill: "transparent"
1194
- }, null, 8, Fe), e.originalOuterWallPath ? (g(), o("path", {
1189
+ }, null, 8, Ie), e.originalOuterWallPath ? (g(), o("path", {
1195
1190
  key: 0,
1196
1191
  d: e.originalOuterWallPath,
1197
1192
  fill: "transparent"
1198
- }, null, 8, Ie)) : a("", !0)], 44, Pe))), 128)),
1193
+ }, null, 8, Le)) : a("", !0)], 44, Fe))), 128)),
1199
1194
  s("g", {
1200
1195
  class: "labels-layer",
1201
1196
  style: p({
1202
- opacity: Q.value,
1203
- pointerEvents: Q.value > .01 ? "auto" : "none"
1197
+ opacity: X.value,
1198
+ pointerEvents: X.value > .01 ? "auto" : "none"
1204
1199
  })
1205
- }, [(g(!0), o(e, null, y(ot.value, (e, t) => (g(), o("g", {
1200
+ }, [(g(!0), o(e, null, y(Z.value, (e, t) => (g(), o("g", {
1206
1201
  key: "label-left-" + e.item.id,
1207
1202
  class: f(["label-group", {
1208
1203
  "is-hovered": C.value === e.item.id,
@@ -1213,11 +1208,11 @@ var P = {
1213
1208
  onClick: (t) => E(e.item.id),
1214
1209
  style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" })
1215
1210
  }, [s("path", {
1216
- d: ct(e),
1211
+ d: $(e),
1217
1212
  fill: "none",
1218
1213
  stroke: e.color,
1219
1214
  "stroke-width": "1.2"
1220
- }, null, 8, Re), s("text", {
1215
+ }, null, 8, ze), s("text", {
1221
1216
  x: "85",
1222
1217
  y: e.finalY,
1223
1218
  fill: e.color,
@@ -1227,7 +1222,7 @@ var P = {
1227
1222
  "text-anchor": "end",
1228
1223
  "dominant-baseline": "middle",
1229
1224
  style: p(C.value === e.item.id ? "transform: translate(0, -5px);" : "")
1230
- }, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, ze)], 46, Le))), 128)), (g(!0), o(e, null, y(st.value, (e, t) => (g(), o("g", {
1225
+ }, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, Be)], 46, Re))), 128)), (g(!0), o(e, null, y(Q.value, (e, t) => (g(), o("g", {
1231
1226
  key: "label-right-" + e.item.id,
1232
1227
  class: f(["label-group", {
1233
1228
  "is-hovered": C.value === e.item.id,
@@ -1238,11 +1233,11 @@ var P = {
1238
1233
  onClick: (t) => E(e.item.id),
1239
1234
  style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" })
1240
1235
  }, [s("path", {
1241
- d: ct(e),
1236
+ d: $(e),
1242
1237
  fill: "none",
1243
1238
  stroke: e.color,
1244
1239
  "stroke-width": "1.2"
1245
- }, null, 8, Ve), s("text", {
1240
+ }, null, 8, He), s("text", {
1246
1241
  x: "675",
1247
1242
  y: e.finalY,
1248
1243
  fill: e.color,
@@ -1252,21 +1247,21 @@ var P = {
1252
1247
  "text-anchor": "start",
1253
1248
  "dominant-baseline": "middle",
1254
1249
  style: p(C.value === e.item.id ? "transform: translate(0, -5px);" : "")
1255
- }, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, He)], 46, Be))), 128))], 4)
1250
+ }, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, Ue)], 46, Ve))), 128))], 4)
1256
1251
  ]))], 8, ee))], 2));
1257
1252
  }
1258
- }, [["__scopeId", "data-v-f4b6c80f"]]), We = { class: "nano-scrub-label" }, Ge = {
1253
+ }, [["__scopeId", "data-v-acd0447d"]]), Ge = { class: "nano-scrub-label" }, Ke = {
1259
1254
  key: 0,
1260
1255
  class: "nano-scrub-overlay"
1261
- }, Ke = {
1256
+ }, qe = {
1262
1257
  key: 1,
1263
1258
  class: "nano-scrub-svg-line"
1264
- }, qe = [
1259
+ }, Je = [
1265
1260
  "x1",
1266
1261
  "y1",
1267
1262
  "x2",
1268
1263
  "y2"
1269
- ], U = { class: "nano-scrub-popup-val" }, Je = { class: "nano-scrub-popup-res" }, Ye = /* @__PURE__ */ F(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1264
+ ], H = { class: "nano-scrub-popup-val" }, Ye = { class: "nano-scrub-popup-res" }, Xe = /* @__PURE__ */ F(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1270
1265
  __name: "PrecisionScrubber",
1271
1266
  props: {
1272
1267
  modelValue: {
@@ -1344,7 +1339,7 @@ var P = {
1344
1339
  }, r.$attrs), [s("div", {
1345
1340
  class: "nano-scrub-progress",
1346
1341
  style: p({ width: O.value + "%" })
1347
- }, null, 4), s("span", We, S(n.label), 1)], 16), (g(), i(t, { to: "body" }, [m.value ? (g(), o("div", Ge, [
1342
+ }, null, 4), s("span", Ge, S(n.label), 1)], 16), (g(), i(t, { to: "body" }, [m.value ? (g(), o("div", Ke, [
1348
1343
  h.value ? (g(), o("div", {
1349
1344
  key: 0,
1350
1345
  class: "nano-scrub-anchor",
@@ -1353,7 +1348,7 @@ var P = {
1353
1348
  top: x.value + "px"
1354
1349
  })
1355
1350
  }, null, 4)) : a("", !0),
1356
- h.value ? (g(), o("svg", Ke, [s("line", {
1351
+ h.value ? (g(), o("svg", qe, [s("line", {
1357
1352
  x1: b.value,
1358
1353
  y1: x.value,
1359
1354
  x2: w.value,
@@ -1362,7 +1357,7 @@ var P = {
1362
1357
  "stroke-dasharray": "4,4",
1363
1358
  "stroke-width": "1.5",
1364
1359
  opacity: "0.6"
1365
- }, null, 8, qe)])) : a("", !0),
1360
+ }, null, 8, Je)])) : a("", !0),
1366
1361
  s("div", {
1367
1362
  class: "nano-scrub-popup",
1368
1363
  style: p({
@@ -1371,17 +1366,439 @@ var P = {
1371
1366
  })
1372
1367
  }, [
1373
1368
  c[0] ||= s("div", { class: "nano-scrub-popup-title" }, "Scrubbing Mode", -1),
1374
- s("div", U, S(k.value), 1),
1375
- s("div", Je, S(E.value), 1)
1369
+ s("div", H, S(k.value), 1),
1370
+ s("div", Ye, S(E.value), 1)
1376
1371
  ], 4)
1377
1372
  ])) : a("", !0)]))], 64));
1378
1373
  }
1379
- }), [["__scopeId", "data-v-429ba0d9"]]);
1374
+ }), [["__scopeId", "data-v-21b41bc4"]]), Ze = { class: "header-inner" }, U = {
1375
+ key: 0,
1376
+ class: "header-left"
1377
+ }, W = {
1378
+ key: 1,
1379
+ class: "header-center"
1380
+ }, G = {
1381
+ key: 2,
1382
+ class: "header-right"
1383
+ }, K = /* @__PURE__ */ F({
1384
+ __name: "MutatingHeader",
1385
+ props: {
1386
+ threshold: {
1387
+ type: Number,
1388
+ default: 24
1389
+ },
1390
+ hysteresis: {
1391
+ type: Number,
1392
+ default: 8
1393
+ },
1394
+ scrollContainer: {
1395
+ type: [String, Object],
1396
+ default: null
1397
+ },
1398
+ height: {
1399
+ type: String,
1400
+ default: "60px"
1401
+ },
1402
+ floatingMargin: {
1403
+ type: String,
1404
+ default: "12px 24px 0 24px"
1405
+ },
1406
+ floatingRadius: {
1407
+ type: String,
1408
+ default: "16px"
1409
+ },
1410
+ glassmorphism: {
1411
+ type: Boolean,
1412
+ default: !0
1413
+ },
1414
+ stuck: {
1415
+ type: Boolean,
1416
+ default: void 0
1417
+ }
1418
+ },
1419
+ emits: [
1420
+ "update:stuck",
1421
+ "stuck",
1422
+ "unstick"
1423
+ ],
1424
+ setup(e, { emit: t }) {
1425
+ let n = e, i = t, c = v(!1), l = r({
1426
+ get: () => n.stuck === void 0 ? c.value : n.stuck,
1427
+ set: (e) => {
1428
+ c.value = e, i("update:stuck", e), i(e ? "stuck" : "unstick");
1429
+ }
1430
+ }), u = null, d = () => u && u !== window ? u.scrollTop || 0 : window.scrollY || document.documentElement.scrollTop || 0, _ = () => {
1431
+ let e = d(), t = n.threshold, r = n.hysteresis;
1432
+ !l.value && e > t ? l.value = !0 : l.value && e < r && (l.value = !1);
1433
+ }, y = () => {
1434
+ x(), !(typeof window > "u") && (n.scrollContainer && (typeof n.scrollContainer == "string" ? u = document.querySelector(n.scrollContainer) : n.scrollContainer instanceof HTMLElement && (u = n.scrollContainer)), u ||= window, u.addEventListener("scroll", _, { passive: !0 }), _());
1435
+ }, x = () => {
1436
+ u &&= (u.removeEventListener("scroll", _), null);
1437
+ };
1438
+ return w(() => n.scrollContainer, () => {
1439
+ y();
1440
+ }), m(() => {
1441
+ y();
1442
+ }), h(() => {
1443
+ x();
1444
+ }), (t, n) => (g(), o("header", {
1445
+ class: f(["nano-mutating-header", {
1446
+ "is-stuck": l.value,
1447
+ "has-glassmorphism": e.glassmorphism
1448
+ }]),
1449
+ style: p({
1450
+ "--header-height": e.height,
1451
+ "--floating-margin": e.floatingMargin,
1452
+ "--floating-radius": e.floatingRadius
1453
+ })
1454
+ }, [s("div", Ze, [
1455
+ t.$slots.left ? (g(), o("div", U, [b(t.$slots, "left", { isStuck: l.value }, void 0, !0)])) : a("", !0),
1456
+ t.$slots.center ? (g(), o("div", W, [b(t.$slots, "center", { isStuck: l.value }, void 0, !0)])) : a("", !0),
1457
+ t.$slots.right ? (g(), o("div", G, [b(t.$slots, "right", { isStuck: l.value }, void 0, !0)])) : a("", !0),
1458
+ !t.$slots.left && !t.$slots.center && !t.$slots.right ? b(t.$slots, "default", {
1459
+ key: 3,
1460
+ isStuck: l.value
1461
+ }, void 0, !0) : a("", !0)
1462
+ ])], 6));
1463
+ }
1464
+ }, [["__scopeId", "data-v-fd47d0d0"]]), Qe = [
1465
+ "viewBox",
1466
+ "width",
1467
+ "height"
1468
+ ], q = ["points"], J = ["points"], $e = ["points"], Y = ["points"], et = [
1469
+ "x1",
1470
+ "y1",
1471
+ "x2",
1472
+ "y2"
1473
+ ], tt = ["x", "y"], X = [
1474
+ "points",
1475
+ "fill",
1476
+ "stroke",
1477
+ "opacity"
1478
+ ], nt = [
1479
+ "points",
1480
+ "fill",
1481
+ "stroke"
1482
+ ], rt = [
1483
+ "cx",
1484
+ "cy",
1485
+ "fill"
1486
+ ], it = /* @__PURE__ */ F({
1487
+ __name: "TopologyRadar",
1488
+ props: {
1489
+ size: {
1490
+ type: Number,
1491
+ default: 200
1492
+ },
1493
+ history: {
1494
+ type: Array,
1495
+ required: !0
1496
+ },
1497
+ labels: {
1498
+ type: Array,
1499
+ default: () => []
1500
+ },
1501
+ color: {
1502
+ type: String,
1503
+ default: "#00e5ff"
1504
+ }
1505
+ },
1506
+ setup(t) {
1507
+ let n = t, i = r(() => n.labels.length > 0 ? n.labels.length : n.history.length > 0 ? n.history[0].length : 5), c = r(() => n.size * .4), l = r(() => n.size / 2), u = r(() => n.size / 2), d = (e, t) => {
1508
+ let n = Math.PI * 2 * t / i.value - Math.PI / 2, r = e / 100 * c.value;
1509
+ return {
1510
+ x: l.value + Math.cos(n) * r,
1511
+ y: u.value + Math.sin(n) * r
1512
+ };
1513
+ }, f = (e) => {
1514
+ let t = [];
1515
+ for (let n = 0; n < i.value; n++) {
1516
+ let r = d(e * 100, n);
1517
+ t.push(`${r.x},${r.y}`);
1518
+ }
1519
+ return t.join(" ");
1520
+ }, m = (e) => e.map((e, t) => {
1521
+ let n = d(e, t);
1522
+ return `${n.x},${n.y}`;
1523
+ }).join(" "), h = (e, t) => {
1524
+ let n;
1525
+ return /^#([A-Fa-f0-9]{3}){1,2}$/.test(e) ? (n = e.substring(1).split(""), n.length === 3 && (n = [
1526
+ n[0],
1527
+ n[0],
1528
+ n[1],
1529
+ n[1],
1530
+ n[2],
1531
+ n[2]
1532
+ ]), n = "0x" + n.join(""), "rgba(" + [
1533
+ n >> 16 & 255,
1534
+ n >> 8 & 255,
1535
+ n & 255
1536
+ ].join(",") + "," + t + ")") : `rgba(0, 229, 255, ${t})`;
1537
+ };
1538
+ return (n, r) => (g(), o("div", {
1539
+ class: "topology-radar-container",
1540
+ style: p({
1541
+ width: t.size + "px",
1542
+ height: t.size + "px"
1543
+ })
1544
+ }, [(g(), o("svg", {
1545
+ viewBox: `0 0 ${t.size} ${t.size}`,
1546
+ width: t.size,
1547
+ height: t.size,
1548
+ style: { overflow: "visible" }
1549
+ }, [
1550
+ s("polygon", {
1551
+ points: f(1),
1552
+ fill: "var(--nano-radar-grid-bg, rgba(15,23,42,0.8))",
1553
+ stroke: "var(--nano-radar-grid-stroke, rgba(255,255,255,0.1))",
1554
+ "stroke-width": "1"
1555
+ }, null, 8, q),
1556
+ s("polygon", {
1557
+ points: f(.75),
1558
+ fill: "none",
1559
+ stroke: "var(--nano-radar-grid-subtle, rgba(255,255,255,0.05))",
1560
+ "stroke-width": "1"
1561
+ }, null, 8, J),
1562
+ s("polygon", {
1563
+ points: f(.5),
1564
+ fill: "none",
1565
+ stroke: "var(--nano-radar-grid-subtle, rgba(255,255,255,0.05))",
1566
+ "stroke-width": "1"
1567
+ }, null, 8, $e),
1568
+ s("polygon", {
1569
+ points: f(.25),
1570
+ fill: "none",
1571
+ stroke: "var(--nano-radar-grid-subtle, rgba(255,255,255,0.05))",
1572
+ "stroke-width": "1"
1573
+ }, null, 8, Y),
1574
+ (g(!0), o(e, null, y(t.labels, (e, n) => (g(), o("line", {
1575
+ key: "axis-" + n,
1576
+ x1: t.size / 2,
1577
+ y1: t.size / 2,
1578
+ x2: d(100, n).x,
1579
+ y2: d(100, n).y,
1580
+ stroke: "var(--nano-radar-grid-stroke, rgba(255,255,255,0.1))",
1581
+ "stroke-width": "1"
1582
+ }, null, 8, et))), 128)),
1583
+ (g(!0), o(e, null, y(t.labels, (e, t) => (g(), o("text", {
1584
+ key: "label-" + t,
1585
+ x: d(115, t).x,
1586
+ y: d(115, t).y,
1587
+ fill: "var(--nano-radar-text, rgba(255,255,255,0.6))",
1588
+ "font-size": "10",
1589
+ "font-family": "monospace",
1590
+ "font-weight": "bold",
1591
+ "text-anchor": "middle",
1592
+ "dominant-baseline": "middle"
1593
+ }, S(e), 9, tt))), 128)),
1594
+ (g(!0), o(e, null, y(t.history, (e, n) => (g(), o("polygon", {
1595
+ key: "hist-" + n,
1596
+ points: m(e),
1597
+ fill: h(t.color, .02),
1598
+ stroke: t.color,
1599
+ "stroke-width": 1,
1600
+ opacity: .1 + n / Math.max(1, t.history.length) * .4
1601
+ }, null, 8, X))), 128)),
1602
+ t.history.length > 0 ? (g(), o("polygon", {
1603
+ key: 0,
1604
+ points: m(t.history[t.history.length - 1]),
1605
+ fill: h(t.color, .15),
1606
+ stroke: t.color,
1607
+ "stroke-width": "2.5",
1608
+ style: { filter: "drop-shadow(0 0 8px rgba(0, 229, 255, 0.5))" }
1609
+ }, null, 8, nt)) : a("", !0),
1610
+ t.history.length > 0 ? (g(!0), o(e, { key: 1 }, y(t.history[t.history.length - 1], (e, n) => (g(), o("circle", {
1611
+ key: "pt-" + n,
1612
+ cx: d(e, n).x,
1613
+ cy: d(e, n).y,
1614
+ r: "3",
1615
+ fill: t.color,
1616
+ style: { filter: "drop-shadow(0 0 5px rgba(0, 229, 255, 0.8))" }
1617
+ }, null, 8, rt))), 128)) : a("", !0)
1618
+ ], 8, Qe))], 4));
1619
+ }
1620
+ }, [["__scopeId", "data-v-bb4bd598"]]), at = ["for"], ot = [
1621
+ "checked",
1622
+ "disabled",
1623
+ "name",
1624
+ "id",
1625
+ "aria-checked"
1626
+ ], st = {
1627
+ key: 0,
1628
+ class: "nano-switch-label"
1629
+ }, ct = /* @__PURE__ */ F({
1630
+ __name: "NanoSwitch",
1631
+ props: {
1632
+ modelValue: {
1633
+ type: [Boolean, null],
1634
+ default: !1
1635
+ },
1636
+ indeterminate: {
1637
+ type: Boolean,
1638
+ default: !1
1639
+ },
1640
+ label: {
1641
+ type: String,
1642
+ default: ""
1643
+ },
1644
+ size: {
1645
+ type: String,
1646
+ default: "default",
1647
+ validator: (e) => [
1648
+ "default",
1649
+ "compact",
1650
+ "mini"
1651
+ ].includes(e)
1652
+ },
1653
+ color: {
1654
+ type: String,
1655
+ default: "primary"
1656
+ },
1657
+ disabled: {
1658
+ type: Boolean,
1659
+ default: !1
1660
+ },
1661
+ name: {
1662
+ type: String,
1663
+ default: ""
1664
+ },
1665
+ id: {
1666
+ type: String,
1667
+ default: ""
1668
+ }
1669
+ },
1670
+ emits: [
1671
+ "update:modelValue",
1672
+ "update:indeterminate",
1673
+ "change"
1674
+ ],
1675
+ setup(e, { emit: t }) {
1676
+ let n = e, i = t, l = v(null), u = r(() => n.indeterminate || n.modelValue === null), d = r(() => !u.value && !!n.modelValue);
1677
+ w(u, (e) => {
1678
+ l.value && (l.value.indeterminate = e);
1679
+ }, { immediate: !0 });
1680
+ let p = (e) => {
1681
+ if (!n.disabled) if (u.value) i("update:indeterminate", !1), i("update:modelValue", !0), i("change", !0, e);
1682
+ else {
1683
+ let t = !d.value;
1684
+ i("update:modelValue", t), i("change", t, e);
1685
+ }
1686
+ };
1687
+ return (t, n) => (g(), o("label", {
1688
+ class: f(["nano-switch", [
1689
+ `size-${e.size}`,
1690
+ `color-${e.color}`,
1691
+ {
1692
+ "is-checked": d.value,
1693
+ "is-indeterminate": u.value,
1694
+ "is-disabled": e.disabled
1695
+ }
1696
+ ]]),
1697
+ for: e.id || void 0
1698
+ }, [
1699
+ s("input", {
1700
+ ref_key: "inputRef",
1701
+ ref: l,
1702
+ type: "checkbox",
1703
+ class: "nano-switch-input",
1704
+ checked: d.value,
1705
+ disabled: e.disabled,
1706
+ name: e.name || void 0,
1707
+ id: e.id || void 0,
1708
+ onChange: p,
1709
+ role: "switch",
1710
+ "aria-checked": u.value ? "mixed" : d.value
1711
+ }, null, 40, ot),
1712
+ n[0] ||= s("div", { class: "nano-switch-slider" }, null, -1),
1713
+ e.label || t.$slots.default ? (g(), o("span", st, [b(t.$slots, "default", {}, () => [c(S(e.label), 1)], !0)])) : a("", !0)
1714
+ ], 10, at));
1715
+ }
1716
+ }, [["__scopeId", "data-v-50b63887"]]), Z = {
1717
+ instant: 100,
1718
+ fast: 150,
1719
+ normal: 200,
1720
+ toggle: 250,
1721
+ slow: 300,
1722
+ ripple: 600
1723
+ }, Q = {
1724
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
1725
+ smooth: "cubic-bezier(0.16, 1, 0.3, 1)",
1726
+ easeOut: "cubic-bezier(0, 0, 0.2, 1)",
1727
+ easeIn: "cubic-bezier(0.4, 0, 1, 1)",
1728
+ spring: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
1729
+ linear: "linear"
1730
+ }, $ = {
1731
+ interactive: {
1732
+ duration: Z.fast,
1733
+ ease: Q.standard,
1734
+ css: `${Z.fast}ms ${Q.standard}`
1735
+ },
1736
+ toggle: {
1737
+ duration: Z.toggle,
1738
+ ease: Q.standard,
1739
+ css: `${Z.toggle}ms ${Q.standard}`
1740
+ },
1741
+ tooltip: {
1742
+ duration: Z.normal,
1743
+ ease: Q.smooth,
1744
+ css: `${Z.normal}ms ${Q.smooth}`
1745
+ },
1746
+ header: {
1747
+ duration: Z.normal,
1748
+ ease: Q.smooth,
1749
+ css: `${Z.normal}ms ${Q.smooth}`
1750
+ },
1751
+ chart: {
1752
+ duration: Z.toggle,
1753
+ ease: Q.standard,
1754
+ css: `${Z.toggle}ms ${Q.standard}`
1755
+ },
1756
+ modal: {
1757
+ backdrop: {
1758
+ duration: Z.toggle,
1759
+ ease: Q.easeOut,
1760
+ css: `${Z.toggle}ms ${Q.easeOut}`
1761
+ },
1762
+ enter: {
1763
+ duration: Z.slow,
1764
+ ease: Q.spring,
1765
+ css: `${Z.slow}ms ${Q.spring}`
1766
+ },
1767
+ leave: {
1768
+ duration: Z.normal,
1769
+ ease: Q.easeIn,
1770
+ css: `${Z.normal}ms ${Q.easeIn}`
1771
+ }
1772
+ },
1773
+ ripple: {
1774
+ duration: Z.ripple,
1775
+ ease: Q.linear,
1776
+ css: `${Z.ripple}ms ${Q.linear}`
1777
+ }
1778
+ }, lt = {
1779
+ "--nano-duration-fast": `${Z.fast}ms`,
1780
+ "--nano-duration": `${Z.normal}ms`,
1781
+ "--nano-duration-toggle": `${Z.toggle}ms`,
1782
+ "--nano-duration-slow": `${Z.slow}ms`,
1783
+ "--nano-duration-ripple": `${Z.ripple}ms`,
1784
+ "--nano-ease-standard": Q.standard,
1785
+ "--nano-ease-smooth": Q.smooth,
1786
+ "--nano-ease-spring": Q.spring,
1787
+ "--nano-transition-interactive": $.interactive.css,
1788
+ "--nano-transition-toggle": $.toggle.css,
1789
+ "--nano-transition-tooltip": $.tooltip.css,
1790
+ "--nano-transition-header": $.header.css,
1791
+ "--nano-transition-chart": $.chart.css,
1792
+ "--nano-transition-modal-backdrop": $.modal.backdrop.css,
1793
+ "--nano-transition-modal-enter": $.modal.enter.css,
1794
+ "--nano-transition-modal-leave": $.modal.leave.css,
1795
+ "--nano-transition-ripple": $.ripple.css
1796
+ };
1380
1797
  //#endregion
1381
1798
  //#region src/index.js
1382
1799
  k.init("nano-ui", "https://analytics.7u.pl");
1383
- var Xe = { install(e) {
1384
- e.directive("ripple", A), e.directive("tooltip", P), e.component("GlobalTooltip", I), e.component("NanoModal", V), e.component("ThreeDDonutChart", Ue), e.component("PrecisionScrubber", Ye);
1800
+ var ut = { install(e) {
1801
+ e.directive("ripple", A), e.directive("tooltip", P), e.component("GlobalTooltip", I), e.component("NanoModal", V), e.component("ThreeDDonutChart", We), e.component("PrecisionScrubber", Xe), e.component("TopologyRadar", it), e.component("MutatingHeader", K), e.component("NanoSwitch", ct);
1385
1802
  } };
1386
1803
  //#endregion
1387
- export { I as GlobalTooltip, V as NanoModal, Ye as PrecisionScrubber, A as Ripple, Ue as ThreeDDonutChart, Xe as default, N as hideTooltip, M as showTooltip, P as tooltipDirective, j as tooltipState };
1804
+ export { I as GlobalTooltip, K as MutatingHeader, V as NanoModal, ct as NanoSwitch, Xe as PrecisionScrubber, A as Ripple, We as ThreeDDonutChart, it as TopologyRadar, ut as default, Z as durations, Q as easings, N as hideTooltip, M as showTooltip, P as tooltipDirective, j as tooltipState, lt as transitionVariables, $ as transitions };