import { s as e, t } from "./chunk-NBPlniwU.js";
import { h as n } from "./chunk-GEFDOKGD-8e2771NL.js";
import { a as r, c as i, d as a, f as o, g as s, h as c, i as l, p as u, s as d, u as f, v as p } from "./src-DI0MZP4m.js";
import { B as m, C as h, V as g, W as _, _ as v, a as y, b, c as x, s as S, v as C } from "./chunk-7R4GIKGN-C19ZEV_b.js";
import { a as w, i as T, n as E, r as D, t as O } from "./linear-CWB56ned.js";
import { t as k } from "./init-B4NvJPDj.js";
import { t as ee } from "./dist-DeXxBykG.js";
//#region node_modules/d3-array/src/max.js
function A(e, t) {
	let n;
	if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
	else {
		let r = -1;
		for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i);
	}
	return n;
}
//#endregion
//#region node_modules/d3-array/src/min.js
function te(e, t) {
	let n;
	if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
	else {
		let r = -1;
		for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i);
	}
	return n;
}
//#endregion
//#region node_modules/d3-axis/src/identity.js
function ne(e) {
	return e;
}
//#endregion
//#region node_modules/d3-axis/src/axis.js
var re = 1, ie = 2, ae = 3, oe = 4, se = 1e-6;
function ce(e) {
	return "translate(" + e + ",0)";
}
function le(e) {
	return "translate(0," + e + ")";
}
function ue(e) {
	return (t) => +e(t);
}
function de(e, t) {
	return t = Math.max(0, e.bandwidth() - t * 2) / 2, e.round() && (t = Math.round(t)), (n) => +e(n) + t;
}
function fe() {
	return !this.__axis;
}
function pe(e, t) {
	var n = [], r = null, i = null, a = 6, o = 6, s = 3, c = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : .5, l = e === re || e === oe ? -1 : 1, u = e === oe || e === ie ? "x" : "y", d = e === re || e === ae ? ce : le;
	function f(f) {
		var p = r ?? (t.ticks ? t.ticks.apply(t, n) : t.domain()), m = i ?? (t.tickFormat ? t.tickFormat.apply(t, n) : ne), h = Math.max(a, 0) + s, g = t.range(), _ = +g[0] + c, v = +g[g.length - 1] + c, y = (t.bandwidth ? de : ue)(t.copy(), c), b = f.selection ? f.selection() : f, x = b.selectAll(".domain").data([null]), S = b.selectAll(".tick").data(p, t).order(), C = S.exit(), w = S.enter().append("g").attr("class", "tick"), T = S.select("line"), E = S.select("text");
		x = x.merge(x.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), S = S.merge(w), T = T.merge(w.append("line").attr("stroke", "currentColor").attr(u + "2", l * a)), E = E.merge(w.append("text").attr("fill", "currentColor").attr(u, l * h).attr("dy", e === re ? "0em" : e === ae ? "0.71em" : "0.32em")), f !== b && (x = x.transition(f), S = S.transition(f), T = T.transition(f), E = E.transition(f), C = C.transition(f).attr("opacity", se).attr("transform", function(e) {
			return isFinite(e = y(e)) ? d(e + c) : this.getAttribute("transform");
		}), w.attr("opacity", se).attr("transform", function(e) {
			var t = this.parentNode.__axis;
			return d((t && isFinite(t = t(e)) ? t : y(e)) + c);
		})), C.remove(), x.attr("d", e === oe || e === ie ? o ? "M" + l * o + "," + _ + "H" + c + "V" + v + "H" + l * o : "M" + c + "," + _ + "V" + v : o ? "M" + _ + "," + l * o + "V" + c + "H" + v + "V" + l * o : "M" + _ + "," + c + "H" + v), S.attr("opacity", 1).attr("transform", function(e) {
			return d(y(e) + c);
		}), T.attr(u + "2", l * a), E.attr(u, l * h).text(m), b.filter(fe).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", e === ie ? "start" : e === oe ? "end" : "middle"), b.each(function() {
			this.__axis = y;
		});
	}
	return f.scale = function(e) {
		return arguments.length ? (t = e, f) : t;
	}, f.ticks = function() {
		return n = Array.from(arguments), f;
	}, f.tickArguments = function(e) {
		return arguments.length ? (n = e == null ? [] : Array.from(e), f) : n.slice();
	}, f.tickValues = function(e) {
		return arguments.length ? (r = e == null ? null : Array.from(e), f) : r && r.slice();
	}, f.tickFormat = function(e) {
		return arguments.length ? (i = e, f) : i;
	}, f.tickSize = function(e) {
		return arguments.length ? (a = o = +e, f) : a;
	}, f.tickSizeInner = function(e) {
		return arguments.length ? (a = +e, f) : a;
	}, f.tickSizeOuter = function(e) {
		return arguments.length ? (o = +e, f) : o;
	}, f.tickPadding = function(e) {
		return arguments.length ? (s = +e, f) : s;
	}, f.offset = function(e) {
		return arguments.length ? (c = +e, f) : c;
	}, f;
}
function me(e) {
	return pe(re, e);
}
function he(e) {
	return pe(ae, e);
}
//#endregion
//#region node_modules/d3-color/src/math.js
var ge = Math.PI / 180, _e = 180 / Math.PI, ve = 18, ye = .96422, be = 1, xe = .82521, Se = 4 / 29, Ce = 6 / 29, we = 3 * Ce * Ce, Te = Ce * Ce * Ce;
function Ee(e) {
	if (e instanceof j) return new j(e.l, e.a, e.b, e.opacity);
	if (e instanceof M) return Pe(e);
	e instanceof i || (e = f(e));
	var t = je(e.r), n = je(e.g), r = je(e.b), a = Oe((.2225045 * t + .7168786 * n + .0606169 * r) / be), o, s;
	return t === n && n === r ? o = s = a : (o = Oe((.4360747 * t + .3850649 * n + .1430804 * r) / ye), s = Oe((.0139322 * t + .0971045 * n + .7141733 * r) / xe)), new j(116 * a - 16, 500 * (o - a), 200 * (a - s), e.opacity);
}
function De(e, t, n, r) {
	return arguments.length === 1 ? Ee(e) : new j(e, t, n, r ?? 1);
}
function j(e, t, n, r) {
	this.l = +e, this.a = +t, this.b = +n, this.opacity = +r;
}
a(j, De, o(d, {
	brighter(e) {
		return new j(this.l + ve * (e ?? 1), this.a, this.b, this.opacity);
	},
	darker(e) {
		return new j(this.l - ve * (e ?? 1), this.a, this.b, this.opacity);
	},
	rgb() {
		var e = (this.l + 16) / 116, t = isNaN(this.a) ? e : e + this.a / 500, n = isNaN(this.b) ? e : e - this.b / 200;
		return t = ye * ke(t), e = be * ke(e), n = xe * ke(n), new i(Ae(3.1338561 * t - 1.6168667 * e - .4906146 * n), Ae(-.9787684 * t + 1.9161415 * e + .033454 * n), Ae(.0719453 * t - .2289914 * e + 1.4052427 * n), this.opacity);
	}
}));
function Oe(e) {
	return e > Te ? e ** (1 / 3) : e / we + Se;
}
function ke(e) {
	return e > Ce ? e * e * e : we * (e - Se);
}
function Ae(e) {
	return 255 * (e <= .0031308 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - .055);
}
function je(e) {
	return (e /= 255) <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
}
function Me(e) {
	if (e instanceof M) return new M(e.h, e.c, e.l, e.opacity);
	if (e instanceof j || (e = Ee(e)), e.a === 0 && e.b === 0) return new M(NaN, 0 < e.l && e.l < 100 ? 0 : NaN, e.l, e.opacity);
	var t = Math.atan2(e.b, e.a) * _e;
	return new M(t < 0 ? t + 360 : t, Math.sqrt(e.a * e.a + e.b * e.b), e.l, e.opacity);
}
function Ne(e, t, n, r) {
	return arguments.length === 1 ? Me(e) : new M(e, t, n, r ?? 1);
}
function M(e, t, n, r) {
	this.h = +e, this.c = +t, this.l = +n, this.opacity = +r;
}
function Pe(e) {
	if (isNaN(e.h)) return new j(e.l, 0, 0, e.opacity);
	var t = e.h * ge;
	return new j(e.l, Math.cos(t) * e.c, Math.sin(t) * e.c, e.opacity);
}
a(M, Ne, o(d, {
	brighter(e) {
		return new M(this.h, this.c, this.l + ve * (e ?? 1), this.opacity);
	},
	darker(e) {
		return new M(this.h, this.c, this.l - ve * (e ?? 1), this.opacity);
	},
	rgb() {
		return Pe(this).rgb();
	}
}));
//#endregion
//#region node_modules/d3-interpolate/src/hcl.js
function Fe(e) {
	return function(t, n) {
		var i = e((t = Ne(t)).h, (n = Ne(n)).h), a = r(t.c, n.c), o = r(t.l, n.l), s = r(t.opacity, n.opacity);
		return function(e) {
			return t.h = i(e), t.c = a(e), t.l = o(e), t.opacity = s(e), t + "";
		};
	};
}
var Ie = Fe(l);
//#endregion
//#region node_modules/d3-scale/src/nice.js
function Le(e, t) {
	e = e.slice();
	var n = 0, r = e.length - 1, i = e[n], a = e[r], o;
	return a < i && (o = n, n = r, r = o, o = i, i = a, a = o), e[n] = t.floor(i), e[r] = t.ceil(a), e;
}
//#endregion
//#region node_modules/d3-time/src/interval.js
var Re = /* @__PURE__ */ new Date(), ze = /* @__PURE__ */ new Date();
function N(e, t, n, r) {
	function i(t) {
		return e(t = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+t)), t;
	}
	return i.floor = (t) => (e(t = /* @__PURE__ */ new Date(+t)), t), i.ceil = (n) => (e(n = /* @__PURE__ */ new Date(n - 1)), t(n, 1), e(n), n), i.round = (e) => {
		let t = i(e), n = i.ceil(e);
		return e - t < n - e ? t : n;
	}, i.offset = (e, n) => (t(e = /* @__PURE__ */ new Date(+e), n == null ? 1 : Math.floor(n)), e), i.range = (n, r, a) => {
		let o = [];
		if (n = i.ceil(n), a = a == null ? 1 : Math.floor(a), !(n < r) || !(a > 0)) return o;
		let s;
		do
			o.push(s = /* @__PURE__ */ new Date(+n)), t(n, a), e(n);
		while (s < n && n < r);
		return o;
	}, i.filter = (n) => N((t) => {
		if (t >= t) for (; e(t), !n(t);) t.setTime(t - 1);
	}, (e, r) => {
		if (e >= e) if (r < 0) for (; ++r <= 0;) for (; t(e, -1), !n(e););
		else for (; --r >= 0;) for (; t(e, 1), !n(e););
	}), n && (i.count = (t, r) => (Re.setTime(+t), ze.setTime(+r), e(Re), e(ze), Math.floor(n(Re, ze))), i.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? i.filter(r ? (t) => r(t) % e === 0 : (t) => i.count(0, t) % e === 0) : i)), i;
}
//#endregion
//#region node_modules/d3-time/src/millisecond.js
var P = N(() => {}, (e, t) => {
	e.setTime(+e + t);
}, (e, t) => t - e);
P.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? N((t) => {
	t.setTime(Math.floor(t / e) * e);
}, (t, n) => {
	t.setTime(+t + n * e);
}, (t, n) => (n - t) / e) : P), P.range;
//#endregion
//#region node_modules/d3-time/src/duration.js
var F = 1e3, I = F * 60, L = I * 60, R = L * 24, Be = R * 7, Ve = R * 30, He = R * 365, z = N((e) => {
	e.setTime(e - e.getMilliseconds());
}, (e, t) => {
	e.setTime(+e + t * F);
}, (e, t) => (t - e) / F, (e) => e.getUTCSeconds());
z.range;
//#endregion
//#region node_modules/d3-time/src/minute.js
var Ue = N((e) => {
	e.setTime(e - e.getMilliseconds() - e.getSeconds() * F);
}, (e, t) => {
	e.setTime(+e + t * I);
}, (e, t) => (t - e) / I, (e) => e.getMinutes());
Ue.range;
var We = N((e) => {
	e.setUTCSeconds(0, 0);
}, (e, t) => {
	e.setTime(+e + t * I);
}, (e, t) => (t - e) / I, (e) => e.getUTCMinutes());
We.range;
//#endregion
//#region node_modules/d3-time/src/hour.js
var Ge = N((e) => {
	e.setTime(e - e.getMilliseconds() - e.getSeconds() * F - e.getMinutes() * I);
}, (e, t) => {
	e.setTime(+e + t * L);
}, (e, t) => (t - e) / L, (e) => e.getHours());
Ge.range;
var Ke = N((e) => {
	e.setUTCMinutes(0, 0, 0);
}, (e, t) => {
	e.setTime(+e + t * L);
}, (e, t) => (t - e) / L, (e) => e.getUTCHours());
Ke.range;
//#endregion
//#region node_modules/d3-time/src/day.js
var B = N((e) => e.setHours(0, 0, 0, 0), (e, t) => e.setDate(e.getDate() + t), (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * I) / R, (e) => e.getDate() - 1);
B.range;
var qe = N((e) => {
	e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
	e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / R, (e) => e.getUTCDate() - 1);
qe.range;
var Je = N((e) => {
	e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
	e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / R, (e) => Math.floor(e / R));
Je.range;
//#endregion
//#region node_modules/d3-time/src/week.js
function V(e) {
	return N((t) => {
		t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
	}, (e, t) => {
		e.setDate(e.getDate() + t * 7);
	}, (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * I) / Be);
}
var Ye = V(0), Xe = V(1), Ze = V(2), Qe = V(3), H = V(4), $e = V(5), et = V(6);
Ye.range, Xe.range, Ze.range, Qe.range, H.range, $e.range, et.range;
function U(e) {
	return N((t) => {
		t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
	}, (e, t) => {
		e.setUTCDate(e.getUTCDate() + t * 7);
	}, (e, t) => (t - e) / Be);
}
var tt = U(0), nt = U(1), rt = U(2), it = U(3), W = U(4), at = U(5), ot = U(6);
tt.range, nt.range, rt.range, it.range, W.range, at.range, ot.range;
//#endregion
//#region node_modules/d3-time/src/month.js
var st = N((e) => {
	e.setDate(1), e.setHours(0, 0, 0, 0);
}, (e, t) => {
	e.setMonth(e.getMonth() + t);
}, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, (e) => e.getMonth());
st.range;
var ct = N((e) => {
	e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
	e.setUTCMonth(e.getUTCMonth() + t);
}, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, (e) => e.getUTCMonth());
ct.range;
//#endregion
//#region node_modules/d3-time/src/year.js
var G = N((e) => {
	e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, t) => {
	e.setFullYear(e.getFullYear() + t);
}, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
G.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : N((t) => {
	t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, (t, n) => {
	t.setFullYear(t.getFullYear() + n * e);
}), G.range;
var K = N((e) => {
	e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
	e.setUTCFullYear(e.getUTCFullYear() + t);
}, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
K.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : N((t) => {
	t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, (t, n) => {
	t.setUTCFullYear(t.getUTCFullYear() + n * e);
}), K.range;
//#endregion
//#region node_modules/d3-time/src/ticks.js
function lt(e, t, n, r, i, a) {
	let o = [
		[
			z,
			1,
			F
		],
		[
			z,
			5,
			5 * F
		],
		[
			z,
			15,
			15 * F
		],
		[
			z,
			30,
			30 * F
		],
		[
			a,
			1,
			I
		],
		[
			a,
			5,
			5 * I
		],
		[
			a,
			15,
			15 * I
		],
		[
			a,
			30,
			30 * I
		],
		[
			i,
			1,
			L
		],
		[
			i,
			3,
			3 * L
		],
		[
			i,
			6,
			6 * L
		],
		[
			i,
			12,
			12 * L
		],
		[
			r,
			1,
			R
		],
		[
			r,
			2,
			2 * R
		],
		[
			n,
			1,
			Be
		],
		[
			t,
			1,
			Ve
		],
		[
			t,
			3,
			3 * Ve
		],
		[
			e,
			1,
			He
		]
	];
	function s(e, t, n) {
		let r = t < e;
		r && ([e, t] = [t, e]);
		let i = n && typeof n.range == "function" ? n : c(e, t, n), a = i ? i.range(e, +t + 1) : [];
		return r ? a.reverse() : a;
	}
	function c(t, n, r) {
		let i = Math.abs(n - t) / r, a = w(([, , e]) => e).right(o, i);
		if (a === o.length) return e.every(T(t / He, n / He, r));
		if (a === 0) return P.every(Math.max(T(t, n, r), 1));
		let [s, c] = o[i / o[a - 1][2] < o[a][2] / i ? a - 1 : a];
		return s.every(c);
	}
	return [s, c];
}
var [ut, dt] = lt(K, ct, tt, Je, Ke, We), [ft, pt] = lt(G, st, Ye, B, Ge, Ue);
//#endregion
//#region node_modules/d3-time-format/src/locale.js
function mt(e) {
	if (0 <= e.y && e.y < 100) {
		var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
		return t.setFullYear(e.y), t;
	}
	return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
}
function ht(e) {
	if (0 <= e.y && e.y < 100) {
		var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
		return t.setUTCFullYear(e.y), t;
	}
	return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
}
function gt(e, t, n) {
	return {
		y: e,
		m: t,
		d: n,
		H: 0,
		M: 0,
		S: 0,
		L: 0
	};
}
function _t(e) {
	var t = e.dateTime, n = e.date, r = e.time, i = e.periods, a = e.days, o = e.shortDays, s = e.months, c = e.shortMonths, l = St(i), u = Ct(i), d = St(a), f = Ct(a), p = St(o), m = Ct(o), h = St(s), g = Ct(s), _ = St(c), v = Ct(c), y = {
		a: ne,
		A: re,
		b: ie,
		B: ae,
		c: null,
		d: Wt,
		e: Wt,
		f: Yt,
		g: sn,
		G: ln,
		H: Gt,
		I: Kt,
		j: qt,
		L: Jt,
		m: Xt,
		M: Zt,
		p: oe,
		q: se,
		Q: Mn,
		s: Nn,
		S: Qt,
		u: $t,
		U: en,
		V: nn,
		w: rn,
		W: an,
		x: null,
		X: null,
		y: on,
		Y: cn,
		Z: un,
		"%": jn
	}, b = {
		a: ce,
		A: le,
		b: ue,
		B: de,
		c: null,
		d: dn,
		e: dn,
		f: gn,
		g: Dn,
		G: kn,
		H: fn,
		I: pn,
		j: mn,
		L: hn,
		m: _n,
		M: vn,
		p: fe,
		q: pe,
		Q: Mn,
		s: Nn,
		S: yn,
		u: bn,
		U: xn,
		V: Cn,
		w: wn,
		W: Tn,
		x: null,
		X: null,
		y: En,
		Y: On,
		Z: An,
		"%": jn
	}, x = {
		a: E,
		A: D,
		b: O,
		B: k,
		c: ee,
		d: Pt,
		e: Pt,
		f: Bt,
		g: At,
		G: kt,
		H: It,
		I: It,
		j: Ft,
		L: zt,
		m: Nt,
		M: Lt,
		p: T,
		q: Mt,
		Q: Ht,
		s: Ut,
		S: Rt,
		u: Tt,
		U: Et,
		V: Dt,
		w: wt,
		W: Ot,
		x: A,
		X: te,
		y: At,
		Y: kt,
		Z: jt,
		"%": Vt
	};
	y.x = S(n, y), y.X = S(r, y), y.c = S(t, y), b.x = S(n, b), b.X = S(r, b), b.c = S(t, b);
	function S(e, t) {
		return function(n) {
			var r = [], i = -1, a = 0, o = e.length, s, c, l;
			for (n instanceof Date || (n = /* @__PURE__ */ new Date(+n)); ++i < o;) e.charCodeAt(i) === 37 && (r.push(e.slice(a, i)), (c = vt[s = e.charAt(++i)]) == null ? c = s === "e" ? " " : "0" : s = e.charAt(++i), (l = t[s]) && (s = l(n, c)), r.push(s), a = i + 1);
			return r.push(e.slice(a, i)), r.join("");
		};
	}
	function C(e, t) {
		return function(n) {
			var r = gt(1900, void 0, 1), i = w(r, e, n += "", 0), a, o;
			if (i != n.length) return null;
			if ("Q" in r) return new Date(r.Q);
			if ("s" in r) return new Date(r.s * 1e3 + ("L" in r ? r.L : 0));
			if (t && !("Z" in r) && (r.Z = 0), "p" in r && (r.H = r.H % 12 + r.p * 12), r.m === void 0 && (r.m = "q" in r ? r.q : 0), "V" in r) {
				if (r.V < 1 || r.V > 53) return null;
				"w" in r || (r.w = 1), "Z" in r ? (a = ht(gt(r.y, 0, 1)), o = a.getUTCDay(), a = o > 4 || o === 0 ? nt.ceil(a) : nt(a), a = qe.offset(a, (r.V - 1) * 7), r.y = a.getUTCFullYear(), r.m = a.getUTCMonth(), r.d = a.getUTCDate() + (r.w + 6) % 7) : (a = mt(gt(r.y, 0, 1)), o = a.getDay(), a = o > 4 || o === 0 ? Xe.ceil(a) : Xe(a), a = B.offset(a, (r.V - 1) * 7), r.y = a.getFullYear(), r.m = a.getMonth(), r.d = a.getDate() + (r.w + 6) % 7);
			} else ("W" in r || "U" in r) && ("w" in r || (r.w = "u" in r ? r.u % 7 : "W" in r ? 1 : 0), o = "Z" in r ? ht(gt(r.y, 0, 1)).getUTCDay() : mt(gt(r.y, 0, 1)).getDay(), r.m = 0, r.d = "W" in r ? (r.w + 6) % 7 + r.W * 7 - (o + 5) % 7 : r.w + r.U * 7 - (o + 6) % 7);
			return "Z" in r ? (r.H += r.Z / 100 | 0, r.M += r.Z % 100, ht(r)) : mt(r);
		};
	}
	function w(e, t, n, r) {
		for (var i = 0, a = t.length, o = n.length, s, c; i < a;) {
			if (r >= o) return -1;
			if (s = t.charCodeAt(i++), s === 37) {
				if (s = t.charAt(i++), c = x[s in vt ? t.charAt(i++) : s], !c || (r = c(e, n, r)) < 0) return -1;
			} else if (s != n.charCodeAt(r++)) return -1;
		}
		return r;
	}
	function T(e, t, n) {
		var r = l.exec(t.slice(n));
		return r ? (e.p = u.get(r[0].toLowerCase()), n + r[0].length) : -1;
	}
	function E(e, t, n) {
		var r = p.exec(t.slice(n));
		return r ? (e.w = m.get(r[0].toLowerCase()), n + r[0].length) : -1;
	}
	function D(e, t, n) {
		var r = d.exec(t.slice(n));
		return r ? (e.w = f.get(r[0].toLowerCase()), n + r[0].length) : -1;
	}
	function O(e, t, n) {
		var r = _.exec(t.slice(n));
		return r ? (e.m = v.get(r[0].toLowerCase()), n + r[0].length) : -1;
	}
	function k(e, t, n) {
		var r = h.exec(t.slice(n));
		return r ? (e.m = g.get(r[0].toLowerCase()), n + r[0].length) : -1;
	}
	function ee(e, n, r) {
		return w(e, t, n, r);
	}
	function A(e, t, r) {
		return w(e, n, t, r);
	}
	function te(e, t, n) {
		return w(e, r, t, n);
	}
	function ne(e) {
		return o[e.getDay()];
	}
	function re(e) {
		return a[e.getDay()];
	}
	function ie(e) {
		return c[e.getMonth()];
	}
	function ae(e) {
		return s[e.getMonth()];
	}
	function oe(e) {
		return i[+(e.getHours() >= 12)];
	}
	function se(e) {
		return 1 + ~~(e.getMonth() / 3);
	}
	function ce(e) {
		return o[e.getUTCDay()];
	}
	function le(e) {
		return a[e.getUTCDay()];
	}
	function ue(e) {
		return c[e.getUTCMonth()];
	}
	function de(e) {
		return s[e.getUTCMonth()];
	}
	function fe(e) {
		return i[+(e.getUTCHours() >= 12)];
	}
	function pe(e) {
		return 1 + ~~(e.getUTCMonth() / 3);
	}
	return {
		format: function(e) {
			var t = S(e += "", y);
			return t.toString = function() {
				return e;
			}, t;
		},
		parse: function(e) {
			var t = C(e += "", !1);
			return t.toString = function() {
				return e;
			}, t;
		},
		utcFormat: function(e) {
			var t = S(e += "", b);
			return t.toString = function() {
				return e;
			}, t;
		},
		utcParse: function(e) {
			var t = C(e += "", !0);
			return t.toString = function() {
				return e;
			}, t;
		}
	};
}
var vt = {
	"-": "",
	_: " ",
	0: "0"
}, q = /^\s*\d+/, yt = /^%/, bt = /[\\^$*+?|[\]().{}]/g;
function J(e, t, n) {
	var r = e < 0 ? "-" : "", i = (r ? -e : e) + "", a = i.length;
	return r + (a < n ? Array(n - a + 1).join(t) + i : i);
}
function xt(e) {
	return e.replace(bt, "\\$&");
}
function St(e) {
	return RegExp("^(?:" + e.map(xt).join("|") + ")", "i");
}
function Ct(e) {
	return new Map(e.map((e, t) => [e.toLowerCase(), t]));
}
function wt(e, t, n) {
	var r = q.exec(t.slice(n, n + 1));
	return r ? (e.w = +r[0], n + r[0].length) : -1;
}
function Tt(e, t, n) {
	var r = q.exec(t.slice(n, n + 1));
	return r ? (e.u = +r[0], n + r[0].length) : -1;
}
function Et(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.U = +r[0], n + r[0].length) : -1;
}
function Dt(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.V = +r[0], n + r[0].length) : -1;
}
function Ot(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.W = +r[0], n + r[0].length) : -1;
}
function kt(e, t, n) {
	var r = q.exec(t.slice(n, n + 4));
	return r ? (e.y = +r[0], n + r[0].length) : -1;
}
function At(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
}
function jt(e, t, n) {
	var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
	return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
}
function Mt(e, t, n) {
	var r = q.exec(t.slice(n, n + 1));
	return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
}
function Nt(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
}
function Pt(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.d = +r[0], n + r[0].length) : -1;
}
function Ft(e, t, n) {
	var r = q.exec(t.slice(n, n + 3));
	return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
}
function It(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.H = +r[0], n + r[0].length) : -1;
}
function Lt(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.M = +r[0], n + r[0].length) : -1;
}
function Rt(e, t, n) {
	var r = q.exec(t.slice(n, n + 2));
	return r ? (e.S = +r[0], n + r[0].length) : -1;
}
function zt(e, t, n) {
	var r = q.exec(t.slice(n, n + 3));
	return r ? (e.L = +r[0], n + r[0].length) : -1;
}
function Bt(e, t, n) {
	var r = q.exec(t.slice(n, n + 6));
	return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
}
function Vt(e, t, n) {
	var r = yt.exec(t.slice(n, n + 1));
	return r ? n + r[0].length : -1;
}
function Ht(e, t, n) {
	var r = q.exec(t.slice(n));
	return r ? (e.Q = +r[0], n + r[0].length) : -1;
}
function Ut(e, t, n) {
	var r = q.exec(t.slice(n));
	return r ? (e.s = +r[0], n + r[0].length) : -1;
}
function Wt(e, t) {
	return J(e.getDate(), t, 2);
}
function Gt(e, t) {
	return J(e.getHours(), t, 2);
}
function Kt(e, t) {
	return J(e.getHours() % 12 || 12, t, 2);
}
function qt(e, t) {
	return J(1 + B.count(G(e), e), t, 3);
}
function Jt(e, t) {
	return J(e.getMilliseconds(), t, 3);
}
function Yt(e, t) {
	return Jt(e, t) + "000";
}
function Xt(e, t) {
	return J(e.getMonth() + 1, t, 2);
}
function Zt(e, t) {
	return J(e.getMinutes(), t, 2);
}
function Qt(e, t) {
	return J(e.getSeconds(), t, 2);
}
function $t(e) {
	var t = e.getDay();
	return t === 0 ? 7 : t;
}
function en(e, t) {
	return J(Ye.count(G(e) - 1, e), t, 2);
}
function tn(e) {
	var t = e.getDay();
	return t >= 4 || t === 0 ? H(e) : H.ceil(e);
}
function nn(e, t) {
	return e = tn(e), J(H.count(G(e), e) + (G(e).getDay() === 4), t, 2);
}
function rn(e) {
	return e.getDay();
}
function an(e, t) {
	return J(Xe.count(G(e) - 1, e), t, 2);
}
function on(e, t) {
	return J(e.getFullYear() % 100, t, 2);
}
function sn(e, t) {
	return e = tn(e), J(e.getFullYear() % 100, t, 2);
}
function cn(e, t) {
	return J(e.getFullYear() % 1e4, t, 4);
}
function ln(e, t) {
	var n = e.getDay();
	return e = n >= 4 || n === 0 ? H(e) : H.ceil(e), J(e.getFullYear() % 1e4, t, 4);
}
function un(e) {
	var t = e.getTimezoneOffset();
	return (t > 0 ? "-" : (t *= -1, "+")) + J(t / 60 | 0, "0", 2) + J(t % 60, "0", 2);
}
function dn(e, t) {
	return J(e.getUTCDate(), t, 2);
}
function fn(e, t) {
	return J(e.getUTCHours(), t, 2);
}
function pn(e, t) {
	return J(e.getUTCHours() % 12 || 12, t, 2);
}
function mn(e, t) {
	return J(1 + qe.count(K(e), e), t, 3);
}
function hn(e, t) {
	return J(e.getUTCMilliseconds(), t, 3);
}
function gn(e, t) {
	return hn(e, t) + "000";
}
function _n(e, t) {
	return J(e.getUTCMonth() + 1, t, 2);
}
function vn(e, t) {
	return J(e.getUTCMinutes(), t, 2);
}
function yn(e, t) {
	return J(e.getUTCSeconds(), t, 2);
}
function bn(e) {
	var t = e.getUTCDay();
	return t === 0 ? 7 : t;
}
function xn(e, t) {
	return J(tt.count(K(e) - 1, e), t, 2);
}
function Sn(e) {
	var t = e.getUTCDay();
	return t >= 4 || t === 0 ? W(e) : W.ceil(e);
}
function Cn(e, t) {
	return e = Sn(e), J(W.count(K(e), e) + (K(e).getUTCDay() === 4), t, 2);
}
function wn(e) {
	return e.getUTCDay();
}
function Tn(e, t) {
	return J(nt.count(K(e) - 1, e), t, 2);
}
function En(e, t) {
	return J(e.getUTCFullYear() % 100, t, 2);
}
function Dn(e, t) {
	return e = Sn(e), J(e.getUTCFullYear() % 100, t, 2);
}
function On(e, t) {
	return J(e.getUTCFullYear() % 1e4, t, 4);
}
function kn(e, t) {
	var n = e.getUTCDay();
	return e = n >= 4 || n === 0 ? W(e) : W.ceil(e), J(e.getUTCFullYear() % 1e4, t, 4);
}
function An() {
	return "+0000";
}
function jn() {
	return "%";
}
function Mn(e) {
	return +e;
}
function Nn(e) {
	return Math.floor(e / 1e3);
}
//#endregion
//#region node_modules/d3-time-format/src/defaultLocale.js
var Pn, Fn;
In({
	dateTime: "%x, %X",
	date: "%-m/%-d/%Y",
	time: "%-I:%M:%S %p",
	periods: ["AM", "PM"],
	days: [
		"Sunday",
		"Monday",
		"Tuesday",
		"Wednesday",
		"Thursday",
		"Friday",
		"Saturday"
	],
	shortDays: [
		"Sun",
		"Mon",
		"Tue",
		"Wed",
		"Thu",
		"Fri",
		"Sat"
	],
	months: [
		"January",
		"February",
		"March",
		"April",
		"May",
		"June",
		"July",
		"August",
		"September",
		"October",
		"November",
		"December"
	],
	shortMonths: [
		"Jan",
		"Feb",
		"Mar",
		"Apr",
		"May",
		"Jun",
		"Jul",
		"Aug",
		"Sep",
		"Oct",
		"Nov",
		"Dec"
	]
});
function In(e) {
	return Pn = _t(e), Fn = Pn.format, Pn.parse, Pn.utcFormat, Pn.utcParse, Pn;
}
//#endregion
//#region node_modules/d3-scale/src/time.js
function Ln(e) {
	return new Date(e);
}
function Rn(e) {
	return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
}
function zn(e, t, n, r, i, a, o, s, c, l) {
	var u = E(), d = u.invert, f = u.domain, p = l(".%L"), m = l(":%S"), h = l("%I:%M"), g = l("%I %p"), _ = l("%a %d"), v = l("%b %d"), y = l("%B"), b = l("%Y");
	function x(e) {
		return (c(e) < e ? p : s(e) < e ? m : o(e) < e ? h : a(e) < e ? g : r(e) < e ? i(e) < e ? _ : v : n(e) < e ? y : b)(e);
	}
	return u.invert = function(e) {
		return new Date(d(e));
	}, u.domain = function(e) {
		return arguments.length ? f(Array.from(e, Rn)) : f().map(Ln);
	}, u.ticks = function(t) {
		var n = f();
		return e(n[0], n[n.length - 1], t ?? 10);
	}, u.tickFormat = function(e, t) {
		return t == null ? x : l(t);
	}, u.nice = function(e) {
		var n = f();
		return (!e || typeof e.range != "function") && (e = t(n[0], n[n.length - 1], e ?? 10)), e ? f(Le(n, e)) : u;
	}, u.copy = function() {
		return D(u, zn(e, t, n, r, i, a, o, s, c, l));
	}, u;
}
function Bn() {
	return k.apply(zn(ft, pt, G, st, Ye, B, Ge, Ue, z, Fn).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
//#endregion
//#region node_modules/dayjs/plugin/isoWeek.js
var Vn = /* @__PURE__ */ t(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_isoWeek = r();
	})(e, (function() {
		var e = "day";
		return function(t, n, r) {
			var i = function(t) {
				return t.add(4 - t.isoWeekday(), e);
			}, a = n.prototype;
			a.isoWeekYear = function() {
				return i(this).year();
			}, a.isoWeek = function(t) {
				if (!this.$utils().u(t)) return this.add(7 * (t - this.isoWeek()), e);
				var n, a, o, s, c = i(this), l = (n = this.isoWeekYear(), a = this.$u, o = (a ? r.utc : r)().year(n).startOf("year"), s = 4 - o.isoWeekday(), o.isoWeekday() > 4 && (s += 7), o.add(s, e));
				return c.diff(l, "week") + 1;
			}, a.isoWeekday = function(e) {
				return this.$utils().u(e) ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7);
			};
			var o = a.startOf;
			a.startOf = function(e, t) {
				var n = this.$utils(), r = !!n.u(t) || t;
				return n.p(e) === "isoweek" ? r ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : o.bind(this)(e, t);
			};
		};
	}));
})), Hn = /* @__PURE__ */ t(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_customParseFormat = r();
	})(e, (function() {
		var e = {
			LTS: "h:mm:ss A",
			LT: "h:mm A",
			L: "MM/DD/YYYY",
			LL: "MMMM D, YYYY",
			LLL: "MMMM D, YYYY h:mm A",
			LLLL: "dddd, MMMM D, YYYY h:mm A"
		}, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, o = {}, s = function(e) {
			return (e = +e) + (e > 68 ? 1900 : 2e3);
		}, c = function(e) {
			return function(t) {
				this[e] = +t;
			};
		}, l = [/[+-]\d\d:?(\d\d)?|Z/, function(e) {
			(this.zone ||= {}).offset = function(e) {
				if (!e || e === "Z") return 0;
				var t = e.match(/([+-]|\d\d)/g), n = 60 * t[1] + (+t[2] || 0);
				return n === 0 ? 0 : t[0] === "+" ? -n : n;
			}(e);
		}], u = function(e) {
			var t = o[e];
			return t && (t.indexOf ? t : t.s.concat(t.f));
		}, d = function(e, t) {
			var n, r = o.meridiem;
			if (r) {
				for (var i = 1; i <= 24; i += 1) if (e.indexOf(r(i, 0, t)) > -1) {
					n = i > 12;
					break;
				}
			} else n = e === (t ? "pm" : "PM");
			return n;
		}, f = {
			A: [a, function(e) {
				this.afternoon = d(e, !1);
			}],
			a: [a, function(e) {
				this.afternoon = d(e, !0);
			}],
			Q: [n, function(e) {
				this.month = 3 * (e - 1) + 1;
			}],
			S: [n, function(e) {
				this.milliseconds = 100 * e;
			}],
			SS: [r, function(e) {
				this.milliseconds = 10 * e;
			}],
			SSS: [/\d{3}/, function(e) {
				this.milliseconds = +e;
			}],
			s: [i, c("seconds")],
			ss: [i, c("seconds")],
			m: [i, c("minutes")],
			mm: [i, c("minutes")],
			H: [i, c("hours")],
			h: [i, c("hours")],
			HH: [i, c("hours")],
			hh: [i, c("hours")],
			D: [i, c("day")],
			DD: [r, c("day")],
			Do: [a, function(e) {
				var t = o.ordinal;
				if (this.day = e.match(/\d+/)[0], t) for (var n = 1; n <= 31; n += 1) t(n).replace(/\[|\]/g, "") === e && (this.day = n);
			}],
			w: [i, c("week")],
			ww: [r, c("week")],
			M: [i, c("month")],
			MM: [r, c("month")],
			MMM: [a, function(e) {
				var t = u("months"), n = (u("monthsShort") || t.map((function(e) {
					return e.slice(0, 3);
				}))).indexOf(e) + 1;
				if (n < 1) throw Error();
				this.month = n % 12 || n;
			}],
			MMMM: [a, function(e) {
				var t = u("months").indexOf(e) + 1;
				if (t < 1) throw Error();
				this.month = t % 12 || t;
			}],
			Y: [/[+-]?\d+/, c("year")],
			YY: [r, function(e) {
				this.year = s(e);
			}],
			YYYY: [/\d{4}/, c("year")],
			Z: l,
			ZZ: l
		};
		function p(n) {
			for (var r = n, i = o && o.formats, a = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, n, r) {
				var a = r && r.toUpperCase();
				return n || i[r] || e[r] || i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) {
					return t || n.slice(1);
				}));
			}))).match(t), s = a.length, c = 0; c < s; c += 1) {
				var l = a[c], u = f[l], d = u && u[0], p = u && u[1];
				a[c] = p ? {
					regex: d,
					parser: p
				} : l.replace(/^\[|\]$/g, "");
			}
			return function(e) {
				for (var t = {}, n = 0, r = 0; n < s; n += 1) {
					var i = a[n];
					if (typeof i == "string") r += i.length;
					else {
						var o = i.regex, c = i.parser, l = e.slice(r), u = o.exec(l)[0];
						c.call(t, u), e = e.replace(u, "");
					}
				}
				return function(e) {
					var t = e.afternoon;
					if (t !== void 0) {
						var n = e.hours;
						t ? n < 12 && (e.hours += 12) : n === 12 && (e.hours = 0), delete e.afternoon;
					}
				}(t), t;
			};
		}
		return function(e, t, n) {
			n.p.customParseFormat = !0, e && e.parseTwoDigitYear && (s = e.parseTwoDigitYear);
			var r = t.prototype, i = r.parse;
			r.parse = function(e) {
				var t = e.date, r = e.utc, a = e.args;
				this.$u = r;
				var s = a[1];
				if (typeof s == "string") {
					var c = !0 === a[2], l = !0 === a[3], u = c || l, d = a[2];
					l && (d = a[2]), o = this.$locale(), !c && d && (o = n.Ls[d]), this.$d = function(e, t, n, r) {
						try {
							if (["x", "X"].indexOf(t) > -1) return /* @__PURE__ */ new Date((t === "X" ? 1e3 : 1) * e);
							var i = p(t)(e), a = i.year, o = i.month, s = i.day, c = i.hours, l = i.minutes, u = i.seconds, d = i.milliseconds, f = i.zone, m = i.week, h = /* @__PURE__ */ new Date(), g = s || (a || o ? 1 : h.getDate()), _ = a || h.getFullYear(), v = 0;
							a && !o || (v = o > 0 ? o - 1 : h.getMonth());
							var y, b = c || 0, x = l || 0, S = u || 0, C = d || 0;
							return f ? new Date(Date.UTC(_, v, g, b, x, S, C + 60 * f.offset * 1e3)) : n ? new Date(Date.UTC(_, v, g, b, x, S, C)) : (y = new Date(_, v, g, b, x, S, C), m && (y = r(y).week(m).toDate()), y);
						} catch {
							return /* @__PURE__ */ new Date("");
						}
					}(t, s, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(s) && (this.$d = /* @__PURE__ */ new Date("")), o = {};
				} else if (s instanceof Array) for (var f = s.length, m = 1; m <= f; m += 1) {
					a[1] = s[m - 1];
					var h = n.apply(this, a);
					if (h.isValid()) {
						this.$d = h.$d, this.$L = h.$L, this.init();
						break;
					}
					m === f && (this.$d = /* @__PURE__ */ new Date(""));
				}
				else i.call(this, e);
			};
		};
	}));
})), Un = /* @__PURE__ */ t(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_advancedFormat = r();
	})(e, (function() {
		return function(e, t) {
			var n = t.prototype, r = n.format;
			n.format = function(e) {
				var t = this, n = this.$locale();
				if (!this.isValid()) return r.bind(this)(e);
				var i = this.$utils(), a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (function(e) {
					switch (e) {
						case "Q": return Math.ceil((t.$M + 1) / 3);
						case "Do": return n.ordinal(t.$D);
						case "gggg": return t.weekYear();
						case "GGGG": return t.isoWeekYear();
						case "wo": return n.ordinal(t.week(), "W");
						case "w":
						case "ww": return i.s(t.week(), e === "w" ? 1 : 2, "0");
						case "W":
						case "WW": return i.s(t.isoWeek(), e === "W" ? 1 : 2, "0");
						case "k":
						case "kk": return i.s(String(t.$H === 0 ? 24 : t.$H), e === "k" ? 1 : 2, "0");
						case "X": return Math.floor(t.$d.getTime() / 1e3);
						case "x": return t.$d.getTime();
						case "z": return "[" + t.offsetName() + "]";
						case "zzz": return "[" + t.offsetName("long") + "]";
						default: return e;
					}
				}));
				return r.bind(this)(a);
			};
		};
	}));
})), Wn = /* @__PURE__ */ t(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_duration = r();
	})(e, (function() {
		var e, t, n = 1e3, r = 6e4, i = 36e5, a = 864e5, o = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, s = 31536e6, c = 2628e6, l = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, u = {
			years: s,
			months: c,
			days: a,
			hours: i,
			minutes: r,
			seconds: n,
			milliseconds: 1,
			weeks: 6048e5
		}, d = function(e) {
			return e instanceof v;
		}, f = function(e, t, n) {
			return new v(e, n, t.$l);
		}, p = function(e) {
			return t.p(e) + "s";
		}, m = function(e) {
			return e < 0;
		}, h = function(e) {
			return m(e) ? Math.ceil(e) : Math.floor(e);
		}, g = function(e) {
			return Math.abs(e);
		}, _ = function(e, t) {
			return e ? m(e) ? {
				negative: !0,
				format: "" + g(e) + t
			} : {
				negative: !1,
				format: "" + e + t
			} : {
				negative: !1,
				format: ""
			};
		}, v = function() {
			function m(e, t, n) {
				var r = this;
				if (this.$d = {}, this.$l = n, e === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), t) return f(e * u[p(t)], this);
				if (typeof e == "number") return this.$ms = e, this.parseFromMilliseconds(), this;
				if (typeof e == "object") return Object.keys(e).forEach((function(t) {
					r.$d[p(t)] = e[t];
				})), this.calMilliseconds(), this;
				if (typeof e == "string") {
					var i = e.match(l);
					if (i) {
						var a = i.slice(2).map((function(e) {
							return e == null ? 0 : Number(e);
						}));
						return this.$d.years = a[0], this.$d.months = a[1], this.$d.weeks = a[2], this.$d.days = a[3], this.$d.hours = a[4], this.$d.minutes = a[5], this.$d.seconds = a[6], this.calMilliseconds(), this;
					}
				}
				return this;
			}
			var g = m.prototype;
			return g.calMilliseconds = function() {
				var e = this;
				this.$ms = Object.keys(this.$d).reduce((function(t, n) {
					return t + (e.$d[n] || 0) * u[n];
				}), 0);
			}, g.parseFromMilliseconds = function() {
				var e = this.$ms;
				this.$d.years = h(e / s), e %= s, this.$d.months = h(e / c), e %= c, this.$d.days = h(e / a), e %= a, this.$d.hours = h(e / i), e %= i, this.$d.minutes = h(e / r), e %= r, this.$d.seconds = h(e / n), e %= n, this.$d.milliseconds = e;
			}, g.toISOString = function() {
				var e = _(this.$d.years, "Y"), t = _(this.$d.months, "M"), n = +this.$d.days || 0;
				this.$d.weeks && (n += 7 * this.$d.weeks);
				var r = _(n, "D"), i = _(this.$d.hours, "H"), a = _(this.$d.minutes, "M"), o = this.$d.seconds || 0;
				this.$d.milliseconds && (o += this.$d.milliseconds / 1e3, o = Math.round(1e3 * o) / 1e3);
				var s = _(o, "S"), c = e.negative || t.negative || r.negative || i.negative || a.negative || s.negative, l = i.format || a.format || s.format ? "T" : "", u = (c ? "-" : "") + "P" + e.format + t.format + r.format + l + i.format + a.format + s.format;
				return u === "P" || u === "-P" ? "P0D" : u;
			}, g.toJSON = function() {
				return this.toISOString();
			}, g.format = function(e) {
				var n = e || "YYYY-MM-DDTHH:mm:ss", r = {
					Y: this.$d.years,
					YY: t.s(this.$d.years, 2, "0"),
					YYYY: t.s(this.$d.years, 4, "0"),
					M: this.$d.months,
					MM: t.s(this.$d.months, 2, "0"),
					D: this.$d.days,
					DD: t.s(this.$d.days, 2, "0"),
					H: this.$d.hours,
					HH: t.s(this.$d.hours, 2, "0"),
					m: this.$d.minutes,
					mm: t.s(this.$d.minutes, 2, "0"),
					s: this.$d.seconds,
					ss: t.s(this.$d.seconds, 2, "0"),
					SSS: t.s(this.$d.milliseconds, 3, "0")
				};
				return n.replace(o, (function(e, t) {
					return t || String(r[e]);
				}));
			}, g.as = function(e) {
				return this.$ms / u[p(e)];
			}, g.get = function(e) {
				var t = this.$ms, n = p(e);
				return n === "milliseconds" ? t %= 1e3 : t = n === "weeks" ? h(t / u[n]) : this.$d[n], t || 0;
			}, g.add = function(e, t, n) {
				var r;
				return r = t ? e * u[p(t)] : d(e) ? e.$ms : f(e, this).$ms, f(this.$ms + r * (n ? -1 : 1), this);
			}, g.subtract = function(e, t) {
				return this.add(e, t, !0);
			}, g.locale = function(e) {
				var t = this.clone();
				return t.$l = e, t;
			}, g.clone = function() {
				return f(this.$ms, this);
			}, g.humanize = function(t) {
				return e().add(this.$ms, "ms").locale(this.$l).fromNow(!t);
			}, g.valueOf = function() {
				return this.asMilliseconds();
			}, g.milliseconds = function() {
				return this.get("milliseconds");
			}, g.asMilliseconds = function() {
				return this.as("milliseconds");
			}, g.seconds = function() {
				return this.get("seconds");
			}, g.asSeconds = function() {
				return this.as("seconds");
			}, g.minutes = function() {
				return this.get("minutes");
			}, g.asMinutes = function() {
				return this.as("minutes");
			}, g.hours = function() {
				return this.get("hours");
			}, g.asHours = function() {
				return this.as("hours");
			}, g.days = function() {
				return this.get("days");
			}, g.asDays = function() {
				return this.as("days");
			}, g.weeks = function() {
				return this.get("weeks");
			}, g.asWeeks = function() {
				return this.as("weeks");
			}, g.months = function() {
				return this.get("months");
			}, g.asMonths = function() {
				return this.as("months");
			}, g.years = function() {
				return this.get("years");
			}, g.asYears = function() {
				return this.as("years");
			}, m;
		}(), y = function(e, t, n) {
			return e.add(t.years() * n, "y").add(t.months() * n, "M").add(t.days() * n, "d").add(t.hours() * n, "h").add(t.minutes() * n, "m").add(t.seconds() * n, "s").add(t.milliseconds() * n, "ms");
		};
		return function(n, r, i) {
			e = i, t = i().$utils(), i.duration = function(e, t) {
				return f(e, { $l: i.locale() }, t);
			}, i.isDuration = d;
			var a = r.prototype.add, o = r.prototype.subtract;
			r.prototype.add = function(e, t) {
				return d(e) ? y(this, e, 1) : a.bind(this)(e, t);
			}, r.prototype.subtract = function(e, t) {
				return d(e) ? y(this, e, -1) : o.bind(this)(e, t);
			};
		};
	}));
})), Gn = ee(), Y = /* @__PURE__ */ e(p(), 1), Kn = /* @__PURE__ */ e(Vn(), 1), qn = /* @__PURE__ */ e(Hn(), 1), Jn = /* @__PURE__ */ e(Un(), 1), Yn = /* @__PURE__ */ e(Wn(), 1), Xn = (function() {
	var e = /* @__PURE__ */ c(function(e, t, n, r) {
		for (n ||= {}, r = e.length; r--; n[e[r]] = t);
		return n;
	}, "o"), t = [
		6,
		8,
		10,
		12,
		13,
		14,
		15,
		16,
		17,
		18,
		20,
		21,
		22,
		23,
		24,
		25,
		26,
		27,
		28,
		29,
		30,
		31,
		33,
		35,
		36,
		38,
		40
	], n = [1, 26], r = [1, 27], i = [1, 28], a = [1, 29], o = [1, 30], s = [1, 31], l = [1, 32], u = [1, 33], d = [1, 34], f = [1, 9], p = [1, 10], m = [1, 11], h = [1, 12], g = [1, 13], _ = [1, 14], v = [1, 15], y = [1, 16], b = [1, 19], x = [1, 20], S = [1, 21], C = [1, 22], w = [1, 23], T = [1, 25], E = [1, 35], D = {
		trace: /* @__PURE__ */ c(function() {}, "trace"),
		yy: {},
		symbols_: {
			error: 2,
			start: 3,
			gantt: 4,
			document: 5,
			EOF: 6,
			line: 7,
			SPACE: 8,
			statement: 9,
			NL: 10,
			weekday: 11,
			weekday_monday: 12,
			weekday_tuesday: 13,
			weekday_wednesday: 14,
			weekday_thursday: 15,
			weekday_friday: 16,
			weekday_saturday: 17,
			weekday_sunday: 18,
			weekend: 19,
			weekend_friday: 20,
			weekend_saturday: 21,
			dateFormat: 22,
			inclusiveEndDates: 23,
			topAxis: 24,
			axisFormat: 25,
			tickInterval: 26,
			excludes: 27,
			includes: 28,
			todayMarker: 29,
			title: 30,
			acc_title: 31,
			acc_title_value: 32,
			acc_descr: 33,
			acc_descr_value: 34,
			acc_descr_multiline_value: 35,
			section: 36,
			clickStatement: 37,
			taskTxt: 38,
			taskData: 39,
			click: 40,
			callbackname: 41,
			callbackargs: 42,
			href: 43,
			clickStatementDebug: 44,
			$accept: 0,
			$end: 1
		},
		terminals_: {
			2: "error",
			4: "gantt",
			6: "EOF",
			8: "SPACE",
			10: "NL",
			12: "weekday_monday",
			13: "weekday_tuesday",
			14: "weekday_wednesday",
			15: "weekday_thursday",
			16: "weekday_friday",
			17: "weekday_saturday",
			18: "weekday_sunday",
			20: "weekend_friday",
			21: "weekend_saturday",
			22: "dateFormat",
			23: "inclusiveEndDates",
			24: "topAxis",
			25: "axisFormat",
			26: "tickInterval",
			27: "excludes",
			28: "includes",
			29: "todayMarker",
			30: "title",
			31: "acc_title",
			32: "acc_title_value",
			33: "acc_descr",
			34: "acc_descr_value",
			35: "acc_descr_multiline_value",
			36: "section",
			38: "taskTxt",
			39: "taskData",
			40: "click",
			41: "callbackname",
			42: "callbackargs",
			43: "href"
		},
		productions_: [
			0,
			[3, 3],
			[5, 0],
			[5, 2],
			[7, 2],
			[7, 1],
			[7, 1],
			[7, 1],
			[11, 1],
			[11, 1],
			[11, 1],
			[11, 1],
			[11, 1],
			[11, 1],
			[11, 1],
			[19, 1],
			[19, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 2],
			[9, 2],
			[9, 1],
			[9, 1],
			[9, 1],
			[9, 2],
			[37, 2],
			[37, 3],
			[37, 3],
			[37, 4],
			[37, 3],
			[37, 4],
			[37, 2],
			[44, 2],
			[44, 3],
			[44, 3],
			[44, 4],
			[44, 3],
			[44, 4],
			[44, 2]
		],
		performAction: /* @__PURE__ */ c(function(e, t, n, r, i, a, o) {
			var s = a.length - 1;
			switch (i) {
				case 1: return a[s - 1];
				case 2:
					this.$ = [];
					break;
				case 3:
					a[s - 1].push(a[s]), this.$ = a[s - 1];
					break;
				case 4:
				case 5:
					this.$ = a[s];
					break;
				case 6:
				case 7:
					this.$ = [];
					break;
				case 8:
					r.setWeekday("monday");
					break;
				case 9:
					r.setWeekday("tuesday");
					break;
				case 10:
					r.setWeekday("wednesday");
					break;
				case 11:
					r.setWeekday("thursday");
					break;
				case 12:
					r.setWeekday("friday");
					break;
				case 13:
					r.setWeekday("saturday");
					break;
				case 14:
					r.setWeekday("sunday");
					break;
				case 15:
					r.setWeekend("friday");
					break;
				case 16:
					r.setWeekend("saturday");
					break;
				case 17:
					r.setDateFormat(a[s].substr(11)), this.$ = a[s].substr(11);
					break;
				case 18:
					r.enableInclusiveEndDates(), this.$ = a[s].substr(18);
					break;
				case 19:
					r.TopAxis(), this.$ = a[s].substr(8);
					break;
				case 20:
					r.setAxisFormat(a[s].substr(11)), this.$ = a[s].substr(11);
					break;
				case 21:
					r.setTickInterval(a[s].substr(13)), this.$ = a[s].substr(13);
					break;
				case 22:
					r.setExcludes(a[s].substr(9)), this.$ = a[s].substr(9);
					break;
				case 23:
					r.setIncludes(a[s].substr(9)), this.$ = a[s].substr(9);
					break;
				case 24:
					r.setTodayMarker(a[s].substr(12)), this.$ = a[s].substr(12);
					break;
				case 27:
					r.setDiagramTitle(a[s].substr(6)), this.$ = a[s].substr(6);
					break;
				case 28:
					this.$ = a[s].trim(), r.setAccTitle(this.$);
					break;
				case 29:
				case 30:
					this.$ = a[s].trim(), r.setAccDescription(this.$);
					break;
				case 31:
					r.addSection(a[s].substr(8)), this.$ = a[s].substr(8);
					break;
				case 33:
					r.addTask(a[s - 1], a[s]), this.$ = "task";
					break;
				case 34:
					this.$ = a[s - 1], r.setClickEvent(a[s - 1], a[s], null);
					break;
				case 35:
					this.$ = a[s - 2], r.setClickEvent(a[s - 2], a[s - 1], a[s]);
					break;
				case 36:
					this.$ = a[s - 2], r.setClickEvent(a[s - 2], a[s - 1], null), r.setLink(a[s - 2], a[s]);
					break;
				case 37:
					this.$ = a[s - 3], r.setClickEvent(a[s - 3], a[s - 2], a[s - 1]), r.setLink(a[s - 3], a[s]);
					break;
				case 38:
					this.$ = a[s - 2], r.setClickEvent(a[s - 2], a[s], null), r.setLink(a[s - 2], a[s - 1]);
					break;
				case 39:
					this.$ = a[s - 3], r.setClickEvent(a[s - 3], a[s - 1], a[s]), r.setLink(a[s - 3], a[s - 2]);
					break;
				case 40:
					this.$ = a[s - 1], r.setLink(a[s - 1], a[s]);
					break;
				case 41:
				case 47:
					this.$ = a[s - 1] + " " + a[s];
					break;
				case 42:
				case 43:
				case 45:
					this.$ = a[s - 2] + " " + a[s - 1] + " " + a[s];
					break;
				case 44:
				case 46:
					this.$ = a[s - 3] + " " + a[s - 2] + " " + a[s - 1] + " " + a[s];
					break;
			}
		}, "anonymous"),
		table: [
			{
				3: 1,
				4: [1, 2]
			},
			{ 1: [3] },
			e(t, [2, 2], { 5: 3 }),
			{
				6: [1, 4],
				7: 5,
				8: [1, 6],
				9: 7,
				10: [1, 8],
				11: 17,
				12: n,
				13: r,
				14: i,
				15: a,
				16: o,
				17: s,
				18: l,
				19: 18,
				20: u,
				21: d,
				22: f,
				23: p,
				24: m,
				25: h,
				26: g,
				27: _,
				28: v,
				29: y,
				30: b,
				31: x,
				33: S,
				35: C,
				36: w,
				37: 24,
				38: T,
				40: E
			},
			e(t, [2, 7], { 1: [2, 1] }),
			e(t, [2, 3]),
			{
				9: 36,
				11: 17,
				12: n,
				13: r,
				14: i,
				15: a,
				16: o,
				17: s,
				18: l,
				19: 18,
				20: u,
				21: d,
				22: f,
				23: p,
				24: m,
				25: h,
				26: g,
				27: _,
				28: v,
				29: y,
				30: b,
				31: x,
				33: S,
				35: C,
				36: w,
				37: 24,
				38: T,
				40: E
			},
			e(t, [2, 5]),
			e(t, [2, 6]),
			e(t, [2, 17]),
			e(t, [2, 18]),
			e(t, [2, 19]),
			e(t, [2, 20]),
			e(t, [2, 21]),
			e(t, [2, 22]),
			e(t, [2, 23]),
			e(t, [2, 24]),
			e(t, [2, 25]),
			e(t, [2, 26]),
			e(t, [2, 27]),
			{ 32: [1, 37] },
			{ 34: [1, 38] },
			e(t, [2, 30]),
			e(t, [2, 31]),
			e(t, [2, 32]),
			{ 39: [1, 39] },
			e(t, [2, 8]),
			e(t, [2, 9]),
			e(t, [2, 10]),
			e(t, [2, 11]),
			e(t, [2, 12]),
			e(t, [2, 13]),
			e(t, [2, 14]),
			e(t, [2, 15]),
			e(t, [2, 16]),
			{
				41: [1, 40],
				43: [1, 41]
			},
			e(t, [2, 4]),
			e(t, [2, 28]),
			e(t, [2, 29]),
			e(t, [2, 33]),
			e(t, [2, 34], {
				42: [1, 42],
				43: [1, 43]
			}),
			e(t, [2, 40], { 41: [1, 44] }),
			e(t, [2, 35], { 43: [1, 45] }),
			e(t, [2, 36]),
			e(t, [2, 38], { 42: [1, 46] }),
			e(t, [2, 37]),
			e(t, [2, 39])
		],
		defaultActions: {},
		parseError: /* @__PURE__ */ c(function(e, t) {
			if (t.recoverable) this.trace(e);
			else {
				var n = Error(e);
				throw n.hash = t, n;
			}
		}, "parseError"),
		parse: /* @__PURE__ */ c(function(e) {
			var t = this, n = [0], r = [], i = [null], a = [], o = this.table, s = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = a.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
			for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
			h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
			var v = h.yylloc;
			a.push(v);
			var y = h.options && h.options.ranges;
			typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
			function b(e) {
				n.length -= 2 * e, i.length -= e, a.length -= e;
			}
			c(b, "popStack");
			function x() {
				var e = r.pop() || h.lex() || p;
				return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
			}
			c(x, "lex");
			for (var S, C, w, T, E, D = {}, O, k, ee, A;;) {
				if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = o[w] && o[w][S]), T === void 0 || !T.length || !T[0]) {
					var te = "";
					for (O in A = [], o[w]) this.terminals_[O] && O > f && A.push("'" + this.terminals_[O] + "'");
					te = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + A.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(te, {
						text: h.match,
						token: this.terminals_[S] || S,
						line: h.yylineno,
						loc: v,
						expected: A
					});
				}
				if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
				switch (T[0]) {
					case 1:
						n.push(S), i.push(h.yytext), a.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, s = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
						break;
					case 2:
						if (k = this.productions_[T[1]][1], D.$ = i[i.length - k], D._$ = {
							first_line: a[a.length - (k || 1)].first_line,
							last_line: a[a.length - 1].last_line,
							first_column: a[a.length - (k || 1)].first_column,
							last_column: a[a.length - 1].last_column
						}, y && (D._$.range = [a[a.length - (k || 1)].range[0], a[a.length - 1].range[1]]), E = this.performAction.apply(D, [
							s,
							u,
							l,
							g.yy,
							T[1],
							i,
							a
						].concat(m)), E !== void 0) return E;
						k && (n = n.slice(0, -1 * k * 2), i = i.slice(0, -1 * k), a = a.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), i.push(D.$), a.push(D._$), ee = o[n[n.length - 2]][n[n.length - 1]], n.push(ee);
						break;
					case 3: return !0;
				}
			}
			return !0;
		}, "parse")
	};
	D.lexer = /* @__PURE__ */ (function() {
		return {
			EOF: 1,
			parseError: /* @__PURE__ */ c(function(e, t) {
				if (this.yy.parser) this.yy.parser.parseError(e, t);
				else throw Error(e);
			}, "parseError"),
			setInput: /* @__PURE__ */ c(function(e, t) {
				return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
					first_line: 1,
					first_column: 0,
					last_line: 1,
					last_column: 0
				}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
			}, "setInput"),
			input: /* @__PURE__ */ c(function() {
				var e = this._input[0];
				return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
			}, "input"),
			unput: /* @__PURE__ */ c(function(e) {
				var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
				this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
				var r = this.match.split(/(?:\r\n?|\n)/g);
				this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
				var i = this.yylloc.range;
				return this.yylloc = {
					first_line: this.yylloc.first_line,
					last_line: this.yylineno + 1,
					first_column: this.yylloc.first_column,
					last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
				}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
			}, "unput"),
			more: /* @__PURE__ */ c(function() {
				return this._more = !0, this;
			}, "more"),
			reject: /* @__PURE__ */ c(function() {
				if (this.options.backtrack_lexer) this._backtrack = !0;
				else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
					text: "",
					token: null,
					line: this.yylineno
				});
				return this;
			}, "reject"),
			less: /* @__PURE__ */ c(function(e) {
				this.unput(this.match.slice(e));
			}, "less"),
			pastInput: /* @__PURE__ */ c(function() {
				var e = this.matched.substr(0, this.matched.length - this.match.length);
				return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
			}, "pastInput"),
			upcomingInput: /* @__PURE__ */ c(function() {
				var e = this.match;
				return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
			}, "upcomingInput"),
			showPosition: /* @__PURE__ */ c(function() {
				var e = this.pastInput(), t = Array(e.length + 1).join("-");
				return e + this.upcomingInput() + "\n" + t + "^";
			}, "showPosition"),
			test_match: /* @__PURE__ */ c(function(e, t) {
				var n, r, i;
				if (this.options.backtrack_lexer && (i = {
					yylineno: this.yylineno,
					yylloc: {
						first_line: this.yylloc.first_line,
						last_line: this.last_line,
						first_column: this.yylloc.first_column,
						last_column: this.yylloc.last_column
					},
					yytext: this.yytext,
					match: this.match,
					matches: this.matches,
					matched: this.matched,
					yyleng: this.yyleng,
					offset: this.offset,
					_more: this._more,
					_input: this._input,
					yy: this.yy,
					conditionStack: this.conditionStack.slice(0),
					done: this.done
				}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
					first_line: this.yylloc.last_line,
					last_line: this.yylineno + 1,
					first_column: this.yylloc.last_column,
					last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
				}, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
				if (this._backtrack) {
					for (var a in i) this[a] = i[a];
					return !1;
				}
				return !1;
			}, "test_match"),
			next: /* @__PURE__ */ c(function() {
				if (this.done) return this.EOF;
				this._input || (this.done = !0);
				var e, t, n, r;
				this._more || (this.yytext = "", this.match = "");
				for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
					if (t = n, r = a, this.options.backtrack_lexer) {
						if (e = this.test_match(n, i[a]), e !== !1) return e;
						if (this._backtrack) {
							t = !1;
							continue;
						} else return !1;
					} else if (!this.options.flex) break;
				}
				return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
					text: "",
					token: null,
					line: this.yylineno
				});
			}, "next"),
			lex: /* @__PURE__ */ c(function() {
				return this.next() || this.lex();
			}, "lex"),
			begin: /* @__PURE__ */ c(function(e) {
				this.conditionStack.push(e);
			}, "begin"),
			popState: /* @__PURE__ */ c(function() {
				return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
			}, "popState"),
			_currentRules: /* @__PURE__ */ c(function() {
				return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
			}, "_currentRules"),
			topState: /* @__PURE__ */ c(function(e) {
				return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
			}, "topState"),
			pushState: /* @__PURE__ */ c(function(e) {
				this.begin(e);
			}, "pushState"),
			stateStackSize: /* @__PURE__ */ c(function() {
				return this.conditionStack.length;
			}, "stateStackSize"),
			options: { "case-insensitive": !0 },
			performAction: /* @__PURE__ */ c(function(e, t, n, r) {
				switch (n) {
					case 0: return this.begin("open_directive"), "open_directive";
					case 1: return this.begin("acc_title"), 31;
					case 2: return this.popState(), "acc_title_value";
					case 3: return this.begin("acc_descr"), 33;
					case 4: return this.popState(), "acc_descr_value";
					case 5:
						this.begin("acc_descr_multiline");
						break;
					case 6:
						this.popState();
						break;
					case 7: return "acc_descr_multiline_value";
					case 8: break;
					case 9: break;
					case 10: break;
					case 11: return 10;
					case 12: break;
					case 13: break;
					case 14:
						this.begin("href");
						break;
					case 15:
						this.popState();
						break;
					case 16: return 43;
					case 17:
						this.begin("callbackname");
						break;
					case 18:
						this.popState();
						break;
					case 19:
						this.popState(), this.begin("callbackargs");
						break;
					case 20: return 41;
					case 21:
						this.popState();
						break;
					case 22: return 42;
					case 23:
						this.begin("click");
						break;
					case 24:
						this.popState();
						break;
					case 25: return 40;
					case 26: return 4;
					case 27: return 22;
					case 28: return 23;
					case 29: return 24;
					case 30: return 25;
					case 31: return 26;
					case 32: return 28;
					case 33: return 27;
					case 34: return 29;
					case 35: return 12;
					case 36: return 13;
					case 37: return 14;
					case 38: return 15;
					case 39: return 16;
					case 40: return 17;
					case 41: return 18;
					case 42: return 20;
					case 43: return 21;
					case 44: return "date";
					case 45: return 30;
					case 46: return "accDescription";
					case 47: return 36;
					case 48: return 38;
					case 49: return 39;
					case 50: return ":";
					case 51: return 6;
					case 52: return "INVALID";
				}
			}, "anonymous"),
			rules: [
				/^(?:%%\{)/i,
				/^(?:accTitle\s*:\s*)/i,
				/^(?:(?!\n||)*[^\n]*)/i,
				/^(?:accDescr\s*:\s*)/i,
				/^(?:(?!\n||)*[^\n]*)/i,
				/^(?:accDescr\s*\{\s*)/i,
				/^(?:[\}])/i,
				/^(?:[^\}]*)/i,
				/^(?:%%(?!\{)*[^\n]*)/i,
				/^(?:[^\}]%%*[^\n]*)/i,
				/^(?:%%*[^\n]*[\n]*)/i,
				/^(?:[\n]+)/i,
				/^(?:\s+)/i,
				/^(?:%[^\n]*)/i,
				/^(?:href[\s]+["])/i,
				/^(?:["])/i,
				/^(?:[^"]*)/i,
				/^(?:call[\s]+)/i,
				/^(?:\([\s]*\))/i,
				/^(?:\()/i,
				/^(?:[^(]*)/i,
				/^(?:\))/i,
				/^(?:[^)]*)/i,
				/^(?:click[\s]+)/i,
				/^(?:[\s\n])/i,
				/^(?:[^\s\n]*)/i,
				/^(?:gantt\b)/i,
				/^(?:dateFormat\s[^#\n;]+)/i,
				/^(?:inclusiveEndDates\b)/i,
				/^(?:topAxis\b)/i,
				/^(?:axisFormat\s[^#\n;]+)/i,
				/^(?:tickInterval\s[^#\n;]+)/i,
				/^(?:includes\s[^#\n;]+)/i,
				/^(?:excludes\s[^#\n;]+)/i,
				/^(?:todayMarker\s[^\n;]+)/i,
				/^(?:weekday\s+monday\b)/i,
				/^(?:weekday\s+tuesday\b)/i,
				/^(?:weekday\s+wednesday\b)/i,
				/^(?:weekday\s+thursday\b)/i,
				/^(?:weekday\s+friday\b)/i,
				/^(?:weekday\s+saturday\b)/i,
				/^(?:weekday\s+sunday\b)/i,
				/^(?:weekend\s+friday\b)/i,
				/^(?:weekend\s+saturday\b)/i,
				/^(?:\d\d\d\d-\d\d-\d\d\b)/i,
				/^(?:title\s[^\n]+)/i,
				/^(?:accDescription\s[^#\n;]+)/i,
				/^(?:section\s[^\n]+)/i,
				/^(?:[^:\n]+)/i,
				/^(?::[^#\n;]+)/i,
				/^(?::)/i,
				/^(?:$)/i,
				/^(?:.)/i
			],
			conditions: {
				acc_descr_multiline: {
					rules: [6, 7],
					inclusive: !1
				},
				acc_descr: {
					rules: [4],
					inclusive: !1
				},
				acc_title: {
					rules: [2],
					inclusive: !1
				},
				callbackargs: {
					rules: [21, 22],
					inclusive: !1
				},
				callbackname: {
					rules: [
						18,
						19,
						20
					],
					inclusive: !1
				},
				href: {
					rules: [15, 16],
					inclusive: !1
				},
				click: {
					rules: [24, 25],
					inclusive: !1
				},
				INITIAL: {
					rules: [
						0,
						1,
						3,
						5,
						8,
						9,
						10,
						11,
						12,
						13,
						14,
						17,
						23,
						26,
						27,
						28,
						29,
						30,
						31,
						32,
						33,
						34,
						35,
						36,
						37,
						38,
						39,
						40,
						41,
						42,
						43,
						44,
						45,
						46,
						47,
						48,
						49,
						50,
						51,
						52
					],
					inclusive: !0
				}
			}
		};
	})();
	function O() {
		this.yy = {};
	}
	return c(O, "Parser"), O.prototype = D, D.Parser = O, new O();
})();
Xn.parser = Xn;
var Zn = Xn;
Y.default.extend(Kn.default), Y.default.extend(qn.default), Y.default.extend(Jn.default);
var Qn = {
	friday: 5,
	saturday: 6
}, X = "", $n = "", er = void 0, tr = "", nr = [], rr = [], ir = /* @__PURE__ */ new Map(), ar = [], or = [], sr = "", cr = "", lr = [
	"active",
	"done",
	"crit",
	"milestone",
	"vert"
], ur = [], dr = !1, fr = !1, pr = "sunday", mr = "saturday", hr = 0, gr = /* @__PURE__ */ c(function() {
	ar = [], or = [], sr = "", ur = [], Jr = 0, Qr = void 0, $r = void 0, Z = [], X = "", $n = "", cr = "", er = void 0, tr = "", nr = [], rr = [], dr = !1, fr = !1, hr = 0, ir = /* @__PURE__ */ new Map(), y(), pr = "sunday", mr = "saturday";
}, "clear"), _r = /* @__PURE__ */ c(function(e) {
	$n = e;
}, "setAxisFormat"), vr = /* @__PURE__ */ c(function() {
	return $n;
}, "getAxisFormat"), yr = /* @__PURE__ */ c(function(e) {
	er = e;
}, "setTickInterval"), br = /* @__PURE__ */ c(function() {
	return er;
}, "getTickInterval"), xr = /* @__PURE__ */ c(function(e) {
	tr = e;
}, "setTodayMarker"), Sr = /* @__PURE__ */ c(function() {
	return tr;
}, "getTodayMarker"), Cr = /* @__PURE__ */ c(function(e) {
	X = e;
}, "setDateFormat"), wr = /* @__PURE__ */ c(function() {
	dr = !0;
}, "enableInclusiveEndDates"), Tr = /* @__PURE__ */ c(function() {
	return dr;
}, "endDatesAreInclusive"), Er = /* @__PURE__ */ c(function() {
	fr = !0;
}, "enableTopAxis"), Dr = /* @__PURE__ */ c(function() {
	return fr;
}, "topAxisEnabled"), Or = /* @__PURE__ */ c(function(e) {
	cr = e;
}, "setDisplayMode"), kr = /* @__PURE__ */ c(function() {
	return cr;
}, "getDisplayMode"), Ar = /* @__PURE__ */ c(function() {
	return X;
}, "getDateFormat"), jr = /* @__PURE__ */ c(function(e) {
	nr = e.toLowerCase().split(/[\s,]+/);
}, "setIncludes"), Mr = /* @__PURE__ */ c(function() {
	return nr;
}, "getIncludes"), Nr = /* @__PURE__ */ c(function(e) {
	rr = e.toLowerCase().split(/[\s,]+/);
}, "setExcludes"), Pr = /* @__PURE__ */ c(function() {
	return rr;
}, "getExcludes"), Fr = /* @__PURE__ */ c(function() {
	return ir;
}, "getLinks"), Ir = /* @__PURE__ */ c(function(e) {
	sr = e, ar.push(e);
}, "addSection"), Lr = /* @__PURE__ */ c(function() {
	return ar;
}, "getSections"), Rr = /* @__PURE__ */ c(function() {
	let e = ri(), t = 0;
	for (; !e && t < 10;) e = ri(), t++;
	return or = Z, or;
}, "getTasks"), zr = /* @__PURE__ */ c(function(e, t, n, r) {
	let i = e.format(t.trim()), a = e.format("YYYY-MM-DD");
	return r.includes(i) || r.includes(a) ? !1 : n.includes("weekends") && (e.isoWeekday() === Qn[mr] || e.isoWeekday() === Qn[mr] + 1) || n.includes(e.format("dddd").toLowerCase()) ? !0 : n.includes(i) || n.includes(a);
}, "isInvalidDate"), Br = /* @__PURE__ */ c(function(e) {
	pr = e;
}, "setWeekday"), Vr = /* @__PURE__ */ c(function() {
	return pr;
}, "getWeekday"), Hr = /* @__PURE__ */ c(function(e) {
	mr = e;
}, "setWeekend"), Ur = /* @__PURE__ */ c(function(e, t, n, r) {
	if (!n.length || e.manualEndTime) return;
	let i;
	i = e.startTime instanceof Date ? (0, Y.default)(e.startTime) : (0, Y.default)(e.startTime, t, !0), i = i.add(1, "d");
	let a;
	a = e.endTime instanceof Date ? (0, Y.default)(e.endTime) : (0, Y.default)(e.endTime, t, !0);
	let [o, s] = Wr(i, a, t, n, r);
	e.endTime = o.toDate(), e.renderEndTime = s;
}, "checkTaskDates"), Wr = /* @__PURE__ */ c(function(e, t, n, r, i) {
	let a = !1, o = null;
	for (; e <= t;) a || (o = t.toDate()), a = zr(e, n, r, i), a && (t = t.add(1, "d")), e = e.add(1, "d");
	return [t, o];
}, "fixTaskDates"), Gr = /* @__PURE__ */ c(function(e, t, n) {
	if (n = n.trim(), (/* @__PURE__ */ c((e) => {
		let t = e.trim();
		return t === "x" || t === "X";
	}, "isTimestampFormat"))(t) && /^\d+$/.test(n)) return new Date(Number(n));
	let r = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
	if (r !== null) {
		let e = null;
		for (let t of r.groups.ids.split(" ")) {
			let n = Q(t);
			n !== void 0 && (!e || n.endTime > e.endTime) && (e = n);
		}
		if (e) return e.endTime;
		let t = /* @__PURE__ */ new Date();
		return t.setHours(0, 0, 0, 0), t;
	}
	let i = (0, Y.default)(n, t.trim(), !0);
	if (i.isValid()) return i.toDate();
	{
		s.debug("Invalid date:" + n), s.debug("With date format:" + t.trim());
		let e = new Date(n);
		if (e === void 0 || isNaN(e.getTime()) || e.getFullYear() < -1e4 || e.getFullYear() > 1e4) throw Error("Invalid date:" + n);
		return e;
	}
}, "getStartDate"), Kr = /* @__PURE__ */ c(function(e) {
	let t = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());
	return t === null ? [NaN, "ms"] : [Number.parseFloat(t[1]), t[2]];
}, "parseDuration"), qr = /* @__PURE__ */ c(function(e, t, n, r = !1) {
	n = n.trim();
	let i = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
	if (i !== null) {
		let e = null;
		for (let t of i.groups.ids.split(" ")) {
			let n = Q(t);
			n !== void 0 && (!e || n.startTime < e.startTime) && (e = n);
		}
		if (e) return e.startTime;
		let t = /* @__PURE__ */ new Date();
		return t.setHours(0, 0, 0, 0), t;
	}
	let a = (0, Y.default)(n, t.trim(), !0);
	if (a.isValid()) return r && (a = a.add(1, "d")), a.toDate();
	let o = (0, Y.default)(e), [s, c] = Kr(n);
	if (!Number.isNaN(s)) {
		let e = o.add(s, c);
		e.isValid() && (o = e);
	}
	return o.toDate();
}, "getEndDate"), Jr = 0, Yr = /* @__PURE__ */ c(function(e) {
	return e === void 0 ? (Jr += 1, "task" + Jr) : e;
}, "parseId"), Xr = /* @__PURE__ */ c(function(e, t) {
	let n;
	n = t.substr(0, 1) === ":" ? t.substr(1, t.length) : t;
	let r = n.split(","), i = {};
	li(r, i, lr);
	for (let e = 0; e < r.length; e++) r[e] = r[e].trim();
	let a = "";
	switch (r.length) {
		case 1:
			i.id = Yr(), i.startTime = e.endTime, a = r[0];
			break;
		case 2:
			i.id = Yr(), i.startTime = Gr(void 0, X, r[0]), a = r[1];
			break;
		case 3:
			i.id = Yr(r[0]), i.startTime = Gr(void 0, X, r[1]), a = r[2];
			break;
		default:
	}
	return a && (i.endTime = qr(i.startTime, X, a, dr), i.manualEndTime = (0, Y.default)(a, "YYYY-MM-DD", !0).isValid(), Ur(i, X, rr, nr)), i;
}, "compileData"), Zr = /* @__PURE__ */ c(function(e, t) {
	let n;
	n = t.substr(0, 1) === ":" ? t.substr(1, t.length) : t;
	let r = n.split(","), i = {};
	li(r, i, lr);
	for (let e = 0; e < r.length; e++) r[e] = r[e].trim();
	switch (r.length) {
		case 1:
			i.id = Yr(), i.startTime = {
				type: "prevTaskEnd",
				id: e
			}, i.endTime = { data: r[0] };
			break;
		case 2:
			i.id = Yr(), i.startTime = {
				type: "getStartDate",
				startData: r[0]
			}, i.endTime = { data: r[1] };
			break;
		case 3:
			i.id = Yr(r[0]), i.startTime = {
				type: "getStartDate",
				startData: r[1]
			}, i.endTime = { data: r[2] };
			break;
		default:
	}
	return i;
}, "parseData"), Qr, $r, Z = [], ei = {}, ti = /* @__PURE__ */ c(function(e, t) {
	let n = {
		section: sr,
		type: sr,
		processed: !1,
		manualEndTime: !1,
		renderEndTime: null,
		raw: { data: t },
		task: e,
		classes: []
	}, r = Zr($r, t);
	n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = $r, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = hr, hr++;
	let i = Z.push(n);
	$r = n.id, ei[n.id] = i - 1;
}, "addTask"), Q = /* @__PURE__ */ c(function(e) {
	let t = ei[e];
	return Z[t];
}, "findTaskById"), ni = /* @__PURE__ */ c(function(e, t) {
	let n = {
		section: sr,
		type: sr,
		description: e,
		task: e,
		classes: []
	}, r = Xr(Qr, t);
	n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, Qr = n, or.push(n);
}, "addTaskOrg"), ri = /* @__PURE__ */ c(function() {
	let e = /* @__PURE__ */ c(function(e) {
		let t = Z[e], n = "";
		switch (Z[e].raw.startTime.type) {
			case "prevTaskEnd":
				t.startTime = Q(t.prevTaskId).endTime;
				break;
			case "getStartDate":
				n = Gr(void 0, X, Z[e].raw.startTime.startData), n && (Z[e].startTime = n);
				break;
		}
		return Z[e].startTime && (Z[e].endTime = qr(Z[e].startTime, X, Z[e].raw.endTime.data, dr), Z[e].endTime && (Z[e].processed = !0, Z[e].manualEndTime = (0, Y.default)(Z[e].raw.endTime.data, "YYYY-MM-DD", !0).isValid(), Ur(Z[e], X, rr, nr))), Z[e].processed;
	}, "compileTask"), t = !0;
	for (let [n, r] of Z.entries()) e(n), t &&= r.processed;
	return t;
}, "compileTasks"), ii = /* @__PURE__ */ c(function(e, t) {
	let n = t;
	b().securityLevel !== "loose" && (n = (0, Gn.sanitizeUrl)(t)), e.split(",").forEach(function(e) {
		Q(e) !== void 0 && (si(e, () => {
			window.open(n, "_self");
		}), ir.set(e, n));
	}), ai(e, "clickable");
}, "setLink"), ai = /* @__PURE__ */ c(function(e, t) {
	e.split(",").forEach(function(e) {
		let n = Q(e);
		n !== void 0 && n.classes.push(t);
	});
}, "setClass"), oi = /* @__PURE__ */ c(function(e, t, r) {
	if (b().securityLevel !== "loose" || t === void 0) return;
	let i = [];
	if (typeof r == "string") {
		i = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
		for (let e = 0; e < i.length; e++) {
			let t = i[e].trim();
			t.startsWith("\"") && t.endsWith("\"") && (t = t.substr(1, t.length - 2)), i[e] = t;
		}
	}
	i.length === 0 && i.push(e), Q(e) !== void 0 && si(e, () => {
		n.runFunc(t, ...i);
	});
}, "setClickFun"), si = /* @__PURE__ */ c(function(e, t) {
	ur.push(function() {
		let n = document.querySelector(`[id="${e}"]`);
		n !== null && n.addEventListener("click", function() {
			t();
		});
	}, function() {
		let n = document.querySelector(`[id="${e}-text"]`);
		n !== null && n.addEventListener("click", function() {
			t();
		});
	});
}, "pushFun"), ci = {
	getConfig: /* @__PURE__ */ c(() => b().gantt, "getConfig"),
	clear: gr,
	setDateFormat: Cr,
	getDateFormat: Ar,
	enableInclusiveEndDates: wr,
	endDatesAreInclusive: Tr,
	enableTopAxis: Er,
	topAxisEnabled: Dr,
	setAxisFormat: _r,
	getAxisFormat: vr,
	setTickInterval: yr,
	getTickInterval: br,
	setTodayMarker: xr,
	getTodayMarker: Sr,
	setAccTitle: g,
	getAccTitle: C,
	setDiagramTitle: _,
	getDiagramTitle: h,
	setDisplayMode: Or,
	getDisplayMode: kr,
	setAccDescription: m,
	getAccDescription: v,
	addSection: Ir,
	getSections: Lr,
	getTasks: Rr,
	addTask: ti,
	findTaskById: Q,
	addTaskOrg: ni,
	setIncludes: jr,
	getIncludes: Mr,
	setExcludes: Nr,
	getExcludes: Pr,
	setClickEvent: /* @__PURE__ */ c(function(e, t, n) {
		e.split(",").forEach(function(e) {
			oi(e, t, n);
		}), ai(e, "clickable");
	}, "setClickEvent"),
	setLink: ii,
	getLinks: Fr,
	bindFunctions: /* @__PURE__ */ c(function(e) {
		ur.forEach(function(t) {
			t(e);
		});
	}, "bindFunctions"),
	parseDuration: Kr,
	isInvalidDate: zr,
	setWeekday: Br,
	getWeekday: Vr,
	setWeekend: Hr
};
function li(e, t, n) {
	let r = !0;
	for (; r;) r = !1, n.forEach(function(n) {
		let i = "^\\s*" + n + "\\s*$", a = new RegExp(i);
		e[0].match(a) && (t[n] = !0, e.shift(1), r = !0);
	});
}
c(li, "getTaskTags"), Y.default.extend(Yn.default);
var ui = /* @__PURE__ */ c(function() {
	s.debug("Something is calling, setConf, remove the call");
}, "setConf"), di = {
	monday: Xe,
	tuesday: Ze,
	wednesday: Qe,
	thursday: H,
	friday: $e,
	saturday: et,
	sunday: Ye
}, fi = /* @__PURE__ */ c((e, t) => {
	let n = [...e].map(() => -Infinity), r = [...e].sort((e, t) => e.startTime - t.startTime || e.order - t.order), i = 0;
	for (let e of r) for (let r = 0; r < n.length; r++) if (e.startTime >= n[r]) {
		n[r] = e.endTime, e.order = r + t, r > i && (i = r);
		break;
	}
	return i;
}, "getMaxIntersections"), $, pi = 1e4, mi = {
	parser: Zn,
	db: ci,
	renderer: {
		setConf: ui,
		draw: /* @__PURE__ */ c(function(e, t, n, r) {
			let i = b().gantt, a = b().securityLevel, o;
			a === "sandbox" && (o = u("#i" + t));
			let l = u(a === "sandbox" ? o.nodes()[0].contentDocument.body : "body"), d = a === "sandbox" ? o.nodes()[0].contentDocument : document, f = d.getElementById(t);
			$ = f.parentElement.offsetWidth, $ === void 0 && ($ = 1200), i.useWidth !== void 0 && ($ = i.useWidth);
			let p = r.db.getTasks(), m = [];
			for (let e of p) m.push(e.type);
			m = ne(m);
			let h = {}, g = 2 * i.topPadding;
			if (r.db.getDisplayMode() === "compact" || i.displayMode === "compact") {
				let e = {};
				for (let t of p) e[t.section] === void 0 ? e[t.section] = [t] : e[t.section].push(t);
				let t = 0;
				for (let n of Object.keys(e)) {
					let r = fi(e[n], t) + 1;
					t += r, g += r * (i.barHeight + i.barGap), h[n] = r;
				}
			} else {
				g += p.length * (i.barHeight + i.barGap);
				for (let e of m) h[e] = p.filter((t) => t.type === e).length;
			}
			f.setAttribute("viewBox", "0 0 " + $ + " " + g);
			let _ = l.select(`[id="${t}"]`), v = Bn().domain([te(p, function(e) {
				return e.startTime;
			}), A(p, function(e) {
				return e.endTime;
			})]).rangeRound([0, $ - i.leftPadding - i.rightPadding]);
			function y(e, t) {
				let n = e.startTime, r = t.startTime, i = 0;
				return n > r ? i = 1 : n < r && (i = -1), i;
			}
			c(y, "taskCompare"), p.sort(y), C(p, $, g), x(_, g, $, i.useMaxWidth), _.append("text").text(r.db.getDiagramTitle()).attr("x", $ / 2).attr("y", i.titleTopMargin).attr("class", "titleText");
			function C(e, t, n) {
				let a = i.barHeight, o = a + i.barGap, s = i.topPadding, c = i.leftPadding, l = O().domain([0, m.length]).range(["#00B9FA", "#F95002"]).interpolate(Ie);
				T(o, s, c, t, n, e, r.db.getExcludes(), r.db.getIncludes()), D(c, s, t, n), w(e, o, s, c, a, l, t, n), k(o, s, c, a, l), ee(c, s, t, n);
			}
			c(C, "makeGantt");
			function w(e, n, a, o, s, c, l) {
				e.sort((e, t) => e.vert === t.vert ? 0 : e.vert ? 1 : -1);
				let d = [...new Set(e.map((e) => e.order))].map((t) => e.find((e) => e.order === t));
				_.append("g").selectAll("rect").data(d).enter().append("rect").attr("x", 0).attr("y", function(e, t) {
					return t = e.order, t * n + a - 2;
				}).attr("width", function() {
					return l - i.rightPadding / 2;
				}).attr("height", n).attr("class", function(e) {
					for (let [t, n] of m.entries()) if (e.type === n) return "section section" + t % i.numberSectionStyles;
					return "section section0";
				}).enter();
				let f = _.append("g").selectAll("rect").data(e).enter(), h = r.db.getLinks();
				if (f.append("rect").attr("id", function(e) {
					return e.id;
				}).attr("rx", 3).attr("ry", 3).attr("x", function(e) {
					return e.milestone ? v(e.startTime) + o + .5 * (v(e.endTime) - v(e.startTime)) - .5 * s : v(e.startTime) + o;
				}).attr("y", function(e, t) {
					return t = e.order, e.vert ? i.gridLineStartPadding : t * n + a;
				}).attr("width", function(e) {
					return e.milestone ? s : e.vert ? .08 * s : v(e.renderEndTime || e.endTime) - v(e.startTime);
				}).attr("height", function(e) {
					return e.vert ? p.length * (i.barHeight + i.barGap) + i.barHeight * 2 : s;
				}).attr("transform-origin", function(e, t) {
					return t = e.order, (v(e.startTime) + o + .5 * (v(e.endTime) - v(e.startTime))).toString() + "px " + (t * n + a + .5 * s).toString() + "px";
				}).attr("class", function(e) {
					let t = "";
					e.classes.length > 0 && (t = e.classes.join(" "));
					let n = 0;
					for (let [t, r] of m.entries()) e.type === r && (n = t % i.numberSectionStyles);
					let r = "";
					return e.active ? e.crit ? r += " activeCrit" : r = " active" : e.done ? r = e.crit ? " doneCrit" : " done" : e.crit && (r += " crit"), r.length === 0 && (r = " task"), e.milestone && (r = " milestone " + r), e.vert && (r = " vert " + r), r += n, r += " " + t, "task" + r;
				}), f.append("text").attr("id", function(e) {
					return e.id + "-text";
				}).text(function(e) {
					return e.task;
				}).attr("font-size", i.fontSize).attr("x", function(e) {
					let t = v(e.startTime), n = v(e.renderEndTime || e.endTime);
					if (e.milestone && (t += .5 * (v(e.endTime) - v(e.startTime)) - .5 * s, n = t + s), e.vert) return v(e.startTime) + o;
					let r = this.getBBox().width;
					return r > n - t ? n + r + 1.5 * i.leftPadding > l ? t + o - 5 : n + o + 5 : (n - t) / 2 + t + o;
				}).attr("y", function(e, t) {
					return e.vert ? i.gridLineStartPadding + p.length * (i.barHeight + i.barGap) + 60 : (t = e.order, t * n + i.barHeight / 2 + (i.fontSize / 2 - 2) + a);
				}).attr("text-height", s).attr("class", function(e) {
					let t = v(e.startTime), n = v(e.endTime);
					e.milestone && (n = t + s);
					let r = this.getBBox().width, a = "";
					e.classes.length > 0 && (a = e.classes.join(" "));
					let o = 0;
					for (let [t, n] of m.entries()) e.type === n && (o = t % i.numberSectionStyles);
					let c = "";
					return e.active && (c = e.crit ? "activeCritText" + o : "activeText" + o), e.done ? c = e.crit ? c + " doneCritText" + o : c + " doneText" + o : e.crit && (c = c + " critText" + o), e.milestone && (c += " milestoneText"), e.vert && (c += " vertText"), r > n - t ? n + r + 1.5 * i.leftPadding > l ? a + " taskTextOutsideLeft taskTextOutside" + o + " " + c : a + " taskTextOutsideRight taskTextOutside" + o + " " + c + " width-" + r : a + " taskText taskText" + o + " " + c + " width-" + r;
				}), b().securityLevel === "sandbox") {
					let e;
					e = u("#i" + t);
					let n = e.nodes()[0].contentDocument;
					f.filter(function(e) {
						return h.has(e.id);
					}).each(function(e) {
						var t = n.querySelector("#" + e.id), r = n.querySelector("#" + e.id + "-text");
						let i = t.parentNode;
						var a = n.createElement("a");
						a.setAttribute("xlink:href", h.get(e.id)), a.setAttribute("target", "_top"), i.appendChild(a), a.appendChild(t), a.appendChild(r);
					});
				}
			}
			c(w, "drawRects");
			function T(e, t, n, a, o, c, l, u) {
				if (l.length === 0 && u.length === 0) return;
				let d, f;
				for (let { startTime: e, endTime: t } of c) (d === void 0 || e < d) && (d = e), (f === void 0 || t > f) && (f = t);
				if (!d || !f) return;
				if ((0, Y.default)(f).diff((0, Y.default)(d), "year") > 5) {
					s.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");
					return;
				}
				let p = r.db.getDateFormat(), m = [], h = null, g = (0, Y.default)(d);
				for (; g.valueOf() <= f;) r.db.isInvalidDate(g, p, l, u) ? h ? h.end = g : h = {
					start: g,
					end: g
				} : h &&= (m.push(h), null), g = g.add(1, "d");
				_.append("g").selectAll("rect").data(m).enter().append("rect").attr("id", (e) => "exclude-" + e.start.format("YYYY-MM-DD")).attr("x", (e) => v(e.start.startOf("day")) + n).attr("y", i.gridLineStartPadding).attr("width", (e) => v(e.end.endOf("day")) - v(e.start.startOf("day"))).attr("height", o - t - i.gridLineStartPadding).attr("transform-origin", function(t, r) {
					return (v(t.start) + n + .5 * (v(t.end) - v(t.start))).toString() + "px " + (r * e + .5 * o).toString() + "px";
				}).attr("class", "exclude-range");
			}
			c(T, "drawExcludeDays");
			function E(e, t, n, r) {
				if (n <= 0 || e > t) return Infinity;
				let i = t - e, a = Y.default.duration({ [r ?? "day"]: n }).asMilliseconds();
				return a <= 0 ? Infinity : Math.ceil(i / a);
			}
			c(E, "getEstimatedTickCount");
			function D(e, t, n, a) {
				let o = r.db.getDateFormat(), c = r.db.getAxisFormat(), l;
				l = c || (o === "D" ? "%d" : i.axisFormat ?? "%Y-%m-%d");
				let u = he(v).tickSize(-a + t + i.gridLineStartPadding).tickFormat(Fn(l)), d = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval() || i.tickInterval);
				if (d !== null) {
					let e = parseInt(d[1], 10);
					if (isNaN(e) || e <= 0) s.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);
					else {
						let t = d[2], n = r.db.getWeekday() || i.weekday, a = v.domain(), o = a[0], c = a[1], l = E(o, c, e, t);
						if (l > pi) s.warn(`The tick interval "${e}${t}" would generate ${l} ticks, which exceeds the maximum allowed (${pi}). This may indicate an invalid date or time range. Skipping custom tick interval.`);
						else switch (t) {
							case "millisecond":
								u.ticks(P.every(e));
								break;
							case "second":
								u.ticks(z.every(e));
								break;
							case "minute":
								u.ticks(Ue.every(e));
								break;
							case "hour":
								u.ticks(Ge.every(e));
								break;
							case "day":
								u.ticks(B.every(e));
								break;
							case "week":
								u.ticks(di[n].every(e));
								break;
							case "month":
								u.ticks(st.every(e));
								break;
						}
					}
				}
				if (_.append("g").attr("class", "grid").attr("transform", "translate(" + e + ", " + (a - 50) + ")").call(u).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || i.topAxis) {
					let n = me(v).tickSize(-a + t + i.gridLineStartPadding).tickFormat(Fn(l));
					if (d !== null) {
						let e = parseInt(d[1], 10);
						if (isNaN(e) || e <= 0) s.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);
						else {
							let t = d[2], a = r.db.getWeekday() || i.weekday, o = v.domain(), s = o[0], c = o[1];
							if (E(s, c, e, t) <= pi) switch (t) {
								case "millisecond":
									n.ticks(P.every(e));
									break;
								case "second":
									n.ticks(z.every(e));
									break;
								case "minute":
									n.ticks(Ue.every(e));
									break;
								case "hour":
									n.ticks(Ge.every(e));
									break;
								case "day":
									n.ticks(B.every(e));
									break;
								case "week":
									n.ticks(di[a].every(e));
									break;
								case "month":
									n.ticks(st.every(e));
									break;
							}
						}
					}
					_.append("g").attr("class", "grid").attr("transform", "translate(" + e + ", " + t + ")").call(n).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
				}
			}
			c(D, "makeGrid");
			function k(e, t) {
				let n = 0, r = Object.keys(h).map((e) => [e, h[e]]);
				_.append("g").selectAll("text").data(r).enter().append(function(e) {
					let t = e[0].split(S.lineBreakRegex), n = -(t.length - 1) / 2, r = d.createElementNS("http://www.w3.org/2000/svg", "text");
					r.setAttribute("dy", n + "em");
					for (let [e, n] of t.entries()) {
						let t = d.createElementNS("http://www.w3.org/2000/svg", "tspan");
						t.setAttribute("alignment-baseline", "central"), t.setAttribute("x", "10"), e > 0 && t.setAttribute("dy", "1em"), t.textContent = n, r.appendChild(t);
					}
					return r;
				}).attr("x", 10).attr("y", function(i, a) {
					if (a > 0) for (let o = 0; o < a; o++) return n += r[a - 1][1], i[1] * e / 2 + n * e + t;
					else return i[1] * e / 2 + t;
				}).attr("font-size", i.sectionFontSize).attr("class", function(e) {
					for (let [t, n] of m.entries()) if (e[0] === n) return "sectionTitle sectionTitle" + t % i.numberSectionStyles;
					return "sectionTitle";
				});
			}
			c(k, "vertLabels");
			function ee(e, t, n, a) {
				let o = r.db.getTodayMarker();
				if (o === "off") return;
				let s = _.append("g").attr("class", "today"), c = /* @__PURE__ */ new Date(), l = s.append("line");
				l.attr("x1", v(c) + e).attr("x2", v(c) + e).attr("y1", i.titleTopMargin).attr("y2", a - i.titleTopMargin).attr("class", "today"), o !== "" && l.attr("style", o.replace(/,/g, ";"));
			}
			c(ee, "drawToday");
			function ne(e) {
				let t = {}, n = [];
				for (let r = 0, i = e.length; r < i; ++r) Object.prototype.hasOwnProperty.call(t, e[r]) || (t[e[r]] = !0, n.push(e[r]));
				return n;
			}
			c(ne, "checkUnique");
		}, "draw")
	},
	styles: /* @__PURE__ */ c((e) => `
  .mermaid-main-font {
        font-family: ${e.fontFamily};
  }

  .exclude-range {
    fill: ${e.excludeBkgColor};
  }

  .section {
    stroke: none;
    opacity: 0.2;
  }

  .section0 {
    fill: ${e.sectionBkgColor};
  }

  .section2 {
    fill: ${e.sectionBkgColor2};
  }

  .section1,
  .section3 {
    fill: ${e.altSectionBkgColor};
    opacity: 0.2;
  }

  .sectionTitle0 {
    fill: ${e.titleColor};
  }

  .sectionTitle1 {
    fill: ${e.titleColor};
  }

  .sectionTitle2 {
    fill: ${e.titleColor};
  }

  .sectionTitle3 {
    fill: ${e.titleColor};
  }

  .sectionTitle {
    text-anchor: start;
    font-family: ${e.fontFamily};
  }


  /* Grid and axis */

  .grid .tick {
    stroke: ${e.gridColor};
    opacity: 0.8;
    shape-rendering: crispEdges;
  }

  .grid .tick text {
    font-family: ${e.fontFamily};
    fill: ${e.textColor};
  }

  .grid path {
    stroke-width: 0;
  }


  /* Today line */

  .today {
    fill: none;
    stroke: ${e.todayLineColor};
    stroke-width: 2px;
  }


  /* Task styling */

  /* Default task */

  .task {
    stroke-width: 2;
  }

  .taskText {
    text-anchor: middle;
    font-family: ${e.fontFamily};
  }

  .taskTextOutsideRight {
    fill: ${e.taskTextDarkColor};
    text-anchor: start;
    font-family: ${e.fontFamily};
  }

  .taskTextOutsideLeft {
    fill: ${e.taskTextDarkColor};
    text-anchor: end;
  }


  /* Special case clickable */

  .task.clickable {
    cursor: pointer;
  }

  .taskText.clickable {
    cursor: pointer;
    fill: ${e.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideLeft.clickable {
    cursor: pointer;
    fill: ${e.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideRight.clickable {
    cursor: pointer;
    fill: ${e.taskTextClickableColor} !important;
    font-weight: bold;
  }


  /* Specific task settings for the sections*/

  .taskText0,
  .taskText1,
  .taskText2,
  .taskText3 {
    fill: ${e.taskTextColor};
  }

  .task0,
  .task1,
  .task2,
  .task3 {
    fill: ${e.taskBkgColor};
    stroke: ${e.taskBorderColor};
  }

  .taskTextOutside0,
  .taskTextOutside2
  {
    fill: ${e.taskTextOutsideColor};
  }

  .taskTextOutside1,
  .taskTextOutside3 {
    fill: ${e.taskTextOutsideColor};
  }


  /* Active task */

  .active0,
  .active1,
  .active2,
  .active3 {
    fill: ${e.activeTaskBkgColor};
    stroke: ${e.activeTaskBorderColor};
  }

  .activeText0,
  .activeText1,
  .activeText2,
  .activeText3 {
    fill: ${e.taskTextDarkColor} !important;
  }


  /* Completed task */

  .done0,
  .done1,
  .done2,
  .done3 {
    stroke: ${e.doneTaskBorderColor};
    fill: ${e.doneTaskBkgColor};
    stroke-width: 2;
  }

  .doneText0,
  .doneText1,
  .doneText2,
  .doneText3 {
    fill: ${e.taskTextDarkColor} !important;
  }

  /* Done task text displayed outside the bar sits against the diagram background,
     not against the done-task bar, so it must use the outside/contrast color. */
  .doneText0.taskTextOutsideLeft,
  .doneText0.taskTextOutsideRight,
  .doneText1.taskTextOutsideLeft,
  .doneText1.taskTextOutsideRight,
  .doneText2.taskTextOutsideLeft,
  .doneText2.taskTextOutsideRight,
  .doneText3.taskTextOutsideLeft,
  .doneText3.taskTextOutsideRight {
    fill: ${e.taskTextOutsideColor} !important;
  }


  /* Tasks on the critical line */

  .crit0,
  .crit1,
  .crit2,
  .crit3 {
    stroke: ${e.critBorderColor};
    fill: ${e.critBkgColor};
    stroke-width: 2;
  }

  .activeCrit0,
  .activeCrit1,
  .activeCrit2,
  .activeCrit3 {
    stroke: ${e.critBorderColor};
    fill: ${e.activeTaskBkgColor};
    stroke-width: 2;
  }

  .doneCrit0,
  .doneCrit1,
  .doneCrit2,
  .doneCrit3 {
    stroke: ${e.critBorderColor};
    fill: ${e.doneTaskBkgColor};
    stroke-width: 2;
    cursor: pointer;
    shape-rendering: crispEdges;
  }

  .milestone {
    transform: rotate(45deg) scale(0.8,0.8);
  }

  .milestoneText {
    font-style: italic;
  }
  .doneCritText0,
  .doneCritText1,
  .doneCritText2,
  .doneCritText3 {
    fill: ${e.taskTextDarkColor} !important;
  }

  /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */
  .doneCritText0.taskTextOutsideLeft,
  .doneCritText0.taskTextOutsideRight,
  .doneCritText1.taskTextOutsideLeft,
  .doneCritText1.taskTextOutsideRight,
  .doneCritText2.taskTextOutsideLeft,
  .doneCritText2.taskTextOutsideRight,
  .doneCritText3.taskTextOutsideLeft,
  .doneCritText3.taskTextOutsideRight {
    fill: ${e.taskTextOutsideColor} !important;
  }

  .vert {
    stroke: ${e.vertLineColor};
  }

  .vertText {
    font-size: 15px;
    text-anchor: middle;
    fill: ${e.vertLineColor} !important;
  }

  .activeCritText0,
  .activeCritText1,
  .activeCritText2,
  .activeCritText3 {
    fill: ${e.taskTextDarkColor} !important;
  }

  .titleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${e.titleColor || e.textColor};
    font-family: ${e.fontFamily};
  }
`, "getStyles")
};
//#endregion
export { mi as diagram };
