"use strict";jse.libs.theme.modal=jse.libs.theme.modal||{},jse.libs.theme.modal.magnific=jse.libs.theme.modal.magnific||{},function(e){var n=$(document),o=($("body"),function(e,n){return["items",{src:n,type:"inline"}]}),t=function(e,o,t){t(e=e.closest(".mfp-wrap")).always((function(e){n.off("keyup.magnific"),o.reject(e),$.magnificPopup.close()}))},i=function(e,o,t){t(e=e.closest(".mfp-wrap"),!0).done((function(e){n.off("keyup.magnific"),o.resolve(e),$.magnificPopup.close()}))};e.openLayer=function(e,o,l,c){var s=null,a=null,f=null,m=null,u=o.promise(),r=null,d=$.extend({},{preloader:!1},e),p=parseInt(1e5*Math.random());return $.each(d.buttons,(function(e,n){d.showButtons=!0,n.index=e,n.uid=p})),d.items.src=Mustache.render($("#magnific_wrapper").html(),d),$.magnificPopup.open(d),(r=$.magnificPopup.instance).prev=function(){return r.content.find(".swiper-button-prev:first").click()},r.next=function(){return r.content.find(".swiper-button-next:first").click()},s=$(r.wrap),a=$(r.bgOverlay),f=s.find(".modal-footer button"),m=s.find("button.mfp-close"),s.off("click.mfp"),a.off("click.mfp"),n.off("keyup.mfp"),f.each((function(){var n=$(this),o=n.data();"number"==typeof o.index&&n.on("click",e.buttons[o.index].event)})),m.off("click").on("click",(function(e){e.stopPropagation(),t(s,o,l)})),e.closeOnBgClick&&s.off("click").on("click",(function(e){$(e.target).closest(".modal-dialog").length||t(s,o,l)})),e.enableEscapeKey&&n.on("keyup.magnific",(function(e){27===e.keyCode&&t(s,o,l)})),o.close=function(e){e?i(s,o,l):t(s,o,l)},d.executeCode&&"function"==typeof d.executeCode&&d.executeCode.call(s),void 0!==c.bootstrapClass&&s.find(".modal-dialog").addClass(c.bootstrapClass),void 0!==c.zIndex&&s.css("z-index",c.zIndex),jse.libs.theme.modal.finalizeLayer(s,c),u},e.getMapper=function(){return{dialogClass:"mainClass",modal:!1,closeOnEscape:"enableEscapeKey",closeOnOuter:"closeOnBgClick",closeX:"showCloseBtn",storeTheme:!1,theme:o}},e.getResolveHandler=i,e.getRejectHandler=t}(jse.libs.theme.modal.magnific),jse.libs.template.modal=jse.libs.template.modal||{},jse.libs.template.modal.magnific=jse.libs.theme.modal.magnific;