Socket
Socket
Sign inDemoInstall

lightgallery

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightgallery - npm Package Compare versions

Comparing version 2.2.0-beta.4 to 2.2.0-beta.5

4

lg-settings.d.ts

@@ -223,4 +223,6 @@ import { GalleryItem } from './lg-utils';

* control where the sub-html should be appended.
* If you choose '.lg-outer', you are responsible for placing the div at the right position.
* '.lg-outer' is useful if you want show custom HTML outside the normal gallery
*/
appendSubHtmlTo: '.lg-sub-html' | '.lg-item';
appendSubHtmlTo: '.lg-sub-html' | '.lg-item' | '.lg-outer';
/**

@@ -227,0 +229,0 @@ * Set to true if the selector in "data-sub-html" should use the current item as its origin.

@@ -19,3 +19,3 @@ import { lgQuery } from './lgQuery';

*/
src: string;
src?: string;
/**

@@ -25,3 +25,3 @@ * Source attributes for the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attributes">picture</a> element

*/
sources: ImageSources[];
sources?: ImageSources[];
/**

@@ -31,3 +31,3 @@ * Thumbnail url

*/
thumb: string;
thumb?: string;
/**

@@ -37,3 +37,3 @@ * alt attribute for the image

*/
alt: string;
alt?: string;
/**

@@ -43,3 +43,3 @@ * Title attribute for the video

*/
title: string;
title?: string;
/**

@@ -49,3 +49,3 @@ * Title for iframe

*/
iframeTitle: string;
iframeTitle?: string;
/**

@@ -56,3 +56,3 @@ * Caption for the slide

*/
subHtml: string;
subHtml?: string;
/**

@@ -63,3 +63,3 @@ * url of the file which contain the sub html.

*/
subHtmlUrl: string;
subHtmlUrl?: string;
/**

@@ -69,3 +69,3 @@ * Video source

*/
video: VideoSource;
video?: VideoSource;
/**

@@ -75,3 +75,3 @@ * Poster url

*/
poster: string;
poster?: string;
/**

@@ -81,9 +81,9 @@ * Custom slide name to use in the url when hash plugin is enabled

*/
slideName: string;
slideName?: string;
/**
* List of images and viewport's max width separated by comma.
* @description Ex: img/1-375.jpg 375, img/1-480.jpg 480, img/1-757.jpg 757.
* @description Ex?: img/1-375.jpg 375, img/1-480.jpg 480, img/1-757.jpg 757.
* @data-attr data-responsive
*/
responsive: string;
responsive?: string;
/**

@@ -93,3 +93,3 @@ * srcset attribute values for the main image

*/
srcset: string;
srcset?: string;
/**

@@ -99,3 +99,3 @@ * srcset sizes attribute for the main image

*/
sizes: string;
sizes?: string;
/**

@@ -105,3 +105,3 @@ * Set true is you want to open your url in an iframe

*/
iframe: boolean;
iframe?: boolean;
/**

@@ -112,3 +112,3 @@ * Download url for your image/video.

*/
downloadUrl: string | boolean;
downloadUrl?: string | boolean;
/**

@@ -122,3 +122,3 @@ * Name of the file after it is downloaded.

*/
download: string | boolean;
download?: string | boolean;
/**

@@ -129,3 +129,3 @@ * Actual size of the image in px.

*/
width: string;
width?: string;
/**

@@ -136,3 +136,3 @@ * Facebook share URL.

*/
facebookShareUrl: string;
facebookShareUrl?: string;
/**

@@ -142,3 +142,3 @@ * Tweet text

*/
tweetText: string;
tweetText?: string;
/**

@@ -149,10 +149,10 @@ * Twitter share URL.

*/
twitterShareUrl: string;
twitterShareUrl?: string;
/**
* Pinterest share URL.
* @description Specify only if you want to provide separate share URL for the specific slide. By default, current browser URL will be taken.
* Note: Pinterest requires absolute URL
* Note?: Pinterest requires absolute URL
* @data-attr data-pinterest-share-url
*/
pinterestShareUrl: string;
pinterestShareUrl?: string;
/**

@@ -162,3 +162,3 @@ * Description for Pinterest post.

*/
pinterestText: string;
pinterestText?: string;
/**

@@ -176,3 +176,3 @@ * Facebook comments body html

*/
fbHtml: string;
fbHtml?: string;
/**

@@ -183,3 +183,3 @@ * Disqus page identifier

*/
disqusIdentifier: string;
disqusIdentifier?: string;
/**

@@ -190,3 +190,3 @@ * Disqus page url

*/
disqusUrl: string;
disqusUrl?: string;
__slideVideoInfo?: VideoInfo;

@@ -207,4 +207,4 @@ [key: string]: any;

getTransform(el: HTMLElement, container: lgQuery, top: number, bottom: number, imageSize?: ImageSize | undefined): string | undefined;
getIframeMarkup(src: string, iframeWidth: string, iframeHeight: string, iframeTitle?: string | undefined): string;
getImgMarkup(index: number, src: string, altAttr: string, srcset: string, sizes: string, sources?: ImageSources[] | undefined): string;
getIframeMarkup(iframeWidth: string, iframeHeight: string, src?: string | undefined, iframeTitle?: string | undefined): string;
getImgMarkup(index: number, src: string, altAttr: string, srcset?: string | undefined, sizes?: string | undefined, sources?: ImageSources[] | undefined): string;
getResponsiveSrc(srcItms: string[]): string;

@@ -211,0 +211,0 @@ isImageLoaded(img: HTMLImageElement): boolean;

@@ -133,3 +133,3 @@ "use strict";

},
getIframeMarkup: function (src, iframeWidth, iframeHeight, iframeTitle) {
getIframeMarkup: function (iframeWidth, iframeHeight, src, iframeTitle) {
var title = iframeTitle ? 'title="' + iframeTitle + '"' : '';

@@ -136,0 +136,0 @@ return "<div class=\"lg-video-cont lg-has-iframe\" style=\"width:" + iframeWidth + "; height: " + iframeHeight + "\">\n <iframe class=\"lg-object\" frameborder=\"0\" " + title + " src=\"" + src + "\" allowfullscreen=\"true\"></iframe>\n </div>";

@@ -40,3 +40,5 @@ "use strict";

setTimeout(function () {
_this.setRelativeCaption(index);
if (index === _this.core.index) {
_this.setRelativeCaption(index);
}
}, delay);

@@ -60,4 +62,7 @@ });

});
this.core.LGel.on(lg_events_1.lGEvents.containerResize + ".caption", function (event) {
_this.setRelativeCaption(_this.core.index);
});
};
RelativeCaption.prototype.setCaptionStyle = function (index, rect) {
RelativeCaption.prototype.setCaptionStyle = function (index, rect, slideWrapRect) {
var $subHtmlInner = this.core

@@ -67,11 +72,6 @@ .getSlideItem(index)

var $subHtml = this.core.getSlideItem(index).find('.lg-sub-html');
$subHtml.css('width', rect.width + "px").css('left', rect.left + "px");
var subHtmlRect = $subHtmlInner.get().getBoundingClientRect();
var top = rect.bottom;
if (rect.height + subHtmlRect.height >= rect.bottom) {
top -= subHtmlRect.height;
}
$subHtml
.css('width', rect.width + "px")
.css('left', rect.left + "px")
.css('top', top + "px");
var bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height;
$subHtml.css('top', "auto").css('bottom', Math.max(bottom, 0) + "px");
};

@@ -86,3 +86,7 @@ RelativeCaption.prototype.setRelativeCaption = function (index) {

.getBoundingClientRect();
this.setCaptionStyle(index, rect);
var slideWrapRect = this.core
.getSlideItem(index)
.get()
.getBoundingClientRect();
this.setCaptionStyle(index, rect, slideWrapRect);
slide.addClass('lg-show-caption');

@@ -89,0 +93,0 @@ }

@@ -89,3 +89,3 @@ "use strict";

Share.prototype.getShareListItemHTML = function (type, text) {
return "<li><a class=\"lg-share-" + type + "\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
return "<li><a class=\"lg-share-" + type + "\" rel=\"noopener\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
};

@@ -92,0 +92,0 @@ Share.prototype.getDefaultShareOptions = function () {

@@ -60,3 +60,5 @@ "use strict";

_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');
_this.setZoomEssentials();
if (event.detail.index === _this.core.index) {
_this.setZoomEssentials();
}
}, _speed + 30);

