From e241410466d2d421028cea89550283c243f5c22e Mon Sep 17 00:00:00 2001 From: Joe Grigg Date: Wed, 3 Jul 2024 17:37:38 +0100 Subject: [PATCH] Updated lightbox animations --- assets/built/index.js | 2 +- assets/built/index.js.map | 2 +- assets/js/lightbox.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/assets/built/index.js b/assets/built/index.js index 5c6ecf8..c308043 100644 --- a/assets/built/index.js +++ b/assets/built/index.js @@ -4,5 +4,5 @@ Documentation, www.simplelightbox.com Available for use under the MIT License Version 2.14.3 - */!function(e){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function n(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=s(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){l=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw r}}}}function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o0?Array.from(e):[e],this.relatedElements=[],this.transitionPrefix=this.calculateTransitionPrefix(),this.transitionCapable=!1!==this.transitionPrefix,this.initialLocationHash=this.hash,this.options.rel&&(this.elements=this.getRelated(this.options.rel)),this.options.uniqueImages){var i=[];this.elements=Array.from(this.elements).filter((function(t){var e=t.getAttribute(n.options.sourceAttr);return-1===i.indexOf(e)&&(i.push(e),!0)}))}this.createDomNodes(),this.options.close&&this.domNodes.wrapper.appendChild(this.domNodes.closeButton),this.options.nav&&this.domNodes.wrapper.appendChild(this.domNodes.navigation),this.options.spinner&&this.domNodes.wrapper.appendChild(this.domNodes.spinner),this.addEventListener(this.elements,"click."+this.eventNamespace,(function(t){if(n.isValidLink(t.currentTarget)){if(t.preventDefault(),n.isAnimating)return!1;n.initialImageIndex=n.elements.indexOf(t.currentTarget),n.openImage(t.currentTarget)}})),this.options.docClose&&this.addEventListener(this.domNodes.wrapper,["click."+this.eventNamespace,"touchstart."+this.eventNamespace],(function(t){n.isOpen&&t.target===t.currentTarget&&n.close()})),this.options.disableRightClick&&this.addEventListener(document.body,"contextmenu."+this.eventNamespace,(function(t){t.target.parentElement.classList.contains("sl-image")&&t.preventDefault()})),this.options.enableKeyboard&&this.addEventListener(document.body,"keyup."+this.eventNamespace,this.throttle((function(t){if(n.controlCoordinates.swipeDiff=0,n.isAnimating&&"Escape"===t.key)return n.currentImage.setAttribute("src",""),n.isAnimating=!1,void n.close();n.isOpen&&(t.preventDefault(),"Escape"===t.key&&n.close(),!n.isAnimating&&["ArrowLeft","ArrowRight"].indexOf(t.key)>-1&&n.loadImage("ArrowRight"===t.key?1:-1))}),this.options.throttleInterval)),this.addEvents()}var e,s,r;return e=t,s=[{key:"checkPassiveEventsSupport",value:function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(t){}return t}},{key:"getCaptionElement",value:function(t){if(this.options.captionSelector.startsWith("+")){var e=this.options.captionSelector.replace(/^\+/,"").trimStart(),o=t.nextElementSibling;return!(!o||!o.matches(e))&&o}if(this.options.captionSelector.startsWith(">")){var n=this.options.captionSelector.replace(/^>/,"").trimStart();return t.querySelector(n)}return t.querySelector(this.options.captionSelector)}},{key:"generateQuerySelector",value:function(t){var e=t.tagName,o=t.id,n=t.className,i=t.parentNode;if("HTML"===e)return"HTML";var s=e;if(s+=""!==o?"#".concat(o):"",n)for(var r=n.trim().split(/\s/),a=0;a ").concat(s)}},{key:"createDomNodes",value:function(){if(this.domNodes.overlay=document.createElement("div"),this.domNodes.overlay.classList.add("sl-overlay"),this.domNodes.overlay.dataset.opacityTarget=this.options.overlayOpacity,this.domNodes.closeButton=document.createElement("button"),this.domNodes.closeButton.classList.add("sl-close"),this.domNodes.closeButton.innerHTML=this.options.closeText,this.domNodes.spinner=document.createElement("div"),this.domNodes.spinner.classList.add("sl-spinner"),this.domNodes.spinner.innerHTML="
",this.domNodes.navigation=document.createElement("div"),this.domNodes.navigation.classList.add("sl-navigation"),this.domNodes.navigation.innerHTML='"),this.domNodes.counter=document.createElement("div"),this.domNodes.counter.classList.add("sl-counter"),this.domNodes.counter.innerHTML='/',this.domNodes.download=document.createElement("div"),this.domNodes.download.classList.add("sl-download"),this.domNodes.downloadLink=document.createElement("a"),this.domNodes.downloadLink.setAttribute("download",""),this.domNodes.downloadLink.textContent=this.options.download,this.domNodes.download.appendChild(this.domNodes.downloadLink),this.domNodes.caption=document.createElement("div"),this.domNodes.caption.classList.add("sl-caption","pos-"+this.options.captionPosition),this.options.captionClass){var t,e=this.options.captionClass.split(/[\s,]+/);(t=this.domNodes.caption.classList).add.apply(t,i(e))}this.domNodes.image=document.createElement("div"),this.domNodes.image.classList.add("sl-image"),this.domNodes.wrapper=document.createElement("div"),this.domNodes.wrapper.classList.add("sl-wrapper"),this.domNodes.wrapper.setAttribute("tabindex",-1),this.domNodes.wrapper.setAttribute("role","dialog"),this.domNodes.wrapper.setAttribute("aria-hidden",!1),this.options.className&&this.domNodes.wrapper.classList.add(this.options.className),this.options.rtl&&this.domNodes.wrapper.classList.add("sl-dir-rtl")}},{key:"throttle",value:function(t,e){var o;return function(){o||(t.apply(this,arguments),o=!0,setTimeout((function(){return o=!1}),e))}}},{key:"isValidLink",value:function(t){return!this.options.fileExt||t.getAttribute(this.options.sourceAttr)&&new RegExp("("+this.options.fileExt+")($|\\?.*$)","i").test(t.getAttribute(this.options.sourceAttr))}},{key:"calculateTransitionPrefix",value:function(){var t=(document.body||document.documentElement).style;return"transition"in t?"":"WebkitTransition"in t?"-webkit-":"MozTransition"in t?"-moz-":"OTransition"in t&&"-o"}},{key:"getScrollbarWidth",value:function(){var t,e=document.createElement("div");return e.classList.add("sl-scrollbar-measure"),document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t}},{key:"toggleScrollbar",value:function(t){var e=0,o=[].slice.call(document.querySelectorAll("."+this.options.fixedClass));if("hide"===t){var n=window.innerWidth;if(!n){var i=document.documentElement.getBoundingClientRect();n=i.right-Math.abs(i.left)}if(document.body.clientWidth0||0==e&&this.isAppleDevice)&&(document.body.classList.add("hidden-scroll"),document.body.style.paddingRight=s+e+"px",o.forEach((function(t){var o=t.style.paddingRight,n=window.getComputedStyle(t)["padding-right"];t.dataset.originalPaddingRight=o,t.style.paddingRight="".concat(parseFloat(n)+e,"px")})))}}else document.body.classList.remove("hidden-scroll"),document.body.style.paddingRight=document.body.dataset.originalPaddingRight+"px",o.forEach((function(t){var e=t.dataset.originalPaddingRight;void 0!==e&&(t.style.paddingRight=e)}));return e}},{key:"close",value:function(){var t=this;if(!this.isOpen||this.isAnimating||this.isClosing)return!1;this.isClosing=!0;var e=this.relatedElements[this.currentImageIndex];for(var o in e.dispatchEvent(new Event("close.simplelightbox")),this.options.history&&(this.historyHasChanges=!1,this.hashReseted||this.resetHash()),this.removeEventListener(document,"focusin."+this.eventNamespace),this.fadeOut(this.domNodes.overlay,this.options.fadeSpeed),this.fadeOut(document.querySelectorAll(".sl-image img, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter"),this.options.fadeSpeed,(function(){t.options.disableScroll&&t.toggleScrollbar("show"),t.options.htmlClass&&""!==t.options.htmlClass&&document.querySelector("html").classList.remove(t.options.htmlClass),document.body.removeChild(t.domNodes.wrapper),t.options.overlay&&document.body.removeChild(t.domNodes.overlay),t.domNodes.additionalHtml=null,t.domNodes.download=null,e.dispatchEvent(new Event("closed.simplelightbox")),t.isClosing=!1})),this.currentImage=null,this.isOpen=!1,this.isAnimating=!1,this.controlCoordinates)this.controlCoordinates[o]=0;this.controlCoordinates.mousedown=!1,this.controlCoordinates.zoomed=!1,this.controlCoordinates.capture=!1,this.controlCoordinates.initialScale=this.minMax(1,1,this.options.maxZoom),this.controlCoordinates.doubleTapped=!1}},{key:"hash",get:function(){return window.location.hash.substring(1)}},{key:"preload",value:function(){var t=this,e=this.currentImageIndex,o=this.relatedElements.length,n=e+1<0?o-1:e+1>=o-1?0:e+1,i=e-1<0?o-1:e-1>=o-1?0:e-1,s=new Image,r=new Image;s.addEventListener("load",(function(o){var n=o.target.getAttribute("src");-1===t.loadedImages.indexOf(n)&&t.loadedImages.push(n),t.relatedElements[e].dispatchEvent(new Event("nextImageLoaded."+t.eventNamespace))})),s.setAttribute("src",this.relatedElements[n].getAttribute(this.options.sourceAttr)),r.addEventListener("load",(function(o){var n=o.target.getAttribute("src");-1===t.loadedImages.indexOf(n)&&t.loadedImages.push(n),t.relatedElements[e].dispatchEvent(new Event("prevImageLoaded."+t.eventNamespace))})),r.setAttribute("src",this.relatedElements[i].getAttribute(this.options.sourceAttr))}},{key:"loadImage",value:function(t){var e=this,o=t;this.options.rtl&&(t=-t),this.relatedElements[this.currentImageIndex].dispatchEvent(new Event("change."+this.eventNamespace)),this.relatedElements[this.currentImageIndex].dispatchEvent(new Event((1===t?"next":"prev")+"."+this.eventNamespace));var n=this.currentImageIndex+t;if(this.isAnimating||(n<0||n>=this.relatedElements.length)&&!1===this.options.loop)return!1;this.currentImageIndex=n<0?this.relatedElements.length-1:n>this.relatedElements.length-1?0:n,this.domNodes.counter.querySelector(".sl-current").innerHTML=this.currentImageIndex+1,this.options.animationSlide&&this.slide(this.options.animationSpeed/1e3,-100*o-this.controlCoordinates.swipeDiff+"px"),this.fadeOut(this.domNodes.image,this.options.fadeSpeed,(function(){e.isAnimating=!0,e.isClosing?e.isAnimating=!1:setTimeout((function(){var t=e.relatedElements[e.currentImageIndex];e.currentImage&&(e.currentImage.setAttribute("src",t.getAttribute(e.options.sourceAttr)),-1===e.loadedImages.indexOf(t.getAttribute(e.options.sourceAttr))&&e.show(e.domNodes.spinner),e.domNodes.image.contains(e.domNodes.caption)&&e.domNodes.image.removeChild(e.domNodes.caption),e.adjustImage(o),e.options.preloading&&e.preload())}),100)}))}},{key:"adjustImage",value:function(t){var e=this;if(!this.currentImage)return!1;var o=new Image,n=window.innerWidth*this.options.widthRatio,i=window.innerHeight*this.options.heightRatio;o.setAttribute("src",this.currentImage.getAttribute("src")),this.currentImage.dataset.scale=1,this.currentImage.dataset.translateX=0,this.currentImage.dataset.translateY=0,this.zoomPanElement(0,0,1),o.addEventListener("error",(function(o){e.relatedElements[e.currentImageIndex].dispatchEvent(new Event("error."+e.eventNamespace)),e.isAnimating=!1,e.isOpen=!0,e.domNodes.spinner.style.display="none";var n=1===t||-1===t;if(e.initialImageIndex===e.currentImageIndex&&n)return e.close();e.options.alertError&&alert(e.options.alertErrorMessage),e.loadImage(n?t:1)})),o.addEventListener("load",(function(o){void 0!==t&&(e.relatedElements[e.currentImageIndex].dispatchEvent(new Event("changed."+e.eventNamespace)),e.relatedElements[e.currentImageIndex].dispatchEvent(new Event((1===t?"nextDone":"prevDone")+"."+e.eventNamespace))),e.options.history&&e.updateURL(),-1===e.loadedImages.indexOf(e.currentImage.getAttribute("src"))&&e.loadedImages.push(e.currentImage.getAttribute("src"));var s,r,a=o.target.width,l=o.target.height;if(e.options.scaleImageToRatio||a>n||l>i){var c=a/l>n/i?a/n:l/i;a/=c,l/=c}e.domNodes.image.style.top=(window.innerHeight-l)/2+"px",e.domNodes.image.style.left=(window.innerWidth-a-e.globalScrollbarWidth)/2+"px",e.domNodes.image.style.width=a+"px",e.domNodes.image.style.height=l+"px",e.domNodes.spinner.style.display="none",e.options.focus&&e.forceFocus(),e.fadeIn(e.currentImage,e.options.fadeSpeed,(function(){e.options.focus&&e.domNodes.wrapper.focus()})),e.isOpen=!0,"string"==typeof e.options.captionSelector?s="self"===e.options.captionSelector?e.relatedElements[e.currentImageIndex]:e.getCaptionElement(e.relatedElements[e.currentImageIndex]):"function"==typeof e.options.captionSelector&&(s=e.options.captionSelector(e.relatedElements[e.currentImageIndex])),e.options.captions&&s&&(r="data"===e.options.captionType?s.dataset[e.options.captionsData]:"text"===e.options.captionType?s.innerHTML:s.getAttribute(e.options.captionsData)),e.options.loop?1===e.relatedElements.length?e.hide(e.domNodes.navigation.querySelectorAll(".sl-prev, .sl-next")):e.show(e.domNodes.navigation.querySelectorAll(".sl-prev, .sl-next")):(0===e.currentImageIndex&&e.hide(e.domNodes.navigation.querySelector(".sl-prev")),e.currentImageIndex>=e.relatedElements.length-1&&e.hide(e.domNodes.navigation.querySelector(".sl-next")),e.currentImageIndex>0&&e.show(e.domNodes.navigation.querySelector(".sl-prev")),e.currentImageIndexo?o:t}},{key:"setZoomData",value:function(t,e,o){this.currentImage.dataset.scale=t,this.currentImage.dataset.translateX=e,this.currentImage.dataset.translateY=o}},{key:"hashchangeHandler",value:function(){this.isOpen&&this.hash===this.initialLocationHash&&(this.hashReseted=!0,this.close())}},{key:"addEvents",value:function(){var t=this;if(this.addEventListener(window,"resize."+this.eventNamespace,(function(e){t.isOpen&&t.adjustImage()})),this.addEventListener(this.domNodes.closeButton,["click."+this.eventNamespace,"touchstart."+this.eventNamespace],this.close.bind(this)),this.options.history&&setTimeout((function(){t.addEventListener(window,"hashchange."+t.eventNamespace,(function(e){t.isOpen&&t.hashchangeHandler()}))}),40),this.addEventListener(this.domNodes.navigation.getElementsByTagName("button"),"click."+this.eventNamespace,(function(e){if(!e.currentTarget.tagName.match(/button/i))return!0;e.preventDefault(),t.controlCoordinates.swipeDiff=0,t.loadImage(e.currentTarget.classList.contains("sl-next")?1:-1)})),this.options.scrollZoom){var e=1;this.addEventListener(this.domNodes.image,["mousewheel","DOMMouseScroll"],(function(o){if(t.controlCoordinates.mousedown||t.isAnimating||t.isClosing||!t.isOpen)return!0;0==t.controlCoordinates.containerHeight&&(t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY));var n=o.delta||o.wheelDelta;void 0===n&&(n=o.detail),n=Math.max(-1,Math.min(1,n)),e+=n*t.options.scrollZoomFactor*e,e=Math.max(1,Math.min(t.options.maxZoom,e)),t.controlCoordinates.targetScale=e;var i=document.documentElement.scrollTop||document.body.scrollTop;t.controlCoordinates.pinchOffsetX=o.pageX,t.controlCoordinates.pinchOffsetY=o.pageY-i||0,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.scaleDifference=t.controlCoordinates.targetScale-t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.initialOffsetX-(t.controlCoordinates.pinchOffsetX-t.controlCoordinates.containerOffsetX-t.controlCoordinates.containerWidth/2-t.controlCoordinates.initialOffsetX)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.initialOffsetY-(t.controlCoordinates.pinchOffsetY-t.controlCoordinates.containerOffsetY-t.controlCoordinates.containerHeight/2-t.controlCoordinates.initialOffsetY)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale),t.controlCoordinates.targetScale>1?(t.controlCoordinates.zoomed=!0,(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed)):(1===t.controlCoordinates.initialScale&&(t.controlCoordinates.zoomed=!1,"none"===t.domNodes.caption.style.display&&t.fadeIn(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=null,t.controlCoordinates.capture=!1),t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance,t.controlCoordinates.initialScale=t.controlCoordinates.targetScale,t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.setZoomData(t.controlCoordinates.targetScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale)}))}this.addEventListener(this.domNodes.image,["touchstart."+this.eventNamespace,"mousedown."+this.eventNamespace],(function(e){if("A"===e.target.tagName&&"touchstart"===e.type)return!0;if("mousedown"===e.type)e.preventDefault(),t.controlCoordinates.initialPointerOffsetX=e.clientX,t.controlCoordinates.initialPointerOffsetY=e.clientY,t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY),t.controlCoordinates.capture=!0;else{if(t.controlCoordinates.touchCount=e.touches.length,t.controlCoordinates.initialPointerOffsetX=e.touches[0].clientX,t.controlCoordinates.initialPointerOffsetY=e.touches[0].clientY,t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,1===t.controlCoordinates.touchCount){if(t.controlCoordinates.doubleTapped)return t.currentImage.classList.add("sl-transition"),t.controlCoordinates.zoomed?(t.controlCoordinates.initialScale=1,t.setZoomData(t.controlCoordinates.initialScale,0,0),t.zoomPanElement("0px","0px",t.controlCoordinates.initialScale),t.controlCoordinates.zoomed=!1):(t.controlCoordinates.initialScale=t.options.doubleTapZoom,t.setZoomData(t.controlCoordinates.initialScale,0,0),t.zoomPanElement("0px","0px",t.controlCoordinates.initialScale),(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed),t.controlCoordinates.zoomed=!0),setTimeout((function(){t.currentImage&&t.currentImage.classList.remove("sl-transition")}),200),!1;t.controlCoordinates.doubleTapped=!0,setTimeout((function(){t.controlCoordinates.doubleTapped=!1}),300),t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY)}else 2===t.controlCoordinates.touchCount&&(t.controlCoordinates.initialPointerOffsetX2=e.touches[1].clientX,t.controlCoordinates.initialPointerOffsetY2=e.touches[1].clientY,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY),t.controlCoordinates.pinchOffsetX=(t.controlCoordinates.initialPointerOffsetX+t.controlCoordinates.initialPointerOffsetX2)/2,t.controlCoordinates.pinchOffsetY=(t.controlCoordinates.initialPointerOffsetY+t.controlCoordinates.initialPointerOffsetY2)/2,t.controlCoordinates.initialPinchDistance=Math.sqrt((t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialPointerOffsetX2)*(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialPointerOffsetX2)+(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialPointerOffsetY2)*(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialPointerOffsetY2)));t.controlCoordinates.capture=!0}return!!t.controlCoordinates.mousedown||(t.transitionCapable&&(t.controlCoordinates.imageLeft=parseInt(t.domNodes.image.style.left,10)),t.controlCoordinates.mousedown=!0,t.controlCoordinates.swipeDiff=0,t.controlCoordinates.swipeYDiff=0,t.controlCoordinates.swipeStart=e.pageX||e.touches[0].pageX,t.controlCoordinates.swipeYStart=e.pageY||e.touches[0].pageY,!1)})),this.addEventListener(this.domNodes.image,["touchmove."+this.eventNamespace,"mousemove."+this.eventNamespace,"MSPointerMove"],(function(e){if(!t.controlCoordinates.mousedown)return!0;if("touchmove"===e.type){if(!1===t.controlCoordinates.capture)return!1;t.controlCoordinates.pointerOffsetX=e.touches[0].clientX,t.controlCoordinates.pointerOffsetY=e.touches[0].clientY,t.controlCoordinates.touchCount=e.touches.length,t.controlCoordinates.touchmoveCount++,t.controlCoordinates.touchCount>1?(t.controlCoordinates.pointerOffsetX2=e.touches[1].clientX,t.controlCoordinates.pointerOffsetY2=e.touches[1].clientY,t.controlCoordinates.targetPinchDistance=Math.sqrt((t.controlCoordinates.pointerOffsetX-t.controlCoordinates.pointerOffsetX2)*(t.controlCoordinates.pointerOffsetX-t.controlCoordinates.pointerOffsetX2)+(t.controlCoordinates.pointerOffsetY-t.controlCoordinates.pointerOffsetY2)*(t.controlCoordinates.pointerOffsetY-t.controlCoordinates.pointerOffsetY2)),null===t.controlCoordinates.initialPinchDistance&&(t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance),Math.abs(t.controlCoordinates.initialPinchDistance-t.controlCoordinates.targetPinchDistance)>=1&&(t.controlCoordinates.targetScale=t.minMax(t.controlCoordinates.targetPinchDistance/t.controlCoordinates.initialPinchDistance*t.controlCoordinates.initialScale,1,t.options.maxZoom),t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.scaleDifference=t.controlCoordinates.targetScale-t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.initialOffsetX-(t.controlCoordinates.pinchOffsetX-t.controlCoordinates.containerOffsetX-t.controlCoordinates.containerWidth/2-t.controlCoordinates.initialOffsetX)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.initialOffsetY-(t.controlCoordinates.pinchOffsetY-t.controlCoordinates.containerOffsetY-t.controlCoordinates.containerHeight/2-t.controlCoordinates.initialOffsetY)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale),t.controlCoordinates.targetScale>1&&(t.controlCoordinates.zoomed=!0,(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance,t.controlCoordinates.initialScale=t.controlCoordinates.targetScale,t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY)):(t.controlCoordinates.targetScale=t.controlCoordinates.initialScale,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.pointerOffsetX-(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialOffsetX),-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.pointerOffsetY-(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialOffsetY),-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),Math.abs(t.controlCoordinates.targetOffsetX)===Math.abs(t.controlCoordinates.limitOffsetX)&&(t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialPointerOffsetX=t.controlCoordinates.pointerOffsetX),Math.abs(t.controlCoordinates.targetOffsetY)===Math.abs(t.controlCoordinates.limitOffsetY)&&(t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.controlCoordinates.initialPointerOffsetY=t.controlCoordinates.pointerOffsetY),t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale))}if("mousemove"===e.type&&t.controlCoordinates.mousedown){if("touchmove"==e.type)return!0;if(e.preventDefault(),!1===t.controlCoordinates.capture)return!1;t.controlCoordinates.pointerOffsetX=e.clientX,t.controlCoordinates.pointerOffsetY=e.clientY,t.controlCoordinates.targetScale=t.controlCoordinates.initialScale,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.pointerOffsetX-(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialOffsetX),-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.pointerOffsetY-(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialOffsetY),-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),Math.abs(t.controlCoordinates.targetOffsetX)===Math.abs(t.controlCoordinates.limitOffsetX)&&(t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialPointerOffsetX=t.controlCoordinates.pointerOffsetX),Math.abs(t.controlCoordinates.targetOffsetY)===Math.abs(t.controlCoordinates.limitOffsetY)&&(t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.controlCoordinates.initialPointerOffsetY=t.controlCoordinates.pointerOffsetY),t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale)}t.controlCoordinates.zoomed||(t.controlCoordinates.swipeEnd=e.pageX||e.touches[0].pageX,t.controlCoordinates.swipeYEnd=e.pageY||e.touches[0].pageY,t.controlCoordinates.swipeDiff=t.controlCoordinates.swipeStart-t.controlCoordinates.swipeEnd,t.controlCoordinates.swipeYDiff=t.controlCoordinates.swipeYStart-t.controlCoordinates.swipeYEnd,t.options.animationSlide&&t.slide(0,-t.controlCoordinates.swipeDiff+"px"))})),this.addEventListener(this.domNodes.image,["touchend."+this.eventNamespace,"mouseup."+this.eventNamespace,"touchcancel."+this.eventNamespace,"mouseleave."+this.eventNamespace,"pointerup","pointercancel","MSPointerUp","MSPointerCancel"],(function(e){if(t.isTouchDevice&&"touchend"===e.type&&(t.controlCoordinates.touchCount=e.touches.length,0===t.controlCoordinates.touchCount?(t.currentImage&&t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),1===t.controlCoordinates.initialScale&&(t.controlCoordinates.zoomed=!1,"none"===t.domNodes.caption.style.display&&t.fadeIn(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=null,t.controlCoordinates.capture=!1):1===t.controlCoordinates.touchCount?(t.controlCoordinates.initialPointerOffsetX=e.touches[0].clientX,t.controlCoordinates.initialPointerOffsetY=e.touches[0].clientY):t.controlCoordinates.touchCount>1&&(t.controlCoordinates.initialPinchDistance=null)),t.controlCoordinates.mousedown){t.controlCoordinates.mousedown=!1;var o=!0;t.options.loop||(0===t.currentImageIndex&&t.controlCoordinates.swipeDiff<0&&(o=!1),t.currentImageIndex>=t.relatedElements.length-1&&t.controlCoordinates.swipeDiff>0&&(o=!1)),Math.abs(t.controlCoordinates.swipeDiff)>t.options.swipeTolerance&&o?t.loadImage(t.controlCoordinates.swipeDiff>0?1:-1):t.options.animationSlide&&t.slide(t.options.animationSpeed/1e3,"0px"),t.options.swipeClose&&Math.abs(t.controlCoordinates.swipeYDiff)>50&&Math.abs(t.controlCoordinates.swipeDiff)0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed),t.controlCoordinates.zoomed=!0),setTimeout((function(){t.currentImage&&(t.currentImage.classList.remove("sl-transition"),t.currentImage.style[t.transitionPrefix+"transform-origin"]=null)}),200),t.controlCoordinates.capture=!0,!1}))}},{key:"getDimensions",value:function(t){var e=window.getComputedStyle(t),o=t.offsetHeight,n=t.offsetWidth,i=parseFloat(e.borderTopWidth);return{height:o-parseFloat(e.borderBottomWidth)-i-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom),width:n-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)}}},{key:"updateHash",value:function(){var t="pid="+(this.currentImageIndex+1),e=window.location.href.split("#")[0]+"#"+t;this.hashReseted=!1,this.pushStateSupport?window.history[this.historyHasChanges?"replaceState":"pushState"]("",document.title,e):this.historyHasChanges?window.location.replace(e):window.location.hash=t,this.historyHasChanges||(this.urlChangedOnce=!0),this.historyHasChanges=!0}},{key:"resetHash",value:function(){this.hashReseted=!0,this.urlChangedOnce?history.back():this.pushStateSupport?history.pushState("",document.title,window.location.pathname+window.location.search):window.location.hash="",clearTimeout(this.historyUpdateTimeout)}},{key:"updateURL",value:function(){clearTimeout(this.historyUpdateTimeout),this.historyHasChanges?this.historyUpdateTimeout=setTimeout(this.updateHash.bind(this),800):this.updateHash()}},{key:"setCaption",value:function(t,e,o){var n=this;if(this.options.captions&&t&&""!==t&&void 0!==t){var i,s=null===(i=null!=o?o:this.options.captionHTML)||void 0===i||i?"innerHTML":"innerText";this.hide(this.domNodes.caption),this.domNodes.caption.style.width=e+"px",this.domNodes.caption[s]=t,this.domNodes.image.appendChild(this.domNodes.caption),setTimeout((function(){n.fadeIn(n.domNodes.caption,n.options.fadeSpeed)}),this.options.captionDelay)}}},{key:"slide",value:function(t,e){if(!this.transitionCapable)return this.domNodes.image.style.left=e;this.domNodes.image.style[this.transitionPrefix+"transform"]="translateX("+e+")",this.domNodes.image.style[this.transitionPrefix+"transition"]=this.transitionPrefix+"transform "+t+"s linear"}},{key:"getRelated",value:function(t){return t&&!1!==t&&"nofollow"!==t?Array.from(this.elements).filter((function(e){return e.getAttribute("rel")===t})):this.elements}},{key:"openImage",value:function(t){var e=this;t.dispatchEvent(new Event("show."+this.eventNamespace)),this.globalScrollbarWidth=this.getScrollbarWidth(),this.options.disableScroll&&(this.toggleScrollbar("hide"),this.globalScrollbarWidth=0),this.options.htmlClass&&""!==this.options.htmlClass&&document.querySelector("html").classList.add(this.options.htmlClass),document.body.appendChild(this.domNodes.wrapper),this.domNodes.wrapper.appendChild(this.domNodes.image),this.options.overlay&&document.body.appendChild(this.domNodes.overlay),this.relatedElements=this.getRelated(t.rel),this.options.showCounter&&(1==this.relatedElements.length&&this.domNodes.wrapper.contains(this.domNodes.counter)?this.domNodes.wrapper.removeChild(this.domNodes.counter):this.relatedElements.length>1&&!this.domNodes.wrapper.contains(this.domNodes.counter)&&this.domNodes.wrapper.appendChild(this.domNodes.counter)),this.options.download&&this.domNodes.download&&this.domNodes.wrapper.appendChild(this.domNodes.download),this.isAnimating=!0,this.currentImageIndex=this.relatedElements.indexOf(t);var o=t.getAttribute(this.options.sourceAttr);this.currentImage=document.createElement("img"),this.currentImage.style.display="none",this.currentImage.setAttribute("src",o),this.currentImage.dataset.scale=1,this.currentImage.dataset.translateX=0,this.currentImage.dataset.translateY=0,-1===this.loadedImages.indexOf(o)&&this.loadedImages.push(o),this.domNodes.image.innerHTML="",this.domNodes.image.setAttribute("style",""),this.domNodes.image.appendChild(this.currentImage),this.fadeIn(this.domNodes.overlay,this.options.fadeSpeed),this.fadeIn([this.domNodes.counter,this.domNodes.navigation,this.domNodes.closeButton,this.domNodes.download],this.options.fadeSpeed),this.show(this.domNodes.spinner),this.domNodes.counter.querySelector(".sl-current").innerHTML=this.currentImageIndex+1,this.domNodes.counter.querySelector(".sl-total").innerHTML=this.relatedElements.length,this.adjustImage(),this.options.preloading&&this.preload(),setTimeout((function(){t.dispatchEvent(new Event("shown."+e.eventNamespace))}),this.options.animationSpeed)}},{key:"forceFocus",value:function(){var t=this;this.removeEventListener(document,"focusin."+this.eventNamespace),this.addEventListener(document,"focusin."+this.eventNamespace,(function(e){document===e.target||t.domNodes.wrapper===e.target||t.domNodes.wrapper.contains(e.target)||t.domNodes.wrapper.focus()}))}},{key:"addEventListener",value:function(t,e,i,s){t=this.wrap(t),e=this.wrap(e);var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var l=r.value;l.namespaces||(l.namespaces={});var c,d=n(e);try{for(d.s();!(c=d.n()).done;){var h=c.value,m=s||!1;["touchstart","touchmove","mousewheel","DOMMouseScroll"].indexOf(h.split(".")[0])>=0&&this.isPassiveEventsSupported&&("object"===o(m)?m.passive=!0:m={passive:!0}),l.namespaces[h]=i,l.addEventListener(h.split(".")[0],i,m)}}catch(t){d.e(t)}finally{d.f()}}}catch(t){a.e(t)}finally{a.f()}}},{key:"removeEventListener",value:function(t,e){t=this.wrap(t),e=this.wrap(e);var o,i=n(t);try{for(i.s();!(o=i.n()).done;){var s,r=o.value,a=n(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;r.namespaces&&r.namespaces[l]&&(r.removeEventListener(l.split(".")[0],r.namespaces[l]),delete r.namespaces[l])}}catch(t){a.e(t)}finally{a.f()}}}catch(t){i.e(t)}finally{i.f()}}},{key:"fadeOut",value:function(t,e,o){var i,s=this,r=n(t=this.wrap(t));try{for(r.s();!(i=r.n()).done;){var a=i.value;a.style.opacity=parseFloat(a)||window.getComputedStyle(a).getPropertyValue("opacity")}}catch(t){r.e(t)}finally{r.f()}this.isFadeIn=!1;var l=16.66666/(e||this.options.fadeSpeed);!function e(){var i=parseFloat(t[0].style.opacity);if((i-=l)<0){var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var c=r.value;c.style.display="none",c.style.opacity=1}}catch(t){a.e(t)}finally{a.f()}o&&o.call(s,t)}else{var d,h=n(t);try{for(h.s();!(d=h.n()).done;)d.value.style.opacity=i}catch(t){h.e(t)}finally{h.f()}requestAnimationFrame(e)}}()}},{key:"fadeIn",value:function(t,e,o,i){var s,r=this,a=n(t=this.wrap(t));try{for(a.s();!(s=a.n()).done;){var l=s.value;l&&(l.style.opacity=0,l.style.display=i||"block")}}catch(t){a.e(t)}finally{a.f()}this.isFadeIn=!0;var c=parseFloat(t[0].dataset.opacityTarget||1),d=16.66666*c/(e||this.options.fadeSpeed);!function e(){var i=parseFloat(t[0].style.opacity);if((i+=d)>c){var s,a=n(t);try{for(a.s();!(s=a.n()).done;){var l=s.value;l&&(l.style.opacity=c)}}catch(t){a.e(t)}finally{a.f()}o&&o.call(r,t)}else{var h,m=n(t);try{for(m.s();!(h=m.n()).done;){var f=h.value;f&&(f.style.opacity=i)}}catch(t){m.e(t)}finally{m.f()}if(!r.isFadeIn)return;requestAnimationFrame(e)}}()}},{key:"hide",value:function(t){var e,o=n(t=this.wrap(t));try{for(o.s();!(e=o.n()).done;){var i=e.value;"none"!=i.style.display&&(i.dataset.initialDisplay=i.style.display),i.style.display="none"}}catch(t){o.e(t)}finally{o.f()}}},{key:"show",value:function(t,e){var o,i=n(t=this.wrap(t));try{for(i.s();!(o=i.n()).done;){var s=o.value;s.style.display=s.dataset.initialDisplay||e||"block"}}catch(t){i.e(t)}finally{i.f()}}},{key:"wrap",value:function(t){return"function"==typeof t[Symbol.iterator]&&"string"!=typeof t?t:[t]}},{key:"on",value:function(t,e){t=this.wrap(t);var o,i=n(this.elements);try{for(i.s();!(o=i.n()).done;){var s=o.value;s.fullyNamespacedEvents||(s.fullyNamespacedEvents={});var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var l=r.value;s.fullyNamespacedEvents[l]=e,s.addEventListener(l,e)}}catch(t){a.e(t)}finally{a.f()}}}catch(t){i.e(t)}finally{i.f()}return this}},{key:"off",value:function(t){t=this.wrap(t);var e,o=n(this.elements);try{for(o.s();!(e=o.n()).done;){var i,s=e.value,r=n(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;void 0!==s.fullyNamespacedEvents&&a in s.fullyNamespacedEvents&&s.removeEventListener(a,s.fullyNamespacedEvents[a])}}catch(t){r.e(t)}finally{r.f()}}}catch(t){o.e(t)}finally{o.f()}return this}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t=t||this.elements[0],"undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get(0)),e>0&&(t=this.elements[e]),this.initialImageIndex=this.elements.indexOf(t),this.initialImageIndex>-1&&this.openImage(t)}},{key:"openPosition",value:function(t){var e=this.elements[t];this.open(e,t)}},{key:"next",value:function(){this.loadImage(1)}},{key:"prev",value:function(){this.loadImage(-1)}},{key:"getLighboxData",value:function(){return{currentImageIndex:this.currentImageIndex,currentImage:this.currentImage,globalScrollbarWidth:this.globalScrollbarWidth}}},{key:"destroy",value:function(){this.off(["close."+this.eventNamespace,"closed."+this.eventNamespace,"nextImageLoaded."+this.eventNamespace,"prevImageLoaded."+this.eventNamespace,"change."+this.eventNamespace,"nextDone."+this.eventNamespace,"prevDone."+this.eventNamespace,"error."+this.eventNamespace,"changed."+this.eventNamespace,"next."+this.eventNamespace,"prev."+this.eventNamespace,"show."+this.eventNamespace,"shown."+this.eventNamespace]),this.removeEventListener(this.elements,"click."+this.eventNamespace),this.removeEventListener(document,"focusin."+this.eventNamespace),this.removeEventListener(document.body,"contextmenu."+this.eventNamespace),this.removeEventListener(document.body,"keyup."+this.eventNamespace),this.removeEventListener(this.domNodes.navigation.getElementsByTagName("button"),"click."+this.eventNamespace),this.removeEventListener(this.domNodes.closeButton,"click."+this.eventNamespace),this.removeEventListener(window,"resize."+this.eventNamespace),this.removeEventListener(window,"hashchange."+this.eventNamespace),this.close(),this.isOpen&&(document.body.removeChild(this.domNodes.wrapper),document.body.removeChild(this.domNodes.overlay)),this.elements=null}},{key:"refresh",value:function(){if(!this.initialSelector)throw"refreshing only works when you initialize using a selector!";var t=this.options,e=this.initialSelector;return this.destroy(),this.constructor(e,t),this}}],s&&a(e.prototype,s),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),d=c;e.default=d,t.SimpleLightbox=c}(r);var a=e(r);const l={sourceAttr:"src",captions:!1,disableRightClick:!0,overlayOpacity:1,widthRatio:.95,heightRatio:.95},c=["img.kg-image",".kg-image img","img.kg-gallery-image",".kg-gallery-image img","img.lightbox-image",".lightbox-image img"];!function(t){if(!s)return;let e=new IntersectionObserver(((e,o)=>{try{e.forEach((e=>{e.isIntersecting&&s&&async function(t){try{const e=await fetch(t);if(!e.ok)throw new Error("Failed to fetch page");const o=await e.text(),n=(new DOMParser).parseFromString(o,"text/html"),i=n.querySelectorAll(".post");i.forEach((t=>{t.classList.add("post-hidden")}));const s=n.querySelector('link[rel="next"]')?.getAttribute("href");return{posts:i,nextLink:s}}catch(t){throw new Error(t)}}(s).then((e=>{let{posts:n,nextLink:i}=e;n.forEach((t=>{document.querySelector(".gh-postfeed").append(t)})),function(t,e){try{const o=Array.from(t).map((t=>t.querySelector("img"))).map((t=>new Promise(((e,o)=>{t.onload=e,t.onerror=o}))));Promise.all(o).then((()=>{e()}))}catch(t){throw new Error(t)}}(n,(()=>{n.forEach((t=>{t.classList.remove("post-hidden")})),t.recalculate(!0)})),i?(s=i,o.observe(document.querySelector(".post:last-of-type"))):o.disconnect()}))}))}catch(t){console.log(t)}}),{rootMargin:"150px"});e.observe(document.querySelector(".post:last-of-type"))}(function(){if(!i)return;return new n({container:i,trueOrder:!1,waitForImages:!1,margin:16,columns:3,breakAt:{1300:2,700:1}})}()),function(){let t=document.querySelector("#post");t&&new a(t.querySelectorAll(c.join(", ")),l)}(),function(){const t=document.getElementById("mobile-menu-open"),e=document.getElementById("mobile-menu-close"),o=document.getElementById("mobile-menu"),n=()=>{o.classList.add("hidden"),document.body.style.overflow="auto"};t.addEventListener("click",(()=>{o.classList.remove("hidden"),document.body.style.overflow="hidden"})),e.addEventListener("click",(()=>{n()})),o.addEventListener("click",(()=>{n()})),o.querySelector("#mobile-menu-main").addEventListener("click",(t=>{t.stopPropagation()})),window.addEventListener("resize",(function(){n()}))}()}(); + */!function(e){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function n(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=s(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){l=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw r}}}}function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return r(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o0?Array.from(e):[e],this.relatedElements=[],this.transitionPrefix=this.calculateTransitionPrefix(),this.transitionCapable=!1!==this.transitionPrefix,this.initialLocationHash=this.hash,this.options.rel&&(this.elements=this.getRelated(this.options.rel)),this.options.uniqueImages){var i=[];this.elements=Array.from(this.elements).filter((function(t){var e=t.getAttribute(n.options.sourceAttr);return-1===i.indexOf(e)&&(i.push(e),!0)}))}this.createDomNodes(),this.options.close&&this.domNodes.wrapper.appendChild(this.domNodes.closeButton),this.options.nav&&this.domNodes.wrapper.appendChild(this.domNodes.navigation),this.options.spinner&&this.domNodes.wrapper.appendChild(this.domNodes.spinner),this.addEventListener(this.elements,"click."+this.eventNamespace,(function(t){if(n.isValidLink(t.currentTarget)){if(t.preventDefault(),n.isAnimating)return!1;n.initialImageIndex=n.elements.indexOf(t.currentTarget),n.openImage(t.currentTarget)}})),this.options.docClose&&this.addEventListener(this.domNodes.wrapper,["click."+this.eventNamespace,"touchstart."+this.eventNamespace],(function(t){n.isOpen&&t.target===t.currentTarget&&n.close()})),this.options.disableRightClick&&this.addEventListener(document.body,"contextmenu."+this.eventNamespace,(function(t){t.target.parentElement.classList.contains("sl-image")&&t.preventDefault()})),this.options.enableKeyboard&&this.addEventListener(document.body,"keyup."+this.eventNamespace,this.throttle((function(t){if(n.controlCoordinates.swipeDiff=0,n.isAnimating&&"Escape"===t.key)return n.currentImage.setAttribute("src",""),n.isAnimating=!1,void n.close();n.isOpen&&(t.preventDefault(),"Escape"===t.key&&n.close(),!n.isAnimating&&["ArrowLeft","ArrowRight"].indexOf(t.key)>-1&&n.loadImage("ArrowRight"===t.key?1:-1))}),this.options.throttleInterval)),this.addEvents()}var e,s,r;return e=t,s=[{key:"checkPassiveEventsSupport",value:function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(t){}return t}},{key:"getCaptionElement",value:function(t){if(this.options.captionSelector.startsWith("+")){var e=this.options.captionSelector.replace(/^\+/,"").trimStart(),o=t.nextElementSibling;return!(!o||!o.matches(e))&&o}if(this.options.captionSelector.startsWith(">")){var n=this.options.captionSelector.replace(/^>/,"").trimStart();return t.querySelector(n)}return t.querySelector(this.options.captionSelector)}},{key:"generateQuerySelector",value:function(t){var e=t.tagName,o=t.id,n=t.className,i=t.parentNode;if("HTML"===e)return"HTML";var s=e;if(s+=""!==o?"#".concat(o):"",n)for(var r=n.trim().split(/\s/),a=0;a ").concat(s)}},{key:"createDomNodes",value:function(){if(this.domNodes.overlay=document.createElement("div"),this.domNodes.overlay.classList.add("sl-overlay"),this.domNodes.overlay.dataset.opacityTarget=this.options.overlayOpacity,this.domNodes.closeButton=document.createElement("button"),this.domNodes.closeButton.classList.add("sl-close"),this.domNodes.closeButton.innerHTML=this.options.closeText,this.domNodes.spinner=document.createElement("div"),this.domNodes.spinner.classList.add("sl-spinner"),this.domNodes.spinner.innerHTML="
",this.domNodes.navigation=document.createElement("div"),this.domNodes.navigation.classList.add("sl-navigation"),this.domNodes.navigation.innerHTML='"),this.domNodes.counter=document.createElement("div"),this.domNodes.counter.classList.add("sl-counter"),this.domNodes.counter.innerHTML='/',this.domNodes.download=document.createElement("div"),this.domNodes.download.classList.add("sl-download"),this.domNodes.downloadLink=document.createElement("a"),this.domNodes.downloadLink.setAttribute("download",""),this.domNodes.downloadLink.textContent=this.options.download,this.domNodes.download.appendChild(this.domNodes.downloadLink),this.domNodes.caption=document.createElement("div"),this.domNodes.caption.classList.add("sl-caption","pos-"+this.options.captionPosition),this.options.captionClass){var t,e=this.options.captionClass.split(/[\s,]+/);(t=this.domNodes.caption.classList).add.apply(t,i(e))}this.domNodes.image=document.createElement("div"),this.domNodes.image.classList.add("sl-image"),this.domNodes.wrapper=document.createElement("div"),this.domNodes.wrapper.classList.add("sl-wrapper"),this.domNodes.wrapper.setAttribute("tabindex",-1),this.domNodes.wrapper.setAttribute("role","dialog"),this.domNodes.wrapper.setAttribute("aria-hidden",!1),this.options.className&&this.domNodes.wrapper.classList.add(this.options.className),this.options.rtl&&this.domNodes.wrapper.classList.add("sl-dir-rtl")}},{key:"throttle",value:function(t,e){var o;return function(){o||(t.apply(this,arguments),o=!0,setTimeout((function(){return o=!1}),e))}}},{key:"isValidLink",value:function(t){return!this.options.fileExt||t.getAttribute(this.options.sourceAttr)&&new RegExp("("+this.options.fileExt+")($|\\?.*$)","i").test(t.getAttribute(this.options.sourceAttr))}},{key:"calculateTransitionPrefix",value:function(){var t=(document.body||document.documentElement).style;return"transition"in t?"":"WebkitTransition"in t?"-webkit-":"MozTransition"in t?"-moz-":"OTransition"in t&&"-o"}},{key:"getScrollbarWidth",value:function(){var t,e=document.createElement("div");return e.classList.add("sl-scrollbar-measure"),document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t}},{key:"toggleScrollbar",value:function(t){var e=0,o=[].slice.call(document.querySelectorAll("."+this.options.fixedClass));if("hide"===t){var n=window.innerWidth;if(!n){var i=document.documentElement.getBoundingClientRect();n=i.right-Math.abs(i.left)}if(document.body.clientWidth0||0==e&&this.isAppleDevice)&&(document.body.classList.add("hidden-scroll"),document.body.style.paddingRight=s+e+"px",o.forEach((function(t){var o=t.style.paddingRight,n=window.getComputedStyle(t)["padding-right"];t.dataset.originalPaddingRight=o,t.style.paddingRight="".concat(parseFloat(n)+e,"px")})))}}else document.body.classList.remove("hidden-scroll"),document.body.style.paddingRight=document.body.dataset.originalPaddingRight+"px",o.forEach((function(t){var e=t.dataset.originalPaddingRight;void 0!==e&&(t.style.paddingRight=e)}));return e}},{key:"close",value:function(){var t=this;if(!this.isOpen||this.isAnimating||this.isClosing)return!1;this.isClosing=!0;var e=this.relatedElements[this.currentImageIndex];for(var o in e.dispatchEvent(new Event("close.simplelightbox")),this.options.history&&(this.historyHasChanges=!1,this.hashReseted||this.resetHash()),this.removeEventListener(document,"focusin."+this.eventNamespace),this.fadeOut(this.domNodes.overlay,this.options.fadeSpeed),this.fadeOut(document.querySelectorAll(".sl-image img, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter"),this.options.fadeSpeed,(function(){t.options.disableScroll&&t.toggleScrollbar("show"),t.options.htmlClass&&""!==t.options.htmlClass&&document.querySelector("html").classList.remove(t.options.htmlClass),document.body.removeChild(t.domNodes.wrapper),t.options.overlay&&document.body.removeChild(t.domNodes.overlay),t.domNodes.additionalHtml=null,t.domNodes.download=null,e.dispatchEvent(new Event("closed.simplelightbox")),t.isClosing=!1})),this.currentImage=null,this.isOpen=!1,this.isAnimating=!1,this.controlCoordinates)this.controlCoordinates[o]=0;this.controlCoordinates.mousedown=!1,this.controlCoordinates.zoomed=!1,this.controlCoordinates.capture=!1,this.controlCoordinates.initialScale=this.minMax(1,1,this.options.maxZoom),this.controlCoordinates.doubleTapped=!1}},{key:"hash",get:function(){return window.location.hash.substring(1)}},{key:"preload",value:function(){var t=this,e=this.currentImageIndex,o=this.relatedElements.length,n=e+1<0?o-1:e+1>=o-1?0:e+1,i=e-1<0?o-1:e-1>=o-1?0:e-1,s=new Image,r=new Image;s.addEventListener("load",(function(o){var n=o.target.getAttribute("src");-1===t.loadedImages.indexOf(n)&&t.loadedImages.push(n),t.relatedElements[e].dispatchEvent(new Event("nextImageLoaded."+t.eventNamespace))})),s.setAttribute("src",this.relatedElements[n].getAttribute(this.options.sourceAttr)),r.addEventListener("load",(function(o){var n=o.target.getAttribute("src");-1===t.loadedImages.indexOf(n)&&t.loadedImages.push(n),t.relatedElements[e].dispatchEvent(new Event("prevImageLoaded."+t.eventNamespace))})),r.setAttribute("src",this.relatedElements[i].getAttribute(this.options.sourceAttr))}},{key:"loadImage",value:function(t){var e=this,o=t;this.options.rtl&&(t=-t),this.relatedElements[this.currentImageIndex].dispatchEvent(new Event("change."+this.eventNamespace)),this.relatedElements[this.currentImageIndex].dispatchEvent(new Event((1===t?"next":"prev")+"."+this.eventNamespace));var n=this.currentImageIndex+t;if(this.isAnimating||(n<0||n>=this.relatedElements.length)&&!1===this.options.loop)return!1;this.currentImageIndex=n<0?this.relatedElements.length-1:n>this.relatedElements.length-1?0:n,this.domNodes.counter.querySelector(".sl-current").innerHTML=this.currentImageIndex+1,this.options.animationSlide&&this.slide(this.options.animationSpeed/1e3,-100*o-this.controlCoordinates.swipeDiff+"px"),this.fadeOut(this.domNodes.image,this.options.fadeSpeed,(function(){e.isAnimating=!0,e.isClosing?e.isAnimating=!1:setTimeout((function(){var t=e.relatedElements[e.currentImageIndex];e.currentImage&&(e.currentImage.setAttribute("src",t.getAttribute(e.options.sourceAttr)),-1===e.loadedImages.indexOf(t.getAttribute(e.options.sourceAttr))&&e.show(e.domNodes.spinner),e.domNodes.image.contains(e.domNodes.caption)&&e.domNodes.image.removeChild(e.domNodes.caption),e.adjustImage(o),e.options.preloading&&e.preload())}),100)}))}},{key:"adjustImage",value:function(t){var e=this;if(!this.currentImage)return!1;var o=new Image,n=window.innerWidth*this.options.widthRatio,i=window.innerHeight*this.options.heightRatio;o.setAttribute("src",this.currentImage.getAttribute("src")),this.currentImage.dataset.scale=1,this.currentImage.dataset.translateX=0,this.currentImage.dataset.translateY=0,this.zoomPanElement(0,0,1),o.addEventListener("error",(function(o){e.relatedElements[e.currentImageIndex].dispatchEvent(new Event("error."+e.eventNamespace)),e.isAnimating=!1,e.isOpen=!0,e.domNodes.spinner.style.display="none";var n=1===t||-1===t;if(e.initialImageIndex===e.currentImageIndex&&n)return e.close();e.options.alertError&&alert(e.options.alertErrorMessage),e.loadImage(n?t:1)})),o.addEventListener("load",(function(o){void 0!==t&&(e.relatedElements[e.currentImageIndex].dispatchEvent(new Event("changed."+e.eventNamespace)),e.relatedElements[e.currentImageIndex].dispatchEvent(new Event((1===t?"nextDone":"prevDone")+"."+e.eventNamespace))),e.options.history&&e.updateURL(),-1===e.loadedImages.indexOf(e.currentImage.getAttribute("src"))&&e.loadedImages.push(e.currentImage.getAttribute("src"));var s,r,a=o.target.width,l=o.target.height;if(e.options.scaleImageToRatio||a>n||l>i){var c=a/l>n/i?a/n:l/i;a/=c,l/=c}e.domNodes.image.style.top=(window.innerHeight-l)/2+"px",e.domNodes.image.style.left=(window.innerWidth-a-e.globalScrollbarWidth)/2+"px",e.domNodes.image.style.width=a+"px",e.domNodes.image.style.height=l+"px",e.domNodes.spinner.style.display="none",e.options.focus&&e.forceFocus(),e.fadeIn(e.currentImage,e.options.fadeSpeed,(function(){e.options.focus&&e.domNodes.wrapper.focus()})),e.isOpen=!0,"string"==typeof e.options.captionSelector?s="self"===e.options.captionSelector?e.relatedElements[e.currentImageIndex]:e.getCaptionElement(e.relatedElements[e.currentImageIndex]):"function"==typeof e.options.captionSelector&&(s=e.options.captionSelector(e.relatedElements[e.currentImageIndex])),e.options.captions&&s&&(r="data"===e.options.captionType?s.dataset[e.options.captionsData]:"text"===e.options.captionType?s.innerHTML:s.getAttribute(e.options.captionsData)),e.options.loop?1===e.relatedElements.length?e.hide(e.domNodes.navigation.querySelectorAll(".sl-prev, .sl-next")):e.show(e.domNodes.navigation.querySelectorAll(".sl-prev, .sl-next")):(0===e.currentImageIndex&&e.hide(e.domNodes.navigation.querySelector(".sl-prev")),e.currentImageIndex>=e.relatedElements.length-1&&e.hide(e.domNodes.navigation.querySelector(".sl-next")),e.currentImageIndex>0&&e.show(e.domNodes.navigation.querySelector(".sl-prev")),e.currentImageIndexo?o:t}},{key:"setZoomData",value:function(t,e,o){this.currentImage.dataset.scale=t,this.currentImage.dataset.translateX=e,this.currentImage.dataset.translateY=o}},{key:"hashchangeHandler",value:function(){this.isOpen&&this.hash===this.initialLocationHash&&(this.hashReseted=!0,this.close())}},{key:"addEvents",value:function(){var t=this;if(this.addEventListener(window,"resize."+this.eventNamespace,(function(e){t.isOpen&&t.adjustImage()})),this.addEventListener(this.domNodes.closeButton,["click."+this.eventNamespace,"touchstart."+this.eventNamespace],this.close.bind(this)),this.options.history&&setTimeout((function(){t.addEventListener(window,"hashchange."+t.eventNamespace,(function(e){t.isOpen&&t.hashchangeHandler()}))}),40),this.addEventListener(this.domNodes.navigation.getElementsByTagName("button"),"click."+this.eventNamespace,(function(e){if(!e.currentTarget.tagName.match(/button/i))return!0;e.preventDefault(),t.controlCoordinates.swipeDiff=0,t.loadImage(e.currentTarget.classList.contains("sl-next")?1:-1)})),this.options.scrollZoom){var e=1;this.addEventListener(this.domNodes.image,["mousewheel","DOMMouseScroll"],(function(o){if(t.controlCoordinates.mousedown||t.isAnimating||t.isClosing||!t.isOpen)return!0;0==t.controlCoordinates.containerHeight&&(t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY));var n=o.delta||o.wheelDelta;void 0===n&&(n=o.detail),n=Math.max(-1,Math.min(1,n)),e+=n*t.options.scrollZoomFactor*e,e=Math.max(1,Math.min(t.options.maxZoom,e)),t.controlCoordinates.targetScale=e;var i=document.documentElement.scrollTop||document.body.scrollTop;t.controlCoordinates.pinchOffsetX=o.pageX,t.controlCoordinates.pinchOffsetY=o.pageY-i||0,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.scaleDifference=t.controlCoordinates.targetScale-t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.initialOffsetX-(t.controlCoordinates.pinchOffsetX-t.controlCoordinates.containerOffsetX-t.controlCoordinates.containerWidth/2-t.controlCoordinates.initialOffsetX)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.initialOffsetY-(t.controlCoordinates.pinchOffsetY-t.controlCoordinates.containerOffsetY-t.controlCoordinates.containerHeight/2-t.controlCoordinates.initialOffsetY)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale),t.controlCoordinates.targetScale>1?(t.controlCoordinates.zoomed=!0,(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed)):(1===t.controlCoordinates.initialScale&&(t.controlCoordinates.zoomed=!1,"none"===t.domNodes.caption.style.display&&t.fadeIn(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=null,t.controlCoordinates.capture=!1),t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance,t.controlCoordinates.initialScale=t.controlCoordinates.targetScale,t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.setZoomData(t.controlCoordinates.targetScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale)}))}this.addEventListener(this.domNodes.image,["touchstart."+this.eventNamespace,"mousedown."+this.eventNamespace],(function(e){if("A"===e.target.tagName&&"touchstart"===e.type)return!0;if("mousedown"===e.type)e.preventDefault(),t.controlCoordinates.initialPointerOffsetX=e.clientX,t.controlCoordinates.initialPointerOffsetY=e.clientY,t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY),t.controlCoordinates.capture=!0;else{if(t.controlCoordinates.touchCount=e.touches.length,t.controlCoordinates.initialPointerOffsetX=e.touches[0].clientX,t.controlCoordinates.initialPointerOffsetY=e.touches[0].clientY,t.controlCoordinates.containerHeight=t.getDimensions(t.domNodes.image).height,t.controlCoordinates.containerWidth=t.getDimensions(t.domNodes.image).width,t.controlCoordinates.imgHeight=t.getDimensions(t.currentImage).height,t.controlCoordinates.imgWidth=t.getDimensions(t.currentImage).width,t.controlCoordinates.containerOffsetX=t.domNodes.image.offsetLeft,t.controlCoordinates.containerOffsetY=t.domNodes.image.offsetTop,1===t.controlCoordinates.touchCount){if(t.controlCoordinates.doubleTapped)return t.currentImage.classList.add("sl-transition"),t.controlCoordinates.zoomed?(t.controlCoordinates.initialScale=1,t.setZoomData(t.controlCoordinates.initialScale,0,0),t.zoomPanElement("0px","0px",t.controlCoordinates.initialScale),t.controlCoordinates.zoomed=!1):(t.controlCoordinates.initialScale=t.options.doubleTapZoom,t.setZoomData(t.controlCoordinates.initialScale,0,0),t.zoomPanElement("0px","0px",t.controlCoordinates.initialScale),(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed),t.controlCoordinates.zoomed=!0),setTimeout((function(){t.currentImage&&t.currentImage.classList.remove("sl-transition")}),200),!1;t.controlCoordinates.doubleTapped=!0,setTimeout((function(){t.controlCoordinates.doubleTapped=!1}),300),t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY)}else 2===t.controlCoordinates.touchCount&&(t.controlCoordinates.initialPointerOffsetX2=e.touches[1].clientX,t.controlCoordinates.initialPointerOffsetY2=e.touches[1].clientY,t.controlCoordinates.initialOffsetX=parseFloat(t.currentImage.dataset.translateX),t.controlCoordinates.initialOffsetY=parseFloat(t.currentImage.dataset.translateY),t.controlCoordinates.pinchOffsetX=(t.controlCoordinates.initialPointerOffsetX+t.controlCoordinates.initialPointerOffsetX2)/2,t.controlCoordinates.pinchOffsetY=(t.controlCoordinates.initialPointerOffsetY+t.controlCoordinates.initialPointerOffsetY2)/2,t.controlCoordinates.initialPinchDistance=Math.sqrt((t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialPointerOffsetX2)*(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialPointerOffsetX2)+(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialPointerOffsetY2)*(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialPointerOffsetY2)));t.controlCoordinates.capture=!0}return!!t.controlCoordinates.mousedown||(t.transitionCapable&&(t.controlCoordinates.imageLeft=parseInt(t.domNodes.image.style.left,10)),t.controlCoordinates.mousedown=!0,t.controlCoordinates.swipeDiff=0,t.controlCoordinates.swipeYDiff=0,t.controlCoordinates.swipeStart=e.pageX||e.touches[0].pageX,t.controlCoordinates.swipeYStart=e.pageY||e.touches[0].pageY,!1)})),this.addEventListener(this.domNodes.image,["touchmove."+this.eventNamespace,"mousemove."+this.eventNamespace,"MSPointerMove"],(function(e){if(!t.controlCoordinates.mousedown)return!0;if("touchmove"===e.type){if(!1===t.controlCoordinates.capture)return!1;t.controlCoordinates.pointerOffsetX=e.touches[0].clientX,t.controlCoordinates.pointerOffsetY=e.touches[0].clientY,t.controlCoordinates.touchCount=e.touches.length,t.controlCoordinates.touchmoveCount++,t.controlCoordinates.touchCount>1?(t.controlCoordinates.pointerOffsetX2=e.touches[1].clientX,t.controlCoordinates.pointerOffsetY2=e.touches[1].clientY,t.controlCoordinates.targetPinchDistance=Math.sqrt((t.controlCoordinates.pointerOffsetX-t.controlCoordinates.pointerOffsetX2)*(t.controlCoordinates.pointerOffsetX-t.controlCoordinates.pointerOffsetX2)+(t.controlCoordinates.pointerOffsetY-t.controlCoordinates.pointerOffsetY2)*(t.controlCoordinates.pointerOffsetY-t.controlCoordinates.pointerOffsetY2)),null===t.controlCoordinates.initialPinchDistance&&(t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance),Math.abs(t.controlCoordinates.initialPinchDistance-t.controlCoordinates.targetPinchDistance)>=1&&(t.controlCoordinates.targetScale=t.minMax(t.controlCoordinates.targetPinchDistance/t.controlCoordinates.initialPinchDistance*t.controlCoordinates.initialScale,1,t.options.maxZoom),t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.scaleDifference=t.controlCoordinates.targetScale-t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.initialOffsetX-(t.controlCoordinates.pinchOffsetX-t.controlCoordinates.containerOffsetX-t.controlCoordinates.containerWidth/2-t.controlCoordinates.initialOffsetX)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.initialOffsetY-(t.controlCoordinates.pinchOffsetY-t.controlCoordinates.containerOffsetY-t.controlCoordinates.containerHeight/2-t.controlCoordinates.initialOffsetY)/(t.controlCoordinates.targetScale-t.controlCoordinates.scaleDifference)*t.controlCoordinates.scaleDifference,-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale),t.controlCoordinates.targetScale>1&&(t.controlCoordinates.zoomed=!0,(!t.domNodes.caption.style.opacity||t.domNodes.caption.style.opacity>0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=t.controlCoordinates.targetPinchDistance,t.controlCoordinates.initialScale=t.controlCoordinates.targetScale,t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY)):(t.controlCoordinates.targetScale=t.controlCoordinates.initialScale,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.pointerOffsetX-(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialOffsetX),-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.pointerOffsetY-(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialOffsetY),-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),Math.abs(t.controlCoordinates.targetOffsetX)===Math.abs(t.controlCoordinates.limitOffsetX)&&(t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialPointerOffsetX=t.controlCoordinates.pointerOffsetX),Math.abs(t.controlCoordinates.targetOffsetY)===Math.abs(t.controlCoordinates.limitOffsetY)&&(t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.controlCoordinates.initialPointerOffsetY=t.controlCoordinates.pointerOffsetY),t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale))}if("mousemove"===e.type&&t.controlCoordinates.mousedown){if("touchmove"==e.type)return!0;if(e.preventDefault(),!1===t.controlCoordinates.capture)return!1;t.controlCoordinates.pointerOffsetX=e.clientX,t.controlCoordinates.pointerOffsetY=e.clientY,t.controlCoordinates.targetScale=t.controlCoordinates.initialScale,t.controlCoordinates.limitOffsetX=(t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale-t.controlCoordinates.containerWidth)/2,t.controlCoordinates.limitOffsetY=(t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale-t.controlCoordinates.containerHeight)/2,t.controlCoordinates.targetOffsetX=t.controlCoordinates.imgWidth*t.controlCoordinates.targetScale<=t.controlCoordinates.containerWidth?0:t.minMax(t.controlCoordinates.pointerOffsetX-(t.controlCoordinates.initialPointerOffsetX-t.controlCoordinates.initialOffsetX),-1*t.controlCoordinates.limitOffsetX,t.controlCoordinates.limitOffsetX),t.controlCoordinates.targetOffsetY=t.controlCoordinates.imgHeight*t.controlCoordinates.targetScale<=t.controlCoordinates.containerHeight?0:t.minMax(t.controlCoordinates.pointerOffsetY-(t.controlCoordinates.initialPointerOffsetY-t.controlCoordinates.initialOffsetY),-1*t.controlCoordinates.limitOffsetY,t.controlCoordinates.limitOffsetY),Math.abs(t.controlCoordinates.targetOffsetX)===Math.abs(t.controlCoordinates.limitOffsetX)&&(t.controlCoordinates.initialOffsetX=t.controlCoordinates.targetOffsetX,t.controlCoordinates.initialPointerOffsetX=t.controlCoordinates.pointerOffsetX),Math.abs(t.controlCoordinates.targetOffsetY)===Math.abs(t.controlCoordinates.limitOffsetY)&&(t.controlCoordinates.initialOffsetY=t.controlCoordinates.targetOffsetY,t.controlCoordinates.initialPointerOffsetY=t.controlCoordinates.pointerOffsetY),t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),t.zoomPanElement(t.controlCoordinates.targetOffsetX+"px",t.controlCoordinates.targetOffsetY+"px",t.controlCoordinates.targetScale)}t.controlCoordinates.zoomed||(t.controlCoordinates.swipeEnd=e.pageX||e.touches[0].pageX,t.controlCoordinates.swipeYEnd=e.pageY||e.touches[0].pageY,t.controlCoordinates.swipeDiff=t.controlCoordinates.swipeStart-t.controlCoordinates.swipeEnd,t.controlCoordinates.swipeYDiff=t.controlCoordinates.swipeYStart-t.controlCoordinates.swipeYEnd,t.options.animationSlide&&t.slide(0,-t.controlCoordinates.swipeDiff+"px"))})),this.addEventListener(this.domNodes.image,["touchend."+this.eventNamespace,"mouseup."+this.eventNamespace,"touchcancel."+this.eventNamespace,"mouseleave."+this.eventNamespace,"pointerup","pointercancel","MSPointerUp","MSPointerCancel"],(function(e){if(t.isTouchDevice&&"touchend"===e.type&&(t.controlCoordinates.touchCount=e.touches.length,0===t.controlCoordinates.touchCount?(t.currentImage&&t.setZoomData(t.controlCoordinates.initialScale,t.controlCoordinates.targetOffsetX,t.controlCoordinates.targetOffsetY),1===t.controlCoordinates.initialScale&&(t.controlCoordinates.zoomed=!1,"none"===t.domNodes.caption.style.display&&t.fadeIn(t.domNodes.caption,t.options.fadeSpeed)),t.controlCoordinates.initialPinchDistance=null,t.controlCoordinates.capture=!1):1===t.controlCoordinates.touchCount?(t.controlCoordinates.initialPointerOffsetX=e.touches[0].clientX,t.controlCoordinates.initialPointerOffsetY=e.touches[0].clientY):t.controlCoordinates.touchCount>1&&(t.controlCoordinates.initialPinchDistance=null)),t.controlCoordinates.mousedown){t.controlCoordinates.mousedown=!1;var o=!0;t.options.loop||(0===t.currentImageIndex&&t.controlCoordinates.swipeDiff<0&&(o=!1),t.currentImageIndex>=t.relatedElements.length-1&&t.controlCoordinates.swipeDiff>0&&(o=!1)),Math.abs(t.controlCoordinates.swipeDiff)>t.options.swipeTolerance&&o?t.loadImage(t.controlCoordinates.swipeDiff>0?1:-1):t.options.animationSlide&&t.slide(t.options.animationSpeed/1e3,"0px"),t.options.swipeClose&&Math.abs(t.controlCoordinates.swipeYDiff)>50&&Math.abs(t.controlCoordinates.swipeDiff)0)&&"none"!==t.domNodes.caption.style.display&&t.fadeOut(t.domNodes.caption,t.options.fadeSpeed),t.controlCoordinates.zoomed=!0),setTimeout((function(){t.currentImage&&(t.currentImage.classList.remove("sl-transition"),t.currentImage.style[t.transitionPrefix+"transform-origin"]=null)}),200),t.controlCoordinates.capture=!0,!1}))}},{key:"getDimensions",value:function(t){var e=window.getComputedStyle(t),o=t.offsetHeight,n=t.offsetWidth,i=parseFloat(e.borderTopWidth);return{height:o-parseFloat(e.borderBottomWidth)-i-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom),width:n-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)}}},{key:"updateHash",value:function(){var t="pid="+(this.currentImageIndex+1),e=window.location.href.split("#")[0]+"#"+t;this.hashReseted=!1,this.pushStateSupport?window.history[this.historyHasChanges?"replaceState":"pushState"]("",document.title,e):this.historyHasChanges?window.location.replace(e):window.location.hash=t,this.historyHasChanges||(this.urlChangedOnce=!0),this.historyHasChanges=!0}},{key:"resetHash",value:function(){this.hashReseted=!0,this.urlChangedOnce?history.back():this.pushStateSupport?history.pushState("",document.title,window.location.pathname+window.location.search):window.location.hash="",clearTimeout(this.historyUpdateTimeout)}},{key:"updateURL",value:function(){clearTimeout(this.historyUpdateTimeout),this.historyHasChanges?this.historyUpdateTimeout=setTimeout(this.updateHash.bind(this),800):this.updateHash()}},{key:"setCaption",value:function(t,e,o){var n=this;if(this.options.captions&&t&&""!==t&&void 0!==t){var i,s=null===(i=null!=o?o:this.options.captionHTML)||void 0===i||i?"innerHTML":"innerText";this.hide(this.domNodes.caption),this.domNodes.caption.style.width=e+"px",this.domNodes.caption[s]=t,this.domNodes.image.appendChild(this.domNodes.caption),setTimeout((function(){n.fadeIn(n.domNodes.caption,n.options.fadeSpeed)}),this.options.captionDelay)}}},{key:"slide",value:function(t,e){if(!this.transitionCapable)return this.domNodes.image.style.left=e;this.domNodes.image.style[this.transitionPrefix+"transform"]="translateX("+e+")",this.domNodes.image.style[this.transitionPrefix+"transition"]=this.transitionPrefix+"transform "+t+"s linear"}},{key:"getRelated",value:function(t){return t&&!1!==t&&"nofollow"!==t?Array.from(this.elements).filter((function(e){return e.getAttribute("rel")===t})):this.elements}},{key:"openImage",value:function(t){var e=this;t.dispatchEvent(new Event("show."+this.eventNamespace)),this.globalScrollbarWidth=this.getScrollbarWidth(),this.options.disableScroll&&(this.toggleScrollbar("hide"),this.globalScrollbarWidth=0),this.options.htmlClass&&""!==this.options.htmlClass&&document.querySelector("html").classList.add(this.options.htmlClass),document.body.appendChild(this.domNodes.wrapper),this.domNodes.wrapper.appendChild(this.domNodes.image),this.options.overlay&&document.body.appendChild(this.domNodes.overlay),this.relatedElements=this.getRelated(t.rel),this.options.showCounter&&(1==this.relatedElements.length&&this.domNodes.wrapper.contains(this.domNodes.counter)?this.domNodes.wrapper.removeChild(this.domNodes.counter):this.relatedElements.length>1&&!this.domNodes.wrapper.contains(this.domNodes.counter)&&this.domNodes.wrapper.appendChild(this.domNodes.counter)),this.options.download&&this.domNodes.download&&this.domNodes.wrapper.appendChild(this.domNodes.download),this.isAnimating=!0,this.currentImageIndex=this.relatedElements.indexOf(t);var o=t.getAttribute(this.options.sourceAttr);this.currentImage=document.createElement("img"),this.currentImage.style.display="none",this.currentImage.setAttribute("src",o),this.currentImage.dataset.scale=1,this.currentImage.dataset.translateX=0,this.currentImage.dataset.translateY=0,-1===this.loadedImages.indexOf(o)&&this.loadedImages.push(o),this.domNodes.image.innerHTML="",this.domNodes.image.setAttribute("style",""),this.domNodes.image.appendChild(this.currentImage),this.fadeIn(this.domNodes.overlay,this.options.fadeSpeed),this.fadeIn([this.domNodes.counter,this.domNodes.navigation,this.domNodes.closeButton,this.domNodes.download],this.options.fadeSpeed),this.show(this.domNodes.spinner),this.domNodes.counter.querySelector(".sl-current").innerHTML=this.currentImageIndex+1,this.domNodes.counter.querySelector(".sl-total").innerHTML=this.relatedElements.length,this.adjustImage(),this.options.preloading&&this.preload(),setTimeout((function(){t.dispatchEvent(new Event("shown."+e.eventNamespace))}),this.options.animationSpeed)}},{key:"forceFocus",value:function(){var t=this;this.removeEventListener(document,"focusin."+this.eventNamespace),this.addEventListener(document,"focusin."+this.eventNamespace,(function(e){document===e.target||t.domNodes.wrapper===e.target||t.domNodes.wrapper.contains(e.target)||t.domNodes.wrapper.focus()}))}},{key:"addEventListener",value:function(t,e,i,s){t=this.wrap(t),e=this.wrap(e);var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var l=r.value;l.namespaces||(l.namespaces={});var c,d=n(e);try{for(d.s();!(c=d.n()).done;){var h=c.value,m=s||!1;["touchstart","touchmove","mousewheel","DOMMouseScroll"].indexOf(h.split(".")[0])>=0&&this.isPassiveEventsSupported&&("object"===o(m)?m.passive=!0:m={passive:!0}),l.namespaces[h]=i,l.addEventListener(h.split(".")[0],i,m)}}catch(t){d.e(t)}finally{d.f()}}}catch(t){a.e(t)}finally{a.f()}}},{key:"removeEventListener",value:function(t,e){t=this.wrap(t),e=this.wrap(e);var o,i=n(t);try{for(i.s();!(o=i.n()).done;){var s,r=o.value,a=n(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;r.namespaces&&r.namespaces[l]&&(r.removeEventListener(l.split(".")[0],r.namespaces[l]),delete r.namespaces[l])}}catch(t){a.e(t)}finally{a.f()}}}catch(t){i.e(t)}finally{i.f()}}},{key:"fadeOut",value:function(t,e,o){var i,s=this,r=n(t=this.wrap(t));try{for(r.s();!(i=r.n()).done;){var a=i.value;a.style.opacity=parseFloat(a)||window.getComputedStyle(a).getPropertyValue("opacity")}}catch(t){r.e(t)}finally{r.f()}this.isFadeIn=!1;var l=16.66666/(e||this.options.fadeSpeed);!function e(){var i=parseFloat(t[0].style.opacity);if((i-=l)<0){var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var c=r.value;c.style.display="none",c.style.opacity=1}}catch(t){a.e(t)}finally{a.f()}o&&o.call(s,t)}else{var d,h=n(t);try{for(h.s();!(d=h.n()).done;)d.value.style.opacity=i}catch(t){h.e(t)}finally{h.f()}requestAnimationFrame(e)}}()}},{key:"fadeIn",value:function(t,e,o,i){var s,r=this,a=n(t=this.wrap(t));try{for(a.s();!(s=a.n()).done;){var l=s.value;l&&(l.style.opacity=0,l.style.display=i||"block")}}catch(t){a.e(t)}finally{a.f()}this.isFadeIn=!0;var c=parseFloat(t[0].dataset.opacityTarget||1),d=16.66666*c/(e||this.options.fadeSpeed);!function e(){var i=parseFloat(t[0].style.opacity);if((i+=d)>c){var s,a=n(t);try{for(a.s();!(s=a.n()).done;){var l=s.value;l&&(l.style.opacity=c)}}catch(t){a.e(t)}finally{a.f()}o&&o.call(r,t)}else{var h,m=n(t);try{for(m.s();!(h=m.n()).done;){var f=h.value;f&&(f.style.opacity=i)}}catch(t){m.e(t)}finally{m.f()}if(!r.isFadeIn)return;requestAnimationFrame(e)}}()}},{key:"hide",value:function(t){var e,o=n(t=this.wrap(t));try{for(o.s();!(e=o.n()).done;){var i=e.value;"none"!=i.style.display&&(i.dataset.initialDisplay=i.style.display),i.style.display="none"}}catch(t){o.e(t)}finally{o.f()}}},{key:"show",value:function(t,e){var o,i=n(t=this.wrap(t));try{for(i.s();!(o=i.n()).done;){var s=o.value;s.style.display=s.dataset.initialDisplay||e||"block"}}catch(t){i.e(t)}finally{i.f()}}},{key:"wrap",value:function(t){return"function"==typeof t[Symbol.iterator]&&"string"!=typeof t?t:[t]}},{key:"on",value:function(t,e){t=this.wrap(t);var o,i=n(this.elements);try{for(i.s();!(o=i.n()).done;){var s=o.value;s.fullyNamespacedEvents||(s.fullyNamespacedEvents={});var r,a=n(t);try{for(a.s();!(r=a.n()).done;){var l=r.value;s.fullyNamespacedEvents[l]=e,s.addEventListener(l,e)}}catch(t){a.e(t)}finally{a.f()}}}catch(t){i.e(t)}finally{i.f()}return this}},{key:"off",value:function(t){t=this.wrap(t);var e,o=n(this.elements);try{for(o.s();!(e=o.n()).done;){var i,s=e.value,r=n(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;void 0!==s.fullyNamespacedEvents&&a in s.fullyNamespacedEvents&&s.removeEventListener(a,s.fullyNamespacedEvents[a])}}catch(t){r.e(t)}finally{r.f()}}}catch(t){o.e(t)}finally{o.f()}return this}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t=t||this.elements[0],"undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get(0)),e>0&&(t=this.elements[e]),this.initialImageIndex=this.elements.indexOf(t),this.initialImageIndex>-1&&this.openImage(t)}},{key:"openPosition",value:function(t){var e=this.elements[t];this.open(e,t)}},{key:"next",value:function(){this.loadImage(1)}},{key:"prev",value:function(){this.loadImage(-1)}},{key:"getLighboxData",value:function(){return{currentImageIndex:this.currentImageIndex,currentImage:this.currentImage,globalScrollbarWidth:this.globalScrollbarWidth}}},{key:"destroy",value:function(){this.off(["close."+this.eventNamespace,"closed."+this.eventNamespace,"nextImageLoaded."+this.eventNamespace,"prevImageLoaded."+this.eventNamespace,"change."+this.eventNamespace,"nextDone."+this.eventNamespace,"prevDone."+this.eventNamespace,"error."+this.eventNamespace,"changed."+this.eventNamespace,"next."+this.eventNamespace,"prev."+this.eventNamespace,"show."+this.eventNamespace,"shown."+this.eventNamespace]),this.removeEventListener(this.elements,"click."+this.eventNamespace),this.removeEventListener(document,"focusin."+this.eventNamespace),this.removeEventListener(document.body,"contextmenu."+this.eventNamespace),this.removeEventListener(document.body,"keyup."+this.eventNamespace),this.removeEventListener(this.domNodes.navigation.getElementsByTagName("button"),"click."+this.eventNamespace),this.removeEventListener(this.domNodes.closeButton,"click."+this.eventNamespace),this.removeEventListener(window,"resize."+this.eventNamespace),this.removeEventListener(window,"hashchange."+this.eventNamespace),this.close(),this.isOpen&&(document.body.removeChild(this.domNodes.wrapper),document.body.removeChild(this.domNodes.overlay)),this.elements=null}},{key:"refresh",value:function(){if(!this.initialSelector)throw"refreshing only works when you initialize using a selector!";var t=this.options,e=this.initialSelector;return this.destroy(),this.constructor(e,t),this}}],s&&a(e.prototype,s),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),d=c;e.default=d,t.SimpleLightbox=c}(r);var a=e(r);const l={sourceAttr:"src",captions:!1,disableRightClick:!0,overlayOpacity:1,widthRatio:.95,heightRatio:.95,animationSpeed:100,animationSlide:!1,fadeSpeed:200},c=["img.kg-image",".kg-image img","img.kg-gallery-image",".kg-gallery-image img","img.lightbox-image",".lightbox-image img"];!function(t){if(!s)return;let e=new IntersectionObserver(((e,o)=>{try{e.forEach((e=>{e.isIntersecting&&s&&async function(t){try{const e=await fetch(t);if(!e.ok)throw new Error("Failed to fetch page");const o=await e.text(),n=(new DOMParser).parseFromString(o,"text/html"),i=n.querySelectorAll(".post");i.forEach((t=>{t.classList.add("post-hidden")}));const s=n.querySelector('link[rel="next"]')?.getAttribute("href");return{posts:i,nextLink:s}}catch(t){throw new Error(t)}}(s).then((e=>{let{posts:n,nextLink:i}=e;n.forEach((t=>{document.querySelector(".gh-postfeed").append(t)})),function(t,e){try{const o=Array.from(t).map((t=>t.querySelector("img"))).map((t=>new Promise(((e,o)=>{t.onload=e,t.onerror=o}))));Promise.all(o).then((()=>{e()}))}catch(t){throw new Error(t)}}(n,(()=>{n.forEach((t=>{t.classList.remove("post-hidden")})),t.recalculate(!0)})),i?(s=i,o.observe(document.querySelector(".post:last-of-type"))):o.disconnect()}))}))}catch(t){console.log(t)}}),{rootMargin:"150px"});e.observe(document.querySelector(".post:last-of-type"))}(function(){if(!i)return;return new n({container:i,trueOrder:!1,waitForImages:!1,margin:16,columns:3,breakAt:{1300:2,700:1}})}()),function(){let t=document.querySelector("#post");t&&new a(t.querySelectorAll(c.join(", ")),l)}(),function(){const t=document.getElementById("mobile-menu-open"),e=document.getElementById("mobile-menu-close"),o=document.getElementById("mobile-menu"),n=()=>{o.classList.add("hidden"),document.body.style.overflow="auto"};t.addEventListener("click",(()=>{o.classList.remove("hidden"),document.body.style.overflow="hidden"})),e.addEventListener("click",(()=>{n()})),o.addEventListener("click",(()=>{n()})),o.querySelector("#mobile-menu-main").addEventListener("click",(t=>{t.stopPropagation()})),window.addEventListener("resize",(function(){n()}))}()}(); //# sourceMappingURL=index.js.map diff --git a/assets/built/index.js.map b/assets/built/index.js.map index 76eb8b5..0b5bb88 100644 --- a/assets/built/index.js.map +++ b/assets/built/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../../node_modules/macy/dist/macy.js","../js/macy.js","../js/infiniteScroll.js","../../node_modules/simplelightbox/dist/simple-lightbox.modules.js","../js/lightbox.js","../js/index.js","../js/mobileMenu.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.Macy=n()}(this,function(){\"use strict\";function t(t,n){var e=void 0;return function(){e&&clearTimeout(e),e=setTimeout(t,n)}}function n(t,n){for(var e=t.length,r=e,o=[];e--;)o.push(n(t[r-e-1]));return o}function e(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(window.Promise)return A(t,n,e);t.recalculate(!0,!0)}function r(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=0;s=a&&(i=n.breakAt[a],O(i,e))}return e}function o(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=r.length-1;s>=0;s--){var a=parseInt(r[s],10);o<=a&&(i=n.breakAt[a],O(i,e))}return e}function i(t){var n=t.useContainerForBreakpoints?t.container.clientWidth:window.innerWidth,e={columns:t.columns};b(t.margin)?e.margin={x:t.margin.x,y:t.margin.y}:e.margin={x:t.margin,y:t.margin};var i=Object.keys(t.breakAt);return t.mobileFirst?r({options:t,responsiveOptions:e,keys:i,docWidth:n}):o({options:t,responsiveOptions:e,keys:i,docWidth:n})}function s(t){return i(t).columns}function a(t){return i(t).margin}function c(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=s(t),r=a(t).x,o=100/e;if(!n)return o;if(1===e)return\"100%\";var i=\"px\";if(\"string\"==typeof r){var c=parseFloat(r);i=r.replace(c,\"\"),r=c}return r=(e-1)*r/e,\"%\"===i?o-r+\"%\":\"calc(\"+o+\"% - \"+r+i+\")\"}function u(t,n){var e=s(t.options),r=0,o=void 0,i=void 0;if(1===++n)return 0;i=a(t.options).x;var u=\"px\";if(\"string\"==typeof i){var l=parseFloat(i,10);u=i.replace(l,\"\"),i=l}return o=(i-(e-1)*i/e)*(n-1),r+=c(t.options,!1)*(n-1),\"%\"===u?r+o+\"%\":\"calc(\"+r+\"% + \"+o+u+\")\"}function l(t){var n=0,e=t.container,r=t.rows;v(r,function(t){n=t>n?t:n}),e.style.height=n+\"px\"}function p(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,function(n){var e=0,o=parseInt(n.offsetHeight,10);isNaN(o)||(t.rows.forEach(function(n,r){n2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,function(n){t.lastcol===o&&(t.lastcol=0);var e=C(n,\"height\");e=parseInt(n.offsetHeight,10),isNaN(e)||(n.style.position=\"absolute\",n.style.top=t.rows[t.lastcol]+\"px\",n.style.left=\"\"+t.cols[t.lastcol],t.rows[t.lastcol]+=isNaN(e)?0:e+i,t.lastcol+=1,r&&(n.dataset.macyComplete=1))}),r&&(t.tmpRows=null),l(t)}var h=function t(n,e){if(!(this instanceof t))return new t(n,e);if(n&&n.nodeName)return n;if(n=n.replace(/^\\s*/,\"\").replace(/\\s*$/,\"\"),e)return this.byCss(n,e);for(var r in this.selectors)if(e=r.split(\"/\"),new RegExp(e[1],e[2]).test(n))return this.selectors[r](n);return this.byCss(n)};h.prototype.byCss=function(t,n){return(n||document).querySelectorAll(t)},h.prototype.selectors={},h.prototype.selectors[/^\\.[\\w\\-]+$/]=function(t){return document.getElementsByClassName(t.substring(1))},h.prototype.selectors[/^\\w+$/]=function(t){return document.getElementsByTagName(t)},h.prototype.selectors[/^\\#[\\w\\-]+$/]=function(t){return document.getElementById(t.substring(1))};var v=function(t,n){for(var e=t.length,r=e;e--;)n(t[r-e-1])},m=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.running=!1,this.events=[],this.add(t)};m.prototype.run=function(){if(!this.running&&this.events.length>0){var t=this.events.shift();this.running=!0,t(),this.running=!1,this.run()}},m.prototype.add=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!!n&&(Array.isArray(n)?v(n,function(n){return t.add(n)}):(this.events.push(n),void this.run()))},m.prototype.clear=function(){this.events=[]};var d=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.instance=t,this.data=n,this},y=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.events={},this.instance=t};y.prototype.on=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!t||!n)&&(Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(n))},y.prototype.emit=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!Array.isArray(this.events[t]))return!1;var e=new d(this.instance,n);v(this.events[t],function(t){return t(e)})};var g=function(t){return!(\"naturalHeight\"in t&&t.naturalHeight+t.naturalWidth===0)||t.width+t.height!==0},E=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(t,e){if(n.complete)return g(n)?t(n):e(n);n.addEventListener(\"load\",function(){return g(n)?t(n):e(n)}),n.addEventListener(\"error\",function(){return e(n)})}).then(function(n){e&&t.emit(t.constants.EVENT_IMAGE_LOAD,{img:n})}).catch(function(n){return t.emit(t.constants.EVENT_IMAGE_ERROR,{img:n})})},w=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n(e,function(n){return E(t,n,r)})},A=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Promise.all(w(t,n,e)).then(function(){t.emit(t.constants.EVENT_IMAGE_COMPLETE)})},I=function(n){return t(function(){n.emit(n.constants.EVENT_RESIZE),n.queue.add(function(){return n.recalculate(!0,!0)})},100)},N=function(t){if(t.container=h(t.options.container),t.container instanceof h||!t.container)return!!t.options.debug&&console.error(\"Error: Container not found\");t.container.length&&(t.container=t.container[0]),t.options.container=t.container,t.container.style.position=\"relative\"},T=function(t){t.queue=new m,t.events=new y(t),t.rows=[],t.resizer=I(t)},L=function(t){var n=h(\"img\",t.container);window.addEventListener(\"resize\",t.resizer),t.on(t.constants.EVENT_IMAGE_LOAD,function(){return t.recalculate(!1,!1)}),t.on(t.constants.EVENT_IMAGE_COMPLETE,function(){return t.recalculate(!0,!0)}),t.options.useOwnImageLoader||e(t,n,!t.options.waitForImages),t.emit(t.constants.EVENT_INITIALIZED)},_=function(t){N(t),T(t),L(t)},b=function(t){return t===Object(t)&&\"[object Array]\"!==Object.prototype.toString.call(t)},O=function(t,n){b(t)||(n.columns=t),b(t)&&t.columns&&(n.columns=t.columns),b(t)&&t.margin&&!b(t.margin)&&(n.margin={x:t.margin,y:t.margin}),b(t)&&t.margin&&b(t.margin)&&t.margin.x&&(n.margin.x=t.margin.x),b(t)&&t.margin&&b(t.margin)&&t.margin.y&&(n.margin.y=t.margin.y)},C=function(t,n){return window.getComputedStyle(t,null).getPropertyValue(n)},M=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.lastcol||(t.lastcol=0),t.rows.length<1&&(e=!0),e){t.rows=[],t.cols=[],t.lastcol=0;for(var r=n-1;r>=0;r--)t.rows[r]=0,t.cols[r]=u(t,r)}else if(t.tmpRows){t.rows=[];for(var r=n-1;r>=0;r--)t.rows[r]=t.tmpRows[r]}else{t.tmpRows=[];for(var r=n-1;r>=0;r--)t.tmpRows[r]=t.rows[r]}},V=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t.container.children:h(':scope > *:not([data-macy-complete=\"1\"])',t.container);r=Array.from(r).filter(function(t){return null!==t.offsetParent});var o=c(t.options);return v(r,function(t){n&&(t.dataset.macyComplete=0),t.style.width=o}),t.options.trueOrder?(f(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED)):(p(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED))},R=function(){return!!window.Promise},x=Object.assign||function(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:k;if(!(this instanceof t))return new t(n);this.options={},x(this.options,k,n),this.options.cancelLegacy&&!R()||_(this)};return q.init=function(t){return console.warn(\"Depreciated: Macy.init will be removed in v3.0.0 opt to use Macy directly like so Macy({ /*options here*/ }) \"),new q(t)},q.prototype.recalculateOnImageLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e(this,h(\"img\",this.container),!t)},q.prototype.runOnImageLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=h(\"img\",this.container);return this.on(this.constants.EVENT_IMAGE_COMPLETE,t),n&&this.on(this.constants.EVENT_IMAGE_LOAD,t),e(this,r,n)},q.prototype.recalculate=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.queue.clear(),this.queue.add(function(){return V(t,n,e)})},q.prototype.remove=function(){window.removeEventListener(\"resize\",this.resizer),v(this.container.children,function(t){t.removeAttribute(\"data-macy-complete\"),t.removeAttribute(\"style\")}),this.container.removeAttribute(\"style\")},q.prototype.reInit=function(){this.recalculate(!0,!0),this.emit(this.constants.EVENT_INITIALIZED),window.addEventListener(\"resize\",this.resizer),this.container.style.position=\"relative\"},q.prototype.on=function(t,n){this.events.on(t,n)},q.prototype.emit=function(t,n){this.events.emit(t,n)},q.constants={EVENT_INITIALIZED:\"macy.initialized\",EVENT_RECALCULATED:\"macy.recalculated\",EVENT_IMAGE_LOAD:\"macy.image.load\",EVENT_IMAGE_ERROR:\"macy.image.error\",EVENT_IMAGE_COMPLETE:\"macy.images.complete\",EVENT_RESIZE:\"macy.resize\"},q.prototype.constants=q.constants,q});\n","import Macy from 'macy';\n\nlet container = document.querySelector('.gh-postfeed');\n\nexport default function macyFeed() {\n\n if (!container) { return; }\n\n const macy = new Macy({\n container: container,\n trueOrder: false,\n waitForImages: false,\n margin: 16,\n columns: 3,\n breakAt: {\n 1300: 2,\n 700: 1\n }\n });\n\n return macy;\n}\n","/*\nThis script continously loads post as the user scrolls the page. It uses the IntersectionObserver API to detect when the last post is in view. When the last post is in view, it fetches the next page and appends the posts to the page. It then checks if there is a next page and if there is, it continues to observe the last post. If there is no next page, it disconnects the observer.\n\nImportantly, for this script to work, it requires that each card have the `post` class and that the card container have the `gh-postfeed` class\n*/\n\nlet link = document.querySelector('link[rel=\"next\"]')?.getAttribute('href');\n\n// Fetch and parse next page\nasync function getNextPage(url) {\n try {\n const res = await fetch(url);\n\n if (!res.ok) {\n throw new Error('Failed to fetch page')\n }\n\n const nextPageHtml = await res.text();\n const parser = new DOMParser();\n const parsed = parser.parseFromString(nextPageHtml, 'text/html');\n const posts = parsed.querySelectorAll('.post');\n\n posts.forEach(post => {\n post.classList.add('post-hidden');\n });\n\n const nextLink = parsed.querySelector('link[rel=\"next\"]')?.getAttribute('href');\n\n return {posts, nextLink}\n\n } catch (error) {\n throw new Error(error)\n }\n}\n\nfunction onAllPostImagesLoaded(posts, callback) {\n try {\n const images = Array.from(posts).map(post => {\n return post.querySelector('img');\n })\n const promises = images.map(image => {\n return new Promise((resolve, reject) => {\n image.onload = resolve;\n image.onerror = reject;\n })\n })\n\n Promise.all(promises).then(() => {\n callback();\n });\n } catch (error) {\n throw new Error(error)\n }\n}\n\nexport default function infiniteScroll(macy) {\n\n if (!link) { return; }\n\n const options = {\n // When the last card is within a 150px of the viewport, fetch the next page. This provides a smoother transition between pages\n rootMargin: '150px',\n }\n\n const callback = (entries, observer) => {\n try {\n entries.forEach(entry => {\n\n if (entry.isIntersecting) {\n\n if (link) {\n getNextPage(link).then(({posts, nextLink}) => {\n posts.forEach(post => {\n document.querySelector('.gh-postfeed').append(post)\n })\n onAllPostImagesLoaded(posts, () => {\n posts.forEach(post => { post.classList.remove('post-hidden') });\n macy.recalculate(true);\n });\n\n if (nextLink) {\n link = nextLink;\n observer.observe(document.querySelector('.post:last-of-type'))\n } else {\n observer.disconnect()\n }\n })\n }\n }\n })\n } catch (error) {\n console.log(error)\n }\n }\n\n let observer = new IntersectionObserver(callback, options);\n\n observer.observe(document.querySelector('.post:last-of-type'))\n\n}\n","/*!\r\n\tBy André Rinas, www.andrerinas.de\r\n\tDocumentation, www.simplelightbox.com\r\n\tAvailable for use under the MIT License\r\n\tVersion 2.14.3\r\n*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SimpleLightbox = /*#__PURE__*/function () {\n function SimpleLightbox(elements, options) {\n var _this = this;\n _classCallCheck(this, SimpleLightbox);\n _defineProperty(this, \"defaultOptions\", {\n sourceAttr: 'href',\n overlay: true,\n overlayOpacity: 0.7,\n spinner: true,\n nav: true,\n navText: ['‹', '›'],\n captions: true,\n captionDelay: 0,\n captionSelector: 'img',\n captionType: 'attr',\n captionsData: 'title',\n captionPosition: 'bottom',\n captionClass: '',\n captionHTML: true,\n close: true,\n closeText: '×',\n swipeClose: true,\n showCounter: true,\n fileExt: 'png|jpg|jpeg|gif|webp|avif',\n animationSlide: true,\n animationSpeed: 250,\n preloading: true,\n enableKeyboard: true,\n loop: true,\n rel: false,\n docClose: true,\n swipeTolerance: 50,\n className: 'simple-lightbox',\n widthRatio: 0.8,\n heightRatio: 0.9,\n scaleImageToRatio: false,\n disableRightClick: false,\n disableScroll: true,\n alertError: true,\n alertErrorMessage: 'Image not found, next image will be loaded',\n additionalHtml: false,\n history: true,\n throttleInterval: 0,\n doubleTapZoom: 2,\n maxZoom: 10,\n htmlClass: 'has-lightbox',\n rtl: false,\n fixedClass: 'sl-fixed',\n fadeSpeed: 300,\n uniqueImages: true,\n focus: true,\n scrollZoom: true,\n scrollZoomFactor: 0.5,\n download: false\n });\n _defineProperty(this, \"transitionPrefix\", void 0);\n _defineProperty(this, \"isPassiveEventsSupported\", void 0);\n _defineProperty(this, \"transitionCapable\", false);\n _defineProperty(this, \"isTouchDevice\", 'ontouchstart' in window);\n _defineProperty(this, \"isAppleDevice\", /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform));\n _defineProperty(this, \"initialLocationHash\", void 0);\n _defineProperty(this, \"pushStateSupport\", 'pushState' in history);\n _defineProperty(this, \"isOpen\", false);\n _defineProperty(this, \"isAnimating\", false);\n _defineProperty(this, \"isClosing\", false);\n _defineProperty(this, \"isFadeIn\", false);\n _defineProperty(this, \"urlChangedOnce\", false);\n _defineProperty(this, \"hashReseted\", false);\n _defineProperty(this, \"historyHasChanges\", false);\n _defineProperty(this, \"historyUpdateTimeout\", null);\n _defineProperty(this, \"currentImage\", void 0);\n _defineProperty(this, \"eventNamespace\", 'simplelightbox');\n _defineProperty(this, \"domNodes\", {});\n _defineProperty(this, \"loadedImages\", []);\n _defineProperty(this, \"initialImageIndex\", 0);\n _defineProperty(this, \"currentImageIndex\", 0);\n _defineProperty(this, \"initialSelector\", null);\n _defineProperty(this, \"globalScrollbarWidth\", 0);\n _defineProperty(this, \"controlCoordinates\", {\n swipeDiff: 0,\n swipeYDiff: 0,\n swipeStart: 0,\n swipeEnd: 0,\n swipeYStart: 0,\n swipeYEnd: 0,\n mousedown: false,\n imageLeft: 0,\n zoomed: false,\n containerHeight: 0,\n containerWidth: 0,\n containerOffsetX: 0,\n containerOffsetY: 0,\n imgHeight: 0,\n imgWidth: 0,\n capture: false,\n initialOffsetX: 0,\n initialOffsetY: 0,\n initialPointerOffsetX: 0,\n initialPointerOffsetY: 0,\n initialPointerOffsetX2: 0,\n initialPointerOffsetY2: 0,\n initialScale: 1,\n initialPinchDistance: 0,\n pointerOffsetX: 0,\n pointerOffsetY: 0,\n pointerOffsetX2: 0,\n pointerOffsetY2: 0,\n targetOffsetX: 0,\n targetOffsetY: 0,\n targetScale: 0,\n pinchOffsetX: 0,\n pinchOffsetY: 0,\n limitOffsetX: 0,\n limitOffsetY: 0,\n scaleDifference: 0,\n targetPinchDistance: 0,\n touchCount: 0,\n doubleTapped: false,\n touchmoveCount: 0\n });\n this.options = Object.assign(this.defaultOptions, options);\n this.isPassiveEventsSupported = this.checkPassiveEventsSupport();\n if (typeof elements === 'string') {\n this.initialSelector = elements;\n this.elements = Array.from(document.querySelectorAll(elements));\n } else {\n this.elements = typeof elements.length !== 'undefined' && elements.length > 0 ? Array.from(elements) : [elements];\n }\n this.relatedElements = [];\n this.transitionPrefix = this.calculateTransitionPrefix();\n this.transitionCapable = this.transitionPrefix !== false;\n this.initialLocationHash = this.hash;\n\n // this should be handled by attribute selector IMHO! => 'a[rel=bla]'...\n if (this.options.rel) {\n this.elements = this.getRelated(this.options.rel);\n }\n if (this.options.uniqueImages) {\n var imgArr = [];\n this.elements = Array.from(this.elements).filter(function (element) {\n var src = element.getAttribute(_this.options.sourceAttr);\n if (imgArr.indexOf(src) === -1) {\n imgArr.push(src);\n return true;\n }\n return false;\n });\n }\n this.createDomNodes();\n if (this.options.close) {\n this.domNodes.wrapper.appendChild(this.domNodes.closeButton);\n }\n if (this.options.nav) {\n this.domNodes.wrapper.appendChild(this.domNodes.navigation);\n }\n if (this.options.spinner) {\n this.domNodes.wrapper.appendChild(this.domNodes.spinner);\n }\n this.addEventListener(this.elements, 'click.' + this.eventNamespace, function (event) {\n if (_this.isValidLink(event.currentTarget)) {\n event.preventDefault();\n if (_this.isAnimating) {\n return false;\n }\n _this.initialImageIndex = _this.elements.indexOf(event.currentTarget);\n _this.openImage(event.currentTarget);\n }\n });\n\n // close addEventListener click addEventListener doc\n if (this.options.docClose) {\n this.addEventListener(this.domNodes.wrapper, ['click.' + this.eventNamespace, 'touchstart.' + this.eventNamespace], function (event) {\n if (_this.isOpen && event.target === event.currentTarget) {\n _this.close();\n }\n });\n }\n\n // disable rightclick\n if (this.options.disableRightClick) {\n this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {\n if (event.target.parentElement.classList.contains(\"sl-image\")) {\n event.preventDefault();\n }\n });\n }\n\n // keyboard-control\n if (this.options.enableKeyboard) {\n this.addEventListener(document.body, 'keyup.' + this.eventNamespace, this.throttle(function (event) {\n _this.controlCoordinates.swipeDiff = 0;\n // keyboard control only if lightbox is open\n\n if (_this.isAnimating && event.key === 'Escape') {\n _this.currentImage.setAttribute('src', '');\n _this.isAnimating = false;\n _this.close();\n return;\n }\n if (_this.isOpen) {\n event.preventDefault();\n if (event.key === 'Escape') {\n _this.close();\n }\n if (!_this.isAnimating && ['ArrowLeft', 'ArrowRight'].indexOf(event.key) > -1) {\n _this.loadImage(event.key === 'ArrowRight' ? 1 : -1);\n }\n }\n }, this.options.throttleInterval));\n }\n this.addEvents();\n }\n _createClass(SimpleLightbox, [{\n key: \"checkPassiveEventsSupport\",\n value: function checkPassiveEventsSupport() {\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n // Test via a getter in the options object to see if the passive property is accessed\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {}\n return supportsPassive;\n }\n }, {\n key: \"getCaptionElement\",\n value: function getCaptionElement(elem) {\n // look at sibling selector\n if (this.options.captionSelector.startsWith('+')) {\n var selector = this.options.captionSelector.replace(/^\\+/, '').trimStart();\n var sibling = elem.nextElementSibling;\n if (sibling && sibling.matches(selector)) {\n return sibling;\n }\n return false;\n } else if (this.options.captionSelector.startsWith('>')) {\n var _selector = this.options.captionSelector.replace(/^>/, '').trimStart();\n return elem.querySelector(_selector);\n } else {\n return elem.querySelector(this.options.captionSelector);\n }\n }\n }, {\n key: \"generateQuerySelector\",\n value: function generateQuerySelector(elem) {\n var tagName = elem.tagName,\n id = elem.id,\n className = elem.className,\n parentNode = elem.parentNode;\n if (tagName === 'HTML') return 'HTML';\n var str = tagName;\n str += id !== '' ? \"#\".concat(id) : '';\n if (className) {\n var classes = className.trim().split(/\\s/);\n for (var i = 0; i < classes.length; i++) {\n str += \".\".concat(classes[i]);\n }\n }\n var childIndex = 1;\n for (var e = elem; e.previousElementSibling; e = e.previousElementSibling) {\n childIndex += 1;\n }\n str += \":nth-child(\".concat(childIndex, \")\");\n return \"\".concat(this.generateQuerySelector(parentNode), \" > \").concat(str);\n }\n }, {\n key: \"createDomNodes\",\n value: function createDomNodes() {\n this.domNodes.overlay = document.createElement('div');\n this.domNodes.overlay.classList.add('sl-overlay');\n this.domNodes.overlay.dataset.opacityTarget = this.options.overlayOpacity;\n this.domNodes.closeButton = document.createElement('button');\n this.domNodes.closeButton.classList.add('sl-close');\n this.domNodes.closeButton.innerHTML = this.options.closeText;\n this.domNodes.spinner = document.createElement('div');\n this.domNodes.spinner.classList.add('sl-spinner');\n this.domNodes.spinner.innerHTML = '
';\n this.domNodes.navigation = document.createElement('div');\n this.domNodes.navigation.classList.add('sl-navigation');\n this.domNodes.navigation.innerHTML = \"\");\n this.domNodes.counter = document.createElement('div');\n this.domNodes.counter.classList.add('sl-counter');\n this.domNodes.counter.innerHTML = '/';\n this.domNodes.download = document.createElement('div');\n this.domNodes.download.classList.add('sl-download');\n this.domNodes.downloadLink = document.createElement('a');\n this.domNodes.downloadLink.setAttribute('download', '');\n this.domNodes.downloadLink.textContent = this.options.download;\n this.domNodes.download.appendChild(this.domNodes.downloadLink);\n this.domNodes.caption = document.createElement('div');\n this.domNodes.caption.classList.add('sl-caption', 'pos-' + this.options.captionPosition);\n if (this.options.captionClass) {\n var _this$domNodes$captio;\n var captionClasses = this.options.captionClass.split(/[\\s,]+/);\n (_this$domNodes$captio = this.domNodes.caption.classList).add.apply(_this$domNodes$captio, _toConsumableArray(captionClasses));\n }\n this.domNodes.image = document.createElement('div');\n this.domNodes.image.classList.add('sl-image');\n this.domNodes.wrapper = document.createElement('div');\n this.domNodes.wrapper.classList.add('sl-wrapper');\n this.domNodes.wrapper.setAttribute('tabindex', -1);\n this.domNodes.wrapper.setAttribute('role', 'dialog');\n this.domNodes.wrapper.setAttribute('aria-hidden', false);\n if (this.options.className) {\n this.domNodes.wrapper.classList.add(this.options.className);\n }\n if (this.options.rtl) {\n this.domNodes.wrapper.classList.add('sl-dir-rtl');\n }\n }\n }, {\n key: \"throttle\",\n value: function throttle(func, limit) {\n var inThrottle;\n return function () {\n if (!inThrottle) {\n func.apply(this, arguments);\n inThrottle = true;\n setTimeout(function () {\n return inThrottle = false;\n }, limit);\n }\n };\n }\n }, {\n key: \"isValidLink\",\n value: function isValidLink(element) {\n return !this.options.fileExt || element.getAttribute(this.options.sourceAttr) && new RegExp('(' + this.options.fileExt + ')($|\\\\?.*$)', 'i').test(element.getAttribute(this.options.sourceAttr));\n }\n }, {\n key: \"calculateTransitionPrefix\",\n value: function calculateTransitionPrefix() {\n var s = (document.body || document.documentElement).style;\n return 'transition' in s ? '' : 'WebkitTransition' in s ? '-webkit-' : 'MozTransition' in s ? '-moz-' : 'OTransition' in s ? '-o' : false;\n }\n }, {\n key: \"getScrollbarWidth\",\n value: function getScrollbarWidth() {\n var scrollbarWidth = 0;\n var scrollDiv = document.createElement('div');\n scrollDiv.classList.add('sl-scrollbar-measure');\n document.body.appendChild(scrollDiv);\n scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n }\n }, {\n key: \"toggleScrollbar\",\n value: function toggleScrollbar(type) {\n var scrollbarWidth = 0;\n var fixedElements = [].slice.call(document.querySelectorAll('.' + this.options.fixedClass));\n if (type === 'hide') {\n var fullWindowWidth = window.innerWidth;\n if (!fullWindowWidth) {\n var documentElementRect = document.documentElement.getBoundingClientRect();\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);\n }\n if (document.body.clientWidth < fullWindowWidth || this.isAppleDevice) {\n var paddingRight = parseInt(window.getComputedStyle(document.body).paddingRight || 0, 10);\n scrollbarWidth = this.getScrollbarWidth();\n document.body.dataset.originalPaddingRight = paddingRight;\n if (scrollbarWidth > 0 || scrollbarWidth == 0 && this.isAppleDevice) {\n document.body.classList.add('hidden-scroll');\n document.body.style.paddingRight = paddingRight + scrollbarWidth + 'px';\n fixedElements.forEach(function (element) {\n var actualPadding = element.style.paddingRight;\n var calculatedPadding = window.getComputedStyle(element)['padding-right'];\n element.dataset.originalPaddingRight = actualPadding;\n element.style.paddingRight = \"\".concat(parseFloat(calculatedPadding) + scrollbarWidth, \"px\");\n });\n }\n }\n } else {\n document.body.classList.remove('hidden-scroll');\n document.body.style.paddingRight = document.body.dataset.originalPaddingRight + 'px';\n fixedElements.forEach(function (element) {\n var padding = element.dataset.originalPaddingRight;\n if (typeof padding !== 'undefined') {\n element.style.paddingRight = padding;\n }\n });\n }\n return scrollbarWidth;\n }\n }, {\n key: \"close\",\n value: function close() {\n var _this2 = this;\n if (!this.isOpen || this.isAnimating || this.isClosing) {\n return false;\n }\n this.isClosing = true;\n var element = this.relatedElements[this.currentImageIndex];\n element.dispatchEvent(new Event('close.simplelightbox'));\n if (this.options.history) {\n this.historyHasChanges = false;\n if (!this.hashReseted) {\n this.resetHash();\n }\n }\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.fadeOut(this.domNodes.overlay, this.options.fadeSpeed);\n this.fadeOut(document.querySelectorAll('.sl-image img, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter'), this.options.fadeSpeed, function () {\n if (_this2.options.disableScroll) {\n _this2.toggleScrollbar('show');\n }\n if (_this2.options.htmlClass && _this2.options.htmlClass !== '') {\n document.querySelector('html').classList.remove(_this2.options.htmlClass);\n }\n document.body.removeChild(_this2.domNodes.wrapper);\n if (_this2.options.overlay) {\n document.body.removeChild(_this2.domNodes.overlay);\n }\n _this2.domNodes.additionalHtml = null;\n _this2.domNodes.download = null;\n element.dispatchEvent(new Event('closed.simplelightbox'));\n _this2.isClosing = false;\n });\n this.currentImage = null;\n this.isOpen = false;\n this.isAnimating = false;\n\n // reset touchcontrol coordinates\n for (var key in this.controlCoordinates) {\n this.controlCoordinates[key] = 0;\n }\n this.controlCoordinates.mousedown = false;\n this.controlCoordinates.zoomed = false;\n this.controlCoordinates.capture = false;\n this.controlCoordinates.initialScale = this.minMax(1, 1, this.options.maxZoom);\n this.controlCoordinates.doubleTapped = false;\n }\n }, {\n key: \"hash\",\n get: function get() {\n return window.location.hash.substring(1);\n }\n }, {\n key: \"preload\",\n value: function preload() {\n var _this3 = this;\n var index = this.currentImageIndex,\n length = this.relatedElements.length,\n next = index + 1 < 0 ? length - 1 : index + 1 >= length - 1 ? 0 : index + 1,\n prev = index - 1 < 0 ? length - 1 : index - 1 >= length - 1 ? 0 : index - 1,\n nextImage = new Image(),\n prevImage = new Image();\n nextImage.addEventListener('load', function (event) {\n var src = event.target.getAttribute('src');\n if (_this3.loadedImages.indexOf(src) === -1) {\n //is this condition even required... setting multiple times will not change usage...\n _this3.loadedImages.push(src);\n }\n _this3.relatedElements[index].dispatchEvent(new Event('nextImageLoaded.' + _this3.eventNamespace));\n });\n nextImage.setAttribute('src', this.relatedElements[next].getAttribute(this.options.sourceAttr));\n prevImage.addEventListener('load', function (event) {\n var src = event.target.getAttribute('src');\n if (_this3.loadedImages.indexOf(src) === -1) {\n _this3.loadedImages.push(src);\n }\n _this3.relatedElements[index].dispatchEvent(new Event('prevImageLoaded.' + _this3.eventNamespace));\n });\n prevImage.setAttribute('src', this.relatedElements[prev].getAttribute(this.options.sourceAttr));\n }\n }, {\n key: \"loadImage\",\n value: function loadImage(direction) {\n var _this4 = this;\n var slideDirection = direction;\n if (this.options.rtl) {\n direction = -direction;\n }\n this.relatedElements[this.currentImageIndex].dispatchEvent(new Event('change.' + this.eventNamespace));\n this.relatedElements[this.currentImageIndex].dispatchEvent(new Event((direction === 1 ? 'next' : 'prev') + '.' + this.eventNamespace));\n var newIndex = this.currentImageIndex + direction;\n if (this.isAnimating || (newIndex < 0 || newIndex >= this.relatedElements.length) && this.options.loop === false) {\n return false;\n }\n this.currentImageIndex = newIndex < 0 ? this.relatedElements.length - 1 : newIndex > this.relatedElements.length - 1 ? 0 : newIndex;\n this.domNodes.counter.querySelector('.sl-current').innerHTML = this.currentImageIndex + 1;\n if (this.options.animationSlide) {\n this.slide(this.options.animationSpeed / 1000, -100 * slideDirection - this.controlCoordinates.swipeDiff + 'px');\n }\n this.fadeOut(this.domNodes.image, this.options.fadeSpeed, function () {\n _this4.isAnimating = true;\n if (!_this4.isClosing) {\n setTimeout(function () {\n var element = _this4.relatedElements[_this4.currentImageIndex];\n if (!_this4.currentImage) return;\n _this4.currentImage.setAttribute('src', element.getAttribute(_this4.options.sourceAttr));\n if (_this4.loadedImages.indexOf(element.getAttribute(_this4.options.sourceAttr)) === -1) {\n _this4.show(_this4.domNodes.spinner);\n }\n if (_this4.domNodes.image.contains(_this4.domNodes.caption)) {\n _this4.domNodes.image.removeChild(_this4.domNodes.caption);\n }\n _this4.adjustImage(slideDirection);\n if (_this4.options.preloading) _this4.preload();\n }, 100);\n } else {\n _this4.isAnimating = false;\n }\n });\n }\n }, {\n key: \"adjustImage\",\n value: function adjustImage(direction) {\n var _this5 = this;\n if (!this.currentImage) {\n return false;\n }\n var tmpImage = new Image(),\n windowWidth = window.innerWidth * this.options.widthRatio,\n windowHeight = window.innerHeight * this.options.heightRatio;\n tmpImage.setAttribute('src', this.currentImage.getAttribute('src'));\n this.currentImage.dataset.scale = 1;\n this.currentImage.dataset.translateX = 0;\n this.currentImage.dataset.translateY = 0;\n this.zoomPanElement(0, 0, 1);\n tmpImage.addEventListener('error', function (event) {\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event('error.' + _this5.eventNamespace));\n _this5.isAnimating = false;\n _this5.isOpen = true;\n _this5.domNodes.spinner.style.display = 'none';\n var dirIsDefined = direction === 1 || direction === -1;\n if (_this5.initialImageIndex === _this5.currentImageIndex && dirIsDefined) {\n return _this5.close();\n }\n if (_this5.options.alertError) {\n alert(_this5.options.alertErrorMessage);\n }\n _this5.loadImage(dirIsDefined ? direction : 1);\n });\n tmpImage.addEventListener('load', function (event) {\n if (typeof direction !== 'undefined') {\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event('changed.' + _this5.eventNamespace));\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event((direction === 1 ? 'nextDone' : 'prevDone') + '.' + _this5.eventNamespace));\n }\n\n // history\n if (_this5.options.history) {\n _this5.updateURL();\n }\n if (_this5.loadedImages.indexOf(_this5.currentImage.getAttribute('src')) === -1) {\n _this5.loadedImages.push(_this5.currentImage.getAttribute('src'));\n }\n var imageWidth = event.target.width,\n imageHeight = event.target.height;\n if (_this5.options.scaleImageToRatio || imageWidth > windowWidth || imageHeight > windowHeight) {\n var ratio = imageWidth / imageHeight > windowWidth / windowHeight ? imageWidth / windowWidth : imageHeight / windowHeight;\n imageWidth /= ratio;\n imageHeight /= ratio;\n }\n _this5.domNodes.image.style.top = (window.innerHeight - imageHeight) / 2 + 'px';\n _this5.domNodes.image.style.left = (window.innerWidth - imageWidth - _this5.globalScrollbarWidth) / 2 + 'px';\n _this5.domNodes.image.style.width = imageWidth + 'px';\n _this5.domNodes.image.style.height = imageHeight + 'px';\n _this5.domNodes.spinner.style.display = 'none';\n if (_this5.options.focus) {\n _this5.forceFocus();\n }\n _this5.fadeIn(_this5.currentImage, _this5.options.fadeSpeed, function () {\n if (_this5.options.focus) {\n _this5.domNodes.wrapper.focus();\n }\n });\n _this5.isOpen = true;\n var captionContainer, captionText;\n if (typeof _this5.options.captionSelector === 'string') {\n captionContainer = _this5.options.captionSelector === 'self' ? _this5.relatedElements[_this5.currentImageIndex] : _this5.getCaptionElement(_this5.relatedElements[_this5.currentImageIndex]);\n } else if (typeof _this5.options.captionSelector === 'function') {\n captionContainer = _this5.options.captionSelector(_this5.relatedElements[_this5.currentImageIndex]);\n }\n if (_this5.options.captions && captionContainer) {\n if (_this5.options.captionType === 'data') {\n captionText = captionContainer.dataset[_this5.options.captionsData];\n } else if (_this5.options.captionType === 'text') {\n captionText = captionContainer.innerHTML;\n } else {\n captionText = captionContainer.getAttribute(_this5.options.captionsData);\n }\n }\n if (!_this5.options.loop) {\n if (_this5.currentImageIndex === 0) {\n _this5.hide(_this5.domNodes.navigation.querySelector('.sl-prev'));\n }\n if (_this5.currentImageIndex >= _this5.relatedElements.length - 1) {\n _this5.hide(_this5.domNodes.navigation.querySelector('.sl-next'));\n }\n if (_this5.currentImageIndex > 0) {\n _this5.show(_this5.domNodes.navigation.querySelector('.sl-prev'));\n }\n if (_this5.currentImageIndex < _this5.relatedElements.length - 1) {\n _this5.show(_this5.domNodes.navigation.querySelector('.sl-next'));\n }\n } else {\n if (_this5.relatedElements.length === 1) {\n _this5.hide(_this5.domNodes.navigation.querySelectorAll('.sl-prev, .sl-next'));\n } else {\n _this5.show(_this5.domNodes.navigation.querySelectorAll('.sl-prev, .sl-next'));\n }\n }\n if (direction === 1 || direction === -1) {\n if (_this5.options.animationSlide) {\n _this5.slide(0, 100 * direction + 'px');\n setTimeout(function () {\n _this5.slide(_this5.options.animationSpeed / 1000, 0 + 'px');\n }, 50);\n }\n _this5.fadeIn(_this5.domNodes.image, _this5.options.fadeSpeed, function () {\n _this5.isAnimating = false;\n _this5.setCaption(captionText, imageWidth);\n });\n } else {\n _this5.isAnimating = false;\n _this5.setCaption(captionText, imageWidth);\n }\n if (_this5.options.additionalHtml && !_this5.domNodes.additionalHtml) {\n _this5.domNodes.additionalHtml = document.createElement('div');\n _this5.domNodes.additionalHtml.classList.add('sl-additional-html');\n _this5.domNodes.additionalHtml.innerHTML = _this5.options.additionalHtml;\n _this5.domNodes.image.appendChild(_this5.domNodes.additionalHtml);\n }\n if (_this5.options.download) {\n _this5.domNodes.downloadLink.setAttribute('href', _this5.currentImage.getAttribute('src'));\n }\n });\n }\n }, {\n key: \"zoomPanElement\",\n value: function zoomPanElement(targetOffsetX, targetOffsetY, targetScale) {\n this.currentImage.style[this.transitionPrefix + 'transform'] = 'translate(' + targetOffsetX + ',' + targetOffsetY + ') scale(' + targetScale + ')';\n }\n }, {\n key: \"minMax\",\n value: function minMax(value, min, max) {\n return value < min ? min : value > max ? max : value;\n }\n }, {\n key: \"setZoomData\",\n value: function setZoomData(initialScale, targetOffsetX, targetOffsetY) {\n this.currentImage.dataset.scale = initialScale;\n this.currentImage.dataset.translateX = targetOffsetX;\n this.currentImage.dataset.translateY = targetOffsetY;\n }\n }, {\n key: \"hashchangeHandler\",\n value: function hashchangeHandler() {\n if (this.isOpen && this.hash === this.initialLocationHash) {\n this.hashReseted = true;\n this.close();\n }\n }\n }, {\n key: \"addEvents\",\n value: function addEvents() {\n var _this6 = this;\n // resize/responsive\n this.addEventListener(window, 'resize.' + this.eventNamespace, function (event) {\n //this.adjustImage.bind(this)\n if (_this6.isOpen) {\n _this6.adjustImage();\n }\n });\n this.addEventListener(this.domNodes.closeButton, ['click.' + this.eventNamespace, 'touchstart.' + this.eventNamespace], this.close.bind(this));\n if (this.options.history) {\n setTimeout(function () {\n _this6.addEventListener(window, 'hashchange.' + _this6.eventNamespace, function (event) {\n if (_this6.isOpen) {\n _this6.hashchangeHandler();\n }\n });\n }, 40);\n }\n this.addEventListener(this.domNodes.navigation.getElementsByTagName('button'), 'click.' + this.eventNamespace, function (event) {\n if (!event.currentTarget.tagName.match(/button/i)) {\n return true;\n }\n event.preventDefault();\n _this6.controlCoordinates.swipeDiff = 0;\n _this6.loadImage(event.currentTarget.classList.contains('sl-next') ? 1 : -1);\n });\n if (this.options.scrollZoom) {\n var scale = 1;\n this.addEventListener(this.domNodes.image, ['mousewheel', 'DOMMouseScroll'], function (event) {\n if (_this6.controlCoordinates.mousedown || _this6.isAnimating || _this6.isClosing || !_this6.isOpen) {\n return true;\n }\n if (_this6.controlCoordinates.containerHeight == 0) {\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n }\n // event.preventDefault();\n\n var delta = event.delta || event.wheelDelta;\n if (delta === undefined) {\n //we are on firefox\n delta = event.detail;\n }\n delta = Math.max(-1, Math.min(1, delta)); // cap the delta to [-1,1] for cross browser consistency\n\n // apply zoom\n scale += delta * _this6.options.scrollZoomFactor * scale;\n scale = Math.max(1, Math.min(_this6.options.maxZoom, scale));\n _this6.controlCoordinates.targetScale = scale;\n var scrollTopPos = document.documentElement.scrollTop || document.body.scrollTop;\n _this6.controlCoordinates.pinchOffsetX = event.pageX;\n _this6.controlCoordinates.pinchOffsetY = event.pageY - scrollTopPos || 0; // need to substract the scroll position\n\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.scaleDifference = _this6.controlCoordinates.targetScale - _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetX - (_this6.controlCoordinates.pinchOffsetX - _this6.controlCoordinates.containerOffsetX - _this6.controlCoordinates.containerWidth / 2 - _this6.controlCoordinates.initialOffsetX) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetY - (_this6.controlCoordinates.pinchOffsetY - _this6.controlCoordinates.containerOffsetY - _this6.controlCoordinates.containerHeight / 2 - _this6.controlCoordinates.initialOffsetY) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n if (_this6.controlCoordinates.targetScale > 1) {\n _this6.controlCoordinates.zoomed = true;\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n } else {\n if (_this6.controlCoordinates.initialScale === 1) {\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = null;\n _this6.controlCoordinates.capture = false;\n }\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n _this6.controlCoordinates.initialScale = _this6.controlCoordinates.targetScale;\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.setZoomData(_this6.controlCoordinates.targetScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n });\n }\n this.addEventListener(this.domNodes.image, ['touchstart.' + this.eventNamespace, 'mousedown.' + this.eventNamespace], function (event) {\n if (event.target.tagName === 'A' && event.type === 'touchstart') {\n return true;\n }\n if (event.type === 'mousedown') {\n event.preventDefault();\n _this6.controlCoordinates.initialPointerOffsetX = event.clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n _this6.controlCoordinates.capture = true;\n } else {\n _this6.controlCoordinates.touchCount = event.touches.length;\n _this6.controlCoordinates.initialPointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.touches[0].clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n if (_this6.controlCoordinates.touchCount === 1) /* Single touch */{\n if (!_this6.controlCoordinates.doubleTapped) {\n _this6.controlCoordinates.doubleTapped = true;\n setTimeout(function () {\n _this6.controlCoordinates.doubleTapped = false;\n }, 300);\n } else {\n _this6.currentImage.classList.add('sl-transition');\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.initialScale = _this6.options.doubleTapZoom;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n _this6.controlCoordinates.zoomed = true;\n } else {\n _this6.controlCoordinates.initialScale = 1;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n _this6.controlCoordinates.zoomed = false;\n }\n setTimeout(function () {\n if (_this6.currentImage) {\n _this6.currentImage.classList.remove('sl-transition');\n }\n }, 200);\n return false;\n }\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n } else if (_this6.controlCoordinates.touchCount === 2) /* Pinch */{\n _this6.controlCoordinates.initialPointerOffsetX2 = event.touches[1].clientX;\n _this6.controlCoordinates.initialPointerOffsetY2 = event.touches[1].clientY;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n _this6.controlCoordinates.pinchOffsetX = (_this6.controlCoordinates.initialPointerOffsetX + _this6.controlCoordinates.initialPointerOffsetX2) / 2;\n _this6.controlCoordinates.pinchOffsetY = (_this6.controlCoordinates.initialPointerOffsetY + _this6.controlCoordinates.initialPointerOffsetY2) / 2;\n _this6.controlCoordinates.initialPinchDistance = Math.sqrt((_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialPointerOffsetX2) * (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialPointerOffsetX2) + (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialPointerOffsetY2) * (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialPointerOffsetY2));\n }\n _this6.controlCoordinates.capture = true;\n }\n if (_this6.controlCoordinates.mousedown) return true;\n if (_this6.transitionCapable) {\n _this6.controlCoordinates.imageLeft = parseInt(_this6.domNodes.image.style.left, 10);\n }\n _this6.controlCoordinates.mousedown = true;\n _this6.controlCoordinates.swipeDiff = 0;\n _this6.controlCoordinates.swipeYDiff = 0;\n _this6.controlCoordinates.swipeStart = event.pageX || event.touches[0].pageX;\n _this6.controlCoordinates.swipeYStart = event.pageY || event.touches[0].pageY;\n return false;\n });\n this.addEventListener(this.domNodes.image, ['touchmove.' + this.eventNamespace, 'mousemove.' + this.eventNamespace, 'MSPointerMove'], function (event) {\n if (!_this6.controlCoordinates.mousedown) {\n return true;\n }\n if (event.type === 'touchmove') {\n if (_this6.controlCoordinates.capture === false) {\n return false;\n }\n _this6.controlCoordinates.pointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.pointerOffsetY = event.touches[0].clientY;\n _this6.controlCoordinates.touchCount = event.touches.length;\n _this6.controlCoordinates.touchmoveCount++;\n if (_this6.controlCoordinates.touchCount > 1) /* Pinch */{\n _this6.controlCoordinates.pointerOffsetX2 = event.touches[1].clientX;\n _this6.controlCoordinates.pointerOffsetY2 = event.touches[1].clientY;\n _this6.controlCoordinates.targetPinchDistance = Math.sqrt((_this6.controlCoordinates.pointerOffsetX - _this6.controlCoordinates.pointerOffsetX2) * (_this6.controlCoordinates.pointerOffsetX - _this6.controlCoordinates.pointerOffsetX2) + (_this6.controlCoordinates.pointerOffsetY - _this6.controlCoordinates.pointerOffsetY2) * (_this6.controlCoordinates.pointerOffsetY - _this6.controlCoordinates.pointerOffsetY2));\n if (_this6.controlCoordinates.initialPinchDistance === null) {\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n }\n if (Math.abs(_this6.controlCoordinates.initialPinchDistance - _this6.controlCoordinates.targetPinchDistance) >= 1) {\n /* Initialize helpers */\n _this6.controlCoordinates.targetScale = _this6.minMax(_this6.controlCoordinates.targetPinchDistance / _this6.controlCoordinates.initialPinchDistance * _this6.controlCoordinates.initialScale, 1, _this6.options.maxZoom);\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.scaleDifference = _this6.controlCoordinates.targetScale - _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetX - (_this6.controlCoordinates.pinchOffsetX - _this6.controlCoordinates.containerOffsetX - _this6.controlCoordinates.containerWidth / 2 - _this6.controlCoordinates.initialOffsetX) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetY - (_this6.controlCoordinates.pinchOffsetY - _this6.controlCoordinates.containerOffsetY - _this6.controlCoordinates.containerHeight / 2 - _this6.controlCoordinates.initialOffsetY) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n if (_this6.controlCoordinates.targetScale > 1) {\n _this6.controlCoordinates.zoomed = true;\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n _this6.controlCoordinates.initialScale = _this6.controlCoordinates.targetScale;\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n }\n } else {\n _this6.controlCoordinates.targetScale = _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetX - (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialOffsetX), _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetY - (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialOffsetY), _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n if (Math.abs(_this6.controlCoordinates.targetOffsetX) === Math.abs(_this6.controlCoordinates.limitOffsetX)) {\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialPointerOffsetX = _this6.controlCoordinates.pointerOffsetX;\n }\n if (Math.abs(_this6.controlCoordinates.targetOffsetY) === Math.abs(_this6.controlCoordinates.limitOffsetY)) {\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.controlCoordinates.initialPointerOffsetY = _this6.controlCoordinates.pointerOffsetY;\n }\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n }\n }\n\n /* Mouse Move implementation */\n if (event.type === 'mousemove' && _this6.controlCoordinates.mousedown) {\n if (event.type == 'touchmove') return true;\n event.preventDefault();\n if (_this6.controlCoordinates.capture === false) return false;\n _this6.controlCoordinates.pointerOffsetX = event.clientX;\n _this6.controlCoordinates.pointerOffsetY = event.clientY;\n _this6.controlCoordinates.targetScale = _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetX - (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialOffsetX), _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetY - (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialOffsetY), _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n if (Math.abs(_this6.controlCoordinates.targetOffsetX) === Math.abs(_this6.controlCoordinates.limitOffsetX)) {\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialPointerOffsetX = _this6.controlCoordinates.pointerOffsetX;\n }\n if (Math.abs(_this6.controlCoordinates.targetOffsetY) === Math.abs(_this6.controlCoordinates.limitOffsetY)) {\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.controlCoordinates.initialPointerOffsetY = _this6.controlCoordinates.pointerOffsetY;\n }\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n }\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.swipeEnd = event.pageX || event.touches[0].pageX;\n _this6.controlCoordinates.swipeYEnd = event.pageY || event.touches[0].pageY;\n _this6.controlCoordinates.swipeDiff = _this6.controlCoordinates.swipeStart - _this6.controlCoordinates.swipeEnd;\n _this6.controlCoordinates.swipeYDiff = _this6.controlCoordinates.swipeYStart - _this6.controlCoordinates.swipeYEnd;\n if (_this6.options.animationSlide) {\n _this6.slide(0, -_this6.controlCoordinates.swipeDiff + 'px');\n }\n }\n });\n this.addEventListener(this.domNodes.image, ['touchend.' + this.eventNamespace, 'mouseup.' + this.eventNamespace, 'touchcancel.' + this.eventNamespace, 'mouseleave.' + this.eventNamespace, 'pointerup', 'pointercancel', 'MSPointerUp', 'MSPointerCancel'], function (event) {\n if (_this6.isTouchDevice && event.type === 'touchend') {\n _this6.controlCoordinates.touchCount = event.touches.length;\n if (_this6.controlCoordinates.touchCount === 0) /* No touch */{\n /* Set attributes */\n if (_this6.currentImage) {\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n }\n if (_this6.controlCoordinates.initialScale === 1) {\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = null;\n _this6.controlCoordinates.capture = false;\n } else if (_this6.controlCoordinates.touchCount === 1) /* Single touch */{\n _this6.controlCoordinates.initialPointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.touches[0].clientY;\n } else if (_this6.controlCoordinates.touchCount > 1) /* Pinch */{\n _this6.controlCoordinates.initialPinchDistance = null;\n }\n }\n if (_this6.controlCoordinates.mousedown) {\n _this6.controlCoordinates.mousedown = false;\n var possibleDir = true;\n if (!_this6.options.loop) {\n if (_this6.currentImageIndex === 0 && _this6.controlCoordinates.swipeDiff < 0) {\n possibleDir = false;\n }\n if (_this6.currentImageIndex >= _this6.relatedElements.length - 1 && _this6.controlCoordinates.swipeDiff > 0) {\n possibleDir = false;\n }\n }\n if (Math.abs(_this6.controlCoordinates.swipeDiff) > _this6.options.swipeTolerance && possibleDir) {\n _this6.loadImage(_this6.controlCoordinates.swipeDiff > 0 ? 1 : -1);\n } else if (_this6.options.animationSlide) {\n _this6.slide(_this6.options.animationSpeed / 1000, 0 + 'px');\n }\n if (_this6.options.swipeClose && Math.abs(_this6.controlCoordinates.swipeYDiff) > 50 && Math.abs(_this6.controlCoordinates.swipeDiff) < _this6.options.swipeTolerance) {\n _this6.close();\n }\n }\n });\n this.addEventListener(this.domNodes.image, ['dblclick'], function (event) {\n if (_this6.isTouchDevice) return;\n _this6.controlCoordinates.initialPointerOffsetX = event.clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.currentImage.classList.add('sl-transition');\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.initialScale = _this6.options.doubleTapZoom;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n _this6.controlCoordinates.zoomed = true;\n } else {\n _this6.controlCoordinates.initialScale = 1;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n setTimeout(function () {\n if (_this6.currentImage) {\n _this6.currentImage.classList.remove('sl-transition');\n _this6.currentImage.style[_this6.transitionPrefix + 'transform-origin'] = null;\n }\n }, 200);\n _this6.controlCoordinates.capture = true;\n return false;\n });\n }\n }, {\n key: \"getDimensions\",\n value: function getDimensions(element) {\n var styles = window.getComputedStyle(element),\n height = element.offsetHeight,\n width = element.offsetWidth,\n borderTopWidth = parseFloat(styles.borderTopWidth),\n borderBottomWidth = parseFloat(styles.borderBottomWidth),\n paddingTop = parseFloat(styles.paddingTop),\n paddingBottom = parseFloat(styles.paddingBottom),\n borderLeftWidth = parseFloat(styles.borderLeftWidth),\n borderRightWidth = parseFloat(styles.borderRightWidth),\n paddingLeft = parseFloat(styles.paddingLeft),\n paddingRight = parseFloat(styles.paddingRight);\n return {\n height: height - borderBottomWidth - borderTopWidth - paddingTop - paddingBottom,\n width: width - borderLeftWidth - borderRightWidth - paddingLeft - paddingRight\n };\n }\n }, {\n key: \"updateHash\",\n value: function updateHash() {\n var newHash = 'pid=' + (this.currentImageIndex + 1),\n newURL = window.location.href.split('#')[0] + '#' + newHash;\n this.hashReseted = false;\n if (this.pushStateSupport) {\n window.history[this.historyHasChanges ? 'replaceState' : 'pushState']('', document.title, newURL);\n } else {\n // what is the browser target of this?\n if (this.historyHasChanges) {\n window.location.replace(newURL);\n } else {\n window.location.hash = newHash;\n }\n }\n if (!this.historyHasChanges) {\n this.urlChangedOnce = true;\n }\n this.historyHasChanges = true;\n }\n }, {\n key: \"resetHash\",\n value: function resetHash() {\n this.hashReseted = true;\n if (this.urlChangedOnce) {\n history.back();\n } else {\n if (this.pushStateSupport) {\n history.pushState('', document.title, window.location.pathname + window.location.search);\n } else {\n window.location.hash = '';\n }\n }\n //\n //in case an history operation is still pending\n clearTimeout(this.historyUpdateTimeout);\n }\n }, {\n key: \"updateURL\",\n value: function updateURL() {\n clearTimeout(this.historyUpdateTimeout);\n if (!this.historyHasChanges) {\n this.updateHash(); // first time\n } else {\n this.historyUpdateTimeout = setTimeout(this.updateHash.bind(this), 800);\n }\n }\n }, {\n key: \"setCaption\",\n value: function setCaption(captionText, imageWidth, allowHTML) {\n var _this7 = this;\n if (this.options.captions && captionText && captionText !== '' && typeof captionText !== \"undefined\") {\n var _ref;\n var property = ((_ref = allowHTML !== null && allowHTML !== void 0 ? allowHTML : this.options.captionHTML) !== null && _ref !== void 0 ? _ref : true) ? 'innerHTML' : 'innerText';\n this.hide(this.domNodes.caption);\n this.domNodes.caption.style.width = imageWidth + 'px';\n this.domNodes.caption[property] = captionText;\n this.domNodes.image.appendChild(this.domNodes.caption);\n setTimeout(function () {\n _this7.fadeIn(_this7.domNodes.caption, _this7.options.fadeSpeed);\n }, this.options.captionDelay);\n }\n }\n }, {\n key: \"slide\",\n value: function slide(speed, pos) {\n if (!this.transitionCapable) {\n return this.domNodes.image.style.left = pos;\n }\n this.domNodes.image.style[this.transitionPrefix + 'transform'] = 'translateX(' + pos + ')';\n this.domNodes.image.style[this.transitionPrefix + 'transition'] = this.transitionPrefix + 'transform ' + speed + 's linear';\n }\n }, {\n key: \"getRelated\",\n value: function getRelated(rel) {\n var elems;\n if (rel && rel !== false && rel !== 'nofollow') {\n elems = Array.from(this.elements).filter(function (element) {\n return element.getAttribute('rel') === rel;\n });\n } else {\n elems = this.elements;\n }\n return elems;\n }\n }, {\n key: \"openImage\",\n value: function openImage(element) {\n var _this8 = this;\n element.dispatchEvent(new Event('show.' + this.eventNamespace));\n this.globalScrollbarWidth = this.getScrollbarWidth();\n if (this.options.disableScroll) {\n this.toggleScrollbar('hide');\n this.globalScrollbarWidth = 0;\n }\n if (this.options.htmlClass && this.options.htmlClass !== '') {\n document.querySelector('html').classList.add(this.options.htmlClass);\n }\n document.body.appendChild(this.domNodes.wrapper);\n this.domNodes.wrapper.appendChild(this.domNodes.image);\n if (this.options.overlay) {\n document.body.appendChild(this.domNodes.overlay);\n }\n this.relatedElements = this.getRelated(element.rel);\n if (this.options.showCounter) {\n if (this.relatedElements.length == 1 && this.domNodes.wrapper.contains(this.domNodes.counter)) {\n this.domNodes.wrapper.removeChild(this.domNodes.counter);\n } else if (this.relatedElements.length > 1 && !this.domNodes.wrapper.contains(this.domNodes.counter)) {\n this.domNodes.wrapper.appendChild(this.domNodes.counter);\n }\n }\n if (this.options.download && this.domNodes.download) {\n this.domNodes.wrapper.appendChild(this.domNodes.download);\n }\n this.isAnimating = true;\n this.currentImageIndex = this.relatedElements.indexOf(element);\n var targetURL = element.getAttribute(this.options.sourceAttr);\n this.currentImage = document.createElement('img');\n this.currentImage.style.display = 'none';\n this.currentImage.setAttribute('src', targetURL);\n this.currentImage.dataset.scale = 1;\n this.currentImage.dataset.translateX = 0;\n this.currentImage.dataset.translateY = 0;\n if (this.loadedImages.indexOf(targetURL) === -1) {\n this.loadedImages.push(targetURL);\n }\n this.domNodes.image.innerHTML = '';\n this.domNodes.image.setAttribute('style', '');\n this.domNodes.image.appendChild(this.currentImage);\n this.fadeIn(this.domNodes.overlay, this.options.fadeSpeed);\n this.fadeIn([this.domNodes.counter, this.domNodes.navigation, this.domNodes.closeButton, this.domNodes.download], this.options.fadeSpeed);\n this.show(this.domNodes.spinner);\n this.domNodes.counter.querySelector('.sl-current').innerHTML = this.currentImageIndex + 1;\n this.domNodes.counter.querySelector('.sl-total').innerHTML = this.relatedElements.length;\n this.adjustImage();\n if (this.options.preloading) {\n this.preload();\n }\n setTimeout(function () {\n element.dispatchEvent(new Event('shown.' + _this8.eventNamespace));\n }, this.options.animationSpeed);\n }\n }, {\n key: \"forceFocus\",\n value: function forceFocus() {\n var _this9 = this;\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.addEventListener(document, 'focusin.' + this.eventNamespace, function (event) {\n if (document !== event.target && _this9.domNodes.wrapper !== event.target && !_this9.domNodes.wrapper.contains(event.target)) {\n _this9.domNodes.wrapper.focus();\n }\n });\n }\n\n // utility\n }, {\n key: \"addEventListener\",\n value: function addEventListener(elements, events, callback, opts) {\n elements = this.wrap(elements);\n events = this.wrap(events);\n var _iterator = _createForOfIteratorHelper(elements),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var element = _step.value;\n if (!element.namespaces) {\n element.namespaces = {};\n } // save the namespaces addEventListener the DOM element itself\n var _iterator2 = _createForOfIteratorHelper(events),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var event = _step2.value;\n var options = opts || false;\n var needsPassiveFix = ['touchstart', 'touchmove', 'mousewheel', 'DOMMouseScroll'].indexOf(event.split('.')[0]) >= 0;\n if (needsPassiveFix && this.isPassiveEventsSupported) {\n if (_typeof(options) === 'object') {\n options.passive = true;\n } else {\n options = {\n passive: true\n };\n }\n }\n element.namespaces[event] = callback;\n element.addEventListener(event.split('.')[0], callback, options);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(elements, events) {\n elements = this.wrap(elements);\n events = this.wrap(events);\n var _iterator3 = _createForOfIteratorHelper(elements),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var element = _step3.value;\n var _iterator4 = _createForOfIteratorHelper(events),\n _step4;\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var event = _step4.value;\n if (element.namespaces && element.namespaces[event]) {\n element.removeEventListener(event.split('.')[0], element.namespaces[event]);\n delete element.namespaces[event];\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n }, {\n key: \"fadeOut\",\n value: function fadeOut(elements, duration, callback) {\n var _this10 = this;\n elements = this.wrap(elements);\n var _iterator5 = _createForOfIteratorHelper(elements),\n _step5;\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var element = _step5.value;\n element.style.opacity = parseFloat(element) || window.getComputedStyle(element).getPropertyValue(\"opacity\");\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n this.isFadeIn = false;\n var step = 16.66666 / (duration || this.options.fadeSpeed),\n fade = function fade() {\n var currentOpacity = parseFloat(elements[0].style.opacity);\n if ((currentOpacity -= step) < 0) {\n var _iterator6 = _createForOfIteratorHelper(elements),\n _step6;\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var element = _step6.value;\n element.style.display = \"none\";\n // element.style.opacity = '';\n element.style.opacity = 1;\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n callback && callback.call(_this10, elements);\n } else {\n var _iterator7 = _createForOfIteratorHelper(elements),\n _step7;\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var _element = _step7.value;\n _element.style.opacity = currentOpacity;\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n requestAnimationFrame(fade);\n }\n };\n fade();\n }\n }, {\n key: \"fadeIn\",\n value: function fadeIn(elements, duration, callback, display) {\n var _this11 = this;\n elements = this.wrap(elements);\n var _iterator8 = _createForOfIteratorHelper(elements),\n _step8;\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var element = _step8.value;\n if (element) {\n element.style.opacity = 0;\n element.style.display = display || \"block\";\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n this.isFadeIn = true;\n var opacityTarget = parseFloat(elements[0].dataset.opacityTarget || 1),\n step = 16.66666 * opacityTarget / (duration || this.options.fadeSpeed),\n fade = function fade() {\n var currentOpacity = parseFloat(elements[0].style.opacity);\n if (!((currentOpacity += step) > opacityTarget)) {\n var _iterator9 = _createForOfIteratorHelper(elements),\n _step9;\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var element = _step9.value;\n if (element) {\n element.style.opacity = currentOpacity;\n }\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n if (!_this11.isFadeIn) return;\n requestAnimationFrame(fade);\n } else {\n var _iterator10 = _createForOfIteratorHelper(elements),\n _step10;\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var _element2 = _step10.value;\n if (_element2) {\n _element2.style.opacity = opacityTarget;\n }\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n callback && callback.call(_this11, elements);\n }\n };\n fade();\n }\n }, {\n key: \"hide\",\n value: function hide(elements) {\n elements = this.wrap(elements);\n var _iterator11 = _createForOfIteratorHelper(elements),\n _step11;\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var element = _step11.value;\n if (element.style.display != 'none') {\n element.dataset.initialDisplay = element.style.display;\n }\n element.style.display = 'none';\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n }\n }, {\n key: \"show\",\n value: function show(elements, display) {\n elements = this.wrap(elements);\n var _iterator12 = _createForOfIteratorHelper(elements),\n _step12;\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var element = _step12.value;\n element.style.display = element.dataset.initialDisplay || display || 'block';\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n }\n }, {\n key: \"wrap\",\n value: function wrap(input) {\n return typeof input[Symbol.iterator] === 'function' && typeof input !== 'string' ? input : [input];\n }\n }, {\n key: \"on\",\n value: function on(events, callback) {\n events = this.wrap(events);\n var _iterator13 = _createForOfIteratorHelper(this.elements),\n _step13;\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var element = _step13.value;\n if (!element.fullyNamespacedEvents) {\n element.fullyNamespacedEvents = {};\n }\n var _iterator14 = _createForOfIteratorHelper(events),\n _step14;\n try {\n for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n var event = _step14.value;\n element.fullyNamespacedEvents[event] = callback;\n element.addEventListener(event, callback);\n }\n } catch (err) {\n _iterator14.e(err);\n } finally {\n _iterator14.f();\n }\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n return this;\n }\n }, {\n key: \"off\",\n value: function off(events) {\n events = this.wrap(events);\n var _iterator15 = _createForOfIteratorHelper(this.elements),\n _step15;\n try {\n for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n var element = _step15.value;\n var _iterator16 = _createForOfIteratorHelper(events),\n _step16;\n try {\n for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n var event = _step16.value;\n if (typeof element.fullyNamespacedEvents !== 'undefined' && event in element.fullyNamespacedEvents) {\n element.removeEventListener(event, element.fullyNamespacedEvents[event]);\n }\n }\n } catch (err) {\n _iterator16.e(err);\n } finally {\n _iterator16.f();\n }\n }\n } catch (err) {\n _iterator15.e(err);\n } finally {\n _iterator15.f();\n }\n return this;\n }\n\n // api\n }, {\n key: \"open\",\n value: function open(elem) {\n var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n elem = elem || this.elements[0];\n if (typeof jQuery !== \"undefined\" && elem instanceof jQuery) {\n elem = elem.get(0);\n }\n if (position > 0) {\n elem = this.elements[position];\n }\n this.initialImageIndex = this.elements.indexOf(elem);\n if (this.initialImageIndex > -1) {\n this.openImage(elem);\n }\n }\n }, {\n key: \"openPosition\",\n value: function openPosition(position) {\n var elem = this.elements[position];\n this.open(elem, position);\n }\n }, {\n key: \"next\",\n value: function next() {\n this.loadImage(1);\n }\n }, {\n key: \"prev\",\n value: function prev() {\n this.loadImage(-1);\n }\n\n // get some useful data\n }, {\n key: \"getLighboxData\",\n value: function getLighboxData() {\n return {\n currentImageIndex: this.currentImageIndex,\n currentImage: this.currentImage,\n globalScrollbarWidth: this.globalScrollbarWidth\n };\n }\n\n //close is exposed anyways..\n }, {\n key: \"destroy\",\n value: function destroy() {\n //remove all custom event listeners from elements\n this.off(['close.' + this.eventNamespace, 'closed.' + this.eventNamespace, 'nextImageLoaded.' + this.eventNamespace, 'prevImageLoaded.' + this.eventNamespace, 'change.' + this.eventNamespace, 'nextDone.' + this.eventNamespace, 'prevDone.' + this.eventNamespace, 'error.' + this.eventNamespace, 'changed.' + this.eventNamespace, 'next.' + this.eventNamespace, 'prev.' + this.eventNamespace, 'show.' + this.eventNamespace, 'shown.' + this.eventNamespace]);\n this.removeEventListener(this.elements, 'click.' + this.eventNamespace);\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.removeEventListener(document.body, 'contextmenu.' + this.eventNamespace);\n this.removeEventListener(document.body, 'keyup.' + this.eventNamespace);\n this.removeEventListener(this.domNodes.navigation.getElementsByTagName('button'), 'click.' + this.eventNamespace);\n this.removeEventListener(this.domNodes.closeButton, 'click.' + this.eventNamespace);\n this.removeEventListener(window, 'resize.' + this.eventNamespace);\n this.removeEventListener(window, 'hashchange.' + this.eventNamespace);\n this.close();\n if (this.isOpen) {\n document.body.removeChild(this.domNodes.wrapper);\n document.body.removeChild(this.domNodes.overlay);\n }\n this.elements = null;\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n if (!this.initialSelector) {\n throw 'refreshing only works when you initialize using a selector!';\n }\n var options = this.options,\n selector = this.initialSelector;\n this.destroy();\n this.constructor(selector, options);\n return this;\n }\n }]);\n return SimpleLightbox;\n}();\nvar _default = SimpleLightbox;\nexports[\"default\"] = _default;\nglobal.SimpleLightbox = SimpleLightbox;","import SimpleLightbox from \"simplelightbox\";\n\nconst lightboxSettings = {\n sourceAttr: 'src',\n captions: false,\n disableRightClick: true,\n overlayOpacity: 1,\n widthRatio: 0.95,\n heightRatio: 0.95\n}\n\nconst selectors = [\n 'img.kg-image',\n '.kg-image img',\n 'img.kg-gallery-image',\n '.kg-gallery-image img',\n 'img.lightbox-image',\n '.lightbox-image img'\n];\n\nexport default function lightbox() {\n let lightboxContainer = document.querySelector('#post');\n if (!lightboxContainer) { return; }\n\n new SimpleLightbox(\n lightboxContainer.querySelectorAll(selectors.join(', ')),\n lightboxSettings\n );\n}\n","// JavaScript files are compiled and minified during the build process to the assets/built folder. See available scripts in the package.json file.\n\n// Import JS\nimport macyFeed from \"./macy\";\nimport infiniteScroll from \"./infiniteScroll\";\nimport lightbox from \"./lightbox\";\nimport mobileMenu from \"./mobileMenu\";\n\nlet macy = macyFeed();\ninfiniteScroll(macy);\nlightbox();\nmobileMenu();\n","export default function mobileMenu() {\n const openToggle = document.getElementById('mobile-menu-open');\n const closeToggle = document.getElementById('mobile-menu-close');\n const mobileMenu = document.getElementById('mobile-menu');\n\n const open = () => {\n mobileMenu.classList.remove('hidden');\n document.body.style.overflow = 'hidden';\n }\n\n const close = () => {\n mobileMenu.classList.add('hidden');\n document.body.style.overflow = 'auto';\n }\n\n openToggle.addEventListener('click', () => {\n open();\n });\n\n closeToggle.addEventListener('click', () => {\n close();\n });\n\n mobileMenu.addEventListener('click', () => {\n close();\n });\n\n mobileMenu.querySelector('#mobile-menu-main').addEventListener('click', (e) => {\n e.stopPropagation();\n })\n\n window.addEventListener('resize', function() {\n close();\n });\n}\n"],"names":["exports","t","n","e","clearTimeout","setTimeout","length","r","o","push","arguments","window","Promise","A","recalculate","options","responsiveOptions","keys","docWidth","i","s","a","parseInt","breakAt","O","useContainerForBreakpoints","container","clientWidth","innerWidth","columns","b","margin","x","y","Object","mobileFirst","c","parseFloat","replace","u","l","rows","v","style","height","p","M","offsetHeight","isNaN","forEach","position","top","left","cols","dataset","macyComplete","tmpRows","f","lastcol","C","h","this","nodeName","byCss","selectors","split","RegExp","test","prototype","document","querySelectorAll","getElementsByClassName","substring","getElementsByTagName","getElementById","m","running","events","add","run","shift","Array","isArray","clear","d","instance","data","on","emit","g","naturalHeight","naturalWidth","width","E","complete","addEventListener","then","constants","EVENT_IMAGE_LOAD","img","catch","EVENT_IMAGE_ERROR","w","all","EVENT_IMAGE_COMPLETE","I","EVENT_RESIZE","queue","N","debug","console","error","T","resizer","L","useOwnImageLoader","waitForImages","EVENT_INITIALIZED","_","toString","call","getComputedStyle","getPropertyValue","V","children","from","filter","offsetParent","trueOrder","EVENT_RECALCULATED","R","assign","hasOwnProperty","k","useImageLoader","onInit","cancelLegacy","createElement","querySelector","getAttribute","id","Math","floor","random","apply","removeAttribute","Element","q","init","warn","recalculateOnImageLoad","runOnImageLoad","remove","removeEventListener","reInit","link","_typeof","obj","Symbol","iterator","constructor","_createForOfIteratorHelper","allowArrayLike","it","_unsupportedIterableToArray","F","done","value","_e","TypeError","err","normalCompletion","didErr","step","next","_e2","_toConsumableArray","arr","_arrayLikeToArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","minLen","slice","name","len","arr2","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","key","_defineProperty","SimpleLightbox","elements","_this","Constructor","_classCallCheck","sourceAttr","overlay","overlayOpacity","spinner","nav","navText","captions","captionDelay","captionSelector","captionType","captionsData","captionPosition","captionClass","captionHTML","close","closeText","swipeClose","showCounter","fileExt","animationSlide","animationSpeed","preloading","enableKeyboard","loop","rel","docClose","swipeTolerance","className","widthRatio","heightRatio","scaleImageToRatio","disableRightClick","disableScroll","alertError","alertErrorMessage","additionalHtml","history","throttleInterval","doubleTapZoom","maxZoom","htmlClass","rtl","fixedClass","fadeSpeed","uniqueImages","focus","scrollZoom","scrollZoomFactor","download","navigator","platform","swipeDiff","swipeYDiff","swipeStart","swipeEnd","swipeYStart","swipeYEnd","mousedown","imageLeft","zoomed","containerHeight","containerWidth","containerOffsetX","containerOffsetY","imgHeight","imgWidth","capture","initialOffsetX","initialOffsetY","initialPointerOffsetX","initialPointerOffsetY","initialPointerOffsetX2","initialPointerOffsetY2","initialScale","initialPinchDistance","pointerOffsetX","pointerOffsetY","pointerOffsetX2","pointerOffsetY2","targetOffsetX","targetOffsetY","targetScale","pinchOffsetX","pinchOffsetY","limitOffsetX","limitOffsetY","scaleDifference","targetPinchDistance","touchCount","doubleTapped","touchmoveCount","defaultOptions","isPassiveEventsSupported","checkPassiveEventsSupport","initialSelector","relatedElements","transitionPrefix","calculateTransitionPrefix","transitionCapable","initialLocationHash","hash","getRelated","imgArr","element","src","indexOf","createDomNodes","domNodes","wrapper","appendChild","closeButton","navigation","eventNamespace","event","isValidLink","currentTarget","preventDefault","isAnimating","initialImageIndex","openImage","isOpen","body","parentElement","classList","contains","throttle","controlCoordinates","currentImage","setAttribute","loadImage","addEvents","protoProps","staticProps","supportsPassive","opts","get","elem","startsWith","selector","trimStart","sibling","nextElementSibling","matches","_selector","tagName","parentNode","str","concat","classes","trim","childIndex","previousElementSibling","generateQuerySelector","opacityTarget","innerHTML","counter","downloadLink","textContent","caption","_this$domNodes$captio","captionClasses","image","func","limit","inThrottle","documentElement","scrollbarWidth","scrollDiv","offsetWidth","removeChild","type","fixedElements","fullWindowWidth","documentElementRect","getBoundingClientRect","right","abs","isAppleDevice","paddingRight","getScrollbarWidth","originalPaddingRight","actualPadding","calculatedPadding","padding","_this2","isClosing","currentImageIndex","dispatchEvent","Event","historyHasChanges","hashReseted","resetHash","fadeOut","toggleScrollbar","minMax","location","_this3","index","prev","nextImage","Image","prevImage","loadedImages","direction","_this4","slideDirection","newIndex","slide","show","adjustImage","preload","_this5","tmpImage","windowWidth","windowHeight","innerHeight","scale","translateX","translateY","zoomPanElement","display","dirIsDefined","alert","updateURL","captionContainer","captionText","imageWidth","imageHeight","ratio","globalScrollbarWidth","forceFocus","fadeIn","getCaptionElement","hide","setCaption","min","max","_this6","bind","hashchangeHandler","match","getDimensions","offsetLeft","offsetTop","delta","wheelDelta","undefined","detail","scrollTopPos","scrollTop","pageX","pageY","opacity","setZoomData","clientX","clientY","touches","sqrt","isTouchDevice","possibleDir","styles","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","paddingLeft","newHash","newURL","href","pushStateSupport","title","urlChangedOnce","back","pushState","pathname","search","historyUpdateTimeout","updateHash","allowHTML","_this7","_ref","property","speed","pos","_this8","targetURL","_this9","callback","wrap","_step","_iterator","namespaces","_step2","_iterator2","passive","_step3","_iterator3","_step4","_iterator4","duration","_step5","_this10","_iterator5","isFadeIn","fade","currentOpacity","_step6","_iterator6","_step7","_iterator7","requestAnimationFrame","_step8","_this11","_iterator8","_step10","_iterator10","_element2","_step9","_iterator9","_step11","_iterator11","initialDisplay","_step12","_iterator12","input","_step13","_iterator13","fullyNamespacedEvents","_step14","_iterator14","_step15","_iterator15","_step16","_iterator16","jQuery","open","off","destroy","_default","commonjsHelpers","lightboxSettings","macy","observer","IntersectionObserver","entries","entry","isIntersecting","async","url","res","fetch","ok","Error","nextPageHtml","text","parsed","DOMParser","parseFromString","posts","post","nextLink","getNextPage","append","promises","map","resolve","reject","onload","onerror","onAllPostImagesLoaded","observe","disconnect","log","rootMargin","infiniteScroll","Macy","macyFeed","lightboxContainer","join","lightbox","openToggle","closeToggle","mobileMenu","overflow","stopPropagation"],"mappings":"uSAAmFA,QAAqE,WAAwB,SAASC,EAAEA,EAAEC,GAAG,IAAIC,OAAE,EAAO,OAAO,WAAWA,GAAGC,aAAaD,GAAGA,EAAEE,WAAWJ,EAAEC,GAAG,CAAC,SAASA,EAAED,EAAEC,GAAG,IAAI,IAAIC,EAAEF,EAAEK,OAAOC,EAAEJ,EAAEK,EAAE,GAAGL,KAAKK,EAAEC,KAAKP,EAAED,EAAEM,EAAEJ,EAAE,KAAK,OAAOK,CAAC,CAAC,SAASL,EAAEF,EAAEC,GA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AAO,UAC5BnF,SAAS+P,KAAKzR,MAAMiiB,SAAW,QASzB,IAGRF,EAAY3e,iBAAiB,SAAS,KACpC0H,GAAO,IAGTkX,EAAW5e,iBAAiB,SAAS,KACnC0H,GAAO,IAGTkX,EAAWjc,cAAc,qBAAqB3C,iBAAiB,SAAU5F,IACvEA,EAAE0kB,iBAAiB,IAGrBlkB,OAAOoF,iBAAiB,UAAU,WAChC0H,GACF,GACF,CDvBAkX","x_google_ignoreList":[0,3]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../../node_modules/macy/dist/macy.js","../js/macy.js","../js/infiniteScroll.js","../../node_modules/simplelightbox/dist/simple-lightbox.modules.js","../js/lightbox.js","../js/index.js","../js/mobileMenu.js"],"sourcesContent":["!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):t.Macy=n()}(this,function(){\"use strict\";function t(t,n){var e=void 0;return function(){e&&clearTimeout(e),e=setTimeout(t,n)}}function n(t,n){for(var e=t.length,r=e,o=[];e--;)o.push(n(t[r-e-1]));return o}function e(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(window.Promise)return A(t,n,e);t.recalculate(!0,!0)}function r(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=0;s=a&&(i=n.breakAt[a],O(i,e))}return e}function o(t){for(var n=t.options,e=t.responsiveOptions,r=t.keys,o=t.docWidth,i=void 0,s=r.length-1;s>=0;s--){var a=parseInt(r[s],10);o<=a&&(i=n.breakAt[a],O(i,e))}return e}function i(t){var n=t.useContainerForBreakpoints?t.container.clientWidth:window.innerWidth,e={columns:t.columns};b(t.margin)?e.margin={x:t.margin.x,y:t.margin.y}:e.margin={x:t.margin,y:t.margin};var i=Object.keys(t.breakAt);return t.mobileFirst?r({options:t,responsiveOptions:e,keys:i,docWidth:n}):o({options:t,responsiveOptions:e,keys:i,docWidth:n})}function s(t){return i(t).columns}function a(t){return i(t).margin}function c(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=s(t),r=a(t).x,o=100/e;if(!n)return o;if(1===e)return\"100%\";var i=\"px\";if(\"string\"==typeof r){var c=parseFloat(r);i=r.replace(c,\"\"),r=c}return r=(e-1)*r/e,\"%\"===i?o-r+\"%\":\"calc(\"+o+\"% - \"+r+i+\")\"}function u(t,n){var e=s(t.options),r=0,o=void 0,i=void 0;if(1===++n)return 0;i=a(t.options).x;var u=\"px\";if(\"string\"==typeof i){var l=parseFloat(i,10);u=i.replace(l,\"\"),i=l}return o=(i-(e-1)*i/e)*(n-1),r+=c(t.options,!1)*(n-1),\"%\"===u?r+o+\"%\":\"calc(\"+r+\"% + \"+o+u+\")\"}function l(t){var n=0,e=t.container,r=t.rows;v(r,function(t){n=t>n?t:n}),e.style.height=n+\"px\"}function p(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,function(n){var e=0,o=parseInt(n.offsetHeight,10);isNaN(o)||(t.rows.forEach(function(n,r){n2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=s(t.options),i=a(t.options).y;M(t,o,e),v(n,function(n){t.lastcol===o&&(t.lastcol=0);var e=C(n,\"height\");e=parseInt(n.offsetHeight,10),isNaN(e)||(n.style.position=\"absolute\",n.style.top=t.rows[t.lastcol]+\"px\",n.style.left=\"\"+t.cols[t.lastcol],t.rows[t.lastcol]+=isNaN(e)?0:e+i,t.lastcol+=1,r&&(n.dataset.macyComplete=1))}),r&&(t.tmpRows=null),l(t)}var h=function t(n,e){if(!(this instanceof t))return new t(n,e);if(n&&n.nodeName)return n;if(n=n.replace(/^\\s*/,\"\").replace(/\\s*$/,\"\"),e)return this.byCss(n,e);for(var r in this.selectors)if(e=r.split(\"/\"),new RegExp(e[1],e[2]).test(n))return this.selectors[r](n);return this.byCss(n)};h.prototype.byCss=function(t,n){return(n||document).querySelectorAll(t)},h.prototype.selectors={},h.prototype.selectors[/^\\.[\\w\\-]+$/]=function(t){return document.getElementsByClassName(t.substring(1))},h.prototype.selectors[/^\\w+$/]=function(t){return document.getElementsByTagName(t)},h.prototype.selectors[/^\\#[\\w\\-]+$/]=function(t){return document.getElementById(t.substring(1))};var v=function(t,n){for(var e=t.length,r=e;e--;)n(t[r-e-1])},m=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.running=!1,this.events=[],this.add(t)};m.prototype.run=function(){if(!this.running&&this.events.length>0){var t=this.events.shift();this.running=!0,t(),this.running=!1,this.run()}},m.prototype.add=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!!n&&(Array.isArray(n)?v(n,function(n){return t.add(n)}):(this.events.push(n),void this.run()))},m.prototype.clear=function(){this.events=[]};var d=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.instance=t,this.data=n,this},y=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.events={},this.instance=t};y.prototype.on=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!t||!n)&&(Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(n))},y.prototype.emit=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!Array.isArray(this.events[t]))return!1;var e=new d(this.instance,n);v(this.events[t],function(t){return t(e)})};var g=function(t){return!(\"naturalHeight\"in t&&t.naturalHeight+t.naturalWidth===0)||t.width+t.height!==0},E=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(t,e){if(n.complete)return g(n)?t(n):e(n);n.addEventListener(\"load\",function(){return g(n)?t(n):e(n)}),n.addEventListener(\"error\",function(){return e(n)})}).then(function(n){e&&t.emit(t.constants.EVENT_IMAGE_LOAD,{img:n})}).catch(function(n){return t.emit(t.constants.EVENT_IMAGE_ERROR,{img:n})})},w=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n(e,function(n){return E(t,n,r)})},A=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Promise.all(w(t,n,e)).then(function(){t.emit(t.constants.EVENT_IMAGE_COMPLETE)})},I=function(n){return t(function(){n.emit(n.constants.EVENT_RESIZE),n.queue.add(function(){return n.recalculate(!0,!0)})},100)},N=function(t){if(t.container=h(t.options.container),t.container instanceof h||!t.container)return!!t.options.debug&&console.error(\"Error: Container not found\");t.container.length&&(t.container=t.container[0]),t.options.container=t.container,t.container.style.position=\"relative\"},T=function(t){t.queue=new m,t.events=new y(t),t.rows=[],t.resizer=I(t)},L=function(t){var n=h(\"img\",t.container);window.addEventListener(\"resize\",t.resizer),t.on(t.constants.EVENT_IMAGE_LOAD,function(){return t.recalculate(!1,!1)}),t.on(t.constants.EVENT_IMAGE_COMPLETE,function(){return t.recalculate(!0,!0)}),t.options.useOwnImageLoader||e(t,n,!t.options.waitForImages),t.emit(t.constants.EVENT_INITIALIZED)},_=function(t){N(t),T(t),L(t)},b=function(t){return t===Object(t)&&\"[object Array]\"!==Object.prototype.toString.call(t)},O=function(t,n){b(t)||(n.columns=t),b(t)&&t.columns&&(n.columns=t.columns),b(t)&&t.margin&&!b(t.margin)&&(n.margin={x:t.margin,y:t.margin}),b(t)&&t.margin&&b(t.margin)&&t.margin.x&&(n.margin.x=t.margin.x),b(t)&&t.margin&&b(t.margin)&&t.margin.y&&(n.margin.y=t.margin.y)},C=function(t,n){return window.getComputedStyle(t,null).getPropertyValue(n)},M=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.lastcol||(t.lastcol=0),t.rows.length<1&&(e=!0),e){t.rows=[],t.cols=[],t.lastcol=0;for(var r=n-1;r>=0;r--)t.rows[r]=0,t.cols[r]=u(t,r)}else if(t.tmpRows){t.rows=[];for(var r=n-1;r>=0;r--)t.rows[r]=t.tmpRows[r]}else{t.tmpRows=[];for(var r=n-1;r>=0;r--)t.tmpRows[r]=t.rows[r]}},V=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n?t.container.children:h(':scope > *:not([data-macy-complete=\"1\"])',t.container);r=Array.from(r).filter(function(t){return null!==t.offsetParent});var o=c(t.options);return v(r,function(t){n&&(t.dataset.macyComplete=0),t.style.width=o}),t.options.trueOrder?(f(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED)):(p(t,r,n,e),t.emit(t.constants.EVENT_RECALCULATED))},R=function(){return!!window.Promise},x=Object.assign||function(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:k;if(!(this instanceof t))return new t(n);this.options={},x(this.options,k,n),this.options.cancelLegacy&&!R()||_(this)};return q.init=function(t){return console.warn(\"Depreciated: Macy.init will be removed in v3.0.0 opt to use Macy directly like so Macy({ /*options here*/ }) \"),new q(t)},q.prototype.recalculateOnImageLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e(this,h(\"img\",this.container),!t)},q.prototype.runOnImageLoad=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=h(\"img\",this.container);return this.on(this.constants.EVENT_IMAGE_COMPLETE,t),n&&this.on(this.constants.EVENT_IMAGE_LOAD,t),e(this,r,n)},q.prototype.recalculate=function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.queue.clear(),this.queue.add(function(){return V(t,n,e)})},q.prototype.remove=function(){window.removeEventListener(\"resize\",this.resizer),v(this.container.children,function(t){t.removeAttribute(\"data-macy-complete\"),t.removeAttribute(\"style\")}),this.container.removeAttribute(\"style\")},q.prototype.reInit=function(){this.recalculate(!0,!0),this.emit(this.constants.EVENT_INITIALIZED),window.addEventListener(\"resize\",this.resizer),this.container.style.position=\"relative\"},q.prototype.on=function(t,n){this.events.on(t,n)},q.prototype.emit=function(t,n){this.events.emit(t,n)},q.constants={EVENT_INITIALIZED:\"macy.initialized\",EVENT_RECALCULATED:\"macy.recalculated\",EVENT_IMAGE_LOAD:\"macy.image.load\",EVENT_IMAGE_ERROR:\"macy.image.error\",EVENT_IMAGE_COMPLETE:\"macy.images.complete\",EVENT_RESIZE:\"macy.resize\"},q.prototype.constants=q.constants,q});\n","import Macy from 'macy';\n\nlet container = document.querySelector('.gh-postfeed');\n\nexport default function macyFeed() {\n\n if (!container) { return; }\n\n const macy = new Macy({\n container: container,\n trueOrder: false,\n waitForImages: false,\n margin: 16,\n columns: 3,\n breakAt: {\n 1300: 2,\n 700: 1\n }\n });\n\n return macy;\n}\n","/*\nThis script continously loads post as the user scrolls the page. It uses the IntersectionObserver API to detect when the last post is in view. When the last post is in view, it fetches the next page and appends the posts to the page. It then checks if there is a next page and if there is, it continues to observe the last post. If there is no next page, it disconnects the observer.\n\nImportantly, for this script to work, it requires that each card have the `post` class and that the card container have the `gh-postfeed` class\n*/\n\nlet link = document.querySelector('link[rel=\"next\"]')?.getAttribute('href');\n\n// Fetch and parse next page\nasync function getNextPage(url) {\n try {\n const res = await fetch(url);\n\n if (!res.ok) {\n throw new Error('Failed to fetch page')\n }\n\n const nextPageHtml = await res.text();\n const parser = new DOMParser();\n const parsed = parser.parseFromString(nextPageHtml, 'text/html');\n const posts = parsed.querySelectorAll('.post');\n\n posts.forEach(post => {\n post.classList.add('post-hidden');\n });\n\n const nextLink = parsed.querySelector('link[rel=\"next\"]')?.getAttribute('href');\n\n return {posts, nextLink}\n\n } catch (error) {\n throw new Error(error)\n }\n}\n\nfunction onAllPostImagesLoaded(posts, callback) {\n try {\n const images = Array.from(posts).map(post => {\n return post.querySelector('img');\n })\n const promises = images.map(image => {\n return new Promise((resolve, reject) => {\n image.onload = resolve;\n image.onerror = reject;\n })\n })\n\n Promise.all(promises).then(() => {\n callback();\n });\n } catch (error) {\n throw new Error(error)\n }\n}\n\nexport default function infiniteScroll(macy) {\n\n if (!link) { return; }\n\n const options = {\n // When the last card is within a 150px of the viewport, fetch the next page. This provides a smoother transition between pages\n rootMargin: '150px',\n }\n\n const callback = (entries, observer) => {\n try {\n entries.forEach(entry => {\n\n if (entry.isIntersecting) {\n\n if (link) {\n getNextPage(link).then(({posts, nextLink}) => {\n posts.forEach(post => {\n document.querySelector('.gh-postfeed').append(post)\n })\n onAllPostImagesLoaded(posts, () => {\n posts.forEach(post => { post.classList.remove('post-hidden') });\n macy.recalculate(true);\n });\n\n if (nextLink) {\n link = nextLink;\n observer.observe(document.querySelector('.post:last-of-type'))\n } else {\n observer.disconnect()\n }\n })\n }\n }\n })\n } catch (error) {\n console.log(error)\n }\n }\n\n let observer = new IntersectionObserver(callback, options);\n\n observer.observe(document.querySelector('.post:last-of-type'))\n\n}\n","/*!\r\n\tBy André Rinas, www.andrerinas.de\r\n\tDocumentation, www.simplelightbox.com\r\n\tAvailable for use under the MIT License\r\n\tVersion 2.14.3\r\n*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar SimpleLightbox = /*#__PURE__*/function () {\n function SimpleLightbox(elements, options) {\n var _this = this;\n _classCallCheck(this, SimpleLightbox);\n _defineProperty(this, \"defaultOptions\", {\n sourceAttr: 'href',\n overlay: true,\n overlayOpacity: 0.7,\n spinner: true,\n nav: true,\n navText: ['‹', '›'],\n captions: true,\n captionDelay: 0,\n captionSelector: 'img',\n captionType: 'attr',\n captionsData: 'title',\n captionPosition: 'bottom',\n captionClass: '',\n captionHTML: true,\n close: true,\n closeText: '×',\n swipeClose: true,\n showCounter: true,\n fileExt: 'png|jpg|jpeg|gif|webp|avif',\n animationSlide: true,\n animationSpeed: 250,\n preloading: true,\n enableKeyboard: true,\n loop: true,\n rel: false,\n docClose: true,\n swipeTolerance: 50,\n className: 'simple-lightbox',\n widthRatio: 0.8,\n heightRatio: 0.9,\n scaleImageToRatio: false,\n disableRightClick: false,\n disableScroll: true,\n alertError: true,\n alertErrorMessage: 'Image not found, next image will be loaded',\n additionalHtml: false,\n history: true,\n throttleInterval: 0,\n doubleTapZoom: 2,\n maxZoom: 10,\n htmlClass: 'has-lightbox',\n rtl: false,\n fixedClass: 'sl-fixed',\n fadeSpeed: 300,\n uniqueImages: true,\n focus: true,\n scrollZoom: true,\n scrollZoomFactor: 0.5,\n download: false\n });\n _defineProperty(this, \"transitionPrefix\", void 0);\n _defineProperty(this, \"isPassiveEventsSupported\", void 0);\n _defineProperty(this, \"transitionCapable\", false);\n _defineProperty(this, \"isTouchDevice\", 'ontouchstart' in window);\n _defineProperty(this, \"isAppleDevice\", /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform));\n _defineProperty(this, \"initialLocationHash\", void 0);\n _defineProperty(this, \"pushStateSupport\", 'pushState' in history);\n _defineProperty(this, \"isOpen\", false);\n _defineProperty(this, \"isAnimating\", false);\n _defineProperty(this, \"isClosing\", false);\n _defineProperty(this, \"isFadeIn\", false);\n _defineProperty(this, \"urlChangedOnce\", false);\n _defineProperty(this, \"hashReseted\", false);\n _defineProperty(this, \"historyHasChanges\", false);\n _defineProperty(this, \"historyUpdateTimeout\", null);\n _defineProperty(this, \"currentImage\", void 0);\n _defineProperty(this, \"eventNamespace\", 'simplelightbox');\n _defineProperty(this, \"domNodes\", {});\n _defineProperty(this, \"loadedImages\", []);\n _defineProperty(this, \"initialImageIndex\", 0);\n _defineProperty(this, \"currentImageIndex\", 0);\n _defineProperty(this, \"initialSelector\", null);\n _defineProperty(this, \"globalScrollbarWidth\", 0);\n _defineProperty(this, \"controlCoordinates\", {\n swipeDiff: 0,\n swipeYDiff: 0,\n swipeStart: 0,\n swipeEnd: 0,\n swipeYStart: 0,\n swipeYEnd: 0,\n mousedown: false,\n imageLeft: 0,\n zoomed: false,\n containerHeight: 0,\n containerWidth: 0,\n containerOffsetX: 0,\n containerOffsetY: 0,\n imgHeight: 0,\n imgWidth: 0,\n capture: false,\n initialOffsetX: 0,\n initialOffsetY: 0,\n initialPointerOffsetX: 0,\n initialPointerOffsetY: 0,\n initialPointerOffsetX2: 0,\n initialPointerOffsetY2: 0,\n initialScale: 1,\n initialPinchDistance: 0,\n pointerOffsetX: 0,\n pointerOffsetY: 0,\n pointerOffsetX2: 0,\n pointerOffsetY2: 0,\n targetOffsetX: 0,\n targetOffsetY: 0,\n targetScale: 0,\n pinchOffsetX: 0,\n pinchOffsetY: 0,\n limitOffsetX: 0,\n limitOffsetY: 0,\n scaleDifference: 0,\n targetPinchDistance: 0,\n touchCount: 0,\n doubleTapped: false,\n touchmoveCount: 0\n });\n this.options = Object.assign(this.defaultOptions, options);\n this.isPassiveEventsSupported = this.checkPassiveEventsSupport();\n if (typeof elements === 'string') {\n this.initialSelector = elements;\n this.elements = Array.from(document.querySelectorAll(elements));\n } else {\n this.elements = typeof elements.length !== 'undefined' && elements.length > 0 ? Array.from(elements) : [elements];\n }\n this.relatedElements = [];\n this.transitionPrefix = this.calculateTransitionPrefix();\n this.transitionCapable = this.transitionPrefix !== false;\n this.initialLocationHash = this.hash;\n\n // this should be handled by attribute selector IMHO! => 'a[rel=bla]'...\n if (this.options.rel) {\n this.elements = this.getRelated(this.options.rel);\n }\n if (this.options.uniqueImages) {\n var imgArr = [];\n this.elements = Array.from(this.elements).filter(function (element) {\n var src = element.getAttribute(_this.options.sourceAttr);\n if (imgArr.indexOf(src) === -1) {\n imgArr.push(src);\n return true;\n }\n return false;\n });\n }\n this.createDomNodes();\n if (this.options.close) {\n this.domNodes.wrapper.appendChild(this.domNodes.closeButton);\n }\n if (this.options.nav) {\n this.domNodes.wrapper.appendChild(this.domNodes.navigation);\n }\n if (this.options.spinner) {\n this.domNodes.wrapper.appendChild(this.domNodes.spinner);\n }\n this.addEventListener(this.elements, 'click.' + this.eventNamespace, function (event) {\n if (_this.isValidLink(event.currentTarget)) {\n event.preventDefault();\n if (_this.isAnimating) {\n return false;\n }\n _this.initialImageIndex = _this.elements.indexOf(event.currentTarget);\n _this.openImage(event.currentTarget);\n }\n });\n\n // close addEventListener click addEventListener doc\n if (this.options.docClose) {\n this.addEventListener(this.domNodes.wrapper, ['click.' + this.eventNamespace, 'touchstart.' + this.eventNamespace], function (event) {\n if (_this.isOpen && event.target === event.currentTarget) {\n _this.close();\n }\n });\n }\n\n // disable rightclick\n if (this.options.disableRightClick) {\n this.addEventListener(document.body, 'contextmenu.' + this.eventNamespace, function (event) {\n if (event.target.parentElement.classList.contains(\"sl-image\")) {\n event.preventDefault();\n }\n });\n }\n\n // keyboard-control\n if (this.options.enableKeyboard) {\n this.addEventListener(document.body, 'keyup.' + this.eventNamespace, this.throttle(function (event) {\n _this.controlCoordinates.swipeDiff = 0;\n // keyboard control only if lightbox is open\n\n if (_this.isAnimating && event.key === 'Escape') {\n _this.currentImage.setAttribute('src', '');\n _this.isAnimating = false;\n _this.close();\n return;\n }\n if (_this.isOpen) {\n event.preventDefault();\n if (event.key === 'Escape') {\n _this.close();\n }\n if (!_this.isAnimating && ['ArrowLeft', 'ArrowRight'].indexOf(event.key) > -1) {\n _this.loadImage(event.key === 'ArrowRight' ? 1 : -1);\n }\n }\n }, this.options.throttleInterval));\n }\n this.addEvents();\n }\n _createClass(SimpleLightbox, [{\n key: \"checkPassiveEventsSupport\",\n value: function checkPassiveEventsSupport() {\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n // Test via a getter in the options object to see if the passive property is accessed\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {}\n return supportsPassive;\n }\n }, {\n key: \"getCaptionElement\",\n value: function getCaptionElement(elem) {\n // look at sibling selector\n if (this.options.captionSelector.startsWith('+')) {\n var selector = this.options.captionSelector.replace(/^\\+/, '').trimStart();\n var sibling = elem.nextElementSibling;\n if (sibling && sibling.matches(selector)) {\n return sibling;\n }\n return false;\n } else if (this.options.captionSelector.startsWith('>')) {\n var _selector = this.options.captionSelector.replace(/^>/, '').trimStart();\n return elem.querySelector(_selector);\n } else {\n return elem.querySelector(this.options.captionSelector);\n }\n }\n }, {\n key: \"generateQuerySelector\",\n value: function generateQuerySelector(elem) {\n var tagName = elem.tagName,\n id = elem.id,\n className = elem.className,\n parentNode = elem.parentNode;\n if (tagName === 'HTML') return 'HTML';\n var str = tagName;\n str += id !== '' ? \"#\".concat(id) : '';\n if (className) {\n var classes = className.trim().split(/\\s/);\n for (var i = 0; i < classes.length; i++) {\n str += \".\".concat(classes[i]);\n }\n }\n var childIndex = 1;\n for (var e = elem; e.previousElementSibling; e = e.previousElementSibling) {\n childIndex += 1;\n }\n str += \":nth-child(\".concat(childIndex, \")\");\n return \"\".concat(this.generateQuerySelector(parentNode), \" > \").concat(str);\n }\n }, {\n key: \"createDomNodes\",\n value: function createDomNodes() {\n this.domNodes.overlay = document.createElement('div');\n this.domNodes.overlay.classList.add('sl-overlay');\n this.domNodes.overlay.dataset.opacityTarget = this.options.overlayOpacity;\n this.domNodes.closeButton = document.createElement('button');\n this.domNodes.closeButton.classList.add('sl-close');\n this.domNodes.closeButton.innerHTML = this.options.closeText;\n this.domNodes.spinner = document.createElement('div');\n this.domNodes.spinner.classList.add('sl-spinner');\n this.domNodes.spinner.innerHTML = '
';\n this.domNodes.navigation = document.createElement('div');\n this.domNodes.navigation.classList.add('sl-navigation');\n this.domNodes.navigation.innerHTML = \"\");\n this.domNodes.counter = document.createElement('div');\n this.domNodes.counter.classList.add('sl-counter');\n this.domNodes.counter.innerHTML = '/';\n this.domNodes.download = document.createElement('div');\n this.domNodes.download.classList.add('sl-download');\n this.domNodes.downloadLink = document.createElement('a');\n this.domNodes.downloadLink.setAttribute('download', '');\n this.domNodes.downloadLink.textContent = this.options.download;\n this.domNodes.download.appendChild(this.domNodes.downloadLink);\n this.domNodes.caption = document.createElement('div');\n this.domNodes.caption.classList.add('sl-caption', 'pos-' + this.options.captionPosition);\n if (this.options.captionClass) {\n var _this$domNodes$captio;\n var captionClasses = this.options.captionClass.split(/[\\s,]+/);\n (_this$domNodes$captio = this.domNodes.caption.classList).add.apply(_this$domNodes$captio, _toConsumableArray(captionClasses));\n }\n this.domNodes.image = document.createElement('div');\n this.domNodes.image.classList.add('sl-image');\n this.domNodes.wrapper = document.createElement('div');\n this.domNodes.wrapper.classList.add('sl-wrapper');\n this.domNodes.wrapper.setAttribute('tabindex', -1);\n this.domNodes.wrapper.setAttribute('role', 'dialog');\n this.domNodes.wrapper.setAttribute('aria-hidden', false);\n if (this.options.className) {\n this.domNodes.wrapper.classList.add(this.options.className);\n }\n if (this.options.rtl) {\n this.domNodes.wrapper.classList.add('sl-dir-rtl');\n }\n }\n }, {\n key: \"throttle\",\n value: function throttle(func, limit) {\n var inThrottle;\n return function () {\n if (!inThrottle) {\n func.apply(this, arguments);\n inThrottle = true;\n setTimeout(function () {\n return inThrottle = false;\n }, limit);\n }\n };\n }\n }, {\n key: \"isValidLink\",\n value: function isValidLink(element) {\n return !this.options.fileExt || element.getAttribute(this.options.sourceAttr) && new RegExp('(' + this.options.fileExt + ')($|\\\\?.*$)', 'i').test(element.getAttribute(this.options.sourceAttr));\n }\n }, {\n key: \"calculateTransitionPrefix\",\n value: function calculateTransitionPrefix() {\n var s = (document.body || document.documentElement).style;\n return 'transition' in s ? '' : 'WebkitTransition' in s ? '-webkit-' : 'MozTransition' in s ? '-moz-' : 'OTransition' in s ? '-o' : false;\n }\n }, {\n key: \"getScrollbarWidth\",\n value: function getScrollbarWidth() {\n var scrollbarWidth = 0;\n var scrollDiv = document.createElement('div');\n scrollDiv.classList.add('sl-scrollbar-measure');\n document.body.appendChild(scrollDiv);\n scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n }\n }, {\n key: \"toggleScrollbar\",\n value: function toggleScrollbar(type) {\n var scrollbarWidth = 0;\n var fixedElements = [].slice.call(document.querySelectorAll('.' + this.options.fixedClass));\n if (type === 'hide') {\n var fullWindowWidth = window.innerWidth;\n if (!fullWindowWidth) {\n var documentElementRect = document.documentElement.getBoundingClientRect();\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);\n }\n if (document.body.clientWidth < fullWindowWidth || this.isAppleDevice) {\n var paddingRight = parseInt(window.getComputedStyle(document.body).paddingRight || 0, 10);\n scrollbarWidth = this.getScrollbarWidth();\n document.body.dataset.originalPaddingRight = paddingRight;\n if (scrollbarWidth > 0 || scrollbarWidth == 0 && this.isAppleDevice) {\n document.body.classList.add('hidden-scroll');\n document.body.style.paddingRight = paddingRight + scrollbarWidth + 'px';\n fixedElements.forEach(function (element) {\n var actualPadding = element.style.paddingRight;\n var calculatedPadding = window.getComputedStyle(element)['padding-right'];\n element.dataset.originalPaddingRight = actualPadding;\n element.style.paddingRight = \"\".concat(parseFloat(calculatedPadding) + scrollbarWidth, \"px\");\n });\n }\n }\n } else {\n document.body.classList.remove('hidden-scroll');\n document.body.style.paddingRight = document.body.dataset.originalPaddingRight + 'px';\n fixedElements.forEach(function (element) {\n var padding = element.dataset.originalPaddingRight;\n if (typeof padding !== 'undefined') {\n element.style.paddingRight = padding;\n }\n });\n }\n return scrollbarWidth;\n }\n }, {\n key: \"close\",\n value: function close() {\n var _this2 = this;\n if (!this.isOpen || this.isAnimating || this.isClosing) {\n return false;\n }\n this.isClosing = true;\n var element = this.relatedElements[this.currentImageIndex];\n element.dispatchEvent(new Event('close.simplelightbox'));\n if (this.options.history) {\n this.historyHasChanges = false;\n if (!this.hashReseted) {\n this.resetHash();\n }\n }\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.fadeOut(this.domNodes.overlay, this.options.fadeSpeed);\n this.fadeOut(document.querySelectorAll('.sl-image img, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter'), this.options.fadeSpeed, function () {\n if (_this2.options.disableScroll) {\n _this2.toggleScrollbar('show');\n }\n if (_this2.options.htmlClass && _this2.options.htmlClass !== '') {\n document.querySelector('html').classList.remove(_this2.options.htmlClass);\n }\n document.body.removeChild(_this2.domNodes.wrapper);\n if (_this2.options.overlay) {\n document.body.removeChild(_this2.domNodes.overlay);\n }\n _this2.domNodes.additionalHtml = null;\n _this2.domNodes.download = null;\n element.dispatchEvent(new Event('closed.simplelightbox'));\n _this2.isClosing = false;\n });\n this.currentImage = null;\n this.isOpen = false;\n this.isAnimating = false;\n\n // reset touchcontrol coordinates\n for (var key in this.controlCoordinates) {\n this.controlCoordinates[key] = 0;\n }\n this.controlCoordinates.mousedown = false;\n this.controlCoordinates.zoomed = false;\n this.controlCoordinates.capture = false;\n this.controlCoordinates.initialScale = this.minMax(1, 1, this.options.maxZoom);\n this.controlCoordinates.doubleTapped = false;\n }\n }, {\n key: \"hash\",\n get: function get() {\n return window.location.hash.substring(1);\n }\n }, {\n key: \"preload\",\n value: function preload() {\n var _this3 = this;\n var index = this.currentImageIndex,\n length = this.relatedElements.length,\n next = index + 1 < 0 ? length - 1 : index + 1 >= length - 1 ? 0 : index + 1,\n prev = index - 1 < 0 ? length - 1 : index - 1 >= length - 1 ? 0 : index - 1,\n nextImage = new Image(),\n prevImage = new Image();\n nextImage.addEventListener('load', function (event) {\n var src = event.target.getAttribute('src');\n if (_this3.loadedImages.indexOf(src) === -1) {\n //is this condition even required... setting multiple times will not change usage...\n _this3.loadedImages.push(src);\n }\n _this3.relatedElements[index].dispatchEvent(new Event('nextImageLoaded.' + _this3.eventNamespace));\n });\n nextImage.setAttribute('src', this.relatedElements[next].getAttribute(this.options.sourceAttr));\n prevImage.addEventListener('load', function (event) {\n var src = event.target.getAttribute('src');\n if (_this3.loadedImages.indexOf(src) === -1) {\n _this3.loadedImages.push(src);\n }\n _this3.relatedElements[index].dispatchEvent(new Event('prevImageLoaded.' + _this3.eventNamespace));\n });\n prevImage.setAttribute('src', this.relatedElements[prev].getAttribute(this.options.sourceAttr));\n }\n }, {\n key: \"loadImage\",\n value: function loadImage(direction) {\n var _this4 = this;\n var slideDirection = direction;\n if (this.options.rtl) {\n direction = -direction;\n }\n this.relatedElements[this.currentImageIndex].dispatchEvent(new Event('change.' + this.eventNamespace));\n this.relatedElements[this.currentImageIndex].dispatchEvent(new Event((direction === 1 ? 'next' : 'prev') + '.' + this.eventNamespace));\n var newIndex = this.currentImageIndex + direction;\n if (this.isAnimating || (newIndex < 0 || newIndex >= this.relatedElements.length) && this.options.loop === false) {\n return false;\n }\n this.currentImageIndex = newIndex < 0 ? this.relatedElements.length - 1 : newIndex > this.relatedElements.length - 1 ? 0 : newIndex;\n this.domNodes.counter.querySelector('.sl-current').innerHTML = this.currentImageIndex + 1;\n if (this.options.animationSlide) {\n this.slide(this.options.animationSpeed / 1000, -100 * slideDirection - this.controlCoordinates.swipeDiff + 'px');\n }\n this.fadeOut(this.domNodes.image, this.options.fadeSpeed, function () {\n _this4.isAnimating = true;\n if (!_this4.isClosing) {\n setTimeout(function () {\n var element = _this4.relatedElements[_this4.currentImageIndex];\n if (!_this4.currentImage) return;\n _this4.currentImage.setAttribute('src', element.getAttribute(_this4.options.sourceAttr));\n if (_this4.loadedImages.indexOf(element.getAttribute(_this4.options.sourceAttr)) === -1) {\n _this4.show(_this4.domNodes.spinner);\n }\n if (_this4.domNodes.image.contains(_this4.domNodes.caption)) {\n _this4.domNodes.image.removeChild(_this4.domNodes.caption);\n }\n _this4.adjustImage(slideDirection);\n if (_this4.options.preloading) _this4.preload();\n }, 100);\n } else {\n _this4.isAnimating = false;\n }\n });\n }\n }, {\n key: \"adjustImage\",\n value: function adjustImage(direction) {\n var _this5 = this;\n if (!this.currentImage) {\n return false;\n }\n var tmpImage = new Image(),\n windowWidth = window.innerWidth * this.options.widthRatio,\n windowHeight = window.innerHeight * this.options.heightRatio;\n tmpImage.setAttribute('src', this.currentImage.getAttribute('src'));\n this.currentImage.dataset.scale = 1;\n this.currentImage.dataset.translateX = 0;\n this.currentImage.dataset.translateY = 0;\n this.zoomPanElement(0, 0, 1);\n tmpImage.addEventListener('error', function (event) {\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event('error.' + _this5.eventNamespace));\n _this5.isAnimating = false;\n _this5.isOpen = true;\n _this5.domNodes.spinner.style.display = 'none';\n var dirIsDefined = direction === 1 || direction === -1;\n if (_this5.initialImageIndex === _this5.currentImageIndex && dirIsDefined) {\n return _this5.close();\n }\n if (_this5.options.alertError) {\n alert(_this5.options.alertErrorMessage);\n }\n _this5.loadImage(dirIsDefined ? direction : 1);\n });\n tmpImage.addEventListener('load', function (event) {\n if (typeof direction !== 'undefined') {\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event('changed.' + _this5.eventNamespace));\n _this5.relatedElements[_this5.currentImageIndex].dispatchEvent(new Event((direction === 1 ? 'nextDone' : 'prevDone') + '.' + _this5.eventNamespace));\n }\n\n // history\n if (_this5.options.history) {\n _this5.updateURL();\n }\n if (_this5.loadedImages.indexOf(_this5.currentImage.getAttribute('src')) === -1) {\n _this5.loadedImages.push(_this5.currentImage.getAttribute('src'));\n }\n var imageWidth = event.target.width,\n imageHeight = event.target.height;\n if (_this5.options.scaleImageToRatio || imageWidth > windowWidth || imageHeight > windowHeight) {\n var ratio = imageWidth / imageHeight > windowWidth / windowHeight ? imageWidth / windowWidth : imageHeight / windowHeight;\n imageWidth /= ratio;\n imageHeight /= ratio;\n }\n _this5.domNodes.image.style.top = (window.innerHeight - imageHeight) / 2 + 'px';\n _this5.domNodes.image.style.left = (window.innerWidth - imageWidth - _this5.globalScrollbarWidth) / 2 + 'px';\n _this5.domNodes.image.style.width = imageWidth + 'px';\n _this5.domNodes.image.style.height = imageHeight + 'px';\n _this5.domNodes.spinner.style.display = 'none';\n if (_this5.options.focus) {\n _this5.forceFocus();\n }\n _this5.fadeIn(_this5.currentImage, _this5.options.fadeSpeed, function () {\n if (_this5.options.focus) {\n _this5.domNodes.wrapper.focus();\n }\n });\n _this5.isOpen = true;\n var captionContainer, captionText;\n if (typeof _this5.options.captionSelector === 'string') {\n captionContainer = _this5.options.captionSelector === 'self' ? _this5.relatedElements[_this5.currentImageIndex] : _this5.getCaptionElement(_this5.relatedElements[_this5.currentImageIndex]);\n } else if (typeof _this5.options.captionSelector === 'function') {\n captionContainer = _this5.options.captionSelector(_this5.relatedElements[_this5.currentImageIndex]);\n }\n if (_this5.options.captions && captionContainer) {\n if (_this5.options.captionType === 'data') {\n captionText = captionContainer.dataset[_this5.options.captionsData];\n } else if (_this5.options.captionType === 'text') {\n captionText = captionContainer.innerHTML;\n } else {\n captionText = captionContainer.getAttribute(_this5.options.captionsData);\n }\n }\n if (!_this5.options.loop) {\n if (_this5.currentImageIndex === 0) {\n _this5.hide(_this5.domNodes.navigation.querySelector('.sl-prev'));\n }\n if (_this5.currentImageIndex >= _this5.relatedElements.length - 1) {\n _this5.hide(_this5.domNodes.navigation.querySelector('.sl-next'));\n }\n if (_this5.currentImageIndex > 0) {\n _this5.show(_this5.domNodes.navigation.querySelector('.sl-prev'));\n }\n if (_this5.currentImageIndex < _this5.relatedElements.length - 1) {\n _this5.show(_this5.domNodes.navigation.querySelector('.sl-next'));\n }\n } else {\n if (_this5.relatedElements.length === 1) {\n _this5.hide(_this5.domNodes.navigation.querySelectorAll('.sl-prev, .sl-next'));\n } else {\n _this5.show(_this5.domNodes.navigation.querySelectorAll('.sl-prev, .sl-next'));\n }\n }\n if (direction === 1 || direction === -1) {\n if (_this5.options.animationSlide) {\n _this5.slide(0, 100 * direction + 'px');\n setTimeout(function () {\n _this5.slide(_this5.options.animationSpeed / 1000, 0 + 'px');\n }, 50);\n }\n _this5.fadeIn(_this5.domNodes.image, _this5.options.fadeSpeed, function () {\n _this5.isAnimating = false;\n _this5.setCaption(captionText, imageWidth);\n });\n } else {\n _this5.isAnimating = false;\n _this5.setCaption(captionText, imageWidth);\n }\n if (_this5.options.additionalHtml && !_this5.domNodes.additionalHtml) {\n _this5.domNodes.additionalHtml = document.createElement('div');\n _this5.domNodes.additionalHtml.classList.add('sl-additional-html');\n _this5.domNodes.additionalHtml.innerHTML = _this5.options.additionalHtml;\n _this5.domNodes.image.appendChild(_this5.domNodes.additionalHtml);\n }\n if (_this5.options.download) {\n _this5.domNodes.downloadLink.setAttribute('href', _this5.currentImage.getAttribute('src'));\n }\n });\n }\n }, {\n key: \"zoomPanElement\",\n value: function zoomPanElement(targetOffsetX, targetOffsetY, targetScale) {\n this.currentImage.style[this.transitionPrefix + 'transform'] = 'translate(' + targetOffsetX + ',' + targetOffsetY + ') scale(' + targetScale + ')';\n }\n }, {\n key: \"minMax\",\n value: function minMax(value, min, max) {\n return value < min ? min : value > max ? max : value;\n }\n }, {\n key: \"setZoomData\",\n value: function setZoomData(initialScale, targetOffsetX, targetOffsetY) {\n this.currentImage.dataset.scale = initialScale;\n this.currentImage.dataset.translateX = targetOffsetX;\n this.currentImage.dataset.translateY = targetOffsetY;\n }\n }, {\n key: \"hashchangeHandler\",\n value: function hashchangeHandler() {\n if (this.isOpen && this.hash === this.initialLocationHash) {\n this.hashReseted = true;\n this.close();\n }\n }\n }, {\n key: \"addEvents\",\n value: function addEvents() {\n var _this6 = this;\n // resize/responsive\n this.addEventListener(window, 'resize.' + this.eventNamespace, function (event) {\n //this.adjustImage.bind(this)\n if (_this6.isOpen) {\n _this6.adjustImage();\n }\n });\n this.addEventListener(this.domNodes.closeButton, ['click.' + this.eventNamespace, 'touchstart.' + this.eventNamespace], this.close.bind(this));\n if (this.options.history) {\n setTimeout(function () {\n _this6.addEventListener(window, 'hashchange.' + _this6.eventNamespace, function (event) {\n if (_this6.isOpen) {\n _this6.hashchangeHandler();\n }\n });\n }, 40);\n }\n this.addEventListener(this.domNodes.navigation.getElementsByTagName('button'), 'click.' + this.eventNamespace, function (event) {\n if (!event.currentTarget.tagName.match(/button/i)) {\n return true;\n }\n event.preventDefault();\n _this6.controlCoordinates.swipeDiff = 0;\n _this6.loadImage(event.currentTarget.classList.contains('sl-next') ? 1 : -1);\n });\n if (this.options.scrollZoom) {\n var scale = 1;\n this.addEventListener(this.domNodes.image, ['mousewheel', 'DOMMouseScroll'], function (event) {\n if (_this6.controlCoordinates.mousedown || _this6.isAnimating || _this6.isClosing || !_this6.isOpen) {\n return true;\n }\n if (_this6.controlCoordinates.containerHeight == 0) {\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n }\n // event.preventDefault();\n\n var delta = event.delta || event.wheelDelta;\n if (delta === undefined) {\n //we are on firefox\n delta = event.detail;\n }\n delta = Math.max(-1, Math.min(1, delta)); // cap the delta to [-1,1] for cross browser consistency\n\n // apply zoom\n scale += delta * _this6.options.scrollZoomFactor * scale;\n scale = Math.max(1, Math.min(_this6.options.maxZoom, scale));\n _this6.controlCoordinates.targetScale = scale;\n var scrollTopPos = document.documentElement.scrollTop || document.body.scrollTop;\n _this6.controlCoordinates.pinchOffsetX = event.pageX;\n _this6.controlCoordinates.pinchOffsetY = event.pageY - scrollTopPos || 0; // need to substract the scroll position\n\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.scaleDifference = _this6.controlCoordinates.targetScale - _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetX - (_this6.controlCoordinates.pinchOffsetX - _this6.controlCoordinates.containerOffsetX - _this6.controlCoordinates.containerWidth / 2 - _this6.controlCoordinates.initialOffsetX) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetY - (_this6.controlCoordinates.pinchOffsetY - _this6.controlCoordinates.containerOffsetY - _this6.controlCoordinates.containerHeight / 2 - _this6.controlCoordinates.initialOffsetY) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n if (_this6.controlCoordinates.targetScale > 1) {\n _this6.controlCoordinates.zoomed = true;\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n } else {\n if (_this6.controlCoordinates.initialScale === 1) {\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = null;\n _this6.controlCoordinates.capture = false;\n }\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n _this6.controlCoordinates.initialScale = _this6.controlCoordinates.targetScale;\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.setZoomData(_this6.controlCoordinates.targetScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n });\n }\n this.addEventListener(this.domNodes.image, ['touchstart.' + this.eventNamespace, 'mousedown.' + this.eventNamespace], function (event) {\n if (event.target.tagName === 'A' && event.type === 'touchstart') {\n return true;\n }\n if (event.type === 'mousedown') {\n event.preventDefault();\n _this6.controlCoordinates.initialPointerOffsetX = event.clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n _this6.controlCoordinates.capture = true;\n } else {\n _this6.controlCoordinates.touchCount = event.touches.length;\n _this6.controlCoordinates.initialPointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.touches[0].clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n if (_this6.controlCoordinates.touchCount === 1) /* Single touch */{\n if (!_this6.controlCoordinates.doubleTapped) {\n _this6.controlCoordinates.doubleTapped = true;\n setTimeout(function () {\n _this6.controlCoordinates.doubleTapped = false;\n }, 300);\n } else {\n _this6.currentImage.classList.add('sl-transition');\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.initialScale = _this6.options.doubleTapZoom;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n _this6.controlCoordinates.zoomed = true;\n } else {\n _this6.controlCoordinates.initialScale = 1;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n _this6.controlCoordinates.zoomed = false;\n }\n setTimeout(function () {\n if (_this6.currentImage) {\n _this6.currentImage.classList.remove('sl-transition');\n }\n }, 200);\n return false;\n }\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n } else if (_this6.controlCoordinates.touchCount === 2) /* Pinch */{\n _this6.controlCoordinates.initialPointerOffsetX2 = event.touches[1].clientX;\n _this6.controlCoordinates.initialPointerOffsetY2 = event.touches[1].clientY;\n _this6.controlCoordinates.initialOffsetX = parseFloat(_this6.currentImage.dataset.translateX);\n _this6.controlCoordinates.initialOffsetY = parseFloat(_this6.currentImage.dataset.translateY);\n _this6.controlCoordinates.pinchOffsetX = (_this6.controlCoordinates.initialPointerOffsetX + _this6.controlCoordinates.initialPointerOffsetX2) / 2;\n _this6.controlCoordinates.pinchOffsetY = (_this6.controlCoordinates.initialPointerOffsetY + _this6.controlCoordinates.initialPointerOffsetY2) / 2;\n _this6.controlCoordinates.initialPinchDistance = Math.sqrt((_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialPointerOffsetX2) * (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialPointerOffsetX2) + (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialPointerOffsetY2) * (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialPointerOffsetY2));\n }\n _this6.controlCoordinates.capture = true;\n }\n if (_this6.controlCoordinates.mousedown) return true;\n if (_this6.transitionCapable) {\n _this6.controlCoordinates.imageLeft = parseInt(_this6.domNodes.image.style.left, 10);\n }\n _this6.controlCoordinates.mousedown = true;\n _this6.controlCoordinates.swipeDiff = 0;\n _this6.controlCoordinates.swipeYDiff = 0;\n _this6.controlCoordinates.swipeStart = event.pageX || event.touches[0].pageX;\n _this6.controlCoordinates.swipeYStart = event.pageY || event.touches[0].pageY;\n return false;\n });\n this.addEventListener(this.domNodes.image, ['touchmove.' + this.eventNamespace, 'mousemove.' + this.eventNamespace, 'MSPointerMove'], function (event) {\n if (!_this6.controlCoordinates.mousedown) {\n return true;\n }\n if (event.type === 'touchmove') {\n if (_this6.controlCoordinates.capture === false) {\n return false;\n }\n _this6.controlCoordinates.pointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.pointerOffsetY = event.touches[0].clientY;\n _this6.controlCoordinates.touchCount = event.touches.length;\n _this6.controlCoordinates.touchmoveCount++;\n if (_this6.controlCoordinates.touchCount > 1) /* Pinch */{\n _this6.controlCoordinates.pointerOffsetX2 = event.touches[1].clientX;\n _this6.controlCoordinates.pointerOffsetY2 = event.touches[1].clientY;\n _this6.controlCoordinates.targetPinchDistance = Math.sqrt((_this6.controlCoordinates.pointerOffsetX - _this6.controlCoordinates.pointerOffsetX2) * (_this6.controlCoordinates.pointerOffsetX - _this6.controlCoordinates.pointerOffsetX2) + (_this6.controlCoordinates.pointerOffsetY - _this6.controlCoordinates.pointerOffsetY2) * (_this6.controlCoordinates.pointerOffsetY - _this6.controlCoordinates.pointerOffsetY2));\n if (_this6.controlCoordinates.initialPinchDistance === null) {\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n }\n if (Math.abs(_this6.controlCoordinates.initialPinchDistance - _this6.controlCoordinates.targetPinchDistance) >= 1) {\n /* Initialize helpers */\n _this6.controlCoordinates.targetScale = _this6.minMax(_this6.controlCoordinates.targetPinchDistance / _this6.controlCoordinates.initialPinchDistance * _this6.controlCoordinates.initialScale, 1, _this6.options.maxZoom);\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.scaleDifference = _this6.controlCoordinates.targetScale - _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetX - (_this6.controlCoordinates.pinchOffsetX - _this6.controlCoordinates.containerOffsetX - _this6.controlCoordinates.containerWidth / 2 - _this6.controlCoordinates.initialOffsetX) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.initialOffsetY - (_this6.controlCoordinates.pinchOffsetY - _this6.controlCoordinates.containerOffsetY - _this6.controlCoordinates.containerHeight / 2 - _this6.controlCoordinates.initialOffsetY) / (_this6.controlCoordinates.targetScale - _this6.controlCoordinates.scaleDifference) * _this6.controlCoordinates.scaleDifference, _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n if (_this6.controlCoordinates.targetScale > 1) {\n _this6.controlCoordinates.zoomed = true;\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = _this6.controlCoordinates.targetPinchDistance;\n _this6.controlCoordinates.initialScale = _this6.controlCoordinates.targetScale;\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n }\n } else {\n _this6.controlCoordinates.targetScale = _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetX - (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialOffsetX), _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetY - (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialOffsetY), _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n if (Math.abs(_this6.controlCoordinates.targetOffsetX) === Math.abs(_this6.controlCoordinates.limitOffsetX)) {\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialPointerOffsetX = _this6.controlCoordinates.pointerOffsetX;\n }\n if (Math.abs(_this6.controlCoordinates.targetOffsetY) === Math.abs(_this6.controlCoordinates.limitOffsetY)) {\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.controlCoordinates.initialPointerOffsetY = _this6.controlCoordinates.pointerOffsetY;\n }\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n }\n }\n\n /* Mouse Move implementation */\n if (event.type === 'mousemove' && _this6.controlCoordinates.mousedown) {\n if (event.type == 'touchmove') return true;\n event.preventDefault();\n if (_this6.controlCoordinates.capture === false) return false;\n _this6.controlCoordinates.pointerOffsetX = event.clientX;\n _this6.controlCoordinates.pointerOffsetY = event.clientY;\n _this6.controlCoordinates.targetScale = _this6.controlCoordinates.initialScale;\n _this6.controlCoordinates.limitOffsetX = (_this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerWidth) / 2;\n _this6.controlCoordinates.limitOffsetY = (_this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale - _this6.controlCoordinates.containerHeight) / 2;\n _this6.controlCoordinates.targetOffsetX = _this6.controlCoordinates.imgWidth * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerWidth ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetX - (_this6.controlCoordinates.initialPointerOffsetX - _this6.controlCoordinates.initialOffsetX), _this6.controlCoordinates.limitOffsetX * -1, _this6.controlCoordinates.limitOffsetX);\n _this6.controlCoordinates.targetOffsetY = _this6.controlCoordinates.imgHeight * _this6.controlCoordinates.targetScale <= _this6.controlCoordinates.containerHeight ? 0 : _this6.minMax(_this6.controlCoordinates.pointerOffsetY - (_this6.controlCoordinates.initialPointerOffsetY - _this6.controlCoordinates.initialOffsetY), _this6.controlCoordinates.limitOffsetY * -1, _this6.controlCoordinates.limitOffsetY);\n if (Math.abs(_this6.controlCoordinates.targetOffsetX) === Math.abs(_this6.controlCoordinates.limitOffsetX)) {\n _this6.controlCoordinates.initialOffsetX = _this6.controlCoordinates.targetOffsetX;\n _this6.controlCoordinates.initialPointerOffsetX = _this6.controlCoordinates.pointerOffsetX;\n }\n if (Math.abs(_this6.controlCoordinates.targetOffsetY) === Math.abs(_this6.controlCoordinates.limitOffsetY)) {\n _this6.controlCoordinates.initialOffsetY = _this6.controlCoordinates.targetOffsetY;\n _this6.controlCoordinates.initialPointerOffsetY = _this6.controlCoordinates.pointerOffsetY;\n }\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n _this6.zoomPanElement(_this6.controlCoordinates.targetOffsetX + \"px\", _this6.controlCoordinates.targetOffsetY + \"px\", _this6.controlCoordinates.targetScale);\n }\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.swipeEnd = event.pageX || event.touches[0].pageX;\n _this6.controlCoordinates.swipeYEnd = event.pageY || event.touches[0].pageY;\n _this6.controlCoordinates.swipeDiff = _this6.controlCoordinates.swipeStart - _this6.controlCoordinates.swipeEnd;\n _this6.controlCoordinates.swipeYDiff = _this6.controlCoordinates.swipeYStart - _this6.controlCoordinates.swipeYEnd;\n if (_this6.options.animationSlide) {\n _this6.slide(0, -_this6.controlCoordinates.swipeDiff + 'px');\n }\n }\n });\n this.addEventListener(this.domNodes.image, ['touchend.' + this.eventNamespace, 'mouseup.' + this.eventNamespace, 'touchcancel.' + this.eventNamespace, 'mouseleave.' + this.eventNamespace, 'pointerup', 'pointercancel', 'MSPointerUp', 'MSPointerCancel'], function (event) {\n if (_this6.isTouchDevice && event.type === 'touchend') {\n _this6.controlCoordinates.touchCount = event.touches.length;\n if (_this6.controlCoordinates.touchCount === 0) /* No touch */{\n /* Set attributes */\n if (_this6.currentImage) {\n _this6.setZoomData(_this6.controlCoordinates.initialScale, _this6.controlCoordinates.targetOffsetX, _this6.controlCoordinates.targetOffsetY);\n }\n if (_this6.controlCoordinates.initialScale === 1) {\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n _this6.controlCoordinates.initialPinchDistance = null;\n _this6.controlCoordinates.capture = false;\n } else if (_this6.controlCoordinates.touchCount === 1) /* Single touch */{\n _this6.controlCoordinates.initialPointerOffsetX = event.touches[0].clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.touches[0].clientY;\n } else if (_this6.controlCoordinates.touchCount > 1) /* Pinch */{\n _this6.controlCoordinates.initialPinchDistance = null;\n }\n }\n if (_this6.controlCoordinates.mousedown) {\n _this6.controlCoordinates.mousedown = false;\n var possibleDir = true;\n if (!_this6.options.loop) {\n if (_this6.currentImageIndex === 0 && _this6.controlCoordinates.swipeDiff < 0) {\n possibleDir = false;\n }\n if (_this6.currentImageIndex >= _this6.relatedElements.length - 1 && _this6.controlCoordinates.swipeDiff > 0) {\n possibleDir = false;\n }\n }\n if (Math.abs(_this6.controlCoordinates.swipeDiff) > _this6.options.swipeTolerance && possibleDir) {\n _this6.loadImage(_this6.controlCoordinates.swipeDiff > 0 ? 1 : -1);\n } else if (_this6.options.animationSlide) {\n _this6.slide(_this6.options.animationSpeed / 1000, 0 + 'px');\n }\n if (_this6.options.swipeClose && Math.abs(_this6.controlCoordinates.swipeYDiff) > 50 && Math.abs(_this6.controlCoordinates.swipeDiff) < _this6.options.swipeTolerance) {\n _this6.close();\n }\n }\n });\n this.addEventListener(this.domNodes.image, ['dblclick'], function (event) {\n if (_this6.isTouchDevice) return;\n _this6.controlCoordinates.initialPointerOffsetX = event.clientX;\n _this6.controlCoordinates.initialPointerOffsetY = event.clientY;\n _this6.controlCoordinates.containerHeight = _this6.getDimensions(_this6.domNodes.image).height;\n _this6.controlCoordinates.containerWidth = _this6.getDimensions(_this6.domNodes.image).width;\n _this6.controlCoordinates.imgHeight = _this6.getDimensions(_this6.currentImage).height;\n _this6.controlCoordinates.imgWidth = _this6.getDimensions(_this6.currentImage).width;\n _this6.controlCoordinates.containerOffsetX = _this6.domNodes.image.offsetLeft;\n _this6.controlCoordinates.containerOffsetY = _this6.domNodes.image.offsetTop;\n _this6.currentImage.classList.add('sl-transition');\n if (!_this6.controlCoordinates.zoomed) {\n _this6.controlCoordinates.initialScale = _this6.options.doubleTapZoom;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n if ((!_this6.domNodes.caption.style.opacity || _this6.domNodes.caption.style.opacity > 0) && _this6.domNodes.caption.style.display !== 'none') {\n _this6.fadeOut(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n _this6.controlCoordinates.zoomed = true;\n } else {\n _this6.controlCoordinates.initialScale = 1;\n _this6.setZoomData(_this6.controlCoordinates.initialScale, 0, 0);\n _this6.zoomPanElement(0 + \"px\", 0 + \"px\", _this6.controlCoordinates.initialScale);\n _this6.controlCoordinates.zoomed = false;\n if (_this6.domNodes.caption.style.display === 'none') {\n _this6.fadeIn(_this6.domNodes.caption, _this6.options.fadeSpeed);\n }\n }\n setTimeout(function () {\n if (_this6.currentImage) {\n _this6.currentImage.classList.remove('sl-transition');\n _this6.currentImage.style[_this6.transitionPrefix + 'transform-origin'] = null;\n }\n }, 200);\n _this6.controlCoordinates.capture = true;\n return false;\n });\n }\n }, {\n key: \"getDimensions\",\n value: function getDimensions(element) {\n var styles = window.getComputedStyle(element),\n height = element.offsetHeight,\n width = element.offsetWidth,\n borderTopWidth = parseFloat(styles.borderTopWidth),\n borderBottomWidth = parseFloat(styles.borderBottomWidth),\n paddingTop = parseFloat(styles.paddingTop),\n paddingBottom = parseFloat(styles.paddingBottom),\n borderLeftWidth = parseFloat(styles.borderLeftWidth),\n borderRightWidth = parseFloat(styles.borderRightWidth),\n paddingLeft = parseFloat(styles.paddingLeft),\n paddingRight = parseFloat(styles.paddingRight);\n return {\n height: height - borderBottomWidth - borderTopWidth - paddingTop - paddingBottom,\n width: width - borderLeftWidth - borderRightWidth - paddingLeft - paddingRight\n };\n }\n }, {\n key: \"updateHash\",\n value: function updateHash() {\n var newHash = 'pid=' + (this.currentImageIndex + 1),\n newURL = window.location.href.split('#')[0] + '#' + newHash;\n this.hashReseted = false;\n if (this.pushStateSupport) {\n window.history[this.historyHasChanges ? 'replaceState' : 'pushState']('', document.title, newURL);\n } else {\n // what is the browser target of this?\n if (this.historyHasChanges) {\n window.location.replace(newURL);\n } else {\n window.location.hash = newHash;\n }\n }\n if (!this.historyHasChanges) {\n this.urlChangedOnce = true;\n }\n this.historyHasChanges = true;\n }\n }, {\n key: \"resetHash\",\n value: function resetHash() {\n this.hashReseted = true;\n if (this.urlChangedOnce) {\n history.back();\n } else {\n if (this.pushStateSupport) {\n history.pushState('', document.title, window.location.pathname + window.location.search);\n } else {\n window.location.hash = '';\n }\n }\n //\n //in case an history operation is still pending\n clearTimeout(this.historyUpdateTimeout);\n }\n }, {\n key: \"updateURL\",\n value: function updateURL() {\n clearTimeout(this.historyUpdateTimeout);\n if (!this.historyHasChanges) {\n this.updateHash(); // first time\n } else {\n this.historyUpdateTimeout = setTimeout(this.updateHash.bind(this), 800);\n }\n }\n }, {\n key: \"setCaption\",\n value: function setCaption(captionText, imageWidth, allowHTML) {\n var _this7 = this;\n if (this.options.captions && captionText && captionText !== '' && typeof captionText !== \"undefined\") {\n var _ref;\n var property = ((_ref = allowHTML !== null && allowHTML !== void 0 ? allowHTML : this.options.captionHTML) !== null && _ref !== void 0 ? _ref : true) ? 'innerHTML' : 'innerText';\n this.hide(this.domNodes.caption);\n this.domNodes.caption.style.width = imageWidth + 'px';\n this.domNodes.caption[property] = captionText;\n this.domNodes.image.appendChild(this.domNodes.caption);\n setTimeout(function () {\n _this7.fadeIn(_this7.domNodes.caption, _this7.options.fadeSpeed);\n }, this.options.captionDelay);\n }\n }\n }, {\n key: \"slide\",\n value: function slide(speed, pos) {\n if (!this.transitionCapable) {\n return this.domNodes.image.style.left = pos;\n }\n this.domNodes.image.style[this.transitionPrefix + 'transform'] = 'translateX(' + pos + ')';\n this.domNodes.image.style[this.transitionPrefix + 'transition'] = this.transitionPrefix + 'transform ' + speed + 's linear';\n }\n }, {\n key: \"getRelated\",\n value: function getRelated(rel) {\n var elems;\n if (rel && rel !== false && rel !== 'nofollow') {\n elems = Array.from(this.elements).filter(function (element) {\n return element.getAttribute('rel') === rel;\n });\n } else {\n elems = this.elements;\n }\n return elems;\n }\n }, {\n key: \"openImage\",\n value: function openImage(element) {\n var _this8 = this;\n element.dispatchEvent(new Event('show.' + this.eventNamespace));\n this.globalScrollbarWidth = this.getScrollbarWidth();\n if (this.options.disableScroll) {\n this.toggleScrollbar('hide');\n this.globalScrollbarWidth = 0;\n }\n if (this.options.htmlClass && this.options.htmlClass !== '') {\n document.querySelector('html').classList.add(this.options.htmlClass);\n }\n document.body.appendChild(this.domNodes.wrapper);\n this.domNodes.wrapper.appendChild(this.domNodes.image);\n if (this.options.overlay) {\n document.body.appendChild(this.domNodes.overlay);\n }\n this.relatedElements = this.getRelated(element.rel);\n if (this.options.showCounter) {\n if (this.relatedElements.length == 1 && this.domNodes.wrapper.contains(this.domNodes.counter)) {\n this.domNodes.wrapper.removeChild(this.domNodes.counter);\n } else if (this.relatedElements.length > 1 && !this.domNodes.wrapper.contains(this.domNodes.counter)) {\n this.domNodes.wrapper.appendChild(this.domNodes.counter);\n }\n }\n if (this.options.download && this.domNodes.download) {\n this.domNodes.wrapper.appendChild(this.domNodes.download);\n }\n this.isAnimating = true;\n this.currentImageIndex = this.relatedElements.indexOf(element);\n var targetURL = element.getAttribute(this.options.sourceAttr);\n this.currentImage = document.createElement('img');\n this.currentImage.style.display = 'none';\n this.currentImage.setAttribute('src', targetURL);\n this.currentImage.dataset.scale = 1;\n this.currentImage.dataset.translateX = 0;\n this.currentImage.dataset.translateY = 0;\n if (this.loadedImages.indexOf(targetURL) === -1) {\n this.loadedImages.push(targetURL);\n }\n this.domNodes.image.innerHTML = '';\n this.domNodes.image.setAttribute('style', '');\n this.domNodes.image.appendChild(this.currentImage);\n this.fadeIn(this.domNodes.overlay, this.options.fadeSpeed);\n this.fadeIn([this.domNodes.counter, this.domNodes.navigation, this.domNodes.closeButton, this.domNodes.download], this.options.fadeSpeed);\n this.show(this.domNodes.spinner);\n this.domNodes.counter.querySelector('.sl-current').innerHTML = this.currentImageIndex + 1;\n this.domNodes.counter.querySelector('.sl-total').innerHTML = this.relatedElements.length;\n this.adjustImage();\n if (this.options.preloading) {\n this.preload();\n }\n setTimeout(function () {\n element.dispatchEvent(new Event('shown.' + _this8.eventNamespace));\n }, this.options.animationSpeed);\n }\n }, {\n key: \"forceFocus\",\n value: function forceFocus() {\n var _this9 = this;\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.addEventListener(document, 'focusin.' + this.eventNamespace, function (event) {\n if (document !== event.target && _this9.domNodes.wrapper !== event.target && !_this9.domNodes.wrapper.contains(event.target)) {\n _this9.domNodes.wrapper.focus();\n }\n });\n }\n\n // utility\n }, {\n key: \"addEventListener\",\n value: function addEventListener(elements, events, callback, opts) {\n elements = this.wrap(elements);\n events = this.wrap(events);\n var _iterator = _createForOfIteratorHelper(elements),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var element = _step.value;\n if (!element.namespaces) {\n element.namespaces = {};\n } // save the namespaces addEventListener the DOM element itself\n var _iterator2 = _createForOfIteratorHelper(events),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var event = _step2.value;\n var options = opts || false;\n var needsPassiveFix = ['touchstart', 'touchmove', 'mousewheel', 'DOMMouseScroll'].indexOf(event.split('.')[0]) >= 0;\n if (needsPassiveFix && this.isPassiveEventsSupported) {\n if (_typeof(options) === 'object') {\n options.passive = true;\n } else {\n options = {\n passive: true\n };\n }\n }\n element.namespaces[event] = callback;\n element.addEventListener(event.split('.')[0], callback, options);\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(elements, events) {\n elements = this.wrap(elements);\n events = this.wrap(events);\n var _iterator3 = _createForOfIteratorHelper(elements),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var element = _step3.value;\n var _iterator4 = _createForOfIteratorHelper(events),\n _step4;\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var event = _step4.value;\n if (element.namespaces && element.namespaces[event]) {\n element.removeEventListener(event.split('.')[0], element.namespaces[event]);\n delete element.namespaces[event];\n }\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n }\n }, {\n key: \"fadeOut\",\n value: function fadeOut(elements, duration, callback) {\n var _this10 = this;\n elements = this.wrap(elements);\n var _iterator5 = _createForOfIteratorHelper(elements),\n _step5;\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var element = _step5.value;\n element.style.opacity = parseFloat(element) || window.getComputedStyle(element).getPropertyValue(\"opacity\");\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n this.isFadeIn = false;\n var step = 16.66666 / (duration || this.options.fadeSpeed),\n fade = function fade() {\n var currentOpacity = parseFloat(elements[0].style.opacity);\n if ((currentOpacity -= step) < 0) {\n var _iterator6 = _createForOfIteratorHelper(elements),\n _step6;\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var element = _step6.value;\n element.style.display = \"none\";\n // element.style.opacity = '';\n element.style.opacity = 1;\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n callback && callback.call(_this10, elements);\n } else {\n var _iterator7 = _createForOfIteratorHelper(elements),\n _step7;\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var _element = _step7.value;\n _element.style.opacity = currentOpacity;\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n requestAnimationFrame(fade);\n }\n };\n fade();\n }\n }, {\n key: \"fadeIn\",\n value: function fadeIn(elements, duration, callback, display) {\n var _this11 = this;\n elements = this.wrap(elements);\n var _iterator8 = _createForOfIteratorHelper(elements),\n _step8;\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var element = _step8.value;\n if (element) {\n element.style.opacity = 0;\n element.style.display = display || \"block\";\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n this.isFadeIn = true;\n var opacityTarget = parseFloat(elements[0].dataset.opacityTarget || 1),\n step = 16.66666 * opacityTarget / (duration || this.options.fadeSpeed),\n fade = function fade() {\n var currentOpacity = parseFloat(elements[0].style.opacity);\n if (!((currentOpacity += step) > opacityTarget)) {\n var _iterator9 = _createForOfIteratorHelper(elements),\n _step9;\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var element = _step9.value;\n if (element) {\n element.style.opacity = currentOpacity;\n }\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n if (!_this11.isFadeIn) return;\n requestAnimationFrame(fade);\n } else {\n var _iterator10 = _createForOfIteratorHelper(elements),\n _step10;\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var _element2 = _step10.value;\n if (_element2) {\n _element2.style.opacity = opacityTarget;\n }\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n callback && callback.call(_this11, elements);\n }\n };\n fade();\n }\n }, {\n key: \"hide\",\n value: function hide(elements) {\n elements = this.wrap(elements);\n var _iterator11 = _createForOfIteratorHelper(elements),\n _step11;\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var element = _step11.value;\n if (element.style.display != 'none') {\n element.dataset.initialDisplay = element.style.display;\n }\n element.style.display = 'none';\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n }\n }, {\n key: \"show\",\n value: function show(elements, display) {\n elements = this.wrap(elements);\n var _iterator12 = _createForOfIteratorHelper(elements),\n _step12;\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var element = _step12.value;\n element.style.display = element.dataset.initialDisplay || display || 'block';\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n }\n }, {\n key: \"wrap\",\n value: function wrap(input) {\n return typeof input[Symbol.iterator] === 'function' && typeof input !== 'string' ? input : [input];\n }\n }, {\n key: \"on\",\n value: function on(events, callback) {\n events = this.wrap(events);\n var _iterator13 = _createForOfIteratorHelper(this.elements),\n _step13;\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var element = _step13.value;\n if (!element.fullyNamespacedEvents) {\n element.fullyNamespacedEvents = {};\n }\n var _iterator14 = _createForOfIteratorHelper(events),\n _step14;\n try {\n for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n var event = _step14.value;\n element.fullyNamespacedEvents[event] = callback;\n element.addEventListener(event, callback);\n }\n } catch (err) {\n _iterator14.e(err);\n } finally {\n _iterator14.f();\n }\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n return this;\n }\n }, {\n key: \"off\",\n value: function off(events) {\n events = this.wrap(events);\n var _iterator15 = _createForOfIteratorHelper(this.elements),\n _step15;\n try {\n for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n var element = _step15.value;\n var _iterator16 = _createForOfIteratorHelper(events),\n _step16;\n try {\n for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n var event = _step16.value;\n if (typeof element.fullyNamespacedEvents !== 'undefined' && event in element.fullyNamespacedEvents) {\n element.removeEventListener(event, element.fullyNamespacedEvents[event]);\n }\n }\n } catch (err) {\n _iterator16.e(err);\n } finally {\n _iterator16.f();\n }\n }\n } catch (err) {\n _iterator15.e(err);\n } finally {\n _iterator15.f();\n }\n return this;\n }\n\n // api\n }, {\n key: \"open\",\n value: function open(elem) {\n var position = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n elem = elem || this.elements[0];\n if (typeof jQuery !== \"undefined\" && elem instanceof jQuery) {\n elem = elem.get(0);\n }\n if (position > 0) {\n elem = this.elements[position];\n }\n this.initialImageIndex = this.elements.indexOf(elem);\n if (this.initialImageIndex > -1) {\n this.openImage(elem);\n }\n }\n }, {\n key: \"openPosition\",\n value: function openPosition(position) {\n var elem = this.elements[position];\n this.open(elem, position);\n }\n }, {\n key: \"next\",\n value: function next() {\n this.loadImage(1);\n }\n }, {\n key: \"prev\",\n value: function prev() {\n this.loadImage(-1);\n }\n\n // get some useful data\n }, {\n key: \"getLighboxData\",\n value: function getLighboxData() {\n return {\n currentImageIndex: this.currentImageIndex,\n currentImage: this.currentImage,\n globalScrollbarWidth: this.globalScrollbarWidth\n };\n }\n\n //close is exposed anyways..\n }, {\n key: \"destroy\",\n value: function destroy() {\n //remove all custom event listeners from elements\n this.off(['close.' + this.eventNamespace, 'closed.' + this.eventNamespace, 'nextImageLoaded.' + this.eventNamespace, 'prevImageLoaded.' + this.eventNamespace, 'change.' + this.eventNamespace, 'nextDone.' + this.eventNamespace, 'prevDone.' + this.eventNamespace, 'error.' + this.eventNamespace, 'changed.' + this.eventNamespace, 'next.' + this.eventNamespace, 'prev.' + this.eventNamespace, 'show.' + this.eventNamespace, 'shown.' + this.eventNamespace]);\n this.removeEventListener(this.elements, 'click.' + this.eventNamespace);\n this.removeEventListener(document, 'focusin.' + this.eventNamespace);\n this.removeEventListener(document.body, 'contextmenu.' + this.eventNamespace);\n this.removeEventListener(document.body, 'keyup.' + this.eventNamespace);\n this.removeEventListener(this.domNodes.navigation.getElementsByTagName('button'), 'click.' + this.eventNamespace);\n this.removeEventListener(this.domNodes.closeButton, 'click.' + this.eventNamespace);\n this.removeEventListener(window, 'resize.' + this.eventNamespace);\n this.removeEventListener(window, 'hashchange.' + this.eventNamespace);\n this.close();\n if (this.isOpen) {\n document.body.removeChild(this.domNodes.wrapper);\n document.body.removeChild(this.domNodes.overlay);\n }\n this.elements = null;\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n if (!this.initialSelector) {\n throw 'refreshing only works when you initialize using a selector!';\n }\n var options = this.options,\n selector = this.initialSelector;\n this.destroy();\n this.constructor(selector, options);\n return this;\n }\n }]);\n return SimpleLightbox;\n}();\nvar _default = SimpleLightbox;\nexports[\"default\"] = _default;\nglobal.SimpleLightbox = SimpleLightbox;","import SimpleLightbox from \"simplelightbox\";\n\nconst lightboxSettings = {\n sourceAttr: 'src',\n captions: false,\n disableRightClick: true,\n overlayOpacity: 1,\n widthRatio: 0.95,\n heightRatio: 0.95,\n animationSpeed: 100,\n animationSlide: false,\n fadeSpeed: 200\n}\n\nconst selectors = [\n 'img.kg-image',\n '.kg-image img',\n 'img.kg-gallery-image',\n '.kg-gallery-image img',\n 'img.lightbox-image',\n '.lightbox-image img'\n];\n\nexport default function lightbox() {\n let lightboxContainer = document.querySelector('#post');\n if (!lightboxContainer) { return; }\n\n new SimpleLightbox(\n lightboxContainer.querySelectorAll(selectors.join(', ')),\n lightboxSettings\n );\n}\n","// JavaScript files are compiled and minified during the build process to the assets/built folder. See available scripts in the package.json file.\n\n// Import JS\nimport macyFeed from \"./macy\";\nimport infiniteScroll from \"./infiniteScroll\";\nimport lightbox from \"./lightbox\";\nimport mobileMenu from \"./mobileMenu\";\n\nlet macy = macyFeed();\ninfiniteScroll(macy);\nlightbox();\nmobileMenu();\n","export default function mobileMenu() {\n const openToggle = document.getElementById('mobile-menu-open');\n const closeToggle = document.getElementById('mobile-menu-close');\n const mobileMenu = document.getElementById('mobile-menu');\n\n const open = () => {\n mobileMenu.classList.remove('hidden');\n document.body.style.overflow = 'hidden';\n }\n\n const close = () => {\n mobileMenu.classList.add('hidden');\n document.body.style.overflow = 'auto';\n }\n\n openToggle.addEventListener('click', () => {\n open();\n });\n\n closeToggle.addEventListener('click', () => {\n close();\n });\n\n mobileMenu.addEventListener('click', () => {\n close();\n });\n\n mobileMenu.querySelector('#mobile-menu-main').addEventListener('click', (e) => {\n e.stopPropagation();\n })\n\n window.addEventListener('resize', function() {\n close();\n });\n}\n"],"names":["exports","t","n","e","clearTimeout","setTimeout","length","r","o","push","arguments","window","Promise","A","recalculate","options","responsiveOptions","keys","docWidth","i","s","a","parseInt","breakAt","O","useContainerForBreakpoints","container","clientWidth","innerWidth","columns","b","margin","x","y","Object","mobileFirst","c","parseFloat","replace","u","l","rows","v","style","height","p","M","offsetHeight","isNaN","forEach","position","top","left","cols","dataset","macyComplete","tmpRows","f","lastcol","C","h","this","nodeName","byCss","selectors","split","RegExp","test","prototype","document","querySelectorAll","getElementsByClassName","substring","getElementsByTagName","getElementById","m","running","events","add","run","shift","Array","isArray","clear","d","instance","data","on","emit","g","naturalHeight","naturalWidth","width","E","complete","addEventListener","then","constants","EVENT_IMAGE_LOAD","img","catch","EVENT_IMAGE_ERROR","w","all","EVENT_IMAGE_COMPLETE","I","EVENT_RESIZE","queue","N","debug","console","error","T","resizer","L","useOwnImageLoader","waitForImages","EVENT_INITIALIZED","_","toString","call","getComputedStyle","getPropertyValue","V","children","from","filter","offsetParent","trueOrder","EVENT_RECALCULATED","R","assign","hasOwnProperty","k","useImageLoader","onInit","cancelLegacy","createElement","querySelector","getAttribute","id","Math","floor","random","apply","removeAttribute","Element","q","init","warn","recalculateOnImageLoad","runOnImageLoad","remove","removeEventListener","reInit","link","_typeof","obj","Symbol","iterator","constructor","_createForOfIteratorHelper","allowArrayLike","it","_unsupportedIterableToArray","F","done","value","_e","TypeError","err","normalCompletion","didErr","step","next","_e2","_toConsumableArray","arr","_arrayLikeToArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","minLen","slice","name","len","arr2","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","key","_defineProperty","SimpleLightbox","elements","_this","Constructor","_classCallCheck","sourceAttr","overlay","overlayOpacity","spinner","nav","navText","captions","captionDelay","captionSelector","captionType","captionsData","captionPosition","captionClass","captionHTML","close","closeText","swipeClose","showCounter","fileExt","animationSlide","animationSpeed","preloading","enableKeyboard","loop","rel","docClose","swipeTolerance","className","widthRatio","heightRatio","scaleImageToRatio","disableRightClick","disableScroll","alertError","alertErrorMessage","additionalHtml","history","throttleInterval","doubleTapZoom","maxZoom","htmlClass","rtl","fixedClass","fadeSpeed","uniqueImages","focus","scrollZoom","scrollZoomFactor","download","navigator","platform","swipeDiff","swipeYDiff","swipeStart","swipeEnd","swipeYStart","swipeYEnd","mousedown","imageLeft","zoomed","containerHeight","containerWidth","containerOffsetX","containerOffsetY","imgHeight","imgWidth","capture","initialOffsetX","initialOffsetY","initialPointerOffsetX","initialPointerOffsetY","initialPointerOffsetX2","initialPointerOffsetY2","initialScale","initialPinchDistance","pointerOffsetX","pointerOffsetY","pointerOffsetX2","pointerOffsetY2","targetOffsetX","targetOffsetY","targetScale","pinchOffsetX","pinchOffsetY","limitOffsetX","limitOffsetY","scaleDifference","targetPinchDistance","touchCount","doubleTapped","touchmoveCount","defaultOptions","isPassiveEventsSupported","checkPassiveEventsSupport","initialSelector","relatedElements","transitionPrefix","calculateTransitionPrefix","transitionCapable","initialLocationHash","hash","getRelated","imgArr","element","src","indexOf","createDomNodes","domNodes","wrapper","appendChild","closeButton","navigation","eventNamespace","event","isValidLink","currentTarget","preventDefault","isAnimating","initialImageIndex","openImage","isOpen","body","parentElement","classList","contains","throttle","controlCoordinates","currentImage","setAttribute","loadImage","addEvents","protoProps","staticProps","supportsPassive","opts","get","elem","startsWith","selector","trimStart","sibling","nextElementSibling","matches","_selector","tagName","parentNode","str","concat","classes","trim","childIndex","previousElementSibling","generateQuerySelector","opacityTarget","innerHTML","counter","downloadLink","textContent","caption","_this$domNodes$captio","captionClasses","image","func","limit","inThrottle","documentElement","scrollbarWidth","scrollDiv","offsetWidth","removeChild","type","fixedElements","fullWindowWidth","documentElementRect","getBoundingClientRect","right","abs","isAppleDevice","paddingRight","getScrollbarWidth","originalPaddingRight","actualPadding","calculatedPadding","padding","_this2","isClosing","currentImageIndex","dispatchEvent","Event","historyHasChanges","hashReseted","resetHash","fadeOut","toggleScrollbar","minMax","location","_this3","index","prev","nextImage","Image","prevImage","loadedImages","direction","_this4","slideDirection","newIndex","slide","show","adjustImage","preload","_this5","tmpImage","windowWidth","windowHeight","innerHeight","scale","translateX","translateY","zoomPanElement","display","dirIsDefined","alert","updateURL","captionContainer","captionText","imageWidth","imageHeight","ratio","globalScrollbarWidth","forceFocus","fadeIn","getCaptionElement","hide","setCaption","min","max","_this6","bind","hashchangeHandler","match","getDimensions","offsetLeft","offsetTop","delta","wheelDelta","undefined","detail","scrollTopPos","scrollTop","pageX","pageY","opacity","setZoomData","clientX","clientY","touches","sqrt","isTouchDevice","possibleDir","styles","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","paddingLeft","newHash","newURL","href","pushStateSupport","title","urlChangedOnce","back","pushState","pathname","search","historyUpdateTimeout","updateHash","allowHTML","_this7","_ref","property","speed","pos","_this8","targetURL","_this9","callback","wrap","_step","_iterator","namespaces","_step2","_iterator2","passive","_step3","_iterator3","_step4","_iterator4","duration","_step5","_this10","_iterator5","isFadeIn","fade","currentOpacity","_step6","_iterator6","_step7","_iterator7","requestAnimationFrame","_step8","_this11","_iterator8","_step10","_iterator10","_element2","_step9","_iterator9","_step11","_iterator11","initialDisplay","_step12","_iterator12","input","_step13","_iterator13","fullyNamespacedEvents","_step14","_iterator14","_step15","_iterator15","_step16","_iterator16","jQuery","open","off","destroy","_default","commonjsHelpers","lightboxSettings","macy","observer","IntersectionObserver","entries","entry","isIntersecting","async","url","res","fetch","ok","Error","nextPageHtml","text","parsed","DOMParser","parseFromString","posts","post","nextLink","getNextPage","append","promises","map","resolve","reject","onload","onerror","onAllPostImagesLoaded","observe","disconnect","log","rootMargin","infiniteScroll","Macy","macyFeed","lightboxContainer","join","lightbox","openToggle","closeToggle","mobileMenu","overflow","stopPropagation"],"mappings":"uSAAmFA,QAAqE,WAAwB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Ac,SAC1C4b,GAEL,IAAIhY,EACFgY,EAAkBhgB,iBAAiBN,EAAUugB,KAAK,OAClDtC,EAEJ,CCrBAuC,GCVe,WACb,MAAMC,EAAapgB,SAASK,eAAe,oBACrCggB,EAAcrgB,SAASK,eAAe,qBACtCigB,EAAatgB,SAASK,eAAe,eAOrC+I,EAAQA,KACZkX,EAAWrQ,UAAUxP,IAAI,UACzBT,SAAS+P,KAAKzR,MAAMiiB,SAAW,MAAM,EAGvCH,EAAW1e,iBAAiB,SAAS,KATnC4e,EAAWrQ,UAAU9K,OAAO,UAC5BnF,SAAS+P,KAAKzR,MAAMiiB,SAAW,QASzB,IAGRF,EAAY3e,iBAAiB,SAAS,KACpC0H,GAAO,IAGTkX,EAAW5e,iBAAiB,SAAS,KACnC0H,GAAO,IAGTkX,EAAWjc,cAAc,qBAAqB3C,iBAAiB,SAAU5F,IACvEA,EAAE0kB,iBAAiB,IAGrBlkB,OAAOoF,iBAAiB,UAAU,WAChC0H,GACF,GACF,CDvBAkX","x_google_ignoreList":[0,3]} \ No newline at end of file diff --git a/assets/js/lightbox.js b/assets/js/lightbox.js index 4c87967..635db37 100644 --- a/assets/js/lightbox.js +++ b/assets/js/lightbox.js @@ -6,7 +6,10 @@ const lightboxSettings = { disableRightClick: true, overlayOpacity: 1, widthRatio: 0.95, - heightRatio: 0.95 + heightRatio: 0.95, + animationSpeed: 100, + animationSlide: false, + fadeSpeed: 200 } const selectors = [