diff --git a/bower.json b/bower.json index 60214479..f2970141 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "neo-async", "main": "lib/async.js", - "version": "2.5.1", + "version": "2.5.2", "homepage": "https://github.com/suguru03/neo-async", "authors": [ "Suguru Motegi" diff --git a/dist/async.js b/dist/async.js index 55db32ce..a891d295 100644 --- a/dist/async.js +++ b/dist/async.js @@ -1964,11 +1964,11 @@ var dir = createLogger('dir'); /** - * @version 2.5.1 + * @version 2.5.2 * @namespace async */ var index = { - VERSION: '2.5.1', + VERSION: '2.5.2', // Collections each: each, @@ -8861,9 +8861,11 @@ args.push(done); fn.apply(null, args); - function done() { + function done(err) { var args = createArray(arguments); - memo[key] = args; + if (!err) { + memo[key] = args; + } var q = queues[key]; delete queues[key]; diff --git a/dist/async.min.js b/dist/async.min.js index b5bec295..e54dda4a 100644 --- a/dist/async.min.js +++ b/dist/async.min.js @@ -1,77 +1,77 @@ (function(N,O){"object"===typeof exports&&"undefined"!==typeof module?O(exports):"function"===typeof define&&define.amd?define(["exports"],O):N.async?O(N.neo_async=N.neo_async||{}):O(N.async=N.async||{})})(this,function(N){function O(a){var b=function(a){var b=I(arguments,1);setTimeout(function(){a.apply(null,b)})};Q="function"===typeof setImmediate?setImmediate:b;"object"===typeof process&&"function"===typeof process.nextTick?(C=/^v0.10/.test(process.version)?Q:process.nextTick,Z=/^v0/.test(process.version)? Q:process.nextTick):Z=C=Q;!1===a&&(C=function(a){a()})}function G(a){for(var b=-1,c=a.length,d=Array(c);++b=d)return[];for(var e=Array(d);++cd[e]){var g=d[f]; -d[f]=d[e];d[e]=g}}if(!(e>c)){for(var l,e=a[a[b]>a[e]?b:e],f=b,g=c;f<=g;){for(l=f;f=l&&a[g]>=e;)g--;if(f>g)break;var r=a;l=d;var s=f++,h=g--,k=r[s];r[s]=r[h];r[h]=k;r=l[s];l[s]=l[h];l[h]=r}e=f;aa(a,b,e-1,d);aa(a,e,c,d)}}}function T(a){var b=[];P(a,function(a){a!==y&&(B(a)?U.apply(b,a):b.push(a))});return b}function ba(a,b,c){var d=-1,e=a.length;if(3===b.length)for(;++dc)return e(null,[]);A=Array(m); -K(c>m?m:c,w)}}function V(a,b,c){function d(){b(a[t],s)}function e(){b(a[t],t,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,t,s)}function l(){b(a[m[t]],s)}function r(){k=m[t];b(a[k],k,s)}function s(a,b){a?c(a):++t===h?(n=z,c(null)):!1===b?(n=z,c(null)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,k,m,q,p,n,u=!1,t=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null); -n()}function W(a,b,c,d){function e(){wb)return d(null);K(b>k?k:b,t)}function ya(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function l(){b(a[m[v]],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){a?(u=z,c=E(c),c(a,G(n))):(n[v]=b,++v===h?(u=z,c(null,n),c=z):t?C(u):(t=!0,u()),t=!1)}c=c||y;var h,k,m,q,p,n,u,t=!1,v=0;B(a)?(h=a.length, -u=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),u=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===b.length?r:l));if(!h)return c(null,[]);n=Array(h);u()}function za(a,b,c,d){return function(e,f,g){function l(a){var b=!1;return function(c,e){b&&z();b=!0;c?(g=H(g),g(c)):!!e===d?(g=H(g),g(null,a)):++h===r&&g(null)}}g=g||y;var r,s,h=0;B(e)?(r=e.length,a(e,f,l)):e&&(x&&e[x]?(r=e.size,c(e,f,l)):"object"===typeof e&&(s=F(e),r=s.length,b(e,f,l,s)));r||g(null)}}function Aa(a){return function(b, -c,d){function e(){q=b[v];c(q,h)}function f(){q=b[v];c(q,v,h)}function g(){q=n.next().value;c(q,h)}function l(){q=n.next().value;c(q,v,h)}function r(){q=b[p[v]];c(q,h)}function s(){m=p[v];q=b[m];c(q,m,h)}function h(b,c){b?d(b):!!c===a?(u=z,d(null,q)):++v===k?(u=z,d(null)):t?C(u):(t=!0,u());t=!1}d=E(d||y);var k,m,q,p,n,u,t=!1,v=0;B(b)?(k=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(k=b.size,n=b[x](),u=3===c.length?l:g):"object"===typeof b&&(p=F(b),k=p.length,u=3===c.length?s:r));if(!k)return d(null);u()}} -function Ba(a){return function(b,c,d,e){function f(){q=J++;qc)return e(null);K(c>m?m:c,w)}}function Ca(a,b,c,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&z();c?(a=null,g=H(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===r&&g(null,k))}}g=g||y;var r,s,h=0,k={};B(e)?(r=e.length,a(e,f,l)):e&&(x&&e[x]?(r=e.size,c(e,f,l)):"object"===typeof e&&(s= -F(e),r=s.length,b(e,f,l,s)));if(!r)return g(null,{})}}function Da(a){return function(b,c,d){function e(){m=w;q=b[w];c(q,h)}function f(){m=w;q=b[w];c(q,w,h)}function g(){m=w;q=n.next().value;c(q,h)}function l(){m=w;q=n.next().value;c(q,m,h)}function r(){m=p[w];q=b[m];c(q,h)}function s(){m=p[w];q=b[m];c(q,m,h)}function h(b,c){b?d(b,v):(!!c===a&&(v[m]=q),++w===k?(u=z,d(null,v)):t?C(u):(t=!0,u()),t=!1)}d=E(d||y);var k,m,q,p,n,u,t=!1,v={},w=0;B(b)?(k=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(k=b.size, -n=b[x](),u=3===c.length?l:g):"object"===typeof b&&(p=F(b),k=p.length,u=3===c.length?s:r));if(!k)return d(null,{});u()}}function Ea(a){return function(b,c,d,e){function f(){q=D++;qc)return e(null,{});K(c>m?m:c,w)}}function X(a,b,c,d){function e(b){c(b,a[t],h)}function f(b){c(b,a[t],t,h)}function g(){c(b,p.next().value,h)}function l(){c(b, -p.next().value,t,h)}function r(b){c(b,a[q[t]],h)}function s(b){m=q[t];c(b,a[m],m,h)}function h(a,b){a?d(a,b):++t===k?(c=z,d(null,b)):u?C(function(){n(b)}):(u=!0,n(b));u=!1}d=E(d||y);var k,m,q,p,n,u=!1,t=0;B(a)?(k=a.length,n=4===c.length?f:e):a&&(x&&a[x]?(k=a.size,p=a[x](),n=4===c.length?l:g):"object"===typeof a&&(q=F(a),k=q.length,n=4===c.length?s:r));if(!k)return d(null,b);n(b)}function Fa(a,b,c,d){function e(b){c(b,a[--s],r)}function f(b){c(b,a[--s],s,r)}function g(b){c(b,a[m[--s]],r)}function l(b){k= -m[--s];c(b,a[k],k,r)}function r(a,b){a?d(a,b):0===s?(u=z,d(null,b)):t?C(function(){u(b)}):(t=!0,u(b));t=!1}d=E(d||y);var s,h,k,m,q,p,n,u,t=!1;if(B(a))s=a.length,u=4===c.length?f:e;else if(a)if(x&&a[x]){s=a.size;n=Array(s);q=a[x]();for(h=-1;!1===(p=q.next()).done;)n[++h]=p.value;a=n;u=4===c.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===c.length?l:g);if(!s)return d(null,b);u(b)}function Ga(a,b,c){c=c||y;ha(a,b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ha(a,b,c){c=c||y;ia(a, +d[f]=d[e];d[e]=g}}if(!(e>c)){for(var k,e=a[a[b]>a[e]?b:e],f=b,g=c;f<=g;){for(k=f;f=k&&a[g]>=e;)g--;if(f>g)break;var r=a;k=d;var s=f++,h=g--,l=r[s];r[s]=r[h];r[h]=l;r=k[s];k[s]=k[h];k[h]=r}e=f;aa(a,b,e-1,d);aa(a,e,c,d)}}}function T(a){var b=[];P(a,function(a){a!==y&&(B(a)?U.apply(b,a):b.push(a))});return b}function ba(a,b,c){var d=-1,e=a.length;if(3===b.length)for(;++dc)return e(null,[]);A=Array(m); +K(c>m?m:c,w)}}function V(a,b,c){function d(){b(a[t],s)}function e(){b(a[t],t,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,t,s)}function k(){b(a[m[t]],s)}function r(){l=m[t];b(a[l],l,s)}function s(a,b){a?c(a):++t===h?(n=z,c(null)):!1===b?(n=z,c(null)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,l,m,q,p,n,u=!1,t=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null); +n()}function W(a,b,c,d){function e(){wb)return d(null);K(b>l?l:b,t)}function ya(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function k(){b(a[m[v]],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){a?(u=z,c=E(c),c(a,G(n))):(n[v]=b,++v===h?(u=z,c(null,n),c=z):t?C(u):(t=!0,u()),t=!1)}c=c||y;var h,l,m,q,p,n,u,t=!1,v=0;B(a)?(h=a.length, +u=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),u=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===b.length?r:k));if(!h)return c(null,[]);n=Array(h);u()}function za(a,b,c,d){return function(e,f,g){function k(a){var b=!1;return function(c,e){b&&z();b=!0;c?(g=H(g),g(c)):!!e===d?(g=H(g),g(null,a)):++h===r&&g(null)}}g=g||y;var r,s,h=0;B(e)?(r=e.length,a(e,f,k)):e&&(x&&e[x]?(r=e.size,c(e,f,k)):"object"===typeof e&&(s=F(e),r=s.length,b(e,f,k,s)));r||g(null)}}function Aa(a){return function(b, +c,d){function e(){q=b[v];c(q,h)}function f(){q=b[v];c(q,v,h)}function g(){q=n.next().value;c(q,h)}function k(){q=n.next().value;c(q,v,h)}function r(){q=b[p[v]];c(q,h)}function s(){m=p[v];q=b[m];c(q,m,h)}function h(b,c){b?d(b):!!c===a?(u=z,d(null,q)):++v===l?(u=z,d(null)):t?C(u):(t=!0,u());t=!1}d=E(d||y);var l,m,q,p,n,u,t=!1,v=0;B(b)?(l=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(l=b.size,n=b[x](),u=3===c.length?k:g):"object"===typeof b&&(p=F(b),l=p.length,u=3===c.length?s:r));if(!l)return d(null);u()}} +function Ba(a){return function(b,c,d,e){function f(){q=J++;qc)return e(null);K(c>m?m:c,w)}}function Ca(a,b,c,d){return function(e,f,g){function k(a,b){return function(c,e){null===a&&z();c?(a=null,g=H(g),g(c,L(l))):(!!e===d&&(l[a]=b),a=null,++h===r&&g(null,l))}}g=g||y;var r,s,h=0,l={};B(e)?(r=e.length,a(e,f,k)):e&&(x&&e[x]?(r=e.size,c(e,f,k)):"object"===typeof e&&(s= +F(e),r=s.length,b(e,f,k,s)));if(!r)return g(null,{})}}function Da(a){return function(b,c,d){function e(){m=w;q=b[w];c(q,h)}function f(){m=w;q=b[w];c(q,w,h)}function g(){m=w;q=n.next().value;c(q,h)}function k(){m=w;q=n.next().value;c(q,m,h)}function r(){m=p[w];q=b[m];c(q,h)}function s(){m=p[w];q=b[m];c(q,m,h)}function h(b,c){b?d(b,v):(!!c===a&&(v[m]=q),++w===l?(u=z,d(null,v)):t?C(u):(t=!0,u()),t=!1)}d=E(d||y);var l,m,q,p,n,u,t=!1,v={},w=0;B(b)?(l=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(l=b.size, +n=b[x](),u=3===c.length?k:g):"object"===typeof b&&(p=F(b),l=p.length,u=3===c.length?s:r));if(!l)return d(null,{});u()}}function Ea(a){return function(b,c,d,e){function f(){q=D++;qc)return e(null,{});K(c>m?m:c,w)}}function X(a,b,c,d){function e(b){c(b,a[t],h)}function f(b){c(b,a[t],t,h)}function g(){c(b,p.next().value,h)}function k(){c(b, +p.next().value,t,h)}function r(b){c(b,a[q[t]],h)}function s(b){m=q[t];c(b,a[m],m,h)}function h(a,b){a?d(a,b):++t===l?(c=z,d(null,b)):u?C(function(){n(b)}):(u=!0,n(b));u=!1}d=E(d||y);var l,m,q,p,n,u=!1,t=0;B(a)?(l=a.length,n=4===c.length?f:e):a&&(x&&a[x]?(l=a.size,p=a[x](),n=4===c.length?k:g):"object"===typeof a&&(q=F(a),l=q.length,n=4===c.length?s:r));if(!l)return d(null,b);n(b)}function Fa(a,b,c,d){function e(b){c(b,a[--s],r)}function f(b){c(b,a[--s],s,r)}function g(b){c(b,a[m[--s]],r)}function k(b){l= +m[--s];c(b,a[l],l,r)}function r(a,b){a?d(a,b):0===s?(u=z,d(null,b)):t?C(function(){u(b)}):(t=!0,u(b));t=!1}d=E(d||y);var s,h,l,m,q,p,n,u,t=!1;if(B(a))s=a.length,u=4===c.length?f:e;else if(a)if(x&&a[x]){s=a.size;n=Array(s);q=a[x]();for(h=-1;!1===(p=q.next()).done;)n[++h]=p.value;a=n;u=4===c.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===c.length?k:g);if(!s)return d(null,b);u(b)}function Ga(a,b,c){c=c||y;ha(a,b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ha(a,b,c){c=c||y;ia(a, b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ia(a,b,c,d){d=d||y;ja(a,b,c,function(a,b){if(a)return d(a);d(null,!!b)})}function Ja(a,b){return B(a)?0===a.length?(b(null),!1):!0:(b(Error("First argument to waterfall must be an array of functions")),!1)}function ka(a,b,c){switch(b.length){case 0:case 1:return a(c);case 2:return a(b[1],c);case 3:return a(b[1],b[2],c);case 4:return a(b[1],b[2],b[3],c);case 5:return a(b[1],b[2],b[3],b[4],c);case 6:return a(b[1],b[2],b[3],b[4],b[5],c);default:return b= -I(b,1),b.push(c),a.apply(null,b)}}function Ka(a,b){function c(c,h){if(c)r=z,b=E(b),b(c);else if(++d===f){r=z;var k=b;b=z;2===arguments.length?k(c,h):k.apply(null,G(arguments))}else g=a[d],l=arguments,e?C(r):(e=!0,r()),e=!1}b=b||y;if(Ja(a,b)){var d=0,e=!1,f=a.length,g=a[d],l=[],r=function(){switch(g.length){case 0:try{c(null,g())}catch(a){c(a)}break;case 1:return g(c);case 2:return g(l[1],c);case 3:return g(l[1],l[2],c);case 4:return g(l[1],l[2],l[3],c);case 5:return g(l[1],l[2],l[3],l[4],c);default:return l= -I(l,1),l[g.length-1]=c,g.apply(null,l)}};r()}}function La(){var a=G(arguments);return function(){var b=this,c=G(arguments),d=c[c.length-1];"function"===typeof d?c.pop():d=y;X(a,c,function(a,c,d){a.push(function(a){var b=I(arguments,1);d(a,b)});c.apply(b,a)},function(a,c){c=B(c)?c:[c];c.unshift(a);d.apply(b,c)})}}function Ma(a){return function(b){var c=function(){var c=this,d=G(arguments),g=d.pop()||y;return a(b,function(a,b){a.apply(c,d.concat([b]))},g)};if(1c)throw Error("Concurrency must not be zero");var h=0,k=[],m,q,p={_tasks:new M,concurrency:c,payload:d,saturated:y,unsaturated:y,buffer:c/4,empty:y,drain:y,error:y,started:!1,paused:!1,push:function(a,b){f(a,b)},kill:function(){p.drain=y;p._tasks.empty()}, -unshift:function(a,b){f(a,b,!0)},remove:function(a){p._tasks.remove(a)},process:a?l:r,length:function(){return p._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===p.length()+h},pause:function(){p.paused=!0},resume:function(){!1!==p.paused&&(p.paused=!1,K(p.concurrency=arguments.length?f:I(arguments,1);if(a){r=g=0;s.length=0;var k=L(l);k[b]=f;b=null;var h=c;c=y;h(a,k)}else r--,g--,l[b]=f,e(b),b=null}function p(){0===--t&& +I(b,1),b.push(c),a.apply(null,b)}}function Ka(a,b){function c(c,h){if(c)r=z,b=E(b),b(c);else if(++d===f){r=z;var l=b;b=z;2===arguments.length?l(c,h):l.apply(null,G(arguments))}else g=a[d],k=arguments,e?C(r):(e=!0,r()),e=!1}b=b||y;if(Ja(a,b)){var d=0,e=!1,f=a.length,g=a[d],k=[],r=function(){switch(g.length){case 0:try{c(null,g())}catch(a){c(a)}break;case 1:return g(c);case 2:return g(k[1],c);case 3:return g(k[1],k[2],c);case 4:return g(k[1],k[2],k[3],c);case 5:return g(k[1],k[2],k[3],k[4],c);default:return k= +I(k,1),k[g.length-1]=c,g.apply(null,k)}};r()}}function La(){var a=G(arguments);return function(){var b=this,c=G(arguments),d=c[c.length-1];"function"===typeof d?c.pop():d=y;X(a,c,function(a,c,d){a.push(function(a){var b=I(arguments,1);d(a,b)});c.apply(b,a)},function(a,c){c=B(c)?c:[c];c.unshift(a);d.apply(b,c)})}}function Ma(a){return function(b){var c=function(){var c=this,d=G(arguments),g=d.pop()||y;return a(b,function(a,b){a.apply(c,d.concat([b]))},g)};if(1c)throw Error("Concurrency must not be zero");var h=0,l=[],m,q,p={_tasks:new M,concurrency:c,payload:d,saturated:y,unsaturated:y,buffer:c/4,empty:y,drain:y,error:y,started:!1,paused:!1,push:function(a,b){f(a,b)},kill:function(){p.drain=y;p._tasks.empty()}, +unshift:function(a,b){f(a,b,!0)},remove:function(a){p._tasks.remove(a)},process:a?k:r,length:function(){return p._tasks.length},running:function(){return h},workersList:function(){return l},idle:function(){return 0===p.length()+h},pause:function(){p.paused=!0},resume:function(){!1!==p.paused&&(p.paused=!1,K(p.concurrency=arguments.length?f:I(arguments,1);if(a){r=g=0;s.length=0;var l=L(k);l[b]=f;b=null;var h=c;c=y;h(a,l)}else r--,g--,k[b]=f,e(b),b=null}function p(){0===--t&& s.push([n,u,d])}var n,u;if(B(a)){var t=a.length-1;n=a[t];u=t;if(0===t)s.push([n,u,d]);else for(var v=-1;++v=arguments.length)return c(a,e);var f=G(arguments);return c.apply(null,f)}b(d)}function e(){b(f)}function f(a,b){if(++s===g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,b);var d=G(arguments);return c.apply(null,d)}setTimeout(e,l(s))}var g,l,r,s=0;if(3>arguments.length&&"function"===typeof a)c=b||y,b=a,a=null,g=5;else switch(c=c||y,typeof a){case "object":"function"===typeof a.errorFilter&&(r=a.errorFilter);var h=a.interval;switch(typeof h){case "function":l=h;break;case "string":case "number":l= -(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof b)throw Error("Invalid arguments for async.retry");l?b(f):b(d)}function Oa(a){return function(){var b=G(arguments),c=b.pop(),d;try{d=a.apply(this,b)}catch(e){return c(e)}d&&"function"===typeof d.then?d.then(function(a){try{c(null,a)}catch(b){C(Pa,b)}},function(a){a=a&&a.message?a:Error(a);try{c(a, +g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,e);var f=G(arguments);return c.apply(null,f)}b(d)}function e(){b(f)}function f(a,b){if(++s===g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,b);var d=G(arguments);return c.apply(null,d)}setTimeout(e,k(s))}var g,k,r,s=0;if(3>arguments.length&&"function"===typeof a)c=b||y,b=a,a=null,g=5;else switch(c=c||y,typeof a){case "object":"function"===typeof a.errorFilter&&(r=a.errorFilter);var h=a.interval;switch(typeof h){case "function":k=h;break;case "string":case "number":k= +(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof b)throw Error("Invalid arguments for async.retry");k?b(f):b(d)}function Oa(a){return function(){var b=G(arguments),c=b.pop(),d;try{d=a.apply(this,b)}catch(e){return c(e)}d&&"function"===typeof d.then?d.then(function(a){try{c(null,a)}catch(b){C(Pa,b)}},function(a){a=a&&a.message?a:Error(a);try{c(a, void 0)}catch(b){C(Pa,b)}}):c(null,d)}}function Pa(a){throw a;}function Qa(a){return function(){function b(a,b){if(a)return c(null,{error:a});2=arguments.length?c: -I(arguments,1),a=null,++r===f&&d(null,l))}}d=d||y;var f,g,l,r=0;B(c)?(f=c.length,l=Array(f),a(c,e)):c&&"object"===typeof c&&(g=F(c),f=g.length,l={},b(c,e,g));f||d(null,l)}}(function(a,b){for(var c=-1,d=a.length;++cb)return d(null,[]);t=Array(k);K(b>k?k:b,v)},mapValues:eb,mapValuesSeries:function(a,b,c){function d(){k=v;b(a[v],s)}function e(){k=v;b(a[v],v,s)}function f(){k=v;p=q.next().value;b(p,s)}function g(){k=v;p=q.next().value;b(p,v,s)}function l(){k=m[v];b(a[k],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){a? -(n=z,c=E(c),c(a,L(t))):(t[k]=b,++v===h?(n=z,c(null,t),c=z):u?C(n):(u=!0,n()),u=!1)}c=c||y;var h,k,m,q,p,n,u=!1,t={},v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null,t);n()},mapValuesLimit:function(a,b,c,d){function e(){m=A++;mb)return d(null,w);K(b>k?k:b,t)},filter:Sa,filterSeries:Ta, -filterLimit:Ua,select:Sa,selectSeries:Ta,selectLimit:Ua,reject:fb,rejectSeries:gb,rejectLimit:hb,detect:ha,detectSeries:ia,detectLimit:ja,find:ha,findSeries:ia,findLimit:ja,pick:ib,pickSeries:jb,pickLimit:kb,omit:lb,omitSeries:mb,omitLimit:nb,reduce:X,inject:X,foldl:X,reduceRight:Fa,foldr:Fa,transform:ob,transformSeries:function(a,b,c,d){function e(){c(u,a[v],h)}function f(){c(u,a[v],v,h)}function g(){c(u,p.next().value,h)}function l(){c(u,p.next().value,v,h)}function r(){c(u,a[q[v]],h)}function s(){m= -q[v];c(u,a[m],m,h)}function h(a,b){a?d(a,u):++v===k?(n=z,d(null,u)):!1===b?(n=z,d(null,u)):t?C(n):(t=!0,n());t=!1}3===arguments.length&&(d=c,c=b,b=void 0);d=E(d||y);var k,m,q,p,n,u,t=!1,v=0;B(a)?(k=a.length,u=void 0!==b?b:[],n=4===c.length?f:e):a&&(x&&a[x]?(k=a.size,p=a[x](),u=void 0!==b?b:{},n=4===c.length?l:g):"object"===typeof a&&(q=F(a),k=q.length,u=void 0!==b?b:{},n=4===c.length?s:r));if(!k)return d(null,void 0!==b?b:u||{});n()},transformLimit:function(a,b,c,d,e){function f(){q=z++;qb)return e(null,void 0!==c?c:w||{});K(b>m?m:b,v)},sortBy:pb,sortBySeries:function(a,b,c){function d(){m=a[w];b(m,s)}function e(){m=a[w];b(m,w,s)}function f(){m=p.next().value;n[w]=m;b(m,s)}function g(){m=p.next().value;n[w]=m;b(m,w,s)}function l(){m=a[q[w]];n[w]=m;b(m,s)}function r(){k=q[w];m=a[k];n[w]=m;b(m,k,s)} -function s(a,b){u[w]=b;a?c(a):++w===h?(t=z,c(null,$(n,u))):v?C(t):(v=!0,t());v=!1}c=E(c||y);var h,k,m,q,p,n,u,t,v=!1,w=0;B(a)?(h=a.length,n=a,u=Array(h),t=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,n=Array(h),u=Array(h),p=a[x](),t=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=Array(h),u=Array(h),t=3===b.length?r:l));if(!h)return c(null,[]);t()},sortByLimit:function(a,b,c,d){function e(){Db)return d(null,[]);w=Array(k);K(b>k?k:b,A)},some:Ga,someSeries:Ha,someLimit:Ia,any:Ga,anySeries:Ha,anyLimit:Ia,every:Va,everySeries:Wa,everyLimit:Xa,all:Va,allSeries:Wa,allLimit:Xa,concat:qb,concatSeries:function(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function l(){b(a[m[v]],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){B(b)?U.apply(t,b): -2<=arguments.length&&U.apply(t,I(arguments,1));a?c(a,t):++v===h?(n=z,c(null,t)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,k,m,q,p,n,u=!1,t=[],v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null,t);n()},concatLimit:function(a,b,c,d){function e(){tb)return d(null,[]);var A=Array(k);K(b>k?k:b,n)},groupBy:rb,groupBySeries:function(a,b,c){function d(){m=a[t];b(m,s)}function e(){m=a[t];b(m,t,s)}function f(){m=p.next().value;b(m,s)}function g(){m=p.next().value;b(m,t,s)}function l(){m=a[q[t]];b(m,s)}function r(){k=q[t];m=a[k];b(m,k,s)}function s(a,b){if(a)n=z,c=E(c),c(a,L(v));else{var d=v[b];d?d.push(m):v[b]=[m];++t===h?(n=z,c(null,v)):u? -C(n):(u=!0,n());u=!1}}c=E(c||y);var h,k,m,q,p,n,u=!1,t=0,v={};B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,p=a[x](),n=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=3===b.length?r:l));if(!h)return c(null,v);n()},groupByLimit:function(a,b,c,d){function e(){Ab)return d(null,D);K(b>k?k:b,v)},parallel:sb,series:function(a,b){function c(){g= -k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,c){a?(s=z,b=E(b),b(a,r)):(r[g]=2>=arguments.length?c:I(arguments,1),++k===f?(s=z,b(null,r)):h?C(s):(h=!0,s()),h=!1)}b=b||y;var f,g,l,r,s,h=!1,k=0;if(B(a))f=a.length,r=Array(f),s=c;else if(a&&"object"===typeof a)l=F(a),f=l.length,r={},s=d;else return b(null);if(!f)return b(null,r);s()},parallelLimit:function(a,b,c){function d(){l=q++;if(l=arguments.length?d:I(arguments,1),a=null,++p===g?c(null,h):m?C(k):(m=!0,k()),m=!1)}}c=c||y;var g,l,r,s,h,k,m=!1,q=0,p=0;B(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h={},k=e);if(!g||isNaN(b)||1>b)return c(null,h);K(b>g?g:b,k)},tryEach:function(a,b){function c(){a[r](e)}function d(){a[g[r]](e)}function e(a,c){a?++r===f?b(a):l():2>=arguments.length?b(null,c):b(null,I(arguments,1))}b=b||y;var f,g,l,r=0;B(a)?(f=a.length,l=c):a&&"object"===typeof a&& -(g=F(a),f=g.length,l=d);if(!f)return b(null);l()},waterfall:function(a,b){function c(){ka(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(b=y,z());h=void 0;k?(g=b,b=z,g(k)):++r===s?(g=b,b=z,2>=arguments.length?g(k,m):g.apply(null,G(arguments))):(l?(f=arguments,e=a[r]||z,C(c)):(l=!0,ka(a[r]||z,arguments,d(r))),l=!1)}}b=b||y;if(Ja(a,b)){var e,f,g,l,r=0,s=a.length;ka(a[0],[],d(0))}},angelFall:Ka,angelfall:Ka,whilst:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b, +function(){var a=Aa(!1);return function(b,c,d){d=d||y;a(b,c,function(a,b){if(a)return d(a);d(null,!b)})}}(),Xa=function(){var a=Ba(!1);return function(b,c,d,e){e=e||y;a(b,c,d,function(a,b){if(a)return e(a);e(null,!b)})}}(),ib=Ca(R,sa,ta,!0),jb=Da(!0),kb=Ea(!0),lb=Ca(R,sa,ta,!1),mb=Da(!1),nb=Ea(!1),ob=function(a,b,c){return function(d,e,f,g){function k(a,b){a?(g=H(g),g(a,B(h)?G(h):L(h))):++l===r?g(null,h):!1===b&&(g=H(g),g(null,B(h)?G(h):L(h)))}3===arguments.length&&(g=f,f=e,e=void 0);g=g||y;var r, +s,h,l=0;B(d)?(r=d.length,h=void 0!==e?e:[],a(d,h,f,k)):d&&(x&&d[x]?(r=d.size,h=void 0!==e?e:{},c(d,h,f,k)):"object"===typeof d&&(s=F(d),r=s.length,h=void 0!==e?e:{},b(d,h,f,k,s)));r||g(null,void 0!==e?e:h||{})}}(function(a,b,c,d){var e=-1,f=a.length;if(4===c.length)for(;++e=arguments.length?c: +I(arguments,1),a=null,++r===f&&d(null,k))}}d=d||y;var f,g,k,r=0;B(c)?(f=c.length,k=Array(f),a(c,e)):c&&"object"===typeof c&&(g=F(c),f=g.length,k={},b(c,e,g));f||d(null,k)}}(function(a,b){for(var c=-1,d=a.length;++cb)return d(null,[]);t=Array(l);K(b>l?l:b,v)},mapValues:eb,mapValuesSeries:function(a,b,c){function d(){l=v;b(a[v],s)}function e(){l=v;b(a[v],v,s)}function f(){l=v;p=q.next().value;b(p,s)}function g(){l=v;p=q.next().value;b(p,v,s)}function k(){l=m[v];b(a[l],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){a? +(n=z,c=E(c),c(a,L(t))):(t[l]=b,++v===h?(n=z,c(null,t),c=z):u?C(n):(u=!0,n()),u=!1)}c=c||y;var h,l,m,q,p,n,u=!1,t={},v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null,t);n()},mapValuesLimit:function(a,b,c,d){function e(){m=A++;mb)return d(null,w);K(b>l?l:b,t)},filter:Sa,filterSeries:Ta, +filterLimit:Ua,select:Sa,selectSeries:Ta,selectLimit:Ua,reject:fb,rejectSeries:gb,rejectLimit:hb,detect:ha,detectSeries:ia,detectLimit:ja,find:ha,findSeries:ia,findLimit:ja,pick:ib,pickSeries:jb,pickLimit:kb,omit:lb,omitSeries:mb,omitLimit:nb,reduce:X,inject:X,foldl:X,reduceRight:Fa,foldr:Fa,transform:ob,transformSeries:function(a,b,c,d){function e(){c(u,a[v],h)}function f(){c(u,a[v],v,h)}function g(){c(u,p.next().value,h)}function k(){c(u,p.next().value,v,h)}function r(){c(u,a[q[v]],h)}function s(){m= +q[v];c(u,a[m],m,h)}function h(a,b){a?d(a,u):++v===l?(n=z,d(null,u)):!1===b?(n=z,d(null,u)):t?C(n):(t=!0,n());t=!1}3===arguments.length&&(d=c,c=b,b=void 0);d=E(d||y);var l,m,q,p,n,u,t=!1,v=0;B(a)?(l=a.length,u=void 0!==b?b:[],n=4===c.length?f:e):a&&(x&&a[x]?(l=a.size,p=a[x](),u=void 0!==b?b:{},n=4===c.length?k:g):"object"===typeof a&&(q=F(a),l=q.length,u=void 0!==b?b:{},n=4===c.length?s:r));if(!l)return d(null,void 0!==b?b:u||{});n()},transformLimit:function(a,b,c,d,e){function f(){q=z++;qb)return e(null,void 0!==c?c:w||{});K(b>m?m:b,v)},sortBy:pb,sortBySeries:function(a,b,c){function d(){m=a[w];b(m,s)}function e(){m=a[w];b(m,w,s)}function f(){m=p.next().value;n[w]=m;b(m,s)}function g(){m=p.next().value;n[w]=m;b(m,w,s)}function k(){m=a[q[w]];n[w]=m;b(m,s)}function r(){l=q[w];m=a[l];n[w]=m;b(m,l,s)} +function s(a,b){u[w]=b;a?c(a):++w===h?(t=z,c(null,$(n,u))):v?C(t):(v=!0,t());v=!1}c=E(c||y);var h,l,m,q,p,n,u,t,v=!1,w=0;B(a)?(h=a.length,n=a,u=Array(h),t=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,n=Array(h),u=Array(h),p=a[x](),t=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=Array(h),u=Array(h),t=3===b.length?r:k));if(!h)return c(null,[]);t()},sortByLimit:function(a,b,c,d){function e(){Db)return d(null,[]);w=Array(l);K(b>l?l:b,A)},some:Ga,someSeries:Ha,someLimit:Ia,any:Ga,anySeries:Ha,anyLimit:Ia,every:Va,everySeries:Wa,everyLimit:Xa,all:Va,allSeries:Wa,allLimit:Xa,concat:qb,concatSeries:function(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function k(){b(a[m[v]],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){B(b)?U.apply(t,b): +2<=arguments.length&&U.apply(t,I(arguments,1));a?c(a,t):++v===h?(n=z,c(null,t)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,l,m,q,p,n,u=!1,t=[],v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null,t);n()},concatLimit:function(a,b,c,d){function e(){tb)return d(null,[]);var A=Array(l);K(b>l?l:b,n)},groupBy:rb,groupBySeries:function(a,b,c){function d(){m=a[t];b(m,s)}function e(){m=a[t];b(m,t,s)}function f(){m=p.next().value;b(m,s)}function g(){m=p.next().value;b(m,t,s)}function k(){m=a[q[t]];b(m,s)}function r(){l=q[t];m=a[l];b(m,l,s)}function s(a,b){if(a)n=z,c=E(c),c(a,L(v));else{var d=v[b];d?d.push(m):v[b]=[m];++t===h?(n=z,c(null,v)):u? +C(n):(u=!0,n());u=!1}}c=E(c||y);var h,l,m,q,p,n,u=!1,t=0,v={};B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,p=a[x](),n=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=3===b.length?r:k));if(!h)return c(null,v);n()},groupByLimit:function(a,b,c,d){function e(){Ab)return d(null,D);K(b>l?l:b,v)},parallel:sb,series:function(a,b){function c(){g= +l;a[l](e)}function d(){g=k[l];a[g](e)}function e(a,c){a?(s=z,b=E(b),b(a,r)):(r[g]=2>=arguments.length?c:I(arguments,1),++l===f?(s=z,b(null,r)):h?C(s):(h=!0,s()),h=!1)}b=b||y;var f,g,k,r,s,h=!1,l=0;if(B(a))f=a.length,r=Array(f),s=c;else if(a&&"object"===typeof a)k=F(a),f=k.length,r={},s=d;else return b(null);if(!f)return b(null,r);s()},parallelLimit:function(a,b,c){function d(){k=q++;if(k=arguments.length?d:I(arguments,1),a=null,++p===g?c(null,h):m?C(l):(m=!0,l()),m=!1)}}c=c||y;var g,k,r,s,h,l,m=!1,q=0,p=0;B(a)?(g=a.length,h=Array(g),l=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h={},l=e);if(!g||isNaN(b)||1>b)return c(null,h);K(b>g?g:b,l)},tryEach:function(a,b){function c(){a[r](e)}function d(){a[g[r]](e)}function e(a,c){a?++r===f?b(a):k():2>=arguments.length?b(null,c):b(null,I(arguments,1))}b=b||y;var f,g,k,r=0;B(a)?(f=a.length,k=c):a&&"object"===typeof a&& +(g=F(a),f=g.length,k=d);if(!f)return b(null);k()},waterfall:function(a,b){function c(){ka(e,f,d(e))}function d(h){return function(l,m){void 0===h&&(b=y,z());h=void 0;l?(g=b,b=z,g(l)):++r===s?(g=b,b=z,2>=arguments.length?g(l,m):g.apply(null,G(arguments))):(k?(f=arguments,e=a[r]||z,C(c)):(k=!0,ka(a[r]||z,arguments,d(r))),k=!1)}}b=b||y;if(Ja(a,b)){var e,f,g,k,r=0,s=a.length;ka(a[0],[],d(0))}},angelFall:Ka,angelfall:Ka,whilst:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b, e){if(b)return c(b);2>=arguments.length?a(e)?d():c(null,e):(e=I(arguments,1),a.apply(null,e)?d():c.apply(null,[null].concat(e)))}c=c||y;var g=!1;a()?d():c(null)},doWhilst:function(a,b,c){function d(){g?C(e):(g=!0,a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return c(a);2>=arguments.length?b(e)?d():c(null,e):(e=I(arguments,1),b.apply(null,e)?d():c.apply(null,[null].concat(e)))}c=c||y;var g=!1;e()},until:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b,e){if(b)return c(b); 2>=arguments.length?a(e)?c(null,e):d():(e=I(arguments,1),a.apply(null,e)?c.apply(null,[null].concat(e)):d())}c=c||y;var g=!1;a()?c(null):d()},doUntil:function(a,b,c){function d(){g?C(e):(g=!0,a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return c(a);2>=arguments.length?b(e)?c(null,e):d():(e=I(arguments,1),b.apply(null,e)?c.apply(null,[null].concat(e)):d())}c=c||y;var g=!1;e()},during:function(a,b,c){function d(a,d){if(a)return c(a);d?b(e):c(null)}function e(b){if(b)return c(b);a(d)}c=c||y;a(d)}, -doDuring:function(a,b,c){function d(b,d){if(b)return c(b);d?a(e):c(null)}function e(a,e){if(a)return c(a);switch(arguments.length){case 0:case 1:b(d);break;case 2:b(e,d);break;default:var l=I(arguments,1);l.push(d);b.apply(null,l)}}c=c||y;d(null,!0)},forever:function(a,b){function c(){a(d)}function d(a){if(a){if(b)return b(a);throw a;}e?C(c):(e=!0,c());e=!1}var e=!1;c()},compose:function(){return La.apply(null,Ya(arguments))},seq:La,applyEach:tb,applyEachSeries:ub,queue:function(a,b){return la(!0, -a,b)},priorityQueue:function(a,b){var c=la(!0,a,b);c.push=function(a,b,f){c.started=!0;b=b||0;var g=B(a)?a:[a],l=g.length;if(void 0===a||0===l)c.idle()&&C(c.drain);else{f="function"===typeof f?f:y;for(a=c._tasks.head;a&&b>=a.priority;)a=a.next;for(;l--;){var r={data:g[l],priority:b,callback:f};a?c._tasks.insertBefore(a,r):c._tasks.push(r);C(c.process)}}};delete c.unshift;return c},cargo:function(a,b){return la(!1,a,1,b)},auto:Na,autoInject:function(a,b,c){var d={};S(a,function(a,b){var c,l=a.length; -if(B(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=G(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=$a(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters.");l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return c(null,[]);var e=Array(a);K(a,function(a){b(a,d(a))})},timesSeries:function(a,b,c){function d(){b(l,e)}function e(b,e){f[l]=e;b?(c(b),c=z):++l>=a?(c(null,f),c=z):g?C(d):(g=!0,d());g=!1}c=c||y;a=+a;if(isNaN(a)||1>a)return c(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,b,c,d){function e(){var b= -r++;b=a?(d(null,g),d=z):l?C(e):(l=!0,e());l=!1}}d=d||y;a=+a;if(isNaN(a)||1>a||isNaN(b)||1>b)return d(null,[]);var g=Array(a),l=!1,r=0,s=0;K(b>a?a:b,e)},race:function(a,b){b=H(b||y);var c,d,e=-1;if(B(a))for(c=a.length;++e=a.priority;)a=a.next;for(;k--;){var r={data:g[k],priority:b,callback:f};a?c._tasks.insertBefore(a,r):c._tasks.push(r);C(c.process)}}};delete c.unshift;return c},cargo:function(a,b){return la(!1,a,1,b)},auto:Na,autoInject:function(a,b,c){var d={};S(a,function(a,b){var c,k=a.length; +if(B(a)){if(0===k)throw Error("autoInject task functions require explicit parameters.");c=G(a);k=c.length-1;a=c[k];if(0===k){d[b]=a;return}}else{if(1===k){d[b]=a;return}c=$a(a);if(0===k&&0===c.length)throw Error("autoInject task functions require explicit parameters.");k=c.length-1}c[k]=function(b,d){switch(k){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return c(null,[]);var e=Array(a);K(a,function(a){b(a,d(a))})},timesSeries:function(a,b,c){function d(){b(k,e)}function e(b,e){f[k]=e;b?(c(b),c=z):++k>=a?(c(null,f),c=z):g?C(d):(g=!0,d());g=!1}c=c||y;a=+a;if(isNaN(a)||1>a)return c(null,[]);var f=Array(a),g=!1,k=0;d()},timesLimit:function(a,b,c,d){function e(){var b= +r++;b=a?(d(null,g),d=z):k?C(e):(k=!0,e());k=!1}}d=d||y;a=+a;if(isNaN(a)||1>a||isNaN(b)||1>b)return d(null,[]);var g=Array(a),k=!1,r=0,s=0;K(b>a?a:b,e)},race:function(a,b){b=H(b||y);var c,d,e=-1;if(B(a))for(c=a.length;++e=d)return[];for(var e=Array(d);++cd[e]){var g=d[f]; -d[f]=d[e];d[e]=g}}if(!(e>c)){for(var l,e=a[a[b]>a[e]?b:e],f=b,g=c;f<=g;){for(l=f;f=l&&a[g]>=e;)g--;if(f>g)break;var r=a;l=d;var s=f++,h=g--,k=r[s];r[s]=r[h];r[h]=k;r=l[s];l[s]=l[h];l[h]=r}e=f;aa(a,b,e-1,d);aa(a,e,c,d)}}}function T(a){var b=[];P(a,function(a){a!==y&&(B(a)?U.apply(b,a):b.push(a))});return b}function ba(a,b,c){var d=-1,e=a.length;if(3===b.length)for(;++dc)return e(null,[]);A=Array(m); -K(c>m?m:c,w)}}function V(a,b,c){function d(){b(a[t],s)}function e(){b(a[t],t,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,t,s)}function l(){b(a[m[t]],s)}function r(){k=m[t];b(a[k],k,s)}function s(a,b){a?c(a):++t===h?(n=z,c(null)):!1===b?(n=z,c(null)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,k,m,q,p,n,u=!1,t=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null); -n()}function W(a,b,c,d){function e(){wb)return d(null);K(b>k?k:b,t)}function ya(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function l(){b(a[m[v]],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){a?(u=z,c=E(c),c(a,G(n))):(n[v]=b,++v===h?(u=z,c(null,n),c=z):t?C(u):(t=!0,u()),t=!1)}c=c||y;var h,k,m,q,p,n,u,t=!1,v=0;B(a)?(h=a.length, -u=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),u=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===b.length?r:l));if(!h)return c(null,[]);n=Array(h);u()}function za(a,b,c,d){return function(e,f,g){function l(a){var b=!1;return function(c,e){b&&z();b=!0;c?(g=H(g),g(c)):!!e===d?(g=H(g),g(null,a)):++h===r&&g(null)}}g=g||y;var r,s,h=0;B(e)?(r=e.length,a(e,f,l)):e&&(x&&e[x]?(r=e.size,c(e,f,l)):"object"===typeof e&&(s=F(e),r=s.length,b(e,f,l,s)));r||g(null)}}function Aa(a){return function(b, -c,d){function e(){q=b[v];c(q,h)}function f(){q=b[v];c(q,v,h)}function g(){q=n.next().value;c(q,h)}function l(){q=n.next().value;c(q,v,h)}function r(){q=b[p[v]];c(q,h)}function s(){m=p[v];q=b[m];c(q,m,h)}function h(b,c){b?d(b):!!c===a?(u=z,d(null,q)):++v===k?(u=z,d(null)):t?C(u):(t=!0,u());t=!1}d=E(d||y);var k,m,q,p,n,u,t=!1,v=0;B(b)?(k=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(k=b.size,n=b[x](),u=3===c.length?l:g):"object"===typeof b&&(p=F(b),k=p.length,u=3===c.length?s:r));if(!k)return d(null);u()}} -function Ba(a){return function(b,c,d,e){function f(){q=J++;qc)return e(null);K(c>m?m:c,w)}}function Ca(a,b,c,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&z();c?(a=null,g=H(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===r&&g(null,k))}}g=g||y;var r,s,h=0,k={};B(e)?(r=e.length,a(e,f,l)):e&&(x&&e[x]?(r=e.size,c(e,f,l)):"object"===typeof e&&(s= -F(e),r=s.length,b(e,f,l,s)));if(!r)return g(null,{})}}function Da(a){return function(b,c,d){function e(){m=w;q=b[w];c(q,h)}function f(){m=w;q=b[w];c(q,w,h)}function g(){m=w;q=n.next().value;c(q,h)}function l(){m=w;q=n.next().value;c(q,m,h)}function r(){m=p[w];q=b[m];c(q,h)}function s(){m=p[w];q=b[m];c(q,m,h)}function h(b,c){b?d(b,v):(!!c===a&&(v[m]=q),++w===k?(u=z,d(null,v)):t?C(u):(t=!0,u()),t=!1)}d=E(d||y);var k,m,q,p,n,u,t=!1,v={},w=0;B(b)?(k=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(k=b.size, -n=b[x](),u=3===c.length?l:g):"object"===typeof b&&(p=F(b),k=p.length,u=3===c.length?s:r));if(!k)return d(null,{});u()}}function Ea(a){return function(b,c,d,e){function f(){q=D++;qc)return e(null,{});K(c>m?m:c,w)}}function X(a,b,c,d){function e(b){c(b,a[t],h)}function f(b){c(b,a[t],t,h)}function g(){c(b,p.next().value,h)}function l(){c(b, -p.next().value,t,h)}function r(b){c(b,a[q[t]],h)}function s(b){m=q[t];c(b,a[m],m,h)}function h(a,b){a?d(a,b):++t===k?(c=z,d(null,b)):u?C(function(){n(b)}):(u=!0,n(b));u=!1}d=E(d||y);var k,m,q,p,n,u=!1,t=0;B(a)?(k=a.length,n=4===c.length?f:e):a&&(x&&a[x]?(k=a.size,p=a[x](),n=4===c.length?l:g):"object"===typeof a&&(q=F(a),k=q.length,n=4===c.length?s:r));if(!k)return d(null,b);n(b)}function Fa(a,b,c,d){function e(b){c(b,a[--s],r)}function f(b){c(b,a[--s],s,r)}function g(b){c(b,a[m[--s]],r)}function l(b){k= -m[--s];c(b,a[k],k,r)}function r(a,b){a?d(a,b):0===s?(u=z,d(null,b)):t?C(function(){u(b)}):(t=!0,u(b));t=!1}d=E(d||y);var s,h,k,m,q,p,n,u,t=!1;if(B(a))s=a.length,u=4===c.length?f:e;else if(a)if(x&&a[x]){s=a.size;n=Array(s);q=a[x]();for(h=-1;!1===(p=q.next()).done;)n[++h]=p.value;a=n;u=4===c.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===c.length?l:g);if(!s)return d(null,b);u(b)}function Ga(a,b,c){c=c||y;ha(a,b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ha(a,b,c){c=c||y;ia(a, +d[f]=d[e];d[e]=g}}if(!(e>c)){for(var k,e=a[a[b]>a[e]?b:e],f=b,g=c;f<=g;){for(k=f;f=k&&a[g]>=e;)g--;if(f>g)break;var r=a;k=d;var s=f++,h=g--,l=r[s];r[s]=r[h];r[h]=l;r=k[s];k[s]=k[h];k[h]=r}e=f;aa(a,b,e-1,d);aa(a,e,c,d)}}}function T(a){var b=[];P(a,function(a){a!==y&&(B(a)?U.apply(b,a):b.push(a))});return b}function ba(a,b,c){var d=-1,e=a.length;if(3===b.length)for(;++dc)return e(null,[]);A=Array(m); +K(c>m?m:c,w)}}function V(a,b,c){function d(){b(a[t],s)}function e(){b(a[t],t,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,t,s)}function k(){b(a[m[t]],s)}function r(){l=m[t];b(a[l],l,s)}function s(a,b){a?c(a):++t===h?(n=z,c(null)):!1===b?(n=z,c(null)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,l,m,q,p,n,u=!1,t=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null); +n()}function W(a,b,c,d){function e(){wb)return d(null);K(b>l?l:b,t)}function ya(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function k(){b(a[m[v]],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){a?(u=z,c=E(c),c(a,G(n))):(n[v]=b,++v===h?(u=z,c(null,n),c=z):t?C(u):(t=!0,u()),t=!1)}c=c||y;var h,l,m,q,p,n,u,t=!1,v=0;B(a)?(h=a.length, +u=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),u=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===b.length?r:k));if(!h)return c(null,[]);n=Array(h);u()}function za(a,b,c,d){return function(e,f,g){function k(a){var b=!1;return function(c,e){b&&z();b=!0;c?(g=H(g),g(c)):!!e===d?(g=H(g),g(null,a)):++h===r&&g(null)}}g=g||y;var r,s,h=0;B(e)?(r=e.length,a(e,f,k)):e&&(x&&e[x]?(r=e.size,c(e,f,k)):"object"===typeof e&&(s=F(e),r=s.length,b(e,f,k,s)));r||g(null)}}function Aa(a){return function(b, +c,d){function e(){q=b[v];c(q,h)}function f(){q=b[v];c(q,v,h)}function g(){q=n.next().value;c(q,h)}function k(){q=n.next().value;c(q,v,h)}function r(){q=b[p[v]];c(q,h)}function s(){m=p[v];q=b[m];c(q,m,h)}function h(b,c){b?d(b):!!c===a?(u=z,d(null,q)):++v===l?(u=z,d(null)):t?C(u):(t=!0,u());t=!1}d=E(d||y);var l,m,q,p,n,u,t=!1,v=0;B(b)?(l=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(l=b.size,n=b[x](),u=3===c.length?k:g):"object"===typeof b&&(p=F(b),l=p.length,u=3===c.length?s:r));if(!l)return d(null);u()}} +function Ba(a){return function(b,c,d,e){function f(){q=J++;qc)return e(null);K(c>m?m:c,w)}}function Ca(a,b,c,d){return function(e,f,g){function k(a,b){return function(c,e){null===a&&z();c?(a=null,g=H(g),g(c,L(l))):(!!e===d&&(l[a]=b),a=null,++h===r&&g(null,l))}}g=g||y;var r,s,h=0,l={};B(e)?(r=e.length,a(e,f,k)):e&&(x&&e[x]?(r=e.size,c(e,f,k)):"object"===typeof e&&(s= +F(e),r=s.length,b(e,f,k,s)));if(!r)return g(null,{})}}function Da(a){return function(b,c,d){function e(){m=w;q=b[w];c(q,h)}function f(){m=w;q=b[w];c(q,w,h)}function g(){m=w;q=n.next().value;c(q,h)}function k(){m=w;q=n.next().value;c(q,m,h)}function r(){m=p[w];q=b[m];c(q,h)}function s(){m=p[w];q=b[m];c(q,m,h)}function h(b,c){b?d(b,v):(!!c===a&&(v[m]=q),++w===l?(u=z,d(null,v)):t?C(u):(t=!0,u()),t=!1)}d=E(d||y);var l,m,q,p,n,u,t=!1,v={},w=0;B(b)?(l=b.length,u=3===c.length?f:e):b&&(x&&b[x]?(l=b.size, +n=b[x](),u=3===c.length?k:g):"object"===typeof b&&(p=F(b),l=p.length,u=3===c.length?s:r));if(!l)return d(null,{});u()}}function Ea(a){return function(b,c,d,e){function f(){q=D++;qc)return e(null,{});K(c>m?m:c,w)}}function X(a,b,c,d){function e(b){c(b,a[t],h)}function f(b){c(b,a[t],t,h)}function g(){c(b,p.next().value,h)}function k(){c(b, +p.next().value,t,h)}function r(b){c(b,a[q[t]],h)}function s(b){m=q[t];c(b,a[m],m,h)}function h(a,b){a?d(a,b):++t===l?(c=z,d(null,b)):u?C(function(){n(b)}):(u=!0,n(b));u=!1}d=E(d||y);var l,m,q,p,n,u=!1,t=0;B(a)?(l=a.length,n=4===c.length?f:e):a&&(x&&a[x]?(l=a.size,p=a[x](),n=4===c.length?k:g):"object"===typeof a&&(q=F(a),l=q.length,n=4===c.length?s:r));if(!l)return d(null,b);n(b)}function Fa(a,b,c,d){function e(b){c(b,a[--s],r)}function f(b){c(b,a[--s],s,r)}function g(b){c(b,a[m[--s]],r)}function k(b){l= +m[--s];c(b,a[l],l,r)}function r(a,b){a?d(a,b):0===s?(u=z,d(null,b)):t?C(function(){u(b)}):(t=!0,u(b));t=!1}d=E(d||y);var s,h,l,m,q,p,n,u,t=!1;if(B(a))s=a.length,u=4===c.length?f:e;else if(a)if(x&&a[x]){s=a.size;n=Array(s);q=a[x]();for(h=-1;!1===(p=q.next()).done;)n[++h]=p.value;a=n;u=4===c.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===c.length?k:g);if(!s)return d(null,b);u(b)}function Ga(a,b,c){c=c||y;ha(a,b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ha(a,b,c){c=c||y;ia(a, b,function(a,b){if(a)return c(a);c(null,!!b)})}function Ia(a,b,c,d){d=d||y;ja(a,b,c,function(a,b){if(a)return d(a);d(null,!!b)})}function Ja(a,b){return B(a)?0===a.length?(b(null),!1):!0:(b(Error("First argument to waterfall must be an array of functions")),!1)}function ka(a,b,c){switch(b.length){case 0:case 1:return a(c);case 2:return a(b[1],c);case 3:return a(b[1],b[2],c);case 4:return a(b[1],b[2],b[3],c);case 5:return a(b[1],b[2],b[3],b[4],c);case 6:return a(b[1],b[2],b[3],b[4],b[5],c);default:return b= -I(b,1),b.push(c),a.apply(null,b)}}function Ka(a,b){function c(c,h){if(c)r=z,b=E(b),b(c);else if(++d===f){r=z;var k=b;b=z;2===arguments.length?k(c,h):k.apply(null,G(arguments))}else g=a[d],l=arguments,e?C(r):(e=!0,r()),e=!1}b=b||y;if(Ja(a,b)){var d=0,e=!1,f=a.length,g=a[d],l=[],r=function(){switch(g.length){case 0:try{c(null,g())}catch(a){c(a)}break;case 1:return g(c);case 2:return g(l[1],c);case 3:return g(l[1],l[2],c);case 4:return g(l[1],l[2],l[3],c);case 5:return g(l[1],l[2],l[3],l[4],c);default:return l= -I(l,1),l[g.length-1]=c,g.apply(null,l)}};r()}}function La(){var a=G(arguments);return function(){var b=this,c=G(arguments),d=c[c.length-1];"function"===typeof d?c.pop():d=y;X(a,c,function(a,c,d){a.push(function(a){var b=I(arguments,1);d(a,b)});c.apply(b,a)},function(a,c){c=B(c)?c:[c];c.unshift(a);d.apply(b,c)})}}function Ma(a){return function(b){var c=function(){var c=this,d=G(arguments),g=d.pop()||y;return a(b,function(a,b){a.apply(c,d.concat([b]))},g)};if(1c)throw Error("Concurrency must not be zero");var h=0,k=[],m,q,p={_tasks:new M,concurrency:c,payload:d,saturated:y,unsaturated:y,buffer:c/4,empty:y,drain:y,error:y,started:!1,paused:!1,push:function(a,b){f(a,b)},kill:function(){p.drain=y;p._tasks.empty()}, -unshift:function(a,b){f(a,b,!0)},remove:function(a){p._tasks.remove(a)},process:a?l:r,length:function(){return p._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===p.length()+h},pause:function(){p.paused=!0},resume:function(){!1!==p.paused&&(p.paused=!1,K(p.concurrency=arguments.length?f:I(arguments,1);if(a){r=g=0;s.length=0;var k=L(l);k[b]=f;b=null;var h=c;c=y;h(a,k)}else r--,g--,l[b]=f,e(b),b=null}function p(){0===--t&& +I(b,1),b.push(c),a.apply(null,b)}}function Ka(a,b){function c(c,h){if(c)r=z,b=E(b),b(c);else if(++d===f){r=z;var l=b;b=z;2===arguments.length?l(c,h):l.apply(null,G(arguments))}else g=a[d],k=arguments,e?C(r):(e=!0,r()),e=!1}b=b||y;if(Ja(a,b)){var d=0,e=!1,f=a.length,g=a[d],k=[],r=function(){switch(g.length){case 0:try{c(null,g())}catch(a){c(a)}break;case 1:return g(c);case 2:return g(k[1],c);case 3:return g(k[1],k[2],c);case 4:return g(k[1],k[2],k[3],c);case 5:return g(k[1],k[2],k[3],k[4],c);default:return k= +I(k,1),k[g.length-1]=c,g.apply(null,k)}};r()}}function La(){var a=G(arguments);return function(){var b=this,c=G(arguments),d=c[c.length-1];"function"===typeof d?c.pop():d=y;X(a,c,function(a,c,d){a.push(function(a){var b=I(arguments,1);d(a,b)});c.apply(b,a)},function(a,c){c=B(c)?c:[c];c.unshift(a);d.apply(b,c)})}}function Ma(a){return function(b){var c=function(){var c=this,d=G(arguments),g=d.pop()||y;return a(b,function(a,b){a.apply(c,d.concat([b]))},g)};if(1c)throw Error("Concurrency must not be zero");var h=0,l=[],m,q,p={_tasks:new M,concurrency:c,payload:d,saturated:y,unsaturated:y,buffer:c/4,empty:y,drain:y,error:y,started:!1,paused:!1,push:function(a,b){f(a,b)},kill:function(){p.drain=y;p._tasks.empty()}, +unshift:function(a,b){f(a,b,!0)},remove:function(a){p._tasks.remove(a)},process:a?k:r,length:function(){return p._tasks.length},running:function(){return h},workersList:function(){return l},idle:function(){return 0===p.length()+h},pause:function(){p.paused=!0},resume:function(){!1!==p.paused&&(p.paused=!1,K(p.concurrency=arguments.length?f:I(arguments,1);if(a){r=g=0;s.length=0;var l=L(k);l[b]=f;b=null;var h=c;c=y;h(a,l)}else r--,g--,k[b]=f,e(b),b=null}function p(){0===--t&& s.push([n,u,d])}var n,u;if(B(a)){var t=a.length-1;n=a[t];u=t;if(0===t)s.push([n,u,d]);else for(var v=-1;++v=arguments.length)return c(a,e);var f=G(arguments);return c.apply(null,f)}b(d)}function e(){b(f)}function f(a,b){if(++s===g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,b);var d=G(arguments);return c.apply(null,d)}setTimeout(e,l(s))}var g,l,r,s=0;if(3>arguments.length&&"function"===typeof a)c=b||y,b=a,a=null,g=5;else switch(c=c||y,typeof a){case "object":"function"===typeof a.errorFilter&&(r=a.errorFilter);var h=a.interval;switch(typeof h){case "function":l=h;break;case "string":case "number":l= -(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof b)throw Error("Invalid arguments for async.retry");l?b(f):b(d)}function Oa(a){return function(){var b=G(arguments),c=b.pop(),d;try{d=a.apply(this,b)}catch(e){return c(e)}d&&"function"===typeof d.then?d.then(function(a){try{c(null,a)}catch(b){C(Pa,b)}},function(a){a=a&&a.message?a:Error(a);try{c(a, +g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,e);var f=G(arguments);return c.apply(null,f)}b(d)}function e(){b(f)}function f(a,b){if(++s===g||!a||r&&!r(a)){if(2>=arguments.length)return c(a,b);var d=G(arguments);return c.apply(null,d)}setTimeout(e,k(s))}var g,k,r,s=0;if(3>arguments.length&&"function"===typeof a)c=b||y,b=a,a=null,g=5;else switch(c=c||y,typeof a){case "object":"function"===typeof a.errorFilter&&(r=a.errorFilter);var h=a.interval;switch(typeof h){case "function":k=h;break;case "string":case "number":k= +(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof b)throw Error("Invalid arguments for async.retry");k?b(f):b(d)}function Oa(a){return function(){var b=G(arguments),c=b.pop(),d;try{d=a.apply(this,b)}catch(e){return c(e)}d&&"function"===typeof d.then?d.then(function(a){try{c(null,a)}catch(b){C(Pa,b)}},function(a){a=a&&a.message?a:Error(a);try{c(a, void 0)}catch(b){C(Pa,b)}}):c(null,d)}}function Pa(a){throw a;}function Qa(a){return function(){function b(a,b){if(a)return c(null,{error:a});2=arguments.length?c: -I(arguments,1),a=null,++r===f&&d(null,l))}}d=d||y;var f,g,l,r=0;B(c)?(f=c.length,l=Array(f),a(c,e)):c&&"object"===typeof c&&(g=F(c),f=g.length,l={},b(c,e,g));f||d(null,l)}}(function(a,b){for(var c=-1,d=a.length;++cb)return d(null,[]);t=Array(k);K(b>k?k:b,v)},mapValues:eb,mapValuesSeries:function(a,b,c){function d(){k=v;b(a[v],s)}function e(){k=v;b(a[v],v,s)}function f(){k=v;p=q.next().value;b(p,s)}function g(){k=v;p=q.next().value;b(p,v,s)}function l(){k=m[v];b(a[k],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){a? -(n=z,c=E(c),c(a,L(t))):(t[k]=b,++v===h?(n=z,c(null,t),c=z):u?C(n):(u=!0,n()),u=!1)}c=c||y;var h,k,m,q,p,n,u=!1,t={},v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null,t);n()},mapValuesLimit:function(a,b,c,d){function e(){m=A++;mb)return d(null,w);K(b>k?k:b,t)},filter:Sa,filterSeries:Ta, -filterLimit:Ua,select:Sa,selectSeries:Ta,selectLimit:Ua,reject:fb,rejectSeries:gb,rejectLimit:hb,detect:ha,detectSeries:ia,detectLimit:ja,find:ha,findSeries:ia,findLimit:ja,pick:ib,pickSeries:jb,pickLimit:kb,omit:lb,omitSeries:mb,omitLimit:nb,reduce:X,inject:X,foldl:X,reduceRight:Fa,foldr:Fa,transform:ob,transformSeries:function(a,b,c,d){function e(){c(u,a[v],h)}function f(){c(u,a[v],v,h)}function g(){c(u,p.next().value,h)}function l(){c(u,p.next().value,v,h)}function r(){c(u,a[q[v]],h)}function s(){m= -q[v];c(u,a[m],m,h)}function h(a,b){a?d(a,u):++v===k?(n=z,d(null,u)):!1===b?(n=z,d(null,u)):t?C(n):(t=!0,n());t=!1}3===arguments.length&&(d=c,c=b,b=void 0);d=E(d||y);var k,m,q,p,n,u,t=!1,v=0;B(a)?(k=a.length,u=void 0!==b?b:[],n=4===c.length?f:e):a&&(x&&a[x]?(k=a.size,p=a[x](),u=void 0!==b?b:{},n=4===c.length?l:g):"object"===typeof a&&(q=F(a),k=q.length,u=void 0!==b?b:{},n=4===c.length?s:r));if(!k)return d(null,void 0!==b?b:u||{});n()},transformLimit:function(a,b,c,d,e){function f(){q=z++;qb)return e(null,void 0!==c?c:w||{});K(b>m?m:b,v)},sortBy:pb,sortBySeries:function(a,b,c){function d(){m=a[w];b(m,s)}function e(){m=a[w];b(m,w,s)}function f(){m=p.next().value;n[w]=m;b(m,s)}function g(){m=p.next().value;n[w]=m;b(m,w,s)}function l(){m=a[q[w]];n[w]=m;b(m,s)}function r(){k=q[w];m=a[k];n[w]=m;b(m,k,s)} -function s(a,b){u[w]=b;a?c(a):++w===h?(t=z,c(null,$(n,u))):v?C(t):(v=!0,t());v=!1}c=E(c||y);var h,k,m,q,p,n,u,t,v=!1,w=0;B(a)?(h=a.length,n=a,u=Array(h),t=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,n=Array(h),u=Array(h),p=a[x](),t=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=Array(h),u=Array(h),t=3===b.length?r:l));if(!h)return c(null,[]);t()},sortByLimit:function(a,b,c,d){function e(){Db)return d(null,[]);w=Array(k);K(b>k?k:b,A)},some:Ga,someSeries:Ha,someLimit:Ia,any:Ga,anySeries:Ha,anyLimit:Ia,every:Va,everySeries:Wa,everyLimit:Xa,all:Va,allSeries:Wa,allLimit:Xa,concat:qb,concatSeries:function(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function l(){b(a[m[v]],s)}function r(){k=m[v];b(a[k],k,s)}function s(a,b){B(b)?U.apply(t,b): -2<=arguments.length&&U.apply(t,I(arguments,1));a?c(a,t):++v===h?(n=z,c(null,t)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,k,m,q,p,n,u=!1,t=[],v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:l));if(!h)return c(null,t);n()},concatLimit:function(a,b,c,d){function e(){tb)return d(null,[]);var A=Array(k);K(b>k?k:b,n)},groupBy:rb,groupBySeries:function(a,b,c){function d(){m=a[t];b(m,s)}function e(){m=a[t];b(m,t,s)}function f(){m=p.next().value;b(m,s)}function g(){m=p.next().value;b(m,t,s)}function l(){m=a[q[t]];b(m,s)}function r(){k=q[t];m=a[k];b(m,k,s)}function s(a,b){if(a)n=z,c=E(c),c(a,L(v));else{var d=v[b];d?d.push(m):v[b]=[m];++t===h?(n=z,c(null,v)):u? -C(n):(u=!0,n());u=!1}}c=E(c||y);var h,k,m,q,p,n,u=!1,t=0,v={};B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,p=a[x](),n=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=3===b.length?r:l));if(!h)return c(null,v);n()},groupByLimit:function(a,b,c,d){function e(){Ab)return d(null,D);K(b>k?k:b,v)},parallel:sb,series:function(a,b){function c(){g= -k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,c){a?(s=z,b=E(b),b(a,r)):(r[g]=2>=arguments.length?c:I(arguments,1),++k===f?(s=z,b(null,r)):h?C(s):(h=!0,s()),h=!1)}b=b||y;var f,g,l,r,s,h=!1,k=0;if(B(a))f=a.length,r=Array(f),s=c;else if(a&&"object"===typeof a)l=F(a),f=l.length,r={},s=d;else return b(null);if(!f)return b(null,r);s()},parallelLimit:function(a,b,c){function d(){l=q++;if(l=arguments.length?d:I(arguments,1),a=null,++p===g?c(null,h):m?C(k):(m=!0,k()),m=!1)}}c=c||y;var g,l,r,s,h,k,m=!1,q=0,p=0;B(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h={},k=e);if(!g||isNaN(b)||1>b)return c(null,h);K(b>g?g:b,k)},tryEach:function(a,b){function c(){a[r](e)}function d(){a[g[r]](e)}function e(a,c){a?++r===f?b(a):l():2>=arguments.length?b(null,c):b(null,I(arguments,1))}b=b||y;var f,g,l,r=0;B(a)?(f=a.length,l=c):a&&"object"===typeof a&& -(g=F(a),f=g.length,l=d);if(!f)return b(null);l()},waterfall:function(a,b){function c(){ka(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(b=y,z());h=void 0;k?(g=b,b=z,g(k)):++r===s?(g=b,b=z,2>=arguments.length?g(k,m):g.apply(null,G(arguments))):(l?(f=arguments,e=a[r]||z,C(c)):(l=!0,ka(a[r]||z,arguments,d(r))),l=!1)}}b=b||y;if(Ja(a,b)){var e,f,g,l,r=0,s=a.length;ka(a[0],[],d(0))}},angelFall:Ka,angelfall:Ka,whilst:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b, +function(){var a=Aa(!1);return function(b,c,d){d=d||y;a(b,c,function(a,b){if(a)return d(a);d(null,!b)})}}(),Xa=function(){var a=Ba(!1);return function(b,c,d,e){e=e||y;a(b,c,d,function(a,b){if(a)return e(a);e(null,!b)})}}(),ib=Ca(R,sa,ta,!0),jb=Da(!0),kb=Ea(!0),lb=Ca(R,sa,ta,!1),mb=Da(!1),nb=Ea(!1),ob=function(a,b,c){return function(d,e,f,g){function k(a,b){a?(g=H(g),g(a,B(h)?G(h):L(h))):++l===r?g(null,h):!1===b&&(g=H(g),g(null,B(h)?G(h):L(h)))}3===arguments.length&&(g=f,f=e,e=void 0);g=g||y;var r, +s,h,l=0;B(d)?(r=d.length,h=void 0!==e?e:[],a(d,h,f,k)):d&&(x&&d[x]?(r=d.size,h=void 0!==e?e:{},c(d,h,f,k)):"object"===typeof d&&(s=F(d),r=s.length,h=void 0!==e?e:{},b(d,h,f,k,s)));r||g(null,void 0!==e?e:h||{})}}(function(a,b,c,d){var e=-1,f=a.length;if(4===c.length)for(;++e=arguments.length?c: +I(arguments,1),a=null,++r===f&&d(null,k))}}d=d||y;var f,g,k,r=0;B(c)?(f=c.length,k=Array(f),a(c,e)):c&&"object"===typeof c&&(g=F(c),f=g.length,k={},b(c,e,g));f||d(null,k)}}(function(a,b){for(var c=-1,d=a.length;++cb)return d(null,[]);t=Array(l);K(b>l?l:b,v)},mapValues:eb,mapValuesSeries:function(a,b,c){function d(){l=v;b(a[v],s)}function e(){l=v;b(a[v],v,s)}function f(){l=v;p=q.next().value;b(p,s)}function g(){l=v;p=q.next().value;b(p,v,s)}function k(){l=m[v];b(a[l],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){a? +(n=z,c=E(c),c(a,L(t))):(t[l]=b,++v===h?(n=z,c(null,t),c=z):u?C(n):(u=!0,n()),u=!1)}c=c||y;var h,l,m,q,p,n,u=!1,t={},v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null,t);n()},mapValuesLimit:function(a,b,c,d){function e(){m=A++;mb)return d(null,w);K(b>l?l:b,t)},filter:Sa,filterSeries:Ta, +filterLimit:Ua,select:Sa,selectSeries:Ta,selectLimit:Ua,reject:fb,rejectSeries:gb,rejectLimit:hb,detect:ha,detectSeries:ia,detectLimit:ja,find:ha,findSeries:ia,findLimit:ja,pick:ib,pickSeries:jb,pickLimit:kb,omit:lb,omitSeries:mb,omitLimit:nb,reduce:X,inject:X,foldl:X,reduceRight:Fa,foldr:Fa,transform:ob,transformSeries:function(a,b,c,d){function e(){c(u,a[v],h)}function f(){c(u,a[v],v,h)}function g(){c(u,p.next().value,h)}function k(){c(u,p.next().value,v,h)}function r(){c(u,a[q[v]],h)}function s(){m= +q[v];c(u,a[m],m,h)}function h(a,b){a?d(a,u):++v===l?(n=z,d(null,u)):!1===b?(n=z,d(null,u)):t?C(n):(t=!0,n());t=!1}3===arguments.length&&(d=c,c=b,b=void 0);d=E(d||y);var l,m,q,p,n,u,t=!1,v=0;B(a)?(l=a.length,u=void 0!==b?b:[],n=4===c.length?f:e):a&&(x&&a[x]?(l=a.size,p=a[x](),u=void 0!==b?b:{},n=4===c.length?k:g):"object"===typeof a&&(q=F(a),l=q.length,u=void 0!==b?b:{},n=4===c.length?s:r));if(!l)return d(null,void 0!==b?b:u||{});n()},transformLimit:function(a,b,c,d,e){function f(){q=z++;qb)return e(null,void 0!==c?c:w||{});K(b>m?m:b,v)},sortBy:pb,sortBySeries:function(a,b,c){function d(){m=a[w];b(m,s)}function e(){m=a[w];b(m,w,s)}function f(){m=p.next().value;n[w]=m;b(m,s)}function g(){m=p.next().value;n[w]=m;b(m,w,s)}function k(){m=a[q[w]];n[w]=m;b(m,s)}function r(){l=q[w];m=a[l];n[w]=m;b(m,l,s)} +function s(a,b){u[w]=b;a?c(a):++w===h?(t=z,c(null,$(n,u))):v?C(t):(v=!0,t());v=!1}c=E(c||y);var h,l,m,q,p,n,u,t,v=!1,w=0;B(a)?(h=a.length,n=a,u=Array(h),t=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,n=Array(h),u=Array(h),p=a[x](),t=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=Array(h),u=Array(h),t=3===b.length?r:k));if(!h)return c(null,[]);t()},sortByLimit:function(a,b,c,d){function e(){Db)return d(null,[]);w=Array(l);K(b>l?l:b,A)},some:Ga,someSeries:Ha,someLimit:Ia,any:Ga,anySeries:Ha,anyLimit:Ia,every:Va,everySeries:Wa,everyLimit:Xa,all:Va,allSeries:Wa,allLimit:Xa,concat:qb,concatSeries:function(a,b,c){function d(){b(a[v],s)}function e(){b(a[v],v,s)}function f(){b(q.next().value,s)}function g(){p=q.next().value;b(p,v,s)}function k(){b(a[m[v]],s)}function r(){l=m[v];b(a[l],l,s)}function s(a,b){B(b)?U.apply(t,b): +2<=arguments.length&&U.apply(t,I(arguments,1));a?c(a,t):++v===h?(n=z,c(null,t)):u?C(n):(u=!0,n());u=!1}c=E(c||y);var h,l,m,q,p,n,u=!1,t=[],v=0;B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,q=a[x](),n=3===b.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,n=3===b.length?r:k));if(!h)return c(null,t);n()},concatLimit:function(a,b,c,d){function e(){tb)return d(null,[]);var A=Array(l);K(b>l?l:b,n)},groupBy:rb,groupBySeries:function(a,b,c){function d(){m=a[t];b(m,s)}function e(){m=a[t];b(m,t,s)}function f(){m=p.next().value;b(m,s)}function g(){m=p.next().value;b(m,t,s)}function k(){m=a[q[t]];b(m,s)}function r(){l=q[t];m=a[l];b(m,l,s)}function s(a,b){if(a)n=z,c=E(c),c(a,L(v));else{var d=v[b];d?d.push(m):v[b]=[m];++t===h?(n=z,c(null,v)):u? +C(n):(u=!0,n());u=!1}}c=E(c||y);var h,l,m,q,p,n,u=!1,t=0,v={};B(a)?(h=a.length,n=3===b.length?e:d):a&&(x&&a[x]?(h=a.size,p=a[x](),n=3===b.length?g:f):"object"===typeof a&&(q=F(a),h=q.length,n=3===b.length?r:k));if(!h)return c(null,v);n()},groupByLimit:function(a,b,c,d){function e(){Ab)return d(null,D);K(b>l?l:b,v)},parallel:sb,series:function(a,b){function c(){g= +l;a[l](e)}function d(){g=k[l];a[g](e)}function e(a,c){a?(s=z,b=E(b),b(a,r)):(r[g]=2>=arguments.length?c:I(arguments,1),++l===f?(s=z,b(null,r)):h?C(s):(h=!0,s()),h=!1)}b=b||y;var f,g,k,r,s,h=!1,l=0;if(B(a))f=a.length,r=Array(f),s=c;else if(a&&"object"===typeof a)k=F(a),f=k.length,r={},s=d;else return b(null);if(!f)return b(null,r);s()},parallelLimit:function(a,b,c){function d(){k=q++;if(k=arguments.length?d:I(arguments,1),a=null,++p===g?c(null,h):m?C(l):(m=!0,l()),m=!1)}}c=c||y;var g,k,r,s,h,l,m=!1,q=0,p=0;B(a)?(g=a.length,h=Array(g),l=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h={},l=e);if(!g||isNaN(b)||1>b)return c(null,h);K(b>g?g:b,l)},tryEach:function(a,b){function c(){a[r](e)}function d(){a[g[r]](e)}function e(a,c){a?++r===f?b(a):k():2>=arguments.length?b(null,c):b(null,I(arguments,1))}b=b||y;var f,g,k,r=0;B(a)?(f=a.length,k=c):a&&"object"===typeof a&& +(g=F(a),f=g.length,k=d);if(!f)return b(null);k()},waterfall:function(a,b){function c(){ka(e,f,d(e))}function d(h){return function(l,m){void 0===h&&(b=y,z());h=void 0;l?(g=b,b=z,g(l)):++r===s?(g=b,b=z,2>=arguments.length?g(l,m):g.apply(null,G(arguments))):(k?(f=arguments,e=a[r]||z,C(c)):(k=!0,ka(a[r]||z,arguments,d(r))),k=!1)}}b=b||y;if(Ja(a,b)){var e,f,g,k,r=0,s=a.length;ka(a[0],[],d(0))}},angelFall:Ka,angelfall:Ka,whilst:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b, e){if(b)return c(b);2>=arguments.length?a(e)?d():c(null,e):(e=I(arguments,1),a.apply(null,e)?d():c.apply(null,[null].concat(e)))}c=c||y;var g=!1;a()?d():c(null)},doWhilst:function(a,b,c){function d(){g?C(e):(g=!0,a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return c(a);2>=arguments.length?b(e)?d():c(null,e):(e=I(arguments,1),b.apply(null,e)?d():c.apply(null,[null].concat(e)))}c=c||y;var g=!1;e()},until:function(a,b,c){function d(){g?C(e):(g=!0,b(f));g=!1}function e(){b(f)}function f(b,e){if(b)return c(b); 2>=arguments.length?a(e)?c(null,e):d():(e=I(arguments,1),a.apply(null,e)?c.apply(null,[null].concat(e)):d())}c=c||y;var g=!1;a()?c(null):d()},doUntil:function(a,b,c){function d(){g?C(e):(g=!0,a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return c(a);2>=arguments.length?b(e)?c(null,e):d():(e=I(arguments,1),b.apply(null,e)?c.apply(null,[null].concat(e)):d())}c=c||y;var g=!1;e()},during:function(a,b,c){function d(a,d){if(a)return c(a);d?b(e):c(null)}function e(b){if(b)return c(b);a(d)}c=c||y;a(d)}, -doDuring:function(a,b,c){function d(b,d){if(b)return c(b);d?a(e):c(null)}function e(a,e){if(a)return c(a);switch(arguments.length){case 0:case 1:b(d);break;case 2:b(e,d);break;default:var l=I(arguments,1);l.push(d);b.apply(null,l)}}c=c||y;d(null,!0)},forever:function(a,b){function c(){a(d)}function d(a){if(a){if(b)return b(a);throw a;}e?C(c):(e=!0,c());e=!1}var e=!1;c()},compose:function(){return La.apply(null,Ya(arguments))},seq:La,applyEach:tb,applyEachSeries:ub,queue:function(a,b){return la(!0, -a,b)},priorityQueue:function(a,b){var c=la(!0,a,b);c.push=function(a,b,f){c.started=!0;b=b||0;var g=B(a)?a:[a],l=g.length;if(void 0===a||0===l)c.idle()&&C(c.drain);else{f="function"===typeof f?f:y;for(a=c._tasks.head;a&&b>=a.priority;)a=a.next;for(;l--;){var r={data:g[l],priority:b,callback:f};a?c._tasks.insertBefore(a,r):c._tasks.push(r);C(c.process)}}};delete c.unshift;return c},cargo:function(a,b){return la(!1,a,1,b)},auto:Na,autoInject:function(a,b,c){var d={};S(a,function(a,b){var c,l=a.length; -if(B(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=G(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=$a(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters.");l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return c(null,[]);var e=Array(a);K(a,function(a){b(a,d(a))})},timesSeries:function(a,b,c){function d(){b(l,e)}function e(b,e){f[l]=e;b?(c(b),c=z):++l>=a?(c(null,f),c=z):g?C(d):(g=!0,d());g=!1}c=c||y;a=+a;if(isNaN(a)||1>a)return c(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,b,c,d){function e(){var b= -r++;b=a?(d(null,g),d=z):l?C(e):(l=!0,e());l=!1}}d=d||y;a=+a;if(isNaN(a)||1>a||isNaN(b)||1>b)return d(null,[]);var g=Array(a),l=!1,r=0,s=0;K(b>a?a:b,e)},race:function(a,b){b=H(b||y);var c,d,e=-1;if(B(a))for(c=a.length;++e=a.priority;)a=a.next;for(;k--;){var r={data:g[k],priority:b,callback:f};a?c._tasks.insertBefore(a,r):c._tasks.push(r);C(c.process)}}};delete c.unshift;return c},cargo:function(a,b){return la(!1,a,1,b)},auto:Na,autoInject:function(a,b,c){var d={};S(a,function(a,b){var c,k=a.length; +if(B(a)){if(0===k)throw Error("autoInject task functions require explicit parameters.");c=G(a);k=c.length-1;a=c[k];if(0===k){d[b]=a;return}}else{if(1===k){d[b]=a;return}c=$a(a);if(0===k&&0===c.length)throw Error("autoInject task functions require explicit parameters.");k=c.length-1}c[k]=function(b,d){switch(k){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++fa)return c(null,[]);var e=Array(a);K(a,function(a){b(a,d(a))})},timesSeries:function(a,b,c){function d(){b(k,e)}function e(b,e){f[k]=e;b?(c(b),c=z):++k>=a?(c(null,f),c=z):g?C(d):(g=!0,d());g=!1}c=c||y;a=+a;if(isNaN(a)||1>a)return c(null,[]);var f=Array(a),g=!1,k=0;d()},timesLimit:function(a,b,c,d){function e(){var b= +r++;b=a?(d(null,g),d=z):k?C(e):(k=!0,e());k=!1}}d=d||y;a=+a;if(isNaN(a)||1>a||isNaN(b)||1>b)return d(null,[]);var g=Array(a),k=!1,r=0,s=0;K(b>a?a:b,e)},race:function(a,b){b=H(b||y);var c,d,e=-1;if(B(a))for(c=a.length;++e