@@ -63,0 +65,0 @@ };

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,e,i){var s=e.replace(/-([a-z])/gi,(function(t,e){return e.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(s)?(t.style[s.charAt(0).toLowerCase()+s.slice(1)]=i,t.style["webkit"+s]=i,t.style["moz"+s]=i,t.style["ms"+s]=i,t.style["o"+s]=i):t.style[s]=i},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==i.indexOf(t)}))},t.prototype.attr=function(t,e){return void 0===e?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(i){i.setAttribute(t,e)})),this)},t.prototype.find=function(t){return i(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?i(this.selector[0]):i(this.selector)},t.prototype.eq=function(t){return i(this.selector[t])},t.prototype.parent=function(){return i(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var e=t.split(" ");return this._each((function(t){e.forEach((function(e){return t.removeAttribute(e)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(e){t.split(" ").forEach((function(t){e.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(e){t.split(" ").forEach((function(t){e.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,e){var i=this;return this._each((function(s){i._setCssVendorPrefix(s,t,e)})),this},t.prototype.on=function(e,i){var s=this;return this.selector?(e.split(" ").forEach((function(e){Array.isArray(t.eventListeners[e])||(t.eventListeners[e]=[]),t.eventListeners[e].push(i),s.selector.addEventListener(e.split(".")[0],i)})),this):this},t.prototype.once=function(t,e){var i=this;return this.on(t,(function(){i.off(t),e(t)})),this},t.prototype.off=function(e){var i=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(s){i.isEventMatched(e,s)&&(t.eventListeners[s].forEach((function(t){i.selector.removeEventListener(s.split(".")[0],t)})),t.eventListeners[s]=[])})),this):this},t.prototype.trigger=function(t,e){if(!this.firstElement)return this;var i=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(i),this},t.prototype.load=function(t){var e=this;return fetch(t).then((function(t){e.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(e){e.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(e){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):e.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(e){e.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=i("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function i(t){return new e(t)}var s=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function n(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var o=function(t,e,s,n){void 0===s&&(s=0);var o=i(t).attr("data-lg-size")||n;if(o){var r=o.split(",");if(r[1])for(var l=window.innerWidth,a=0;a<r.length;a++){var g=r[a];if(parseInt(g.split("-")[2],10)>l){o=g;break}a===r.length-1&&(o=g)}var d=o.split("-"),h=parseInt(d[0],10),c=parseInt(d[1],10),u=e.width(),m=e.height()-s,p=Math.min(u,h),f=Math.min(m,c),v=Math.min(p/h,f/c);return{width:h*v,height:c*v}}},r=function(t,e,s,n,o){if(o){var r=i(t).find("img").first();if(r.get()){var l=e.get().getBoundingClientRect(),a=l.width,g=e.height()-(s+n),d=r.width(),h=r.height(),c=r.style(),u=(a-d)/2-r.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+i(window).scrollLeft()+l.left,m=(g-h)/2-r.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+i(window).scrollTop()+s;return"translate3d("+(u*=-1)+"px, "+(m*=-1)+"px, 0) scale3d("+d/o.width+", "+h/o.height+", 1)"}}},l=function(t,e,i,s){return'<div class="lg-video-cont lg-has-iframe" style="width:'+e+"; height: "+i+'">\n <iframe class="lg-object" frameborder="0" '+(s?'title="'+s+'"':"")+' src="'+t+'" allowfullscreen="true"></iframe>\n </div>'},a=function(t,e,i,s,n,o){var r="<img "+i+" "+(s?'srcset="'+s+'"':"")+" "+(n?'sizes="'+n+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),"<source "+e+"></source>"})));return""+l+r},g=function(t){for(var e=[],i=[],s="",n=0;n<t.length;n++){var o=t[n].split(" ");""===o[0]&&o.splice(0,1),i.push(o[0]),e.push(o[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){s=i[l];break}return s},d=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},h=function(t,e,i,s){return'<div class="lg-video-cont '+(s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(e||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},c=function(t,e,o,r){var l=[],a=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var s=Array(t),n=0;for(e=0;e<i;e++)for(var o=arguments[e],r=0,l=o.length;r<l;r++,n++)s[n]=o[r];return s}(s,e);return[].forEach.call(t,(function(t){for(var e={},s=0;s<t.attributes.length;s++){var g=t.attributes[s];if(g.specified){var d=n(g.name),h="";a.indexOf(d)>-1&&(h=d),h&&(e[h]=g.value)}}var c=i(t),u=c.find("img").first().attr("alt"),m=c.attr("title"),p=r?c.attr(r):c.find("img").first().attr("src");e.thumb=p,o&&!e.subHtml&&(e.subHtml=m||u||""),e.alt=u||m||"",l.push(e)})),l},u=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},m={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},p="lgAfterAppendSlide",f="lgInit",v="lgHasVideo",y="lgContainerResize",b="lgUpdateSlides",C="lgAfterAppendSubHtml",I="lgBeforeOpen",w="lgAfterOpen",x="lgSlideItemLoad",S="lgBeforeSlide",T="lgAfterSlide",E="lgPosterClick",O="lgDragStart",L="lgDragMove",D="lgDragEnd",z="lgBeforeNextSlide",G="lgBeforePrevSlide",M="lgBeforeClose",k="lgAfterClose",A=0,B=function(){function s(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(A++,this.lgId=A,this.el=t,this.LGel=i(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return s.prototype.generateSettings=function(e){if(this.settings=t(t({},m),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():u()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},s.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},s.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(f,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},s.prototype.openGalleryOnItemClick=function(){for(var t=this,s=function(s){var o=n.items[s],r=i(o),l=e.generateUUID();r.attr("data-lg-id",l).on("click.lgcustom-item-"+l,(function(e){e.preventDefault();var i=t.settings.index||s;t.openGallery(i,o)}))},n=this,o=0;o<this.items.length;o++)s(o)},s.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(e){t.plugins.push(new e(t,i))}))},s.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},s.prototype.getSlideItem=function(t){return i(this.getSlideItemId(t))},s.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},s.prototype.getIdName=function(t){return t+"-"+this.lgId},s.prototype.getElementById=function(t){return i("#"+this.getIdName(t))},s.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},s.prototype.buildStructure=function(){var t=this;if(!(this.$container&&this.$container.get())){var e="",s="";this.settings.controls&&(e='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-sub-html"===this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var o=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",r=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",l="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),a=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",g=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",d='\n <div class="'+l+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+o+" "+r+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+n+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+e+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+g+"\n "+a+'\n </div>\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+s+"\n </div>\n </div>\n </div>\n ";i(this.settings.container).css("position","relative").append(d),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var h=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(h+="lg-grab "),this.settings.showAfterLoad&&(h+="lg-show-after-load"),this.outer.addClass(h),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),i(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},s.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=o(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var n=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",n)}this.LGel.trigger(y)}},s.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},s.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(b)}else this.closeGallery()},s.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=i(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return c(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},s.prototype.openGallery=function(t,e){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var l="";n.forEach((function(t){l=l+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(l),this.addHtml(t);var a="";this.mediaContainerPosition=this.getMediaContainerPosition();var g=this.mediaContainerPosition,d=g.top,h=g.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,h),this.zoomFromOrigin&&e&&(this.currentImageSize=o(e,this.outer,d+h,this.galleryItems[t].__slideVideoInfo&&this.settings.videoMaxSize),a=r(e,this.outer,d,h,this.currentImageSize)),this.zoomFromOrigin&&a||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(I),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=i(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&a){var e=s.getSlideItem(t);e.css("transform",a),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&a||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(w)})),document.body===this.settings.container&&i("html").addClass("lg-on")}},s.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.settings.defaultCaptionHeight||this.outer.find(".lg-sub-html").get().clientHeight,i=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(i?i.clientHeight:0)+e}},s.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},s.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},s.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},s.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},s.prototype.addHtml=function(t){var e,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!s)if(e){var n=e.substring(0,1);"."!==n&&"#"!==n||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?i(this.items).eq(t).find(e).first().html():i(e).first().html())}else e="";if(".lg-sub-html"===this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(e);else{var o=i(this.getSlideItemId(t));s?o.load(s):o.append('<div class="lg-sub-html">'+e+"</div>")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(C,{index:t})},s.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},s.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},s.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},s.prototype.getDummyImageContent=function(t,e,s){var n;if(this.settings.dynamic||(n=i(this.items).eq(e)),n){var o=void 0;if(!(o=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var r="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+o+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},s.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,g=n?'alt="'+n+'"':"",d='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(e,i,g):a(i,t,g,o,r,l))+"</picture>";e.prepend(d)},s.prototype.onLgObjectLoad=function(t,e,i,s,n){var o=this;n&&this.LGel.trigger(x,{index:e,delay:i||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,e,i,s,n)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),s)},s.prototype.handleLgObjectLoad=function(t,e,i,s,n){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(x,{index:e,delay:i||0})}),s)},s.prototype.isVideo=function(t,e){if(!t)return this.galleryItems[e].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var i=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),s=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return i?{youtube:i}:s?{vimeo:s}:n?{wistia:n}:void 0},s.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=e.isVideo(t.src,i)}))},s.prototype.loadContent=function(t,e){var s=this,n=this.galleryItems[t],r=i(this.getSlideItemId(t)),c=n.poster,u=n.srcset,m=n.sizes,f=n.sources,y=n.src,b=n.video,C=b&&"string"==typeof b?JSON.parse(b):b;if(n.responsive){var I=n.responsive.split(",");y=g(I)||y}var w=n.__slideVideoInfo,x="",S=!!n.iframe;if(!r.hasClass("lg-loaded")){if(w){var T=this.mediaContainerPosition,E=T.top,O=T.bottom,L=o(this.items[t],this.outer,E+O,w&&this.settings.videoMaxSize);x=this.getVideoContStyle(L)}if(S){var D=l(y,this.settings.iframeWidth,this.settings.iframeHeight,n.iframeTitle);r.prepend(D)}else if(c){var z="",G=!this.lGalleryOn,M=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;M&&(z=this.getDummyImageContent(r,t,""));D=h(c,z||"",x,w);r.prepend(D);var k=(M?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!0,isFirstSlide:G})}),k)}else if(w){D='<div class="lg-video-cont " style="'+x+'"></div>';r.prepend(D),this.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!1})}else if(this.setImgMarkup(y,r,t),u||f){var A=r.find(".lg-object");this.initPictureFill(A)}this.LGel.trigger(p,{index:t}),this.lGalleryOn&&".lg-sub-html"!==this.settings.appendSubHtmlTo&&this.addHtml(t)}var B=0,P=0;this.lGalleryOn||(P=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),P&&!i(document.body).hasClass("lg-from-hash")&&(B=P),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if(r.find(".lg-img-wrap").append(a(t,y,"",u,m,n.sources)),u||f){var e=r.find(".lg-object");s.initPictureFill(e)}s.onLgObjectLoad(r,t,P,B,!0);var i=r.find(".lg-object").first();d(i.get())?s.loadContentOnLoad(t,r,B):i.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,r,B)}))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.onLgObjectLoad(r,t,P,B,!1),w&&w.html5&&!c&&r.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},s.prototype.loadContentOnLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},s.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l<o-a;l++)n.push("lg-item-"+this.lgId+"-"+(t+l+1))}else{for(l=t;l<=this.galleryItems.length-1&&l<t+o/2;l++)n.push("lg-item-"+this.lgId+"-"+l);for(a=n.length,l=0;l<o-a;l++)n.push("lg-item-"+this.lgId+"-"+(t-l-1))}return this.settings.loop&&(t===this.galleryItems.length-1?n.push("lg-item-"+this.lgId+"-0"):0===t&&n.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===n.indexOf(r)&&n.push("lg-item-"+this.lgId+"-"+e),n},s.prototype.organizeSlideItems=function(t,e){var s=this,n=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return n.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&i("#"+t).remove()})),n},s.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},s.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},s.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},s.prototype.slide=function(t,e,i,s){var n=this,r=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,r),!this.lGalleryOn||r!==t){var l=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var a=this.getSlideItem(t),g=this.getSlideItem(r),d=this.galleryItems[t],h=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),h){var c=this.mediaContainerPosition,u=c.top,m=c.bottom,p=o(this.items[t],this.outer,u+m,h&&this.settings.videoMaxSize);this.resizeVideoSlide(t,p)}if(this.LGel.trigger(S,{prevIndex:r,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(t<r?s="prev":t>r&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var f=void 0,v=void 0;l>2?(f=t-1,v=t+1,(0===t&&r===l-1||t===l-1&&0===r)&&(v=0,f=l-1)):(f=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(f).addClass("lg-prev-slide"),a.addClass("lg-current")}else this.makeSlideAnimation(s,a,g);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){n.lGalleryOn&&n.loadContent(t,!0),".lg-sub-html"===n.settings.appendSubHtmlTo&&n.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(e?0:this.settings.slideDelay)),setTimeout((function(){n.lgBusy=!1,g.removeClass("lg-slide-progress"),n.LGel.trigger(T,{prevIndex:r,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},s.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},s.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},s.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},s.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var g=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",g);var d=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,d,d),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},s.prototype.touchEnd=function(t,e,s){var n,o=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){o.$container.removeClass("lg-dragging-vertical"),o.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var r=!0;if("horizontal"===o.swipeDirection){n=t.pageX-e.pageX;var l=Math.abs(t.pageX-e.pageX);n<0&&l>o.settings.swipeThreshold?(o.goToNextSlide(!0),r=!1):n>0&&l>o.settings.swipeThreshold&&(o.goToPrevSlide(!0),r=!1)}else if("vertical"===o.swipeDirection){if(n=Math.abs(t.pageY-e.pageY),o.settings.closable&&o.settings.swipeToClose&&n>100)return void o.closeGallery();o.$backdrop.css("opacity",1)}if(o.outer.find(".lg-item").removeAttr("style"),r&&Math.abs(t.pageX-e.pageX)<5){var a=i(s.target);o.isPosterElement(a)&&o.LGel.trigger(E)}o.swipeDirection=void 0})),setTimeout((function(){o.outer.hasClass("lg-dragging")||"lg-slide"===o.settings.mode||o.outer.removeClass("lg-slide")}),this.settings.speed+100)},s.prototype.enableSwipe=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!i(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(i){o&&"swipe"===t.touchAction&&1===i.targetTouches.length&&(s={pageX:i.targetTouches[0].pageX,pageY:i.targetTouches[0].pageY},t.touchMove(e,s,i),n=!0)})),this.$inner.on("touchend.lg",(function(r){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,e,r);else if(o){var l=i(r.target);t.isPosterElement(l)&&t.LGel.trigger(E)}t.touchAction=void 0,o=!1}})))},s.prototype.enableDrag=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);(i(s.target).hasClass("lg-item")||o.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(O))))})),i(window).on("mousemove.lg.global"+this.lgId,(function(i){n&&t.lgOpened&&(o=!0,s={pageX:i.pageX,pageY:i.pageY},t.touchMove(e,s),t.LGel.trigger(L))})),i(window).on("mouseup.lg.global"+this.lgId,(function(r){if(t.lgOpened){var l=i(r.target);o?(o=!1,t.touchEnd(s,e,r),t.LGel.trigger(D)):t.isPosterElement(l)&&t.LGel.trigger(E),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},s.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(i(e.target))&&t.LGel.trigger(E)}))},s.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},s.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(z,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger(z,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){e.outer.removeClass("lg-right-end")}),400)))},s.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},s.prototype.keyPress=function(){var t=this;i(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},s.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},s.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},s.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},s.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(e){!e.deltaY||t.galleryItems.length<2||(e.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),e.preventDefault())}))},s.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},s.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},s.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},s.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=i(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},s.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var e=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var n=i(s.target);e=!!t.isSlideElement(n)})),this.outer.on("mousemove.lg",(function(){e=!1})),this.outer.on("mouseup.lg",(function(s){var n=i(s.target);t.isSlideElement(n)&&e&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},s.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(M),i(window).scrollTop(this.prevScrollTop);var s,n=this.items[this.index];if(this.zoomFromOrigin&&n){var l=this.mediaContainerPosition,a=l.top,g=l.bottom,d=o(n,this.outer,a+g,this.galleryItems[this.index].__slideVideoInfo&&this.settings.videoMaxSize);s=r(n,this.outer,a,g,d)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,i("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var h=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){e.zoomFromOrigin&&s&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger(k,{instance:e}),e.outer.get()&&e.outer.get().blur(),e.lgOpened=!1}),h+100),h+100},s.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},s.prototype.destroyModules=function(t){this.plugins.forEach((function(e){try{t?e.destroy():e.closeGallery&&e.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},s.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(b)},s.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},s.prototype.destroy=function(){var t=this,e=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),i(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),e),e},s}();return function(t,e){return new B(t,e)}}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lightGallery=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},t.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,e,i){var s=e.replace(/-([a-z])/gi,(function(t,e){return e.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(s)?(t.style[s.charAt(0).toLowerCase()+s.slice(1)]=i,t.style["webkit"+s]=i,t.style["moz"+s]=i,t.style["ms"+s]=i,t.style["o"+s]=i):t.style[s]=i},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==i.indexOf(t)}))},t.prototype.attr=function(t,e){return void 0===e?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(i){i.setAttribute(t,e)})),this)},t.prototype.find=function(t){return i(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?i(this.selector[0]):i(this.selector)},t.prototype.eq=function(t){return i(this.selector[t])},t.prototype.parent=function(){return i(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var e=t.split(" ");return this._each((function(t){e.forEach((function(e){return t.removeAttribute(e)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(e){t.split(" ").forEach((function(t){e.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(e){t.split(" ").forEach((function(t){e.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,e){var i=this;return this._each((function(s){i._setCssVendorPrefix(s,t,e)})),this},t.prototype.on=function(e,i){var s=this;return this.selector?(e.split(" ").forEach((function(e){Array.isArray(t.eventListeners[e])||(t.eventListeners[e]=[]),t.eventListeners[e].push(i),s.selector.addEventListener(e.split(".")[0],i)})),this):this},t.prototype.once=function(t,e){var i=this;return this.on(t,(function(){i.off(t),e(t)})),this},t.prototype.off=function(e){var i=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(s){i.isEventMatched(e,s)&&(t.eventListeners[s].forEach((function(t){i.selector.removeEventListener(s.split(".")[0],t)})),t.eventListeners[s]=[])})),this):this},t.prototype.trigger=function(t,e){if(!this.firstElement)return this;var i=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(i),this},t.prototype.load=function(t){var e=this;return fetch(t).then((function(t){e.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(e){e.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(e){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):e.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(e){e.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=i("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function i(t){return new e(t)}var s=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function n(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var o=function(t,e,s,n){void 0===s&&(s=0);var o=i(t).attr("data-lg-size")||n;if(o){var r=o.split(",");if(r[1])for(var l=window.innerWidth,a=0;a<r.length;a++){var g=r[a];if(parseInt(g.split("-")[2],10)>l){o=g;break}a===r.length-1&&(o=g)}var d=o.split("-"),h=parseInt(d[0],10),c=parseInt(d[1],10),u=e.width(),m=e.height()-s,p=Math.min(u,h),f=Math.min(m,c),v=Math.min(p/h,f/c);return{width:h*v,height:c*v}}},r=function(t,e,s,n,o){if(o){var r=i(t).find("img").first();if(r.get()){var l=e.get().getBoundingClientRect(),a=l.width,g=e.height()-(s+n),d=r.width(),h=r.height(),c=r.style(),u=(a-d)/2-r.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+i(window).scrollLeft()+l.left,m=(g-h)/2-r.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+i(window).scrollTop()+s;return"translate3d("+(u*=-1)+"px, "+(m*=-1)+"px, 0) scale3d("+d/o.width+", "+h/o.height+", 1)"}}},l=function(t,e,i,s){return'<div class="lg-video-cont lg-has-iframe" style="width:'+t+"; height: "+e+'">\n <iframe class="lg-object" frameborder="0" '+(s?'title="'+s+'"':"")+' src="'+i+'" allowfullscreen="true"></iframe>\n </div>'},a=function(t,e,i,s,n,o){var r="<img "+i+" "+(s?'srcset="'+s+'"':"")+" "+(n?'sizes="'+n+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',l="";o&&(l=("string"==typeof o?JSON.parse(o):o).map((function(t){var e="";return Object.keys(t).forEach((function(i){e+=" "+i+'="'+t[i]+'"'})),"<source "+e+"></source>"})));return""+l+r},g=function(t){for(var e=[],i=[],s="",n=0;n<t.length;n++){var o=t[n].split(" ");""===o[0]&&o.splice(0,1),i.push(o[0]),e.push(o[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){s=i[l];break}return s},d=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},h=function(t,e,i,s){return'<div class="lg-video-cont '+(s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(e||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},c=function(t,e,o,r){var l=[],a=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var s=Array(t),n=0;for(e=0;e<i;e++)for(var o=arguments[e],r=0,l=o.length;r<l;r++,n++)s[n]=o[r];return s}(s,e);return[].forEach.call(t,(function(t){for(var e={},s=0;s<t.attributes.length;s++){var g=t.attributes[s];if(g.specified){var d=n(g.name),h="";a.indexOf(d)>-1&&(h=d),h&&(e[h]=g.value)}}var c=i(t),u=c.find("img").first().attr("alt"),m=c.attr("title"),p=r?c.attr(r):c.find("img").first().attr("src");e.thumb=p,o&&!e.subHtml&&(e.subHtml=m||u||""),e.alt=u||m||"",l.push(e)})),l},u=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},m={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},p="lgAfterAppendSlide",f="lgInit",v="lgHasVideo",y="lgContainerResize",b="lgUpdateSlides",C="lgAfterAppendSubHtml",I="lgBeforeOpen",w="lgAfterOpen",x="lgSlideItemLoad",S="lgBeforeSlide",T="lgAfterSlide",E="lgPosterClick",O="lgDragStart",L="lgDragMove",D="lgDragEnd",z="lgBeforeNextSlide",G="lgBeforePrevSlide",M="lgBeforeClose",k="lgAfterClose",A=0,B=function(){function s(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(A++,this.lgId=A,this.el=t,this.LGel=i(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return s.prototype.generateSettings=function(e){if(this.settings=t(t({},m),e),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():u()){var i=t(t({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=t(t({},this.settings),i)}},s.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},s.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(f,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},s.prototype.openGalleryOnItemClick=function(){for(var t=this,s=function(s){var o=n.items[s],r=i(o),l=e.generateUUID();r.attr("data-lg-id",l).on("click.lgcustom-item-"+l,(function(e){e.preventDefault();var i=t.settings.index||s;t.openGallery(i,o)}))},n=this,o=0;o<this.items.length;o++)s(o)},s.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(e){t.plugins.push(new e(t,i))}))},s.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},s.prototype.getSlideItem=function(t){return i(this.getSlideItemId(t))},s.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},s.prototype.getIdName=function(t){return t+"-"+this.lgId},s.prototype.getElementById=function(t){return i("#"+this.getIdName(t))},s.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},s.prototype.buildStructure=function(){var t=this;if(!(this.$container&&this.$container.get())){var e="",s="";this.settings.controls&&(e='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-item"!==this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var o=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",r=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",l="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),a=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",g=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",d='\n <div class="'+l+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+o+" "+r+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+n+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+e+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+g+"\n "+a+"\n </div>\n "+(".lg-outer"===this.settings.appendSubHtmlTo?s:"")+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?s:"")+"\n </div>\n </div>\n </div>\n ";i(this.settings.container).css("position","relative").append(d),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var h=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(h+="lg-grab "),this.settings.showAfterLoad&&(h+="lg-show-after-load"),this.outer.addClass(h),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),i(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},s.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,s=e.bottom;if(this.currentImageSize=o(this.items[this.index],this.outer,i+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var n=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",n)}this.LGel.trigger(y)}},s.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},s.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var s=0;this.galleryItems.some((function(t,e){return t.src===i&&(s=e,!0)})),this.currentItemsInDom=this.organizeSlideItems(s,-1),this.loadContent(s,!0),this.getSlideItem(s).addClass("lg-current"),this.index=s,this.updateCurrentCounter(s),this.LGel.trigger(b)}else this.closeGallery()},s.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=i(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return c(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},s.prototype.openGallery=function(t,e){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var l="";n.forEach((function(t){l=l+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(l),this.addHtml(t);var a="";this.mediaContainerPosition=this.getMediaContainerPosition();var g=this.mediaContainerPosition,d=g.top,h=g.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(d,h),this.zoomFromOrigin&&e&&(this.currentImageSize=o(e,this.outer,d+h,this.galleryItems[t].__slideVideoInfo&&this.settings.videoMaxSize),a=r(e,this.outer,d,h,this.currentImageSize)),this.zoomFromOrigin&&a||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var c=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),c),this.index=t,this.LGel.trigger(I),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=i(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&a){var e=s.getSlideItem(t);e.css("transform",a),setTimeout((function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){e.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&a||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(w)})),document.body===this.settings.container&&i("html").addClass("lg-on")}},s.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},s.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},s.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},s.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},s.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},s.prototype.addHtml=function(t){var e,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!s)if(e){var n=e.substring(0,1);"."!==n&&"#"!==n||(e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?i(this.items).eq(t).find(e).first().html():i(e).first().html())}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(e);else{var o=i(this.getSlideItemId(t));s?o.load(s):o.append('<div class="lg-sub-html">'+e+"</div>")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(C,{index:t})},s.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},s.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},s.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},s.prototype.getDummyImageContent=function(t,e,s){var n;if(this.settings.dynamic||(n=i(this.items).eq(e)),n){var o=void 0;if(!(o=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var r="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+o+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},s.prototype.setImgMarkup=function(t,e,i){var s=this.galleryItems[i],n=s.alt,o=s.srcset,r=s.sizes,l=s.sources,g=n?'alt="'+n+'"':"",d='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(e,i,g):a(i,t,g,o,r,l))+"</picture>";e.prepend(d)},s.prototype.onLgObjectLoad=function(t,e,i,s,n){var o=this;n&&this.LGel.trigger(x,{index:e,delay:i||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,e,i,s,n)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),s)},s.prototype.handleLgObjectLoad=function(t,e,i,s,n){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(x,{index:e,delay:i||0})}),s)},s.prototype.isVideo=function(t,e){if(!t)return this.galleryItems[e].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(e+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var i=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),s=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return i?{youtube:i}:s?{vimeo:s}:n?{wistia:n}:void 0},s.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach((function(t,i){t.__slideVideoInfo=e.isVideo(t.src,i)}))},s.prototype.loadContent=function(t,e){var s=this,n=this.galleryItems[t],r=i(this.getSlideItemId(t)),c=n.poster,u=n.srcset,m=n.sizes,f=n.sources,y=n.src,b=n.video,C=b&&"string"==typeof b?JSON.parse(b):b;if(n.responsive){var I=n.responsive.split(",");y=g(I)||y}var w=n.__slideVideoInfo,x="",S=!!n.iframe;if(!r.hasClass("lg-loaded")){if(w){var T=this.mediaContainerPosition,E=T.top,O=T.bottom,L=o(this.items[t],this.outer,E+O,w&&this.settings.videoMaxSize);x=this.getVideoContStyle(L)}if(S){var D=l(this.settings.iframeWidth,this.settings.iframeHeight,y,n.iframeTitle);r.prepend(D)}else if(c){var z="",G=!this.lGalleryOn,M=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;M&&(z=this.getDummyImageContent(r,t,""));D=h(c,z||"",x,w);r.prepend(D);var k=(M?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!0,isFirstSlide:G})}),k)}else if(w){D='<div class="lg-video-cont " style="'+x+'"></div>';r.prepend(D),this.LGel.trigger(v,{index:t,src:y,html5Video:C,hasPoster:!1})}else if(this.setImgMarkup(y,r,t),u||f){var A=r.find(".lg-object");this.initPictureFill(A)}this.LGel.trigger(p,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var B=0,P=0;this.lGalleryOn||(P=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),P&&!i(document.body).hasClass("lg-from-hash")&&(B=P),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){r.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),r.hasClass("lg-loaded")||setTimeout((function(){if(r.find(".lg-img-wrap").append(a(t,y,"",u,m,n.sources)),u||f){var e=r.find(".lg-object");s.initPictureFill(e)}s.onLgObjectLoad(r,t,P,B,!0);var i=r.find(".lg-object").first();d(i.get())?s.loadContentOnLoad(t,r,B):i.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,r,B)}))}),this.settings.startAnimationDuration+100)),r.addClass("lg-loaded"),this.onLgObjectLoad(r,t,P,B,!1),w&&w.html5&&!c&&r.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!r.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){r.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(r.hasClass("lg-complete_")?this.preload(t):r.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},s.prototype.loadContentOnLoad=function(t,e,i){var s=this;setTimeout((function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),s.outer.removeClass("lg-first-slide-loading"),s.isDummyImageRemoved=!0,s.preload(t)}),i+300)},s.prototype.getItemsToBeInsertedToDom=function(t,e,i){var s=this;void 0===i&&(i=0);var n=[],o=Math.max(i,3);o=Math.min(o,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,e){n.push("lg-item-"+s.lgId+"-"+e)})),n;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-o/2&&l>=0;l--)n.push("lg-item-"+this.lgId+"-"+l);var a=n.length;for(l=0;l<o-a;l++)n.push("lg-item-"+this.lgId+"-"+(t+l+1))}else{for(l=t;l<=this.galleryItems.length-1&&l<t+o/2;l++)n.push("lg-item-"+this.lgId+"-"+l);for(a=n.length,l=0;l<o-a;l++)n.push("lg-item-"+this.lgId+"-"+(t-l-1))}return this.settings.loop&&(t===this.galleryItems.length-1?n.push("lg-item-"+this.lgId+"-0"):0===t&&n.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===n.indexOf(r)&&n.push("lg-item-"+this.lgId+"-"+e),n},s.prototype.organizeSlideItems=function(t,e){var s=this,n=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return n.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&i("#"+t).remove()})),n},s.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(e){t=0}return t},s.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},s.prototype.makeSlideAnimation=function(t,e,i){var s=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout((function(){s.outer.addClass("lg-no-trans"),s.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout((function(){s.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),s.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},s.prototype.slide=function(t,e,i,s){var n=this,r=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,r),!this.lGalleryOn||r!==t){var l=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var a=this.getSlideItem(t),g=this.getSlideItem(r),d=this.galleryItems[t],h=d.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(d)),this.setDownloadValue(t),h){var c=this.mediaContainerPosition,u=c.top,m=c.bottom,p=o(this.items[t],this.outer,u+m,h&&this.settings.videoMaxSize);this.resizeVideoSlide(t,p)}if(this.LGel.trigger(S,{prevIndex:r,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),s||(t<r?s="prev":t>r&&(s="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var f=void 0,v=void 0;l>2?(f=t-1,v=t+1,(0===t&&r===l-1||t===l-1&&0===r)&&(v=0,f=l-1)):(f=0,v=1),"prev"===s?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(f).addClass("lg-prev-slide"),a.addClass("lg-current")}else this.makeSlideAnimation(s,a,g);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){n.lGalleryOn&&n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(e?0:this.settings.slideDelay)),setTimeout((function(){n.lgBusy=!1,g.removeClass("lg-slide-progress"),n.LGel.trigger(T,{prevIndex:r,index:t,fromTouch:e,fromThumb:i})}),(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},s.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},s.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},s.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},s.prototype.touchMove=function(t,e,i){var s=e.pageX-t.pageX,n=e.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(s)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,s,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*s/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+s-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+s+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var g=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",g);var d=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(r,0,n,d,d),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},s.prototype.touchEnd=function(t,e,s){var n,o=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){o.$container.removeClass("lg-dragging-vertical"),o.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var r=!0;if("horizontal"===o.swipeDirection){n=t.pageX-e.pageX;var l=Math.abs(t.pageX-e.pageX);n<0&&l>o.settings.swipeThreshold?(o.goToNextSlide(!0),r=!1):n>0&&l>o.settings.swipeThreshold&&(o.goToPrevSlide(!0),r=!1)}else if("vertical"===o.swipeDirection){if(n=Math.abs(t.pageY-e.pageY),o.settings.closable&&o.settings.swipeToClose&&n>100)return void o.closeGallery();o.$backdrop.css("opacity",1)}if(o.outer.find(".lg-item").removeAttr("style"),r&&Math.abs(t.pageX-e.pageX)<5){var a=i(s.target);o.isPosterElement(a)&&o.LGel.trigger(E)}o.swipeDirection=void 0})),setTimeout((function(){o.outer.hasClass("lg-dragging")||"lg-slide"===o.settings.mode||o.outer.removeClass("lg-slide")}),this.settings.speed+100)},s.prototype.enableSwipe=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!i(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(o=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(i){o&&"swipe"===t.touchAction&&1===i.targetTouches.length&&(s={pageX:i.targetTouches[0].pageX,pageY:i.targetTouches[0].pageY},t.touchMove(e,s,i),n=!0)})),this.$inner.on("touchend.lg",(function(r){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,e,r);else if(o){var l=i(r.target);t.isPosterElement(l)&&t.LGel.trigger(E)}t.touchAction=void 0,o=!1}})))},s.prototype.enableDrag=function(){var t=this,e={},s={},n=!1,o=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);(i(s.target).hasClass("lg-item")||o.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(O))))})),i(window).on("mousemove.lg.global"+this.lgId,(function(i){n&&t.lgOpened&&(o=!0,s={pageX:i.pageX,pageY:i.pageY},t.touchMove(e,s),t.LGel.trigger(L))})),i(window).on("mouseup.lg.global"+this.lgId,(function(r){if(t.lgOpened){var l=i(r.target);o?(o=!1,t.touchEnd(s,e,r),t.LGel.trigger(D)):t.isPosterElement(l)&&t.LGel.trigger(E),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},s.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(i(e.target))&&t.LGel.trigger(E)}))},s.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},s.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(z,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger(z,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){e.outer.removeClass("lg-right-end")}),400)))},s.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger(G,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){e.outer.removeClass("lg-left-end")}),400)))},s.prototype.keyPress=function(){var t=this;i(window).on("keydown.lg.global"+this.lgId,(function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))}))},s.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},s.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},s.prototype.setTranslate=function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+s+", "+n+", 1)")},s.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(e){!e.deltaY||t.galleryItems.length<2||(e.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),e.preventDefault())}))},s.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},s.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},s.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},s.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=i(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},s.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var e=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var n=i(s.target);e=!!t.isSlideElement(n)})),this.outer.on("mousemove.lg",(function(){e=!1})),this.outer.on("mouseup.lg",(function(s){var n=i(s.target);t.isSlideElement(n)&&e&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},s.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(M),i(window).scrollTop(this.prevScrollTop);var s,n=this.items[this.index];if(this.zoomFromOrigin&&n){var l=this.mediaContainerPosition,a=l.top,g=l.bottom,d=o(n,this.outer,a+g,this.galleryItems[this.index].__slideVideoInfo&&this.settings.videoMaxSize);s=r(n,this.outer,a,g,d)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,i("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var h=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){e.zoomFromOrigin&&s&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger(k,{instance:e}),e.outer.get()&&e.outer.get().blur(),e.lgOpened=!1}),h+100),h+100},s.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},s.prototype.destroyModules=function(t){this.plugins.forEach((function(e){try{t?e.destroy():e.closeGallery&&e.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},s.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(b)},s.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},s.prototype.destroy=function(){var t=this,e=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),i(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),e),e},s}();return function(t,e){return new B(t,e)}}));

@@ -6,3 +6,3 @@ /**

*/
var t,i,s,n;const e=globalThis.trustedTypes,o=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,r="?"+h,l=`<${r}>`,a=document,u=(t="")=>a.createComment(t),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,f=/-->/g,v=/>/g,m=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,p=/'/g,b=/"/g,y=/^(?:script|style|textarea)$/i,w=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),x=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),S=new WeakMap,k=a.createTreeWalker(a,129,null,!1),C=(t,i)=>{const s=t.length-1,n=[];let e,r=2===i?"<svg>":"",a=g;for(let i=0;i<s;i++){const s=t[i];let o,u,c=-1,d=0;for(;d<s.length&&(a.lastIndex=d,u=a.exec(s),null!==u);)d=a.lastIndex,a===g?"!--"===u[1]?a=f:void 0!==u[1]?a=v:void 0!==u[2]?(y.test(u[2])&&(e=RegExp("</"+u[2],"g")),a=m):void 0!==u[3]&&(a=m):a===m?">"===u[0]?(a=null!=e?e:g,c=-1):void 0===u[1]?c=-2:(c=a.lastIndex-u[2].length,o=u[1],a=void 0===u[3]?m:'"'===u[3]?b:p):a===b||a===p?a=m:a===f||a===v?a=g:(a=m,e=void 0);const w=a===m&&t[i+1].startsWith("/>")?" ":"";r+=a===g?s+l:c>=0?(n.push(o),s.slice(0,c)+"$lit$"+s.slice(c)+h+w):s+h+(-2===c?(n.push(void 0),i):w)}const u=r+(t[s]||"<?>")+(2===i?"</svg>":"");return[void 0!==o?o.createHTML(u):u,n]};class z{constructor({strings:t,_$litType$:i},s){let n;this.parts=[];let o=0,l=0;const a=t.length-1,c=this.parts,[d,g]=C(t,i);if(this.el=z.createElement(d,s),k.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(n=k.nextNode())&&c.length<a;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const i of n.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(h)){const s=g[l++];if(t.push(i),void 0!==s){const t=n.getAttribute(s.toLowerCase()+"$lit$").split(h),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?I:"?"===i[1]?$:"@"===i[1]?E:j})}else c.push({type:6,index:o})}for(const i of t)n.removeAttribute(i)}if(y.test(n.tagName)){const t=n.textContent.split(h),i=t.length-1;if(i>0){n.textContent=e?e.emptyScript:"";for(let s=0;s<i;s++)n.append(t[s],u()),k.nextNode(),c.push({type:2,index:++o});n.append(t[i],u())}}}else if(8===n.nodeType)if(n.data===r)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=n.data.indexOf(h,t+1));)c.push({type:7,index:o}),t+=h.length-1}o++}}static createElement(t,i){const s=a.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,n){var e,o,h,r;if(i===x)return i;let l=void 0!==n?null===(e=s.Σi)||void 0===e?void 0:e[n]:s.Σo;const a=c(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(o=null==l?void 0:l.O)||void 0===o||o.call(l,!1),void 0===a?l=void 0:(l=new a(t),l.T(t,s,n)),void 0!==n?(null!==(h=(r=s).Σi)&&void 0!==h?h:r.Σi=[])[n]=l:s.Σo=l),void 0!==l&&(i=M(t,l.S(t,i.values),l,n)),i}class A{constructor(t,i){this.l=[],this.N=void 0,this.D=t,this.M=i}u(t){var i;const{el:{content:s},parts:n}=this.D,e=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:a).importNode(s,!0);k.currentNode=e;let o=k.nextNode(),h=0,r=0,l=n[0];for(;void 0!==l;){if(h===l.index){let i;2===l.type?i=new O(o,o.nextSibling,this,t):1===l.type?i=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(i=new P(o,this,t)),this.l.push(i),l=n[++r]}h!==(null==l?void 0:l.index)&&(o=k.nextNode(),h++)}return e}v(t){let i=0;for(const s of this.l)void 0!==s&&(void 0!==s.strings?(s.I(t,s,i),i+=s.strings.length-2):s.I(t[i])),i++}}class O{constructor(t,i,s,n){this.type=2,this.N=void 0,this.A=t,this.B=i,this.M=s,this.options=n}setConnected(t){var i;null===(i=this.P)||void 0===i||i.call(this,t)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(t,i=this){t=M(this,t,i),c(t)?t===T||null==t||""===t?(this.H!==T&&this.R(),this.H=T):t!==this.H&&t!==x&&this.m(t):void 0!==t._$litType$?this._(t):void 0!==t.nodeType?this.$(t):(t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.g(t):this.m(t)}k(t,i=this.B){return this.A.parentNode.insertBefore(t,i)}$(t){this.H!==t&&(this.R(),this.H=this.k(t))}m(t){const i=this.A.nextSibling;null!==i&&3===i.nodeType&&(null===this.B?null===i.nextSibling:i===this.B.previousSibling)?i.data=t:this.$(a.createTextNode(t)),this.H=t}_(t){var i;const{values:s,_$litType$:n}=t,e="number"==typeof n?this.C(t):(void 0===n.el&&(n.el=z.createElement(n.h,this.options)),n);if((null===(i=this.H)||void 0===i?void 0:i.D)===e)this.H.v(s);else{const t=new A(e,this),i=t.u(this.options);t.v(s),this.$(i),this.H=t}}C(t){let i=S.get(t.strings);return void 0===i&&S.set(t.strings,i=new z(t)),i}g(t){d(this.H)||(this.H=[],this.R());const i=this.H;let s,n=0;for(const e of t)n===i.length?i.push(s=new O(this.k(u()),this.k(u()),this,this.options)):s=i[n],s.I(e),n++;n<i.length&&(this.R(s&&s.B.nextSibling,n),i.length=n)}R(t=this.A.nextSibling,i){var s;for(null===(s=this.P)||void 0===s||s.call(this,!1,!0,i);t&&t!==this.B;){const i=t.nextSibling;t.remove(),t=i}}}class j{constructor(t,i,s,n,e){this.type=1,this.H=T,this.N=void 0,this.V=void 0,this.element=t,this.name=i,this.M=n,this.options=e,s.length>2||""!==s[0]||""!==s[1]?(this.H=Array(s.length-1).fill(T),this.strings=s):this.H=T}get tagName(){return this.element.tagName}I(t,i=this,s,n){const e=this.strings;let o=!1;if(void 0===e)t=M(this,t,i,0),o=!c(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const n=t;let h,r;for(t=e[0],h=0;h<e.length-1;h++)r=M(this,n[s+h],i,h),r===x&&(r=this.H[h]),o||(o=!c(r)||r!==this.H[h]),r===T?t=T:t!==T&&(t+=(null!=r?r:"")+e[h+1]),this.H[h]=r}o&&!n&&this.W(t)}W(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends j{constructor(){super(...arguments),this.type=3}W(t){this.element[this.name]=t===T?void 0:t}}class $ extends j{constructor(){super(...arguments),this.type=4}W(t){t&&t!==T?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class E extends j{constructor(){super(...arguments),this.type=5}I(t,i=this){var s;if((t=null!==(s=M(this,t,i,0))&&void 0!==s?s:T)===x)return;const n=this.H,e=t===T&&n!==T||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==T&&(n===T||e);e&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this.H=t}handleEvent(t){var i,s;"function"==typeof this.H?this.H.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this.H.handleEvent(t)}}class P{constructor(t,i,s){this.element=t,this.type=6,this.N=void 0,this.V=void 0,this.M=i,this.options=s}I(t){M(this,t)}}null===(i=(t=globalThis).litHtmlPlatformSupport)||void 0===i||i.call(t,z,O),(null!==(s=(n=globalThis).litHtmlVersions)&&void 0!==s?s:n.litHtmlVersions=[]).push("2.0.0-rc.2");
var t,i,s,e;const n=globalThis.trustedTypes,o=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,r="?"+h,l=`<${r}>`,a=document,u=(t="")=>a.createComment(t),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,f=/-->/g,v=/>/g,m=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,p=/'/g,b=/"/g,y=/^(?:script|style|textarea)$/i,w=(t=>(i,...s)=>({_$litType$:t,strings:i,values:s}))(1),x=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),S=new WeakMap,k=a.createTreeWalker(a,129,null,!1),C=(t,i)=>{const s=t.length-1,e=[];let n,r=2===i?"<svg>":"",a=g;for(let i=0;i<s;i++){const s=t[i];let o,u,c=-1,d=0;for(;d<s.length&&(a.lastIndex=d,u=a.exec(s),null!==u);)d=a.lastIndex,a===g?"!--"===u[1]?a=f:void 0!==u[1]?a=v:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),a=m):void 0!==u[3]&&(a=m):a===m?">"===u[0]?(a=null!=n?n:g,c=-1):void 0===u[1]?c=-2:(c=a.lastIndex-u[2].length,o=u[1],a=void 0===u[3]?m:'"'===u[3]?b:p):a===b||a===p?a=m:a===f||a===v?a=g:(a=m,n=void 0);const w=a===m&&t[i+1].startsWith("/>")?" ":"";r+=a===g?s+l:c>=0?(e.push(o),s.slice(0,c)+"$lit$"+s.slice(c)+h+w):s+h+(-2===c?(e.push(void 0),i):w)}const u=r+(t[s]||"<?>")+(2===i?"</svg>":"");return[void 0!==o?o.createHTML(u):u,e]};class z{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let o=0,l=0;const a=t.length-1,c=this.parts,[d,g]=C(t,i);if(this.el=z.createElement(d,s),k.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(e=k.nextNode())&&c.length<a;){if(1===e.nodeType){if(e.hasAttributes()){const t=[];for(const i of e.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(h)){const s=g[l++];if(t.push(i),void 0!==s){const t=e.getAttribute(s.toLowerCase()+"$lit$").split(h),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:o,name:i[2],strings:t,ctor:"."===i[1]?I:"?"===i[1]?$:"@"===i[1]?E:j})}else c.push({type:6,index:o})}for(const i of t)e.removeAttribute(i)}if(y.test(e.tagName)){const t=e.textContent.split(h),i=t.length-1;if(i>0){e.textContent=n?n.emptyScript:"";for(let s=0;s<i;s++)e.append(t[s],u()),k.nextNode(),c.push({type:2,index:++o});e.append(t[i],u())}}}else if(8===e.nodeType)if(e.data===r)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=e.data.indexOf(h,t+1));)c.push({type:7,index:o}),t+=h.length-1}o++}}static createElement(t,i){const s=a.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){var n,o,h,r;if(i===x)return i;let l=void 0!==e?null===(n=s.Σi)||void 0===n?void 0:n[e]:s.Σo;const a=c(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(o=null==l?void 0:l.O)||void 0===o||o.call(l,!1),void 0===a?l=void 0:(l=new a(t),l.T(t,s,e)),void 0!==e?(null!==(h=(r=s).Σi)&&void 0!==h?h:r.Σi=[])[e]=l:s.Σo=l),void 0!==l&&(i=M(t,l.S(t,i.values),l,e)),i}class A{constructor(t,i){this.l=[],this.N=void 0,this.D=t,this.M=i}u(t){var i;const{el:{content:s},parts:e}=this.D,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:a).importNode(s,!0);k.currentNode=n;let o=k.nextNode(),h=0,r=0,l=e[0];for(;void 0!==l;){if(h===l.index){let i;2===l.type?i=new O(o,o.nextSibling,this,t):1===l.type?i=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(i=new P(o,this,t)),this.l.push(i),l=e[++r]}h!==(null==l?void 0:l.index)&&(o=k.nextNode(),h++)}return n}v(t){let i=0;for(const s of this.l)void 0!==s&&(void 0!==s.strings?(s.I(t,s,i),i+=s.strings.length-2):s.I(t[i])),i++}}class O{constructor(t,i,s,e){this.type=2,this.N=void 0,this.A=t,this.B=i,this.M=s,this.options=e}setConnected(t){var i;null===(i=this.P)||void 0===i||i.call(this,t)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(t,i=this){t=M(this,t,i),c(t)?t===T||null==t||""===t?(this.H!==T&&this.R(),this.H=T):t!==this.H&&t!==x&&this.m(t):void 0!==t._$litType$?this._(t):void 0!==t.nodeType?this.$(t):(t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.g(t):this.m(t)}k(t,i=this.B){return this.A.parentNode.insertBefore(t,i)}$(t){this.H!==t&&(this.R(),this.H=this.k(t))}m(t){const i=this.A.nextSibling;null!==i&&3===i.nodeType&&(null===this.B?null===i.nextSibling:i===this.B.previousSibling)?i.data=t:this.$(a.createTextNode(t)),this.H=t}_(t){var i;const{values:s,_$litType$:e}=t,n="number"==typeof e?this.C(t):(void 0===e.el&&(e.el=z.createElement(e.h,this.options)),e);if((null===(i=this.H)||void 0===i?void 0:i.D)===n)this.H.v(s);else{const t=new A(n,this),i=t.u(this.options);t.v(s),this.$(i),this.H=t}}C(t){let i=S.get(t.strings);return void 0===i&&S.set(t.strings,i=new z(t)),i}g(t){d(this.H)||(this.H=[],this.R());const i=this.H;let s,e=0;for(const n of t)e===i.length?i.push(s=new O(this.k(u()),this.k(u()),this,this.options)):s=i[e],s.I(n),e++;e<i.length&&(this.R(s&&s.B.nextSibling,e),i.length=e)}R(t=this.A.nextSibling,i){var s;for(null===(s=this.P)||void 0===s||s.call(this,!1,!0,i);t&&t!==this.B;){const i=t.nextSibling;t.remove(),t=i}}}class j{constructor(t,i,s,e,n){this.type=1,this.H=T,this.N=void 0,this.V=void 0,this.element=t,this.name=i,this.M=e,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this.H=Array(s.length-1).fill(T),this.strings=s):this.H=T}get tagName(){return this.element.tagName}I(t,i=this,s,e){const n=this.strings;let o=!1;if(void 0===n)t=M(this,t,i,0),o=!c(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const e=t;let h,r;for(t=n[0],h=0;h<n.length-1;h++)r=M(this,e[s+h],i,h),r===x&&(r=this.H[h]),o||(o=!c(r)||r!==this.H[h]),r===T?t=T:t!==T&&(t+=(null!=r?r:"")+n[h+1]),this.H[h]=r}o&&!e&&this.W(t)}W(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class I extends j{constructor(){super(...arguments),this.type=3}W(t){this.element[this.name]=t===T?void 0:t}}class $ extends j{constructor(){super(...arguments),this.type=4}W(t){t&&t!==T?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class E extends j{constructor(){super(...arguments),this.type=5}I(t,i=this){var s;if((t=null!==(s=M(this,t,i,0))&&void 0!==s?s:T)===x)return;const e=this.H,n=t===T&&e!==T||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,o=t!==T&&(e===T||n);n&&this.element.removeEventListener(this.name,this,e),o&&this.element.addEventListener(this.name,this,t),this.H=t}handleEvent(t){var i,s;"function"==typeof this.H?this.H.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this.H.handleEvent(t)}}class P{constructor(t,i,s){this.element=t,this.type=6,this.N=void 0,this.V=void 0,this.M=i,this.options=s}I(t){M(this,t)}}null===(i=(t=globalThis).litHtmlPlatformSupport)||void 0===i||i.call(t,z,O),(null!==(s=(e=globalThis).litHtmlVersions)&&void 0!==s?s:e.litHtmlVersions=[]).push("2.0.0-rc.2");
/**

@@ -18,3 +18,3 @@ * @license

* SPDX-License-Identifier: BSD-3-Clause
*/;var N,B,H,R;const L={toAttribute(t,i){switch(i){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},G=(t,i)=>i!==t&&(i==i||t==t),W={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:G};class Y extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var i;null!==(i=this.v)&&void 0!==i||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const n=this.Πp(s,i);void 0!==n&&(this.Πm.set(n,s),t.push(n))})),t}static createProperty(t,i=W){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,i);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(n){const e=this[t];this[i]=n,this.requestUpdate(t,e,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||W}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(F(t))}else void 0!==t&&i.push(F(t));return i}static Πp(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this.ΠU)&&void 0!==i?i:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this.ΠU)||void 0===i||i.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this.Πi.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{U?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const s=document.createElement("style");s.textContent=i.cssText,t.appendChild(s)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,i,s){this.K(t,s)}Πj(t,i,s=W){var n,e;const o=this.constructor.Πp(t,s);if(void 0!==o&&!0===s.reflect){const h=(null!==(e=null===(n=s.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==e?e:L.toAttribute)(i,s.type);this.Πh=t,null==h?this.removeAttribute(o):this.setAttribute(o,h),this.Πh=null}}K(t,i){var s,n,e;const o=this.constructor,h=o.Πm.get(t);if(void 0!==h&&this.Πh!==h){const t=o.getPropertyOptions(h),r=t.converter,l=null!==(e=null!==(n=null===(s=r)||void 0===s?void 0:s.fromAttribute)&&void 0!==n?n:"function"==typeof r?r:null)&&void 0!==e?e:L.fromAttribute;this.Πh=h,this[h]=l(i,t.type),this.Πh=null}}requestUpdate(t,i,s){let n=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||G)(this[t],i)?(this.L.has(t)||this.L.set(t,i),!0===s.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,i)=>this[i]=t)),this.Πi=void 0);let i=!1;const s=this.L;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this.Π$()}catch(t){throw i=!1,this.Π$(),t}i&&this.E(s)}willUpdate(t){}E(t){var i;null===(i=this.ΠU)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,i)=>this.Πj(i,this[i],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}
*/;var N,B,H,R;const L={toAttribute(t,i){switch(i){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},G=(t,i)=>i!==t&&(i==i||t==t),W={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:G};class Y extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var i;null!==(i=this.v)&&void 0!==i||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this.Πp(s,i);void 0!==e&&(this.Πm.set(e,s),t.push(e))})),t}static createProperty(t,i=W){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const n=this[t];this[i]=e,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||W}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)i.unshift(F(t))}else void 0!==t&&i.push(F(t));return i}static Πp(t,i){const s=i.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this.ΠU)&&void 0!==i?i:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this.ΠU)||void 0===i||i.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this.Πi.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{U?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((i=>{const s=document.createElement("style");s.textContent=i.cssText,t.appendChild(s)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,i,s){this.K(t,s)}Πj(t,i,s=W){var e,n;const o=this.constructor.Πp(t,s);if(void 0!==o&&!0===s.reflect){const h=(null!==(n=null===(e=s.converter)||void 0===e?void 0:e.toAttribute)&&void 0!==n?n:L.toAttribute)(i,s.type);this.Πh=t,null==h?this.removeAttribute(o):this.setAttribute(o,h),this.Πh=null}}K(t,i){var s,e,n;const o=this.constructor,h=o.Πm.get(t);if(void 0!==h&&this.Πh!==h){const t=o.getPropertyOptions(h),r=t.converter,l=null!==(n=null!==(e=null===(s=r)||void 0===s?void 0:s.fromAttribute)&&void 0!==e?e:"function"==typeof r?r:null)&&void 0!==n?n:L.fromAttribute;this.Πh=h,this[h]=l(i,t.type),this.Πh=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||G)(this[t],i)?(this.L.has(t)||this.L.set(t,i),!0===s.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,i)=>this[i]=t)),this.Πi=void 0);let i=!1;const s=this.L;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this.Π$()}catch(t){throw i=!1,this.Π$(),t}i&&this.E(s)}willUpdate(t){}E(t){var i;null===(i=this.ΠU)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,i)=>this.Πj(i,this[i],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}
/**

@@ -25,3 +25,3 @@ * @license

*/
var q,J,K,X,V,Z;Y.finalized=!0,Y.shadowRootOptions={mode:"open"},null===(B=(N=globalThis).reactiveElementPlatformSupport)||void 0===B||B.call(N,{ReactiveElement:Y}),(null!==(H=(R=globalThis).reactiveElementVersions)&&void 0!==H?H:R.reactiveElementVersions=[]).push("1.0.0-rc.1"),(null!==(q=(Z=globalThis).litElementVersions)&&void 0!==q?q:Z.litElementVersions=[]).push("3.0.0-rc.1");class Q extends Y{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();super.update(t),this.Φt=((t,i,s)=>{var n,e;const o=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:i;let h=o._$litPart$;if(void 0===h){const t=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:null;o._$litPart$=h=new O(i.insertBefore(u(),t),t,void 0,s)}return h.I(t),h})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return x}}Q.finalized=!0,Q._$litElement$=!0,null===(K=(J=globalThis).litElementHydrateSupport)||void 0===K||K.call(J,{LitElement:Q}),null===(V=(X=globalThis).litElementPlatformSupport)||void 0===V||V.call(X,{LitElement:Q});
var q,J,K,X,V,Z;Y.finalized=!0,Y.shadowRootOptions={mode:"open"},null===(B=(N=globalThis).reactiveElementPlatformSupport)||void 0===B||B.call(N,{ReactiveElement:Y}),(null!==(H=(R=globalThis).reactiveElementVersions)&&void 0!==H?H:R.reactiveElementVersions=[]).push("1.0.0-rc.1"),(null!==(q=(Z=globalThis).litElementVersions)&&void 0!==q?q:Z.litElementVersions=[]).push("3.0.0-rc.1");class Q extends Y{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,i;const s=super.createRenderRoot();return null!==(t=(i=this.renderOptions).renderBefore)&&void 0!==t||(i.renderBefore=s.firstChild),s}update(t){const i=this.render();super.update(t),this.Φt=((t,i,s)=>{var e,n;const o=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let h=o._$litPart$;if(void 0===h){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=h=new O(i.insertBefore(u(),t),t,void 0,s)}return h.I(t),h})(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return x}}Q.finalized=!0,Q._$litElement$=!0,null===(K=(J=globalThis).litElementHydrateSupport)||void 0===K||K.call(J,{LitElement:Q}),null===(V=(X=globalThis).litElementPlatformSupport)||void 0===V||V.call(X,{LitElement:Q});
/**

@@ -39,3 +39,3 @@ * @license

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -59,6 +59,6 @@ * Copyright (c) 2020 Sachin Neravath;

***************************************************************************** */
var it=function(){return(it=Object.assign||function(t){for(var i,s=1,n=arguments.length;s<n;s++)for(var e in i=arguments[s])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:null};var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),s}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var st=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"==t?i:3&i|8).toString(16)}))},t.prototype._getSelector=function(t,i){return void 0===i&&(i=document),"string"!=typeof t?t:(i=i||document,"#"===t.substring(0,1)?i.querySelector(t):i.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,i,s){var n=i.replace(/-([a-z])/gi,(function(t,i){return i.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(n)?(t.style[n.charAt(0).toLowerCase()+n.slice(1)]=s,t.style["webkit"+n]=s,t.style["moz"+n]=s,t.style["ms"+n]=s,t.style["o"+n]=s):t.style[n]=s},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,i){var s=i.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==s.indexOf(t)}))},t.prototype.attr=function(t,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(s){s.setAttribute(t,i)})),this)},t.prototype.find=function(t){return nt(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?nt(this.selector[0]):nt(this.selector)},t.prototype.eq=function(t){return nt(this.selector[t])},t.prototype.parent=function(){return nt(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var i=t.split(" ");return this._each((function(t){i.forEach((function(i){return t.removeAttribute(i)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var i=document.createElement("div");return i.className=t,this.firstElement.parentNode.insertBefore(i,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),i.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(i){t.split(" ").forEach((function(t){i.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(i){t.split(" ").forEach((function(t){i.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,i){var s=this;return this._each((function(n){s._setCssVendorPrefix(n,t,i)})),this},t.prototype.on=function(i,s){var n=this;return this.selector?(i.split(" ").forEach((function(i){Array.isArray(t.eventListeners[i])||(t.eventListeners[i]=[]),t.eventListeners[i].push(s),n.selector.addEventListener(i.split(".")[0],s)})),this):this},t.prototype.once=function(t,i){var s=this;return this.on(t,(function(){s.off(t),i(t)})),this},t.prototype.off=function(i){var s=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(n){s.isEventMatched(i,n)&&(t.eventListeners[n].forEach((function(t){s.selector.removeEventListener(n.split(".")[0],t)})),t.eventListeners[n]=[])})),this):this},t.prototype.trigger=function(t,i){if(!this.firstElement)return this;var s=new CustomEvent(t.split(".")[0],{detail:i||null});return this.firstElement.dispatchEvent(s),this},t.prototype.load=function(t){var i=this;return fetch(t).then((function(t){i.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(i){i.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(i){"string"==typeof t?i.insertAdjacentHTML("beforeend",t):i.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(i){i.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),i=nt("body").style().marginLeft;return{left:t.left-parseFloat(i)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function nt(t){return new st(t)}var et=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function ot(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var ht=function(t,i,s,n){void 0===s&&(s=0);var e=nt(t).attr("data-lg-size")||n;if(e){var o=e.split(",");if(o[1])for(var h=window.innerWidth,r=0;r<o.length;r++){var l=o[r];if(parseInt(l.split("-")[2],10)>h){e=l;break}r===o.length-1&&(e=l)}var a=e.split("-"),u=parseInt(a[0],10),c=parseInt(a[1],10),d=i.width(),g=i.height()-s,f=Math.min(d,u),v=Math.min(g,c),m=Math.min(f/u,v/c);return{width:u*m,height:c*m}}},rt=function(t,i,s,n,e){if(e){var o=nt(t).find("img").first();if(o.get()){var h=i.get().getBoundingClientRect(),r=h.width,l=i.height()-(s+n),a=o.width(),u=o.height(),c=o.style(),d=(r-a)/2-o.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+nt(window).scrollLeft()+h.left,g=(l-u)/2-o.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+nt(window).scrollTop()+s;return"translate3d("+(d*=-1)+"px, "+(g*=-1)+"px, 0) scale3d("+a/e.width+", "+u/e.height+", 1)"}}},lt=function(t,i,s,n){return'<div class="lg-video-cont lg-has-iframe" style="width:'+i+"; height: "+s+'">\n <iframe class="lg-object" frameborder="0" '+(n?'title="'+n+'"':"")+' src="'+t+'" allowfullscreen="true"></iframe>\n </div>'},at=function(t,i,s,n,e,o){var h="<img "+s+" "+(n?'srcset="'+n+'"':"")+" "+(e?'sizes="'+e+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+i+'" />',r="";o&&(r=("string"==typeof o?JSON.parse(o):o).map((function(t){var i="";return Object.keys(t).forEach((function(s){i+=" "+s+'="'+t[s]+'"'})),"<source "+i+"></source>"})));return""+r+h},ut=function(t){for(var i=[],s=[],n="",e=0;e<t.length;e++){var o=t[e].split(" ");""===o[0]&&o.splice(0,1),s.push(o[0]),i.push(o[1])}for(var h=window.innerWidth,r=0;r<i.length;r++)if(parseInt(i[r],10)>h){n=s[r];break}return n},ct=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},dt=function(t,i,s,n){return'<div class="lg-video-cont '+(n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+s+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(i||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},gt=function(t,i,s,n){var e=[],o=function(){for(var t=0,i=0,s=arguments.length;i<s;i++)t+=arguments[i].length;var n=Array(t),e=0;for(i=0;i<s;i++)for(var o=arguments[i],h=0,r=o.length;h<r;h++,e++)n[e]=o[h];return n}(et,i);return[].forEach.call(t,(function(t){for(var i={},h=0;h<t.attributes.length;h++){var r=t.attributes[h];if(r.specified){var l=ot(r.name),a="";o.indexOf(l)>-1&&(a=l),a&&(i[a]=r.value)}}var u=nt(t),c=u.find("img").first().attr("alt"),d=u.attr("title"),g=n?u.attr(n):u.find("img").first().attr("src");i.thumb=g,s&&!i.subHtml&&(i.subHtml=d||c||""),i.alt=c||d||"",e.push(i)})),e},ft=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},vt={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},mt="lgAfterAppendSlide",pt="lgInit",bt="lgHasVideo",yt="lgContainerResize",wt="lgUpdateSlides",xt="lgAfterAppendSubHtml",Tt="lgBeforeOpen",St="lgAfterOpen",kt="lgSlideItemLoad",Ct="lgBeforeSlide",zt="lgAfterSlide",Mt="lgPosterClick",At="lgDragStart",Ot="lgDragMove",jt="lgDragEnd",It="lgBeforeNextSlide",$t="lgBeforePrevSlide",Et="lgBeforeClose",Pt="lgAfterClose",Ut=0,_t=function(){function t(t,i){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(Ut++,this.lgId=Ut,this.el=t,this.LGel=nt(t),this.generateSettings(i),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=it(it({},vt),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():ft()){var i=it(it({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=it(it({},this.settings),i)}},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(pt,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,i=function(i){var n=s.items[i],e=nt(n),o=st.generateUUID();e.attr("data-lg-id",o).on("click.lgcustom-item-"+o,(function(s){s.preventDefault();var e=t.settings.index||i;t.openGallery(e,n)}))},s=this,n=0;n<this.items.length;n++)i(n)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(i){t.plugins.push(new i(t,nt))}))},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return nt(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return nt("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!(this.$container&&this.$container.get())){var i="",s="";this.settings.controls&&(i='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-sub-html"===this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var e=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",h="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),r=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",l=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",a='\n <div class="'+h+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+e+" "+o+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+n+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+i+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+l+"\n "+r+'\n </div>\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+s+"\n </div>\n </div>\n </div>\n ";nt(this.settings.container).css("position","relative").append(a),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var u=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(u+="lg-grab "),this.settings.showAfterLoad&&(u+="lg-show-after-load"),this.outer.addClass(u),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),nt(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].i;this.mediaContainerPosition=this.getMediaContainerPosition();var i=this.mediaContainerPosition,s=i.top,n=i.bottom;if(this.currentImageSize=ht(this.items[this.index],this.outer,s+n,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var e=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",e)}this.LGel.trigger(yt)}},t.prototype.resizeVideoSlide=function(t,i){var s=this.getVideoContStyle(i);this.getSlideItem(t).find(".lg-video-cont").attr("style",s)},t.prototype.updateSlides=function(t,i){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var s=this.galleryItems[i].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var n=0;this.galleryItems.some((function(t,i){return t.src===s&&(n=i,!0)})),this.currentItemsInDom=this.organizeSlideItems(n,-1),this.loadContent(n,!0),this.getSlideItem(n).addClass("lg-current"),this.index=n,this.updateCurrentCounter(n),this.LGel.trigger(wt)}else this.closeGallery()},t.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=nt(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return gt(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},t.prototype.openGallery=function(t,i){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var e="";n.forEach((function(t){e=e+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(e),this.addHtml(t);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var h=this.mediaContainerPosition,r=h.top,l=h.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(r,l),this.zoomFromOrigin&&i&&(this.currentImageSize=ht(i,this.outer,r+l,this.galleryItems[t].i&&this.settings.videoMaxSize),o=rt(i,this.outer,r,l,this.currentImageSize)),this.zoomFromOrigin&&o||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var a=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),a),this.index=t,this.LGel.trigger(Tt),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=nt(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&o){var i=s.getSlideItem(t);i.css("transform",o),setTimeout((function(){i.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){i.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&o||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(St)})),document.body===this.settings.container&&nt("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,i=this.settings.defaultCaptionHeight||this.outer.find(".lg-sub-html").get().clientHeight,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},t.prototype.setMediaContainerPosition=function(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.$content.css("top",t+"px").css("bottom",i+"px")},t.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var i,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:i=this.galleryItems[t].subHtml,!s)if(i){var n=i.substring(0,1);"."!==n&&"#"!==n||(i=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?nt(this.items).eq(t).find(i).first().html():nt(i).first().html())}else i="";if(".lg-sub-html"===this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(i);else{var e=nt(this.getSlideItemId(t));s?e.load(s):e.append('<div class="lg-sub-html">'+i+"</div>")}null!=i&&(""===i?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(xt,{index:t})},t.prototype.preload=function(t){for(var i=1;i<=this.settings.preload&&!(i>=this.galleryItems.length-t);i++)this.loadContent(t+i,!1);for(var s=1;s<=this.settings.preload&&!(t-s<0);s++)this.loadContent(t-s,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,i,s){var n;if(this.settings.dynamic||(n=nt(this.items).eq(i)),n){var e=void 0;if(!(e=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var o="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+e+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),o}return""},t.prototype.setImgMarkup=function(t,i,s){var n=this.galleryItems[s],e=n.alt,o=n.srcset,h=n.sizes,r=n.sources,l=e?'alt="'+e+'"':"",a='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(i,s,l):at(s,t,l,o,h,r))+"</picture>";i.prepend(a)},t.prototype.onLgObjectLoad=function(t,i,s,n,e){var o=this;e&&this.LGel.trigger(kt,{index:i,delay:s||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,i,s,n,e)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),n)},t.prototype.handleLgObjectLoad=function(t,i,s,n,e){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),e||o.LGel.trigger(kt,{index:i,delay:s||0})}),n)},t.prototype.isVideo=function(t,i){if(!t)return this.galleryItems[i].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),e=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:e?{wistia:e}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach((function(t,s){t.i=i.isVideo(t.src,s)}))},t.prototype.loadContent=function(t,i){var s=this,n=this.galleryItems[t],e=nt(this.getSlideItemId(t)),o=n.poster,h=n.srcset,r=n.sizes,l=n.sources,a=n.src,u=n.video,c=u&&"string"==typeof u?JSON.parse(u):u;if(n.responsive){var d=n.responsive.split(",");a=ut(d)||a}var g=n.i,f="",v=!!n.iframe;if(!e.hasClass("lg-loaded")){if(g){var m=this.mediaContainerPosition,p=m.top,b=m.bottom,y=ht(this.items[t],this.outer,p+b,g&&this.settings.videoMaxSize);f=this.getVideoContStyle(y)}if(v){var w=lt(a,this.settings.iframeWidth,this.settings.iframeHeight,n.iframeTitle);e.prepend(w)}else if(o){var x="",T=!this.lGalleryOn,S=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;S&&(x=this.getDummyImageContent(e,t,""));w=dt(o,x||"",f,g);e.prepend(w);var k=(S?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(bt,{index:t,src:a,html5Video:c,hasPoster:!0,isFirstSlide:T})}),k)}else if(g){w='<div class="lg-video-cont " style="'+f+'"></div>';e.prepend(w),this.LGel.trigger(bt,{index:t,src:a,html5Video:c,hasPoster:!1})}else if(this.setImgMarkup(a,e,t),h||l){var C=e.find(".lg-object");this.initPictureFill(C)}this.LGel.trigger(mt,{index:t}),this.lGalleryOn&&".lg-sub-html"!==this.settings.appendSubHtmlTo&&this.addHtml(t)}var z=0,M=0;this.lGalleryOn||(M=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),M&&!nt(document.body).hasClass("lg-from-hash")&&(z=M),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){e.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),e.hasClass("lg-loaded")||setTimeout((function(){if(e.find(".lg-img-wrap").append(at(t,a,"",h,r,n.sources)),h||l){var i=e.find(".lg-object");s.initPictureFill(i)}s.onLgObjectLoad(e,t,M,z,!0);var o=e.find(".lg-object").first();ct(o.get())?s.loadContentOnLoad(t,e,z):o.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,e,z)}))}),this.settings.startAnimationDuration+100)),e.addClass("lg-loaded"),this.onLgObjectLoad(e,t,M,z,!1),g&&g.html5&&!o&&e.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!e.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){e.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(e.hasClass("lg-complete_")?this.preload(t):e.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},t.prototype.loadContentOnLoad=function(t,i,s){var n=this;setTimeout((function(){i.find(".lg-dummy-img").remove(),i.removeClass("lg-first-slide"),n.outer.removeClass("lg-first-slide-loading"),n.isDummyImageRemoved=!0,n.preload(t)}),s+300)},t.prototype.getItemsToBeInsertedToDom=function(t,i,s){var n=this;void 0===s&&(s=0);var e=[],o=Math.max(s,3);o=Math.min(o,this.galleryItems.length);var h="lg-item-"+this.lgId+"-"+i;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,i){e.push("lg-item-"+n.lgId+"-"+i)})),e;if(t<(this.galleryItems.length-1)/2){for(var r=t;r>t-o/2&&r>=0;r--)e.push("lg-item-"+this.lgId+"-"+r);var l=e.length;for(r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)e.push("lg-item-"+this.lgId+"-"+r);for(l=e.length,r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?e.push("lg-item-"+this.lgId+"-0"):0===t&&e.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===e.indexOf(h)&&e.push("lg-item-"+this.lgId+"-"+i),e},t.prototype.organizeSlideItems=function(t,i){var s=this,n=this.getItemsToBeInsertedToDom(t,i,this.settings.numberOfSlideItemsInDom);return n.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&nt("#"+t).remove()})),n},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var i=this.outer.find(".lg-current").first().attr("id");t=parseInt(i.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var i=this.galleryItems[t];if(!1===i.downloadUrl||"false"===i.downloadUrl)this.outer.addClass("lg-hide-download");else{var s=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),s.attr("href",i.downloadUrl||i.src),i.download&&s.attr("download",i.download)}}},t.prototype.makeSlideAnimation=function(t,i,s){var n=this;this.lGalleryOn&&s.addClass("lg-slide-progress"),setTimeout((function(){n.outer.addClass("lg-no-trans"),n.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(i.addClass("lg-prev-slide"),s.addClass("lg-next-slide")):(i.addClass("lg-next-slide"),s.addClass("lg-prev-slide")),setTimeout((function(){n.outer.find(".lg-item").removeClass("lg-current"),i.addClass("lg-current"),n.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,i,s,n){var e=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var h=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var r=this.getSlideItem(t),l=this.getSlideItem(o),a=this.galleryItems[t],u=a.i;if(this.outer.attr("data-lg-slide-type",this.getSlideType(a)),this.setDownloadValue(t),u){var c=this.mediaContainerPosition,d=c.top,g=c.bottom,f=ht(this.items[t],this.outer,d+g,u&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(Ct,{prevIndex:o,index:t,fromTouch:!!i,fromThumb:!!s}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),n||(t<o?n="prev":t>o&&(n="next")),i){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var v=void 0,m=void 0;h>2?(v=t-1,m=t+1,(0===t&&o===h-1||t===h-1&&0===o)&&(m=0,v=h-1)):(v=0,m=1),"prev"===n?this.getSlideItem(m).addClass("lg-next-slide"):this.getSlideItem(v).addClass("lg-prev-slide"),r.addClass("lg-current")}else this.makeSlideAnimation(n,r,l);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){e.lGalleryOn&&e.loadContent(t,!0),".lg-sub-html"===e.settings.appendSubHtmlTo&&e.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(i?0:this.settings.slideDelay)),setTimeout((function(){e.lgBusy=!1,l.removeClass("lg-slide-progress"),e.LGel.trigger(zt,{prevIndex:o,index:t,fromTouch:i,fromThumb:s})}),(this.lGalleryOn?this.settings.speed+100:100)+(i?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.i?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,i,s){var n=i.pageX-t.pageX,e=i.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(n)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(e)>15&&(this.swipeDirection="vertical",o=!0),o){var h=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==s||s.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(h,n,0);var r=h.get().offsetWidth,l=15*r/100-Math.abs(10*n/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-r+n-l,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),r+n+l,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==s||s.preventDefault(),this.$container.addClass("lg-dragging-vertical");var a=1-Math.abs(e)/window.innerHeight;this.$backdrop.css("opacity",a);var u=1-Math.abs(e)/(2*window.innerWidth);this.setTranslate(h,0,e,u,u),Math.abs(e)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,i,s){var n,e=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){e.$container.removeClass("lg-dragging-vertical"),e.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if("horizontal"===e.swipeDirection){n=t.pageX-i.pageX;var h=Math.abs(t.pageX-i.pageX);n<0&&h>e.settings.swipeThreshold?(e.goToNextSlide(!0),o=!1):n>0&&h>e.settings.swipeThreshold&&(e.goToPrevSlide(!0),o=!1)}else if("vertical"===e.swipeDirection){if(n=Math.abs(t.pageY-i.pageY),e.settings.closable&&e.settings.swipeToClose&&n>100)return void e.closeGallery();e.$backdrop.css("opacity",1)}if(e.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(t.pageX-i.pageX)<5){var r=nt(s.target);e.isPosterElement(r)&&e.LGel.trigger(Mt)}e.swipeDirection=void 0})),setTimeout((function(){e.outer.hasClass("lg-dragging")||"lg-slide"===e.settings.mode||e.outer.removeClass("lg-slide")}),this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!nt(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(e=!0,t.touchAction="swipe",t.manageSwipeClass(),i={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){e&&"swipe"===t.touchAction&&1===o.targetTouches.length&&(s={pageX:o.targetTouches[0].pageX,pageY:o.targetTouches[0].pageY},t.touchMove(i,s,o),n=!0)})),this.$inner.on("touchend.lg",(function(o){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,i,o);else if(e){var h=nt(o.target);t.isPosterElement(h)&&t.LGel.trigger(Mt)}t.touchAction=void 0,e=!1}})))},t.prototype.enableDrag=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var e=t.getSlideItem(t.index);(nt(s.target).hasClass("lg-item")||e.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),i={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(At))))})),nt(window).on("mousemove.lg.global"+this.lgId,(function(o){n&&t.lgOpened&&(e=!0,s={pageX:o.pageX,pageY:o.pageY},t.touchMove(i,s),t.LGel.trigger(Ot))})),nt(window).on("mouseup.lg.global"+this.lgId,(function(o){if(t.lgOpened){var h=nt(o.target);e?(e=!1,t.touchEnd(s,i,o),t.LGel.trigger(jt)):t.isPosterElement(h)&&t.LGel.trigger(Mt),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(i){!t.dragOrSwipeEnabled&&t.isPosterElement(nt(i.target))&&t.LGel.trigger(Mt)}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,i=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?i=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),i>-1&&this.getSlideItem(i).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(It,{index:this.index}),this.slide(this.index,!!t,!1,"next")):s?(this.index=0,this.LGel.trigger(It,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){i.outer.removeClass("lg-right-end")}),400)))},t.prototype.goToPrevSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger($t,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):s?(this.index=this.galleryItems.length-1,this.LGel.trigger($t,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){i.outer.removeClass("lg-left-end")}),400)))},t.prototype.keyPress=function(){var t=this;nt(window).on("keydown.lg.global"+this.lgId,(function(i){t.lgOpened&&!0===t.settings.escKey&&27===i.keyCode&&(i.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===i.keyCode&&(i.preventDefault(),t.goToPrevSlide()),39===i.keyCode&&(i.preventDefault(),t.goToNextSlide()))}))},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var i=this.getElementById("lg-prev"),s=this.getElementById("lg-next");t+1===this.galleryItems.length?s.attr("disabled","disabled").addClass("disabled"):s.removeAttr("disabled").removeClass("disabled"),0===t?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,i,s,n,e){void 0===n&&(n=1),void 0===e&&(e=1),t.css("transform","translate3d("+i+"px, "+s+"px, 0px) scale3d("+n+", "+e+", 1)")},t.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(i){!i.deltaY||t.galleryItems.length<2||(i.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),i.preventDefault())}))},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var i=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||i&&i.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var i=nt(this.items[t]);i.off("click.lgcustom-item-"+i.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var i=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var n=nt(s.target);i=!!t.isSlideElement(n)})),this.outer.on("mousemove.lg",(function(){i=!1})),this.outer.on("mouseup.lg",(function(s){var n=nt(s.target);t.isSlideElement(n)&&i&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},t.prototype.closeGallery=function(t){var i=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(Et),nt(window).scrollTop(this.prevScrollTop);var s,n=this.items[this.index];if(this.zoomFromOrigin&&n){var e=this.mediaContainerPosition,o=e.top,h=e.bottom,r=ht(n,this.outer,o+h,this.galleryItems[this.index].i&&this.settings.videoMaxSize);s=rt(n,this.outer,o,h,r)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,nt("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var l=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){i.zoomFromOrigin&&s&&i.outer.removeClass("lg-zoom-from-image"),i.$container.removeClass("lg-show"),i.$backdrop.removeAttr("style").css("transition-duration",i.settings.backdropDuration+"ms"),i.outer.removeClass("lg-closing "+i.settings.startClass),i.getSlideItem(i.index).removeClass("lg-start-end-progress"),i.$inner.empty(),i.lgOpened&&i.LGel.trigger(Pt,{instance:i}),i.outer.get()&&i.outer.get().blur(),i.lgOpened=!1}),l+100),l+100},t.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},t.prototype.destroyModules=function(t){this.plugins.forEach((function(i){try{t?i.destroy():i.closeGallery&&i.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(wt)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,i=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),nt(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),i),i},t}();var Dt=function(t,i,s,n){for(var e,o=arguments.length,h=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,s):n,r=t.length-1;r>=0;r--)(e=t[r])&&(h=(o<3?e(h):o>3?e(i,s,h):e(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};let Ft=class extends Q{constructor(){super(...arguments),this.settings={}}getSelector(t){const i=t.assignedNodes({flatten:!0});return Array.prototype.filter.call(i,(t=>t.nodeType==Node.ELEMENT_NODE))}firstUpdated(){if(!this.shadowRoot)return;const t=this.shadowRoot.querySelector("slot"),i={selector:this.getSelector(t)},s={...this.settings,...i};this.galleryInstance=new _t(this,s)}handleSlotchange(t){var i,s;const n=this.getSelector(t.target);this.galleryInstance&&(null===(i=this.galleryInstance)||void 0===i?void 0:i.galleryItems.length)!==n.length&&(this.galleryInstance.settings.selector=n,null===(s=this.galleryInstance)||void 0===s||s.refresh())}disconnectedCallback(){super.disconnectedCallback(),this.galleryInstance&&this.galleryInstance.destroy()}render(){return w`
var it=function(){return(it=Object.assign||function(t){for(var i,s=1,e=arguments.length;s<e;s++)for(var n in i=arguments[s])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:null};var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),s}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var st=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"==t?i:3&i|8).toString(16)}))},t.prototype._getSelector=function(t,i){return void 0===i&&(i=document),"string"!=typeof t?t:(i=i||document,"#"===t.substring(0,1)?i.querySelector(t):i.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,i,s){var e=i.replace(/-([a-z])/gi,(function(t,i){return i.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(e)?(t.style[e.charAt(0).toLowerCase()+e.slice(1)]=s,t.style["webkit"+e]=s,t.style["moz"+e]=s,t.style["ms"+e]=s,t.style["o"+e]=s):t.style[e]=s},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,i){var s=i.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==s.indexOf(t)}))},t.prototype.attr=function(t,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(s){s.setAttribute(t,i)})),this)},t.prototype.find=function(t){return et(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?et(this.selector[0]):et(this.selector)},t.prototype.eq=function(t){return et(this.selector[t])},t.prototype.parent=function(){return et(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var i=t.split(" ");return this._each((function(t){i.forEach((function(i){return t.removeAttribute(i)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var i=document.createElement("div");return i.className=t,this.firstElement.parentNode.insertBefore(i,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),i.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(i){t.split(" ").forEach((function(t){i.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(i){t.split(" ").forEach((function(t){i.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,i){var s=this;return this._each((function(e){s._setCssVendorPrefix(e,t,i)})),this},t.prototype.on=function(i,s){var e=this;return this.selector?(i.split(" ").forEach((function(i){Array.isArray(t.eventListeners[i])||(t.eventListeners[i]=[]),t.eventListeners[i].push(s),e.selector.addEventListener(i.split(".")[0],s)})),this):this},t.prototype.once=function(t,i){var s=this;return this.on(t,(function(){s.off(t),i(t)})),this},t.prototype.off=function(i){var s=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(e){s.isEventMatched(i,e)&&(t.eventListeners[e].forEach((function(t){s.selector.removeEventListener(e.split(".")[0],t)})),t.eventListeners[e]=[])})),this):this},t.prototype.trigger=function(t,i){if(!this.firstElement)return this;var s=new CustomEvent(t.split(".")[0],{detail:i||null});return this.firstElement.dispatchEvent(s),this},t.prototype.load=function(t){var i=this;return fetch(t).then((function(t){i.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(i){i.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(i){"string"==typeof t?i.insertAdjacentHTML("beforeend",t):i.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(i){i.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),i=et("body").style().marginLeft;return{left:t.left-parseFloat(i)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function et(t){return new st(t)}var nt=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function ot(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var ht=function(t,i,s,e){void 0===s&&(s=0);var n=et(t).attr("data-lg-size")||e;if(n){var o=n.split(",");if(o[1])for(var h=window.innerWidth,r=0;r<o.length;r++){var l=o[r];if(parseInt(l.split("-")[2],10)>h){n=l;break}r===o.length-1&&(n=l)}var a=n.split("-"),u=parseInt(a[0],10),c=parseInt(a[1],10),d=i.width(),g=i.height()-s,f=Math.min(d,u),v=Math.min(g,c),m=Math.min(f/u,v/c);return{width:u*m,height:c*m}}},rt=function(t,i,s,e,n){if(n){var o=et(t).find("img").first();if(o.get()){var h=i.get().getBoundingClientRect(),r=h.width,l=i.height()-(s+e),a=o.width(),u=o.height(),c=o.style(),d=(r-a)/2-o.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+et(window).scrollLeft()+h.left,g=(l-u)/2-o.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+et(window).scrollTop()+s;return"translate3d("+(d*=-1)+"px, "+(g*=-1)+"px, 0) scale3d("+a/n.width+", "+u/n.height+", 1)"}}},lt=function(t,i,s,e){return'<div class="lg-video-cont lg-has-iframe" style="width:'+t+"; height: "+i+'">\n <iframe class="lg-object" frameborder="0" '+(e?'title="'+e+'"':"")+' src="'+s+'" allowfullscreen="true"></iframe>\n </div>'},at=function(t,i,s,e,n,o){var h="<img "+s+" "+(e?'srcset="'+e+'"':"")+" "+(n?'sizes="'+n+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+i+'" />',r="";o&&(r=("string"==typeof o?JSON.parse(o):o).map((function(t){var i="";return Object.keys(t).forEach((function(s){i+=" "+s+'="'+t[s]+'"'})),"<source "+i+"></source>"})));return""+r+h},ut=function(t){for(var i=[],s=[],e="",n=0;n<t.length;n++){var o=t[n].split(" ");""===o[0]&&o.splice(0,1),s.push(o[0]),i.push(o[1])}for(var h=window.innerWidth,r=0;r<i.length;r++)if(parseInt(i[r],10)>h){e=s[r];break}return e},ct=function(t){return!!t&&(!!t.complete&&0!==t.naturalWidth)},dt=function(t,i,s,e){return'<div class="lg-video-cont '+(e&&e.youtube?"lg-has-youtube":e&&e.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+s+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(i||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},gt=function(t,i,s,e){var n=[],o=function(){for(var t=0,i=0,s=arguments.length;i<s;i++)t+=arguments[i].length;var e=Array(t),n=0;for(i=0;i<s;i++)for(var o=arguments[i],h=0,r=o.length;h<r;h++,n++)e[n]=o[h];return e}(nt,i);return[].forEach.call(t,(function(t){for(var i={},h=0;h<t.attributes.length;h++){var r=t.attributes[h];if(r.specified){var l=ot(r.name),a="";o.indexOf(l)>-1&&(a=l),a&&(i[a]=r.value)}}var u=et(t),c=u.find("img").first().attr("alt"),d=u.attr("title"),g=e?u.attr(e):u.find("img").first().attr("src");i.thumb=g,s&&!i.subHtml&&(i.subHtml=d||c||""),i.alt=c||d||"",n.push(i)})),n},ft=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},vt={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},mt="lgAfterAppendSlide",pt="lgInit",bt="lgHasVideo",yt="lgContainerResize",wt="lgUpdateSlides",xt="lgAfterAppendSubHtml",Tt="lgBeforeOpen",St="lgAfterOpen",kt="lgSlideItemLoad",Ct="lgBeforeSlide",zt="lgAfterSlide",Mt="lgPosterClick",At="lgDragStart",Ot="lgDragMove",jt="lgDragEnd",It="lgBeforeNextSlide",$t="lgBeforePrevSlide",Et="lgBeforeClose",Pt="lgAfterClose",Ut=0,_t=function(){function t(t,i){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(Ut++,this.lgId=Ut,this.el=t,this.LGel=et(t),this.generateSettings(i),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=it(it({},vt),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():ft()){var i=it(it({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=it(it({},this.settings),i)}},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(pt,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,i=function(i){var e=s.items[i],n=et(e),o=st.generateUUID();n.attr("data-lg-id",o).on("click.lgcustom-item-"+o,(function(s){s.preventDefault();var n=t.settings.index||i;t.openGallery(n,e)}))},s=this,e=0;e<this.items.length;e++)i(e)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(i){t.plugins.push(new i(t,et))}))},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return et(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return et("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!(this.$container&&this.$container.get())){var i="",s="";this.settings.controls&&(i='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-item"!==this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var e="";this.settings.allowMediaOverlap&&(e+="lg-media-overlap ");var n=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",o=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",h="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),r=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",l=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",a='\n <div class="'+h+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+n+" "+o+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+e+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+i+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+l+"\n "+r+"\n </div>\n "+(".lg-outer"===this.settings.appendSubHtmlTo?s:"")+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?s:"")+"\n </div>\n </div>\n </div>\n ";et(this.settings.container).css("position","relative").append(a),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var u=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(u+="lg-grab "),this.settings.showAfterLoad&&(u+="lg-show-after-load"),this.outer.addClass(u),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),et(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].i;this.mediaContainerPosition=this.getMediaContainerPosition();var i=this.mediaContainerPosition,s=i.top,e=i.bottom;if(this.currentImageSize=ht(this.items[this.index],this.outer,s+e,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var n=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",n)}this.LGel.trigger(yt)}},t.prototype.resizeVideoSlide=function(t,i){var s=this.getVideoContStyle(i);this.getSlideItem(t).find(".lg-video-cont").attr("style",s)},t.prototype.updateSlides=function(t,i){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var s=this.galleryItems[i].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var e=0;this.galleryItems.some((function(t,i){return t.src===s&&(e=i,!0)})),this.currentItemsInDom=this.organizeSlideItems(e,-1),this.loadContent(e,!0),this.getSlideItem(e).addClass("lg-current"),this.index=e,this.updateCurrentCounter(e),this.LGel.trigger(wt)}else this.closeGallery()},t.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=et(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return gt(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},t.prototype.openGallery=function(t,i){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var e=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=e;var n="";e.forEach((function(t){n=n+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(n),this.addHtml(t);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var h=this.mediaContainerPosition,r=h.top,l=h.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(r,l),this.zoomFromOrigin&&i&&(this.currentImageSize=ht(i,this.outer,r+l,this.galleryItems[t].i&&this.settings.videoMaxSize),o=rt(i,this.outer,r,l,this.currentImageSize)),this.zoomFromOrigin&&o||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var a=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),a),this.index=t,this.LGel.trigger(Tt),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=et(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&o){var i=s.getSlideItem(t);i.css("transform",o),setTimeout((function(){i.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){i.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&o||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(St)})),document.body===this.settings.container&&et("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,i=this.outer.find(".lg-components .lg-sub-html").get(),s=this.settings.defaultCaptionHeight||i&&i.clientHeight||0,e=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(e?e.clientHeight:0)+s}},t.prototype.setMediaContainerPosition=function(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.$content.css("top",t+"px").css("bottom",i+"px")},t.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var i,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:i=this.galleryItems[t].subHtml,!s)if(i){var e=i.substring(0,1);"."!==e&&"#"!==e||(i=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?et(this.items).eq(t).find(i).first().html():et(i).first().html())}else i="";if(".lg-item"!==this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(i);else{var n=et(this.getSlideItemId(t));s?n.load(s):n.append('<div class="lg-sub-html">'+i+"</div>")}null!=i&&(""===i?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(xt,{index:t})},t.prototype.preload=function(t){for(var i=1;i<=this.settings.preload&&!(i>=this.galleryItems.length-t);i++)this.loadContent(t+i,!1);for(var s=1;s<=this.settings.preload&&!(t-s<0);s++)this.loadContent(t-s,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,i,s){var e;if(this.settings.dynamic||(e=et(this.items).eq(i)),e){var n=void 0;if(!(n=this.settings.exThumbImage?e.attr(this.settings.exThumbImage):e.find("img").first().attr("src")))return"";var o="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+n+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),o}return""},t.prototype.setImgMarkup=function(t,i,s){var e=this.galleryItems[s],n=e.alt,o=e.srcset,h=e.sizes,r=e.sources,l=n?'alt="'+n+'"':"",a='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(i,s,l):at(s,t,l,o,h,r))+"</picture>";i.prepend(a)},t.prototype.onLgObjectLoad=function(t,i,s,e,n){var o=this;n&&this.LGel.trigger(kt,{index:i,delay:s||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,i,s,e,n)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),e)},t.prototype.handleLgObjectLoad=function(t,i,s,e,n){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),n||o.LGel.trigger(kt,{index:i,delay:s||0})}),e)},t.prototype.isVideo=function(t,i){if(!t)return this.galleryItems[i].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),e=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:e?{vimeo:e}:n?{wistia:n}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach((function(t,s){t.i=i.isVideo(t.src,s)}))},t.prototype.loadContent=function(t,i){var s=this,e=this.galleryItems[t],n=et(this.getSlideItemId(t)),o=e.poster,h=e.srcset,r=e.sizes,l=e.sources,a=e.src,u=e.video,c=u&&"string"==typeof u?JSON.parse(u):u;if(e.responsive){var d=e.responsive.split(",");a=ut(d)||a}var g=e.i,f="",v=!!e.iframe;if(!n.hasClass("lg-loaded")){if(g){var m=this.mediaContainerPosition,p=m.top,b=m.bottom,y=ht(this.items[t],this.outer,p+b,g&&this.settings.videoMaxSize);f=this.getVideoContStyle(y)}if(v){var w=lt(this.settings.iframeWidth,this.settings.iframeHeight,a,e.iframeTitle);n.prepend(w)}else if(o){var x="",T=!this.lGalleryOn,S=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;S&&(x=this.getDummyImageContent(n,t,""));w=dt(o,x||"",f,g);n.prepend(w);var k=(S?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(bt,{index:t,src:a,html5Video:c,hasPoster:!0,isFirstSlide:T})}),k)}else if(g){w='<div class="lg-video-cont " style="'+f+'"></div>';n.prepend(w),this.LGel.trigger(bt,{index:t,src:a,html5Video:c,hasPoster:!1})}else if(this.setImgMarkup(a,n,t),h||l){var C=n.find(".lg-object");this.initPictureFill(C)}this.LGel.trigger(mt,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var z=0,M=0;this.lGalleryOn||(M=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),M&&!et(document.body).hasClass("lg-from-hash")&&(z=M),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){n.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),n.hasClass("lg-loaded")||setTimeout((function(){if(n.find(".lg-img-wrap").append(at(t,a,"",h,r,e.sources)),h||l){var i=n.find(".lg-object");s.initPictureFill(i)}s.onLgObjectLoad(n,t,M,z,!0);var o=n.find(".lg-object").first();ct(o.get())?s.loadContentOnLoad(t,n,z):o.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,n,z)}))}),this.settings.startAnimationDuration+100)),n.addClass("lg-loaded"),this.onLgObjectLoad(n,t,M,z,!1),g&&g.html5&&!o&&n.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!n.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){n.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(n.hasClass("lg-complete_")?this.preload(t):n.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},t.prototype.loadContentOnLoad=function(t,i,s){var e=this;setTimeout((function(){i.find(".lg-dummy-img").remove(),i.removeClass("lg-first-slide"),e.outer.removeClass("lg-first-slide-loading"),e.isDummyImageRemoved=!0,e.preload(t)}),s+300)},t.prototype.getItemsToBeInsertedToDom=function(t,i,s){var e=this;void 0===s&&(s=0);var n=[],o=Math.max(s,3);o=Math.min(o,this.galleryItems.length);var h="lg-item-"+this.lgId+"-"+i;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,i){n.push("lg-item-"+e.lgId+"-"+i)})),n;if(t<(this.galleryItems.length-1)/2){for(var r=t;r>t-o/2&&r>=0;r--)n.push("lg-item-"+this.lgId+"-"+r);var l=n.length;for(r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)n.push("lg-item-"+this.lgId+"-"+r);for(l=n.length,r=0;r<o-l;r++)n.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?n.push("lg-item-"+this.lgId+"-0"):0===t&&n.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===n.indexOf(h)&&n.push("lg-item-"+this.lgId+"-"+i),n},t.prototype.organizeSlideItems=function(t,i){var s=this,e=this.getItemsToBeInsertedToDom(t,i,this.settings.numberOfSlideItemsInDom);return e.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===e.indexOf(t)&&et("#"+t).remove()})),e},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var i=this.outer.find(".lg-current").first().attr("id");t=parseInt(i.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var i=this.galleryItems[t];if(!1===i.downloadUrl||"false"===i.downloadUrl)this.outer.addClass("lg-hide-download");else{var s=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),s.attr("href",i.downloadUrl||i.src),i.download&&s.attr("download",i.download)}}},t.prototype.makeSlideAnimation=function(t,i,s){var e=this;this.lGalleryOn&&s.addClass("lg-slide-progress"),setTimeout((function(){e.outer.addClass("lg-no-trans"),e.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(i.addClass("lg-prev-slide"),s.addClass("lg-next-slide")):(i.addClass("lg-next-slide"),s.addClass("lg-prev-slide")),setTimeout((function(){e.outer.find(".lg-item").removeClass("lg-current"),i.addClass("lg-current"),e.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,i,s,e){var n=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var h=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var r=this.getSlideItem(t),l=this.getSlideItem(o),a=this.galleryItems[t],u=a.i;if(this.outer.attr("data-lg-slide-type",this.getSlideType(a)),this.setDownloadValue(t),u){var c=this.mediaContainerPosition,d=c.top,g=c.bottom,f=ht(this.items[t],this.outer,d+g,u&&this.settings.videoMaxSize);this.resizeVideoSlide(t,f)}if(this.LGel.trigger(Ct,{prevIndex:o,index:t,fromTouch:!!i,fromThumb:!!s}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),e||(t<o?e="prev":t>o&&(e="next")),i){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var v=void 0,m=void 0;h>2?(v=t-1,m=t+1,(0===t&&o===h-1||t===h-1&&0===o)&&(m=0,v=h-1)):(v=0,m=1),"prev"===e?this.getSlideItem(m).addClass("lg-next-slide"):this.getSlideItem(v).addClass("lg-prev-slide"),r.addClass("lg-current")}else this.makeSlideAnimation(e,r,l);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){n.lGalleryOn&&n.loadContent(t,!0),".lg-item"!==n.settings.appendSubHtmlTo&&n.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(i?0:this.settings.slideDelay)),setTimeout((function(){n.lgBusy=!1,l.removeClass("lg-slide-progress"),n.LGel.trigger(zt,{prevIndex:o,index:t,fromTouch:i,fromThumb:s})}),(this.lGalleryOn?this.settings.speed+100:100)+(i?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.i?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,i,s){var e=i.pageX-t.pageX,n=i.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(e)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(n)>15&&(this.swipeDirection="vertical",o=!0),o){var h=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==s||s.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(h,e,0);var r=h.get().offsetWidth,l=15*r/100-Math.abs(10*e/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-r+e-l,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),r+e+l,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==s||s.preventDefault(),this.$container.addClass("lg-dragging-vertical");var a=1-Math.abs(n)/window.innerHeight;this.$backdrop.css("opacity",a);var u=1-Math.abs(n)/(2*window.innerWidth);this.setTranslate(h,0,n,u,u),Math.abs(n)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,i,s){var e,n=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){n.$container.removeClass("lg-dragging-vertical"),n.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if("horizontal"===n.swipeDirection){e=t.pageX-i.pageX;var h=Math.abs(t.pageX-i.pageX);e<0&&h>n.settings.swipeThreshold?(n.goToNextSlide(!0),o=!1):e>0&&h>n.settings.swipeThreshold&&(n.goToPrevSlide(!0),o=!1)}else if("vertical"===n.swipeDirection){if(e=Math.abs(t.pageY-i.pageY),n.settings.closable&&n.settings.swipeToClose&&e>100)return void n.closeGallery();n.$backdrop.css("opacity",1)}if(n.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(t.pageX-i.pageX)<5){var r=et(s.target);n.isPosterElement(r)&&n.LGel.trigger(Mt)}n.swipeDirection=void 0})),setTimeout((function(){n.outer.hasClass("lg-dragging")||"lg-slide"===n.settings.mode||n.outer.removeClass("lg-slide")}),this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,i={},s={},e=!1,n=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var e=t.getSlideItem(t.index);!et(s.target).hasClass("lg-item")&&!e.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(n=!0,t.touchAction="swipe",t.manageSwipeClass(),i={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){n&&"swipe"===t.touchAction&&1===o.targetTouches.length&&(s={pageX:o.targetTouches[0].pageX,pageY:o.targetTouches[0].pageY},t.touchMove(i,s,o),e=!0)})),this.$inner.on("touchend.lg",(function(o){if("swipe"===t.touchAction){if(e)e=!1,t.touchEnd(s,i,o);else if(n){var h=et(o.target);t.isPosterElement(h)&&t.LGel.trigger(Mt)}t.touchAction=void 0,n=!1}})))},t.prototype.enableDrag=function(){var t=this,i={},s={},e=!1,n=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);(et(s.target).hasClass("lg-item")||n.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),i={pageX:s.pageX,pageY:s.pageY},e=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(At))))})),et(window).on("mousemove.lg.global"+this.lgId,(function(o){e&&t.lgOpened&&(n=!0,s={pageX:o.pageX,pageY:o.pageY},t.touchMove(i,s),t.LGel.trigger(Ot))})),et(window).on("mouseup.lg.global"+this.lgId,(function(o){if(t.lgOpened){var h=et(o.target);n?(n=!1,t.touchEnd(s,i,o),t.LGel.trigger(jt)):t.isPosterElement(h)&&t.LGel.trigger(Mt),e&&(e=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(i){!t.dragOrSwipeEnabled&&t.isPosterElement(et(i.target))&&t.LGel.trigger(Mt)}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,i=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?i=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),i>-1&&this.getSlideItem(i).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(It,{index:this.index}),this.slide(this.index,!!t,!1,"next")):s?(this.index=0,this.LGel.trigger(It,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){i.outer.removeClass("lg-right-end")}),400)))},t.prototype.goToPrevSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger($t,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):s?(this.index=this.galleryItems.length-1,this.LGel.trigger($t,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){i.outer.removeClass("lg-left-end")}),400)))},t.prototype.keyPress=function(){var t=this;et(window).on("keydown.lg.global"+this.lgId,(function(i){t.lgOpened&&!0===t.settings.escKey&&27===i.keyCode&&(i.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===i.keyCode&&(i.preventDefault(),t.goToPrevSlide()),39===i.keyCode&&(i.preventDefault(),t.goToNextSlide()))}))},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var i=this.getElementById("lg-prev"),s=this.getElementById("lg-next");t+1===this.galleryItems.length?s.attr("disabled","disabled").addClass("disabled"):s.removeAttr("disabled").removeClass("disabled"),0===t?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,i,s,e,n){void 0===e&&(e=1),void 0===n&&(n=1),t.css("transform","translate3d("+i+"px, "+s+"px, 0px) scale3d("+e+", "+n+", 1)")},t.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(i){!i.deltaY||t.galleryItems.length<2||(i.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),i.preventDefault())}))},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var i=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||i&&i.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var i=et(this.items[t]);i.off("click.lgcustom-item-"+i.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var i=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var e=et(s.target);i=!!t.isSlideElement(e)})),this.outer.on("mousemove.lg",(function(){i=!1})),this.outer.on("mouseup.lg",(function(s){var e=et(s.target);t.isSlideElement(e)&&i&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},t.prototype.closeGallery=function(t){var i=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(Et),et(window).scrollTop(this.prevScrollTop);var s,e=this.items[this.index];if(this.zoomFromOrigin&&e){var n=this.mediaContainerPosition,o=n.top,h=n.bottom,r=ht(e,this.outer,o+h,this.galleryItems[this.index].i&&this.settings.videoMaxSize);s=rt(e,this.outer,o,h,r)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,et("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var l=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){i.zoomFromOrigin&&s&&i.outer.removeClass("lg-zoom-from-image"),i.$container.removeClass("lg-show"),i.$backdrop.removeAttr("style").css("transition-duration",i.settings.backdropDuration+"ms"),i.outer.removeClass("lg-closing "+i.settings.startClass),i.getSlideItem(i.index).removeClass("lg-start-end-progress"),i.$inner.empty(),i.lgOpened&&i.LGel.trigger(Pt,{instance:i}),i.outer.get()&&i.outer.get().blur(),i.lgOpened=!1}),l+100),l+100},t.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},t.prototype.destroyModules=function(t){this.plugins.forEach((function(i){try{t?i.destroy():i.closeGallery&&i.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(wt)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,i=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),et(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),i),i},t}();var Dt=function(t,i,s,e){for(var n,o=arguments.length,h=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e,r=t.length-1;r>=0;r--)(n=t[r])&&(h=(o<3?n(h):o>3?n(i,s,h):n(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};let Ft=class extends Q{constructor(){super(...arguments),this.settings={}}getSelector(t){const i=t.assignedNodes({flatten:!0});return Array.prototype.filter.call(i,(t=>t.nodeType==Node.ELEMENT_NODE))}firstUpdated(){if(!this.shadowRoot)return;const t=this.shadowRoot.querySelector("slot"),i={selector:this.getSelector(t)},s={...this.settings,...i};this.galleryInstance=new _t(this,s)}handleSlotchange(t){var i,s;const e=this.getSelector(t.target);this.galleryInstance&&(null===(i=this.galleryInstance)||void 0===i?void 0:i.galleryItems.length)!==e.length&&(this.galleryInstance.settings.selector=e,null===(s=this.galleryInstance)||void 0===s||s.refresh())}disconnectedCallback(){super.disconnectedCallback(),this.galleryInstance&&this.galleryInstance.destroy()}render(){return w`
<div id="container">
<slot @slotchange=${this.handleSlotchange}></slot>
</div>
`}};Dt([function(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):tt(t,i)}({type:Object})],Ft.prototype,"settings",void 0),Ft=Dt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:n}=i;return{kind:s,elements:n,finisher(i){window.customElements.define(t,i)}}})(t,i))("light-gallery")],Ft);export{Ft as LightGalleryLit};
`}};Dt([function(t){return(i,s)=>void 0!==s?((t,i,s)=>{i.constructor.createProperty(s,t)})(t,i,s):tt(t,i)}({type:Object})],Ft.prototype,"settings",void 0),Ft=Dt([(t=>i=>"function"==typeof i?((t,i)=>(window.customElements.define(t,i),i))(t,i):((t,i)=>{const{kind:s,elements:e}=i;return{kind:s,elements:e,finisher(i){window.customElements.define(t,i)}}})(t,i))("light-gallery")],Ft);export{Ft as LightGalleryLit};

@@ -14,3 +14,3 @@ var t,i;t=this,i=function(t,i){

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -34,3 +34,3 @@ * Copyright (c) 2020 Sachin Neravath;

***************************************************************************** */
var n=function(){return(n=Object.assign||function(t){for(var i,s=1,n=arguments.length;s<n;s++)for(var e in i=arguments[s])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:null};var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),s}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"==t?i:3&i|8).toString(16)}))},t.prototype._getSelector=function(t,i){return void 0===i&&(i=document),"string"!=typeof t?t:(i=i||document,"#"===t.substring(0,1)?i.querySelector(t):i.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,i,s){var n=i.replace(/-([a-z])/gi,(function(t,i){return i.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(n)?(t.style[n.charAt(0).toLowerCase()+n.slice(1)]=s,t.style["webkit"+n]=s,t.style["moz"+n]=s,t.style["ms"+n]=s,t.style["o"+n]=s):t.style[n]=s},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,i){var s=i.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==s.indexOf(t)}))},t.prototype.attr=function(t,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(s){s.setAttribute(t,i)})),this)},t.prototype.find=function(t){return o(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?o(this.selector[0]):o(this.selector)},t.prototype.eq=function(t){return o(this.selector[t])},t.prototype.parent=function(){return o(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var i=t.split(" ");return this._each((function(t){i.forEach((function(i){return t.removeAttribute(i)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var i=document.createElement("div");return i.className=t,this.firstElement.parentNode.insertBefore(i,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),i.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(i){t.split(" ").forEach((function(t){i.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(i){t.split(" ").forEach((function(t){i.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,i){var s=this;return this._each((function(n){s._setCssVendorPrefix(n,t,i)})),this},t.prototype.on=function(i,s){var n=this;return this.selector?(i.split(" ").forEach((function(i){Array.isArray(t.eventListeners[i])||(t.eventListeners[i]=[]),t.eventListeners[i].push(s),n.selector.addEventListener(i.split(".")[0],s)})),this):this},t.prototype.once=function(t,i){var s=this;return this.on(t,(function(){s.off(t),i(t)})),this},t.prototype.off=function(i){var s=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(n){s.isEventMatched(i,n)&&(t.eventListeners[n].forEach((function(t){s.selector.removeEventListener(n.split(".")[0],t)})),t.eventListeners[n]=[])})),this):this},t.prototype.trigger=function(t,i){if(!this.firstElement)return this;var s=new CustomEvent(t.split(".")[0],{detail:i||null});return this.firstElement.dispatchEvent(s),this},t.prototype.load=function(t){var i=this;return fetch(t).then((function(t){i.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(i){i.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(i){"string"==typeof t?i.insertAdjacentHTML("beforeend",t):i.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(i){i.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),i=o("body").style().marginLeft;return{left:t.left-parseFloat(i)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function o(t){return new e(t)}var h=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function r(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var l=function(t,i,s,n){void 0===s&&(s=0);var e=o(t).attr("data-lg-size")||n;if(e){var h=e.split(",");if(h[1])for(var r=window.innerWidth,l=0;l<h.length;l++){var a=h[l];if(parseInt(a.split("-")[2],10)>r){e=a;break}l===h.length-1&&(e=a)}var u=e.split("-"),c=parseInt(u[0],10),g=parseInt(u[1],10),d=i.width(),f=i.height()-s,v=Math.min(d,c),m=Math.min(f,g),p=Math.min(v/c,m/g);return{width:c*p,height:g*p}}},a=function(t,i,s,n,e){if(e){var h=o(t).find("img").first();if(h.get()){var r=i.get().getBoundingClientRect(),l=r.width,a=i.height()-(s+n),u=h.width(),c=h.height(),g=h.style(),d=(l-u)/2-h.offset().left+(parseFloat(g.paddingLeft)||0)+(parseFloat(g.borderLeft)||0)+o(window).scrollLeft()+r.left,f=(a-c)/2-h.offset().top+(parseFloat(g.paddingTop)||0)+(parseFloat(g.borderTop)||0)+o(window).scrollTop()+s;return"translate3d("+(d*=-1)+"px, "+(f*=-1)+"px, 0) scale3d("+u/e.width+", "+c/e.height+", 1)"}}},u=function(t,i,s,n){return'<div class="lg-video-cont lg-has-iframe" style="width:'+i+"; height: "+s+'">\n <iframe class="lg-object" frameborder="0" '+(n?'title="'+n+'"':"")+' src="'+t+'" allowfullscreen="true"></iframe>\n </div>'},c=function(t,i,s,n,e,o){var h="<img "+s+" "+(n?'srcset="'+n+'"':"")+" "+(e?'sizes="'+e+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+i+'" />',r="";return o&&(r=("string"==typeof o?JSON.parse(o):o).map((function(t){var i="";return Object.keys(t).forEach((function(s){i+=" "+s+'="'+t[s]+'"'})),"<source "+i+"></source>"}))),""+r+h},g=function(t){for(var i=[],s=[],n="",e=0;e<t.length;e++){var o=t[e].split(" ");""===o[0]&&o.splice(0,1),s.push(o[0]),i.push(o[1])}for(var h=window.innerWidth,r=0;r<i.length;r++)if(parseInt(i[r],10)>h){n=s[r];break}return n},d=function(t){return!!t&&!!t.complete&&0!==t.naturalWidth},f=function(t,i,s,n){return'<div class="lg-video-cont '+(n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+s+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(i||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},v=function(t,i,s,n){var e=[],l=function(){for(var t=0,i=0,s=arguments.length;i<s;i++)t+=arguments[i].length;var n=Array(t),e=0;for(i=0;i<s;i++)for(var o=arguments[i],h=0,r=o.length;h<r;h++,e++)n[e]=o[h];return n}(h,i);return[].forEach.call(t,(function(t){for(var i={},h=0;h<t.attributes.length;h++){var a=t.attributes[h];if(a.specified){var u=r(a.name),c="";l.indexOf(u)>-1&&(c=u),c&&(i[c]=a.value)}}var g=o(t),d=g.find("img").first().attr("alt"),f=g.attr("title"),v=n?g.attr(n):g.find("img").first().attr("src");i.thumb=v,s&&!i.subHtml&&(i.subHtml=f||d||""),i.alt=d||f||"",e.push(i)})),e},m=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},p={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},b="lgAfterAppendSlide",w="lgInit",y="lgHasVideo",x="lgContainerResize",T="lgUpdateSlides",k="lgAfterAppendSubHtml",z="lgBeforeOpen",M="lgAfterOpen",S="lgSlideItemLoad",j="lgBeforeSlide",A="lgAfterSlide",O="lgPosterClick",C="lgDragStart",I="lgDragMove",F="lgDragEnd",P="lgBeforeNextSlide",D="lgBeforePrevSlide",B="lgBeforeClose",E="lgAfterClose",H=0,_=function(){function t(t,i){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(H++,this.lgId=H,this.el=t,this.LGel=o(t),this.generateSettings(i),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=n(n({},p),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():m()){var i=n(n({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=n(n({},this.settings),i)}},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(w,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,i=function(i){var n=s.items[i],h=o(n),r=e.generateUUID();h.attr("data-lg-id",r).on("click.lgcustom-item-"+r,(function(s){s.preventDefault();var e=t.settings.index||i;t.openGallery(e,n)}))},s=this,n=0;n<this.items.length;n++)i(n)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(i){t.plugins.push(new i(t,o))}))},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return o(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return o("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!this.$container||!this.$container.get()){var i="",s="";this.settings.controls&&(i='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-sub-html"===this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var e=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",h=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",a=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",u='\n <div class="'+r+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+e+" "+h+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+n+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+i+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+a+"\n "+l+'\n </div>\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+s+"\n </div>\n </div>\n </div>\n ";o(this.settings.container).css("position","relative").append(u),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var c=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(c+="lg-grab "),this.settings.showAfterLoad&&(c+="lg-show-after-load"),this.outer.addClass(c),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),o(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].t;this.mediaContainerPosition=this.getMediaContainerPosition();var i=this.mediaContainerPosition,s=i.top,n=i.bottom;if(this.currentImageSize=l(this.items[this.index],this.outer,s+n,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var e=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",e)}this.LGel.trigger(x)}},t.prototype.resizeVideoSlide=function(t,i){var s=this.getVideoContStyle(i);this.getSlideItem(t).find(".lg-video-cont").attr("style",s)},t.prototype.updateSlides=function(t,i){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var s=this.galleryItems[i].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var n=0;this.galleryItems.some((function(t,i){return t.src===s&&(n=i,!0)})),this.currentItemsInDom=this.organizeSlideItems(n,-1),this.loadContent(n,!0),this.getSlideItem(n).addClass("lg-current"),this.index=n,this.updateCurrentCounter(n),this.LGel.trigger(T)}else this.closeGallery()},t.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=o(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return v(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},t.prototype.openGallery=function(t,i){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var e="";n.forEach((function(t){e=e+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(e),this.addHtml(t);var h="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,u=r.top,c=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(u,c),this.zoomFromOrigin&&i&&(this.currentImageSize=l(i,this.outer,u+c,this.galleryItems[t].t&&this.settings.videoMaxSize),h=a(i,this.outer,u,c,this.currentImageSize)),this.zoomFromOrigin&&h||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var g=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),g),this.index=t,this.LGel.trigger(z),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=o(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&h){var i=s.getSlideItem(t);i.css("transform",h),setTimeout((function(){i.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){i.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&h||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(M)})),document.body===this.settings.container&&o("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,i=this.settings.defaultCaptionHeight||this.outer.find(".lg-sub-html").get().clientHeight,s=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(s?s.clientHeight:0)+i}},t.prototype.setMediaContainerPosition=function(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.$content.css("top",t+"px").css("bottom",i+"px")},t.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var i,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:i=this.galleryItems[t].subHtml,!s)if(i){var n=i.substring(0,1);"."!==n&&"#"!==n||(i=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?o(this.items).eq(t).find(i).first().html():o(i).first().html())}else i="";if(".lg-sub-html"===this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(i);else{var e=o(this.getSlideItemId(t));s?e.load(s):e.append('<div class="lg-sub-html">'+i+"</div>")}null!=i&&(""===i?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(k,{index:t})},t.prototype.preload=function(t){for(var i=1;i<=this.settings.preload&&!(i>=this.galleryItems.length-t);i++)this.loadContent(t+i,!1);for(var s=1;s<=this.settings.preload&&!(t-s<0);s++)this.loadContent(t-s,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,i,s){var n;if(this.settings.dynamic||(n=o(this.items).eq(i)),n){var e=void 0;if(!(e=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var h="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+e+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),h}return""},t.prototype.setImgMarkup=function(t,i,s){var n=this.galleryItems[s],e=n.alt,o=n.srcset,h=n.sizes,r=n.sources,l=e?'alt="'+e+'"':"",a='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(i,s,l):c(s,t,l,o,h,r))+"</picture>";i.prepend(a)},t.prototype.onLgObjectLoad=function(t,i,s,n,e){var o=this;e&&this.LGel.trigger(S,{index:i,delay:s||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,i,s,n,e)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),n)},t.prototype.handleLgObjectLoad=function(t,i,s,n,e){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),e||o.LGel.trigger(S,{index:i,delay:s||0})}),n)},t.prototype.isVideo=function(t,i){if(!t)return this.galleryItems[i].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),e=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:e?{wistia:e}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach((function(t,s){t.t=i.isVideo(t.src,s)}))},t.prototype.loadContent=function(t,i){var s=this,n=this.galleryItems[t],e=o(this.getSlideItemId(t)),h=n.poster,r=n.srcset,a=n.sizes,v=n.sources,m=n.src,p=n.video,w=p&&"string"==typeof p?JSON.parse(p):p;if(n.responsive){var x=n.responsive.split(",");m=g(x)||m}var T=n.t,k="",z=!!n.iframe;if(!e.hasClass("lg-loaded")){if(T){var M=this.mediaContainerPosition,S=M.top,j=M.bottom,A=l(this.items[t],this.outer,S+j,T&&this.settings.videoMaxSize);k=this.getVideoContStyle(A)}if(z){var O=u(m,this.settings.iframeWidth,this.settings.iframeHeight,n.iframeTitle);e.prepend(O)}else if(h){var C="",I=!this.lGalleryOn,F=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;F&&(C=this.getDummyImageContent(e,t,"")),O=f(h,C||"",k,T),e.prepend(O);var P=(F?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(y,{index:t,src:m,html5Video:w,hasPoster:!0,isFirstSlide:I})}),P)}else if(T)O='<div class="lg-video-cont " style="'+k+'"></div>',e.prepend(O),this.LGel.trigger(y,{index:t,src:m,html5Video:w,hasPoster:!1});else if(this.setImgMarkup(m,e,t),r||v){var D=e.find(".lg-object");this.initPictureFill(D)}this.LGel.trigger(b,{index:t}),this.lGalleryOn&&".lg-sub-html"!==this.settings.appendSubHtmlTo&&this.addHtml(t)}var B=0,E=0;this.lGalleryOn||(E=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),E&&!o(document.body).hasClass("lg-from-hash")&&(B=E),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){e.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),e.hasClass("lg-loaded")||setTimeout((function(){if(e.find(".lg-img-wrap").append(c(t,m,"",r,a,n.sources)),r||v){var i=e.find(".lg-object");s.initPictureFill(i)}s.onLgObjectLoad(e,t,E,B,!0);var o=e.find(".lg-object").first();d(o.get())?s.loadContentOnLoad(t,e,B):o.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,e,B)}))}),this.settings.startAnimationDuration+100)),e.addClass("lg-loaded"),this.onLgObjectLoad(e,t,E,B,!1),T&&T.html5&&!h&&e.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!e.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){e.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(e.hasClass("lg-complete_")?this.preload(t):e.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},t.prototype.loadContentOnLoad=function(t,i,s){var n=this;setTimeout((function(){i.find(".lg-dummy-img").remove(),i.removeClass("lg-first-slide"),n.outer.removeClass("lg-first-slide-loading"),n.isDummyImageRemoved=!0,n.preload(t)}),s+300)},t.prototype.getItemsToBeInsertedToDom=function(t,i,s){var n=this;void 0===s&&(s=0);var e=[],o=Math.max(s,3);o=Math.min(o,this.galleryItems.length);var h="lg-item-"+this.lgId+"-"+i;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,i){e.push("lg-item-"+n.lgId+"-"+i)})),e;if(t<(this.galleryItems.length-1)/2){for(var r=t;r>t-o/2&&r>=0;r--)e.push("lg-item-"+this.lgId+"-"+r);var l=e.length;for(r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)e.push("lg-item-"+this.lgId+"-"+r);for(l=e.length,r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?e.push("lg-item-"+this.lgId+"-0"):0===t&&e.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===e.indexOf(h)&&e.push("lg-item-"+this.lgId+"-"+i),e},t.prototype.organizeSlideItems=function(t,i){var s=this,n=this.getItemsToBeInsertedToDom(t,i,this.settings.numberOfSlideItemsInDom);return n.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&o("#"+t).remove()})),n},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var i=this.outer.find(".lg-current").first().attr("id");t=parseInt(i.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var i=this.galleryItems[t];if(!1===i.downloadUrl||"false"===i.downloadUrl)this.outer.addClass("lg-hide-download");else{var s=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),s.attr("href",i.downloadUrl||i.src),i.download&&s.attr("download",i.download)}}},t.prototype.makeSlideAnimation=function(t,i,s){var n=this;this.lGalleryOn&&s.addClass("lg-slide-progress"),setTimeout((function(){n.outer.addClass("lg-no-trans"),n.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(i.addClass("lg-prev-slide"),s.addClass("lg-next-slide")):(i.addClass("lg-next-slide"),s.addClass("lg-prev-slide")),setTimeout((function(){n.outer.find(".lg-item").removeClass("lg-current"),i.addClass("lg-current"),n.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,i,s,n){var e=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var h=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var r=this.getSlideItem(t),a=this.getSlideItem(o),u=this.galleryItems[t],c=u.t;if(this.outer.attr("data-lg-slide-type",this.getSlideType(u)),this.setDownloadValue(t),c){var g=this.mediaContainerPosition,d=g.top,f=g.bottom,v=l(this.items[t],this.outer,d+f,c&&this.settings.videoMaxSize);this.resizeVideoSlide(t,v)}if(this.LGel.trigger(j,{prevIndex:o,index:t,fromTouch:!!i,fromThumb:!!s}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),n||(t<o?n="prev":t>o&&(n="next")),i){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var m=void 0,p=void 0;h>2?(m=t-1,p=t+1,(0===t&&o===h-1||t===h-1&&0===o)&&(p=0,m=h-1)):(m=0,p=1),"prev"===n?this.getSlideItem(p).addClass("lg-next-slide"):this.getSlideItem(m).addClass("lg-prev-slide"),r.addClass("lg-current")}else this.makeSlideAnimation(n,r,a);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){e.lGalleryOn&&e.loadContent(t,!0),".lg-sub-html"===e.settings.appendSubHtmlTo&&e.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(i?0:this.settings.slideDelay)),setTimeout((function(){e.lgBusy=!1,a.removeClass("lg-slide-progress"),e.LGel.trigger(A,{prevIndex:o,index:t,fromTouch:i,fromThumb:s})}),(this.lGalleryOn?this.settings.speed+100:100)+(i?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.t?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,i,s){var n=i.pageX-t.pageX,e=i.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(n)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(e)>15&&(this.swipeDirection="vertical",o=!0),o){var h=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==s||s.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(h,n,0);var r=h.get().offsetWidth,l=15*r/100-Math.abs(10*n/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-r+n-l,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),r+n+l,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==s||s.preventDefault(),this.$container.addClass("lg-dragging-vertical");var a=1-Math.abs(e)/window.innerHeight;this.$backdrop.css("opacity",a);var u=1-Math.abs(e)/(2*window.innerWidth);this.setTranslate(h,0,e,u,u),Math.abs(e)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,i,s){var n,e=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){e.$container.removeClass("lg-dragging-vertical"),e.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var h=!0;if("horizontal"===e.swipeDirection){n=t.pageX-i.pageX;var r=Math.abs(t.pageX-i.pageX);n<0&&r>e.settings.swipeThreshold?(e.goToNextSlide(!0),h=!1):n>0&&r>e.settings.swipeThreshold&&(e.goToPrevSlide(!0),h=!1)}else if("vertical"===e.swipeDirection){if(n=Math.abs(t.pageY-i.pageY),e.settings.closable&&e.settings.swipeToClose&&n>100)return void e.closeGallery();e.$backdrop.css("opacity",1)}if(e.outer.find(".lg-item").removeAttr("style"),h&&Math.abs(t.pageX-i.pageX)<5){var l=o(s.target);e.isPosterElement(l)&&e.LGel.trigger(O)}e.swipeDirection=void 0})),setTimeout((function(){e.outer.hasClass("lg-dragging")||"lg-slide"===e.settings.mode||e.outer.removeClass("lg-slide")}),this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!o(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(e=!0,t.touchAction="swipe",t.manageSwipeClass(),i={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){e&&"swipe"===t.touchAction&&1===o.targetTouches.length&&(s={pageX:o.targetTouches[0].pageX,pageY:o.targetTouches[0].pageY},t.touchMove(i,s,o),n=!0)})),this.$inner.on("touchend.lg",(function(h){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,i,h);else if(e){var r=o(h.target);t.isPosterElement(r)&&t.LGel.trigger(O)}t.touchAction=void 0,e=!1}})))},t.prototype.enableDrag=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var e=t.getSlideItem(t.index);(o(s.target).hasClass("lg-item")||e.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),i={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(C))))})),o(window).on("mousemove.lg.global"+this.lgId,(function(o){n&&t.lgOpened&&(e=!0,s={pageX:o.pageX,pageY:o.pageY},t.touchMove(i,s),t.LGel.trigger(I))})),o(window).on("mouseup.lg.global"+this.lgId,(function(h){if(t.lgOpened){var r=o(h.target);e?(e=!1,t.touchEnd(s,i,h),t.LGel.trigger(F)):t.isPosterElement(r)&&t.LGel.trigger(O),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(i){!t.dragOrSwipeEnabled&&t.isPosterElement(o(i.target))&&t.LGel.trigger(O)}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,i=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?i=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),i>-1&&this.getSlideItem(i).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(P,{index:this.index}),this.slide(this.index,!!t,!1,"next")):s?(this.index=0,this.LGel.trigger(P,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){i.outer.removeClass("lg-right-end")}),400)))},t.prototype.goToPrevSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(D,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):s?(this.index=this.galleryItems.length-1,this.LGel.trigger(D,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){i.outer.removeClass("lg-left-end")}),400)))},t.prototype.keyPress=function(){var t=this;o(window).on("keydown.lg.global"+this.lgId,(function(i){t.lgOpened&&!0===t.settings.escKey&&27===i.keyCode&&(i.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===i.keyCode&&(i.preventDefault(),t.goToPrevSlide()),39===i.keyCode&&(i.preventDefault(),t.goToNextSlide()))}))},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var i=this.getElementById("lg-prev"),s=this.getElementById("lg-next");t+1===this.galleryItems.length?s.attr("disabled","disabled").addClass("disabled"):s.removeAttr("disabled").removeClass("disabled"),0===t?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,i,s,n,e){void 0===n&&(n=1),void 0===e&&(e=1),t.css("transform","translate3d("+i+"px, "+s+"px, 0px) scale3d("+n+", "+e+", 1)")},t.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(i){!i.deltaY||t.galleryItems.length<2||(i.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),i.preventDefault())}))},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var i=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||i&&i.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var i=o(this.items[t]);i.off("click.lgcustom-item-"+i.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var i=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var n=o(s.target);i=!!t.isSlideElement(n)})),this.outer.on("mousemove.lg",(function(){i=!1})),this.outer.on("mouseup.lg",(function(s){var n=o(s.target);t.isSlideElement(n)&&i&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},t.prototype.closeGallery=function(t){var i=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(B),o(window).scrollTop(this.prevScrollTop);var s,n=this.items[this.index];if(this.zoomFromOrigin&&n){var e=this.mediaContainerPosition,h=e.top,r=e.bottom,u=l(n,this.outer,h+r,this.galleryItems[this.index].t&&this.settings.videoMaxSize);s=a(n,this.outer,h,r,u)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,o("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var c=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){i.zoomFromOrigin&&s&&i.outer.removeClass("lg-zoom-from-image"),i.$container.removeClass("lg-show"),i.$backdrop.removeAttr("style").css("transition-duration",i.settings.backdropDuration+"ms"),i.outer.removeClass("lg-closing "+i.settings.startClass),i.getSlideItem(i.index).removeClass("lg-start-end-progress"),i.$inner.empty(),i.lgOpened&&i.LGel.trigger(E,{instance:i}),i.outer.get()&&i.outer.get().blur(),i.lgOpened=!1}),c+100),c+100},t.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},t.prototype.destroyModules=function(t){this.plugins.forEach((function(i){try{t?i.destroy():i.closeGallery&&i.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(T)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,i=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),o(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),i),i},t}(),U=function(t,i,s,n){for(var e,o=arguments.length,h=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,s):n,r=t.length-1;r>=0;r--)(e=t[r])&&(h=(o<3?e(h):o>3?e(i,s,h):e(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};t.LightGalleryLit=class extends i.LitElement{constructor(){super(...arguments),this.settings={}}getSelector(t){const i=t.assignedNodes({flatten:!0});return Array.prototype.filter.call(i,(t=>t.nodeType==Node.ELEMENT_NODE))}firstUpdated(){if(!this.shadowRoot)return;const t=this.shadowRoot.querySelector("slot"),i={selector:this.getSelector(t)},s={...this.settings,...i};this.galleryInstance=new _(this,s)}handleSlotchange(t){var i,s;const n=this.getSelector(t.target);this.galleryInstance&&(null===(i=this.galleryInstance)||void 0===i?void 0:i.galleryItems.length)!==n.length&&(this.galleryInstance.settings.selector=n,null===(s=this.galleryInstance)||void 0===s||s.refresh())}disconnectedCallback(){super.disconnectedCallback(),this.galleryInstance&&this.galleryInstance.destroy()}render(){return i.html`
var n=function(){return(n=Object.assign||function(t){for(var i,s=1,n=arguments.length;s<n;s++)for(var e in i=arguments[s])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t}).apply(this,arguments)};!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:null};var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),s}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=16*Math.random()|0;return("x"==t?i:3&i|8).toString(16)}))},t.prototype._getSelector=function(t,i){return void 0===i&&(i=document),"string"!=typeof t?t:(i=i||document,"#"===t.substring(0,1)?i.querySelector(t):i.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,i,s){var n=i.replace(/-([a-z])/gi,(function(t,i){return i.toUpperCase()}));-1!==this.cssVenderPrefixes.indexOf(n)?(t.style[n.charAt(0).toLowerCase()+n.slice(1)]=s,t.style["webkit"+n]=s,t.style["moz"+n]=s,t.style["ms"+n]=s,t.style["o"+n]=s):t.style[n]=s},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,i){var s=i.split(".");return t.split(".").filter((function(t){return t})).every((function(t){return-1!==s.indexOf(t)}))},t.prototype.attr=function(t,i){return void 0===i?this.firstElement?this.firstElement.getAttribute(t):"":(this._each((function(s){s.setAttribute(t,i)})),this)},t.prototype.find=function(t){return o(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?o(this.selector[0]):o(this.selector)},t.prototype.eq=function(t){return o(this.selector[t])},t.prototype.parent=function(){return o(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var i=t.split(" ");return this._each((function(t){i.forEach((function(i){return t.removeAttribute(i)}))})),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var i=document.createElement("div");return i.className=t,this.firstElement.parentNode.insertBefore(i,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),i.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each((function(i){t.split(" ").forEach((function(t){i.classList.add(t)}))})),this},t.prototype.removeClass=function(t){return this._each((function(i){t.split(" ").forEach((function(t){i.classList.remove(t)}))})),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,i){var s=this;return this._each((function(n){s._setCssVendorPrefix(n,t,i)})),this},t.prototype.on=function(i,s){var n=this;return this.selector?(i.split(" ").forEach((function(i){Array.isArray(t.eventListeners[i])||(t.eventListeners[i]=[]),t.eventListeners[i].push(s),n.selector.addEventListener(i.split(".")[0],s)})),this):this},t.prototype.once=function(t,i){var s=this;return this.on(t,(function(){s.off(t),i(t)})),this},t.prototype.off=function(i){var s=this;return this.selector?(Object.keys(t.eventListeners).forEach((function(n){s.isEventMatched(i,n)&&(t.eventListeners[n].forEach((function(t){s.selector.removeEventListener(n.split(".")[0],t)})),t.eventListeners[n]=[])})),this):this},t.prototype.trigger=function(t,i){if(!this.firstElement)return this;var s=new CustomEvent(t.split(".")[0],{detail:i||null});return this.firstElement.dispatchEvent(s),this},t.prototype.load=function(t){var i=this;return fetch(t).then((function(t){i.selector.innerHTML=t})),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each((function(i){i.innerHTML=t})),this)},t.prototype.append=function(t){return this._each((function(i){"string"==typeof t?i.insertAdjacentHTML("beforeend",t):i.appendChild(t)})),this},t.prototype.prepend=function(t){return this._each((function(i){i.insertAdjacentHTML("afterbegin",t)})),this},t.prototype.remove=function(){return this._each((function(t){t.parentNode.removeChild(t)})),this},t.prototype.empty=function(){return this._each((function(t){t.innerHTML=""})),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),i=o("body").style().marginLeft;return{left:t.left-parseFloat(i)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}();function o(t){return new e(t)}var h=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function r(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}var l=function(t,i,s,n){void 0===s&&(s=0);var e=o(t).attr("data-lg-size")||n;if(e){var h=e.split(",");if(h[1])for(var r=window.innerWidth,l=0;l<h.length;l++){var a=h[l];if(parseInt(a.split("-")[2],10)>r){e=a;break}l===h.length-1&&(e=a)}var u=e.split("-"),c=parseInt(u[0],10),g=parseInt(u[1],10),d=i.width(),f=i.height()-s,v=Math.min(d,c),m=Math.min(f,g),p=Math.min(v/c,m/g);return{width:c*p,height:g*p}}},a=function(t,i,s,n,e){if(e){var h=o(t).find("img").first();if(h.get()){var r=i.get().getBoundingClientRect(),l=r.width,a=i.height()-(s+n),u=h.width(),c=h.height(),g=h.style(),d=(l-u)/2-h.offset().left+(parseFloat(g.paddingLeft)||0)+(parseFloat(g.borderLeft)||0)+o(window).scrollLeft()+r.left,f=(a-c)/2-h.offset().top+(parseFloat(g.paddingTop)||0)+(parseFloat(g.borderTop)||0)+o(window).scrollTop()+s;return"translate3d("+(d*=-1)+"px, "+(f*=-1)+"px, 0) scale3d("+u/e.width+", "+c/e.height+", 1)"}}},u=function(t,i,s,n){return'<div class="lg-video-cont lg-has-iframe" style="width:'+t+"; height: "+i+'">\n <iframe class="lg-object" frameborder="0" '+(n?'title="'+n+'"':"")+' src="'+s+'" allowfullscreen="true"></iframe>\n </div>'},c=function(t,i,s,n,e,o){var h="<img "+s+" "+(n?'srcset="'+n+'"':"")+" "+(e?'sizes="'+e+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+i+'" />',r="";return o&&(r=("string"==typeof o?JSON.parse(o):o).map((function(t){var i="";return Object.keys(t).forEach((function(s){i+=" "+s+'="'+t[s]+'"'})),"<source "+i+"></source>"}))),""+r+h},g=function(t){for(var i=[],s=[],n="",e=0;e<t.length;e++){var o=t[e].split(" ");""===o[0]&&o.splice(0,1),s.push(o[0]),i.push(o[1])}for(var h=window.innerWidth,r=0;r<i.length;r++)if(parseInt(i[r],10)>h){n=s[r];break}return n},d=function(t){return!!t&&!!t.complete&&0!==t.naturalWidth},f=function(t,i,s,n){return'<div class="lg-video-cont '+(n&&n.youtube?"lg-has-youtube":n&&n.vimeo?"lg-has-vimeo":"lg-has-html5")+'" style="'+s+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="Play video"\n role="img"\n class="lg-video-play-icon"\n >\n <title>Play video</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+(i||"")+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},v=function(t,i,s,n){var e=[],l=function(){for(var t=0,i=0,s=arguments.length;i<s;i++)t+=arguments[i].length;var n=Array(t),e=0;for(i=0;i<s;i++)for(var o=arguments[i],h=0,r=o.length;h<r;h++,e++)n[e]=o[h];return n}(h,i);return[].forEach.call(t,(function(t){for(var i={},h=0;h<t.attributes.length;h++){var a=t.attributes[h];if(a.specified){var u=r(a.name),c="";l.indexOf(u)>-1&&(c=u),c&&(i[c]=a.value)}}var g=o(t),d=g.find("img").first().attr("alt"),f=g.attr("title"),v=n?g.attr(n):g.find("img").first().attr("src");i.thumb=v,s&&!i.subHtml&&(i.subHtml=f||d||""),i.alt=d||f||"",e.push(i)})),e},m=function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},p={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:document.body,startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[]},b="lgAfterAppendSlide",w="lgInit",y="lgHasVideo",x="lgContainerResize",T="lgUpdateSlides",k="lgAfterAppendSubHtml",z="lgBeforeOpen",M="lgAfterOpen",S="lgSlideItemLoad",j="lgBeforeSlide",A="lgAfterSlide",O="lgPosterClick",C="lgDragStart",I="lgDragMove",F="lgDragEnd",P="lgBeforeNextSlide",D="lgBeforePrevSlide",B="lgBeforeClose",E="lgAfterClose",H=0,_=function(){function t(t,i){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(H++,this.lgId=H,this.el=t,this.LGel=o(t),this.generateSettings(i),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=n(n({},p),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():m()){var i=n(n({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=n(n({},this.settings),i)}},t.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(w,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout((function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()}),50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,i=function(i){var n=s.items[i],h=o(n),r=e.generateUUID();h.attr("data-lg-id",r).on("click.lgcustom-item-"+r,(function(s){s.preventDefault();var e=t.settings.index||i;t.openGallery(e,n)}))},s=this,n=0;n<this.items.length;n++)i(n)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach((function(i){t.plugins.push(new i(t,o))}))},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return o(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return o("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!this.$container||!this.$container.get()){var i="",s="";this.settings.controls&&(i='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="Previous slide" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="Next slide" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-item"!==this.settings.appendSubHtmlTo&&(s='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var n="";this.settings.allowMediaOverlap&&(n+="lg-media-overlap ");var e=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",h=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="Close gallery" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",a=this.settings.showMaximizeIcon?'<button type="button" aria-label="Toggle maximize" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",u='\n <div class="'+r+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+e+" "+h+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+n+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+i+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+a+"\n "+l+"\n </div>\n "+(".lg-outer"===this.settings.appendSubHtmlTo?s:"")+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?s:"")+"\n </div>\n </div>\n </div>\n ";o(this.settings.container).css("position","relative").append(u),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var c=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(c+="lg-grab "),this.settings.showAfterLoad&&(c+="lg-show-after-load"),this.outer.addClass(c),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" aria-label="Download" download class="lg-download lg-icon"></a>'),this.counter(),o(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,(function(){t.refreshOnResize()})),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].t;this.mediaContainerPosition=this.getMediaContainerPosition();var i=this.mediaContainerPosition,s=i.top,n=i.bottom;if(this.currentImageSize=l(this.items[this.index],this.outer,s+n,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var e=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",e)}this.LGel.trigger(x)}},t.prototype.resizeVideoSlide=function(t,i){var s=this.getVideoContStyle(i);this.getSlideItem(t).find(".lg-video-cont").attr("style",s)},t.prototype.updateSlides=function(t,i){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var s=this.galleryItems[i].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var n=0;this.galleryItems.some((function(t,i){return t.src===s&&(n=i,!0)})),this.currentItemsInDom=this.organizeSlideItems(n,-1),this.loadContent(n,!0),this.getSlideItem(n).addClass("lg-current"),this.index=n,this.updateCurrentCounter(n),this.LGel.trigger(T)}else this.closeGallery()},t.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if("this"===this.settings.selector)this.items.push(this.el);else if(this.settings.selector)if("string"==typeof this.settings.selector)if(this.settings.selectWithin){var t=o(this.settings.selectWithin);this.items=t.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return v(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},t.prototype.openGallery=function(t,i){var s=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.get().focus(),this.outer.removeClass("lg-hide-items"),this.$container.addClass("lg-show");var n=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=n;var e="";n.forEach((function(t){e=e+'<div id="'+t+'" class="lg-item"></div>'})),this.$inner.append(e),this.addHtml(t);var h="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,u=r.top,c=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(u,c),this.zoomFromOrigin&&i&&(this.currentImageSize=l(i,this.outer,u+c,this.galleryItems[t].t&&this.settings.videoMaxSize),h=a(i,this.outer,u,c,this.currentImageSize)),this.zoomFromOrigin&&h||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var g=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout((function(){s.outer.addClass("lg-components-open")}),g),this.index=t,this.LGel.trigger(z),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=o(window).scrollTop(),setTimeout((function(){if(s.zoomFromOrigin&&h){var i=s.getSlideItem(t);i.css("transform",h),setTimeout((function(){i.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",s.settings.startAnimationDuration+"ms"),s.outer.addClass("lg-zoom-from-image")})),setTimeout((function(){i.css("transform","translate3d(0, 0, 0)")}),100)}setTimeout((function(){s.$backdrop.addClass("in"),s.$container.addClass("lg-show-in")}),10),s.zoomFromOrigin&&h||setTimeout((function(){s.outer.addClass("lg-visible")}),s.settings.backdropDuration),s.slide(t,!1,!1,!1),s.LGel.trigger(M)})),document.body===this.settings.container&&o("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,i=this.outer.find(".lg-components .lg-sub-html").get(),s=this.settings.defaultCaptionHeight||i&&i.clientHeight||0,n=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(n?n.clientHeight:0)+s}},t.prototype.setMediaContainerPosition=function(t,i){void 0===t&&(t=0),void 0===i&&(i=0),this.$content.css("top",t+"px").css("bottom",i+"px")},t.prototype.hideBars=function(){var t=this;setTimeout((function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",(function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout((function(){t.outer.addClass("lg-hide-items")}),t.settings.hideBarsDelay)})),t.outer.trigger("mousemove.lg"))}),this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(t){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var i,s;if(this.galleryItems[t].subHtmlUrl?s=this.galleryItems[t].subHtmlUrl:i=this.galleryItems[t].subHtml,!s)if(i){var n=i.substring(0,1);"."!==n&&"#"!==n||(i=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?o(this.items).eq(t).find(i).first().html():o(i).first().html())}else i="";if(".lg-item"!==this.settings.appendSubHtmlTo)s?this.outer.find(".lg-sub-html").load(s):this.outer.find(".lg-sub-html").html(i);else{var e=o(this.getSlideItemId(t));s?e.load(s):e.append('<div class="lg-sub-html">'+i+"</div>")}null!=i&&(""===i?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(k,{index:t})},t.prototype.preload=function(t){for(var i=1;i<=this.settings.preload&&!(i>=this.galleryItems.length-t);i++)this.loadContent(t+i,!1);for(var s=1;s<=this.settings.preload&&!(t-s<0);s++)this.loadContent(t-s,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,i,s){var n;if(this.settings.dynamic||(n=o(this.items).eq(i)),n){var e=void 0;if(!(e=this.settings.exThumbImage?n.attr(this.settings.exThumbImage):n.find("img").first().attr("src")))return"";var h="<img "+s+' style="'+this.getDummyImgStyles(this.currentImageSize)+'" class="lg-dummy-img" src="'+e+'" />';return t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),h}return""},t.prototype.setImgMarkup=function(t,i,s){var n=this.galleryItems[s],e=n.alt,o=n.srcset,h=n.sizes,r=n.sources,l=e?'alt="'+e+'"':"",a='<picture class="lg-img-wrap"> '+(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize?this.getDummyImageContent(i,s,l):c(s,t,l,o,h,r))+"</picture>";i.prepend(a)},t.prototype.onLgObjectLoad=function(t,i,s,n,e){var o=this;e&&this.LGel.trigger(S,{index:i,delay:s||0}),t.find(".lg-object").first().on("load.lg",(function(){o.handleLgObjectLoad(t,i,s,n,e)})),setTimeout((function(){t.find(".lg-object").first().on("error.lg",(function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">Oops... Failed to load content...</span>')}))}),n)},t.prototype.handleLgObjectLoad=function(t,i,s,n,e){var o=this;setTimeout((function(){t.addClass("lg-complete lg-complete_"),e||o.LGel.trigger(S,{index:i,delay:s||0})}),n)},t.prototype.isVideo=function(t,i){if(!t)return this.galleryItems[i].video?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var s=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),n=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),e=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return s?{youtube:s}:n?{vimeo:n}:e?{wistia:e}:void 0},t.prototype.addSlideVideoInfo=function(t){var i=this;t.forEach((function(t,s){t.t=i.isVideo(t.src,s)}))},t.prototype.loadContent=function(t,i){var s=this,n=this.galleryItems[t],e=o(this.getSlideItemId(t)),h=n.poster,r=n.srcset,a=n.sizes,v=n.sources,m=n.src,p=n.video,w=p&&"string"==typeof p?JSON.parse(p):p;if(n.responsive){var x=n.responsive.split(",");m=g(x)||m}var T=n.t,k="",z=!!n.iframe;if(!e.hasClass("lg-loaded")){if(T){var M=this.mediaContainerPosition,S=M.top,j=M.bottom,A=l(this.items[t],this.outer,S+j,T&&this.settings.videoMaxSize);k=this.getVideoContStyle(A)}if(z){var O=u(this.settings.iframeWidth,this.settings.iframeHeight,m,n.iframeTitle);e.prepend(O)}else if(h){var C="",I=!this.lGalleryOn,F=!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize;F&&(C=this.getDummyImageContent(e,t,"")),O=f(h,C||"",k,T),e.prepend(O);var P=(F?this.settings.startAnimationDuration:this.settings.backdropDuration)+100;setTimeout((function(){s.LGel.trigger(y,{index:t,src:m,html5Video:w,hasPoster:!0,isFirstSlide:I})}),P)}else if(T)O='<div class="lg-video-cont " style="'+k+'"></div>',e.prepend(O),this.LGel.trigger(y,{index:t,src:m,html5Video:w,hasPoster:!1});else if(this.setImgMarkup(m,e,t),r||v){var D=e.find(".lg-object");this.initPictureFill(D)}this.LGel.trigger(b,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var B=0,E=0;this.lGalleryOn||(E=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),E&&!o(document.body).hasClass("lg-from-hash")&&(B=E),!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize&&(setTimeout((function(){e.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")}),this.settings.startAnimationDuration+100),e.hasClass("lg-loaded")||setTimeout((function(){if(e.find(".lg-img-wrap").append(c(t,m,"",r,a,n.sources)),r||v){var i=e.find(".lg-object");s.initPictureFill(i)}s.onLgObjectLoad(e,t,E,B,!0);var o=e.find(".lg-object").first();d(o.get())?s.loadContentOnLoad(t,e,B):o.on("load.lg error.lg",(function(){s.loadContentOnLoad(t,e,B)}))}),this.settings.startAnimationDuration+100)),e.addClass("lg-loaded"),this.onLgObjectLoad(e,t,E,B,!1),T&&T.html5&&!h&&e.addClass("lg-complete lg-complete_"),this.zoomFromOrigin&&this.currentImageSize||!e.hasClass("lg-complete_")||this.lGalleryOn||setTimeout((function(){e.addClass("lg-complete")}),this.settings.backdropDuration),this.lGalleryOn=!0,!0===i&&(e.hasClass("lg-complete_")?this.preload(t):e.find(".lg-object").first().on("load.lg error.lg",(function(){s.preload(t)})))},t.prototype.loadContentOnLoad=function(t,i,s){var n=this;setTimeout((function(){i.find(".lg-dummy-img").remove(),i.removeClass("lg-first-slide"),n.outer.removeClass("lg-first-slide-loading"),n.isDummyImageRemoved=!0,n.preload(t)}),s+300)},t.prototype.getItemsToBeInsertedToDom=function(t,i,s){var n=this;void 0===s&&(s=0);var e=[],o=Math.max(s,3);o=Math.min(o,this.galleryItems.length);var h="lg-item-"+this.lgId+"-"+i;if(this.galleryItems.length<=3)return this.galleryItems.forEach((function(t,i){e.push("lg-item-"+n.lgId+"-"+i)})),e;if(t<(this.galleryItems.length-1)/2){for(var r=t;r>t-o/2&&r>=0;r--)e.push("lg-item-"+this.lgId+"-"+r);var l=e.length;for(r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t+r+1))}else{for(r=t;r<=this.galleryItems.length-1&&r<t+o/2;r++)e.push("lg-item-"+this.lgId+"-"+r);for(l=e.length,r=0;r<o-l;r++)e.push("lg-item-"+this.lgId+"-"+(t-r-1))}return this.settings.loop&&(t===this.galleryItems.length-1?e.push("lg-item-"+this.lgId+"-0"):0===t&&e.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===e.indexOf(h)&&e.push("lg-item-"+this.lgId+"-"+i),e},t.prototype.organizeSlideItems=function(t,i){var s=this,n=this.getItemsToBeInsertedToDom(t,i,this.settings.numberOfSlideItemsInDom);return n.forEach((function(t){-1===s.currentItemsInDom.indexOf(t)&&s.$inner.append('<div id="'+t+'" class="lg-item"></div>')})),this.currentItemsInDom.forEach((function(t){-1===n.indexOf(t)&&o("#"+t).remove()})),n},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var i=this.outer.find(".lg-current").first().attr("id");t=parseInt(i.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var i=this.galleryItems[t];if(!1===i.downloadUrl||"false"===i.downloadUrl)this.outer.addClass("lg-hide-download");else{var s=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),s.attr("href",i.downloadUrl||i.src),i.download&&s.attr("download",i.download)}}},t.prototype.makeSlideAnimation=function(t,i,s){var n=this;this.lGalleryOn&&s.addClass("lg-slide-progress"),setTimeout((function(){n.outer.addClass("lg-no-trans"),n.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(i.addClass("lg-prev-slide"),s.addClass("lg-next-slide")):(i.addClass("lg-next-slide"),s.addClass("lg-prev-slide")),setTimeout((function(){n.outer.find(".lg-item").removeClass("lg-current"),i.addClass("lg-current"),n.outer.removeClass("lg-no-trans")}),50)}),this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,i,s,n){var e=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,o),!this.lGalleryOn||o!==t){var h=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var r=this.getSlideItem(t),a=this.getSlideItem(o),u=this.galleryItems[t],c=u.t;if(this.outer.attr("data-lg-slide-type",this.getSlideType(u)),this.setDownloadValue(t),c){var g=this.mediaContainerPosition,d=g.top,f=g.bottom,v=l(this.items[t],this.outer,d+f,c&&this.settings.videoMaxSize);this.resizeVideoSlide(t,v)}if(this.LGel.trigger(j,{prevIndex:o,index:t,fromTouch:!!i,fromThumb:!!s}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),n||(t<o?n="prev":t>o&&(n="next")),i){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var m=void 0,p=void 0;h>2?(m=t-1,p=t+1,(0===t&&o===h-1||t===h-1&&0===o)&&(p=0,m=h-1)):(m=0,p=1),"prev"===n?this.getSlideItem(p).addClass("lg-next-slide"):this.getSlideItem(m).addClass("lg-prev-slide"),r.addClass("lg-current")}else this.makeSlideAnimation(n,r,a);this.lGalleryOn||this.loadContent(t,!0),setTimeout((function(){e.lGalleryOn&&e.loadContent(t,!0),".lg-item"!==e.settings.appendSubHtmlTo&&e.addHtml(t)}),(this.lGalleryOn?this.settings.speed+50:50)+(i?0:this.settings.slideDelay)),setTimeout((function(){e.lgBusy=!1,a.removeClass("lg-slide-progress"),e.LGel.trigger(A,{prevIndex:o,index:t,fromTouch:i,fromThumb:s})}),(this.lGalleryOn?this.settings.speed+100:100)+(i?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.t?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,i,s){var n=i.pageX-t.pageX,e=i.pageY-t.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(n)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(e)>15&&(this.swipeDirection="vertical",o=!0),o){var h=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==s||s.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(h,n,0);var r=h.get().offsetWidth,l=15*r/100-Math.abs(10*n/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-r+n-l,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),r+n+l,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==s||s.preventDefault(),this.$container.addClass("lg-dragging-vertical");var a=1-Math.abs(e)/window.innerHeight;this.$backdrop.css("opacity",a);var u=1-Math.abs(e)/(2*window.innerWidth);this.setTranslate(h,0,e,u,u),Math.abs(e)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,i,s){var n,e=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout((function(){e.$container.removeClass("lg-dragging-vertical"),e.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var h=!0;if("horizontal"===e.swipeDirection){n=t.pageX-i.pageX;var r=Math.abs(t.pageX-i.pageX);n<0&&r>e.settings.swipeThreshold?(e.goToNextSlide(!0),h=!1):n>0&&r>e.settings.swipeThreshold&&(e.goToPrevSlide(!0),h=!1)}else if("vertical"===e.swipeDirection){if(n=Math.abs(t.pageY-i.pageY),e.settings.closable&&e.settings.swipeToClose&&n>100)return void e.closeGallery();e.$backdrop.css("opacity",1)}if(e.outer.find(".lg-item").removeAttr("style"),h&&Math.abs(t.pageX-i.pageX)<5){var l=o(s.target);e.isPosterElement(l)&&e.LGel.trigger(O)}e.swipeDirection=void 0})),setTimeout((function(){e.outer.hasClass("lg-dragging")||"lg-slide"===e.settings.mode||e.outer.removeClass("lg-slide")}),this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",(function(s){t.dragOrSwipeEnabled=!0;var n=t.getSlideItem(t.index);!o(s.target).hasClass("lg-item")&&!n.get().contains(s.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==s.targetTouches.length||(e=!0,t.touchAction="swipe",t.manageSwipeClass(),i={pageX:s.targetTouches[0].pageX,pageY:s.targetTouches[0].pageY})})),this.$inner.on("touchmove.lg",(function(o){e&&"swipe"===t.touchAction&&1===o.targetTouches.length&&(s={pageX:o.targetTouches[0].pageX,pageY:o.targetTouches[0].pageY},t.touchMove(i,s,o),n=!0)})),this.$inner.on("touchend.lg",(function(h){if("swipe"===t.touchAction){if(n)n=!1,t.touchEnd(s,i,h);else if(e){var r=o(h.target);t.isPosterElement(r)&&t.LGel.trigger(O)}t.touchAction=void 0,e=!1}})))},t.prototype.enableDrag=function(){var t=this,i={},s={},n=!1,e=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",(function(s){t.dragOrSwipeEnabled=!0;var e=t.getSlideItem(t.index);(o(s.target).hasClass("lg-item")||e.get().contains(s.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(s.preventDefault(),t.lgBusy||(t.manageSwipeClass(),i={pageX:s.pageX,pageY:s.pageY},n=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger(C))))})),o(window).on("mousemove.lg.global"+this.lgId,(function(o){n&&t.lgOpened&&(e=!0,s={pageX:o.pageX,pageY:o.pageY},t.touchMove(i,s),t.LGel.trigger(I))})),o(window).on("mouseup.lg.global"+this.lgId,(function(h){if(t.lgOpened){var r=o(h.target);e?(e=!1,t.touchEnd(s,i,h),t.LGel.trigger(F)):t.isPosterElement(r)&&t.LGel.trigger(O),n&&(n=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}})))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",(function(i){!t.dragOrSwipeEnabled&&t.isPosterElement(o(i.target))&&t.LGel.trigger(O)}))},t.prototype.manageSwipeClass=function(){var t=this.index+1,i=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?i=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),i>-1&&this.getSlideItem(i).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(P,{index:this.index}),this.slide(this.index,!!t,!1,"next")):s?(this.index=0,this.LGel.trigger(P,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout((function(){i.outer.removeClass("lg-right-end")}),400)))},t.prototype.goToPrevSlide=function(t){var i=this,s=this.settings.loop;t&&this.galleryItems.length<3&&(s=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(D,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):s?(this.index=this.galleryItems.length-1,this.LGel.trigger(D,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout((function(){i.outer.removeClass("lg-left-end")}),400)))},t.prototype.keyPress=function(){var t=this;o(window).on("keydown.lg.global"+this.lgId,(function(i){t.lgOpened&&!0===t.settings.escKey&&27===i.keyCode&&(i.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===i.keyCode&&(i.preventDefault(),t.goToPrevSlide()),39===i.keyCode&&(i.preventDefault(),t.goToNextSlide()))}))},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",(function(){t.goToPrevSlide()})),this.getElementById("lg-next").on("click.lg",(function(){t.goToNextSlide()}))},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var i=this.getElementById("lg-prev"),s=this.getElementById("lg-next");t+1===this.galleryItems.length?s.attr("disabled","disabled").addClass("disabled"):s.removeAttr("disabled").removeClass("disabled"),0===t?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,i,s,n,e){void 0===n&&(n=1),void 0===e&&(e=1),t.css("transform","translate3d("+i+"px, "+s+"px, 0px) scale3d("+n+", "+e+", 1)")},t.prototype.mousewheel=function(){var t=this;this.outer.on("mousewheel.lg",(function(i){!i.deltaY||t.galleryItems.length<2||(i.deltaY>0?t.goToPrevSlide():t.goToNextSlide(),i.preventDefault())}))},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")},t.prototype.isPosterElement=function(t){var i=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||i&&i.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",(function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()}))},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var i=o(this.items[t]);i.off("click.lgcustom-item-"+i.attr("data-lg-id"))}},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var i=!1;this.getElementById("lg-close").on("click.lg",(function(){t.closeGallery()})),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",(function(s){var n=o(s.target);i=!!t.isSlideElement(n)})),this.outer.on("mousemove.lg",(function(){i=!1})),this.outer.on("mouseup.lg",(function(s){var n=o(s.target);t.isSlideElement(n)&&i&&(t.outer.hasClass("lg-dragging")||t.closeGallery())})))}},t.prototype.closeGallery=function(t){var i=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger(B),o(window).scrollTop(this.prevScrollTop);var s,n=this.items[this.index];if(this.zoomFromOrigin&&n){var e=this.mediaContainerPosition,h=e.top,r=e.bottom,u=l(n,this.outer,h+r,this.galleryItems[this.index].t&&this.settings.videoMaxSize);s=a(n,this.outer,h,r,u)}this.zoomFromOrigin&&s?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",s)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,o("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var c=this.zoomFromOrigin&&s?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout((function(){i.zoomFromOrigin&&s&&i.outer.removeClass("lg-zoom-from-image"),i.$container.removeClass("lg-show"),i.$backdrop.removeAttr("style").css("transition-duration",i.settings.backdropDuration+"ms"),i.outer.removeClass("lg-closing "+i.settings.startClass),i.getSlideItem(i.index).removeClass("lg-start-end-progress"),i.$inner.empty(),i.lgOpened&&i.LGel.trigger(E,{instance:i}),i.outer.get()&&i.outer.get().blur(),i.lgOpened=!1}),c+100),c+100},t.prototype.initModules=function(){this.plugins.forEach((function(t){try{t.init()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}}))},t.prototype.destroyModules=function(t){this.plugins.forEach((function(i){try{t?i.destroy():i.closeGallery&&i.closeGallery()}catch(t){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}}))},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(T)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroy=function(){var t=this,i=this.closeGallery(!0);return setTimeout((function(){t.destroyModules(!0),t.settings.dynamic||t.invalidateItems(),o(window).off(".lg.global"+t.lgId),t.LGel.off(".lg"),t.$container.remove()}),i),i},t}(),U=function(t,i,s,n){for(var e,o=arguments.length,h=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,s):n,r=t.length-1;r>=0;r--)(e=t[r])&&(h=(o<3?e(h):o>3?e(i,s,h):e(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};t.LightGalleryLit=class extends i.LitElement{constructor(){super(...arguments),this.settings={}}getSelector(t){const i=t.assignedNodes({flatten:!0});return Array.prototype.filter.call(i,(t=>t.nodeType==Node.ELEMENT_NODE))}firstUpdated(){if(!this.shadowRoot)return;const t=this.shadowRoot.querySelector("slot"),i={selector:this.getSelector(t)},s={...this.settings,...i};this.galleryInstance=new _(this,s)}handleSlotchange(t){var i,s;const n=this.getSelector(t.target);this.galleryInstance&&(null===(i=this.galleryInstance)||void 0===i?void 0:i.galleryItems.length)!==n.length&&(this.galleryInstance.settings.selector=n,null===(s=this.galleryInstance)||void 0===s||s.refresh())}disconnectedCallback(){super.disconnectedCallback(),this.galleryInstance&&this.galleryInstance.destroy()}render(){return i.html`
<div id="container">

@@ -37,0 +37,0 @@ <slot @slotchange=${this.handleSlotchange}></slot>

{
"name": "lightgallery",
"version": "2.2.0-beta.4",
"version": "2.2.0-beta.5",
"description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile",

@@ -5,0 +5,0 @@ "keywords": [

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -93,3 +93,5 @@ * Copyright (c) 2020 Sachin Neravath;

setTimeout(function () {
_this.setRelativeCaption(index);
if (index === _this.core.index) {
_this.setRelativeCaption(index);
}
}, delay);

@@ -113,4 +115,7 @@ });

});
this.core.LGel.on(lGEvents.containerResize + ".caption", function (event) {
_this.setRelativeCaption(_this.core.index);
});
};
RelativeCaption.prototype.setCaptionStyle = function (index, rect) {
RelativeCaption.prototype.setCaptionStyle = function (index, rect, slideWrapRect) {
var $subHtmlInner = this.core

@@ -120,11 +125,6 @@ .getSlideItem(index)

var $subHtml = this.core.getSlideItem(index).find('.lg-sub-html');
$subHtml.css('width', rect.width + "px").css('left', rect.left + "px");
var subHtmlRect = $subHtmlInner.get().getBoundingClientRect();
var top = rect.bottom;
if (rect.height + subHtmlRect.height >= rect.bottom) {
top -= subHtmlRect.height;
}
$subHtml
.css('width', rect.width + "px")
.css('left', rect.left + "px")
.css('top', top + "px");
var bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height;
$subHtml.css('top', "auto").css('bottom', Math.max(bottom, 0) + "px");
};

@@ -139,3 +139,7 @@ RelativeCaption.prototype.setRelativeCaption = function (index) {

.getBoundingClientRect();
this.setCaptionStyle(index, rect);
var slideWrapRect = this.core
.getSlideItem(index)
.get()
.getBoundingClientRect();
this.setCaptionStyle(index, rect, slideWrapRect);
slide.addClass('lg-show-caption');

@@ -142,0 +146,0 @@ }

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRelativeCaption=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},e="lgSlideItemLoad",i="lgBeforeSlide",o="lgAfterSlide",n={relativeCaption:!1};return function(){function s(e){this.core=e;var i={addClass:this.core.settings.addClass+" lg-relative-caption"};return this.core.settings=t(t({},this.core.settings),i),this.settings=t(t(t({},n),this.core.settings),i),this}return s.prototype.init=function(){var t=this;this.settings.relativeCaption&&(this.core.LGel.on(e+".caption",(function(e){var i=e.detail,o=i.index,n=i.delay;setTimeout((function(){t.setRelativeCaption(o)}),n)})),this.core.LGel.on(o+".caption",(function(e){var i=e.detail.index;setTimeout((function(){t.core.getSlideItem(i).hasClass("lg-complete")&&t.setRelativeCaption(i)}))})),this.core.LGel.on(i+".caption",(function(e){var i=e.detail.index;setTimeout((function(){t.core.getSlideItem(i).removeClass("lg-show-caption")}))})))},s.prototype.setCaptionStyle=function(t,e){var i=this.core.getSlideItem(t).find(".lg-relative-caption-item"),o=this.core.getSlideItem(t).find(".lg-sub-html"),n=i.get().getBoundingClientRect(),s=e.bottom;e.height+n.height>=e.bottom&&(s-=n.height),o.css("width",e.width+"px").css("left",e.left+"px").css("top",s+"px")},s.prototype.setRelativeCaption=function(t){var e=this.core.getSlideItem(t);if(e.hasClass("lg-current")){var i=this.core.getSlideItem(t).find(".lg-object").get().getBoundingClientRect();this.setCaptionStyle(t,i),e.addClass("lg-show-caption")}},s.prototype.destroy=function(){this.core.LGel.off(".caption")},s}()}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgRelativeCaption=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},e="lgContainerResize",i="lgSlideItemLoad",o="lgBeforeSlide",n="lgAfterSlide",s={relativeCaption:!1};return function(){function l(e){this.core=e;var i={addClass:this.core.settings.addClass+" lg-relative-caption"};return this.core.settings=t(t({},this.core.settings),i),this.settings=t(t(t({},s),this.core.settings),i),this}return l.prototype.init=function(){var t=this;this.settings.relativeCaption&&(this.core.LGel.on(i+".caption",(function(e){var i=e.detail,o=i.index,n=i.delay;setTimeout((function(){o===t.core.index&&t.setRelativeCaption(o)}),n)})),this.core.LGel.on(n+".caption",(function(e){var i=e.detail.index;setTimeout((function(){t.core.getSlideItem(i).hasClass("lg-complete")&&t.setRelativeCaption(i)}))})),this.core.LGel.on(o+".caption",(function(e){var i=e.detail.index;setTimeout((function(){t.core.getSlideItem(i).removeClass("lg-show-caption")}))})),this.core.LGel.on(e+".caption",(function(e){t.setRelativeCaption(t.core.index)})))},l.prototype.setCaptionStyle=function(t,e,i){var o=this.core.getSlideItem(t).find(".lg-relative-caption-item"),n=this.core.getSlideItem(t).find(".lg-sub-html");n.css("width",e.width+"px").css("left",e.left+"px");var s=o.get().getBoundingClientRect(),l=i.bottom-e.bottom-s.height;n.css("top","auto").css("bottom",Math.max(l,0)+"px")},l.prototype.setRelativeCaption=function(t){var e=this.core.getSlideItem(t);if(e.hasClass("lg-current")){var i=this.core.getSlideItem(t).find(".lg-object").get().getBoundingClientRect(),o=this.core.getSlideItem(t).get().getBoundingClientRect();this.setCaptionStyle(t,i,o),e.addClass("lg-show-caption")}},l.prototype.destroy=function(){this.core.LGel.off(".caption")},l}()}));
/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -99,3 +99,5 @@ * Copyright (c) 2020 Sachin Neravath;

setTimeout(function () {
_this.setRelativeCaption(index);
if (index === _this.core.index) {
_this.setRelativeCaption(index);
}
}, delay);

@@ -119,4 +121,7 @@ });

});
this.core.LGel.on(lGEvents.containerResize + ".caption", function (event) {
_this.setRelativeCaption(_this.core.index);
});
};
RelativeCaption.prototype.setCaptionStyle = function (index, rect) {
RelativeCaption.prototype.setCaptionStyle = function (index, rect, slideWrapRect) {
var $subHtmlInner = this.core

@@ -126,11 +131,6 @@ .getSlideItem(index)

var $subHtml = this.core.getSlideItem(index).find('.lg-sub-html');
$subHtml.css('width', rect.width + "px").css('left', rect.left + "px");
var subHtmlRect = $subHtmlInner.get().getBoundingClientRect();
var top = rect.bottom;
if (rect.height + subHtmlRect.height >= rect.bottom) {
top -= subHtmlRect.height;
}
$subHtml
.css('width', rect.width + "px")
.css('left', rect.left + "px")
.css('top', top + "px");
var bottom = slideWrapRect.bottom - rect.bottom - subHtmlRect.height;
$subHtml.css('top', "auto").css('bottom', Math.max(bottom, 0) + "px");
};

@@ -145,3 +145,7 @@ RelativeCaption.prototype.setRelativeCaption = function (index) {

.getBoundingClientRect();
this.setCaptionStyle(index, rect);
var slideWrapRect = this.core
.getSlideItem(index)
.get()
.getBoundingClientRect();
this.setCaptionStyle(index, rect, slideWrapRect);
slide.addClass('lg-show-caption');

@@ -148,0 +152,0 @@ }

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -173,3 +173,3 @@ * Copyright (c) 2020 Sachin Neravath;

Share.prototype.getShareListItemHTML = function (type, text) {
return "<li><a class=\"lg-share-" + type + "\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
return "<li><a class=\"lg-share-" + type + "\" rel=\"noopener\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
};

@@ -176,0 +176,0 @@ Share.prototype.getDefaultShareOptions = function () {

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgShare=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function e(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var o=Array(t),n=0;for(e=0;e<r;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,n++)o[n]=i[s];return o}var r={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",pinterest:!0,pinterestDropdownText:"Pinterest",additionalShareOptions:[]};function o(t){return"//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(t.facebookShareUrl||window.location.href)}function n(t){var e=encodeURIComponent(t.twitterShareUrl||window.location.href);return"//twitter.com/intent/tweet?text="+t.tweetText+"&url="+e}function i(t){var e=t.pinterestText,r=encodeURIComponent(t.src);return"http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(t.pinterestShareUrl||window.location.href)+"&media="+r+"&description="+e}var s="lgAfterSlide";return function(){function a(e){return this.shareOptions=[],this.core=e,this.settings=t(t({},r),this.core.settings),this}return a.prototype.init=function(){this.settings.share&&(this.shareOptions=e(this.getDefaultShareOptions(),this.settings.additionalShareOptions),this.setLgShareMarkup(),this.core.outer.find(".lg-share .lg-dropdown").append(this.getShareListHtml()),this.core.LGel.on(s+".share",this.onAfterSlide.bind(this)))},a.prototype.getShareListHtml=function(){var t="";return this.shareOptions.forEach((function(e){t+=e.dropdownHTML})),t},a.prototype.setLgShareMarkup=function(){var t=this;this.core.$toolbar.append('<button type="button" aria-label="Share" aria-haspopup="true" aria-expanded="false" class="lg-share lg-icon">\n <ul class="lg-dropdown" style="position: absolute;"></ul></button>'),this.core.outer.append('<div class="lg-dropdown-overlay"></div>'),this.core.outer.find(".lg-share").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-dropdown-active"),t.core.outer.hasClass("lg-dropdown-active")?t.core.outer.attr("aria-expanded",!0):t.core.outer.attr("aria-expanded",!1)})),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",(function(){t.core.outer.removeClass("lg-dropdown-active"),t.core.outer.attr("aria-expanded",!1)}))},a.prototype.onAfterSlide=function(t){var e=this,r=t.detail.index,o=this.core.galleryItems[r];setTimeout((function(){e.shareOptions.forEach((function(t){var r=t.selector;e.core.outer.find(r).attr("href",t.generateLink(o))}))}),100)},a.prototype.getShareListItemHTML=function(t,e){return'<li><a class="lg-share-'+t+'" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+e+"</span></a></li>"},a.prototype.getDefaultShareOptions=function(){return e(this.settings.facebook?[{type:"facebook",generateLink:o,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:n,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:i,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},a.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},a}()}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgShare=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function e(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var o=Array(t),n=0;for(e=0;e<r;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,n++)o[n]=i[s];return o}var r={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",pinterest:!0,pinterestDropdownText:"Pinterest",additionalShareOptions:[]};function o(t){return"//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(t.facebookShareUrl||window.location.href)}function n(t){var e=encodeURIComponent(t.twitterShareUrl||window.location.href);return"//twitter.com/intent/tweet?text="+t.tweetText+"&url="+e}function i(t){var e=t.pinterestText,r=encodeURIComponent(t.src);return"http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(t.pinterestShareUrl||window.location.href)+"&media="+r+"&description="+e}var s="lgAfterSlide";return function(){function a(e){return this.shareOptions=[],this.core=e,this.settings=t(t({},r),this.core.settings),this}return a.prototype.init=function(){this.settings.share&&(this.shareOptions=e(this.getDefaultShareOptions(),this.settings.additionalShareOptions),this.setLgShareMarkup(),this.core.outer.find(".lg-share .lg-dropdown").append(this.getShareListHtml()),this.core.LGel.on(s+".share",this.onAfterSlide.bind(this)))},a.prototype.getShareListHtml=function(){var t="";return this.shareOptions.forEach((function(e){t+=e.dropdownHTML})),t},a.prototype.setLgShareMarkup=function(){var t=this;this.core.$toolbar.append('<button type="button" aria-label="Share" aria-haspopup="true" aria-expanded="false" class="lg-share lg-icon">\n <ul class="lg-dropdown" style="position: absolute;"></ul></button>'),this.core.outer.append('<div class="lg-dropdown-overlay"></div>'),this.core.outer.find(".lg-share").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-dropdown-active"),t.core.outer.hasClass("lg-dropdown-active")?t.core.outer.attr("aria-expanded",!0):t.core.outer.attr("aria-expanded",!1)})),this.core.outer.find(".lg-dropdown-overlay").first().on("click.lg",(function(){t.core.outer.removeClass("lg-dropdown-active"),t.core.outer.attr("aria-expanded",!1)}))},a.prototype.onAfterSlide=function(t){var e=this,r=t.detail.index,o=this.core.galleryItems[r];setTimeout((function(){e.shareOptions.forEach((function(t){var r=t.selector;e.core.outer.find(r).attr("href",t.generateLink(o))}))}),100)},a.prototype.getShareListItemHTML=function(t,e){return'<li><a class="lg-share-'+t+'" rel="noopener" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+e+"</span></a></li>"},a.prototype.getDefaultShareOptions=function(){return e(this.settings.facebook?[{type:"facebook",generateLink:o,dropdownHTML:this.getShareListItemHTML("facebook",this.settings.facebookDropdownText),selector:".lg-share-facebook"}]:[],this.settings.twitter?[{type:"twitter",generateLink:n,dropdownHTML:this.getShareListItemHTML("twitter",this.settings.twitterDropdownText),selector:".lg-share-twitter"}]:[],this.settings.pinterest?[{type:"pinterest",generateLink:i,dropdownHTML:this.getShareListItemHTML("pinterest",this.settings.pinterestDropdownText),selector:".lg-share-pinterest"}]:[])},a.prototype.destroy=function(){this.core.outer.find(".lg-dropdown-overlay").remove(),this.core.outer.find(".lg-share").remove(),this.core.LGel.off(".lg.share"),this.core.LGel.off(".share")},a}()}));
/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -179,3 +179,3 @@ * Copyright (c) 2020 Sachin Neravath;

Share.prototype.getShareListItemHTML = function (type, text) {
return "<li><a class=\"lg-share-" + type + "\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
return "<li><a class=\"lg-share-" + type + "\" rel=\"noopener\" target=\"_blank\"><span class=\"lg-icon\"></span><span class=\"lg-dropdown-text\">" + text + "</span></a></li>";
};

@@ -182,0 +182,0 @@ Share.prototype.getDefaultShareOptions = function () {

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -4,0 +4,0 @@ * Copyright (c) 2020 Sachin Neravath;

/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -121,3 +121,5 @@ * Copyright (c) 2020 Sachin Neravath;

_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');
_this.setZoomEssentials();
if (event.detail.index === _this.core.index) {
_this.setZoomEssentials();
}
}, _speed + 30);

@@ -124,0 +126,0 @@ };

/**
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -8,2 +8,2 @@ * Copyright (c) 2020 Sachin Neravath;

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgZoom=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},e={scale:1,zoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300},o="lgContainerResize",i="lgBeforeOpen",s="lgAfterOpen",a="lgSlideItemLoad",r="lgAfterSlide",n="lgRotateLeft",l="lgRotateRight",g="lgFlipHorizontal",c="lgFlipVertical";return function(){function h(o,i){return this.core=o,this.$LG=i,this.settings=t(t({},e),this.core.settings),this}return h.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="Zoom in" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="Zoom out" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="View actual size" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},h.prototype.enableZoom=function(t){var e=this,o=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){e.isImageSlide()&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),e.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getModifier=function(t,e,o){var i=t;t=Math.abs(t);var s=this.getCurrentTransform(o);if(!s)return 1;var a=1;if("X"===e){var r=Math.sign(parseFloat(s[0]));0===t||180===t?a=1:90===t&&(a=-90===i&&1===r||90===i&&-1===r?-1:1),a*=r}else{var n=Math.sign(parseFloat(s[3]));if(0===t||180===t)a=1;else if(90===t){var l=parseFloat(s[1]),g=parseFloat(s[2]);a=Math.sign(l*g*i*n)}a*=n}return a},h.prototype.getImageSize=function(t,e,o){return 90===Math.abs(e)&&(o="x"===o?"y":"x"),t[{y:"offsetHeight",x:"offsetWidth"}[o]]},h.prototype.getDragCords=function(t,e){return 90===e?{x:t.pageY,y:t.pageX}:{x:t.pageX,y:t.pageY}},h.prototype.getSwipeCords=function(t,e){var o=t.targetTouches[0].pageX,i=t.targetTouches[0].pageY;return 90===e?{x:i,y:o}:{x:o,y:i}},h.prototype.getDragAllowedAxises=function(t,e){e=e||this.scale||1;var o=this.imageYSize*e>this.containerRect.height,i=this.imageXSize*e>this.containerRect.width;return 90===t?{allowX:o,allowY:i}:{allowX:i,allowY:o}},h.prototype.getCurrentTransform=function(t){if(t){var e=window.getComputedStyle(t,null),o=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";return"none"!==o?o.split("(")[1].split(")")[0].split(","):void 0}},h.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.getCurrentTransform(t);return e?Math.round(Math.atan2(parseFloat(e[1]),parseFloat(e[0]))*(180/Math.PI)):0},h.prototype.setZoomEssentials=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get();this.rotateValue=this.getCurrentRotation(e),this.imageYSize=this.getImageSize(t.get(),this.rotateValue,"y"),this.imageXSize=this.getImageSize(t.get(),this.rotateValue,"x"),this.containerRect=this.core.outer.get().getBoundingClientRect(),this.modifierX=this.getModifier(this.rotateValue,"X",e),this.modifierY=this.getModifier(this.rotateValue,"Y",e)},h.prototype.zoomImage=function(t){var e,o,i=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left,s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.containerRect.height-this.imageYSize-n*this.modifierX)/2+this.scrollTop+this.containerRect.top;1===t&&(this.positionChanged=!1);var g=this.getDragAllowedAxises(Math.abs(this.rotateValue),t),c=g.allowY,h=g.allowX;this.positionChanged&&(e=this.left/(this.scale-1),o=this.top/(this.scale-1),this.pageX=Math.abs(e)+i,this.pageY=Math.abs(o)+l,this.positionChanged=!1);var m=this.getPossibleSwipeDragCords(this.rotateValue,t),u=(t-1)*(i-this.pageX),d=(t-1)*(l-this.pageY);h?this.isBeyondPossibleLeft(u,m.minX)?u=m.minX:this.isBeyondPossibleRight(u,m.maxX)&&(u=m.maxX):t>1&&(u<m.minX?u=m.minX:u>m.maxX&&(u=m.maxX)),c?this.isBeyondPossibleTop(d,m.minY)?d=m.minY:this.isBeyondPossibleBottom(d,m.maxY)&&(d=m.maxY):t>1&&(d<m.minY?d=m.minY:d>m.maxY&&(d=m.maxY)),this.setZoomStyles({x:u,y:d,scale:t})},h.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first(),i=e.parent();this.scale=t.scale,e.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var s="translate3d("+t.x+"px, "+t.y+"px, 0)";i.css("transform",s),this.left=t.x,this.top=t.y},h.prototype.setActualSize=function(t,e){var o=this;if(this.core.galleryItems[this.core.index].src&&!this.core.outer.hasClass("lg-first-slide-loading")){var i=this.getCurrentImageActualSizeScale();this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(i),this.setPageCords(e),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),10)}},h.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),o=this.core.galleryItems[t].width;return o?parseFloat(o):e.get().naturalWidth},h.prototype.getActualSizeScale=function(t,e){return t>e?t/e||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},h.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.targetTouches[0].pageX,e.y=t.pageY||t.targetTouches[0].pageY;else{var o=this.core.outer.get().getBoundingClientRect();e.x=o.width/2+o.left,e.y=o.height/2+this.scrollTop+o.top}return e},h.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},h.prototype.beginZoom=function(t){(this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1)?(this.core.outer.addClass("lg-zoomed"),this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)):this.resetZoom();return t>1},h.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},h.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",(function(e){t.$LG(e.target).hasClass("lg-image")&&t.setActualSize(t.core.index,e)})),this.core.outer.on("touchstart.lg",(function(o){var i=t.$LG(o.target);1===o.targetTouches.length&&i.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,o.preventDefault(),t.setActualSize(t.core.index,o)):e=setTimeout((function(){e=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+n+".zoom "+g+".zoom "+c+".zoom",(function(){t.core.lgOpened&&t.isImageSlide()&&(t.setPageCords(),t.setZoomEssentials(),t.zoomImage(t.scale))})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){t.core.outer.find(".lg-current .lg-image").get()&&(t.scale-=t.settings.scale,t.scale=t.getScale(t.scale),t.beginZoom(t.scale),t.zoomImage(t.scale))})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){t.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){t.setActualSize(t.core.index)})),this.core.LGel.on(i+".zoom",(function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1})),this.core.LGel.on(r+".zoom",(function(e){var o=e.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.resetZoom(o),t.isImageSlide()&&t.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1}},h.prototype.zoomIn=function(t){this.core.galleryItems[this.core.index].src&&(t?this.scale=t:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale))},h.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(t){return Math.sqrt((t.targetTouches[0].pageX-t.targetTouches[1].pageX)*(t.targetTouches[0].pageX-t.targetTouches[1].pageX)+(t.targetTouches[0].pageY-t.targetTouches[1].pageY)*(t.targetTouches[0].pageY-t.targetTouches[1].pageY))},h.prototype.pinchZoom=function(){var t=this,e=0,o=!1,i=1,s=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",(function(o){s=t.core.getSlideItem(t.core.index),2!==o.targetTouches.length||t.core.outer.hasClass("lg-first-slide-loading")||!t.$LG(o.target).hasClass("lg-item")&&!s.get().contains(o.target)||(i=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.core.touchAction="pinch",e=t.getTouchDistance(o))})),this.core.$inner.on("touchmove.lg",(function(a){if(2===a.targetTouches.length&&"pinch"===t.core.touchAction&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){a.preventDefault();var r=t.getTouchDistance(a),n=e-r;!o&&Math.abs(n)>5&&(o=!0),o&&(t.scale=Math.max(1,i+.008*-n),t.zoomImage(t.scale))}})),this.core.$inner.on("touchend.lg",(function(i){"pinch"===t.core.touchAction&&(t.$LG(i.target).hasClass("lg-item")||s.get().contains(i.target))&&(o=!1,e=0,t.scale<=1?t.resetZoom():(t.scale=t.getScale(t.scale),t.zoomImage(t.scale),t.core.outer.addClass("lg-zoomed")),t.core.touchAction=void 0)}))},h.prototype.touchendZoom=function(t,e,o,i,s,a){var r=e.x-t.x,n=e.y-t.y,l=Math.abs(r)/s+1,g=Math.abs(n)/s+1;l>2&&(l+=1),g>2&&(g+=1),r*=l,n*=g;var c=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),h={};h.x=this.left+r*this.modifierX,h.y=this.top+n*this.modifierY;var m=this.getPossibleSwipeDragCords(a);(Math.abs(r)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(h.y,m.minY)?h.y=m.minY:this.isBeyondPossibleBottom(h.y,m.maxY)&&(h.y=m.maxY)),o&&(this.isBeyondPossibleLeft(h.x,m.minX)?h.x=m.minX:this.isBeyondPossibleRight(h.x,m.maxX)&&(h.x=m.maxX)),i?this.top=h.y:h.y=this.top,o?this.left=h.x:h.x=this.left,this.setZoomSwipeStyles(c,h),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(t,e,o,i,s){var a={};if(i){if(a.y=this.top+(e.y-t.y)*this.modifierY,this.isBeyondPossibleTop(a.y,s.minY)){var r=s.minY-a.y;a.y=s.minY-r/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var n=a.y-s.maxY;a.y=s.maxY+n/6}}else a.y=this.top;if(o){if(a.x=this.left+(e.x-t.x)*this.modifierX,this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var g=a.x-s.maxX;a.x=s.maxX+g/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},h.prototype.isBeyondPossibleRight=function(t,e){return t<=e},h.prototype.isBeyondPossibleTop=function(t,e){return t>=e},h.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},h.prototype.isImageSlide=function(){var t=this.core.galleryItems[this.core.index];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(t,e){var o=e||this.scale||1,i=Math.abs(o),s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.imageYSize-this.containerRect.height)/2+n*this.modifierX,g=this.containerRect.height-this.imageYSize*i+l,c=(this.imageXSize-this.containerRect.width)/2,h=this.containerRect.width-this.imageXSize*i+c,m={minY:l,maxY:g,minX:c,maxX:h};return 90===Math.abs(t)&&(m={minY:c,maxY:h,minX:l,maxX:g}),m},h.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},h.prototype.zoomSwipe=function(){var t,e,o=this,i={},s={},a=!1,r=!1,n=!1,l=new Date,g=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.core.galleryItems[o.core.index].src&&(g=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||g.get().contains(s.target))&&1===s.targetTouches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",e=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(Math.abs(o.rotateValue));n=a.allowY,((r=a.allowX)||n)&&(i=o.getSwipeCords(s,Math.abs(o.rotateValue))),t=o.getPossibleSwipeDragCords(o.rotateValue),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.targetTouches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||g.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l,Math.abs(o.rotateValue));var c=o.getZoomSwipeCords(i,s,r,n,t);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(e,c))}})),this.core.$inner.on("touchend.lg",(function(t){if("zoomSwipe"===o.core.touchAction&&(o.$LG(t.target).hasClass("lg-item")||g.get().contains(t.target))){if(o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var e=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,r,n,e,o.rotateValue)}}))},h.prototype.zoomDrag=function(){var t,e,o,i,s=this,a={},r={},n=!1,l=!1,g=!1,c=!1;this.core.outer.on("mousedown.lg.zoom",(function(e){if(s.core.galleryItems[s.core.index].src){var r=s.core.getSlideItem(s.core.index);if(s.$LG(e.target).hasClass("lg-item")||r.get().contains(e.target)){t=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(Math.abs(s.rotateValue));c=l.allowY,g=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(e.target).hasClass("lg-object")&&(g||c)&&(e.preventDefault(),a=s.getDragCords(e,Math.abs(s.rotateValue)),o=s.getPossibleSwipeDragCords(s.rotateValue),n=!0,s.core.outer.get().scrollLeft+=1,s.core.outer.get().scrollLeft-=1,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(t){if(n){l=!0,r=s.getDragCords(t,Math.abs(s.rotateValue));var e=s.getZoomSwipeCords(a,r,g,c,o);s.setZoomSwipeStyles(i,e)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(n){if(e=new Date,n=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==r.x||a.y!==r.y)){r=s.getDragCords(o,Math.abs(s.rotateValue));var i=e.valueOf()-t.valueOf();s.touchendZoom(a,r,g,c,i,s.rotateValue)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom()},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgZoom=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++)for(var s in e=arguments[o])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},e={scale:1,zoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300},o="lgContainerResize",i="lgBeforeOpen",s="lgAfterOpen",a="lgSlideItemLoad",r="lgAfterSlide",n="lgRotateLeft",l="lgRotateRight",g="lgFlipHorizontal",c="lgFlipVertical";return function(){function h(o,i){return this.core=o,this.$LG=i,this.settings=t(t({},e),this.core.settings),this}return h.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="Zoom in" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="Zoom out" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="View actual size" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},h.prototype.enableZoom=function(t){var e=this,o=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?o=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout((function(){e.isImageSlide()&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())}),o+30)},h.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(a+".zoom",this.enableZoom.bind(this))},h.prototype.getModifier=function(t,e,o){var i=t;t=Math.abs(t);var s=this.getCurrentTransform(o);if(!s)return 1;var a=1;if("X"===e){var r=Math.sign(parseFloat(s[0]));0===t||180===t?a=1:90===t&&(a=-90===i&&1===r||90===i&&-1===r?-1:1),a*=r}else{var n=Math.sign(parseFloat(s[3]));if(0===t||180===t)a=1;else if(90===t){var l=parseFloat(s[1]),g=parseFloat(s[2]);a=Math.sign(l*g*i*n)}a*=n}return a},h.prototype.getImageSize=function(t,e,o){return 90===Math.abs(e)&&(o="x"===o?"y":"x"),t[{y:"offsetHeight",x:"offsetWidth"}[o]]},h.prototype.getDragCords=function(t,e){return 90===e?{x:t.pageY,y:t.pageX}:{x:t.pageX,y:t.pageY}},h.prototype.getSwipeCords=function(t,e){var o=t.targetTouches[0].pageX,i=t.targetTouches[0].pageY;return 90===e?{x:i,y:o}:{x:o,y:i}},h.prototype.getDragAllowedAxises=function(t,e){e=e||this.scale||1;var o=this.imageYSize*e>this.containerRect.height,i=this.imageXSize*e>this.containerRect.width;return 90===t?{allowX:o,allowY:i}:{allowX:i,allowY:o}},h.prototype.getCurrentTransform=function(t){if(t){var e=window.getComputedStyle(t,null),o=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";return"none"!==o?o.split("(")[1].split(")")[0].split(","):void 0}},h.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.getCurrentTransform(t);return e?Math.round(Math.atan2(parseFloat(e[1]),parseFloat(e[0]))*(180/Math.PI)):0},h.prototype.setZoomEssentials=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first(),e=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get();this.rotateValue=this.getCurrentRotation(e),this.imageYSize=this.getImageSize(t.get(),this.rotateValue,"y"),this.imageXSize=this.getImageSize(t.get(),this.rotateValue,"x"),this.containerRect=this.core.outer.get().getBoundingClientRect(),this.modifierX=this.getModifier(this.rotateValue,"X",e),this.modifierY=this.getModifier(this.rotateValue,"Y",e)},h.prototype.zoomImage=function(t){var e,o,i=(this.containerRect.width-this.imageXSize)/2+this.containerRect.left,s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.containerRect.height-this.imageYSize-n*this.modifierX)/2+this.scrollTop+this.containerRect.top;1===t&&(this.positionChanged=!1);var g=this.getDragAllowedAxises(Math.abs(this.rotateValue),t),c=g.allowY,h=g.allowX;this.positionChanged&&(e=this.left/(this.scale-1),o=this.top/(this.scale-1),this.pageX=Math.abs(e)+i,this.pageY=Math.abs(o)+l,this.positionChanged=!1);var m=this.getPossibleSwipeDragCords(this.rotateValue,t),u=(t-1)*(i-this.pageX),d=(t-1)*(l-this.pageY);h?this.isBeyondPossibleLeft(u,m.minX)?u=m.minX:this.isBeyondPossibleRight(u,m.maxX)&&(u=m.maxX):t>1&&(u<m.minX?u=m.minX:u>m.maxX&&(u=m.maxX)),c?this.isBeyondPossibleTop(d,m.minY)?d=m.minY:this.isBeyondPossibleBottom(d,m.maxY)&&(d=m.maxY):t>1&&(d<m.minY?d=m.minY:d>m.maxY&&(d=m.maxY)),this.setZoomStyles({x:u,y:d,scale:t})},h.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first(),i=e.parent();this.scale=t.scale,e.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var s="translate3d("+t.x+"px, "+t.y+"px, 0)";i.css("transform",s),this.left=t.x,this.top=t.y},h.prototype.setActualSize=function(t,e){var o=this;if(this.core.galleryItems[this.core.index].src&&!this.core.outer.hasClass("lg-first-slide-loading")){var i=this.getCurrentImageActualSizeScale();this.core.outer.hasClass("lg-zoomed")?this.scale=1:this.scale=this.getScale(i),this.setPageCords(e),this.beginZoom(this.scale),this.zoomImage(this.scale),setTimeout((function(){o.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}),10)}},h.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),o=this.core.galleryItems[t].width;return o?parseFloat(o):e.get().naturalWidth},h.prototype.getActualSizeScale=function(t,e){return t>e?t/e||2:1},h.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},h.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.targetTouches[0].pageX,e.y=t.pageY||t.targetTouches[0].pageY;else{var o=this.core.outer.get().getBoundingClientRect();e.x=o.width/2+o.left,e.y=o.height/2+this.scrollTop+o.top}return e},h.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},h.prototype.beginZoom=function(t){(this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1)?(this.core.outer.addClass("lg-zoomed"),this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)):this.resetZoom();return t>1},h.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},h.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",(function(e){t.$LG(e.target).hasClass("lg-image")&&t.setActualSize(t.core.index,e)})),this.core.outer.on("touchstart.lg",(function(o){var i=t.$LG(o.target);1===o.targetTouches.length&&i.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,o.preventDefault(),t.setActualSize(t.core.index,o)):e=setTimeout((function(){e=null}),300))})),this.core.LGel.on(o+".zoom "+l+".zoom "+n+".zoom "+g+".zoom "+c+".zoom",(function(){t.core.lgOpened&&t.isImageSlide()&&(t.setPageCords(),t.setZoomEssentials(),t.zoomImage(t.scale))})),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,(function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())})),this.core.getElementById("lg-zoom-out").on("click.lg",(function(){t.core.outer.find(".lg-current .lg-image").get()&&(t.scale-=t.settings.scale,t.scale=t.getScale(t.scale),t.beginZoom(t.scale),t.zoomImage(t.scale))})),this.core.getElementById("lg-zoom-in").on("click.lg",(function(){t.zoomIn()})),this.core.getElementById("lg-actual-size").on("click.lg",(function(){t.setActualSize(t.core.index)})),this.core.LGel.on(i+".zoom",(function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")})),this.core.LGel.on(s+".zoom",(function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1})),this.core.LGel.on(r+".zoom",(function(e){var o=e.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.resetZoom(o),t.isImageSlide()&&t.setZoomEssentials()})),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1}},h.prototype.zoomIn=function(t){this.core.galleryItems[this.core.index].src&&(t?this.scale=t:this.scale+=this.settings.scale,this.scale=this.getScale(this.scale),this.beginZoom(this.scale),this.zoomImage(this.scale))},h.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),o=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),o.find(".lg-img-wrap").first().removeAttr("style"),o.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},h.prototype.getTouchDistance=function(t){return Math.sqrt((t.targetTouches[0].pageX-t.targetTouches[1].pageX)*(t.targetTouches[0].pageX-t.targetTouches[1].pageX)+(t.targetTouches[0].pageY-t.targetTouches[1].pageY)*(t.targetTouches[0].pageY-t.targetTouches[1].pageY))},h.prototype.pinchZoom=function(){var t=this,e=0,o=!1,i=1,s=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",(function(o){s=t.core.getSlideItem(t.core.index),2!==o.targetTouches.length||t.core.outer.hasClass("lg-first-slide-loading")||!t.$LG(o.target).hasClass("lg-item")&&!s.get().contains(o.target)||(i=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.core.touchAction="pinch",e=t.getTouchDistance(o))})),this.core.$inner.on("touchmove.lg",(function(a){if(2===a.targetTouches.length&&"pinch"===t.core.touchAction&&(t.$LG(a.target).hasClass("lg-item")||s.get().contains(a.target))){a.preventDefault();var r=t.getTouchDistance(a),n=e-r;!o&&Math.abs(n)>5&&(o=!0),o&&(t.scale=Math.max(1,i+.008*-n),t.zoomImage(t.scale))}})),this.core.$inner.on("touchend.lg",(function(i){"pinch"===t.core.touchAction&&(t.$LG(i.target).hasClass("lg-item")||s.get().contains(i.target))&&(o=!1,e=0,t.scale<=1?t.resetZoom():(t.scale=t.getScale(t.scale),t.zoomImage(t.scale),t.core.outer.addClass("lg-zoomed")),t.core.touchAction=void 0)}))},h.prototype.touchendZoom=function(t,e,o,i,s,a){var r=e.x-t.x,n=e.y-t.y,l=Math.abs(r)/s+1,g=Math.abs(n)/s+1;l>2&&(l+=1),g>2&&(g+=1),r*=l,n*=g;var c=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),h={};h.x=this.left+r*this.modifierX,h.y=this.top+n*this.modifierY;var m=this.getPossibleSwipeDragCords(a);(Math.abs(r)>15||Math.abs(n)>15)&&(i&&(this.isBeyondPossibleTop(h.y,m.minY)?h.y=m.minY:this.isBeyondPossibleBottom(h.y,m.maxY)&&(h.y=m.maxY)),o&&(this.isBeyondPossibleLeft(h.x,m.minX)?h.x=m.minX:this.isBeyondPossibleRight(h.x,m.maxX)&&(h.x=m.maxX)),i?this.top=h.y:h.y=this.top,o?this.left=h.x:h.x=this.left,this.setZoomSwipeStyles(c,h),this.positionChanged=!0)},h.prototype.getZoomSwipeCords=function(t,e,o,i,s){var a={};if(i){if(a.y=this.top+(e.y-t.y)*this.modifierY,this.isBeyondPossibleTop(a.y,s.minY)){var r=s.minY-a.y;a.y=s.minY-r/6}else if(this.isBeyondPossibleBottom(a.y,s.maxY)){var n=a.y-s.maxY;a.y=s.maxY+n/6}}else a.y=this.top;if(o){if(a.x=this.left+(e.x-t.x)*this.modifierX,this.isBeyondPossibleLeft(a.x,s.minX)){var l=s.minX-a.x;a.x=s.minX-l/6}else if(this.isBeyondPossibleRight(a.x,s.maxX)){var g=a.x-s.maxX;a.x=s.maxX+g/6}}else a.x=this.left;return a},h.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},h.prototype.isBeyondPossibleRight=function(t,e){return t<=e},h.prototype.isBeyondPossibleTop=function(t,e){return t>=e},h.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},h.prototype.isImageSlide=function(){var t=this.core.galleryItems[this.core.index];return"image"===this.core.getSlideType(t)},h.prototype.getPossibleSwipeDragCords=function(t,e){var o=e||this.scale||1,i=Math.abs(o),s=this.core.mediaContainerPosition,a=s.top,r=s.bottom,n=Math.abs(a-r)/2,l=(this.imageYSize-this.containerRect.height)/2+n*this.modifierX,g=this.containerRect.height-this.imageYSize*i+l,c=(this.imageXSize-this.containerRect.width)/2,h=this.containerRect.width-this.imageXSize*i+c,m={minY:l,maxY:g,minX:c,maxX:h};return 90===Math.abs(t)&&(m={minY:c,maxY:h,minX:l,maxX:g}),m},h.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},h.prototype.zoomSwipe=function(){var t,e,o=this,i={},s={},a=!1,r=!1,n=!1,l=new Date,g=(new Date,this.core.getSlideItem(this.core.index));this.core.$inner.on("touchstart.lg",(function(s){if(o.core.galleryItems[o.core.index].src&&(g=o.core.getSlideItem(o.core.index),(o.$LG(s.target).hasClass("lg-item")||g.get().contains(s.target))&&1===s.targetTouches.length&&o.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),l=new Date,o.core.touchAction="zoomSwipe",e=o.core.getSlideItem(o.core.index).find(".lg-img-wrap").first();var a=o.getDragAllowedAxises(Math.abs(o.rotateValue));n=a.allowY,((r=a.allowX)||n)&&(i=o.getSwipeCords(s,Math.abs(o.rotateValue))),t=o.getPossibleSwipeDragCords(o.rotateValue),o.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}})),this.core.$inner.on("touchmove.lg",(function(l){if(1===l.targetTouches.length&&"zoomSwipe"===o.core.touchAction&&(o.$LG(l.target).hasClass("lg-item")||g.get().contains(l.target))){l.preventDefault(),o.core.touchAction="zoomSwipe",s=o.getSwipeCords(l,Math.abs(o.rotateValue));var c=o.getZoomSwipeCords(i,s,r,n,t);(Math.abs(s.x-i.x)>15||Math.abs(s.y-i.y)>15)&&(a=!0,o.setZoomSwipeStyles(e,c))}})),this.core.$inner.on("touchend.lg",(function(t){if("zoomSwipe"===o.core.touchAction&&(o.$LG(t.target).hasClass("lg-item")||g.get().contains(t.target))){if(o.core.touchAction=void 0,o.core.outer.removeClass("lg-zoom-dragging"),!a)return;a=!1;var e=(new Date).valueOf()-l.valueOf();o.touchendZoom(i,s,r,n,e,o.rotateValue)}}))},h.prototype.zoomDrag=function(){var t,e,o,i,s=this,a={},r={},n=!1,l=!1,g=!1,c=!1;this.core.outer.on("mousedown.lg.zoom",(function(e){if(s.core.galleryItems[s.core.index].src){var r=s.core.getSlideItem(s.core.index);if(s.$LG(e.target).hasClass("lg-item")||r.get().contains(e.target)){t=new Date,i=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var l=s.getDragAllowedAxises(Math.abs(s.rotateValue));c=l.allowY,g=l.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(e.target).hasClass("lg-object")&&(g||c)&&(e.preventDefault(),a=s.getDragCords(e,Math.abs(s.rotateValue)),o=s.getPossibleSwipeDragCords(s.rotateValue),n=!0,s.core.outer.get().scrollLeft+=1,s.core.outer.get().scrollLeft-=1,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}})),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,(function(t){if(n){l=!0,r=s.getDragCords(t,Math.abs(s.rotateValue));var e=s.getZoomSwipeCords(a,r,g,c,o);s.setZoomSwipeStyles(i,e)}})),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,(function(o){if(n){if(e=new Date,n=!1,s.core.outer.removeClass("lg-zoom-dragging"),l&&(a.x!==r.x||a.y!==r.y)){r=s.getDragCords(o,Math.abs(s.rotateValue));var i=e.valueOf()-t.valueOf();s.touchendZoom(a,r,g,c,i,s.rotateValue)}l=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")}))},h.prototype.closeGallery=function(){this.resetZoom()},h.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},h}()}));
/*!
* lightgallery | 2.2.0-beta.4 | August 4th 2021
* lightgallery | 2.2.0-beta.5 | August 13th 2021
* http://www.lightgalleryjs.com/

@@ -127,3 +127,5 @@ * Copyright (c) 2020 Sachin Neravath;

_this.core.getSlideItem(event.detail.index).addClass('lg-zoomable');
_this.setZoomEssentials();
if (event.detail.index === _this.core.index) {
_this.setZoomEssentials();
}
}, _speed + 30);

@@ -130,0 +132,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc