/* esm.sh - d3-transition@3.0.1/src/transition/attr */
import{interpolateTransformSvg as c}from"../../../../d3-interpolate@^3.0.1?target=es2022";import{namespace as l}from"../../../../d3-selection@^3.0.0?target=es2022";import{tweenValue as f}from"./tween.mjs";import g from"./interpolate.mjs";function p(t){return function(){this.removeAttribute(t)}}function v(t){return function(){this.removeAttributeNS(t.space,t.local)}}function h(t,e,r){var i,u=r+"",o;return function(){var n=this.getAttribute(t);return n===u?null:n===i?o:o=e(i=n,r)}}function m(t,e,r){var i,u=r+"",o;return function(){var n=this.getAttributeNS(t.space,t.local);return n===u?null:n===i?o:o=e(i=n,r)}}function b(t,e,r){var i,u,o;return function(){var n,a=r(this),s;return a==null?void this.removeAttribute(t):(n=this.getAttribute(t),s=a+"",n===s?null:n===i&&s===u?o:(u=s,o=e(i=n,a)))}}function A(t,e,r){var i,u,o;return function(){var n,a=r(this),s;return a==null?void this.removeAttributeNS(t.space,t.local):(n=this.getAttributeNS(t.space,t.local),s=a+"",n===s?null:n===i&&s===u?o:(u=s,o=e(i=n,a)))}}function w(t,e){var r=l(t),i=r==="transform"?c:g;return this.attrTween(t,typeof e=="function"?(r.local?A:b)(r,i,f(this,"attr."+t,e)):e==null?(r.local?v:p)(r):(r.local?m:h)(r,i,e))}export{w as default};
//# sourceMappingURL=attr.mjs.map