"use strict";
/*! Magnific Popup - v1.1.0 - 2016-02-20
 * http://dimsemenov.com/plugins/magnific-popup/
 * Copyright (c) 2016 Dmitry Semenov; */(()=>{const e=e=>{const t="Close",o="BeforeClose",i="MarkupParse",s="Open",a="Change",r="mfp",n=".mfp",l="mfp-ready",c="mfp-removing",d="mfp-prevent-close";let p;class m{constructor(){}init(){const{appVersion:t}=navigator;p.isLowIE=p.isIE8=document.all&&!document.addEventListener,p.isAndroid=/android/gi.test(t),p.isIOS=/iphone|ipad|ipod/gi.test(t),p.supportsTransition=T(),p.probablyMobile=p.isAndroid||p.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),h=e(document),p.popupsCache={}}open(t){let o;if(!1===t.isObj){p.items=t.items.toArray(),p.index=0;const{items:e}=t;let i;for(o=0;o<e.length;o++)if(i=e[o],i.parsed&&(i=i.el[0]),i===t.el[0]){p.index=o;break}}else p.items=Array.isArray(t.items)?t.items:[t.items],p.index=t.index||0;if(p.isOpen)return void p.updateItemHTML();p.types=[],C="",p.ev=t.mainEl?.length?t.mainEl.eq(0):h,t.key?(p.popupsCache[t.key]||(p.popupsCache[t.key]={}),p.currTemplate=p.popupsCache[t.key]):p.currTemplate={},p.st=e.extend(!0,{},e.magnificPopup.defaults,t),p.fixedContentPos="auto"===p.st.fixedContentPos?!p.probablyMobile:p.st.fixedContentPos,p.st.modal&&(p.st.closeOnContentClick=!1,p.st.closeOnBgClick=!1,p.st.showCloseBtn=!1,p.st.enableEscapeKey=!1),p.bgOverlay||(p.bgOverlay=b("bg").on("click.mfp",(()=>{p.close()})),p.wrap=b("wrap").attr("tabindex",-1).on("click.mfp",(e=>{p._checkIfClose(e.target)&&p.close()})),p.container=b("container",p.wrap)),p.contentContainer=b("content"),p.st.preloader&&(p.preloader=b("preloader",p.container,p.st.tLoading));const{modules:a}=e.magnificPopup;for(o=0;o<a.length;o++){let e=a[o];e=e.charAt(0).toUpperCase()+e.slice(1),p[`init${e}`].call(p)}I("BeforeOpen"),p.st.showCloseBtn&&(p.st.closeBtnInside?(w(i,((e,t,o,i)=>{o.close_replaceWith=x(i.type)})),C+=" mfp-close-btn-in"):p.wrap.append(x())),p.st.alignTop&&(C+=" mfp-align-top"),p.fixedContentPos?p.wrap.css({overflow:p.st.overflowY,overflowX:"hidden",overflowY:p.st.overflowY}):p.wrap.css({top:g.scrollTop(),position:"absolute"}),(!1===p.st.fixedBgPos||"auto"===p.st.fixedBgPos&&!p.fixedContentPos)&&p.bgOverlay.css({height:h.height(),position:"absolute"}),p.st.enableEscapeKey&&h.on("keyup.mfp",(e=>{27===e.keyCode&&p.close()})),g.on("resize.mfp",(()=>{p.updateSize()})),p.st.closeOnContentClick||(C+=" mfp-auto-cursor"),C&&p.wrap.addClass(C);const r=p.wH=g.height(),n={};if(p.fixedContentPos&&p._hasScrollBar(r)){const e=p._getScrollbarSize();e&&(n.marginRight=e)}p.fixedContentPos&&(p.isIE7?e("body, html").css("overflow","hidden"):n.overflow="hidden");let c=p.st.mainClass;return p.isIE7&&(c+=" mfp-ie7"),c&&p._addClassToMFP(c),p.updateItemHTML(),I("BuildControls"),e("html").css(n),p.bgOverlay.add(p.wrap).prependTo(p.st.prependTo||e(document.body)),p._lastFocusedEl=document.activeElement,setTimeout((()=>{p.content?(p._addClassToMFP(l),p._setFocus()):p.bgOverlay.addClass(l),h.on("focusin.mfp",p._onFocusIn)}),16),p.isOpen=!0,p.updateSize(r),I(s),t}close(){p.isOpen&&(I(o),p.isOpen=!1,p.st.removalDelay&&!p.isLowIE&&p.supportsTransition?(p._addClassToMFP(c),setTimeout((()=>{p._close()}),p.st.removalDelay)):p._close())}_close(){I(t);let o="mfp-removing mfp-ready ";if(p.bgOverlay.detach(),p.wrap.detach(),p.container.empty(),p.st.mainClass&&(o+=`${p.st.mainClass} `),p._removeClassFromMFP(o),p.fixedContentPos){const t={marginRight:""};p.isIE7?e("body, html").css("overflow",""):t.overflow="",e("html").css(t)}h.off("keyup.mfp focusin.mfp"),p.ev.off(n),p.wrap.attr("class","mfp-wrap").removeAttr("style"),p.bgOverlay.attr("class","mfp-bg"),p.container.attr("class","mfp-container"),!p.st.showCloseBtn||p.st.closeBtnInside&&!0!==p.currTemplate[p.currItem.type]||!p.currTemplate.closeBtn||p.currTemplate.closeBtn.detach(),p.st.autoFocusLast&&p._lastFocusedEl&&e(p._lastFocusedEl).trigger("focus"),p.currItem=null,p.content=null,p.currTemplate=null,p.prevHeight=0,I("AfterClose")}updateSize(e){if(p.isIOS){const e=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*e;p.wrap.css("height",t),p.wH=t}else p.wH=e||g.height();p.fixedContentPos||p.wrap.css("height",p.wH),I("Resize")}updateItemHTML(){let t=p.items[p.index];p.contentContainer.detach(),p.content&&p.content.detach(),t.parsed||(t=p.parseEl(p.index));const{type:o}=t;if(I("BeforeChange",[p.currItem?p.currItem.type:"",o]),p.currItem=t,!p.currTemplate[o]){const t=!!p.st[o]&&p.st[o].markup;I("FirstMarkupParse",t),p.currTemplate[o]=!t||e(t)}y&&y!==t.type&&p.container.removeClass(`mfp-${y}-holder`);const i=p[`get${o.charAt(0).toUpperCase()}${o.slice(1)}`](t,p.currTemplate[o]);p.appendContent(i,o),t.preloaded=!0,I(a,t),y=t.type,p.container.prepend(p.contentContainer),I("AfterChange")}appendContent(e,t){p.content=e,e?p.st.showCloseBtn&&p.st.closeBtnInside&&!0===p.currTemplate[t]?p.content.find(".mfp-close").length||p.content.append(x()):p.content=e:p.content="",I("BeforeAppend"),p.container.addClass(`mfp-${t}-holder`),p.contentContainer.append(p.content)}parseEl(t){let o,i=p.items[t];if(i.tagName?i={el:e(i)}:(o=i.type,i={data:i,src:i.src}),i.el){const{types:e}=p;for(const t of e)if(i.el.hasClass(`mfp-${t}`)){o=t;break}i.src=i.el.attr("data-mfp-src"),i.src||(i.src=i.el.attr("href"))}return i.type=o||p.st.type||"inline",i.index=t,i.parsed=!0,p.items[t]=i,I("ElementParse",i),p.items[t]}addGroup(e,t){const o=function(o){o.mfpEl=this,p._openClick(o,e,t)};t||(t={});const i="click.magnificPopup";t.mainEl=e,t.items?(t.isObj=!0,e.off(i).on(i,o)):(t.isObj=!1,t.delegate?e.off(i).on(i,t.delegate,o):(t.items=e,e.off(i).on(i,o)))}_openClick(t,o,i){if(!(void 0!==i.midClick?i.midClick:e.magnificPopup.defaults.midClick)&&(2===t.which||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey))return;const s=void 0!==i.disableOn?i.disableOn:e.magnificPopup.defaults.disableOn;if(s)if("function"==typeof s){if(!s.call(p))return!0}else if(g.width()<s)return!0;t.type&&(t.preventDefault(),p.isOpen&&t.stopPropagation()),i.el=e(t.mfpEl),i.delegate&&(i.items=o.find(i.delegate)),p.open(i)}updateStatus(e,t){if(p.preloader){f!==e&&p.container.removeClass(`mfp-s-${f}`),t||"loading"!==e||(t=p.st.tLoading);const o={status:e,text:t};I("UpdateStatus",o),e=o.status,t=o.text,p.preloader.html(t),p.preloader.find("a").on("click",(e=>{e.stopImmediatePropagation()})),p.container.addClass(`mfp-s-${e}`),f=e}}_checkIfClose(t){if(e(t).hasClass(d))return;const o=p.st.closeOnContentClick,i=p.st.closeOnBgClick;if(o&&i)return!0;if(!p.content||e(t).hasClass("mfp-close")||p.preloader&&t===p.preloader[0])return!0;if(t===p.content[0]||e.contains(p.content[0],t)){if(o)return!0}else if(i&&e.contains(document,t))return!0;return!1}_addClassToMFP(e){p.bgOverlay.addClass(e),p.wrap.addClass(e)}_removeClassFromMFP(e){this.bgOverlay.removeClass(e),p.wrap.removeClass(e)}_hasScrollBar(e){return(p.isIE7?h.height():document.body.scrollHeight)>(e||g.height())}_setFocus(){(p.st.focus?p.content.find(p.st.focus).eq(0):p.wrap).trigger("focus")}_onFocusIn(t){if(t.target!==p.wrap[0]&&!e.contains(p.wrap[0],t.target))return p._setFocus(),!1}_parseMarkup(t,o,s){let a;s.data&&(o=e.extend(s.data,o)),I(i,[t,o,s]),e.each(o,((o,i)=>{if(void 0===i||!1===i)return!0;if(a=o.split("_"),a.length>1){const o=t.find(`.mfp-${a[0]}`);if(o.length>0){const t=a[1];"replaceWith"===t?o[0]!==i[0]&&o.replaceWith(i):"img"===t?o.is("img")?o.attr("src",i):o.replaceWith(e("<img>").attr("src",i).attr("class",o.attr("class"))):o.attr(a[1],i)}}else t.find(`.mfp-${o}`).html(i)}))}_getScrollbarSize(){if(void 0===p.scrollbarSize){const e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),p.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return p.scrollbarSize}}const u=!!window.jQuery;let f;const g=e(window);let h,y,C,v;const w=(e,t)=>{p.ev.on(r+e+n,t)},b=(t,o,i,s)=>{let a=document.createElement("div");return a.className=`mfp-${t}`,i&&(a.innerHTML=i),s?o&&o.appendChild(a):(a=e(a),o&&a.appendTo(o)),a},I=(e,t)=>{p.ev.triggerHandler(r+e,t),p.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),p.st.callbacks[e]&&p.st.callbacks[e].apply(p,Array.isArray(t)?t:[t]))},x=t=>(t===v&&p.currTemplate.closeBtn||(p.currTemplate.closeBtn=e(p.st.closeMarkup.replace("%title%",p.st.tClose)),v=t),p.currTemplate.closeBtn),k=()=>{e.magnificPopup.instance||(p=new m,p.init(),e.magnificPopup.instance=p)},T=()=>{const e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(`${t.pop()}Transition`in e)return!0;return!1};e.magnificPopup={instance:null,proto:m.prototype,modules:[],open(t,o){return k(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=o||0,this.instance.open(t)},close:()=>e.magnificPopup.instance?.close(),registerModule(t,o){o.options&&(e.magnificPopup.defaults[t]=o.options),e.extend(this.proto,o.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(t){k();const o=e(this);if("string"==typeof t)if("open"===t){let e;const t=u?o.data("magnificPopup"):o[0].magnificPopup,i=parseInt(arguments[1],10)||0;t.items?e=t.items[i]:(e=o,t.delegate&&(e=e.find(t.delegate)),e=e.eq(i)),p._openClick({mfpEl:e},o,t)}else p.isOpen&&p[t].apply(p,Array.prototype.slice.call(arguments,1));else t=e.extend(!0,{},t),u?o.data("magnificPopup",t):o[0].magnificPopup=t,p.addGroup(o,t);return o};const _="inline";let S,P,z;const E=()=>{z&&(P.after(z.addClass(S)).detach(),z=null)};e.magnificPopup.registerModule(_,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline(){p.types.push(_),w("Close.inline",(()=>{E()}))},getInline(t,o){if(E(),t.src){const o=p.st.inline;let i=e(t.src);if(i.length){i[0].parentNode?.tagName&&(P||(S=o.hiddenClass,P=b(S),S=`mfp-${S}`),z=i.after(P).detach().removeClass(S)),p.updateStatus("ready")}else p.updateStatus("error",o.tNotFound),i=e("<div>");return t.inlineElement=i,i}return p.updateStatus("ready"),p._parseMarkup(o,{},t),o}}});const O="ajax";let M;const B=()=>{M&&e(document.body).removeClass(M)},$=()=>{B(),p.req&&p.req.abort()};let A;e.magnificPopup.registerModule(O,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax(){p.types.push(O),M=p.st.ajax.cursor,w("Close.ajax",$),w("BeforeChange.ajax",$)},getAjax(t){M&&e(document.body).addClass(M),p.updateStatus("loading");const o=e.extend({url:t.src,success(o,i,s){const a={data:o,xhr:s};I("ParseAjax",a),p.appendContent(e(a.data),O),t.finished=!0,B(),p._setFocus(),setTimeout((()=>{p.wrap.addClass(l)}),16),p.updateStatus("ready"),I("AjaxContentAdded")},error(){B(),t.finished=t.loadError=!0,p.updateStatus("error",p.st.ajax.tError.replace("%url%",t.src))}},p.st.ajax.settings);return p.req=e.ajax(o),""}}});const L=e=>{if(e.data&&void 0!==e.data.title)return e.data.title;const t=p.st.image.titleSrc;if(t){if("function"==typeof t)return t.call(p,e);if(e.el)return e.el.attr(t)||""}return""};let H;e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage(){const t=p.st.image,o=".image";p.types.push("image"),w("Open.image",(()=>{"image"===p.currItem.type&&t.cursor&&e(document.body).addClass(t.cursor)})),w("Close.image",(()=>{t.cursor&&e(document.body).removeClass(t.cursor),g.off("resize.mfp")})),w(`Resize${o}`,p.resizeImage),p.isLowIE&&w("AfterChange",p.resizeImage)},resizeImage(){const e=p.currItem;if(e&&e.img&&p.st.image.verticalFit){let t=0;p.isLowIE&&(t=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",p.wH-t)}},_onImageHasSize(e){e.img&&(e.hasSize=!0,A&&clearInterval(A),e.isCheckingImgSize=!1,I("ImageHasSize",e),e.imgHidden&&(p.content&&p.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize(e){let t=0;const o=e.img[0];var i=s=>{A&&clearInterval(A),A=setInterval((()=>{o.naturalWidth>0?p._onImageHasSize(e):(t>200&&clearInterval(A),t++,3===t?i(10):40===t?i(50):100===t&&i(500))}),s)};i(1)},getImage(t,o){let i=0;var s=()=>{t&&(t.img[0].complete?(t.img.off(".mfploader"),t===p.currItem&&(p._onImageHasSize(t),p.updateStatus("ready")),t.hasSize=!0,t.loaded=!0,I("ImageLoadComplete")):(i++,i<200?setTimeout(s,100):a()))},a=()=>{t&&(t.img.off(".mfploader"),t===p.currItem&&(p._onImageHasSize(t),p.updateStatus("error",r.tError.replace("%url%",t.src))),t.hasSize=!0,t.loaded=!0,t.loadError=!0)},r=p.st.image;const n=o.find(".mfp-img");if(n.length){let o=document.createElement("img");o.className="mfp-img",t.el&&t.el.find("img").length&&(o.alt=t.el.find("img").attr("alt")),t.img=e(o).on("load.mfploader",s).on("error.mfploader",a),o.src=t.src,n.is("img")&&(t.img=t.img.clone()),o=t.img[0],o.naturalWidth>0?t.hasSize=!0:o.width||(t.hasSize=!1)}return p._parseMarkup(o,{title:L(t),img_replaceWith:t.img},t),p.resizeImage(),t.hasSize?(A&&clearInterval(A),t.loadError?(o.addClass("mfp-loading"),p.updateStatus("error",r.tError.replace("%url%",t.src))):(o.removeClass("mfp-loading"),p.updateStatus("ready")),o):(p.updateStatus("loading"),t.loading=!0,t.hasSize||(t.imgHidden=!0,o.addClass("mfp-loading"),p.findImageSize(t)),o)}}});e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:e=>e.is("img")?e:e.find("img")},proto:{initZoom(){const e=p.st.zoom;let t;if(!e.enabled||!p.supportsTransition)return;const{duration:o}=e,i=t=>{const o=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i=`all ${e.duration/1e3}s ${e.easing}`,s={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return s[`-webkit-${a}`]=s[`-moz-${a}`]=s[`-o-${a}`]=s[a]=i,o.css(s),o},s=()=>{p.content.css("visibility","visible")};let a,r;w("BuildControls.zoom",(()=>{if(p._allowZoom()){if(clearTimeout(a),p.content.css("visibility","hidden"),t=p._getItemToZoom(),!t)return void s();r=i(t),r.css(p._getOffset()),p.wrap.append(r),a=setTimeout((()=>{r.css(p._getOffset(!0)),a=setTimeout((()=>{s(),setTimeout((()=>{r.remove(),t=r=null,I("ZoomAnimationEnded")}),16)}),o)}),16)}})),w("BeforeClose.zoom",(()=>{if(p._allowZoom()){if(clearTimeout(a),p.st.removalDelay=o,!t){if(t=p._getItemToZoom(),!t)return;r=i(t)}r.css(p._getOffset(!0)),p.wrap.append(r),p.content.css("visibility","hidden"),setTimeout((()=>{r.css(p._getOffset())}),16)}})),w("Close.zoom",(()=>{p._allowZoom()&&(s(),r&&r.remove(),t=null)}))},_allowZoom:()=>"image"===p.currItem.type,_getItemToZoom:()=>!!p.currItem.hasSize&&p.currItem.img,_getOffset(t){const o=t?p.currItem.img:p.st.zoom.opener(p.currItem.el||p.currItem),i=o.offset(),s=parseInt(o.css("padding-top"),10),a=parseInt(o.css("padding-bottom"),10);i.top-=e(window).scrollTop()-s;const r={width:o.width(),height:(u?o.innerHeight():o[0].offsetHeight)-a-s};return void 0===H&&(H=void 0!==document.createElement("p").style.MozTransform),H?r["-moz-transform"]=r.transform=`translate(${i.left}px,${i.top}px)`:(r.left=i.left,r.top=i.top),r}}});const F="iframe",j=e=>{if(p.currTemplate.iframe){const t=p.currTemplate.iframe.find("iframe");t.length&&(e||(t[0].src="//about:blank"),p.isIE8&&t.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(F,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe(){p.types.push(F),w("BeforeChange",((e,t,o)=>{t!==o&&(t===F?j():o===F&&j(!0))})),w("Close.iframe",(()=>{j()}))},getIframe(t,o){let i=t.src;const s=p.st.iframe;e.each(s.patterns,(function(){if(i.includes(this.index))return this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1}));const a={};return s.srcAction&&(a[s.srcAction]=i),p._parseMarkup(o,a,t),p.updateStatus("ready"),o}}});const N=e=>{const t=p.items.length;return e>t-1?e-t:e<0?t+e:e},W=(e,t,o)=>e.replace(/%curr%/gi,t+1).replace(/%total%/gi,o);e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery(){const o=p.st.gallery,r=".mfp-gallery";if(p.direction=!0,!o||!o.enabled)return!1;C+=" mfp-gallery",w(s+r,(()=>{o.navigateByImgClick&&p.wrap.on(`click${r}`,".mfp-img",(()=>{if(p.items.length>1)return p.next(),!1})),h.on(`keydown${r}`,(e=>{37===e.keyCode?p.prev():39===e.keyCode&&p.next()}))})),w(`UpdateStatus${r}`,((e,t)=>{t.text&&(t.text=W(t.text,p.currItem.index,p.items.length))})),w(i+r,((e,t,i,s)=>{const a=p.items.length;i.counter=a>1?W(o.tCounter,s.index,a):""})),w(`BuildControls${r}`,(()=>{if(p.items.length>1&&o.arrows&&!p.arrowLeft){const t=o.arrowMarkup,i=p.arrowLeft=e(t.replace(/%title%/gi,o.tPrev).replace(/%dir%/gi,"left")).addClass(d),s=p.arrowRight=e(t.replace(/%title%/gi,o.tNext).replace(/%dir%/gi,"right")).addClass(d);i.click((()=>{p.prev()})),s.click((()=>{p.next()})),p.container.append(i.add(s))}})),w(a+r,(()=>{p._preloadTimeout&&clearTimeout(p._preloadTimeout),p._preloadTimeout=setTimeout((()=>{p.preloadNearbyImages(),p._preloadTimeout=null}),16)})),w(t+r,(()=>{h.off(r),p.wrap.off(`click${r}`),p.arrowRight=p.arrowLeft=null}))},next(){p.direction=!0,p.index=N(p.index+1),p.updateItemHTML()},prev(){p.direction=!1,p.index=N(p.index-1),p.updateItemHTML()},goTo(e){p.direction=e>=p.index,p.index=e,p.updateItemHTML()},preloadNearbyImages(){const e=p.st.gallery.preload,t=Math.min(e[0],p.items.length),o=Math.min(e[1],p.items.length);let i;for(i=1;i<=(p.direction?o:t);i++)p._preloadItem(p.index+i);for(i=1;i<=(p.direction?t:o);i++)p._preloadItem(p.index-i)},_preloadItem(t){if(t=N(t),p.items[t].preloaded)return;let o=p.items[t];o.parsed||(o=p.parseEl(t)),I("LazyLoad",o),"image"===o.type&&(o.img=e('<img class="mfp-img" />').on("load.mfploader",(()=>{o.hasSize=!0})).on("error.mfploader",(()=>{o.hasSize=!0,o.loadError=!0,I("LazyLoadError",o)})).attr("src",o.src)),o.preloaded=!0}}});const Z="retina";e.magnificPopup.registerModule(Z,{options:{replaceSrc:e=>e.src.replace(/\.\w+$/,(e=>`@2x${e}`)),ratio:1},proto:{initRetina(){if(window.devicePixelRatio>1){const e=p.st.retina;let{ratio:t}=e;t=isNaN(t)?t():t,t>1&&(w("ImageHasSize.retina",((e,o)=>{o.img.css({"max-width":o.img[0].naturalWidth/t,width:"100%"})})),w("ElementParse.retina",((o,i)=>{i.src=e.replaceSrc(i,t)})))}}}}),k()};"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)})();
