summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2019-05-26 14:41:38 -0700
committerAlexander Early <alexander.early@gmail.com>2019-05-26 14:41:38 -0700
commit000d9b8a5320939bd79e49d6a678febb42f980e9 (patch)
tree5c3c1be09ee239553950973e3beb3df7ab0bfe98
parentcd0486e47f9f26ee1bf3e29c1523ce648cf643ce (diff)
downloadasync-000d9b8a5320939bd79e49d6a678febb42f980e9.tar.gz
Update built files
-rw-r--r--dist/async.js22
-rw-r--r--dist/async.min.js2
2 files changed, 17 insertions, 7 deletions
diff --git a/dist/async.js b/dist/async.js
index 0f015bb..d58e1f6 100644
--- a/dist/async.js
+++ b/dist/async.js
@@ -1256,14 +1256,10 @@
throw new Error('task callback must be a function');
}
q.started = true;
- if (Array.isArray(data)) {
- if (data.length === 0 && q.idle()) {
- // call drain immediately if there are no tasks
- return setImmediate$1(() => trigger('drain'));
- }
+ /*if (Array.isArray(data)) {
return data.map(datum => _insert(datum, insertAtFront, callback));
- }
+ }*/
var res;
@@ -1357,6 +1353,13 @@
started: false,
paused: false,
push (data, callback) {
+ if (Array.isArray(data)) {
+ if (data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return setImmediate$1(() => trigger('drain'));
+ }
+ return data.map(datum => _insert(datum, false, callback))
+ }
return _insert(data, false, callback);
},
kill () {
@@ -1364,6 +1367,13 @@
q._tasks.empty();
},
unshift (data, callback) {
+ if (Array.isArray(data)) {
+ if (data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ return setImmediate$1(() => trigger('drain'));
+ }
+ return data.map(datum => _insert(datum, true, callback))
+ }
return _insert(data, true, callback);
},
remove (testFn) {
diff --git a/dist/async.min.js b/dist/async.min.js
index 996f15f..3ec3460 100644
--- a/dist/async.min.js
+++ b/dist/async.min.js
@@ -1 +1 @@
-(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.async={})})(this,function(e){'use strict';function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}function a(e){setTimeout(e,0)}function i(e){return(t,...n)=>e(()=>t(...n))}function r(e){return u(e)?function(...t){const n=t.pop(),a=e.apply(this,t);return s(a,n)}:n(function(t,n){var a;try{a=e.apply(this,t)}catch(t){return n(t)}return a&&"function"==typeof a.then?s(a,n):void n(null,a)})}function s(e,t){return e.then(e=>{l(t,null,e)},e=>{l(t,e&&e.message?e:new Error(e))})}function l(e,t,n){try{e(t,n)}catch(e){Ee(t=>{throw t},e)}}function u(e){return"AsyncFunction"===e[Symbol.toStringTag]}function c(e){return"AsyncGenerator"===e[Symbol.toStringTag]}function d(e){return"function"==typeof e[Symbol.asyncIterator]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return u(e)?r(e):e}function o(e,t=e.length){function n(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise((a,i)=>{n[t-1]=(e,...t)=>e?i(e):void a(1<t.length?t:t[0]),e.apply(this,n)})}if(!t)throw new Error("arity is undefined");return Object.defineProperty(n,"name",{value:`awaitable(${e.name})`}),n}function h(e){return function(t,...n){const a=o(function(a){var i=this;return e(t,(e,t)=>{p(e).apply(i,n.concat(t))},a)});return a}}function f(e,t,n,a){t=t||[];var i=[],r=0,s=p(n);return e(t,(e,t,n)=>{var a=r++;s(e,(e,t)=>{i[a]=t,n(e)})},e=>{a(e,i)})}function y(e){return e&&"number"==typeof e.length&&0<=e.length&&0==e.length%1}function m(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function g(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function k(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}function v(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}function S(e){var t=e?Object.keys(e):[],n=-1,a=t.length;return function(){var i=t[++n];return n<a?{value:e[i],key:i}:null}}function L(e){if(y(e))return k(e);var t=g(e);return t?v(t):S(e)}function x(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function E(e,t,n,a){function i(){d>=t||c||l||(c=!0,e.next().then(({value:e,done:t})=>{if(!(u||l))return c=!1,t?(l=!0,void(0>=d&&a(null))):void(d++,n(e,p,r),p++,i())}).catch(s))}function r(e,t){return d-=1,u?void 0:e?s(e):!1===e?(l=!0,void(u=!0)):t===be||l&&0>=d?(l=!0,a(null)):void i()}function s(e){u||(c=!1,l=!0,a(e))}let l=!1,u=!1,c=!1,d=0,p=0;i()}function b(e,t,n){function a(e,t){!1===e&&(l=!0);!0===l||(e?n(e):(++r===s||t===be)&&n(null))}n=m(n);var i=0,r=0,{length:s}=e,l=!1;for(0===s&&n(null);i<s;i++)t(e[i],i,x(a))}function O(e,t,n){return _e(e,1/0,t,n)}function _(){function e(e,...a){return e?n(e):void t(1<a.length?a:a[0])}let t,n;return e[Fe]=new Promise((e,a)=>{t=e,n=a}),e}function M(e,t,n){function a(e,t){g.push(()=>l(e,t))}function i(){if(!h){if(0===g.length&&0===o)return n(null,d);for(;g.length&&o<t;){var e=g.shift();e()}}}function r(e,t){var n=y[e];n||(n=y[e]=[]),n.push(t)}function s(e){var t=y[e]||[];t.forEach(e=>e()),i()}function l(e,t){if(!f){var a=x((t,...a)=>{if(o--,!1===t)return void(h=!0);if(2>a.length&&([a]=a),t){var i={};if(Object.keys(d).forEach(e=>{i[e]=d[e]}),i[e]=a,f=!0,y=Object.create(null),h)return;n(t,i)}else d[e]=a,s(e)});o++;var i=p(t[t.length-1]);1<t.length?i(d,a):i(a)}}function u(t){var n=[];return Object.keys(e).forEach(a=>{const i=e[a];Array.isArray(i)&&0<=i.indexOf(t)&&n.push(a)}),n}"number"!=typeof t&&(n=t,t=null),n=m(n||_());var c=Object.keys(e).length;if(!c)return n(null);t||(t=c);var d={},o=0,h=!1,f=!1,y=Object.create(null),g=[],k=[],v={};return Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n))return a(t,[n]),void k.push(t);var i=n.slice(0,n.length-1),s=i.length;return 0===s?(a(t,n),void k.push(t)):void(v[t]=s,i.forEach(l=>{if(!e[l])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+l+"` in "+i.join(", "));r(l,()=>{s--,0===s&&a(t,n)})}))}),function(){for(var e,t=0;k.length;)e=k.pop(),t++,u(e).forEach(e=>{0==--v[e]&&k.push(e)});if(t!==c)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),i(),n[Fe]}function I(e){const t=e.toString().replace(ze,"");let n=t.match(Pe);if(n||(n=t.match(Te)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,a]=n;return a.replace(/\s/g,"").split(Re).map(e=>e.replace(Ce,"").trim())}function j(e,t){var n={};return Object.keys(e).forEach(t=>{function a(e,t){var n=i.map(t=>e[t]);n.push(t),p(r)(...n)}var i,r=e[t],s=u(r),l=!s&&1===r.length||s&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(0<i.length?a:r);else if(l)n[t]=r;else{if(i=I(r),0===r.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),n[t]=i.concat(a)}}),M(n,t)}function A(e,t){e.length=1,e.head=e.tail=t}function w(e,t,n){function a(e,t){h[e].push(t)}function i(e,t){const n=(...a)=>{r(e,n),t(...a)};h[e].push(n)}function r(e,t){return e?t?void(h[e]=h[e].filter(e=>e!==t)):h[e]=[]:Object.keys(h).forEach(e=>h[e]=[])}function s(e,...t){h[e].forEach(e=>e(...t))}function l(e,t,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(g.started=!0,Array.isArray(e))return 0===e.length&&g.idle()?Ee(()=>s("drain")):e.map(e=>l(e,t,n));var a,i={data:e,callback:n||function(e,...t){return e?void 0:1>=t.length?a(t[0]):void a(t)}};if(t?g._tasks.unshift(i):g._tasks.push(i),f||(f=!0,Ee(()=>{f=!1,g.process()})),!n)return new Promise(e=>{a=e})}function u(e){return function(t,...n){d-=1;for(var a=0,r=e.length;a<r;a++){var l=e[a],u=o.indexOf(l);0===u?o.shift():0<u&&o.splice(u,1),l.callback(t,...n),null!=t&&s("error",t,l.data)}d<=g.concurrency-g.buffer&&s("unsaturated"),g.idle()&&s("drain"),g.process()}}if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var c=p(e),d=0,o=[];const h={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};var f=!1;const y=e=>t=>t?void(r(e),a(e,t)):new Promise((t,n)=>{i(e,(e,a)=>e?n(e):void t(a))});var m=!1,g={_tasks:new Ye,*[Symbol.iterator](){yield*g._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return l(e,!1,t)},kill(){r(),g._tasks.empty()},unshift(e,t){return l(e,!0,t)},remove(e){g._tasks.remove(e)},process(){var e=Math.min;if(!m){for(m=!0;!g.paused&&d<g.concurrency&&g._tasks.length;){var t=[],n=[],a=g._tasks.length;g.payload&&(a=e(a,g.payload));for(var r,p=0;p<a;p++)r=g._tasks.shift(),t.push(r),o.push(r),n.push(r.data);d+=1,0===g._tasks.length&&s("empty"),d===g.concurrency&&s("saturated");var h=x(u(t));c(n,h)}m=!1}},length(){return g._tasks.length},running(){return d},workersList(){return o},idle(){return 0===g._tasks.length+d},pause(){g.paused=!0},resume(){!1===g.paused||(g.paused=!1,Ee(g.process))}};return Object.defineProperties(g,{saturated:{writable:!1,value:y("saturated")},unsaturated:{writable:!1,value:y("unsaturated")},empty:{writable:!1,value:y("empty")},drain:{writable:!1,value:y("drain")},error:{writable:!1,value:y("error")}}),g}function B(e,t){return w(e,1,t)}function F(e,t,n){return w(e,t,n)}function P(...e){var t=e.map(p);return function(...e){var n=this,a=e[e.length-1];return"function"==typeof a?e.pop():a=_(),Ne(t,e,(e,t,a)=>{t.apply(n,e.concat((e,...t)=>{a(e,t)}))},(e,t)=>a(e,...t)),a[Fe]}}function T(...e){return P(...e.reverse())}function R(...e){return function(...t){var n=t.pop();return n(null,...e)}}function C(e,t){return(n,a,i,r)=>{var s,l=!1;const u=p(i);n(a,(n,a,i)=>{u(n,(a,r)=>a||!1===a?i(a):e(r)&&!s?(l=!0,s=t(!0,n),i(null,be)):void i())},e=>e?r(e):void r(null,l?s:t(!1)))}}function z(e){return(t,...n)=>p(t)(...n,(t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}function Y(e,t,n){const a=p(t);return Je(e,(...e)=>{const t=e.pop();a(...e,(e,n)=>t(e,!n))},n)}function V(e){return(t,n,a)=>e(t,a)}function N(e){return u(e)?e:function(...t){var n=t.pop(),a=!0;t.push((...e)=>{a?Ee(()=>n(...e)):n(...e)}),e.apply(this,t),a=!1}}function q(e,t,n,a){var r=Array(t.length);e(t,(e,t,a)=>{n(e,(e,n)=>{r[t]=!!n,a(e)})},e=>{if(e)return a(e);for(var n=[],s=0;s<t.length;s++)r[s]&&n.push(t[s]);a(null,n)})}function D(e,t,n,a){var i=[];e(t,(e,t,a)=>{n(e,(n,r)=>n?a(n):void(r&&i.push({index:t,value:e}),a(n)))},e=>e?a(e):void a(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value)))}function Q(e,t,n,a){var i=y(t)?q:D;return i(e,t,p(n),a)}function U(e,t,n){return lt(e,1/0,t,n)}function G(e,t,n){return lt(e,1,t,n)}function W(e,t,n){return ct(e,1/0,t,n)}function K(e,t,n){return ct(e,1,t,n)}function X(e,t=e=>e){var a=Object.create(null),r=Object.create(null),s=p(e),l=n((e,n)=>{var u=t(...e);u in a?Ee(()=>n(null,...a[u])):u in r?r[u].push(n):(r[u]=[n],s(...e,(e,...t)=>{e||(a[u]=t);var n=r[u];delete r[u];for(var s=0,c=n.length;s<c;s++)n[s](e,...t)}))});return l.memo=a,l.unmemoized=e,l}function J(e,t){return pt(Me,e,t)}function Z(e,t,n){return pt(Oe(t),e,n)}function $(e,t){var n=p(e);return w((e,t)=>{n(e[0],t)},t,1)}function H(e){return(e<<1)+1}function ee(e){return(e+1>>1)-1}function te(e,t){return e.priority===t.priority?e.pushCount<t.pushCount:e.priority<t.priority}function ne(e,t){var n=$(e,t);return n._tasks=new ot,n.push=function(e,t=0,a=()=>{}){if("function"!=typeof a)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return Ee(()=>n.drain());for(var r,s=0,u=e.length;s<u;s++)r={data:e[s],priority:t,callback:a},n._tasks.push(r);Ee(n.process)},delete n.unshift,n}function ae(e,t,n,a){var i=[...e].reverse();return Ne(i,t,n,a)}function ie(e){var t=p(e);return n(function(e,n){return e.push((e,...t)=>{let a={};if(e&&(a.error=e),0<t.length){var i=t;1>=t.length&&([i]=t),a.value=i}n(null,a)}),t.apply(this,e)})}function re(e){var t;return Array.isArray(e)?t=e.map(ie):(t={},Object.keys(e).forEach(n=>{t[n]=ie.call(this,e[n])})),t}function se(e,t,n,a){const i=p(n);return Q(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},a)}function le(e){return function(){return e}}function ue(e,t,n){function a(){r((e,...t)=>{!1===e||(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(a,i.intervalFunc(s-1)):n(e,...t))})}var i={times:gt,intervalFunc:le(kt)};if(3>arguments.length&&"function"==typeof e?(n=t||_(),t=e):(ce(i,e),n=n||_()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=p(t),s=1;return a(),n[Fe]}function ce(e,n){if("object"==typeof n)e.times=+n.times||gt,e.intervalFunc="function"==typeof n.interval?n.interval:le(+n.interval||kt),e.errorFilter=n.errorFilter;else if("number"==typeof n||"string"==typeof n)e.times=+n||gt;else throw new Error("Invalid arguments for async.retry")}function de(e,t){t||(t=e,e=null);let a=e&&e.arity||t.length;u(t)&&(a+=1);var i=p(t);return n((t,n)=>{function r(e){i(...t,e)}return(t.length<a-1||null==n)&&(t.push(n),n=_()),e?ue(e,r,n):ue(r,n),n[Fe]})}function pe(e,t){return pt(Ae,e,t)}function oe(e,t,a){var i=p(e);return n((n,r)=>{var s,l=!1;n.push((...e)=>{l||(r(...e),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",n=new Error("Callback function \""+t+"\" timed out.");n.code="ETIMEDOUT",a&&(n.info=a),l=!0,r(n)},t),i(...n)})}function he(e){for(var t=Array(e);e--;)t[e]=e;return t}function fe(e,t,n,a){var i=p(n);return qe(he(e),t,i,a)}function ye(e,t,n){return fe(e,1/0,t,n)}function me(e,t,n){return fe(e,1,t,n)}function ge(e,t,n,a){3>=arguments.length&&"function"==typeof t&&(a=n,n=t,t=Array.isArray(e)?[]:{}),a=m(a||_());var i=p(n);return Me(e,(e,n,a)=>{i(t,e,n,a)},e=>a(e,t)),a[Fe]}function ke(e){return(...t)=>(e.unmemoized||e)(...t)}function ve(e,t,n){const a=p(e);return bt(e=>a((t,n)=>e(t,!n)),t,n)}var Se,Le="function"==typeof setImmediate&&setImmediate,xe="object"==typeof process&&"function"==typeof process.nextTick;Se=Le?setImmediate:xe?process.nextTick:a;var Ee=i(Se);const be={};var Oe=e=>(t,n,a)=>{function i(e,t){if(!u)if(p-=1,e)l=!0,a(e);else if(!1===e)l=!0,u=!0;else{if(t===be||l&&0>=p)return l=!0,a(null);o||r()}}function r(){for(o=!0;p<e&&!l;){var t=s();if(null===t)return l=!0,void(0>=p&&a(null));p+=1,n(t.value,t.key,x(i))}o=!1}if(a=m(a),0>=e)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return a(null);if(c(t))return E(t,e,n,a);if(d(t))return E(t[Symbol.asyncIterator](),e,n,a);var s=L(t),l=!1,u=!1,p=0,o=!1;r()},_e=o(function(e,t,n,a){return Oe(t)(e,p(n),a)},4),Me=o(function(e,t,n){var a=y(e)?b:O;return a(e,p(t),n)},3),Ie=o(function(e,t,n){return f(Me,e,t,n)},3),je=h(Ie),Ae=o(function(e,t,n){return _e(e,1,t,n)},3),we=o(function(e,t,n){return f(Ae,e,t,n)},3),Be=h(we);const Fe=Symbol("promiseCallback");var Pe=/^(?:async\s+)?(?:function)?\s*[^(]*\(\s*([^)]+)\s*\)(?:\s*{)/m,Te=/^(?:async\s+)?(?:function\s+)?\(?\s*([^)^=]+)\s*\)?(?:\s*=>)/m,Re=/,/,Ce=/(=.+)?(\s*)$/,ze=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;class Ye{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):A(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):A(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}var Ve,Ne=o(function(e,t,n,a){a=m(a);var r=p(n);return Ae(e,(e,n,a)=>{r(t,e,(e,n)=>{t=n,a(e)})},e=>a(e,t))},4),qe=o(function(e,t,n,a){return f(Oe(t),e,n,a)},4),De=o(function(e,t,n,a){var i=p(n);return qe(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return a(e,n)})},4),Qe=o(function(e,t,n){return De(e,1/0,t,n)},3),Ue=o(function(e,t,n){return De(e,1,t,n)},3),Ge=o(function(e,t,n){return C(e=>e,(e,t)=>t)(Me,e,t,n)},3),We=o(function(e,t,n,a){return C(e=>e,(e,t)=>t)(Oe(t),e,n,a)},4),Ke=o(function(e,t,n){return C(e=>e,(e,t)=>t)(Oe(1),e,t,n)},3),Xe=z("dir"),Je=o(function(e,t,n){function a(e,...t){return e?n(e):void(!1===e||(r=t,l(...t,i)))}function i(e,t){return e?n(e):!1===e?void 0:t?void s(a):n(null,...r)}n=x(n);var r,s=p(e),l=p(t);return i(null,!0)},3),Ze=o(function(e,t,n){return Me(e,V(p(t)),n)},3),$e=o(function(e,t,n,a){return Oe(t)(e,V(p(n)),a)},4),He=o(function(e,t,n){return $e(e,1,t,n)},3),et=o(function(e,t,n){return C(e=>!e,e=>!e)(Me,e,t,n)},3),tt=o(function(e,t,n,a){return C(e=>!e,e=>!e)(Oe(t),e,n,a)},4),nt=o(function(e,t,n){return C(e=>!e,e=>!e)(Ae,e,t,n)},3),at=o(function(e,t,n){return Q(Me,e,t,n)},3),it=o(function(e,t,n,a){return Q(Oe(t),e,n,a)},4),rt=o(function(e,t,n){return Q(Ae,e,t,n)},3),st=o(function(e,t){function n(e){return e?a(e):void(!1===e||i(n))}var a=x(t),i=p(N(e));return n()},2),lt=o(function(e,t,n,a){var i=p(n);return qe(e,t,(e,t)=>{i(e,(n,a)=>n?t(n):t(n,{key:a,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:l}=t[s],{val:u}=t[s];r.call(n,l)?n[l].push(u):n[l]=[u]}return a(e,n)})},4),ut=z("log"),ct=o(function(e,t,n,a){a=m(a);var i={},r=p(n);return Oe(t)(e,(e,t,n)=>{r(e,t,(e,a)=>e?n(e):void(i[t]=a,n(e)))},e=>a(e,i))},4);Ve=xe?process.nextTick:Le?setImmediate:a;var dt=i(Ve),pt=o((e,t,n)=>{var a=y(t)?[]:{};e(t,(e,t,n)=>{p(e)((e,...i)=>{2>i.length&&([i]=i),a[t]=i,n(e)})},e=>n(e,a))},3);class ot{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){for(let n;0<e&&te(this.heap[e],this.heap[n=ee(e)]);){let a=this.heap[e];this.heap[e]=this.heap[n],this.heap[n]=a,e=n}}percDown(e){for(let n,a;(n=H(e))<this.heap.length&&(n+1<this.heap.length&&te(this.heap[n+1],this.heap[n])&&++n,!te(this.heap[e],this.heap[n]));)a=this.heap[e],this.heap[e]=this.heap[n],this.heap[n]=a,e=n}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let t=ee(this.heap.length-1);0<=t;t--)this.percDown(t);return this}}var ht=o(function(e,t){if(t=m(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,a=e.length;n<a;n++)p(e[n])(t)},2),ft=o(function(e,t,n){return se(Me,e,t,n)},3),yt=o(function(e,t,n,a){return se(Oe(t),e,n,a)},4),mt=o(function(e,t,n){return se(Ae,e,t,n)},3);const gt=5,kt=0;var vt=o(function(e,t,n){return C(Boolean,e=>e)(Me,e,t,n)},3),St=o(function(e,t,n,a){return C(Boolean,e=>e)(Oe(t),e,n,a)},4),Lt=o(function(e,t,n){return C(Boolean,e=>e)(Ae,e,t,n)},3),xt=o(function(e,t,n){function a(e,t){var n=e.criteria,a=t.criteria;return n<a?-1:n>a?1:0}var i=p(t);return Ie(e,(e,t)=>{i(e,(n,a)=>n?t(n):void t(n,{value:e,criteria:a}))},(e,t)=>e?n(e):void n(null,t.sort(a).map(e=>e.value)))},3),Et=o(function(e,t){var n,a=null;return He(e,(e,t)=>{p(e)((e,...i)=>!1===e?t(e):void(2>i.length?[n]=i:n=i,a=e,t(e?null:{})))},()=>t(a,n))}),bt=o(function(e,t,n){function a(e,...t){if(e)return n(e);l=t;!1===e||s(i)}function i(e,t){return e?n(e):!1===e?void 0:t?void r(a):n(null,...l)}n=x(n);var r=p(t),s=p(e),l=[];return s(i)},3),Ot=o(function(e,t){function n(t){var n=p(e[i++]);n(...t,x(a))}function a(a,...r){return!1===a?void 0:a||i===e.length?t(a,...r):void n(r)}if(t=m(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var i=0;n([])});e.default={apply:t,applyEach:je,applyEachSeries:Be,asyncify:r,auto:M,autoInject:j,cargo:B,cargoQueue:F,compose:T,concat:Qe,concatLimit:De,concatSeries:Ue,constant:R,detect:Ge,detectLimit:We,detectSeries:Ke,dir:Xe,doUntil:Y,doWhilst:Je,each:Ze,eachLimit:$e,eachOf:Me,eachOfLimit:_e,eachOfSeries:Ae,eachSeries:He,ensureAsync:N,every:et,everyLimit:tt,everySeries:nt,filter:at,filterLimit:it,filterSeries:rt,forever:st,groupBy:U,groupByLimit:lt,groupBySeries:G,log:ut,map:Ie,mapLimit:qe,mapSeries:we,mapValues:W,mapValuesLimit:ct,mapValuesSeries:K,memoize:X,nextTick:dt,parallel:J,parallelLimit:Z,priorityQueue:ne,queue:$,race:ht,reduce:Ne,reduceRight:ae,reflect:ie,reflectAll:re,reject:ft,rejectLimit:yt,rejectSeries:mt,retry:ue,retryable:de,seq:P,series:pe,setImmediate:Ee,some:vt,someLimit:St,someSeries:Lt,sortBy:xt,timeout:oe,times:ye,timesLimit:fe,timesSeries:me,transform:ge,tryEach:Et,unmemoize:ke,until:ve,waterfall:Ot,whilst:bt,all:et,allLimit:tt,allSeries:nt,any:vt,anyLimit:St,anySeries:Lt,find:Ge,findLimit:We,findSeries:Ke,flatMap:Qe,flatMapLimit:De,flatMapSeries:Ue,forEach:Ze,forEachSeries:He,forEachLimit:$e,forEachOf:Me,forEachOfSeries:Ae,forEachOfLimit:_e,inject:Ne,foldl:Ne,foldr:ae,select:at,selectLimit:it,selectSeries:rt,wrapSync:r,during:bt,doDuring:Je},e.apply=t,e.applyEach=je,e.applyEachSeries=Be,e.asyncify=r,e.auto=M,e.autoInject=j,e.cargo=B,e.cargoQueue=F,e.compose=T,e.concat=Qe,e.concatLimit=De,e.concatSeries=Ue,e.constant=R,e.detect=Ge,e.detectLimit=We,e.detectSeries=Ke,e.dir=Xe,e.doUntil=Y,e.doWhilst=Je,e.each=Ze,e.eachLimit=$e,e.eachOf=Me,e.eachOfLimit=_e,e.eachOfSeries=Ae,e.eachSeries=He,e.ensureAsync=N,e.every=et,e.everyLimit=tt,e.everySeries=nt,e.filter=at,e.filterLimit=it,e.filterSeries=rt,e.forever=st,e.groupBy=U,e.groupByLimit=lt,e.groupBySeries=G,e.log=ut,e.map=Ie,e.mapLimit=qe,e.mapSeries=we,e.mapValues=W,e.mapValuesLimit=ct,e.mapValuesSeries=K,e.memoize=X,e.nextTick=dt,e.parallel=J,e.parallelLimit=Z,e.priorityQueue=ne,e.queue=$,e.race=ht,e.reduce=Ne,e.reduceRight=ae,e.reflect=ie,e.reflectAll=re,e.reject=ft,e.rejectLimit=yt,e.rejectSeries=mt,e.retry=ue,e.retryable=de,e.seq=P,e.series=pe,e.setImmediate=Ee,e.some=vt,e.someLimit=St,e.someSeries=Lt,e.sortBy=xt,e.timeout=oe,e.times=ye,e.timesLimit=fe,e.timesSeries=me,e.transform=ge,e.tryEach=Et,e.unmemoize=ke,e.until=ve,e.waterfall=Ot,e.whilst=bt,e.all=et,e.allLimit=tt,e.allSeries=nt,e.any=vt,e.anyLimit=St,e.anySeries=Lt,e.find=Ge,e.findLimit=We,e.findSeries=Ke,e.flatMap=Qe,e.flatMapLimit=De,e.flatMapSeries=Ue,e.forEach=Ze,e.forEachSeries=He,e.forEachLimit=$e,e.forEachOf=Me,e.forEachOfSeries=Ae,e.forEachOfLimit=_e,e.inject=Ne,e.foldl=Ne,e.foldr=ae,e.select=at,e.selectLimit=it,e.selectSeries=rt,e.wrapSync=r,e.during=bt,e.doDuring=Je,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file
+(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.async={})})(this,function(e){'use strict';function t(e,...t){return(...n)=>e(...t,...n)}function n(e){return function(...t){var n=t.pop();return e.call(this,t,n)}}function a(e){setTimeout(e,0)}function i(e){return(t,...n)=>e(()=>t(...n))}function r(e){return u(e)?function(...t){const n=t.pop(),a=e.apply(this,t);return s(a,n)}:n(function(t,n){var a;try{a=e.apply(this,t)}catch(t){return n(t)}return a&&"function"==typeof a.then?s(a,n):void n(null,a)})}function s(e,t){return e.then(e=>{l(t,null,e)},e=>{l(t,e&&e.message?e:new Error(e))})}function l(e,t,n){try{e(t,n)}catch(e){Ee(t=>{throw t},e)}}function u(e){return"AsyncFunction"===e[Symbol.toStringTag]}function d(e){return"AsyncGenerator"===e[Symbol.toStringTag]}function c(e){return"function"==typeof e[Symbol.asyncIterator]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return u(e)?r(e):e}function o(e,t=e.length){function n(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise((a,i)=>{n[t-1]=(e,...t)=>e?i(e):void a(1<t.length?t:t[0]),e.apply(this,n)})}if(!t)throw new Error("arity is undefined");return Object.defineProperty(n,"name",{value:`awaitable(${e.name})`}),n}function h(e){return function(t,...n){const a=o(function(a){var i=this;return e(t,(e,t)=>{p(e).apply(i,n.concat(t))},a)});return a}}function f(e,t,n,a){t=t||[];var i=[],r=0,s=p(n);return e(t,(e,t,n)=>{var a=r++;s(e,(e,t)=>{i[a]=t,n(e)})},e=>{a(e,i)})}function y(e){return e&&"number"==typeof e.length&&0<=e.length&&0==e.length%1}function m(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t}function g(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function k(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}function v(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}function S(e){var t=e?Object.keys(e):[],n=-1,a=t.length;return function(){var i=t[++n];return n<a?{value:e[i],key:i}:null}}function L(e){if(y(e))return k(e);var t=g(e);return t?v(t):S(e)}function x(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}}function E(e,t,n,a){function i(){c>=t||d||l||(d=!0,e.next().then(({value:e,done:t})=>{if(!(u||l))return d=!1,t?(l=!0,void(0>=c&&a(null))):void(c++,n(e,p,r),p++,i())}).catch(s))}function r(e,t){return c-=1,u?void 0:e?s(e):!1===e?(l=!0,void(u=!0)):t===be||l&&0>=c?(l=!0,a(null)):void i()}function s(e){u||(d=!1,l=!0,a(e))}let l=!1,u=!1,d=!1,c=0,p=0;i()}function b(e,t,n){function a(e,t){!1===e&&(l=!0);!0===l||(e?n(e):(++r===s||t===be)&&n(null))}n=m(n);var i=0,r=0,{length:s}=e,l=!1;for(0===s&&n(null);i<s;i++)t(e[i],i,x(a))}function O(e,t,n){return _e(e,1/0,t,n)}function _(){function e(e,...a){return e?n(e):void t(1<a.length?a:a[0])}let t,n;return e[Fe]=new Promise((e,a)=>{t=e,n=a}),e}function M(e,t,n){function a(e,t){g.push(()=>l(e,t))}function i(){if(!h){if(0===g.length&&0===o)return n(null,c);for(;g.length&&o<t;){var e=g.shift();e()}}}function r(e,t){var n=y[e];n||(n=y[e]=[]),n.push(t)}function s(e){var t=y[e]||[];t.forEach(e=>e()),i()}function l(e,t){if(!f){var a=x((t,...a)=>{if(o--,!1===t)return void(h=!0);if(2>a.length&&([a]=a),t){var i={};if(Object.keys(c).forEach(e=>{i[e]=c[e]}),i[e]=a,f=!0,y=Object.create(null),h)return;n(t,i)}else c[e]=a,s(e)});o++;var i=p(t[t.length-1]);1<t.length?i(c,a):i(a)}}function u(t){var n=[];return Object.keys(e).forEach(a=>{const i=e[a];Array.isArray(i)&&0<=i.indexOf(t)&&n.push(a)}),n}"number"!=typeof t&&(n=t,t=null),n=m(n||_());var d=Object.keys(e).length;if(!d)return n(null);t||(t=d);var c={},o=0,h=!1,f=!1,y=Object.create(null),g=[],k=[],v={};return Object.keys(e).forEach(t=>{var n=e[t];if(!Array.isArray(n))return a(t,[n]),void k.push(t);var i=n.slice(0,n.length-1),s=i.length;return 0===s?(a(t,n),void k.push(t)):void(v[t]=s,i.forEach(l=>{if(!e[l])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+l+"` in "+i.join(", "));r(l,()=>{s--,0===s&&a(t,n)})}))}),function(){for(var e,t=0;k.length;)e=k.pop(),t++,u(e).forEach(e=>{0==--v[e]&&k.push(e)});if(t!==d)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),i(),n[Fe]}function I(e){const t=e.toString().replace(ze,"");let n=t.match(Pe);if(n||(n=t.match(Te)),!n)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,a]=n;return a.replace(/\s/g,"").split(Re).map(e=>e.replace(Ce,"").trim())}function A(e,t){var n={};return Object.keys(e).forEach(t=>{function a(e,t){var n=i.map(t=>e[t]);n.push(t),p(r)(...n)}var i,r=e[t],s=u(r),l=!s&&1===r.length||s&&0===r.length;if(Array.isArray(r))i=[...r],r=i.pop(),n[t]=i.concat(0<i.length?a:r);else if(l)n[t]=r;else{if(i=I(r),0===r.length&&!s&&0===i.length)throw new Error("autoInject task functions require explicit parameters.");s||i.pop(),n[t]=i.concat(a)}}),M(n,t)}function j(e,t){e.length=1,e.head=e.tail=t}function w(e,t,n){function a(e,t){h[e].push(t)}function i(e,t){const n=(...a)=>{r(e,n),t(...a)};h[e].push(n)}function r(e,t){return e?t?void(h[e]=h[e].filter(e=>e!==t)):h[e]=[]:Object.keys(h).forEach(e=>h[e]=[])}function s(e,...t){h[e].forEach(e=>e(...t))}function l(e,t,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");g.started=!0;var a,i={data:e,callback:n||function(e,...t){return e?void 0:1>=t.length?a(t[0]):void a(t)}};if(t?g._tasks.unshift(i):g._tasks.push(i),f||(f=!0,Ee(()=>{f=!1,g.process()})),!n)return new Promise(e=>{a=e})}function u(e){return function(t,...n){c-=1;for(var a=0,r=e.length;a<r;a++){var l=e[a],u=o.indexOf(l);0===u?o.shift():0<u&&o.splice(u,1),l.callback(t,...n),null!=t&&s("error",t,l.data)}c<=g.concurrency-g.buffer&&s("unsaturated"),g.idle()&&s("drain"),g.process()}}if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var d=p(e),c=0,o=[];const h={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};var f=!1;const y=e=>t=>t?void(r(e),a(e,t)):new Promise((t,n)=>{i(e,(e,a)=>e?n(e):void t(a))});var m=!1,g={_tasks:new Ye,*[Symbol.iterator](){yield*g._tasks[Symbol.iterator]()},concurrency:t,payload:n,buffer:t/4,started:!1,paused:!1,push(e,t){return Array.isArray(e)?0===e.length&&g.idle()?Ee(()=>s("drain")):e.map(e=>l(e,!1,t)):l(e,!1,t)},kill(){r(),g._tasks.empty()},unshift(e,t){return Array.isArray(e)?0===e.length&&g.idle()?Ee(()=>s("drain")):e.map(e=>l(e,!0,t)):l(e,!0,t)},remove(e){g._tasks.remove(e)},process(){var e=Math.min;if(!m){for(m=!0;!g.paused&&c<g.concurrency&&g._tasks.length;){var t=[],n=[],a=g._tasks.length;g.payload&&(a=e(a,g.payload));for(var r,p=0;p<a;p++)r=g._tasks.shift(),t.push(r),o.push(r),n.push(r.data);c+=1,0===g._tasks.length&&s("empty"),c===g.concurrency&&s("saturated");var h=x(u(t));d(n,h)}m=!1}},length(){return g._tasks.length},running(){return c},workersList(){return o},idle(){return 0===g._tasks.length+c},pause(){g.paused=!0},resume(){!1===g.paused||(g.paused=!1,Ee(g.process))}};return Object.defineProperties(g,{saturated:{writable:!1,value:y("saturated")},unsaturated:{writable:!1,value:y("unsaturated")},empty:{writable:!1,value:y("empty")},drain:{writable:!1,value:y("drain")},error:{writable:!1,value:y("error")}}),g}function B(e,t){return w(e,1,t)}function F(e,t,n){return w(e,t,n)}function P(...e){var t=e.map(p);return function(...e){var n=this,a=e[e.length-1];return"function"==typeof a?e.pop():a=_(),Ne(t,e,(e,t,a)=>{t.apply(n,e.concat((e,...t)=>{a(e,t)}))},(e,t)=>a(e,...t)),a[Fe]}}function T(...e){return P(...e.reverse())}function R(...e){return function(...t){var n=t.pop();return n(null,...e)}}function C(e,t){return(n,a,i,r)=>{var s,l=!1;const u=p(i);n(a,(n,a,i)=>{u(n,(a,r)=>a||!1===a?i(a):e(r)&&!s?(l=!0,s=t(!0,n),i(null,be)):void i())},e=>e?r(e):void r(null,l?s:t(!1)))}}function z(e){return(t,...n)=>p(t)(...n,(t,...n)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&n.forEach(t=>console[e](t)))})}function Y(e,t,n){const a=p(t);return Je(e,(...e)=>{const t=e.pop();a(...e,(e,n)=>t(e,!n))},n)}function V(e){return(t,n,a)=>e(t,a)}function N(e){return u(e)?e:function(...t){var n=t.pop(),a=!0;t.push((...e)=>{a?Ee(()=>n(...e)):n(...e)}),e.apply(this,t),a=!1}}function q(e,t,n,a){var r=Array(t.length);e(t,(e,t,a)=>{n(e,(e,n)=>{r[t]=!!n,a(e)})},e=>{if(e)return a(e);for(var n=[],s=0;s<t.length;s++)r[s]&&n.push(t[s]);a(null,n)})}function D(e,t,n,a){var i=[];e(t,(e,t,a)=>{n(e,(n,r)=>n?a(n):void(r&&i.push({index:t,value:e}),a(n)))},e=>e?a(e):void a(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value)))}function Q(e,t,n,a){var i=y(t)?q:D;return i(e,t,p(n),a)}function U(e,t,n){return lt(e,1/0,t,n)}function G(e,t,n){return lt(e,1,t,n)}function W(e,t,n){return dt(e,1/0,t,n)}function K(e,t,n){return dt(e,1,t,n)}function X(e,t=e=>e){var a=Object.create(null),r=Object.create(null),s=p(e),l=n((e,n)=>{var u=t(...e);u in a?Ee(()=>n(null,...a[u])):u in r?r[u].push(n):(r[u]=[n],s(...e,(e,...t)=>{e||(a[u]=t);var n=r[u];delete r[u];for(var s=0,d=n.length;s<d;s++)n[s](e,...t)}))});return l.memo=a,l.unmemoized=e,l}function J(e,t){return pt(Me,e,t)}function Z(e,t,n){return pt(Oe(t),e,n)}function $(e,t){var n=p(e);return w((e,t)=>{n(e[0],t)},t,1)}function H(e){return(e<<1)+1}function ee(e){return(e+1>>1)-1}function te(e,t){return e.priority===t.priority?e.pushCount<t.pushCount:e.priority<t.priority}function ne(e,t){var n=$(e,t);return n._tasks=new ot,n.push=function(e,t=0,a=()=>{}){if("function"!=typeof a)throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&n.idle())return Ee(()=>n.drain());for(var r,s=0,u=e.length;s<u;s++)r={data:e[s],priority:t,callback:a},n._tasks.push(r);Ee(n.process)},delete n.unshift,n}function ae(e,t,n,a){var i=[...e].reverse();return Ne(i,t,n,a)}function ie(e){var t=p(e);return n(function(e,n){return e.push((e,...t)=>{let a={};if(e&&(a.error=e),0<t.length){var i=t;1>=t.length&&([i]=t),a.value=i}n(null,a)}),t.apply(this,e)})}function re(e){var t;return Array.isArray(e)?t=e.map(ie):(t={},Object.keys(e).forEach(n=>{t[n]=ie.call(this,e[n])})),t}function se(e,t,n,a){const i=p(n);return Q(e,t,(e,t)=>{i(e,(e,n)=>{t(e,!n)})},a)}function le(e){return function(){return e}}function ue(e,t,n){function a(){r((e,...t)=>{!1===e||(e&&s++<i.times&&("function"!=typeof i.errorFilter||i.errorFilter(e))?setTimeout(a,i.intervalFunc(s-1)):n(e,...t))})}var i={times:gt,intervalFunc:le(kt)};if(3>arguments.length&&"function"==typeof e?(n=t||_(),t=e):(de(i,e),n=n||_()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var r=p(t),s=1;return a(),n[Fe]}function de(e,n){if("object"==typeof n)e.times=+n.times||gt,e.intervalFunc="function"==typeof n.interval?n.interval:le(+n.interval||kt),e.errorFilter=n.errorFilter;else if("number"==typeof n||"string"==typeof n)e.times=+n||gt;else throw new Error("Invalid arguments for async.retry")}function ce(e,t){t||(t=e,e=null);let a=e&&e.arity||t.length;u(t)&&(a+=1);var i=p(t);return n((t,n)=>{function r(e){i(...t,e)}return(t.length<a-1||null==n)&&(t.push(n),n=_()),e?ue(e,r,n):ue(r,n),n[Fe]})}function pe(e,t){return pt(je,e,t)}function oe(e,t,a){var i=p(e);return n((n,r)=>{var s,l=!1;n.push((...e)=>{l||(r(...e),clearTimeout(s))}),s=setTimeout(function(){var t=e.name||"anonymous",n=new Error("Callback function \""+t+"\" timed out.");n.code="ETIMEDOUT",a&&(n.info=a),l=!0,r(n)},t),i(...n)})}function he(e){for(var t=Array(e);e--;)t[e]=e;return t}function fe(e,t,n,a){var i=p(n);return qe(he(e),t,i,a)}function ye(e,t,n){return fe(e,1/0,t,n)}function me(e,t,n){return fe(e,1,t,n)}function ge(e,t,n,a){3>=arguments.length&&"function"==typeof t&&(a=n,n=t,t=Array.isArray(e)?[]:{}),a=m(a||_());var i=p(n);return Me(e,(e,n,a)=>{i(t,e,n,a)},e=>a(e,t)),a[Fe]}function ke(e){return(...t)=>(e.unmemoized||e)(...t)}function ve(e,t,n){const a=p(e);return bt(e=>a((t,n)=>e(t,!n)),t,n)}var Se,Le="function"==typeof setImmediate&&setImmediate,xe="object"==typeof process&&"function"==typeof process.nextTick;Se=Le?setImmediate:xe?process.nextTick:a;var Ee=i(Se);const be={};var Oe=e=>(t,n,a)=>{function i(e,t){if(!u)if(p-=1,e)l=!0,a(e);else if(!1===e)l=!0,u=!0;else{if(t===be||l&&0>=p)return l=!0,a(null);o||r()}}function r(){for(o=!0;p<e&&!l;){var t=s();if(null===t)return l=!0,void(0>=p&&a(null));p+=1,n(t.value,t.key,x(i))}o=!1}if(a=m(a),0>=e)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return a(null);if(d(t))return E(t,e,n,a);if(c(t))return E(t[Symbol.asyncIterator](),e,n,a);var s=L(t),l=!1,u=!1,p=0,o=!1;r()},_e=o(function(e,t,n,a){return Oe(t)(e,p(n),a)},4),Me=o(function(e,t,n){var a=y(e)?b:O;return a(e,p(t),n)},3),Ie=o(function(e,t,n){return f(Me,e,t,n)},3),Ae=h(Ie),je=o(function(e,t,n){return _e(e,1,t,n)},3),we=o(function(e,t,n){return f(je,e,t,n)},3),Be=h(we);const Fe=Symbol("promiseCallback");var Pe=/^(?:async\s+)?(?:function)?\s*[^(]*\(\s*([^)]+)\s*\)(?:\s*{)/m,Te=/^(?:async\s+)?(?:function\s+)?\(?\s*([^)^=]+)\s*\)?(?:\s*=>)/m,Re=/,/,Ce=/(=.+)?(\s*)$/,ze=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;class Ye{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):j(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):j(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:n}=t;e(t)&&this.removeLink(t),t=n}return this}}var Ve,Ne=o(function(e,t,n,a){a=m(a);var r=p(n);return je(e,(e,n,a)=>{r(t,e,(e,n)=>{t=n,a(e)})},e=>a(e,t))},4),qe=o(function(e,t,n,a){return f(Oe(t),e,n,a)},4),De=o(function(e,t,n,a){var i=p(n);return qe(e,t,(e,t)=>{i(e,(e,...n)=>e?t(e):t(e,n))},(e,t)=>{for(var n=[],r=0;r<t.length;r++)t[r]&&(n=n.concat(...t[r]));return a(e,n)})},4),Qe=o(function(e,t,n){return De(e,1/0,t,n)},3),Ue=o(function(e,t,n){return De(e,1,t,n)},3),Ge=o(function(e,t,n){return C(e=>e,(e,t)=>t)(Me,e,t,n)},3),We=o(function(e,t,n,a){return C(e=>e,(e,t)=>t)(Oe(t),e,n,a)},4),Ke=o(function(e,t,n){return C(e=>e,(e,t)=>t)(Oe(1),e,t,n)},3),Xe=z("dir"),Je=o(function(e,t,n){function a(e,...t){return e?n(e):void(!1===e||(r=t,l(...t,i)))}function i(e,t){return e?n(e):!1===e?void 0:t?void s(a):n(null,...r)}n=x(n);var r,s=p(e),l=p(t);return i(null,!0)},3),Ze=o(function(e,t,n){return Me(e,V(p(t)),n)},3),$e=o(function(e,t,n,a){return Oe(t)(e,V(p(n)),a)},4),He=o(function(e,t,n){return $e(e,1,t,n)},3),et=o(function(e,t,n){return C(e=>!e,e=>!e)(Me,e,t,n)},3),tt=o(function(e,t,n,a){return C(e=>!e,e=>!e)(Oe(t),e,n,a)},4),nt=o(function(e,t,n){return C(e=>!e,e=>!e)(je,e,t,n)},3),at=o(function(e,t,n){return Q(Me,e,t,n)},3),it=o(function(e,t,n,a){return Q(Oe(t),e,n,a)},4),rt=o(function(e,t,n){return Q(je,e,t,n)},3),st=o(function(e,t){function n(e){return e?a(e):void(!1===e||i(n))}var a=x(t),i=p(N(e));return n()},2),lt=o(function(e,t,n,a){var i=p(n);return qe(e,t,(e,t)=>{i(e,(n,a)=>n?t(n):t(n,{key:a,val:e}))},(e,t)=>{for(var n={},{hasOwnProperty:r}=Object.prototype,s=0;s<t.length;s++)if(t[s]){var{key:l}=t[s],{val:u}=t[s];r.call(n,l)?n[l].push(u):n[l]=[u]}return a(e,n)})},4),ut=z("log"),dt=o(function(e,t,n,a){a=m(a);var i={},r=p(n);return Oe(t)(e,(e,t,n)=>{r(e,t,(e,a)=>e?n(e):void(i[t]=a,n(e)))},e=>a(e,i))},4);Ve=xe?process.nextTick:Le?setImmediate:a;var ct=i(Ve),pt=o((e,t,n)=>{var a=y(t)?[]:{};e(t,(e,t,n)=>{p(e)((e,...i)=>{2>i.length&&([i]=i),a[t]=i,n(e)})},e=>n(e,a))},3);class ot{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){for(let n;0<e&&te(this.heap[e],this.heap[n=ee(e)]);){let a=this.heap[e];this.heap[e]=this.heap[n],this.heap[n]=a,e=n}}percDown(e){for(let n,a;(n=H(e))<this.heap.length&&(n+1<this.heap.length&&te(this.heap[n+1],this.heap[n])&&++n,!te(this.heap[e],this.heap[n]));)a=this.heap[e],this.heap[e]=this.heap[n],this.heap[n]=a,e=n}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let n=0;n<this.heap.length;n++)e(this.heap[n])||(this.heap[t]=this.heap[n],t++);this.heap.splice(t);for(let t=ee(this.heap.length-1);0<=t;t--)this.percDown(t);return this}}var ht=o(function(e,t){if(t=m(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var n=0,a=e.length;n<a;n++)p(e[n])(t)},2),ft=o(function(e,t,n){return se(Me,e,t,n)},3),yt=o(function(e,t,n,a){return se(Oe(t),e,n,a)},4),mt=o(function(e,t,n){return se(je,e,t,n)},3);const gt=5,kt=0;var vt=o(function(e,t,n){return C(Boolean,e=>e)(Me,e,t,n)},3),St=o(function(e,t,n,a){return C(Boolean,e=>e)(Oe(t),e,n,a)},4),Lt=o(function(e,t,n){return C(Boolean,e=>e)(je,e,t,n)},3),xt=o(function(e,t,n){function a(e,t){var n=e.criteria,a=t.criteria;return n<a?-1:n>a?1:0}var i=p(t);return Ie(e,(e,t)=>{i(e,(n,a)=>n?t(n):void t(n,{value:e,criteria:a}))},(e,t)=>e?n(e):void n(null,t.sort(a).map(e=>e.value)))},3),Et=o(function(e,t){var n,a=null;return He(e,(e,t)=>{p(e)((e,...i)=>!1===e?t(e):void(2>i.length?[n]=i:n=i,a=e,t(e?null:{})))},()=>t(a,n))}),bt=o(function(e,t,n){function a(e,...t){if(e)return n(e);l=t;!1===e||s(i)}function i(e,t){return e?n(e):!1===e?void 0:t?void r(a):n(null,...l)}n=x(n);var r=p(t),s=p(e),l=[];return s(i)},3),Ot=o(function(e,t){function n(t){var n=p(e[i++]);n(...t,x(a))}function a(a,...r){return!1===a?void 0:a||i===e.length?t(a,...r):void n(r)}if(t=m(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var i=0;n([])});e.default={apply:t,applyEach:Ae,applyEachSeries:Be,asyncify:r,auto:M,autoInject:A,cargo:B,cargoQueue:F,compose:T,concat:Qe,concatLimit:De,concatSeries:Ue,constant:R,detect:Ge,detectLimit:We,detectSeries:Ke,dir:Xe,doUntil:Y,doWhilst:Je,each:Ze,eachLimit:$e,eachOf:Me,eachOfLimit:_e,eachOfSeries:je,eachSeries:He,ensureAsync:N,every:et,everyLimit:tt,everySeries:nt,filter:at,filterLimit:it,filterSeries:rt,forever:st,groupBy:U,groupByLimit:lt,groupBySeries:G,log:ut,map:Ie,mapLimit:qe,mapSeries:we,mapValues:W,mapValuesLimit:dt,mapValuesSeries:K,memoize:X,nextTick:ct,parallel:J,parallelLimit:Z,priorityQueue:ne,queue:$,race:ht,reduce:Ne,reduceRight:ae,reflect:ie,reflectAll:re,reject:ft,rejectLimit:yt,rejectSeries:mt,retry:ue,retryable:ce,seq:P,series:pe,setImmediate:Ee,some:vt,someLimit:St,someSeries:Lt,sortBy:xt,timeout:oe,times:ye,timesLimit:fe,timesSeries:me,transform:ge,tryEach:Et,unmemoize:ke,until:ve,waterfall:Ot,whilst:bt,all:et,allLimit:tt,allSeries:nt,any:vt,anyLimit:St,anySeries:Lt,find:Ge,findLimit:We,findSeries:Ke,flatMap:Qe,flatMapLimit:De,flatMapSeries:Ue,forEach:Ze,forEachSeries:He,forEachLimit:$e,forEachOf:Me,forEachOfSeries:je,forEachOfLimit:_e,inject:Ne,foldl:Ne,foldr:ae,select:at,selectLimit:it,selectSeries:rt,wrapSync:r,during:bt,doDuring:Je},e.apply=t,e.applyEach=Ae,e.applyEachSeries=Be,e.asyncify=r,e.auto=M,e.autoInject=A,e.cargo=B,e.cargoQueue=F,e.compose=T,e.concat=Qe,e.concatLimit=De,e.concatSeries=Ue,e.constant=R,e.detect=Ge,e.detectLimit=We,e.detectSeries=Ke,e.dir=Xe,e.doUntil=Y,e.doWhilst=Je,e.each=Ze,e.eachLimit=$e,e.eachOf=Me,e.eachOfLimit=_e,e.eachOfSeries=je,e.eachSeries=He,e.ensureAsync=N,e.every=et,e.everyLimit=tt,e.everySeries=nt,e.filter=at,e.filterLimit=it,e.filterSeries=rt,e.forever=st,e.groupBy=U,e.groupByLimit=lt,e.groupBySeries=G,e.log=ut,e.map=Ie,e.mapLimit=qe,e.mapSeries=we,e.mapValues=W,e.mapValuesLimit=dt,e.mapValuesSeries=K,e.memoize=X,e.nextTick=ct,e.parallel=J,e.parallelLimit=Z,e.priorityQueue=ne,e.queue=$,e.race=ht,e.reduce=Ne,e.reduceRight=ae,e.reflect=ie,e.reflectAll=re,e.reject=ft,e.rejectLimit=yt,e.rejectSeries=mt,e.retry=ue,e.retryable=ce,e.seq=P,e.series=pe,e.setImmediate=Ee,e.some=vt,e.someLimit=St,e.someSeries=Lt,e.sortBy=xt,e.timeout=oe,e.times=ye,e.timesLimit=fe,e.timesSeries=me,e.transform=ge,e.tryEach=Et,e.unmemoize=ke,e.until=ve,e.waterfall=Ot,e.whilst=bt,e.all=et,e.allLimit=tt,e.allSeries=nt,e.any=vt,e.anyLimit=St,e.anySeries=Lt,e.find=Ge,e.findLimit=We,e.findSeries=Ke,e.flatMap=Qe,e.flatMapLimit=De,e.flatMapSeries=Ue,e.forEach=Ze,e.forEachSeries=He,e.forEachLimit=$e,e.forEachOf=Me,e.forEachOfSeries=je,e.forEachOfLimit=_e,e.inject=Ne,e.foldl=Ne,e.foldr=ae,e.select=at,e.selectLimit=it,e.selectSeries=rt,e.wrapSync=r,e.during=bt,e.doDuring=Je,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file