d.min[e]&&(c=g.panEndFriction,d.min[e],n=d.min[e]-ke[e]),(n<=0||s<0)&&1pt.x&&(o=pt.x)):d.min.x!==d.max.x&&(i=a)):(ax.currItem.fitRatio&&(v[e]+=t[e]*c)},_t=function(e){var t;"mousedown"===e.type&&0=ct&&(Ce=0x.currItem.initialZoomLevel+x.currItem.initialZoomLevel/15&&(Se=!0),t=1,n=$e(),i=je(),e=ct&&(O.x-=c[0].x-dt.x),Math.abs(O.y)>=ct&&(O.y-=c[0].y-dt.y)),k.x=E.x,k.y=E.y,0!==O.x||0!==O.y)){if("v"===Ce&&g.closeOnVerticalDrag)if(!Tt())return Oe.y+=O.y,v.y+=O.y,o=Rt(),fe=!0,C("onVerticalDrag",o),T(o),void M();kt(D(),E.x,E.y),ge=!0,d=x.currItem.bounds,zt("x",O)||(zt("y",O),Xe(v),M())}}},Ht=function(e){if(l.isOldAndroid){if(he&&"mouseup"===e.type)return;-1x.currItem.fitRatio&&Wt(me))}},Yt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1d.min[t]?i.backAnimDestination[t]=d.min[t]:v[t]=P()&&(p=g.loop?0:P()-1,o=!0),o&&!g.loop||(I+=i,Re-=i,n=!0));var n,i,o,e=b.x*Re,a=Math.abs(e-R.x),r=n||e>R.x==0The image could not be loaded.',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Kt.length}},tn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},nn=function(e,t,n){var i=e.bounds;i.center.x=Math.round((Z.x-t)/2),i.center.y=Math.round((Z.y-n)/2)+e.vGap.top,i.max.x=t>Z.x?Math.round(Z.x-t):i.center.x,i.max.y=n>Z.y?Math.round(Z.y-n)+e.vGap.top:i.center.y,i.min.x=t>Z.x?0:i.center.x,i.min.y=n>Z.y?e.vGap.top:i.center.y},on=function(e,t,n){var i,o;return!e.src||e.loadError?(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=tn(),e.initialPosition=e.bounds.center,e.bounds):((i=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),C("parseVerticalMargin",e)),Z.x=t.x,Z.y=t.y-e.vGap.top-e.vGap.bottom,i&&(t=Z.x/e.w,o=Z.y/e.h,e.fitRatio=t=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),x.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:w.x/2+Pe.x,y:w.y/2+Pe.y};var t=g.getDoubleTapZoom(!0,x.currItem),n=f===t;x.mouseZoomedIn=!n,x.zoomTo(n?x.currItem.initialZoomLevel:t,e,333),y[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}}),{history:!0,galleryUID:1}),Dn=function(){return L.hash.substring(1)},Tn=function(){dn&&clearTimeout(dn),pn&&clearTimeout(pn)},Mn=function(){var e=Dn(),t={};if(!(e.length<5)){var n,i=e.split("&");for(a=0;a"+e.label+"";if(g.parseShareButtonOut)l=g.parseShareButtonOut(e,l)}m.children[0].innerHTML=l,m.children[0].onclick=D}return!1},D=function(e){var t=(e=e||window.event).target||e.srcElement;if(o.shout("shareLinkClick",e,t),t.href){if(t.hasAttribute("download"))return!0;window.open(t.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),I||K()}return!1},L=function(e){for(var t=0;tg.fitControlsWidth?(t=g.barsSize,g.captionEl&&"auto"===t.bottom?(p||((p=s.createEl("pswp__caption pswp__caption--fake")).appendChild(s.createEl("pswp__caption__center")),u.insertBefore(p,c),s.addClass(u,"pswp__ui--fit")),g.addCaptionHTMLFn(e,p,!0)?(e=p.clientHeight,n.bottom=parseInt(e,10)||44):n.bottom=t.top):n.bottom="auto"===t.bottom?0:t.bottom,n.top=t.top):n.top=n.bottom=0},M=[{name:"caption",option:"captionEl",onInit:function(e){c=e}},{name:"share-modal",option:"shareEl",onInit:function(e){m=e},onTap:function(){K()}},{name:"button--share",option:"shareEl",onInit:function(e){d=e},onTap:function(){K()}},{name:"button--zoom",option:"zoomEl",onTap:o.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){t=e}},{name:"button--close",option:"closeEl",onTap:o.close},{name:"button--arrow--left",option:"arrowEl",onTap:o.prev},{name:"button--arrow--right",option:"arrowEl",onTap:o.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){a.isFullscreen()?a.exit():a.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){n=e}}];C.init=function(){var t,l,r,i,e,n;s.extend(o.options,E,!0),g=o.options,u=s.getChildByClass(o.scrollWrap,"pswp__ui"),(f=o.listen)("onVerticalDrag",function(e){T&&e<.95?C.hideControls():!T&&.95<=e&&C.showControls()}),f("onPinchClose",function(e){T&&e<.9?(C.hideControls(),t=!0):t&&!T&&.9