!function (t, e) {
    "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).window = t.window || {})
}(this, function (t) {
    "use strict";

    function e(t, e) {
        var i = Object.keys(t);
        if (Object.getOwnPropertySymbols) {
            var n = Object.getOwnPropertySymbols(t);
            e && (n = n.filter(function (e) {
                return Object.getOwnPropertyDescriptor(t, e).enumerable
            })), i.push.apply(i, n)
        }
        return i
    }

    function i(t) {
        for (var i = 1; i < arguments.length; i++) {
            var n = null != arguments[i] ? arguments[i] : {};
            i % 2 ? e(Object(n), !0).forEach(function (e) {
                r(t, e, n[e])
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : e(Object(n)).forEach(function (e) {
                Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e))
            })
        }
        return t
    }

    function n(t) {
        return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
            return typeof t
        } : function (t) {
            return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
        })(t)
    }

    function o(t, e) {
        if (!(t instanceof e)) throw TypeError("Cannot call a class as a function")
    }

    function s(t, e) {
        for (var i = 0; i < e.length; i++) {
            var n = e[i];
            n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
        }
    }

    function a(t, e, i) {
        return e && s(t.prototype, e), i && s(t, i), Object.defineProperty(t, "prototype", {writable: !1}), t
    }

    function r(t, e, i) {
        return e in t ? Object.defineProperty(t, e, {
            value: i,
            enumerable: !0,
            configurable: !0,
            writable: !0
        }) : t[e] = i, t
    }

    function l(t, e) {
        if ("function" != typeof e && null !== e) throw TypeError("Super expression must either be null or a function");
        t.prototype = Object.create(e && e.prototype, {
            constructor: {
                value: t,
                writable: !0,
                configurable: !0
            }
        }), Object.defineProperty(t, "prototype", {writable: !1}), e && h(t, e)
    }

    function c(t) {
        return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) {
            return t.__proto__ || Object.getPrototypeOf(t)
        })(t)
    }

    function h(t, e) {
        return (h = Object.setPrototypeOf || function (t, e) {
            return t.__proto__ = e, t
        })(t, e)
    }

    function d(t) {
        if (void 0 === t) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
        return t
    }

    function u(t) {
        var e = function () {
            if ("undefined" == typeof Reflect || !Reflect.construct || Reflect.construct.sham) return !1;
            if ("function" == typeof Proxy) return !0;
            try {
                return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {
                })), !0
            } catch (t) {
                return !1
            }
        }();
        return function () {
            var i, n = c(t);
            if (e) {
                var o = c(this).constructor;
                i = Reflect.construct(n, arguments, o)
            } else i = n.apply(this, arguments);
            return function t(e, i) {
                if (i && ("object" == typeof i || "function" == typeof i)) return i;
                if (void 0 !== i) throw TypeError("Derived constructors may only return object or undefined");
                return d(e)
            }(this, i)
        }
    }

    function f() {
        return (f = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function (t, e, i) {
            var n = function t(e, i) {
                for (; !Object.prototype.hasOwnProperty.call(e, i) && null !== (e = c(e));) ;
                return e
            }(t, e);
            if (n) {
                var o = Object.getOwnPropertyDescriptor(n, e);
                return o.get ? o.get.call(arguments.length < 3 ? t : i) : o.value
            }
        }).apply(this, arguments)
    }

    function v(t, e) {
        return function (t) {
            if (Array.isArray(t)) return t
        }(t) || function (t, e) {
            var i = null == t ? null : "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
            if (null != i) {
                var n, o, s = [], a = !0, r = !1;
                try {
                    for (i = i.call(t); !(a = (n = i.next()).done) && (s.push(n.value), !e || s.length !== e); a = !0) ;
                } catch (l) {
                    r = !0, o = l
                } finally {
                    try {
                        a || null == i.return || i.return()
                    } finally {
                        if (r) throw o
                    }
                }
                return s
            }
        }(t, e) || g(t, e) || function () {
            throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
        }()
    }

    function p(t) {
        return function (t) {
            if (Array.isArray(t)) return y(t)
        }(t) || function (t) {
            if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t)
        }(t) || g(t) || function () {
            throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
        }()
    }

    function g(t, e) {
        if (t) {
            if ("string" == typeof t) return y(t, e);
            var i = Object.prototype.toString.call(t).slice(8, -1);
            return "Object" === i && t.constructor && (i = t.constructor.name), "Map" === i || "Set" === i ? Array.from(t) : "Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? y(t, e) : void 0
        }
    }

    function y(t, e) {
        (null == e || e > t.length) && (e = t.length);
        for (var i = 0, n = Array(e); i < e; i++) n[i] = t[i];
        return n
    }

    function m(t, e) {
        var i = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
        if (!i) {
            if (Array.isArray(t) || (i = g(t)) || e && t && "number" == typeof t.length) {
                i && (t = i);
                var n = 0, o = function () {
                };
                return {
                    s: o, n: function () {
                        return n >= t.length ? {done: !0} : {done: !1, value: t[n++]}
                    }, e: function (t) {
                        throw t
                    }, f: o
                }
            }
            throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
        }
        var s, a = !0, r = !1;
        return {
            s: function () {
                i = i.call(t)
            }, n: function () {
                var t = i.next();
                return a = t.done, t
            }, e: function (t) {
                r = !0, s = t
            }, f: function () {
                try {
                    a || null == i.return || i.return()
                } finally {
                    if (r) throw s
                }
            }
        }
    }

    var b = function (t) {
        return "object" === n(t) && null !== t && t.constructor === Object && "[object Object]" === Object.prototype.toString.call(t)
    }, x = function t() {
        for (var e = !1, i = arguments.length, o = Array(i), s = 0; s < i; s++) o[s] = arguments[s];
        "boolean" == typeof o[0] && (e = o.shift());
        var a = o[0];
        if (!a || "object" !== n(a)) throw Error("extendee must be an object");
        for (var r = o.slice(1), l = r.length, c = 0; c < l; c++) {
            var h = r[c];
            for (var d in h) if (h.hasOwnProperty(d)) {
                var u = h[d];
                if (e && (Array.isArray(u) || b(u))) {
                    var f = Array.isArray(u) ? [] : {};
                    a[d] = t(!0, a.hasOwnProperty(d) ? a[d] : f, u)
                } else a[d] = u
            }
        }
        return a
    }, $ = function (t) {
        var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1e4;
        return Math.round(((t = parseFloat(t) || 0) + Number.EPSILON) * e) / e
    }, _ = function t(e) {
        var i, o, s, a, r;
        return !!(e && "object" === n(e) && e instanceof Element && e !== document.body) && !e.__Panzoom && ((o = getComputedStyle(i = e)["overflow-y"], s = getComputedStyle(i)["overflow-x"], a = ("scroll" === o || "auto" === o) && Math.abs(i.scrollHeight - i.clientHeight) > 1, r = ("scroll" === s || "auto" === s) && Math.abs(i.scrollWidth - i.clientWidth) > 1, a || r) ? e : t(e.parentNode))
    }, k = "undefined" != typeof window && window.ResizeObserver || function () {
        function t(e) {
            o(this, t), this.observables = [], this.boundCheck = this.check.bind(this), this.boundCheck(), this.callback = e
        }

        return a(t, [{
            key: "observe", value: function (t) {
                if (!this.observables.some(function (e) {
                    return e.el === t
                })) {
                    var e = {el: t, size: {height: t.clientHeight, width: t.clientWidth}};
                    this.observables.push(e)
                }
            }
        }, {
            key: "unobserve", value: function (t) {
                this.observables = this.observables.filter(function (e) {
                    return e.el !== t
                })
            }
        }, {
            key: "disconnect", value: function () {
                this.observables = []
            }
        }, {
            key: "check", value: function () {
                var t = this.observables.filter(function (t) {
                    var e = t.el.clientHeight, i = t.el.clientWidth;
                    if (t.size.height !== e || t.size.width !== i) return t.size.height = e, t.size.width = i, !0
                }).map(function (t) {
                    return t.el
                });
                t.length > 0 && this.callback(t), window.requestAnimationFrame(this.boundCheck)
            }
        }]), t
    }(), w = a(function t(e) {
        o(this, t), this.id = self.Touch && e instanceof Touch ? e.identifier : -1, this.pageX = e.pageX, this.pageY = e.pageY, this.clientX = e.clientX, this.clientY = e.clientY
    }), C = function (t, e) {
        return e ? Math.sqrt(Math.pow(e.clientX - t.clientX, 2) + Math.pow(e.clientY - t.clientY, 2)) : 0
    }, S = function (t, e) {
        return e ? {clientX: (t.clientX + e.clientX) / 2, clientY: (t.clientY + e.clientY) / 2} : t
    }, P = function () {
        function t(e) {
            var i = this, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, s = n.start,
                a = n.move, r = n.end;
            o(this, t), this._element = e, this.startPointers = [], this.currentPointers = [], this._pointerStart = function (t) {
                if (!(t.buttons > 0 && 0 !== t.button)) {
                    var e = new w(t);
                    i.currentPointers.some(function (t) {
                        return t.id === e.id
                    }) || i._triggerPointerStart(e, t) && (window.addEventListener("mousemove", i._move), window.addEventListener("mouseup", i._pointerEnd))
                }
            }, this._touchStart = function (t) {
                for (var e = 0, n = Array.from(t.changedTouches || []); e < n.length; e++) {
                    var o = n[e];
                    i._triggerPointerStart(new w(o), t)
                }
            }, this._move = function (t) {
                var e, n, o = i.currentPointers.slice(),
                    s = "changedTouches" in (e = t) ? Array.from(t.changedTouches).map(function (t) {
                        return new w(t)
                    }) : [new w(t)], a = [], r = m(s);
                try {
                    for (r.s(); !(n = r.n()).done;) (function () {
                        var t = n.value, e = i.currentPointers.findIndex(function (e) {
                            return e.id === t.id
                        });
                        if (e < 0) return "continue";
                        a.push(t), i.currentPointers[e] = t
                    })()
                } catch (l) {
                    r.e(l)
                } finally {
                    r.f()
                }
                i._moveCallback(o, i.currentPointers.slice(), t)
            }, this._triggerPointerEnd = function (t, e) {
                var n = i.currentPointers.findIndex(function (e) {
                    return e.id === t.id
                });
                return !(n < 0) && (i.currentPointers.splice(n, 1), i.startPointers.splice(n, 1), i._endCallback(t, e), !0)
            }, this._pointerEnd = function (t) {
                t.buttons > 0 && 0 !== t.button || i._triggerPointerEnd(new w(t), t) && (window.removeEventListener("mousemove", i._move, {passive: !1}), window.removeEventListener("mouseup", i._pointerEnd, {passive: !1}))
            }, this._touchEnd = function (t) {
                for (var e = 0, n = Array.from(t.changedTouches || []); e < n.length; e++) {
                    var o = n[e];
                    i._triggerPointerEnd(new w(o), t)
                }
            }, this._startCallback = void 0 === s ? function () {
                return !0
            } : s, this._moveCallback = void 0 === a ? function () {
            } : a, this._endCallback = void 0 === r ? function () {
            } : r, this._element.addEventListener("mousedown", this._pointerStart, {passive: !1}), this._element.addEventListener("touchstart", this._touchStart, {passive: !1}), this._element.addEventListener("touchmove", this._move, {passive: !1}), this._element.addEventListener("touchend", this._touchEnd), this._element.addEventListener("touchcancel", this._touchEnd)
        }

        return a(t, [{
            key: "stop", value: function () {
                this._element.removeEventListener("mousedown", this._pointerStart, {passive: !1}), this._element.removeEventListener("touchstart", this._touchStart, {passive: !1}), this._element.removeEventListener("touchmove", this._move, {passive: !1}), this._element.removeEventListener("touchend", this._touchEnd), this._element.removeEventListener("touchcancel", this._touchEnd), window.removeEventListener("mousemove", this._move), window.removeEventListener("mouseup", this._pointerEnd)
            }
        }, {
            key: "_triggerPointerStart", value: function (t, e) {
                return !!this._startCallback(t, e) && (this.currentPointers.push(t), this.startPointers.push(t), !0)
            }
        }]), t
    }(), E = function () {
        function t() {
            var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
            o(this, t), this.options = x(!0, {}, e), this.plugins = [], this.events = {};
            for (var i = 0, n = ["on", "once"]; i < n.length; i++) for (var s = n[i], a = 0, r = Object.entries(this.options[s] || {}); a < r.length; a++) {
                var l = r[a];
                this[s].apply(this, p(l))
            }
        }

        return a(t, [{
            key: "option", value: function (t, e) {
                var i, n, o = (i = t = String(t), n = this.options, i.split(".").reduce(function (t, e) {
                    return t && t[e]
                }, n));
                if ("function" == typeof o) {
                    for (var s, a = arguments.length, r = Array(a > 2 ? a - 2 : 0), l = 2; l < a; l++) r[l - 2] = arguments[l];
                    o = (s = o).call.apply(s, [this, this].concat(r))
                }
                return void 0 === o ? e : o
            }
        }, {
            key: "localize", value: function (t) {
                var e = this, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
                return t = (t = String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g, function (t, n, o) {
                    var s = "";
                    o ? s = e.option("".concat(n[0] + n.toLowerCase().substring(1), ".l10n.").concat(o)) : n && (s = e.option("l10n.".concat(n))), s || (s = t);
                    for (var a = 0; a < i.length; a++) s = s.split(i[a][0]).join(i[a][1]);
                    return s
                })).replace(/\{\{(.*)\}\}/, function (t, e) {
                    return e
                })
            }
        }, {
            key: "on", value: function (t, e) {
                var i = this;
                if (b(t)) {
                    for (var n = 0, o = Object.entries(t); n < o.length; n++) {
                        var s = o[n];
                        this.on.apply(this, p(s))
                    }
                    return this
                }
                return String(t).split(" ").forEach(function (t) {
                    var n = i.events[t] = i.events[t] || [];
                    -1 == n.indexOf(e) && n.push(e)
                }), this
            }
        }, {
            key: "once", value: function (t, e) {
                var i = this;
                if (b(t)) {
                    for (var n = 0, o = Object.entries(t); n < o.length; n++) {
                        var s = o[n];
                        this.once.apply(this, p(s))
                    }
                    return this
                }
                return String(t).split(" ").forEach(function (t) {
                    var n = function n() {
                        i.off(t, n);
                        for (var o = arguments.length, s = Array(o), a = 0; a < o; a++) s[a] = arguments[a];
                        e.call.apply(e, [i, i].concat(s))
                    };
                    n._ = e, i.on(t, n)
                }), this
            }
        }, {
            key: "off", value: function (t, e) {
                var i = this;
                if (!b(t)) return t.split(" ").forEach(function (t) {
                    var n = i.events[t];
                    if (!n || !n.length) return i;
                    for (var o = -1, s = 0, a = n.length; s < a; s++) {
                        var r = n[s];
                        if (r && (r === e || r._ === e)) {
                            o = s;
                            break
                        }
                    }
                    -1 != o && n.splice(o, 1)
                }), this;
                for (var n = 0, o = Object.entries(t); n < o.length; n++) {
                    var s = o[n];
                    this.off.apply(this, p(s))
                }
            }
        }, {
            key: "trigger", value: function (t) {
                for (var e = arguments.length, i = Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) i[n - 1] = arguments[n];
                var o, s = m(p(this.events[t] || []).slice());
                try {
                    for (s.s(); !(o = s.n()).done;) {
                        var a = o.value;
                        if (a && !1 === a.call.apply(a, [this, this].concat(i))) return !1
                    }
                } catch (r) {
                    s.e(r)
                } finally {
                    s.f()
                }
                var l, c = m(p(this.events["*"] || []).slice());
                try {
                    for (c.s(); !(l = c.n()).done;) {
                        var h = l.value;
                        if (h && !1 === h.call.apply(h, [this, t, this].concat(i))) return !1
                    }
                } catch (d) {
                    c.e(d)
                } finally {
                    c.f()
                }
                return !0
            }
        }, {
            key: "attachPlugins", value: function (t) {
                for (var e = {}, i = 0, n = Object.entries(t || {}); i < n.length; i++) {
                    var o = v(n[i], 2), s = o[0], a = o[1];
                    !1 === this.options[s] || this.plugins[s] || (this.options[s] = x({}, a.defaults || {}, this.options[s]), e[s] = new a(this))
                }
                for (var r = 0, l = Object.entries(e); r < l.length; r++) {
                    var c = v(l[r], 2);
                    c[0], c[1].attach(this)
                }
                return this.plugins = Object.assign({}, this.plugins, e), this
            }
        }, {
            key: "detachPlugins", value: function () {
                for (var t in this.plugins) {
                    var e = void 0;
                    (e = this.plugins[t]) && "function" == typeof e.detach && e.detach(this)
                }
                return this.plugins = {}, this
            }
        }]), t
    }(), L = {
        touch: !0,
        zoom: !0,
        pinchToZoom: !0,
        panOnlyZoomed: !1,
        lockAxis: !1,
        friction: .64,
        decelFriction: .88,
        zoomFriction: .74,
        bounceForce: .2,
        baseScale: 1,
        minScale: 1,
        maxScale: 2,
        step: .5,
        textSelection: !1,
        click: "toggleZoom",
        wheel: "zoom",
        wheelFactor: 42,
        wheelLimit: 5,
        draggableClass: "is-draggable",
        draggingClass: "is-dragging",
        ratio: 1
    }, T = function (t) {
        l(n, t);
        var e = u(n);

        function n(t) {
            var i, s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
            o(this, n), (i = e.call(this, x(!0, {}, L, s))).state = "init", i.$container = t;
            for (var a = 0, r = ["onLoad", "onWheel", "onClick"]; a < r.length; a++) {
                var l = r[a];
                i[l] = i[l].bind(d(i))
            }
            return i.initLayout(), i.resetValues(), i.attachPlugins(n.Plugins), i.trigger("init"), i.updateMetrics(), i.attachEvents(), i.trigger("ready"), !1 === i.option("centerOnStart") ? i.state = "ready" : i.panTo({friction: 0}), t.__Panzoom = d(i), i
        }

        return a(n, [{
            key: "initLayout", value: function () {
                var t = this.$container;
                if (!(t instanceof HTMLElement)) throw Error("Panzoom: Container not found");
                var e = this.option("content") || t.querySelector(".panzoom__content");
                if (!e) throw Error("Panzoom: Content not found");
                this.$content = e;
                var i, n = this.option("viewport") || t.querySelector(".panzoom__viewport");
                n || !1 === this.option("wrapInner") || ((n = document.createElement("div")).classList.add("panzoom__viewport"), (i = n).append.apply(i, p(t.childNodes)), t.appendChild(n)), this.$viewport = n || e.parentNode
            }
        }, {
            key: "resetValues", value: function () {
                this.updateRate = this.option("updateRate", /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) ? 250 : 24), this.container = {
                    width: 0,
                    height: 0
                }, this.viewport = {width: 0, height: 0}, this.content = {
                    origWidth: 0,
                    origHeight: 0,
                    width: 0,
                    height: 0,
                    x: this.option("x", 0),
                    y: this.option("y", 0),
                    scale: this.option("baseScale")
                }, this.transform = {x: 0, y: 0, scale: 1}, this.resetDragPosition()
            }
        }, {
            key: "onLoad", value: function (t) {
                this.updateMetrics(), this.panTo({
                    scale: this.option("baseScale"),
                    friction: 0
                }), this.trigger("load", t)
            }
        }, {
            key: "onClick", value: function (t) {
                if (!(t.defaultPrevented || document.activeElement && document.activeElement.closest("[contenteditable]"))) {
                    if (!this.option("textSelection") || !window.getSelection().toString().length || t.target && t.target.hasAttribute("data-fancybox-close")) {
                        var e = this.$content.getClientRects()[0];
                        if (e) {
                            if ("ready" !== this.state && (this.dragPosition.midPoint || Math.abs(e.top - this.dragStart.rect.top) > 1 || Math.abs(e.left - this.dragStart.rect.left) > 1)) return t.preventDefault(), void t.stopPropagation();
                            !1 !== this.trigger("click", t) && this.option("zoom") && "toggleZoom" === this.option("click") && (t.preventDefault(), t.stopPropagation(), this.zoomWithClick(t))
                        }
                    } else t.stopPropagation()
                }
            }
        }, {
            key: "onWheel", value: function (t) {
                !1 !== this.trigger("wheel", t) && this.option("zoom") && this.option("wheel") && this.zoomWithWheel(t)
            }
        }, {
            key: "zoomWithWheel", value: function (t) {
                void 0 === this.changedDelta && (this.changedDelta = 0);
                var e = Math.max(-1, Math.min(1, -t.deltaY || -t.deltaX || t.wheelDelta || -t.detail)),
                    i = this.content.scale, n = i * (100 + e * this.option("wheelFactor")) / 100;
                if (e < 0 && .01 > Math.abs(i - this.option("minScale")) || e > 0 && .01 > Math.abs(i - this.option("maxScale")) ? (this.changedDelta += Math.abs(e), n = i) : (this.changedDelta = 0, n = Math.max(Math.min(n, this.option("maxScale")), this.option("minScale"))), !(this.changedDelta > this.option("wheelLimit")) && (t.preventDefault(), n !== i)) {
                    var o = this.$content.getBoundingClientRect(), s = t.clientX - o.left, a = t.clientY - o.top;
                    this.zoomTo(n, {x: s, y: a})
                }
            }
        }, {
            key: "zoomWithClick", value: function (t) {
                var e = this.$content.getClientRects();
                if (0 !== e.length) {
                    var i = e[0], n = t.clientX - i.left, o = t.clientY - i.top;
                    this.toggleZoom({x: n, y: o})
                }
            }
        }, {
            key: "attachEvents", value: function () {
                var t = this;
                this.$content.addEventListener("load", this.onLoad), this.$container.addEventListener("wheel", this.onWheel, {passive: !1}), this.$container.addEventListener("click", this.onClick, {passive: !1}), this.initObserver();
                var e = new P(this.$container, {
                    start: function (i, n) {
                        if (!t.option("touch") || t.velocity.scale < 0) return !1;
                        var o = n.composedPath()[0];
                        return !(!e.currentPointers.length && (-1 !== ["BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].indexOf(o.nodeName) || t.option("textSelection") && function (t, e, i) {
                            for (var n = t.childNodes, o = document.createRange(), s = 0; s < n.length; s++) {
                                var a = n[s];
                                if (a.nodeType === Node.TEXT_NODE) {
                                    o.selectNodeContents(a);
                                    var r = o.getBoundingClientRect();
                                    if (e >= r.left && i >= r.top && e <= r.right && i <= r.bottom) return a
                                }
                            }
                            return !1
                        }(o, i.clientX, i.clientY))) && !_(o) && !1 !== t.trigger("touchStart", n) && ("mousedown" === n.type && n.preventDefault(), t.state = "pointerdown", t.resetDragPosition(), t.dragPosition.midPoint = null, t.dragPosition.time = Date.now(), !0)
                    }, move: function (i, n, o) {
                        if ("pointerdown" === t.state) {
                            if (!1 !== t.trigger("touchMove", o)) {
                                if (!(n.length < 2 && !0 === t.option("panOnlyZoomed") && t.content.width <= t.viewport.width && t.content.height <= t.viewport.height && t.transform.scale <= t.option("baseScale")) && (!(n.length > 1) || t.option("zoom") && !1 !== t.option("pinchToZoom"))) {
                                    var s = S(i[0], i[1]), a = S(n[0], n[1]), r = a.clientX - s.clientX,
                                        l = a.clientY - s.clientY, c = C(i[0], i[1]), h = C(n[0], n[1]);
                                    t.dragOffset.x += r, t.dragOffset.y += l, t.dragOffset.scale *= c && h ? h / c : 1, t.dragOffset.time = Date.now() - t.dragPosition.time;
                                    var d = 1 === t.dragStart.scale && t.option("lockAxis");
                                    if (d && !t.lockAxis) {
                                        if (6 > Math.abs(t.dragOffset.x) && 6 > Math.abs(t.dragOffset.y)) return void o.preventDefault();
                                        var u = Math.abs(180 * Math.atan2(t.dragOffset.y, t.dragOffset.x) / Math.PI);
                                        t.lockAxis = u > 45 && u < 135 ? "y" : "x"
                                    }
                                    if ("xy" === d || "y" !== t.lockAxis) {
                                        if (o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation(), t.lockAxis && (t.dragOffset["x" === t.lockAxis ? "y" : "x"] = 0), t.$container.classList.add(t.option("draggingClass")), t.transform.scale === t.option("baseScale") && "y" === t.lockAxis || (t.dragPosition.x = t.dragStart.x + t.dragOffset.x), t.transform.scale === t.option("baseScale") && "x" === t.lockAxis || (t.dragPosition.y = t.dragStart.y + t.dragOffset.y), t.dragPosition.scale = t.dragStart.scale * t.dragOffset.scale, n.length > 1) {
                                            var f = S(e.startPointers[0], e.startPointers[1]),
                                                v = f.clientX - t.dragStart.rect.x, p = f.clientY - t.dragStart.rect.y,
                                                g = t.getZoomDelta(t.content.scale * t.dragOffset.scale, v, p),
                                                y = g.deltaX, m = g.deltaY;
                                            t.dragPosition.x -= y, t.dragPosition.y -= m, t.dragPosition.midPoint = a
                                        } else t.setDragResistance();
                                        t.transform = {
                                            x: t.dragPosition.x,
                                            y: t.dragPosition.y,
                                            scale: t.dragPosition.scale
                                        }, t.startAnimation()
                                    }
                                }
                            } else o.preventDefault()
                        }
                    }, end: function (n, o) {
                        if ("pointerdown" === t.state) {
                            if (t._dragOffset = i({}, t.dragOffset), e.currentPointers.length) t.resetDragPosition(); else if (t.state = "decel", t.friction = t.option("decelFriction"), t.recalculateTransform(), t.$container.classList.remove(t.option("draggingClass")), !1 !== t.trigger("touchEnd", o) && "decel" === t.state) {
                                var s = t.option("minScale");
                                if (t.transform.scale < s) t.zoomTo(s, {friction: .64}); else {
                                    var a = t.option("maxScale");
                                    if (t.transform.scale - a > .01) {
                                        var r = t.dragPosition.midPoint || n, l = t.$content.getClientRects()[0];
                                        t.zoomTo(a, {friction: .64, x: r.clientX - l.left, y: r.clientY - l.top})
                                    }
                                }
                            }
                        }
                    }
                });
                this.pointerTracker = e
            }
        }, {
            key: "initObserver", value: function () {
                var t = this;
                this.resizeObserver || (this.resizeObserver = new k(function () {
                    t.updateTimer || (t.updateTimer = setTimeout(function () {
                        var e = t.$container.getBoundingClientRect();
                        e.width && e.height && (Math.abs(e.width - t.container.width) > 1 || Math.abs(e.height - t.container.height) > 1) && (t.isAnimating() && t.endAnimation(!0), t.updateMetrics(), t.panTo({
                            x: t.content.x,
                            y: t.content.y,
                            scale: t.option("baseScale"),
                            friction: 0
                        })), t.updateTimer = null
                    }, t.updateRate))
                }), this.resizeObserver.observe(this.$container))
            }
        }, {
            key: "resetDragPosition", value: function () {
                this.lockAxis = null, this.friction = this.option("friction"), this.velocity = {x: 0, y: 0, scale: 0};
                var t = this.content, e = t.x, n = t.y, o = t.scale;
                this.dragStart = {
                    rect: this.$content.getBoundingClientRect(),
                    x: e,
                    y: n,
                    scale: o
                }, this.dragPosition = i(i({}, this.dragPosition), {}, {x: e, y: n, scale: o}), this.dragOffset = {
                    x: 0,
                    y: 0,
                    scale: 1,
                    time: 0
                }
            }
        }, {
            key: "updateMetrics", value: function (t) {
                !0 !== t && this.trigger("beforeUpdate");
                var e, n, o = this.$container, s = this.$content, a = this.$viewport, r = s instanceof HTMLImageElement,
                    l = this.option("zoom"), c = this.option("resizeParent", l), h = this.option("width"),
                    d = this.option("height"),
                    u = h || (n = s, Math.max(parseFloat(n.naturalWidth || 0), parseFloat(n.width && n.width.baseVal && n.width.baseVal.value || 0), parseFloat(n.offsetWidth || 0), parseFloat(n.scrollWidth || 0))),
                    f = d || (e = s, Math.max(parseFloat(e.naturalHeight || 0), parseFloat(e.height && e.height.baseVal && e.height.baseVal.value || 0), parseFloat(e.offsetHeight || 0), parseFloat(e.scrollHeight || 0)));
                Object.assign(s.style, {
                    width: h ? "".concat(h, "px") : "",
                    height: d ? "".concat(d, "px") : "",
                    maxWidth: "",
                    maxHeight: ""
                }), c && Object.assign(a.style, {width: "", height: ""});
                var v = this.option("ratio");
                h = u = $(u * v), d = f = $(f * v);
                var p = s.getBoundingClientRect(), g = a.getBoundingClientRect(),
                    y = a == o ? g : o.getBoundingClientRect(), m = Math.max(a.offsetWidth, $(g.width)),
                    b = Math.max(a.offsetHeight, $(g.height)), x = window.getComputedStyle(a);
                if (m -= parseFloat(x.paddingLeft) + parseFloat(x.paddingRight), b -= parseFloat(x.paddingTop) + parseFloat(x.paddingBottom), this.viewport.width = m, this.viewport.height = b, l) {
                    if (Math.abs(u - p.width) > .1 || Math.abs(f - p.height) > .1) {
                        var _, k, w, C, S,
                            P = (_ = u, k = f, w = Math.min(u, p.width), C = Math.min(f, p.height), S = Math.min(w / _ || 0, C / k), {
                                width: _ * S || 0,
                                height: k * S || 0
                            });
                        h = $(P.width), d = $(P.height)
                    }
                    Object.assign(s.style, {width: "".concat(h, "px"), height: "".concat(d, "px"), transform: ""})
                }
                if (c && (Object.assign(a.style, {
                    width: "".concat(h, "px"),
                    height: "".concat(d, "px")
                }), this.viewport = i(i({}, this.viewport), {}, {
                    width: h,
                    height: d
                })), r && l && "function" != typeof this.options.maxScale) {
                    var E = this.option("maxScale");
                    this.options.maxScale = function () {
                        return this.content.origWidth > 0 && this.content.fitWidth > 0 ? this.content.origWidth / this.content.fitWidth : E
                    }
                }
                this.content = i(i({}, this.content), {}, {
                    origWidth: u,
                    origHeight: f,
                    fitWidth: h,
                    fitHeight: d,
                    width: h,
                    height: d,
                    scale: 1,
                    isZoomable: l
                }), this.container = {width: y.width, height: y.height}, !0 !== t && this.trigger("afterUpdate")
            }
        }, {
            key: "zoomIn", value: function (t) {
                this.zoomTo(this.content.scale + (t || this.option("step")))
            }
        }, {
            key: "zoomOut", value: function (t) {
                this.zoomTo(this.content.scale - (t || this.option("step")))
            }
        }, {
            key: "toggleZoom", value: function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
                    e = this.option("maxScale"), i = this.option("baseScale"),
                    n = this.content.scale > i + .5 * (e - i) ? i : e;
                this.zoomTo(n, t)
            }
        }, {
            key: "zoomTo", value: function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.option("baseScale"),
                    e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = e.x,
                    n = void 0 === i ? null : i, o = e.y, s = void 0 === o ? null : o;
                t = Math.max(Math.min(t, this.option("maxScale")), this.option("minScale"));
                var a = $(this.content.scale / (this.content.width / this.content.fitWidth), 1e7);
                null === n && (n = this.content.width * a * .5), null === s && (s = this.content.height * a * .5);
                var r = this.getZoomDelta(t, n, s), l = r.deltaX, c = r.deltaY;
                n = this.content.x - l, s = this.content.y - c, this.panTo({
                    x: n,
                    y: s,
                    scale: t,
                    friction: this.option("zoomFriction")
                })
            }
        }, {
            key: "getZoomDelta", value: function (t) {
                var e, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
                    n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0,
                    o = this.content.fitWidth * this.content.scale, s = this.content.fitHeight * this.content.scale;
                return {
                    deltaX: (this.content.fitWidth * t - o) * (i > 0 && o ? i / o : 0),
                    deltaY: (this.content.fitHeight * t - s) * (n > 0 && s ? n / s : 0)
                }
            }
        }, {
            key: "panTo", value: function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.x,
                    n = void 0 === e ? this.content.x : e, o = t.y, s = void 0 === o ? this.content.y : o, a = t.scale,
                    r = t.friction, l = void 0 === r ? this.option("friction") : r, c = t.ignoreBounds;
                if (a = a || this.content.scale || 1, !(void 0 !== c && c)) {
                    var h = this.getBounds(a), d = h.boundX, u = h.boundY;
                    d && (n = Math.max(Math.min(n, d.to), d.from)), u && (s = Math.max(Math.min(s, u.to), u.from))
                }
                this.friction = l, this.transform = i(i({}, this.transform), {}, {
                    x: n,
                    y: s,
                    scale: a
                }), l ? (this.state = "panning", this.velocity = {
                    x: (1 / this.friction - 1) * (n - this.content.x),
                    y: (1 / this.friction - 1) * (s - this.content.y),
                    scale: (1 / this.friction - 1) * (a - this.content.scale)
                }, this.startAnimation()) : this.endAnimation()
            }
        }, {
            key: "startAnimation", value: function () {
                var t = this;
                this.rAF ? cancelAnimationFrame(this.rAF) : this.trigger("startAnimation"), this.rAF = requestAnimationFrame(function () {
                    return t.animate()
                })
            }
        }, {
            key: "animate", value: function () {
                var t = this;
                if (this.setEdgeForce(), this.setDragForce(), this.velocity.x *= this.friction, this.velocity.y *= this.friction, this.velocity.scale *= this.friction, this.content.x += this.velocity.x, this.content.y += this.velocity.y, this.content.scale += this.velocity.scale, this.isAnimating()) this.setTransform(); else if ("pointerdown" !== this.state) return void this.endAnimation();
                this.rAF = requestAnimationFrame(function () {
                    return t.animate()
                })
            }
        }, {
            key: "getBounds", value: function (t) {
                var e = this.boundX, i = this.boundY;
                if (void 0 !== e && void 0 !== i) return {boundX: e, boundY: i};
                e = {from: 0, to: 0}, i = {from: 0, to: 0}, t = t || this.transform.scale;
                var n = this.content.fitWidth * t, o = this.content.fitHeight * t, s = this.viewport.width,
                    a = this.viewport.height;
                if (n < s) {
                    var r = $(.5 * (s - n));
                    e.from = r, e.to = r
                } else e.from = $(s - n);
                if (o < a) {
                    var l = .5 * (a - o);
                    i.from = l, i.to = l
                } else i.from = $(a - o);
                return {boundX: e, boundY: i}
            }
        }, {
            key: "setEdgeForce", value: function () {
                if ("decel" === this.state) {
                    var t, e, i, n, o = this.option("bounceForce"),
                        s = this.getBounds(Math.max(this.transform.scale, this.content.scale)), a = s.boundX,
                        r = s.boundY;
                    if (a && (t = this.content.x < a.from, e = this.content.x > a.to), r && (i = this.content.y < r.from, n = this.content.y > r.to), t || e) {
                        var l = ((t ? a.from : a.to) - this.content.x) * o,
                            c = this.content.x + (this.velocity.x + l) / this.friction;
                        c >= a.from && c <= a.to && (l += this.velocity.x), this.velocity.x = l, this.recalculateTransform()
                    }
                    if (i || n) {
                        var h = ((i ? r.from : r.to) - this.content.y) * o,
                            d = this.content.y + (h + this.velocity.y) / this.friction;
                        d >= r.from && d <= r.to && (h += this.velocity.y), this.velocity.y = h, this.recalculateTransform()
                    }
                }
            }
        }, {
            key: "setDragResistance", value: function () {
                if ("pointerdown" === this.state) {
                    var t, e, i, n, o = this.getBounds(this.dragPosition.scale), s = o.boundX, a = o.boundY;
                    if (s && (t = this.dragPosition.x < s.from, e = this.dragPosition.x > s.to), a && (i = this.dragPosition.y < a.from, n = this.dragPosition.y > a.to), (t || e) && (!t || !e)) {
                        var r = t ? s.from : s.to, l = r - this.dragPosition.x;
                        this.dragPosition.x = r - .3 * l
                    }
                    if ((i || n) && (!i || !n)) {
                        var c = i ? a.from : a.to, h = c - this.dragPosition.y;
                        this.dragPosition.y = c - .3 * h
                    }
                }
            }
        }, {
            key: "setDragForce", value: function () {
                "pointerdown" === this.state && (this.velocity.x = this.dragPosition.x - this.content.x, this.velocity.y = this.dragPosition.y - this.content.y, this.velocity.scale = this.dragPosition.scale - this.content.scale)
            }
        }, {
            key: "recalculateTransform", value: function () {
                this.transform.x = this.content.x + this.velocity.x / (1 / this.friction - 1), this.transform.y = this.content.y + this.velocity.y / (1 / this.friction - 1), this.transform.scale = this.content.scale + this.velocity.scale / (1 / this.friction - 1)
            }
        }, {
            key: "isAnimating", value: function () {
                return !(!this.friction || !(Math.abs(this.velocity.x) > .05 || Math.abs(this.velocity.y) > .05 || Math.abs(this.velocity.scale) > .05))
            }
        }, {
            key: "setTransform", value: function (t) {
                var e, n, o, s, a;
                (t ? (e = $(this.transform.x), n = $(this.transform.y), o = this.transform.scale, this.content = i(i({}, this.content), {}, {
                    x: e,
                    y: n,
                    scale: o
                })) : (e = $(this.content.x), n = $(this.content.y), o = this.content.scale / (this.content.width / this.content.fitWidth), this.content = i(i({}, this.content), {}, {
                    x: e,
                    y: n
                })), this.trigger("beforeTransform"), e = $(this.content.x), n = $(this.content.y), t && this.option("zoom")) ? (s = $(this.content.fitWidth * o), a = $(this.content.fitHeight * o), this.content.width = s, this.content.height = a, this.transform = i(i({}, this.transform), {}, {
                    width: s,
                    height: a,
                    scale: o
                }), Object.assign(this.$content.style, {
                    width: "".concat(s, "px"),
                    height: "".concat(a, "px"),
                    maxWidth: "none",
                    maxHeight: "none",
                    transform: "translate3d(".concat(e, "px, ").concat(n, "px, 0) scale(1)")
                })) : this.$content.style.transform = "translate3d(".concat(e, "px, ").concat(n, "px, 0) scale(").concat(o, ")"), this.trigger("afterTransform")
            }
        }, {
            key: "endAnimation", value: function (t) {
                cancelAnimationFrame(this.rAF), this.rAF = null, this.velocity = {
                    x: 0,
                    y: 0,
                    scale: 0
                }, this.setTransform(!0), this.state = "ready", this.handleCursor(), !0 !== t && this.trigger("endAnimation")
            }
        }, {
            key: "handleCursor", value: function () {
                var t = this.option("draggableClass");
                t && this.option("touch") && (1 == this.option("panOnlyZoomed") && this.content.width <= this.viewport.width && this.content.height <= this.viewport.height && this.transform.scale <= this.option("baseScale") ? this.$container.classList.remove(t) : this.$container.classList.add(t))
            }
        }, {
            key: "detachEvents", value: function () {
                this.$content.removeEventListener("load", this.onLoad), this.$container.removeEventListener("wheel", this.onWheel, {passive: !1}), this.$container.removeEventListener("click", this.onClick, {passive: !1}), this.pointerTracker && (this.pointerTracker.stop(), this.pointerTracker = null), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null)
            }
        }, {
            key: "destroy", value: function () {
                "destroy" !== this.state && (this.state = "destroy", clearTimeout(this.updateTimer), this.updateTimer = null, cancelAnimationFrame(this.rAF), this.rAF = null, this.detachEvents(), this.detachPlugins(), this.resetDragPosition())
            }
        }]), n
    }(E);
    T.version = "4.0.31", T.Plugins = {};
    var z = function (t, e) {
        var i = 0;
        return function () {
            var n = (new Date).getTime();
            if (!(n - i < e)) return i = n, t.apply(void 0, arguments)
        }
    }, A = function () {
        function t(e) {
            o(this, t), this.$container = null, this.$prev = null, this.$next = null, this.carousel = e, this.onRefresh = this.onRefresh.bind(this)
        }

        return a(t, [{
            key: "option", value: function (t) {
                return this.carousel.option("Navigation.".concat(t))
            }
        }, {
            key: "createButton", value: function (t) {
                var e, i = this, n = document.createElement("button");
                n.setAttribute("title", this.carousel.localize("{{".concat(t.toUpperCase(), "}}")));
                var o = this.option("classNames.button") + " " + this.option("classNames.".concat(t));
                return (e = n.classList).add.apply(e, p(o.split(" "))), n.setAttribute("tabindex", "0"), n.innerHTML = this.carousel.localize(this.option("".concat(t, "Tpl"))), n.addEventListener("click", function (e) {
                    e.preventDefault(), e.stopPropagation(), i.carousel["slide".concat("next" === t ? "Next" : "Prev")]()
                }), n
            }
        }, {
            key: "build", value: function () {
                var t;
                this.$container || (this.$container = document.createElement("div"), (t = this.$container.classList).add.apply(t, p(this.option("classNames.main").split(" "))), this.carousel.$container.appendChild(this.$container)), this.$next || (this.$next = this.createButton("next"), this.$container.appendChild(this.$next)), this.$prev || (this.$prev = this.createButton("prev"), this.$container.appendChild(this.$prev))
            }
        }, {
            key: "onRefresh", value: function () {
                var t = this.carousel.pages.length;
                t <= 1 || t > 1 && this.carousel.elemDimWidth < this.carousel.wrapDimWidth && !Number.isInteger(this.carousel.option("slidesPerPage")) ? this.cleanup() : (this.build(), this.$prev.removeAttribute("disabled"), this.$next.removeAttribute("disabled"), this.carousel.option("infiniteX", this.carousel.option("infinite")) || (this.carousel.page <= 0 && this.$prev.setAttribute("disabled", ""), this.carousel.page >= t - 1 && this.$next.setAttribute("disabled", "")))
            }
        }, {
            key: "cleanup", value: function () {
                this.$prev && this.$prev.remove(), this.$prev = null, this.$next && this.$next.remove(), this.$next = null, this.$container && this.$container.remove(), this.$container = null
            }
        }, {
            key: "attach", value: function () {
                this.carousel.on("refresh change", this.onRefresh)
            }
        }, {
            key: "detach", value: function () {
                this.carousel.off("refresh change", this.onRefresh), this.cleanup()
            }
        }]), t
    }();
    A.defaults = {
        prevTpl: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>',
        nextTpl: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>',
        classNames: {main: "carousel__nav", button: "carousel__button", next: "is-next", prev: "is-prev"}
    };
    var O = function () {
        function t(e) {
            o(this, t), this.carousel = e, this.$list = null, this.events = {
                change: this.onChange.bind(this),
                refresh: this.onRefresh.bind(this)
            }
        }

        return a(t, [{
            key: "buildList", value: function () {
                var t = this;
                if (!(this.carousel.pages.length < this.carousel.option("Dots.minSlideCount"))) {
                    var e = document.createElement("ol");
                    return e.classList.add("carousel__dots"), e.addEventListener("click", function (e) {
                        if ("page" in e.target.dataset) {
                            e.preventDefault(), e.stopPropagation();
                            var i = parseInt(e.target.dataset.page, 10), n = t.carousel;
                            i !== n.page && (n.pages.length < 3 && n.option("infinite") ? n[0 == i ? "slidePrev" : "slideNext"]() : n.slideTo(i))
                        }
                    }), this.$list = e, this.carousel.$container.appendChild(e), this.carousel.$container.classList.add("has-dots"), e
                }
            }
        }, {
            key: "removeList", value: function () {
                this.$list && (this.$list.parentNode.removeChild(this.$list), this.$list = null), this.carousel.$container.classList.remove("has-dots")
            }
        }, {
            key: "rebuildDots", value: function () {
                var t = this, e = this.$list, i = !!e, n = this.carousel.pages.length;
                if (n < 2) i && this.removeList(); else {
                    i || (e = this.buildList());
                    var o = this.$list.children.length;
                    if (o > n) for (var s = n; s < o; s++) this.$list.removeChild(this.$list.lastChild); else {
                        for (var a = o; a < n; a++) (function (e) {
                            var i = document.createElement("li");
                            i.classList.add("carousel__dot"), i.dataset.page = e, i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute("title", t.carousel.localize("{{GOTO}}", [["%d", e + 1]])), i.addEventListener("keydown", function (t) {
                                var e, n = t.code;
                                "Enter" === n || "NumpadEnter" === n ? e = i : "ArrowRight" === n ? e = i.nextSibling : "ArrowLeft" === n && (e = i.previousSibling), e && e.click()
                            }), t.$list.appendChild(i)
                        })(a);
                        this.setActiveDot()
                    }
                }
            }
        }, {
            key: "setActiveDot", value: function () {
                if (this.$list) {
                    this.$list.childNodes.forEach(function (t) {
                        t.classList.remove("is-selected")
                    });
                    var t = this.$list.childNodes[this.carousel.page];
                    t && t.classList.add("is-selected")
                }
            }
        }, {
            key: "onChange", value: function () {
                this.setActiveDot()
            }
        }, {
            key: "onRefresh", value: function () {
                this.rebuildDots()
            }
        }, {
            key: "attach", value: function () {
                this.carousel.on(this.events)
            }
        }, {
            key: "detach", value: function () {
                this.removeList(), this.carousel.off(this.events), this.carousel = null
            }
        }]), t
    }(), I = function () {
        function t(e) {
            o(this, t), this.carousel = e, this.selectedIndex = null, this.friction = 0, this.onNavReady = this.onNavReady.bind(this), this.onNavClick = this.onNavClick.bind(this), this.onNavCreateSlide = this.onNavCreateSlide.bind(this), this.onTargetChange = this.onTargetChange.bind(this)
        }

        return a(t, [{
            key: "addAsTargetFor", value: function (t) {
                this.target = this.carousel, this.nav = t, this.attachEvents()
            }
        }, {
            key: "addAsNavFor", value: function (t) {
                this.target = t, this.nav = this.carousel, this.attachEvents()
            }
        }, {
            key: "attachEvents", value: function () {
                this.nav.options.initialSlide = this.target.options.initialPage, this.nav.on("ready", this.onNavReady), this.nav.on("createSlide", this.onNavCreateSlide), this.nav.on("Panzoom.click", this.onNavClick), this.target.on("change", this.onTargetChange), this.target.on("Panzoom.afterUpdate", this.onTargetChange)
            }
        }, {
            key: "onNavReady", value: function () {
                this.onTargetChange(!0)
            }
        }, {
            key: "onNavClick", value: function (t, e, i) {
                var n = i.target.closest(".carousel__slide");
                if (n) {
                    i.stopPropagation();
                    var o = parseInt(n.dataset.index, 10), s = this.target.findPageForSlide(o);
                    this.target.page !== s && this.target.slideTo(s, {friction: this.friction}), this.markSelectedSlide(o)
                }
            }
        }, {
            key: "onNavCreateSlide", value: function (t, e) {
                e.index === this.selectedIndex && this.markSelectedSlide(e.index)
            }
        }, {
            key: "onTargetChange", value: function () {
                var t = this.target.pages[this.target.page].indexes[0], e = this.nav.findPageForSlide(t);
                this.nav.slideTo(e), this.markSelectedSlide(t)
            }
        }, {
            key: "markSelectedSlide", value: function (t) {
                this.selectedIndex = t, p(this.nav.slides).filter(function (t) {
                    return t.$el && t.$el.classList.remove("is-nav-selected")
                });
                var e = this.nav.slides[t];
                e && e.$el && e.$el.classList.add("is-nav-selected")
            }
        }, {
            key: "attach", value: function (t) {
                var e = t.options.Sync;
                (e.target || e.nav) && (e.target ? this.addAsNavFor(e.target) : e.nav && this.addAsTargetFor(e.nav), this.friction = e.friction)
            }
        }, {
            key: "detach", value: function () {
                this.nav && (this.nav.off("ready", this.onNavReady), this.nav.off("Panzoom.click", this.onNavClick), this.nav.off("createSlide", this.onNavCreateSlide)), this.target && (this.target.off("Panzoom.afterUpdate", this.onTargetChange), this.target.off("change", this.onTargetChange))
            }
        }]), t
    }();
    I.defaults = {friction: .92};
    var R = {
        slides: [],
        preload: 0,
        slidesPerPage: "auto",
        initialPage: null,
        initialSlide: null,
        friction: .92,
        center: !0,
        infinite: !0,
        fill: !0,
        dragFree: !1,
        prefix: "",
        classNames: {
            viewport: "carousel__viewport",
            track: "carousel__track",
            slide: "carousel__slide",
            slideSelected: "is-selected"
        },
        l10n: {NEXT: "Next slide", PREV: "Previous slide", GOTO: "Go to slide #%d"}
    }, N = function (t) {
        l(n, t);
        var e = u(n);

        function n(t) {
            var i, s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
            if (o(this, n), s = x(!0, {}, R, s), (i = e.call(this, s)).state = "init", i.$container = t, !(i.$container instanceof HTMLElement)) throw Error("No root element provided");
            return i.slideNext = z(i.slideNext.bind(d(i)), 250), i.slidePrev = z(i.slidePrev.bind(d(i)), 250), i.init(), t.__Carousel = d(i), i
        }

        return a(n, [{
            key: "init", value: function () {
                this.pages = [], this.page = this.pageIndex = null, this.prevPage = this.prevPageIndex = null, this.attachPlugins(n.Plugins), this.trigger("init"), this.initLayout(), this.initSlides(), this.updateMetrics(), this.$track && this.pages.length && (this.$track.style.transform = "translate3d(".concat(-1 * this.pages[this.page].left, "px, 0px, 0) scale(1)")), this.manageSlideVisiblity(), this.initPanzoom(), this.state = "ready", this.trigger("ready")
            }
        }, {
            key: "initLayout", value: function () {
                var t, e, i, n, o = this.option("prefix"), s = this.option("classNames");
                this.$viewport = this.option("viewport") || this.$container.querySelector(".".concat(o).concat(s.viewport)), this.$viewport || (this.$viewport = document.createElement("div"), (t = this.$viewport.classList).add.apply(t, p((o + s.viewport).split(" "))), (e = this.$viewport).append.apply(e, p(this.$container.childNodes)), this.$container.appendChild(this.$viewport)), this.$track = this.option("track") || this.$container.querySelector(".".concat(o).concat(s.track)), this.$track || (this.$track = document.createElement("div"), (i = this.$track.classList).add.apply(i, p((o + s.track).split(" "))), (n = this.$track).append.apply(n, p(this.$viewport.childNodes)), this.$viewport.appendChild(this.$track))
            }
        }, {
            key: "initSlides", value: function () {
                var t = this;
                this.slides = [], this.$viewport.querySelectorAll(".".concat(this.option("prefix")).concat(this.option("classNames.slide"))).forEach(function (e) {
                    var i = {$el: e, isDom: !0};
                    t.slides.push(i), t.trigger("createSlide", i, t.slides.length)
                }), Array.isArray(this.options.slides) && (this.slides = x(!0, p(this.slides), this.options.slides))
            }
        }, {
            key: "updateMetrics", value: function () {
                var t, e = this, n = 0, o = [];
                this.slides.forEach(function (i, s) {
                    var a = i.$el, r = i.isDom || !t ? e.getSlideMetrics(a) : t;
                    i.index = s, i.width = r, i.left = n, t = r, n += r, o.push(s)
                });
                var s = Math.max(this.$track.offsetWidth, $(this.$track.getBoundingClientRect().width)),
                    a = getComputedStyle(this.$track);
                s -= parseFloat(a.paddingLeft) + parseFloat(a.paddingRight), this.contentWidth = n, this.viewportWidth = s;
                var r = [], l = this.option("slidesPerPage");
                if (Number.isInteger(l) && n > s) for (var c = 0; c < this.slides.length; c += l) r.push({
                    indexes: o.slice(c, c + l),
                    slides: this.slides.slice(c, c + l)
                }); else for (var h = 0, d = 0, u = 0; u < this.slides.length; u += 1) {
                    var f = this.slides[u];
                    (!r.length || d + f.width > s) && (r.push({
                        indexes: [],
                        slides: []
                    }), h = r.length - 1, d = 0), d += f.width, r[h].indexes.push(u), r[h].slides.push(f)
                }
                var v = this.option("center"), g = this.option("fill");
                r.forEach(function (t, i) {
                    t.index = i, t.width = t.slides.reduce(function (t, e) {
                        return t + e.width
                    }, 0), t.left = t.slides[0].left, v && (t.left += -(.5 * (s - t.width) * 1)), g && !e.option("infiniteX", e.option("infinite")) && n > s && (t.left = Math.max(t.left, 0), t.left = Math.min(t.left, n - s))
                });
                var y, m = [];
                r.forEach(function (t) {
                    var e = i({}, t);
                    y && e.left === y.left ? (y.width += e.width, y.slides = [].concat(p(y.slides), p(e.slides)), y.indexes = [].concat(p(y.indexes), p(e.indexes))) : (e.index = m.length, y = e, m.push(e))
                }), this.pages = m;
                var b = this.page;
                if (null === b) {
                    var x = this.option("initialSlide");
                    m[b = null !== x ? this.findPageForSlide(x) : parseInt(this.option("initialPage", 0), 10) || 0] || (b = m.length && b > m.length ? m[m.length - 1].index : 0), this.page = b, this.pageIndex = b
                }
                this.updatePanzoom(), this.trigger("refresh")
            }
        }, {
            key: "getSlideMetrics", value: function (t) {
                if (!t) {
                    var e, i, n = this.slides[0];
                    (t = document.createElement("div")).dataset.isTestEl = 1, t.style.visibility = "hidden", (e = t.classList).add.apply(e, p((this.option("prefix") + this.option("classNames.slide")).split(" "))), n.customClass && (i = t.classList).add.apply(i, p(n.customClass.split(" "))), this.$track.prepend(t)
                }
                var o = Math.max(t.offsetWidth, $(t.getBoundingClientRect().width)),
                    s = t.currentStyle || window.getComputedStyle(t);
                return o = o + (parseFloat(s.marginLeft) || 0) + (parseFloat(s.marginRight) || 0), t.dataset.isTestEl && t.remove(), o
            }
        }, {
            key: "findPageForSlide", value: function (t) {
                t = parseInt(t, 10) || 0;
                var e = this.pages.find(function (e) {
                    return e.indexes.indexOf(t) > -1
                });
                return e ? e.index : null
            }
        }, {
            key: "slideNext", value: function () {
                this.slideTo(this.pageIndex + 1)
            }
        }, {
            key: "slidePrev", value: function () {
                this.slideTo(this.pageIndex - 1)
            }
        }, {
            key: "slideTo", value: function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = e.x,
                    n = void 0 === i ? -1 * this.setPage(t, !0) : i, o = e.y, s = e.friction,
                    a = void 0 === s ? this.option("friction") : s;
                this.Panzoom.content.x === n && !this.Panzoom.velocity.x && a || (this.Panzoom.panTo({
                    x: n,
                    y: void 0 === o ? 0 : o,
                    friction: a,
                    ignoreBounds: !0
                }), "ready" === this.state && "ready" === this.Panzoom.state && this.trigger("settle"))
            }
        }, {
            key: "initPanzoom", value: function () {
                var t = this;
                this.Panzoom && this.Panzoom.destroy();
                var e = x(!0, {}, {
                    content: this.$track,
                    wrapInner: !1,
                    resizeParent: !1,
                    zoom: !1,
                    click: !1,
                    lockAxis: "x",
                    x: this.pages.length ? -1 * this.pages[this.page].left : 0,
                    centerOnStart: !1,
                    textSelection: function () {
                        return t.option("textSelection", !1)
                    },
                    panOnlyZoomed: function () {
                        return this.content.width <= this.viewport.width
                    }
                }, this.option("Panzoom"));
                this.Panzoom = new T(this.$container, e), this.Panzoom.on({
                    "*": function (e) {
                        for (var i = arguments.length, n = Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) n[o - 1] = arguments[o];
                        return t.trigger.apply(t, ["Panzoom.".concat(e)].concat(n))
                    },
                    afterUpdate: function () {
                        t.updatePage()
                    },
                    beforeTransform: this.onBeforeTransform.bind(this),
                    touchEnd: this.onTouchEnd.bind(this),
                    endAnimation: function () {
                        t.trigger("settle")
                    }
                }), this.updateMetrics(), this.manageSlideVisiblity()
            }
        }, {
            key: "updatePanzoom", value: function () {
                this.Panzoom && (this.Panzoom.content = i(i({}, this.Panzoom.content), {}, {
                    fitWidth: this.contentWidth,
                    origWidth: this.contentWidth,
                    width: this.contentWidth
                }), this.pages.length > 1 && this.option("infiniteX", this.option("infinite")) ? this.Panzoom.boundX = null : this.pages.length && (this.Panzoom.boundX = {
                    from: -1 * this.pages[this.pages.length - 1].left,
                    to: -1 * this.pages[0].left
                }), this.option("infiniteY", this.option("infinite")) ? this.Panzoom.boundY = null : this.Panzoom.boundY = {
                    from: 0,
                    to: 0
                }, this.Panzoom.handleCursor())
            }
        }, {
            key: "manageSlideVisiblity", value: function () {
                var t = this, e = this.contentWidth, i = this.viewportWidth,
                    n = this.Panzoom ? -1 * this.Panzoom.content.x : this.pages.length ? this.pages[this.page].left : 0,
                    o = this.option("preload"), s = this.option("infiniteX", this.option("infinite")),
                    a = parseFloat(getComputedStyle(this.$viewport, null).getPropertyValue("padding-left")),
                    r = parseFloat(getComputedStyle(this.$viewport, null).getPropertyValue("padding-right"));
                this.slides.forEach(function (l) {
                    var c, h, d = 0;
                    c = n - a, h = n + i + r, c -= o * (i + a + r), h += o * (i + a + r);
                    var u = l.left + l.width > c && l.left < h;
                    c = n + e - a, h = n + e + i + r, c -= o * (i + a + r);
                    var f = s && l.left + l.width > c && l.left < h;
                    c = n - e - a, h = n - e + i + r, c -= o * (i + a + r);
                    var v = s && l.left + l.width > c && l.left < h;
                    f || u || v ? (t.createSlideEl(l), u && (d = 0), f && (d = -1), v && (d = 1), l.left + l.width > n && l.left <= n + i + r && (d = 0)) : t.removeSlideEl(l), l.hasDiff = d
                });
                var l = 0, c = 0;
                this.slides.forEach(function (t, i) {
                    var n = 0;
                    t.$el ? (i !== l || t.hasDiff ? n = c + t.hasDiff * e : c = 0, t.$el.style.left = Math.abs(n) > .1 ? "".concat(c + t.hasDiff * e, "px") : "", l++) : c += t.width
                }), this.markSelectedSlides()
            }
        }, {
            key: "createSlideEl", value: function (t) {
                var e;
                if (t) {
                    if (!t.$el) {
                        var i, n = document.createElement("div");
                        n.dataset.index = t.index, (e = n.classList).add.apply(e, p((this.option("prefix") + this.option("classNames.slide")).split(" "))), t.customClass && (i = n.classList).add.apply(i, p(t.customClass.split(" "))), t.html && (n.innerHTML = t.html);
                        var o = [];
                        this.slides.forEach(function (t, e) {
                            t.$el && o.push(e)
                        });
                        var s = t.index, a = null;
                        if (o.length) {
                            var r = o.reduce(function (t, e) {
                                return Math.abs(e - s) < Math.abs(t - s) ? e : t
                            });
                            a = this.slides[r]
                        }
                        return this.$track.insertBefore(n, a && a.$el ? a.index < t.index ? a.$el.nextSibling : a.$el : null), t.$el = n, this.trigger("createSlide", t, s), t
                    }
                    var l, c = t.$el.dataset.index;
                    c && parseInt(c, 10) === t.index || (t.$el.dataset.index = t.index, t.$el.querySelectorAll("[data-lazy-srcset]").forEach(function (t) {
                        t.srcset = t.dataset.lazySrcset
                    }), t.$el.querySelectorAll("[data-lazy-src]").forEach(function (t) {
                        var e = t.dataset.lazySrc;
                        t instanceof HTMLImageElement ? t.src = e : t.style.backgroundImage = "url('".concat(e, "')")
                    }), (l = t.$el.dataset.lazySrc) && (t.$el.style.backgroundImage = "url('".concat(l, "')")), t.state = "ready")
                }
            }
        }, {
            key: "removeSlideEl", value: function (t) {
                t.$el && !t.isDom && (this.trigger("removeSlide", t), t.$el.remove(), t.$el = null)
            }
        }, {
            key: "markSelectedSlides", value: function () {
                var t = this, e = this.option("classNames.slideSelected"), i = "aria-hidden";
                this.slides.forEach(function (n, o) {
                    var s = n.$el;
                    if (s) {
                        var a = t.pages[t.page];
                        a && a.indexes && a.indexes.indexOf(o) > -1 ? (e && !s.classList.contains(e) && (s.classList.add(e), t.trigger("selectSlide", n)), s.removeAttribute(i)) : (e && s.classList.contains(e) && (s.classList.remove(e), t.trigger("unselectSlide", n)), s.setAttribute(i, !0))
                    }
                })
            }
        }, {
            key: "updatePage", value: function () {
                this.updateMetrics(), this.slideTo(this.page, {friction: 0})
            }
        }, {
            key: "onBeforeTransform", value: function () {
                this.option("infiniteX", this.option("infinite")) && this.manageInfiniteTrack(), this.manageSlideVisiblity()
            }
        }, {
            key: "manageInfiniteTrack", value: function () {
                var t = this.contentWidth, e = this.viewportWidth;
                if (!(!this.option("infiniteX", this.option("infinite")) || this.pages.length < 2 || t < e)) {
                    var i = this.Panzoom, n = !1;
                    return i.content.x < -1 * (t - e) && (i.content.x += t, this.pageIndex = this.pageIndex - this.pages.length, n = !0), i.content.x > e && (i.content.x -= t, this.pageIndex = this.pageIndex + this.pages.length, n = !0), n && "pointerdown" === i.state && i.resetDragPosition(), n
                }
            }
        }, {
            key: "onTouchEnd", value: function (t, e) {
                var i = this.option("dragFree");
                if (!i && this.pages.length > 1 && t.dragOffset.time < 350 && 1 > Math.abs(t.dragOffset.y) && Math.abs(t.dragOffset.x) > 5) this[t.dragOffset.x < 0 ? "slideNext" : "slidePrev"](); else if (i) {
                    var n = v(this.getPageFromPosition(-1 * t.transform.x), 2)[1];
                    this.setPage(n)
                } else this.slideToClosest()
            }
        }, {
            key: "slideToClosest", value: function () {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
                    e = v(this.getPageFromPosition(-1 * this.Panzoom.content.x), 2)[1];
                this.slideTo(e, t)
            }
        }, {
            key: "getPageFromPosition", value: function (t) {
                var e = this.pages.length;
                this.option("center") && (t += .5 * this.viewportWidth);
                var i = Math.floor(t / this.contentWidth);
                t -= i * this.contentWidth;
                var n = this.slides.find(function (e) {
                    return e.left <= t && e.left + e.width > t
                });
                if (n) {
                    var o = this.findPageForSlide(n.index);
                    return [o, o + i * e]
                }
                return [0, 0]
            }
        }, {
            key: "setPage", value: function (t, e) {
                var i = 0, n = parseInt(t, 10) || 0, o = this.page, s = this.pageIndex, a = this.pages.length,
                    r = this.contentWidth, l = this.viewportWidth;
                if (t = (n % a + a) % a, this.option("infiniteX", this.option("infinite")) && r > l) {
                    var c = Math.floor(n / a) || 0, h = r;
                    if (i = this.pages[t].left + c * h, !0 === e && a > 2) {
                        var d = -1 * this.Panzoom.content.x, u = i - h, f = i + h, v = Math.abs(d - i),
                            p = Math.abs(d - u), g = Math.abs(d - f);
                        g < v && g <= p ? (i = f, n += a) : p < v && p < g && (i = u, n -= a)
                    }
                } else t = n = Math.max(0, Math.min(n, a - 1)), i = this.pages.length ? this.pages[t].left : 0;
                return this.page = t, this.pageIndex = n, null !== o && t !== o && (this.prevPage = o, this.prevPageIndex = s, this.trigger("change", t, o)), i
            }
        }, {
            key: "destroy", value: function () {
                var t = this;
                this.state = "destroy", this.slides.forEach(function (e) {
                    t.removeSlideEl(e)
                }), this.slides = [], this.Panzoom.destroy(), this.detachPlugins()
            }
        }]), n
    }(E);
    N.version = "4.0.31", N.Plugins = {Navigation: A, Dots: O, Sync: I};
    var F = !("undefined" == typeof window || !window.document || !window.document.createElement), D = null,
        B = ["a[href]", "area[href]", 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', "select:not([disabled]):not([aria-hidden])", "textarea:not([disabled]):not([aria-hidden])", "button:not([disabled]):not([aria-hidden])", "iframe", "object", "embed", "video", "audio", "[contenteditable]", '[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'],
        W = function (t) {
            if (t && F) {
                null === D && document.createElement("div").focus({
                    get preventScroll() {
                        return D = !0, !1
                    }
                });
                try {
                    if (t.setActive) t.setActive(); else if (D) t.focus({preventScroll: !0}); else {
                        var e = window.pageXOffset || document.body.scrollTop,
                            i = window.pageYOffset || document.body.scrollLeft;
                        t.focus(), document.body.scrollTo({top: e, left: i, behavior: "auto"})
                    }
                } catch (n) {
                }
            }
        }, M = function () {
            function t(e) {
                o(this, t), this.fancybox = e, this.viewport = null, this.pendingUpdate = null;
                for (var i = 0, n = ["onReady", "onResize", "onTouchstart", "onTouchmove"]; i < n.length; i++) {
                    var s = n[i];
                    this[s] = this[s].bind(this)
                }
            }

            return a(t, [{
                key: "onReady", value: function () {
                    var t = window.visualViewport;
                    t && (this.viewport = t, this.startY = 0, t.addEventListener("resize", this.onResize), this.updateViewport()), window.addEventListener("touchstart", this.onTouchstart, {passive: !1}), window.addEventListener("touchmove", this.onTouchmove, {passive: !1}), window.addEventListener("wheel", this.onWheel, {passive: !1})
                }
            }, {
                key: "onResize", value: function () {
                    this.updateViewport()
                }
            }, {
                key: "updateViewport", value: function () {
                    var t = this.fancybox, e = this.viewport, i = e.scale || 1, n = t.$container;
                    if (n) {
                        var o = "", s = "", a = "";
                        i - 1 > .1 && (o = "".concat(e.width * i, "px"), s = "".concat(e.height * i, "px"), a = "translate3d(".concat(e.offsetLeft, "px, ").concat(e.offsetTop, "px, 0) scale(").concat(1 / i, ")")), n.style.width = o, n.style.height = s, n.style.transform = a
                    }
                }
            }, {
                key: "onTouchstart", value: function (t) {
                    this.startY = t.touches ? t.touches[0].screenY : t.screenY
                }
            }, {
                key: "onTouchmove", value: function (t) {
                    var e = this.startY, i = window.innerWidth / window.document.documentElement.clientWidth;
                    if (t.cancelable && !(t.touches.length > 1 || 1 !== i)) {
                        var n = _(t.composedPath()[0]);
                        if (n) {
                            var o = window.getComputedStyle(n), s = parseInt(o.getPropertyValue("height"), 10),
                                a = t.touches ? t.touches[0].screenY : t.screenY, r = e <= a && 0 === n.scrollTop,
                                l = e >= a && n.scrollHeight - n.scrollTop === s;
                            (r || l) && t.preventDefault()
                        } else t.preventDefault()
                    }
                }
            }, {
                key: "onWheel", value: function (t) {
                    _(t.composedPath()[0]) || t.preventDefault()
                }
            }, {
                key: "cleanup", value: function () {
                    this.pendingUpdate && (cancelAnimationFrame(this.pendingUpdate), this.pendingUpdate = null);
                    var t = this.viewport;
                    t && (t.removeEventListener("resize", this.onResize), this.viewport = null), window.removeEventListener("touchstart", this.onTouchstart, !1), window.removeEventListener("touchmove", this.onTouchmove, !1), window.removeEventListener("wheel", this.onWheel, {passive: !1})
                }
            }, {
                key: "attach", value: function () {
                    this.fancybox.on("initLayout", this.onReady)
                }
            }, {
                key: "detach", value: function () {
                    this.fancybox.off("initLayout", this.onReady), this.cleanup()
                }
            }]), t
        }(), H = function () {
            function t(e) {
                o(this, t), this.fancybox = e, this.$container = null, this.state = "init";
                for (var i = 0, n = ["onPrepare", "onClosing", "onKeydown"]; i < n.length; i++) {
                    var s = n[i];
                    this[s] = this[s].bind(this)
                }
                this.events = {prepare: this.onPrepare, closing: this.onClosing, keydown: this.onKeydown}
            }

            return a(t, [{
                key: "onPrepare", value: function () {
                    this.getSlides().length < this.fancybox.option("Thumbs.minSlideCount") ? this.state = "disabled" : !0 === this.fancybox.option("Thumbs.autoStart") && this.fancybox.Carousel.Panzoom.content.height >= this.fancybox.option("Thumbs.minScreenHeight") && this.build()
                }
            }, {
                key: "onClosing", value: function () {
                    this.Carousel && this.Carousel.Panzoom.detachEvents()
                }
            }, {
                key: "onKeydown", value: function (t, e) {
                    e === t.option("Thumbs.key") && this.toggle()
                }
            }, {
                key: "build", value: function () {
                    var t = this;
                    if (!this.$container) {
                        var e = document.createElement("div");
                        e.classList.add("fancybox__thumbs"), this.fancybox.$carousel.parentNode.insertBefore(e, this.fancybox.$carousel.nextSibling), this.Carousel = new N(e, x(!0, {
                            Dots: !1,
                            Navigation: !1,
                            Sync: {friction: 0},
                            infinite: !1,
                            center: !0,
                            fill: !0,
                            dragFree: !0,
                            slidesPerPage: 1,
                            preload: 1
                        }, this.fancybox.option("Thumbs.Carousel"), {
                            Sync: {target: this.fancybox.Carousel},
                            slides: this.getSlides()
                        })), this.Carousel.Panzoom.on("wheel", function (e, i) {
                            i.preventDefault(), t.fancybox[i.deltaY < 0 ? "prev" : "next"]()
                        }), this.$container = e, this.state = "visible"
                    }
                }
            }, {
                key: "getSlides", value: function () {
                    var t, e = [], i = m(this.fancybox.items);
                    try {
                        for (i.s(); !(t = i.n()).done;) {
                            var n = t.value, o = n.thumb;
                            o && e.push({
                                html: this.fancybox.option("Thumbs.tpl").replace(/\{\{src\}\}/gi, o),
                                customClass: "has-thumb has-".concat(n.type || "image")
                            })
                        }
                    } catch (s) {
                        i.e(s)
                    } finally {
                        i.f()
                    }
                    return e
                }
            }, {
                key: "toggle", value: function () {
                    "visible" === this.state ? this.hide() : "hidden" === this.state ? this.show() : this.build()
                }
            }, {
                key: "show", value: function () {
                    "hidden" === this.state && (this.$container.style.display = "", this.Carousel.Panzoom.attachEvents(), this.state = "visible")
                }
            }, {
                key: "hide", value: function () {
                    "visible" === this.state && (this.Carousel.Panzoom.detachEvents(), this.$container.style.display = "none", this.state = "hidden")
                }
            }, {
                key: "cleanup", value: function () {
                    this.Carousel && (this.Carousel.destroy(), this.Carousel = null), this.$container && (this.$container.remove(), this.$container = null), this.state = "init"
                }
            }, {
                key: "attach", value: function () {
                    this.fancybox.on(this.events)
                }
            }, {
                key: "detach", value: function () {
                    this.fancybox.off(this.events), this.cleanup()
                }
            }]), t
        }();
    H.defaults = {
        minSlideCount: 2,
        minScreenHeight: 500,
        autoStart: !0,
        key: "t",
        Carousel: {},
        tpl: '<div class="fancybox__thumb" style="background-image:url(\'{{src}}\')"></div>'
    };
    var X = function (t, e) {
        for (var i = new URL(t), n = new URLSearchParams(i.search), o = new URLSearchParams, s = 0, a = [].concat(p(n), p(Object.entries(e))); s < a.length; s++) {
            var r = v(a[s], 2), l = r[0], c = r[1];
            "t" === l ? o.set("start", parseInt(c)) : o.set(l, c)
        }
        o = o.toString();
        var h = t.match(/#t=((.*)?\d+s)/);
        return h && (o += "#t=".concat(h[1])), o
    }, q = {
        video: {autoplay: !0, ratio: 16 / 9},
        youtube: {autohide: 1, fs: 1, rel: 0, hd: 1, wmode: "transparent", enablejsapi: 1, html5: 1},
        vimeo: {hd: 1, show_title: 1, show_byline: 1, show_portrait: 0, fullscreen: 1},
        html5video: {
            tpl: '<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n  <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',
            format: ""
        }
    }, Y = function () {
        function t(e) {
            o(this, t), this.fancybox = e;
            for (var i = 0, n = ["onInit", "onReady", "onCreateSlide", "onRemoveSlide", "onSelectSlide", "onUnselectSlide", "onRefresh", "onMessage"]; i < n.length; i++) {
                var s = n[i];
                this[s] = this[s].bind(this)
            }
            this.events = {
                init: this.onInit,
                ready: this.onReady,
                "Carousel.createSlide": this.onCreateSlide,
                "Carousel.removeSlide": this.onRemoveSlide,
                "Carousel.selectSlide": this.onSelectSlide,
                "Carousel.unselectSlide": this.onUnselectSlide,
                "Carousel.refresh": this.onRefresh
            }
        }

        return a(t, [{
            key: "onInit", value: function () {
                var t, e = m(this.fancybox.items);
                try {
                    for (e.s(); !(t = e.n()).done;) {
                        var i = t.value;
                        this.processType(i)
                    }
                } catch (n) {
                    e.e(n)
                } finally {
                    e.f()
                }
            }
        }, {
            key: "processType", value: function (t) {
                if (t.html) return t.src = t.html, t.type = "html", void delete t.html;
                var e = t.src || "", i = t.type || this.fancybox.options.type, n = null;
                if (!e || "string" == typeof e) {
                    if (n = e.match(/(?:youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)) {
                        var o = X(e, this.fancybox.option("Html.youtube")), s = encodeURIComponent(n[1]);
                        t.videoId = s, t.src = "https://www.youtube-nocookie.com/embed/".concat(s, "?").concat(o), t.thumb = t.thumb || "https://i.ytimg.com/vi/".concat(s, "/mqdefault.jpg"), t.vendor = "youtube", i = "video"
                    } else if (n = e.match(/^.+vimeo.com\/(?:\/)?([\d]+)(.*)?/)) {
                        var a = X(e, this.fancybox.option("Html.vimeo")), r = encodeURIComponent(n[1]);
                        t.videoId = r, t.src = "https://player.vimeo.com/video/".concat(r, "?").concat(a), t.vendor = "vimeo", i = "video"
                    } else (n = e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i)) ? (t.src = "//maps.google.".concat(n[1], "/?ll=").concat((n[2] ? n[2] + "&z=" + Math.floor(n[3]) + (n[4] ? n[4].replace(/^\//, "&") : "") : n[4] + "").replace(/\?/, "&"), "&output=").concat(n[4] && n[4].indexOf("layer=c") > 0 ? "svembed" : "embed"), i = "map") : (n = e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i)) && (t.src = "//maps.google.".concat(n[1], "/maps?q=").concat(n[2].replace("query=", "q=").replace("api=1", ""), "&output=embed"), i = "map");
                    i || ("#" === e.charAt(0) ? i = "inline" : (n = e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i)) ? (i = "html5video", t.format = t.format || "video/" + ("ogv" === n[1] ? "ogg" : n[1])) : e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i) ? i = "image" : e.match(/\.(pdf)((\?|#).*)?$/i) && (i = "pdf")), t.type = i || this.fancybox.option("defaultType", "image"), "html5video" !== i && "video" !== i || (t.video = x({}, this.fancybox.option("Html.video"), t.video), t._width && t._height ? t.ratio = parseFloat(t._width) / parseFloat(t._height) : t.ratio = t.ratio || t.video.ratio || q.video.ratio)
                }
            }
        }, {
            key: "onReady", value: function () {
                var t = this;
                this.fancybox.Carousel.slides.forEach(function (e) {
                    e.$el && (t.setContent(e), e.index === t.fancybox.getSlide().index && t.playVideo(e))
                })
            }
        }, {
            key: "onCreateSlide", value: function (t, e, i) {
                "ready" === this.fancybox.state && this.setContent(i)
            }
        }, {
            key: "loadInlineContent", value: function (t) {
                var e;
                if (t.src instanceof HTMLElement) e = t.src; else if ("string" == typeof t.src) {
                    var i = t.src.split("#", 2), n = 2 === i.length && "" === i[0] ? i[1] : i[0];
                    e = document.getElementById(n)
                }
                if (e) {
                    if ("clone" === t.type || e.$placeHolder) {
                        var o = (e = e.cloneNode(!0)).getAttribute("id");
                        o = o ? "".concat(o, "--clone") : "clone-".concat(this.fancybox.id, "-").concat(t.index), e.setAttribute("id", o)
                    } else {
                        var s = document.createElement("div");
                        s.classList.add("fancybox-placeholder"), e.parentNode.insertBefore(s, e), e.$placeHolder = s
                    }
                    this.fancybox.setContent(t, e)
                } else this.fancybox.setError(t, "{{ELEMENT_NOT_FOUND}}")
            }
        }, {
            key: "loadAjaxContent", value: function (t) {
                var e = this.fancybox, i = new XMLHttpRequest;
                e.showLoading(t), i.onreadystatechange = function () {
                    i.readyState === XMLHttpRequest.DONE && "ready" === e.state && (e.hideLoading(t), 200 === i.status ? e.setContent(t, i.responseText) : e.setError(t, 404 === i.status ? "{{AJAX_NOT_FOUND}}" : "{{AJAX_FORBIDDEN}}"))
                };
                var n = t.ajax || null;
                i.open(n ? "POST" : "GET", t.src), i.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), i.setRequestHeader("X-Requested-With", "XMLHttpRequest"), i.send(n), t.xhr = i
            }
        }, {
            key: "loadIframeContent", value: function (t) {
                var e = this, i = this.fancybox, n = document.createElement("iframe");
                if (n.className = "fancybox__iframe", n.setAttribute("id", "fancybox__iframe_".concat(i.id, "_").concat(t.index)), n.setAttribute("allow", "autoplay; fullscreen"), n.setAttribute("scrolling", "auto"), t.$iframe = n, "iframe" !== t.type || !1 === t.preload) return n.setAttribute("src", t.src), this.fancybox.setContent(t, n), void this.resizeIframe(t);
                i.showLoading(t);
                var o = document.createElement("div");
                o.style.visibility = "hidden", this.fancybox.setContent(t, o), o.appendChild(n), n.onerror = function () {
                    i.setError(t, "{{IFRAME_ERROR}}")
                }, n.onload = function () {
                    i.hideLoading(t);
                    var o = !1;
                    n.isReady || (n.isReady = !0, o = !0), n.src.length && (n.parentNode.style.visibility = "", e.resizeIframe(t), o && i.revealContent(t))
                }, n.setAttribute("src", t.src)
            }
        }, {
            key: "setAspectRatio", value: function (t) {
                var e = t.$content, i = t.ratio;
                if (e) {
                    var n = t._width, o = t._height;
                    if (i || n && o) {
                        Object.assign(e.style, {
                            width: n && o ? "100%" : "",
                            height: n && o ? "100%" : "",
                            maxWidth: "",
                            maxHeight: ""
                        });
                        var s = e.offsetWidth, a = e.offsetHeight;
                        if (o = o || a, (n = n || s) > s || o > a) {
                            var r = Math.min(s / n, a / o);
                            n *= r, o *= r
                        }
                        Math.abs(n / o - i) > .01 && (i < n / o ? n = o * i : o = n / i), Object.assign(e.style, {
                            width: "".concat(n, "px"),
                            height: "".concat(o, "px")
                        })
                    }
                }
            }
        }, {
            key: "resizeIframe", value: function (t) {
                var e = t.$iframe;
                if (e) {
                    var i = t._width || 0, n = t._height || 0;
                    i && n && (t.autoSize = !1);
                    var o = e.parentNode, s = o && o.style;
                    if (!1 !== t.preload && !1 !== t.autoSize && s) try {
                        var a = window.getComputedStyle(o), r = parseFloat(a.paddingLeft) + parseFloat(a.paddingRight),
                            l = parseFloat(a.paddingTop) + parseFloat(a.paddingBottom), c = e.contentWindow.document,
                            h = c.getElementsByTagName("html")[0], d = c.body;
                        s.width = "", d.style.overflow = "hidden", i = i || h.scrollWidth + r, s.width = "".concat(i, "px"), d.style.overflow = "", s.flex = "0 0 auto", s.height = "".concat(d.scrollHeight, "px"), n = h.scrollHeight + l
                    } catch (u) {
                    }
                    if (i || n) {
                        var f = {flex: "0 1 auto"};
                        i && (f.width = "".concat(i, "px")), n && (f.height = "".concat(n, "px")), Object.assign(s, f)
                    }
                }
            }
        }, {
            key: "onRefresh", value: function (t, e) {
                var i = this;
                e.slides.forEach(function (t) {
                    t.$el && (t.$iframe && i.resizeIframe(t), t.ratio && i.setAspectRatio(t))
                })
            }
        }, {
            key: "setContent", value: function (t) {
                if (t && !t.isDom) {
                    switch (t.type) {
                        case"html":
                            this.fancybox.setContent(t, t.src);
                            break;
                        case"html5video":
                            this.fancybox.setContent(t, this.fancybox.option("Html.html5video.tpl").replace(/\{\{src\}\}/gi, t.src).replace("{{format}}", t.format || t.html5video && t.html5video.format || "").replace("{{poster}}", t.poster || t.thumb || ""));
                            break;
                        case"inline":
                        case"clone":
                            this.loadInlineContent(t);
                            break;
                        case"ajax":
                            this.loadAjaxContent(t);
                            break;
                        case"pdf":
                        case"video":
                        case"map":
                            t.preload = !1;
                        case"iframe":
                            this.loadIframeContent(t)
                    }
                    t.ratio && this.setAspectRatio(t)
                }
            }
        }, {
            key: "onSelectSlide", value: function (t, e, i) {
                "ready" === t.state && this.playVideo(i)
            }
        }, {
            key: "playVideo", value: function (t) {
                if ("html5video" === t.type && t.video.autoplay) try {
                    var e = t.$el.querySelector("video");
                    if (e) {
                        var i = e.play();
                        void 0 !== i && i.then(function () {
                        }).catch(function (t) {
                            e.muted = !0, e.play()
                        })
                    }
                } catch (n) {
                }
                "video" === t.type && t.$iframe && t.$iframe.contentWindow && function e() {
                    if ("done" === t.state && t.$iframe && t.$iframe.contentWindow) {
                        var i;
                        if (t.$iframe.isReady) return t.video && t.video.autoplay && (i = "youtube" == t.vendor ? {
                            event: "command",
                            func: "playVideo"
                        } : {
                            method: "play",
                            value: "true"
                        }), void (i && t.$iframe.contentWindow.postMessage(JSON.stringify(i), "*"));
                        "youtube" === t.vendor && (i = {
                            event: "listening",
                            id: t.$iframe.getAttribute("id")
                        }, t.$iframe.contentWindow.postMessage(JSON.stringify(i), "*"))
                    }
                    t.poller = setTimeout(e, 250)
                }()
            }
        }, {
            key: "onUnselectSlide", value: function (t, e, i) {
                if ("html5video" !== i.type) {
                    var n = !1;
                    "vimeo" == i.vendor ? n = {
                        method: "pause",
                        value: "true"
                    } : "youtube" === i.vendor && (n = {
                        event: "command",
                        func: "pauseVideo"
                    }), n && i.$iframe && i.$iframe.contentWindow && i.$iframe.contentWindow.postMessage(JSON.stringify(n), "*"), clearTimeout(i.poller)
                } else try {
                    i.$el.querySelector("video").pause()
                } catch (o) {
                }
            }
        }, {
            key: "onRemoveSlide", value: function (t, e, i) {
                i.xhr && (i.xhr.abort(), i.xhr = null), i.$iframe && (i.$iframe.onload = i.$iframe.onerror = null, i.$iframe.src = "//about:blank", i.$iframe = null);
                var n = i.$content;
                "inline" === i.type && n && (n.classList.remove("fancybox__content"), "none" !== n.style.display && (n.style.display = "none")), i.$closeButton && (i.$closeButton.remove(), i.$closeButton = null);
                var o = n && n.$placeHolder;
                o && (o.parentNode.insertBefore(n, o), o.remove(), n.$placeHolder = null)
            }
        }, {
            key: "onMessage", value: function (t) {
                try {
                    var e = JSON.parse(t.data);
                    if ("https://player.vimeo.com" === t.origin) {
                        if ("ready" === e.event) {
                            var i, n = m(document.getElementsByClassName("fancybox__iframe"));
                            try {
                                for (n.s(); !(i = n.n()).done;) {
                                    var o = i.value;
                                    o.contentWindow === t.source && (o.isReady = 1)
                                }
                            } catch (s) {
                                n.e(s)
                            } finally {
                                n.f()
                            }
                        }
                    } else "https://www.youtube-nocookie.com" === t.origin && "onReady" === e.event && (document.getElementById(e.id).isReady = 1)
                } catch (a) {
                }
            }
        }, {
            key: "attach", value: function () {
                this.fancybox.on(this.events), window.addEventListener("message", this.onMessage, !1)
            }
        }, {
            key: "detach", value: function () {
                this.fancybox.off(this.events), window.removeEventListener("message", this.onMessage, !1)
            }
        }]), t
    }();
    Y.defaults = q;
    var U = function () {
        function t(e) {
            o(this, t), this.fancybox = e;
            for (var i = 0, n = ["onReady", "onClosing", "onDone", "onPageChange", "onCreateSlide", "onRemoveSlide", "onImageStatusChange"]; i < n.length; i++) {
                var s = n[i];
                this[s] = this[s].bind(this)
            }
            this.events = {
                ready: this.onReady,
                closing: this.onClosing,
                done: this.onDone,
                "Carousel.change": this.onPageChange,
                "Carousel.createSlide": this.onCreateSlide,
                "Carousel.removeSlide": this.onRemoveSlide
            }
        }

        return a(t, [{
            key: "onReady", value: function () {
                var t = this;
                this.fancybox.Carousel.slides.forEach(function (e) {
                    e.$el && t.setContent(e)
                })
            }
        }, {
            key: "onDone", value: function (t, e) {
                this.handleCursor(e)
            }
        }, {
            key: "onClosing", value: function (t) {
                clearTimeout(this.clickTimer), this.clickTimer = null, t.Carousel.slides.forEach(function (t) {
                    t.$image && (t.state = "destroy"), t.Panzoom && t.Panzoom.detachEvents()
                }), "closing" === this.fancybox.state && this.canZoom(t.getSlide()) && this.zoomOut()
            }
        }, {
            key: "onCreateSlide", value: function (t, e, i) {
                "ready" === this.fancybox.state && this.setContent(i)
            }
        }, {
            key: "onRemoveSlide", value: function (t, e, i) {
                i.$image && (i.$el.classList.remove(t.option("Image.canZoomInClass")), i.$image.remove(), i.$image = null), i.Panzoom && (i.Panzoom.destroy(), i.Panzoom = null), i.$el && i.$el.dataset && delete i.$el.dataset.imageFit
            }
        }, {
            key: "setContent", value: function (t) {
                var e = this;
                if (!(t.isDom || t.html || t.type && "image" !== t.type || t.$image)) {
                    t.type = "image", t.state = "loading";
                    var i = document.createElement("div");
                    i.style.visibility = "hidden";
                    var n = document.createElement("img");
                    n.addEventListener("load", function (i) {
                        i.stopImmediatePropagation(), e.onImageStatusChange(t)
                    }), n.addEventListener("error", function () {
                        e.onImageStatusChange(t)
                    }), n.src = t.src, n.alt = "", n.draggable = !1, n.classList.add("fancybox__image"), t.srcset && n.setAttribute("srcset", t.srcset), t.sizes && n.setAttribute("sizes", t.sizes), t.$image = n;
                    var o = this.fancybox.option("Image.wrap");
                    if (o) {
                        var s = document.createElement("div");
                        s.classList.add("string" == typeof o ? o : "fancybox__image-wrap"), s.appendChild(n), i.appendChild(s), t.$wrap = s
                    } else i.appendChild(n);
                    t.$el.dataset.imageFit = this.fancybox.option("Image.fit"), this.fancybox.setContent(t, i), n.complete || n.error ? this.onImageStatusChange(t) : this.fancybox.showLoading(t)
                }
            }
        }, {
            key: "onImageStatusChange", value: function (t) {
                var e = this, i = t.$image;
                i && "loading" === t.state && (i.complete && i.naturalWidth && i.naturalHeight ? (this.fancybox.hideLoading(t), "contain" === this.fancybox.option("Image.fit") && this.initSlidePanzoom(t), t.$el.addEventListener("wheel", function (i) {
                    return e.onWheel(t, i)
                }, {passive: !1}), t.$content.addEventListener("click", function (i) {
                    return e.onClick(t, i)
                }, {passive: !1}), this.revealContent(t)) : this.fancybox.setError(t, "{{IMAGE_ERROR}}"))
            }
        }, {
            key: "initSlidePanzoom", value: function (t) {
                var e = this;
                t.Panzoom || (t.Panzoom = new T(t.$el, x(!0, this.fancybox.option("Image.Panzoom", {}), {
                    viewport: t.$wrap,
                    content: t.$image,
                    width: t._width,
                    height: t._height,
                    wrapInner: !1,
                    textSelection: !0,
                    touch: this.fancybox.option("Image.touch"),
                    panOnlyZoomed: !0,
                    click: !1,
                    wheel: !1
                })), t.Panzoom.on("startAnimation", function () {
                    e.fancybox.trigger("Image.startAnimation", t)
                }), t.Panzoom.on("endAnimation", function () {
                    "zoomIn" === t.state && e.fancybox.done(t), e.handleCursor(t), e.fancybox.trigger("Image.endAnimation", t)
                }), t.Panzoom.on("afterUpdate", function () {
                    e.handleCursor(t), e.fancybox.trigger("Image.afterUpdate", t)
                }))
            }
        }, {
            key: "revealContent", value: function (t) {
                null === this.fancybox.Carousel.prevPage && t.index === this.fancybox.options.startIndex && this.canZoom(t) ? this.zoomIn() : this.fancybox.revealContent(t)
            }
        }, {
            key: "getZoomInfo", value: function (t) {
                var e = t.$thumb.getBoundingClientRect(), i = e.width, n = e.height,
                    o = t.$content.getBoundingClientRect(), s = o.width, a = o.height, r = o.top - e.top,
                    l = o.left - e.left, c = this.fancybox.option("Image.zoomOpacity");
                return "auto" === c && (c = Math.abs(i / n - s / a) > .1), {
                    top: r,
                    left: l,
                    scale: s && i ? i / s : 1,
                    opacity: c
                }
            }
        }, {
            key: "canZoom", value: function (t) {
                var e = this.fancybox, i = e.$container;
                if (window.visualViewport && 1 !== window.visualViewport.scale || t.Panzoom && !t.Panzoom.content.width || !e.option("Image.zoom") || "contain" !== e.option("Image.fit")) return !1;
                var n = t.$thumb;
                if (!n || "loading" === t.state) return !1;
                i.classList.add("fancybox__no-click");
                var o, s = n.getBoundingClientRect();
                if (this.fancybox.option("Image.ignoreCoveredThumbnail")) {
                    var a = document.elementFromPoint(s.left + 1, s.top + 1) === n,
                        r = document.elementFromPoint(s.right - 1, s.bottom - 1) === n;
                    o = a && r
                } else o = document.elementFromPoint(s.left + .5 * s.width, s.top + .5 * s.height) === n;
                return i.classList.remove("fancybox__no-click"), o
            }
        }, {
            key: "zoomIn", value: function () {
                var t = this.fancybox, e = t.getSlide(), i = e.Panzoom, n = this.getZoomInfo(e), o = n.top, s = n.left,
                    a = n.scale, r = n.opacity;
                t.trigger("reveal", e), i.panTo({
                    x: -1 * s,
                    y: -1 * o,
                    scale: a,
                    friction: 0,
                    ignoreBounds: !0
                }), e.$content.style.visibility = "", e.state = "zoomIn", !0 === r && i.on("afterTransform", function (t) {
                    "zoomIn" !== e.state && "zoomOut" !== e.state || (t.$content.style.opacity = Math.min(1, 1 - (1 - t.content.scale) / (1 - a)))
                }), i.panTo({x: 0, y: 0, scale: 1, friction: this.fancybox.option("Image.zoomFriction")})
            }
        }, {
            key: "zoomOut", value: function () {
                var t = this, e = this.fancybox, i = e.getSlide(), n = i.Panzoom;
                if (n) {
                    i.state = "zoomOut", e.state = "customClosing", i.$caption && (i.$caption.style.visibility = "hidden");
                    var o = this.fancybox.option("Image.zoomFriction"), s = function (e) {
                        var s = t.getZoomInfo(i), a = s.top, r = s.left, l = s.scale, c = s.opacity;
                        e || c || (o *= .82), n.panTo({
                            x: -1 * r,
                            y: -1 * a,
                            scale: l,
                            friction: o,
                            ignoreBounds: !0
                        }), o *= .98
                    };
                    window.addEventListener("scroll", s), n.once("endAnimation", function () {
                        window.removeEventListener("scroll", s), e.destroy()
                    }), s()
                }
            }
        }, {
            key: "handleCursor", value: function (t) {
                if ("image" === t.type && t.$el) {
                    var e = t.Panzoom, i = this.fancybox.option("Image.click", !1, t),
                        n = this.fancybox.option("Image.touch"), o = t.$el.classList,
                        s = this.fancybox.option("Image.canZoomInClass"),
                        a = this.fancybox.option("Image.canZoomOutClass");
                    (o.remove(a), o.remove(s), e && "toggleZoom" === i) ? e && 1 === e.content.scale && e.option("maxScale") - e.content.scale > .01 ? o.add(s) : e.content.scale > 1 && !n && o.add(a) : "close" === i && o.add(a)
                }
            }
        }, {
            key: "onWheel", value: function (t, e) {
                if ("ready" === this.fancybox.state && !1 !== this.fancybox.trigger("Image.wheel", e)) switch (this.fancybox.option("Image.wheel")) {
                    case"zoom":
                        "done" === t.state && t.Panzoom && t.Panzoom.zoomWithWheel(e);
                        break;
                    case"close":
                        this.fancybox.close();
                        break;
                    case"slide":
                        this.fancybox[e.deltaY < 0 ? "prev" : "next"]()
                }
            }
        }, {
            key: "onClick", value: function (t, e) {
                var i = this;
                if ("ready" === this.fancybox.state) {
                    var n = t.Panzoom;
                    if (!n || !n.dragPosition.midPoint && 0 === n.dragOffset.x && 0 === n.dragOffset.y && 1 === n.dragOffset.scale) {
                        if (this.fancybox.Carousel.Panzoom.lockAxis) return !1;
                        var o = function (n) {
                            switch (n) {
                                case"toggleZoom":
                                    e.stopPropagation(), t.Panzoom && t.Panzoom.zoomWithClick(e);
                                    break;
                                case"close":
                                    i.fancybox.close();
                                    break;
                                case"next":
                                    e.stopPropagation(), i.fancybox.next()
                            }
                        }, s = this.fancybox.option("Image.click"), a = this.fancybox.option("Image.doubleClick");
                        a ? this.clickTimer ? (clearTimeout(this.clickTimer), this.clickTimer = null, o(a)) : this.clickTimer = setTimeout(function () {
                            i.clickTimer = null, o(s)
                        }, 300) : o(s)
                    }
                }
            }
        }, {
            key: "onPageChange", value: function (t, e) {
                var i = t.getSlide();
                e.slides.forEach(function (t) {
                    t.Panzoom && "done" === t.state && t.index !== i.index && t.Panzoom.panTo({
                        x: 0,
                        y: 0,
                        scale: 1,
                        friction: .8
                    })
                })
            }
        }, {
            key: "attach", value: function () {
                this.fancybox.on(this.events)
            }
        }, {
            key: "detach", value: function () {
                this.fancybox.off(this.events)
            }
        }]), t
    }();
    U.defaults = {
        canZoomInClass: "can-zoom_in",
        canZoomOutClass: "can-zoom_out",
        zoom: !0,
        zoomOpacity: "auto",
        zoomFriction: .82,
        ignoreCoveredThumbnail: !1,
        touch: !0,
        click: "toggleZoom",
        doubleClick: null,
        wheel: "zoom",
        fit: "contain",
        wrap: !1,
        Panzoom: {ratio: 1}
    };
    var V = function () {
        function t(e) {
            o(this, t), this.fancybox = e;
            for (var i = 0, n = ["onChange", "onClosing"]; i < n.length; i++) {
                var s = n[i];
                this[s] = this[s].bind(this)
            }
            this.events = {
                initCarousel: this.onChange,
                "Carousel.change": this.onChange,
                closing: this.onClosing
            }, this.hasCreatedHistory = !1, this.origHash = "", this.timer = null
        }

        return a(t, [{
            key: "onChange", value: function (t) {
                var e = this, i = t.Carousel;
                this.timer && clearTimeout(this.timer);
                var n = null === i.prevPage, o = t.getSlide(), s = new URL(document.URL).hash, a = !1;
                if (o.slug) a = "#" + o.slug; else {
                    var r = o.$trigger && o.$trigger.dataset, l = t.option("slug") || r && r.fancybox;
                    l && l.length && "true" !== l && (a = "#" + l + (i.slides.length > 1 ? "-" + (o.index + 1) : ""))
                }
                n && (this.origHash = s !== a ? s : ""), a && s !== a && (this.timer = setTimeout(function () {
                    try {
                        window.history[n ? "pushState" : "replaceState"]({}, document.title, window.location.pathname + window.location.search + a), n && (e.hasCreatedHistory = !0)
                    } catch (t) {
                    }
                }, 300))
            }
        }, {
            key: "onClosing", value: function () {
                if (this.timer && clearTimeout(this.timer), !0 !== this.hasSilentClose) try {
                    return void window.history.replaceState({}, document.title, window.location.pathname + window.location.search + (this.origHash || ""))
                } catch (t) {
                }
            }
        }, {
            key: "attach", value: function (t) {
                t.on(this.events)
            }
        }, {
            key: "detach", value: function (t) {
                t.off(this.events)
            }
        }], [{
            key: "startFromUrl", value: function () {
                var e = t.Fancybox;
                if (e && !e.getInstance() && !1 !== e.defaults.Hash) {
                    var i = t.getParsedURL(), n = i.hash, o = i.slug, s = i.index;
                    if (o) {
                        var a = document.querySelector('[data-slug="'.concat(n, '"]'));
                        if (a && a.dispatchEvent(new CustomEvent("click", {
                            bubbles: !0,
                            cancelable: !0
                        })), !e.getInstance()) {
                            var r = document.querySelectorAll('[data-fancybox="'.concat(o, '"]'));
                            r.length && (null === s && 1 === r.length ? a = r[0] : s && (a = r[s - 1]), a && a.dispatchEvent(new CustomEvent("click", {
                                bubbles: !0,
                                cancelable: !0
                            })))
                        }
                    }
                }
            }
        }, {
            key: "onHashChange", value: function () {
                var e = t.getParsedURL(), i = e.slug, n = e.index, o = t.Fancybox, s = o && o.getInstance();
                if (s && s.plugins.Hash) {
                    if (i) {
                        var a = s.Carousel;
                        if (i === s.option("slug")) return a.slideTo(n - 1);
                        var r, l = m(a.slides);
                        try {
                            for (l.s(); !(r = l.n()).done;) {
                                var c = r.value;
                                if (c.slug && c.slug === i) return a.slideTo(c.index)
                            }
                        } catch (h) {
                            l.e(h)
                        } finally {
                            l.f()
                        }
                        var d = s.getSlide(), u = d.$trigger && d.$trigger.dataset;
                        if (u && u.fancybox === i) return a.slideTo(n - 1)
                    }
                    s.plugins.Hash.hasSilentClose = !0, s.close()
                }
                t.startFromUrl()
            }
        }, {
            key: "create", value: function (e) {
                function i() {
                    window.addEventListener("hashchange", t.onHashChange, !1), t.startFromUrl()
                }

                t.Fancybox = e, F && window.requestAnimationFrame(function () {
                    /complete|interactive|loaded/.test(document.readyState) ? i() : document.addEventListener("DOMContentLoaded", i)
                })
            }
        }, {
            key: "destroy", value: function () {
                window.removeEventListener("hashchange", t.onHashChange, !1)
            }
        }, {
            key: "getParsedURL", value: function () {
                var t = window.location.hash.substr(1), e = t.split("-"),
                    i = e.length > 1 && /^\+?\d+$/.test(e[e.length - 1]) && parseInt(e.pop(-1), 10) || null;
                return {hash: t, slug: e.join("-"), index: i}
            }
        }]), t
    }(), Z = {
        pageXOffset: 0, pageYOffset: 0, element: function () {
            return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement
        }, activate: function (t) {
            Z.pageXOffset = window.pageXOffset, Z.pageYOffset = window.pageYOffset, t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen && t.msRequestFullscreen()
        }, deactivate: function () {
            document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen()
        }
    }, j = function () {
        function t(e) {
            o(this, t), this.fancybox = e, this.active = !1, this.handleVisibilityChange = this.handleVisibilityChange.bind(this)
        }

        return a(t, [{
            key: "isActive", value: function () {
                return this.active
            }
        }, {
            key: "setTimer", value: function () {
                var t = this;
                if (this.active && !this.timer) {
                    var e = this.fancybox.option("slideshow.delay", 3e3);
                    this.timer = setTimeout(function () {
                        t.timer = null, t.fancybox.option("infinite") || t.fancybox.getSlide().index !== t.fancybox.Carousel.slides.length - 1 ? t.fancybox.next() : t.fancybox.jumpTo(0, {friction: 0})
                    }, e);
                    var i = this.$progress;
                    i || ((i = document.createElement("div")).classList.add("fancybox__progress"), this.fancybox.$carousel.parentNode.insertBefore(i, this.fancybox.$carousel), this.$progress = i, i.offsetHeight), i.style.transitionDuration = "".concat(e, "ms"), i.style.transform = "scaleX(1)"
                }
            }
        }, {
            key: "clearTimer", value: function () {
                clearTimeout(this.timer), this.timer = null, this.$progress && (this.$progress.style.transitionDuration = "", this.$progress.style.transform = "", this.$progress.offsetHeight)
            }
        }, {
            key: "activate", value: function () {
                this.active || (this.active = !0, this.fancybox.$container.classList.add("has-slideshow"), "done" === this.fancybox.getSlide().state && this.setTimer(), document.addEventListener("visibilitychange", this.handleVisibilityChange, !1))
            }
        }, {
            key: "handleVisibilityChange", value: function () {
                this.deactivate()
            }
        }, {
            key: "deactivate", value: function () {
                this.active = !1, this.clearTimer(), this.fancybox.$container.classList.remove("has-slideshow"), document.removeEventListener("visibilitychange", this.handleVisibilityChange, !1)
            }
        }, {
            key: "toggle", value: function () {
                this.active ? this.deactivate() : this.fancybox.Carousel.slides.length > 1 && this.activate()
            }
        }]), t
    }(), G = function () {
        function t(e) {
            var i = this;
            o(this, t), this.fancybox = e, this.$container = null, this.state = "init";
            for (var n = 0, s = ["onInit", "onPrepare", "onDone", "onKeydown", "onClosing", "onChange", "onSettle", "onRefresh"]; n < s.length; n++) {
                var a = s[n];
                this[a] = this[a].bind(this)
            }
            this.events = {
                init: this.onInit,
                prepare: this.onPrepare,
                done: this.onDone,
                keydown: this.onKeydown,
                closing: this.onClosing,
                "Carousel.change": this.onChange,
                "Carousel.settle": this.onSettle,
                "Carousel.Panzoom.touchStart": function () {
                    return i.onRefresh()
                },
                "Image.startAnimation": function (t, e) {
                    return i.onRefresh(e)
                },
                "Image.afterUpdate": function (t, e) {
                    return i.onRefresh(e)
                }
            }
        }

        return a(t, [{
            key: "onInit", value: function () {
                if (this.fancybox.option("Toolbar.autoEnable")) {
                    var t, e = !1, i = m(this.fancybox.items);
                    try {
                        for (i.s(); !(t = i.n()).done;) if ("image" === t.value.type) {
                            e = !0;
                            break
                        }
                    } catch (n) {
                        i.e(n)
                    } finally {
                        i.f()
                    }
                    if (!e) return void (this.state = "disabled")
                }
                var o, s = m(this.fancybox.option("Toolbar.display"));
                try {
                    for (s.s(); !(o = s.n()).done;) {
                        var a = o.value;
                        if ("close" === (b(a) ? a.id : a)) {
                            this.fancybox.options.closeButton = !1;
                            break
                        }
                    }
                } catch (r) {
                    s.e(r)
                } finally {
                    s.f()
                }
            }
        }, {
            key: "onPrepare", value: function () {
                var t = this.fancybox;
                if ("init" === this.state && (this.build(), this.update(), this.Slideshow = new j(t), !t.Carousel.prevPage && (t.option("slideshow.autoStart") && this.Slideshow.activate(), t.option("fullscreen.autoStart") && !Z.element()))) try {
                    Z.activate(t.$container)
                } catch (e) {
                }
            }
        }, {
            key: "onFsChange", value: function () {
                window.scrollTo(Z.pageXOffset, Z.pageYOffset)
            }
        }, {
            key: "onSettle", value: function () {
                var t = this.fancybox, e = this.Slideshow;
                e && e.isActive() && (t.getSlide().index !== t.Carousel.slides.length - 1 || t.option("infinite") ? "done" === t.getSlide().state && e.setTimer() : e.deactivate())
            }
        }, {
            key: "onChange", value: function () {
                this.update(), this.Slideshow && this.Slideshow.isActive() && this.Slideshow.clearTimer()
            }
        }, {
            key: "onDone", value: function (t, e) {
                var i = this.Slideshow;
                e.index === t.getSlide().index && (this.update(), i && i.isActive() && (t.option("infinite") || e.index !== t.Carousel.slides.length - 1 ? i.setTimer() : i.deactivate()))
            }
        }, {
            key: "onRefresh", value: function (t) {
                t && t.index !== this.fancybox.getSlide().index || (this.update(), this.Slideshow && this.Slideshow.isActive() && (!t || "done" === t.state) && this.Slideshow.deactivate())
            }
        }, {
            key: "onKeydown", value: function (t, e, i) {
                " " === e && this.Slideshow && (this.Slideshow.toggle(), i.preventDefault())
            }
        }, {
            key: "onClosing", value: function () {
                this.Slideshow && this.Slideshow.deactivate(), document.removeEventListener("fullscreenchange", this.onFsChange)
            }
        }, {
            key: "createElement", value: function (t) {
                for (var e in "div" === t.type ? i = document.createElement("div") : (i = document.createElement("link" === t.type ? "a" : "button")).classList.add("carousel__button"), i.innerHTML = t.html, i.setAttribute("tabindex", t.tabindex || 0), t.class && (n = i.classList).add.apply(n, p(t.class.split(" "))), t.attr) i.setAttribute(e, t.attr[e]);
                t.label && i.setAttribute("title", this.fancybox.localize("{{".concat(t.label, "}}"))), t.click && i.addEventListener("click", t.click.bind(this)), "prev" === t.id && i.setAttribute("data-fancybox-prev", ""), "next" === t.id && i.setAttribute("data-fancybox-next", "");
                var i, n, o = i.querySelector("svg");
                return o && (o.setAttribute("role", "img"), o.setAttribute("tabindex", "-1"), o.setAttribute("xmlns", "http://www.w3.org/2000/svg")), i
            }
        }, {
            key: "build", value: function () {
                var t = this;
                this.cleanup();
                var e, i = this.fancybox.option("Toolbar.items"),
                    n = [{position: "left", items: []}, {position: "center", items: []}, {
                        position: "right",
                        items: []
                    }], o = this.fancybox.plugins.Thumbs, s = m(this.fancybox.option("Toolbar.display"));
                try {
                    for (s.s(); !(e = s.n()).done;) (function () {
                        var s = e.value, a = void 0, r = void 0;
                        if (b(s) ? (a = s.id, r = x({}, i[a], s)) : r = i[a = s], ["counter", "next", "prev", "slideshow"].includes(a) && t.fancybox.items.length < 2) return "continue";
                        if ("fullscreen" === a) {
                            if (!document.fullscreenEnabled || window.fullScreen) return "continue";
                            document.addEventListener("fullscreenchange", t.onFsChange)
                        }
                        if ("thumbs" === a && (!o || "disabled" === o.state) || !r) return "continue";
                        var l = r.position || "right", c = n.find(function (t) {
                            return t.position === l
                        });
                        c && c.items.push(r)
                    })()
                } catch (a) {
                    s.e(a)
                } finally {
                    s.f()
                }
                var r = document.createElement("div");
                r.classList.add("fancybox__toolbar");
                for (var l = 0, c = n; l < c.length; l++) {
                    var h = c[l];
                    if (h.items.length) {
                        var d = document.createElement("div");
                        d.classList.add("fancybox__toolbar__items"), d.classList.add("fancybox__toolbar__items--".concat(h.position));
                        var u, f = m(h.items);
                        try {
                            for (f.s(); !(u = f.n()).done;) {
                                var v = u.value;
                                d.appendChild(this.createElement(v))
                            }
                        } catch (p) {
                            f.e(p)
                        } finally {
                            f.f()
                        }
                        r.appendChild(d)
                    }
                }
                this.fancybox.$carousel.parentNode.insertBefore(r, this.fancybox.$carousel), this.$container = r
            }
        }, {
            key: "update", value: function () {
                var t, e = this.fancybox.getSlide(), i = e.index, n = this.fancybox.items.length,
                    o = e.downloadSrc || ("image" !== e.type || e.error ? null : e.src),
                    s = m(this.fancybox.$container.querySelectorAll("a.fancybox__button--download"));
                try {
                    for (s.s(); !(t = s.n()).done;) {
                        var a = t.value;
                        o ? (a.removeAttribute("disabled"), a.removeAttribute("tabindex"), a.setAttribute("href", o), a.setAttribute("download", o), a.setAttribute("target", "_blank")) : (a.setAttribute("disabled", ""), a.setAttribute("tabindex", -1), a.removeAttribute("href"), a.removeAttribute("download"))
                    }
                } catch (r) {
                    s.e(r)
                } finally {
                    s.f()
                }
                var l, c = e.Panzoom, h = c && c.option("maxScale") > c.option("baseScale"),
                    d = m(this.fancybox.$container.querySelectorAll(".fancybox__button--zoom"));
                try {
                    for (d.s(); !(l = d.n()).done;) {
                        var u = l.value;
                        h ? u.removeAttribute("disabled") : u.setAttribute("disabled", "")
                    }
                } catch (f) {
                    d.e(f)
                } finally {
                    d.f()
                }
                var v, p = m(this.fancybox.$container.querySelectorAll("[data-fancybox-index]"));
                try {
                    for (p.s(); !(v = p.n()).done;) v.value.innerHTML = e.index + 1
                } catch (g) {
                    p.e(g)
                } finally {
                    p.f()
                }
                var y, b = m(this.fancybox.$container.querySelectorAll("[data-fancybox-count]"));
                try {
                    for (b.s(); !(y = b.n()).done;) y.value.innerHTML = n
                } catch (x) {
                    b.e(x)
                } finally {
                    b.f()
                }
                if (!this.fancybox.option("infinite")) {
                    var $, _ = m(this.fancybox.$container.querySelectorAll("[data-fancybox-prev]"));
                    try {
                        for (_.s(); !($ = _.n()).done;) {
                            var k = $.value;
                            0 === i ? k.setAttribute("disabled", "") : k.removeAttribute("disabled")
                        }
                    } catch (w) {
                        _.e(w)
                    } finally {
                        _.f()
                    }
                    var C, S = m(this.fancybox.$container.querySelectorAll("[data-fancybox-next]"));
                    try {
                        for (S.s(); !(C = S.n()).done;) {
                            var P = C.value;
                            i === n - 1 ? P.setAttribute("disabled", "") : P.removeAttribute("disabled")
                        }
                    } catch (E) {
                        S.e(E)
                    } finally {
                        S.f()
                    }
                }
            }
        }, {
            key: "cleanup", value: function () {
                this.Slideshow && this.Slideshow.isActive() && this.Slideshow.clearTimer(), this.$container && this.$container.remove(), this.$container = null
            }
        }, {
            key: "attach", value: function () {
                this.fancybox.on(this.events)
            }
        }, {
            key: "detach", value: function () {
                this.fancybox.off(this.events), this.cleanup()
            }
        }]), t
    }();
    G.defaults = {
        display: ["counter", "zoom", "slideshow", "fullscreen", "thumbs", "close"], autoEnable: !0, items: {
            counter: {
                position: "left",
                type: "div",
                class: "fancybox__counter",
                html: '<span data-fancybox-index=""></span>&nbsp;/&nbsp;<span data-fancybox-count=""></span>',
                attr: {tabindex: -1}
            },
            prev: {
                type: "button",
                class: "fancybox__button--prev",
                label: "PREV",
                html: '<svg viewBox="0 0 24 24"><path d="M15 4l-8 8 8 8"/></svg>',
                attr: {"data-fancybox-prev": ""}
            },
            next: {
                type: "button",
                class: "fancybox__button--next",
                label: "NEXT",
                html: '<svg viewBox="0 0 24 24"><path d="M8 4l8 8-8 8"/></svg>',
                attr: {"data-fancybox-next": ""}
            },
            fullscreen: {
                type: "button",
                class: "fancybox__button--fullscreen",
                label: "TOGGLE_FULLSCREEN",
                html: '<svg viewBox="0 0 24 24">\n                <g><path d="M3 8 V3h5"></path><path d="M21 8V3h-5"></path><path d="M8 21H3v-5"></path><path d="M16 21h5v-5"></path></g>\n                <g><path d="M7 2v5H2M17 2v5h5M2 17h5v5M22 17h-5v5"/></g>\n            </svg>',
                click: function (t) {
                    t.preventDefault(), Z.element() ? Z.deactivate() : Z.activate(this.fancybox.$container)
                }
            },
            slideshow: {
                type: "button",
                class: "fancybox__button--slideshow",
                label: "TOGGLE_SLIDESHOW",
                html: '<svg viewBox="0 0 24 24">\n                <g><path d="M6 4v16"/><path d="M20 12L6 20"/><path d="M20 12L6 4"/></g>\n                <g><path d="M7 4v15M17 4v15"/></g>\n            </svg>',
                click: function (t) {
                    t.preventDefault(), this.Slideshow.toggle()
                }
            },
            zoom: {
                type: "button",
                class: "fancybox__button--zoom",
                label: "TOGGLE_ZOOM",
                html: '<svg viewBox="0 0 24 24"><circle cx="10" cy="10" r="7"></circle><path d="M16 16 L21 21"></svg>',
                click: function (t) {
                    t.preventDefault();
                    var e = this.fancybox.getSlide().Panzoom;
                    e && e.toggleZoom()
                }
            },
            download: {
                type: "link",
                label: "DOWNLOAD",
                class: "fancybox__button--download",
                html: '<svg viewBox="0 0 24 24"><path d="M12 15V3m0 12l-4-4m4 4l4-4M2 17l.62 2.48A2 2 0 004.56 21h14.88a2 2 0 001.94-1.51L22 17"/></svg>',
                click: function (t) {
                    t.stopPropagation()
                }
            },
            thumbs: {
                type: "button",
                label: "TOGGLE_THUMBS",
                class: "fancybox__button--thumbs",
                html: '<svg viewBox="0 0 24 24"><circle cx="4" cy="4" r="1" /><circle cx="12" cy="4" r="1" transform="rotate(90 12 4)"/><circle cx="20" cy="4" r="1" transform="rotate(90 20 4)"/><circle cx="4" cy="12" r="1" transform="rotate(90 4 12)"/><circle cx="12" cy="12" r="1" transform="rotate(90 12 12)"/><circle cx="20" cy="12" r="1" transform="rotate(90 20 12)"/><circle cx="4" cy="20" r="1" transform="rotate(90 4 20)"/><circle cx="12" cy="20" r="1" transform="rotate(90 12 20)"/><circle cx="20" cy="20" r="1" transform="rotate(90 20 20)"/></svg>',
                click: function (t) {
                    t.stopPropagation();
                    var e = this.fancybox.plugins.Thumbs;
                    e && e.toggle()
                }
            },
            close: {
                type: "button",
                label: "CLOSE",
                class: "fancybox__button--close",
                html: '<svg viewBox="0 0 24 24"><path d="M20 20L4 4m16 0L4 20"></path></svg>',
                attr: {"data-fancybox-close": "", tabindex: 0}
            }
        }
    };
    var K = {
        startIndex: 0,
        preload: 1,
        infinite: !0,
        showClass: "fancybox-zoomInUp",
        hideClass: "fancybox-fadeOut",
        animated: !0,
        hideScrollbar: !0,
        parentEl: null,
        mainClass: null,
        autoFocus: !0,
        trapFocus: !0,
        placeFocusBack: !0,
        click: "close",
        closeButton: "inside",
        dragToClose: !0,
        keyboard: {
            Escape: "close",
            Delete: "close",
            Backspace: "close",
            PageUp: "next",
            PageDown: "prev",
            ArrowUp: "next",
            ArrowDown: "prev",
            ArrowRight: "next",
            ArrowLeft: "prev"
        },
        template: {
            closeButton: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg>',
            spinner: '<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="25 25 50 50" tabindex="-1"><circle cx="50" cy="50" r="20"/></svg>',
            main: null
        },
        l10n: {
            CLOSE: "Close",
            NEXT: "Next",
            PREV: "Previous",
            MODAL: "You can close this modal content with the ESC key",
            ERROR: "Something Went Wrong, Please Try Again Later",
            IMAGE_ERROR: "Image Not Found",
            ELEMENT_NOT_FOUND: "HTML Element Not Found",
            AJAX_NOT_FOUND: "Error Loading AJAX : Not Found",
            AJAX_FORBIDDEN: "Error Loading AJAX : Forbidden",
            IFRAME_ERROR: "Error Loading Page",
            TOGGLE_ZOOM: "Toggle zoom level",
            TOGGLE_THUMBS: "Toggle thumbnails",
            TOGGLE_SLIDESHOW: "Toggle slideshow",
            TOGGLE_FULLSCREEN: "Toggle full-screen mode",
            DOWNLOAD: "Download"
        }
    }, J = new Map, Q = 0, tt = function (t) {
        l(i, t);
        var e = u(i);

        function i(t) {
            var n, s = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
            return o(this, i), t = t.map(function (t) {
                return t.width && (t._width = t.width), t.height && (t._height = t.height), t
            }), (n = e.call(this, x(!0, {}, K, s))).bindHandlers(), n.state = "init", n.setItems(t), n.attachPlugins(i.Plugins), n.trigger("init"), !0 === n.option("hideScrollbar") && n.hideScrollbar(), n.initLayout(), n.initCarousel(), n.attachEvents(), J.set(n.id, d(n)), n.trigger("prepare"), n.state = "ready", n.trigger("ready"), n.$container.setAttribute("aria-hidden", "false"), n.option("trapFocus") && n.focus(), n
        }

        return a(i, [{
            key: "option", value: function (t) {
                for (var e, n, o = this.getSlide(), s = o ? o[t] : void 0, a = arguments.length, r = Array(a > 1 ? a - 1 : 0), l = 1; l < a; l++) r[l - 1] = arguments[l];
                return void 0 !== s ? ("function" == typeof s && (s = (e = s).call.apply(e, [this, this].concat(r))), s) : (n = f(c(i.prototype), "option", this)).call.apply(n, [this, t].concat(r))
            }
        }, {
            key: "bindHandlers", value: function () {
                for (var t = 0, e = ["onMousedown", "onKeydown", "onClick", "onFocus", "onCreateSlide", "onSettle", "onTouchMove", "onTouchEnd", "onTransform"]; t < e.length; t++) {
                    var i = e[t];
                    this[i] = this[i].bind(this)
                }
            }
        }, {
            key: "attachEvents", value: function () {
                document.addEventListener("mousedown", this.onMousedown), document.addEventListener("keydown", this.onKeydown, !0), this.option("trapFocus") && document.addEventListener("focus", this.onFocus, !0), this.$container.addEventListener("click", this.onClick)
            }
        }, {
            key: "detachEvents", value: function () {
                document.removeEventListener("mousedown", this.onMousedown), document.removeEventListener("keydown", this.onKeydown, !0), document.removeEventListener("focus", this.onFocus, !0), this.$container.removeEventListener("click", this.onClick)
            }
        }, {
            key: "initLayout", value: function () {
                var t = this;
                this.$root = this.option("parentEl") || document.body;
                var e = this.option("template.main");
                e && (this.$root.insertAdjacentHTML("beforeend", this.localize(e)), this.$container = this.$root.querySelector(".fancybox__container")), this.$container || (this.$container = document.createElement("div"), this.$root.appendChild(this.$container)), this.$container.onscroll = function () {
                    return t.$container.scrollLeft = 0, !1
                }, Object.entries({
                    class: "fancybox__container",
                    role: "dialog",
                    tabIndex: "-1",
                    "aria-modal": "true",
                    "aria-hidden": "true",
                    "aria-label": this.localize("{{MODAL}}")
                }).forEach(function (e) {
                    var i;
                    return (i = t.$container).setAttribute.apply(i, p(e))
                }), this.option("animated") && this.$container.classList.add("is-animated"), this.$backdrop = this.$container.querySelector(".fancybox__backdrop"), this.$backdrop || (this.$backdrop = document.createElement("div"), this.$backdrop.classList.add("fancybox__backdrop"), this.$container.appendChild(this.$backdrop)), this.$carousel = this.$container.querySelector(".fancybox__carousel"), this.$carousel || (this.$carousel = document.createElement("div"), this.$carousel.classList.add("fancybox__carousel"), this.$container.appendChild(this.$carousel)), this.$container.Fancybox = this, this.id = this.$container.getAttribute("id"), this.id || (this.id = this.options.id || ++Q, this.$container.setAttribute("id", "fancybox-" + this.id));
                var i, n = this.option("mainClass");
                return n && (i = this.$container.classList).add.apply(i, p(n.split(" "))), document.documentElement.classList.add("with-fancybox"), this.trigger("initLayout"), this
            }
        }, {
            key: "setItems", value: function (t) {
                var e, i = [], n = m(t);
                try {
                    for (n.s(); !(e = n.n()).done;) {
                        var o = e.value, s = o.$trigger;
                        if (s) {
                            var a = s.dataset || {};
                            o.src = a.src || s.getAttribute("href") || o.src, o.type = a.type || o.type, !o.src && s instanceof HTMLImageElement && (o.src = s.currentSrc || o.$trigger.src)
                        }
                        var r = o.$thumb;
                        if (!r) {
                            var l = o.$trigger && o.$trigger.origTarget;
                            l && (r = l instanceof HTMLImageElement ? l : l.querySelector("img:not([aria-hidden])")), !r && o.$trigger && (r = o.$trigger instanceof HTMLImageElement ? o.$trigger : o.$trigger.querySelector("img:not([aria-hidden])"))
                        }
                        o.$thumb = r || null;
                        var c = o.thumb;
                        c || !r || (c = r.currentSrc || r.src) || !r.dataset || (c = r.dataset.lazySrc || r.dataset.src), c || "image" !== o.type || (c = o.src), o.thumb = c || null, o.caption = o.caption || "", i.push(o)
                    }
                } catch (h) {
                    n.e(h)
                } finally {
                    n.f()
                }
                this.items = i
            }
        }, {
            key: "initCarousel", value: function () {
                var t = this;
                return this.Carousel = new N(this.$carousel, x(!0, {}, {
                    prefix: "",
                    classNames: {viewport: "fancybox__viewport", track: "fancybox__track", slide: "fancybox__slide"},
                    textSelection: !0,
                    preload: this.option("preload"),
                    friction: .88,
                    slides: this.items,
                    initialPage: this.options.startIndex,
                    slidesPerPage: 1,
                    infiniteX: this.option("infinite"),
                    infiniteY: !0,
                    l10n: this.option("l10n"),
                    Dots: !1,
                    Navigation: {
                        classNames: {
                            main: "fancybox__nav",
                            button: "carousel__button",
                            next: "is-next",
                            prev: "is-prev"
                        }
                    },
                    Panzoom: {
                        textSelection: !0, panOnlyZoomed: function () {
                            return t.Carousel && t.Carousel.pages && t.Carousel.pages.length < 2 && !t.option("dragToClose")
                        }, lockAxis: function () {
                            if (t.Carousel) {
                                var e = "x";
                                return t.option("dragToClose") && (e += "y"), e
                            }
                        }
                    },
                    on: {
                        "*": function (e) {
                            for (var i = arguments.length, n = Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) n[o - 1] = arguments[o];
                            return t.trigger.apply(t, ["Carousel.".concat(e)].concat(n))
                        }, init: function (e) {
                            return t.Carousel = e
                        }, createSlide: this.onCreateSlide, settle: this.onSettle
                    }
                }, this.option("Carousel"))), this.option("dragToClose") && this.Carousel.Panzoom.on({
                    touchMove: this.onTouchMove,
                    afterTransform: this.onTransform,
                    touchEnd: this.onTouchEnd
                }), this.trigger("initCarousel"), this
            }
        }, {
            key: "onCreateSlide", value: function (t, e) {
                var i = e.caption || "";
                if ("function" == typeof this.options.caption && (i = this.options.caption.call(this, this, this.Carousel, e)), "string" == typeof i && i.length) {
                    var n = document.createElement("div"),
                        o = "fancybox__caption_".concat(this.id, "_").concat(e.index);
                    n.className = "fancybox__caption", n.innerHTML = i, n.setAttribute("id", o), e.$caption = e.$el.appendChild(n), e.$el.classList.add("has-caption"), e.$el.setAttribute("aria-labelledby", o)
                }
            }
        }, {
            key: "onSettle", value: function () {
                this.option("autoFocus") && this.focus()
            }
        }, {
            key: "onFocus", value: function (t) {
                this.isTopmost() && this.focus(t)
            }
        }, {
            key: "onClick", value: function (t) {
                if (!t.defaultPrevented) {
                    var e = t.composedPath()[0];
                    if (e.matches("[data-fancybox-close]")) return t.preventDefault(), void i.close(!1, t);
                    if (e.matches("[data-fancybox-next]")) return t.preventDefault(), void i.next();
                    if (e.matches("[data-fancybox-prev]")) return t.preventDefault(), void i.prev();
                    var n = document.activeElement;
                    if (n) {
                        if (n.closest("[contenteditable]")) return;
                        e.matches(B) || n.blur()
                    }
                    if (!e.closest(".fancybox__content") && !getSelection().toString().length && !1 !== this.trigger("click", t)) switch (this.option("click")) {
                        case"close":
                            this.close();
                            break;
                        case"next":
                            this.next()
                    }
                }
            }
        }, {
            key: "onTouchMove", value: function () {
                var t = this.getSlide().Panzoom;
                return !t || 1 === t.content.scale
            }
        }, {
            key: "onTouchEnd", value: function (t) {
                var e = t.dragOffset.y;
                Math.abs(e) >= 150 || Math.abs(e) >= 35 && t.dragOffset.time < 350 ? (this.option("hideClass") && (this.getSlide().hideClass = "fancybox-throwOut".concat(t.content.y < 0 ? "Up" : "Down")), this.close()) : "y" === t.lockAxis && t.panTo({y: 0})
            }
        }, {
            key: "onTransform", value: function (t) {
                if (this.$backdrop) {
                    var e = Math.abs(t.content.y),
                        i = e < 1 ? "" : Math.max(.33, Math.min(1, 1 - e / t.content.fitHeight * 1.5));
                    this.$container.style.setProperty("--fancybox-ts", i ? "0s" : ""), this.$container.style.setProperty("--fancybox-opacity", i)
                }
            }
        }, {
            key: "onMousedown", value: function () {
                "ready" === this.state && document.body.classList.add("is-using-mouse")
            }
        }, {
            key: "onKeydown", value: function (t) {
                if (this.isTopmost()) {
                    document.body.classList.remove("is-using-mouse");
                    var e = t.key, i = this.option("keyboard");
                    if (i && !t.ctrlKey && !t.altKey && !t.shiftKey) {
                        var n = t.composedPath()[0], o = document.activeElement && document.activeElement.classList,
                            s = o && o.contains("carousel__button");
                        if ("Escape" !== e && !s && (t.target.isContentEditable || -1 !== ["BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].indexOf(n.nodeName))) return;
                        if (!1 !== this.trigger("keydown", e, t)) {
                            var a = i[e];
                            "function" == typeof this[a] && this[a]()
                        }
                    }
                }
            }
        }, {
            key: "getSlide", value: function () {
                var t = this.Carousel;
                if (!t) return null;
                var e = null === t.page ? t.option("initialPage") : t.page, i = t.pages || [];
                return i.length && i[e] ? i[e].slides[0] : null
            }
        }, {
            key: "focus", value: function (t) {
                if (!(i.ignoreFocusChange || ["init", "closing", "customClosing", "destroy"].indexOf(this.state) > -1)) {
                    var e = this.$container, n = this.getSlide(), o = "done" === n.state ? n.$el : null;
                    if (!o || !o.contains(document.activeElement)) {
                        t && t.preventDefault(), i.ignoreFocusChange = !0;
                        for (var s, a = [], r = 0, l = Array.from(e.querySelectorAll(B)); r < l.length; r++) {
                            var c = l[r], h = c.offsetParent, d = o && o.contains(c),
                                u = !this.Carousel.$viewport.contains(c);
                            h && (d || u) ? (a.push(c), void 0 !== c.dataset.origTabindex && (c.tabIndex = c.dataset.origTabindex, c.removeAttribute("data-orig-tabindex")), (c.hasAttribute("autoFocus") || !s && d && !c.classList.contains("carousel__button")) && (s = c)) : (c.dataset.origTabindex = void 0 === c.dataset.origTabindex ? c.getAttribute("tabindex") : c.dataset.origTabindex, c.tabIndex = -1)
                        }
                        t ? a.indexOf(t.target) > -1 ? this.lastFocus = t.target : this.lastFocus === e ? W(a[a.length - 1]) : W(e) : this.option("autoFocus") && s ? W(s) : 0 > a.indexOf(document.activeElement) && W(e), this.lastFocus = document.activeElement, i.ignoreFocusChange = !1
                    }
                }
            }
        }, {
            key: "hideScrollbar", value: function () {
                if (F) {
                    var t = window.innerWidth - document.documentElement.getBoundingClientRect().width,
                        e = "fancybox-style-noscroll", i = document.getElementById(e);
                    i || t > 0 && ((i = document.createElement("style")).id = e, i.type = "text/css", i.innerHTML = ".compensate-for-scrollbar {padding-right: ".concat(t, "px;}"), document.getElementsByTagName("head")[0].appendChild(i), document.body.classList.add("compensate-for-scrollbar"))
                }
            }
        }, {
            key: "revealScrollbar", value: function () {
                document.body.classList.remove("compensate-for-scrollbar");
                var t = document.getElementById("fancybox-style-noscroll");
                t && t.remove()
            }
        }, {
            key: "clearContent", value: function (t) {
                this.Carousel.trigger("removeSlide", t), t.$content && (t.$content.remove(), t.$content = null), t.$closeButton && (t.$closeButton.remove(), t.$closeButton = null), t._className && t.$el.classList.remove(t._className)
            }
        }, {
            key: "setContent", value: function (t, e) {
                var i, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, o = t.$el;
                if (e instanceof HTMLElement) ["img", "iframe", "video", "audio"].indexOf(e.nodeName.toLowerCase()) > -1 ? (i = document.createElement("div")).appendChild(e) : i = e; else {
                    var s = document.createRange().createContextualFragment(e);
                    (i = document.createElement("div")).appendChild(s)
                }
                if (t.filter && !t.error && (i = i.querySelector(t.filter)), i instanceof Element) return t._className = "has-".concat(n.suffix || t.type || "unknown"), o.classList.add(t._className), i.classList.add("fancybox__content"), "none" !== i.style.display && "none" !== getComputedStyle(i).getPropertyValue("display") || (i.style.display = t.display || this.option("defaultDisplay") || "flex"), t.id && i.setAttribute("id", t.id), t.$content = i, o.prepend(i), this.manageCloseButton(t), "loading" !== t.state && this.revealContent(t), i;
                this.setError(t, "{{ELEMENT_NOT_FOUND}}")
            }
        }, {
            key: "manageCloseButton", value: function (t) {
                var e = this, i = void 0 === t.closeButton ? this.option("closeButton") : t.closeButton;
                if (i && ("top" !== i || !this.$closeButton)) {
                    var n = document.createElement("button");
                    n.classList.add("carousel__button", "is-close"), n.setAttribute("title", this.options.l10n.CLOSE), n.innerHTML = this.option("template.closeButton"), n.addEventListener("click", function (t) {
                        return e.close(t)
                    }), "inside" === i ? (t.$closeButton && t.$closeButton.remove(), t.$closeButton = t.$content.appendChild(n)) : this.$closeButton = this.$container.insertBefore(n, this.$container.firstChild)
                }
            }
        }, {
            key: "revealContent", value: function (t) {
                var e = this;
                this.trigger("reveal", t), t.$content.style.visibility = "";
                var i = !1;
                t.error || "loading" === t.state || null !== this.Carousel.prevPage || t.index !== this.options.startIndex || (i = void 0 === t.showClass ? this.option("showClass") : t.showClass), i ? (t.state = "animating", this.animateCSS(t.$content, i, function () {
                    e.done(t)
                })) : this.done(t)
            }
        }, {
            key: "animateCSS", value: function (t, e, i) {
                (t && t.dispatchEvent(new CustomEvent("animationend", {
                    bubbles: !0,
                    cancelable: !0
                })), t && e) ? (t.addEventListener("animationend", function n(o) {
                    o.currentTarget === this && (t.removeEventListener("animationend", n), i && i(), t.classList.remove(e))
                }), t.classList.add(e)) : "function" == typeof i && i()
            }
        }, {
            key: "done", value: function (t) {
                t.state = "done", this.trigger("done", t);
                var e = this.getSlide();
                e && t.index === e.index && this.option("autoFocus") && this.focus()
            }
        }, {
            key: "setError", value: function (t, e) {
                t.error = e, this.hideLoading(t), this.clearContent(t);
                var i = document.createElement("div");
                i.classList.add("fancybox-error"), i.innerHTML = this.localize(e || "<p>{{ERROR}}</p>"), this.setContent(t, i, {suffix: "error"})
            }
        }, {
            key: "showLoading", value: function (t) {
                var e = this;
                t.state = "loading", t.$el.classList.add("is-loading");
                var i = t.$el.querySelector(".fancybox__spinner");
                i || ((i = document.createElement("div")).classList.add("fancybox__spinner"), i.innerHTML = this.option("template.spinner"), i.addEventListener("click", function () {
                    e.Carousel.Panzoom.velocity || e.close()
                }), t.$el.prepend(i))
            }
        }, {
            key: "hideLoading", value: function (t) {
                var e = t.$el && t.$el.querySelector(".fancybox__spinner");
                e && (e.remove(), t.$el.classList.remove("is-loading")), "loading" === t.state && (this.trigger("load", t), t.state = "ready")
            }
        }, {
            key: "next", value: function () {
                var t = this.Carousel;
                t && t.pages.length > 1 && t.slideNext()
            }
        }, {
            key: "prev", value: function () {
                var t = this.Carousel;
                t && t.pages.length > 1 && t.slidePrev()
            }
        }, {
            key: "jumpTo", value: function () {
                var t;
                this.Carousel && (t = this.Carousel).slideTo.apply(t, arguments)
            }
        }, {
            key: "isClosing", value: function () {
                return ["closing", "customClosing", "destroy"].includes(this.state)
            }
        }, {
            key: "isTopmost", value: function () {
                return i.getInstance().id == this.id
            }
        }, {
            key: "close", value: function (t) {
                var e = this;
                if (t && t.preventDefault(), !this.isClosing() && !1 !== this.trigger("shouldClose", t) && (this.state = "closing", this.Carousel.Panzoom.destroy(), this.detachEvents(), this.trigger("closing", t), "destroy" !== this.state)) {
                    this.$container.setAttribute("aria-hidden", "true"), this.$container.classList.add("is-closing");
                    var i = this.getSlide();
                    if (this.Carousel.slides.forEach(function (t) {
                        t.$content && t.index !== i.index && e.Carousel.trigger("removeSlide", t)
                    }), "closing" === this.state) {
                        var n = void 0 === i.hideClass ? this.option("hideClass") : i.hideClass;
                        this.animateCSS(i.$content, n, function () {
                            e.destroy()
                        }, !0)
                    }
                }
            }
        }, {
            key: "destroy", value: function () {
                if ("destroy" !== this.state) {
                    this.state = "destroy", this.trigger("destroy");
                    var t = this.option("placeFocusBack") ? this.option("triggerTarget", this.getSlide().$trigger) : null;
                    this.Carousel.destroy(), this.detachPlugins(), this.Carousel = null, this.options = {}, this.events = {}, this.$container.remove(), this.$container = this.$backdrop = this.$carousel = null, t && W(t), J.delete(this.id);
                    var e = i.getInstance();
                    e ? e.focus() : (document.documentElement.classList.remove("with-fancybox"), document.body.classList.remove("is-using-mouse"), this.revealScrollbar())
                }
            }
        }], [{
            key: "show", value: function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                return new i(t, e)
            }
        }, {
            key: "fromEvent", value: function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
                if (!t.defaultPrevented && !(t.button && 0 !== t.button || t.ctrlKey || t.metaKey || t.shiftKey)) {
                    var n, o, s, a = t.composedPath()[0], r = a;
                    if ((r.matches("[data-fancybox-trigger]") || (r = r.closest("[data-fancybox-trigger]"))) && (e.triggerTarget = r, n = r && r.dataset && r.dataset.fancyboxTrigger), n) {
                        var l = document.querySelectorAll('[data-fancybox="'.concat(n, '"]')),
                            c = parseInt(r.dataset.fancyboxIndex, 10) || 0;
                        r = l.length ? l[c] : r
                    }
                    Array.from(i.openers.keys()).reverse().some(function (e) {
                        s = r || a;
                        var i = !1;
                        try {
                            s instanceof Element && ("string" == typeof e || e instanceof String) && (i = s.matches(e) || (s = s.closest(e)))
                        } catch (n) {
                        }
                        return !!i && (t.preventDefault(), o = e, !0)
                    });
                    var h = !1;
                    if (o) {
                        e.event = t, e.target = s, s.origTarget = a, h = i.fromOpener(o, e);
                        var d = i.getInstance();
                        d && "ready" === d.state && t.detail && document.body.classList.add("is-using-mouse")
                    }
                    return h
                }
            }
        }, {
            key: "fromOpener", value: function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = function (t) {
                        for (var e = ["false", "0", "no", "null", "undefined"], i = ["true", "1", "yes"], n = Object.assign({}, t.dataset), o = {}, s = 0, a = Object.entries(n); s < a.length; s++) {
                            var r = v(a[s], 2), l = r[0], c = r[1];
                            if ("fancybox" !== l) {
                                if ("width" === l || "height" === l) o["_".concat(l)] = c; else if ("string" == typeof c || c instanceof String) {
                                    if (e.indexOf(c) > -1) o[l] = !1; else if (i.indexOf(o[l]) > -1) o[l] = !0; else try {
                                        o[l] = JSON.parse(c)
                                    } catch (h) {
                                        o[l] = c
                                    }
                                } else o[l] = c
                            }
                        }
                        return t instanceof Element && (o.$trigger = t), o
                    }, o = [], s = e.startIndex || 0, a = e.target || null,
                    r = void 0 !== (e = x({}, e, i.openers.get(t))).groupAll && e.groupAll,
                    l = void 0 === e.groupAttr ? "data-fancybox" : e.groupAttr,
                    c = l && a ? a.getAttribute("".concat(l)) : "";
                if (!a || c || r) {
                    var h = e.root || (a ? a.getRootNode() : document.body);
                    o = [].slice.call(h.querySelectorAll(t))
                }
                if (a && !r && (o = c ? o.filter(function (t) {
                    return t.getAttribute("".concat(l)) === c
                }) : [a]), !o.length) return !1;
                var d = i.getInstance();
                return !(d && o.indexOf(d.options.$trigger) > -1) && (s = a ? o.indexOf(a) : s, new i(o = o.map(n), x({}, e, {
                    startIndex: s,
                    $trigger: a
                })))
            }
        }, {
            key: "bind", value: function (t) {
                var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};

                function n() {
                    document.body.addEventListener("click", i.fromEvent, !1)
                }

                F && (i.openers.size || (/complete|interactive|loaded/.test(document.readyState) ? n() : document.addEventListener("DOMContentLoaded", n)), i.openers.set(t, e))
            }
        }, {
            key: "unbind", value: function (t) {
                i.openers.delete(t), i.openers.size || i.destroy()
            }
        }, {
            key: "destroy", value: function () {
                for (var t; t = i.getInstance();) t.destroy();
                i.openers = new Map, document.body.removeEventListener("click", i.fromEvent, !1)
            }
        }, {
            key: "getInstance", value: function (t) {
                return t ? J.get(t) : Array.from(J.values()).reverse().find(function (t) {
                    return !t.isClosing() && t
                }) || null
            }
        }, {
            key: "close", value: function () {
                var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0],
                    e = arguments.length > 1 ? arguments[1] : void 0;
                if (t) {
                    var n, o = m(J.values());
                    try {
                        for (o.s(); !(n = o.n()).done;) n.value.close(e)
                    } catch (s) {
                        o.e(s)
                    } finally {
                        o.f()
                    }
                } else {
                    var a = i.getInstance();
                    a && a.close(e)
                }
            }
        }, {
            key: "next", value: function () {
                var t = i.getInstance();
                t && t.next()
            }
        }, {
            key: "prev", value: function () {
                var t = i.getInstance();
                t && t.prev()
            }
        }]), i
    }(E);
    tt.version = "4.0.31", tt.defaults = K, tt.openers = new Map, tt.Plugins = {
        ScrollLock: M,
        Thumbs: H,
        Html: Y,
        Toolbar: G,
        Image: U,
        Hash: V
    }, tt.bind("[data-fancybox]");
    for (var te = 0, ti = Object.entries(tt.Plugins || {}); te < ti.length; te++) {
        var tn = v(ti[te], 2);
        tn[0];
        var to = tn[1];
        "function" == typeof to.create && to.create(tt)
    }
    t.Carousel = N, t.Fancybox = tt, t.Panzoom = T
});
