var epsilon2 = 1e-12;
function cosh(e) {
	return ((e = Math.exp(e)) + 1 / e) / 2;
}
function sinh(e) {
	return ((e = Math.exp(e)) - 1 / e) / 2;
}
function tanh(e) {
	return ((e = Math.exp(2 * e)) - 1) / (e + 1);
}
var zoom_default = (function i(a, o, s) {
	function c(i, c) {
		var l = i[0], u = i[1], d = i[2], f = c[0], p = c[1], m = c[2], h = f - l, g = p - u, _ = h * h + g * g, v, y;
		if (_ < epsilon2) y = Math.log(m / d) / a, v = function(e) {
			return [
				l + e * h,
				u + e * g,
				d * Math.exp(a * e * y)
			];
		};
		else {
			var b = Math.sqrt(_), x = (m * m - d * d + s * _) / (2 * d * o * b), S = (m * m - d * d - s * _) / (2 * m * o * b), C = Math.log(Math.sqrt(x * x + 1) - x);
			y = (Math.log(Math.sqrt(S * S + 1) - S) - C) / a, v = function(e) {
				var i = e * y, s = cosh(C), c = d / (o * b) * (s * tanh(a * i + C) - sinh(C));
				return [
					l + c * h,
					u + c * g,
					d * s / cosh(a * i + C)
				];
			};
		}
		return v.duration = y * 1e3 * a / Math.SQRT2, v;
	}
	return c.rho = function(e) {
		var n = Math.max(.001, +e), r = n * n;
		return i(n, r, r * r);
	}, c;
})(Math.SQRT2, 2, 4);
export { zoom_default as default };
