function p(o, r) {
  for (var e = this, i = [e], t = [], h, n, l, d = -1; e = i.pop(); )
    if (t.push(e), h = e.children)
      for (n = 0, l = h.length; n < l; ++n)
        i.push(h[n]);
  for (; e = t.pop(); )
    o.call(r, e, ++d, this);
  return this;
}
export {
  p as default
};
