//#region node_modules/uplot/dist/uPlot.esm.js
var e = !0, t = "uplot", n = "u-hz", r = "u-vt", i = "u-title", a = "u-wrap", o = "u-under", s = "u-over", c = "u-axis", l = "u-off", u = "u-select", d = "u-cursor-x", f = "u-cursor-y", p = "u-cursor-pt", m = "u-legend", h = "u-live", g = "u-inline", _ = "u-series", v = "u-marker", y = "u-label", b = "u-value", x = "width", S = "height", C = "top", w = "bottom", T = "left", E = "right", D = "#000", ee = "#0000", te = "mousemove", ne = "mousedown", re = "mouseup", ie = "mouseenter", ae = "mouseleave", oe = "dblclick", se = "resize", O = "scroll", k = "change", ce = "dppxchange", le = "--", A = typeof window < "u", ue = A ? document : null, de = A ? window : null, j = A ? navigator : null, M, fe;
function pe() {
	let e = devicePixelRatio;
	M != e && (M = e, fe && Ee(k, fe, pe), fe = matchMedia(`(min-resolution: ${M - .001}dppx) and (max-resolution: ${M + .001}dppx)`), Te(k, fe, pe), de.dispatchEvent(new CustomEvent(ce)));
}
function me(e, t) {
	if (t != null) {
		let n = e.classList;
		!n.contains(t) && n.add(t);
	}
}
function he(e, t) {
	let n = e.classList;
	n.contains(t) && n.remove(t);
}
function N(e, t, n) {
	e.style[t] = n + "px";
}
function ge(e, t, n, r) {
	let i = ue.createElement(e);
	return t != null && me(i, t), n?.insertBefore(i, r), i;
}
function _e(e, t) {
	return ge("div", e, t);
}
var ve = /* @__PURE__ */ new WeakMap();
function ye(e, t, n, r, i) {
	let a = "translate(" + t + "px," + n + "px)";
	a != ve.get(e) && (e.style.transform = a, ve.set(e, a), t < 0 || n < 0 || t > r || n > i ? me(e, l) : he(e, l));
}
var be = /* @__PURE__ */ new WeakMap();
function xe(e, t, n) {
	let r = t + n;
	r != be.get(e) && (be.set(e, r), e.style.background = t, e.style.borderColor = n);
}
var P = /* @__PURE__ */ new WeakMap();
function Se(e, t, n, r) {
	let i = t + "" + n;
	i != P.get(e) && (P.set(e, i), e.style.height = n + "px", e.style.width = t + "px", e.style.marginLeft = r ? -t / 2 + "px" : 0, e.style.marginTop = r ? -n / 2 + "px" : 0);
}
var Ce = { passive: !0 }, we = {
	...Ce,
	capture: !0
};
function Te(e, t, n, r) {
	t.addEventListener(e, n, r ? we : Ce);
}
function Ee(e, t, n, r) {
	t.removeEventListener(e, n, Ce);
}
A && pe();
function De(e, t, n, r) {
	let i;
	n ||= 0, r ||= t.length - 1;
	let a = r <= 2147483647;
	for (; r - n > 1;) i = a ? n + r >> 1 : Ge((n + r) / 2), t[i] < e ? n = i : r = i;
	return e - t[n] <= t[r] - e ? n : r;
}
function Oe(e) {
	return (t, n, r) => {
		let i = -1, a = -1;
		for (let a = n; a <= r; a++) if (e(t[a])) {
			i = a;
			break;
		}
		for (let i = r; i >= n; i--) if (e(t[i])) {
			a = i;
			break;
		}
		return [i, a];
	};
}
var ke = (e) => e != null, Ae = (e) => e != null && e > 0, je = Oe(ke), F = Oe(Ae);
function Me(e, t, n, r = 0, i = !1) {
	let a = i ? F : je, o = i ? Ae : ke;
	[t, n] = a(e, t, n);
	let s = e[t], c = e[t];
	if (t > -1) if (r == 1) s = e[t], c = e[n];
	else if (r == -1) s = e[n], c = e[t];
	else for (let r = t; r <= n; r++) {
		let t = e[r];
		o(t) && (t < s ? s = t : t > c && (c = t));
	}
	return [s ?? B, c ?? -B];
}
function Ne(e, t, n, r) {
	let i = Ze(e), a = Ze(t);
	e == t && (i == -1 ? (e *= n, t /= n) : (e /= n, t *= n));
	let o = n == 10 ? Qe : z, s = i == 1 ? Ge : qe, c = a == 1 ? qe : Ge, l = s(o(We(e))), u = c(o(We(t))), d = Xe(n, l), f = Xe(n, u);
	return n == 10 && (l < 0 && (d = U(d, -l)), u < 0 && (f = U(f, -u))), r || n == 2 ? (e = d * i, t = f * a) : (e = pt(e, d), t = ft(t, f)), [e, t];
}
function Pe(e, t, n, r) {
	let i = Ne(e, t, n, r);
	return e == 0 && (i[0] = 0), t == 0 && (i[1] = 0), i;
}
var Fe = .1, Ie = {
	mode: 3,
	pad: Fe
}, Le = {
	pad: 0,
	soft: null,
	mode: 0
}, I = {
	min: Le,
	max: Le
};
function Re(e, t, n, r) {
	return wt(n) ? Be(e, t, n) : (Le.pad = n, Le.soft = r ? 0 : null, Le.mode = r ? 3 : 0, Be(e, t, I));
}
function L(e, t) {
	return e ?? t;
}
function ze(e, t, n) {
	for (t = L(t, 0), n = L(n, e.length - 1); t <= n;) {
		if (e[t] != null) return !0;
		t++;
	}
	return !1;
}
function Be(e, t, n) {
	let r = n.min, i = n.max, a = L(r.pad, 0), o = L(i.pad, 0), s = L(r.hard, -B), c = L(i.hard, B), l = L(r.soft, B), u = L(i.soft, -B), d = L(r.mode, 0), f = L(i.mode, 0), p = t - e, m = Qe(p), h = Ye(We(e), We(t)), g = We(Qe(h) - m);
	(p < 1e-24 || g > 10) && (p = 0, (e == 0 || t == 0) && (p = 1e-24, d == 2 && l != B && (a = 0), f == 2 && u != -B && (o = 0)));
	let _ = p || h || 1e3, v = Xe(10, Ge(Qe(_))), y = U(pt(e - _ * (p == 0 ? e == 0 ? .1 : 1 : a), v / 10), 24), b = e >= l && (d == 1 || d == 3 && y <= l || d == 2 && y >= l) ? l : B, x = Ye(s, y < b && e >= b ? b : Je(b, y)), S = U(ft(t + _ * (p == 0 ? t == 0 ? .1 : 1 : o), v / 10), 24), C = t <= u && (f == 1 || f == 3 && S >= u || f == 2 && S <= u) ? u : -B, w = Je(c, S > C && t <= C ? C : Ye(C, S));
	return x == w && x == 0 && (w = 100), [x, w];
}
var R = new Intl.NumberFormat(A ? j.language : "en-US"), Ve = (e) => R.format(e), He = Math, Ue = He.PI, We = He.abs, Ge = He.floor, Ke = He.round, qe = He.ceil, Je = He.min, Ye = He.max, Xe = He.pow, Ze = He.sign, Qe = He.log10, z = He.log2, $e = (e, t = 1) => He.sinh(e) * t, et = (e, t = 1) => He.asinh(e / t), B = Infinity;
function tt(e) {
	return (Qe((e ^ e >> 31) - (e >> 31)) | 0) + 1;
}
function nt(e, t, n) {
	return Je(Ye(e, t), n);
}
function rt(e) {
	return typeof e == "function";
}
function V(e) {
	return rt(e) ? e : () => e;
}
var it = () => {}, at = (e) => e, ot = (e, t) => t, st = (e) => null, ct = (e) => !0, lt = (e, t) => e == t, H = /\.\d*?(?=9{6,}|0{6,})/gm, ut = (e) => {
	if (xt(e) || mt.has(e)) return e;
	let t = `${e}`, n = t.match(H);
	if (n == null) return e;
	let r = n[0].length - 1;
	if (t.indexOf("e-") != -1) {
		let [e, n] = t.split("e");
		return +`${ut(e)}e${n}`;
	}
	return U(e, r);
};
function dt(e, t) {
	return ut(U(ut(e / t)) * t);
}
function ft(e, t) {
	return ut(qe(ut(e / t)) * t);
}
function pt(e, t) {
	return ut(Ge(ut(e / t)) * t);
}
function U(e, t = 0) {
	if (xt(e)) return e;
	let n = 10 ** t;
	return Ke(e * n * (1 + 2 ** -52)) / n;
}
var mt = /* @__PURE__ */ new Map();
function ht(e) {
	return (("" + e).split(".")[1] || "").length;
}
function gt(e, t, n, r) {
	let i = [], a = r.map(ht);
	for (let o = t; o < n; o++) {
		let t = We(o), n = U(Xe(e, o), t);
		for (let s = 0; s < r.length; s++) {
			let c = e == 10 ? +`${r[s]}e${o}` : r[s] * n, l = (o >= 0 ? 0 : t) + (o >= a[s] ? 0 : a[s]), u = e == 10 ? c : U(c, l);
			i.push(u), mt.set(u, l);
		}
	}
	return i;
}
var _t = {}, vt = [], yt = [null, null], bt = Array.isArray, xt = Number.isInteger, St = (e) => e === void 0;
function Ct(e) {
	return typeof e == "string";
}
function wt(e) {
	let t = !1;
	if (e != null) {
		let n = e.constructor;
		t = n == null || n == Object;
	}
	return t;
}
function Tt(e) {
	return typeof e == "object" && !!e;
}
var Et = Object.getPrototypeOf(Uint8Array), W = "__proto__";
function Dt(e, t = wt) {
	let n;
	if (bt(e)) {
		let r = e.find((e) => e != null);
		if (bt(r) || t(r)) {
			n = Array(e.length);
			for (let r = 0; r < e.length; r++) n[r] = Dt(e[r], t);
		} else n = e.slice();
	} else if (e instanceof Et) n = e.slice();
	else if (t(e)) {
		n = {};
		for (let r in e) r != W && (n[r] = Dt(e[r], t));
	} else n = e;
	return n;
}
function Ot(e) {
	let t = arguments;
	for (let n = 1; n < t.length; n++) {
		let r = t[n];
		for (let t in r) t != W && (wt(e[t]) ? Ot(e[t], Dt(r[t])) : e[t] = Dt(r[t]));
	}
	return e;
}
var G = 0, kt = 1, At = 2;
function jt(e, t, n) {
	for (let r = 0, i, a = -1; r < t.length; r++) {
		let o = t[r];
		if (o > a) {
			for (i = o - 1; i >= 0 && e[i] == null;) e[i--] = null;
			for (i = o + 1; i < n && e[i] == null;) e[a = i++] = null;
		}
	}
}
function Mt(e, t) {
	if (Ft(e)) {
		let t = e[0].slice();
		for (let n = 1; n < e.length; n++) t.push(...e[n].slice(1));
		return It(t[0]) || (t = Pt(t)), t;
	}
	let n = /* @__PURE__ */ new Set();
	for (let t = 0; t < e.length; t++) {
		let r = e[t][0], i = r.length;
		for (let e = 0; e < i; e++) n.add(r[e]);
	}
	let r = [Array.from(n).sort((e, t) => e - t)], i = r[0].length, a = /* @__PURE__ */ new Map();
	for (let e = 0; e < i; e++) a.set(r[0][e], e);
	for (let n = 0; n < e.length; n++) {
		let o = e[n], s = o[0];
		for (let e = 1; e < o.length; e++) {
			let c = o[e], l = Array(i).fill(void 0), u = t ? t[n][e] : kt, d = [];
			for (let e = 0; e < c.length; e++) {
				let t = c[e], n = a.get(s[e]);
				t === null ? u != G && (l[n] = t, u == At && d.push(n)) : l[n] = t;
			}
			jt(l, d, i), r.push(l);
		}
	}
	return r;
}
var Nt = typeof queueMicrotask > "u" ? (e) => Promise.resolve().then(e) : queueMicrotask;
function Pt(e) {
	let t = e[0], n = t.length, r = Array(n);
	for (let e = 0; e < r.length; e++) r[e] = e;
	r.sort((e, n) => t[e] - t[n]);
	let i = [];
	for (let t = 0; t < e.length; t++) {
		let a = e[t], o = Array(n);
		for (let e = 0; e < n; e++) o[e] = a[r[e]];
		i.push(o);
	}
	return i;
}
function Ft(e) {
	let t = e[0][0], n = t.length;
	for (let r = 1; r < e.length; r++) {
		let i = e[r][0];
		if (i.length != n) return !1;
		if (i != t) {
			for (let e = 0; e < n; e++) if (i[e] != t[e]) return !1;
		}
	}
	return !0;
}
function It(e, t = 100) {
	let n = e.length;
	if (n <= 1) return !0;
	let r = 0, i = n - 1;
	for (; r <= i && e[r] == null;) r++;
	for (; i >= r && e[i] == null;) i--;
	if (i <= r) return !0;
	let a = Ye(1, Ge((i - r + 1) / t));
	for (let t = e[r], n = r + a; n <= i; n += a) {
		let r = e[n];
		if (r != null) {
			if (r <= t) return !1;
			t = r;
		}
	}
	return !0;
}
var Lt = [
	"January",
	"February",
	"March",
	"April",
	"May",
	"June",
	"July",
	"August",
	"September",
	"October",
	"November",
	"December"
], Rt = [
	"Sunday",
	"Monday",
	"Tuesday",
	"Wednesday",
	"Thursday",
	"Friday",
	"Saturday"
];
function zt(e) {
	return e.slice(0, 3);
}
var Bt = Rt.map(zt), Vt = {
	MMMM: Lt,
	MMM: Lt.map(zt),
	WWWW: Rt,
	WWW: Bt
};
function Ht(e) {
	return (e < 10 ? "0" : "") + e;
}
function Ut(e) {
	return (e < 10 ? "00" : e < 100 ? "0" : "") + e;
}
var Wt = {
	YYYY: (e) => e.getFullYear(),
	YY: (e) => (e.getFullYear() + "").slice(2),
	MMMM: (e, t) => t.MMMM[e.getMonth()],
	MMM: (e, t) => t.MMM[e.getMonth()],
	MM: (e) => Ht(e.getMonth() + 1),
	M: (e) => e.getMonth() + 1,
	DD: (e) => Ht(e.getDate()),
	D: (e) => e.getDate(),
	WWWW: (e, t) => t.WWWW[e.getDay()],
	WWW: (e, t) => t.WWW[e.getDay()],
	HH: (e) => Ht(e.getHours()),
	H: (e) => e.getHours(),
	h: (e) => {
		let t = e.getHours();
		return t == 0 ? 12 : t > 12 ? t - 12 : t;
	},
	AA: (e) => e.getHours() >= 12 ? "PM" : "AM",
	aa: (e) => e.getHours() >= 12 ? "pm" : "am",
	a: (e) => e.getHours() >= 12 ? "p" : "a",
	mm: (e) => Ht(e.getMinutes()),
	m: (e) => e.getMinutes(),
	ss: (e) => Ht(e.getSeconds()),
	s: (e) => e.getSeconds(),
	fff: (e) => Ut(e.getMilliseconds())
};
function Gt(e, t) {
	t ||= Vt;
	let n = [], r = /\{([a-z]+)\}|[^{]+/gi, i;
	for (; i = r.exec(e);) n.push(i[0][0] == "{" ? Wt[i[1]] : i[0]);
	return (e) => {
		let r = "";
		for (let i = 0; i < n.length; i++) r += typeof n[i] == "string" ? n[i] : n[i](e, t);
		return r;
	};
}
var Kt = new Intl.DateTimeFormat().resolvedOptions().timeZone;
function qt(e, t) {
	let n;
	return t == "UTC" || t == "Etc/UTC" ? n = /* @__PURE__ */ new Date(+e + e.getTimezoneOffset() * 6e4) : t == Kt ? n = e : (n = new Date(e.toLocaleString("en-US", { timeZone: t })), n.setMilliseconds(e.getMilliseconds())), n;
}
var Jt = (e) => e % 1 == 0, Yt = [
	1,
	2,
	2.5,
	5
], Xt = gt(10, -32, 0, Yt), K = gt(10, 0, 32, Yt), Zt = K.filter(Jt), Qt = Xt.concat(K), q = "{YYYY}", $t = "\n{YYYY}", en = "{M}/{D}", tn = "\n{M}/{D}", nn = "\n{M}/{D}/{YY}", rn = "{h}:{mm}{aa}", an = "\n{h}:{mm}{aa}", on = ":{ss}", J = null;
function sn(e) {
	let t = e * 1e3, n = t * 60, r = n * 60, i = r * 24, a = i * 30, o = i * 365, s = (e == 1 ? gt(10, 0, 3, Yt).filter(Jt) : gt(10, -3, 0, Yt)).concat([
		t,
		t * 5,
		t * 10,
		t * 15,
		t * 30,
		n,
		n * 5,
		n * 10,
		n * 15,
		n * 30,
		r,
		r * 2,
		r * 3,
		r * 4,
		r * 6,
		r * 8,
		r * 12,
		i,
		i * 2,
		i * 3,
		i * 4,
		i * 5,
		i * 6,
		i * 7,
		i * 8,
		i * 9,
		i * 10,
		i * 15,
		a,
		a * 2,
		a * 3,
		a * 4,
		a * 6,
		o,
		o * 2,
		o * 5,
		o * 10,
		o * 25,
		o * 50,
		o * 100
	]), c = [
		[
			o,
			q,
			J,
			J,
			J,
			J,
			J,
			J,
			1
		],
		[
			i * 28,
			"{MMM}",
			$t,
			J,
			J,
			J,
			J,
			J,
			1
		],
		[
			i,
			en,
			$t,
			J,
			J,
			J,
			J,
			J,
			1
		],
		[
			r,
			"{h}{aa}",
			nn,
			J,
			tn,
			J,
			J,
			J,
			1
		],
		[
			n,
			rn,
			nn,
			J,
			tn,
			J,
			J,
			J,
			1
		],
		[
			t,
			on,
			"\n{M}/{D}/{YY} {h}:{mm}{aa}",
			J,
			"\n{M}/{D} {h}:{mm}{aa}",
			J,
			an,
			J,
			1
		],
		[
			e,
			":{ss}.{fff}",
			"\n{M}/{D}/{YY} {h}:{mm}{aa}",
			J,
			"\n{M}/{D} {h}:{mm}{aa}",
			J,
			an,
			J,
			1
		]
	];
	function l(t) {
		return (s, c, l, u, d, f) => {
			let p = [], m = d >= o, h = d >= a && d < o, g = t(l), _ = U(g * e, 3), v = _n(g.getFullYear(), m ? 0 : g.getMonth(), h || m ? 1 : g.getDate()), y = U(v * e, 3);
			if (h || m) {
				let n = h ? d / a : 0, r = m ? d / o : 0, i = _ == y ? _ : U(_n(v.getFullYear() + r, v.getMonth() + n, 1) * e, 3), s = new Date(Ke(i / e)), c = s.getFullYear(), l = s.getMonth();
				for (let a = 0; i <= u; a++) {
					let o = _n(c + r * a, l + n * a, 1), s = o - t(U(o * e, 3));
					i = U((+o + s) * e, 3), i <= u && p.push(i);
				}
			} else {
				let a = d >= i ? i : d, o = y + (Ge(l) - Ge(_)) + ft(_ - y, a);
				p.push(o);
				let m = t(o), h = m.getHours() + m.getMinutes() / n + m.getSeconds() / r, g = d / r, v = f / s.axes[c]._space;
				for (; o = U(o + d, e == 1 ? 0 : 3), !(o > u);) if (g > 1) {
					let e = Ge(U(h + g, 6)) % 24, n = t(o).getHours() - e;
					n > 1 && (n = -1), o -= n * r, h = (h + g) % 24;
					let i = p[p.length - 1];
					U((o - i) / d, 3) * v >= .7 && p.push(o);
				} else p.push(o);
			}
			return p;
		};
	}
	return [
		s,
		c,
		l
	];
}
var [cn, ln, un] = sn(1), [dn, fn, pn] = sn(.001);
gt(2, -53, 53, [1]);
function mn(e, t) {
	return e.map((e) => e.map((n, r) => r == 0 || r == 8 || n == null ? n : t(r == 1 || e[8] == 0 ? n : e[1] + n)));
}
function hn(e, t) {
	return (n, r, i, a, o) => {
		let s = t.find((e) => o >= e[0]) || t[t.length - 1], c, l, u, d, f, p;
		return r.map((t) => {
			let n = e(t), r = n.getFullYear(), i = n.getMonth(), a = n.getDate(), o = n.getHours(), m = n.getMinutes(), h = n.getSeconds(), g = r != c && s[2] || i != l && s[3] || a != u && s[4] || o != d && s[5] || m != f && s[6] || h != p && s[7] || s[1];
			return c = r, l = i, u = a, d = o, f = m, p = h, g(n);
		});
	};
}
function gn(e, t) {
	let n = Gt(t);
	return (t, r, i, a, o) => r.map((t) => n(e(t)));
}
function _n(e, t, n) {
	return new Date(e, t, n);
}
function vn(e, t) {
	return t(e);
}
var yn = "{YYYY}-{MM}-{DD} {h}:{mm}{aa}";
function bn(e, t) {
	return (n, r, i, a) => a == null ? le : t(e(r));
}
function xn(e, t) {
	let n = e.series[t];
	return n.width ? n.stroke(e, t) : n.points.width ? n.points.stroke(e, t) : null;
}
function Sn(e, t) {
	return e.series[t].fill(e, t);
}
var Cn = {
	show: !0,
	live: !0,
	isolate: !1,
	mount: it,
	markers: {
		show: !0,
		width: 2,
		stroke: xn,
		fill: Sn,
		dash: "solid"
	},
	idx: null,
	idxs: null,
	values: []
};
function wn(e, t) {
	let n = e.cursor.points, r = _e(), i = n.size(e, t);
	N(r, x, i), N(r, S, i);
	let a = i / -2;
	N(r, "marginLeft", a), N(r, "marginTop", a);
	let o = n.width(e, t, i);
	return o && N(r, "borderWidth", o), r;
}
function Tn(e, t) {
	let n = e.series[t].points;
	return n._fill || n._stroke;
}
function En(e, t) {
	let n = e.series[t].points;
	return n._stroke || n._fill;
}
function Dn(e, t) {
	return e.series[t].points.size;
}
var On = [0, 0];
function kn(e, t, n) {
	return On[0] = t, On[1] = n, On;
}
function An(e, t, n, r = !0) {
	return (e) => {
		e.button == 0 && (!r || e.target == t) && n(e);
	};
}
function jn(e, t, n, r = !0) {
	return (e) => {
		(!r || e.target == t) && n(e);
	};
}
var Mn = {
	show: !0,
	x: !0,
	y: !0,
	lock: !1,
	move: kn,
	points: {
		one: !1,
		show: wn,
		size: Dn,
		width: 0,
		stroke: En,
		fill: Tn
	},
	bind: {
		mousedown: An,
		mouseup: An,
		click: An,
		dblclick: An,
		mousemove: jn,
		mouseleave: jn,
		mouseenter: jn
	},
	drag: {
		setScale: !0,
		x: !0,
		y: !1,
		dist: 0,
		uni: null,
		click: (e, t) => {
			t.stopPropagation(), t.stopImmediatePropagation();
		},
		_x: !1,
		_y: !1
	},
	focus: {
		dist: (e, t, n, r, i) => r - i,
		prox: -1,
		bias: 0
	},
	hover: {
		skip: [void 0],
		prox: null,
		bias: 0
	},
	left: -10,
	top: -10,
	idx: null,
	dataIdx: null,
	idxs: null,
	event: null
}, Nn = {
	show: !0,
	stroke: "rgba(0,0,0,0.07)",
	width: 2
}, Pn = Ot({}, Nn, { filter: ot }), Fn = Ot({}, Pn, { size: 10 }), In = Ot({}, Nn, { show: !1 }), Ln = "12px system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"", Rn = "bold 12px system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"", zn = 1.5, Bn = {
	show: !0,
	scale: "x",
	stroke: D,
	space: 50,
	gap: 5,
	alignTo: 1,
	size: 50,
	labelGap: 0,
	labelSize: 30,
	labelFont: Rn,
	side: 2,
	grid: Pn,
	ticks: Fn,
	border: In,
	font: Ln,
	lineGap: zn,
	rotate: 0
}, Vn = "Value", Hn = "Time", Un = {
	show: !0,
	scale: "x",
	auto: !1,
	sorted: 1,
	min: B,
	max: -Infinity,
	idxs: []
};
function Wn(e, t, n, r, i) {
	return t.map((e) => e == null ? "" : Ve(e));
}
function Gn(e, t, n, r, i, a, o) {
	let s = [], c = mt.get(i) || 0;
	n = o ? n : U(ft(n, i), c);
	for (let e = n; e <= r; e = U(e + i, c)) s.push(Object.is(e, -0) ? 0 : e);
	return s;
}
function Kn(e, t, n, r, i, a, o) {
	let s = [], c = e.scales[e.axes[t].scale].log;
	i = Xe(c, Ge((c == 10 ? Qe : z)(n))), c == 10 && (i = Qt[De(i, Qt)]);
	let l = n, u = i * c;
	c == 10 && (u = Qt[De(u, Qt)]);
	do
		s.push(l), l += i, c == 10 && !mt.has(l) && (l = U(l, mt.get(i))), l >= u && (i = l, u = i * c, c == 10 && (u = Qt[De(u, Qt)]));
	while (l <= r);
	return s;
}
function qn(e, t, n, r, i, a, o) {
	let s = e.scales[e.axes[t].scale].asinh, c = r > s ? Kn(e, t, Ye(s, n), r, i) : [s], l = r >= 0 && n <= 0 ? [0] : [];
	return (n < -s ? Kn(e, t, Ye(s, -r), -n, i) : [s]).reverse().map((e) => -e).concat(l, c);
}
var Jn = /./, Yn = /[12357]/, Xn = /[125]/, Zn = /1/, Qn = (e, t, n, r) => e.map((e, i) => t == 4 && e == 0 || i % r == 0 && n.test(e.toExponential()[+(e < 0)]) ? e : null);
function $n(e, t, n, r, i) {
	let a = e.axes[n], o = a.scale, s = e.scales[o], c = e.valToPos, l = a._space, u = c(10, o), d = c(9, o) - u >= l ? Jn : c(7, o) - u >= l ? Yn : c(5, o) - u >= l ? Xn : Zn;
	if (d == Zn) {
		let e = We(c(1, o) - u);
		if (e < l) return Qn(t.slice().reverse(), s.distr, d, qe(l / e)).reverse();
	}
	return Qn(t, s.distr, d, 1);
}
function er(e, t, n, r, i) {
	let a = e.axes[n], o = a.scale, s = a._space, c = e.valToPos, l = We(c(1, o) - c(2, o));
	return l < s ? Qn(t.slice().reverse(), 3, Jn, qe(s / l)).reverse() : t;
}
function tr(e, t, n, r) {
	return r == null ? le : t == null ? "" : Ve(t);
}
var nr = {
	show: !0,
	scale: "y",
	stroke: D,
	space: 30,
	gap: 5,
	alignTo: 1,
	size: 50,
	labelGap: 0,
	labelSize: 30,
	labelFont: Rn,
	side: 3,
	grid: Pn,
	ticks: Fn,
	border: In,
	font: Ln,
	lineGap: zn,
	rotate: 0
};
function rr(e, t) {
	return U((3 + (e || 1) * 2) * t, 3);
}
function ir(e, t) {
	let { scale: n, idxs: r } = e.series[0], i = e._data[0], a = e.valToPos(i[r[0]], n, !0), o = We(e.valToPos(i[r[1]], n, !0) - a) / (e.series[t].points.space * M);
	return r[1] - r[0] <= o;
}
var ar = {
	scale: null,
	auto: !0,
	sorted: 0,
	min: B,
	max: -Infinity
}, or = (e, t, n, r, i) => i, sr = {
	show: !0,
	auto: !0,
	sorted: 0,
	gaps: or,
	alpha: 1,
	facets: [Ot({}, ar, { scale: "x" }), Ot({}, ar, { scale: "y" })]
}, cr = {
	scale: "y",
	auto: !0,
	sorted: 0,
	show: !0,
	spanGaps: !1,
	gaps: or,
	alpha: 1,
	points: {
		show: ir,
		filter: null
	},
	values: null,
	min: B,
	max: -Infinity,
	idxs: [],
	path: null,
	clip: null
};
function lr(e, t, n, r, i) {
	return n / 10;
}
var ur = {
	time: e,
	auto: !0,
	distr: 1,
	log: 10,
	asinh: 1,
	min: null,
	max: null,
	dir: 1,
	ori: 0
}, dr = Ot({}, ur, {
	time: !1,
	ori: 1
}), fr = {};
function pr(e, t) {
	let n = fr[e];
	return n || (n = {
		key: e,
		plots: [],
		sub(e) {
			n.plots.push(e);
		},
		unsub(e) {
			n.plots = n.plots.filter((t) => t != e);
		},
		pub(e, t, r, i, a, o, s) {
			for (let c = 0; c < n.plots.length; c++) n.plots[c] != t && n.plots[c].pub(e, t, r, i, a, o, s);
		}
	}, e != null && (fr[e] = n)), n;
}
var mr = 1, hr = 2;
function gr(e, t, n) {
	let r = e.mode, i = e.series[t], a = r == 2 ? e._data[t] : e._data, o = e.scales, s = e.bbox, c = a[0], l = r == 2 ? a[1] : a[t], u = r == 2 ? o[i.facets[0].scale] : o[e.series[0].scale], d = r == 2 ? o[i.facets[1].scale] : o[i.scale], f = s.left, p = s.top, m = s.width, h = s.height, g = e.valToPosH, _ = e.valToPosV;
	return u.ori == 0 ? n(i, c, l, u, d, g, _, f, p, m, h, Cr, Tr, Dr, kr, jr) : n(i, c, l, u, d, _, g, p, f, h, m, wr, Er, Or, Ar, Mr);
}
function _r(e, t) {
	let n = 0, r = 0, i = L(e.bands, vt);
	for (let e = 0; e < i.length; e++) {
		let a = i[e];
		a.series[0] == t ? n = a.dir : a.series[1] == t && (a.dir == 1 ? r |= 1 : r |= 2);
	}
	return [n, r == 1 ? -1 : r == 2 ? 1 : r == 3 ? 2 : 0];
}
function vr(e, t, n, r, i) {
	let a = e.mode, o = e.series[t], s = a == 2 ? o.facets[1].scale : o.scale, c = e.scales[s];
	return i == -1 ? c.min : i == 1 ? c.max : c.distr == 3 ? c.dir == 1 ? c.min : c.max : 0;
}
function yr(e, t, n, r, i, a) {
	return gr(e, t, (e, t, o, s, c, l, u, d, f, p, m) => {
		let h = e.pxRound, g = s.dir * (s.ori == 0 ? 1 : -1), _ = s.ori == 0 ? Tr : Er, v, y;
		g == 1 ? (v = n, y = r) : (v = r, y = n);
		let b = h(l(t[v], s, p, d)), x = h(u(o[v], c, m, f)), S = h(l(t[y], s, p, d)), C = h(u(a == 1 ? c.max : c.min, c, m, f)), w = new Path2D(i);
		return _(w, S, C), _(w, b, C), _(w, b, x), w;
	});
}
function Y(e, t, n, r, i, a) {
	let o = null;
	if (e.length > 0) {
		o = new Path2D();
		let s = t == 0 ? Dr : Or, c = n;
		for (let t = 0; t < e.length; t++) {
			let n = e[t];
			if (n[1] > n[0]) {
				let e = n[0] - c;
				e > 0 && s(o, c, r, e, r + a), c = n[1];
			}
		}
		let l = n + i - c;
		l > 0 && s(o, c, r - 10 / 2, l, r + a + 10);
	}
	return o;
}
function br(e, t, n) {
	let r = e[e.length - 1];
	r && r[0] == t ? r[1] = n : e.push([t, n]);
}
function X(e, t, n, r, i, a, o) {
	let s = [], c = e.length;
	for (let l = i == 1 ? n : r; l >= n && l <= r; l += i) if (t[l] === null) {
		let u = l, d = l;
		if (i == 1) for (; ++l <= r && t[l] === null;) d = l;
		else for (; --l >= n && t[l] === null;) d = l;
		let f = a(e[u]), p = d == u ? f : a(e[d]), m = u - i;
		f = o <= 0 && m >= 0 && m < c ? a(e[m]) : f;
		let h = d + i;
		p = o >= 0 && h >= 0 && h < c ? a(e[h]) : p, p >= f && s.push([f, p]);
	}
	return s;
}
function xr(e) {
	return e == 0 ? at : e == 1 ? Ke : (t) => dt(t, e);
}
function Sr(e) {
	let t = e == 0 ? Cr : wr, n = e == 0 ? (e, t, n, r, i, a) => {
		e.arcTo(t, n, r, i, a);
	} : (e, t, n, r, i, a) => {
		e.arcTo(n, t, i, r, a);
	}, r = e == 0 ? (e, t, n, r, i) => {
		e.rect(t, n, r, i);
	} : (e, t, n, r, i) => {
		e.rect(n, t, i, r);
	};
	return (e, i, a, o, s, c = 0, l = 0) => {
		c == 0 && l == 0 ? r(e, i, a, o, s) : (c = Je(c, o / 2, s / 2), l = Je(l, o / 2, s / 2), t(e, i + c, a), n(e, i + o, a, i + o, a + s, c), n(e, i + o, a + s, i, a + s, l), n(e, i, a + s, i, a, l), n(e, i, a, i + o, a, c), e.closePath());
	};
}
var Cr = (e, t, n) => {
	e.moveTo(t, n);
}, wr = (e, t, n) => {
	e.moveTo(n, t);
}, Tr = (e, t, n) => {
	e.lineTo(t, n);
}, Er = (e, t, n) => {
	e.lineTo(n, t);
}, Dr = Sr(0), Or = Sr(1), kr = (e, t, n, r, i, a) => {
	e.arc(t, n, r, i, a);
}, Ar = (e, t, n, r, i, a) => {
	e.arc(n, t, r, i, a);
}, jr = (e, t, n, r, i, a, o) => {
	e.bezierCurveTo(t, n, r, i, a, o);
}, Mr = (e, t, n, r, i, a, o) => {
	e.bezierCurveTo(n, t, i, r, o, a);
};
function Nr(e) {
	return (e, t, n, r, i) => gr(e, t, (t, a, o, s, c, l, u, d, f, p, m) => {
		let { pxRound: h, points: g } = t, _, v;
		s.ori == 0 ? (_ = Cr, v = kr) : (_ = wr, v = Ar);
		let y = U(g.width * M, 3), b = (g.size - g.width) / 2 * M, x = U(b * 2, 3), S = new Path2D(), C = new Path2D(), { left: w, top: T, width: E, height: D } = e.bbox;
		Dr(C, w - x, T - x, E + x * 2, D + x * 2);
		let ee = (e) => {
			if (o[e] != null) {
				let t = h(l(a[e], s, p, d)), n = h(u(o[e], c, m, f));
				_(S, t + b, n), v(S, t, n, b, 0, Ue * 2);
			}
		};
		if (i) i.forEach(ee);
		else for (let e = n; e <= r; e++) ee(e);
		return {
			stroke: y > 0 ? S : null,
			fill: S,
			clip: C,
			flags: 3
		};
	});
}
function Pr(e) {
	return (t, n, r, i, a, o) => {
		r != i && (a != r && o != r && e(t, n, r), a != i && o != i && e(t, n, i), e(t, n, o));
	};
}
var Fr = Pr(Tr), Ir = Pr(Er);
function Lr(e) {
	let t = L(e?.alignGaps, 0);
	return (e, n, r, i) => gr(e, n, (a, o, s, c, l, u, d, f, p, m, h) => {
		[r, i] = je(s, r, i);
		let g = a.pxRound, _ = (e) => g(u(e, c, m, f)), v = (e) => g(d(e, l, h, p)), y, b;
		c.ori == 0 ? (y = Tr, b = Fr) : (y = Er, b = Ir);
		let x = c.dir * (c.ori == 0 ? 1 : -1), S = {
			stroke: new Path2D(),
			fill: null,
			clip: null,
			band: null,
			gaps: null,
			flags: mr
		}, C = S.stroke, w = !1;
		if (i - r >= m * 4) {
			let t = (t) => e.posToVal(t, c.key, !0), n = null, a = null, l, u, d = _(o[x == 1 ? r : i]), f = _(o[r]), p = _(o[i]), m = t(x == 1 ? f + 1 : p - 1);
			for (let e = x == 1 ? r : i; e >= r && e <= i; e += x) {
				let r = o[e], i = (x == 1 ? r < m : r > m) ? d : _(r), c = s[e];
				i == d ? c == null ? c === null && (w = !0) : (u = c, n == null ? (y(C, i, v(u)), l = n = a = u) : u < n ? n = u : u > a && (a = u)) : (n != null && b(C, d, v(n), v(a), v(l), v(u)), c == null ? (n = a = null, c === null && (w = !0)) : (u = c, y(C, i, v(u)), n = a = l = u), d = i, m = t(d + x));
			}
			n != null && n != a && d != null && b(C, d, v(n), v(a), v(l), v(u));
		} else for (let e = x == 1 ? r : i; e >= r && e <= i; e += x) {
			let t = s[e];
			t === null ? w = !0 : t != null && y(C, _(o[e]), v(t));
		}
		let [T, E] = _r(e, n);
		if (a.fill != null || T != 0) {
			let t = S.fill = new Path2D(C), s = v(a.fillTo(e, n, a.min, a.max, T)), c = _(o[r]), l = _(o[i]);
			x == -1 && ([l, c] = [c, l]), y(t, l, s), y(t, c, s);
		}
		if (!a.spanGaps) {
			let l = [];
			w && l.push(...X(o, s, r, i, x, _, t)), S.gaps = l = a.gaps(e, n, r, i, l), S.clip = Y(l, c.ori, f, p, m, h);
		}
		return E != 0 && (S.band = E == 2 ? [yr(e, n, r, i, C, -1), yr(e, n, r, i, C, 1)] : yr(e, n, r, i, C, E)), S;
	});
}
function Rr(e) {
	let t = L(e.align, 1), n = L(e.ascDesc, !1), r = L(e.alignGaps, 0), i = L(e.extend, !1);
	return (e, a, o, s) => gr(e, a, (c, l, u, d, f, p, m, h, g, _, v) => {
		[o, s] = je(u, o, s);
		let y = c.pxRound, { left: b, width: x } = e.bbox, S = (e) => y(p(e, d, _, h)), C = (e) => y(m(e, f, v, g)), w = d.ori == 0 ? Tr : Er, T = {
			stroke: new Path2D(),
			fill: null,
			clip: null,
			band: null,
			gaps: null,
			flags: mr
		}, E = T.stroke, D = d.dir * (d.ori == 0 ? 1 : -1), ee = C(u[D == 1 ? o : s]), te = S(l[D == 1 ? o : s]), ne = te, re = te;
		i && t == -1 && (re = b, w(E, re, ee)), w(E, te, ee);
		for (let e = D == 1 ? o : s; e >= o && e <= s; e += D) {
			let n = u[e];
			if (n == null) continue;
			let r = S(l[e]), i = C(n);
			t == 1 ? w(E, r, ee) : w(E, ne, i), w(E, r, i), ee = i, ne = r;
		}
		let ie = ne;
		i && t == 1 && (ie = b + x, w(E, ie, ee));
		let [ae, oe] = _r(e, a);
		if (c.fill != null || ae != 0) {
			let t = T.fill = new Path2D(E), n = C(c.fillTo(e, a, c.min, c.max, ae));
			w(t, ie, n), w(t, re, n);
		}
		if (!c.spanGaps) {
			let i = [];
			i.push(...X(l, u, o, s, D, S, r));
			let f = c.width * M / 2, p = n || t == 1 ? f : -f, m = n || t == -1 ? -f : f;
			i.forEach((e) => {
				e[0] += p, e[1] += m;
			}), T.gaps = i = c.gaps(e, a, o, s, i), T.clip = Y(i, d.ori, h, g, _, v);
		}
		return oe != 0 && (T.band = oe == 2 ? [yr(e, a, o, s, E, -1), yr(e, a, o, s, E, 1)] : yr(e, a, o, s, E, oe)), T;
	});
}
function zr(e, t, n, r, i, a, o = B) {
	if (e.length > 1) {
		let s = null;
		for (let c = 0, l = Infinity; c < e.length; c++) if (t[c] !== void 0) {
			if (s != null) {
				let t = We(e[c] - e[s]);
				t < l && (l = t, o = We(n(e[c], r, i, a) - n(e[s], r, i, a)));
			}
			s = c;
		}
	}
	return o;
}
function Br(e) {
	e ||= _t;
	let t = L(e.size, [
		.6,
		B,
		1
	]), n = e.align || 0, r = e.gap || 0, i = e.radius;
	i = i == null ? [0, 0] : typeof i == "number" ? [i, 0] : i;
	let a = V(i), o = 1 - t[0], s = L(t[1], B), c = L(t[2], 1), l = L(e.disp, _t), u = L(e.each, (e) => {}), { fill: d, stroke: f } = l;
	return (e, t, i, p) => gr(e, t, (m, h, g, _, v, y, b, x, S, C, w) => {
		let T = m.pxRound, E = n, D = r * M, ee = s * M, te = c * M, ne, re;
		_.ori == 0 ? [ne, re] = a(e, t) : [re, ne] = a(e, t);
		let ie = _.dir * (_.ori == 0 ? 1 : -1), ae = _.ori == 0 ? Dr : Or, oe = _.ori == 0 ? u : (e, t, n, r, i, a, o) => {
			u(e, t, n, i, r, o, a);
		}, se = L(e.bands, vt).find((e) => e.series[0] == t), O = se == null ? 0 : se.dir, k = m.fillTo(e, t, m.min, m.max, O), ce = T(b(k, v, w, S)), le, A, ue, de = C, j = T(m.width * M), fe = !1, pe = null, me = null, he = null, N = null;
		d != null && (j == 0 || f != null) && (fe = !0, pe = d.values(e, t, i, p), me = /* @__PURE__ */ new Map(), new Set(pe).forEach((e) => {
			e != null && me.set(e, new Path2D());
		}), j > 0 && (he = f.values(e, t, i, p), N = /* @__PURE__ */ new Map(), new Set(he).forEach((e) => {
			e != null && N.set(e, new Path2D());
		})));
		let { x0: ge, size: _e } = l;
		if (ge != null && _e != null) {
			E = 1, h = ge.values(e, t, i, p), ge.unit == 2 && (h = h.map((t) => e.posToVal(x + t * C, _.key, !0)));
			let n = _e.values(e, t, i, p);
			A = _e.unit == 2 ? n[0] * C : y(n[0], _, C, x) - y(0, _, C, x), de = zr(h, g, y, _, C, x, de), ue = de - A + D;
		} else de = zr(h, g, y, _, C, x, de), ue = de * o + D, A = de - ue;
		ue < 1 && (ue = 0), j >= A / 2 && (j = 0), ue < 5 && (T = at);
		let ve = ue > 0, ye = de - ue - (ve ? j : 0);
		A = T(nt(ye, te, ee)), le = (E == 0 ? A / 2 : E == ie ? 0 : A) - E * ie * ((E == 0 ? D / 2 : 0) + (ve ? j / 2 : 0));
		let be = {
			stroke: null,
			fill: null,
			clip: null,
			band: null,
			gaps: null,
			flags: 0
		}, xe = fe ? null : new Path2D(), P = null;
		if (se != null) P = e.data[se.series[1]];
		else {
			let { y0: n, y1: r } = l;
			n != null && r != null && (g = r.values(e, t, i, p), P = n.values(e, t, i, p));
		}
		let Se = ne * A, Ce = re * A;
		for (let n = ie == 1 ? i : p; n >= i && n <= p; n += ie) {
			let r = g[n];
			if (r == null) continue;
			if (P != null) {
				let e = P[n] ?? 0;
				if (r - e == 0) continue;
				ce = b(e, v, w, S);
			}
			let i = y(_.distr != 2 || l != null ? h[n] : n, _, C, x), a = b(L(r, k), v, w, S), o = T(i - le), s = T(Ye(a, ce)), c = T(Je(a, ce)), u = s - c;
			if (r != null) {
				let i = r < 0 ? Ce : Se, a = r < 0 ? Se : Ce;
				fe ? (j > 0 && he[n] != null && ae(N.get(he[n]), o, c + Ge(j / 2), A, Ye(0, u - j), i, a), pe[n] != null && ae(me.get(pe[n]), o, c + Ge(j / 2), A, Ye(0, u - j), i, a)) : ae(xe, o, c + Ge(j / 2), A, Ye(0, u - j), i, a), oe(e, t, n, o - j / 2, c, A + j, u);
			}
		}
		return j > 0 ? be.stroke = fe ? N : xe : fe || (be._fill = m.width == 0 ? m._fill : m._stroke ?? m._fill, be.width = 0), be.fill = fe ? me : xe, be;
	});
}
function Vr(e, t) {
	let n = L(t?.alignGaps, 0);
	return (t, r, i, a) => gr(t, r, (o, s, c, l, u, d, f, p, m, h, g) => {
		[i, a] = je(c, i, a);
		let _ = o.pxRound, v = (e) => _(d(e, l, h, p)), y = (e) => _(f(e, u, g, m)), b, x, S;
		l.ori == 0 ? (b = Cr, S = Tr, x = jr) : (b = wr, S = Er, x = Mr);
		let C = l.dir * (l.ori == 0 ? 1 : -1), w = v(s[C == 1 ? i : a]), T = w, E = [], D = [];
		for (let e = C == 1 ? i : a; e >= i && e <= a; e += C) if (c[e] != null) {
			let t = s[e], n = v(t);
			E.push(T = n), D.push(y(c[e]));
		}
		let ee = {
			stroke: e(E, D, b, S, x, _),
			fill: null,
			clip: null,
			band: null,
			gaps: null,
			flags: mr
		}, te = ee.stroke, [ne, re] = _r(t, r);
		if (o.fill != null || ne != 0) {
			let e = ee.fill = new Path2D(te), n = y(o.fillTo(t, r, o.min, o.max, ne));
			S(e, T, n), S(e, w, n);
		}
		if (!o.spanGaps) {
			let e = [];
			e.push(...X(s, c, i, a, C, v, n)), ee.gaps = e = o.gaps(t, r, i, a, e), ee.clip = Y(e, l.ori, p, m, h, g);
		}
		return re != 0 && (ee.band = re == 2 ? [yr(t, r, i, a, te, -1), yr(t, r, i, a, te, 1)] : yr(t, r, i, a, te, re)), ee;
	});
}
function Hr(e) {
	return Vr(Ur, e);
}
function Ur(e, t, n, r, i, a) {
	let o = e.length;
	if (o < 2) return null;
	let s = new Path2D();
	if (n(s, e[0], t[0]), o == 2) r(s, e[1], t[1]);
	else {
		let n = Array(o), r = Array(o - 1), a = Array(o - 1), c = Array(o - 1);
		for (let n = 0; n < o - 1; n++) a[n] = t[n + 1] - t[n], c[n] = e[n + 1] - e[n], r[n] = a[n] / c[n];
		n[0] = r[0];
		for (let e = 1; e < o - 1; e++) r[e] === 0 || r[e - 1] === 0 || r[e - 1] > 0 != r[e] > 0 ? n[e] = 0 : (n[e] = 3 * (c[e - 1] + c[e]) / ((2 * c[e] + c[e - 1]) / r[e - 1] + (c[e] + 2 * c[e - 1]) / r[e]), isFinite(n[e]) || (n[e] = 0));
		n[o - 1] = r[o - 2];
		for (let r = 0; r < o - 1; r++) i(s, e[r] + c[r] / 3, t[r] + n[r] * c[r] / 3, e[r + 1] - c[r] / 3, t[r + 1] - n[r + 1] * c[r] / 3, e[r + 1], t[r + 1]);
	}
	return s;
}
var Wr = /* @__PURE__ */ new Set();
function Gr() {
	for (let e of Wr) e.syncRect(!0);
}
A && (Te(se, de, Gr), Te(O, de, Gr, !0), Te(ce, de, () => {
	si.pxRatio = M;
}));
var Kr = Lr(), qr = Nr();
function Jr(e, t, n, r) {
	return (r ? [e[0], e[1]].concat(e.slice(2)) : [e[0]].concat(e.slice(1))).map((e, r) => Xr(e, r, t, n));
}
function Yr(e, t) {
	return e.map((e, n) => n == 0 ? {} : Ot({}, t, e));
}
function Xr(e, t, n, r) {
	return Ot({}, t == 0 ? n : r, e);
}
function Zr(e, t, n) {
	return t == null ? yt : [t, n];
}
var Qr = Zr;
function $r(e, t, n) {
	return t == null ? yt : Re(t, n, Fe, !0);
}
function ei(e, t, n, r) {
	return t == null ? yt : Ne(t, n, e.scales[r].log, !1);
}
var ti = ei;
function ni(e, t, n, r) {
	return t == null ? yt : Pe(t, n, e.scales[r].log, !1);
}
var ri = ni;
function ii(e, t, n, r, i) {
	let a = Ye(tt(e), tt(t)), o = t - e, s = De(i / r * o, n);
	do {
		let e = n[s], t = r * e / o;
		if (t >= i && a + (e < 5 ? mt.get(e) : 0) <= 17) return [e, t];
	} while (++s < n.length);
	return [0, 0];
}
function ai(e) {
	let t, n;
	return e = e.replace(/(\d+)px/, (e, r) => (t = Ke((n = +r) * M)) + "px"), [
		e,
		t,
		n
	];
}
function oi(e) {
	e.show && [e.font, e.labelFont].forEach((e) => {
		let t = U(e[2] * M, 1);
		e[0] = e[0].replace(/[0-9.]+px/, t + "px"), e[1] = t;
	});
}
function si(e, D, se) {
	let O = { mode: L(e.mode, 1) }, k = O.mode;
	function A(e, t, n, r) {
		let i = t.valToPct(e);
		return r + n * (t.dir == -1 ? 1 - i : i);
	}
	function j(e, t, n, r) {
		let i = t.valToPct(e);
		return r + n * (t.dir == -1 ? i : 1 - i);
	}
	function fe(e, t, n, r) {
		return t.ori == 0 ? A(e, t, n, r) : j(e, t, n, r);
	}
	O.valToPosH = A, O.valToPosV = j;
	let pe = !1;
	O.status = 0;
	let ve = O.root = _e(t);
	if (e.id != null && (ve.id = e.id), me(ve, e.class), e.title) {
		let t = _e(i, ve);
		t.textContent = e.title;
	}
	let be = ge("canvas"), P = O.ctx = be.getContext("2d"), Ce = _e(a, ve);
	Te("click", Ce, (e) => {
		e.target === Oe && (Z != Mi || Q != Ni) && Li.click(O, e);
	}, !0);
	let we = O.under = _e(o, Ce);
	Ce.appendChild(be);
	let Oe = O.over = _e(s, Ce);
	e = Dt(e);
	let ke = +L(e.pxAlign, 1), Ae = xr(ke);
	(e.plugins || []).forEach((t) => {
		t.opts && (e = t.opts(O, e) || e);
	});
	let je = e.ms || .001, F = O.series = k == 1 ? Jr(e.series || [], Un, cr, !1) : Yr(e.series || [null], sr), Le = O.axes = Jr(e.axes || [], Bn, nr, !0), I = O.scales = {}, Be = O.bands = e.bands || [];
	Be.forEach((e) => {
		e.fill = V(e.fill || null), e.dir = L(e.dir, -1);
	});
	let R = k == 2 ? F[1].facets[0].scale : F[0].scale, Ve = {
		axes: gi,
		series: Ur
	}, He = (e.drawOrder || ["axes", "series"]).map((e) => Ve[e]);
	function Ge(e) {
		let t = e.distr == 3 ? (t) => Qe(t > 0 ? t : e.clamp(O, t, e.min, e.max, e.key)) : e.distr == 4 ? (t) => et(t, e.asinh) : e.distr == 100 ? (t) => e.fwd(t) : (e) => e;
		return (n) => {
			let r = t(n), { _min: i, _max: a } = e, o = a - i;
			return (r - i) / o;
		};
	}
	function Ze(t) {
		let n = I[t];
		if (n == null) {
			let r = (e.scales || _t)[t] || _t;
			if (r.from != null) {
				Ze(r.from);
				let e = Ot({}, I[r.from], r, { key: t });
				e.valToPct = Ge(e), I[t] = e;
			} else {
				n = I[t] = Ot({}, t == R ? ur : dr, r), n.key = t;
				let e = n.time, i = n.range, a = bt(i);
				if ((t != R || k == 2 && !e) && (a && (i[0] == null || i[1] == null) && (i = {
					min: i[0] == null ? Ie : {
						mode: 1,
						hard: i[0],
						soft: i[0]
					},
					max: i[1] == null ? Ie : {
						mode: 1,
						hard: i[1],
						soft: i[1]
					}
				}, a = !1), !a && wt(i))) {
					let e = i;
					i = (t, n, r) => n == null ? yt : Re(n, r, e);
				}
				n.range = V(i || (e ? Qr : t == R ? n.distr == 3 ? ti : n.distr == 4 ? ri : Zr : n.distr == 3 ? ei : n.distr == 4 ? ni : $r)), n.auto = V(a ? !1 : n.auto), n.clamp = V(n.clamp || lr), n._min = n._max = null, n.valToPct = Ge(n);
			}
		}
	}
	Ze("x"), Ze("y"), k == 1 && F.forEach((e) => {
		Ze(e.scale);
	}), Le.forEach((e) => {
		Ze(e.scale);
	});
	for (let t in e.scales) Ze(t);
	let z = I[R], tt = z.distr, it, at;
	z.ori == 0 ? (me(ve, n), it = A, at = j) : (me(ve, r), it = j, at = A);
	let H = {};
	for (let e in I) {
		let t = I[e];
		(t.min != null || t.max != null) && (H[e] = {
			min: t.min,
			max: t.max
		}, t.min = t.max = null);
	}
	let ut = e.tzDate || ((e) => new Date(Ke(e / je))), ft = e.fmtDate || Gt, pt = je == 1 ? un(ut) : pn(ut), gt = hn(ut, mn(je == 1 ? ln : fn, ft)), xt = bn(ut, vn(yn, ft)), Et = [], W = O.legend = Ot({}, Cn, e.legend), G = O.cursor = Ot({}, Mn, { drag: { y: k == 2 } }, e.cursor), kt = W.show, At = G.show, jt = W.markers;
	W.idxs = Et, jt.width = V(jt.width), jt.dash = V(jt.dash), jt.stroke = V(jt.stroke), jt.fill = V(jt.fill);
	let Mt, Pt, Ft, It = [], Lt = [], Rt, zt = !1, Bt = {};
	if (W.live) {
		let e = F[1] ? F[1].values : null;
		zt = e != null, Rt = zt ? e(O, 1, 0) : { _: 0 };
		for (let e in Rt) Bt[e] = le;
	}
	if (kt) if (Mt = ge("table", m, ve), Ft = ge("tbody", null, Mt), W.mount(O, Mt), zt) {
		Pt = ge("thead", null, Mt, Ft);
		let e = ge("tr", null, Pt);
		for (var Vt in ge("th", null, e), Rt) ge("th", y, e).textContent = Vt;
	} else me(Mt, g), W.live && me(Mt, h);
	let Ht = { show: !0 }, Ut = { show: !1 };
	function Wt(e, t) {
		if (t == 0 && (zt || !W.live || k == 2)) return yt;
		let n = [], r = ge("tr", _, Ft, Ft.childNodes[t]);
		me(r, e.class), e.show || me(r, l);
		let i = ge("th", null, r);
		if (jt.show) {
			let e = _e(v, i);
			if (t > 0) {
				let n = jt.width(O, t);
				n && (e.style.border = n + "px " + jt.dash(O, t) + " " + jt.stroke(O, t)), e.style.background = jt.fill(O, t);
			}
		}
		let a = _e(y, i);
		for (var o in e.label instanceof HTMLElement ? a.appendChild(e.label) : a.textContent = e.label, t > 0 && (jt.show || (a.style.color = e.width > 0 ? jt.stroke(O, t) : jt.fill(O, t)), qt("click", i, (t) => {
			if (G._lock) return;
			Fn(t);
			let n = F.indexOf(e);
			if ((t.ctrlKey || t.metaKey) != W.isolate) {
				let e = F.some((e, t) => t > 0 && t != n && e.show);
				F.forEach((t, r) => {
					r > 0 && Wi(r, e ? r == n ? Ht : Ut : Ht, !0, ka.setSeries);
				});
			} else Wi(n, { show: !e.show }, !0, ka.setSeries);
		}, !1), Rn && qt(ie, i, (t) => {
			G._lock || (Fn(t), Wi(F.indexOf(e), Qi, !0, ka.setSeries));
		}, !1)), Rt) {
			let e = ge("td", b, r);
			e.textContent = "--", n.push(e);
		}
		return [r, n];
	}
	let Kt = /* @__PURE__ */ new Map();
	function qt(e, t, n, r = !0) {
		let i = Kt.get(t) || {}, a = G.bind[e](O, t, n, r);
		a && (Te(e, t, i[e] = a), Kt.set(t, i));
	}
	function Jt(e, t, n) {
		let r = Kt.get(t) || {};
		for (let n in r) (e == null || n == e) && (Ee(n, t, r[n]), delete r[n]);
		e ?? Kt.delete(t);
	}
	let Yt = 0, Xt = 0, K = 0, q = 0, $t = 0, en = 0, tn = $t, nn = en, rn = K, an = q, on = 0, J = 0, sn = 0, _n = 0;
	O.bbox = {};
	let xn = !1, Sn = !1, wn = !1, Tn = !1, En = !1, Dn = !1;
	function On(e, t, n) {
		(n || e != O.width || t != O.height) && kn(e, t), _i(!1), wn = !0, Sn = !0, Si();
	}
	function kn(e, t) {
		O.width = Yt = K = e, O.height = Xt = q = t, $t = en = 0, Nn(), Pn();
		let n = O.bbox;
		on = n.left = dt($t * M, .5), J = n.top = dt(en * M, .5), sn = n.width = dt(K * M, .5), _n = n.height = dt(q * M, .5);
	}
	function An() {
		let e = !1, t = 0;
		for (; !e;) {
			t++;
			let n = mi(t), r = hi(t);
			e = t == 3 || n && r, e || (kn(O.width, O.height), Sn = !0);
		}
	}
	function jn({ width: e, height: t }) {
		On(e, t);
	}
	O.setSize = jn;
	function Nn() {
		let e = !1, t = !1, n = !1, r = !1;
		Le.forEach((i, a) => {
			if (i.show && i._show) {
				let { side: a, _size: o } = i, s = a % 2, c = o + (i.label == null ? 0 : i.labelSize);
				c > 0 && (s ? (K -= c, a == 3 ? ($t += c, r = !0) : n = !0) : (q -= c, a == 0 ? (en += c, e = !0) : t = !0));
			}
		}), or[0] = e, or[1] = n, or[2] = t, or[3] = r, K -= yr[1] + yr[3], $t += yr[3], q -= yr[2] + yr[0], en += yr[0];
	}
	function Pn() {
		let e = $t + K, t = en + q, n = $t, r = en;
		function i(i, a) {
			switch (i) {
				case 1: return e += a, e - a;
				case 2: return t += a, t - a;
				case 3: return n -= a, n + a;
				case 0: return r -= a, r + a;
			}
		}
		Le.forEach((e, t) => {
			if (e.show && e._show) {
				let t = e.side;
				e._pos = i(t, e._size), e.label != null && (e._lpos = i(t, e.labelSize));
			}
		});
	}
	if (G.dataIdx == null) {
		let e = G.hover, t = e.skip = new Set(e.skip ?? []);
		t.add(void 0);
		let n = e.prox = V(e.prox), r = e.bias ??= 0;
		G.dataIdx = (e, i, a, o) => {
			if (i == 0) return a;
			let s = a, c = n(e, i, a, o) ?? B, l = c >= 0 && c < B, u = z.ori == 0 ? K : q, d = G.left, f = D[0], p = D[i];
			if (t.has(p[a])) {
				s = null;
				let e = null, n = null, i;
				if (r == 0 || r == -1) for (i = a; e == null && i-- > 0;) t.has(p[i]) || (e = i);
				if (r == 0 || r == 1) for (i = a; n == null && i++ < p.length;) t.has(p[i]) || (n = i);
				if (e != null || n != null) if (l) {
					let t = e == null ? -Infinity : it(f[e], z, u, 0), r = n == null ? Infinity : it(f[n], z, u, 0), i = d - t, a = r - d;
					i <= a ? i <= c && (s = e) : a <= c && (s = n);
				} else s = n == null ? e : e == null ? n : a - e <= n - a ? e : n;
			} else l && We(d - it(f[a], z, u, 0)) > c && (s = null);
			return s;
		};
	}
	let Fn = (e) => {
		G.event = e;
	};
	G.idxs = Et, G._lock = !1;
	let In = G.points;
	In.show = V(In.show), In.size = V(In.size), In.stroke = V(In.stroke), In.width = V(In.width), In.fill = V(In.fill);
	let Ln = O.focus = Ot({}, e.focus || { alpha: .3 }, G.focus), Rn = Ln.prox >= 0, zn = Rn && In.one, Jn = [], Yn = [], Xn = [];
	function Zn(e, t) {
		let n = In.show(O, t);
		if (n instanceof HTMLElement) return me(n, p), me(n, e.class), ye(n, -10, -10, K, q), Oe.insertBefore(n, Jn[t]), n;
	}
	function Qn(e, t) {
		if (k == 1 || t > 0) {
			let t = k == 1 && I[e.scale].time, n = e.value;
			e.value = t ? Ct(n) ? bn(ut, vn(n, ft)) : n || xt : n || tr, e.label = e.label || (t ? Hn : Vn);
		}
		if (zn || t > 0) {
			e.width = e.width == null ? 1 : e.width, e.paths = e.paths || Kr || st, e.fillTo = V(e.fillTo || vr), e.pxAlign = +L(e.pxAlign, ke), e.pxRound = xr(e.pxAlign), e.stroke = V(e.stroke || null), e.fill = V(e.fill || null), e._stroke = e._fill = e._paths = e._focus = null;
			let t = rr(Ye(1, e.width), 1), n = e.points = Ot({}, {
				size: t,
				width: Ye(1, t * .2),
				stroke: e.stroke,
				space: t * 2,
				paths: qr,
				_stroke: null,
				_fill: null
			}, e.points);
			n.show = V(n.show), n.filter = V(n.filter), n.fill = V(n.fill), n.stroke = V(n.stroke), n.paths = V(n.paths), n.pxAlign = e.pxAlign;
		}
		if (kt) {
			let n = Wt(e, t);
			It.splice(t, 0, n[0]), Lt.splice(t, 0, n[1]), W.values.push(null);
		}
		if (At) {
			Et.splice(t, 0, null);
			let n = null;
			zn ? t == 0 && (n = Zn(e, t)) : t > 0 && (n = Zn(e, t)), Jn.splice(t, 0, n), Yn.splice(t, 0, 0), Xn.splice(t, 0, 0);
		}
		Da("addSeries", t);
	}
	function ir(e, t) {
		t ??= F.length, e = k == 1 ? Xr(e, t, Un, cr) : Xr(e, t, {}, sr), F.splice(t, 0, e), Qn(F[t], t);
	}
	O.addSeries = ir;
	function ar(e) {
		if (F.splice(e, 1), kt) {
			W.values.splice(e, 1), Lt.splice(e, 1);
			let t = It.splice(e, 1)[0];
			Jt(null, t.firstChild), t.remove();
		}
		At && (Et.splice(e, 1), Jn.splice(e, 1)[0].remove(), Yn.splice(e, 1), Xn.splice(e, 1)), Da("delSeries", e);
	}
	O.delSeries = ar;
	let or = [
		!1,
		!1,
		!1,
		!1
	];
	function fr(e, t) {
		if (e._show = e.show, e.show) {
			let n = e.side % 2, r = I[e.scale];
			r ??= (e.scale = n ? F[1].scale : R, I[e.scale]);
			let i = r.time;
			e.size = V(e.size), e.space = V(e.space), e.rotate = V(e.rotate), bt(e.incrs) && e.incrs.forEach((e) => {
				!mt.has(e) && mt.set(e, ht(e));
			}), e.incrs = V(e.incrs || (r.distr == 2 ? Zt : i ? je == 1 ? cn : dn : Qt)), e.splits = V(e.splits || (i && r.distr == 1 ? pt : r.distr == 3 ? Kn : r.distr == 4 ? qn : Gn)), e.stroke = V(e.stroke), e.grid.stroke = V(e.grid.stroke), e.ticks.stroke = V(e.ticks.stroke), e.border.stroke = V(e.border.stroke);
			let a = e.values;
			e.values = bt(a) && !bt(a[0]) ? V(a) : i ? bt(a) ? hn(ut, mn(a, ft)) : Ct(a) ? gn(ut, a) : a || gt : a || Wn, e.filter = V(e.filter || (r.distr >= 3 && r.log == 10 ? $n : r.distr == 3 && r.log == 2 ? er : ot)), e.font = ai(e.font), e.labelFont = ai(e.labelFont), e._size = e.size(O, null, t, 0), e._space = e._rotate = e._incrs = e._found = e._splits = e._values = null, e._size > 0 && (or[t] = !0, e._el = _e(c, Ce));
		}
	}
	function gr(e, t, n, r) {
		let [i, a, o, s] = n, c = t % 2, l = 0;
		return c == 0 && (s || a) && (l = t == 0 && !i || t == 2 && !o ? Ke(Bn.size / 3) : 0), c == 1 && (i || o) && (l = t == 1 && !a || t == 3 && !s ? Ke(nr.size / 2) : 0), l;
	}
	let _r = O.padding = (e.padding || [
		gr,
		gr,
		gr,
		gr
	]).map((e) => V(L(e, gr))), yr = O._padding = _r.map((e, t) => e(O, t, or, 0)), Y, br = null, X = null, Sr = k == 1 ? F[0].idxs : null, Cr = null, wr = !1;
	function Tr(e, t) {
		if (D = e ?? [], O.data = O._data = D, k == 2) {
			Y = 0;
			for (let e = 1; e < F.length; e++) Y += D[e][0].length;
		} else {
			D.length == 0 && (O.data = O._data = D = [[]]), Cr = D[0], Y = Cr.length;
			let e = D;
			if (tt == 2) {
				e = D.slice();
				let t = e[0] = Array(Y);
				for (let e = 0; e < Y; e++) t[e] = e;
			}
			O._data = D = e;
		}
		if (_i(!0), Da("setData"), tt == 2 && (wn = !0), t !== !1) {
			let e = z;
			e.auto(O, wr) ? Er() : Ui(R, e.min, e.max), Tn ||= G.left >= 0, Dn = !0, Si();
		}
	}
	O.setData = Tr;
	function Er() {
		wr = !0;
		let e, t;
		k == 1 && (Y > 0 ? (br = Sr[0] = 0, X = Sr[1] = Y - 1, e = D[0][br], t = D[0][X], tt == 2 ? (e = br, t = X) : e == t && (tt == 3 ? [e, t] = Ne(e, e, z.log, !1) : tt == 4 ? [e, t] = Pe(e, e, z.log, !1) : z.time ? t = e + Ke(86400 / je) : [e, t] = Re(e, t, Fe, !0))) : (br = Sr[0] = e = null, X = Sr[1] = t = null)), Ui(R, e, t);
	}
	let Dr, Or, kr, Ar, jr, Mr, Nr, Pr, Fr, Ir;
	function Lr(e, t, n, r, i, a) {
		e ??= ee, n ??= vt, r ??= "butt", i ??= ee, a ??= "round", e != Dr && (P.strokeStyle = Dr = e), i != Or && (P.fillStyle = Or = i), t != kr && (P.lineWidth = kr = t), a != jr && (P.lineJoin = jr = a), r != Mr && (P.lineCap = Mr = r), n != Ar && P.setLineDash(Ar = n);
	}
	function Rr(e, t, n, r) {
		t != Or && (P.fillStyle = Or = t), e != Nr && (P.font = Nr = e), n != Pr && (P.textAlign = Pr = n), r != Fr && (P.textBaseline = Fr = r);
	}
	function zr(e, t, n, r, i = 0) {
		if (r.length > 0 && e.auto(O, wr) && (t == null || t.min == null)) {
			let t = L(br, 0), a = L(X, r.length - 1), o = n.min == null ? Me(r, t, a, i, e.distr == 3) : [n.min, n.max];
			e.min = Je(e.min, n.min = o[0]), e.max = Ye(e.max, n.max = o[1]);
		}
	}
	let Br = {
		min: null,
		max: null
	};
	function Vr() {
		for (let e in I) {
			let t = I[e];
			H[e] == null && (t.min == null || H[R] != null && t.auto(O, wr)) && (H[e] = Br);
		}
		for (let e in I) {
			let t = I[e];
			H[e] == null && t.from != null && H[t.from] != null && (H[e] = Br);
		}
		H[R] != null && _i(!0);
		let e = {};
		for (let t in H) {
			let n = H[t];
			if (n != null) {
				let r = e[t] = Dt(I[t], Tt);
				if (n.min != null) Ot(r, n);
				else if (t != R || k == 2) if (Y == 0 && r.from == null) {
					let e = r.range(O, null, null, t);
					r.min = e[0], r.max = e[1];
				} else r.min = B, r.max = -Infinity;
			}
		}
		if (Y > 0) {
			F.forEach((t, n) => {
				if (k == 1) {
					let r = t.scale, i = H[r];
					if (i == null) return;
					let a = e[r];
					if (n == 0) {
						let e = a.range(O, a.min, a.max, r);
						a.min = e[0], a.max = e[1], br = De(a.min, D[0]), X = De(a.max, D[0]), X - br > 1 && (D[0][br] < a.min && br++, D[0][X] > a.max && X--), t.min = Cr[br], t.max = Cr[X];
					} else t.show && t.auto && zr(a, i, t, D[n], t.sorted);
					t.idxs[0] = br, t.idxs[1] = X;
				} else if (n > 0 && t.show && t.auto) {
					let [r, i] = t.facets, a = r.scale, o = i.scale, [s, c] = D[n], l = e[a], u = e[o];
					l != null && zr(l, H[a], r, s, r.sorted), u != null && zr(u, H[o], i, c, i.sorted), t.min = i.min, t.max = i.max;
				}
			});
			for (let t in e) {
				let n = e[t], r = H[t];
				if (n.from == null && (r == null || r.min == null)) {
					let e = n.range(O, n.min == B ? null : n.min, n.max == -Infinity ? null : n.max, t);
					n.min = e[0], n.max = e[1];
				}
			}
		}
		for (let t in e) {
			let n = e[t];
			if (n.from != null) {
				let r = e[n.from];
				if (r.min == null) n.min = n.max = null;
				else {
					let e = n.range(O, r.min, r.max, t);
					n.min = e[0], n.max = e[1];
				}
			}
		}
		let t = {}, n = !1;
		for (let r in e) {
			let i = e[r], a = I[r];
			if (a.min != i.min || a.max != i.max) {
				a.min = i.min, a.max = i.max;
				let e = a.distr;
				a._min = e == 3 ? Qe(a.min) : e == 4 ? et(a.min, a.asinh) : e == 100 ? a.fwd(a.min) : a.min, a._max = e == 3 ? Qe(a.max) : e == 4 ? et(a.max, a.asinh) : e == 100 ? a.fwd(a.max) : a.max, t[r] = n = !0;
			}
		}
		if (n) {
			F.forEach((e, n) => {
				k == 2 ? n > 0 && t.y && (e._paths = null) : t[e.scale] && (e._paths = null);
			});
			for (let e in t) wn = !0, Da("setScale", e);
			At && G.left >= 0 && (Tn = Dn = !0);
		}
		for (let e in H) H[e] = null;
	}
	function Hr(e) {
		let t = nt(br - 1, 0, Y - 1), n = nt(X + 1, 0, Y - 1);
		for (; e[t] == null && t > 0;) t--;
		for (; e[n] == null && n < Y - 1;) n++;
		return [t, n];
	}
	function Ur() {
		if (Y > 0) {
			let e = F.some((e) => e._focus) && Ir != Ln.alpha;
			e && (P.globalAlpha = Ir = Ln.alpha), F.forEach((e, t) => {
				if (t > 0 && e.show && (Gr(t, !1), Gr(t, !0), e._paths == null)) {
					let n = Ir;
					Ir != e.alpha && (P.globalAlpha = Ir = e.alpha);
					let r = k == 2 ? [0, D[t][0].length - 1] : Hr(D[t]);
					e._paths = e.paths(O, t, r[0], r[1]), Ir != n && (P.globalAlpha = Ir = n);
				}
			}), F.forEach((e, t) => {
				if (t > 0 && e.show) {
					let n = Ir;
					Ir != e.alpha && (P.globalAlpha = Ir = e.alpha), e._paths != null && si(t, !1);
					{
						let n = e._paths == null ? null : e._paths.gaps, r = e.points.show(O, t, br, X, n), i = e.points.filter(O, t, r, n);
						(r || i) && (e.points._paths = e.points.paths(O, t, br, X, i), si(t, !0));
					}
					Ir != n && (P.globalAlpha = Ir = n), Da("drawSeries", t);
				}
			}), e && (P.globalAlpha = Ir = 1);
		}
	}
	function Gr(e, t) {
		let n = t ? F[e].points : F[e];
		n._stroke = n.stroke(O, e), n._fill = n.fill(O, e);
	}
	function si(e, t) {
		let n = t ? F[e].points : F[e], { stroke: r, fill: i, clip: a, flags: o, _stroke: s = n._stroke, _fill: c = n._fill, _width: l = n.width } = n._paths;
		l = U(l * M, 3);
		let u = null, d = l % 2 / 2;
		t && c == null && (c = l > 0 ? "#fff" : s);
		let f = n.pxAlign == 1 && d > 0;
		if (f && P.translate(d, d), !t) {
			let e = on - l / 2, t = J - l / 2, n = sn + l, r = _n + l;
			u = new Path2D(), u.rect(e, t, n, r);
		}
		t ? li(s, l, n.dash, n.cap, c, r, i, o, a) : ci(e, s, l, n.dash, n.cap, c, r, i, o, u, a), f && P.translate(-d, -d);
	}
	function ci(e, t, n, r, i, a, o, s, c, l, u) {
		let d = !1;
		c != 0 && Be.forEach((f, p) => {
			if (f.series[0] == e) {
				let e = F[f.series[1]], m = D[f.series[1]], h = (e._paths || _t).band;
				bt(h) && (h = f.dir == 1 ? h[0] : h[1]);
				let g, _ = null;
				e.show && h && ze(m, br, X) ? (_ = f.fill(O, p) || a, g = e._paths.clip) : h = null, li(t, n, r, i, _, o, s, c, l, u, g, h), d = !0;
			}
		}), d || li(t, n, r, i, a, o, s, c, l, u);
	}
	function li(e, t, n, r, i, a, o, s, c, l, u, d) {
		Lr(e, t, n, r, i), (c || l || d) && (P.save(), c && P.clip(c), l && P.clip(l)), d ? (s & 3) == 3 ? (P.clip(d), u && P.clip(u), di(i, o), ui(e, a, t)) : s & hr ? (di(i, o), P.clip(d), ui(e, a, t)) : s & mr && (P.save(), P.clip(d), u && P.clip(u), di(i, o), P.restore(), ui(e, a, t)) : (di(i, o), ui(e, a, t)), (c || l || d) && P.restore();
	}
	function ui(e, t, n) {
		n > 0 && (t instanceof Map ? t.forEach((e, t) => {
			P.strokeStyle = Dr = t, P.stroke(e);
		}) : t != null && e && P.stroke(t));
	}
	function di(e, t) {
		t instanceof Map ? t.forEach((e, t) => {
			P.fillStyle = Or = t, P.fill(e);
		}) : t != null && e && P.fill(t);
	}
	function fi(e, t, n, r) {
		let i = Le[e], a;
		if (r <= 0) a = [0, 0];
		else {
			let o = i._space = i.space(O, e, t, n, r);
			a = ii(t, n, i._incrs = i.incrs(O, e, t, n, r, o), r, o);
		}
		return i._found = a;
	}
	function pi(e, t, n, r, i, a, o, s, c, l) {
		let u = o % 2 / 2;
		ke == 1 && P.translate(u, u), Lr(s, o, c, l, s), P.beginPath();
		let d, f, p, m, h = i + (r == 0 || r == 3 ? -a : a);
		n == 0 ? (f = i, m = h) : (d = i, p = h);
		for (let r = 0; r < e.length; r++) t[r] != null && (n == 0 ? d = p = e[r] : f = m = e[r], P.moveTo(d, f), P.lineTo(p, m));
		P.stroke(), ke == 1 && P.translate(-u, -u);
	}
	function mi(e) {
		let t = !0;
		return Le.forEach((n, r) => {
			if (!n.show) return;
			let i = I[n.scale];
			if (i.min == null) {
				n._show && (t = !1, n._show = !1, _i(!1));
				return;
			} else n._show || (t = !1, n._show = !0, _i(!1));
			let a = n.side, o = a % 2, { min: s, max: c } = i, [l, u] = fi(r, s, c, o == 0 ? K : q);
			if (u == 0) return;
			let d = i.distr == 2, f = n._splits = n.splits(O, r, s, c, l, u, d), p = i.distr == 2 ? f.map((e) => Cr[e]) : f, m = i.distr == 2 ? Cr[f[1]] - Cr[f[0]] : l, h = n._values = n.values(O, n.filter(O, p, r, u, m), r, u, m);
			n._rotate = a == 2 ? n.rotate(O, h, r, u) : 0;
			let g = n._size;
			n._size = qe(n.size(O, h, r, e)), g != null && n._size != g && (t = !1);
		}), t;
	}
	function hi(e) {
		let t = !0;
		return _r.forEach((n, r) => {
			let i = n(O, r, or, e);
			i != yr[r] && (t = !1), yr[r] = i;
		}), t;
	}
	function gi() {
		for (let e = 0; e < Le.length; e++) {
			let t = Le[e];
			if (!t.show || !t._show) continue;
			let n = t.side, r = n % 2, i, a, o = t.stroke(O, e), s = n == 0 || n == 3 ? -1 : 1, [c, l] = t._found;
			if (t.label != null) {
				let u = t.labelGap * s, d = Ke((t._lpos + u) * M);
				Rr(t.labelFont[0], o, "center", n == 2 ? C : w), P.save(), r == 1 ? (i = a = 0, P.translate(d, Ke(J + _n / 2)), P.rotate((n == 3 ? -Ue : Ue) / 2)) : (i = Ke(on + sn / 2), a = d);
				let f = rt(t.label) ? t.label(O, e, c, l) : t.label;
				P.fillText(f, i, a), P.restore();
			}
			if (l == 0) continue;
			let u = I[t.scale], d = r == 0 ? sn : _n, f = r == 0 ? on : J, p = t._splits, m = u.distr == 2 ? p.map((e) => Cr[e]) : p, h = u.distr == 2 ? Cr[p[1]] - Cr[p[0]] : c, g = t.ticks, _ = t.border, v = g.show ? g.size : 0, y = Ke(v * M), b = Ke((t.alignTo == 2 ? t._size - v - t.gap : t.gap) * M), x = t._rotate * -Ue / 180, S = Ae(t._pos * M), D = S + (y + b) * s;
			a = r == 0 ? D : 0, i = r == 1 ? D : 0;
			let ee = t.font[0];
			Rr(ee, o, t.align == 1 ? T : t.align == 2 ? E : x > 0 ? T : x < 0 ? E : r == 0 ? "center" : n == 3 ? E : T, x || r == 1 ? "middle" : n == 2 ? C : w);
			let te = t.font[1] * t.lineGap, ne = p.map((e) => Ae(fe(e, u, d, f))), re = t._values;
			for (let e = 0; e < re.length; e++) {
				let t = re[e];
				if (t != null) {
					r == 0 ? i = ne[e] : a = ne[e], t = "" + t;
					let n = t.indexOf("\n") == -1 ? [t] : t.split(/\n/gm);
					for (let e = 0; e < n.length; e++) {
						let t = n[e];
						x ? (P.save(), P.translate(i, a + e * te), P.rotate(x), P.fillText(t, 0, 0), P.restore()) : P.fillText(t, i, a + e * te);
					}
				}
			}
			g.show && pi(ne, g.filter(O, m, e, l, h), r, n, S, y, U(g.width * M, 3), g.stroke(O, e), g.dash, g.cap);
			let ie = t.grid;
			ie.show && pi(ne, ie.filter(O, m, e, l, h), r, r == 0 ? 2 : 1, r == 0 ? J : on, r == 0 ? _n : sn, U(ie.width * M, 3), ie.stroke(O, e), ie.dash, ie.cap), _.show && pi([S], [1], +(r == 0), r == 0 ? 1 : 2, r == 1 ? J : on, r == 1 ? _n : sn, U(_.width * M, 3), _.stroke(O, e), _.dash, _.cap);
		}
		Da("drawAxes");
	}
	function _i(e) {
		F.forEach((t, n) => {
			n > 0 && (t._paths = null, e && (k == 1 ? (t.min = null, t.max = null) : t.facets.forEach((e) => {
				e.min = null, e.max = null;
			})));
		});
	}
	let vi = !1, yi = !1, bi = [];
	function xi() {
		yi = !1;
		for (let e = 0; e < bi.length; e++) Da(...bi[e]);
		bi.length = 0;
	}
	function Si() {
		vi ||= (Nt(wi), !0);
	}
	function Ci(e, t = !1) {
		vi = !0, yi = t, e(O), wi(), t && bi.length > 0 && queueMicrotask(xi);
	}
	O.batch = Ci;
	function wi() {
		if (xn &&= (Vr(), !1), wn &&= (An(), !1), Sn) {
			if (N(we, T, $t), N(we, C, en), N(we, x, K), N(we, S, q), N(Oe, T, $t), N(Oe, C, en), N(Oe, x, K), N(Oe, S, q), N(Ce, x, Yt), N(Ce, S, Xt), be.width = Ke(Yt * M), be.height = Ke(Xt * M), Le.forEach(({ _el: e, _show: t, _size: n, _pos: r, side: i }) => {
				if (e != null) if (t) {
					let t = i === 3 || i === 0 ? n : 0, a = i % 2 == 1;
					N(e, a ? "left" : "top", r - t), N(e, a ? "width" : "height", n), N(e, a ? "top" : "left", a ? en : $t), N(e, a ? "height" : "width", a ? q : K), he(e, l);
				} else me(e, l);
			}), Dr = Or = kr = jr = Mr = Nr = Pr = Fr = Ar = null, Ir = 1, da(!0), $t != tn || en != nn || K != rn || q != an) {
				_i(!1);
				let e = K / rn, t = q / an;
				if (At && !Tn && G.left >= 0) {
					G.left *= e, G.top *= t, Oi && ye(Oi, Ke(G.left), 0, K, q), ki && ye(ki, 0, Ke(G.top), K, q);
					for (let n = 0; n < Jn.length; n++) {
						let r = Jn[n];
						r != null && (Yn[n] *= e, Xn[n] *= t, ye(r, qe(Yn[n]), qe(Xn[n]), K, q));
					}
				}
				if ($.show && !En && $.left >= 0 && $.width > 0) {
					$.left *= e, $.width *= e, $.top *= t, $.height *= t;
					for (let e in ma) N(Bi, e, $[e]);
				}
				tn = $t, nn = en, rn = K, an = q;
			}
			Da("setSize"), Sn = !1;
		}
		Yt > 0 && Xt > 0 && (P.clearRect(0, 0, be.width, be.height), Da("drawClear"), He.forEach((e) => e()), Da("draw")), $.show && En && (Vi($), En = !1), At && Tn && (la(null, !0, !1), Tn = !1), W.show && W.live && Dn && (sa(), Dn = !1), pe || (pe = !0, O.status = 1, Da("ready")), wr = !1, vi = !1;
	}
	O.redraw = (e, t) => {
		wn = t || !1, e === !1 ? Si() : Ui(R, z.min, z.max);
	};
	function Ti(e, t) {
		let n = I[e];
		if (n.from == null) {
			if (Y == 0) {
				let r = n.range(O, t.min, t.max, e);
				t.min = r[0], t.max = r[1];
			}
			if (t.min > t.max) {
				let e = t.min;
				t.min = t.max, t.max = e;
			}
			if (Y > 1 && t.min != null && t.max != null && t.max - t.min < 1e-16) return;
			e == R && n.distr == 2 && Y > 0 && (t.min = De(t.min, D[0]), t.max = De(t.max, D[0]), t.min == t.max && t.max++), H[e] = t, xn = !0, Si();
		}
	}
	O.setScale = Ti;
	let Ei, Di, Oi, ki, Ai, ji, Mi, Ni, Pi, Fi, Z, Q, Ii = !1, Li = G.drag, Ri = Li.x, zi = Li.y;
	At && (G.x && (Ei = _e(d, Oe)), G.y && (Di = _e(f, Oe)), z.ori == 0 ? (Oi = Ei, ki = Di) : (Oi = Di, ki = Ei), Z = G.left, Q = G.top);
	let $ = O.select = Ot({
		show: !0,
		over: !0,
		left: 0,
		width: 0,
		top: 0,
		height: 0
	}, e.select), Bi = $.show ? _e(u, $.over ? Oe : we) : null;
	function Vi(e, t) {
		if ($.show) {
			for (let t in e) $[t] = e[t], t in ma && N(Bi, t, e[t]);
			t !== !1 && Da("setSelect");
		}
	}
	O.setSelect = Vi;
	function Hi(e) {
		if (F[e].show) kt && he(It[e], l);
		else if (kt && me(It[e], l), At) {
			let t = zn ? Jn[0] : Jn[e];
			t != null && ye(t, -10, -10, K, q);
		}
	}
	function Ui(e, t, n) {
		Ti(e, {
			min: t,
			max: n
		});
	}
	function Wi(e, t, n, r) {
		t.focus != null && $i(e), t.show != null && F.forEach((n, r) => {
			r > 0 && (e == r || e == null) && (n.show = t.show, Hi(r), k == 2 ? (Ui(n.facets[0].scale, null, null), Ui(n.facets[1].scale, null, null)) : Ui(n.scale, null, null), Si());
		}), n !== !1 && Da("setSeries", e, t), r && Ma("setSeries", O, e, t);
	}
	O.setSeries = Wi;
	function Gi(e, t) {
		Ot(Be[e], t);
	}
	function Ki(e, t) {
		e.fill = V(e.fill || null), e.dir = L(e.dir, -1), t ??= Be.length, Be.splice(t, 0, e);
	}
	function qi(e) {
		e == null ? Be.length = 0 : Be.splice(e, 1);
	}
	O.addBand = Ki, O.setBand = Gi, O.delBand = qi;
	function Ji(e, t) {
		F[e].alpha = t, At && Jn[e] != null && (Jn[e].style.opacity = t), kt && It[e] && (It[e].style.opacity = t);
	}
	let Yi, Xi, Zi, Qi = { focus: !0 };
	function $i(e) {
		if (e != Zi) {
			let t = e == null, n = Ln.alpha != 1;
			F.forEach((r, i) => {
				if (k == 1 || i > 0) {
					let a = t || i == 0 || i == e;
					r._focus = t ? null : a, n && Ji(i, a ? 1 : Ln.alpha);
				}
			}), Zi = e, n && Si();
		}
	}
	kt && Rn && qt(ae, Mt, (e) => {
		G._lock || (Fn(e), Zi != null && Wi(null, Qi, !0, ka.setSeries));
	});
	function ea(e, t, n) {
		let r = I[t];
		n && (e = e / M - (r.ori == 1 ? en : $t));
		let i = K;
		r.ori == 1 && (i = q, e = i - e), r.dir == -1 && (e = i - e);
		let a = r._min, o = r._max, s = e / i, c = a + (o - a) * s, l = r.distr;
		return l == 3 ? Xe(10, c) : l == 4 ? $e(c, r.asinh) : l == 100 ? r.bwd(c) : c;
	}
	function ta(e, t) {
		return De(ea(e, R, t), D[0], br, X);
	}
	O.valToIdx = (e) => De(e, D[0]), O.posToIdx = ta, O.posToVal = ea, O.valToPos = (e, t, n) => I[t].ori == 0 ? A(e, I[t], n ? sn : K, n ? on : 0) : j(e, I[t], n ? _n : q, n ? J : 0), O.setCursor = (e, t, n) => {
		Z = e.left, Q = e.top, la(null, t, n);
	};
	function na(e, t) {
		N(Bi, T, $.left = e), N(Bi, x, $.width = t);
	}
	function ra(e, t) {
		N(Bi, C, $.top = e), N(Bi, S, $.height = t);
	}
	let ia = z.ori == 0 ? na : ra, aa = z.ori == 1 ? na : ra;
	function oa() {
		if (kt && W.live) for (let e = +(k == 2); e < F.length; e++) {
			if (e == 0 && zt) continue;
			let t = W.values[e], n = 0;
			for (let r in t) Lt[e][n++].firstChild.nodeValue = t[r];
		}
	}
	function sa(e, t) {
		if (e != null && (e.idxs ? e.idxs.forEach((e, t) => {
			Et[t] = e;
		}) : St(e.idx) || Et.fill(e.idx), W.idx = Et[0]), kt && W.live) {
			for (let e = 0; e < F.length; e++) (e > 0 || k == 1 && !zt) && ca(e, Et[e]);
			oa();
		}
		Dn = !1, t !== !1 && Da("setLegend");
	}
	O.setLegend = sa;
	function ca(e, t) {
		let n = F[e], r = e == 0 && tt == 2 ? Cr : D[e], i;
		zt ? i = n.values(O, e, t) ?? Bt : (i = n.value(O, t == null ? null : r[t], e, t), i = i == null ? Bt : { _: i }), W.values[e] = i;
	}
	function la(e, t, n) {
		Pi = Z, Fi = Q, [Z, Q] = G.move(O, Z, Q), G.left = Z, G.top = Q, At && (Oi && ye(Oi, Ke(Z), 0, K, q), ki && ye(ki, 0, Ke(Q), K, q));
		let r, i = br > X;
		Yi = B, Xi = null;
		let a = z.ori == 0 ? K : q, o = z.ori == 1 ? K : q;
		if (Z < 0 || Y == 0 || i) {
			r = G.idx = null;
			for (let e = 0; e < F.length; e++) {
				let t = Jn[e];
				t != null && ye(t, -10, -10, K, q);
			}
			Rn && Wi(null, Qi, !0, e == null && ka.setSeries), W.live && (Et.fill(r), Dn = !0);
		} else {
			let e, t, n;
			k == 1 && (e = z.ori == 0 ? Z : Q, t = ea(e, R), r = G.idx = De(t, D[0], br, X), n = it(D[0][r], z, a, 0));
			let i = -10, s = -10, c = 0, l = 0, u = !0, d = "", f = "";
			for (let e = +(k == 2); e < F.length; e++) {
				let p = F[e], m = Et[e], h = m == null ? null : k == 1 ? D[e][m] : D[e][1][m], g = G.dataIdx(O, e, r, t), _ = g == null ? null : k == 1 ? D[e][g] : D[e][1][g];
				if (Dn = Dn || _ != h || g != m, Et[e] = g, e > 0 && p.show) {
					let t = g == null ? -10 : g == r ? n : it(k == 1 ? D[0][g] : D[e][0][g], z, a, 0), m = _ == null ? -10 : at(_, k == 1 ? I[p.scale] : I[p.facets[1].scale], o, 0);
					if (Rn && _ != null) {
						let t = z.ori == 1 ? Z : Q, n = We(Ln.dist(O, e, g, m, t));
						if (n < Yi) {
							let r = Ln.bias;
							if (r != 0) {
								let i = ea(t, p.scale), a = _ >= 0 ? 1 : -1, o = i >= 0 ? 1 : -1;
								o == a && (o == 1 ? r == 1 ? _ >= i : _ <= i : r == 1 ? _ <= i : _ >= i) && (Yi = n, Xi = e);
							} else Yi = n, Xi = e;
						}
					}
					if (Dn || zn) {
						let n, r;
						z.ori == 0 ? (n = t, r = m) : (n = m, r = t);
						let a, o, p, h, g, _, v = !0, y = In.bbox;
						if (y != null) {
							v = !1;
							let t = y(O, e);
							p = t.left, h = t.top, a = t.width, o = t.height;
						} else p = n, h = r, a = o = In.size(O, e);
						if (_ = In.fill(O, e), g = In.stroke(O, e), zn) e == Xi && Yi <= Ln.prox && (i = p, s = h, c = a, l = o, u = v, d = _, f = g);
						else {
							let t = Jn[e];
							t != null && (Yn[e] = p, Xn[e] = h, Se(t, a, o, v), xe(t, _, g), ye(t, qe(p), qe(h), K, q));
						}
					}
				}
			}
			if (zn) {
				let e = Ln.prox;
				if (Dn || (Zi == null ? Yi <= e : Yi > e || Xi != Zi)) {
					let e = Jn[0];
					e != null && (Yn[0] = i, Xn[0] = s, Se(e, c, l, u), xe(e, d, f), ye(e, qe(i), qe(s), K, q));
				}
			}
		}
		if ($.show && Ii) if (e != null) {
			let [t, n] = ka.scales, [r, i] = ka.match, [s, c] = e.cursor.sync.scales, l = e.cursor.drag;
			if (Ri = l._x, zi = l._y, Ri || zi) {
				let { left: l, top: u, width: d, height: f } = e.select, p = e.scales[s].ori, m = e.posToVal, h, g, _, v, y, b = t != null && r(t, s), x = n != null && i(n, c);
				b && Ri ? (p == 0 ? (h = l, g = d) : (h = u, g = f), _ = I[t], v = it(m(h, s), _, a, 0), y = it(m(h + g, s), _, a, 0), ia(Je(v, y), We(y - v))) : ia(0, a), x && zi ? (p == 1 ? (h = l, g = d) : (h = u, g = f), _ = I[n], v = at(m(h, c), _, o, 0), y = at(m(h + g, c), _, o, 0), aa(Je(v, y), We(y - v))) : aa(0, o);
			} else ha();
		} else {
			let e = We(Pi - Ai), t = We(Fi - ji);
			if (z.ori == 1) {
				let n = e;
				e = t, t = n;
			}
			Ri = Li.x && e >= Li.dist, zi = Li.y && t >= Li.dist;
			let n = Li.uni;
			n == null ? Li.x && Li.y && (Ri || zi) && (Ri = zi = !0) : Ri && zi && (Ri = e >= n, zi = t >= n, !Ri && !zi && (t > e ? zi = !0 : Ri = !0));
			let r, i;
			Ri && (z.ori == 0 ? (r = Mi, i = Z) : (r = Ni, i = Q), ia(Je(r, i), We(i - r)), zi || aa(0, o)), zi && (z.ori == 1 ? (r = Mi, i = Z) : (r = Ni, i = Q), aa(Je(r, i), We(i - r)), Ri || ia(0, a)), !Ri && !zi && (ia(0, 0), aa(0, 0));
		}
		if (Li._x = Ri, Li._y = zi, e == null) {
			if (n) {
				if (Aa != null) {
					let [e, t] = ka.scales;
					ka.values[0] = e == null ? null : ea(z.ori == 0 ? Z : Q, e), ka.values[1] = t == null ? null : ea(z.ori == 1 ? Z : Q, t);
				}
				Ma(te, O, Z, Q, K, q, r);
			}
			if (Rn) {
				let e = n && ka.setSeries, t = Ln.prox;
				Zi == null ? Yi <= t && Wi(Xi, Qi, !0, e) : Yi > t ? Wi(null, Qi, !0, e) : Xi != Zi && Wi(Xi, Qi, !0, e);
			}
		}
		Dn && (W.idx = r, sa()), t !== !1 && Da("setCursor");
	}
	let ua = null;
	Object.defineProperty(O, "rect", { get() {
		return ua ?? da(!1), ua;
	} });
	function da(e = !1) {
		e ? ua = null : (ua = Oe.getBoundingClientRect(), Da("syncRect", ua));
	}
	function fa(e, t, n, r, i, a, o) {
		G._lock || Ii && e != null && e.movementX == 0 && e.movementY == 0 || (pa(e, t, n, r, i, a, o, !1, e != null), e == null ? la(t, !0, !1) : la(null, !0, !0));
	}
	function pa(e, t, n, r, i, a, o, s, c) {
		if (ua ?? da(!1), Fn(e), e != null) n = e.clientX - ua.left, r = e.clientY - ua.top;
		else {
			if (n < 0 || r < 0) {
				Z = -10, Q = -10;
				return;
			}
			let [e, o] = ka.scales, s = t.cursor.sync, [c, l] = s.values, [u, d] = s.scales, [f, p] = ka.match, m = t.axes[0].side % 2 == 1, h = z.ori == 0 ? K : q, g = z.ori == 1 ? K : q, _ = m ? a : i, v = m ? i : a, y = m ? r : n, b = m ? n : r;
			if (n = u == null ? y / _ * h : f(e, u) ? fe(c, I[e], h, 0) : -10, r = d == null ? b / v * g : p(o, d) ? fe(l, I[o], g, 0) : -10, z.ori == 1) {
				let e = n;
				n = r, r = e;
			}
		}
		c && (t == null || t.cursor.event.type == te) && ((n <= 1 || n >= K - 1) && (n = dt(n, K)), (r <= 1 || r >= q - 1) && (r = dt(r, q))), s ? (Ai = n, ji = r, [Mi, Ni] = G.move(O, n, r)) : (Z = n, Q = r);
	}
	let ma = {
		width: 0,
		height: 0,
		left: 0,
		top: 0
	};
	function ha() {
		Vi(ma, !1);
	}
	let ga, _a, va, ya;
	function ba(e, t, n, r, i, a, o) {
		Ii = !0, Ri = zi = Li._x = Li._y = !1, pa(e, t, n, r, i, a, o, !0, !1), e != null && (qt(re, ue, xa, !1), Ma(ne, O, Mi, Ni, K, q, null));
		let { left: s, top: c, width: l, height: u } = $;
		ga = s, _a = c, va = l, ya = u;
	}
	function xa(e, t, n, r, i, a, o) {
		Ii = Li._x = Li._y = !1, pa(e, t, n, r, i, a, o, !1, !0);
		let { left: s, top: c, width: l, height: u } = $, d = l > 0 || u > 0, f = ga != s || _a != c || va != l || ya != u;
		if (d && f && Vi($), Li.setScale && d && f) {
			let e = s, t = l, n = c, r = u;
			if (z.ori == 1 && (e = c, t = u, n = s, r = l), Ri && Ui(R, ea(e, R), ea(e + t, R)), zi) for (let e in I) {
				let t = I[e];
				e != R && t.from == null && t.min != B && Ui(e, ea(n + r, e), ea(n, e));
			}
			ha();
		} else G.lock && (G._lock = !G._lock, la(t, !0, e != null));
		e != null && (Jt(re, ue), Ma(re, O, Z, Q, K, q, null));
	}
	function Sa(e, t, n, r, i, a, o) {
		if (G._lock) return;
		Fn(e);
		let s = Ii;
		if (Ii) {
			let e = !0, t = !0, n, r;
			z.ori == 0 ? (n = Ri, r = zi) : (n = zi, r = Ri), n && r && (e = Z <= 10 || Z >= K - 10, t = Q <= 10 || Q >= q - 10), n && e && (Z = Z < Mi ? 0 : K), r && t && (Q = Q < Ni ? 0 : q), la(null, !0, !0), Ii = !1;
		}
		Z = -10, Q = -10, Et.fill(null), la(null, !0, !0), s && (Ii = s);
	}
	function Ca(e, t, n, r, i, a, o) {
		G._lock || (Fn(e), Er(), ha(), e != null && Ma(oe, O, Z, Q, K, q, null));
	}
	function wa() {
		Le.forEach(oi), On(O.width, O.height, !0);
	}
	Te(ce, de, wa);
	let Ta = {};
	Ta.mousedown = ba, Ta.mousemove = fa, Ta.mouseup = xa, Ta.dblclick = Ca, Ta.setSeries = (e, t, n, r) => {
		let i = ka.match[2];
		n = i(O, t, n), n != -1 && Wi(n, r, !0, !1);
	}, At && (qt(ne, Oe, ba), qt(te, Oe, fa), qt(ie, Oe, (e) => {
		Fn(e), da(!1);
	}), qt(ae, Oe, Sa), qt(oe, Oe, Ca), Wr.add(O), O.syncRect = da);
	let Ea = O.hooks = e.hooks || {};
	function Da(e, t, n) {
		yi ? bi.push([
			e,
			t,
			n
		]) : e in Ea && Ea[e].forEach((e) => {
			e.call(null, O, t, n);
		});
	}
	(e.plugins || []).forEach((e) => {
		for (let t in e.hooks) Ea[t] = (Ea[t] || []).concat(e.hooks[t]);
	});
	let Oa = (e, t, n) => n, ka = Ot({
		key: null,
		setSeries: !1,
		filters: {
			pub: ct,
			sub: ct
		},
		scales: [R, F[1] ? F[1].scale : null],
		match: [
			lt,
			lt,
			Oa
		],
		values: [null, null]
	}, G.sync);
	ka.match.length == 2 && ka.match.push(Oa), G.sync = ka;
	let Aa = ka.key, ja = pr(Aa);
	function Ma(e, t, n, r, i, a, o) {
		ka.filters.pub(e, t, n, r, i, a, o) && ja.pub(e, t, n, r, i, a, o);
	}
	ja.sub(O);
	function Na(e, t, n, r, i, a, o) {
		ka.filters.sub(e, t, n, r, i, a, o) && Ta[e](null, t, n, r, i, a, o);
	}
	O.pub = Na;
	function Pa() {
		ja.unsub(O), Wr.delete(O), Kt.clear(), Ee(ce, de, wa), ve.remove(), Mt?.remove(), Da("destroy");
	}
	O.destroy = Pa;
	function Fa() {
		Da("init", e, D), Tr(D || e.data, !1), H[R] ? Ti(R, H[R]) : Er(), En = $.show && ($.width > 0 || $.height > 0), Tn = Dn = !0, On(e.width, e.height);
	}
	return F.forEach(Qn), Le.forEach(fr), se ? se instanceof HTMLElement ? (se.appendChild(ve), Fa()) : se(O, Fa) : Fa(), O;
}
si.assign = Ot, si.fmtNum = Ve, si.rangeNum = Re, si.rangeLog = Ne, si.rangeAsinh = Pe, si.orient = gr, si.pxRatio = M, si.join = Mt, si.fmtDate = Gt, si.tzDate = qt, si.sync = pr;
{
	si.addGap = br, si.clipGaps = Y;
	let e = si.paths = { points: Nr };
	e.linear = Lr, e.stepped = Rr, e.bars = Br, e.spline = Hr;
}
//#endregion
export { si as t };
