HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.30
System: Linux iZj6c1151k3ad370bosnmsZ 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User: root (0)
PHP: 7.4.30
Disabled: NONE
Upload Files
File: /var/www/html/breadsecret.com/wp-content/themes/zeen/assets/js/photoswipe.min.js
!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(d,n,e,t){var u={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){u.bind(e,t,n,!0)},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(u.features)return u.features;var e=u.createEl().style,t="",n={};n.touch="ontouchstart"in window,window.requestAnimationFrame&&(n.raf=window.requestAnimationFrame,n.caf=window.cancelAnimationFrame);for(var o,i,a,r=["transform","perspective","animationName"],l=["","webkit","Moz","ms","O"],s=0;s<4;s++){for(var t=l[s],c=0;c<3;c++)o=r[c],i=t+(t?o.charAt(0).toUpperCase()+o.slice(1):o),!n[o]&&i in e&&(n[o]=i);t&&!n.raf&&(t=t.toLowerCase(),n.raf=window[t+"RequestAnimationFrame"],n.raf&&(n.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}return n.raf||(a=0,n.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-a)),o=window.setTimeout(function(){e(t+n)},n);return a=t+n,o},n.caf=function(e){clearTimeout(e)}),u.features=n}};u.detectFeatures();var m=this,p={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"};u.extend(p,t);function o(){return{x:0,y:0}}function i(e,t){u.extend(m,t.publicMethods),Ve.push(e)}function r(e){var t=Ut();return t-1<e?e-t:e<0?t+e:e}function a(e,t){return Je[e]||(Je[e]=[]),Je[e].push(t)}function f(e){var t=Je?Je[e]:null;if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(m,n)}}function y(){return(new Date).getTime()}function x(e){_e=e,m.bg.style.opacity=e*p.bgOpacity}function l(e,t,n,o,i){(!je||i&&i!==m.currItem)&&(o/=(i||m.currItem).fitRatio),e[se]=$+t+"px, "+n+"px"+ee+" scale("+o+")"}function h(e){Re&&(e&&(J>m.currItem.fitRatio?je||(Xt(m.currItem,!1,!0),je=!0):je&&(Xt(m.currItem),je=!1)),l(Re,Be.x,Be.y,J))}function s(e){e.container&&l(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)}function c(e,t){t[se]=$+e+"px, 0px"+ee}function g(e,t){var n;!p.loop&&t&&(n=H+(qe.x*He-e)/qe.x,t=Math.round(e-ft.x),(n<0&&0<t||n>=Ut()-1&&t<0)&&(e=ft.x+t*p.mainScrollEndFriction)),ft.x=e,c(e,X)}function v(e,t){var n=yt[e]-Xe[e];return Ye[e]+We[e]+n-t/Q*n}function w(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)}function b(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function D(e,t){return e=Ht(m.currItem,Ge,e),t&&(Oe=e),e}function I(e){return(e=e||m.currItem).initialZoomLevel}function M(e){return 0<(e=e||m.currItem).w?p.maxSpreadZoom:1}function T(e,t,n,o){return o===m.currItem.initialZoomLevel?(n[e]=m.currItem.initialPosition[e],!0):(n[e]=v(e,o),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))}function A(e){var t="";p.escKey&&27===e.keyCode?t="close":p.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,m[t]()))}function S(e){e&&(Ae||Te||Ee||De)&&(e.preventDefault(),e.stopPropagation())}function L(){m.setScrollOffset(0,u.getScrollY())}function k(e){et[e]&&(et[e].raf&&me(et[e].raf),tt--,delete et[e])}function C(e){et[e]&&k(e),et[e]||(tt++,et[e]={})}function Z(){for(var e in et)et.hasOwnProperty(e)&&k(e)}function O(e,t,n,o,i,a,r){var l,s=y();C(e);var c=function(){if(et[e]){if(l=y()-s,o<=l)return k(e),a(n),void(r&&r());a((n-t)*i(l/o)+t),et[e].raf=de(c)}};c()}function R(e,t){return ut.x=Math.abs(e.x-t.x),ut.y=Math.abs(e.y-t.y),Math.sqrt(ut.x*ut.x+ut.y*ut.y)}function E(e,t){return wt.prevent=!vt(e.target,p.isClickableElement),f("preventDragEvent",e,t,wt),wt.prevent}function F(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t}function P(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)}function z(){var e=Be.y-m.currItem.initialPosition.y;return 1-Math.abs(e/(Ge.y/2))}function _(e){for(;0<It.length;)It.pop();return ce?(Ue=0,lt.forEach(function(e){0===Ue?It[0]=e:1===Ue&&(It[1]=e),Ue++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(It[0]=F(e.touches[0],bt),1<e.touches.length&&(It[1]=F(e.touches[1],Dt))):(bt.x=e.pageX,bt.y=e.pageY,bt.id="",It[0]=bt),It}function N(e,t){var n,o,i,a=Be[e]+t[e],r=0<t[e],l=ft.x+t.x,s=ft.x-st.x,c=a>Oe.min[e]||a<Oe.max[e]?p.panEndFriction:1,a=Be[e]+t[e]*c;if((p.allowPanToNext||J===m.currItem.initialZoomLevel)&&(Re?"h"!==Fe||"x"!==e||Te||(r?(a>Oe.min[e]&&(c=p.panEndFriction,Oe.min[e],n=Oe.min[e]-Ye[e]),(n<=0||s<0)&&1<Ut()?(i=l,s<0&&l>st.x&&(i=st.x)):Oe.min.x!==Oe.max.x&&(o=a)):(a<Oe.max[e]&&(c=p.panEndFriction,Oe.max[e],n=Ye[e]-Oe.max[e]),(n<=0||0<s)&&1<Ut()?(i=l,0<s&&l<st.x&&(i=st.x)):Oe.min.x!==Oe.max.x&&(o=a))):i=l,"x"===e))return void 0!==i&&(g(i,!0),Le=i!==st.x),Oe.min.x!==Oe.max.x&&(void 0!==o?Be.x=o:Le||(Be.x+=t.x*c)),void 0!==i;Ee||Le||J>m.currItem.fitRatio&&(Be[e]+=t[e]*c)}function U(e){var t;"mousedown"===e.type&&0<e.button||(_t?e.preventDefault():(E(e,!0)&&e.preventDefault(),f("pointerDown"),ce&&((t=u.arraySearch(lt,e.pointerId,"id"))<0&&(t=lt.length),lt[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=_(e)).length,ke=null,Z(),Ie&&1!==e||(Ie=Pe=!0,u.bind(window,K,m),be=Ne=ze=De=Le=Ae=Me=Te=!1,Fe=null,f("firstTouchStart",t),w(Ye,Be),We.x=We.y=0,w(at,t[0]),w(rt,at),st.x=qe.x*He,ct=[{x:at.x,y:at.y}],ve=ge=y(),D(J,!0),ht(),gt()),!Ce&&1<e&&!Ee&&!Le&&(Q=J,Ce=Me=!(Te=!1),We.y=We.x=0,w(Ye,Be),w(nt,t[0]),w(ot,t[1]),P(nt,ot,xt),yt.x=Math.abs(xt.x)-Be.x,yt.y=Math.abs(xt.y)-Be.y,Ze=R(nt,ot))))}function W(e){var t,n;e.preventDefault(),!ce||-1<(t=u.arraySearch(lt,e.pointerId,"id"))&&((n=lt[t]).x=e.pageX,n.y=e.pageY),Ie&&(n=_(e),Fe||Ae||Ce?ke=n:ft.x!==qe.x*He?Fe="h":(e=Math.abs(n[0].x-at.x)-Math.abs(n[0].y-at.y),10<=Math.abs(e)&&(Fe=0<e?"h":"v",ke=n)))}function Y(e){f("pointerUp"),E(e,!1)&&e.preventDefault(),!ce||-1<(n=u.arraySearch(lt,e.pointerId,"id"))&&(a=lt.splice(n,1)[0],navigator.msPointerEnabled?(a.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],a.type||(a.type=e.pointerType||"mouse")):a.type=e.pointerType||"mouse");var t=_(e),n=t.length;if(2===(n="mouseup"===e.type?0:n))return!(ke=null);1===n&&w(rt,t[0]),0!==n||Fe||Ee||(a||("mouseup"===e.type?a={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(a={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),f("touchRelease",e,a));var o,i,a=-1;if(0===n&&(Ie=!1,u.unbind(window,K,m),ht(),Ce?a=0:-1!==pt&&(a=y()-pt)),pt=1===n?y():-1,a=-1!==a&&a<150?"zoom":"swipe",Ce&&n<2&&(Ce=!1,1===n&&(a="zoomPointerUp"),f("zoomGestureEnded")),ke=null,Ae||Te||Ee||De)if(Z(),(we=we||Tt()).calculateSwipeSpeed("x"),De)z()<p.verticalDragRange?m.close():(o=Be.y,i=_e,O("verticalDrag",0,1,300,u.easing.cubic.out,function(e){Be.y=(m.currItem.initialPosition.y-o)*e+o,x((1-i)*e+i),h()}),f("onVerticalDrag",1));else{if((Le||Ee)&&0===n){if(St(a,we))return;a="zoomPointerUp"}Ee||("swipe"===a?!Le&&J>m.currItem.fitRatio&&At(we):kt())}}var B,G,H,X,q,K,V,j,J,Q,$,ee,te,ne,oe,ie,ae,re,le,se,ce,ue,de,me,pe,fe,ye,xe,he,ge,ve,we,be,De,Ie,Me,Te,Ae,Se,Le,ke,Ce,Ze,Oe,Re,Ee,Fe,Pe,ze,_e,Ne,Ue,We=o(),Ye=o(),Be=o(),Ge={},He=0,Xe={},qe=o(),Ke=0,Ve=[],je=!1,Je={},Qe=null,$e=function(){Qe&&(u.unbind(document,"mousemove",$e),d.classList.add("pswp--has_mouse"),p.mouseUsed=!0,f("mouseUsed")),Qe=setTimeout(function(){Qe=null},100)},et={},tt=0,t={shout:f,listen:a,viewportSize:Ge,options:p,isMainScrollAnimating:function(){return Ee},getZoomLevel:function(){return J},getCurrentIndex:function(){return H},isDragging:function(){return Ie},isZooming:function(){return Ce},setScrollOffset:function(e,t){Xe.x=e,ye=Xe.y=t,f("updateScrollOffset",Xe)},applyZoomPan:function(e,t,n,o){Be.x=t,Be.y=n,J=e,h(o)},init:function(){if(!B&&!G){var e,t;for(m.framework=u,m.template=d,m.bg=d.querySelectorAll(".pswp__bg")[0],pe=d.className,B=!0,xe=u.detectFeatures(),de=xe.raf,me=xe.caf,se=xe.transform,m.scrollWrap=d.querySelectorAll(".pswp__scroll-wrap")[0],m.container=m.scrollWrap.querySelectorAll(".pswp__container")[0],X=m.container.style,m.itemHolders=ne=[{el:m.container.children[0],wrap:0,index:-1},{el:m.container.children[1],wrap:0,index:-1},{el:m.container.children[2],wrap:0,index:-1}],ne[0].el.style.display=ne[2].el.style.display="none",t=xe.perspective&&!ue,$="translate"+(t?"3d(":"("),ee=xe.perspective?", 0px)":")",j={resize:m.updateSize,orientationchange:function(){clearTimeout(he),he=setTimeout(function(){Ge.x!==m.scrollWrap.clientWidth&&m.updateSize()},500)},scroll:L,keydown:A,click:S},e=0;e<Ve.length;e++)m["init"+Ve[e]]();for(n&&(m.ui=new n(m,u)).init(),f("firstUpdate"),H=H||p.index||0,(isNaN(H)||H<0||H>=Ut())&&(H=0),m.currItem=Nt(H),d.setAttribute("aria-hidden","false"),p.modal&&(d.style.position="fixed"),void 0===ye&&(f("initialLayout"),ye=fe=u.getScrollY()),p.showHideOpacity&&d.classList.add("pswp--animate_opacity"),d.classList.add("pswp--open"),ue?d.classList.add("pswp--touch"):d.classList.add("pswp--notouch"),m.updateSize(),q=-1,Ke=null,e=0;e<3;e++)c((e+q)*qe.x,ne[e].el.style);u.bind(m.scrollWrap,V,m),a("initialZoomInEnd",function(){m.setContent(ne[0],H-1),m.setContent(ne[2],H+1),ne[0].el.style.display=ne[2].el.style.display="block",p.focus&&d.focus(),u.bind(document,"keydown",m),u.bind(m.scrollWrap,"click",m),p.mouseUsed||u.bind(document,"mousemove",$e),u.bind(window,"resize scroll orientationchange",m),f("bindEvents")}),m.setContent(ne[1],H),m.updateCurrItem(),f("afterInit"),d.classList.add("pswp--visible")}},close:function(){B&&(G=!(B=!1),f("close"),u.unbind(window,"resize scroll orientationchange",m),u.unbind(window,"scroll",j.scroll),u.unbind(document,"keydown",m),u.unbind(document,"mousemove",$e),u.unbind(m.scrollWrap,"click",m),Ie&&u.unbind(window,K,m),clearTimeout(he),f("unbindEvents"),Wt(m.currItem,null,!0,m.destroy))},destroy:function(){f("destroy"),Ft&&clearTimeout(Ft),d.setAttribute("aria-hidden","true"),d.className=pe,u.unbind(m.scrollWrap,V,m),u.unbind(window,"scroll",m),ht(),Z(),Je=null},panTo:function(e,t,n){n||(e>Oe.min.x?e=Oe.min.x:e<Oe.max.x&&(e=Oe.max.x),t>Oe.min.y?t=Oe.min.y:t<Oe.max.y&&(t=Oe.max.y)),Be.x=e,Be.y=t,h()},handleEvent:function(e){e=e||window.event,j[e.type]&&j[e.type](e)},goTo:function(e){var t=(e=r(e))-H;Ke=t,H=e,m.currItem=Nt(H),He-=t,g(qe.x*He),Z(),Ee=!1,m.updateCurrItem()},next:function(){m.goTo(H+1)},prev:function(){m.goTo(H-1)},updateCurrZoomItem:function(e){var t;e&&f("beforeChange",0),Re=ne[1].el.children.length?(t=ne[1].el.children[0]).classList.contains("pswp__zoom-wrap")?t.style:null:null,Oe=m.currItem.bounds,Q=J=m.currItem.initialZoomLevel,Be.x=Oe.center.x,Be.y=Oe.center.y,e&&f("afterChange")},invalidateCurrItems:function(){te=!0;for(var e=0;e<3;e++)ne[e].item&&(ne[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==Ke){var t,n=Math.abs(Ke);if(!(e&&n<2)){m.currItem=Nt(H),je=!1,f("beforeChange",Ke),3<=n&&(q+=Ke+(0<Ke?-3:3),n=3);for(var o=0;o<n;o++)0<Ke?(t=ne.shift(),ne[2]=t,c((++q+2)*qe.x,t.el.style),m.setContent(t,H-n+o+1+1)):(t=ne.pop(),ne.unshift(t),c(--q*qe.x,t.el.style),m.setContent(t,H+n-o-1-1));!Re||1!==Math.abs(Ke)||(e=Nt(oe)).initialZoomLevel!==J&&(Ht(e,Ge),Xt(e),s(e)),Ke=0,m.updateCurrZoomItem(),oe=H,f("afterChange")}}},updateSize:function(e){if(Ge.x=m.scrollWrap.clientWidth,Ge.y=m.scrollWrap.clientHeight,L(),qe.x=Ge.x+Math.round(Ge.x*p.spacing),qe.y=Ge.y,g(qe.x*He),f("beforeResize"),void 0!==q){for(var t,n,o,i=0;i<3;i++)t=ne[i],c((i+q)*qe.x,t.el.style),o=H+i-1,p.loop&&2<Ut()&&(o=r(o)),(n=Nt(o))&&(te||n.needsUpdate||!n.bounds)?(m.cleanSlide(n),m.setContent(t,o),1===i&&(m.currItem=n,m.updateCurrZoomItem(!0)),n.needsUpdate=!1):-1===t.index&&0<=o&&m.setContent(t,o),n&&n.container&&(Ht(n,Ge),Xt(n),s(n));te=!1}Q=J=m.currItem.initialZoomLevel,(Oe=m.currItem.bounds)&&(Be.x=Oe.center.x,Be.y=Oe.center.y,h(!0)),f("resize")},zoomTo:function(t,e,n,o,i){e&&(Q=J,yt.x=Math.abs(e.x)-Be.x,yt.y=Math.abs(e.y)-Be.y,w(Ye,Be));var e=D(t,!1),a={};T("x",e,a,t),T("y",e,a,t);var r=J,l=Be.x,s=Be.y;b(a);e=function(e){1===e?(J=t,Be.x=a.x,Be.y=a.y):(J=(t-r)*e+r,Be.x=(a.x-l)*e+l,Be.y=(a.y-s)*e+s),i&&i(e),h(1===e)};n?O("customZoomTo",0,1,n,o||u.easing.sine.inOut,e):e(1)}},nt={},ot={},it={},at={},rt={},lt=[],st={},ct=[],ut={},dt=0,mt=o(),pt=0,ft=o(),yt=o(),xt=o(),ht=function(){Se&&(me(Se),Se=null)},gt=function(){Ie&&(Se=de(gt),Mt())},vt=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:vt(e.parentNode,t)))},wt={},bt={},Dt={},It=[],Mt=function(){if(ke){var e,t,n,o,i,a=ke.length;if(0!==a)if(w(nt,ke[0]),it.x=nt.x-at.x,it.y=nt.y-at.y,Ce&&1<a)at.x=nt.x,at.y=nt.y,(it.x||it.y||(o=ke[1],i=ot,o.x!==i.x||o.y!==i.y))&&(w(ot,ke[1]),Te||(Te=!0,f("zoomGestureStarted")),t=R(nt,ot),(n=Lt(t))>m.currItem.initialZoomLevel+m.currItem.initialZoomLevel/15&&(Ne=!0),e=1,a=I(),o=M(),n<a?p.pinchToClose&&!Ne&&Q<=m.currItem.initialZoomLevel?(x(i=1-(a-n)/(a/1.2)),f("onPinchClose",i),ze=!0):n=a-(e=1<(e=(a-n)/a)?1:e)*(a/3):o<n&&(n=o+(e=1<(e=(n-o)/(6*a))?1:e)*a),e<0&&(e=0),P(nt,ot,mt),We.x+=mt.x-xt.x,We.y+=mt.y-xt.y,w(xt,mt),Be.x=v("x",n),Be.y=v("y",n),be=J<n,J=n,h());else if(Fe&&(Pe&&(Pe=!1,10<=Math.abs(it.x)&&(it.x-=ke[0].x-rt.x),10<=Math.abs(it.y)&&(it.y-=ke[0].y-rt.y)),at.x=nt.x,at.y=nt.y,0!==it.x||0!==it.y)){if("v"===Fe&&p.closeOnVerticalDrag&&"fit"===p.scaleMode&&J===m.currItem.initialZoomLevel){We.y+=it.y,Be.y+=it.y;var r=z();return De=!0,f("onVerticalDrag",r),x(r),void h()}e=y(),t=nt.x,n=nt.y,50<e-ve&&((r=2<ct.length?ct.shift():{}).x=t,r.y=n,ct.push(r),ve=e),Ae=!0,Oe=m.currItem.bounds,N("x",it)||(N("y",it),b(Be),h())}}},Tt=function(){var t,n,o={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=1<ct.length?(t=y()-ve+50,ct[ct.length-2][e]):(t=y()-ge,rt[e]),o.lastFlickOffset[e]=at[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]||(Be[t]>Oe.min[t]?o.backAnimDestination[t]=Oe.min[t]:Be[t]<Oe.max[t]&&(o.backAnimDestination[t]=Oe.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,O("bounceZoomPan"+t,Be[t],o.backAnimDestination[t],e||300,u.easing.sine.out,function(e){Be[t]=e,h()}))))},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,Be[e]+=o.distanceOffset[e])},panAnimLoop:function(){et.zoomPan&&(et.zoomPan.raf=de(o.panAnimLoop),o.now=y(),o.timeDiff=o.now-o.lastNow,o.lastNow=o.now,o.calculateAnimOffset("x"),o.calculateAnimOffset("y"),h(),o.calculateOverBoundsAnimOffset("x"),o.calculateOverBoundsAnimOffset("y"),o.speedDecelerationRatioAbs.x<.05&&o.speedDecelerationRatioAbs.y<.05&&(Be.x=Math.round(Be.x),Be.y=Math.round(Be.y),h(),k("zoomPan")))}};return o},At=function(e){if(e.calculateSwipeSpeed("y"),Oe=m.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;C("zoomPan"),e.lastNow=y(),e.panAnimLoop()},St=function(e,t){var n,o;Ee||(dt=H),"swipe"===e&&(o=at.x-rt.x,e=t.lastFlickDist.x<10,30<o&&(e||20<t.lastFlickOffset.x)?a=-1:o<-30&&(e||t.lastFlickOffset.x<-20)&&(a=1)),a&&((H+=a)<0?(H=p.loop?Ut()-1:0,i=!0):H>=Ut()&&(H=p.loop?0:Ut()-1,i=!0),i&&!p.loop||(Ke+=a,He-=a,n=!0));var i=qe.x*He,a=Math.abs(i-ft.x),r=n||i>ft.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 dt===H&&(n=!1),Ee=!0,f("mainScrollAnimStart"),O("mainScroll",ft.x,i,r,u.easing.cubic.out,g,function(){Z(),Ee=!1,dt=-1,!n&&dt===H||m.updateCurrItem(),f("mainScrollAnimComplete")}),n&&m.updateCurrItem(!0),n},Lt=function(e){return 1/Ze*e*Q},kt=function(){var e=J,t=I(),n=M();J<t?e=t:n<J&&(e=n);var o,i=_e;return ze&&!be&&!Ne&&J<t?m.close():(ze&&(o=function(e){x((1-i)*e+i)}),m.zoomTo(e,0,200,u.easing.cubic.out,o)),!0};i("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,o,i){ie=e+t,ae=e+n,re=e+o,le=i?e+i:""}(ce=xe.pointerEvent)&&xe.touch&&(xe.touch=!1),ce?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):xe.touch?(e("touch","start","move","end","cancel"),ue=!0):e("mouse","down","move","up"),K=ae+" "+re+" "+le,V=ie,ce&&!ue&&(ue=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),m.likelyTouchDevice=ue,j[ie]=U,j[ae]=W,j[re]=Y,le&&(j[le]=j[re]),xe.touch&&(V+=" mousedown",K+=" mousemove mouseup",j.mousedown=j[ie],j.mousemove=j[ae],j.mouseup=j[re]),ue||(p.allowPanToNext=!1)}}});function Ct(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}}function Zt(e,t,n,o,i,a){t.loadError||o&&(t.imageAppended=!0,Xt(t,o,t===m.currItem&&je),n.appendChild(o),a&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))}function Ot(e){function t(){e.loading=!1,e.loaded=!0,e.w=n.naturalWidth,e.h=n.naturalHeight,m.updateSize(),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=u.createEl("pswp__img","img");return n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src,n}function Rt(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=p.errorMsg.replace("%url%",e.src),1)}function Et(){if(Bt.length){for(var e,t=0;t<Bt.length;t++)(e=Bt[t]).holder.index===e.index&&Zt(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);Bt=[]}}var Ft,Pt,zt,_t,Nt,Ut,Wt=function(e,t,r,n){var l;Ft&&clearTimeout(Ft),zt=_t=!0,e.initialLayout?(l=e.initialLayout,e.initialLayout=null):l=p.getThumbBoundsFn&&p.getThumbBoundsFn(H);function s(){k("initialZoom"),r?(m.template.removeAttribute("style"),m.bg.removeAttribute("style")):(x(1),t&&(t.style.display="block"),d.classList.add("pswp--animated-in"),f("initialZoom"+(r?"OutEnd":"InEnd"))),n&&n(),_t=!1}var c=r?p.hideAnimationDuration:p.showAnimationDuration;if(!c||!l||void 0===l.x)return f("initialZoom"+(r?"Out":"In")),J=e.initialZoomLevel,w(Be,e.initialPosition),h(),d.style.opacity=r?0:1,x(1),void(c?setTimeout(function(){s()},c):s());var u;u=!m.currItem.src||m.currItem.loadError||p.showHideOpacity,e.miniImg&&(e.miniImg.style.webkitBackfaceVisibility="hidden"),r||(J=l.w/e.w,Be.x=l.x,Be.y=l.y-fe,m[u?"template":"bg"].style.opacity=.001,h()),C("initialZoom"),r&&d.classList.remove("pswp--animated-in"),u&&(r?d.classList.toggle("pswp--animate_opacity"):setTimeout(function(){d.classList.add("pswp--animate_opacity")},30)),Ft=setTimeout(function(){var t,n,o,i,a;f("initialZoom"+(r?"Out":"In")),Ft=(r?(t=l.w/e.w,n=Be.x,o=Be.y,i=J,a=_e,function(e){1===e?(J=t,Be.x=l.x,Be.y=l.y-ye):(J=(t-i)*e+i,Be.x=(l.x-n)*e+n,Be.y=(l.y-ye-o)*e+o),h(),u?d.style.opacity=1-e:x(a-e*a)}(1)):(J=e.initialZoomLevel,w(Be,e.initialPosition),h(),x(1),u?d.style.opacity=1:x(1)),setTimeout(s,c+20))},r?25:90)},Yt={},Bt=[],Gt={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 Pt.length}},Ht=function(e,t,n){if(!e.src||e.loadError)return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=Ct(),e.initialPosition=e.bounds.center,e.bounds;var o,i,a,r=!n;return r&&(e.vGap||(e.vGap={top:0,bottom:0}),f("parseVerticalMargin",e)),Yt.x=t.x,Yt.y=t.y-e.vGap.top-e.vGap.bottom,r&&(o=Yt.x/e.w,i=Yt.y/e.h,e.fitRatio=o<i?o:i,"orig"===(a=p.scaleMode)?n=1:"fit"===a&&(n=e.fitRatio),1<n&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=Ct())),n?(o=(t=e).w*n,i=e.h*n,(a=t.bounds).center.x=Math.round((Yt.x-o)/2),a.center.y=Math.round((Yt.y-i)/2)+t.vGap.top,a.max.x=o>Yt.x?Math.round(Yt.x-o):a.center.x,a.max.y=i>Yt.y?Math.round(Yt.y-i)+t.vGap.top:a.center.y,a.min.x=o>Yt.x?0:a.center.x,a.min.y=i>Yt.y?t.vGap.top:a.center.y,r&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0},Xt=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")};i("Controller",{publicMethods:{lazyLoadItem:function(e){e=r(e);var t=Nt(e);t&&(!t.loaded&&!t.loading||te)&&(f("gettingData",e,t),t.src&&Ot(t))},initController:function(){u.extend(p,Gt,!0),m.items=Pt=e,Nt=m.getItemAt,Ut=p.getNumItemsFn,p.loop,Ut()<3&&(p.loop=!1),a("beforeChange",function(e){for(var t=p.preload,n=null===e||0<=e,o=Math.min(t[0],Ut()),i=Math.min(t[1],Ut()),a=1;a<=(n?i:o);a++)m.lazyLoadItem(H+a);for(a=1;a<=(n?o:i);a++)m.lazyLoadItem(H-a)}),a("initialLayout",function(){m.currItem.initialLayout=p.getThumbBoundsFn&&p.getThumbBoundsFn(H)}),a("mainScrollAnimComplete",Et),a("initialZoomInEnd",Et),a("destroy",function(){for(var e,t=0;t<Pt.length;t++)(e=Pt[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);Bt=null})},getItemAt:function(e){if(0<=e){e=void 0!==Pt[e]&&Pt[e];return e&&(null==e.w&&(e.w=0),null==e.h&&(e.h=0)),e}return!1},allowProgressiveImg:function(){return p.forceProgressiveLoading||!ue||p.mouseUsed||1200<screen.width},setContent:function(t,n){p.loop&&(n=r(n));var e=m.getItemAt(t.index);e&&(e.container=null);var o,i,a=m.getItemAt(n);a?(f("gettingData",n,a),t.index=n,i=(t.item=a).container=u.createEl("pswp__zoom-wrap"),!a.src&&a.html&&(a.html.tagName?i.appendChild(a.html):i.innerHTML=a.html),Rt(a),Ht(a,Ge),!a.src||a.loadError||a.loaded?a.src&&!a.loadError&&((o=u.createEl("pswp__img","img")).style.opacity=1,o.src=a.src,Xt(a,o),Zt(0,a,i,o)):(a.loadComplete=function(e){if(B){if(t&&t.index===n){if(Rt(e,!0))return e.loadComplete=e.img=null,Ht(e,Ge),s(e),void(t.index===H&&m.updateCurrZoomItem());e.imageAppended?!_t&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):xe.transform&&(Ee||_t)?Bt.push({item:e,baseDiv:i,img:e.img,index:n,holder:t,clearPlaceholder:!0}):Zt(0,e,i,e.img,0,!0)}e.loadComplete=null,e.img=null,f("imageLoadComplete",n,e)}},u.features.transform&&(e="pswp__img pswp__img--placeholder",e+=a.msrc?"":" pswp__img--placeholder--blank",e=u.createEl(e,a.msrc?"img":""),a.msrc&&(e.src=a.msrc),Xt(a,e),i.appendChild(e),a.placeholder=e),a.loading||Ot(a),m.allowProgressiveImg()&&(!zt&&xe.transform?Bt.push({item:a,baseDiv:i,img:a.img,index:n,holder:t}):Zt(0,a,i,a.img,0,!0))),zt||n!==H?s(a):(Re=i.style,Wt(a,o||a.img)),t.el.innerHTML="",t.el.appendChild(i)):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 qt(e,t,n){var o=document.createEvent("CustomEvent"),n={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,n),e.target.dispatchEvent(o)}var Kt,Vt,jt={};i("Tap",{publicMethods:{initTap:function(){a("firstTouchStart",m.onTapStart),a("touchRelease",m.onTapRelease),a("destroy",function(){jt={},Kt=null})},onTapStart:function(e){1<e.length&&(clearTimeout(Kt),Kt=null)},onTapRelease:function(e,t){var n,o,i;e.target.classList.contains("pswp__share-modal")||t&&(Ae||Me||tt||ce&&!m.container.contains(e.target)||(n=t,Kt&&(clearTimeout(Kt),Kt=null,o=n,i=jt,Math.abs(o.x-i.x)<25&&Math.abs(o.y-i.y)<25)?f("doubleTap",n):"mouse"!==t.type?"BUTTON"===e.target.tagName.toUpperCase()||e.target.classList.contains("pswp__single-tap")?qt(e,t):(w(jt,n),Kt=setTimeout(function(){qt(e,t),Kt=null},300)):qt(e,t,"mouse")))}}}),i("DesktopZoom",{publicMethods:{initDesktopZoom:function(){ue?a("mouseUsed",function(){m.setupDesktopZoom()}):m.setupDesktopZoom(!0)},setupDesktopZoom:function(e){Vt={};var t="wheel mousewheel DOMMouseScroll";a("bindEvents",function(){u.bind(d,t,m.handleMouseWheel)}),a("unbindEvents",function(){Vt&&u.unbind(d,t,m.handleMouseWheel)}),m.mouseZoomedIn=!1;function n(){m.mouseZoomedIn&&(d.classList.remove("pswp--zoomed-in"),m.mouseZoomedIn=!1),J<1?d.classList.add("pswp--zoom-allowed"):d.classList.remove("pswp--zoom-allowed"),i()}var o,i=function(){o&&(d.classList.remove("pswp--dragging"),o=!1)};a("resize",n),a("afterChange",n),a("pointerDown",function(){m.mouseZoomedIn&&(o=!0,d.classList.add("pswp--dragging"))}),a("pointerUp",i),e||n()},handleMouseWheel:function(e){if(e.stopPropagation(),Vt.x=0,"deltaX"in e)1===e.deltaMode?(Vt.x=18*e.deltaX,Vt.y=18*e.deltaY):(Vt.x=e.deltaX,Vt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(Vt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?Vt.y=-.16*e.wheelDeltaY:Vt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;Vt.y=e.detail}D(J,!0);var t=Be.x-Vt.x,n=Be.y-Vt.y;(p.modal||t<=Oe.min.x&&t>=Oe.max.x&&n<=Oe.min.y&&n>=Oe.max.y)&&e.preventDefault(),m.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:Ge.x/2+Xe.x,y:Ge.y/2+Xe.y};var t=p.getDoubleTapZoom(!0,m.currItem),n=J===t;m.mouseZoomedIn=!n,m.zoomTo(n?m.currItem.initialZoomLevel:t,e,333),n?d.classList.remove("pswp--zoomed-in"):d.classList.add("pswp--zoomed-in")}}}),u.extend(m,t)}});