text: (function(n){n(["jquery"],function(n){return function(){function v(n,t,r){return f({type:u.error,iconClass:i().iconClasses.error,message:n,optionsOverride:r,title:t})}function r(r,u){return(r||(r=i()),t=n("#"+r.containerId),t.length)?t:(u&&(t=nt(r)),t)}function y(n,t,r){return f({type:u.info,iconClass:i().iconClasses.info,message:n,optionsOverride:r,title:t})}function p(n){e=n}function w(n,t,r){return f({type:u.success,iconClass:i().iconClasses.success,message:n,optionsOverride:r,title:t})}function b(n,t,r){return f({type:u.warning,iconClass:i().iconClasses.warning,message:n,optionsOverride:r,title:t})}function k(n,u){var f=i();t||r(f);l(n,f,u)||g(f)}function d(u){var f=i();if(t||r(f),u&&n(":focus",u).length===0){s(u);return}t.children().length&&t.remove()}function g(i){for(var u=t.children(),r=u.length-1;r>=0;r--)l(n(u[r]),i)}function l(t,i,r){var u=r&&r.force?r.force:!1;return t&&(u||n(":focus",t).length===0)?(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){s(t)}}),!0):!1}function nt(i){return t=n("<div/>").attr("id",i.containerId).addClass(i.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(n(i.target)),t}function tt(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,closeButton:!0,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'<button type="button">X<\/button>',newestOnTop:!0,preventDuplicates:!1,progressBar:!0}}function a(n){e&&e(n)}function f(u){function g(){it();ut();ft();et();ot();rt()}function nt(){e.hover(ct,ht);!f.onclick&&f.tapToDismiss&&e.click(v);f.closeButton&&y&&y.click(function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble!==undefined&&n.cancelBubble!==!0&&(n.cancelBubble=!0);v(!0)});f.onclick&&e.click(function(){f.onclick();v()})}function tt(){e.hide();e[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown});f.timeOut>0&&(w=setTimeout(v,f.timeOut),c.maxHideTime=parseFloat(f.timeOut),c.hideEta=(new Date).getTime()+c.maxHideTime,f.progressBar&&(c.intervalId=setInterval(lt,10)))}function it(){u.iconClass&&e.addClass(f.toastClass).addClass(p)}function rt(){f.newestOnTop?t.prepend(e):t.append(e)}function ut(){u.title&&(k.append(u.title).addClass(f.titleClass),e.append(k))}function ft(){u.message&&(d.append(u.message).addClass(f.messageClass),e.append(d))}function et(){f.closeButton&&(y.addClass("toast-close-button").attr("role","button"),e.prepend(y))}function ot(){f.progressBar&&(b.addClass("toast-progress"),e.prepend(b))}function st(n,t){if(n.preventDuplicates){if(t.message===o)return!0;o=t.message}return!1}function v(t){if(!n(":focus",e).length||t)return clearTimeout(c.intervalId),e[f.hideMethod]({duration:f.hideDuration,easing:f.hideEasing,complete:function(){s(e);f.onHidden&&l.state!=="hidden"&&f.onHidden();l.state="hidden";l.endTime=new Date;a(l)}})}function ht(){(f.timeOut>0||f.extendedTimeOut>0)&&(w=setTimeout(v,f.extendedTimeOut),c.maxHideTime=parseFloat(f.extendedTimeOut),c.hideEta=(new Date).getTime()+c.maxHideTime)}function ct(){clearTimeout(w);c.hideEta=0;e.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}function lt(){var n=(c.hideEta-(new Date).getTime())/c.maxHideTime*100;b.width(n+"%")}var f=i(),p=u.iconClass||f.iconClass;if(typeof u.optionsOverride!="undefined"&&(f=n.extend(f,u.optionsOverride),p=u.optionsOverride.iconClass||p),!st(f,u)){h++;t=r(f,!0);var w=null,e=n("<div/>"),k=n("<div/>"),d=n("<div/>"),b=n("<div/>"),y=n(f.closeHtml),c={intervalId:null,hideEta:null,maxHideTime:null},l={toastId:h,state:"visible",startTime:new Date,options:f,map:u};return g(),tt(),nt(),a(l),f.debug&&console&&console.log(l),e}}function i(){return n.extend({},tt(),c.options)}function s(n){(t||(t=r()),n.is(":visible"))||(n.remove(),n=null,t.children().length===0&&(t.remove(),o=undefined))}var t,e,h=0,u={error:"error",info:"info",success:"success",warning:"warning"},c={clear:k,remove:d,error:v,getContainer:r,info:y,options:{},subscribe:p,success:w,version:"2.1.1",warning:b},o;return c}()})})(typeof define=="function"&&define.amd?define:function(n,t){typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});