/*! 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(m,n,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;ah.currItem.fitRatio?be||(jt(h.currItem,!1,!0),be=!0):be&&(jt(h.currItem),be=!1)),Ee(te,pe.x,pe.y,g))},ke=function(e){e.container&&Ee(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Re=function(e,t){t[A]=p+e+"px, 0px"+v},Pe=function(e,t){var n;!y.loop&&t&&(n=x+(ye.x*fe-e)/ye.x,t=Math.round(e-ct.x),(n<0&&0=Ht()-1&&t<0)&&(e=ct.x+t*y.mainScrollEndFriction)),ct.x=e,Re(e,a)},Ze=function(e,t){var n=dt[e]-he[e];return de[e]+ce[e]+n-t/d*n},Fe=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Le=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},ze=null,_e=function(){ze&&(f.unbind(document,"mousemove",_e),f.addClass(m,"pswp--has_mouse"),y.mouseUsed=!0,Me("mouseUsed")),ze=setTimeout(function(){ze=null},100)},Ne=function(e,t){e=Vt(h.currItem,me,e);return t&&(ee=e),e},Ue=function(e){return(e=e||h.currItem).initialZoomLevel},He=function(e){return 0<(e=e||h.currItem).w?y.maxSpreadZoom:1},Ye=function(e,t,n,i){return i===h.currItem.initialZoomLevel?(n[e]=h.currItem.initialPosition[e],!0):(n[e]=Ze(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]=Ht())&&(x=0),h.currItem=Ut(x),(z.isOldIOSPhone||z.isOldAndroid)&&(ge=!1),m.setAttribute("aria-hidden","false"),y.modal&&(ge?m.style.position="fixed":(m.style.position="absolute",m.style.top=f.getScrollY()+"px")),L===undefined&&(Me("initialLayout"),L=Z=f.getScrollY());t="pswp--open ";for(y.mainClass&&(t+=y.mainClass+" "),y.showHideOpacity&&(t+="pswp--animate_opacity "),t+=O?"pswp--touch":"pswp--notouch",t+=z.animationName?" pswp--css_animation":"",t+=z.svg?" pswp--svg":"",f.addClass(m,t),h.updateSize(),l=-1,xe=null,e=0;e<3;e++)Re((e+l)*ye.x,I[e].el.style);F||f.bind(h.scrollWrap,u,h),Te("initialZoomInEnd",function(){h.setContent(I[0],x-1),h.setContent(I[2],x+1),I[0].el.style.display=I[2].el.style.display="block",y.focus&&m.focus(),f.bind(document,"keydown",h),z.transform&&f.bind(h.scrollWrap,"click",h),y.mouseUsed||f.bind(document,"mousemove",_e),f.bind(window,"resize scroll orientationchange",h),Me("bindEvents")}),h.setContent(I[1],x),h.updateCurrItem(),Me("afterInit"),ge||(w=setInterval(function(){Ve||G||J||g!==h.currItem.initialZoomLevel||h.updateSize()},1e3)),f.addClass(m,"pswp--visible")}},close:function(){r&&(i=!(r=!1),Me("close"),f.unbind(window,"resize scroll orientationchange",h),f.unbind(window,"scroll",c.scroll),f.unbind(document,"keydown",h),f.unbind(document,"mousemove",_e),z.transform&&f.unbind(h.scrollWrap,"click",h),G&&f.unbind(window,s,h),clearTimeout(_),Me("unbindEvents"),Yt(h.currItem,null,!0,h.destroy))},destroy:function(){Me("destroy"),Lt&&clearTimeout(Lt),m.setAttribute("aria-hidden","true"),m.className=P,w&&clearInterval(w),f.unbind(h.scrollWrap,u,h),f.unbind(window,"scroll",h),ft(),$e(),De=null},panTo:function(e,t,n){n||(e>ee.min.x?e=ee.min.x:eee.min.y?t=ee.min.y:tee.min[e]||aee.min[e]&&(u=y.panEndFriction,ee.min[e],n=ee.min[e]-de[e]),(n<=0||s<0)&&1ot.x&&(o=ot.x)):ee.min.x!==ee.max.x&&(i=a)):(ah.currItem.fitRatio&&(pe[e]+=t[e]*u)},St=function(e){var t;"mousedown"===e.type&&0h.currItem.initialZoomLevel+h.currItem.initialZoomLevel/15&&(le=!0),e=1,a=Ue(),i=He(),nh.currItem.fitRatio&&Rt(H):Ft())}},kt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=1ee.min[t]?i.backAnimDestination[t]=ee.min[t]:pe[t]=Ht()&&(x=y.loop?0:Ht()-1,o=!0),o&&!y.loop||(xe+=a,fe-=a,n=!0));var o=ye.x*fe,a=Math.abs(o-ct.x),r=n||o>ct.x==0The image could not be loaded.',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return zt.length}},Xt=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},Vt=function(e,t,n){if(!e.src||e.loadError)return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=Xt(),e.initialPosition=e.bounds.center,e.bounds;var i,o,a,r=!n;return r&&(e.vGap||(e.vGap={top:0,bottom:0}),Me("parseVerticalMargin",e)),Wt.x=t.x,Wt.y=t.y-e.vGap.top-e.vGap.bottom,r&&(i=Wt.x/e.w,o=Wt.y/e.h,e.fitRatio=iWt.x?Math.round(Wt.x-i):a.center.x,a.max.y=o>Wt.y?Math.round(Wt.y-o)+t.vGap.top:a.center.y,a.min.x=i>Wt.x?0:a.center.x,a.min.y=o>Wt.y?t.vGap.top:a.center.y,r&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0},Kt=function(e,t,n,i,o,a){t.loadError||i&&(t.imageAppended=!0,jt(t,i,t===h.currItem&&be),n.appendChild(i),a&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},qt=function(e){e.loading=!0,e.loaded=!1;var t=e.img=f.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t.alt=e.alt||"",t},$t=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=y.errorMsg.replace("%url%",e.src),!0},jt=function(e,t,n){var i;e.src&&(t=t||e.container.lastChild,i=n?e.w:Math.round(e.w*e.fitRatio),n=n?e.h:Math.round(e.h*e.fitRatio),e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=n+"px"),t.style.width=i+"px",t.style.height=n+"px")},Jt=function(){if(Bt.length){for(var e,t=0;t=ee.max.x&&n<=ee.min.y&&n>=ee.max.y)&&e.preventDefault(),h.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:me.x/2+he.x,y:me.y/2+he.y};var t=y.getDoubleTapZoom(!0,h.currItem),n=g===t;h.mouseZoomedIn=!n,h.zoomTo(n?h.currItem.initialZoomLevel:t,e,333),f[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}});var on,an,rn,ln,sn,un,cn,dn,pn,mn,fn,hn,yn={history:!0,galleryUID:1},xn=function(){return fn.hash.substring(1)},gn=function(){on&&clearTimeout(on),rn&&clearTimeout(rn)},vn=function(){var e=xn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(a=0;a