syriastreet.com/assets/js/lib/queue.js

1 line
692 B
JavaScript
Raw Normal View History

2023-07-19 13:53:58 +00:00
!function(){function n(n){function e(){for(;r=a<c.length&&p<n;){var u=a++,e=c[u],o=t.call(e,1);o.push(l(u)),++p,e[0].apply(null,o)}}function l(n){return function(u,t){--p,null==s&&(null!=u?(s=u,a=d=NaN,o()):(c[n]=t,--d?r||e():o()))}}function o(){null!=s?h(s):f?h(s,c):h.apply(null,[s].concat(c))}var i,r,f,c=[],a=0,p=0,d=0,s=null,h=u;return n||(n=1/0),i={defer:function(){return s||(c.push(arguments),++d,e()),i},await:function(n){return h=n,f=!1,d||o(),i},awaitAll:function(n){return h=n,f=!0,d||o(),i}}}function u(){}var t=[].slice;n.version="1.0.7","function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof module&&module.exports?module.exports=n:this.queue=n}();