text: /* MIT License. Copyright (c) 2019 ImanFarahi - professionalProgrammer.ir */
  "use strict";var FunctionFireLimit;(function(FunctionFireLimit){FunctionFireLimit.debounce=function(callBack,delay,immediate,scope){var timeoutId=null,context,args,callNow,result;var later=function(){timeoutId=null;if(!immediate)result=callBack.apply(context,args)};delay||(delay=250);return function(){context=(scope||this),args=arguments,callNow=immediate&&!timeoutId;clearTimeout(timeoutId);timeoutId=setTimeout(later,delay);if(callNow)result=callBack.apply(context,args);return result}};FunctionFireLimit.throttle=function(callBack,threshhold,immediate,scope){var context,args,result,now,timeoutId=null,previous=0;var later=function(){timeoutId=null;result=callBack.apply(context,args)};threshhold||(threshhold=250);return function(){now=+new Date;args=arguments;context=(scope||this);if(immediate&&now>(previous+threshhold)){result=callBack.apply(context,args);previous=now}else if(!immediate&&!timeoutId){timeoutId=setTimeout(later,threshhold)}
  return result}}})(FunctionFireLimit||(FunctionFireLimit={}))
  