//#region ../../node_modules/d3-time/src/interval.js
var e = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
function n(r, i, a, o) {
	function s(e) {
		return r(e = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+e)), e;
	}
	return s.floor = (e) => (r(e = /* @__PURE__ */ new Date(+e)), e), s.ceil = (e) => (r(e = /* @__PURE__ */ new Date(e - 1)), i(e, 1), r(e), e), s.round = (e) => {
		let t = s(e), n = s.ceil(e);
		return e - t < n - e ? t : n;
	}, s.offset = (e, t) => (i(e = /* @__PURE__ */ new Date(+e), t == null ? 1 : Math.floor(t)), e), s.range = (e, t, n) => {
		let a = [];
		if (e = s.ceil(e), n = n == null ? 1 : Math.floor(n), !(e < t) || !(n > 0)) return a;
		let o;
		do
			a.push(o = /* @__PURE__ */ new Date(+e)), i(e, n), r(e);
		while (o < e && e < t);
		return a;
	}, s.filter = (e) => n((t) => {
		if (t >= t) for (; r(t), !e(t);) t.setTime(t - 1);
	}, (t, n) => {
		if (t >= t) if (n < 0) for (; ++n <= 0;) for (; i(t, -1), !e(t););
		else for (; --n >= 0;) for (; i(t, 1), !e(t););
	}), a && (s.count = (n, i) => (e.setTime(+n), t.setTime(+i), r(e), r(t), Math.floor(a(e, t))), s.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? s.filter(o ? (t) => o(t) % e === 0 : (t) => s.count(0, t) % e === 0) : s)), s;
}
//#endregion
export { n as timeInterval };
