! function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper"], a) : (window.blueimp = window.blueimp || {}, window.blueimp.gallery = a(window.blueimp.helper || window.jquery)) }(function(a) { "use strict"; function b(a, c) { return void 0 === document.body.style.maxheight ? null : this && this.options === b.prototype.options ? a && a.length ? (this.list = a, this.num = a.length, this.initoptions(c), void this.initialize()) : void this.console.log("blueimp gallery: no or empty list provided as first argument.", a) : new b(a, c) } return a.extend(b.prototype, { options: { container: "#blueimp-gallery", slidescontainer: "div", titleelement: "h3", displayclass: "blueimp-gallery-display", controlsclass: "blueimp-gallery-controls", singleclass: "blueimp-gallery-single", leftedgeclass: "blueimp-gallery-left", rightedgeclass: "blueimp-gallery-right", playingclass: "blueimp-gallery-playing", slideclass: "slide", slideloadingclass: "slide-loading", slideerrorclass: "slide-error", slidecontentclass: "slide-content", toggleclass: "toggle", prevclass: "prev", nextclass: "next", closeclass: "close", playpauseclass: "play-pause", typeproperty: "type", titleproperty: "title", urlproperty: "href", displaytransition: !0, clearslides: !0, stretchimages: !1, togglecontrolsonreturn: !0, toggleslideshowonspace: !0, enablekeyboardnavigation: !0, closeonescape: !0, closeonslideclick: !0, closeonswipeupordown: !0, emulatetouchevents: !0, stoptoucheventspropagation: !1, hidepagescrollbars: !0, disablescroll: !0, carousel: !1, continuous: !0, unloadelements: !0, startslideshow: !1, slideshowinterval: 5e3, index: 0, preloadrange: 2, transitionspeed: 400, slideshowtransitionspeed: void 0, event: void 0, onopen: void 0, onopened: void 0, onslide: void 0, onslideend: void 0, onslidecomplete: void 0, onclose: void 0, onclosed: void 0 }, carouseloptions: { hidepagescrollbars: !1, togglecontrolsonreturn: !1, toggleslideshowonspace: !1, enablekeyboardnavigation: !1, closeonescape: !1, closeonslideclick: !1, closeonswipeupordown: !1, disablescroll: !1, startslideshow: !0 }, console: window.console && "function" == typeof window.console.log ? window.console : { log: function() {} }, support: function(b) { var c = { touch: void 0 !== window.ontouchstart || window.documenttouch && document instanceof documenttouch }, d = { webkittransition: { end: "webkittransitionend", prefix: "-webkit-" }, moztransition: { end: "transitionend", prefix: "-moz-" }, otransition: { end: "otransitionend", prefix: "-o-" }, transition: { end: "transitionend", prefix: "" } }, e = function() { var a, d, e = c.transition; document.body.appendchild(b), e && (a = e.name.slice(0, -9) + "ransform", void 0 !== b.style[a] && (b.style[a] = "translatez(0)", d = window.getcomputedstyle(b).getpropertyvalue(e.prefix + "transform"), c.transform = { prefix: e.prefix, name: a, translate: !0, translatez: !!d && "none" !== d })), void 0 !== b.style.backgroundsize && (c.backgroundsize = {}, b.style.backgroundsize = "contain", c.backgroundsize.contain = "contain" === window.getcomputedstyle(b).getpropertyvalue("background-size"), b.style.backgroundsize = "cover", c.backgroundsize.cover = "cover" === window.getcomputedstyle(b).getpropertyvalue("background-size")), document.body.removechild(b) }; return function(a, c) { var d; for(d in c) if(c.hasownproperty(d) && void 0 !== b.style[d]) { a.transition = c[d], a.transition.name = d; break } }(c, d), document.body ? e() : a(document).on("domcontentloaded", e), c }(document.createelement("div")), requestanimationframe: window.requestanimationframe || window.webkitrequestanimationframe || window.mozrequestanimationframe, initialize: function() { return this.initstartindex(), this.initwidget() === !1 ? !1 : (this.initeventlisteners(), this.onslide(this.index), this.ontransitionend(), void(this.options.startslideshow && this.play())) }, slide: function(a, b) { window.cleartimeout(this.timeout); var c, d, e, f = this.index; if(f !== a && 1 !== this.num) { if(b || (b = this.options.transitionspeed), this.support.transform) { for(this.options.continuous || (a = this.circle(a)), c = math.abs(f - a) / (f - a), this.options.continuous && (d = c, c = -this.positions[this.circle(a)] / this.slidewidth, c !== d && (a = -c * this.num + a)), e = math.abs(f - a) - 1; e;) e -= 1, this.move(this.circle((a > f ? a : f) - e - 1), this.slidewidth * c, 0); a = this.circle(a), this.move(f, this.slidewidth * c, b), this.move(a, 0, b), this.options.continuous && this.move(this.circle(a - c), -(this.slidewidth * c), 0) } else a = this.circle(a), this.animate(f * -this.slidewidth, a * -this.slidewidth, b); this.onslide(a) } }, getindex: function() { return this.index }, getnumber: function() { return this.num }, prev: function() { (this.options.continuous || this.index) && this.slide(this.index - 1) }, next: function() { (this.options.continuous || this.index < this.num - 1) && this.slide(this.index + 1) }, play: function(a) { var b = this; window.cleartimeout(this.timeout), this.interval = a || this.options.slideshowinterval, this.elements[this.index] > 1 && (this.timeout = this.settimeout(!this.requestanimationframe && this.slide || function(a, c) { b.animationframeid = b.requestanimationframe.call(window, function() { b.slide(a, c) }) }, [this.index + 1, this.options.slideshowtransitionspeed], this.interval)), this.container.addclass(this.options.playingclass) }, pause: function() { window.cleartimeout(this.timeout), this.interval = null, this.container.removeclass(this.options.playingclass) }, add: function(a) { var b; for(a.concat || (a = array.prototype.slice.call(a)), this.list.concat || (this.list = array.prototype.slice.call(this.list)), this.list = this.list.concat(a), this.num = this.list.length, this.num > 2 && null === this.options.continuous && (this.options.continuous = !0, this.container.removeclass(this.options.leftedgeclass)), this.container.removeclass(this.options.rightedgeclass).removeclass(this.options.singleclass), b = this.num - a.length; b < this.num; b += 1) this.addslide(b), this.positionslide(b); this.positions.length = this.num, this.initslides(!0) }, resetslides: function() { this.slidescontainer.empty(), this.unloadallslides(), this.slides = [] }, handleclose: function() { var a = this.options; this.destroyeventlisteners(), this.pause(), this.container[0].style.display = "none", this.container.removeclass(a.displayclass).removeclass(a.singleclass).removeclass(a.leftedgeclass).removeclass(a.rightedgeclass), a.hidepagescrollbars && (document.body.style.overflow = this.bodyoverflowstyle), this.options.clearslides && this.resetslides(), this.options.onclosed && this.options.onclosed.call(this) }, close: function() { var a = this, b = function(c) { c.target === a.container[0] && (a.container.off(a.support.transition.end, b), a.handleclose()) }; this.options.onclose && this.options.onclose.call(this), this.support.transition && this.options.displaytransition ? (this.container.on(this.support.transition.end, b), this.container.removeclass(this.options.displayclass)) : this.handleclose() }, circle: function(a) { return(this.num + a % this.num) % this.num }, move: function(a, b, c) { this.translatex(a, b, c), this.positions[a] = b }, translate: function(a, b, c, d) { var e = this.slides[a].style, f = this.support.transition, g = this.support.transform; e[f.name + "duration"] = d + "ms", e[g.name] = "translate(" + b + "px, " + c + "px)" + (g.translatez ? " translatez(0)" : "") }, translatex: function(a, b, c) { this.translate(a, b, 0, c) }, translatey: function(a, b, c) { this.translate(a, 0, b, c) }, animate: function(a, b, c) { if(!c) return void(this.slidescontainer[0].style.left = b + "px"); var d = this, e = (new date).gettime(), f = window.setinterval(function() { var g = (new date).gettime() - e; return g > c ? (d.slidescontainer[0].style.left = b + "px", d.ontransitionend(), void window.clearinterval(f)) : void(d.slidescontainer[0].style.left = (b - a) * (math.floor(g / c * 100) / 100) + a + "px") }, 4) }, preventdefault: function(a) { a.preventdefault ? a.preventdefault() : a.returnvalue = !1 }, stoppropagation: function(a) { a.stoppropagation ? a.stoppropagation() : a.cancelbubble = !0 }, onresize: function() { this.initslides(!0) }, onmousedown: function(a) { a.which && 1 === a.which && "video" !== a.target.nodename && (a.preventdefault(), (a.originalevent || a).touches = [{ pagex: a.pagex, pagey: a.pagey }], this.ontouchstart(a)) }, onmousemove: function(a) { this.touchstart && ((a.originalevent || a).touches = [{ pagex: a.pagex, pagey: a.pagey }], this.ontouchmove(a)) }, onmouseup: function(a) { this.touchstart && (this.ontouchend(a), delete this.touchstart) }, onmouseout: function(b) { if(this.touchstart) { var c = b.target, d = b.relatedtarget; (!d || d !== c && !a.contains(c, d)) && this.onmouseup(b) } }, ontouchstart: function(a) { this.options.stoptoucheventspropagation && this.stoppropagation(a); var b = (a.originalevent || a).touches[0]; this.touchstart = { x: b.pagex, y: b.pagey, time: date.now() }, this.isscrolling = void 0, this.touchdelta = {} }, ontouchmove: function(a) { this.options.stoptoucheventspropagation && this.stoppropagation(a); var b, c, d = (a.originalevent || a).touches[0], e = (a.originalevent || a).scale, f = this.index; if(!(d.length > 1 || e && 1 !== e)) if(this.options.disablescroll && a.preventdefault(), this.touchdelta = { x: d.pagex - this.touchstart.x, y: d.pagey - this.touchstart.y }, b = this.touchdelta.x, void 0 === this.isscrolling && (this.isscrolling = this.isscrolling || math.abs(b) < math.abs(this.touchdelta.y)), this.isscrolling) this.options.closeonswipeupordown && this.translatey(f, this.touchdelta.y + this.positions[f], 0); else for(a.preventdefault(), window.cleartimeout(this.timeout), this.options.continuous ? c = [this.circle(f + 1), f, this.circle(f - 1)] : (this.touchdelta.x = b /= !f && b > 0 || f === this.num - 1 && 0 > b ? math.abs(b) / this.slidewidth + 1 : 1, c = [f], f && c.push(f - 1), f < this.num - 1 && c.unshift(f + 1)); c.length;) f = c.pop(), this.translatex(f, b + this.positions[f], 0) }, ontouchend: function(a) { this.options.stoptoucheventspropagation && this.stoppropagation(a); var b, c, d, e, f, g = this.index, h = this.options.transitionspeed, i = this.slidewidth, j = number(date.now() - this.touchstart.time) < 250, k = j && math.abs(this.touchdelta.x) > 20 || math.abs(this.touchdelta.x) > i / 2, l = !g && this.touchdelta.x > 0 || g === this.num - 1 && this.touchdelta.x < 0, m = !k && this.options.closeonswipeupordown && (j && math.abs(this.touchdelta.y) > 20 || math.abs(this.touchdelta.y) > this.slideheight / 2); this.options.continuous && (l = !1), b = this.touchdelta.x < 0 ? -1 : 1, this.isscrolling ? m ? this.close() : this.translatey(g, 0, h) : k && !l ? (c = g + b, d = g - b, e = i * b, f = -i * b, this.options.continuous ? (this.move(this.circle(c), e, 0), this.move(this.circle(g - 2 * b), f, 0)) : c >= 0 && c < this.num && this.move(c, e, 0), this.move(g, this.positions[g] + e, h), this.move(this.circle(d), this.positions[this.circle(d)] + e, h), g = this.circle(d), this.onslide(g)) : this.options.continuous ? (this.move(this.circle(g - 1), -i, h), this.move(g, 0, h), this.move(this.circle(g + 1), i, h)) : (g && this.move(g - 1, -i, h), this.move(g, 0, h), g < this.num - 1 && this.move(g + 1, i, h)) }, ontouchcancel: function(a) { this.touchstart && (this.ontouchend(a), delete this.touchstart) }, ontransitionend: function(a) { var b = this.slides[this.index]; a && b !== a.target || (this.interval && this.play(), this.settimeout(this.options.onslideend, [this.index, b])) }, oncomplete: function(b) { var c, d = b.target || b.srcelement, e = d && d.parentnode; d && e && (c = this.getnodeindex(e), a(e).removeclass(this.options.slideloadingclass), "error" === b.type ? (a(e).addclass(this.options.slideerrorclass), this.elements[c] = 3) : this.elements[c] = 2, d.clientheight > this.container[0].clientheight && (d.style.maxheight = this.container[0].clientheight), this.interval && this.slides[this.index] === e && this.play(), this.settimeout(this.options.onslidecomplete, [c, e])) }, onload: function(a) { this.oncomplete(a) }, onerror: function(a) { this.oncomplete(a) }, onkeydown: function(a) { switch(a.which || a.keycode) { case 13: this.options.togglecontrolsonreturn && (this.preventdefault(a), this.togglecontrols()); break; case 27: this.options.closeonescape && (this.close(), a.stopimmediatepropagation()); break; case 32: this.options.toggleslideshowonspace && (this.preventdefault(a), this.toggleslideshow()); break; case 37: this.options.enablekeyboardnavigation && (this.preventdefault(a), this.prev()); break; case 39: this.options.enablekeyboardnavigation && (this.preventdefault(a), this.next()) } }, handleclick: function(b) { var c = this.options, d = b.target || b.srcelement, e = d.parentnode, f = function(b) { return a(d).hasclass(b) || a(e).hasclass(b) }; f(c.toggleclass) ? (this.preventdefault(b), this.togglecontrols()) : f(c.prevclass) ? (this.preventdefault(b), this.prev()) : f(c.nextclass) ? (this.preventdefault(b), this.next()) : f(c.closeclass) ? (this.preventdefault(b), this.close()) : f(c.playpauseclass) ? (this.preventdefault(b), this.toggleslideshow()) : e === this.slidescontainer[0] ? (this.preventdefault(b), c.closeonslideclick ? this.close() : this.togglecontrols()) : e.parentnode && e.parentnode === this.slidescontainer[0] && (this.preventdefault(b), this.togglecontrols()) }, onclick: function(a) { return this.options.emulatetouchevents && this.touchdelta && (math.abs(this.touchdelta.x) > 20 || math.abs(this.touchdelta.y) > 20) ? void delete this.touchdelta : this.handleclick(a) }, updateedgeclasses: function(a) { a ? this.container.removeclass(this.options.leftedgeclass) : this.container.addclass(this.options.leftedgeclass), a === this.num - 1 ? this.container.addclass(this.options.rightedgeclass) : this.container.removeclass(this.options.rightedgeclass) }, handleslide: function(a) { this.options.continuous || this.updateedgeclasses(a), this.loadelements(a), this.options.unloadelements && this.unloadelements(a), this.settitle(a) }, onslide: function(a) { this.index = a, this.handleslide(a), this.settimeout(this.options.onslide, [a, this.slides[a]]) }, settitle: function(a) { var b = this.slides[a].firstchild.title, c = this.titleelement; c.length && (this.titleelement.empty(), b && c[0].appendchild(document.createtextnode(b))) }, settimeout: function(a, b, c) { var d = this; return a && window.settimeout(function() { a.apply(d, b || []) }, c || 0) }, imagefactory: function(b, c) { var d, e, f, g = this, h = this.imageprototype.clonenode(!1), i = b, j = this.options.stretchimages, k = function(b) { if(!d) { if(b = { type: b.type, target: e }, !e.parentnode) return g.settimeout(k, [b]); d = !0, a(h).off("load error", k), j && "load" === b.type && (e.style.background = 'url("' + i + '") center no-repeat', e.style.backgroundsize = j), c(b) } }; return "string" != typeof i && (i = this.getitemproperty(b, this.options.urlproperty), f = this.getitemproperty(b, this.options.titleproperty)), j === !0 && (j = "contain"), j = this.support.backgroundsize && this.support.backgroundsize[j] && j, j ? e = this.elementprototype.clonenode(!1) : (e = h, h.draggable = !1), f && (e.title = f), a(h).on("load error", k), h.src = i, e }, createelement: function(b, c) { var d = b && this.getitemproperty(b, this.options.typeproperty), e = d && this[d.split("/")[0] + "factory"] || this.imagefactory, f = b && e.call(this, b, c); return f || (f = this.elementprototype.clonenode(!1), this.settimeout(c, [{ type: "error", target: f }])), a(f).addclass(this.options.slidecontentclass), f }, loadelement: function(b) { this.elements[b] || (this.slides[b].firstchild ? this.elements[b] = a(this.slides[b]).hasclass(this.options.slideerrorclass) ? 3 : 2 : (this.elements[b] = 1, a(this.slides[b]).addclass(this.options.slideloadingclass), this.slides[b].appendchild(this.createelement(this.list[b], this.proxylistener)))) }, loadelements: function(a) { var b, c = math.min(this.num, 2 * this.options.preloadrange + 1), d = a; for(b = 0; c > b; b += 1) d += b * (b % 2 === 0 ? -1 : 1), d = this.circle(d), this.loadelement(d) }, unloadelements: function(a) { var b, c; for(b in this.elements) this.elements.hasownproperty(b) && (c = math.abs(a - b), c > this.options.preloadrange && c + this.options.preloadrange < this.num && (this.unloadslide(b), delete this.elements[b])) }, addslide: function(a) { var b = this.slideprototype.clonenode(!1); b.setattribute("data-index", a), this.slidescontainer[0].appendchild(b), this.slides.push(b) }, positionslide: function(a) { var b = this.slides[a]; b.style.width = this.slidewidth + "px", this.support.transform && (b.style.left = a * -this.slidewidth + "px", this.move(a, this.index > a ? -this.slidewidth : this.index < a ? this.slidewidth : 0, 0)) }, initslides: function(b) { var c, d; for(b || (this.positions = [], this.positions.length = this.num, this.elements = {}, this.imageprototype = document.createelement("img"), this.elementprototype = document.createelement("div"), this.slideprototype = document.createelement("div"), a(this.slideprototype).addclass(this.options.slideclass), this.slides = this.slidescontainer[0].children, c = this.options.clearslides || this.slides.length !== this.num), this.slidewidth = this.container[0].offsetwidth, this.slideheight = this.container[0].offsetheight, this.slidescontainer[0].style.width = this.num * this.slidewidth + "px", c && this.resetslides(), d = 0; d < this.num; d += 1) c && this.addslide(d), this.positionslide(d); this.options.continuous && this.support.transform && (this.move(this.circle(this.index - 1), -this.slidewidth, 0), this.move(this.circle(this.index + 1), this.slidewidth, 0)), this.support.transform || (this.slidescontainer[0].style.left = this.index * -this.slidewidth + "px") }, unloadslide: function(a) { var b, c; b = this.slides[a], c = b.firstchild, null !== c && b.removechild(c) }, unloadallslides: function() { var a, b; for(a = 0, b = this.slides.length; b > a; a++) this.unloadslide(a) }, togglecontrols: function() { var a = this.options.controlsclass; this.container.hasclass(a) ? this.container.removeclass(a) : this.container.addclass(a) }, toggleslideshow: function() { this.interval ? this.pause() : this.play() }, getnodeindex: function(a) { return parseint(a.getattribute("data-index"), 10) }, getnestedproperty: function(a, b) { return b.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g, function(b, c, d, e, f) { var g = f || c || d || e && parseint(e, 10); b && a && (a = a[g]) }), a }, getdataproperty: function(b, c) { if(b.getattribute) { var d = b.getattribute("data-" + c.replace(/([a-z])/g, "-$1").tolowercase()); if("string" == typeof d) { if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\s]*\}|\[[\s\s]*\])$/.test(d)) try { return a.parsejson(d) } catch(e) {} return d } } }, getitemproperty: function(a, b) { var c = a[b]; return void 0 === c && (c = this.getdataproperty(a, b), void 0 === c && (c = this.getnestedproperty(a, b))), c }, initstartindex: function() { var a, b = this.options.index, c = this.options.urlproperty; if(b && "number" != typeof b) for(a = 0; a < this.num; a += 1) if(this.list[a] === b || this.getitemproperty(this.list[a], c) === this.getitemproperty(b, c)) { b = a; break } this.index = this.circle(parseint(b, 10) || 0) }, initeventlisteners: function() { var b = this, c = this.slidescontainer, d = function(a) { var c = b.support.transition && b.support.transition.end === a.type ? "transitionend" : a.type; b["on" + c](a) }; a(window).on("resize", d), a(document.body).on("keydown", d), this.container.on("click", d), this.support.touch ? c.on("touchstart touchmove touchend touchcancel", d) : this.options.emulatetouchevents && this.support.transition && c.on("mousedown mousemove mouseup mouseout", d), this.support.transition && c.on(this.support.transition.end, d), this.proxylistener = d }, destroyeventlisteners: function() { var b = this.slidescontainer, c = this.proxylistener; a(window).off("resize", c), a(document.body).off("keydown", c), this.container.off("click", c), this.support.touch ? b.off("touchstart touchmove touchend touchcancel", c) : this.options.emulatetouchevents && this.support.transition && b.off("mousedown mousemove mouseup mouseout", c), this.support.transition && b.off(this.support.transition.end, c) }, handleopen: function() { this.options.onopened && this.options.onopened.call(this) }, initwidget: function() { var b = this, c = function(a) { a.target === b.container[0] && (b.container.off(b.support.transition.end, c), b.handleopen()) }; return this.container = a(this.options.container), this.container.length ? (this.slidescontainer = this.container.find(this.options.slidescontainer).first(), this.slidescontainer.length ? (this.titleelement = this.container.find(this.options.titleelement).first(), 1 === this.num && this.container.addclass(this.options.singleclass), this.options.onopen && this.options.onopen.call(this), this.support.transition && this.options.displaytransition ? this.container.on(this.support.transition.end, c) : this.handleopen(), this.options.hidepagescrollbars && (this.bodyoverflowstyle = document.body.style.overflow, document.body.style.overflow = "hidden"), this.container[0].style.display = "block", this.initslides(), void this.container.addclass(this.options.displayclass)) : (this.console.log("blueimp gallery: slides container not found.", this.options.slidescontainer), !1)) : (this.console.log("blueimp gallery: widget container not found.", this.options.container), !1) }, initoptions: function(b) { this.options = a.extend({}, this.options), (b && b.carousel || this.options.carousel && (!b || b.carousel !== !1)) && a.extend(this.options, this.carouseloptions), a.extend(this.options, b), this.num < 3 && (this.options.continuous = this.options.continuous ? null : !1), this.support.transition || (this.options.emulatetouchevents = !1), this.options.event && this.preventdefault(this.options.event) } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; a.extend(b.prototype.options, { fullscreen: !1 }); var c = b.prototype.initialize, d = b.prototype.close; return a.extend(b.prototype, { getfullscreenelement: function() { return document.fullscreenelement || document.webkitfullscreenelement || document.mozfullscreenelement || document.msfullscreenelement }, requestfullscreen: function(a) { a.requestfullscreen ? a.requestfullscreen() : a.webkitrequestfullscreen ? a.webkitrequestfullscreen() : a.mozrequestfullscreen ? a.mozrequestfullscreen() : a.msrequestfullscreen && a.msrequestfullscreen() }, exitfullscreen: function() { document.exitfullscreen ? document.exitfullscreen() : document.webkitcancelfullscreen ? document.webkitcancelfullscreen() : document.mozcancelfullscreen ? document.mozcancelfullscreen() : document.msexitfullscreen && document.msexitfullscreen() }, initialize: function() { c.call(this), this.options.fullscreen && !this.getfullscreenelement() && this.requestfullscreen(this.container[0]) }, close: function() { this.getfullscreenelement() === this.container[0] && this.exitfullscreen(), d.call(this) } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; a.extend(b.prototype.options, { indicatorcontainer: "ol", activeindicatorclass: "active", thumbnailproperty: "thumbnail", thumbnailindicators: !0 }); var c = b.prototype.initslides, d = b.prototype.addslide, e = b.prototype.resetslides, f = b.prototype.handleclick, g = b.prototype.handleslide, h = b.prototype.handleclose; return a.extend(b.prototype, { createindicator: function(b) { var c, d, e = this.indicatorprototype.clonenode(!1), f = this.getitemproperty(b, this.options.titleproperty), g = this.options.thumbnailproperty; return this.options.thumbnailindicators && (g && (c = this.getitemproperty(b, g)), void 0 === c && (d = b.getelementsbytagname && a(b).find("img")[0], d && (c = d.src)), c && (e.style.backgroundimage = 'url("' + c + '")')), f && (e.title = f), e }, addindicator: function(a) { if(this.indicatorcontainer.length) { var b = this.createindicator(this.list[a]); b.setattribute("data-index", a), this.indicatorcontainer[0].appendchild(b), this.indicators.push(b) } }, setactiveindicator: function(b) { this.indicators && (this.activeindicator && this.activeindicator.removeclass(this.options.activeindicatorclass), this.activeindicator = a(this.indicators[b]), this.activeindicator.addclass(this.options.activeindicatorclass)) }, initslides: function(a) { a || (this.indicatorcontainer = this.container.find(this.options.indicatorcontainer), this.indicatorcontainer.length && (this.indicatorprototype = document.createelement("li"), this.indicators = this.indicatorcontainer[0].children)), c.call(this, a) }, addslide: function(a) { d.call(this, a), this.addindicator(a) }, resetslides: function() { e.call(this), this.indicatorcontainer.empty(), this.indicators = [] }, handleclick: function(a) { var b = a.target || a.srcelement, c = b.parentnode; if(c === this.indicatorcontainer[0]) this.preventdefault(a), this.slide(this.getnodeindex(b)); else { if(c.parentnode !== this.indicatorcontainer[0]) return f.call(this, a); this.preventdefault(a), this.slide(this.getnodeindex(c)) } }, handleslide: function(a) { g.call(this, a), this.setactiveindicator(a) }, handleclose: function() { this.activeindicator && this.activeindicator.removeclass(this.options.activeindicatorclass), h.call(this) } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery"], a) : a(window.blueimp.helper || window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; a.extend(b.prototype.options, { videocontentclass: "video-content", videoloadingclass: "video-loading", videoplayingclass: "video-playing", videoposterproperty: "poster", videosourcesproperty: "sources" }); var c = b.prototype.handleslide; return a.extend(b.prototype, { handleslide: function(a) { c.call(this, a), this.playingvideo && this.playingvideo.pause() }, videofactory: function(b, c, d) { var e, f, g, h, i, j = this, k = this.options, l = this.elementprototype.clonenode(!1), m = a(l), n = [{ type: "error", target: l }], o = d || document.createelement("video"), p = this.getitemproperty(b, k.urlproperty), q = this.getitemproperty(b, k.typeproperty), r = this.getitemproperty(b, k.titleproperty), s = this.getitemproperty(b, k.videoposterproperty), t = this.getitemproperty(b, k.videosourcesproperty); if(m.addclass(k.videocontentclass), r && (l.title = r), o.canplaytype) if(p && q && o.canplaytype(q)) o.src = p; else for(; t && t.length;) if(f = t.shift(), p = this.getitemproperty(f, k.urlproperty), q = this.getitemproperty(f, k.typeproperty), p && q && o.canplaytype(q)) { o.src = p; break } return s && (o.poster = s, e = this.imageprototype.clonenode(!1), a(e).addclass(k.toggleclass), e.src = s, e.draggable = !1, l.appendchild(e)), g = document.createelement("a"), g.setattribute("target", "_blank"), d || g.setattribute("download", r), g.href = p, o.src && (o.controls = !0, (d || a(o)).on("error", function() { j.settimeout(c, n) }).on("pause", function() { h = !1, m.removeclass(j.options.videoloadingclass).removeclass(j.options.videoplayingclass), i && j.container.addclass(j.options.controlsclass), delete j.playingvideo, j.interval && j.play() }).on("playing", function() { h = !1, m.removeclass(j.options.videoloadingclass).addclass(j.options.videoplayingclass), j.container.hasclass(j.options.controlsclass) ? (i = !0, j.container.removeclass(j.options.controlsclass)) : i = !1 }).on("play", function() { window.cleartimeout(j.timeout), h = !0, m.addclass(j.options.videoloadingclass), j.playingvideo = o }), a(g).on("click", function(a) { j.preventdefault(a), h ? o.pause() : o.play() }), l.appendchild(d && d.element || o)), l.appendchild(g), this.settimeout(c, [{ type: "load", target: l }]), l } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery-video"], a) : a(window.blueimp.helper || window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; if(!window.postmessage) return b; a.extend(b.prototype.options, { vimeovideoidproperty: "vimeo", vimeoplayerurl: "//player.vimeo.com/video/video_id?api=1&player_id=player_id", vimeoplayeridprefix: "vimeo-player-", vimeoclicktoplay: !0 }); var c = b.prototype.textfactory || b.prototype.imagefactory, d = function(a, b, c, d) { this.url = a, this.videoid = b, this.playerid = c, this.clicktoplay = d, this.element = document.createelement("div"), this.listeners = {} }, e = 0; return a.extend(d.prototype, { canplaytype: function() { return !0 }, on: function(a, b) { return this.listeners[a] = b, this }, loadapi: function() { for(var b, c, d = this, e = "//" + ("https" === location.protocol ? "secure-" : "") + "a.vimeocdn.com/js/froogaloop2.min.js", f = document.getelementsbytagname("script"), g = f.length, h = function() { !c && d.playonready && d.play(), c = !0 }; g;) if(g -= 1, f[g].src === e) { b = f[g]; break } b || (b = document.createelement("script"), b.src = e), a(b).on("load", h), f[0].parentnode.insertbefore(b, f[0]), /loaded|complete/.test(b.readystate) && h() }, onready: function() { var a = this; this.ready = !0, this.player.addevent("play", function() { a.hasplayed = !0, a.onplaying() }), this.player.addevent("pause", function() { a.onpause() }), this.player.addevent("finish", function() { a.onpause() }), this.playonready && this.play() }, onplaying: function() { this.playstatus < 2 && (this.listeners.playing(), this.playstatus = 2) }, onpause: function() { this.listeners.pause(), delete this.playstatus }, insertiframe: function() { var a = document.createelement("iframe"); a.src = this.url.replace("video_id", this.videoid).replace("player_id", this.playerid), a.id = this.playerid, this.element.parentnode.replacechild(a, this.element), this.element = a }, play: function() { var a = this; this.playstatus || (this.listeners.play(), this.playstatus = 1), this.ready ? !this.hasplayed && (this.clicktoplay || window.navigator && /ip(hone|od|ad)/.test(window.navigator.platform)) ? this.onplaying() : this.player.api("play") : (this.playonready = !0, window.$f ? this.player || (this.insertiframe(), this.player = $f(this.element), this.player.addevent("ready", function() { a.onready() })) : this.loadapi()) }, pause: function() { this.ready ? this.player.api("pause") : this.playstatus && (delete this.playonready, this.listeners.pause(), delete this.playstatus) } }), a.extend(b.prototype, { vimeoplayer: d, textfactory: function(a, b) { var f = this.options, g = this.getitemproperty(a, f.vimeovideoidproperty); return g ? (void 0 === this.getitemproperty(a, f.urlproperty) && (a[f.urlproperty] = "//vimeo.com/" + g), e += 1, this.videofactory(a, b, new d(f.vimeoplayerurl, g, f.vimeoplayeridprefix + e, f.vimeoclicktoplay))) : c.call(this, a, b) } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["./blueimp-helper", "./blueimp-gallery-video"], a) : a(window.blueimp.helper || window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; if(!window.postmessage) return b; a.extend(b.prototype.options, { youtubevideoidproperty: "youtube", youtubeplayervars: { wmode: "transparent" }, youtubeclicktoplay: !0 }); var c = b.prototype.textfactory || b.prototype.imagefactory, d = function(a, b, c) { this.videoid = a, this.playervars = b, this.clicktoplay = c, this.element = document.createelement("div"), this.listeners = {} }; return a.extend(d.prototype, { canplaytype: function() { return !0 }, on: function(a, b) { return this.listeners[a] = b, this }, loadapi: function() { var a, b = this, c = window.onyoutubeiframeapiready, d = "//www.sckingshi.com/iframe_api", e = document.getelementsbytagname("script"), f = e.length; for(window.onyoutubeiframeapiready = function() { c && c.apply(this), b.playonready && b.play() }; f;) if(f -= 1, e[f].src === d) return; a = document.createelement("script"), a.src = d, e[0].parentnode.insertbefore(a, e[0]) }, onready: function() { this.ready = !0, this.playonready && this.play() }, onplaying: function() { this.playstatus < 2 && (this.listeners.playing(), this.playstatus = 2) }, onpause: function() { b.prototype.settimeout.call(this, this.checkseek, null, 2e3) }, checkseek: function() { (this.statechange === yt.playerstate.paused || this.statechange === yt.playerstate.ended) && (this.listeners.pause(), delete this.playstatus) }, onstatechange: function(a) { switch(a.data) { case yt.playerstate.playing: this.hasplayed = !0, this.onplaying(); break; case yt.playerstate.paused: case yt.playerstate.ended: this.onpause() } this.statechange = a.data }, onerror: function(a) { this.listeners.error(a) }, play: function() { var a = this; this.playstatus || (this.listeners.play(), this.playstatus = 1), this.ready ? !this.hasplayed && (this.clicktoplay || window.navigator && /ip(hone|od|ad)/.test(window.navigator.platform)) ? this.onplaying() : this.player.playvideo() : (this.playonready = !0, window.yt && yt.player ? this.player || (this.player = new yt.player(this.element, { videoid: this.videoid, playervars: this.playervars, events: { onready: function() { a.onready() }, onstatechange: function(b) { a.onstatechange(b) }, onerror: function(b) { a.onerror(b) } } })) : this.loadapi()) }, pause: function() { this.ready ? this.player.pausevideo() : this.playstatus && (delete this.playonready, this.listeners.pause(), delete this.playstatus) } }), a.extend(b.prototype, { youtubeplayer: d, textfactory: function(a, b) { var e = this.options, f = this.getitemproperty(a, e.youtubevideoidproperty); return f ? (void 0 === this.getitemproperty(a, e.urlproperty) && (a[e.urlproperty] = "//www.sckingshi.com/watch?v=" + f), void 0 === this.getitemproperty(a, e.videoposterproperty) && (a[e.videoposterproperty] = "//img.sckingshi.com/vi/" + f + "/maxresdefault.jpg"), this.videofactory(a, b, new d(f, e.youtubeplayervars, e.youtubeclicktoplay))) : c.call(this, a, b) } }), b }), function(a) { "use strict"; "function" == typeof define && define.amd ? define(["jquery", "./blueimp-gallery"], a) : a(window.jquery, window.blueimp.gallery) }(function(a, b) { "use strict"; a(document).on("click", "[data-gallery]", function(c) { var d = a(this).data("gallery"), e = a(d), f = e.length && e || a(b.prototype.options.container), g = { onopen: function() { f.data("gallery", this).trigger("open") }, onopened: function() { f.trigger("opened") }, onslide: function() { f.trigger("slide", arguments) }, onslideend: function() { f.trigger("slideend", arguments) }, onslidecomplete: function() { f.trigger("slidecomplete", arguments) }, onclose: function() { f.trigger("close") }, onclosed: function() { f.trigger("closed").removedata("gallery") } }, h = a.extend(f.data(), { container: f[0], index: this, event: c }, g), i = a('[data-gallery="' + d + '"]'); return h.filter && (i = i.filter(h.filter)), new b(i, h) }) });