text: !function(){"use strict";angular.module("angular-loading-bar",["cfp.loadingBarInterceptor"]),angular.module("chieffancypants.loadingBar",["cfp.loadingBarInterceptor"]),angular.module("cfp.loadingBarInterceptor",["cfp.loadingBar"]).config(["$httpProvider",function(n){var e=["$q","$cacheFactory","$timeout","$rootScope","cfpLoadingBar",function(e,a,t,r,i){function c(){t.cancel(d),i.complete(),s=0,l=0}function o(e){var t,r=a.get("$http"),i=n.defaults;!e.cache&&!i.cache||e.cache===!1||"GET"!==e.method&&"JSONP"!==e.method||(t=angular.isObject(e.cache)?e.cache:angular.isObject(i.cache)?i.cache:r);var c=void 0!==t?void 0!==t.get(e.url):!1;return void 0!==e.cached&&c!==e.cached?e.cached:(e.cached=c,c)}var d,l=0,s=0,u=i.latencyThreshold;return{request:function(n){return n.ignoreLoadingBar||o(n)||(r.$broadcast("cfpLoadingBar:loading",{url:n.url}),0===l&&(d=t(function(){i.start()},u)),l++,i.set(s/l)),n},response:function(n){return n.config.ignoreLoadingBar||o(n.config)||(s++,r.$broadcast("cfpLoadingBar:loaded",{url:n.config.url}),s>=l?c():i.set(s/l)),n},responseError:function(n){return n.config.ignoreLoadingBar||o(n.config)||(s++,r.$broadcast("cfpLoadingBar:loaded",{url:n.config.url}),s>=l?c():i.set(s/l)),e.reject(n)}}}];n.interceptors.push(e)}]),angular.module("cfp.loadingBar",[]).provider("cfpLoadingBar",function(){this.includeSpinner=!0,this.includeBar=!0,this.latencyThreshold=100,this.startSize=.02,this.parentSelector="body",this.spinnerTemplate='<div id="loading-bar-spinner"><div class="spinner-icon"></div></div>',this.$get=["$injector","$document","$timeout","$rootScope",function(n,e,a,t){function r(){s||(s=n.get("$animate"));var r=e.find(f);a.cancel(h),m||(t.$broadcast("cfpLoadingBar:started"),m=!0,S&&s.enter(g,r),$&&s.enter(v,r),i(b))}function i(n){if(m){var e=100*n+"%";p.css("width",e),B=n,a.cancel(u),u=a(function(){c()},250)}}function c(){if(!(o()>=1)){var n=0,e=o();n=e>=0&&.25>e?(3*Math.random()+3)/100:e>=.25&&.65>e?3*Math.random()/100:e>=.65&&.9>e?2*Math.random()/100:e>=.9&&.99>e?.005:0;var a=o()+n;i(a)}}function o(){return B}function d(){B=0,m=!1}function l(){s||(s=n.get("$animate")),t.$broadcast("cfpLoadingBar:completed"),i(1),a.cancel(h),h=a(function(){var n=s.leave(g,d);n&&n.then&&n.then(d),s.leave(v)},500)}var s,u,h,f=this.parentSelector,g=angular.element('<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div>'),p=g.find("div").eq(0),v=angular.element(this.spinnerTemplate),m=!1,B=0,$=this.includeSpinner,S=this.includeBar,b=this.startSize;return{start:r,set:i,status:o,inc:c,complete:l,includeSpinner:this.includeSpinner,latencyThreshold:this.latencyThreshold,parentSelector:this.parentSelector,startSize:this.startSize}}]})}();