diff --git a/dist/js/explorer-1.min.js b/dist/js/explorer-1.min.js
index 412cf702..19200373 100644
--- a/dist/js/explorer-1.min.js
+++ b/dist/js/explorer-1.min.js
@@ -1 +1 @@
-!function(){const e=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),t=(...i)=>{let s=!1;"boolean"==typeof i[0]&&(s=i.shift());let n=i[0];if(!n||"object"!=typeof n)throw new Error("extendee must be an object");const o=i.slice(1),a=o.length;for(let i=0;i(e=parseFloat(e)||0,Math.round((e+Number.EPSILON)*t)/t),s=function(e){return!!(e&&"object"==typeof e&&e instanceof Element&&e!==document.body)&&!e.__Panzoom&&(function(e){const t=getComputedStyle(e)["overflow-y"],i=getComputedStyle(e)["overflow-x"],s=("scroll"===t||"auto"===t)&&Math.abs(e.scrollHeight-e.clientHeight)>1,n=("scroll"===i||"auto"===i)&&Math.abs(e.scrollWidth-e.clientWidth)>1;return s||n}(e)?e:s(e.parentNode))},n="undefined"!=typeof window&&window.ResizeObserver||class{observe(e){if(this.observables.some((t=>t.el===e)))return;const t={el:e,size:{height:e.clientHeight,width:e.clientWidth}};this.observables.push(t)}unobserve(e){this.observables=this.observables.filter((t=>t.el!==e))}disconnect(){this.observables=[]}check(){const e=this.observables.filter((e=>{const t=e.el.clientHeight,i=e.el.clientWidth;if(e.size.height!==t||e.size.width!==i)return e.size.height=t,e.size.width=i,!0})).map((e=>e.el));e.length>0&&this.callback(e),window.requestAnimationFrame(this.boundCheck)}constructor(e){this.observables=[],this.boundCheck=this.check.bind(this),this.boundCheck(),this.callback=e}};class o{constructor(e){this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY}}const a=(e,t)=>t?Math.sqrt((t.clientX-e.clientX)**2+(t.clientY-e.clientY)**2):0,r=(e,t)=>t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e;class l{stop(){this._element.removeEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.removeEventListener("touchstart",this._touchStart,{passive:!1}),this._element.removeEventListener("touchmove",this._move,{passive:!1}),this._element.removeEventListener("touchend",this._touchEnd),this._element.removeEventListener("touchcancel",this._touchEnd),window.removeEventListener("mousemove",this._move),window.removeEventListener("mouseup",this._pointerEnd)}_triggerPointerStart(e,t){return!!this._startCallback(e,t)&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}constructor(e,{start:t=(()=>!0),move:i=(()=>{}),end:s=(()=>{})}={}){this._element=e,this.startPointers=[],this.currentPointers=[],this._pointerStart=e=>{if(e.buttons>0&&0!==e.button)return;const t=new o(e);this.currentPointers.some((e=>e.id===t.id))||this._triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this._move),window.addEventListener("mouseup",this._pointerEnd))},this._touchStart=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerStart(new o(t),e)},this._move=e=>{const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches).map((e=>new o(e))):[new o(e)];for(const e of i){const t=this.currentPointers.findIndex((t=>t.id===e.id));t<0||(this.currentPointers[t]=e)}this._moveCallback(t,this.currentPointers.slice(),e)},this._triggerPointerEnd=(e,t)=>{const i=this.currentPointers.findIndex((t=>t.id===e.id));return!(i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this._endCallback(e,t),0))},this._pointerEnd=e=>{e.buttons>0&&0!==e.button||this._triggerPointerEnd(new o(e),e)&&(window.removeEventListener("mousemove",this._move,{passive:!1}),window.removeEventListener("mouseup",this._pointerEnd,{passive:!1}))},this._touchEnd=e=>{for(const t of Array.from(e.changedTouches||[]))this._triggerPointerEnd(new o(t),e)},this._startCallback=t,this._moveCallback=i,this._endCallback=s,this._element.addEventListener("mousedown",this._pointerStart,{passive:!1}),this._element.addEventListener("touchstart",this._touchStart,{passive:!1}),this._element.addEventListener("touchmove",this._move,{passive:!1}),this._element.addEventListener("touchend",this._touchEnd),this._element.addEventListener("touchcancel",this._touchEnd)}}class c{option(e,t,...i){let s=(n=e=String(e),o=this.options,n.split(".").reduce((function(e,t){return e&&e[t]}),o));var n,o;return"function"==typeof s&&(s=s.call(this,this,...i)),void 0===s?t:s}localize(e,t=[]){return(e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,i,s)=>{let n="";s?n=this.option(`${i[0]+i.toLowerCase().substring(1)}.l10n.${s}`):i&&(n=this.option(`l10n.${i}`)),n||(n=e);for(let e=0;e {{ERROR}} {{ERROR}}.01){const e=this.dragPosition.midPoint||t,i=this.$content.getClientRects()[0];this.zoomTo(n,{friction:.64,x:e.clientX-i.left,y:e.clientY-i.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new n((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:i},this.dragPosition={...this.dragPosition,x:e,y:t,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){!0!==e&&this.trigger("beforeUpdate");const t=this.$container,s=this.$content,n=this.$viewport,o=s instanceof HTMLImageElement,a=this.option("zoom"),r=this.option("resizeParent",a);let l=this.option("width"),c=this.option("height"),d=l||(h=s,Math.max(parseFloat(h.naturalWidth||0),parseFloat(h.width&&h.width.baseVal&&h.width.baseVal.value||0),parseFloat(h.offsetWidth||0),parseFloat(h.scrollWidth||0)));var h;let u=c||(p=s,Math.max(parseFloat(p.naturalHeight||0),parseFloat(p.height&&p.height.baseVal&&p.height.baseVal.value||0),parseFloat(p.offsetHeight||0),parseFloat(p.scrollHeight||0)));var p;Object.assign(s.style,{width:l?`${l}px`:"",height:c?`${c}px`:"",maxWidth:"",maxHeight:""}),r&&Object.assign(n.style,{width:"",height:""});const f=this.option("ratio");d=i(d*f),u=i(u*f),l=d,c=u;const g=s.getBoundingClientRect(),m=n.getBoundingClientRect(),v=n==t?m:t.getBoundingClientRect();let b=Math.max(n.offsetWidth,i(m.width)),y=Math.max(n.offsetHeight,i(m.height)),x=window.getComputedStyle(n);if(b-=parseFloat(x.paddingLeft)+parseFloat(x.paddingRight),y-=parseFloat(x.paddingTop)+parseFloat(x.paddingBottom),this.viewport.width=b,this.viewport.height=y,a){if(Math.abs(d-g.width)>.1||Math.abs(u-g.height)>.1){const e=((e,t,i,s)=>{const n=Math.min(i/e||0,s/t);return{width:e*n||0,height:t*n||0}})(d,u,Math.min(d,g.width),Math.min(u,g.height));l=i(e.width),c=i(e.height)}Object.assign(s.style,{width:`${l}px`,height:`${c}px`,transform:""})}if(r&&(Object.assign(n.style,{width:`${l}px`,height:`${c}px`}),this.viewport={...this.viewport,width:l,height:c}),o&&a&&"function"!=typeof this.options.maxScale){const e=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:e}}this.content={...this.content,origWidth:d,origHeight:u,fitWidth:l,fitHeight:c,width:l,height:c,scale:1,isZoomable:a},this.container={width:v.width,height:v.height},!0!==e&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),i=this.option("baseScale"),s=this.content.scale>i+.5*(t-i)?i:t;this.zoomTo(s,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:s=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const n=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===t&&(t=this.content.width*n*.5),null===s&&(s=this.content.height*n*.5);const{deltaX:o,deltaY:a}=this.getZoomDelta(e,t,s);t=this.content.x-o,s=this.content.y-a,this.panTo({x:t,y:s,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,i=0){const s=this.content.fitWidth*this.content.scale,n=this.content.fitHeight*this.content.scale,o=t>0&&s?t/s:0,a=i>0&&n?i/n:0;return{deltaX:(this.content.fitWidth*e-s)*o,deltaY:(this.content.fitHeight*e-n)*a}}panTo({x:e=this.content.x,y:t=this.content.y,scale:i,friction:s=this.option("friction"),ignoreBounds:n=!1}={}){if(i=i||this.content.scale||1,!n){const{boundX:s,boundY:n}=this.getBounds(i);s&&(e=Math.max(Math.min(e,s.to),s.from)),n&&(t=Math.max(Math.min(t,n.to),n.from))}this.friction=s,this.transform={...this.transform,x:e,y:t,scale:i},s?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(e){let t=this.boundX,s=this.boundY;if(void 0!==t&&void 0!==s)return{boundX:t,boundY:s};t={from:0,to:0},s={from:0,to:0},e=e||this.transform.scale;const n=this.content.fitWidth*e,o=this.content.fitHeight*e,a=this.viewport.width,r=this.viewport.height;if(nt.to),i&&(o=this.content.y{const i=e.code;let s;"Enter"===i||"NumpadEnter"===i?s=t:"ArrowRight"===i?s=t.nextSibling:"ArrowLeft"===i&&(s=t.previousSibling),s&&s.click()})),this.$list.appendChild(t)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((e=>{e.classList.remove("is-selected")}));const e=this.$list.childNodes[this.carousel.page];e&&e.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}constructor(e){this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}},Sync:f},m={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class v extends c{init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(v.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=t(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,s=[];this.slides.forEach(((i,n)=>{const o=i.$el,a=i.isDom||!e?this.getSlideMetrics(o):e;i.index=n,i.width=a,i.left=t,e=a,t+=a,s.push(n)}));let n=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),o=getComputedStyle(this.$track);n-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),this.contentWidth=t,this.viewportWidth=n;const a=[],r=this.option("slidesPerPage");if(Number.isInteger(r)&&t>n)for(let e=0;e{e.$el&&(e.$iframe&&this.resizeIframe(e),e.ratio&&this.setAspectRatio(e))}))}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,i){"ready"===e.state&&this.playVideo(i)}playVideo(e){if("html5video"===e.type&&e.video.autoplay)try{const t=e.$el.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(e){}if("video"!==e.type||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if("done"===e.state&&e.$iframe&&e.$iframe.contentWindow){let t;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(t="youtube"==e.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(t&&e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"));"youtube"===e.vendor&&(t={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(e){}return}let s=!1;"vimeo"==i.vendor?s={method:"pause",value:"true"}:"youtube"===i.vendor&&(s={event:"command",func:"pauseVideo"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),"*"),clearTimeout(i.poller)}onRemoveSlide(e,t,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const s=i.$content;"inline"===i.type&&s&&(s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const n=s&&s.$placeHolder;n&&(n.parentNode.insertBefore(s,n),n.remove(),s.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of document.getElementsByClassName("fancybox__iframe"))t.contentWindow===e.source&&(t.isReady=1)}else"https://www.youtube-nocookie.com"===e.origin&&"onReady"===t.event&&(document.getElementById(t.id).isReady=1)}catch(e){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}constructor(e){this.fancybox=e;for(const e of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[e]=this[e].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}}$.defaults=E;class T{onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&this.setContent(e)}))}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach((e=>{e.$image&&(e.state="destroy"),e.Panzoom&&e.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(e,t,i){i.$image&&(i.$el.classList.remove(e.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&"image"!==e.type)return;if(e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(t=>{t.stopImmediatePropagation(),this.onImageStatusChange(e)})),i.addEventListener("error",(()=>{this.onImageStatusChange(e)})),i.src=e.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),e.srcset&&i.setAttribute("srcset",e.srcset),e.sizes&&i.setAttribute("sizes",e.sizes),e.$image=i;const s=this.fancybox.option("Image.wrap");if(s){const n=document.createElement("div");n.classList.add("string"==typeof s?s:"fancybox__image-wrap"),n.appendChild(i),t.appendChild(n),e.$wrap=n}else t.appendChild(i);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),i.complete||i.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&"loading"===e.state&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",(t=>this.onWheel(e,t)),{passive:!1}),e.$content.addEventListener("click",(t=>this.onClick(e,t)),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new h(e.$el,t(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",e)})),e.Panzoom.on("endAnimation",(()=>{"zoomIn"===e.state&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)})),e.Panzoom.on("afterUpdate",(()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)})))}revealContent(e){null===this.fancybox.Carousel.prevPage&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),i=t.width,s=t.height,n=e.$content.getBoundingClientRect(),o=n.width,a=n.height,r=n.top-t.top,l=n.left-t.left;let c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/s-o/a)>.1),{top:r,left:l,scale:o&&i?i/o:1,opacity:c}}canZoom(e){const t=this.fancybox,i=t.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(e.Panzoom&&!e.Panzoom.content.width)return!1;if(!t.option("Image.zoom")||"contain"!==t.option("Image.fit"))return!1;const s=e.$thumb;if(!s||"loading"===e.state)return!1;i.classList.add("fancybox__no-click");const n=s.getBoundingClientRect();let o;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const e=document.elementFromPoint(n.left+1,n.top+1)===s,t=document.elementFromPoint(n.right-1,n.bottom-1)===s;o=e&&t}else o=document.elementFromPoint(n.left+.5*n.width,n.top+.5*n.height)===s;return i.classList.remove("fancybox__no-click"),o}zoomIn(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom,{top:s,left:n,scale:o,opacity:a}=this.getZoomInfo(t);e.trigger("reveal",t),i.panTo({x:-1*n,y:-1*s,scale:o,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",!0===a&&i.on("afterTransform",(e=>{"zoomIn"!==t.state&&"zoomOut"!==t.state||(e.$content.style.opacity=Math.min(1,1-(1-e.content.scale)/(1-o)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom;if(!i)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let s=this.fancybox.option("Image.zoomFriction");const n=e=>{const{top:n,left:o,scale:a,opacity:r}=this.getZoomInfo(t);e||r||(s*=.82),i.panTo({x:-1*o,y:-1*n,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener("scroll",n),i.once("endAnimation",(()=>{window.removeEventListener("scroll",n),e.destroy()})),n()}handleCursor(e){if("image"!==e.type||!e.$el)return;const t=e.Panzoom,i=this.fancybox.option("Image.click",!1,e),s=this.fancybox.option("Image.touch"),n=e.$el.classList,o=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");n.remove(a),n.remove(o),t&&"toggleZoom"===i?t&&1===t.content.scale&&t.option("maxScale")-t.content.scale>.01?n.add(o):t.content.scale>1&&!s&&n.add(a):"close"===i&&n.add(a)}onWheel(e,t){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",t))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===e.state&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if("ready"!==this.fancybox.state)return;const i=e.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},n=this.fancybox.option("Image.click"),o=this.fancybox.option("Image.doubleClick");o?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(o)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(n)}),300):s(n)}onPageChange(e,t){const i=e.getSlide();t.slides.forEach((e=>{e.Panzoom&&"done"===e.state&&e.index!==i.index&&e.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}constructor(e){this.fancybox=e;for(const e of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[e]=this[e].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}}T.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class P{onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const i=null===t.prevPage,s=e.getSlide(),n=new URL(document.URL).hash;let o=!1;if(s.slug)o="#"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,n=e.option("slug")||i&&i.fancybox;n&&n.length&&"true"!==n&&(o="#"+n+(t.slides.length>1?"-"+(s.index+1):""))}i&&(this.origHash=n!==o?n:""),o&&n!==o&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+o),i&&(this.hasCreatedHistory=!0)}catch(e){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(e){}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=P.Fancybox;if(!e||e.getInstance()||!1===e.defaults.Hash)return;const{hash:t,slug:i,index:s}=P.getParsedURL();if(!i)return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const o=document.querySelectorAll(`[data-fancybox="${i}"]`);o.length&&(null===s&&1===o.length?n=o[0]:s&&(n=o[s-1]),n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=P.getParsedURL(),i=P.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(e){const i=s.Carousel;if(e===s.option("slug"))return i.slideTo(t-1);for(let t of i.slides)if(t.slug&&t.slug===e)return i.slideTo(t.index);const n=s.getSlide(),o=n.$trigger&&n.$trigger.dataset;if(o&&o.fancybox===e)return i.slideTo(t-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}P.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",P.onHashChange,!1),P.startFromUrl()}P.Fancybox=e,b&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}))}static destroy(){window.removeEventListener("hashchange",P.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),i=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:i}}constructor(e){this.fancybox=e;for(const e of["onChange","onClosing"])this[e]=this[e].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}}const L={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(e){L.pageXOffset=window.pageXOffset,L.pageYOffset=window.pageYOffset,e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class k{isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}}const M={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:' / ',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'',click:function(e){e.preventDefault(),L.element()?L.deactivate():L.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'',click:function(e){e.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'',click:function(e){e.preventDefault();const t=this.fancybox.getSlide().Panzoom;t&&t.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'',click:function(e){e.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'',click:function(e){e.stopPropagation();const t=this.fancybox.plugins.Thumbs;t&&t.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'',attr:{"data-fancybox-close":"",tabindex:0}}}};class z{onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if("image"===t.type){e=!0;break}if(!e)return void(this.state="disabled")}for(const t of this.fancybox.option("Toolbar.display"))if("close"===(e(t)?t.id:t)){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new k(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!L.element())))try{L.activate(e.$container)}catch(e){}}onFsChange(){window.scrollTo(L.pageXOffset,L.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?"done"===e.getSlide().state&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const i=this.Slideshow;t.index===e.getSlide().index&&(this.update(),i&&i.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&"done"!==e.state||this.Slideshow.deactivate())}onKeydown(e,t,i){" "===t&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;"div"===e.type?t=document.createElement("div"):(t=document.createElement("link"===e.type?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const i in e.attr)t.setAttribute(i,e.attr[i]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),"prev"===e.id&&t.setAttribute("data-fancybox-prev",""),"next"===e.id&&t.setAttribute("data-fancybox-next","");const i=t.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const i=this.fancybox.option("Toolbar.items"),s=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],n=this.fancybox.plugins.Thumbs;for(const o of this.fancybox.option("Toolbar.display")){let a,r;if(e(o)?(a=o.id,r=t({},i[a],o)):(a=o,r=i[a]),["counter","next","prev","slideshow"].includes(a)&&this.fancybox.items.length<2)continue;if("fullscreen"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===a&&(!n||"disabled"===n.state))continue;if(!r)continue;let l=r.position||"right",c=s.find((e=>e.position===l));c&&c.items.push(r)}const o=document.createElement("div");o.classList.add("fancybox__toolbar");for(const e of s)if(e.items.length){const t=document.createElement("div");t.classList.add("fancybox__toolbar__items"),t.classList.add(`fancybox__toolbar__items--${e.position}`);for(const i of e.items)t.appendChild(this.createElement(i));o.appendChild(t)}this.fancybox.$carousel.parentNode.insertBefore(o,this.fancybox.$carousel),this.$container=o}update(){const e=this.fancybox.getSlide(),t=e.index,i=this.fancybox.items.length,s=e.downloadSrc||("image"!==e.type||e.error?null:e.src);for(const e of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex"),e.setAttribute("href",s),e.setAttribute("download",s),e.setAttribute("target","_blank")):(e.setAttribute("disabled",""),e.setAttribute("tabindex",-1),e.removeAttribute("href"),e.removeAttribute("download"));const n=e.Panzoom,o=n&&n.option("maxScale")>n.option("baseScale");for(const e of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))o?e.removeAttribute("disabled"):e.setAttribute("disabled","");for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))t.innerHTML=e.index+1;for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))e.innerHTML=i;if(!this.fancybox.option("infinite")){for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===t?e.setAttribute("disabled",""):e.removeAttribute("disabled");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===i-1?e.setAttribute("disabled",""):e.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const e of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[e]=this[e].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(e,t)=>this.onRefresh(t),"Image.afterUpdate":(e,t)=>this.onRefresh(t)}}}z.defaults=M;const A={ScrollLock:class{onReady(){const e=window.visualViewport;e&&(this.viewport=e,this.startY=0,e.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const e=this.fancybox,t=this.viewport,i=t.scale||1,s=e.$container;if(!s)return;let n="",o="",a="";i-1>.1&&(n=t.width*i+"px",o=t.height*i+"px",a=`translate3d(${t.offsetLeft}px, ${t.offsetTop}px, 0) scale(${1/i})`),s.style.width=n,s.style.height=o,s.style.transform=a}onTouchstart(e){this.startY=e.touches?e.touches[0].screenY:e.screenY}onTouchmove(e){const t=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!e.cancelable)return;if(e.touches.length>1||1!==i)return;const n=s(e.composedPath()[0]);if(!n)return void e.preventDefault();const o=window.getComputedStyle(n),a=parseInt(o.getPropertyValue("height"),10),r=e.touches?e.touches[0].screenY:e.screenY,l=t<=r&&0===n.scrollTop,c=t>=r&&n.scrollHeight-n.scrollTop===a;(l||c)&&e.preventDefault()}onWheel(e){s(e.composedPath()[0])||e.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const e=this.viewport;e&&(e.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}constructor(e){this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(const e of["onReady","onResize","onTouchstart","onTouchmove"])this[e]=this[e].bind(this)}},Thumbs:C,Html:$,Toolbar:z,Image:T,Hash:P},O={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},_=new Map;let I=0;class N extends c{option(e,...t){const i=this.getSlide();let s=i?i[e]:void 0;return void 0!==s?("function"==typeof s&&(s=s.call(this,this,...t)),s):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((e=>this.$container.setAttribute(...e))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++I,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const i of e){const e=i.$trigger;if(e){const t=e.dataset||{};i.src=t.src||e.getAttribute("href")||i.src,i.type=t.type||i.type,!i.src&&e instanceof HTMLImageElement&&(i.src=e.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let e=i.$trigger&&i.$trigger.origTarget;e&&(s=e instanceof HTMLImageElement?e:e.querySelector("img:not([aria-hidden])")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=s||null;let n=i.thumb;!n&&s&&(n=s.currentSrc||s.src,!n&&s.dataset&&(n=s.dataset.lazySrc||s.dataset.src)),n||"image"!==i.type||(n=i.src),i.thumb=n||null,i.caption=i.caption||"",t.push(i)}this.items=t}initCarousel(){return this.Carousel=new v(this.$carousel,t(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let i=t.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,t)),"string"==typeof i&&i.length){const e=document.createElement("div"),s=`fancybox__caption_${this.id}_${t.index}`;e.className="fancybox__caption",e.innerHTML=i,e.setAttribute("id",s),t.$caption=t.$el.appendChild(e),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",s)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void N.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void N.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void N.prev();if(!(t.matches(x)||document.activeElement.blur(),t.closest(".fancybox__content")||getSelection().toString().length||!1===this.trigger("click",e)))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||1===e.content.scale}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):"y"===e.lockAxis&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),i=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(N.getInstance().id!==this.id)return;document.body.classList.remove("is-using-mouse");const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const s=e.composedPath()[0],n=document.activeElement&&document.activeElement.classList,o=n&&n.contains("carousel__button");if("Escape"!==t&&!o&&(e.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)))return;if(!1===this.trigger("keydown",t,e))return;const a=i[t];"function"==typeof this[a]&&this[a]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=null===e.page?e.option("initialPage"):e.page,i=e.pages||[];return i.length&&i[t]?i[t].slides[0]:null}focus(e){if(N.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,i=this.getSlide(),s="done"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;e&&e.preventDefault(),N.ignoreFocusChange=!0;const n=Array.from(t.querySelectorAll(x));let o,a=[];for(let e of n){const t=e.offsetParent,i=s&&s.contains(e),n=!this.Carousel.$viewport.contains(e);t&&(i||n)?(a.push(e),void 0!==e.dataset.origTabindex&&(e.tabIndex=e.dataset.origTabindex,e.removeAttribute("data-orig-tabindex")),(e.hasAttribute("autoFocus")||!o&&i&&!e.classList.contains("carousel__button"))&&(o=e)):(e.dataset.origTabindex=void 0===e.dataset.origTabindex?e.getAttribute("tabindex"):e.dataset.origTabindex,e.tabIndex=-1)}e?a.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?w(a[a.length-1]):w(t):this.option("autoFocus")&&o?w(o):a.indexOf(document.activeElement)<0&&w(t),this.lastFocus=document.activeElement,N.ignoreFocusChange=!1}hideScrollbar(){if(!b)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let i=document.getElementById(t);i||e>0&&(i=document.createElement("style"),i.id=t,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,i={}){let s;const n=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(s=document.createElement("div"),s.appendChild(t)):s=t;else{const e=document.createRange().createContextualFragment(t);s=document.createElement("div"),s.appendChild(e)}if(e.filter&&!e.error&&(s=s.querySelector(e.filter)),s instanceof Element)return e._className=`has-${i.suffix||e.type||"unknown"}`,n.classList.add(e._className),s.classList.add("fancybox__content"),"none"!==s.style.display&&"none"!==getComputedStyle(s).getPropertyValue("display")||(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&s.setAttribute("id",e.id),e.$content=s,n.prepend(s),this.manageCloseButton(e),"loading"!==e.state&&this.revealContent(e),s;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=void 0===e.closeButton?this.option("closeButton"):e.closeButton;if(!t||"top"===t&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(e=>this.close(e))),"inside"===t?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||"loading"===e.state||null!==this.Carousel.prevPage||e.index!==this.options.startIndex||(t=void 0===e.showClass?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,(()=>{this.done(e)}))):this.done(e)}animateCSS(e,t,i){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void("function"==typeof i&&i());const s=function(n){n.currentTarget===this&&(e.removeEventListener("animationend",s),i&&i(),e.classList.remove(t))};e.addEventListener("animationend",s),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"=s[e]&&i=s[e]&&(d=e);o.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(n.indexOf(i)>=0)c=n.indexOf(i);else{const e=Math.min(o.slidesPerGroupSkip,d);c=e+Math.floor((d-e)/o.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),d===a)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const h=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:c,realIndex:h,previousIndex:a,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),r!==h&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,i=t.params,s=K(e).closest(`.${i.slideClass}`)[0];let n,o=!1;if(s)for(let e=0;e=i&&(a=e)}if(o.initialized&&a!==h){if(!o.allowSlideNext&&v=i.length-s){l=-i.length+t+s,l+=s;e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((r?-e.translate:e.translate)-c)}e.allowSlidePrev=n,e.allowSlideNext=o,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:i}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const e=this,t=H(),{params:i,support:s}=e;e.onTouchStart=fe.bind(e),e.onTouchMove=ge.bind(e),e.onTouchEnd=me.bind(e),i.cssMode&&(e.onScroll=ye.bind(e)),e.onClick=be.bind(e),s.touch&&!xe&&(t.addEventListener("touchstart",we),xe=!0),Ce(e,"on")},detachEvents:function(){Ce(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:i,loopedSlides:s=0,params:n,$el:o}=e,a=n.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const r=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!r||e.currentBreakpoint===r)return;const l=(r in a?a[r]:void 0)||e.originalParams,c=Se(e,n),d=Se(e,l),h=n.enabled;c&&!d?(o.removeClass(`${n.containerModifierClass}grid ${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&d&&(o.addClass(`${n.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===n.grid.fill)&&o.addClass(`${n.containerModifierClass}grid-column`),e.emitContainerClasses());const u=l.direction&&l.direction!==n.direction,p=n.loop&&(l.slidesPerView!==n.slidesPerView||u);u&&i&&e.changeDirection(),se(e.params,l);const f=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!f?e.disable():!h&&f&&e.enable(),e.currentBreakpoint=r,e.emit("_beforeBreakpoint",l),p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t,i){if(void 0===t&&(t="window"),!e||"container"===t&&!i)return;let s=!1;const n=G(),o="window"===t?n.innerHeight:i.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:o*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e.01){const e=this.dragPosition.midPoint||t,i=this.$content.getClientRects()[0];this.zoomTo(n,{friction:.64,x:e.clientX-i.left,y:e.clientY-i.top})}}});this.pointerTracker=e}initObserver(){this.resizeObserver||(this.resizeObserver=new n((()=>{this.updateTimer||(this.updateTimer=setTimeout((()=>{const e=this.$container.getBoundingClientRect();e.width&&e.height?((Math.abs(e.width-this.container.width)>1||Math.abs(e.height-this.container.height)>1)&&(this.isAnimating()&&this.endAnimation(!0),this.updateMetrics(),this.panTo({x:this.content.x,y:this.content.y,scale:this.option("baseScale"),friction:0})),this.updateTimer=null):this.updateTimer=null}),this.updateRate))})),this.resizeObserver.observe(this.$container))}resetDragPosition(){this.lockAxis=null,this.friction=this.option("friction"),this.velocity={x:0,y:0,scale:0};const{x:e,y:t,scale:i}=this.content;this.dragStart={rect:this.$content.getBoundingClientRect(),x:e,y:t,scale:i},this.dragPosition={...this.dragPosition,x:e,y:t,scale:i},this.dragOffset={x:0,y:0,scale:1,time:0}}updateMetrics(e){!0!==e&&this.trigger("beforeUpdate");const t=this.$container,s=this.$content,n=this.$viewport,o=s instanceof HTMLImageElement,a=this.option("zoom"),r=this.option("resizeParent",a);let l=this.option("width"),c=this.option("height"),d=l||(h=s,Math.max(parseFloat(h.naturalWidth||0),parseFloat(h.width&&h.width.baseVal&&h.width.baseVal.value||0),parseFloat(h.offsetWidth||0),parseFloat(h.scrollWidth||0)));var h;let u=c||(p=s,Math.max(parseFloat(p.naturalHeight||0),parseFloat(p.height&&p.height.baseVal&&p.height.baseVal.value||0),parseFloat(p.offsetHeight||0),parseFloat(p.scrollHeight||0)));var p;Object.assign(s.style,{width:l?`${l}px`:"",height:c?`${c}px`:"",maxWidth:"",maxHeight:""}),r&&Object.assign(n.style,{width:"",height:""});const f=this.option("ratio");d=i(d*f),u=i(u*f),l=d,c=u;const g=s.getBoundingClientRect(),m=n.getBoundingClientRect(),v=n==t?m:t.getBoundingClientRect();let b=Math.max(n.offsetWidth,i(m.width)),y=Math.max(n.offsetHeight,i(m.height)),x=window.getComputedStyle(n);if(b-=parseFloat(x.paddingLeft)+parseFloat(x.paddingRight),y-=parseFloat(x.paddingTop)+parseFloat(x.paddingBottom),this.viewport.width=b,this.viewport.height=y,a){if(Math.abs(d-g.width)>.1||Math.abs(u-g.height)>.1){const e=((e,t,i,s)=>{const n=Math.min(i/e||0,s/t);return{width:e*n||0,height:t*n||0}})(d,u,Math.min(d,g.width),Math.min(u,g.height));l=i(e.width),c=i(e.height)}Object.assign(s.style,{width:`${l}px`,height:`${c}px`,transform:""})}if(r&&(Object.assign(n.style,{width:`${l}px`,height:`${c}px`}),this.viewport={...this.viewport,width:l,height:c}),o&&a&&"function"!=typeof this.options.maxScale){const e=this.option("maxScale");this.options.maxScale=function(){return this.content.origWidth>0&&this.content.fitWidth>0?this.content.origWidth/this.content.fitWidth:e}}this.content={...this.content,origWidth:d,origHeight:u,fitWidth:l,fitHeight:c,width:l,height:c,scale:1,isZoomable:a},this.container={width:v.width,height:v.height},!0!==e&&this.trigger("afterUpdate")}zoomIn(e){this.zoomTo(this.content.scale+(e||this.option("step")))}zoomOut(e){this.zoomTo(this.content.scale-(e||this.option("step")))}toggleZoom(e={}){const t=this.option("maxScale"),i=this.option("baseScale"),s=this.content.scale>i+.5*(t-i)?i:t;this.zoomTo(s,e)}zoomTo(e=this.option("baseScale"),{x:t=null,y:s=null}={}){e=Math.max(Math.min(e,this.option("maxScale")),this.option("minScale"));const n=i(this.content.scale/(this.content.width/this.content.fitWidth),1e7);null===t&&(t=this.content.width*n*.5),null===s&&(s=this.content.height*n*.5);const{deltaX:o,deltaY:a}=this.getZoomDelta(e,t,s);t=this.content.x-o,s=this.content.y-a,this.panTo({x:t,y:s,scale:e,friction:this.option("zoomFriction")})}getZoomDelta(e,t=0,i=0){const s=this.content.fitWidth*this.content.scale,n=this.content.fitHeight*this.content.scale,o=t>0&&s?t/s:0,a=i>0&&n?i/n:0;return{deltaX:(this.content.fitWidth*e-s)*o,deltaY:(this.content.fitHeight*e-n)*a}}panTo({x:e=this.content.x,y:t=this.content.y,scale:i,friction:s=this.option("friction"),ignoreBounds:n=!1}={}){if(i=i||this.content.scale||1,!n){const{boundX:s,boundY:n}=this.getBounds(i);s&&(e=Math.max(Math.min(e,s.to),s.from)),n&&(t=Math.max(Math.min(t,n.to),n.from))}this.friction=s,this.transform={...this.transform,x:e,y:t,scale:i},s?(this.state="panning",this.velocity={x:(1/this.friction-1)*(e-this.content.x),y:(1/this.friction-1)*(t-this.content.y),scale:(1/this.friction-1)*(i-this.content.scale)},this.startAnimation()):this.endAnimation()}startAnimation(){this.rAF?cancelAnimationFrame(this.rAF):this.trigger("startAnimation"),this.rAF=requestAnimationFrame((()=>this.animate()))}animate(){if(this.setEdgeForce(),this.setDragForce(),this.velocity.x*=this.friction,this.velocity.y*=this.friction,this.velocity.scale*=this.friction,this.content.x+=this.velocity.x,this.content.y+=this.velocity.y,this.content.scale+=this.velocity.scale,this.isAnimating())this.setTransform();else if("pointerdown"!==this.state)return void this.endAnimation();this.rAF=requestAnimationFrame((()=>this.animate()))}getBounds(e){let t=this.boundX,s=this.boundY;if(void 0!==t&&void 0!==s)return{boundX:t,boundY:s};t={from:0,to:0},s={from:0,to:0},e=e||this.transform.scale;const n=this.content.fitWidth*e,o=this.content.fitHeight*e,a=this.viewport.width,r=this.viewport.height;if(nt.to),i&&(o=this.content.y{const i=e.code;let s;"Enter"===i||"NumpadEnter"===i?s=t:"ArrowRight"===i?s=t.nextSibling:"ArrowLeft"===i&&(s=t.previousSibling),s&&s.click()})),this.$list.appendChild(t)}this.setActiveDot()}}setActiveDot(){if(!this.$list)return;this.$list.childNodes.forEach((e=>{e.classList.remove("is-selected")}));const e=this.$list.childNodes[this.carousel.page];e&&e.classList.add("is-selected")}onChange(){this.setActiveDot()}onRefresh(){this.rebuildDots()}attach(){this.carousel.on(this.events)}detach(){this.removeList(),this.carousel.off(this.events),this.carousel=null}constructor(e){this.carousel=e,this.$list=null,this.events={change:this.onChange.bind(this),refresh:this.onRefresh.bind(this)}}},Sync:f},m={slides:[],preload:0,slidesPerPage:"auto",initialPage:null,initialSlide:null,friction:.92,center:!0,infinite:!0,fill:!0,dragFree:!1,prefix:"",classNames:{viewport:"carousel__viewport",track:"carousel__track",slide:"carousel__slide",slideSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};class v extends c{init(){this.pages=[],this.page=this.pageIndex=null,this.prevPage=this.prevPageIndex=null,this.attachPlugins(v.Plugins),this.trigger("init"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.$track&&this.pages.length&&(this.$track.style.transform=`translate3d(${-1*this.pages[this.page].left}px, 0px, 0) scale(1)`),this.manageSlideVisiblity(),this.initPanzoom(),this.state="ready",this.trigger("ready")}initLayout(){const e=this.option("prefix"),t=this.option("classNames");this.$viewport=this.option("viewport")||this.$container.querySelector(`.${e}${t.viewport}`),this.$viewport||(this.$viewport=document.createElement("div"),this.$viewport.classList.add(...(e+t.viewport).split(" ")),this.$viewport.append(...this.$container.childNodes),this.$container.appendChild(this.$viewport)),this.$track=this.option("track")||this.$container.querySelector(`.${e}${t.track}`),this.$track||(this.$track=document.createElement("div"),this.$track.classList.add(...(e+t.track).split(" ")),this.$track.append(...this.$viewport.childNodes),this.$viewport.appendChild(this.$track))}initSlides(){this.slides=[],this.$viewport.querySelectorAll(`.${this.option("prefix")}${this.option("classNames.slide")}`).forEach((e=>{const t={$el:e,isDom:!0};this.slides.push(t),this.trigger("createSlide",t,this.slides.length)})),Array.isArray(this.options.slides)&&(this.slides=t(!0,[...this.slides],this.options.slides))}updateMetrics(){let e,t=0,s=[];this.slides.forEach(((i,n)=>{const o=i.$el,a=i.isDom||!e?this.getSlideMetrics(o):e;i.index=n,i.width=a,i.left=t,e=a,t+=a,s.push(n)}));let n=Math.max(this.$track.offsetWidth,i(this.$track.getBoundingClientRect().width)),o=getComputedStyle(this.$track);n-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight),this.contentWidth=t,this.viewportWidth=n;const a=[],r=this.option("slidesPerPage");if(Number.isInteger(r)&&t>n)for(let e=0;e{e.$el&&(e.$iframe&&this.resizeIframe(e),e.ratio&&this.setAspectRatio(e))}))}setContent(e){if(e&&!e.isDom){switch(e.type){case"html":this.fancybox.setContent(e,e.src);break;case"html5video":this.fancybox.setContent(e,this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi,e.src).replace("{{format}}",e.format||e.html5video&&e.html5video.format||"").replace("{{poster}}",e.poster||e.thumb||""));break;case"inline":case"clone":this.loadInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"video":case"map":e.preload=!1;case"iframe":this.loadIframeContent(e)}e.ratio&&this.setAspectRatio(e)}}onSelectSlide(e,t,i){"ready"===e.state&&this.playVideo(i)}playVideo(e){if("html5video"===e.type&&e.video.autoplay)try{const t=e.$el.querySelector("video");if(t){const e=t.play();void 0!==e&&e.then((()=>{})).catch((e=>{t.muted=!0,t.play()}))}}catch(e){}if("video"!==e.type||!e.$iframe||!e.$iframe.contentWindow)return;const t=()=>{if("done"===e.state&&e.$iframe&&e.$iframe.contentWindow){let t;if(e.$iframe.isReady)return e.video&&e.video.autoplay&&(t="youtube"==e.vendor?{event:"command",func:"playVideo"}:{method:"play",value:"true"}),void(t&&e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"));"youtube"===e.vendor&&(t={event:"listening",id:e.$iframe.getAttribute("id")},e.$iframe.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(t,250)};t()}onUnselectSlide(e,t,i){if("html5video"===i.type){try{i.$el.querySelector("video").pause()}catch(e){}return}let s=!1;"vimeo"==i.vendor?s={method:"pause",value:"true"}:"youtube"===i.vendor&&(s={event:"command",func:"pauseVideo"}),s&&i.$iframe&&i.$iframe.contentWindow&&i.$iframe.contentWindow.postMessage(JSON.stringify(s),"*"),clearTimeout(i.poller)}onRemoveSlide(e,t,i){i.xhr&&(i.xhr.abort(),i.xhr=null),i.$iframe&&(i.$iframe.onload=i.$iframe.onerror=null,i.$iframe.src="//about:blank",i.$iframe=null);const s=i.$content;"inline"===i.type&&s&&(s.classList.remove("fancybox__content"),"none"!==s.style.display&&(s.style.display="none")),i.$closeButton&&(i.$closeButton.remove(),i.$closeButton=null);const n=s&&s.$placeHolder;n&&(n.parentNode.insertBefore(s,n),n.remove(),s.$placeHolder=null)}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of document.getElementsByClassName("fancybox__iframe"))t.contentWindow===e.source&&(t.isReady=1)}else"https://www.youtube-nocookie.com"===e.origin&&"onReady"===t.event&&(document.getElementById(t.id).isReady=1)}catch(e){}}attach(){this.fancybox.on(this.events),window.addEventListener("message",this.onMessage,!1)}detach(){this.fancybox.off(this.events),window.removeEventListener("message",this.onMessage,!1)}constructor(e){this.fancybox=e;for(const e of["onInit","onReady","onCreateSlide","onRemoveSlide","onSelectSlide","onUnselectSlide","onRefresh","onMessage"])this[e]=this[e].bind(this);this.events={init:this.onInit,ready:this.onReady,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide,"Carousel.selectSlide":this.onSelectSlide,"Carousel.unselectSlide":this.onUnselectSlide,"Carousel.refresh":this.onRefresh}}}$.defaults=E;class T{onReady(){this.fancybox.Carousel.slides.forEach((e=>{e.$el&&this.setContent(e)}))}onDone(e,t){this.handleCursor(t)}onClosing(e){clearTimeout(this.clickTimer),this.clickTimer=null,e.Carousel.slides.forEach((e=>{e.$image&&(e.state="destroy"),e.Panzoom&&e.Panzoom.detachEvents()})),"closing"===this.fancybox.state&&this.canZoom(e.getSlide())&&this.zoomOut()}onCreateSlide(e,t,i){"ready"===this.fancybox.state&&this.setContent(i)}onRemoveSlide(e,t,i){i.$image&&(i.$el.classList.remove(e.option("Image.canZoomInClass")),i.$image.remove(),i.$image=null),i.Panzoom&&(i.Panzoom.destroy(),i.Panzoom=null),i.$el&&i.$el.dataset&&delete i.$el.dataset.imageFit}setContent(e){if(e.isDom||e.html||e.type&&"image"!==e.type)return;if(e.$image)return;e.type="image",e.state="loading";const t=document.createElement("div");t.style.visibility="hidden";const i=document.createElement("img");i.addEventListener("load",(t=>{t.stopImmediatePropagation(),this.onImageStatusChange(e)})),i.addEventListener("error",(()=>{this.onImageStatusChange(e)})),i.src=e.src,i.alt="",i.draggable=!1,i.classList.add("fancybox__image"),e.srcset&&i.setAttribute("srcset",e.srcset),e.sizes&&i.setAttribute("sizes",e.sizes),e.$image=i;const s=this.fancybox.option("Image.wrap");if(s){const n=document.createElement("div");n.classList.add("string"==typeof s?s:"fancybox__image-wrap"),n.appendChild(i),t.appendChild(n),e.$wrap=n}else t.appendChild(i);e.$el.dataset.imageFit=this.fancybox.option("Image.fit"),this.fancybox.setContent(e,t),i.complete||i.error?this.onImageStatusChange(e):this.fancybox.showLoading(e)}onImageStatusChange(e){const t=e.$image;t&&"loading"===e.state&&(t.complete&&t.naturalWidth&&t.naturalHeight?(this.fancybox.hideLoading(e),"contain"===this.fancybox.option("Image.fit")&&this.initSlidePanzoom(e),e.$el.addEventListener("wheel",(t=>this.onWheel(e,t)),{passive:!1}),e.$content.addEventListener("click",(t=>this.onClick(e,t)),{passive:!1}),this.revealContent(e)):this.fancybox.setError(e,"{{IMAGE_ERROR}}"))}initSlidePanzoom(e){e.Panzoom||(e.Panzoom=new h(e.$el,t(!0,this.fancybox.option("Image.Panzoom",{}),{viewport:e.$wrap,content:e.$image,width:e._width,height:e._height,wrapInner:!1,textSelection:!0,touch:this.fancybox.option("Image.touch"),panOnlyZoomed:!0,click:!1,wheel:!1})),e.Panzoom.on("startAnimation",(()=>{this.fancybox.trigger("Image.startAnimation",e)})),e.Panzoom.on("endAnimation",(()=>{"zoomIn"===e.state&&this.fancybox.done(e),this.handleCursor(e),this.fancybox.trigger("Image.endAnimation",e)})),e.Panzoom.on("afterUpdate",(()=>{this.handleCursor(e),this.fancybox.trigger("Image.afterUpdate",e)})))}revealContent(e){null===this.fancybox.Carousel.prevPage&&e.index===this.fancybox.options.startIndex&&this.canZoom(e)?this.zoomIn():this.fancybox.revealContent(e)}getZoomInfo(e){const t=e.$thumb.getBoundingClientRect(),i=t.width,s=t.height,n=e.$content.getBoundingClientRect(),o=n.width,a=n.height,r=n.top-t.top,l=n.left-t.left;let c=this.fancybox.option("Image.zoomOpacity");return"auto"===c&&(c=Math.abs(i/s-o/a)>.1),{top:r,left:l,scale:o&&i?i/o:1,opacity:c}}canZoom(e){const t=this.fancybox,i=t.$container;if(window.visualViewport&&1!==window.visualViewport.scale)return!1;if(e.Panzoom&&!e.Panzoom.content.width)return!1;if(!t.option("Image.zoom")||"contain"!==t.option("Image.fit"))return!1;const s=e.$thumb;if(!s||"loading"===e.state)return!1;i.classList.add("fancybox__no-click");const n=s.getBoundingClientRect();let o;if(this.fancybox.option("Image.ignoreCoveredThumbnail")){const e=document.elementFromPoint(n.left+1,n.top+1)===s,t=document.elementFromPoint(n.right-1,n.bottom-1)===s;o=e&&t}else o=document.elementFromPoint(n.left+.5*n.width,n.top+.5*n.height)===s;return i.classList.remove("fancybox__no-click"),o}zoomIn(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom,{top:s,left:n,scale:o,opacity:a}=this.getZoomInfo(t);e.trigger("reveal",t),i.panTo({x:-1*n,y:-1*s,scale:o,friction:0,ignoreBounds:!0}),t.$content.style.visibility="",t.state="zoomIn",!0===a&&i.on("afterTransform",(e=>{"zoomIn"!==t.state&&"zoomOut"!==t.state||(e.$content.style.opacity=Math.min(1,1-(1-e.content.scale)/(1-o)))})),i.panTo({x:0,y:0,scale:1,friction:this.fancybox.option("Image.zoomFriction")})}zoomOut(){const e=this.fancybox,t=e.getSlide(),i=t.Panzoom;if(!i)return;t.state="zoomOut",e.state="customClosing",t.$caption&&(t.$caption.style.visibility="hidden");let s=this.fancybox.option("Image.zoomFriction");const n=e=>{const{top:n,left:o,scale:a,opacity:r}=this.getZoomInfo(t);e||r||(s*=.82),i.panTo({x:-1*o,y:-1*n,scale:a,friction:s,ignoreBounds:!0}),s*=.98};window.addEventListener("scroll",n),i.once("endAnimation",(()=>{window.removeEventListener("scroll",n),e.destroy()})),n()}handleCursor(e){if("image"!==e.type||!e.$el)return;const t=e.Panzoom,i=this.fancybox.option("Image.click",!1,e),s=this.fancybox.option("Image.touch"),n=e.$el.classList,o=this.fancybox.option("Image.canZoomInClass"),a=this.fancybox.option("Image.canZoomOutClass");n.remove(a),n.remove(o),t&&"toggleZoom"===i?t&&1===t.content.scale&&t.option("maxScale")-t.content.scale>.01?n.add(o):t.content.scale>1&&!s&&n.add(a):"close"===i&&n.add(a)}onWheel(e,t){if("ready"===this.fancybox.state&&!1!==this.fancybox.trigger("Image.wheel",t))switch(this.fancybox.option("Image.wheel")){case"zoom":"done"===e.state&&e.Panzoom&&e.Panzoom.zoomWithWheel(t);break;case"close":this.fancybox.close();break;case"slide":this.fancybox[t.deltaY<0?"prev":"next"]()}}onClick(e,t){if("ready"!==this.fancybox.state)return;const i=e.Panzoom;if(i&&(i.dragPosition.midPoint||0!==i.dragOffset.x||0!==i.dragOffset.y||1!==i.dragOffset.scale))return;if(this.fancybox.Carousel.Panzoom.lockAxis)return!1;const s=i=>{switch(i){case"toggleZoom":t.stopPropagation(),e.Panzoom&&e.Panzoom.zoomWithClick(t);break;case"close":this.fancybox.close();break;case"next":t.stopPropagation(),this.fancybox.next()}},n=this.fancybox.option("Image.click"),o=this.fancybox.option("Image.doubleClick");o?this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null,s(o)):this.clickTimer=setTimeout((()=>{this.clickTimer=null,s(n)}),300):s(n)}onPageChange(e,t){const i=e.getSlide();t.slides.forEach((e=>{e.Panzoom&&"done"===e.state&&e.index!==i.index&&e.Panzoom.panTo({x:0,y:0,scale:1,friction:.8})}))}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events)}constructor(e){this.fancybox=e;for(const e of["onReady","onClosing","onDone","onPageChange","onCreateSlide","onRemoveSlide","onImageStatusChange"])this[e]=this[e].bind(this);this.events={ready:this.onReady,closing:this.onClosing,done:this.onDone,"Carousel.change":this.onPageChange,"Carousel.createSlide":this.onCreateSlide,"Carousel.removeSlide":this.onRemoveSlide}}}T.defaults={canZoomInClass:"can-zoom_in",canZoomOutClass:"can-zoom_out",zoom:!0,zoomOpacity:"auto",zoomFriction:.82,ignoreCoveredThumbnail:!1,touch:!0,click:"toggleZoom",doubleClick:null,wheel:"zoom",fit:"contain",wrap:!1,Panzoom:{ratio:1}};class P{onChange(e){const t=e.Carousel;this.timer&&clearTimeout(this.timer);const i=null===t.prevPage,s=e.getSlide(),n=new URL(document.URL).hash;let o=!1;if(s.slug)o="#"+s.slug;else{const i=s.$trigger&&s.$trigger.dataset,n=e.option("slug")||i&&i.fancybox;n&&n.length&&"true"!==n&&(o="#"+n+(t.slides.length>1?"-"+(s.index+1):""))}i&&(this.origHash=n!==o?n:""),o&&n!==o&&(this.timer=setTimeout((()=>{try{window.history[i?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+o),i&&(this.hasCreatedHistory=!0)}catch(e){}}),300))}onClosing(){if(this.timer&&clearTimeout(this.timer),!0!==this.hasSilentClose)try{return void window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(e){}}attach(e){e.on(this.events)}detach(e){e.off(this.events)}static startFromUrl(){const e=P.Fancybox;if(!e||e.getInstance()||!1===e.defaults.Hash)return;const{hash:t,slug:i,index:s}=P.getParsedURL();if(!i)return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),e.getInstance())return;const o=document.querySelectorAll(`[data-fancybox="${i}"]`);o.length&&(null===s&&1===o.length?n=o[0]:s&&(n=o[s-1]),n&&n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static onHashChange(){const{slug:e,index:t}=P.getParsedURL(),i=P.Fancybox,s=i&&i.getInstance();if(s&&s.plugins.Hash){if(e){const i=s.Carousel;if(e===s.option("slug"))return i.slideTo(t-1);for(let t of i.slides)if(t.slug&&t.slug===e)return i.slideTo(t.index);const n=s.getSlide(),o=n.$trigger&&n.$trigger.dataset;if(o&&o.fancybox===e)return i.slideTo(t-1)}s.plugins.Hash.hasSilentClose=!0,s.close()}P.startFromUrl()}static create(e){function t(){window.addEventListener("hashchange",P.onHashChange,!1),P.startFromUrl()}P.Fancybox=e,b&&window.requestAnimationFrame((()=>{/complete|interactive|loaded/.test(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}))}static destroy(){window.removeEventListener("hashchange",P.onHashChange,!1)}static getParsedURL(){const e=window.location.hash.substr(1),t=e.split("-"),i=t.length>1&&/^\+?\d+$/.test(t[t.length-1])&&parseInt(t.pop(-1),10)||null;return{hash:e,slug:t.join("-"),index:i}}constructor(e){this.fancybox=e;for(const e of["onChange","onClosing"])this[e]=this[e].bind(this);this.events={initCarousel:this.onChange,"Carousel.change":this.onChange,closing:this.onClosing},this.hasCreatedHistory=!1,this.origHash="",this.timer=null}}const L={pageXOffset:0,pageYOffset:0,element:()=>document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,activate(e){L.pageXOffset=window.pageXOffset,L.pageYOffset=window.pageYOffset,e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},deactivate(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}};class k{isActive(){return this.active}setTimer(){if(!this.active||this.timer)return;const e=this.fancybox.option("slideshow.delay",3e3);this.timer=setTimeout((()=>{this.timer=null,this.fancybox.option("infinite")||this.fancybox.getSlide().index!==this.fancybox.Carousel.slides.length-1?this.fancybox.next():this.fancybox.jumpTo(0,{friction:0})}),e);let t=this.$progress;t||(t=document.createElement("div"),t.classList.add("fancybox__progress"),this.fancybox.$carousel.parentNode.insertBefore(t,this.fancybox.$carousel),this.$progress=t,t.offsetHeight),t.style.transitionDuration=`${e}ms`,t.style.transform="scaleX(1)"}clearTimer(){clearTimeout(this.timer),this.timer=null,this.$progress&&(this.$progress.style.transitionDuration="",this.$progress.style.transform="",this.$progress.offsetHeight)}activate(){this.active||(this.active=!0,this.fancybox.$container.classList.add("has-slideshow"),"done"===this.fancybox.getSlide().state&&this.setTimer(),document.addEventListener("visibilitychange",this.handleVisibilityChange,!1))}handleVisibilityChange(){this.deactivate()}deactivate(){this.active=!1,this.clearTimer(),this.fancybox.$container.classList.remove("has-slideshow"),document.removeEventListener("visibilitychange",this.handleVisibilityChange,!1)}toggle(){this.active?this.deactivate():this.fancybox.Carousel.slides.length>1&&this.activate()}constructor(e){this.fancybox=e,this.active=!1,this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}}const M={display:["counter","zoom","slideshow","fullscreen","thumbs","close"],autoEnable:!0,items:{counter:{position:"left",type:"div",class:"fancybox__counter",html:' / ',attr:{tabindex:-1}},prev:{type:"button",class:"fancybox__button--prev",label:"PREV",html:'',attr:{"data-fancybox-prev":""}},next:{type:"button",class:"fancybox__button--next",label:"NEXT",html:'',attr:{"data-fancybox-next":""}},fullscreen:{type:"button",class:"fancybox__button--fullscreen",label:"TOGGLE_FULLSCREEN",html:'',click:function(e){e.preventDefault(),L.element()?L.deactivate():L.activate(this.fancybox.$container)}},slideshow:{type:"button",class:"fancybox__button--slideshow",label:"TOGGLE_SLIDESHOW",html:'',click:function(e){e.preventDefault(),this.Slideshow.toggle()}},zoom:{type:"button",class:"fancybox__button--zoom",label:"TOGGLE_ZOOM",html:'',click:function(e){e.preventDefault();const t=this.fancybox.getSlide().Panzoom;t&&t.toggleZoom()}},download:{type:"link",label:"DOWNLOAD",class:"fancybox__button--download",html:'',click:function(e){e.stopPropagation()}},thumbs:{type:"button",label:"TOGGLE_THUMBS",class:"fancybox__button--thumbs",html:'',click:function(e){e.stopPropagation();const t=this.fancybox.plugins.Thumbs;t&&t.toggle()}},close:{type:"button",label:"CLOSE",class:"fancybox__button--close",html:'',attr:{"data-fancybox-close":"",tabindex:0}}}};class z{onInit(){if(this.fancybox.option("Toolbar.autoEnable")){let e=!1;for(const t of this.fancybox.items)if("image"===t.type){e=!0;break}if(!e)return void(this.state="disabled")}for(const t of this.fancybox.option("Toolbar.display"))if("close"===(e(t)?t.id:t)){this.fancybox.options.closeButton=!1;break}}onPrepare(){const e=this.fancybox;if("init"===this.state&&(this.build(),this.update(),this.Slideshow=new k(e),!e.Carousel.prevPage&&(e.option("slideshow.autoStart")&&this.Slideshow.activate(),e.option("fullscreen.autoStart")&&!L.element())))try{L.activate(e.$container)}catch(e){}}onFsChange(){window.scrollTo(L.pageXOffset,L.pageYOffset)}onSettle(){const e=this.fancybox,t=this.Slideshow;t&&t.isActive()&&(e.getSlide().index!==e.Carousel.slides.length-1||e.option("infinite")?"done"===e.getSlide().state&&t.setTimer():t.deactivate())}onChange(){this.update(),this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer()}onDone(e,t){const i=this.Slideshow;t.index===e.getSlide().index&&(this.update(),i&&i.isActive()&&(e.option("infinite")||t.index!==e.Carousel.slides.length-1?i.setTimer():i.deactivate()))}onRefresh(e){e&&e.index!==this.fancybox.getSlide().index||(this.update(),!this.Slideshow||!this.Slideshow.isActive()||e&&"done"!==e.state||this.Slideshow.deactivate())}onKeydown(e,t,i){" "===t&&this.Slideshow&&(this.Slideshow.toggle(),i.preventDefault())}onClosing(){this.Slideshow&&this.Slideshow.deactivate(),document.removeEventListener("fullscreenchange",this.onFsChange)}createElement(e){let t;"div"===e.type?t=document.createElement("div"):(t=document.createElement("link"===e.type?"a":"button"),t.classList.add("carousel__button")),t.innerHTML=e.html,t.setAttribute("tabindex",e.tabindex||0),e.class&&t.classList.add(...e.class.split(" "));for(const i in e.attr)t.setAttribute(i,e.attr[i]);e.label&&t.setAttribute("title",this.fancybox.localize(`{{${e.label}}}`)),e.click&&t.addEventListener("click",e.click.bind(this)),"prev"===e.id&&t.setAttribute("data-fancybox-prev",""),"next"===e.id&&t.setAttribute("data-fancybox-next","");const i=t.querySelector("svg");return i&&(i.setAttribute("role","img"),i.setAttribute("tabindex","-1"),i.setAttribute("xmlns","http://www.w3.org/2000/svg")),t}build(){this.cleanup();const i=this.fancybox.option("Toolbar.items"),s=[{position:"left",items:[]},{position:"center",items:[]},{position:"right",items:[]}],n=this.fancybox.plugins.Thumbs;for(const o of this.fancybox.option("Toolbar.display")){let a,r;if(e(o)?(a=o.id,r=t({},i[a],o)):(a=o,r=i[a]),["counter","next","prev","slideshow"].includes(a)&&this.fancybox.items.length<2)continue;if("fullscreen"===a){if(!document.fullscreenEnabled||window.fullScreen)continue;document.addEventListener("fullscreenchange",this.onFsChange)}if("thumbs"===a&&(!n||"disabled"===n.state))continue;if(!r)continue;let l=r.position||"right",c=s.find((e=>e.position===l));c&&c.items.push(r)}const o=document.createElement("div");o.classList.add("fancybox__toolbar");for(const e of s)if(e.items.length){const t=document.createElement("div");t.classList.add("fancybox__toolbar__items"),t.classList.add(`fancybox__toolbar__items--${e.position}`);for(const i of e.items)t.appendChild(this.createElement(i));o.appendChild(t)}this.fancybox.$carousel.parentNode.insertBefore(o,this.fancybox.$carousel),this.$container=o}update(){const e=this.fancybox.getSlide(),t=e.index,i=this.fancybox.items.length,s=e.downloadSrc||("image"!==e.type||e.error?null:e.src);for(const e of this.fancybox.$container.querySelectorAll("a.fancybox__button--download"))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex"),e.setAttribute("href",s),e.setAttribute("download",s),e.setAttribute("target","_blank")):(e.setAttribute("disabled",""),e.setAttribute("tabindex",-1),e.removeAttribute("href"),e.removeAttribute("download"));const n=e.Panzoom,o=n&&n.option("maxScale")>n.option("baseScale");for(const e of this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"))o?e.removeAttribute("disabled"):e.setAttribute("disabled","");for(const t of this.fancybox.$container.querySelectorAll("[data-fancybox-index]"))t.innerHTML=e.index+1;for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-count]"))e.innerHTML=i;if(!this.fancybox.option("infinite")){for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"))0===t?e.setAttribute("disabled",""):e.removeAttribute("disabled");for(const e of this.fancybox.$container.querySelectorAll("[data-fancybox-next]"))t===i-1?e.setAttribute("disabled",""):e.removeAttribute("disabled")}}cleanup(){this.Slideshow&&this.Slideshow.isActive()&&this.Slideshow.clearTimer(),this.$container&&this.$container.remove(),this.$container=null}attach(){this.fancybox.on(this.events)}detach(){this.fancybox.off(this.events),this.cleanup()}constructor(e){this.fancybox=e,this.$container=null,this.state="init";for(const e of["onInit","onPrepare","onDone","onKeydown","onClosing","onChange","onSettle","onRefresh"])this[e]=this[e].bind(this);this.events={init:this.onInit,prepare:this.onPrepare,done:this.onDone,keydown:this.onKeydown,closing:this.onClosing,"Carousel.change":this.onChange,"Carousel.settle":this.onSettle,"Carousel.Panzoom.touchStart":()=>this.onRefresh(),"Image.startAnimation":(e,t)=>this.onRefresh(t),"Image.afterUpdate":(e,t)=>this.onRefresh(t)}}}z.defaults=M;const A={ScrollLock:class{onReady(){const e=window.visualViewport;e&&(this.viewport=e,this.startY=0,e.addEventListener("resize",this.onResize),this.updateViewport()),window.addEventListener("touchstart",this.onTouchstart,{passive:!1}),window.addEventListener("touchmove",this.onTouchmove,{passive:!1}),window.addEventListener("wheel",this.onWheel,{passive:!1})}onResize(){this.updateViewport()}updateViewport(){const e=this.fancybox,t=this.viewport,i=t.scale||1,s=e.$container;if(!s)return;let n="",o="",a="";i-1>.1&&(n=t.width*i+"px",o=t.height*i+"px",a=`translate3d(${t.offsetLeft}px, ${t.offsetTop}px, 0) scale(${1/i})`),s.style.width=n,s.style.height=o,s.style.transform=a}onTouchstart(e){this.startY=e.touches?e.touches[0].screenY:e.screenY}onTouchmove(e){const t=this.startY,i=window.innerWidth/window.document.documentElement.clientWidth;if(!e.cancelable)return;if(e.touches.length>1||1!==i)return;const n=s(e.composedPath()[0]);if(!n)return void e.preventDefault();const o=window.getComputedStyle(n),a=parseInt(o.getPropertyValue("height"),10),r=e.touches?e.touches[0].screenY:e.screenY,l=t<=r&&0===n.scrollTop,c=t>=r&&n.scrollHeight-n.scrollTop===a;(l||c)&&e.preventDefault()}onWheel(e){s(e.composedPath()[0])||e.preventDefault()}cleanup(){this.pendingUpdate&&(cancelAnimationFrame(this.pendingUpdate),this.pendingUpdate=null);const e=this.viewport;e&&(e.removeEventListener("resize",this.onResize),this.viewport=null),window.removeEventListener("touchstart",this.onTouchstart,!1),window.removeEventListener("touchmove",this.onTouchmove,!1),window.removeEventListener("wheel",this.onWheel,{passive:!1})}attach(){this.fancybox.on("initLayout",this.onReady)}detach(){this.fancybox.off("initLayout",this.onReady),this.cleanup()}constructor(e){this.fancybox=e,this.viewport=null,this.pendingUpdate=null;for(const e of["onReady","onResize","onTouchstart","onTouchmove"])this[e]=this[e].bind(this)}},Thumbs:C,Html:$,Toolbar:z,Image:T,Hash:P},O={startIndex:0,preload:1,infinite:!0,showClass:"fancybox-zoomInUp",hideClass:"fancybox-fadeOut",animated:!0,hideScrollbar:!0,parentEl:null,mainClass:null,autoFocus:!0,trapFocus:!0,placeFocusBack:!0,click:"close",closeButton:"inside",dragToClose:!0,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"next",ArrowDown:"prev",ArrowRight:"next",ArrowLeft:"prev"},template:{closeButton:'',spinner:'',main:null},l10n:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}},_=new Map;let I=0;class N extends c{option(e,...t){const i=this.getSlide();let s=i?i[e]:void 0;return void 0!==s?("function"==typeof s&&(s=s.call(this,this,...t)),s):super.option(e,...t)}bindHandlers(){for(const e of["onMousedown","onKeydown","onClick","onFocus","onCreateSlide","onSettle","onTouchMove","onTouchEnd","onTransform"])this[e]=this[e].bind(this)}attachEvents(){document.addEventListener("mousedown",this.onMousedown),document.addEventListener("keydown",this.onKeydown,!0),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),this.$container.addEventListener("click",this.onClick)}detachEvents(){document.removeEventListener("mousedown",this.onMousedown),document.removeEventListener("keydown",this.onKeydown,!0),document.removeEventListener("focus",this.onFocus,!0),this.$container.removeEventListener("click",this.onClick)}initLayout(){this.$root=this.option("parentEl")||document.body;let e=this.option("template.main");e&&(this.$root.insertAdjacentHTML("beforeend",this.localize(e)),this.$container=this.$root.querySelector(".fancybox__container")),this.$container||(this.$container=document.createElement("div"),this.$root.appendChild(this.$container)),this.$container.onscroll=()=>(this.$container.scrollLeft=0,!1),Object.entries({class:"fancybox__container",role:"dialog",tabIndex:"-1","aria-modal":"true","aria-hidden":"true","aria-label":this.localize("{{MODAL}}")}).forEach((e=>this.$container.setAttribute(...e))),this.option("animated")&&this.$container.classList.add("is-animated"),this.$backdrop=this.$container.querySelector(".fancybox__backdrop"),this.$backdrop||(this.$backdrop=document.createElement("div"),this.$backdrop.classList.add("fancybox__backdrop"),this.$container.appendChild(this.$backdrop)),this.$carousel=this.$container.querySelector(".fancybox__carousel"),this.$carousel||(this.$carousel=document.createElement("div"),this.$carousel.classList.add("fancybox__carousel"),this.$container.appendChild(this.$carousel)),this.$container.Fancybox=this,this.id=this.$container.getAttribute("id"),this.id||(this.id=this.options.id||++I,this.$container.setAttribute("id","fancybox-"+this.id));const t=this.option("mainClass");return t&&this.$container.classList.add(...t.split(" ")),document.documentElement.classList.add("with-fancybox"),this.trigger("initLayout"),this}setItems(e){const t=[];for(const i of e){const e=i.$trigger;if(e){const t=e.dataset||{};i.src=t.src||e.getAttribute("href")||i.src,i.type=t.type||i.type,!i.src&&e instanceof HTMLImageElement&&(i.src=e.currentSrc||i.$trigger.src)}let s=i.$thumb;if(!s){let e=i.$trigger&&i.$trigger.origTarget;e&&(s=e instanceof HTMLImageElement?e:e.querySelector("img:not([aria-hidden])")),!s&&i.$trigger&&(s=i.$trigger instanceof HTMLImageElement?i.$trigger:i.$trigger.querySelector("img:not([aria-hidden])"))}i.$thumb=s||null;let n=i.thumb;!n&&s&&(n=s.currentSrc||s.src,!n&&s.dataset&&(n=s.dataset.lazySrc||s.dataset.src)),n||"image"!==i.type||(n=i.src),i.thumb=n||null,i.caption=i.caption||"",t.push(i)}this.items=t}initCarousel(){return this.Carousel=new v(this.$carousel,t(!0,{},{prefix:"",classNames:{viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"},textSelection:!0,preload:this.option("preload"),friction:.88,slides:this.items,initialPage:this.options.startIndex,slidesPerPage:1,infiniteX:this.option("infinite"),infiniteY:!0,l10n:this.option("l10n"),Dots:!1,Navigation:{classNames:{main:"fancybox__nav",button:"carousel__button",next:"is-next",prev:"is-prev"}},Panzoom:{textSelection:!0,panOnlyZoomed:()=>this.Carousel&&this.Carousel.pages&&this.Carousel.pages.length<2&&!this.option("dragToClose"),lockAxis:()=>{if(this.Carousel){let e="x";return this.option("dragToClose")&&(e+="y"),e}}},on:{"*":(e,...t)=>this.trigger(`Carousel.${e}`,...t),init:e=>this.Carousel=e,createSlide:this.onCreateSlide,settle:this.onSettle}},this.option("Carousel"))),this.option("dragToClose")&&this.Carousel.Panzoom.on({touchMove:this.onTouchMove,afterTransform:this.onTransform,touchEnd:this.onTouchEnd}),this.trigger("initCarousel"),this}onCreateSlide(e,t){let i=t.caption||"";if("function"==typeof this.options.caption&&(i=this.options.caption.call(this,this,this.Carousel,t)),"string"==typeof i&&i.length){const e=document.createElement("div"),s=`fancybox__caption_${this.id}_${t.index}`;e.className="fancybox__caption",e.innerHTML=i,e.setAttribute("id",s),t.$caption=t.$el.appendChild(e),t.$el.classList.add("has-caption"),t.$el.setAttribute("aria-labelledby",s)}}onSettle(){this.option("autoFocus")&&this.focus()}onFocus(e){this.focus(e)}onClick(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.matches("[data-fancybox-close]"))return e.preventDefault(),void N.close(!1,e);if(t.matches("[data-fancybox-next]"))return e.preventDefault(),void N.next();if(t.matches("[data-fancybox-prev]"))return e.preventDefault(),void N.prev();if(!(t.matches(x)||document.activeElement.blur(),t.closest(".fancybox__content")||getSelection().toString().length||!1===this.trigger("click",e)))switch(this.option("click")){case"close":this.close();break;case"next":this.next()}}onTouchMove(){const e=this.getSlide().Panzoom;return!e||1===e.content.scale}onTouchEnd(e){const t=e.dragOffset.y;Math.abs(t)>=150||Math.abs(t)>=35&&e.dragOffset.time<350?(this.option("hideClass")&&(this.getSlide().hideClass="fancybox-throwOut"+(e.content.y<0?"Up":"Down")),this.close()):"y"===e.lockAxis&&e.panTo({y:0})}onTransform(e){if(this.$backdrop){const t=Math.abs(e.content.y),i=t<1?"":Math.max(.33,Math.min(1,1-t/e.content.fitHeight*1.5));this.$container.style.setProperty("--fancybox-ts",i?"0s":""),this.$container.style.setProperty("--fancybox-opacity",i)}}onMousedown(){"ready"===this.state&&document.body.classList.add("is-using-mouse")}onKeydown(e){if(N.getInstance().id!==this.id)return;document.body.classList.remove("is-using-mouse");const t=e.key,i=this.option("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;const s=e.composedPath()[0],n=document.activeElement&&document.activeElement.classList,o=n&&n.contains("carousel__button");if("Escape"!==t&&!o&&(e.target.isContentEditable||-1!==["BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)))return;if(!1===this.trigger("keydown",t,e))return;const a=i[t];"function"==typeof this[a]&&this[a]()}getSlide(){const e=this.Carousel;if(!e)return null;const t=null===e.page?e.option("initialPage"):e.page,i=e.pages||[];return i.length&&i[t]?i[t].slides[0]:null}focus(e){if(N.ignoreFocusChange)return;if(["init","closing","customClosing","destroy"].indexOf(this.state)>-1)return;const t=this.$container,i=this.getSlide(),s="done"===i.state?i.$el:null;if(s&&s.contains(document.activeElement))return;e&&e.preventDefault(),N.ignoreFocusChange=!0;const n=Array.from(t.querySelectorAll(x));let o,a=[];for(let e of n){const t=e.offsetParent,i=s&&s.contains(e),n=!this.Carousel.$viewport.contains(e);t&&(i||n)?(a.push(e),void 0!==e.dataset.origTabindex&&(e.tabIndex=e.dataset.origTabindex,e.removeAttribute("data-orig-tabindex")),(e.hasAttribute("autoFocus")||!o&&i&&!e.classList.contains("carousel__button"))&&(o=e)):(e.dataset.origTabindex=void 0===e.dataset.origTabindex?e.getAttribute("tabindex"):e.dataset.origTabindex,e.tabIndex=-1)}e?a.indexOf(e.target)>-1?this.lastFocus=e.target:this.lastFocus===t?w(a[a.length-1]):w(t):this.option("autoFocus")&&o?w(o):a.indexOf(document.activeElement)<0&&w(t),this.lastFocus=document.activeElement,N.ignoreFocusChange=!1}hideScrollbar(){if(!b)return;const e=window.innerWidth-document.documentElement.getBoundingClientRect().width,t="fancybox-style-noscroll";let i=document.getElementById(t);i||e>0&&(i=document.createElement("style"),i.id=t,i.type="text/css",i.innerHTML=`.compensate-for-scrollbar {padding-right: ${e}px;}`,document.getElementsByTagName("head")[0].appendChild(i),document.body.classList.add("compensate-for-scrollbar"))}revealScrollbar(){document.body.classList.remove("compensate-for-scrollbar");const e=document.getElementById("fancybox-style-noscroll");e&&e.remove()}clearContent(e){this.Carousel.trigger("removeSlide",e),e.$content&&(e.$content.remove(),e.$content=null),e.$closeButton&&(e.$closeButton.remove(),e.$closeButton=null),e._className&&e.$el.classList.remove(e._className)}setContent(e,t,i={}){let s;const n=e.$el;if(t instanceof HTMLElement)["img","iframe","video","audio"].indexOf(t.nodeName.toLowerCase())>-1?(s=document.createElement("div"),s.appendChild(t)):s=t;else{const e=document.createRange().createContextualFragment(t);s=document.createElement("div"),s.appendChild(e)}if(e.filter&&!e.error&&(s=s.querySelector(e.filter)),s instanceof Element)return e._className=`has-${i.suffix||e.type||"unknown"}`,n.classList.add(e._className),s.classList.add("fancybox__content"),"none"!==s.style.display&&"none"!==getComputedStyle(s).getPropertyValue("display")||(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.id&&s.setAttribute("id",e.id),e.$content=s,n.prepend(s),this.manageCloseButton(e),"loading"!==e.state&&this.revealContent(e),s;this.setError(e,"{{ELEMENT_NOT_FOUND}}")}manageCloseButton(e){const t=void 0===e.closeButton?this.option("closeButton"):e.closeButton;if(!t||"top"===t&&this.$closeButton)return;const i=document.createElement("button");i.classList.add("carousel__button","is-close"),i.setAttribute("title",this.options.l10n.CLOSE),i.innerHTML=this.option("template.closeButton"),i.addEventListener("click",(e=>this.close(e))),"inside"===t?(e.$closeButton&&e.$closeButton.remove(),e.$closeButton=e.$content.appendChild(i)):this.$closeButton=this.$container.insertBefore(i,this.$container.firstChild)}revealContent(e){this.trigger("reveal",e),e.$content.style.visibility="";let t=!1;e.error||"loading"===e.state||null!==this.Carousel.prevPage||e.index!==this.options.startIndex||(t=void 0===e.showClass?this.option("showClass"):e.showClass),t?(e.state="animating",this.animateCSS(e.$content,t,(()=>{this.done(e)}))):this.done(e)}animateCSS(e,t,i){if(e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!0,cancelable:!0})),!e||!t)return void("function"==typeof i&&i());const s=function(n){n.currentTarget===this&&(e.removeEventListener("animationend",s),i&&i(),e.classList.remove(t))};e.addEventListener("animationend",s),e.classList.add(t)}done(e){e.state="done",this.trigger("done",e);const t=this.getSlide();t&&e.index===t.index&&this.option("autoFocus")&&this.focus()}setError(e,t){e.error=t,this.hideLoading(e),this.clearContent(e);const i=document.createElement("div");i.classList.add("fancybox-error"),i.innerHTML=this.localize(t||"=s[e]&&i=s[e]&&(d=e);o.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(n.indexOf(i)>=0)c=n.indexOf(i);else{const e=Math.min(o.slidesPerGroupSkip,d);c=e+Math.floor((d-e)/o.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),d===a)return void(c!==l&&(t.snapIndex=c,t.emit("snapIndexChange")));const h=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:c,realIndex:h,previousIndex:a,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),r!==h&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,i=t.params,s=K(e).closest(`.${i.slideClass}`)[0];let n,o=!1;if(s)for(let e=0;e=i&&(a=e)}if(o.initialized&&a!==h){if(!o.allowSlideNext&&v=i.length-s){l=-i.length+t+s,l+=s;e.slideTo(l,0,!1,!0)&&0!==c&&e.setTranslate((r?-e.translate:e.translate)-c)}e.allowSlidePrev=n,e.allowSlideNext=o,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:i}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const i="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const e=this,t=H(),{params:i,support:s}=e;e.onTouchStart=fe.bind(e),e.onTouchMove=ge.bind(e),e.onTouchEnd=me.bind(e),i.cssMode&&(e.onScroll=ye.bind(e)),e.onClick=be.bind(e),s.touch&&!xe&&(t.addEventListener("touchstart",we),xe=!0),Ce(e,"on")},detachEvents:function(){Ce(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:i,loopedSlides:s=0,params:n,$el:o}=e,a=n.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const r=e.getBreakpoint(a,e.params.breakpointsBase,e.el);if(!r||e.currentBreakpoint===r)return;const l=(r in a?a[r]:void 0)||e.originalParams,c=Se(e,n),d=Se(e,l),h=n.enabled;c&&!d?(o.removeClass(`${n.containerModifierClass}grid ${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&d&&(o.addClass(`${n.containerModifierClass}grid`),(l.grid.fill&&"column"===l.grid.fill||!l.grid.fill&&"column"===n.grid.fill)&&o.addClass(`${n.containerModifierClass}grid-column`),e.emitContainerClasses());const u=l.direction&&l.direction!==n.direction,p=n.loop&&(l.slidesPerView!==n.slidesPerView||u);u&&i&&e.changeDirection(),se(e.params,l);const f=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!f?e.disable():!h&&f&&e.enable(),e.currentBreakpoint=r,e.emit("_beforeBreakpoint",l),p&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",l)},getBreakpoint:function(e,t,i){if(void 0===t&&(t="window"),!e||"container"===t&&!i)return;let s=!1;const n=G(),o="window"===t?n.innerHeight:i.clientHeight,a=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:o*t,point:e}}return{value:e,point:e}}));a.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;eHeading
Maintained by DesignLab