"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index = require("./src-selection-index.cjs");
const selector = require("./src-selector.cjs");
function selection_select(select) {
  if (typeof select !== "function") select = selector.default(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;
      }
    }
  }
  return new index.Selection(subgroups, this._parents);
}
exports.default = selection_select;
//# sourceMappingURL=src-selection-select.cjs.map
