1!function(e){"function"==typeof define&&define.amd?define("photoswipe",e):e()}(function(){"use strict";function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var e,t;e=window,t=function(){return function(p,Z,t,z){function e(){return{x:0,y:0}}function N(e,t){g.extend(y,t.publicMethods),Ye.push(e)}function U(e){var t=k();return t-1<e?e-t:e<0?t+e:e}function a(e,t){return Ve[e]||(Ve[e]=[]),Ve[e].push(t)}function H(e,t,n,o){o===y.currItem.initialZoomLevel?n[e]=y.currItem.initialPosition[e]:(n[e]=Je(e,o),n[e]>t.min[e]?n[e]=t.min[e]:n[e]<t.max[e]&&(n[e]=t.max[e]))}function K(e){var t="";w.escKey&&27===e.keyCode?t="close":w.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,y[t]())}function W(e){e&&(_e||De||h||Te)&&(e.preventDefault(),e.stopPropagation())}function B(){y.setScrollOffset(0,g.getScrollY())}function Y(e){var t;"mousedown"===e.type&&0<e.button||(Jt?e.preventDefault():Ee&&"mousedown"===e.type||(Ft(e,!0)&&e.preventDefault(),I("pointerDown"),pe&&((t=g.arraySearch(ht,e.pointerId,"id"))<0&&(t=ht.length),ht[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=Nt(e)).length,u=null,ut(),s&&1!==e||(s=Le=!0,g.bind(window,J,y),Ie=Ze=Re=Te=Ae=_e=Se=De=!1,ke=null,I("firstTouchStart",t),D(He,x),Ue.x=Ue.y=0,D(F,t[0]),D(ft,F),gt.x=b.x*Ke,yt=[{x:F.x,y:F.y}],be=ve=T(),ot(f,!0),St(),Dt()),!c&&1<e&&!h&&!Ae&&(te=f,c=Se=!(De=!1),Ue.y=Ue.x=0,D(He,x),D(M,t[0]),D(mt,t[1]),kt(M,mt,It),Ct.x=Math.abs(It.x)-x.x,Ct.y=Math.abs(It.y)-x.y,Fe=Et(M,mt))))}function G(e){var t;e.preventDefault(),pe&&-1<(t=g.arraySearch(ht,e.pointerId,"id"))&&((t=ht[t]).x=e.pageX,t.y=e.pageY),s&&(t=Nt(e),ke||_e||c?u=t:O.x!==b.x*Ke?ke="h":(e=Math.abs(t[0].x-F.x)-Math.abs(t[0].y-F.y),Math.abs(e)>=pt&&(ke=0<e?"h":"v",u=t)))}function q(e){if(l.isOldAndroid){if(Ee&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Ee),Ee=setTimeout(function(){Ee=0},600))}I("pointerUp"),Ft(e,!1)&&e.preventDefault(),pe&&-1<(a=g.arraySearch(ht,e.pointerId,"id"))&&(t=ht.splice(a,1)[0],navigator.msPointerEnabled&&(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type)||(t.type=e.pointerType||"mouse"));var t,n=(a=Nt(e)).length;if(2===(n="mouseup"===e.type?0:n))return!(u=null);1===n&&D(ft,a[0]),0!==n||ke||h||(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"})),I("touchRelease",e,t));var o,i,a=-1;if(0===n&&(s=!1,g.unbind(window,J,y),St(),c?a=0:-1!==bt&&(a=T()-bt)),bt
1=1===n?T():-1,e=-1!==a&&a<150?"zoom":"swipe",c&&n<2&&(c=!1,1===n&&(e="zoomPointerUp"),I("zoomGestureEnded")),u=null,_e||De||h||Te)if(ut(),(Ce=Ce||Kt()).calculateSwipeSpeed("x"),Te)Rt()<w.verticalDragRange?y.close():(o=x.y,i=Pe,ct("verticalDrag",0,1,300,g.easing.cubic.out,function(e){x.y=(y.currItem.initialPosition.y-o)*e+o,E((1-i)*e+i),S()}),I("onVerticalDrag",1));else{if((Ae||h)&&0===n){if(Bt(e,Ce))return;e="zoomPointerUp"}h||("swipe"!==e?Gt():!Ae&&f>y.currItem.fitRatio&&Wt(Ce))}}var V,X,j,m,$,Q,J,ee,o,f,te,ne,oe,ie,ae,r,re,le,se,ue,ce,de,pe,i,me,fe,he,ge,ye,we,l,xe,ve,be,Ce,Ie,Te,Ee,s,Se,De,_e,Me,Ae,u,c,Fe,d,Oe,h,ke,Le,Re,Pe,Ze,ze,g={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){t=document.createElement(t||"div");return e&&(t.className=e),t},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){g.bind(e,t,n,!0)},removeClass:function(e,t){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){g.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(g.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)!t.hasOwnProperty(o)||n&&e.hasOwnProperty(o)||(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(g.features)return g.features;for(var e,t,n,o,i,a=g.createEl().style,r="",l={},s=(l.oldIE=document.all&&!document.addEventListener,l.touch="ontouchstart"in window,window.requestAnimationFrame&&(l.raf=window.requestAnimationFrame,l.caf=window.cancelAnimationFrame),l.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,l.pointerEvent||(e=navigator.userAgent,/iP(hone|od)/.test(navigator.platform)&&(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(l.isOldIOSPhone=!0),t=(t=e.match(/Android\s([0-9\.]*)/))?t[1]:0,1<=(t=parseFloat(t))&&(t<4.4&&(l.isOldAndroid=!0),l.androidVersion=t),l.isMobileOpera=/opera mini|o
1pera mobi/i.test(e)),["transform","perspective","animationName"]),u=["","webkit","Moz","ms","O"],c=0;c<4;c++){for(var r=u[c],d=0;d<3;d++)n=s[d],o=r+(r?n.charAt(0).toUpperCase()+n.slice(1):n),!l[n]&&o in a&&(l[n]=o);r&&!l.raf&&(r=r.toLowerCase(),l.raf=window[r+"RequestAnimationFrame"],l.raf)&&(l.caf=window[r+"CancelAnimationFrame"]||window[r+"CancelRequestAnimationFrame"])}return l.raf||(i=0,l.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-i)),o=window.setTimeout(function(){e(t+n)},n);return i=t+n,o},l.caf=function(e){clearTimeout(e)}),l.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,g.features=l}},y=(g.detectFeatures(),g.features.oldIE&&(g.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"===_n(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)}),this),Ne=25,w={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,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||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"},Ue=(g.extend(w,z),e()),He=e(),x=e(),v={},Ke=0,We={},b=e(),C=0,Be=!0,Ye=[],Ge={},qe=!1,Ve={},I=function(e){var t=Ve[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(y,n)}},T=function(){return(new Date).getTime()},E=function(e){Pe=e,y.bg.style.opacity=e*w.bgOpacity},Xe=function(e,t,n,o,i){(!qe||i&&i!==y.currItem)&&(o/=(i||y.currItem).fitRatio),e[de]=ne+t+"px, "+n+"px"+oe+" scale("+o+")"},S=function(e){Oe&&(e&&(f>y.currItem.fitRatio?qe||(un(y.currItem,!1,!0),qe=!0):qe&&(un(y.currItem),qe=!1)),Xe(Oe,x.x,x.y,f))},je=function(e){e.container&&Xe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},$e=function(e,t){t[de]=ne+e+"px, 0px"+oe},Qe=function(e,t){var n;!w.loop&&t&&(t=m+(b.x*Ke-e)/b.x,n=Math.round(e-O.x),t<0&&0<n||t>=k()-1&&n<0)&&(e=O.x+n*w.mainScrollEndFriction),O.x=e,$e(e,$)},Je=function(e,t){var n=Ct[e]-We[e];return He[e]+Ue[e]+n-t/te*n},D=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},et=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},tt=null,nt=function e(){tt&&(g.unbind(document,"mousemove",e),g.addClass(p,"pswp--has_mouse"),w.mouseUsed=!0,I("mouseUsed")),tt=setTimeout(function(){tt=null},100)},ot=function(e,t){e=ln(y.currItem,v,e);return t&&(d=e),e},it=function(e){return(e=e||y.currItem).initialZoomLevel},at=function(e){return 0<(e=e||y.currItem).w?w.maxSpreadZoom:1},_={},rt=0,lt=function(e){_[e]&&(_[e].raf&&fe(_[e].raf),rt--,delete _[e])},st=function(e){_[e]&<(e),_[e]||(rt++,_[e]={})},ut=function(){for(var e in _)_.hasOwnProperty(e)&<(e)},ct=function(t,n,o,i,a,r,l){var s,u=T();st(t),function e(){_[t]&&(s=T()-u,i<=s?(lt(t),r(o),l&&l()):(r((o-n)*a(s/i)+n),_[t].raf=me(e)))}()},z={shout:I,listen:a,viewportSize:v,options:w,isMainScrollAnimating:function(){return h},getZoomLevel:function(){return f},getCurrentIndex:function(){return m},isDragging:function(){return s},isZooming:function(){return c},setScrollOffset:function(e,t){We.x=e,we=We.y=t,I("updateScrollOffset",We)},applyZoomPan:function(e,t,n,o){x.x=t,x.y=n,f=e,S(o)},init:function(){if(!V&&!X){y.framework=g,y.template=p,y.bg=g.getChildByClass(p,"pswp__bg"),he=p.className,V=!0,l=g.detectFeatures(),me=l.raf,fe=l.caf,de=l.transform,ye=l.oldIE,y.scrollWrap=g.getChildByClass(p,"pswp__scroll-wrap"),y.container=g.getChildByClass(y.scrollWrap,"pswp__container"),$=y.container.style,y.itemHolders=r=[{el:y.container.children[0],wrap:0,index:-1},{el:y.container.children[1],wrap:0,index:-1},{el:y.container.children[2],wrap:0,index:-1}],r[0].el.style.display=r[2].el.style.display="none",de?(t=l.perspective&&!i,ne="translate"+(t?"3d(":"("),oe=l.perspective?", 0px)":")"):(de="left",g.addClass(p,"pswp--ie"),$e=function(e,t){t.left=e+"px"},je=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,o=t*e.w,t=t*e.h;n.width=o+"px",n.height=t+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},S=function(){var e,t,n,o;Oe&&(e=Oe,n=(o=1<(t=y.currItem).fitRatio?1:t.fitRatio)*t.w,o=o*t.h,e.width=n+"px",e.height=o+"px",e.left=x.x+"px",e.top=x.y+"px")}),o={resize:y.updateSize,orientationchange:function(){clearTimeout(xe),xe=setTimeout(function(){v.x!==y.scrollWrap.clientWidth&&y.updateSize()},500)},scroll:B,keydown:K,click:W};var e,t=l.isOldIOSPhone||l.isOldAndroid||l.isMobileOpera;for(l.animationName&&l.transform&&!t||(w.showAnimationDuration=w.hideAnimationDuration=0),e=0;e<Ye.length;e++)y["init"+Ye[e]]();Z&&(y.ui=new Z(y,g)).init(),I("firstUpdate"),m=m||w.index||0,(isNaN(m)||m<0||m>=k())&&(m=0),y.currItem=en(m),(l.isOldIOSPhone||l.isOldAndroid)&&(Be=!1),p.setAttribute("aria-hidden","false"),w.modal&&(Be?p.style.position="fixed":(p.style.position="absolute",p.style.top=g.getScrollY()+"px")),void 0===we&&(I("initialLayout"),we=ge=g.getScrollY());var n="pswp--open ";for(w.mainClass&&(n+=w.mainClass+" "),w.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=i?"pswp--touch":"pswp--notouch")+(l.animationName?" pswp--css_animation":""))+(l.svg?" pswp--svg":""),g.addClass(p,n),y.updateSize(),Q=-1,C=null,e=0;e<3;e++)$e((e+Q)*b.x,r[e].el.style);
1ye||g.bind(y.scrollWrap,ee,y),a("initialZoomInEnd",function(){y.setContent(r[0],m-1),y.setContent(r[2],m+1),r[0].el.style.display=r[2].el.style.display="block",w.focus&&p.focus(),g.bind(document,"keydown",y),l.transform&&g.bind(y.scrollWrap,"click",y),w.mouseUsed||g.bind(document,"mousemove",nt),g.bind(window,"resize scroll orientationchange",y),I("bindEvents")}),y.setContent(r[1],m),y.updateCurrItem(),I("afterInit"),Be||(ie=setInterval(function(){rt||s||c||f!==y.currItem.initialZoomLevel||y.updateSize()},1e3)),g.addClass(p,"pswp--visible")}},close:function(){V&&(X=!(V=!1),I("close"),g.unbind(window,"resize scroll orientationchange",y),g.unbind(window,"scroll",o.scroll),g.unbind(document,"keydown",y),g.unbind(document,"mousemove",nt),l.transform&&g.unbind(y.scrollWrap,"click",y),s&&g.unbind(window,J,y),clearTimeout(xe),I("unbindEvents"),tn(y.currItem,null,!0,y.destroy))},destroy:function(){I("destroy"),jt&&clearTimeout(jt),p.setAttribute("aria-hidden","true"),p.className=he,ie&&clearInterval(ie),g.unbind(y.scrollWrap,ee,y),g.unbind(window,"scroll",y),St(),ut(),Ve=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:e<d.max.x&&(e=d.max.x),t>d.min.y?t=d.min.y:t<d.max.y&&(t=d.max.y)),x.x=e,x.y=t,S()},handleEvent:function(e){e=e||window.event,o[e.type]&&o[e.type](e)},goTo:function(e){var t=(e=U(e))-m;C=t,m=e,y.currItem=en(m),Ke-=t,Qe(b.x*Ke),ut(),h=!1,y.updateCurrItem()},next:function(){y.goTo(m+1)},prev:function(){y.goTo(m-1)},updateCurrZoomItem:function(e){var t;e&&I("beforeChange",0),Oe=r[1].el.children.length&&(t=r[1].el.children[0],g.hasClass(t,"pswp__zoom-wrap"))?t.style:null,d=y.currItem.bounds,te=f=y.currItem.initialZoomLevel,x.x=d.center.x,x.y=d.center.y,e&&I("afterChange")},invalidateCurrItems:function(){ae=!0;for(var e=0;e<3;e++)r[e].item&&(r[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==C){var t,n=Math.abs(C);if(!(e&&n<2)){y.currItem=en(m),qe=!1,I("beforeChange",C),3<=n&&(Q+=C+(0<C?-3:3),n=3);for(var o=0;o<n;o++)0<C?(t=r.shift(),r[2]=t,$e((++Q+2)*b.x,t.el.style),y.setContent(t,m-n+o+1+1)):(t=r.pop(),r.unshift(t),$e(--Q*b.x,t.el.style),y.setContent(t,m+n-o-1-1));Oe&&1===Math.abs(C)&&(e=en(re)).initialZoomLevel!==f&&(ln(e,v),un(e),je(e)),C=0,y.updateCurrZoomItem(),re=m,I("afterChange")}}},updateSize:function(e){if(!Be&&w.modal){var t=g.getScrollY();if(we!==t&&(p.style.top=t+"px",we=t),!e&&Ge.x===window.innerWidth&&Ge.y===window.innerHeight)return;Ge.x=window.innerWidth,Ge.y=window.innerHeight,p.style.height=Ge.y+"px"}if(v.x=y.scrollWrap.clientWidth,v.y=y.scrollWrap.clientHeight,B(),b.x=v.x+Math.round(v.x*w.spacing),b.y=v.y,Qe(b.x*Ke),I("beforeResize"),void 0!==Q){for(var n,o,i,a=0;a<3;a++)n=r[a],$e((a+Q)*b.x,n.el.style),i=m+a-1,w.loop&&2<k()&&(i=U(i)),(o=en(i))&&(ae||o.needsUpdate||!o.bounds)?(y.cleanSlide(o),y.setContent(n,i),1===a&&(y.currItem=o,y.updateCurrZoomItem(!0)),o.needsUpdate=!1):-1===n.index&&0<=i&&y.setContent(n,i),o&&o.container&&(ln(o,v),un(o),je(o));ae=!1}te=f=y.currItem.initialZoomLevel,(d=y.currItem.bounds)&&(x.x=d.center.x,x.y=d.center.y,S(!0)),I("resize")},zoomTo:function(t,e,n,o,i){e&&(te=f,Ct.x=Math.abs(e.x)-x.x,Ct.y=Math.abs(e.y)-x.y,D(He,x));function a(e){1===e?(f=t,x.x=r.x,x.y=r.y):(f=(t-l)*e+l,x.x=(r.x-s.x)*e+s.x,x.y=(r.y-s.y)*e+s.y),i&&i(e),S(1===e)}var e=ot(t,!1),r={},l=(H("x",e,r,t),H("y",e,r,t),f),s={x:x.x,y:x.y};et(r);n?ct("customZoomTo",0,1,n,o||g.easing.sine.inOut,a):a(1)}},dt=30,pt=10,M={},mt={},A={},F={},ft={},ht=[],gt={},yt=[],wt={},xt=0,vt=e(),bt=0,O=e(),Ct=e(),It=e(),Tt=function(e,t){return e.x===t.x&&e.y===t.y},Et=function(e,t){return wt.x=Math.abs(e.x-t.x),wt.y=Math.abs(e.y-t.y),Math.sqrt(wt.x*wt.x+wt.y*wt.y)},St=function(){Me&&(fe(Me),Me=null)},Dt=function e(){s&&(Me=me(e),Ht())},_t=function(){return!("fit"===w.scaleMode&&f===y.currItem.initialZoomLevel)},Mt=function e(t,n){return!(!t||t===document||t.getAttribute("class")&&-1<t.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(n(t)?t:e(t.parentNode,n))},At={},Ft=function(e,t){return At.prevent=!Mt(e.target,w.isClickableElement),I("preventDragEvent",e,t,At),At.prevent},Ot=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},kt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Lt=function(e,t,n){var o;50<e-be&&((o=2<yt.length?yt.shift():{}).x=t,o.y=n,yt.push(o),be=e)},Rt=function(){var e=x.y-y.currItem.initialPosition.y;return 1-Math.abs(e/(v.y/2))},Pt={},Zt={},zt=[],Nt=function(e){for(;0<zt.length;)zt.pop();return pe?(ze=0,ht.forEach(function(e){0===ze?zt[0]=e:1===ze&&(zt[1]=e),ze++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(zt[0]=Ot(e.touches[0],Pt),1<e.touches.length)&&(zt[1]=Ot(e.touches[1],Zt)):(Pt.x=e.pageX,Pt.y=e.pageY,Pt.id="",zt[0]=Pt),zt},Ut=function(e,t){var n,o,i,a=x[e]+t[e],r=0<t[e],l=O.x+t.x,s=O.x-gt.x,u=a>d.min[e]||a<d.max[e]?w.panEndFriction:1,a=x[e]+t[e]*u;if((w.allowPanToNext||f===y.currItem.initialZoomLevel)&&(Oe?"h"!==ke||"x"!==e||De||(r?(a>d.min[e]&&(u=w.panEndFriction,d.min[e],n=d.min[e]-He[e]),(n<=0||s<0)&&1<k()?(i=l,s<0&&l>gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=a)):(a<d.max[e]&&(u=w.panEndFriction,d.max[e],n=He[e]-d.max[e]),(n<=0||0<s)&&1<k()?(i=l,0<s&&l<gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=a))):i=l,"x"===e))return void 0!==i&&(Qe(i,!0),Ae=i!==gt.x),d.min.x!==d.max.x&&(void 0!==o?x.x=o:Ae||(x.x+=t.x*u)),void 0!==i;h||Ae||f>y.currItem.fitRatio&&(x[e]+=t[e]*u)},Ht=function(){if(u){var e,t,n,o,i,a=u.length;if(0!==a)if(D(M,u[0]),A.x=M.x-F.x,A.y=M.y-F.y,c&&1<a)F.x=M.x,F.y=M.y,!A.x&&!A.y&&Tt(u[1],mt)||(D(mt,u[1]),De||(De=!0,I("zoomGestureStarted")),a=Et(M,mt),(e=Yt(a))>y.currItem.initialZoomLevel+y.currItem.initialZoomLevel/15&&(Ze=!0),t=1,n=it(),o=at
1(),e<n?w.pinchToClose&&!Ze&&te<=y.currItem.initialZoomLevel?(E(i=1-(n-e)/(n/1.2)),I("onPinchClose",i),Re=!0):e=n-(t=1<(t=(n-e)/n)?1:t)*(n/3):o<e&&(e=o+(t=1<(t=(e-o)/(6*n))?1:t)*n),t<0&&(t=0),kt(M,mt,vt),Ue.x+=vt.x-It.x,Ue.y+=vt.y-It.y,D(It,vt),x.x=Je("x",e),x.y=Je("y",e),Ie=f<e,f=e,S());else if(ke&&(Le&&(Le=!1,Math.abs(A.x)>=pt&&(A.x-=u[0].x-ft.x),Math.abs(A.y)>=pt)&&(A.y-=u[0].y-ft.y),F.x=M.x,F.y=M.y,0!==A.x||0!==A.y)){if("v"===ke&&w.closeOnVerticalDrag)if(!_t())return Ue.y+=A.y,x.y+=A.y,i=Rt(),Te=!0,I("onVerticalDrag",i),E(i),void S();Lt(T(),M.x,M.y),_e=!0,d=y.currItem.bounds,Ut("x",A)||(Ut("y",A),et(x),S())}}},Kt=function(){var t,n,o={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1<yt.length?(t=T()-be+50,yt[yt.length-2]):(t=T()-ve,ft))[e],o.lastFlickOffset[e]=F[e]-n,o.lastFlickDist[e]=Math.abs(o.lastFlickOffset[e]),20<o.lastFlickDist[e]?o.lastFlickSpeed[e]=o.lastFlickOffset[e]/t:o.lastFlickSpeed[e]=0,Math.abs(o.lastFlickSpeed[e])<.1&&(o.lastFlickSpeed[e]=0),o.slowDownRatio[e]=.95,o.slowDownRatioReverse[e]=1-o.slowDownRatio[e],o.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(t,e){o.backAnimStarted[t]||(x[t]>d.min[t]?o.backAnimDestination[t]=d.min[t]:x[t]<d.max[t]&&(o.backAnimDestination[t]=d.max[t]),void 0!==o.backAnimDestination[t]&&(o.slowDownRatio[t]=.7,o.slowDownRatioReverse[t]=1-o.slowDownRatio[t],o.speedDecelerationRatioAbs[t]<.05)&&(o.lastFlickSpeed[t]=0,o.backAnimStarted[t]=!0,ct("bounceZoomPan"+t,x[t],o.backAnimDestination[t],e||300,g.easing.sine.out,function(e){x[t]=e,S()})))},calculateAnimOffset:function(e){o.backAnimStarted[e]||(o.speedDecelerationRatio[e]=o.speedDecelerationRatio[e]*(o.slowDownRatio[e]+o.slowDownRatioReverse[e]-o.slowDownRatioReverse[e]*o.timeDiff/10),o.speedDecelerationRatioAbs[e]=Math.abs(o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]),o.distanceOffset[e]=o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]*o.timeDiff,x[e]+=o.distanceOffset[e])},panAnimLoop:function(){_.zoomPan&&(_.zoomPan.raf=me(o.panAnimLoop),o.now=T(),o.timeDiff=o.now-o.lastNow,o.lastNow=o.now,o.calculateAnimOffset("x"),o.calculateAnimOffset("y"),S(),o.calculateOverBoundsAnimOffset("x"),o.calculateOverBoundsAnimOffset("y"),o.speedDecelerationRatioAbs.x<.05)&&o.speedDecelerationRatioAbs.y<.05&&(x.x=Math.round(x.x),x.y=Math.round(x.y),S(),lt("zoomPan"))}};return o},Wt=function(e){if(e.calculateSwipeSpeed("y"),d=y.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05)return e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0;st("zoomPan"),e.lastNow=T(),e.panAnimLoop()},Bt=function(e,t){h||(xt=m),"swipe"===e&&(e=F.x-ft.x,a=t.lastFlickDist.x<10,dt<e&&(a||20<t.lastFlickOffset.x)?o=-1:e<-dt&&(a||t.lastFlickOffset.x<-20)&&(o=1)),o&&((m+=o)<0?(m=w.loop?k()-1:0,i=!0):m>=k()&&(m=w.loop?0:k()-1,i=!0),i&&!w.loop||(C+=o,Ke-=o,n=!0));var n,o,i,e=b.x*Ke,a=Math.abs(e-O.x),r=n||e>O.x==0<t.lastFlickSpeed.x?(r=0<Math.abs(t.lastFlickSpeed.x)?a/Math.abs(t.lastFlickSpeed.x):333,r=Math.min(r,400),Math.max(r,250)):333;return xt===m&&(n=!1),h=!0,I("mainScrollAnimStart"),ct("mainScroll",O.x,e,r,g.easing.cubic.out,Qe,function(){ut(),h=!1,xt=-1,!n&&xt===m||y.updateCurrItem(),I("mainScrollAnimComplete")}),n&&y.updateCurrItem(!0),n},Yt=function(e){return 1/Fe*e*te},Gt=function(){var e,t=f,n=it(),o=at(),i=(f<n?t=n:o<f&&(t=o),Pe);return Re&&!Ie&&!Ze&&f<n?y.close():(Re&&(e=function(e){E((1-i)*e+i)}),y.zoomTo(t,0,200,g.easing.cubic.out,e)),!0};N("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,o,i){le=e+t,se=e+n,ue=e+o,ce=i?e+i:""}(pe=l.pointerEvent)&&l.touch&&(l.touch=!1),pe?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):l.touch?(e("touch","start","move","end","cancel"),i=!0):e("mouse","down","move","up"),J=se+" "+ue+" "+ce,ee=le,pe&&!i&&(i=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),y.likelyTouchDevice=i,o[le]=Y,o[se]=G,o[ue]=q,ce&&(o[ce]=o[ue]),l.touch&&(ee+=" mousedown",J+=" mousemove mouseup",o.mousedown=o[le],o.mousemove=o[se],o.mouseup=o[ue]),i||(w.allowPanToNext=!1)}}});function qt(e){function t(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=g.createEl("pswp__img","img");n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src}function Vt(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=w.errorMsg.replace("%url%",e.
1src),1)}function Xt(){if(nn.length){for(var e,t=0;t<nn.length;t++)(e=nn[t]).holder.index===e.index&&sn(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}}var jt,$t,Qt,Jt,en,k,tn=function(a,e,r,t){function l(){lt("initialZoom"),r?(y.template.removeAttribute("style"),y.bg.removeAttribute("style")):(E(1),e&&(e.style.display="block"),g.addClass(p,"pswp--animated-in"),I("initialZoom"+(r?"OutEnd":"InEnd"))),t&&t(),Jt=!1}jt&&clearTimeout(jt),Qt=Jt=!0,a.initialLayout?(s=a.initialLayout,a.initialLayout=null):s=w.getThumbBoundsFn&&w.getThumbBoundsFn(m);var s,u,c,d=r?w.hideAnimationDuration:w.showAnimationDuration;d&&s&&void 0!==s.x?(u=j,c=!y.currItem.src||y.currItem.loadError||w.showHideOpacity,a.miniImg&&(a.miniImg.style.webkitBackfaceVisibility="hidden"),r||(f=s.w/a.w,x.x=s.x,x.y=s.y-ge,y[c?"template":"bg"].style.opacity=.001,S()),st("initialZoom"),r&&!u&&g.removeClass(p,"pswp--animated-in"),c&&(r?g[(u?"remove":"add")+"Class"](p,"pswp--animate_opacity"):setTimeout(function(){g.addClass(p,"pswp--animate_opacity")},30)),jt=setTimeout(function(){var t,n,o,i,e;I("initialZoom"+(r?"Out":"In")),r?(t=s.w/a.w,n={x:x.x,y:x.y},o=f,i=Pe,e=function(e){1===e?(f=t,x.x=s.x,x.y=s.y-we):(f=(t-o)*e+o,x.x=(s.x-n.x)*e+n.x,x.y=(s.y-we-n.y)*e+n.y),S(),c?p.style.opacity=1-e:E(i-e*i)},u?ct("initialZoom",0,1,d,g.easing.cubic.out,e,l):(e(1),jt=setTimeout(l,d+20))):(f=a.initialZoomLevel,D(x,a.initialPosition),S(),E(1),c?p.style.opacity=1:E(1),jt=setTimeout(l,d+20))},r?25:90)):(I("initialZoom"+(r?"Out":"In")),f=a.initialZoomLevel,D(x,a.initialPosition),S(),p.style.opacity=r?0:1,E(1),d?setTimeout(function(){l()},d):l())},L={},nn=[],on={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 $t.length}},an=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},rn=function(e,t,n){var o=e.bounds;o.center.x=Math.round((L.x-t)/2),o.center.y=Math.round((L.y-n)/2)+e.vGap.top,o.max.x=t>L.x?Math.round(L.x-t):o.center.x,o.max.y=n>L.y?Math.round(L.y-n)+e.vGap.top:o.center.y,o.min.x=t>L.x?0:o.center.x,o.min.y=n>L.y?e.vGap.top:o.center.y},ln=function(e,t,n){var o,i;return!e.src||e.loadError?(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=an(),e.initialPosition=e.bounds.center,e.bounds):((o=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),I("parseVerticalMargin",e)),L.x=t.x,L.y=t.y-e.vGap.top-e.vGap.bottom,o&&(t=L.x/e.w,i=L.y/e.h,e.fitRatio=t<i?t:i,"orig"===(t=w.scaleMode)?n=1:"fit"===t&&(n=e.fitRatio),e.initialZoomLevel=n=1<n?1:n,e.bounds||(e.bounds=an())),n?(rn(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0)},sn=function(e,t,n,o,i,a){t.loadError||o&&(t.imageAppended=!0,un(t,o,t===y.currItem&&qe),n.appendChild(o),a)&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},un=function(e,t,n){var o;e.src&&(t=t||e.container.lastChild,o=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=o+"px",e.placeholder.style.height=n+"px"),t.style.width=o+"px",t.style.height=n+"px")};N("Controller",{publicMethods:{lazyLoadItem:function(e){e=U(e);var t=en(e);t&&(!t.loaded&&!t.loading||ae)&&(I("gettingData",e,t),t.src)&&qt(t)},initController:function(){g.extend(w,on,!0),y.items=$t=t,en=y.getItemAt,(k=w.getNumItemsFn)()<3&&(w.loop=!1),a("beforeChange",function(e){for(var t=w.preload,n=null===e||0<=e,o=Math.min(t[0],k()),i=Math.min(t[1],k()),a=1;a<=(n?i:o);a++)y.lazyLoadItem(m+a);for(a=1;a<=(n?o:i);a++)y.lazyLoadItem(m-a)}),a("initialLayout",function(){y.currItem.initialLayout=w.getThumbBoundsFn&&w.getThumbBoundsFn(m)}),a("mainScrollAnimComplete",Xt),a("initialZoomInEnd",Xt),a("destroy",function(){for(var e,t=0;t<$t.length;t++)(e=$t[t]).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);nn=null})},getItemAt:function(e){return 0<=e&&void 0!==$t[e]&&$t[e]},allowProgressiveImg:function(){return w.forceProgressiveLoading||!i||w.mouseUsed||1200<screen.width},setContent:function(t,n){w.loop&&(n=U(n));var e,o,i,a=y.getItemAt(t.index),a=(a&&(a.container=null),y.getItemAt(n));a?(I("gettingData",n,a),t.index=n,o=(t.item=a).container=g.createEl("pswp__zoom-wrap"),!a.src&&a.html&&(a.html.tagName?o.appendChild(a.html):o.innerHTML=a.html),Vt(a),ln(a,v),!a.src||a.loadError||a.loaded?a.src&&!a.loadError&&((e=g.createEl("pswp__img","img")).style.opacity=1,e.src=a.src,un(a,e),sn(n,a,o,e)):(a.loadComplete=function(e){if(V){
1if(t&&t.index===n){if(Vt(e,!0))return e.loadComplete=e.img=null,ln(e,v),je(e),void(t.index===m&&y.updateCurrZoomItem());e.imageAppended?!Jt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):l.transform&&(h||Jt)?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t,clearPlaceholder:!0}):sn(n,e,o,e.img,h||Jt,!0)}e.loadComplete=null,e.img=null,I("imageLoadComplete",n,e)}},g.features.transform&&(i="pswp__img pswp__img--placeholder",i+=a.msrc?"":" pswp__img--placeholder--blank",i=g.createEl(i,a.msrc?"img":""),a.msrc&&(i.src=a.msrc),un(a,i),o.appendChild(i),a.placeholder=i),a.loading||qt(a),y.allowProgressiveImg()&&(!Qt&&l.transform?nn.push({item:a,baseDiv:o,img:a.img,index:n,holder:t}):sn(n,a,o,a.img,!0,!0))),Qt||n!==m?je(a):(Oe=o.style,tn(a,e||a.img)),t.el.innerHTML="",t.el.appendChild(o)):t.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function cn(e,t,n){var o=document.createEvent("CustomEvent"),t={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,t),e.target.dispatchEvent(o)}function dn(){hn&&clearTimeout(hn),yn&&clearTimeout(yn)}function pn(){var e=Dn(),t={};if(!(e.length<5)){var n,o=e.split("&");for(a=0;a<o.length;a++)o[a]&&((n=o[a].split("=")).length<2||(t[n[0]]=n[1]));if(w.galleryPIDs){for(var i=t.pid,a=t.pid=0;a<$t.length;a++)if($t[a].pid===i){t.pid=a;break}}else t.pid=parseInt(t.pid,10)-1;t.pid<0&&(t.pid=0)}return t}function mn(){var e,t;yn&&clearTimeout(yn),rt||s?yn=setTimeout(mn,500):(wn?clearTimeout(gn):wn=!0,t=m+1,(e=en(m)).hasOwnProperty("pid")&&(t=e.pid),e=n+"&gid="+w.galleryUID+"&pid="+t,bn||-1===P.hash.indexOf(e)&&(In=!0),t=P.href.split("#")[0]+"#"+e,Tn?"#"+e!==window.location.hash&&history[bn?"replaceState":"pushState"]("",document.title,t):bn?P.replace(t):P.hash=e,bn=!0,gn=setTimeout(function(){wn=!1},60))}var fn,R,hn,gn,yn,wn,xn,vn,n,bn,Cn,In,P,Tn,En={},Sn=(N("Tap",{publicMethods:{initTap:function(){a("firstTouchStart",y.onTapStart),a("touchRelease",y.onTapRelease),a("destroy",function(){En={},fn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(fn),fn=null)},onTapRelease:function(e,t){var n,o,i;!t||_e||Se||rt||(n=t,fn&&(clearTimeout(fn),fn=null,o=n,i=En,Math.abs(o.x-i.x)<Ne)&&Math.abs(o.y-i.y)<Ne?I("doubleTap",n):"mouse"===t.type?cn(e,t,"mouse"):"BUTTON"===e.target.tagName.toUpperCase()||g.hasClass(e.target,"pswp__single-tap")?cn(e,t):(D(En,n),fn=setTimeout(function(){cn(e,t),fn=null},300)))}}}),N("DesktopZoom",{publicMethods:{initDesktopZoom:function(){ye||(i?a("mouseUsed",function(){y.setupDesktopZoom()}):y.setupDesktopZoom(!0))},setupDesktopZoom:function(e){R={};var t="wheel mousewheel DOMMouseScroll";a("bindEvents",function(){g.bind(p,t,y.handleMouseWheel)}),a("unbindEvents",function(){R&&g.unbind(p,t,y.handleMouseWheel)}),y.mouseZoomedIn=!1;function n(){y.mouseZoomedIn&&(g.removeClass(p,"pswp--zoomed-in"),y.mouseZoomedIn=!1),f<1?g.addClass(p,"pswp--zoom-allowed"):g.removeClass(p,"pswp--zoom-allowed"),i()}var o,i=function(){o&&(g.removeClass(p,"pswp--dragging"),o=!1)};a("resize",n),a("afterChange",n),a("pointerDown",function(){y.mouseZoomedIn&&(o=!0,g.addClass(p,"pswp--dragging"))}),a("pointerUp",i),e||n()},handleMouseWheel:function(e){if(f<=y.currItem.fitRatio)return w.modal&&(!w.closeOnScroll||rt||s?e.preventDefault():de&&2<Math.abs(e.deltaY)&&(j=!0,y.close())),!0;if(e.stopPropagation(),R.x=0,"deltaX"in e)1===e.deltaMode?(R.x=18*e.deltaX,R.y=18*e.deltaY):(R.x=e.deltaX,R.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(R.x=-.16*e.wheelDeltaX),e.wheelDeltaY?R.y=-.16*e.wheelDeltaY:R.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;R.y=e.detail}ot(f,!0);var t=x.x-R.x,n=x.y-R.y;(w.modal||t<=d.min.x&&t>=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),y.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:v.x/2+We.x,y:v.y/2+We.y};var t=w.getDoubleTapZoom(!0,y.currItem),n=f===t;y.mouseZoomedIn=!n,y.zoomTo(n?y.currItem.initialZoomLevel:t,e,333),g[(n?"remove":"add")+"Class"](p,"pswp--zoomed-in")}}}),{history:!0,galleryUID:1}),Dn=function(){return P.hash.substring(1)};N("History",{publicMethods:{initHistory:function(){var e,t;g.extend(w,Sn,!0),w.history&&(P=window.location,bn=Cn=In=!1,n=Dn(),Tn="pushState"in history,-1<n.indexOf("gid=")&&(n=(n=n.split("&gid=")[0]).split("?gid=")[0]),a("afterChange",y.updateURL),a("unbindEvents",function(){g.unbind(window,"hashchange",y.onHashChange)}),e=function(){vn=!0,Cn||(In?history.back():n?P.hash=n:Tn?history.pushState("",document.title,P.pathname+P.search):P.hash=""),dn()},a("unbindEvents",function(){j&&e()}),a("destroy",function(){vn||e()}),a("firstUpdate",function(){m=pn().pid}),-1<(t=n.indexOf("pid="))&&"&"===(n=n.substring(0,t)).slice(-1)&&(n=n.slice(0,-1)),setTimeout(function(){V&&g.bind(window,"hashchange",y.onHashChange)},40))},onHashChange:function(){Dn()===n?(Cn=!0,y.close()):wn||(xn=!0,y.goTo(pn().pid),xn=!1)},updateURL:function(){dn(),xn||(bn?hn=setTimeout(mn,800):mn())}}}),g.extend(y,z)}},"function"==typeof define&&define.amd?define(t):"object"===("undefined"==typeof exports?"undefined":_n(exports))?module.exports=t():e.PhotoSwipe=t(),e=window,t=function(){return function(o,l){function e(e){if(S)return!0;e=e||window.event,E.timeToIdle&&E.mouseUsed&&!x&&s();for(var t,n,o=(e.target||e.srcElement).getAttribute("class")||"",i=0;i<R.length;i++)(t=R[i]).onTap&&-1<o.indexOf("pswp__"+t.name)&&(t.onTap(),n=!0);n&&(e.stopPropagation&&e.stopPropagation(),S=!0,e=l.features.isOldAndroid?600:30,setTimeout(function(){S=!1},e))}function n(){var e=1===E.getNumItemsFn();e!==T&&(k(p,"ui--one-slide",e),T=e)}function t(){k(y,"share-modal--hidden",O)}function i(){(O=!O)?(l.removeClass(y,"pswp__share-modal--fade-in"),setTimeout(function(){O&&t()},300)):(t(),setTimeout(function(){O||l.addClass(y,"pswp__share-modal--fade-in")},30)),O||a()}function a(){for(var e,t,n,o,i="",a=0;a<E.shareButtons.length;a++)e=E.shareButtons[a],t=E.getImageURLForShare(e),n=E.getPageURLForShare(e),o=E.getTextForShare(e),i+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(o))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>
1",E.parseShareButtonOut&&(i=E.parseShareButtonOut(e,i));y.children[0].innerHTML=i,y.children[0].onclick=N}function r(e){for(var t=0;t<E.closeElClasses.length;t++)if(l.hasClass(e,"pswp__"+E.closeElClasses[t]))return!0}function s(){clearTimeout(_),L=0,x&&M.setIdle(!1)}function u(e){(e=(e=e||window.event).relatedTarget||e.toElement)&&"HTML"!==e.nodeName||(clearTimeout(_),_=setTimeout(function(){M.setIdle(!0)},E.timeToIdleOutside))}function c(e){C!==e&&(k(b,"preloader--active",!e),C=e)}function P(e){var t,n=e.vGap;!o.likelyTouchDevice||E.mouseUsed||screen.width>E.fitControlsWidth?(t=E.barsSize,E.captionEl&&"auto"===t.bottom?(f||((f=l.createEl("pswp__caption pswp__caption--fake")).appendChild(l.createEl("pswp__caption__center")),p.insertBefore(f,m),l.addClass(p,"pswp__ui--fit")),E.addCaptionHTMLFn(e,f,!0)?(e=f.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}function Z(){function e(e){if(e)for(var t=e.length,n=0;n<t;n++){i=e[n],a=i.className;for(var o=0;o<R.length;o++)r=R[o],-1<a.indexOf("pswp__"+r.name)&&(E[r.option]?(l.removeClass(i,"pswp__element--disabled"),r.onInit&&r.onInit(i)):l.addClass(i,"pswp__element--disabled"))}}e(p.children);var i,a,r,t=l.getChildByClass(p,"pswp__top-bar");t&&e(t.children)}var d,p,m,f,h,g,y,w,x,v,b,C,I,T,E,S,D,_,M=this,A=!1,F=!0,O=!0,z={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 o.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return o.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},k=function(e,t,n){l[(n?"add":"remove")+"Class"](e,"pswp__"+t)},N=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)),O||i()}return!1},L=0,R=[{name:"caption",option:"captionEl",onInit:function(e){m=e}},{name:"share-modal",option:"shareEl",onInit:function(e){y=e},onTap:function(){i()}},{name:"button--share",option:"shareEl",onInit:function(e){g=e},onTap:function(){i()}},{name:"button--zoom",option:"zoomEl",onTap:o.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){h=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(){d.isFullscreen()?d.exit():d.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){b=e}}];M.init=function(){var t;l.extend(o.options,z,!0),E=o.options,p=l.getChildByClass(o.scrollWrap,"pswp__ui"),(v=o.listen)("onVerticalDrag",function(e){F&&e<.95?M.hideControls():!F&&.95<=e&&M.showControls()}),v("onPinchClose",function(e){F&&e<.9?(M.hideControls(),t=!0):t&&!F&&.9<e&&M.showControls()}),v("zoomGestureEnded",function(){(t=!1)&&!F&&M.showControls()}),v("beforeChange",M.update),v("doubleTap",function(e){var t=o.currItem.initialZoomLevel;o.getZoomLevel()!==t?o.zoomTo(t,e,333):o.zoomTo(E.getDoubleTapZoom(!1,o.currItem),e,333)}),v("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;
1o&&o.getAttribute("class")&&-1<e.type.indexOf("mouse")&&(0<o.getAttribute("class").indexOf("__caption")||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),v("bindEvents",function(){l.bind(p,"pswpTap click",e),l.bind(o.scrollWrap,"pswpTap",M.onGlobalTap),o.likelyTouchDevice||l.bind(o.scrollWrap,"mouseover",M.onMouseOver)}),v("unbindEvents",function(){O||i(),D&&clearInterval(D),l.unbind(document,"mouseout",u),l.unbind(document,"mousemove",s),l.unbind(p,"pswpTap click",e),l.unbind(o.scrollWrap,"pswpTap",M.onGlobalTap),l.unbind(o.scrollWrap,"mouseover",M.onMouseOver),d&&(l.unbind(document,d.eventK,M.updateFullscreen),d.isFullscreen()&&(E.hideAnimationDuration=0,d.exit()),d=null)}),v("destroy",function(){E.captionEl&&(f&&p.removeChild(f),l.removeClass(m,"pswp__caption--empty")),y&&(y.children[0].onclick=null),l.removeClass(p,"pswp__ui--over-close"),l.addClass(p,"pswp__ui--hidden"),M.setIdle(!1)}),E.showAnimationDuration||l.removeClass(p,"pswp__ui--hidden"),v("initialZoomIn",function(){E.showAnimationDuration&&l.removeClass(p,"pswp__ui--hidden")}),v("initialZoomOut",function(){l.addClass(p,"pswp__ui--hidden")}),v("parseVerticalMargin",P),Z(),E.shareEl&&g&&y&&(O=!0),n(),E.timeToIdle&&v("mouseUsed",function(){l.bind(document,"mousemove",s),l.bind(document,"mouseout",u),D=setInterval(function(){2===++L&&M.setIdle(!0)},E.timeToIdle/2)}),E.fullscreenEl&&!l.features.isOldAndroid&&((d=d||M.getFullscreenAPI())?(l.bind(document,d.eventK,M.updateFullscreen),M.updateFullscreen(),l.addClass(o.template,"pswp--supports-fs")):l.removeClass(o.template,"pswp--supports-fs")),E.preloaderEl&&(c(!0),v("beforeChange",function(){clearTimeout(I),I=setTimeout(function(){o.currItem&&o.currItem.loading?o.allowProgressiveImg()&&(!o.currItem.img||o.currItem.img.naturalWidth)||c(!1):c(!0)},E.loadingIndicatorDelay)}),v("imageLoadComplete",function(e,t){o.currItem===t&&c(!0)}))},M.setIdle=function(e){k(p,"ui--idle",x=e)},M.update=function(){A=!(!F||!o.currItem||(M.updateIndexIndicator(),E.captionEl&&(E.addCaptionHTMLFn(o.currItem,m),k(m,"caption--empty",!o.currItem.title)),0)),O||i(),n()},M.updateFullscreen=function(e){e&&setTimeout(function(){o.setScrollOffset(0,l.getScrollY())},50),l[(d.isFullscreen()?"add":"remove")+"Class"](o.template,"pswp--fs")},M.updateIndexIndicator=function(){E.counterEl&&(h.innerHTML=o.getCurrentIndex()+1+E.indexIndicatorSep+E.getNumItemsFn())},M.onGlobalTap=function(e){var t=(e=e||window.event).target||e.srcElement;S||(e.detail&&"mouse"===e.detail.pointerType?r(t)?o.close():l.hasClass(t,"pswp__img")&&(1===o.getZoomLevel()&&o.getZoomLevel()<=o.currItem.fitRatio?E.clickToCloseNonZoomable&&o.close():o.toggleDesktopZoom(e.detail.releasePoint)):(E.tapToToggleControls&&(F?M.hideControls():M.showControls()),E.tapToClose&&(l.hasClass(t,"pswp__img")||r(t))&&o.close()))},M.onMouseOver=function(e){e=(e=e||window.event).target||e.srcElement;k(p,"ui--over-close",r(e))},M.hideControls=function(){l.addClass(p,"pswp__ui--hidden"),F=!1},M.showControls=function(){F=!0,A||M.update(),l.removeClass(p,"pswp__ui--hidden")},M.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},M.getFullscreenAPI=function(){var e,t=document.documentElement,n="fullscreenchange";return t.requestFullscreen?e={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:n}:t.mozRequestFullScreen?e={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+n}:t.webkitRequestFullscreen?e={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+n}:t.msRequestFullscreen&&(e={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),e&&(e.enter=function(){if(w=E.closeOnScroll,E.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK)return o.template[this.enterK]();o.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},e.exit=function(){return E.closeOnScroll=w,document[this.exitK]()},e.isFullscreen=function(){return document[this.elementK]}),e}}},"function"==typeof define&&define.amd?define(t):"object"===("undefined"==typeof exports?"undefined":_n(exports))?module.exports=t():e.PhotoSwipeUI_Default=t(),MyListing.PhotoSwipe=function(n,e){var t=document.querySelectorAll(".pswp")[0],o=[CASE27.caption1,CASE27.caption2,CASE27.close_on_scroll],i=o[0],a=o[1];this.gallery=new PhotoSwipe(t,PhotoSwipeUI_Default,n,{index:e,showAnimationDuration:333,hideAnimationDuration:333,showHideOpacity:!0,history:!1,shareEl:!1,closeOnScroll:o[2],getThumbBoundsFn:function(e){var e=n[e].el,t=window.pageYOffset||document.documentElement.scrollTop,e=e.getBoundingClientRect();return{x:e.left,y:e.top+t,w:e.width}},addCaptionHTMLFn:function(e,t){function n(e,t,n){return(e.getAttribute(t)?e.getAttribute(t)+"<br>":"")+(null!=(t=e.getAttribute(n))?t:"")}var o="";return(o=e.el.children.length&&"IMG"===e.el.children[0].tagName?n(e.el.children[0],i,a):n(e.el,i,a))?(t.children[0].innerHTML=o,e.t
1itle=o,!0):(t.children[0].innerHTML="",!1)}}),this.gallery.init(),this.gallery.listen("imageLoadComplete",this.lazyload.bind(this))},MyListing.PhotoSwipe.prototype.lazyload=function(e,t){var n,o=this;(t.w<1||t.h<1)&&((n=new Image).onload=function(){t.w=this.width,t.el.dataset.fullWidth=this.width,t.h=this.height,t.el.dataset.fullHeight=this.height,o.gallery.invalidateCurrItems(),o.gallery.updateSize(!0)},n.src=t.src)},jQuery(function(t){t("body").on("click",".open-photo-swipe",function(e){e.preventDefault(),new MyListing.PhotoSwipe([{src:this.href,w:this.dataset.fullWidth||0,h:this.dataset.fullHeight||0,el:this}],0)}),t(".photoswipe-gallery .photoswipe-item").on("click",function(e){e.preventDefault();var n=[],o=this,i=0;t(this).parents(".photoswipe-gallery").find(".photoswipe-item").each(function(e,t){n.push({src:t.href||t.dataset.large_image,w:t.dataset.fullWidth||t.dataset.large_image_width||0,h:t.dataset.fullHeight||t.dataset.large_image_height||0,el:t}),t==o&&(i=e)}),new MyListing.PhotoSwipe(n,i)})})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.