import { get as e, set as t } from "./schedule.js";
//#region ../../node_modules/d3-transition/src/transition/tween.js
function n(e, n) {
	var r, i;
	return function() {
		var a = t(this, e), o = a.tween;
		if (o !== r) {
			i = r = o;
			for (var s = 0, c = i.length; s < c; ++s) if (i[s].name === n) {
				i = i.slice(), i.splice(s, 1);
				break;
			}
		}
		a.tween = i;
	};
}
function r(e, n, r) {
	var i, a;
	if (typeof r != "function") throw Error();
	return function() {
		var o = t(this, e), s = o.tween;
		if (s !== i) {
			a = (i = s).slice();
			for (var c = {
				name: n,
				value: r
			}, l = 0, u = a.length; l < u; ++l) if (a[l].name === n) {
				a[l] = c;
				break;
			}
			l === u && a.push(c);
		}
		o.tween = a;
	};
}
function i(t, i) {
	var a = this._id;
	if (t += "", arguments.length < 2) {
		for (var o = e(this.node(), a).tween, s = 0, c = o.length, l; s < c; ++s) if ((l = o[s]).name === t) return l.value;
		return null;
	}
	return this.each((i == null ? n : r)(a, t, i));
}
function a(n, r, i) {
	var a = n._id;
	return n.each(function() {
		var e = t(this, a);
		(e.value ||= {})[r] = i.apply(this, arguments);
	}), function(t) {
		return e(t, a).value[r];
	};
}
//#endregion
export { i as default, a as tweenValue };
