/*! PhotoSwipe - v4.1.3 - 2019-01-08 * http://photoswipe.com * Copyright (c) 2019 Dmitry Semenov; */ !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(p,i,e,t){var f={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a=Gt()-1&&i<0)&&(e=wt.x+i*y.mainScrollEndFriction)}wt.x=e,nt(e,W)}function u(e,t){var n=bt[e]-Xe[e];return Ye[e]+He[e]+n-t/q*n}function g(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)}function m(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function w(e,t){var n=$t(h.currItem,Be,e);return t&&(Re=n),n}function b(e){return e||(e=h.currItem),e.initialZoomLevel}function I(e){return e||(e=h.currItem),0t.min[e]?(n[e]=t.min[e],!0):n[e]Re.min[e]||rRe.min[e]&&(n=y.panEndFriction,Re.min[e],i=Re.min[e]-Ye[e]),(i<=0||u<0)&&1ft.x&&(a=ft.x)):Re.min.x!==Re.max.x&&(o=r)):(rh.currItem.fitRatio&&(We[e]+=t[e]*n)}function L(e){if(!("mousedown"===e.type&&0h.currItem.fitRatio&&Rt(ge):Ft())}}var N,U,H,Y,W,B,G,X,V,K,q,$,j,J,Q,ee,te,ne,ie,oe,ae,re,le,se,ue,ce,de,me,pe,fe,he,ye,xe,ve,ge,we,be,Ie,Ce,De,Te,Me,Se,Ae,Ee,Oe,ke,Re,Pe,Ze,Fe,Le,ze,_e,Ne,Ue,He={x:0,y:0},Ye={x:0,y:0},We={x:0,y:0},Be={},Ge=0,Xe={},Ve={x:0,y:0},Ke=0,qe=!0,$e=[],je={},Je=!1,Qe={},et=function(e){Pe&&(e&&(K>h.currItem.fitRatio?Je||(jt(h.currItem,!1,!0),Je=!0):Je&&(jt(h.currItem),Je=!1)),o(Pe,We.x,We.y,K))},tt=function(e){e.container&&o(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},nt=function(e,t){t[re]=$+e+"px, 0px"+j},it=null,ot=function(){it&&(f.unbind(document,"mousemove",ot),f.addClass(p,"pswp--has_mouse"),y.mouseUsed=!0,x("mouseUsed")),it=setTimeout(function(){it=null},100)},at={},rt=0,lt={shout:x,listen:a,viewportSize:Be,options:y,isMainScrollAnimating:function(){return Ze},getZoomLevel:function(){return K},getCurrentIndex:function(){return Y},isDragging:function(){return Ce},isZooming:function(){return Oe},setScrollOffset:function(e,t){Xe.x=e,fe=Xe.y=t,x("updateScrollOffset",Xe)},applyZoomPan:function(e,t,n,i){We.x=t,We.y=n,K=e,et(i)},init:function(){if(!N&&!U){var e;h.framework=f,h.template=p,h.bg=f.getChildByClass(p,"pswp__bg"),de=p.className,N=!0,he=f.detectFeatures(),ue=he.raf,ce=he.caf,re=he.transform,pe=he.oldIE,h.scrollWrap=f.getChildByClass(p,"pswp__scroll-wrap"),h.container=f.getChildByClass(h.scrollWrap,"pswp__container"),W=h.container.style,h.itemHolders=ee=[{el:h.container.children[0],wrap:0,index:-1},{el:h.container.children[1],wrap:0,index:-1},{el:h.container.children[2],wrap:0,index:-1}],ee[0].el.style.display=ee[2].el.style.display="none",function(){if(re){var e=he.perspective&&!se;return $="translate"+(e?"3d(":"("),j=he.perspective?", 0px)":")"}re="left",f.addClass(p,"pswp--ie"),nt=function(e,t){t.left=e+"px"},tt=function(e){var t=1=Gt())&&(Y=0),h.currItem=Bt(Y),(he.isOldIOSPhone||he.isOldAndroid)&&(qe=!1),p.setAttribute("aria-hidden","false"),y.modal&&(qe?p.style.position="fixed":(p.style.position="absolute",p.style.top=f.getScrollY()+"px")),fe===undefined&&(x("initialLayout"),fe=me=f.getScrollY());var n="pswp--open ";for(y.mainClass&&(n+=y.mainClass+" "),y.showHideOpacity&&(n+="pswp--animate_opacity "),n+=se?"pswp--touch":"pswp--notouch",n+=he.animationName?" pswp--css_animation":"",n+=he.svg?" pswp--svg":"",f.addClass(p,n),h.updateSize(),B=-1,Ke=null,e=0;e<3;e++)nt((e+B)*Ve.x,ee[e].el.style);pe||f.bind(h.scrollWrap,X,h),a("initialZoomInEnd",function(){h.setContent(ee[0],Y-1),h.setContent(ee[2],Y+1),ee[0].el.style.display=ee[2].el.style.display="block",y.focus&&p.focus(),f.bind(document,"keydown",h),he.transform&&f.bind(h.scrollWrap,"click",h),y.mouseUsed||f.bind(document,"mousemove",ot),f.bind(window,"resize scroll orientationchange",h),x("bindEvents")}),h.setContent(ee[1],Y),h.updateCurrItem(),x("afterInit"),qe||(J=setInterval(function(){rt||Ce||Oe||K!==h.currItem.initialZoomLevel||h.updateSize()},1e3)),f.addClass(p,"pswp--visible")}},close:function(){N&&(U=!(N=!1),x("close"),f.unbind(window,"resize scroll orientationchange",h),f.unbind(window,"scroll",V.scroll),f.unbind(document,"keydown",h),f.unbind(document,"mousemove",ot),he.transform&&f.unbind(h.scrollWrap,"click",h),Ce&&f.unbind(window,G,h),clearTimeout(ye),x("unbindEvents"),Xt(h.currItem,null,!0,h.destroy))},destroy:function(){x("destroy"),Ut&&clearTimeout(Ut),p.setAttribute("aria-hidden","true"),p.className=de,J&&clearInterval(J),f.unbind(h.scrollWrap,X,h),f.unbind(window,"scroll",h),Ct(),S(),Qe=null},panTo:function(e,t,n){n||(e>Re.min.x?e=Re.min.x:eRe.min.y?t=Re.min.y:th.currItem.initialZoomLevel+h.currItem.initialZoomLevel/15&&(Ne=!0);var i=1,o=b(),a=I();if(nRe.min[t]?i.backAnimDestination[t]=Re.min[t]:We[t]=Gt()&&(Y=y.loop?0:Gt()-1,o=!0),o&&!y.loop||(Ke+=i,Ge-=i,n=!0));var l,s=Ve.x*Ge,u=Math.abs(s-wt.x);return l=n||s>wt.x==0The image could not be loaded.',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Ht.length}},$t=function(e,t,n){if(!e.src||e.loadError)return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},e.initialPosition=e.bounds.center,e.bounds;var i=!n;if(i&&(e.vGap||(e.vGap={top:0,bottom:0}),x("parseVerticalMargin",e)),Vt.x=t.x,Vt.y=t.y-e.vGap.top-e.vGap.bottom,i){var o=Vt.x/e.w,a=Vt.y/e.h;e.fitRatio=oVt.x?Math.round(Vt.x-t):i.center.x,i.max.y=n>Vt.y?Math.round(Vt.y-n)+e.vGap.top:i.center.y,i.min.x=t>Vt.x?0:i.center.x,i.min.y=n>Vt.y?e.vGap.top:i.center.y}(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0},jt=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}};n("Controller",{publicMethods:{lazyLoadItem:function(e){e=s(e);var t=Bt(e);t&&(!t.loaded&&!t.loading||Q)&&(x("gettingData",e,t),t.src&&zt(t))},initController:function(){f.extend(y,qt,!0),h.items=Ht=e,Bt=h.getItemAt,Gt=y.getNumItemsFn,y.loop,Gt()<3&&(y.loop=!1),a("beforeChange",function(e){var t,n=y.preload,i=null===e||0<=e,o=Math.min(n[0],Gt()),a=Math.min(n[1],Gt());for(t=1;t<=(i?a:o);t++)h.lazyLoadItem(Y+t);for(t=1;t<=(i?o:a);t++)h.lazyLoadItem(Y-t)}),a("initialLayout",function(){h.currItem.initialLayout=y.getThumbBoundsFn&&y.getThumbBoundsFn(Y)}),a("mainScrollAnimComplete",Nt),a("initialZoomInEnd",Nt),a("destroy",function(){for(var e,t=0;t=Re.max.x&&n<=Re.min.y&&n>=Re.max.y)&&e.preventDefault(),h.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:Be.x/2+Xe.x,y:Be.y/2+Xe.y};var t=y.getDoubleTapZoom(!0,h.currItem),n=K===t;h.mouseZoomedIn=!n,h.zoomTo(n?h.currItem.initialZoomLevel:t,e,333),f[(n?"remove":"add")+"Class"](p,"pswp--zoomed-in")}}});function nn(){return yn.hash.substring(1)}function on(){rn&&clearTimeout(rn),sn&&clearTimeout(sn)}function an(){var e=nn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n