import { w as e } from "./src-9kyTNi70.js";
import { n as t, r as n } from "./src-DsDbTxqE.js";
import { R as r, h as i, p as a, r as o, s } from "./chunk-CSCIHK7Q-C4xvUEFK.js";
import { t as c } from "./dist-DfFdVwnL.js";
//#region node_modules/d3-shape/src/curve/linear.js
function l(e) {
	this._context = e;
}
l.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._point = 0;
	},
	lineEnd: function() {
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1: this._point = 2;
			default:
				this._context.lineTo(e, t);
				break;
		}
	}
};
function u(e) {
	return new l(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/bump.js
var d = class {
	constructor(e, t) {
		this._context = e, this._x = t;
	}
	areaStart() {
		this._line = 0;
	}
	areaEnd() {
		this._line = NaN;
	}
	lineStart() {
		this._point = 0;
	}
	lineEnd() {
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	}
	point(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1: this._point = 2;
			default:
				this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + e) / 2, this._y0, this._x0, t, e, t) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + t) / 2, e, this._y0, e, t);
				break;
		}
		this._x0 = e, this._y0 = t;
	}
};
function f(e) {
	return new d(e, !0);
}
function ee(e) {
	return new d(e, !1);
}
//#endregion
//#region node_modules/d3-shape/src/noop.js
function p() {}
//#endregion
//#region node_modules/d3-shape/src/curve/basis.js
function m(e, t, n) {
	e._context.bezierCurveTo((2 * e._x0 + e._x1) / 3, (2 * e._y0 + e._y1) / 3, (e._x0 + 2 * e._x1) / 3, (e._y0 + 2 * e._y1) / 3, (e._x0 + 4 * e._x1 + t) / 6, (e._y0 + 4 * e._y1 + n) / 6);
}
function h(e) {
	this._context = e;
}
h.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 3: m(this, this._x1, this._y1);
			case 2:
				this._context.lineTo(this._x1, this._y1);
				break;
		}
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1:
				this._point = 2;
				break;
			case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
			default:
				m(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
	}
};
function te(e) {
	return new h(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/basisClosed.js
function ne(e) {
	this._context = e;
}
ne.prototype = {
	areaStart: p,
	areaEnd: p,
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 1:
				this._context.moveTo(this._x2, this._y2), this._context.closePath();
				break;
			case 2:
				this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
				break;
			case 3:
				this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
				break;
		}
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._x2 = e, this._y2 = t;
				break;
			case 1:
				this._point = 2, this._x3 = e, this._y3 = t;
				break;
			case 2:
				this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
				break;
			default:
				m(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
	}
};
function re(e) {
	return new ne(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/basisOpen.js
function ie(e) {
	this._context = e;
}
ie.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
	},
	lineEnd: function() {
		(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1;
				break;
			case 1:
				this._point = 2;
				break;
			case 2:
				this._point = 3;
				var n = (this._x0 + 4 * this._x1 + e) / 6, r = (this._y0 + 4 * this._y1 + t) / 6;
				this._line ? this._context.lineTo(n, r) : this._context.moveTo(n, r);
				break;
			case 3: this._point = 4;
			default:
				m(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
	}
};
function ae(e) {
	return new ie(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/bundle.js
function oe(e, t) {
	this._basis = new h(e), this._beta = t;
}
oe.prototype = {
	lineStart: function() {
		this._x = [], this._y = [], this._basis.lineStart();
	},
	lineEnd: function() {
		var e = this._x, t = this._y, n = e.length - 1;
		if (n > 0) for (var r = e[0], i = t[0], a = e[n] - r, o = t[n] - i, s = -1, c; ++s <= n;) c = s / n, this._basis.point(this._beta * e[s] + (1 - this._beta) * (r + c * a), this._beta * t[s] + (1 - this._beta) * (i + c * o));
		this._x = this._y = null, this._basis.lineEnd();
	},
	point: function(e, t) {
		this._x.push(+e), this._y.push(+t);
	}
};
var se = (function e(t) {
	function n(e) {
		return t === 1 ? new h(e) : new oe(e, t);
	}
	return n.beta = function(t) {
		return e(+t);
	}, n;
})(.85);
//#endregion
//#region node_modules/d3-shape/src/curve/cardinal.js
function g(e, t, n) {
	e._context.bezierCurveTo(e._x1 + e._k * (e._x2 - e._x0), e._y1 + e._k * (e._y2 - e._y0), e._x2 + e._k * (e._x1 - t), e._y2 + e._k * (e._y1 - n), e._x2, e._y2);
}
function _(e, t) {
	this._context = e, this._k = (1 - t) / 6;
}
_.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 2:
				this._context.lineTo(this._x2, this._y2);
				break;
			case 3:
				g(this, this._x1, this._y1);
				break;
		}
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1:
				this._point = 2, this._x1 = e, this._y1 = t;
				break;
			case 2: this._point = 3;
			default:
				g(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var ce = (function e(t) {
	function n(e) {
		return new _(e, t);
	}
	return n.tension = function(t) {
		return e(+t);
	}, n;
})(0);
//#endregion
//#region node_modules/d3-shape/src/curve/cardinalClosed.js
function v(e, t) {
	this._context = e, this._k = (1 - t) / 6;
}
v.prototype = {
	areaStart: p,
	areaEnd: p,
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 1:
				this._context.moveTo(this._x3, this._y3), this._context.closePath();
				break;
			case 2:
				this._context.lineTo(this._x3, this._y3), this._context.closePath();
				break;
			case 3:
				this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
				break;
		}
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._x3 = e, this._y3 = t;
				break;
			case 1:
				this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
				break;
			case 2:
				this._point = 3, this._x5 = e, this._y5 = t;
				break;
			default:
				g(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var le = (function e(t) {
	function n(e) {
		return new v(e, t);
	}
	return n.tension = function(t) {
		return e(+t);
	}, n;
})(0);
//#endregion
//#region node_modules/d3-shape/src/curve/cardinalOpen.js
function y(e, t) {
	this._context = e, this._k = (1 - t) / 6;
}
y.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
	},
	lineEnd: function() {
		(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1;
				break;
			case 1:
				this._point = 2;
				break;
			case 2:
				this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
				break;
			case 3: this._point = 4;
			default:
				g(this, e, t);
				break;
		}
		this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var ue = (function e(t) {
	function n(e) {
		return new y(e, t);
	}
	return n.tension = function(t) {
		return e(+t);
	}, n;
})(0);
//#endregion
//#region node_modules/d3-shape/src/curve/catmullRom.js
function b(e, t, n) {
	var r = e._x1, i = e._y1, a = e._x2, o = e._y2;
	if (e._l01_a > 1e-12) {
		var s = 2 * e._l01_2a + 3 * e._l01_a * e._l12_a + e._l12_2a, c = 3 * e._l01_a * (e._l01_a + e._l12_a);
		r = (r * s - e._x0 * e._l12_2a + e._x2 * e._l01_2a) / c, i = (i * s - e._y0 * e._l12_2a + e._y2 * e._l01_2a) / c;
	}
	if (e._l23_a > 1e-12) {
		var l = 2 * e._l23_2a + 3 * e._l23_a * e._l12_a + e._l12_2a, u = 3 * e._l23_a * (e._l23_a + e._l12_a);
		a = (a * l + e._x1 * e._l23_2a - t * e._l12_2a) / u, o = (o * l + e._y1 * e._l23_2a - n * e._l12_2a) / u;
	}
	e._context.bezierCurveTo(r, i, a, o, e._x2, e._y2);
}
function de(e, t) {
	this._context = e, this._alpha = t;
}
de.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 2:
				this._context.lineTo(this._x2, this._y2);
				break;
			case 3:
				this.point(this._x2, this._y2);
				break;
		}
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		if (e = +e, t = +t, this._point) {
			var n = this._x2 - e, r = this._y2 - t;
			this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
		}
		switch (this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1:
				this._point = 2;
				break;
			case 2: this._point = 3;
			default:
				b(this, e, t);
				break;
		}
		this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var fe = (function e(t) {
	function n(e) {
		return t ? new de(e, t) : new _(e, 0);
	}
	return n.alpha = function(t) {
		return e(+t);
	}, n;
})(.5);
//#endregion
//#region node_modules/d3-shape/src/curve/catmullRomClosed.js
function pe(e, t) {
	this._context = e, this._alpha = t;
}
pe.prototype = {
	areaStart: p,
	areaEnd: p,
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 1:
				this._context.moveTo(this._x3, this._y3), this._context.closePath();
				break;
			case 2:
				this._context.lineTo(this._x3, this._y3), this._context.closePath();
				break;
			case 3:
				this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
				break;
		}
	},
	point: function(e, t) {
		if (e = +e, t = +t, this._point) {
			var n = this._x2 - e, r = this._y2 - t;
			this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
		}
		switch (this._point) {
			case 0:
				this._point = 1, this._x3 = e, this._y3 = t;
				break;
			case 1:
				this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
				break;
			case 2:
				this._point = 3, this._x5 = e, this._y5 = t;
				break;
			default:
				b(this, e, t);
				break;
		}
		this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var me = (function e(t) {
	function n(e) {
		return t ? new pe(e, t) : new v(e, 0);
	}
	return n.alpha = function(t) {
		return e(+t);
	}, n;
})(.5);
//#endregion
//#region node_modules/d3-shape/src/curve/catmullRomOpen.js
function he(e, t) {
	this._context = e, this._alpha = t;
}
he.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
	},
	lineEnd: function() {
		(this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		if (e = +e, t = +t, this._point) {
			var n = this._x2 - e, r = this._y2 - t;
			this._l23_a = Math.sqrt(this._l23_2a = (n * n + r * r) ** +this._alpha);
		}
		switch (this._point) {
			case 0:
				this._point = 1;
				break;
			case 1:
				this._point = 2;
				break;
			case 2:
				this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
				break;
			case 3: this._point = 4;
			default:
				b(this, e, t);
				break;
		}
		this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
	}
};
var ge = (function e(t) {
	function n(e) {
		return t ? new he(e, t) : new y(e, 0);
	}
	return n.alpha = function(t) {
		return e(+t);
	}, n;
})(.5);
//#endregion
//#region node_modules/d3-shape/src/curve/linearClosed.js
function _e(e) {
	this._context = e;
}
_e.prototype = {
	areaStart: p,
	areaEnd: p,
	lineStart: function() {
		this._point = 0;
	},
	lineEnd: function() {
		this._point && this._context.closePath();
	},
	point: function(e, t) {
		e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
	}
};
function ve(e) {
	return new _e(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/monotone.js
function ye(e) {
	return e < 0 ? -1 : 1;
}
function be(e, t, n) {
	var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
	return (ye(a) + ye(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
}
function xe(e, t) {
	var n = e._x1 - e._x0;
	return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
}
function x(e, t, n) {
	var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
	e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
}
function S(e) {
	this._context = e;
}
S.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
	},
	lineEnd: function() {
		switch (this._point) {
			case 2:
				this._context.lineTo(this._x1, this._y1);
				break;
			case 3:
				x(this, this._t0, xe(this, this._t0));
				break;
		}
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(e, t) {
		var n = NaN;
		if (e = +e, t = +t, !(e === this._x1 && t === this._y1)) {
			switch (this._point) {
				case 0:
					this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
					break;
				case 1:
					this._point = 2;
					break;
				case 2:
					this._point = 3, x(this, xe(this, n = be(this, e, t)), n);
					break;
				default:
					x(this, this._t0, n = be(this, e, t));
					break;
			}
			this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
		}
	}
};
function Se(e) {
	this._context = new Ce(e);
}
(Se.prototype = Object.create(S.prototype)).point = function(e, t) {
	S.prototype.point.call(this, t, e);
};
function Ce(e) {
	this._context = e;
}
Ce.prototype = {
	moveTo: function(e, t) {
		this._context.moveTo(t, e);
	},
	closePath: function() {
		this._context.closePath();
	},
	lineTo: function(e, t) {
		this._context.lineTo(t, e);
	},
	bezierCurveTo: function(e, t, n, r, i, a) {
		this._context.bezierCurveTo(t, e, r, n, a, i);
	}
};
function we(e) {
	return new S(e);
}
function Te(e) {
	return new Se(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/natural.js
function Ee(e) {
	this._context = e;
}
Ee.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x = [], this._y = [];
	},
	lineEnd: function() {
		var e = this._x, t = this._y, n = e.length;
		if (n) if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), n === 2) this._context.lineTo(e[1], t[1]);
		else for (var r = De(e), i = De(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
		(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
	},
	point: function(e, t) {
		this._x.push(+e), this._y.push(+t);
	}
};
function De(e) {
	var t, n = e.length - 1, r, i = Array(n), a = Array(n), o = Array(n);
	for (i[0] = 0, a[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < n - 1; ++t) i[t] = 1, a[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
	for (i[n - 1] = 2, a[n - 1] = 7, o[n - 1] = 8 * e[n - 1] + e[n], t = 1; t < n; ++t) r = i[t] / a[t - 1], a[t] -= r, o[t] -= r * o[t - 1];
	for (i[n - 1] = o[n - 1] / a[n - 1], t = n - 2; t >= 0; --t) i[t] = (o[t] - i[t + 1]) / a[t];
	for (a[n - 1] = (e[n] + i[n - 1]) / 2, t = 0; t < n - 1; ++t) a[t] = 2 * e[t + 1] - i[t + 1];
	return [i, a];
}
function Oe(e) {
	return new Ee(e);
}
//#endregion
//#region node_modules/d3-shape/src/curve/step.js
function C(e, t) {
	this._context = e, this._t = t;
}
C.prototype = {
	areaStart: function() {
		this._line = 0;
	},
	areaEnd: function() {
		this._line = NaN;
	},
	lineStart: function() {
		this._x = this._y = NaN, this._point = 0;
	},
	lineEnd: function() {
		0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
	},
	point: function(e, t) {
		switch (e = +e, t = +t, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
				break;
			case 1: this._point = 2;
			default:
				if (this._t <= 0) this._context.lineTo(this._x, t), this._context.lineTo(e, t);
				else {
					var n = this._x * (1 - this._t) + e * this._t;
					this._context.lineTo(n, this._y), this._context.lineTo(n, t);
				}
				break;
		}
		this._x = e, this._y = t;
	}
};
function w(e) {
	return new C(e, .5);
}
function T(e) {
	return new C(e, 0);
}
function ke(e) {
	return new C(e, 1);
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isLength.mjs
function Ae(e) {
	return Number.isSafeInteger(e) && e >= 0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
function je(e) {
	return e != null && typeof e != "function" && Ae(e.length);
}
//#endregion
//#region node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
function Me(e) {
	return e === "__proto__";
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
function E(e) {
	return e == null || typeof e != "object" && typeof e != "function";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
function Ne(e) {
	return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
function D(e) {
	return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/tags.mjs
var Pe = "[object RegExp]", O = "[object String]", k = "[object Number]", A = "[object Boolean]", j = "[object Arguments]", Fe = "[object Symbol]", Ie = "[object Date]", Le = "[object Map]", Re = "[object Set]", ze = "[object Array]", Be = "[object ArrayBuffer]", Ve = "[object Object]", He = "[object DataView]", Ue = "[object Uint8Array]", We = "[object Uint8ClampedArray]", Ge = "[object Uint16Array]", Ke = "[object Uint32Array]", qe = "[object Int8Array]", M = "[object Int16Array]", Je = "[object Int32Array]", Ye = "[object Float32Array]", Xe = "[object Float64Array]", Ze = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
	return this;
})() || Function("return this")();
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isBuffer.mjs
function N(e) {
	return Ze.Buffer !== void 0 && Ze.Buffer.isBuffer(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
function P(e) {
	return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
function Qe(e, t) {
	return F(e, void 0, e, /* @__PURE__ */ new Map(), t);
}
function F(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
	let a = i?.(e, t, n, r);
	if (a !== void 0) return a;
	if (E(e)) return e;
	if (r.has(e)) return r.get(e);
	if (Array.isArray(e)) {
		let t = Array(e.length);
		r.set(e, t);
		for (let a = 0; a < e.length; a++) t[a] = F(e[a], a, n, r, i);
		return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
	}
	if (e instanceof Date) return new Date(e.getTime());
	if (e instanceof RegExp) {
		let t = new RegExp(e.source, e.flags);
		return t.lastIndex = e.lastIndex, t;
	}
	if (e instanceof Map) {
		let t = /* @__PURE__ */ new Map();
		r.set(e, t);
		for (let [a, o] of e) t.set(a, F(o, a, n, r, i));
		return t;
	}
	if (e instanceof Set) {
		let t = /* @__PURE__ */ new Set();
		r.set(e, t);
		for (let a of e) t.add(F(a, void 0, n, r, i));
		return t;
	}
	if (N(e)) return e.subarray();
	if (P(e)) {
		let t = new (Object.getPrototypeOf(e)).constructor(e.length);
		r.set(e, t);
		for (let a = 0; a < e.length; a++) t[a] = F(e[a], a, n, r, i);
		return t;
	}
	if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
	if (e instanceof DataView) {
		let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (typeof File < "u" && e instanceof File) {
		let t = new File([e], e.name, { type: e.type });
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (typeof Blob < "u" && e instanceof Blob) {
		let t = new Blob([e], { type: e.type });
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (e instanceof Error) {
		let t = structuredClone(e);
		return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor, I(t, e, n, r, i), t;
	}
	if (e instanceof Boolean) {
		let t = new Boolean(e.valueOf());
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (e instanceof Number) {
		let t = new Number(e.valueOf());
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (e instanceof String) {
		let t = new String(e.valueOf());
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	if (typeof e == "object" && $e(e)) {
		let t = Object.create(Object.getPrototypeOf(e));
		return r.set(e, t), I(t, e, n, r, i), t;
	}
	return e;
}
function I(e, t, n = e, r, i) {
	let a = [...Object.keys(t), ...Ne(t)];
	for (let o = 0; o < a.length; o++) {
		let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
		(c == null || c.writable) && (e[s] = F(t[s], s, n, r, i));
	}
}
function $e(e) {
	switch (D(e)) {
		case j:
		case ze:
		case Be:
		case He:
		case A:
		case Ie:
		case Ye:
		case Xe:
		case qe:
		case M:
		case Je:
		case Le:
		case k:
		case Ve:
		case Pe:
		case Re:
		case O:
		case Fe:
		case Ue:
		case We:
		case Ge:
		case Ke: return !0;
		default: return !1;
	}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
function et(e, t) {
	return Qe(e, (n, r, i, a) => {
		let o = t?.(n, r, i, a);
		if (o !== void 0) return o;
		if (typeof e == "object") {
			if (D(e) === "[object Object]" && typeof e.constructor != "function") {
				let t = {};
				return a.set(e, t), I(t, e, i, a), t;
			}
			switch (Object.prototype.toString.call(e)) {
				case k:
				case O:
				case A: {
					let t = new e.constructor(e?.valueOf());
					return I(t, e), t;
				}
				case j: {
					let t = {};
					return I(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
				}
				default: return;
			}
		}
	});
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
function tt(e) {
	return et(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
function L(e) {
	return typeof e == "object" && !!e && D(e) === "[object Arguments]";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
function R(e) {
	return typeof e == "object" && !!e;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
function nt(e) {
	return R(e) && je(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/function/memoize.mjs
function z(e, t) {
	if (typeof e != "function" || t != null && typeof t != "function") throw TypeError("Expected a function");
	let n = function(...r) {
		let i = t ? t.apply(this, r) : r[0], a = n.cache;
		if (a.has(i)) return a.get(i);
		let o = e.apply(this, r);
		return n.cache = a.set(i, o) || a, o;
	};
	return n.cache = new (z.Cache || Map)(), n;
}
z.Cache = Map;
//#endregion
//#region node_modules/es-toolkit/dist/function/noop.mjs
function rt() {}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
function B(e) {
	return P(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
function V(e) {
	if (typeof e != "object" || !e) return !1;
	if (Object.getPrototypeOf(e) === null) return !0;
	if (Object.prototype.toString.call(e) !== "[object Object]") {
		let t = e[Symbol.toStringTag];
		return t == null || !Object.getOwnPropertyDescriptor(e, Symbol.toStringTag)?.writable ? !1 : e.toString() === `[object ${t}]`;
	}
	let t = e;
	for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
	return Object.getPrototypeOf(e) === t;
}
//#endregion
//#region node_modules/es-toolkit/dist/object/clone.mjs
function it(e) {
	if (E(e)) return e;
	if (Array.isArray(e) || P(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
	let t = Object.getPrototypeOf(e);
	if (t == null) return Object.assign(Object.create(t), e);
	let n = t.constructor;
	if (e instanceof Date || e instanceof Map || e instanceof Set) return new n(e);
	if (e instanceof RegExp) {
		let t = new n(e);
		return t.lastIndex = e.lastIndex, t;
	}
	if (e instanceof DataView) return new n(e.buffer.slice(0));
	if (e instanceof Error) {
		let t;
		return t = e instanceof AggregateError ? new n(e.errors, e.message, { cause: e.cause }) : new n(e.message, { cause: e.cause }), t.stack = e.stack, Object.assign(t, e), t;
	}
	return typeof File < "u" && e instanceof File ? new n([e], e.name, {
		type: e.type,
		lastModified: e.lastModified
	}) : typeof e == "object" ? Object.assign(Object.create(t), e) : e;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
function at(e, ...t) {
	let n = t.slice(0, -1), r = t[t.length - 1], i = e;
	for (let e = 0; e < n.length; e++) {
		let t = n[e];
		i = H(i, t, r, /* @__PURE__ */ new Map());
	}
	return i;
}
function H(e, t, n, r) {
	if (E(e) && (e = Object(e)), typeof t != "object" || !t) return e;
	if (r.has(t)) return it(r.get(t));
	if (r.set(t, e), Array.isArray(t)) {
		t = t.slice();
		for (let e = 0; e < t.length; e++) t[e] = t[e] ?? void 0;
	}
	let i = [...Object.keys(t), ...Ne(t)];
	for (let a = 0; a < i.length; a++) {
		let o = i[a];
		if (Me(o)) continue;
		let s = t[o], c = e[o];
		if (L(s) && (s = { ...s }), L(c) && (c = { ...c }), N(s) && (s = tt(s)), Array.isArray(s)) if (Array.isArray(c)) {
			let e = [], t = Reflect.ownKeys(c);
			for (let n = 0; n < t.length; n++) {
				let r = t[n];
				e[r] = c[r];
			}
			c = e;
		} else if (nt(c)) {
			let e = [];
			for (let t = 0; t < c.length; t++) e[t] = c[t];
			c = e;
		} else c = [];
		let l = n(c, s, o, e, t, r);
		l === void 0 ? Array.isArray(s) || R(c) && R(s) && (V(c) || V(s) || B(c) || B(s)) ? e[o] = H(c, s, n, r) : c == null && V(s) ? e[o] = H({}, s, n, r) : c == null && B(s) ? e[o] = tt(s) : (c === void 0 || s !== void 0) && (e[o] = s) : e[o] = l;
	}
	return e;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/merge.mjs
function ot(e, ...t) {
	return at(e, ...t, rt);
}
//#endregion
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.mjs
var st = c(), ct = {
	curveBasis: te,
	curveBasisClosed: re,
	curveBasisOpen: ae,
	curveBumpX: f,
	curveBumpY: ee,
	curveBundle: se,
	curveCardinalClosed: le,
	curveCardinalOpen: ue,
	curveCardinal: ce,
	curveCatmullRomClosed: me,
	curveCatmullRomOpen: ge,
	curveCatmullRom: fe,
	curveLinear: u,
	curveLinearClosed: ve,
	curveMonotoneX: we,
	curveMonotoneY: Te,
	curveNatural: Oe,
	curveStep: w,
	curveStepAfter: ke,
	curveStepBefore: T
}, lt = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, ut = /* @__PURE__ */ t(function(e, t) {
	let n = dt(e, /(?:init\b)|(?:initialize\b)/), i = {};
	if (Array.isArray(n)) {
		let e = n.map((e) => e.args);
		r(e), i = o(i, [...e]);
	} else i = n.args;
	if (!i) return;
	let s = a(e, t), c = "config";
	return i[c] !== void 0 && (s === "flowchart-v2" && (s = "flowchart"), i[s] = i[c], delete i[c]), i;
}, "detectInit"), dt = /* @__PURE__ */ t(function(e, t = null) {
	try {
		let r = RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).*
`, "ig");
		e = e.trim().replace(r, "").replace(/'/gm, "\""), n.debug(`Detecting diagram directive${t === null ? "" : " type:" + t} based on the text:${e}`);
		let a, o = [];
		for (; (a = i.exec(e)) !== null;) if (a.index === i.lastIndex && i.lastIndex++, a && !t || t && a[1]?.match(t) || t && a[2]?.match(t)) {
			let e = a[1] ? a[1] : a[2], t = a[3] ? a[3].trim() : a[4] ? JSON.parse(a[4].trim()) : null;
			o.push({
				type: e,
				args: t
			});
		}
		return o.length === 0 ? {
			type: e,
			args: null
		} : o.length === 1 ? o[0] : o;
	} catch (r) {
		return n.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`), {
			type: void 0,
			args: null
		};
	}
}, "detectDirective"), ft = /* @__PURE__ */ t(function(e) {
	return e.replace(i, "");
}, "removeDirectives"), pt = /* @__PURE__ */ t(function(e, t) {
	for (let [n, r] of t.entries()) if (r.match(e)) return n;
	return -1;
}, "isSubstringInArray");
function U(e, t) {
	return e ? ct[`curve${e.charAt(0).toUpperCase() + e.slice(1)}`] ?? t : t;
}
t(U, "interpolateToCurve");
function mt(e, t) {
	let n = e.trim();
	if (n) return t.securityLevel === "loose" ? n : (0, st.sanitizeUrl)(n);
}
t(mt, "formatUrl");
var ht = /* @__PURE__ */ t((e, ...t) => {
	let r = e.split("."), i = r.length - 1, a = r[i], o = window;
	for (let t = 0; t < i; t++) if (o = o[r[t]], !o) {
		n.error(`Function name: ${e} not found in window`);
		return;
	}
	o[a](...t);
}, "runFunc");
function W(e, t) {
	return !e || !t ? 0 : Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);
}
t(W, "distance");
function gt(e) {
	let t, n = 0;
	return e.forEach((e) => {
		n += W(e, t), t = e;
	}), G(e, n / 2);
}
t(gt, "traverseEdge");
function _t(e) {
	return e.length === 1 ? e[0] : gt(e);
}
t(_t, "calcLabelPosition");
var vt = /* @__PURE__ */ t((e, t = 2) => {
	let n = 10 ** t;
	return Math.round(e * n) / n;
}, "roundNumber"), G = /* @__PURE__ */ t((e, t) => {
	let n, r = t;
	for (let t of e) {
		if (n) {
			let e = W(t, n);
			if (e === 0) return n;
			if (e < r) r -= e;
			else {
				let i = r / e;
				if (i <= 0) return n;
				if (i >= 1) return {
					x: t.x,
					y: t.y
				};
				if (i > 0 && i < 1) return {
					x: vt((1 - i) * n.x + i * t.x, 5),
					y: vt((1 - i) * n.y + i * t.y, 5)
				};
			}
		}
		n = t;
	}
	throw Error("Could not find a suitable point for the given distance");
}, "calculatePoint"), yt = /* @__PURE__ */ t((e, t, r) => {
	n.info(`our points ${JSON.stringify(t)}`), t[0] !== r && (t = t.reverse());
	let i = G(t, 25), a = e ? 10 : 5, o = Math.atan2(t[0].y - i.y, t[0].x - i.x), s = {
		x: 0,
		y: 0
	};
	return s.x = Math.sin(o) * a + (t[0].x + i.x) / 2, s.y = -Math.cos(o) * a + (t[0].y + i.y) / 2, s;
}, "calcCardinalityPosition");
function bt(e, t, r) {
	let i = structuredClone(r);
	n.info("our points", i), t !== "start_left" && t !== "start_right" && i.reverse();
	let a = G(i, 25 + e), o = 10 + e * .5, s = Math.atan2(i[0].y - a.y, i[0].x - a.x), c = {
		x: 0,
		y: 0
	};
	return t === "start_left" ? (c.x = Math.sin(s + Math.PI) * o + (i[0].x + a.x) / 2, c.y = -Math.cos(s + Math.PI) * o + (i[0].y + a.y) / 2) : t === "end_right" ? (c.x = Math.sin(s - Math.PI) * o + (i[0].x + a.x) / 2 - 5, c.y = -Math.cos(s - Math.PI) * o + (i[0].y + a.y) / 2 - 5) : t === "end_left" ? (c.x = Math.sin(s) * o + (i[0].x + a.x) / 2 - 5, c.y = -Math.cos(s) * o + (i[0].y + a.y) / 2 - 5) : (c.x = Math.sin(s) * o + (i[0].x + a.x) / 2, c.y = -Math.cos(s) * o + (i[0].y + a.y) / 2), c;
}
t(bt, "calcTerminalLabelPosition");
function K(e) {
	let t = "", n = "";
	for (let r of e) r !== void 0 && (r.startsWith("color:") || r.startsWith("text-align:") ? n = n + r + ";" : t = t + r + ";");
	return {
		style: t,
		labelStyle: n
	};
}
t(K, "getStylesFromArray");
var xt = 0, St = /* @__PURE__ */ t(() => (xt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + xt), "generateId");
function Ct(e) {
	let t = "";
	for (let n = 0; n < e; n++) t += "0123456789abcdef".charAt(Math.floor(Math.random() * 16));
	return t;
}
t(Ct, "makeRandomHex");
var wt = /* @__PURE__ */ t((e) => Ct(e.length), "random"), Tt = /* @__PURE__ */ t(function() {
	return {
		x: 0,
		y: 0,
		fill: void 0,
		anchor: "start",
		style: "#666",
		width: 100,
		height: 100,
		textMargin: 0,
		rx: 0,
		ry: 0,
		valign: void 0,
		text: ""
	};
}, "getTextObj"), Et = /* @__PURE__ */ t(function(e, t) {
	let n = t.text.replace(s.lineBreakRegex, " "), [, r] = Z(t.fontSize), i = e.append("text");
	i.attr("x", t.x), i.attr("y", t.y), i.style("text-anchor", t.anchor), i.style("font-family", t.fontFamily), i.style("font-size", r), i.style("font-weight", t.fontWeight), i.attr("fill", t.fill), t.class !== void 0 && i.attr("class", t.class);
	let a = i.append("tspan");
	return a.attr("x", t.x + t.textMargin * 2), a.attr("fill", t.fill), a.text(n), i;
}, "drawSimpleText"), Dt = z((e, t, n) => {
	if (!e || (n = Object.assign({
		fontSize: 12,
		fontWeight: 400,
		fontFamily: "Arial",
		joinWith: "<br/>"
	}, n), s.lineBreakRegex.test(e))) return e;
	let r = e.split(" ").filter(Boolean), i = [], a = "";
	return r.forEach((e, o) => {
		let s = J(`${e} `, n), c = J(a, n);
		if (s > t) {
			let { hyphenatedStrings: r, remainingWord: o } = Ot(e, t, "-", n);
			i.push(a, ...r), a = o;
		} else c + s >= t ? (i.push(a), a = e) : a = [a, e].filter(Boolean).join(" ");
		o + 1 === r.length && i.push(a);
	}), i.filter((e) => e !== "").join(n.joinWith);
}, (e, t, n) => `${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`), Ot = z((e, t, n = "-", r) => {
	r = Object.assign({
		fontSize: 12,
		fontWeight: 400,
		fontFamily: "Arial",
		margin: 0
	}, r);
	let i = [...e], a = [], o = "";
	return i.forEach((e, s) => {
		let c = `${o}${e}`;
		if (J(c, r) >= t) {
			let e = s + 1, t = i.length === e, r = `${c}${n}`;
			a.push(t ? c : r), o = "";
		} else o = c;
	}), {
		hyphenatedStrings: a,
		remainingWord: o
	};
}, (e, t, n = "-", r) => `${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);
function q(e, t) {
	return Y(e, t).height;
}
t(q, "calculateTextHeight");
function J(e, t) {
	return Y(e, t).width;
}
t(J, "calculateTextWidth");
var Y = z((t, n) => {
	let { fontSize: r = 12, fontFamily: i = "Arial", fontWeight: a = 400 } = n;
	if (!t) return {
		width: 0,
		height: 0
	};
	let [, o] = Z(r), c = ["sans-serif", i], l = t.split(s.lineBreakRegex), u = [], d = e("body");
	if (!d.remove) return {
		width: 0,
		height: 0,
		lineHeight: 0
	};
	let f = d.append("svg");
	for (let e of c) {
		let t = 0, n = {
			width: 0,
			height: 0,
			lineHeight: 0
		};
		for (let r of l) {
			let i = Tt();
			i.text = r || "​";
			let s = Et(f, i).style("font-size", o).style("font-weight", a).style("font-family", e), c = (s._groups || s)[0][0].getBBox();
			if (c.width === 0 && c.height === 0) throw Error("svg element not in render tree");
			n.width = Math.round(Math.max(n.width, c.width)), t = Math.round(c.height), n.height += t, n.lineHeight = Math.round(Math.max(n.lineHeight, t));
		}
		u.push(n);
	}
	return f.remove(), u[isNaN(u[1].height) || isNaN(u[1].width) || isNaN(u[1].lineHeight) || u[0].height > u[1].height && u[0].width > u[1].width && u[0].lineHeight > u[1].lineHeight ? 0 : 1];
}, (e, t) => `${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`), kt = class {
	constructor(e = !1, t) {
		this.count = 0, this.count = t ? t.length : 0, this.next = e ? () => this.count++ : () => Date.now();
	}
	static {
		t(this, "InitIDGenerator");
	}
}, X, At = /* @__PURE__ */ t(function(e) {
	return X ||= document.createElement("div"), e = escape(e).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), X.innerHTML = e, unescape(X.textContent);
}, "entityDecode");
function jt(e) {
	return "str" in e;
}
t(jt, "isDetailedError");
var Mt = /* @__PURE__ */ t((e, t, n, r) => {
	if (!r) return;
	let i = e.node()?.getBBox();
	i && e.append("text").text(r).attr("text-anchor", "middle").attr("x", i.x + i.width / 2).attr("y", -n).attr("class", t);
}, "insertTitle"), Z = /* @__PURE__ */ t((e) => {
	if (typeof e == "number") return [e, e + "px"];
	let t = parseInt(e ?? "", 10);
	return Number.isNaN(t) ? [void 0, void 0] : e === String(t) ? [t, e + "px"] : [t, e];
}, "parseFontSize");
function Q(e, t) {
	return ot({}, e, t);
}
t(Q, "cleanAndMerge");
var Nt = {
	assignWithDepth: o,
	wrapLabel: Dt,
	calculateTextHeight: q,
	calculateTextWidth: J,
	calculateTextDimensions: Y,
	cleanAndMerge: Q,
	detectInit: ut,
	detectDirective: dt,
	isSubstringInArray: pt,
	interpolateToCurve: U,
	calcLabelPosition: _t,
	calcCardinalityPosition: yt,
	calcTerminalLabelPosition: bt,
	formatUrl: mt,
	getStylesFromArray: K,
	generateId: St,
	random: wt,
	runFunc: ht,
	entityDecode: At,
	insertTitle: Mt,
	isLabelCoordinateInPath: $,
	parseFontSize: Z,
	InitIDGenerator: kt
}, Pt = /* @__PURE__ */ t(function(e) {
	let t = e;
	return t = t.replace(/style.*:\S*#.*;/g, function(e) {
		return e.substring(0, e.length - 1);
	}), t = t.replace(/classDef.*:\S*#.*;/g, function(e) {
		return e.substring(0, e.length - 1);
	}), t = t.replace(/#\w+;/g, function(e) {
		let t = e.substring(1, e.length - 1);
		return /^\+?\d+$/.test(t) ? "ﬂ°°" + t + "¶ß" : "ﬂ°" + t + "¶ß";
	}), t;
}, "encodeEntities"), Ft = /* @__PURE__ */ t(function(e) {
	return e.replace(/ﬂ°°/g, "&#").replace(/ﬂ°/g, "&").replace(/¶ß/g, ";");
}, "decodeEntities"), It = /* @__PURE__ */ t((e, t, { counter: n = 0, prefix: r, suffix: i }, a) => a || `${r ? `${r}_` : ""}${e}_${t}_${n}${i ? `_${i}` : ""}`, "getEdgeId");
function Lt(e) {
	return e ?? null;
}
t(Lt, "handleUndefinedAttr");
function $(e, t) {
	let n = Math.round(e.x), r = Math.round(e.y), i = t.replace(/(\d+\.\d+)/g, (e) => Math.round(parseFloat(e)).toString());
	return i.includes(n.toString()) || i.includes(r.toString());
}
t($, "isLabelCoordinateInPath");
//#endregion
export { ce as $, Je as A, Ke as B, ze as C, Ye as D, Ie as E, Pe as F, je as G, We as H, Re as I, w as J, ke as K, O as L, Le as M, k as N, Xe as O, Ve as P, fe as Q, Fe as R, Be as S, He as T, D as U, Ue as V, E as W, we as X, Oe as Y, Te as Z, Dt as _, Ft as a, N as b, It as c, U as d, te as et, jt as f, Nt as g, ft as h, Q as i, qe as j, M as k, K as l, wt as m, q as n, ee as nt, Pt as o, Z as p, T as q, J as r, u as rt, St as s, Y as t, f as tt, Lt as u, B as v, A as w, j as x, L as y, Ge as z };

//# sourceMappingURL=chunk-5ZQYHXKU-BD_i0OiX.js.map