diff --git a/js/iziModal.min.js b/js/iziModal.min.js index 7cda4a3..69b18f3 100644 --- a/js/iziModal.min.js +++ b/js/iziModal.min.js @@ -3,4 +3,4 @@ * https://izimodal.marcelodolza.com * by Marcelo Dolza. */ -!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){var e=t(window),i=t(document),n="iziModal",o={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened",DESTROYED:"destroyed"};function s(t){return 9===t?-1!==navigator.appVersion.indexOf("MSIE 9."):(userAgent=navigator.userAgent,userAgent.indexOf("MSIE ")>-1||userAgent.indexOf("Trident/")>-1)}function a(t){return parseInt(String(t).split(/%|px|em|cm|vh|vw/)[0])}var r=function(){var t,e=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in i)if(void 0!==e.style[t])return i[t]}(),l=!!/Mobi/.test(navigator.userAgent);window.$iziModal={},window.$iziModal.autoOpen=0,window.$iziModal.history=!1;var d=function(t,e){this.init(t,e)};return d.prototype={constructor:d,init:function(e,i){var s=this;this.$element=t(e),void 0!==this.$element[0].id&&""!==this.$element[0].id?this.id=this.$element[0].id:(this.id=n+Math.floor(1e7*Math.random()+1),this.$element.attr("id",this.id)),this.classes=void 0!==this.$element.attr("class")?this.$element.attr("class"):"",this.content=this.$element.html(),this.state=o.CLOSED,this.options=i,this.width=0,this.timer=null,this.timerTimeout=null,this.progressBar=null,this.isPaused=!1,this.isFullscreen=!1,this.headerHeight=0,this.modalHeight=0,this.$overlay=t('
').css("background-color",i.overlayColor),this.$navigate=t('
Use
'),this.group={name:this.$element.attr("data-"+n+"-group"),index:null,ids:[]},this.$element.attr("aria-hidden","true"),this.$element.attr("aria-labelledby",this.id),this.$element.attr("role","dialog"),this.$element.hasClass("iziModal")||this.$element.addClass("iziModal"),void 0===this.group.name&&""!==i.group&&(this.group.name=i.group,this.$element.attr("data-"+n+"-group",i.group)),!0===this.options.loop&&this.$element.attr("data-"+n+"-loop",!0),t.each(this.options,function(t,e){var o=s.$element.attr("data-"+n+"-"+t);try{void 0!==o&&(i[t]=""===o||"true"==o||"false"!=o&&("function"==typeof e?new Function(o):o))}catch(t){}}),!1!==i.appendTo&&this.$element.appendTo(i.appendTo),!0===i.iframe?(this.$element.html('
'+this.content+"
"),null!==i.iframeHeight&&this.$element.find("."+n+"-iframe").css("height",i.iframeHeight)):this.$element.html('
'+this.content+"
"),null!==this.options.background&&this.$element.css("background",this.options.background),this.$wrap=this.$element.find("."+n+"-wrap"),null===i.zindex||isNaN(parseInt(i.zindex))||(this.$element.css("z-index",i.zindex),this.$navigate.css("z-index",i.zindex-1),this.$overlay.css("z-index",i.zindex-2)),""!==i.radius&&this.$element.css("border-radius",i.radius),""!==i.padding&&this.$element.find("."+n+"-content").css("padding",i.padding),""!==i.theme&&("light"===i.theme?this.$element.addClass(n+"-light"):this.$element.addClass(i.theme)),!0===i.rtl&&this.$element.addClass(n+"-rtl"),!0===i.openFullscreen&&(this.isFullscreen=!0,this.$element.addClass("isFullscreen")),this.createHeader(),this.recalcWidth(),this.recalcVerticalPos(),!s.options.afterRender||"function"!=typeof s.options.afterRender&&"object"!=typeof s.options.afterRender||s.options.afterRender(s)},createHeader:function(){this.$header=t('

'+this.options.title+'

'+this.options.subtitle+'

