import l from "./getScrollParent.js";
import m from "./getParentNode.js";
import d from "./getWindow.js";
import v from "./isScrollParent.js";
function u(t, o) {
  var a;
  o === void 0 && (o = []);
  var r = l(t), e = r === ((a = t.ownerDocument) == null ? void 0 : a.body), n = d(r), i = e ? [n].concat(n.visualViewport || [], v(r) ? r : []) : r, c = o.concat(i);
  return e ? c : (
    // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
    c.concat(u(m(i)))
  );
}
export {
  u as default
};
//# sourceMappingURL=listScrollParents.js.map
