function a(n) {
  var t = !1, u = n.length, r = [];
  return n.length ? new Promise(function(o, f) {
    n.forEach(function(c, i) {
      c.catch(function(e) {
        return t = !0, e;
      }).then(function(e) {
        u -= 1, r[i] = e, !(u > 0) && (t && f(r), o(r));
      });
    });
  }) : Promise.resolve([]);
}
export {
  a as allPromiseFinish
};
