!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(c){function e(t){this._attempts=this._attempts?this._attempts+1:1}var s;c.ajax=(s=c.ajax,function(t){return s(t).always(e)}),c.ajaxPrefilter(function(t,e,s){s.retry=function(t){return t.timeout&&(this.timeout=t.timeout),t.statusCodes&&(this.statusCodes=t.statusCodes),this.pipe(null,(u=this,p=(m=t).times,f=u.timeout,d=m.onRetry,h=m.timeout,function(t,e,s){var i=this,n=new c.Deferred,a=u.getResponseHeader("Retry-After"),o=p-1+this._attempts;function r(){var t=m.exponential?2*f:m.timeout;c.ajax(i).retry({times:p-1,exponential:m.exponential,timeout:t,statusCodes:m.statusCodes,onRetry:d}).pipe(n.resolve,n.reject)}return 1