// d3-transition@3.0.1 downloaded from https://ga.jspm.io/npm:d3-transition@3.0.1/src/index.js import{namespace as t,matcher as n,selector as e,selectorAll as r,selection as i,style as o}from"d3-selection";import{dispatch as a}from"d3-dispatch";import{timer as s,timeout as u,now as l}from"d3-timer";import{interpolateNumber as c,interpolateRgb as f,interpolateString as h,interpolateTransformSvg as _,interpolateTransformCss as v}from"d3-interpolate";import{color as d}from"d3-color";import{easeCubicInOut as p}from"d3-ease";var y=a("start","end","cancel","interrupt");var w=[];var m=0;var g=1;var T=2;var x=3;var C=4;var A=5;var N=6;function schedule(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};create(t,e,{name:n,index:r,group:i,on:y,tween:w,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:m})}function init(t,n){var e=get(t,n);if(e.state>m)throw new Error("too late; already scheduled");return e}function set(t,n){var e=get(t,n);if(e.state>x)throw new Error("too late; already running");return e}function get(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function create(t,n,e){var r,i=t.__transition;i[n]=e;e.timer=s(schedule,0,e.time);function schedule(t){e.state=g;e.timer.restart(start,e.delay,e.time);e.delay<=t&&start(t-e.delay)}function start(o){var a,s,l,c;if(e.state!==g)return stop();for(a in i){c=i[a];if(c.name===e.name){if(c.state===x)return u(start);if(c.state===C){c.state=N;c.timer.stop();c.on.call("interrupt",t,t.__data__,c.index,c.group);delete i[a]}else if(+aT&&e.state=0&&(t=t.slice(0,n));return!t||"start"===t}))}function onFunction(t,n,e){var r,i,o=start(n)?init:set;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(n,e);a.on=i}}function transition_on(t,n){var e=this._id;return arguments.length<2?get(this.node(),e).on.on(t):this.each(onFunction(e,t,n))}function removeFunction(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(t){var n=this._name,r=this._id;"function"!==typeof t&&(t=e(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;sg&&e.name===n)return new Transition([[t]],I,n,+r)}return null}export{active,interrupt,transition};