'),!0===this.options.closeButton&&this.$header.find("."+n+"-header-buttons").append('"),!0===this.options.fullscreen&&this.$header.find("."+n+"-header-buttons").append('"),!0===this.options.timeoutProgressbar&&this.$header.prepend(t('
').append(t("
").css("background-color",this.options.timeoutProgressbarColor))),""===this.options.subtitle&&this.$header.addClass(n+"-noSubtitle"),""!==this.options.title&&(null!==this.options.headerColor&&(!0===this.options.borderBottom&&this.$element.css("border-bottom","3px solid "+this.options.headerColor),this.$header.css("background",this.options.headerColor)),null===this.options.icon&&null===this.options.iconText||(this.$header.prepend(''),null!==this.options.icon&&this.$header.find("."+n+"-header-icon").addClass(this.options.icon).css("color",this.options.iconColor),null!==this.options.iconText&&this.$header.find("."+n+"-header-icon").html(this.options.iconText)),this.$element.css("overflow","hidden").prepend(this.$header))},setGroup:function(e){var i=this,o=this.group.name||e;if(this.group.ids=[],void 0!==e&&e!==this.group.name&&(o=e,this.group.name=o,this.$element.attr("data-"+n+"-group",o)),void 0!==o&&""!==o){var s=0;t.each(t("."+n+"[data-"+n+"-group="+o+"]"),function(e,n){i.group.ids.push(t(this)[0].id),i.id==t(this)[0].id&&(i.group.index=s),s++})}},toggle:function(){this.state==o.OPENED&&this.close(),this.state==o.CLOSED&&this.open()},startProgress:function(t){var e=this;this.isPaused=!1,clearTimeout(this.timerTimeout),!0===this.options.timeoutProgressbar?(this.progressBar={hideEta:null,maxHideTime:null,currentTime:(new Date).getTime(),el:this.$element.find("."+n+"-progressbar > div"),updateProgress:function(){if(!e.isPaused){e.progressBar.currentTime=e.progressBar.currentTime+10;var t=(e.progressBar.hideEta-e.progressBar.currentTime)/e.progressBar.maxHideTime*100;e.progressBar.el.width(t+"%"),t<0&&e.close()}}},t>0&&(this.progressBar.maxHideTime=parseFloat(t),this.progressBar.hideEta=(new Date).getTime()+this.progressBar.maxHideTime,this.timerTimeout=setInterval(this.progressBar.updateProgress,10))):this.timerTimeout=setTimeout(function(){e.close()},e.options.timeout)},pauseProgress:function(){this.isPaused=!0},resumeProgress:function(){this.isPaused=!1},resetProgress:function(t){clearTimeout(this.timerTimeout),this.progressBar={},this.$element.find("."+n+"-progressbar > div").width("100%")},open:function(e){var s=this;try{void 0!==e&&!1===e.preventClose&&t.each(t("."+n),function(e,i){if(void 0!==t(i).data().iziModal){var n=t(i).iziModal("getState");"opened"!=n&&"opening"!=n||t(i).iziModal("close")}})}catch(t){}function a(){s.state=o.OPENED,s.$element.trigger(o.OPENED),!s.options.onOpened||"function"!=typeof s.options.onOpened&&"object"!=typeof s.options.onOpened||s.options.onOpened(s)}if(function(){if(s.options.history){var e=document.title;document.title=e+" - "+s.options.title,i="#"+s.id,n=i.replace(/^.*#/,""),(o=t(i)).attr("id",n+"-tmp"),window.location.hash=i,o.attr("id",n),document.title=e,window.$iziModal.history=!0}else window.$iziModal.history=!1;var i,n,o}(),this.state==o.CLOSED){if(s.$element.off("click","[data-"+n+"-close]").on("click","[data-"+n+"-close]",function(e){e.preventDefault();var i=t(e.currentTarget).attr("data-"+n+"-transitionOut");void 0!==i?s.close({transition:i}):s.close()}),s.$element.off("click","[data-"+n+"-fullscreen]").on("click","[data-"+n+"-fullscreen]",function(t){t.preventDefault(),!0===s.isFullscreen?(s.isFullscreen=!1,s.$element.removeClass("isFullscreen")):(s.isFullscreen=!0,s.$element.addClass("isFullscreen")),s.options.onFullscreen&&"function"==typeof s.options.onFullscreen&&s.options.onFullscreen(s),s.$element.trigger("fullscreen",s)}),s.$navigate.off("click","."+n+"-navigate-next").on("click","."+n+"-navigate-next",function(t){s.next(t)}),s.$element.off("click","[data-"+n+"-next]").on("click","[data-"+n+"-next]",function(t){s.next(t)}),s.$navigate.off("click","."+n+"-navigate-prev").on("click","."+n+"-navigate-prev",function(t){s.prev(t)}),s.$element.off("click","[data-"+n+"-prev]").on("click","[data-"+n+"-prev]",function(t){s.prev(t)}),this.setGroup(),this.state=o.OPENING,this.$element.trigger(o.OPENING),this.$element.attr("aria-hidden","false"),!0===this.options.timeoutProgressbar&&this.$element.find("."+n+"-progressbar > div").width("100%"),!0===this.options.iframe){this.$element.find("."+n+"-content").addClass(n+"-content-loader"),this.$element.find("."+n+"-iframe").on("load",function(){t(this).parent().removeClass(n+"-content-loader")});var d=null;try{d=""!==t(e.currentTarget).attr("href")?t(e.currentTarget).attr("href"):null}catch(t){}if(null===this.options.iframeURL||null!==d&&void 0!==d||(d=this.options.iframeURL),null===d||void 0===d)throw new Error("Failed to find iframe URL");this.$element.find("."+n+"-iframe").attr("src",d)}(this.options.bodyOverflow||l)&&(t("html").addClass(n+"-isOverflow"),l&&t("body").css("overflow","hidden")),this.options.onOpening&&"function"==typeof this.options.onOpening&&this.options.onOpening(this),function(){if(s.group.ids.length>1){s.$navigate.appendTo("body"),s.$navigate.addClass("fadeIn"),!0===s.options.navigateCaption&&s.$navigate.find("."+n+"-navigate-caption").show();var i=s.$element.outerWidth();!1!==s.options.navigateArrows?"closeScreenEdge"===s.options.navigateArrows?(s.$navigate.find("."+n+"-navigate-prev").css("left",0).show(),s.$navigate.find("."+n+"-navigate-next").css("right",0).show()):(s.$navigate.find("."+n+"-navigate-prev").css("margin-left",-(i/2+84)).show(),s.$navigate.find("."+n+"-navigate-next").css("margin-right",-(i/2+84)).show()):(s.$navigate.find("."+n+"-navigate-prev").hide(),s.$navigate.find("."+n+"-navigate-next").hide()),0===s.group.index&&0===t("."+n+"[data-"+n+'-group="'+s.group.name+'"][data-'+n+"-loop]").length&&!1===s.options.loop&&s.$navigate.find("."+n+"-navigate-prev").hide(),s.group.index+1===s.group.ids.length&&0===t("."+n+"[data-"+n+'-group="'+s.group.name+'"][data-'+n+"-loop]").length&&!1===s.options.loop&&s.$navigate.find("."+n+"-navigate-next").hide()}!0===s.options.overlay&&(!1===s.options.appendToOverlay?s.$overlay.appendTo("body"):s.$overlay.appendTo(s.options.appendToOverlay)),s.options.transitionInOverlay&&s.$overlay.addClass(s.options.transitionInOverlay);var o=s.options.transitionIn;"object"==typeof e&&(void 0===e.transition&&void 0===e.transitionIn||(o=e.transition||e.transitionIn),void 0!==e.zindex&&s.setZindex(e.zindex)),""!==o&&void 0!==r?(s.$element.addClass("transitionIn "+o).show(),s.$wrap.one(r,function(){s.$element.removeClass(o+" transitionIn"),s.$overlay.removeClass(s.options.transitionInOverlay),s.$navigate.removeClass("fadeIn"),a()})):(s.$element.show(),a()),!0!==s.options.pauseOnHover||!0!==s.options.pauseOnHover||!1===s.options.timeout||isNaN(parseInt(s.options.timeout))||!1===s.options.timeout||0===s.options.timeout||(s.$element.off("mouseenter").on("mouseenter",function(t){t.preventDefault(),s.isPaused=!0}),s.$element.off("mouseleave").on("mouseleave",function(t){t.preventDefault(),s.isPaused=!1}))}(),!1===this.options.timeout||isNaN(parseInt(this.options.timeout))||!1===this.options.timeout||0===this.options.timeout||s.startProgress(this.options.timeout),this.options.overlayClose&&!this.$element.hasClass(this.options.transitionOut)&&this.$overlay.click(function(){s.close()}),this.options.focusInput&&this.$element.find(":input:not(button):enabled:visible:first").focus(),function t(){s.recalcLayout(),s.timer=setTimeout(t,300)}(),i.on("keydown."+n,function(t){s.options.closeOnEscape&&27===t.keyCode&&s.close()})}},close:function(e){var s=this;function a(){s.state=o.CLOSED,s.$element.trigger(o.CLOSED),!0===s.options.iframe&&s.$element.find("."+n+"-iframe").attr("src",""),(s.options.bodyOverflow||l)&&(t("html").removeClass(n+"-isOverflow"),l&&t("body").css("overflow","auto")),s.options.onClosed&&"function"==typeof s.options.onClosed&&s.options.onClosed(s),!0===s.options.restoreDefaultContent&&s.$element.find("."+n+"-content").html(s.content),0===t("."+n+":visible").length&&t("html").removeClass(n+"-isAttached")}if(this.state==o.OPENED||this.state==o.OPENING){i.off("keydown."+n),this.state=o.CLOSING,this.$element.trigger(o.CLOSING),this.$element.attr("aria-hidden","true"),clearTimeout(this.timer),clearTimeout(this.timerTimeout),s.options.onClosing&&"function"==typeof s.options.onClosing&&s.options.onClosing(this);var d=this.options.transitionOut;"object"==typeof e&&(void 0===e.transition&&void 0===e.transitionOut||(d=e.transition||e.transitionOut)),!1===d||""===d||void 0===r?(this.$element.hide(),this.$overlay.remove(),this.$navigate.remove(),a()):(this.$element.attr("class",[this.classes,n,d,"light"==this.options.theme?n+"-light":this.options.theme,!0===this.isFullscreen?"isFullscreen":"",this.options.rtl?n+"-rtl":""].join(" ")),this.$overlay.attr("class",n+"-overlay "+this.options.transitionOutOverlay),!1===s.options.navigateArrows||l||this.$navigate.attr("class",n+"-navigate fadeOut"),this.$element.one(r,function(){s.$element.hasClass(d)&&s.$element.removeClass(d+" transitionOut").hide(),s.$overlay.removeClass(s.options.transitionOutOverlay).remove(),s.$navigate.removeClass("fadeOut").remove(),a()}))}},next:function(e){var i=this,o="fadeInRight",s="fadeOutLeft",a=t("."+n+":visible"),r={};r.out=this,void 0!==e&&"object"!=typeof e?(e.preventDefault(),a=t(e.currentTarget),o=a.attr("data-"+n+"-transitionIn"),s=a.attr("data-"+n+"-transitionOut")):void 0!==e&&(void 0!==e.transitionIn&&(o=e.transitionIn),void 0!==e.transitionOut&&(s=e.transitionOut)),this.close({transition:s}),setTimeout(function(){for(var e=t("."+n+"[data-"+n+'-group="'+i.group.name+'"][data-'+n+"-loop]").length,s=i.group.index+1;s<=i.group.ids.length;s++){try{r.in=t("#"+i.group.ids[s]).data().iziModal}catch(t){}if(void 0!==r.in){t("#"+i.group.ids[s]).iziModal("open",{transition:o});break}if(s==i.group.ids.length&&e>0||!0===i.options.loop)for(var a=0;a<=i.group.ids.length;a++)if(r.in=t("#"+i.group.ids[a]).data().iziModal,void 0!==r.in){t("#"+i.group.ids[a]).iziModal("open",{transition:o});break}}},200),t(document).trigger(n+"-group-change",r)},prev:function(e){var i=this,o="fadeInLeft",s="fadeOutRight",a=t("."+n+":visible"),r={};r.out=this,void 0!==e&&"object"!=typeof e?(e.preventDefault(),a=t(e.currentTarget),o=a.attr("data-"+n+"-transitionIn"),s=a.attr("data-"+n+"-transitionOut")):void 0!==e&&(void 0!==e.transitionIn&&(o=e.transitionIn),void 0!==e.transitionOut&&(s=e.transitionOut)),this.close({transition:s}),setTimeout(function(){for(var e=t("."+n+"[data-"+n+'-group="'+i.group.name+'"][data-'+n+"-loop]").length,s=i.group.index;s>=0;s--){try{r.in=t("#"+i.group.ids[s-1]).data().iziModal}catch(t){}if(void 0!==r.in){t("#"+i.group.ids[s-1]).iziModal("open",{transition:o});break}if(0===s&&e>0||!0===i.options.loop)for(var a=i.group.ids.length-1;a>=0;a--)if(r.in=t("#"+i.group.ids[a]).data().iziModal,void 0!==r.in){t("#"+i.group.ids[a]).iziModal("open",{transition:o});break}}},200),t(document).trigger(n+"-group-change",r)},destroy:function(){var e=t.Event("destroy");this.$element.trigger(e),i.off("keydown."+n),clearTimeout(this.timer),clearTimeout(this.timerTimeout),!0===this.options.iframe&&this.$element.find("."+n+"-iframe").remove(),this.$element.html(this.$element.find("."+n+"-content").html()),this.$element.off("click","[data-"+n+"-close]"),this.$element.off("click","[data-"+n+"-fullscreen]"),this.$element.off("."+n).removeData(n).removeAttr("style"),this.$overlay.remove(),this.$navigate.remove(),this.$element.trigger(o.DESTROYED),this.$element=null},getState:function(){return this.state},getGroup:function(){return this.group},setWidth:function(t){this.options.width=t,this.recalcWidth();var e=this.$element.outerWidth();!0!==this.options.navigateArrows&&"closeToModal"!=this.options.navigateArrows||(this.$navigate.find("."+n+"-navigate-prev").css("margin-left",-(e/2+84)).show(),this.$navigate.find("."+n+"-navigate-next").css("margin-right",-(e/2+84)).show())},setTop:function(t){this.options.top=t,this.recalcVerticalPos(!1)},setBottom:function(t){this.options.bottom=t,this.recalcVerticalPos(!1)},setHeader:function(t){t?this.$element.find("."+n+"-header").show():(this.headerHeight=0,this.$element.find("."+n+"-header").hide())},setTitle:function(t){this.options.title=t,0===this.headerHeight&&this.createHeader(),0===this.$header.find("."+n+"-header-title").length&&this.$header.append('

'),this.$header.find("."+n+"-header-title").html(t)},setSubtitle:function(t){""===t?(this.$header.find("."+n+"-header-subtitle").remove(),this.$header.addClass(n+"-noSubtitle")):(0===this.$header.find("."+n+"-header-subtitle").length&&this.$header.append('

'),this.$header.removeClass(n+"-noSubtitle")),this.$header.find("."+n+"-header-subtitle").html(t),this.options.subtitle=t},setIcon:function(t){0===this.$header.find("."+n+"-header-icon").length&&this.$header.prepend(''),this.$header.find("."+n+"-header-icon").attr("class",n+"-header-icon "+t),this.options.icon=t},setIconText:function(t){this.$header.find("."+n+"-header-icon").html(t),this.options.iconText=t},setHeaderColor:function(t){!0===this.options.borderBottom&&this.$element.css("border-bottom","3px solid "+t),this.$header.css("background",t),this.options.headerColor=t},setBackground:function(t){!1===t?(this.options.background=null,this.$element.css("background","")):(this.$element.css("background",t),this.options.background=t)},setZindex:function(t){isNaN(parseInt(this.options.zindex))||(this.options.zindex=t,this.$element.css("z-index",t),this.$navigate.css("z-index",t-1),this.$overlay.css("z-index",t-2))},setFullscreen:function(t){t?(this.isFullscreen=!0,this.$element.addClass("isFullscreen")):(this.isFullscreen=!1,this.$element.removeClass("isFullscreen"))},setContent:function(t){"object"==typeof t&&(!0===(t.default||!1)&&(this.content=t.content),t=t.content);!1===this.options.iframe&&this.$element.find("."+n+"-content").html(t)},setTransitionIn:function(t){this.options.transitionIn=t},setTransitionOut:function(t){this.options.transitionOut=t},setTimeout:function(t){this.options.timeout=t},resetContent:function(){this.$element.find("."+n+"-content").html(this.content)},startLoading:function(){this.$element.find("."+n+"-loader").length||this.$element.append('
'),this.$element.find("."+n+"-loader").css({top:this.headerHeight,borderRadius:this.options.radius})},stopLoading:function(){var t=this.$element.find("."+n+"-loader");t.length||(this.$element.prepend('
'),t=this.$element.find("."+n+"-loader").css("border-radius",this.options.radius)),t.removeClass("fadeIn").addClass("fadeOut"),setTimeout(function(){t.remove()},600)},recalcWidth:function(){if(this.$element.css("max-width",this.options.width),s()){var t=this.options.width;t.toString().split("%").length>1&&(t=this.$element.outerWidth()),this.$element.css({left:"50%",marginLeft:-t/2})}},recalcVerticalPos:function(t){null!==this.options.top&&!1!==this.options.top?(this.$element.css("margin-top",this.options.top),0===this.options.top&&this.$element.css({borderTopRightRadius:0,borderTopLeftRadius:0})):!1===t&&this.$element.css({marginTop:"",borderRadius:this.options.radius}),null!==this.options.bottom&&!1!==this.options.bottom?(this.$element.css("margin-bottom",this.options.bottom),0===this.options.bottom&&this.$element.css({borderBottomRightRadius:0,borderBottomLeftRadius:0})):!1===t&&this.$element.css({marginBottom:"",borderRadius:this.options.radius})},recalcLayout:function(){var i=this,r=e.height(),l=this.$element.outerHeight(),d=this.$element.outerWidth(),h=this.$element.find("."+n+"-content")[0].scrollHeight,c=h+this.headerHeight,u=this.$element.innerHeight()-this.headerHeight,p=(parseInt(-(this.$element.innerHeight()+1)/2),this.$wrap.scrollTop()),m=0;s()&&(d>=e.width()||!0===this.isFullscreen?this.$element.css({left:"0",marginLeft:""}):this.$element.css({left:"50%",marginLeft:-d/2})),!0===this.options.borderBottom&&""!==this.options.title&&(m=3),this.$element.find("."+n+"-header").length&&this.$element.find("."+n+"-header").is(":visible")?(this.headerHeight=parseInt(this.$element.find("."+n+"-header").innerHeight()),this.$element.css("overflow","hidden")):(this.headerHeight=0,this.$element.css("overflow","")),this.$element.find("."+n+"-loader").length&&this.$element.find("."+n+"-loader").css("top",this.headerHeight),l!==this.modalHeight&&(this.modalHeight=l,this.options.onResize&&"function"==typeof this.options.onResize&&this.options.onResize(this)),this.state!=o.OPENED&&this.state!=o.OPENING||(!0===this.options.iframe&&(r=e.width()?this.$element.find("."+n+"-button-fullscreen").hide():this.$element.find("."+n+"-button-fullscreen").show(),this.recalcButtons(),!1===this.isFullscreen&&(r=r-(a(this.options.top)||0)-(a(this.options.bottom)||0)),c>r?(this.options.top>0&&null===this.options.bottom&&h0&&null===this.options.top&&hu&&c>r?(i.$element.addClass("hasScroll"),i.$wrap.css("height",l-(i.headerHeight+m))):(i.$element.removeClass("hasScroll"),i.$wrap.css("height","auto")),u+p1){try{o.$el=document.createElement(id[0])}catch(t){}o.$el.id=this.selector.split("#")[1].trim()}else if(o.class.length>1){try{o.$el=document.createElement(o.class[0])}catch(t){}for(var s=1;s
').css("background-color",n.overlayColor),this.$navigate=d('
Use
'),this.group={name:this.$element.attr("data-"+c+"-group"),index:null,ids:[]},this.$element.attr("aria-hidden","true"),this.$element.attr("aria-labelledby",this.id),this.$element.attr("role","dialog"),this.$element.hasClass("iziModal")||this.$element.addClass("iziModal"),void 0===this.group.name&&""!==n.group&&(this.group.name=n.group,this.$element.attr("data-"+c+"-group",n.group)),!0===this.options.loop&&this.$element.attr("data-"+c+"-loop",!0),d.each(this.options,function(t,e){var i=o.$element.attr("data-"+c+"-"+t);try{void 0!==i&&(n[t]=""===i||"true"==i||"false"!=i&&("function"==typeof e?new Function(i):i))}catch(t){}}),!1!==n.appendTo&&this.$element.appendTo(n.appendTo),!0===n.iframe?(this.$element.html('
'+this.content+"
"),null!==n.iframeHeight&&this.$element.find("."+c+"-iframe").css("height",n.iframeHeight)):this.$element.html('
'+this.content+"
"),null!==this.options.background&&this.$element.css("background",this.options.background),this.$wrap=this.$element.find("."+c+"-wrap"),null===n.zindex||isNaN(parseInt(n.zindex))||(this.$element.css("z-index",n.zindex),this.$navigate.css("z-index",n.zindex-1),this.$overlay.css("z-index",n.zindex-2)),""!==n.radius&&this.$element.css("border-radius",n.radius),""!==n.padding&&this.$element.find("."+c+"-content").css("padding",n.padding),""!==n.theme&&("light"===n.theme?this.$element.addClass(c+"-light"):this.$element.addClass(n.theme)),!0===n.rtl&&this.$element.addClass(c+"-rtl"),!0===n.openFullscreen&&(this.isFullscreen=!0,this.$element.addClass("isFullscreen")),this.createHeader(),this.recalcWidth(),this.recalcVerticalPos(),!o.options.afterRender||"function"!=typeof o.options.afterRender&&"object"!=typeof o.options.afterRender||o.options.afterRender(o)},createHeader:function(){this.$header=d('

'),!0===this.options.closeButton&&this.$header.find("."+c+"-header-buttons").append('"),!0===this.options.fullscreen&&this.$header.find("."+c+"-header-buttons").append('"),!0===this.options.timeoutProgressbar&&this.$header.prepend(d('
').append(d("
").css("background-color",this.options.timeoutProgressbarColor))),""===this.options.subtitle?this.$header.addClass(c+"-noSubtitle"):this.$header.find("."+c+"-header-subtitle").html(this.options.subtitle),""!==this.options.title&&(this.$header.find("."+c+"-header-title").html(this.options.title),null!==this.options.headerColor&&(!0===this.options.borderBottom&&this.$element.css("border-bottom","3px solid "+this.options.headerColor),this.$header.css("background",this.options.headerColor)),null===this.options.icon&&null===this.options.iconText||(this.$header.prepend(''),null!==this.options.icon&&this.$header.find("."+c+"-header-icon").addClass(this.options.icon).css("color",this.options.iconColor),null!==this.options.iconText&&this.$header.find("."+c+"-header-icon").html(this.options.iconText)),this.$element.css("overflow","hidden").prepend(this.$header))},setGroup:function(t){var i,n=this,e=this.group.name||t;this.group.ids=[],void 0!==t&&t!==this.group.name&&(e=t,this.group.name=e,this.$element.attr("data-"+c+"-group",e)),void 0!==e&&""!==e&&(i=0,d.each(d("."+c+"[data-"+c+"-group="+e+"]"),function(t,e){n.group.ids.push(d(this)[0].id),n.id==d(this)[0].id&&(n.group.index=i),i++}))},toggle:function(){this.state==m&&this.close(),this.state==u&&this.open()},startProgress:function(t){var e=this;this.isPaused=!1,clearTimeout(this.timerTimeout),!0===this.options.timeoutProgressbar?(this.progressBar={hideEta:null,maxHideTime:null,currentTime:(new Date).getTime(),el:this.$element.find("."+c+"-progressbar > div"),updateProgress:function(){var t;e.isPaused||(e.progressBar.currentTime=e.progressBar.currentTime+10,t=(e.progressBar.hideEta-e.progressBar.currentTime)/e.progressBar.maxHideTime*100,e.progressBar.el.width(t+"%"),t<0&&e.close())}},0 div").width("100%")},open:function(i){var t,e,n,o,s=this;try{void 0!==i&&!1===i.preventClose&&d.each(d("."+c),function(t,e){var i;void 0!==d(e).data().iziModal&&("opened"!=(i=d(e).iziModal("getState"))&&"opening"!=i||d(e).iziModal("close"))})}catch(t){}function a(){s.state=m,s.$element.trigger(m),!s.options.onOpened||"function"!=typeof s.options.onOpened&&"object"!=typeof s.options.onOpened||s.options.onOpened(s)}if(s.options.history?(t=document.title,document.title=t+" - "+s.options.title,e="#"+s.id,n=e.replace(/^.*#/,""),(o=d(e)).attr("id",n+"-tmp"),window.location.hash=e,o.attr("id",n),document.title=t,window.$iziModal.history=!0):window.$iziModal.history=!1,this.state==u){if(s.$element.off("click","[data-"+c+"-close]").on("click","[data-"+c+"-close]",function(t){t.preventDefault();t=d(t.currentTarget).attr("data-"+c+"-transitionOut");void 0!==t?s.close({transition:t}):s.close()}),s.$element.off("click","[data-"+c+"-fullscreen]").on("click","[data-"+c+"-fullscreen]",function(t){t.preventDefault(),!0===s.isFullscreen?(s.isFullscreen=!1,s.$element.removeClass("isFullscreen")):(s.isFullscreen=!0,s.$element.addClass("isFullscreen")),s.options.onFullscreen&&"function"==typeof s.options.onFullscreen&&s.options.onFullscreen(s),s.$element.trigger("fullscreen",s)}),s.$navigate.off("click","."+c+"-navigate-next").on("click","."+c+"-navigate-next",function(t){s.next(t)}),s.$element.off("click","[data-"+c+"-next]").on("click","[data-"+c+"-next]",function(t){s.next(t)}),s.$navigate.off("click","."+c+"-navigate-prev").on("click","."+c+"-navigate-prev",function(t){s.prev(t)}),s.$element.off("click","[data-"+c+"-prev]").on("click","[data-"+c+"-prev]",function(t){s.prev(t)}),this.setGroup(),this.state=p,this.$element.trigger(p),this.$element.attr("aria-hidden","false"),!0===this.options.timeoutProgressbar&&this.$element.find("."+c+"-progressbar > div").width("100%"),!0===this.options.iframe){this.$element.find("."+c+"-content").addClass(c+"-content-loader"),this.$element.find("."+c+"-iframe").on("load",function(){d(this).parent().removeClass(c+"-content-loader")});var r=null;try{r=""!==d(i.currentTarget).attr("href")?d(i.currentTarget).attr("href"):null}catch(t){}if(null!==this.options.iframeURL&&null==r&&(r=this.options.iframeURL),null==r)throw new Error("Failed to find iframe URL");this.$element.find("."+c+"-iframe").attr("src",r)}(this.options.bodyOverflow||$)&&(d("html").addClass(c+"-isOverflow"),$&&d("body").css("overflow","hidden")),this.options.onOpening&&"function"==typeof this.options.onOpening&&this.options.onOpening(this),function(){var t;1'),this.$header.find("."+c+"-header-title").html(t)},setSubtitle:function(t){""===t?(this.$header.find("."+c+"-header-subtitle").remove(),this.$header.addClass(c+"-noSubtitle")):(0===this.$header.find("."+c+"-header-subtitle").length&&this.$header.append('

'),this.$header.removeClass(c+"-noSubtitle")),this.$header.find("."+c+"-header-subtitle").html(t),this.options.subtitle=t},setIcon:function(t){0===this.$header.find("."+c+"-header-icon").length&&this.$header.prepend(''),this.$header.find("."+c+"-header-icon").attr("class",c+"-header-icon "+t),this.options.icon=t},setIconText:function(t){this.$header.find("."+c+"-header-icon").html(t),this.options.iconText=t},setHeaderColor:function(t){!0===this.options.borderBottom&&this.$element.css("border-bottom","3px solid "+t),this.$header.css("background",t),this.options.headerColor=t},setBackground:function(t){!1===t?(this.options.background=null,this.$element.css("background","")):(this.$element.css("background",t),this.options.background=t)},setZindex:function(t){isNaN(parseInt(this.options.zindex))||(this.options.zindex=t,this.$element.css("z-index",t),this.$navigate.css("z-index",t-1),this.$overlay.css("z-index",t-2))},setFullscreen:function(t){t?(this.isFullscreen=!0,this.$element.addClass("isFullscreen")):(this.isFullscreen=!1,this.$element.removeClass("isFullscreen"))},setContent:function(t){"object"==typeof t&&(!0===(t.default||!1)&&(this.content=t.content),t=t.content),!1===this.options.iframe&&this.$element.find("."+c+"-content").html(t)},setTransitionIn:function(t){this.options.transitionIn=t},setTransitionOut:function(t){this.options.transitionOut=t},setTimeout:function(t){this.options.timeout=t},resetContent:function(){this.$element.find("."+c+"-content").html(this.content)},startLoading:function(){this.$element.find("."+c+"-loader").length||this.$element.append('
'),this.$element.find("."+c+"-loader").css({top:this.headerHeight,borderRadius:this.options.radius})},stopLoading:function(){var t=this.$element.find("."+c+"-loader");t.length||(this.$element.prepend('
'),t=this.$element.find("."+c+"-loader").css("border-radius",this.options.radius)),t.removeClass("fadeIn").addClass("fadeOut"),setTimeout(function(){t.remove()},600)},recalcWidth:function(){var t;this.$element.css("max-width",this.options.width),f()&&(1<(t=this.options.width).toString().split("%").length&&(t=this.$element.outerWidth()),this.$element.css({left:"50%",marginLeft:-t/2}))},recalcVerticalPos:function(t){null!==this.options.top&&!1!==this.options.top?(this.$element.css("margin-top",this.options.top),0===this.options.top&&this.$element.css({borderTopRightRadius:0,borderTopLeftRadius:0})):!1===t&&this.$element.css({marginTop:"",borderRadius:this.options.radius}),null!==this.options.bottom&&!1!==this.options.bottom?(this.$element.css("margin-bottom",this.options.bottom),0===this.options.bottom&&this.$element.css({borderBottomRightRadius:0,borderBottomLeftRadius:0})):!1===t&&this.$element.css({marginBottom:"",borderRadius:this.options.radius})},recalcLayout:function(){var t=this,e=h.height(),i=this.$element.outerHeight(),n=this.$element.outerWidth(),o=this.$element.find("."+c+"-content")[0].scrollHeight,s=o+this.headerHeight,a=this.$element.innerHeight()-this.headerHeight,r=(parseInt(-(this.$element.innerHeight()+1)/2),this.$wrap.scrollTop()),l=0;f()&&(n>=h.width()||!0===this.isFullscreen?this.$element.css({left:"0",marginLeft:""}):this.$element.css({left:"50%",marginLeft:-n/2})),!0===this.options.borderBottom&&""!==this.options.title&&(l=3),this.$element.find("."+c+"-header").length&&this.$element.find("."+c+"-header").is(":visible")?(this.headerHeight=parseInt(this.$element.find("."+c+"-header").innerHeight()),this.$element.css("overflow","hidden")):(this.headerHeight=0,this.$element.css("overflow","")),this.$element.find("."+c+"-loader").length&&this.$element.find("."+c+"-loader").css("top",this.headerHeight),i!==this.modalHeight&&(this.modalHeight=i,this.options.onResize&&"function"==typeof this.options.onResize&&this.options.onResize(this)),this.state!=m&&this.state!=p||(!0===this.options.iframe&&(e=h.width()?this.$element.find("."+c+"-button-fullscreen").hide():this.$element.find("."+c+"-button-fullscreen").show(),this.recalcButtons(),!1===this.isFullscreen&&(e=e-(g(this.options.top)||0)-(g(this.options.bottom)||0)),e