@mozaic-ds/chart
Version:
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
1,741 lines • 371 kB
JavaScript
var Ta = Object.defineProperty;
var Oa = (i, t, e) => t in i ? Ta(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
var w = (i, t, e) => (Oa(i, typeof t != "symbol" ? t + "" : t, e), e);
import { version as Ia, defineComponent as Et, ref as G, shallowRef as po, onMounted as Fa, onBeforeUnmount as Ra, watch as _i, toRaw as Qi, h as mo, isProxy as bo, reactive as yo, computed as R, openBlock as at, createElementBlock as Yt, createElementVNode as st, createBlock as ce, unref as It, normalizeClass as he, normalizeStyle as Xt, createCommentVNode as Gt, toDisplayString as xo } from "vue";
/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/
function Ye(i) {
return i + 0.5 | 0;
}
const Dt = (i, t, e) => Math.max(Math.min(i, e), t);
function De(i) {
return Dt(Ye(i * 2.55), 0, 255);
}
function Tt(i) {
return Dt(Ye(i * 255), 0, 255);
}
function vt(i) {
return Dt(Ye(i / 2.55) / 100, 0, 1);
}
function Hn(i) {
return Dt(Ye(i * 100), 0, 100);
}
const rt = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, tn = [..."0123456789ABCDEF"], Ea = (i) => tn[i & 15], Ba = (i) => tn[(i & 240) >> 4] + tn[i & 15], Ze = (i) => (i & 240) >> 4 === (i & 15), za = (i) => Ze(i.r) && Ze(i.g) && Ze(i.b) && Ze(i.a);
function Wa(i) {
var t = i.length, e;
return i[0] === "#" && (t === 4 || t === 5 ? e = {
r: 255 & rt[i[1]] * 17,
g: 255 & rt[i[2]] * 17,
b: 255 & rt[i[3]] * 17,
a: t === 5 ? rt[i[4]] * 17 : 255
} : (t === 7 || t === 9) && (e = {
r: rt[i[1]] << 4 | rt[i[2]],
g: rt[i[3]] << 4 | rt[i[4]],
b: rt[i[5]] << 4 | rt[i[6]],
a: t === 9 ? rt[i[7]] << 4 | rt[i[8]] : 255
})), e;
}
const Ha = (i, t) => i < 255 ? t(i) : "";
function Na(i) {
var t = za(i) ? Ea : Ba;
return i ? "#" + t(i.r) + t(i.g) + t(i.b) + Ha(i.a, t) : void 0;
}
const Va = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
function _o(i, t, e) {
const n = t * Math.min(e, 1 - e), s = (o, a = (o + i / 30) % 12) => e - n * Math.max(Math.min(a - 3, 9 - a, 1), -1);
return [s(0), s(8), s(4)];
}
function ja(i, t, e) {
const n = (s, o = (s + i / 60) % 6) => e - e * t * Math.max(Math.min(o, 4 - o, 1), 0);
return [n(5), n(3), n(1)];
}
function $a(i, t, e) {
const n = _o(i, 1, 0.5);
let s;
for (t + e > 1 && (s = 1 / (t + e), t *= s, e *= s), s = 0; s < 3; s++)
n[s] *= 1 - t - e, n[s] += t;
return n;
}
function Ua(i, t, e, n, s) {
return i === s ? (t - e) / n + (t < e ? 6 : 0) : t === s ? (e - i) / n + 2 : (i - t) / n + 4;
}
function xn(i) {
const e = i.r / 255, n = i.g / 255, s = i.b / 255, o = Math.max(e, n, s), a = Math.min(e, n, s), r = (o + a) / 2;
let l, c, h;
return o !== a && (h = o - a, c = r > 0.5 ? h / (2 - o - a) : h / (o + a), l = Ua(e, n, s, h, o), l = l * 60 + 0.5), [l | 0, c || 0, r];
}
function _n(i, t, e, n) {
return (Array.isArray(t) ? i(t[0], t[1], t[2]) : i(t, e, n)).map(Tt);
}
function vn(i, t, e) {
return _n(_o, i, t, e);
}
function Ya(i, t, e) {
return _n($a, i, t, e);
}
function Xa(i, t, e) {
return _n(ja, i, t, e);
}
function vo(i) {
return (i % 360 + 360) % 360;
}
function Ga(i) {
const t = Va.exec(i);
let e = 255, n;
if (!t)
return;
t[5] !== n && (e = t[6] ? De(+t[5]) : Tt(+t[5]));
const s = vo(+t[2]), o = +t[3] / 100, a = +t[4] / 100;
return t[1] === "hwb" ? n = Ya(s, o, a) : t[1] === "hsv" ? n = Xa(s, o, a) : n = vn(s, o, a), {
r: n[0],
g: n[1],
b: n[2],
a: e
};
}
function qa(i, t) {
var e = xn(i);
e[0] = vo(e[0] + t), e = vn(e), i.r = e[0], i.g = e[1], i.b = e[2];
}
function Ka(i) {
if (!i)
return;
const t = xn(i), e = t[0], n = Hn(t[1]), s = Hn(t[2]);
return i.a < 255 ? `hsla(${e}, ${n}%, ${s}%, ${vt(i.a)})` : `hsl(${e}, ${n}%, ${s}%)`;
}
const Nn = {
x: "dark",
Z: "light",
Y: "re",
X: "blu",
W: "gr",
V: "medium",
U: "slate",
A: "ee",
T: "ol",
S: "or",
B: "ra",
C: "lateg",
D: "ights",
R: "in",
Q: "turquois",
E: "hi",
P: "ro",
O: "al",
N: "le",
M: "de",
L: "yello",
F: "en",
K: "ch",
G: "arks",
H: "ea",
I: "ightg",
J: "wh"
}, Vn = {
OiceXe: "f0f8ff",
antiquewEte: "faebd7",
aqua: "ffff",
aquamarRe: "7fffd4",
azuY: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "0",
blanKedOmond: "ffebcd",
Xe: "ff",
XeviTet: "8a2be2",
bPwn: "a52a2a",
burlywood: "deb887",
caMtXe: "5f9ea0",
KartYuse: "7fff00",
KocTate: "d2691e",
cSO: "ff7f50",
cSnflowerXe: "6495ed",
cSnsilk: "fff8dc",
crimson: "dc143c",
cyan: "ffff",
xXe: "8b",
xcyan: "8b8b",
xgTMnPd: "b8860b",
xWay: "a9a9a9",
xgYF: "6400",
xgYy: "a9a9a9",
xkhaki: "bdb76b",
xmagFta: "8b008b",
xTivegYF: "556b2f",
xSange: "ff8c00",
xScEd: "9932cc",
xYd: "8b0000",
xsOmon: "e9967a",
xsHgYF: "8fbc8f",
xUXe: "483d8b",
xUWay: "2f4f4f",
xUgYy: "2f4f4f",
xQe: "ced1",
xviTet: "9400d3",
dAppRk: "ff1493",
dApskyXe: "bfff",
dimWay: "696969",
dimgYy: "696969",
dodgerXe: "1e90ff",
fiYbrick: "b22222",
flSOwEte: "fffaf0",
foYstWAn: "228b22",
fuKsia: "ff00ff",
gaRsbSo: "dcdcdc",
ghostwEte: "f8f8ff",
gTd: "ffd700",
gTMnPd: "daa520",
Way: "808080",
gYF: "8000",
gYFLw: "adff2f",
gYy: "808080",
honeyMw: "f0fff0",
hotpRk: "ff69b4",
RdianYd: "cd5c5c",
Rdigo: "4b0082",
ivSy: "fffff0",
khaki: "f0e68c",
lavFMr: "e6e6fa",
lavFMrXsh: "fff0f5",
lawngYF: "7cfc00",
NmoncEffon: "fffacd",
ZXe: "add8e6",
ZcSO: "f08080",
Zcyan: "e0ffff",
ZgTMnPdLw: "fafad2",
ZWay: "d3d3d3",
ZgYF: "90ee90",
ZgYy: "d3d3d3",
ZpRk: "ffb6c1",
ZsOmon: "ffa07a",
ZsHgYF: "20b2aa",
ZskyXe: "87cefa",
ZUWay: "778899",
ZUgYy: "778899",
ZstAlXe: "b0c4de",
ZLw: "ffffe0",
lime: "ff00",
limegYF: "32cd32",
lRF: "faf0e6",
magFta: "ff00ff",
maPon: "800000",
VaquamarRe: "66cdaa",
VXe: "cd",
VScEd: "ba55d3",
VpurpN: "9370db",
VsHgYF: "3cb371",
VUXe: "7b68ee",
VsprRggYF: "fa9a",
VQe: "48d1cc",
VviTetYd: "c71585",
midnightXe: "191970",
mRtcYam: "f5fffa",
mistyPse: "ffe4e1",
moccasR: "ffe4b5",
navajowEte: "ffdead",
navy: "80",
Tdlace: "fdf5e6",
Tive: "808000",
TivedBb: "6b8e23",
Sange: "ffa500",
SangeYd: "ff4500",
ScEd: "da70d6",
pOegTMnPd: "eee8aa",
pOegYF: "98fb98",
pOeQe: "afeeee",
pOeviTetYd: "db7093",
papayawEp: "ffefd5",
pHKpuff: "ffdab9",
peru: "cd853f",
pRk: "ffc0cb",
plum: "dda0dd",
powMrXe: "b0e0e6",
purpN: "800080",
YbeccapurpN: "663399",
Yd: "ff0000",
Psybrown: "bc8f8f",
PyOXe: "4169e1",
saddNbPwn: "8b4513",
sOmon: "fa8072",
sandybPwn: "f4a460",
sHgYF: "2e8b57",
sHshell: "fff5ee",
siFna: "a0522d",
silver: "c0c0c0",
skyXe: "87ceeb",
UXe: "6a5acd",
UWay: "708090",
UgYy: "708090",
snow: "fffafa",
sprRggYF: "ff7f",
stAlXe: "4682b4",
tan: "d2b48c",
teO: "8080",
tEstN: "d8bfd8",
tomato: "ff6347",
Qe: "40e0d0",
viTet: "ee82ee",
JHt: "f5deb3",
wEte: "ffffff",
wEtesmoke: "f5f5f5",
Lw: "ffff00",
LwgYF: "9acd32"
};
function Za() {
const i = {}, t = Object.keys(Vn), e = Object.keys(Nn);
let n, s, o, a, r;
for (n = 0; n < t.length; n++) {
for (a = r = t[n], s = 0; s < e.length; s++)
o = e[s], r = r.replace(o, Nn[o]);
o = parseInt(Vn[a], 16), i[r] = [o >> 16 & 255, o >> 8 & 255, o & 255];
}
return i;
}
let Je;
function Ja(i) {
Je || (Je = Za(), Je.transparent = [0, 0, 0, 0]);
const t = Je[i.toLowerCase()];
return t && {
r: t[0],
g: t[1],
b: t[2],
a: t.length === 4 ? t[3] : 255
};
}
const Qa = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
function tr(i) {
const t = Qa.exec(i);
let e = 255, n, s, o;
if (t) {
if (t[7] !== n) {
const a = +t[7];
e = t[8] ? De(a) : Dt(a * 255, 0, 255);
}
return n = +t[1], s = +t[3], o = +t[5], n = 255 & (t[2] ? De(n) : Dt(n, 0, 255)), s = 255 & (t[4] ? De(s) : Dt(s, 0, 255)), o = 255 & (t[6] ? De(o) : Dt(o, 0, 255)), {
r: n,
g: s,
b: o,
a: e
};
}
}
function er(i) {
return i && (i.a < 255 ? `rgba(${i.r}, ${i.g}, ${i.b}, ${vt(i.a)})` : `rgb(${i.r}, ${i.g}, ${i.b})`);
}
const Wi = (i) => i <= 31308e-7 ? i * 12.92 : Math.pow(i, 1 / 2.4) * 1.055 - 0.055, Qt = (i) => i <= 0.04045 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
function ir(i, t, e) {
const n = Qt(vt(i.r)), s = Qt(vt(i.g)), o = Qt(vt(i.b));
return {
r: Tt(Wi(n + e * (Qt(vt(t.r)) - n))),
g: Tt(Wi(s + e * (Qt(vt(t.g)) - s))),
b: Tt(Wi(o + e * (Qt(vt(t.b)) - o))),
a: i.a + e * (t.a - i.a)
};
}
function Qe(i, t, e) {
if (i) {
let n = xn(i);
n[t] = Math.max(0, Math.min(n[t] + n[t] * e, t === 0 ? 360 : 1)), n = vn(n), i.r = n[0], i.g = n[1], i.b = n[2];
}
}
function So(i, t) {
return i && Object.assign(t || {}, i);
}
function jn(i) {
var t = { r: 0, g: 0, b: 0, a: 255 };
return Array.isArray(i) ? i.length >= 3 && (t = { r: i[0], g: i[1], b: i[2], a: 255 }, i.length > 3 && (t.a = Tt(i[3]))) : (t = So(i, { r: 0, g: 0, b: 0, a: 1 }), t.a = Tt(t.a)), t;
}
function nr(i) {
return i.charAt(0) === "r" ? tr(i) : Ga(i);
}
class He {
constructor(t) {
if (t instanceof He)
return t;
const e = typeof t;
let n;
e === "object" ? n = jn(t) : e === "string" && (n = Wa(t) || Ja(t) || nr(t)), this._rgb = n, this._valid = !!n;
}
get valid() {
return this._valid;
}
get rgb() {
var t = So(this._rgb);
return t && (t.a = vt(t.a)), t;
}
set rgb(t) {
this._rgb = jn(t);
}
rgbString() {
return this._valid ? er(this._rgb) : void 0;
}
hexString() {
return this._valid ? Na(this._rgb) : void 0;
}
hslString() {
return this._valid ? Ka(this._rgb) : void 0;
}
mix(t, e) {
if (t) {
const n = this.rgb, s = t.rgb;
let o;
const a = e === o ? 0.5 : e, r = 2 * a - 1, l = n.a - s.a, c = ((r * l === -1 ? r : (r + l) / (1 + r * l)) + 1) / 2;
o = 1 - c, n.r = 255 & c * n.r + o * s.r + 0.5, n.g = 255 & c * n.g + o * s.g + 0.5, n.b = 255 & c * n.b + o * s.b + 0.5, n.a = a * n.a + (1 - a) * s.a, this.rgb = n;
}
return this;
}
interpolate(t, e) {
return t && (this._rgb = ir(this._rgb, t._rgb, e)), this;
}
clone() {
return new He(this.rgb);
}
alpha(t) {
return this._rgb.a = Tt(t), this;
}
clearer(t) {
const e = this._rgb;
return e.a *= 1 - t, this;
}
greyscale() {
const t = this._rgb, e = Ye(t.r * 0.3 + t.g * 0.59 + t.b * 0.11);
return t.r = t.g = t.b = e, this;
}
opaquer(t) {
const e = this._rgb;
return e.a *= 1 + t, this;
}
negate() {
const t = this._rgb;
return t.r = 255 - t.r, t.g = 255 - t.g, t.b = 255 - t.b, this;
}
lighten(t) {
return Qe(this._rgb, 2, t), this;
}
darken(t) {
return Qe(this._rgb, 2, -t), this;
}
saturate(t) {
return Qe(this._rgb, 1, t), this;
}
desaturate(t) {
return Qe(this._rgb, 1, -t), this;
}
rotate(t) {
return qa(this._rgb, t), this;
}
}
/*!
* Chart.js v4.4.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/
function yt() {
}
const sr = (() => {
let i = 0;
return () => i++;
})();
function F(i) {
return i === null || typeof i > "u";
}
function W(i) {
if (Array.isArray && Array.isArray(i))
return !0;
const t = Object.prototype.toString.call(i);
return t.slice(0, 7) === "[object" && t.slice(-6) === "Array]";
}
function O(i) {
return i !== null && Object.prototype.toString.call(i) === "[object Object]";
}
function q(i) {
return (typeof i == "number" || i instanceof Number) && isFinite(+i);
}
function dt(i, t) {
return q(i) ? i : t;
}
function D(i, t) {
return typeof i > "u" ? t : i;
}
const or = (i, t) => typeof i == "string" && i.endsWith("%") ? parseFloat(i) / 100 : +i / t, wo = (i, t) => typeof i == "string" && i.endsWith("%") ? parseFloat(i) / 100 * t : +i;
function z(i, t, e) {
if (i && typeof i.call == "function")
return i.apply(e, t);
}
function E(i, t, e, n) {
let s, o, a;
if (W(i))
if (o = i.length, n)
for (s = o - 1; s >= 0; s--)
t.call(e, i[s], s);
else
for (s = 0; s < o; s++)
t.call(e, i[s], s);
else if (O(i))
for (a = Object.keys(i), o = a.length, s = 0; s < o; s++)
t.call(e, i[a[s]], a[s]);
}
function vi(i, t) {
let e, n, s, o;
if (!i || !t || i.length !== t.length)
return !1;
for (e = 0, n = i.length; e < n; ++e)
if (s = i[e], o = t[e], s.datasetIndex !== o.datasetIndex || s.index !== o.index)
return !1;
return !0;
}
function Si(i) {
if (W(i))
return i.map(Si);
if (O(i)) {
const t = /* @__PURE__ */ Object.create(null), e = Object.keys(i), n = e.length;
let s = 0;
for (; s < n; ++s)
t[e[s]] = Si(i[e[s]]);
return t;
}
return i;
}
function ko(i) {
return [
"__proto__",
"prototype",
"constructor"
].indexOf(i) === -1;
}
function ar(i, t, e, n) {
if (!ko(i))
return;
const s = t[i], o = e[i];
O(s) && O(o) ? bt(s, o, n) : t[i] = Si(o);
}
function bt(i, t, e) {
const n = W(t) ? t : [
t
], s = n.length;
if (!O(i))
return i;
e = e || {};
const o = e.merger || ar;
let a;
for (let r = 0; r < s; ++r) {
if (a = n[r], !O(a))
continue;
const l = Object.keys(a);
for (let c = 0, h = l.length; c < h; ++c)
o(l[c], i, a, e);
}
return i;
}
function Fe(i, t) {
return bt(i, t, {
merger: rr
});
}
function rr(i, t, e) {
if (!ko(i))
return;
const n = t[i], s = e[i];
O(n) && O(s) ? Fe(n, s) : Object.prototype.hasOwnProperty.call(t, i) || (t[i] = Si(s));
}
const $n = {
// Chart.helpers.core resolveObjectKey should resolve empty key to root object
"": (i) => i,
// default resolvers
x: (i) => i.x,
y: (i) => i.y
};
function lr(i) {
const t = i.split("."), e = [];
let n = "";
for (const s of t)
n += s, n.endsWith("\\") ? n = n.slice(0, -1) + "." : (e.push(n), n = "");
return e;
}
function cr(i) {
const t = lr(i);
return (e) => {
for (const n of t) {
if (n === "")
break;
e = e && e[n];
}
return e;
};
}
function Ft(i, t) {
return ($n[t] || ($n[t] = cr(t)))(i);
}
function Sn(i) {
return i.charAt(0).toUpperCase() + i.slice(1);
}
const Ne = (i) => typeof i < "u", Rt = (i) => typeof i == "function", Un = (i, t) => {
if (i.size !== t.size)
return !1;
for (const e of i)
if (!t.has(e))
return !1;
return !0;
};
function hr(i) {
return i.type === "mouseup" || i.type === "click" || i.type === "contextmenu";
}
const V = Math.PI, H = 2 * V, dr = H + V, wi = Number.POSITIVE_INFINITY, ur = V / 180, U = V / 2, zt = V / 4, Yn = V * 2 / 3, en = Math.log10, mt = Math.sign;
function Re(i, t, e) {
return Math.abs(i - t) < e;
}
function Xn(i) {
const t = Math.round(i);
i = Re(i, t, i / 1e3) ? t : i;
const e = Math.pow(10, Math.floor(en(i))), n = i / e;
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * e;
}
function fr(i) {
const t = [], e = Math.sqrt(i);
let n;
for (n = 1; n < e; n++)
i % n === 0 && (t.push(n), t.push(i / n));
return e === (e | 0) && t.push(e), t.sort((s, o) => s - o).pop(), t;
}
function Ve(i) {
return !isNaN(parseFloat(i)) && isFinite(i);
}
function gr(i, t) {
const e = Math.round(i);
return e - t <= i && e + t >= i;
}
function pr(i, t, e) {
let n, s, o;
for (n = 0, s = i.length; n < s; n++)
o = i[n][e], isNaN(o) || (t.min = Math.min(t.min, o), t.max = Math.max(t.max, o));
}
function gt(i) {
return i * (V / 180);
}
function wn(i) {
return i * (180 / V);
}
function Gn(i) {
if (!q(i))
return;
let t = 1, e = 0;
for (; Math.round(i * t) / t !== i; )
t *= 10, e++;
return e;
}
function Mo(i, t) {
const e = t.x - i.x, n = t.y - i.y, s = Math.sqrt(e * e + n * n);
let o = Math.atan2(n, e);
return o < -0.5 * V && (o += H), {
angle: o,
distance: s
};
}
function nn(i, t) {
return Math.sqrt(Math.pow(t.x - i.x, 2) + Math.pow(t.y - i.y, 2));
}
function mr(i, t) {
return (i - t + dr) % H - V;
}
function ot(i) {
return (i % H + H) % H;
}
function je(i, t, e, n) {
const s = ot(i), o = ot(t), a = ot(e), r = ot(o - s), l = ot(a - s), c = ot(s - o), h = ot(s - a);
return s === o || s === a || n && o === a || r > l && c < h;
}
function Q(i, t, e) {
return Math.max(t, Math.min(e, i));
}
function br(i) {
return Q(i, -32768, 32767);
}
function St(i, t, e, n = 1e-6) {
return i >= Math.min(t, e) - n && i <= Math.max(t, e) + n;
}
function kn(i, t, e) {
e = e || ((a) => i[a] < t);
let n = i.length - 1, s = 0, o;
for (; n - s > 1; )
o = s + n >> 1, e(o) ? s = o : n = o;
return {
lo: s,
hi: n
};
}
const jt = (i, t, e, n) => kn(i, e, n ? (s) => {
const o = i[s][t];
return o < e || o === e && i[s + 1][t] === e;
} : (s) => i[s][t] < e), yr = (i, t, e) => kn(i, e, (n) => i[n][t] >= e);
function xr(i, t, e) {
let n = 0, s = i.length;
for (; n < s && i[n] < t; )
n++;
for (; s > n && i[s - 1] > e; )
s--;
return n > 0 || s < i.length ? i.slice(n, s) : i;
}
const Co = [
"push",
"pop",
"shift",
"splice",
"unshift"
];
function _r(i, t) {
if (i._chartjs) {
i._chartjs.listeners.push(t);
return;
}
Object.defineProperty(i, "_chartjs", {
configurable: !0,
enumerable: !1,
value: {
listeners: [
t
]
}
}), Co.forEach((e) => {
const n = "_onData" + Sn(e), s = i[e];
Object.defineProperty(i, e, {
configurable: !0,
enumerable: !1,
value(...o) {
const a = s.apply(this, o);
return i._chartjs.listeners.forEach((r) => {
typeof r[n] == "function" && r[n](...o);
}), a;
}
});
});
}
function qn(i, t) {
const e = i._chartjs;
if (!e)
return;
const n = e.listeners, s = n.indexOf(t);
s !== -1 && n.splice(s, 1), !(n.length > 0) && (Co.forEach((o) => {
delete i[o];
}), delete i._chartjs);
}
function Po(i) {
const t = new Set(i);
return t.size === i.length ? i : Array.from(t);
}
const Ao = function() {
return typeof window > "u" ? function(i) {
return i();
} : window.requestAnimationFrame;
}();
function Do(i, t) {
let e = [], n = !1;
return function(...s) {
e = s, n || (n = !0, Ao.call(window, () => {
n = !1, i.apply(t, e);
}));
};
}
function vr(i, t) {
let e;
return function(...n) {
return t ? (clearTimeout(e), e = setTimeout(i, t, n)) : i.apply(this, n), t;
};
}
const Mn = (i) => i === "start" ? "left" : i === "end" ? "right" : "center", J = (i, t, e) => i === "start" ? t : i === "end" ? e : (t + e) / 2, Sr = (i, t, e, n) => i === (n ? "left" : "right") ? e : i === "center" ? (t + e) / 2 : t;
function wr(i, t, e) {
const n = t.length;
let s = 0, o = n;
if (i._sorted) {
const { iScale: a, _parsed: r } = i, l = a.axis, { min: c, max: h, minDefined: d, maxDefined: u } = a.getUserBounds();
d && (s = Q(Math.min(
// @ts-expect-error Need to type _parsed
jt(r, l, c).lo,
// @ts-expect-error Need to fix types on _lookupByKey
e ? n : jt(t, l, a.getPixelForValue(c)).lo
), 0, n - 1)), u ? o = Q(Math.max(
// @ts-expect-error Need to type _parsed
jt(r, a.axis, h, !0).hi + 1,
// @ts-expect-error Need to fix types on _lookupByKey
e ? 0 : jt(t, l, a.getPixelForValue(h), !0).hi + 1
), s, n) - s : o = n - s;
}
return {
start: s,
count: o
};
}
function kr(i) {
const { xScale: t, yScale: e, _scaleRanges: n } = i, s = {
xmin: t.min,
xmax: t.max,
ymin: e.min,
ymax: e.max
};
if (!n)
return i._scaleRanges = s, !0;
const o = n.xmin !== t.min || n.xmax !== t.max || n.ymin !== e.min || n.ymax !== e.max;
return Object.assign(n, s), o;
}
const ti = (i) => i === 0 || i === 1, Kn = (i, t, e) => -(Math.pow(2, 10 * (i -= 1)) * Math.sin((i - t) * H / e)), Zn = (i, t, e) => Math.pow(2, -10 * i) * Math.sin((i - t) * H / e) + 1, Ee = {
linear: (i) => i,
easeInQuad: (i) => i * i,
easeOutQuad: (i) => -i * (i - 2),
easeInOutQuad: (i) => (i /= 0.5) < 1 ? 0.5 * i * i : -0.5 * (--i * (i - 2) - 1),
easeInCubic: (i) => i * i * i,
easeOutCubic: (i) => (i -= 1) * i * i + 1,
easeInOutCubic: (i) => (i /= 0.5) < 1 ? 0.5 * i * i * i : 0.5 * ((i -= 2) * i * i + 2),
easeInQuart: (i) => i * i * i * i,
easeOutQuart: (i) => -((i -= 1) * i * i * i - 1),
easeInOutQuart: (i) => (i /= 0.5) < 1 ? 0.5 * i * i * i * i : -0.5 * ((i -= 2) * i * i * i - 2),
easeInQuint: (i) => i * i * i * i * i,
easeOutQuint: (i) => (i -= 1) * i * i * i * i + 1,
easeInOutQuint: (i) => (i /= 0.5) < 1 ? 0.5 * i * i * i * i * i : 0.5 * ((i -= 2) * i * i * i * i + 2),
easeInSine: (i) => -Math.cos(i * U) + 1,
easeOutSine: (i) => Math.sin(i * U),
easeInOutSine: (i) => -0.5 * (Math.cos(V * i) - 1),
easeInExpo: (i) => i === 0 ? 0 : Math.pow(2, 10 * (i - 1)),
easeOutExpo: (i) => i === 1 ? 1 : -Math.pow(2, -10 * i) + 1,
easeInOutExpo: (i) => ti(i) ? i : i < 0.5 ? 0.5 * Math.pow(2, 10 * (i * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (i * 2 - 1)) + 2),
easeInCirc: (i) => i >= 1 ? i : -(Math.sqrt(1 - i * i) - 1),
easeOutCirc: (i) => Math.sqrt(1 - (i -= 1) * i),
easeInOutCirc: (i) => (i /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - i * i) - 1) : 0.5 * (Math.sqrt(1 - (i -= 2) * i) + 1),
easeInElastic: (i) => ti(i) ? i : Kn(i, 0.075, 0.3),
easeOutElastic: (i) => ti(i) ? i : Zn(i, 0.075, 0.3),
easeInOutElastic(i) {
return ti(i) ? i : i < 0.5 ? 0.5 * Kn(i * 2, 0.1125, 0.45) : 0.5 + 0.5 * Zn(i * 2 - 1, 0.1125, 0.45);
},
easeInBack(i) {
return i * i * ((1.70158 + 1) * i - 1.70158);
},
easeOutBack(i) {
return (i -= 1) * i * ((1.70158 + 1) * i + 1.70158) + 1;
},
easeInOutBack(i) {
let t = 1.70158;
return (i /= 0.5) < 1 ? 0.5 * (i * i * (((t *= 1.525) + 1) * i - t)) : 0.5 * ((i -= 2) * i * (((t *= 1.525) + 1) * i + t) + 2);
},
easeInBounce: (i) => 1 - Ee.easeOutBounce(1 - i),
easeOutBounce(i) {
return i < 1 / 2.75 ? 7.5625 * i * i : i < 2 / 2.75 ? 7.5625 * (i -= 1.5 / 2.75) * i + 0.75 : i < 2.5 / 2.75 ? 7.5625 * (i -= 2.25 / 2.75) * i + 0.9375 : 7.5625 * (i -= 2.625 / 2.75) * i + 0.984375;
},
easeInOutBounce: (i) => i < 0.5 ? Ee.easeInBounce(i * 2) * 0.5 : Ee.easeOutBounce(i * 2 - 1) * 0.5 + 0.5
};
function Cn(i) {
if (i && typeof i == "object") {
const t = i.toString();
return t === "[object CanvasPattern]" || t === "[object CanvasGradient]";
}
return !1;
}
function Jn(i) {
return Cn(i) ? i : new He(i);
}
function Hi(i) {
return Cn(i) ? i : new He(i).saturate(0.5).darken(0.1).hexString();
}
const Mr = [
"x",
"y",
"borderWidth",
"radius",
"tension"
], Cr = [
"color",
"borderColor",
"backgroundColor"
];
function Pr(i) {
i.set("animation", {
delay: void 0,
duration: 1e3,
easing: "easeOutQuart",
fn: void 0,
from: void 0,
loop: void 0,
to: void 0,
type: void 0
}), i.describe("animation", {
_fallback: !1,
_indexable: !1,
_scriptable: (t) => t !== "onProgress" && t !== "onComplete" && t !== "fn"
}), i.set("animations", {
colors: {
type: "color",
properties: Cr
},
numbers: {
type: "number",
properties: Mr
}
}), i.describe("animations", {
_fallback: "animation"
}), i.set("transitions", {
active: {
animation: {
duration: 400
}
},
resize: {
animation: {
duration: 0
}
},
show: {
animations: {
colors: {
from: "transparent"
},
visible: {
type: "boolean",
duration: 0
}
}
},
hide: {
animations: {
colors: {
to: "transparent"
},
visible: {
type: "boolean",
easing: "linear",
fn: (t) => t | 0
}
}
}
});
}
function Ar(i) {
i.set("layout", {
autoPadding: !0,
padding: {
top: 0,
right: 0,
bottom: 0,
left: 0
}
});
}
const Qn = /* @__PURE__ */ new Map();
function Dr(i, t) {
t = t || {};
const e = i + JSON.stringify(t);
let n = Qn.get(e);
return n || (n = new Intl.NumberFormat(i, t), Qn.set(e, n)), n;
}
function Pn(i, t, e) {
return Dr(t, e).format(i);
}
const Lo = {
values(i) {
return W(i) ? i : "" + i;
},
numeric(i, t, e) {
if (i === 0)
return "0";
const n = this.chart.options.locale;
let s, o = i;
if (e.length > 1) {
const c = Math.max(Math.abs(e[0].value), Math.abs(e[e.length - 1].value));
(c < 1e-4 || c > 1e15) && (s = "scientific"), o = Lr(i, e);
}
const a = en(Math.abs(o)), r = isNaN(a) ? 1 : Math.max(Math.min(-1 * Math.floor(a), 20), 0), l = {
notation: s,
minimumFractionDigits: r,
maximumFractionDigits: r
};
return Object.assign(l, this.options.ticks.format), Pn(i, n, l);
},
logarithmic(i, t, e) {
if (i === 0)
return "0";
const n = e[t].significand || i / Math.pow(10, Math.floor(en(i)));
return [
1,
2,
3,
5,
10,
15
].includes(n) || t > 0.8 * e.length ? Lo.numeric.call(this, i, t, e) : "";
}
};
function Lr(i, t) {
let e = t.length > 3 ? t[2].value - t[1].value : t[1].value - t[0].value;
return Math.abs(e) >= 1 && i !== Math.floor(i) && (e = i - Math.floor(i)), e;
}
var An = {
formatters: Lo
};
function Tr(i) {
i.set("scale", {
display: !0,
offset: !1,
reverse: !1,
beginAtZero: !1,
bounds: "ticks",
clip: !0,
grace: 0,
grid: {
display: !0,
lineWidth: 1,
drawOnChartArea: !0,
drawTicks: !0,
tickLength: 8,
tickWidth: (t, e) => e.lineWidth,
tickColor: (t, e) => e.color,
offset: !1
},
border: {
display: !0,
dash: [],
dashOffset: 0,
width: 1
},
title: {
display: !1,
text: "",
padding: {
top: 4,
bottom: 4
}
},
ticks: {
minRotation: 0,
maxRotation: 50,
mirror: !1,
textStrokeWidth: 0,
textStrokeColor: "",
padding: 3,
display: !0,
autoSkip: !0,
autoSkipPadding: 3,
labelOffset: 0,
callback: An.formatters.values,
minor: {},
major: {},
align: "center",
crossAlign: "near",
showLabelBackdrop: !1,
backdropColor: "rgba(255, 255, 255, 0.75)",
backdropPadding: 2
}
}), i.route("scale.ticks", "color", "", "color"), i.route("scale.grid", "color", "", "borderColor"), i.route("scale.border", "color", "", "borderColor"), i.route("scale.title", "color", "", "color"), i.describe("scale", {
_fallback: !1,
_scriptable: (t) => !t.startsWith("before") && !t.startsWith("after") && t !== "callback" && t !== "parser",
_indexable: (t) => t !== "borderDash" && t !== "tickBorderDash" && t !== "dash"
}), i.describe("scales", {
_fallback: "scale"
}), i.describe("scale.ticks", {
_scriptable: (t) => t !== "backdropPadding" && t !== "callback",
_indexable: (t) => t !== "backdropPadding"
});
}
const qt = /* @__PURE__ */ Object.create(null), sn = /* @__PURE__ */ Object.create(null);
function Be(i, t) {
if (!t)
return i;
const e = t.split(".");
for (let n = 0, s = e.length; n < s; ++n) {
const o = e[n];
i = i[o] || (i[o] = /* @__PURE__ */ Object.create(null));
}
return i;
}
function Ni(i, t, e) {
return typeof t == "string" ? bt(Be(i, t), e) : bt(Be(i, ""), t);
}
class Or {
constructor(t, e) {
this.animation = void 0, this.backgroundColor = "rgba(0,0,0,0.1)", this.borderColor = "rgba(0,0,0,0.1)", this.color = "#666", this.datasets = {}, this.devicePixelRatio = (n) => n.chart.platform.getDevicePixelRatio(), this.elements = {}, this.events = [
"mousemove",
"mouseout",
"click",
"touchstart",
"touchmove"
], this.font = {
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
size: 12,
style: "normal",
lineHeight: 1.2,
weight: null
}, this.hover = {}, this.hoverBackgroundColor = (n, s) => Hi(s.backgroundColor), this.hoverBorderColor = (n, s) => Hi(s.borderColor), this.hoverColor = (n, s) => Hi(s.color), this.indexAxis = "x", this.interaction = {
mode: "nearest",
intersect: !0,
includeInvisible: !1
}, this.maintainAspectRatio = !0, this.onHover = null, this.onClick = null, this.parsing = !0, this.plugins = {}, this.responsive = !0, this.scale = void 0, this.scales = {}, this.showLine = !0, this.drawActiveElementsOnTop = !0, this.describe(t), this.apply(e);
}
set(t, e) {
return Ni(this, t, e);
}
get(t) {
return Be(this, t);
}
describe(t, e) {
return Ni(sn, t, e);
}
override(t, e) {
return Ni(qt, t, e);
}
route(t, e, n, s) {
const o = Be(this, t), a = Be(this, n), r = "_" + e;
Object.defineProperties(o, {
[r]: {
value: o[e],
writable: !0
},
[e]: {
enumerable: !0,
get() {
const l = this[r], c = a[s];
return O(l) ? Object.assign({}, c, l) : D(l, c);
},
set(l) {
this[r] = l;
}
}
});
}
apply(t) {
t.forEach((e) => e(this));
}
}
var $ = /* @__PURE__ */ new Or({
_scriptable: (i) => !i.startsWith("on"),
_indexable: (i) => i !== "events",
hover: {
_fallback: "interaction"
},
interaction: {
_scriptable: !1,
_indexable: !1
}
}, [
Pr,
Ar,
Tr
]);
function Ir(i) {
return !i || F(i.size) || F(i.family) ? null : (i.style ? i.style + " " : "") + (i.weight ? i.weight + " " : "") + i.size + "px " + i.family;
}
function ki(i, t, e, n, s) {
let o = t[s];
return o || (o = t[s] = i.measureText(s).width, e.push(s)), o > n && (n = o), n;
}
function Fr(i, t, e, n) {
n = n || {};
let s = n.data = n.data || {}, o = n.garbageCollect = n.garbageCollect || [];
n.font !== t && (s = n.data = {}, o = n.garbageCollect = [], n.font = t), i.save(), i.font = t;
let a = 0;
const r = e.length;
let l, c, h, d, u;
for (l = 0; l < r; l++)
if (d = e[l], d != null && !W(d))
a = ki(i, s, o, a, d);
else if (W(d))
for (c = 0, h = d.length; c < h; c++)
u = d[c], u != null && !W(u) && (a = ki(i, s, o, a, u));
i.restore();
const f = o.length / 2;
if (f > e.length) {
for (l = 0; l < f; l++)
delete s[o[l]];
o.splice(0, f);
}
return a;
}
function Wt(i, t, e) {
const n = i.currentDevicePixelRatio, s = e !== 0 ? Math.max(e / 2, 0.5) : 0;
return Math.round((t - s) * n) / n + s;
}
function ts(i, t) {
t = t || i.getContext("2d"), t.save(), t.resetTransform(), t.clearRect(0, 0, i.width, i.height), t.restore();
}
function on(i, t, e, n) {
To(i, t, e, n, null);
}
function To(i, t, e, n, s) {
let o, a, r, l, c, h, d, u;
const f = t.pointStyle, b = t.rotation, p = t.radius;
let m = (b || 0) * ur;
if (f && typeof f == "object" && (o = f.toString(), o === "[object HTMLImageElement]" || o === "[object HTMLCanvasElement]")) {
i.save(), i.translate(e, n), i.rotate(m), i.drawImage(f, -f.width / 2, -f.height / 2, f.width, f.height), i.restore();
return;
}
if (!(isNaN(p) || p <= 0)) {
switch (i.beginPath(), f) {
default:
s ? i.ellipse(e, n, s / 2, p, 0, 0, H) : i.arc(e, n, p, 0, H), i.closePath();
break;
case "triangle":
h = s ? s / 2 : p, i.moveTo(e + Math.sin(m) * h, n - Math.cos(m) * p), m += Yn, i.lineTo(e + Math.sin(m) * h, n - Math.cos(m) * p), m += Yn, i.lineTo(e + Math.sin(m) * h, n - Math.cos(m) * p), i.closePath();
break;
case "rectRounded":
c = p * 0.516, l = p - c, a = Math.cos(m + zt) * l, d = Math.cos(m + zt) * (s ? s / 2 - c : l), r = Math.sin(m + zt) * l, u = Math.sin(m + zt) * (s ? s / 2 - c : l), i.arc(e - d, n - r, c, m - V, m - U), i.arc(e + u, n - a, c, m - U, m), i.arc(e + d, n + r, c, m, m + U), i.arc(e - u, n + a, c, m + U, m + V), i.closePath();
break;
case "rect":
if (!b) {
l = Math.SQRT1_2 * p, h = s ? s / 2 : l, i.rect(e - h, n - l, 2 * h, 2 * l);
break;
}
m += zt;
case "rectRot":
d = Math.cos(m) * (s ? s / 2 : p), a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * (s ? s / 2 : p), i.moveTo(e - d, n - r), i.lineTo(e + u, n - a), i.lineTo(e + d, n + r), i.lineTo(e - u, n + a), i.closePath();
break;
case "crossRot":
m += zt;
case "cross":
d = Math.cos(m) * (s ? s / 2 : p), a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * (s ? s / 2 : p), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a);
break;
case "star":
d = Math.cos(m) * (s ? s / 2 : p), a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * (s ? s / 2 : p), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a), m += zt, d = Math.cos(m) * (s ? s / 2 : p), a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * (s ? s / 2 : p), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a);
break;
case "line":
a = s ? s / 2 : Math.cos(m) * p, r = Math.sin(m) * p, i.moveTo(e - a, n - r), i.lineTo(e + a, n + r);
break;
case "dash":
i.moveTo(e, n), i.lineTo(e + Math.cos(m) * (s ? s / 2 : p), n + Math.sin(m) * p);
break;
case !1:
i.closePath();
break;
}
i.fill(), t.borderWidth > 0 && i.stroke();
}
}
function wt(i, t, e) {
return e = e || 0.5, !t || i && i.x > t.left - e && i.x < t.right + e && i.y > t.top - e && i.y < t.bottom + e;
}
function Li(i, t) {
i.save(), i.beginPath(), i.rect(t.left, t.top, t.right - t.left, t.bottom - t.top), i.clip();
}
function Ti(i) {
i.restore();
}
function Rr(i, t, e, n, s) {
if (!t)
return i.lineTo(e.x, e.y);
if (s === "middle") {
const o = (t.x + e.x) / 2;
i.lineTo(o, t.y), i.lineTo(o, e.y);
} else
s === "after" != !!n ? i.lineTo(t.x, e.y) : i.lineTo(e.x, t.y);
i.lineTo(e.x, e.y);
}
function Er(i, t, e, n) {
if (!t)
return i.lineTo(e.x, e.y);
i.bezierCurveTo(n ? t.cp1x : t.cp2x, n ? t.cp1y : t.cp2y, n ? e.cp2x : e.cp1x, n ? e.cp2y : e.cp1y, e.x, e.y);
}
function Br(i, t) {
t.translation && i.translate(t.translation[0], t.translation[1]), F(t.rotation) || i.rotate(t.rotation), t.color && (i.fillStyle = t.color), t.textAlign && (i.textAlign = t.textAlign), t.textBaseline && (i.textBaseline = t.textBaseline);
}
function zr(i, t, e, n, s) {
if (s.strikethrough || s.underline) {
const o = i.measureText(n), a = t - o.actualBoundingBoxLeft, r = t + o.actualBoundingBoxRight, l = e - o.actualBoundingBoxAscent, c = e + o.actualBoundingBoxDescent, h = s.strikethrough ? (l + c) / 2 : c;
i.strokeStyle = i.fillStyle, i.beginPath(), i.lineWidth = s.decorationWidth || 2, i.moveTo(a, h), i.lineTo(r, h), i.stroke();
}
}
function Wr(i, t) {
const e = i.fillStyle;
i.fillStyle = t.color, i.fillRect(t.left, t.top, t.width, t.height), i.fillStyle = e;
}
function Kt(i, t, e, n, s, o = {}) {
const a = W(t) ? t : [
t
], r = o.strokeWidth > 0 && o.strokeColor !== "";
let l, c;
for (i.save(), i.font = s.string, Br(i, o), l = 0; l < a.length; ++l)
c = a[l], o.backdrop && Wr(i, o.backdrop), r && (o.strokeColor && (i.strokeStyle = o.strokeColor), F(o.strokeWidth) || (i.lineWidth = o.strokeWidth), i.strokeText(c, e, n, o.maxWidth)), i.fillText(c, e, n, o.maxWidth), zr(i, e, n, c, o), n += Number(s.lineHeight);
i.restore();
}
function $e(i, t) {
const { x: e, y: n, w: s, h: o, radius: a } = t;
i.arc(e + a.topLeft, n + a.topLeft, a.topLeft, 1.5 * V, V, !0), i.lineTo(e, n + o - a.bottomLeft), i.arc(e + a.bottomLeft, n + o - a.bottomLeft, a.bottomLeft, V, U, !0), i.lineTo(e + s - a.bottomRight, n + o), i.arc(e + s - a.bottomRight, n + o - a.bottomRight, a.bottomRight, U, 0, !0), i.lineTo(e + s, n + a.topRight), i.arc(e + s - a.topRight, n + a.topRight, a.topRight, 0, -U, !0), i.lineTo(e + a.topLeft, n);
}
const Hr = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, Nr = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
function Vr(i, t) {
const e = ("" + i).match(Hr);
if (!e || e[1] === "normal")
return t * 1.2;
switch (i = +e[2], e[3]) {
case "px":
return i;
case "%":
i /= 100;
break;
}
return t * i;
}
const jr = (i) => +i || 0;
function Dn(i, t) {
const e = {}, n = O(t), s = n ? Object.keys(t) : t, o = O(i) ? n ? (a) => D(i[a], i[t[a]]) : (a) => i[a] : () => i;
for (const a of s)
e[a] = jr(o(a));
return e;
}
function Oo(i) {
return Dn(i, {
top: "y",
right: "x",
bottom: "y",
left: "x"
});
}
function $t(i) {
return Dn(i, [
"topLeft",
"topRight",
"bottomLeft",
"bottomRight"
]);
}
function K(i) {
const t = Oo(i);
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
}
function X(i, t) {
i = i || {}, t = t || $.font;
let e = D(i.size, t.size);
typeof e == "string" && (e = parseInt(e, 10));
let n = D(i.style, t.style);
n && !("" + n).match(Nr) && (console.warn('Invalid font style specified: "' + n + '"'), n = void 0);
const s = {
family: D(i.family, t.family),
lineHeight: Vr(D(i.lineHeight, t.lineHeight), e),
size: e,
style: n,
weight: D(i.weight, t.weight),
string: ""
};
return s.string = Ir(s), s;
}
function N(i, t, e, n) {
let s = !0, o, a, r;
for (o = 0, a = i.length; o < a; ++o)
if (r = i[o], r !== void 0 && (t !== void 0 && typeof r == "function" && (r = r(t), s = !1), e !== void 0 && W(r) && (r = r[e % r.length], s = !1), r !== void 0))
return n && !s && (n.cacheable = !1), r;
}
function $r(i, t, e) {
const { min: n, max: s } = i, o = wo(t, (s - n) / 2), a = (r, l) => e && r === 0 ? 0 : r + l;
return {
min: a(n, -Math.abs(o)),
max: a(s, o)
};
}
function Bt(i, t) {
return Object.assign(Object.create(i), t);
}
function Ln(i, t = [
""
], e, n, s = () => i[0]) {
const o = e || i;
typeof n > "u" && (n = Eo("_fallback", i));
const a = {
[Symbol.toStringTag]: "Object",
_cacheable: !0,
_scopes: i,
_rootScopes: o,
_fallback: n,
_getTarget: s,
override: (r) => Ln([
r,
...i
], t, o, n)
};
return new Proxy(a, {
/**
* A trap for the delete operator.
*/
deleteProperty(r, l) {
return delete r[l], delete r._keys, delete i[0][l], !0;
},
/**
* A trap for getting property values.
*/
get(r, l) {
return Fo(r, l, () => Jr(l, t, i, r));
},
/**
* A trap for Object.getOwnPropertyDescriptor.
* Also used by Object.hasOwnProperty.
*/
getOwnPropertyDescriptor(r, l) {
return Reflect.getOwnPropertyDescriptor(r._scopes[0], l);
},
/**
* A trap for Object.getPrototypeOf.
*/
getPrototypeOf() {
return Reflect.getPrototypeOf(i[0]);
},
/**
* A trap for the in operator.
*/
has(r, l) {
return is(r).includes(l);
},
/**
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
*/
ownKeys(r) {
return is(r);
},
/**
* A trap for setting property values.
*/
set(r, l, c) {
const h = r._storage || (r._storage = s());
return r[l] = h[l] = c, delete r._keys, !0;
}
});
}
function oe(i, t, e, n) {
const s = {
_cacheable: !1,
_proxy: i,
_context: t,
_subProxy: e,
_stack: /* @__PURE__ */ new Set(),
_descriptors: Io(i, n),
setContext: (o) => oe(i, o, e, n),
override: (o) => oe(i.override(o), t, e, n)
};
return new Proxy(s, {
/**
* A trap for the delete operator.
*/
deleteProperty(o, a) {
return delete o[a], delete i[a], !0;
},
/**
* A trap for getting property values.
*/
get(o, a, r) {
return Fo(o, a, () => Yr(o, a, r));
},
/**
* A trap for Object.getOwnPropertyDescriptor.
* Also used by Object.hasOwnProperty.
*/
getOwnPropertyDescriptor(o, a) {
return o._descriptors.allKeys ? Reflect.has(i, a) ? {
enumerable: !0,
configurable: !0
} : void 0 : Reflect.getOwnPropertyDescriptor(i, a);
},
/**
* A trap for Object.getPrototypeOf.
*/
getPrototypeOf() {
return Reflect.getPrototypeOf(i);
},
/**
* A trap for the in operator.
*/
has(o, a) {
return Reflect.has(i, a);
},
/**
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
*/
ownKeys() {
return Reflect.ownKeys(i);
},
/**
* A trap for setting property values.
*/
set(o, a, r) {
return i[a] = r, delete o[a], !0;
}
});
}
function Io(i, t = {
scriptable: !0,
indexable: !0
}) {
const { _scriptable: e = t.scriptable, _indexable: n = t.indexable, _allKeys: s = t.allKeys } = i;
return {
allKeys: s,
scriptable: e,
indexable: n,
isScriptable: Rt(e) ? e : () => e,
isIndexable: Rt(n) ? n : () => n
};
}
const Ur = (i, t) => i ? i + Sn(t) : t, Tn = (i, t) => O(t) && i !== "adapters" && (Object.getPrototypeOf(t) === null || t.constructor === Object);
function Fo(i, t, e) {
if (Object.prototype.hasOwnProperty.call(i, t))
return i[t];
const n = e();
return i[t] = n, n;
}
function Yr(i, t, e) {
const { _proxy: n, _context: s, _subProxy: o, _descriptors: a } = i;
let r = n[t];
return Rt(r) && a.isScriptable(t) && (r = Xr(t, r, i, e)), W(r) && r.length && (r = Gr(t, r, i, a.isIndexable)), Tn(t, r) && (r = oe(r, s, o && o[t], a)), r;
}
function Xr(i, t, e, n) {
const { _proxy: s, _context: o, _subProxy: a, _stack: r } = e;
if (r.has(i))
throw new Error("Recursion detected: " + Array.from(r).join("->") + "->" + i);
r.add(i);
let l = t(o, a || n);
return r.delete(i), Tn(i, l) && (l = On(s._scopes, s, i, l)), l;
}
function Gr(i, t, e, n) {
const { _proxy: s, _context: o, _subProxy: a, _descriptors: r } = e;
if (typeof o.index < "u" && n(i))
return t[o.index % t.length];
if (O(t[0])) {
const l = t, c = s._scopes.filter((h) => h !== l);
t = [];
for (const h of l) {
const d = On(c, s, i, h);
t.push(oe(d, o, a && a[i], r));
}
}
return t;
}
function Ro(i, t, e) {
return Rt(i) ? i(t, e) : i;
}
const qr = (i, t) => i === !0 ? t : typeof i == "string" ? Ft(t, i) : void 0;
function Kr(i, t, e, n, s) {
for (const o of t) {
const a = qr(e, o);
if (a) {
i.add(a);
const r = Ro(a._fallback, e, s);
if (typeof r < "u" && r !== e && r !== n)
return r;
} else if (a === !1 && typeof n < "u" && e !== n)
return null;
}
return !1;
}
function On(i, t, e, n) {
const s = t._rootScopes, o = Ro(t._fallback, e, n), a = [
...i,
...s
], r = /* @__PURE__ */ new Set();
r.add(n);
let l = es(r, a, e, o || e, n);
return l === null || typeof o < "u" && o !== e && (l = es(r, a, o, l, n), l === null) ? !1 : Ln(Array.from(r), [
""
], s, o, () => Zr(t, e, n));
}
function es(i, t, e, n, s) {
for (; e; )
e = Kr(i, t, e, n, s);
return e;
}
function Zr(i, t, e) {
const n = i._getTarget();
t in n || (n[t] = {});
const s = n[t];
return W(s) && O(e) ? e : s || {};
}
function Jr(i, t, e, n) {
let s;
for (const o of t)
if (s = Eo(Ur(o, i), e), typeof s < "u")
return Tn(i, s) ? On(e, n, i, s) : s;
}
function Eo(i, t) {
for (const e of t) {
if (!e)
continue;
const n = e[i];
if (typeof n < "u")
return n;
}
}
function is(i) {
let t = i._keys;
return t || (t = i._keys = Qr(i._scopes)), t;
}
function Qr(i) {
const t = /* @__PURE__ */ new Set();
for (const e of i)
for (const n of Object.keys(e).filter((s) => !s.startsWith("_")))
t.add(n);
return Array.from(t);
}
function tl(i, t, e, n) {
const { iScale: s } = i, { key: o = "r" } = this._parsing, a = new Array(n);
let r, l, c, h;
for (r = 0, l = n; r < l; ++r)
c = r + e, h = t[c], a[r] = {
r: s.parse(Ft(h, o), c)
};
return a;
}
const el = Number.EPSILON || 1e-14, ae = (i, t) => t < i.length && !i[t].skip && i[t], Bo = (i) => i === "x" ? "y" : "x";
function il(i, t, e, n) {
const s = i.skip ? t : i, o = t, a = e.skip ? t : e, r = nn(o, s), l = nn(a, o);
let c = r / (r + l), h = l / (r + l);
c = isNaN(c) ? 0 : c, h = isNaN(h) ? 0 : h;
const d = n * c, u = n * h;
return {
previous: {
x: o.x - d * (a.x - s.x),
y: o.y - d * (a.y - s.y)
},
next: {
x: o.x + u * (a.x - s.x),
y: o.y + u * (a.y - s.y)
}
};
}
function nl(i, t, e) {
const n = i.length;
let s, o, a, r, l, c = ae(i, 0);
for (let h = 0; h < n - 1; ++h)
if (l = c, c = ae(i, h + 1), !(!l || !c)) {
if (Re(t[h], 0, el)) {
e[h] = e[h + 1] = 0;
continue;
}
s = e[h] / t[h], o = e[h + 1] / t[h], r = Math.pow(s, 2) + Math.pow(o, 2), !(r <= 9) && (a = 3 / Math.sqrt(r), e[h] = s * a * t[h], e[h + 1] = o * a * t[h]);
}
}
function sl(i, t, e = "x") {
const n = Bo(e), s = i.length;
let o, a, r, l = ae(i, 0);
for (let c = 0; c < s; ++c) {
if (a = r, r = l, l = ae(i, c + 1), !r)
continue;
const h = r[e], d = r[n];
a && (o = (h - a[e]) / 3, r[`cp1${e}`] = h - o, r[`cp1${n}`] = d - o * t[c]), l && (o = (l[e] - h) / 3, r[`cp2${e}`] = h + o, r[`cp2${n}`] = d + o * t[c]);
}
}
function ol(i, t = "x") {
const e = Bo(t), n = i.length, s = Array(n).fill(0), o = Array(n);
let a, r, l, c = ae(i, 0);
for (a = 0; a < n; ++a)
if (r = l, l = c, c = ae(i, a + 1), !!l) {
if (c) {
const h = c[t] - l[t];
s[a] = h !== 0 ? (c[e] - l[e]) / h : 0;
}
o[a] = r ? c ? mt(s[a - 1]) !== mt(s[a]) ? 0 : (s[a - 1] + s[a]) / 2 : s[a - 1] : s[a];
}
nl(i, s, o), sl(i, o, t);
}
function ei(i, t, e) {
return Math.max(Math.min(i, e), t);
}
function al(i, t) {
let e, n, s, o, a, r = wt(i[0], t);
for (e = 0, n = i.length; e < n; ++e)
a = o, o = r, r = e < n - 1 && wt(i[e + 1], t), o && (s = i[e], a && (s.cp1x = ei(s.cp1x, t.left, t.right), s.cp1y = ei(s.cp1y, t.top, t.bottom)), r && (s.cp2x = ei(s.cp2x, t.left, t.right), s.cp2y = ei(s.cp2y, t.top, t.bottom)));
}
function rl(i, t, e, n, s) {
let o, a, r, l;
if (t.spanGaps && (i = i.filter((c) => !c.skip)), t.cubicInterpolationMode === "monotone")
ol(i, s);
else {
let c = n ? i[i.length - 1] : i[0];
for (o = 0, a = i.length; o < a; ++o)
r = i[o], l = il(c, r, i[Math.min(o + 1, a - (n ? 0 : 1)) % a], t.tension), r.cp1x = l.previous.x, r.cp1y = l.previous.y, r.cp2x = l.next.x, r.cp2y = l.next.y, c = r;
}
t.capBezierPoints && al(i, e);
}
function zo() {
return typeof window < "u" && typeof document < "u";
}
function In(i) {
let t = i.parentNode;
return t && t.toString() === "[object ShadowRoot]" && (t = t.host), t;
}
function Mi(i, t, e) {
let n;
return typeof i == "string" ? (n = parseInt(i, 10), i.indexOf("%") !== -1 && (n = n / 100 * t.parentNode[e])) : n = i, n;
}
const Oi = (i) => i.ownerDocument.defaultView.getComputedStyle(i, null);
function ll(i, t) {
return Oi(i).getPropertyValue(t);
}
const cl = [
"top",
"right",
"bottom",
"left"
];
function Ut(i, t, e) {
const n = {};
e = e ? "-" + e : "";
for (let s = 0; s < 4; s++) {
const o = cl[s];
n[o] = parseFloat(i[t + "-" + o + e]) || 0;
}
return n.width = n.left + n.right, n.height = n.top + n.bottom, n;
}
const hl = (i, t, e) => (i > 0 || t > 0) && (!e || !e.shadowRoot);
function dl(i, t) {
const e = i.touches, n = e && e.length ? e[0] : i, { offsetX: s, offsetY: o } = n;
let a = !1, r, l;
if (hl(s, o, i.target))
r = s, l = o;
else {
const c = t.getBoundingClientRect();
r = n.clientX - c.left, l = n.clientY - c.top, a = !0;
}
return {
x: r,
y: l,
box: a
};
}
function Nt(i, t) {
if ("native" in i)
return i;
const { canvas: e, currentDevicePixelRatio: n } = t, s = Oi(e), o = s.boxSizing === "border-box", a = Ut(s, "padding"), r = Ut(s, "border", "width"), { x: l, y: c, box: h } = dl(i, e), d = a.left + (h && r.left), u = a.top + (h && r.top);
let { width: f, height: b } = t;
return o && (f -= a.width + r.width, b -= a.height + r.height), {
x: Math.round((l - d) / f * e.width / n),
y: Math.round((c - u) / b * e.height / n)
};
}
function ul(i, t, e) {
let n, s;
if (t === void 0 || e === void 0) {
const o = In(i);
if (!o)
t = i.clientWidth, e = i.clientHeight;
else {
const a = o.getBoundingClientRect(), r = Oi(o), l = Ut(r, "border", "width"), c = Ut(r, "padding");
t = a.width - c.width - l.width, e = a.height - c.height - l.height, n = Mi(r.maxWidth, o, "clientWidth"), s = Mi(r.maxHeight, o, "clientHeight");
}
}
return {
width: t,
height: e,
maxWidth: n || wi,
maxHeight: s || wi
};
}
const ii = (i) => Math.round(i * 10) / 10;
function fl(i, t, e, n) {
const s = Oi(i), o = Ut(s, "margin"), a = Mi(s.maxWidth, i, "clientWidth") || wi, r = Mi(s.maxHeight, i, "clientHeight") || wi, l = ul(i, t, e);
let { width: c, height: h } = l;
if (s.boxSizing === "content-box") {
const u = Ut(s, "border", "width"), f = Ut(s, "padding");
c -= f.width + u.width, h -= f.height + u.height;
}
return c = Math.max(0, c - o.width), h = Math.max(0, n ? c / n : h - o.height), c = ii(Math.min(c, a, l.maxWidth)), h = ii(Math.min(h, r, l.maxHeight)), c && !h && (h = ii(c / 2)), (t !== void 0 || e !== void 0) && n && l.height && h > l.height && (h = l.height, c = ii(Math.floor(h * n))), {
width: c,
height: h
};
}
function ns(i, t, e) {
const n = t || 1, s = Math.floor(i.height * n), o = Math.floor(i.width * n);
i.height = Math.floor(i.height), i.width = Math.floor(i.width);
const a = i.canvas;
return a.style &