function magnifiedAzimuthalMutator(raw) {
const rad = Math.PI / 180,
deg = 180 / Math.PI,
epsilon = 1e-4;
let b1 = 30 * rad,
b2 = 120 * rad,
n = 0.5;
const mutate = d3.geoProjectionMutator(raw);
const projection = mutate(b1, b2, n);
projection.innerRadius = function(inner) {
if (!arguments.length) return b1 * deg;
b1 = Math.max(epsilon, Math.min(90 - epsilon, inner)) * rad;
if (b1 > b2) { let tmp = b1; b1 = b2, b2 = tmp; }
if (b1 === b2) b2 += epsilon;
mutate(b1, b2, n);
return projection.clipAngle(b2 * deg);
}
projection.outerRadius = function(outer) {
if (!arguments.length) return b1 * deg;
b2 = Math.max(epsilon, Math.min(180 - epsilon, outer)) * rad;
if (b1 > b2) { let tmp = b1; b1 = b2, b2 = tmp; }
if (b1 === b2) b2 += epsilon;
mutate(b1, b2, n);
return projection.clipAngle(b2 * deg);
}
projection.ratio = function(ratio) {
if (!arguments.length) return ratio;
n = Math.max(0, Math.min(1, ratio));
mutate(b1, b2, n);
return projection;
}
return projection.clipAngle(b2 * deg);
}