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AQ+C,SAChBtD,EAAMO,QAAQ+C,SAElB,EAEA1B,EAAQuF,GAAG,cAAc,WA+CvBnH,EAAMwD,aAAc,EACpB+B,EAAUmB,kBA9CNE,GACFD,EAAUS,OAAOR,EAErB,IAEA5G,EAAMqH,SAAW,WACXtG,QAAQuG,WAAWtH,EAAMO,QAAQgD,QACnCvD,EAAMO,QAAQgD,QAEZvD,EAAMO,QAAQkD,cAChBzD,EAAMuH,OAAM,EAEhB,EAEAvH,EAAMuH,MAAQ,SAAUtH,EAAYuH,GAC9BA,GAAUzG,QAAQuG,WAAWE,EAAOC,kBACtCD,EAAOC,kBAET9J,EAAOoB,OAAOiB,EAAMhB,QAASiB,EAC/B,EAEAD,EAAMJ,aAAe,SAASC,GACxB+G,IACFD,EAAUS,OAAOR,GACjBA,EAAUK,EAAcpH,GAAWG,EAAMO,QAAQmD,SAErD,EAEA9B,EAAQuF,GAAG,cAAc,WACO,IAA1BnH,EAAMO,QAAQmD,SAAmD,IAAlC1D,EAAMO,QAAQ6C,kBACjDpD,EAAM0H,QAAO,WACX1H,EAAMwD,YAAcxD,EAAMO,QAAQiD,WACpC,IACAoD,EAAUK,EAAcjH,EAAMO,QAAQ6C,iBACxC,GAkBF,EACF,CA/FArC,QAAQ8D,OAAO,UACZyB,UAAU,QAAS5H,GAEtBA,EAAMqG,QAAU,CAAC,YAAa,YAAa,eAAgB,SA6F7D,CAnGA,GAqGAhE,QAAQ8D,OAAO,UAAU8C,IAAI,CAAC,iBAAkB,SAASC,GAAiBA,EAAeC,IAAI,0CAA0C,wCACvID,EAAeC,IAAI,8BAA8B,8iBAA+kB,G,kBC5fhoB,EAAQ,OACRhD,EAAOiD,QAAU,Q","sources":["webpack://apps/./node_modules/angular-toastr/dist/angular-toastr.tpls.js","webpack://apps/./node_modules/angular-toastr/index.js"],"sourcesContent":["(function() {\n 'use strict';\n\n angular.module('toastr', [])\n .factory('toastr', toastr);\n\n toastr.$inject = ['$animate', '$injector', '$document', '$rootScope', '$sce', 'toastrConfig', '$q'];\n\n function toastr($animate, $injector, $document, $rootScope, $sce, toastrConfig, $q) {\n var container;\n var index = 0;\n var toasts = [];\n\n var previousToastMessage = '';\n var openToasts = {};\n\n var containerDefer = $q.defer();\n\n var toast = {\n active: active,\n clear: clear,\n error: error,\n info: info,\n remove: remove,\n success: success,\n warning: warning,\n refreshTimer: refreshTimer\n };\n\n return toast;\n\n /* Public API */\n function active() {\n return toasts.length;\n }\n\n function clear(toast) {\n // Bit of a hack, I will remove this soon with a BC\n if (arguments.length === 1 && !toast) { return; }\n\n if (toast) {\n remove(toast.toastId);\n } else {\n for (var i = 0; i < toasts.length; i++) {\n remove(toasts[i].toastId);\n }\n }\n }\n\n function error(message, title, optionsOverride) {\n var type = _getOptions().iconClasses.error;\n return _buildNotification(type, message, title, optionsOverride);\n }\n\n function info(message, title, optionsOverride) {\n var type = _getOptions().iconClasses.info;\n return _buildNotification(type, message, title, optionsOverride);\n }\n\n function success(message, title, optionsOverride) {\n var type = _getOptions().iconClasses.success;\n return _buildNotification(type, message, title, optionsOverride);\n }\n\n function warning(message, title, optionsOverride) {\n var type = _getOptions().iconClasses.warning;\n return _buildNotification(type, message, title, optionsOverride);\n }\n\n function refreshTimer(toast, newTime) {\n if (toast && toast.isOpened && toasts.indexOf(toast) >= 0) {\n toast.scope.refreshTimer(newTime);\n }\n }\n\n function remove(toastId, wasClicked) {\n var toast = findToast(toastId);\n\n if (toast && ! toast.deleting) { // Avoid clicking when fading out\n toast.deleting = true;\n toast.isOpened = false;\n $animate.leave(toast.el).then(function() {\n if (toast.scope.options.onHidden) {\n toast.scope.options.onHidden(!!wasClicked, toast);\n }\n toast.scope.$destroy();\n var index = toasts.indexOf(toast);\n delete openToasts[toast.scope.message];\n toasts.splice(index, 1);\n var maxOpened = toastrConfig.maxOpened;\n if (maxOpened && toasts.length >= maxOpened) {\n toasts[maxOpened - 1].open.resolve();\n }\n if (lastToast()) {\n container.remove();\n container = null;\n containerDefer = $q.defer();\n }\n });\n }\n\n function findToast(toastId) {\n for (var i = 0; i < toasts.length; i++) {\n if (toasts[i].toastId === toastId) {\n return toasts[i];\n }\n }\n }\n\n function lastToast() {\n return !toasts.length;\n }\n }\n\n /* Internal functions */\n function _buildNotification(type, message, title, optionsOverride) {\n if (angular.isObject(title)) {\n optionsOverride = title;\n title = null;\n }\n\n return _notify({\n iconClass: type,\n message: message,\n optionsOverride: optionsOverride,\n title: title\n });\n }\n\n function _getOptions() {\n return angular.extend({}, toastrConfig);\n }\n\n function _createOrGetContainer(options) {\n if(container) { return containerDefer.promise; }\n\n container = angular.element('
');\n container.attr('id', options.containerId);\n container.addClass(options.positionClass);\n container.css({'pointer-events': 'auto'});\n\n var target = angular.element(document.querySelector(options.target));\n\n if ( ! target || ! target.length) {\n throw 'Target for toasts doesn\\'t exist';\n }\n\n $animate.enter(container, target).then(function() {\n containerDefer.resolve();\n });\n\n return containerDefer.promise;\n }\n\n function _notify(map) {\n var options = _getOptions();\n\n if (shouldExit()) { return; }\n\n var newToast = createToast();\n\n toasts.push(newToast);\n\n if (ifMaxOpenedAndAutoDismiss()) {\n var oldToasts = toasts.slice(0, (toasts.length - options.maxOpened));\n for (var i = 0, len = oldToasts.length; i < len; i++) {\n remove(oldToasts[i].toastId);\n }\n }\n\n if (maxOpenedNotReached()) {\n newToast.open.resolve();\n }\n\n newToast.open.promise.then(function() {\n _createOrGetContainer(options).then(function() {\n newToast.isOpened = true;\n if (options.newestOnTop) {\n $animate.enter(newToast.el, container).then(function() {\n newToast.scope.init();\n });\n } else {\n var sibling = container[0].lastChild ? angular.element(container[0].lastChild) : null;\n $animate.enter(newToast.el, container, sibling).then(function() {\n newToast.scope.init();\n });\n }\n });\n });\n\n return newToast;\n\n function ifMaxOpenedAndAutoDismiss() {\n return options.autoDismiss && options.maxOpened && toasts.length > options.maxOpened;\n }\n\n function createScope(toast, map, options) {\n if (options.allowHtml) {\n toast.scope.allowHtml = true;\n toast.scope.title = $sce.trustAsHtml(map.title);\n toast.scope.message = $sce.trustAsHtml(map.message);\n } else {\n toast.scope.title = map.title;\n toast.scope.message = map.message;\n }\n\n toast.scope.toastType = toast.iconClass;\n toast.scope.toastId = toast.toastId;\n toast.scope.extraData = options.extraData;\n\n toast.scope.options = {\n extendedTimeOut: options.extendedTimeOut,\n messageClass: options.messageClass,\n onHidden: options.onHidden,\n onShown: generateEvent('onShown'),\n onTap: generateEvent('onTap'),\n progressBar: options.progressBar,\n tapToDismiss: options.tapToDismiss,\n timeOut: options.timeOut,\n titleClass: options.titleClass,\n toastClass: options.toastClass\n };\n\n if (options.closeButton) {\n toast.scope.options.closeHtml = options.closeHtml;\n }\n\n function generateEvent(event) {\n if (options[event]) {\n return function() {\n options[event](toast);\n };\n }\n }\n }\n\n function createToast() {\n var newToast = {\n toastId: index++,\n isOpened: false,\n scope: $rootScope.$new(),\n open: $q.defer()\n };\n newToast.iconClass = map.iconClass;\n if (map.optionsOverride) {\n angular.extend(options, cleanOptionsOverride(map.optionsOverride));\n newToast.iconClass = map.optionsOverride.iconClass || newToast.iconClass;\n }\n\n createScope(newToast, map, options);\n\n newToast.el = createToastEl(newToast.scope);\n\n return newToast;\n\n function cleanOptionsOverride(options) {\n var badOptions = ['containerId', 'iconClasses', 'maxOpened', 'newestOnTop',\n 'positionClass', 'preventDuplicates', 'preventOpenDuplicates', 'templates'];\n for (var i = 0, l = badOptions.length; i < l; i++) {\n delete options[badOptions[i]];\n }\n\n return options;\n }\n }\n\n function createToastEl(scope) {\n var angularDomEl = angular.element('
'),\n $compile = $injector.get('$compile');\n return $compile(angularDomEl)(scope);\n }\n\n function maxOpenedNotReached() {\n return options.maxOpened && toasts.length <= options.maxOpened || !options.maxOpened;\n }\n\n function shouldExit() {\n var isDuplicateOfLast = options.preventDuplicates && map.message === previousToastMessage;\n var isDuplicateOpen = options.preventOpenDuplicates && openToasts[map.message];\n\n if (isDuplicateOfLast || isDuplicateOpen) {\n return true;\n }\n\n previousToastMessage = map.message;\n openToasts[map.message] = true;\n\n return false;\n }\n }\n }\n}());\n\n(function() {\n 'use strict';\n\n angular.module('toastr')\n .constant('toastrConfig', {\n allowHtml: false,\n autoDismiss: false,\n closeButton: false,\n closeHtml: '',\n containerId: 'toast-container',\n extendedTimeOut: 1000,\n iconClasses: {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning'\n },\n maxOpened: 0,\n messageClass: 'toast-message',\n newestOnTop: true,\n onHidden: null,\n onShown: null,\n onTap: null,\n positionClass: 'toast-top-right',\n preventDuplicates: false,\n preventOpenDuplicates: false,\n progressBar: false,\n tapToDismiss: true,\n target: 'body',\n templates: {\n toast: 'directives/toast/toast.html',\n progressbar: 'directives/progressbar/progressbar.html'\n },\n timeOut: 5000,\n titleClass: 'toast-title',\n toastClass: 'toast'\n });\n}());\n\n(function() {\n 'use strict';\n\n angular.module('toastr')\n .directive('progressBar', progressBar);\n\n progressBar.$inject = ['toastrConfig'];\n\n function progressBar(toastrConfig) {\n return {\n require: '^toast',\n templateUrl: function() {\n return toastrConfig.templates.progressbar;\n },\n link: linkFunction\n };\n\n function linkFunction(scope, element, attrs, toastCtrl) {\n var intervalId, currentTimeOut, hideTime;\n\n toastCtrl.progressBar = scope;\n\n scope.start = function(duration) {\n if (intervalId) {\n clearInterval(intervalId);\n }\n\n currentTimeOut = parseFloat(duration);\n hideTime = new Date().getTime() + currentTimeOut;\n intervalId = setInterval(updateProgress, 10);\n };\n\n scope.stop = function() {\n if (intervalId) {\n clearInterval(intervalId);\n }\n };\n\n function updateProgress() {\n var percentage = ((hideTime - (new Date().getTime())) / currentTimeOut) * 100;\n element.css('width', percentage + '%');\n }\n\n scope.$on('$destroy', function() {\n // Failsafe stop\n clearInterval(intervalId);\n });\n }\n }\n}());\n\n(function() {\n 'use strict';\n\n angular.module('toastr')\n .controller('ToastController', ToastController);\n\n function ToastController() {\n this.progressBar = null;\n\n this.startProgressBar = function(duration) {\n if (this.progressBar) {\n this.progressBar.start(duration);\n }\n };\n\n this.stopProgressBar = function() {\n if (this.progressBar) {\n this.progressBar.stop();\n }\n };\n }\n}());\n\n(function() {\n 'use strict';\n\n angular.module('toastr')\n .directive('toast', toast);\n\n toast.$inject = ['$injector', '$interval', 'toastrConfig', 'toastr'];\n\n function toast($injector, $interval, toastrConfig, toastr) {\n return {\n templateUrl: function() {\n return toastrConfig.templates.toast;\n },\n controller: 'ToastController',\n link: toastLinkFunction\n };\n\n function toastLinkFunction(scope, element, attrs, toastCtrl) {\n var timeout;\n\n scope.toastClass = scope.options.toastClass;\n scope.titleClass = scope.options.titleClass;\n scope.messageClass = scope.options.messageClass;\n scope.progressBar = scope.options.progressBar;\n\n if (wantsCloseButton()) {\n var button = angular.element(scope.options.closeHtml),\n $compile = $injector.get('$compile');\n button.addClass('toast-close-button');\n button.attr('ng-click', 'close(true, $event)');\n $compile(button)(scope);\n element.children().prepend(button);\n }\n\n scope.init = function() {\n if (scope.options.timeOut) {\n timeout = createTimeout(scope.options.timeOut);\n }\n if (scope.options.onShown) {\n scope.options.onShown();\n }\n };\n\n element.on('mouseenter', function() {\n hideAndStopProgressBar();\n if (timeout) {\n $interval.cancel(timeout);\n }\n });\n\n scope.tapToast = function () {\n if (angular.isFunction(scope.options.onTap)) {\n scope.options.onTap();\n }\n if (scope.options.tapToDismiss) {\n scope.close(true);\n }\n };\n\n scope.close = function (wasClicked, $event) {\n if ($event && angular.isFunction($event.stopPropagation)) {\n $event.stopPropagation();\n }\n toastr.remove(scope.toastId, wasClicked);\n };\n \n scope.refreshTimer = function(newTime) {\n if (timeout) {\n $interval.cancel(timeout);\n timeout = createTimeout(newTime || scope.options.timeOut);\n }\n };\n\n element.on('mouseleave', function() {\n if (scope.options.timeOut === 0 && scope.options.extendedTimeOut === 0) { return; }\n scope.$apply(function() {\n scope.progressBar = scope.options.progressBar;\n });\n timeout = createTimeout(scope.options.extendedTimeOut);\n });\n\n function createTimeout(time) {\n toastCtrl.startProgressBar(time);\n return $interval(function() {\n toastCtrl.stopProgressBar();\n toastr.remove(scope.toastId);\n }, time, 1);\n }\n\n function hideAndStopProgressBar() {\n scope.progressBar = false;\n toastCtrl.stopProgressBar();\n }\n\n function wantsCloseButton() {\n return scope.options.closeHtml;\n }\n }\n }\n}());\n\nangular.module(\"toastr\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"directives/progressbar/progressbar.html\",\"
\\n\");\n$templateCache.put(\"directives/toast/toast.html\",\"
\\n
\\n
{{title}}
\\n
{{message}}
\\n
\\n
\\n
\\n \\n
\\n\");}]);","require('./dist/angular-toastr.tpls.js');\nmodule.exports = 'toastr';\n\n"],"names":["toastr","$animate","$injector","$document","$rootScope","$sce","toastrConfig","$q","container","index","toasts","previousToastMessage","openToasts","containerDefer","defer","toast","active","length","clear","arguments","remove","toastId","i","error","message","title","optionsOverride","_buildNotification","_getOptions","iconClasses","info","success","warning","refreshTimer","newTime","isOpened","indexOf","scope","wasClicked","findToast","deleting","leave","el","then","options","onHidden","$destroy","splice","maxOpened","open","resolve","type","angular","isObject","map","shouldExit","newToast","createToast","push","ifMaxOpenedAndAutoDismiss","oldToasts","slice","len","maxOpenedNotReached","promise","element","attr","containerId","addClass","positionClass","css","target","document","querySelector","enter","_createOrGetContainer","newestOnTop","init","sibling","lastChild","autoDismiss","createScope","generateEvent","event","allowHtml","trustAsHtml","toastType","iconClass","extraData","extendedTimeOut","messageClass","onShown","onTap","progressBar","tapToDismiss","timeOut","titleClass","toastClass","closeButton","closeHtml","$new","extend","cleanOptionsOverride","createToastEl","badOptions","l","angularDomEl","get","$compile","isDuplicateOfLast","preventDuplicates","isDuplicateOpen","preventOpenDuplicates","_notify","module","factory","$inject","constant","templates","progressbar","require","templateUrl","link","attrs","toastCtrl","intervalId","currentTimeOut","hideTime","updateProgress","percentage","Date","getTime","start","duration","clearInterval","parseFloat","setInterval","stop","$on","directive","controller","this","startProgressBar","stopProgressBar","$interval","timeout","wantsCloseButton","button","children","prepend","createTimeout","time","on","cancel","tapToast","isFunction","close","$event","stopPropagation","$apply","run","$templateCache","put","exports"],"sourceRoot":""}