summaryrefslogtreecommitdiff
path: root/dist/async.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/async.min.js')
-rw-r--r--dist/async.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/async.min.js b/dist/async.min.js
index 4af1f6b..2915a67 100644
--- a/dist/async.min.js
+++ b/dist/async.min.js
@@ -1,2 +1,2 @@
-"use strict";!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function u(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function i(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function o(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1===0}function c(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function a(n,t){for(var e=-1,r=n.length,u=Array(r);++e<r;)u[e]=t(n[e],e,n);return u}function f(n){return a(Array(n),function(n,t){return t})}function l(n,t,e){return c(n,function(n,r,u){e=t(e,n,r,u)}),e}function s(n,t){c(W(n),function(e){t(n[e],e)})}function p(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function h(n){var t,e,r=-1;return o(n)?(t=n.length,function(){return r++,t>r?r:null}):(e=W(n),t=e.length,function(){return r++,t>r?e[r]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),u=0;e>u;u++)r[u]=arguments[u+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r)}}}function y(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,o){o=i(o||n),e=e||[];var c=h(e);if(0>=t)return o(null);var a=!1,f=0,l=!1;!function s(){if(a&&0>=f)return o(null);for(;t>f&&!l;){var n=c();if(null===n)return a=!0,void(0>=f&&o(null));f+=1,r(e[n],n,u(function(n){f-=1,n?(o(n),l=!0):s()}))}}()}}function d(n){return function(t,e,r){return n(P.eachOf,t,e,r)}}function g(n){return function(t,e,r,u){return n(v(e),t,r,u)}}function k(n){return function(t,e,r){return n(P.eachOfSeries,t,e,r)}}function b(t,e,r,u){u=i(u||n),e=e||[];var c=o(e)?[]:{};t(e,function(n,t,e){r(n,function(n,r){c[t]=r,e(n)})},function(n){u(n,c)})}function w(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(e){e&&u.push({index:t,value:n}),r()})},function(){r(a(u.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function O(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function S(n,t,e){return function(r,u,i,o){function c(){o&&o(e(!1,void 0))}function a(n,r,u){return o?void i(n,function(r){o&&t(r)&&(o(e(!0,n)),o=i=!1),u()}):u()}arguments.length>3?n(r,u,a,c):(o=i,i=u,n(r,a,c))}}function E(n,t){return t}function L(t,e,r){r=r||n;var u=o(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),u[t]=r,e(n)}))},function(n){r(n,u)})}function j(n,t,e,r){var u=[];n(t,function(n,t,r){e(n,function(n,t){u=u.concat(t||[]),r(n)})},function(n){r(n,u)})}function I(t,e,r){function i(t,e,r,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle()?P.setImmediate(function(){t.drain()}):(c(e,function(e){var i={data:e,callback:u||n};r?t.tasks.unshift(i):t.tasks.push(i),t.tasks.length===t.concurrency&&t.saturated()}),void P.setImmediate(t.process))}function o(n,t){return function(){f-=1;var e=!1,r=arguments;c(t,function(n){c(l,function(t,r){t!==n||e||(l.splice(r,1),e=!0)}),n.callback.apply(n,r)}),n.tasks.length+f===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var f=0,l=[],s={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function(n,t){i(s,n,!1,t)},kill:function(){s.drain=n,s.tasks=[]},unshift:function(n,t){i(s,n,!0,t)},process:function(){for(;!s.paused&&f<s.concurrency&&s.tasks.length;){var n=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=a(n,function(n){return n.data});0===s.tasks.length&&s.empty(),f+=1,l.push(n[0]);var r=u(o(s,n));t(e,r)}},length:function(){return s.tasks.length},running:function(){return f},workersList:function(){return l},idle:function(){return s.tasks.length+f===0},pause:function(){s.paused=!0},resume:function(){if(s.paused!==!1){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),t=1;n>=t;t++)P.setImmediate(s.process)}}};return s}function x(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&c(e,function(t){console[n](t)}))})]))})}function A(n){return function(t,e,r){n(f(t),e,r)}}function T(n){return m(function(t,e){var r=m(function(e){var r=this,u=e.pop();return n(t,function(n,t,u){n.apply(r,e.concat([u]))},u)});return e.length?r.apply(this,e):r})}function z(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?P.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var q,P={},C="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;null!=C&&(q=C.async),P.noConflict=function(){return C.async=q,P};var H=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===H.call(n)},U=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},W=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},B="function"==typeof setImmediate&&setImmediate,D=B?function(n){B(n)}:function(n){setTimeout(n,0)};"object"==typeof process&&"function"==typeof process.nextTick?P.nextTick=process.nextTick:P.nextTick=D,P.setImmediate=B?D:P.nextTick,P.forEach=P.each=function(n,t,e){return P.eachOf(n,y(t),e)},P.forEachSeries=P.eachSeries=function(n,t,e){return P.eachOfSeries(n,y(t),e)},P.forEachLimit=P.eachLimit=function(n,t,e,r){return v(t)(n,y(e),r)},P.forEachOf=P.eachOf=function(t,e,r){function o(n){f--,n?r(n):null===c&&0>=f&&r(null)}r=i(r||n),t=t||[];for(var c,a=h(t),f=0;null!=(c=a());)f+=1,e(t[c],c,u(o));0===f&&r(null)},P.forEachOfSeries=P.eachOfSeries=function(t,e,r){function o(){var n=!0;return null===a?r(null):(e(t[a],a,u(function(t){if(t)r(t);else{if(a=c(),null===a)return r(null);n?P.setImmediate(o):o()}})),void(n=!1))}r=i(r||n),t=t||[];var c=h(t),a=c();o()},P.forEachOfLimit=P.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},P.map=d(b),P.mapSeries=k(b),P.mapLimit=g(b),P.inject=P.foldl=P.reduce=function(n,t,e,r){P.eachOfSeries(n,function(n,r,u){e(t,n,function(n,e){t=e,u(n)})},function(n){r(n,t)})},P.foldr=P.reduceRight=function(n,e,r,u){var i=a(n,t).reverse();P.reduce(i,e,r,u)},P.transform=function(n,t,e,r){3===arguments.length&&(r=e,e=t,t=M(n)?[]:{}),P.eachOf(n,function(n,r,u){e(t,n,r,u)},function(n){r(n,t)})},P.select=P.filter=d(w),P.selectLimit=P.filterLimit=g(w),P.selectSeries=P.filterSeries=k(w),P.reject=d(O),P.rejectLimit=g(O),P.rejectSeries=k(O),P.any=P.some=S(P.eachOf,e,t),P.someLimit=S(P.eachOfLimit,e,t),P.all=P.every=S(P.eachOf,r,r),P.everyLimit=S(P.eachOfLimit,r,r),P.detect=S(P.eachOf,t,E),P.detectSeries=S(P.eachOfSeries,t,E),P.detectLimit=S(P.eachOfLimit,t,E),P.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return r>e?-1:e>r?1:0}P.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,a(t.sort(r),function(n){return n.value}))})},P.auto=function(t,e,r){function u(n){g.unshift(n)}function o(n){var t=p(g,n);t>=0&&g.splice(t,1)}function a(){h--,c(g.slice(0),function(n){n()})}"function"==typeof arguments[1]&&(r=e,e=null),r=i(r||n);var f=W(t),h=f.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,g=[];u(function(){h||r(null,y)}),c(f,function(n){function i(){return e>v&&l(k,function(n,t){return n&&y.hasOwnProperty(t)},!0)&&!y.hasOwnProperty(n)}function c(){i()&&(v++,o(c),h[h.length-1](g,y))}if(!d){for(var f,h=M(t[n])?t[n]:[t[n]],g=m(function(t,e){if(v--,e.length<=1&&(e=e[0]),t){var u={};s(y,function(n,t){u[t]=n}),u[n]=e,d=!0,r(t,u)}else y[n]=e,P.setImmediate(a)}),k=h.slice(0,h.length-1),b=k.length;b--;){if(!(f=t[k[b]]))throw new Error("Has nonexistent dependency in "+k.join(", "));if(M(f)&&p(f,n)>=0)throw new Error("Has cyclic dependencies")}i()?(v++,h[h.length-1](g,y)):u(c)}})},P.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var u=!(a.times-=1);c.push(e(a.task,u)),!u&&a.interval>0&&c.push(r(a.interval))}P.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var i=5,o=0,c=[],a={times:i,interval:o},f=arguments.length;if(1>f||f>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=f&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?u():u},P.waterfall=function(t,e){function r(n){return m(function(t,u){if(t)e.apply(null,[t].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(e),z(n).apply(null,u)}})}if(e=i(e||n),!M(t)){var u=new Error("First argument to waterfall must be an array of functions");return e(u)}return t.length?void r(P.iterator(t))():e()},P.parallel=function(n,t){L(P.eachOf,n,t)},P.parallelLimit=function(n,t,e){L(v(t),n,e)},P.series=function(n,t){L(P.eachOfSeries,n,t)},P.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},P.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),P.concat=d(j),P.concatSeries=k(j),P.whilst=function(t,e,r){if(r=r||n,t()){var u=m(function(n,i){n?r(n):t.apply(this,i)?e(u):r.apply(null,[null].concat(i))});e(u)}else r(null)},P.doWhilst=function(n,t,e){var r=0;return P.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},P.until=function(n,t,e){return P.whilst(function(){return!n.apply(this,arguments)},t,e)},P.doUntil=function(n,t,e){return P.doWhilst(n,function(){return!t.apply(this,arguments)},e)},P.during=function(t,e,r){r=r||n;var u=m(function(n,e){n?r(n):(e.push(i),t.apply(this,e))}),i=function(n,t){n?r(n):t?e(u):r(null)};t(i)},P.doDuring=function(n,t,e){var r=0;P.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},P.queue=function(n,t){var e=I(function(t,e){n(t[0],e)},t,1);return e},P.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function u(n,t,e){for(var r=-1,u=n.length-1;u>r;){var i=r+(u-r+1>>>1);e(t,n[i])>=0?r=i:u=i-1}return r}function i(t,e,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");return t.started=!0,M(e)||(e=[e]),0===e.length?P.setImmediate(function(){t.drain()}):void c(e,function(e){var c={data:e,priority:i,callback:"function"==typeof o?o:n};t.tasks.splice(u(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),P.setImmediate(t.process)})}var o=P.queue(t,e);return o.push=function(n,t,e){i(o,n,t,e)},delete o.unshift,o},P.cargo=function(n,t){return I(n,1,t)},P.log=x("log"),P.dir=x("dir"),P.memoize=function(n,e){var r={},u={},i=Object.prototype.hasOwnProperty;e=e||t;var o=m(function(t){var o=t.pop(),c=e.apply(null,t);i.call(r,c)?P.setImmediate(function(){o.apply(null,r[c])}):i.call(u,c)?u[c].push(o):(u[c]=[o],n.apply(null,t.concat([m(function(n){r[c]=n;var t=u[c];delete u[c];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},P.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},P.times=A(P.map),P.timesSeries=A(P.mapSeries),P.timesLimit=function(n,t,e,r){return P.mapLimit(f(n),t,e,r)},P.seq=function(){var t=arguments;return m(function(e){var r=this,u=e[e.length-1];"function"==typeof u?e.pop():u=n,P.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){u.apply(r,[n].concat(t))})})},P.compose=function(){return P.seq.apply(null,Array.prototype.reverse.call(arguments))},P.applyEach=T(P.eachOf),P.applyEachSeries=T(P.eachOfSeries),P.forever=function(t,e){function r(n){return n?i(n):void o(r)}var i=u(e||n),o=z(t);r()},P.ensureAsync=z,P.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),P.wrapSync=P.asyncify=function(n){return m(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(u){return r(u)}U(e)&&"function"==typeof e.then?e.then(function(n){r(null,n)})["catch"](function(n){r(n.message?n:new Error(n))}):r(null,e)})},"object"==typeof module&&module.exports?module.exports=P:"function"==typeof define&&define.amd?define([],function(){return P}):C.async=P}();
+!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async={})}(this,function(n){"use strict";function t(n,t,r){var e=r.length;switch(e){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function r(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function e(n){var t=r(n)?nt.call(n):"";return t==Yn||t==Zn}function u(n){if(r(n)){var t=e(n.valueOf)?n.valueOf():n;n=r(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(rt,"");var u=ut.test(n);return u||it.test(n)?ot(n.slice(2),u?2:8):et.test(n)?tt:+n}function i(n){if(!n)return 0===n?n:0;if(n=u(n),n===ct||n===-ct){var t=0>n?-1:1;return t*ft}var r=n%1;return n===n?r?n-r:n:0}function o(n,r){if("function"!=typeof n)throw new TypeError(at);return r=lt(void 0===r?n.length-1:i(r),0),function(){for(var e=arguments,u=-1,i=lt(e.length-r,0),o=Array(i);++u<i;)o[u]=e[r+u];switch(r){case 0:return n.call(this,o);case 1:return n.call(this,e[0],o);case 2:return n.call(this,e[0],e[1],o)}var c=Array(r+1);for(u=-1;++u<r;)c[u]=e[u];return c[r]=o,t(n,this,c)}}function c(n){return o(function(t,r){var e=o(function(r){var e=this,u=r.pop();return n(t,function(n,t,u){n.apply(e,r.concat([u]))},u)});return r.length?e.apply(this,r):e})}function f(n,t){var r;if("function"!=typeof t)throw new TypeError(st);return n=i(n),function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=void 0),r}}function a(n){return f(2,n)}function l(){}function s(n){return function(t){return null==t?void 0:t[n]}}function p(n){return"number"==typeof n&&n>-1&&n%1==0&&yt>=n}function y(n){return null!=n&&!("function"==typeof n&&e(n))&&p(pt(n))}function h(n,t){return vt.call(n,t)||"object"==typeof n&&t in n&&null===mt(n)}function v(n){return dt(Object(n))}function m(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function d(n){return!!n&&"object"==typeof n}function g(n){return d(n)&&y(n)}function b(n){return g(n)&&kt.call(n,"callee")&&(!jt.call(n,"callee")||wt.call(n)==gt)}function k(n){return"string"==typeof n||!St(n)&&d(n)&&Lt.call(n)==Ot}function w(n){var t=n?n.length:void 0;return p(t)&&(St(n)||k(n)||b(n))?m(t,String):null}function j(n,t){return n="number"==typeof n||At.test(n)?+n:-1,t=null==t?xt:t,n>-1&&n%1==0&&t>n}function S(n){var t=n&&n.constructor,r="function"==typeof t&&t.prototype||Tt;return n===r}function O(n){var t=S(n);if(!t&&!y(n))return v(n);var r=w(n),e=!!r,u=r||[],i=u.length;for(var o in n)!h(n,o)||e&&("length"==o||j(o,i))||t&&"constructor"==o||u.push(o);return u}function E(n){var t,r=-1;if(y(n))return t=n.length,function(){return r++,t>r?r:null};var e=O(n);return t=e.length,function(){return r++,t>r?e[r]:null}}function L(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function x(n,t,r){function e(n){o--,n?r(n):null===u&&0>=o&&r(null)}r=a(r||l),n=n||[];for(var u,i=E(n),o=0;null!=(u=i());)o+=1,t(n[u],u,L(e));0===o&&r(null)}function A(n,t,r){function e(){var o=!0;return null===i?r(null):(t(n[i],i,L(function(n){if(n)r(n);else{if(i=u(),null===i)return r(null);o?$t(e):e()}})),void(o=!1))}r=a(r||l),n=n||[];var u=E(n),i=u();e()}function T(n){return o(function(t){var e,u=t.pop();try{e=n.apply(this,t)}catch(i){return u(i)}r(e)&&"function"==typeof e.then?e.then(function(n){u(null,n)})["catch"](function(n){u(n.message?n:new Error(n))}):u(null,e)})}function I(n,t){for(var r=-1,e=n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function z(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function $(n){return function(t,r,e){for(var u=-1,i=Object(t),o=e(t),c=o.length;c--;){var f=o[n?c:++u];if(r(i[f],f,i)===!1)break}return t}}function M(n,t){return n&&Bt(n,t,O)}function q(n){return n}function B(n){return"function"==typeof n?n:q}function F(n,t){return n&&M(n,B(t))}function P(n,t,r){for(var e=n.length,u=t+(r?0:-1);r?u--:++u<e;){var i=n[u];if(i!==i)return u}return-1}function U(n,t,r){if(t!==t)return P(n,r);for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function C(n,t,r){var e=n?n.length:0;return e?(r=i(r),0>r&&(r=Ft(e+r,0)),U(n,t,r)):-1}function D(n,t,r){function e(n){v.unshift(n)}function u(n){var t=C(v,n);t>=0&&v.splice(t,1)}function i(){f--,I(v.slice(),function(n){n()})}"function"==typeof arguments[1]&&(r=t,t=null),r=a(r||l);var c=O(n),f=c.length;if(!f)return r(null);t||(t=f);var s={},p=0,y=!1,v=[];e(function(){f||r(null,s)}),I(c,function(c){function f(){return t>p&&!h(s,c)&&z(d,function(n){return h(s,n)})}function a(){f()&&(p++,u(a),v[v.length-1](m,s))}if(!y){for(var l,v=St(n[c])?n[c]:[n[c]],m=o(function(n,t){if(p--,t.length<=1&&(t=t[0]),n){var e={};F(s,function(n,t){e[t]=n}),e[c]=t,y=!0,r(n,e)}else s[c]=t,$t(i)}),d=v.slice(0,v.length-1),g=d.length;g--;){if(!(l=n[d[g]]))throw new Error("Has non-existent dependency in "+d.join(", "));if(St(l)&&C(l,c)>=0)throw new Error("Has cyclic dependencies")}f()?(p++,v[v.length-1](m,s)):e(a)}})}function H(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function N(n,t,r){function e(n,t,r,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return n.started=!0,St(t)||(t=[t]),0===t.length&&n.idle()?$t(function(){n.drain()}):(I(t,function(t){var u={data:t,callback:e||l};r?n.tasks.unshift(u):n.tasks.push(u),n.tasks.length===n.concurrency&&n.saturated()}),void $t(n.process))}function u(n,t){return function(){i-=1;var r=!1,e=arguments;I(t,function(n){I(o,function(t,e){t!==n||r||(o.splice(e,1),r=!0)}),n.callback.apply(n,e)}),n.tasks.length+i===0&&n.drain(),n.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var i=0,o=[],c={tasks:[],concurrency:t,payload:r,saturated:l,empty:l,drain:l,started:!1,paused:!1,push:function(n,t){e(c,n,!1,t)},kill:function(){c.drain=l,c.tasks=[]},unshift:function(n,t){e(c,n,!0,t)},process:function(){for(;!c.paused&&i<c.concurrency&&c.tasks.length;){var t=c.payload?c.tasks.splice(0,c.payload):c.tasks.splice(0,c.tasks.length),r=H(t,s("data"));0===c.tasks.length&&c.empty(),i+=1,o.push(t[0]);var e=L(u(c,t));n(r,e)}},length:function(){return c.tasks.length},running:function(){return i},workersList:function(){return o},idle:function(){return c.tasks.length+i===0},pause:function(){c.paused=!0},resume:function(){if(c.paused!==!1){c.paused=!1;for(var n=Math.min(c.concurrency,c.tasks.length),t=1;n>=t;t++)$t(c.process)}}};return c}function Q(n,t){return N(n,1,t)}function R(n,t,r,e){A(n,function(n,e,u){r(t,n,function(n,r){t=r,u(n)})},function(n){e(n,t)})}function W(){var n=arguments;return o(function(t){var r=this,e=t[t.length-1];"function"==typeof e?t.pop():e=l,R(n,t,function(n,t,e){t.apply(r,n.concat([o(function(n,t){e(n,t)})]))},function(n,t){e.apply(r,[n].concat(t))})})}function G(){return W.apply(null,Pt.call(arguments))}function J(n,t,r,e){var u=[];n(t,function(n,t,e){r(n,function(n,t){u=u.concat(t||[]),e(n)})},function(n){e(n,u)})}function K(n){return function(t,r,e){return n(x,t,r,e)}}function V(n){return function(t,r,e){return n(A,t,r,e)}}function X(n,t,r){return function(e,u,i,o){function c(n){o&&(n?o(n):o(null,r(!1,void 0)))}function f(n,e,u){return o?void i(n,function(e,c){o&&(e?(o(e),o=i=!1):t(c)&&(o(null,r(!0,n)),o=i=!1)),u()}):u()}arguments.length>3?n(e,u,f,c):(o=i,i=u,n(e,f,c))}}function Y(n,t){return t}function Z(n){return function(t,r,e){e=a(e||l),t=t||[];var u=E(t);if(0>=n)return e(null);var i=!1,o=0,c=!1;!function f(){if(i&&0>=o)return e(null);for(;n>o&&!c;){var a=u();if(null===a)return i=!0,void(0>=o&&e(null));o+=1,r(t[a],a,L(function(n){o-=1,n?(e(n),c=!0):f()}))}}()}}function _(n,t,r,e){Z(t)(n,r,e)}function nn(n){return o(function(t,r){t.apply(null,r.concat([o(function(t,r){"object"==typeof console&&(t?console.error&&console.error(t):console[n]&&I(r,function(t){console[n](t)}))})]))})}function tn(n,t,r){r=r||l;var e=o(function(t,e){t?r(t):(e.push(u),n.apply(this,e))}),u=function(n,u){return n?r(n):u?void t(e):r(null)};n(u)}function rn(n,t,r){var e=0;tn(function(n){return e++<1?n(null,!0):void t.apply(this,arguments)},n,r)}function en(n,t,r){if(r=r||l,!n())return r(null);var e=o(function(u,i){return u?r(u):n.apply(this,i)?t(e):void r.apply(null,[null].concat(i))});t(e)}function un(n,t,r){var e=0;return en(function(){return++e<=1||t.apply(this,arguments)},n,r)}function on(n,t,r){return un(n,function(){return!t.apply(this,arguments)},r)}function cn(n){return function(t,r,e){return n(t,e)}}function fn(n,t,r){return x(n,cn(t),r)}function an(n,t,r,e){return Z(t)(n,cn(r),e)}function ln(n,t,r){return A(n,cn(t),r)}function sn(n){return o(function(t){var r=t.pop(),e=!0;t.push(function(){var n=arguments;e?$t(function(){r.apply(null,n)}):r.apply(null,n)}),n.apply(this,t),e=!1})}function pn(n){return!n}function yn(n,t,r,e){var u=[];n(t,function(n,t,e){r(n,function(r,i){r?e(r):(i&&u.push({index:t,value:n}),e())})},function(n){n?e(n):e(null,H(u.sort(function(n,t){return n.index-t.index}),s("value")))})}function hn(n){return function(t,r,e,u){return n(Z(r),t,e,u)}}function vn(n,t){function r(n){return n?e(n):void u(r)}var e=L(t||l),u=sn(n);r()}function mn(n){function t(r){function e(){return n.length&&n[r].apply(null,arguments),e.next()}return e.next=function(){return r<n.length-1?t(r+1):null},e}return t(0)}function dn(n,t,r,e){e=a(e||l),t=t||[];var u=y(t)?[]:{};n(t,function(n,t,e){r(n,function(n,r){u[t]=r,e(n)})},function(n){e(n,u)})}function gn(n){return n&&n.Object===Object?n:null}function bn(n){return"symbol"==typeof n||d(n)&&sr.call(n)==ar}function kn(n){if("string"==typeof n)return n;if(null==n)return"";if(bn(n))return fr?hr.call(n):"";var t=n+"";return"0"==t&&1/n==-pr?"-0":t}function wn(n){var t=[];return kn(n).replace(vr,function(n,r,e,u){t.push(e?u.replace(mr,"$1"):r||n)}),t}function jn(n){return St(n)?n:wn(n)}function Sn(n,t){return"number"==typeof n?!0:!St(n)&&(gr.test(n)||!dr.test(n)||null!=t&&n in Object(t))}function On(n){var t=n?n.length:0;return t?n[t-1]:void 0}function En(n,t,r){var e=-1,u=n.length;0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(u);++e<u;)i[e]=n[e+t];return i}function Ln(n,t){t=Sn(t,n)?[t+""]:jn(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:void 0}function xn(n,t,r){var e=null==n?void 0:Ln(n,t);return void 0===e?r:e}function An(n,t){return 1==t.length?n:xn(n,En(t,0,-1))}function Tn(n,t,r){if(null==n)return!1;var e=r(n,t);e||Sn(t)||(t=jn(t),n=An(n,t),null!=n&&(t=On(t),e=r(n,t)));var u=n?n.length:void 0;return e||!!u&&p(u)&&j(t,u)&&(St(n)||k(n)||b(n))}function In(n,t){return Tn(n,t,h)}function zn(n,t){var r=Object.create(null),e=Object.create(null);t=t||q;var u=o(function(u){var i=u.pop(),c=t.apply(null,u);In(r,c)?$t(function(){i.apply(null,r[c])}):In(e,c)?e[c].push(i):(e[c]=[i],n.apply(null,u.concat([o(function(n){r[c]=n;var t=e[c];delete e[c];for(var u=0,i=t.length;i>u;u++)t[u].apply(null,n)})])))});return u.memo=r,u.unmemoized=n,u}function $n(n,t,r){r=r||l;var e=y(t)?[]:{};n(t,function(n,t,r){n(o(function(n,u){u.length<=1&&(u=u[0]),e[t]=u,r(n)}))},function(n){r(n,e)})}function Mn(n,t){return $n(x,n,t)}function qn(n,t,r){return $n(Z(t),n,r)}function Bn(n,t){return N(function(t,r){n(t[0],r)},t,1)}function Fn(n,t){function r(n,t){return n.priority-t.priority}function e(n,t,r){for(var e=-1,u=n.length-1;u>e;){var i=e+(u-e+1>>>1);r(t,n[i])>=0?e=i:u=i-1}return e}function u(n,t,u,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");return n.started=!0,St(t)||(t=[t]),0===t.length?$t(function(){n.drain()}):void I(t,function(t){var o={data:t,priority:u,callback:"function"==typeof i?i:l};n.tasks.splice(e(n.tasks,o,r)+1,0,o),n.tasks.length===n.concurrency&&n.saturated(),$t(n.process)})}var i=Bn(n,t);return i.push=function(n,t,r){u(i,n,t,r)},delete i.unshift,i}function Pn(n,t,r,e){var u=kr.call(n).reverse();R(u,t,r,e)}function Un(n,t,r,e){yn(n,t,function(n,t){r(n,function(n,r){n?t(n):t(null,!r)})},e)}function Cn(n,t){return $n(A,n,t)}function Dn(n,t,r){function e(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}function u(n,t){function r(n,r){return function(e){n(function(n,t){e(!n||r,{err:n,result:t})},t)}}function e(n){return function(t){setTimeout(function(){t(null)},n)}}for(;f.times;){var u=!(f.times-=1);c.push(r(f.task,u)),!u&&f.interval>0&&c.push(e(f.interval))}Cn(c,function(t,r){r=r[r.length-1],(n||f.callback)(r.err,r.result)})}var i=5,o=0,c=[],f={times:i,interval:o},a=arguments.length;if(1>a||a>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=a&&"function"==typeof n&&(r=t,t=n),"function"!=typeof n&&e(f,n),f.callback=r,f.task=t,f.callback?u():u}function Hn(n,t,r){function e(n,t){var r=n.criteria,e=t.criteria;return e>r?-1:r>e?1:0}Yt(n,function(n,r){t(n,function(t,e){return t?r(t):void r(null,{value:n,criteria:e})})},function(n,t){return n?r(n):void r(null,H(t.sort(e),s("value")))})}function Nn(n,t,r,e){for(var u=-1,i=xr(Lr((t-n)/(r||1)),0),o=Array(i);i--;)o[e?i:++u]=n,n+=r;return o}function Qn(n,t,r){Yt(Nn(0,n,1),t,r)}function Rn(n,t,r,e){return Zt(Nn(0,n,1),t,r,e)}function Wn(n,t,r){_t(Nn(0,n,1),t,r)}function Gn(n,t,r,e){3===arguments.length&&(e=r,r=t,t=St(n)?[]:{}),x(n,function(n,e,u){r(t,n,e,u)},function(n){e(n,t)})}function Jn(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function Kn(n,t,r){return en(function(){return!n.apply(this,arguments)},t,r)}function Vn(n,t){function r(n){return o(function(e,u){if(e)t.apply(null,[e].concat(u));else{var i=n.next();i?u.push(r(i)):u.push(t),sn(n).apply(null,u)}})}return t=a(t||l),St(n)?n.length?void r(mn(n))():t():t(new Error("First argument to waterfall must be an array of functions"))}var Xn,Yn="[object Function]",Zn="[object GeneratorFunction]",_n=Object.prototype,nt=_n.toString,tt=NaN,rt=/^\s+|\s+$/g,et=/^[-+]0x[0-9a-f]+$/i,ut=/^0b[01]+$/i,it=/^0o[0-7]+$/i,ot=parseInt,ct=1/0,ft=1.7976931348623157e308,at="Expected a function",lt=Math.max,st="Expected a function",pt=s("length"),yt=9007199254740991,ht=Object.prototype,vt=ht.hasOwnProperty,mt=Object.getPrototypeOf,dt=Object.keys,gt="[object Arguments]",bt=Object.prototype,kt=bt.hasOwnProperty,wt=bt.toString,jt=bt.propertyIsEnumerable,St=Array.isArray,Ot="[object String]",Et=Object.prototype,Lt=Et.toString,xt=9007199254740991,At=/^(?:0|[1-9]\d*)$/,Tt=Object.prototype,It=c(x),zt="function"==typeof setImmediate&&setImmediate;Xn=zt?function(n){zt(n)}:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:function(n){setTimeout(n,0)};var $t=Xn,Mt=c(A),qt=o(function(n,t){return o(function(r){return n.apply(null,t.concat(r))})}),Bt=$(),Ft=Math.max,Pt=Array.prototype.reverse,Ut=K(J),Ct=V(J),Dt=o(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),Ht=X(x,q,Y),Nt=X(_,q,Y),Qt=X(A,q,Y),Rt=nn("dir"),Wt=X(x,pn,pn),Gt=X(_,pn,pn),Jt=K(yn),Kt=hn(yn),Vt=V(yn),Xt=nn("log"),Yt=K(dn),Zt=hn(dn),_t=V(dn),nr={"function":!0,object:!0},tr=nr[typeof n]&&n&&!n.nodeType?n:null,rr=nr[typeof module]&&module&&!module.nodeType?module:null,er=gn(tr&&rr&&"object"==typeof global&&global),ur=gn(nr[typeof self]&&self),ir=gn(nr[typeof window]&&window),or=gn(nr[typeof this]&&this),cr=er||ir!==(or&&or.window)&&ir||ur||or||Function("return this")(),fr=cr.Symbol,ar="[object Symbol]",lr=Object.prototype,sr=lr.toString,pr=1/0,yr=fr?fr.prototype:void 0,hr=fr?yr.toString:void 0,vr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,mr=/\\(\\)?/g,dr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gr=/^\w*$/,br="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:$t,kr=Array.prototype.slice,wr=K(Un),jr=hn(Un),Sr=V(Un),Or=X(x,Boolean,q),Er=X(_,Boolean,q),Lr=Math.ceil,xr=Math.max,Ar={applyEach:It,applyEachSeries:Mt,apply:qt,asyncify:T,auto:D,cargo:Q,compose:G,concat:Ut,concatSeries:Ct,constant:Dt,detect:Ht,detectLimit:Nt,detectSeries:Qt,dir:Rt,doDuring:rn,doUntil:on,doWhilst:un,during:tn,each:fn,eachLimit:an,eachOf:x,eachOfLimit:_,eachOfSeries:A,eachSeries:ln,ensureAsync:sn,every:Wt,everyLimit:Gt,filter:Jt,filterLimit:Kt,filterSeries:Vt,forever:vn,iterator:mn,log:Xt,map:Yt,mapLimit:Zt,mapSeries:_t,memoize:zn,nextTick:br,parallel:Mn,parallelLimit:qn,priorityQueue:Fn,queue:Bn,reduce:R,reduceRight:Pn,reject:wr,rejectLimit:jr,rejectSeries:Sr,retry:Dn,seq:W,series:Cn,setImmediate:$t,some:Or,someLimit:Er,sortBy:Hn,times:Qn,timesLimit:Rn,timesSeries:Wn,transform:Gn,unmemoize:Jn,until:Kn,waterfall:Vn,whilst:en,all:Wt,any:Or,forEach:fn,forEachSeries:ln,forEachLimit:an,forEachOf:x,forEachOfSeries:A,forEachOfLimit:_,inject:R,foldl:R,foldr:Pn,select:Jt,selectLimit:Kt,selectSeries:Vt,wrapSync:T};n["default"]=Ar,n.applyEach=It,n.applyEachSeries=Mt,n.apply=qt,n.asyncify=T,n.auto=D,n.cargo=Q,n.compose=G,n.concat=Ut,n.concatSeries=Ct,n.constant=Dt,n.detect=Ht,n.detectLimit=Nt,n.detectSeries=Qt,n.dir=Rt,n.doDuring=rn,n.doUntil=on,n.doWhilst=un,n.during=tn,n.each=fn,n.eachLimit=an,n.eachOf=x,n.eachOfLimit=_,n.eachOfSeries=A,n.eachSeries=ln,n.ensureAsync=sn,n.every=Wt,n.everyLimit=Gt,n.filter=Jt,n.filterLimit=Kt,n.filterSeries=Vt,n.forever=vn,n.iterator=mn,n.log=Xt,n.map=Yt,n.mapLimit=Zt,n.mapSeries=_t,n.memoize=zn,n.nextTick=br,n.parallel=Mn,n.parallelLimit=qn,n.priorityQueue=Fn,n.queue=Bn,n.reduce=R,n.reduceRight=Pn,n.reject=wr,n.rejectLimit=jr,n.rejectSeries=Sr,n.retry=Dn,n.seq=W,n.series=Cn,n.setImmediate=$t,n.some=Or,n.someLimit=Er,n.sortBy=Hn,n.times=Qn,n.timesLimit=Rn,n.timesSeries=Wn,n.transform=Gn,n.unmemoize=Jn,n.until=Kn,n.waterfall=Vn,n.whilst=en,n.all=Wt,n.any=Or,n.forEach=fn,n.forEachSeries=ln,n.forEachLimit=an,n.forEachOf=x,n.forEachOfSeries=A,n.forEachOfLimit=_,n.inject=R,n.foldl=R,n.foldr=Pn,n.select=Jt,n.selectLimit=Kt,n.selectSeries=Vt,n.wrapSync=T});
//# sourceMappingURL=dist/async.min.map \ No newline at end of file