!function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:o.error,iconclass:m().iconclasses.error,message:e,optionsoverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerid),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:o.info,iconclass:m().iconclasses.info,message:e,optionsoverride:n,title:t})}function s(e){c=e}function i(e,t,n){return g({type:o.success,iconclass:m().iconclasses.success,message:e,optionsoverride:n,title:t})}function a(e,t,n){return g({type:o.warning,iconclass:m().iconclasses.warning,message:e,optionsoverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hidemethod]({duration:n.hideduration,easing:n.hideeasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("
").attr("id",t.containerid).addclass(t.positionclass),v.appendto(e(t.target)),v}function p(){return{taptodismiss:!0,toastclass:"toast",containerid:"toast-container",debug:!1,showmethod:"fadein",showduration:300,showeasing:"swing",onshown:void 0,hidemethod:"fadeout",hideduration:1e3,hideeasing:"swing",onhidden:void 0,closemethod:!1,closeduration:!1,closeeasing:!1,closeonhover:!0,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",escapehtml:!1,target:"body",closehtml:'',closeclass:"toast-close-button",newestontop:!0,preventduplicates:!1,progressbar:!1,progressclass:"toast-progress",rtl:!1}}function f(e){c&&c(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),c(),l(),i()}function i(){var e="";switch(t.iconclass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}i.attr("aria-live",e)}function a(){e.closeonhover&&i.hover(h,d),!e.onclick&&e.taptodismiss&&i.click(b),e.closebutton&&j&&j.click(function(e){e.stoppropagation?e.stoppropagation():void 0!==e.cancelbubble&&e.cancelbubble!==!0&&(e.cancelbubble=!0),e.oncloseclick&&e.oncloseclick(e),b(!0)}),e.onclick&&i.click(function(e){e.onclick(e),b()})}function r(){i.hide(),i[e.showmethod]({duration:e.showduration,easing:e.showeasing,complete:e.onshown}),e.timeout>0&&(k=settimeout(b,e.timeout),f.maxhidetime=parsefloat(e.timeout),f.hideeta=(new date).gettime()+f.maxhidetime,e.progressbar&&(f.intervalid=setinterval(x,10)))}function c(){t.iconclass&&i.addclass(e.toastclass).addclass(y)}function l(){e.newestontop?v.prepend(i):v.append(i)}function u(){if(t.title){var e=t.title;e.escapehtml&&(e=o(t.title)),m.append(e).addclass(e.titleclass),i.append(m)}}function d(){if(t.message){var e=t.message;e.escapehtml&&(e=o(t.message)),b.append(e).addclass(e.messageclass),i.append(b)}}function p(){e.closebutton&&(j.addclass(e.closeclass).attr("role","button"),i.prepend(j))}function g(){e.progressbar&&(q.addclass(e.progressclass),i.prepend(q))}function c(){e.rtl&&i.addclass("rtl")}function o(e,t){if(e.preventduplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&e.closemethod!==!1?e.closemethod:e.hidemethod,o=t&&e.closeduration!==!1?e.closeduration:e.hideduration,s=t&&e.closeeasing!==!1?e.closeeasing:e.hideeasing;if(!e(":focus",i).length||t)return cleartimeout(f.intervalid),i[n]({duration:o,easing:s,complete:function(){h(i),cleartimeout(k),e.onhidden&&"hidden"!==p.state&&e.onhidden(),p.state="hidden",p.endtime=new date,f(p)}})}function d(){(e.timeout>0||e.extendedtimeout>0)&&(k=settimeout(b,e.extendedtimeout),f.maxhidetime=parsefloat(e.extendedtimeout),f.hideeta=(new date).gettime()+f.maxhidetime)}function h(){cleartimeout(k),f.hideeta=0,i.stop(!0,!0)[e.showmethod]({duration:e.showduration,easing:e.showeasing})}function x(){var e=(f.hideeta-(new date).gettime())/f.maxhidetime*100;q.width(e+"%")}var e=m(),y=t.iconclass||e.iconclass;if("undefined"!=typeof t.optionsoverride&&(e=e.extend(e,t.optionsoverride),y=t.optionsoverride.iconclass||y),!o(e,t)){t++,v=n(e,!0);var k=null,i=e("
"),m=e("
"),b=e("
"),q=e("
"),j=e(e.closehtml),f={intervalid:null,hideeta:null,maxhidetime:null},p={toastid:t,state:"visible",starttime:new date,options:e,map:t};return s(),r(),a(),f(p),e.debug&&console&&console.log(p),i}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,c,w,t=0,o={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getcontainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.3",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jquery)}); //# sourcemappingurl=toastr.js.map