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AELxD,EAASS,OAAOqC,GAGhBA,EAAkB9C,GAAS,WACzB,IAAI4E,EAAUhC,EAASiC,MAAM7B,EAAqBkB,GAC9CU,GAAWA,EAAQE,MACrBF,EAAQE,KAAKZ,GAEftB,EAASiC,MAAMxB,EACjB,GAAG,IACL,EAQEnB,cAAmBD,KAAKC,cACxBC,eAAmBF,KAAKE,eACxB5B,iBAAmB0B,KAAK1B,iBACxB+B,eAAmBL,KAAKK,eACxBD,UAAmBJ,KAAKI,UAI5B,EACF,GACD,CAnUD,E,kBCjBA,EAAQ,OACR3C,EAAOqF,QAAU,qB","sources":["webpack://apps/./node_modules/angular-loading-bar/build/loading-bar.js","webpack://apps/./node_modules/angular-loading-bar/index.js"],"sourcesContent":["/*! \n * angular-loading-bar v0.9.0\n * https://chieffancypants.github.io/angular-loading-bar\n * Copyright (c) 2016 Wes Cruver\n * License: MIT\n */\n/*\n * angular-loading-bar\n *\n * intercepts XHR requests and creates a loading bar.\n * Based on the excellent nprogress work by rstacruz (more info in readme)\n *\n * (c) 2013 Wes Cruver\n * License: MIT\n */\n\n\n(function() {\n\n'use strict';\n\n// Alias the loading bar for various backwards compatibilities since the project has matured:\nangular.module('angular-loading-bar', ['cfp.loadingBarInterceptor']);\nangular.module('chieffancypants.loadingBar', ['cfp.loadingBarInterceptor']);\n\n\n/**\n * loadingBarInterceptor service\n *\n * Registers itself as an Angular interceptor and listens for XHR requests.\n */\nangular.module('cfp.loadingBarInterceptor', ['cfp.loadingBar'])\n .config(['$httpProvider', function ($httpProvider) {\n\n var interceptor = ['$q', '$cacheFactory', '$timeout', '$rootScope', '$log', 'cfpLoadingBar', function ($q, $cacheFactory, $timeout, $rootScope, $log, cfpLoadingBar) {\n\n /**\n * The total number of requests made\n */\n var reqsTotal = 0;\n\n /**\n * The number of requests completed (either successfully or not)\n */\n var reqsCompleted = 0;\n\n /**\n * The amount of time spent fetching before showing the loading bar\n */\n var latencyThreshold = cfpLoadingBar.latencyThreshold;\n\n /**\n * $timeout handle for latencyThreshold\n */\n var startTimeout;\n\n\n /**\n * calls cfpLoadingBar.complete() which removes the\n * loading bar from the DOM.\n */\n function setComplete() {\n $timeout.cancel(startTimeout);\n cfpLoadingBar.complete();\n reqsCompleted = 0;\n reqsTotal = 0;\n }\n\n /**\n * Determine if the response has already been cached\n * @param {Object} config the config option from the request\n * @return {Boolean} retrns true if cached, otherwise false\n */\n function isCached(config) {\n var cache;\n var defaultCache = $cacheFactory.get('$http');\n var defaults = $httpProvider.defaults;\n\n // Choose the proper cache source. Borrowed from angular: $http service\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = angular.isObject(config.cache) ? config.cache\n : angular.isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n var cached = cache !== undefined ?\n cache.get(config.url) !== undefined : false;\n\n if (config.cached !== undefined && cached !== config.cached) {\n return config.cached;\n }\n config.cached = cached;\n return cached;\n }\n\n\n return {\n 'request': function(config) {\n // Check to make sure this request hasn't already been cached and that\n // the requester didn't explicitly ask us to ignore this request:\n if (!config.ignoreLoadingBar && !isCached(config)) {\n $rootScope.$broadcast('cfpLoadingBar:loading', {url: config.url});\n if (reqsTotal === 0) {\n startTimeout = $timeout(function() {\n cfpLoadingBar.start();\n }, latencyThreshold);\n }\n reqsTotal++;\n cfpLoadingBar.set(reqsCompleted / reqsTotal);\n }\n return config;\n },\n\n 'response': function(response) {\n if (!response || !response.config) {\n $log.error('Broken interceptor detected: Config object not supplied in response:\\n https://github.com/chieffancypants/angular-loading-bar/pull/50');\n return response;\n }\n\n if (!response.config.ignoreLoadingBar && !isCached(response.config)) {\n reqsCompleted++;\n $rootScope.$broadcast('cfpLoadingBar:loaded', {url: response.config.url, result: response});\n if (reqsCompleted >= reqsTotal) {\n setComplete();\n } else {\n cfpLoadingBar.set(reqsCompleted / reqsTotal);\n }\n }\n return response;\n },\n\n 'responseError': function(rejection) {\n if (!rejection || !rejection.config) {\n $log.error('Broken interceptor detected: Config object not supplied in rejection:\\n https://github.com/chieffancypants/angular-loading-bar/pull/50');\n return $q.reject(rejection);\n }\n\n if (!rejection.config.ignoreLoadingBar && !isCached(rejection.config)) {\n reqsCompleted++;\n $rootScope.$broadcast('cfpLoadingBar:loaded', {url: rejection.config.url, result: rejection});\n if (reqsCompleted >= reqsTotal) {\n setComplete();\n } else {\n cfpLoadingBar.set(reqsCompleted / reqsTotal);\n }\n }\n return $q.reject(rejection);\n }\n };\n }];\n\n $httpProvider.interceptors.push(interceptor);\n }]);\n\n\n/**\n * Loading Bar\n *\n * This service handles adding and removing the actual element in the DOM.\n * Generally, best practices for DOM manipulation is to take place in a\n * directive, but because the element itself is injected in the DOM only upon\n * XHR requests, and it's likely needed on every view, the best option is to\n * use a service.\n */\nangular.module('cfp.loadingBar', [])\n .provider('cfpLoadingBar', function() {\n\n this.autoIncrement = true;\n this.includeSpinner = true;\n this.includeBar = true;\n this.latencyThreshold = 100;\n this.startSize = 0.02;\n this.parentSelector = 'body';\n this.spinnerTemplate = '
';\n this.loadingBarTemplate = '
';\n\n this.$get = ['$injector', '$document', '$timeout', '$rootScope', function ($injector, $document, $timeout, $rootScope) {\n var $animate;\n var $parentSelector = this.parentSelector,\n loadingBarContainer = angular.element(this.loadingBarTemplate),\n loadingBar = loadingBarContainer.find('div').eq(0),\n spinner = angular.element(this.spinnerTemplate);\n\n var incTimeout,\n completeTimeout,\n started = false,\n status = 0;\n\n var autoIncrement = this.autoIncrement;\n var includeSpinner = this.includeSpinner;\n var includeBar = this.includeBar;\n var startSize = this.startSize;\n\n /**\n * Inserts the loading bar element into the dom, and sets it to 2%\n */\n function _start() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n $timeout.cancel(completeTimeout);\n\n // do not continually broadcast the started event:\n if (started) {\n return;\n }\n\n var document = $document[0];\n var parent = document.querySelector ?\n document.querySelector($parentSelector)\n : $document.find($parentSelector)[0]\n ;\n\n if (! parent) {\n parent = document.getElementsByTagName('body')[0];\n }\n\n var $parent = angular.element(parent);\n var $after = parent.lastChild && angular.element(parent.lastChild);\n\n $rootScope.$broadcast('cfpLoadingBar:started');\n started = true;\n\n if (includeBar) {\n $animate.enter(loadingBarContainer, $parent, $after);\n }\n\n if (includeSpinner) {\n $animate.enter(spinner, $parent, loadingBarContainer);\n }\n\n _set(startSize);\n }\n\n /**\n * Set the loading bar's width to a certain percent.\n *\n * @param n any value between 0 and 1\n */\n function _set(n) {\n if (!started) {\n return;\n }\n var pct = (n * 100) + '%';\n loadingBar.css('width', pct);\n status = n;\n\n // increment loadingbar to give the illusion that there is always\n // progress but make sure to cancel the previous timeouts so we don't\n // have multiple incs running at the same time.\n if (autoIncrement) {\n $timeout.cancel(incTimeout);\n incTimeout = $timeout(function() {\n _inc();\n }, 250);\n }\n }\n\n /**\n * Increments the loading bar by a random amount\n * but slows down as it progresses\n */\n function _inc() {\n if (_status() >= 1) {\n return;\n }\n\n var rnd = 0;\n\n // TODO: do this mathmatically instead of through conditions\n\n var stat = _status();\n if (stat >= 0 && stat < 0.25) {\n // Start out between 3 - 6% increments\n rnd = (Math.random() * (5 - 3 + 1) + 3) / 100;\n } else if (stat >= 0.25 && stat < 0.65) {\n // increment between 0 - 3%\n rnd = (Math.random() * 3) / 100;\n } else if (stat >= 0.65 && stat < 0.9) {\n // increment between 0 - 2%\n rnd = (Math.random() * 2) / 100;\n } else if (stat >= 0.9 && stat < 0.99) {\n // finally, increment it .5 %\n rnd = 0.005;\n } else {\n // after 99%, don't increment:\n rnd = 0;\n }\n\n var pct = _status() + rnd;\n _set(pct);\n }\n\n function _status() {\n return status;\n }\n\n function _completeAnimation() {\n status = 0;\n started = false;\n }\n\n function _complete() {\n if (!$animate) {\n $animate = $injector.get('$animate');\n }\n\n $rootScope.$broadcast('cfpLoadingBar:completed');\n _set(1);\n\n $timeout.cancel(completeTimeout);\n\n // Attempt to aggregate any start/complete calls within 500ms:\n completeTimeout = $timeout(function() {\n var promise = $animate.leave(loadingBarContainer, _completeAnimation);\n if (promise && promise.then) {\n promise.then(_completeAnimation);\n }\n $animate.leave(spinner);\n }, 500);\n }\n\n return {\n start : _start,\n set : _set,\n status : _status,\n inc : _inc,\n complete : _complete,\n autoIncrement : this.autoIncrement,\n includeSpinner : this.includeSpinner,\n latencyThreshold : this.latencyThreshold,\n parentSelector : this.parentSelector,\n startSize : this.startSize\n };\n\n\n }]; //\n }); // wtf javascript. srsly\n})(); //\n","require('./build/loading-bar');\nmodule.exports = 'angular-loading-bar';\n"],"names":["angular","module","config","$httpProvider","interceptor","$q","$cacheFactory","$timeout","$rootScope","$log","cfpLoadingBar","startTimeout","reqsTotal","reqsCompleted","latencyThreshold","setComplete","cancel","complete","isCached","cache","defaultCache","get","defaults","method","isObject","cached","undefined","url","ignoreLoadingBar","$broadcast","start","set","response","result","error","rejection","reject","interceptors","push","provider","this","autoIncrement","includeSpinner","includeBar","startSize","parentSelector","spinnerTemplate","loadingBarTemplate","$get","$injector","$document","$animate","incTimeout","completeTimeout","$parentSelector","loadingBarContainer","element","loadingBar","find","eq","spinner","started","status","_set","n","pct","css","_inc","_status","rnd","stat","Math","random","_completeAnimation","document","parent","querySelector","getElementsByTagName","$parent","$after","lastChild","enter","inc","promise","leave","then","exports"],"sourceRoot":""}