function onDone(isError) {
          return function(value) {
            (minDurationPromise || $q.when()).then(function() {
              var index = tracked.indexOf(deferred);
              tracked.splice(index, 1);

              //If this is the last promise, cleanup the timeouts
              //for activationDelay
              if (tracked.length === 0) {
                activationDelayPromise = cancelTimeout(activationDelayPromise);
              }
            });
          };
        }
//tracked promise from the array if once minDuration is complete
tracked promise from the array if once minDuration is complete
tracked promise from the array if once minDuration is complete
function onDone(isError) {
          return function(value) {
            (minDurationPromise || $q.when()).then(function() {
              var index = tracked.indexOf(deferred);
              tracked.splice(index, 1);
              if (tracked.length === 0) {
                activationDelayPromise = cancelTimeout(activationDelayPromise);
              }
            });
          };
        }
function onDone ( isError ) { return function ( value ) { ( minDurationPromise || $q . when ( ) ) . then ( function ( ) { var index = tracked . indexOf ( deferred ) ; tracked . splice ( index , 1 ) ; if ( tracked . length === 0 ) { activationDelayPromise = cancelTimeout ( activationDelayPromise ) ; } } ) ; } ; }
tracked promise from the array if once minDuration is complete
tracked promise from the array if once minDuration is complete
//If this is the last promise, cleanup the timeouts //for activationDelay