import e from "../../../d3-selection/src/namespace.js";
//#region ../../node_modules/d3-transition/src/transition/attrTween.js
function t(e, t) {
	return function(n) {
		this.setAttribute(e, t.call(this, n));
	};
}
function n(e, t) {
	return function(n) {
		this.setAttributeNS(e.space, e.local, t.call(this, n));
	};
}
function r(e, t) {
	var r, i;
	function a() {
		var a = t.apply(this, arguments);
		return a !== i && (r = (i = a) && n(e, a)), r;
	}
	return a._value = t, a;
}
function i(e, n) {
	var r, i;
	function a() {
		var a = n.apply(this, arguments);
		return a !== i && (r = (i = a) && t(e, a)), r;
	}
	return a._value = n, a;
}
function a(t, n) {
	var a = "attr." + t;
	if (arguments.length < 2) return (a = this.tween(a)) && a._value;
	if (n == null) return this.tween(a, null);
	if (typeof n != "function") throw Error();
	var o = e(t);
	return this.tween(a, (o.local ? r : i)(o, n));
}
//#endregion
export { a as default };
