//#region ../../node_modules/d3-shape/src/curve/cardinal.js
function e(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 t(e, t) {
	this._context = e, this._k = (1 - t) / 6;
}
t.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:
				e(this, this._x1, this._y1);
				break;
		}
		(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
	},
	point: function(t, n) {
		switch (t = +t, n = +n, this._point) {
			case 0:
				this._point = 1, this._line ? this._context.lineTo(t, n) : this._context.moveTo(t, n);
				break;
			case 1:
				this._point = 2, this._x1 = t, this._y1 = n;
				break;
			case 2: this._point = 3;
			default:
				e(this, t, n);
				break;
		}
		this._x0 = this._x1, this._x1 = this._x2, this._x2 = t, this._y0 = this._y1, this._y1 = this._y2, this._y2 = n;
	}
};
var n = (function e(n) {
	function r(e) {
		return new t(e, n);
	}
	return r.tension = function(t) {
		return e(+t);
	}, r;
})(0);
//#endregion
export { t as Cardinal, n as default, e as point };
