import { Transition } from "./src-transition-index.js";
import schedule, { get } from "./src-transition-schedule.js";
import selector from "../d3-selection/src-selector.js";
function transition_select(select) {
  var name = this._name, id = this._id;
  if (typeof select !== "function") select = selector(select);
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
    for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
      if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
        if ("__data__" in node) subnode.__data__ = node.__data__;
        subgroup[i] = subnode;
        schedule(subgroup[i], name, id, i, subgroup, get(node, id));
      }
    }
  }
  return new Transition(subgroups, this._parents, name, id);
}
export {
  transition_select as default
};
//# sourceMappingURL=src-transition-select.js.map
