text: !function(e,t){"use strict";for(var n,o=0,i=500,a=15,r=document.getElementsByTagName("a"),l=0;l<r.length;l++)n=r[l].attributes.href===t?null:r[l].attributes.href.nodeValue.toString(),null!==n&&n.length>1&&-1!=n.indexOf("#")&&(r[l].onclick=function(){var n,o=this.attributes.href.nodeValue.toString(),r=o.substr(0,o.indexOf("#")),l=o.substr(o.indexOf("#")+1);if(n=document.getElementById(l)){var c=(i-i%a)/a,d=u(),p=(s(n)-d)/c;e.history&&"function"==typeof e.history.pushState&&e.history.pushState({},t,r+"#"+l);for(var m=1;c>=m;m++)!function(){var t=p*m;setTimeout(function(){e.scrollTo(0,t+d)},a*m)}();return!1}});var s=function(e){for(var n=-1*o;e.offsetParent!=t&&null!=e.offsetParent;)n+=e.offsetTop+(null!=e.clientTop?e.clientTop:0),e=e.offsetParent;return n},u=function(){return e.pageYOffset!==t?e.pageYOffset:document.documentElement.scrollTop!==t?document.documentElement.scrollTop:document.body.scrollTop}}(window),!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";var e=function(e,t,n,o){var i={features:null,bind:function(e,t,n,o){var i=(o?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[i](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){i.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){i.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(i.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var o=e.length;o--;)if(e[o][n]===t)return o;return-1},extend:function(e,t,n){for(var o in t)if(t.hasOwnProperty(o)){if(n&&e.hasOwnProperty(o))continue;e[o]=t[o]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(i.features)return i.features;var e=i.createEl(),t=e.style,n="",o={};if(o.oldIE=document.all&&!document.addEventListener,o.touch="ontouchstart"in window,window.requestAnimationFrame&&(o.raf=window.requestAnimationFrame,o.caf=window.cancelAnimationFrame),o.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled,!o.pointerEvent){var a=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var r=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);r&&r.length>0&&(r=parseInt(r[1],10),r>=1&&8>r&&(o.isOldIOSPhone=!0))}var l=a.match(/Android\s([0-9\.]*)/),s=l?l[1]:0;s=parseFloat(s),s>=1&&(4.4>s&&(o.isOldAndroid=!0),o.androidVersion=s),o.isMobileOpera=/opera mini|opera mobi/i.test(a)}for(var u,c,d=["transform","perspective","animationName"],p=["","webkit","Moz","ms","O"],m=0;4>m;m++){n=p[m];for(var f=0;3>f;f++)u=d[f],c=n+(n?u.charAt(0).toUpperCase()+u.slice(1):u),!o[u]&&c in t&&(o[u]=c);n&&!o.raf&&(n=n.toLowerCase(),o.raf=window[n+"RequestAnimationFrame"],o.raf&&(o.caf=window[n+"CancelAnimationFrame"]||window[n+"CancelRequestAnimationFrame"]))}if(!o.raf){var h=0;o.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-h)),o=window.setTimeout(function(){e(t+n)},n);return h=t+n,o},o.caf=function(e){clearTimeout(e)}}return o.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,i.features=o,o}};i.detectFeatures(),i.features.oldIE&&(i.bind=function(e,t,n,o){t=t.split(" ");for(var i,a=(o?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(i=t[l])if("object"==typeof n&&n.handleEvent){if(o){if(!n["oldIE"+i])return!1}else n["oldIE"+i]=r;e[a]("on"+i,n["oldIE"+i])}else e[a]("on"+i,n)});var a=this,r=25,l=3,s={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.6,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e?1:t.initialZoomLevel<.7?1:1.5},maxSpreadZoom:2,modal:!0,scaleMode:"fit",alwaysFadeIn:!1};i.extend(s,o);var u,c,d,p,m,f,h,v,g,y,w,x,b,I,C,T,E,D,S,_,M,F,O,k,A,R,L,P,Z,N,z,U,K,B,H,Y,W,G,V,q,X,j,$,J,Q,et,tt,nt,ot,it,at,rt,lt,st,ut,ct,dt=function(){return{x:0,y:0}},pt=dt(),mt=dt(),ft=dt(),ht={},vt=0,gt={},yt=dt(),wt=0,xt=!0,bt=[],It={},Ct=function(e,t){i.extend(a,t.publicMethods),bt.push(e)},Tt=function(e){var t=Qn();return e>t-1?e-t:0>e?t+e:e},Et={},Dt=function(e,t){return Et[e]||(Et[e]=[]),Et[e].push(t)},St=function(e){var t=Et[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(a,n)}},_t=function(){return(new Date).getTime()},Mt=function(e){st=e,a.bg.style.opacity=e*s.bgOpacity},Ft=function(e,t,n,o){e[F]=x+t+"px, "+n+"px"+b+" scale("+o+")"},Ot=function(){ot&&Ft(ot,ft.x,ft.y,y)},kt=function(e){e.container&&Ft(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel)},At=function(e,t){t[F]=x+e+"px, 0px"+b},Rt=function(e,t){if(!s.loop&&t){var n=p+(yt.x*vt-e)/yt.x,o=Math.round(e-yn.x);(0>n&&o>0||n>=Qn()-1&&0>o)&&(e=yn.x+o*s.mainScrollEndFriction)}yn.x=e,At(e,m)},Lt=function(e,t){var n=wn[e]-gt[e];return mt[e]+pt[e]+n-n*(t/w)},Pt=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Zt=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Nt=null,zt=function(){Nt&&(i.unbind(document,"mousemove",zt),i.addClass(e,"pswp--has_mouse"),s.mouseUsed=!0,St("mouseUsed")),Nt=setTimeout(function(){Nt=null},100)},Ut=function(){i.bind(document,"keydown",a),z.transform&&i.bind(a.scrollWrap,"click",a),s.mouseUsed||i.bind(document,"mousemove",zt),i.bind(window,"resize scroll",a),St("bindEvents")},Kt=function(){i.unbind(window,"resize",a),i.unbind(window,"scroll",g.scroll),i.unbind(document,"keydown",a),i.unbind(document,"mousemove",zt),z.transform&&i.unbind(a.scrollWrap,"click",a),G&&i.unbind(window,h,a),St("unbindEvents")},Bt=function(e,t){var n=lo(a.currItem,ht,e);return t&&(nt=n),n},Ht=function(e){return e||(e=a.currItem),e.initialZoomLevel},Yt=function(e){return e||(e=a.currItem),e.w>0?s.maxSpreadZoom:1},Wt=function(e,t,n,o){return o===a.currItem.initialZoomLevel?(n[e]=a.currItem.initialPosition[e],!0):(n[e]=Lt(e,o),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]?(n[e]=t.max[e],!0):!1)},Gt=function(){if(F){var t=z.perspective&&!k;return x="translate"+(t?"3d(":"("),void(b=z.perspective?", 0px)":")")}F="left",i.addClass(e,"pswp--ie"),At=function(e,t){t.left=e+"px"},kt=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,o=t*e.w,i=t*e.h;n.width=o+"px",n.height=i+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Ot=function(){if(ot){var e=ot,t=a.currItem,n=t.fitRatio>1?1:t.fitRatio,o=n*t.w,i=n*t.h;e.width=o+"px",e.height=i+"px",e.left=ft.x+"px",e.top=ft.y+"px"}}},Vt=function(e){var t="";s.escKey&&27===e.keyCode?t="close":s.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,a[t]()))},qt=function(e){e&&(X||q||it||Y)&&(e.preventDefault(),e.stopPropagation())},Xt=function(){a.setScrollOffset(0,i.getScrollY())},jt={},$t=0,Jt=function(e){jt[e]&&(jt[e].raf&&R(jt[e].raf),$t--,delete jt[e])},Qt=function(e){jt[e]&&Jt(e),jt[e]||($t++,jt[e]={})},en=function(){for(var e in jt)jt.hasOwnProperty(e)&&Jt(e)},tn=function(e,t,n,o,i,a,r){var l,s=_t();Qt(e);var u=function(){if(jt[e]){if(l=_t()-s,l>=o)return Jt(e),a(n),void(r&&r());a((n-t)*i(l/o)+t),jt[e].raf=A(u)}};u()},nn={shout:St,listen:Dt,viewportSize:ht,options:s,isMainScrollAnimating:function(){return it},getZoomLevel:function(){return y},getCurrentIndex:function(){return p},isDragging:function(){return G},isZooming:function(){return Q},setScrollOffset:function(e,t){gt.x=e,N=gt.y=t,St("updateScrollOffset",gt)},applyZoomPan:function(e,t,n){ft.x=t,ft.y=n,y=e,Ot()},init:function(){if(!u&&!c){var n;a.framework=i,a.template=e,a.bg=i.getChildByClass(e,"pswp__bg"),L=e.className,u=!0,z=i.detectFeatures(),A=z.raf,R=z.caf,F=z.transform,Z=z.oldIE,a.scrollWrap=i.getChildByClass(e,"pswp__scroll-wrap"),a.container=i.getChildByClass(a.scrollWrap,"pswp__container"),m=a.container.style,a.itemHolders=T=[{el:a.container.children[0],wrap:0,index:-1},{el:a.container.children[1],wrap:0,index:-1},{el:a.container.children[2],wrap:0,index:-1}],T[0].el.style.display=T[2].el.style.display="none",Gt(),g={resize:a.updateSize,scroll:Xt,keydown:Vt,click:qt};var o=z.isOldIOSPhone||z.isOldAndroid||z.isMobileOpera;for(z.animationName&&z.transform&&!o||(s.showAnimationDuration=s.hideAnimationDuration=0),n=0;n<bt.length;n++)a["init"+bt[n]]();if(t){var r=a.ui=new t(a,i);r.init()}St("firstUpdate"),p=p||s.index||0,(isNaN(p)||0>p||p>=Qn())&&(p=0),a.currItem=Jn(p),(z.isOldIOSPhone||z.isOldAndroid)&&(xt=!1),e.setAttribute("aria-hidden","false"),s.modal&&(xt?e.style.position="fixed":(e.style.position="absolute",e.style.top=i.getScrollY()+"px")),void 0===N&&(St("initialLayout"),N=P=i.getScrollY());var d="pswp--open ";for(s.mainClass&&(d+=s.mainClass+" "),s.showHideOpacity&&(d+="pswp--animate_opacity "),d+=k?"pswp--touch":"pswp--notouch",d+=z.animationName?" pswp--css_animation":"",d+=z.svg?" pswp--svg":"",i.addClass(e,d),a.updateSize(),f=-1,wt=null,n=0;l>n;n++)At((n+f)*yt.x,T[n].el.style);Z||i.bind(a.scrollWrap,v,a),Dt("initialZoomInEnd",function(){a.setContent(T[0],p-1),a.setContent(T[2],p+1),T[0].el.style.display=T[2].el.style.display="block",s.focus&&e.focus(),Ut()}),a.setContent(T[1],p),a.updateCurrItem(),St("afterInit"),xt||(I=setInterval(function(){$t||G||Q||y!==a.currItem.initialZoomLevel||a.updateSize()},1e3)),i.addClass(e,"pswp--visible")}},close:function(){u&&(u=!1,c=!0,St("close"),Kt(),to(a.currItem,null,!0,a.destroy))},destroy:function(){St("destroy"),qn&&clearTimeout(qn),e.setAttribute("aria-hidden","true"),e.className=L,I&&clearInterval(I),i.unbind(a.scrollWrap,v,a),i.unbind(window,"scroll",a),Tn(),en(),Et=null},panTo:function(e,t,n){n||(e>nt.min.x?e=nt.min.x:e<nt.max.x&&(e=nt.max.x),t>nt.min.y?t=nt.min.y:t<nt.max.y&&(t=nt.max.y)),ft.x=e,ft.y=t,Ot()},handleEvent:function(e){e=e||window.event,g[e.type]&&g[e.type](e)},goTo:function(e){e=Tt(e);var t=e-p;wt=t,p=e,a.currItem=Jn(p),vt-=t,Rt(yt.x*vt),en(),it=!1,a.updateCurrItem()},next:function(){a.goTo(p+1)},prev:function(){a.goTo(p-1)},updateCurrZoomItem:function(e){if(e&&St("beforeChange",0),T[1].el.children.length){var t=T[1].el.children[0];ot=i.hasClass(t,"pswp__zoom-wrap")?t.style:null}else ot=null;nt=a.currItem.bounds,w=y=a.currItem.initialZoomLevel,ft.x=nt.center.x,ft.y=nt.center.y,e&&St("afterChange")},invalidateCurrItems:function(){C=!0;for(var e=0;l>e;e++)T[e].item&&(T[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==wt){var t,n=Math.abs(wt);if(!(e&&2>n)){a.currItem=Jn(p),St("beforeChange",wt),n>=l&&(f+=wt+(wt>0?-l:l),n=l);for(var o=0;n>o;o++)wt>0?(t=T.shift(),T[l-1]=t,f++,At((f+2)*yt.x,t.el.style),a.setContent(t,p-n+o+1+1)):(t=T.pop(),T.unshift(t),f--,At(f*yt.x,t.el.style),a.setContent(t,p+n-o-1-1));if(ot&&1===Math.abs(wt)){var i=Jn(E);i.initialZoomLevel!==y&&(lo(i,ht),kt(i))}wt=0,a.updateCurrZoomItem(),E=p,St("afterChange")}}},updateSize:function(t){if(!xt&&s.modal){var n=i.getScrollY();if(N!==n&&(e.style.top=n+"px",N=n),!t&&It.x===window.innerWidth&&It.y===window.innerHeight)return;It.x=window.innerWidth,It.y=window.innerHeight,e.style.height=It.y+"px"}if(ht.x=a.scrollWrap.clientWidth,ht.y=a.scrollWrap.clientHeight,Xt(),yt.x=ht.x+Math.round(ht.x*s.spacing),yt.y=ht.y,Rt(yt.x*vt),St("beforeResize"),void 0!==f){for(var o,r,u,c=0;l>c;c++)o=T[c],At((c+f)*yt.x,o.el.style),u=p+c-1,s.loop&&Qn()>2&&(u=Tt(u)),r=Jn(u),r&&(C||r.needsUpdate||!r.bounds)?(a.cleanSlide(r),a.setContent(o,u),1===c&&(a.currItem=r,a.updateCurrZoomItem(!0)),r.needsUpdate=!1):-1===o.index&&u>=0&&a.setContent(o,u),r&&r.container&&(lo(r,ht),kt(r));C=!1}w=y=a.currItem.initialZoomLevel,nt=a.currItem.bounds,nt&&(ft.x=nt.center.x,ft.y=nt.center.y,Ot()),St("resize")},zoomTo:function(e,t,n,o,a){t&&(w=y,wn.x=Math.abs(t.x)-ft.x,wn.y=Math.abs(t.y)-ft.y,Pt(mt,ft));var r=Bt(e,!1),l={};Wt("x",r,l,e),Wt("y",r,l,e);var s=y,u={x:ft.x,y:ft.y};Zt(l);var c=function(t){1===t?(y=e,ft.x=l.x,ft.y=l.y):(y=(e-s)*t+s,ft.x=(l.x-u.x)*t+u.x,ft.y=(l.y-u.y)*t+u.y),a&&a(t),Ot()};n?tn("customZoomTo",0,1,n,o||i.easing.sine.inOut,c):c(1)}},on=30,an=10,rn={},ln={},sn={},un={},cn={},dn=[],pn={},mn=[],fn={},hn=0,vn=dt(),gn=0,yn=dt(),wn=dt(),xn=dt(),bn=function(e,t){return e.x===t.x&&e.y===t.y},In=function(e,t){return Math.abs(e.x-t.x)<r&&Math.abs(e.y-t.y)<r},Cn=function(e,t){return fn.x=Math.abs(e.x-t.x),fn.y=Math.abs(e.y-t.y),Math.sqrt(fn.x*fn.x+fn.y*fn.y)},Tn=function(){j&&(R(j),j=null)},En=function(){G&&(j=A(En),Kn())},Dn=function(){return!("fit"===s.scaleMode&&y===a.currItem.initialZoomLevel)},Sn=function(e,t){return e?e.className&&e.className.indexOf("pswp__scroll-wrap")>-1?!1:t(e)?e:Sn(e.parentNode,t):!1},_n={},Mn=function(e,t){return _n.prevent=!Sn(e.target,s.isClickableElement),St("preventDragEvent",e,t,_n),_n.prevent},Fn=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},On=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},kn=function(e,t,n){if(e-K>50){var o=mn.length>2?mn.shift():{};o.x=t,o.y=n,mn.push(o),K=e}},An=function(){var e=ft.y-a.currItem.initialPosition.y;return 1-Math.abs(e/(ht.y/2))},Rn={},Ln={},Pn=[],Zn=function(e){for(;Pn.length>0;)Pn.pop();return O?(ct=0,dn.forEach(function(e){0===ct?Pn[0]=e:1===ct&&(Pn[1]=e),ct++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Pn[0]=Fn(e.touches[0],Rn),e.touches.length>1&&(Pn[1]=Fn(e.touches[1],Ln))):(Rn.x=e.pageX,Rn.y=e.pageY,Rn.id="",Pn[0]=Rn),Pn},Nn=function(e,t){var n,o,i,r,l=0,u=ft[e]+t[e],c=t[e]>0,d=yn.x+t.x,p=yn.x-pn.x;return n=u>nt.min[e]||u<nt.max[e]?s.panEndFriction:1,u=ft[e]+t[e]*n,!s.allowPanToNext&&y!==a.currItem.initialZoomLevel||(ot?"h"!==at||"x"!==e||q||(c?(u>nt.min[e]&&(n=s.panEndFriction,l=nt.min[e]-u,o=nt.min[e]-mt[e]),(0>=o||0>p)&&Qn()>1?(r=d,0>p&&d>pn.x&&(r=pn.x)):nt.min.x!==nt.max.x&&(i=u)):(u<nt.max[e]&&(n=s.panEndFriction,l=u-nt.max[e],o=mt[e]-nt.max[e]),(0>=o||p>0)&&Qn()>1?(r=d,p>0&&d<pn.x&&(r=pn.x)):nt.min.x!==nt.max.x&&(i=u))):r=d,"x"!==e)?void(it||$||y>a.currItem.fitRatio&&(ft[e]+=t[e]*n)):(void 0!==r&&(Rt(r,!0),$=r===pn.x?!1:!0),nt.min.x!==nt.max.x&&(void 0!==i?ft.x=i:$||(ft.x+=t.x*n)),void 0!==r)},zn=function(e){if(!("mousedown"===e.type&&e.button>0)){if($n)return void e.preventDefault();if(!W||"mousedown"!==e.type){if(Mn(e,!0)&&e.preventDefault(),St("pointerDown"),O){var t=i.arraySearch(dn,e.pointerId,"id");0>t&&(t=dn.length),dn[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=Zn(e),o=n.length;J=null,en(),G&&1!==o||(G=rt=!0,i.bind(window,h,a),H=ut=lt=Y=$=X=V=q=!1,at=null,St("firstTouchStart",n),Pt(mt,ft),pt.x=pt.y=0,Pt(un,n[0]),Pt(cn,un),pn.x=yt.x*vt,mn=[{x:un.x,y:un.y}],K=U=_t(),Bt(y,!0),Tn(),En()),!Q&&o>1&&!it&&!$&&(w=y,q=!1,Q=V=!0,pt.y=pt.x=0,Pt(mt,ft),Pt(rn,n[0]),Pt(ln,n[1]),On(rn,ln,xn),wn.x=Math.abs(xn.x)-ft.x,wn.y=Math.abs(xn.y)-ft.y,et=tt=Cn(rn,ln))}}},Un=function(e){if(e.preventDefault(),O){var t=i.arraySearch(dn,e.pointerId,"id");if(t>-1){var n=dn[t];n.x=e.pageX,n.y=e.pageY}}if(G){var o=Zn(e);if(at||X||Q)J=o;else{var a=Math.abs(o[0].x-un.x)-Math.abs(o[0].y-un.y);Math.abs(a)>=an&&(at=a>0?"h":"v",J=o)}}},Kn=function(){if(J){var e=J.length;if(0!==e)if(Pt(rn,J[0]),sn.x=rn.x-un.x,sn.y=rn.y-un.y,Q&&e>1){if(un.x=rn.x,un.y=rn.y,!sn.x&&!sn.y&&bn(J[1],ln))return;Pt(ln,J[1]),q||(q=!0,St("zoomGestureStarted"));var t=Cn(rn,ln),n=Gn(t);n>a.currItem.initialZoomLevel+a.currItem.initialZoomLevel/15&&(ut=!0);var o=1,i=Ht(),r=Yt();if(i>n)if(s.pinchToClose&&!ut&&w<=a.currItem.initialZoomLevel){var l=i-n,u=1-l/(i/1.2);Mt(u),St("onPinchClose",u),lt=!0}else o=(i-n)/i,o>1&&(o=1),n=i-o*(i/3);else n>r&&(o=(n-r)/(6*i),o>1&&(o=1),n=r+o*i);0>o&&(o=0),et=t,On(rn,ln,vn),pt.x+=vn.x-xn.x,pt.y+=vn.y-xn.y,Pt(xn,vn),ft.x=Lt("x",n),ft.y=Lt("y",n),H=n>y,y=n,Ot()}else{if(!at)return;if(rt&&(rt=!1,Math.abs(sn.x)>=an&&(sn.x-=J[0].x-cn.x),Math.abs(sn.y)>=an&&(sn.y-=J[0].y-cn.y)),un.x=rn.x,un.y=rn.y,0===sn.x&&0===sn.y)return;if("v"===at&&s.closeOnVerticalDrag&&!Dn()){pt.y+=sn.y,ft.y+=sn.y;var c=An();return Y=!0,St("onVerticalDrag",c),Mt(c),void Ot()}kn(_t(),rn.x,rn.y),X=!0,nt=a.currItem.bounds;var d=Nn("x",sn);d||(Nn("y",sn),Zt(ft),Ot())}}},Bn=function(e){if(z.isOldAndroid){if(W&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(W),W=setTimeout(function(){W=0},600))}St("pointerUp"),Mn(e,!1)&&e.preventDefault();var t;if(O){var n=i.arraySearch(dn,e.pointerId,"id");if(n>-1)if(t=dn.splice(n,1)[0],navigator.pointerEnabled)t.type=e.pointerType||"mouse";else{var o={4:"mouse",2:"touch",3:"pen"};t.type=o[e.pointerType],t.type||(t.type=e.pointerType||"mouse")}}var r,l=Zn(e),u=l.length;if("mouseup"===e.type&&(u=0),2===u)return J=null,!0;1===u&&Pt(cn,l[0]),0!==u||at||it||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),St("touchRelease",e,t));var c=-1;if(0===u&&(G=!1,i.unbind(window,h,a),Tn(),Q?c=0:-1!==gn&&(c=_t()-gn)),gn=1===u?_t():-1,r=-1!==c&&150>c?"zoom":"swipe",Q&&2>u&&(Q=!1,1===u&&(r="zoomPointerUp"),St("zoomGestureEnded")),J=null,X||q||it||Y)if(en(),B||(B=Hn()),B.calculateSwipeSpeed("x"),Y){var d=An();if(d<s.verticalDragRange)a.close();else{var p=ft.y,m=st;tn("verticalDrag",0,1,300,i.easing.cubic.out,function(e){ft.y=(a.currItem.initialPosition.y-p)*e+p,Mt((1-m)*e+m),Ot()}),St("onVerticalDrag",1)}}else{if(($||it)&&0===u){var f=Wn(r,B);if(f)return;r="zoomPointerUp"}if(!it)return"swipe"!==r?void Vn():void(!$&&y>a.currItem.fitRatio&&Yn(B))}},Hn=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(o){mn.length>1?(e=_t()-K+50,t=mn[mn.length-2][o]):(e=_t()-U,t=cn[o]),n.lastFlickOffset[o]=un[o]-t,n.lastFlickDist[o]=Math.abs(n.lastFlickOffset[o]),n.lastFlickSpeed[o]=n.lastFlickDist[o]>20?n.lastFlickOffset[o]/e:0,Math.abs(n.lastFlickSpeed[o])<.1&&(n.lastFlickSpeed[o]=0),n.slowDownRatio[o]=.95,n.slowDownRatioReverse[o]=1-n.slowDownRatio[o],n.speedDecelerationRatio[o]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(ft[e]>nt.min[e]?n.backAnimDestination[e]=nt.min[e]:ft[e]<nt.max[e]&&(n.backAnimDestination[e]=nt.max[e]),void 0!==n.backAnimDestination[e]&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,tn("bounceZoomPan"+e,ft[e],n.backAnimDestination[e],t||300,i.easing.sine.out,function(t){ft[e]=t,Ot()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,ft[e]+=n.distanceOffset[e])},panAnimLoop:function(){return jt.zoomPan&&(jt.zoomPan.raf=A(n.panAnimLoop),n.now=_t(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Ot(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05)?(ft.x=Math.round(ft.x),ft.y=Math.round(ft.y),Ot(),void Jt("zoomPan")):void 0}};return n},Yn=function(e){return e.calculateSwipeSpeed("y"),nt=a.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(Qt("zoomPan"),e.lastNow=_t(),void e.panAnimLoop())},Wn=function(e,t){var n;it||(hn=p);var o;if("swipe"===e){var r=un.x-cn.x,l=t.lastFlickDist.x<10;r>on&&(l||t.lastFlickOffset.x>20)?o=-1:-on>r&&(l||t.lastFlickOffset.x<-20)&&(o=1)}var u;o&&(p+=o,0>p?(p=s.loop?Qn()-1:0,u=!0):p>=Qn()&&(p=s.loop?0:Qn()-1,u=!0),(!u||s.loop)&&(wt+=o,vt-=o,n=!0));var c,d=yt.x*vt,m=Math.abs(d-yn.x);return n||d>yn.x==t.lastFlickSpeed.x>0?(c=Math.abs(t.lastFlickSpeed.x)>0?m/Math.abs(t.lastFlickSpeed.x):333,c=Math.min(c,400),c=Math.max(c,250)):c=333,hn===p&&(n=!1),it=!0,St("mainScrollAnimStart"),tn("mainScroll",yn.x,d,c,i.easing.cubic.out,Rt,function(){en(),it=!1,hn=-1,(n||hn!==p)&&a.updateCurrItem(),St("mainScrollAnimComplete")}),n&&a.updateCurrItem(!0),n},Gn=function(e){return 1/tt*e*w},Vn=function(){var e=y,t=Ht(),n=Yt();t>y?e=t:y>n&&(e=n);var o,r=1,l=st;return lt&&!H&&!ut&&t>y?(a.close(),!0):(lt&&(o=function(e){Mt((r-l)*e+l)}),a.zoomTo(e,0,300,i.easing.cubic.out,o),!0)};Ct("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,o,i){D=e+t,S=e+n,_=e+o,M=i?e+i:""};O=z.pointerEvent,O&&z.touch&&(z.touch=!1),O?navigator.pointerEnabled?e("pointer","down","move","up","cancel"):e("MSPointer","Down","Move","Up","Cancel"):z.touch?(e("touch","start","move","end","cancel"),k=!0):e("mouse","down","move","up"),h=S+" "+_+" "+M,v=D,O&&!k&&(k=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),a.likelyTouchDevice=k,g[D]=zn,g[S]=Un,g[_]=Bn,M&&(g[M]=g[_]),z.touch&&(v+=" mousedown",h+=" mousemove mouseup",g.mousedown=g[D],g.mousemove=g[S],g.mouseup=g[_]),k||(s.allowPanToNext=!1)}}});var qn,Xn,jn,$n,Jn,Qn,eo,to=function(t,n,o,r){qn&&clearTimeout(qn),$n=!0,jn=!0;var l;t.initialLayout?(l=t.initialLayout,t.initialLayout=null):l=s.getThumbBoundsFn&&s.getThumbBoundsFn(p);var u=o?s.hideAnimationDuration:s.showAnimationDuration,c=function(){Jt("initialZoom"),o?(a.template.removeAttribute("style"),a.bg.removeAttribute("style")):(Mt(1),n&&(n.style.display="block"),i.addClass(e,"pswp--animated-in"),St("initialZoom"+(o?"OutEnd":"InEnd"))),r&&r(),$n=!1};if(!u||!l||void 0===l.x){var m=function(){St("initialZoom"+(o?"Out":"In")),y=t.initialZoomLevel,Pt(ft,t.initialPosition),Ot(),e.style.opacity=o?0:1,Mt(1),c()};return void m()}var f=function(){var n=d,r=!a.currItem.src||a.currItem.loadError||s.showHideOpacity;t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),o||(y=l.w/t.w,ft.x=l.x,ft.y=l.y-P,a[r?"template":"bg"].style.opacity=.001,Ot()),Qt("initialZoom"),o&&!n&&i.removeClass(e,"pswp--animated-in"),r&&(o?i[(n?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){i.addClass(e,"pswp--animate_opacity")},30)),qn=setTimeout(function(){if(St("initialZoom"+(o?"Out":"In")),o){var a=l.w/t.w,s={x:ft.x,y:ft.y},d=y,p=st,m=function(t){1===t?(y=a,ft.x=l.x,ft.y=l.y-N):(y=(a-d)*t+d,ft.x=(l.x-s.x)*t+s.x,ft.y=(l.y-N-s.y)*t+s.y),Ot(),r?e.style.opacity=1-t:Mt(p-t*p)};n?tn("initialZoom",0,1,u,i.easing.cubic.out,m,c):(m(1),qn=setTimeout(c,u+20))}else y=t.initialZoomLevel,Pt(ft,t.initialPosition),Ot(),Mt(1),r?e.style.opacity=1:Mt(1),qn=setTimeout(c,u+20)},o?25:90)};f()},no={},oo=[],io={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Xn.length}},ao=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},ro=function(e,t,n){var o=e.bounds;o.center.x=Math.round((no.x-t)/2),o.center.y=Math.round((no.y-n)/2)+e.vGap.top,o.max.x=t>no.x?Math.round(no.x-t):o.center.x,o.max.y=n>no.y?Math.round(no.y-n)+e.vGap.top:o.center.y,o.min.x=t>no.x?0:o.center.x,o.min.y=n>no.y?e.vGap.top:o.center.y},lo=function(e,t,n){if(e.src&&!e.loadError){var o=!n;if(o&&(e.vGap||(e.vGap={top:0,bottom:0}),St("parseVerticalMargin",e)),no.x=t.x,no.y=t.y-e.vGap.top-e.vGap.bottom,o){var i=no.x/e.w,a=no.y/e.h;e.fitRatio=a>i?i:a;var r=s.scaleMode;"orig"===r?n=1:"fit"===r&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=ao())}if(!n)return;return ro(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=ao(),e.initialPosition=e.bounds.center,e.bounds},so=function(e,t,n,o,i,r){if(!t.loadError){var l,u=a.isDragging()&&!a.isZooming(),c=e===p||a.isMainScrollAnimating()||u;!i&&(k||s.alwaysFadeIn)&&c&&(l=!0),o&&(l&&(o.style.opacity=0),t.imageAppended=!0,po(o,t.w,t.h),n.appendChild(o),l&&setTimeout(function(){o.style.opacity=1,r&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},50))}},uo=function(e){e.loading=!0,e.loaded=!1;var t=e.img=i.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},co=function(e,t){return e.src&&e.loadError&&e.container?(t&&(e.container.innerHTML=""),e.container.innerHTML=s.errorMsg.replace("%url%",e.src),!0):void 0},po=function(e,t,n){e.style.width=t+"px",e.style.height=n+"px"},mo=function(){if(oo.length){for(var e,t=0;t<oo.length;t++)e=oo[t],e.holder.index===e.index&&so(e.index,e.item,e.baseDiv,e.img);oo=[]}};Ct("Controller",{publicMethods:{lazyLoadItem:function(e){e=Tt(e);var t=Jn(e);!t||t.loaded||t.loading||(St("gettingData",e,t),t.src&&uo(t))},initController:function(){i.extend(s,io,!0),a.items=Xn=n,Jn=a.getItemAt,Qn=s.getNumItemsFn,eo=s.loop,Qn()<3&&(s.loop=!1),Dt("beforeChange",function(e){var t,n=s.preload,o=null===e?!0:e>0,i=Math.min(n[0],Qn()),r=Math.min(n[1],Qn());for(t=1;(o?r:i)>=t;t++)a.lazyLoadItem(p+t);for(t=1;(o?i:r)>=t;t++)a.lazyLoadItem(p-t)}),Dt("initialLayout",function(){a.currItem.initialLayout=s.getThumbBoundsFn&&s.getThumbBoundsFn(p)}),Dt("mainScrollAnimComplete",mo),Dt("initialZoomInEnd",mo),Dt("destroy",function(){for(var e,t=0;t<Xn.length;t++)e=Xn[t],e.container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);oo=null})},getItemAt:function(e){return e>=0&&void 0!==Xn[e]?Xn[e]:!1},allowProgressiveImg:function(){return s.forceProgressiveLoading||!k||s.mouseUsed||screen.width>1200},setContent:function(e,t){s.loop&&(t=Tt(t));var n=a.getItemAt(e.index);n&&(n.container=null);var o,r=a.getItemAt(t);if(!r)return void(e.el.innerHTML="");St("gettingData",t,r),e.index=t,e.item=r;var l=r.container=i.createEl("pswp__zoom-wrap");if(!r.src&&r.html&&(r.html.tagName?l.appendChild(r.html):l.innerHTML=r.html),co(r),!r.src||r.loadError||r.loaded)r.src&&!r.loadError&&(o=i.createEl("pswp__img","img"),o.style.webkitBackfaceVisibility="hidden",o.style.opacity=1,o.src=r.src,po(o,r.w,r.h),so(t,r,l,o,!0));else{if(r.loadComplete=function(n){if(u){if(n.img&&(n.img.style.webkitBackfaceVisibility="hidden"),e&&e.index===t){if(co(n,!0))return n.loadComplete=n.img=null,lo(n,ht),kt(n),void(e.index===p&&a.updateCurrZoomItem());n.imageAppended?!$n&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):z.transform&&(it||$n)?oo.push({item:n,baseDiv:l,img:n.img,index:t,holder:e}):so(t,n,l,n.img,it||$n)}n.loadComplete=null,n.img=null,St("imageLoadComplete",t,n)}},i.features.transform){var c="pswp__img pswp__img--placeholder";c+=r.msrc?"":" pswp__img--placeholder--blank";var d=i.createEl(c,r.msrc?"img":"");r.msrc&&(d.src=r.msrc),po(d,r.w,r.h),l.appendChild(d),r.placeholder=d}r.loading||uo(r),a.allowProgressiveImg()&&(!jn&&z.transform?oo.push({item:r,baseDiv:l,img:r.img,index:t,holder:e}):so(t,r,l,r.img,!0,!0))}lo(r,ht),jn||t!==p?kt(r):(ot=l.style,to(r,o||r.img)),e.el.innerHTML="",e.el.appendChild(l)},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var fo,ho={},vo=function(e,t,n){var o=document.createEvent("CustomEvent"),i={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,i),e.target.dispatchEvent(o)};Ct("Tap",{publicMethods:{initTap:function(){Dt("firstTouchStart",a.onTapStart),Dt("touchRelease",a.onTapRelease),Dt("destroy",function(){ho={},fo=null})},onTapStart:function(e){e.length>1&&(clearTimeout(fo),fo=null)},onTapRelease:function(e,t){if(t&&!X&&!V&&!$t){var n=t;if(fo&&(clearTimeout(fo),fo=null,In(n,ho)))return void St("doubleTap",n);if("mouse"===t.type)return void vo(e,t,"mouse");var o=e.target.tagName.toUpperCase();if("BUTTON"===o||i.hasClass(e.target,"pswp__single-tap"))return void vo(e,t);Pt(ho,n),fo=setTimeout(function(){vo(e,t),fo=null},300)}}}});var go;Ct("DesktopZoom",{publicMethods:{initDesktopZoom:function(){Z||(k?Dt("mouseUsed",function(){a.setupDesktopZoom()}):a.setupDesktopZoom(!0))},setupDesktopZoom:function(t){go={};var n="wheel mousewheel DOMMouseScroll";Dt("bindEvents",function(){i.bind(e,n,a.handleMouseWheel)}),Dt("unbindEvents",function(){go&&i.unbind(e,n,a.handleMouseWheel)}),a.mouseZoomedIn=!1;var o,r=function(){a.mouseZoomedIn&&(i.removeClass(e,"pswp--zoomed-in"),a.mouseZoomedIn=!1),1>y?i.addClass(e,"pswp--zoom-allowed"):i.removeClass(e,"pswp--zoom-allowed"),l()},l=function(){o&&(i.removeClass(e,"pswp--dragging"),o=!1)};Dt("resize",r),Dt("afterChange",r),Dt("pointerDown",function(){a.mouseZoomedIn&&(o=!0,i.addClass(e,"pswp--dragging"))}),Dt("pointerUp",l),t||r()},handleMouseWheel:function(e){if(y<=a.currItem.fitRatio)return s.modal&&(s.closeOnScroll?F&&Math.abs(e.deltaY)>2&&(d=!0,a.close()):e.preventDefault()),!0;if(e.stopPropagation(),go.x=0,"deltaX"in e)1===e.deltaMode?(go.x=18*e.deltaX,go.y=18*e.deltaY):(go.x=e.deltaX,go.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(go.x=-.16*e.wheelDeltaX),go.y=e.wheelDeltaY?-.16*e.wheelDeltaY:-.16*e.wheelDelta;else{if(!("detail"in e))return;go.y=e.detail}Bt(y,!0);var t=ft.x-go.x,n=ft.y-go.y;(s.modal||t<=nt.min.x&&t>=nt.max.x&&n<=nt.min.y&&n>=nt.max.y)&&e.preventDefault(),a.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:ht.x/2+gt.x,y:ht.y/2+gt.y};var n=s.getDoubleTapZoom(!0,a.currItem),o=y===n;a.mouseZoomedIn=!o,a.zoomTo(o?a.currItem.initialZoomLevel:n,t,333),i[(o?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var yo,wo,xo,bo,Io,Co,To,Eo,Do,So,_o,Mo,Fo={history:!0,galleryUID:1},Oo=function(){return _o.hash.substring(1)},ko=function(){yo&&clearTimeout(yo),xo&&clearTimeout(xo)},Ao=function(){var e=Oo(),t={};if(e.length<5)return t;var n,o=e.split("&");for(n=0;n<o.length;n++)if(o[n]){var i=o[n].split("=");i.length<2||(t[i[0]]=i[1])}if(s.galleryPIDs){var a=t.pid;for(t.pid=0,n=0;n<Xn.length;n++)if(Xn[n].pid===a){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},Ro=function(){if(xo&&clearTimeout(xo),$t||G)return void(xo=setTimeout(Ro,500));bo?clearTimeout(wo):bo=!0;var e=p+1,t=Jn(p);t.hasOwnProperty("pid")&&(e=t.pid);var n=To+"&gid="+s.galleryUID+"&pid="+e;Eo||-1===_o.hash.indexOf(n)&&(So=!0);var o=_o.href.split("#")[0]+"#"+n;Mo?"#"+n!==window.location.hash&&history[Eo?"replaceState":"pushState"]("",document.title,o):Eo?_o.replace(o):_o.hash=n,Eo=!0,wo=setTimeout(function(){bo=!1},60)};Ct("History",{publicMethods:{initHistory:function(){if(i.extend(s,Fo,!0),s.history){_o=window.location,So=!1,Do=!1,Eo=!1,To=Oo(),Mo="pushState"in history,To.indexOf("gid=")>-1&&(To=To.split("&gid=")[0],To=To.split("?gid=")[0]),Dt("afterChange",a.updateURL),Dt("unbindEvents",function(){i.unbind(window,"hashchange",a.onHashChange)});var e=function(){Co=!0,Do||(So?history.back():To?_o.hash=To:Mo?history.pushState("",document.title,_o.pathname+_o.search):_o.hash=""),ko()};Dt("unbindEvents",function(){d&&e()}),Dt("destroy",function(){Co||e()}),Dt("firstUpdate",function(){p=Ao().pid});var t=To.indexOf("pid=");t>-1&&(To=To.substring(0,t),"&"===To.slice(-1)&&(To=To.slice(0,-1))),setTimeout(function(){u&&i.bind(window,"hashchange",a.onHashChange)},40)}},onHashChange:function(){return Oo()===To?(Do=!0,void a.close()):void(bo||(Io=!0,a.goTo(Ao().pid),Io=!1))},updateURL:function(){ko(),Io||(Eo?yo=setTimeout(Ro,800):Ro())}}}),i.extend(a,nn)};return e}),!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";var e=function(e,t){var n,o,i,a,r,l,s,u,c,d,p,m,f,h,v,g,y,w,x,b=this,I=!1,C=!0,T=!0,E={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / "},D=function(e){if(g)return!0;e=e||window.event,v.timeToIdle&&v.mouseUsed&&!c&&P();for(var n,o,i=e.target||e.srcElement,a=i.className,r=0;r<Y.length;r++)n=Y[r],n.onTap&&a.indexOf("pswp__"+n.name)>-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),g=!0;var l=t.features.isOldAndroid?600:30;y=setTimeout(function(){g=!1},l)}},S=function(){return!e.likelyTouchDevice||v.mouseUsed||screen.width>1200},_=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},M=function(){var e=1===v.getNumItemsFn();e!==h&&(_(o,"ui--one-slide",e),h=e)},F=function(){_(s,"share-modal--hidden",T)},O=function(){return T=!T,T?(t.removeClass(s,"pswp__share-modal--fade-in"),setTimeout(function(){T&&F()},300)):(F(),setTimeout(function(){T||t.addClass(s,"pswp__share-modal--fade-in")},30)),T||A(),!1},k=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),n.href?n.hasAttribute("download")?!0:(window.open(n.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)),T||O(),!1):!1},A=function(){for(var e,t,n,o,i,a="",r=0;r<v.shareButtons.length;r++)e=v.shareButtons[r],n=v.getImageURLForShare(e),o=v.getPageURLForShare(e),i=v.getTextForShare(e),t=e.url.replace("{{url}}",encodeURIComponent(o)).replace("{{image_url}}",encodeURIComponent(n)).replace("{{raw_image_url}}",n).replace("{{text}}",encodeURIComponent(i)),a+='<a href="'+t+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",v.parseShareButtonOut&&(a=v.parseShareButtonOut(e,a));s.children[0].innerHTML=a,s.children[0].onclick=k},R=function(e){for(var n=0;n<v.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+v.closeElClasses[n]))return!0},L=0,P=function(){clearTimeout(x),L=0,c&&b.setIdle(!1)},Z=function(e){e=e?e:window.event;var t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(x),x=setTimeout(function(){b.setIdle(!0)},v.timeToIdleOutside))},N=function(){v.fullscreenEl&&(n||(n=b.getFullscreenAPI()),n?(t.bind(document,n.eventK,b.updateFullscreen),b.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs"))},z=function(){v.preloaderEl&&(U(!0),d("beforeChange",function(){clearTimeout(f),f=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&U(!1):U(!0)},v.loadingIndicatorDelay)}),d("imageLoadComplete",function(t,n){e.currItem===n&&U(!0)}))},U=function(e){m!==e&&(_(p,"preloader--active",!e),m=e)},K=function(e){var n=e.vGap;if(S()){var r=v.barsSize;if(v.captionEl&&"auto"===r.bottom)if(a||(a=t.createEl("pswp__caption pswp__caption--fake"),a.appendChild(t.createEl("pswp__caption__center")),o.insertBefore(a,i),t.addClass(o,"pswp__ui--fit")),v.addCaptionHTMLFn(e,a,!0)){var l=a.clientHeight;n.bottom=parseInt(l,10)||44}else n.bottom=r.top;else n.bottom="auto"===r.bottom?0:r.bottom;n.top=r.top}else n.top=n.bottom=0},B=function(){v.timeToIdle&&d("mouseUsed",function(){t.bind(document,"mousemove",P),t.bind(document,"mouseout",Z),w=setInterval(function(){L++,2===L&&b.setIdle(!0)},v.timeToIdle/2)})},H=function(){d("onVerticalDrag",function(e){C&&.95>e?b.hideControls():!C&&e>=.95&&b.showControls()});var e;d("onPinchClose",function(t){C&&.9>t?(b.hideControls(),e=!0):e&&!C&&t>.9&&b.showControls()}),d("zoomGestureEnded",function(){e=!1,e&&!C&&b.showControls()})},Y=[{name:"caption",option:"captionEl",onInit:function(e){i=e}},{name:"share-modal",option:"shareEl",onInit:function(e){s=e},onTap:function(){O()}},{name:"button--share",option:"shareEl",onInit:function(e){l=e},onTap:function(){O()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){r=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){p=e}}],W=function(){var e,n,i,a=function(o){if(o)for(var a=o.length,r=0;a>r;r++){e=o[r],n=e.className;for(var l=0;l<Y.length;l++)i=Y[l],n.indexOf("pswp__"+i.name)>-1&&(v[i.option]?(t.removeClass(e,"pswp__element--disabled"),i.onInit&&i.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};a(o.children);var r=t.getChildByClass(o,"pswp__top-bar");r&&a(r.children)};b.init=function(){t.extend(e.options,E,!0),v=e.options,o=t.getChildByClass(e.scrollWrap,"pswp__ui"),d=e.listen,H(),d("beforeChange",b.update),d("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(v.getDoubleTapZoom(!1,e.currItem),t,333)}),d("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.className&&e.type.indexOf("mouse")>-1&&(o.className.indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),d("bindEvents",function(){t.bind(o,"pswpTap click",D),t.bind(e.scrollWrap,"pswpTap",b.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",b.onMouseOver)}),d("unbindEvents",function(){T||O(),w&&clearInterval(w),t.unbind(document,"mouseout",Z),t.unbind(document,"mousemove",P),t.unbind(o,"pswpTap click",D),t.unbind(e.scrollWrap,"pswpTap",b.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",b.onMouseOver),n&&(t.unbind(document,n.eventK,b.updateFullscreen),n.isFullscreen()&&(v.hideAnimationDuration=0,n.exit()),n=null)}),d("destroy",function(){v.captionEl&&(a&&o.removeChild(a),t.removeClass(i,"pswp__caption--empty")),s&&(s.children[0].onclick=null),t.removeClass(o,"pswp__ui--over-close"),t.addClass(o,"pswp__ui--hidden"),b.setIdle(!1)}),v.showAnimationDuration||t.removeClass(o,"pswp__ui--hidden"),d("initialZoomIn",function(){v.showAnimationDuration&&t.removeClass(o,"pswp__ui--hidden")}),d("initialZoomOut",function(){t.addClass(o,"pswp__ui--hidden")}),d("parseVerticalMargin",K),W(),v.shareEl&&l&&s&&(T=!0),M(),B(),N(),z()},b.setIdle=function(e){c=e,_(o,"ui--idle",e)},b.update=function(){C&&e.currItem?(b.updateIndexIndicator(),v.captionEl&&(v.addCaptionHTMLFn(e.currItem,i),_(i,"caption--empty",!e.currItem.title)),I=!0):I=!1,T||O(),M()},b.updateFullscreen=function(o){o&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},b.updateIndexIndicator=function(){v.counterEl&&(r.innerHTML=e.getCurrentIndex()+1+v.indexIndicatorSep+v.getNumItemsFn())},b.onGlobalTap=function(n){n=n||window.event;var o=n.target||n.srcElement;if(!g)if(n.detail&&"mouse"===n.detail.pointerType){if(R(o))return void e.close();t.hasClass(o,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?v.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(v.tapToToggleControls&&(C?b.hideControls():b.showControls()),v.tapToClose&&(t.hasClass(o,"pswp__img")||R(o)))return void e.close()},b.onMouseOver=function(e){e=e||window.event;var t=e.target||e.srcElement;_(o,"ui--over-close",R(t))},b.hideControls=function(){t.addClass(o,"pswp__ui--hidden"),C=!1},b.showControls=function(){C=!0,I||b.update(),t.removeClass(o,"pswp__ui--hidden")},b.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},b.getFullscreenAPI=function(){var t,n=document.documentElement,o="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:o}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+o}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+o}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){return u=v.closeOnScroll,v.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?e.template[this.enterK]():void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return v.closeOnScroll=u,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}};return e});var initPhotoSwipeFromDOM=function(e){for(var t=function(e){for(var t,n,o,i,a=e.childNodes,r=a.length,l=[],s=0;r>s;s++)t=a[s],1===t.nodeType&&(n=t.children[0],o=n.getAttribute("data-size").split("x"),i={src:n.getAttribute("href"),w:parseInt(o[0],10),h:parseInt(o[1],10)},t.children.length>1&&(i.title=t.children[1].innerHTML),n.children.length>0&&(i.msrc=n.children[0].getAttribute("src")),i.el=t,l.push(i));return l},n=function c(e,t){return e&&(t(e)?e:c(e.parentNode,t))},o=function(e){e=e||window.event,e.preventDefault?e.preventDefault():e.returnValue=!1;var t=e.target||e.srcElement,o=n(t,function(e){return e.tagName&&"FIGURE"===e.tagName.toUpperCase()});if(o){for(var i,r=o.parentNode,l=o.parentNode.childNodes,s=l.length,u=0,c=0;s>c;c++)if(1===l[c].nodeType){if(l[c]===o){i=u;break}u++}return i>=0&&a(i,r),!1}},i=function(){var e=window.location.hash.substring(1),t={};if(e.length<5)return t;for(var n=e.split("&"),o=0;o<n.length;o++)if(n[o]){var i=n[o].split("=");i.length<2||(t[i[0]]=i[1])}return t.gid&&(t.gid=parseInt(t.gid,10)),t},a=function(e,n,o,i){var a,r,l,s=document.querySelectorAll(".pswp")[0];if(l=t(n),r={galleryUID:n.getAttribute("data-pswp-uid"),getThumbBoundsFn:function(e){var t=l[e].el.getElementsByTagName("img")[0],n=window.pageYOffset||document.documentElement.scrollTop,o=t.getBoundingClientRect();return{x:o.left,y:o.top+n,w:o.width}}},i)if(r.galleryPIDs){for(var u=0;u<l.length;u++)if(l[u].pid==e){r.index=u;break}}else r.index=parseInt(e,10)-1;else r.index=parseInt(e,10);isNaN(r.index)||(o&&(r.showAnimationDuration=0),a=new PhotoSwipe(s,PhotoSwipeUI_Default,l,r),a.init())},r=document.querySelectorAll(e),l=0,s=r.length;s>l;l++)r[l].setAttribute("data-pswp-uid",l+1),r[l].onclick=o;var u=i();u.pid&&u.gid&&a(u.pid,r[u.gid-1],!0,!0)};initPhotoSwipeFromDOM(".my-gallery");