import matcher_default from "../matcher.js";
import { Selection } from "./index.js";
function filter_default(n) {
	typeof n != "function" && (n = matcher_default(n));
	for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = [], u, d = 0; d < c; ++d) (u = s[d]) && n.call(u, u.__data__, d, s) && l.push(u);
	return new Selection(a, this._parents);
}
export { filter_default as default };
