1/*! lightgallery - v1.6.14 - 2020-04-21 */ ! function (a, b) { 2 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 3 return b(a) 4 }) : "object" == typeof module && module.exports ? module.exports = b(require("jquery")) : b(a.jQuery) 5}(this, function (a) { 6 ! function () { 7 "use strict"; 8 9 function b(b, d) { 10 if (this.el = b, this.$el = a(b), this.s = a.extend({}, c, d), this.s.dynamic && "undefined" !== this.s.dynamicEl && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) throw "When using dynamic mode, you must also define dynamicEl as an Array."; 11 return this.modules = {}, this.lGalleryOn = !1, this.lgBusy = !1, this.hideBartimeout = !1, this.isTouch = "ontouchstart" in document.documentElement, this.s.slideEndAnimatoin && (this.s.hideControlOnEnd = !1), this.s.dynamic ? this.$items = this.s.dynamicEl : "this" === this.s.selector ? this.$items = this.$el : "" !== this.s.selector ? this.s.selectWithin ? this.$items = a(this.s.selectWithin).find(this.s.selector) : this.$items = this.$el.find(a(this.s.selector)) : this.$items = this.$el.children(), this.$slide = "", this.$outer = "", this.init(), this 12 } 13 var c = { 14 mode: "lg-slide", 15 cssEasing: "ease", 16 easing: "linear", 17 speed: 600, 18 height: "100%", 19 width: "100%", 20 addClass: "", 21 startClass: "lg-start-zoom", 22 backdropDuration: 150, 23 hideBarsDelay: 6e3, 24 useLeft: !1, 25 closable: !0, 26 loop: !0, 27 escKey: !0, 28 keyPress: !0, 29 controls: !0, 30 slideEndAnimatoin: !0, 31 hideControlOnEnd: !1, 32 mousewheel: !0, 33 getCaptionFromTitleOrAlt: !0, 34 appendSubHtmlTo: ".lg-sub-html", 35 subHtmlSelectorRelative: !1, 36 preload: 1, 37 showAfterLoad: !0, 38 selector: "", 39 selectWithin: "", 40 nextHtml: "", 41 prevHtml: "", 42 index: !1, 43 iframeMaxWidth: "100%", 44 download: !0, 45 counter: !0, 46 appendCounterTo: ".lg-toolbar", 47 swipeThreshold: 50, 48 enableSwipe: !0, 49 enableDrag: !0, 50 dynamic: !1, 51 dynamicEl: [], 52 galleryId: 1 53 }; 54 b.prototype.init = function () { 55 var b = this; 56 b.s.preload > b.$items.length && (b.s.preload = b.$items.length); 57 var c = window.location.hash; 58 c.indexOf("lg=" + this.s.galleryId) > 0 && (b.index = parseInt(c.split("&slide=")[1], 10), a("body").addClass("lg-from-hash"), a("body").hasClass("lg-on") || (setTimeout(function () { 59 b.build(b.index) 60 }), a("body").addClass("lg-on"))), b.s.dynamic ? (b.$el.trigger("onBeforeOpen.lg"), b.index = b.s.index || 0, a("body").hasClass("lg-on") || setTimeout(function () { 61 b.build(b.index), a("body").addClass("lg-on") 62 })) : b.$items.on("click.lgcustom", function (c) { 63 try { 64 c.preventDefault(), c.preventDefault() 65 } catch (a) { 66 c.returnValue = !1 67 } 68 b.$el.trigger("onBeforeOpen.lg"), b.index = b.s.index || b.$items.index(this), a("body").hasClass("lg-on") || (b.build(b.index), a("body").addClass("lg-on")) 69 }) 70 }, b.prototype.build = function (b) { 71 var c = this; 72 c.structure(), a.each(a.fn.lightGallery.modules, function (b) { 73 c.modules[b] = new a.fn.lightGallery.modules[b](c.el) 74 }), c.slide(b, !1, !1, !1), c.s.keyPress && c.keyPress(), c.$items.length > 1 ? (c.arrow(), setTimeout(function () { 75 c.enableDrag(), c.enableSwipe() 76 }, 50), c.s.mousewheel && c.mousewheel()) : c.$slide.on("click.lg", function () { 77 c.$el.trigger("onSlideClick.lg") 78 }), c.counter(), c.closeGallery(), c.$el.trigger("onAfterOpen.lg"), c.$outer.on("mousemove.lg click.lg touchstart.lg", function () { 79 c.$outer.removeClass("lg-hide-items"), clearTimeout(c.hideBartimeout), c.hideBartimeout = setTimeout(function () { 80 c.$outer.addClass("lg-hide-items") 81 }, c.s.hideBarsDelay) 82 }), c.$outer.trigger("mousemove.lg") 83 }, b.prototype.structure = function () { 84 var b, c = "", 85 d = "", 86 e = 0, 87 f = "", 88 g = this; 89 for (a("body").append('<div class="lg-backdrop"></div>'), a(".lg-backdrop").css("transition-duration", this.s.backdropDuration + "ms"), e = 0; e < this.$items.length; e++) c += '<div class="lg-item"></div>'; 90 if (this.s.controls && this.$items.length > 1 && (d = '<div class="lg-actions"><button class="lg-prev lg-icon">' + this.s.prevHtml + '</button><button class="lg-next lg-icon">' + this.s.nextHtml + "</button></div>"), ".lg-sub-html" === this.s.appendSubHtmlTo && (f = '<div class="lg-sub-html"></div>'), b = '<div class="lg-outer ' + this.s.addClass + " " + this.s.startClass + '"><div class="lg" style="width:' + this.s.width + "; height:" + this.s.height + '"><div class="lg-inner">' + c + '</div><div class="lg-toolbar lg-group"><span class="lg-close lg-icon"></span></div>' + d + f + "</div></div>", a("body").append(b), this.$outer = a(".lg-outer"), this.$slide = this.$outer.find(".lg-item"), this.s.useLeft ? (this.$outer.addClass("lg-use-left"), this.s.mode = "lg-slide") : this.$outer.addClass("lg-use-css3"), g.setTop(), a(window).on("resize.lg orientationchange.lg", function () { 91 setTimeout(function () { 92 g.setTop() 93 }, 100) 94 }), this.$slide.eq(this.index).addClass("lg-current"), this.doCss() ? this.$outer.addClass("lg-css3") : (this.$outer.addClass("lg-css"), this.s.speed = 0), this.$outer.addClass(this.s.mode), this.s.enableDrag && this.$items.length > 1 && this.$outer.addClass("lg-grab"), this.s.showAfterLoad && this.$outer.addClass("lg-show-after-load"), this.doCss()) { 95 var h = this.$outer.find(".lg-inner"); 96 h.css("transition-timing-function", this.s.cssEasing), h.css("transition-duration", this.s.speed + "ms") 97 } 98 setTimeout(function () { 99 a(".lg-backdrop").addClass("in") 100 }), setTimeout(function () { 101 g.$outer.addClass("lg-visible") 102 }, this.s.backdropDuration), this.s.download && this.$outer.find(".lg-toolbar").append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>'), this.prevScrollTop = a(window).scrollTop() 103 }, b.prototype.setTop = function () { 104 if ("100%" !== this.s.height) { 105 var b = a(window).height(), 106 c = (b - parseInt(this.s.height, 10)) / 2, 107 d = this.$outer.find(".lg"); 108 b >= parseInt(this.s.height, 10) ? d.css("top", c + "px") : d.css("top", "0px") 109 } 110 }, b.prototype.doCss = function () { 111 return !! function () { 112 var a = ["transition", "MozTransition", "WebkitTransition", "OTransition", "msTransition", "KhtmlTransition"], 113 b = document.documentElement, 114 c = 0; 115 for (c = 0; c < a.length; c++) 116 if (a[c] in b.style) return !0 117 }() 118 }, b.prototype.isVideo = function (a, b) { 119 var c; 120 if (c = this.s.dynamic ? this.s.dynamicEl[b].html : this.$items.eq(b).attr("data-html"), !a) return c ? { 121 html5: !0 122 } : (console.error("lightGallery :- data-src is not provided on slide item " + (b + 1) + ". Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html"), !1); 123 var d = a.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i), 124 e = a.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i), 125 f = a.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i), 126 g = a.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i); 127 return d ? {
128 youtube: d 129 } : e ? { 130 vimeo: e 131 } : f ? { 132 dailymotion: f 133 } : g ? { 134 vk: g 135 } : void 0 136 }, b.prototype.counter = function () { 137 this.s.counter && a(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + "</span></div>") 138 }, b.prototype.addHtml = function (b) { 139 var c, d, e = null; 140 if (this.s.dynamic ? this.s.dynamicEl[b].subHtmlUrl ? c = this.s.dynamicEl[b].subHtmlUrl : e = this.s.dynamicEl[b].subHtml : (d = this.$items.eq(b), d.attr("data-sub-html-url") ? c = d.attr("data-sub-html-url") : (e = d.attr("data-sub-html"), this.s.getCaptionFromTitleOrAlt && !e && (e = d.attr("title") || d.find("img").first().attr("alt")))), !c) 141 if (void 0 !== e && null !== e) { 142 var f = e.substring(0, 1); 143 "." !== f && "#" !== f || (e = this.s.subHtmlSelectorRelative && !this.s.dynamic ? d.find(e).html() : a(e).html()) 144 } else e = ""; 145 ".lg-sub-html" === this.s.appendSubHtmlTo ? c ? this.$outer.find(this.s.appendSubHtmlTo).load(c) : this.$outer.find(this.s.appendSubHtmlTo).html(e) : c ? this.$slide.eq(b).load(c) : this.$slide.eq(b).append(e), void 0 !== e && null !== e && ("" === e ? this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html") : this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")), this.$el.trigger("onAfterAppendSubHtml.lg", [b]) 146 }, b.prototype.preload = function (a) { 147 var b = 1, 148 c = 1; 149 for (b = 1; b <= this.s.preload && !(b >= this.$items.length - a); b++) this.loadContent(a + b, !1, 0); 150 for (c = 1; c <= this.s.preload && !(a - c < 0); c++) this.loadContent(a - c, !1, 0) 151 }, b.prototype.loadContent = function (b, c, d) { 152 var e, f, g, h, i, j, k = this, 153 l = !1, 154 m = function (b) { 155 for (var c = [], d = [], e = 0; e < b.length; e++) { 156 var g = b[e].split(" "); 157 "" === g[0] && g.splice(0, 1), d.push(g[0]), c.push(g[1]) 158 } 159 for (var h = a(window).width(), i = 0; i < c.length; i++) 160 if (parseInt(c[i], 10) > h) { 161 f = d[i]; 162 break 163 } 164 }; 165 if (k.s.dynamic) { 166 if (k.s.dynamicEl[b].poster && (l = !0, g = k.s.dynamicEl[b].poster), j = k.s.dynamicEl[b].html, f = k.s.dynamicEl[b].src, k.s.dynamicEl[b].responsive) { 167 m(k.s.dynamicEl[b].responsive.split(",")) 168 } 169 h = k.s.dynamicEl[b].srcset, i = k.s.dynamicEl[b].sizes 170 } else { 171 if (k.$items.eq(b).attr("data-poster") && (l = !0, g = k.$items.eq(b).attr("data-poster")), j = k.$items.eq(b).attr("data-html"), f = k.$items.eq(b).attr("href") || k.$items.eq(b).attr("data-src"), k.$items.eq(b).attr("data-responsive")) { 172 m(k.$items.eq(b).attr("data-responsive").split(",")) 173 } 174 h = k.$items.eq(b).attr("data-srcset"), i = k.$items.eq(b).attr("data-sizes") 175 } 176 var n = !1; 177 k.s.dynamic ? k.s.dynamicEl[b].iframe && (n = !0) : "true" === k.$items.eq(b).attr("data-iframe") && (n = !0); 178 var o = k.isVideo(f, b); 179 if (!k.$slide.eq(b).hasClass("lg-loaded")) { 180 if (n) k.$slide.eq(b).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + k.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + f + '" allowfullscreen="true"></iframe></div></div>'); 181 else if (l) { 182 var p = ""; 183 p = o && o.youtube ? "lg-has-youtube" : o && o.vimeo ? "lg-has-vimeo" : "lg-has-html5", k.$slide.eq(b).prepend('<div class="lg-video-cont ' + p + ' "><div class="lg-video"><span class="lg-video-play"><i class="gallery-pulse"></i></span><img class="lg-object lg-has-poster" src="' + g + '" /></div></div>') 184 } else o ? (k.$slide.eq(b).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>'), k.$el.trigger("hasVideo.lg", [b, f, j])) : k.$slide.eq(b).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + f + '" /></div>'); 185 if (k.$el.trigger("onAferAppendSlide.lg", [b]), e = k.$slide.eq(b).find(".lg-object"), i && e.attr("sizes", i), h) { 186 e.attr("srcset", h); 187 try { 188 picturefill({ 189 elements: [e[0]] 190 }) 191 } catch (a) { 192 console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.") 193 } 194 } 195 ".lg-sub-html" !== this.s.appendSubHtmlTo && k.addHtml(b), k.$slide.eq(b).addClass("lg-loaded") 196 } 197 k.$slide.eq(b).find(".lg-object").on("load.lg error.lg", function () { 198 var c = 0; 199 d && !a("body").hasClass("lg-from-hash") && (c = d), setTimeout(function () { 200 k.$slide.eq(b).addClass("lg-complete"), k.$el.trigger("onSlideItemLoad.lg", [b, d || 0]) 201 }, c) 202 }), o && o.html5 && !l && k.$slide.eq(b).addClass("lg-complete"), !0 === c && (k.$slide.eq(b).hasClass("lg-complete") ? k.preload(b) : k.$slide.eq(b).find(".lg-object").on("load.lg error.lg", function () { 203 k.preload(b) 204 })) 205 }, b.prototype.slide = function (b, c, d, e) { 206 var f = this.$outer.find(".lg-current").index(), 207 g = this; 208 if (!g.lGalleryOn || f !== b) { 209 var h = this.$slide.length, 210 i = g.lGalleryOn ? this.s.speed : 0; 211 if (!g.lgBusy) { 212 if (this.s.download) { 213 var j; 214 j = g.s.dynamic ? !1 !== g.s.dynamicEl[b].downloadUrl && (g.s.dynamicEl[b].downloadUrl || g.s.dynamicEl[b].src) : "false" !== g.$items.eq(b).attr("data-download-url") && (g.$items.eq(b).attr("data-download-url") || g.$items.eq(b).attr("href") || g.$items.eq(b).attr("data-src")), j ? (a("#lg-download").attr("href", j), g.$outer.removeClass("lg-hide-download")) : g.$outer.addClass("lg-hide-download") 215 } 216 if (this.$el.trigger("onBeforeSlide.lg", [f, b, c, d]), g.lgBusy = !0, clearTimeout(g.hideBartimeout), ".lg-sub-html" === this.s.appendSubHtmlTo && setTimeout(function () { 217 g.addHtml(b) 218 }, i), this.arrowDisable(b), e || (b < f ? e = "prev" : b > f && (e = "next")), c) { 219 this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide"); 220 var k, l; 221 h > 2 ? (k = b - 1, l = b + 1, 0 === b && f === h - 1 ? (l = 0, k = h - 1) : b === h - 1 && 0 === f && (l = 0, k = h - 1)) : (k
221= 0, l = 1), "prev" === e ? g.$slide.eq(l).addClass("lg-next-slide") : g.$slide.eq(k).addClass("lg-prev-slide"), g.$slide.eq(b).addClass("lg-current") 222 } else g.$outer.addClass("lg-no-trans"), this.$slide.removeClass("lg-prev-slide lg-next-slide"), "prev" === e ? (this.$slide.eq(b).addClass("lg-prev-slide"), this.$slide.eq(f).addClass("lg-next-slide")) : (this.$slide.eq(b).addClass("lg-next-slide"), this.$slide.eq(f).addClass("lg-prev-slide")), setTimeout(function () { 223 g.$slide.removeClass("lg-current"), g.$slide.eq(b).addClass("lg-current"), g.$outer.removeClass("lg-no-trans") 224 }, 50); 225 g.lGalleryOn ? (setTimeout(function () { 226 g.loadContent(b, !0, 0) 227 }, this.s.speed + 50), setTimeout(function () { 228 g.lgBusy = !1, g.$el.trigger("onAfterSlide.lg", [f, b, c, d]) 229 }, this.s.speed)) : (g.loadContent(b, !0, g.s.backdropDuration), g.lgBusy = !1, g.$el.trigger("onAfterSlide.lg", [f, b, c, d])), g.lGalleryOn = !0, this.s.counter && a("#lg-counter-current").text(b + 1) 230 } 231 g.index = b 232 } 233 }, b.prototype.goToNextSlide = function (a) { 234 var b = this, 235 c = b.s.loop; 236 a && b.$slide.length < 3 && (c = !1), b.lgBusy || (b.index + 1 < b.$slide.length ? (b.index++, b.$el.trigger("onBeforeNextSlide.lg", [b.index]), b.slide(b.index, a, !1, "next")) : c ? (b.index = 0, b.$el.trigger("onBeforeNextSlide.lg", [b.index]), b.slide(b.index, a, !1, "next")) : b.s.slideEndAnimatoin && !a && (b.$outer.addClass("lg-right-end"), setTimeout(function () { 237 b.$outer.removeClass("lg-right-end") 238 }, 400))) 239 }, b.prototype.goToPrevSlide = function (a) { 240 var b = this, 241 c = b.s.loop; 242 a && b.$slide.length < 3 && (c = !1), b.lgBusy || (b.index > 0 ? (b.index--, b.$el.trigger("onBeforePrevSlide.lg", [b.index, a]), b.slide(b.index, a, !1, "prev")) : c ? (b.index = b.$items.length - 1, b.$el.trigger("onBeforePrevSlide.lg", [b.index, a]), b.slide(b.index, a, !1, "prev")) : b.s.slideEndAnimatoin && !a && (b.$outer.addClass("lg-left-end"), setTimeout(function () { 243 b.$outer.removeClass("lg-left-end") 244 }, 400))) 245 }, b.prototype.keyPress = function () { 246 var b = this; 247 this.$items.length > 1 && a(window).on("keyup.lg", function (a) { 248 b.$items.length > 1 && (37 === a.keyCode && (a.preventDefault(), b.goToPrevSlide()), 39 === a.keyCode && (a.preventDefault(), b.goToNextSlide())) 249 }), a(window).on("keydown.lg", function (a) { 250 !0 === b.s.escKey && 27 === a.keyCode && (a.preventDefault(), b.$outer.hasClass("lg-thumb-open") ? b.$outer.removeClass("lg-thumb-open") : b.destroy()) 251 }) 252 }, b.prototype.arrow = function () { 253 var a = this; 254 this.$outer.find(".lg-prev").on("click.lg", function () { 255 a.goToPrevSlide() 256 }), this.$outer.find(".lg-next").on("click.lg", function () { 257 a.goToNextSlide() 258 }) 259 }, b.prototype.arrowDisable = function (a) { 260 !this.s.loop && this.s.hideControlOnEnd && (a + 1 < this.$slide.length ? this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled") : this.$outer.find(".lg-next").attr("disabled", "disabled").addClass("disabled"), a > 0 ? this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled") : this.$outer.find(".lg-prev").attr("disabled", "disabled").addClass("disabled")) 261 }, b.prototype.setTranslate = function (a, b, c) { 262 this.s.useLeft ? a.css("left", b) : a.css({ 263 transform: "translate3d(" + b + "px, " + c + "px, 0px)" 264 }) 265 }, b.prototype.touchMove = function (b, c) { 266 var d = c - b; 267 Math.abs(d) > 15 && (this.$outer.addClass("lg-dragging"), this.setTranslate(this.$slide.eq(this.index), d, 0), this.setTranslate(a(".lg-prev-slide"), -this.$slide.eq(this.index).width() + d, 0), this.setTranslate(a(".lg-next-slide"), this.$slide.eq(this.index).width() + d, 0)) 268 }, b.prototype.touchEnd = function (a) { 269 var b = this; 270 "lg-slide" !== b.s.mode && b.$outer.addClass("lg-slide"), this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity", "0"), setTimeout(function () { 271 b.$outer.removeClass("lg-dragging"), a < 0 && Math.abs(a) > b.s.swipeThreshold ? b.goToNextSlide(!0) : a > 0 && Math.abs(a) > b.s.swipeThreshold ? b.goToPrevSlide(!0) : Math.abs(a) < 5 && b.$el.trigger("onSlideClick.lg"), b.$slide.removeAttr("style") 272 }), setTimeout(function () { 273 b.$outer.hasClass("lg-dragging") || "lg-slide" === b.s.mode || b.$outer.removeClass("lg-slide") 274 }, b.s.speed + 100) 275 }, b.prototype.enableSwipe = function () { 276 var a = this, 277 b = 0, 278 c = 0, 279 d = !1; 280 a.s.enableSwipe && a.doCss() && (a.$slide.on("touchstart.lg", function (c) { 281 a.$outer.hasClass("lg-zoomed") || a.lgBusy || (c.preventDefault(), a.manageSwipeClass(), b = c.originalEvent.targetTouches[0].pageX) 282 }), a.$slide.on("touchmove.lg", function (e) { 283 a.$outer.hasClass("lg-zoomed") || (e.preventDefault(), c = e.originalEvent.targetTouches[0].pageX, a.touchMove(b, c), d = !0) 284 }), a.$slide.on("touchend.lg", function () { 285 a.$outer.hasClass("lg-zoomed") || (d ? (d = !1, a.touchEnd(c - b)) : a.$el.trigger("onSlideClick.lg")) 286 })) 287 }, b.prototype.enableDrag = function () { 288 var b = this, 289 c = 0, 290 d = 0, 291 e = !1, 292 f = !1; 293 b.s.enableDrag && b.doCss() && (b.$slide.on("mousedown.lg", function (d) { 294 b.$outer.hasClass("lg-zoomed") || b.lgBusy || a(d.target).text().trim() || (d.preventDefault(), b.manageSwipeClass(), c = d.pageX, e = !0, b.$outer.scrollLeft += 1, b.$outer.scrollLeft -= 1, b.$outer.removeClass("lg-grab").addClass("lg-grabbing"), b.$el.trigger("onDragstart.lg")) 295 }), a(window).on("mousemove.lg", function (a) { 296 e && (f = !0, d = a.pageX, b.touchMove(c, d), b.$el.trigger("onDragmove.lg")) 297 }), a(window).on("mouseup.lg", function (g) { 298 f ? (f = !1, b.touchEnd(d - c), b.$el.trigger("onDragend.lg")) : (a(g.target).hasClass("lg-object") || a(g.target).hasClass("lg-video-play")) && b.$el.trigger("onSlideClick.lg"), e && (e = !1, b.$outer.removeClass("lg-grabbing").addClass("lg-grab")) 299 })) 300 }, b.prototype.manageSwipeClass = function () { 301 var a = this.index + 1, 302 b = this.index - 1; 303 this.s.loop && this.$slide.length > 2 && (0 === this.index ? b = this.$slide.length - 1 : this.index === this.$slide.length - 1 && (a = 0)), this.$slide.removeClass("lg-next-slide lg-prev-slide"), b > -1 && this.$slide.eq(b).addClass("lg-prev-slide"), this.$slide.eq(a).addClass("lg-next-slide") 304 }, b.prototype.mousewheel = function () { 305 var a = this; 306 a.$outer.on("mousewheel.lg", function (b) { 307 b.deltaY && (b.deltaY > 0 ? a.goToPrevSlide() : a.goToNextSlide(), b.preventDefault()) 308 }) 309 }, b.prototype.closeGallery = function () { 310 var b = this, 311 c = !1; 312 this.$outer.find(".lg-close").on("click.lg", function () { 313 b.destroy() 314 }), b.s.closable && (b.$outer.on("mousedown.lg", function (b) { 315 c = !!(a(b.target).is(".lg-outer") || a(b.target).is(".lg-item ") || a(b.target).is(".lg-img-wrap")) 316 }), b.$outer.on("mousemove.lg", function () { 317 c = !1 318 }), b.$outer.on("mouseup.lg", function (d) { 319 (a(d.target).is(".lg-outer") || a(d.target).is(".lg-item ") || a(d.target).is(".lg-img-wrap") && c) && (b.$outer.hasClass("lg-dragging") || b.destroy()) 320 })) 321 }, b.prototype.destroy = function (b) { 322 var c = this; 323 b || (c.$el.trigger("onBeforeClose.lg"), a(window).scrollTop(c.prevScrollTop)), b && (c.s.dynamic || this.$items.off("click.lg click.lgcustom"), a.removeData(c.el, "lightGallery")), this.$el.off(".lg.tm"), a.each(a.fn.lightGallery.modules, function (a) { 324 c.modules[a] && c.modules[a].destroy() 325 }), this.lGalleryOn = !1, clearTimeout(c.hideBartimeout), this.hideBartimeout = !1, a(window).off(".lg"), a("body").removeClass("lg-on lg-from-hash"), c.$outer && c.$outer.removeClass("lg-visible"), a(".lg-backdrop").removeClass("in"), setTimeout(function () { 326 c.$outer && c.$outer.remove(), a(".lg-backdrop").remove(), b || c.$el.trigger("onCloseAfter.lg") 327 }, c.s.backdropDuration + 50) 328 }, a.fn.lightGallery = function (c) { 329 return this.each(function () { 330 if (a.data(this, "lightGallery")) try { 331 a(this).data("lightGallery").init() 332 } catch (a) { 333 console.error("lightGallery has not initiated properly") 334 } else a.data(this, "lightGallery", new b(this, c)) 335 }) 336 }, a.fn.lightGallery.modules = {} 337 }() 338}), 339function (a, b) { 340 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 341 return b(a) 342 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 343}(0, function (a) { 344 ! function () { 345 "use strict"; 346 var b = { 347 autoplay: !1, 348 pause: 5e3, 349 progressBar: !0, 350 fourceAutoplay: !1, 351 autoplayControls: !0, 352 appendAutoplayControlsTo: ".lg-toolbar" 353 }, 354 c = function (c) { 355 return this.core = a(c).data("lightGallery"), this.$el = a(c), !(this.core.$items.length < 2) && (this.core.s = a.extend({}, b, this.core.s), this.interval = !1, this.fromAuto = !0, this.canceledOnTouch = !1, this.fourceAutoplayTemp = this.core.s.fourceAutoplay, this.core.doCss() || (this.core.s.progressBar = !1), this.init(), this) 356 };
357 c.prototype.init = function () { 358 var a = this; 359 a.core.s.autoplayControls && a.controls(), a.core.s.progressBar && a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'), a.progress(), a.core.s.autoplay && a.$el.one("onSlideItemLoad.lg.tm", function () { 360 a.startlAuto() 361 }), a.$el.on("onDragstart.lg.tm touchstart.lg.tm", function () { 362 a.interval && (a.cancelAuto(), a.canceledOnTouch = !0) 363 }), a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm", function () { 364 !a.interval && a.canceledOnTouch && (a.startlAuto(), a.canceledOnTouch = !1) 365 }) 366 }, c.prototype.progress = function () { 367 var a, b, c = this; 368 c.$el.on("onBeforeSlide.lg.tm", function () { 369 c.core.s.progressBar && c.fromAuto && (a = c.core.$outer.find(".lg-progress-bar"), b = c.core.$outer.find(".lg-progress"), c.interval && (b.removeAttr("style"), a.removeClass("lg-start"), setTimeout(function () { 370 b.css("transition", "width " + (c.core.s.speed + c.core.s.pause) + "ms ease 0s"), a.addClass("lg-start") 371 }, 20))), c.fromAuto || c.core.s.fourceAutoplay || c.cancelAuto(), c.fromAuto = !1 372 }) 373 }, c.prototype.controls = function () { 374 var b = this; 375 a(this.core.s.appendAutoplayControlsTo).append('<span class="lg-autoplay-button lg-icon"></span>'), b.core.$outer.find(".lg-autoplay-button").on("click.lg", function () { 376 a(b.core.$outer).hasClass("lg-show-autoplay") ? (b.cancelAuto(), b.core.s.fourceAutoplay = !1) : b.interval || (b.startlAuto(), b.core.s.fourceAutoplay = b.fourceAutoplayTemp) 377 }) 378 }, c.prototype.startlAuto = function () { 379 var a = this; 380 a.core.$outer.find(".lg-progress").css("transition", "width " + (a.core.s.speed + a.core.s.pause) + "ms ease 0s"), a.core.$outer.addClass("lg-show-autoplay"), a.core.$outer.find(".lg-progress-bar").addClass("lg-start"), a.interval = setInterval(function () { 381 a.core.index + 1 < a.core.$items.length ? a.core.index++ : a.core.index = 0, a.fromAuto = !0, a.core.slide(a.core.index, !1, !1, "next") 382 }, a.core.s.speed + a.core.s.pause) 383 }, c.prototype.cancelAuto = function () { 384 clearInterval(this.interval), this.interval = !1, this.core.$outer.find(".lg-progress").removeAttr("style"), this.core.$outer.removeClass("lg-show-autoplay"), this.core.$outer.find(".lg-progress-bar").removeClass("lg-start") 385 }, c.prototype.destroy = function () { 386 this.cancelAuto(), this.core.$outer.find(".lg-progress-bar").remove() 387 }, a.fn.lightGallery.modules.autoplay = c 388 }() 389}), 390function (a, b) { 391 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 392 return b(a) 393 }) : "object" == typeof module && module.exports ? module.exports = b(require("jquery")) : b(a.jQuery) 394}(this, function (a) { 395 ! function () { 396 "use strict"; 397 398 function b() { 399 return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement 400 } 401 var c = { 402 fullScreen: !0 403 }, 404 d = function (b) { 405 return this.core = a(b).data("lightGallery"), this.$el = a(b), this.core.s = a.extend({}, c, this.core.s), this.init(), this 406 }; 407 d.prototype.init = function () { 408 var a = ""; 409 if (this.core.s.fullScreen) { 410 if (!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled)) return; 411 a = '<span class="lg-fullscreen lg-icon"></span>', this.core.$outer.find(".lg-toolbar").append(a), this.fullScreen() 412 } 413 }, d.prototype.requestFullscreen = function () { 414 var a = document.documentElement; 415 a.requestFullscreen ? a.requestFullscreen() : a.msRequestFullscreen ? a.msRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen() 416 }, d.prototype.exitFullscreen = function () { 417 document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen() 418 }, d.prototype.fullScreen = function () { 419 var c = this; 420 a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg", function () { 421 c.core.$outer.toggleClass("lg-fullscreen-on") 422 }), this.core.$outer.find(".lg-fullscreen").on("click.lg", function () { 423 b() ? c.exitFullscreen() : c.requestFullscreen() 424 }) 425 }, d.prototype.destroy = function () { 426 b() && this.exitFullscreen(), a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg") 427 }, a.fn.lightGallery.modules.fullscreen = d 428 }() 429}), 430function (a, b) { 431 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 432 return b(a) 433 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 434}(0, function (a) { 435 ! function () { 436 "use strict"; 437 var b = { 438 pager: !1 439 }, 440 c = function (c) { 441 return this.core = a(c).data("lightGallery"), this.$el = a(c), this.core.s = a.extend({}, b, this.core.s), this.core.s.pager && this.core.$items.length > 1 && this.init(), this 442 };
vendor: 11,452 bytes, lines 443-644
443 c.prototype.init = function () { 444 var b, c, d, e = this, 445 f = ""; 446 if (e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'), e.core.s.dynamic) 447 for (var g = 0; g < e.core.s.dynamicEl.length; g++) f += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + e.core.s.dynamicEl[g].thumb + '" /></div></span>'; 448 else e.core.$items.each(function () { 449 e.core.s.exThumbImage ? f += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + a(this).attr(e.core.s.exThumbImage) + '" /></div></span>' : f += '<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + a(this).find("img").attr("src") + '" /></div></span>' 450 }); 451 c = e.core.$outer.find(".lg-pager-outer"), c.html(f), b = e.core.$outer.find(".lg-pager-cont"), b.on("click.lg touchend.lg", function () { 452 var b = a(this); 453 e.core.index = b.index(), e.core.slide(e.core.index, !1, !0, !1) 454 }), c.on("mouseover.lg", function () { 455 clearTimeout(d), c.addClass("lg-pager-hover") 456 }), c.on("mouseout.lg", function () { 457 d = setTimeout(function () { 458 c.removeClass("lg-pager-hover") 459 }) 460 }), e.core.$el.on("onBeforeSlide.lg.tm", function (a, c, d) { 461 b.removeClass("lg-pager-active"), b.eq(d).addClass("lg-pager-active") 462 }) 463 }, c.prototype.destroy = function () {}, a.fn.lightGallery.modules.pager = c 464 }() 465}), 466function (a, b) { 467 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 468 return b(a) 469 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 470}(0, function (a) { 471 ! function () { 472 "use strict"; 473 var b = { 474 thumbnail: !0, 475 animateThumb: !0, 476 currentPagerPosition: "middle", 477 thumbWidth: 100, 478 thumbHeight: "80px", 479 thumbContHeight: 100, 480 thumbMargin: 5, 481 exThumbImage: !1, 482 showThumbByDefault: !0, 483 toogleThumb: !0, 484 pullCaptionUp: !0, 485 enableThumbDrag: !0, 486 enableThumbSwipe: !0, 487 swipeThreshold: 50, 488 loadYoutubeThumbnail: !0, 489 youtubeThumbSize: 1, 490 loadVimeoThumbnail: !0, 491 vimeoThumbSize: "thumbnail_small", 492 loadDailymotionThumbnail: !0 493 }, 494 c = function (c) { 495 return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.$el = a(c), this.$thumbOuter = null, this.thumbOuterWidth = 0, this.thumbTotalWidth = this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin), this.thumbIndex = this.core.index, this.core.s.animateThumb && (this.core.s.thumbHeight = "100%"), this.left = 0, this.init(), this 496 }; 497 c.prototype.init = function () { 498 var a = this; 499 this.core.s.thumbnail && this.core.$items.length > 1 && (this.core.s.showThumbByDefault && setTimeout(function () { 500 a.core.$outer.addClass("lg-thumb-open") 501 }, 700), this.core.s.pullCaptionUp && this.core.$outer.addClass("lg-pull-caption-up"), this.build(), this.core.s.animateThumb && this.core.doCss() ? (this.core.s.enableThumbDrag && this.enableThumbDrag(), this.core.s.enableThumbSwipe && this.enableThumbSwipe(), this.thumbClickable = !1) : this.thumbClickable = !0, this.toogle(), this.thumbkeyPress()) 502 }, c.prototype.build = function () { 503 function b(a, b, c) { 504 var g, h = d.core.isVideo(a, c) || {}, 505 i = ""; 506 h.youtube || h.vimeo || h.dailymotion ? h.youtube ? g = d.core.s.loadYoutubeThumbnail ? "//img.youtube.com/vi/" + h.youtube[1] + "/" + d.core.s.youtubeThumbSize + ".jpg" : b : h.vimeo ? d.core.s.loadVimeoThumbnail ? (g = "//i.vimeocdn.com/video/error_" + f + ".jpg", i = h.vimeo[1]) : g = b : h.dailymotion && (g = d.core.s.loadDailymotionThumbnail ? "//www.dailymotion.com/thumbnail/video/" + h.dailymotion[1] : b) : g = b, e += '<div data-vimeo-id="' + i + '" class="lg-thumb-item" style="width:' + d.core.s.thumbWidth + "px; height: " + d.core.s.thumbHeight + "; margin-right: " + d.core.s.thumbMargin + 'px"><img src="' + g + '" /></div>', i = "" 507 } 508 var c, d = this, 509 e = "", 510 f = "", 511 g = '<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>'; 512 switch (this.core.s.vimeoThumbSize) { 513 case "thumbnail_large": 514 f = "640"; 515 break; 516 case "thumbnail_medium": 517 f = "200x150"; 518 break; 519 case "thumbnail_small": 520 f = "100x75" 521 } 522 if (d.core.$outer.addClass("lg-has-thumb"), d.core.$outer.find(".lg").append(g), d.$thumbOuter = d.core.$outer.find(".lg-thumb-outer"), d.thumbOuterWidth = d.$thumbOuter.width(), d.core.s.animateThumb && d.core.$outer.find(".lg-thumb").css({ 523 width: d.thumbTotalWidth + "px", 524 position: "relative" 525 }), this.core.s.animateThumb && d.$thumbOuter.css("height", d.core.s.thumbContHeight + "px"), d.core.s.dynamic) 526 for (var h = 0; h < d.core.s.dynamicEl.length; h++) b(d.core.s.dynamicEl[h].src, d.core.s.dynamicEl[h].thumb, h); 527 else d.core.$items.each(function (c) { 528 d.core.s.exThumbImage ? b(a(this).attr("href") || a(this).attr("data-src"), a(this).attr(d.core.s.exThumbImage), c) : b(a(this).attr("href") || a(this).attr("data-src"), a(this).find("img").attr("src"), c) 529 }); 530 d.core.$outer.find(".lg-thumb").html(e), c = d.core.$outer.find(".lg-thumb-item"), c.each(function () { 531 var b = a(this), 532 c = b.attr("data-vimeo-id"); 533 c && a.getJSON("//www.vimeo.com/api/v2/video/" + c + ".json?callback=?", { 534 format: "json" 535 }, function (a) { 536 b.find("img").attr("src", a[0][d.core.s.vimeoThumbSize]) 537 }) 538 }), c.eq(d.core.index).addClass("active"), d.core.$el.on("onBeforeSlide.lg.tm", function () { 539 c.removeClass("active"), c.eq(d.core.index).addClass("active") 540 }), c.on("click.lg touchend.lg", function () { 541 var b = a(this); 542 setTimeout(function () { 543 (d.thumbClickable && !d.core.lgBusy || !d.core.doCss()) && (d.core.index = b.index(), d.core.slide(d.core.index, !1, !0, !1)) 544 }, 50) 545 }), d.core.$el.on("onBeforeSlide.lg.tm", function () { 546 d.animateThumb(d.core.index) 547 }), a(window).on("resize.lg.thumb orientationchange.lg.thumb", function () { 548 setTimeout(function () { 549 d.animateThumb(d.core.index), d.thumbOuterWidth = d.$thumbOuter.width() 550 }, 200) 551 }) 552 }, c.prototype.setTranslate = function (a) { 553 this.core.$outer.find(".lg-thumb").css({ 554 transform: "translate3d(-" + a + "px, 0px, 0px)" 555 }) 556 }, c.prototype.animateThumb = function (a) { 557 var b = this.core.$outer.find(".lg-thumb"); 558 if (this.core.s.animateThumb) { 559 var c; 560 switch (this.core.s.currentPagerPosition) { 561 case "left": 562 c = 0; 563 break; 564 case "middle": 565 c = this.thumbOuterWidth / 2 - this.core.s.thumbWidth / 2; 566 break; 567 case "right": 568 c = this.thumbOuterWidth - this.core.s.thumbWidth 569 } 570 this.left = (this.core.s.thumbWidth + this.core.s.thumbMargin) * a - 1 - c, this.left > this.thumbTotalWidth - this.thumbOuterWidth && (this.left = this.thumbTotalWidth - this.thumbOuterWidth), this.left < 0 && (this.left = 0), this.core.lGalleryOn ? (b.hasClass("on") || this.core.$outer.find(".lg-thumb").css("transition-duration", this.core.s.speed + "ms"), this.core.doCss() || b.animate({ 571 left: -this.left + "px" 572 }, this.core.s.speed)) : this.core.doCss() || b.css("left", -this.left + "px"), this.setTranslate(this.left) 573 } 574 }, c.prototype.enableThumbDrag = function () { 575 var b = this, 576 c = 0, 577 d = 0, 578 e = !1, 579 f = !1, 580 g = 0; 581 b.$thumbOuter.addClass("lg-grab"), b.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb", function (a) { 582 b.thumbTotalWidth > b.thumbOuterWidth && (a.preventDefault(), c = a.pageX, e = !0, b.core.$outer.scrollLeft += 1, b.core.$outer.scrollLeft -= 1, b.thumbClickable = !1, b.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing")) 583 }), a(window).on("mousemove.lg.thumb", function (a) { 584 e && (g = b.left, f = !0, d = a.pageX, b.$thumbOuter.addClass("lg-dragging"), g -= d - c, g > b.thumbTotalWidth - b.thumbOuterWidth && (g = b.thumbTotalWidth - b.thumbOuterWidth), g < 0 && (g = 0), b.setTranslate(g)) 585 }), a(window).on("mouseup.lg.thumb", function () { 586 f ? (f = !1, b.$thumbOuter.removeClass("lg-dragging"), b.left = g, Math.abs(d - c) < b.core.s.swipeThreshold && (b.thumbClickable = !0)) : b.thumbClickable = !0, e && (e = !1, b.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")) 587 }) 588 }, c.prototype.enableThumbSwipe = function () { 589 var a = this, 590 b = 0, 591 c = 0, 592 d = !1, 593 e = 0; 594 a.core.$outer.find(".lg-thumb").on("touchstart.lg", function (c) { 595 a.thumbTotalWidth > a.thumbOuterWidth && (c.preventDefault(), b = c.originalEvent.targetTouches[0].pageX, a.thumbClickable = !1) 596 }), a.core.$outer.find(".lg-thumb").on("touchmove.lg", function (f) { 597 a.thumbTotalWidth > a.thumbOuterWidth && (f.preventDefault(), c = f.originalEvent.targetTouches[0].pageX, d = !0, a.$thumbOuter.addClass("lg-dragging"), e = a.left, e -= c - b, e > a.thumbTotalWidth - a.thumbOuterWidth && (e = a.thumbTotalWidth - a.thumbOuterWidth), e < 0 && (e = 0), a.setTranslate(e)) 598 }), a.core.$outer.find(".lg-thumb").on("touchend.lg", function () { 599 a.thumbTotalWidth > a.thumbOuterWidth && d ? (d = !1, a.$thumbOuter.removeClass("lg-dragging"), Math.abs(c - b) < a.core.s.swipeThreshold && (a.thumbClickable = !0), a.left = e) : a.thumbClickable = !0 600 }) 601 }, c.prototype.toogle = function () { 602 var a = this; 603 a.core.s.toogleThumb && (a.core.$outer.addClass("lg-can-toggle"), a.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>'), a.core.$outer.find(".lg-toogle-thumb").on("click.lg", function () { 604 a.core.$outer.toggleClass("lg-thumb-open") 605 })) 606 }, c.prototype.thumbkeyPress = function () { 607 var b = this; 608 a(window).on("keydown.lg.thumb", function (a) { 609 38 === a.keyCode ? (a.preventDefault(), b.core.$outer.addClass("lg-thumb-open")) : 40 === a.keyCode && (a.preventDefault(), b.core.$outer.removeClass("lg-thumb-open")) 610 }) 611 }, c.prototype.destroy = function () { 612 this.core.s.thumbnail && this.core.$items.length > 1 && (a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"), this.$thumbOuter.remove(), this.core.$outer.removeClass("lg-has-thumb")) 613 }, a.fn.lightGallery.modules.Thumbnail = c 614 }() 615}), 616function (a, b) { 617 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 618 return b(a) 619 }) : "object" == typeof module && module.exports ? module.exports = b(require("jquery")) : b(a.jQuery) 620}(this, function (a) { 621 ! function () { 622 "use strict"; 623 624 function b(a, b, c, d) { 625 var e = this; 626 if (e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c, "lg-object", !0, b, d)), d) 627 if (e.core.s.videojs) try { 628 videojs(e.core.$slide.eq(b).find(".lg-html5").get(0), e.core.s.videojsOptions, function () { 629 !e.videoLoaded && e.core.s.autoplayFirstVideo && this.play() 630 }) 631 } catch (a) { 632 console.error("Make sure you have included videojs") 633 } else !e.videoLoaded && e.core.s.autoplayFirstVideo && e.core.$slide.eq(b).find(".lg-html5").get(0).play() 634 } 635 636 function c(a, b) { 637 var c = this.core.$slide.eq(b).find(".lg-video-cont"); 638 c.hasClass("lg-has-iframe") || (c.css("max-width", this.core.s.videoMaxWidth), this.videoLoaded = !0) 639 } 640 641 function d(b, c, d) { 642 var e = this, 643 f = e.core.$slide.eq(c), 644 g = f.find(".lg-youtube").get(0),
vendor: 4,113 bytes, lines 645-712
645 h = f.find(".lg-vimeo").get(0), 646 i = f.find(".lg-dailymotion").get(0), 647 j = f.find(".lg-vk").get(0), 648 k = f.find(".lg-html5").get(0); 649 if (g) g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', "*"); 650 else if (h) try { 651 $f(h).api("pause") 652 } catch (a) { 653 console.error("Make sure you have included froogaloop2 js") 654 } else if (i) i.contentWindow.postMessage("pause", "*"); 655 else if (k) 656 if (e.core.s.videojs) try { 657 videojs(k).pause() 658 } catch (a) { 659 console.error("Make sure you have included videojs") 660 } else k.pause(); 661 j && a(j).attr("src", a(j).attr("src").replace("&autoplay", "&noplay")); 662 var l; 663 l = e.core.s.dynamic ? e.core.s.dynamicEl[d].src : e.core.$items.eq(d).attr("href") || e.core.$items.eq(d).attr("data-src"); 664 var m = e.core.isVideo(l, d) || {}; 665 (m.youtube || m.vimeo || m.dailymotion || m.vk) && e.core.$outer.addClass("lg-hide-download") 666 } 667 var e = { 668 videoMaxWidth: "855px", 669 autoplayFirstVideo: !0, 670 youtubePlayerParams: !1, 671 vimeoPlayerParams: !1, 672 dailymotionPlayerParams: !1, 673 vkPlayerParams: !1, 674 videojs: !1, 675 videojsOptions: {} 676 }, 677 f = function (b) { 678 return this.core = a(b).data("lightGallery"), this.$el = a(b), this.core.s = a.extend({}, e, this.core.s), this.videoLoaded = !1, this.init(), this 679 }; 680 f.prototype.init = function () { 681 var e = this; 682 e.core.$el.on("hasVideo.lg.tm", b.bind(this)), e.core.$el.on("onAferAppendSlide.lg.tm", c.bind(this)), e.core.doCss() && e.core.$items.length > 1 && (e.core.s.enableSwipe || e.core.s.enableDrag) ? e.core.$el.on("onSlideClick.lg.tm", function () { 683 var a = e.core.$slide.eq(e.core.index); 684 e.loadVideoOnclick(a) 685 }) : e.core.$slide.on("click.lg", function () { 686 e.loadVideoOnclick(a(this)) 687 }), e.core.$el.on("onBeforeSlide.lg.tm", d.bind(this)), e.core.$el.on("onAfterSlide.lg.tm", function (a, b) { 688 e.core.$slide.eq(b).removeClass("lg-video-playing") 689 }), e.core.s.autoplayFirstVideo && e.core.$el.on("onAferAppendSlide.lg.tm", function (a, b) { 690 if (!e.core.lGalleryOn) { 691 var c = e.core.$slide.eq(b); 692 setTimeout(function () { 693 e.loadVideoOnclick(c) 694 }, 100) 695 } 696 }) 697 }, f.prototype.loadVideo = function (b, c, d, e, f) { 698 var g = "", 699 h = 1, 700 i = "", 701 j = this.core.isVideo(b, e) || {}; 702 if (d && (h = this.videoLoaded ? 0 : this.core.s.autoplayFirstVideo ? 1 : 0), j.youtube) i = "?wmode=opaque&autoplay=" + h + "&enablejsapi=1", this.core.s.youtubePlayerParams && (i = i + "&" + a.param(this.core.s.youtubePlayerParams)), g = '<iframe class="lg-video-object lg-youtube ' + c + '" width="560" height="315" src="//www.youtube.com/embed/' + j.youtube[1] + i + '" frameborder="0" allowfullscreen></iframe>'; 703 else if (j.vimeo) i = "?autoplay=" + h + "&api=1", this.core.s.vimeoPlayerParams && (i = i + "&" + a.param(this.core.s.vimeoPlayerParams)), g = '<iframe class="lg-video-object lg-vimeo ' + c + '" width="560" height="315" src="//player.vimeo.com/video/' + j.vimeo[1] + i + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; 704 else if (j.dailymotion) i = "?wmode=opaque&autoplay=" + h + "&api=postMessage", this.core.s.dailymotionPlayerParams && (i = i + "&" + a.param(this.core.s.dailymotionPlayerParams)), g = '<iframe class="lg-video-object lg-dailymotion ' + c + '" width="560" height="315" src="//www.dailymotion.com/embed/video/' + j.dailymotion[1] + i + '" frameborder="0" allowfullscreen></iframe>'; 705 else if (j.html5) { 706 var k = f.substring(0, 1); 707 "." !== k && "#" !== k || (f = a(f).html()), g = f 708 } else j.vk && (i = "&autoplay=" + h, this.core.s.vkPlayerParams && (i = i + "&" + a.param(this.core.s.vkPlayerParams)), g = '<iframe class="lg-video-object lg-vk ' + c + '" width="560" height="315" src="//vk.com/video_ext.php?' + j.vk[1] + i + '" frameborder="0" allowfullscreen></iframe>'); 709 return g 710 }, f.prototype.loadVideoOnclick = function (a) { 711 var b = this; 712 if (a.find(".lg-object").hasClass("lg-has-poster") && a.find(".lg-object").is(":visible"))
713 if (a.hasClass("lg-has-video")) { 714 var c = a.find(".lg-youtube").get(0), 715 d = a.find(".lg-vimeo").get(0), 716 e = a.find(".lg-dailymotion").get(0), 717 f = a.find(".lg-html5").get(0); 718 if (c) c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', "*"); 719 else if (d) try { 720 $f(d).api("play") 721 } catch (a) { 722 console.error("Make sure you have included froogaloop2 js") 723 } else if (e) e.contentWindow.postMessage("play", "*"); 724 else if (f) 725 if (b.core.s.videojs) try { 726 videojs(f).play() 727 } catch (a) { 728 console.error("Make sure you have included videojs") 729 } else f.play(); 730 a.addClass("lg-video-playing") 731 } else { 732 a.addClass("lg-video-playing lg-has-video"); 733 var g, h, i = function (c, d) { 734 if (a.find(".lg-video").append(b.loadVideo(c, "", !1, b.core.index, d)), d) 735 if (b.core.s.videojs) try { 736 videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0), b.core.s.videojsOptions, function () { 737 this.play() 738 }) 739 } catch (a) { 740 console.error("Make sure you have included videojs") 741 } else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play() 742 }; 743 b.core.s.dynamic ? (g = b.core.s.dynamicEl[b.core.index].src, h = b.core.s.dynamicEl[b.core.index].html, i(g, h)) : (g = b.core.$items.eq(b.core.index).attr("href") || b.core.$items.eq(b.core.index).attr("data-src"), h = b.core.$items.eq(b.core.index).attr("data-html"), i(g, h)); 744 var j = a.find(".lg-object"); 745 a.find(".lg-video").append(j), a.find(".lg-video-object").hasClass("lg-html5") || (a.removeClass("lg-complete"), a.find(".lg-video-object").on("load.lg error.lg", function () { 746 a.addClass("lg-complete") 747 })) 748 } 749 }, f.prototype.destroy = function () { 750 this.videoLoaded = !1 751 }, a.fn.lightGallery.modules.video = f 752 }() 753}), 754function (a, b) { 755 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 756 return b(a) 757 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 758}(0, function (a) { 759 ! function () { 760 "use strict"; 761 var b = function () { 762 var a = !1, 763 b = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); 764 return b && parseInt(b[2], 10) < 54 && (a = !0), a 765 }, 766 c = { 767 scale: 1, 768 zoom: !0, 769 actualSize: !0, 770 enableZoomAfter: 300, 771 useLeftForZoom: b() 772 }, 773 d = function (b) { 774 return this.core = a(b).data("lightGallery"), this.core.s = a.extend({}, c, this.core.s), this.core.s.zoom && this.core.doCss() && (this.init(), this.zoomabletimeout = !1, this.pageX = a(window).width() / 2, this.pageY = a(window).height() / 2 + a(window).scrollTop()), this 775 }; 776 d.prototype.init = function () { 777 var b = this, 778 c = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>'; 779 b.core.s.actualSize && (c += '<span id="lg-actual-size" class="lg-icon"></span>'), b.core.s.useLeftForZoom ? b.core.$outer.addClass("lg-use-left-for-zoom") : b.core.$outer.addClass("lg-use-transition-for-zoom"), this.core.$outer.find(".lg-toolbar").append(c), b.core.$el.on("onSlideItemLoad.lg.tm.zoom", function (c, d, e) { 780 var f = b.core.s.enableZoomAfter + e; 781 a("body").hasClass("lg-from-hash") && e ? f = 0 : a("body").removeClass("lg-from-hash"), b.zoomabletimeout = setTimeout(function () { 782 b.core.$slide.eq(d).addClass("lg-zoomable") 783 }, f + 30) 784 }); 785 var d = 1, 786 e = function (c) { 787 var d, e, f = b.core.$outer.find(".lg-current .lg-image"), 788 g = (a(window).width() - f.prop("offsetWidth")) / 2, 789 h = (a(window).height() - f.prop("offsetHeight")) / 2 + a(window).scrollTop(); 790 d = b.pageX - g, e = b.pageY - h; 791 var i = (c - 1) * d, 792 j = (c - 1) * e; 793 f.css("transform", "scale3d(" + c + ", " + c + ", 1)").attr("data-scale", c), b.core.s.useLeftForZoom ? f.parent().css({ 794 left: -i + "px", 795 top: -j + "px" 796 }).attr("data-x", i).attr("data-y", j) : f.parent().css("transform", "translate3d(-" + i + "px, -" + j + "px, 0)").attr("data-x", i).attr("data-y", j) 797 }, 798 f = function () { 799 d > 1 ? b.core.$outer.addClass("lg-zoomed") : b.resetZoom(), d < 1 && (d = 1), e(d) 800 }, 801 g = function (c, e, g, h) { 802 var i, j = e.prop("offsetWidth"); 803 i = b.core.s.dynamic ? b.core.s.dynamicEl[g].width || e[0].naturalWi
803dth || j : b.core.$items.eq(g).attr("data-width") || e[0].naturalWidth || j; 804 var k; 805 b.core.$outer.hasClass("lg-zoomed") ? d = 1 : i > j && (k = i / j, d = k || 2), h ? (b.pageX = a(window).width() / 2, b.pageY = a(window).height() / 2 + a(window).scrollTop()) : (b.pageX = c.pageX || c.originalEvent.targetTouches[0].pageX, b.pageY = c.pageY || c.originalEvent.targetTouches[0].pageY), f(), setTimeout(function () { 806 b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab") 807 }, 10) 808 }, 809 h = !1; 810 b.core.$el.on("onAferAppendSlide.lg.tm.zoom", function (a, c) { 811 var d = b.core.$slide.eq(c).find(".lg-image"); 812 d.on("dblclick", function (a) { 813 g(a, d, c) 814 }), d.on("touchstart", function (a) { 815 h ? (clearTimeout(h), h = null, g(a, d, c)) : h = setTimeout(function () { 816 h = null 817 }, 300), a.preventDefault() 818 }) 819 }), a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom", function () { 820 b.pageX = a(window).width() / 2, b.pageY = a(window).height() / 2 + a(window).scrollTop(), e(d) 821 }), a("#lg-zoom-out").on("click.lg", function () { 822 b.core.$outer.find(".lg-current .lg-image").length && (d -= b.core.s.scale, f()) 823 }), a("#lg-zoom-in").on("click.lg", function () { 824 b.core.$outer.find(".lg-current .lg-image").length && (d += b.core.s.scale, f()) 825 }), a("#lg-actual-size").on("click.lg", function (a) { 826 g(a, b.core.$slide.eq(b.core.index).find(".lg-image"), b.core.index, !0) 827 }), b.core.$el.on("onBeforeSlide.lg.tm", function () { 828 d = 1, b.resetZoom() 829 }), b.zoomDrag(), b.zoomSwipe() 830 }, d.prototype.resetZoom = function () { 831 this.core.$outer.removeClass("lg-zoomed"), this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"), this.core.$slide.find(".lg-image").removeAttr("style data-scale"), this.pageX = a(window).width() / 2, this.pageY = a(window).height() / 2 + a(window).scrollTop() 832 }, d.prototype.zoomSwipe = function () { 833 var a = this, 834 b = {}, 835 c = {}, 836 d = !1, 837 e = !1, 838 f = !1; 839 a.core.$slide.on("touchstart.lg", function (c) { 840 if (a.core.$outer.hasClass("lg-zoomed")) { 841 var d = a.core.$slide.eq(a.core.index).find(".lg-object"); 842 f = d.prop("offsetHeight") * d.attr("data-scale") > a.core.$outer.find(".lg").height(), e = d.prop("offsetWidth") * d.attr("data-scale") > a.core.$outer.find(".lg").width(), (e || f) && (c.preventDefault(), b = { 843 x: c.originalEvent.targetTouches[0].pageX, 844 y: c.originalEvent.targetTouches[0].pageY 845 }) 846 } 847 }), a.core.$slide.on("touchmove.lg", function (g) { 848 if (a.core.$outer.hasClass("lg-zoomed")) { 849 var h, i, j = a.core.$slide.eq(a.core.index).find(".lg-img-wrap"); 850 g.preventDefault(), d = !0, c = { 851 x: g.originalEvent.targetTouches[0].pageX, 852 y: g.originalEvent.targetTouches[0].pageY 853 }, a.core.$outer.addClass("lg-zoom-dragging"), i = f ? -Math.abs(j.attr("data-y")) + (c.y - b.y) : -Math.abs(j.attr("data-y")), h = e ? -Math.abs(j.attr("data-x")) + (c.x - b.x) : -Math.abs(j.attr("data-x")), (Math.abs(c.x - b.x) > 15 || Math.abs(c.y - b.y) > 15) && (a.core.s.useLeftForZoom ? j.css({ 854 left: h + "px", 855 top: i + "px" 856 }) : j.css("transform", "translate3d(" + h + "px, " + i + "px, 0)")) 857 } 858 }), a.core.$slide.on("touchend.lg", function () { 859 a.core.$outer.hasClass("lg-zoomed") && d && (d = !1, a.core.$outer.removeClass("lg-zoom-dragging"), a.touchendZoom(b, c, e, f)) 860 }) 861 }, d.prototype.zoomDrag = function () { 862 var b = this, 863 c = {}, 864 d = {}, 865 e = !1, 866 f = !1, 867 g = !1, 868 h = !1; 869 b.core.$slide.on("mousedown.lg.zoom", function (d) { 870 var f = b.core.$slide.eq(b.core.index).find(".lg-object"); 871 h = f.prop("offsetHeight") * f.attr("data-scale") > b.core.$outer.find(".lg").height(), g = f.prop("offsetWidth") * f.attr("data-scale") > b.core.$outer.find(".lg").width(), b.core.$outer.hasClass("lg-zoomed") && a(d.target).hasClass("lg-object") && (g || h) && (d.preventDefault(), c = { 872 x: d.pageX, 873 y: d.pageY 874 }, e = !0, b.core.$outer.scrollLeft += 1, b.core.$outer.scrollLeft -= 1, b.core.$outer.removeClass("lg-grab").addClass("lg-grabbing")) 875 }), a(window).on("mousemove.lg.zoom", function (a) { 876 if (e) { 877 var i, j, k = b.core.$slide.eq(b.core.index).find(".lg-img-wrap"); 878 f = !0, d = { 879 x: a.pageX, 880 y: a.pageY 881 }, b.core.$outer.addClass("lg-zoom-dragging"), j = h ? -Math.abs(k.attr("data-y")) + (d.y - c.y) : -Math.abs(k.attr("data-y")), i = g ? -Math.abs(k.attr("data-x")) + (d.x - c.x) : -Math.abs(k.attr("data-x")), b.core.s.useLeftForZoom ? k.css({ 882 left: i + "px", 883 top: j + "px" 884 }) : k.css("transform", "translate3d(" + i + "px, " + j + "px, 0)") 885 } 886 }), a(window).on("mouseup.lg.zoom", function (a) { 887 e && (e = !1, b.core.$outer.removeClass("lg-zoom-dragging"), !f || c.x === d.x && c.y === d.y || (d = { 888 x: a.pageX, 889 y: a.pageY 890 }, b.touchendZoom(c, d, g, h)), f = !1), b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab") 891 }) 892 }, d.prototype.touchendZoom = function (a, b, c, d) { 893 var e = this, 894 f = e.core.$slide.eq(e.core.index).find(".lg-img-wrap"), 895 g = e.core.$slide.eq(e.core.index).find(".lg-object"), 896 h = -Math.abs(f.attr("data-x")) + (b.x - a.x), 897 i = -Math.abs(f.attr("data-y")) + (b.y - a.y), 898 j = (e.core.$outer.find(".lg").height() - g.prop("offsetHeight")) / 2, 899 k = Math.abs(g.prop("offsetHeight") * Math.abs(g.attr("data-scale")) - e.core.$outer.find(".lg").height() + j), 900 l = (e.core.$outer.find(".lg").width() - g.prop("offsetWidth")) / 2, 901 m = Math.abs(g.prop("offsetWidth") * Math.abs(g.attr("data-scale")) - e.core.$outer.find(".lg").width() + l); 902 (Math.abs(b.x - a.x) > 15 || Math.abs(b.y - a.y) >
902 15) && (d && (i <= -k ? i = -k : i >= -j && (i = -j)), c && (h <= -m ? h = -m : h >= -l && (h = -l)), d ? f.attr("data-y", Math.abs(i)) : i = -Math.abs(f.attr("data-y")), c ? f.attr("data-x", Math.abs(h)) : h = -Math.abs(f.attr("data-x")), e.core.s.useLeftForZoom ? f.css({ 903 left: h + "px", 904 top: i + "px" 905 }) : f.css("transform", "translate3d(" + h + "px, " + i + "px, 0)")) 906 }, d.prototype.destroy = function () { 907 var b = this; 908 b.core.$el.off(".lg.zoom"), a(window).off(".lg.zoom"), b.core.$slide.off(".lg.zoom"), b.core.$el.off(".lg.tm.zoom"), b.resetZoom(), clearTimeout(b.zoomabletimeout), b.zoomabletimeout = !1 909 }, a.fn.lightGallery.modules.zoom = d 910 }() 911}), 912function (a, b) { 913 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 914 return b(a) 915 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 916}(0, function (a) { 917 ! function () { 918 "use strict"; 919 var b = { 920 hash: !0 921 }, 922 c = function (c) { 923 return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.core.s.hash && (this.oldHash = window.location.hash, this.init()), this 924 }; 925 c.prototype.init = function () { 926 var b, c = this; 927 c.core.$el.on("onAfterSlide.lg.tm", function (a, b, d) { 928 history.replaceState ? history.replaceState(null, null, window.location.pathname + window.location.search + "#lg=" + c.core.s.galleryId + "&slide=" + d) : window.location.hash = "lg=" + c.core.s.galleryId + "&slide=" + d 929 }), a(window).on("hashchange.lg.hash", function () { 930 b = window.location.hash; 931 var a = parseInt(b.split("&slide=")[1], 10); 932 b.indexOf("lg=" + c.core.s.galleryId) > -1 ? c.core.slide(a, !1, !1) : c.core.lGalleryOn && c.core.destroy() 933 }) 934 }, c.prototype.destroy = function () { 935 this.core.s.hash && (this.oldHash && this.oldHash.indexOf("lg=" + this.core.s.galleryId) < 0 ? history.replaceState ? history.replaceState(null, null, this.oldHash) : window.location.hash = this.oldHash : history.replaceState ? history.replaceState(null, document.title, window.location.pathname + window.location.search) : window.location.hash = "", this.core.$el.off(".lg.hash")) 936 }, a.fn.lightGallery.modules.hash = c 937 }() 938}), 939function (a, b) { 940 "function" == typeof define && define.amd ? define(["jquery"], function (a) { 941 return b(a) 942 }) : "object" == typeof exports ? module.exports = b(require("jquery")) : b(jQuery) 943}(0, function (a) { 944 ! function () { 945 "use strict"; 946 var b = { 947 share: !0, 948 facebook: !0, 949 facebookDropdownText: "Facebook", 950 twitter: !0, 951 twitterDropdownText: "Twitter", 952 googlePlus: !0, 953 googlePlusDropdownText: "GooglePlus", 954 pinterest: !0, 955 pinterestDropdownText: "Pinterest" 956 }, 957 c = function (c) { 958 return this.core = a(c).data("lightGallery"), this.core.s = a.extend({}, b, this.core.s), this.core.s.share && this.init(), this 959 }; 960 c.prototype.init = function () { 961 var b = this, 962 c = '<span id="lg-share" class="lg-icon"><ul class="lg-dropdown" style="position: absolute;">'; 963 c += b.core.s.facebook ? '<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.facebookDropdownText + "</span></a></li>" : "", c += b.core.s.twitter ? '<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.twitterDropdownText + "</span></a></li>" : "", c += b.core.s.googlePlus ? '<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.googlePlusDropdownText + "</span></a></li>" : "", c += b.core.s.pinterest ? '<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.pinterestDropdownText + "</span></a></li>" : "", c += "</ul></span>", this.core.$outer.find(".lg-toolbar").append(c), this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'), a("#lg-share").on("click.lg", function () { 964 b.core.$outer.toggleClass("lg-dropdown-active") 965 }), a("#lg-dropdown-overlay").on("click.lg", function () { 966 b.core.$outer.removeClass("lg-dropdown-active") 967 }), b.core.$el.on("onAfterSlide.lg.tm", function (c, d, e) { 968 setTimeout(function () { 969 a("#lg-share-facebook").attr("href", "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(b.getSahreProps(e, "facebookShareUrl") || window.location.href)), a("#lg-share-twitter").attr("href", "https://twitter.com/intent/tweet?text=" + b.getSahreProps(e, "tweetText") + "&url=" + encodeURIComponent(b.getSahreProps(e, "twitterShareUrl") || window.location.href)), a("#lg-share-googleplus").attr("href", "https://plus.google.com/share?url=" + encodeURIComponent(b.getSahreProps(e, "googleplusSh
969areUrl") || window.location.href)), a("#lg-share-pinterest").attr("href", "http://www.pinterest.com/pin/create/button/?url=" + encodeURIComponent(b.getSahreProps(e, "pinterestShareUrl") || window.location.href) + "&media=" + encodeURIComponent(b.getSahreProps(e, "src")) + "&description=" + b.getSahreProps(e, "pinterestText")) 970 }, 100) 971 }) 972 }, c.prototype.getSahreProps = function (a, b) { 973 var c = ""; 974 if (this.core.s.dynamic) c = this.core.s.dynamicEl[a][b]; 975 else { 976 var d = this.core.$items.eq(a).attr("href"), 977 e = this.core.$items.eq(a).data(b); 978 c = "src" === b ? d || e : e 979 } 980 return c 981 }, c.prototype.destroy = function () {}, a.fn.lightGallery.modules.share = c 982 }() 983});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.