"function"!=typeof Object.create&&(Object.create=function(o){function t(){}return t.prototype=o,new t});var NotyObject={init:function(o){return this.options=$.extend({},$.noty.defaults,o),this.options.layout=this.options.custom?$.noty.layouts.inline:$.noty.layouts[this.options.layout],$.noty.themes[this.options.theme]?this.options.theme=$.noty.themes[this.options.theme]:o.themeClassName=this.options.theme,delete o.layout,delete o.theme,this.options=$.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(1e6*Math.random()),this.options=$.extend({},this.options,o),this._build(),this},_build:function(){var o=$('
').attr("id",this.options.id);if(o.append(this.options.template).find(".noty_text").html(this.options.text),this.$bar=null!==this.options.layout.parent.object?$(this.options.layout.parent.object).css(this.options.layout.parent.css).append(o):o,this.options.themeClassName&&this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type),this.options.buttons){this.options.closeWith=[],this.options.timeout=!1;var t=$("").addClass("noty_buttons");null!==this.options.layout.parent.object?this.$bar.find(".noty_bar").append(t):this.$bar.append(t);var n=this;$.each(this.options.buttons,function(o,t){var e=$("").addClass(t.addClass?t.addClass:"gray").html(t.text).attr("id",t.id?t.id:"button-"+o).appendTo(n.$bar.find(".noty_buttons")).on("click",function(){$.isFunction(t.onClick)&&t.onClick.call(e,n)})})}this.$message=this.$bar.find(".noty_message"),this.$closeButton=this.$bar.find(".noty_close"),this.$buttons=this.$bar.find(".noty_buttons"),$.noty.store[this.options.id]=this},show:function(){var o=this;return o.options.custom?o.options.custom.find(o.options.layout.container.selector).append(o.$bar):$(o.options.layout.container.selector).append(o.$bar),o.options.theme&&o.options.theme.style&&o.options.theme.style.apply(o),"function"===$.type(o.options.layout.css)?this.options.layout.css.apply(o.$bar):o.$bar.css(this.options.layout.css||{}),o.$bar.addClass(o.options.layout.addClass),o.options.layout.container.style.apply($(o.options.layout.container.selector)),o.showing=!0,o.options.theme&&o.options.theme.style&&o.options.theme.callback.onShow.apply(this),$.inArray("click",o.options.closeWith)>-1&&o.$bar.css("cursor","pointer").one("click",function(t){o.stopPropagation(t),o.options.callback.onCloseClick&&o.options.callback.onCloseClick.apply(o),o.close()}),$.inArray("hover",o.options.closeWith)>-1&&o.$bar.one("mouseenter",function(){o.close()}),$.inArray("button",o.options.closeWith)>-1&&o.$closeButton.one("click",function(t){o.stopPropagation(t),o.close()}),-1==$.inArray("button",o.options.closeWith)&&o.$closeButton.remove(),o.options.callback.onShow&&o.options.callback.onShow.apply(o),"string"==typeof o.options.animation.open?(o.$bar.css("height",o.$bar.innerHeight()),o.$bar.show().addClass(o.options.animation.open).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){o.options.callback.afterShow&&o.options.callback.afterShow.apply(o),o.showing=!1,o.shown=!0})):o.$bar.animate(o.options.animation.open,o.options.animation.speed,o.options.animation.easing,function(){o.options.callback.afterShow&&o.options.callback.afterShow.apply(o),o.showing=!1,o.shown=!0}),o.options.timeout&&o.$bar.delay(o.options.timeout).promise().done(function(){o.close()}),this},close:function(){if(!(this.closed||this.$bar&&this.$bar.hasClass("i-am-closing-now"))){var o=this;if(this.showing)return void o.$bar.queue(function(){o.close.apply(o)});if(this.$bar.dequeue(),!this.shown&&!this.showing){var t=[];return $.each($.noty.queue,function(n,e){e.options.id!=o.options.id&&t.push(e)}),void($.noty.queue=t)}o.$bar.addClass("i-am-closing-now"),o.options.callback.onClose&&o.options.callback.onClose.apply(o),"string"==typeof o.options.animation.close?o.$bar.addClass(o.options.animation.close).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){o.options.callback.afterClose&&o.options.callback.afterClose.apply(o),o.closeCleanUp()}):o.$bar.clearQueue().stop().animate(o.options.animation.close,o.options.animation.speed,o.options.animation.easing,function(){o.options.callback.afterClose&&o.options.callback.afterClose.apply(o)}).promise().done(function(){o.closeCleanUp()})}},closeCleanUp:function(){var o=this;o.options.modal&&($.notyRenderer.setModalCount(-1),0==$.notyRenderer.getModalCount()&&$(".noty_modal").fadeOut("fast",function(){$(this).remove()})),$.notyRenderer.setLayoutCountFor(o,-1),0==$.notyRenderer.getLayoutCountFor(o)&&$(o.options.layout.container.selector).remove(),"undefined"!=typeof o.$bar&&null!==o.$bar&&("string"==typeof o.options.animation.close?(o.$bar.css("transition","all 100ms ease").css("border",0).css("margin",0).height(0),o.$bar.one("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){o.$bar.remove(),o.$bar=null,o.closed=!0,o.options.theme.callback&&o.options.theme.callback.onClose&&o.options.theme.callback.onClose.apply(o)})):(o.$bar.remove(),o.$bar=null,o.closed=!0)),delete $.noty.store[o.options.id],o.options.theme.callback&&o.options.theme.callback.onClose&&o.options.theme.callback.onClose.apply(o),o.options.dismissQueue||($.noty.ontap=!0,$.notyRenderer.render()),o.options.maxVisible>0&&o.options.dismissQueue&&$.notyRenderer.render()},setText:function(o){return this.closed||(this.options.text=o,this.$bar.find(".noty_text").html(o)),this},setType:function(o){return this.closed||(this.options.type=o,this.options.theme.style.apply(this),this.options.theme.callback.onShow.apply(this)),this},setTimeout:function(o){if(!this.closed){var t=this;this.options.timeout=o,t.$bar.delay(t.options.timeout).promise().done(function(){t.close()})}return this},stopPropagation:function(o){o=o||window.event,"undefined"!=typeof o.stopPropagation?o.stopPropagation():o.cancelBubble=!0},closed:!1,showing:!1,shown:!1};$.notyRenderer={},$.notyRenderer.init=function(o){var t=Object.create(NotyObject).init(o);return t.options.killer&&$.noty.closeAll(),t.options.force?$.noty.queue.unshift(t):$.noty.queue.push(t),$.notyRenderer.render(),"object"==$.noty.returns?t:t.options.id},$.notyRenderer.render=function(){var o=$.noty.queue[0];"object"===$.type(o)?o.options.dismissQueue?o.options.maxVisible>0?$(o.options.layout.container.selector+" li").length