/*! 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,n,e,t){var m={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;af.currItem.fitRatio?Ie||(an(f.currItem,!1,!0),Ie=!0):Ie&&(an(f.currItem),Ie=!1)),Oe(ne,me.x,me.y,x))},Re=function(e){e.container&&Oe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Pe=function(e,t){t[E]=v+e+"px, 0px"+w},Ze=function(e,t){var n;!h.loop&&t&&(n=y+(xe.x*he-e)/xe.x,t=Math.round(e-mt.x),(n<0&&0=Vt()-1&&t<0)&&(e=mt.x+t*h.mainScrollEndFriction)),mt.x=e,Pe(e,l)},Fe=function(e,t){var n=ft[e]-ye[e];return pe[e]+de[e]+n-t/g*n},Le=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},ze=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},_e=null,Ne=function(){_e&&(m.unbind(document,"mousemove",Ne),m.addClass(p,"pswp--has_mouse"),h.mouseUsed=!0,Se("mouseUsed")),_e=setTimeout(function(){_e=null},100)},Ue=function(e,t){e=en(f.currItem,fe,e);return t&&(te=e),e},He=function(e){return(e=e||f.currItem).initialZoomLevel},Ye=function(e){return 0<(e=e||f.currItem).w?h.maxSpreadZoom:1},We=function(e,t,n,i){return i===f.currItem.initialZoomLevel?(n[e]=f.currItem.initialPosition[e],!0):(n[e]=Fe(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]=Vt())&&(y=0),f.currItem=Xt(y),(_.isOldIOSPhone||_.isOldAndroid)&&(ve=!1),p.setAttribute("aria-hidden","false"),h.modal&&(ve?p.style.position="fixed":(p.style.position="absolute",p.style.top=m.getScrollY()+"px")),z===undefined&&(Se("initialLayout"),z=F=m.getScrollY());t="pswp--open ";for(h.mainClass&&(t+=h.mainClass+" "),h.showHideOpacity&&(t+="pswp--animate_opacity "),t+=k?"pswp--touch":"pswp--notouch",t+=_.animationName?" pswp--css_animation":"",t+=_.svg?" pswp--svg":"",m.addClass(p,t),f.updateSize(),s=-1,ge=null,e=0;e<3;e++)Pe((e+s)*xe.x,C[e].el.style);L||m.bind(f.scrollWrap,c,f),Me("initialZoomInEnd",function(){f.setContent(C[0],y-1),f.setContent(C[2],y+1),C[0].el.style.display=C[2].el.style.display="block",h.focus&&p.focus(),m.bind(document,"keydown",f),_.transform&&m.bind(f.scrollWrap,"click",f),h.mouseUsed||m.bind(document,"mousemove",Ne),m.bind(window,"resize scroll orientationchange",f),Se("bindEvents")}),f.setContent(C[1],y),f.updateCurrItem(),Se("afterInit"),ve||(b=setInterval(function(){Ke||X||Q||x!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),m.addClass(p,"pswp--visible")}},close:function(){r&&(i=!(r=!1),Se("close"),m.unbind(window,"resize scroll orientationchange",f),m.unbind(window,"scroll",d.scroll),m.unbind(document,"keydown",f),m.unbind(document,"mousemove",Ne),_.transform&&m.unbind(f.scrollWrap,"click",f),X&&m.unbind(window,u,f),clearTimeout(N),Se("unbindEvents"),Kt(f.currItem,null,!0,f.destroy))},destroy:function(){Se("destroy"),Yt&&clearTimeout(Yt),p.setAttribute("aria-hidden","true"),p.className=Z,b&&clearInterval(b),m.unbind(f.scrollWrap,c,f),m.unbind(window,"scroll",f),gt(),je(),Te=null},panTo:function(e,t,n){n||(e>te.min.x?e=te.min.x:ete.min.y?t=te.min.y:tte.min[e]||ate.min[e]&&(u=h.panEndFriction,te.min[e],n=te.min[e]-pe[e]),(n<=0||s<0)&&1lt.x&&(o=lt.x)):te.min.x!==te.max.x&&(i=a)):(af.currItem.fitRatio&&(me[e]+=t[e]*u)},Pt=function(e){var t;"mousedown"===e.type&&0=et&&(oe=0f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(se=!0),t=1,n=He(),i=Ye(),a=et&&(it.x-=J[0].x-at.x),Math.abs(it.y)>=et&&(it.y-=J[0].y-at.y)),ot.x=tt.x,ot.y=tt.y,0!==it.x||0!==it.y)){if("v"===oe&&h.closeOnVerticalDrag&&!wt()){de.y+=it.y,me.y+=it.y;var a=St();return B=!0,Se("onVerticalDrag",a),Ee(a),void ke()}Mt(Ae(),tt.x,tt.y),q=!0,te=f.currItem.bounds,Rt("x",it)||(Rt("y",it),ze(me),ke())}}},Lt=function(e){if(_.isOldAndroid){if(G&&"mouseup"===e.type)return;-1f.currItem.fitRatio&&_t(Y):Ht())}},zt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=1te.min[t]?i.backAnimDestination[t]=te.min[t]:me[t]=Vt()&&(y=h.loop?0:Vt()-1,o=!0),o&&!h.loop||(ge+=a,he-=a,n=!0));var o=xe.x*he,a=Math.abs(o-mt.x),r=n||o>mt.x==0The image could not be loaded.',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Wt.length}},Jt=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},Qt=function(e,t,n){var i=e.bounds;i.center.x=Math.round((qt.x-t)/2),i.center.y=Math.round((qt.y-n)/2)+e.vGap.top,i.max.x=t>qt.x?Math.round(qt.x-t):i.center.x,i.max.y=n>qt.y?Math.round(qt.y-n)+e.vGap.top:i.center.y,i.min.x=t>qt.x?0:i.center.x,i.min.y=n>qt.y?e.vGap.top:i.center.y},en=function(e,t,n){if(!e.src||e.loadError)return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=Jt(),e.initialPosition=e.bounds.center,e.bounds;var i,o=!n;return o&&(e.vGap||(e.vGap={top:0,bottom:0}),Se("parseVerticalMargin",e)),qt.x=t.x,qt.y=t.y-e.vGap.top-e.vGap.bottom,o&&(i=qt.x/e.w,t=qt.y/e.h,e.fitRatio=i=te.max.x&&n<=te.min.y&&n>=te.max.y)&&e.preventDefault(),f.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:fe.x/2+ye.x,y:fe.y/2+ye.y};var t=h.getDoubleTapZoom(!0,f.currItem),n=x===t;f.mouseZoomedIn=!n,f.zoomTo(n?f.currItem.initialZoomLevel:t,e,333),m[(n?"remove":"add")+"Class"](p,"pswp--zoomed-in")}}});var dn,pn,mn,fn,hn,yn,xn,gn,vn,wn,bn,In,Cn={history:!0,galleryUID:1},Dn=function(){return bn.hash.substring(1)},Tn=function(){dn&&clearTimeout(dn),mn&&clearTimeout(mn)},Mn=function(){var e=Dn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(a=0;a