import { o as e } from "./src-BEYP07TO.js";
import { t } from "./value-CybtvyUg.js";
import { i as n, n as r, r as i, t as a } from "./defaultLocale-Cql_qCPq.js";
import { t as o } from "./init-Bdvvvy1Z.js";
//#region node_modules/d3-interpolate/src/round.js
function s(e, t) {
	return e = +e, t = +t, function(n) {
		return Math.round(e * (1 - n) + t * n);
	};
}
//#endregion
//#region node_modules/d3-array/src/ascending.js
function c(e, t) {
	return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/descending.js
function l(e, t) {
	return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/bisector.js
function u(e) {
	let t, n, r;
	e.length === 2 ? (t = e === c || e === l ? e : d, n = e, r = e) : (t = c, n = (t, n) => c(e(t), n), r = (t, n) => e(t) - n);
	function i(e, r, i = 0, a = e.length) {
		if (i < a) {
			if (t(r, r) !== 0) return a;
			do {
				let t = i + a >>> 1;
				n(e[t], r) < 0 ? i = t + 1 : a = t;
			} while (i < a);
		}
		return i;
	}
	function a(e, r, i = 0, a = e.length) {
		if (i < a) {
			if (t(r, r) !== 0) return a;
			do {
				let t = i + a >>> 1;
				n(e[t], r) <= 0 ? i = t + 1 : a = t;
			} while (i < a);
		}
		return i;
	}
	function o(e, t, n = 0, a = e.length) {
		let o = i(e, t, n, a - 1);
		return o > n && r(e[o - 1], t) > -r(e[o], t) ? o - 1 : o;
	}
	return {
		left: i,
		center: o,
		right: a
	};
}
function d() {
	return 0;
}
//#endregion
//#region node_modules/d3-array/src/number.js
function f(e) {
	return e === null ? NaN : +e;
}
//#endregion
//#region node_modules/d3-array/src/bisect.js
var p = u(c), m = p.right;
p.left, u(f).center;
//#endregion
//#region node_modules/d3-array/src/ticks.js
var h = Math.sqrt(50), g = Math.sqrt(10), _ = Math.sqrt(2);
function v(e, t, n) {
	let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / 10 ** i, o = a >= h ? 10 : a >= g ? 5 : a >= _ ? 2 : 1, s, c, l;
	return i < 0 ? (l = 10 ** -i / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = 10 ** i * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? v(e, t, n * 2) : [
		s,
		c,
		l
	];
}
function y(e, t, n) {
	if (t = +t, e = +e, n = +n, !(n > 0)) return [];
	if (e === t) return [e];
	let r = t < e, [i, a, o] = r ? v(t, e, n) : v(e, t, n);
	if (!(a >= i)) return [];
	let s = a - i + 1, c = Array(s);
	if (r) if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
	else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
	else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
	else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
	return c;
}
function b(e, t, n) {
	return t = +t, e = +e, n = +n, v(e, t, n)[2];
}
function x(e, t, n) {
	t = +t, e = +e, n = +n;
	let r = t < e, i = r ? b(t, e, n) : b(e, t, n);
	return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
}
//#endregion
//#region node_modules/d3-format/src/precisionFixed.js
function S(e) {
	return Math.max(0, -n(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionPrefix.js
function C(e, t) {
	return Math.max(0, Math.max(-8, Math.min(8, Math.floor(n(t) / 3))) * 3 - n(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionRound.js
function w(e, t) {
	return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, n(t) - n(e)) + 1;
}
//#endregion
//#region node_modules/d3-scale/src/constant.js
function T(e) {
	return function() {
		return e;
	};
}
//#endregion
//#region node_modules/d3-scale/src/number.js
function E(e) {
	return +e;
}
//#endregion
//#region node_modules/d3-scale/src/continuous.js
var D = [0, 1];
function O(e) {
	return e;
}
function k(e, t) {
	return (t -= e = +e) ? function(n) {
		return (n - e) / t;
	} : T(isNaN(t) ? NaN : .5);
}
function A(e, t) {
	var n;
	return e > t && (n = e, e = t, t = n), function(n) {
		return Math.max(e, Math.min(t, n));
	};
}
function j(e, t, n) {
	var r = e[0], i = e[1], a = t[0], o = t[1];
	return i < r ? (r = k(i, r), a = n(o, a)) : (r = k(r, i), a = n(a, o)), function(e) {
		return a(r(e));
	};
}
function M(e, t, n) {
	var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
	for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = k(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
	return function(t) {
		var n = m(e, t, 1, r) - 1;
		return a[n](i[n](t));
	};
}
function N(e, t) {
	return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
}
function P() {
	var n = D, r = D, i = t, a, o, c, l = O, u, d, f;
	function p() {
		var e = Math.min(n.length, r.length);
		return l !== O && (l = A(n[0], n[e - 1])), u = e > 2 ? M : j, d = f = null, m;
	}
	function m(e) {
		return e == null || isNaN(e = +e) ? c : (d ||= u(n.map(a), r, i))(a(l(e)));
	}
	return m.invert = function(t) {
		return l(o((f ||= u(r, n.map(a), e))(t)));
	}, m.domain = function(e) {
		return arguments.length ? (n = Array.from(e, E), p()) : n.slice();
	}, m.range = function(e) {
		return arguments.length ? (r = Array.from(e), p()) : r.slice();
	}, m.rangeRound = function(e) {
		return r = Array.from(e), i = s, p();
	}, m.clamp = function(e) {
		return arguments.length ? (l = e ? !0 : O, p()) : l !== O;
	}, m.interpolate = function(e) {
		return arguments.length ? (i = e, p()) : i;
	}, m.unknown = function(e) {
		return arguments.length ? (c = e, m) : c;
	}, function(e, t) {
		return a = e, o = t, p();
	};
}
function F() {
	return P()(O, O);
}
//#endregion
//#region node_modules/d3-scale/src/tickFormat.js
function I(e, t, n, o) {
	var s = x(e, t, n), c;
	switch (o = i(o ?? ",f"), o.type) {
		case "s":
			var l = Math.max(Math.abs(e), Math.abs(t));
			return o.precision == null && !isNaN(c = C(s, l)) && (o.precision = c), r(o, l);
		case "":
		case "e":
		case "g":
		case "p":
		case "r":
			o.precision == null && !isNaN(c = w(s, Math.max(Math.abs(e), Math.abs(t)))) && (o.precision = c - (o.type === "e"));
			break;
		case "f":
		case "%":
			o.precision == null && !isNaN(c = S(s)) && (o.precision = c - (o.type === "%") * 2);
			break;
	}
	return a(o);
}
//#endregion
//#region node_modules/d3-scale/src/linear.js
function L(e) {
	var t = e.domain;
	return e.ticks = function(e) {
		var n = t();
		return y(n[0], n[n.length - 1], e ?? 10);
	}, e.tickFormat = function(e, n) {
		var r = t();
		return I(r[0], r[r.length - 1], e ?? 10, n);
	}, e.nice = function(n) {
		n ??= 10;
		var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
		for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
			if (l = b(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
			if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
			else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
			else break;
			c = l;
		}
		return e;
	}, e;
}
function R() {
	var e = F();
	return e.copy = function() {
		return N(e, R());
	}, o.apply(e, arguments), L(e);
}
//#endregion
export { u as a, x as i, F as n, N as r, R as t };

//# sourceMappingURL=linear-BePtLBEt.js.map