vendor: 5,225 bytes, lines 1-6
1/*! 2 * Bootstrap v3.3.7 (http://getbootstrap.com) 3 * Copyright 2011-2016 Twitter, Inc. 4 * Licensed under the MIT license 5 */ 6if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); +function (a) { "use strict"; var b = a.fn.jquery.split(" ")[0].split("."); if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 3) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4") }(jQuery), +function (a) { "use strict"; function b() { var a = document.createElement("bootstrap"), b = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend" }; for (var c in b) if (void 0 !== a.style[c]) return { end: b[c] }; return !1 } a.fn.emulateTransitionEnd = function (b) { var c = !1, d = this; a(this).one("bsTransitionEnd", function () { c = !0 }); var e = function () { c || a(d).trigger(a.support.transition.end) }; return setTimeout(e, b), this }, a(function () { a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = { bindType: a.support.transition.end, delegateType: a.support.transition.end, handle: function (b) { if (a(b.target).is(this)) return b.handleObj.handler.apply(this, arguments) } }) }) }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var c = a(this), e = c.data("bs.alert"); e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c) }) } var c = '[data-dismiss="alert"]', d = function (b) { a(b).on("click", c, this.close) }; d.VERSION = "3.3.7", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) { function c() { g.detach().trigger("closed.bs.alert").remove() } var e = a(this), f = e.attr("data-target"); f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, "")); var g = a("#" === f ? [] : f); b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c()) }; var e = a.fn.alert; a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () { return a.fn.alert = e, this }, a(document).on("click.bs.alert.data-api", c, d.prototype.close) }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b; e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b) }) } var c = function (b, d) { this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1 }; c.VERSION = "3.3.7", c.DEFAULTS = { loadingText: "loading..." }, c.prototype.setState = function (b) { var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data(); b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () { d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c).prop(c, !0)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c).prop(c, !1)) }, this), 0) }, c.prototype.toggle = function () { var a = !0, b = this.$element.closest('[data-toggle="buttons"]'); if (b.length) { var c = this.$element.find("input"); "radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change") } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active") }; var d = a.fn.button; a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () { return a.fn.button = d, this }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) { var d = a(c.target).closest(".btn"); b.call(d, "toggle"), a(c.target).is('input[type="radio"], input[type="checkbox"]') || (c.preventDefault(), d.is("input,button") ? d.trigger("focus") : d.find("input:visible,button:visible").first().trigger("focus")) }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) { a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type)) }) }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b), g = "string" == typeof b ? b : f.slide; e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle() }) } var c = function (b, c) { this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("key
6down.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this)) }; c.VERSION = "3.3.7", c.TRANSITION_DURATION = 600, c.DEFAULTS = { interval: 5e3, pause: "hover", wrap: !0, keyboard: !0 }, c.prototype.keydown = function (a) { if (!/input|textarea/i.test(a.target.tagName)) { switch (a.which) { case 37: this.prev(); break; case 39: this.next(); break; default: return } a.preventDefault() } }, c.prototype.cycle = function (b) { return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this }, c.prototype.getItemIndex = function (a) { return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active) }, c.prototype.getItemForDirection = function (a, b) { var c = this.getItemIndex(b), d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1; if (d && !this.options.wrap) return b; var e = "prev" == a ? -1 : 1, f = (c + e) % this.$items.length; return this.$items.eq(f) }, c.prototype.to = function (a) { var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active")); if (!(a > this.$items.length - 1 || a < 0)) return this.sliding ? this.$element.one("slid.bs.carousel", function () { b.to(a) }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a)) }, c.prototype.pause = function (b) { return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this }, c.prototype.next = function () { if (!this.sliding) return this.slide("next") }, c.prototype.prev = function () { if (!this.sliding) return this.slide("prev") }, c.prototype.slide = function (b, d) { var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval, h = "next" == b ? "left" : "right", i = this; if (f.hasClass("active")) return this.sliding = !1; var j = f[0], k = a.Event("slide.bs.carousel", { relatedTarget: j, direction: h }); if (this.$element.trigger(k), !k.isDefaultPrevented()) { if (this.sliding = !0, g && this.pause(), this.$indicators.length) { this.$indicators.find(".active").removeClass("active"); var l = a(this.$indicators.children()[this.getItemIndex(f)]); l && l.addClass("active") } var m = a.Event("slid.bs.carousel", { relatedTarget: j, direction: h }); return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () { f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function () { i.$element.trigger(m) }, 0) }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this } }; var d = a.fn.carousel; a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () { return a.fn.carousel = d, this }; var e = function (c) { var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "")); if (f.hasClass("carousel")) { var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to"); h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault() } }; a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () { a('[data-ride="carousel"]').each(function () { var c = a(this); b.call(c, c.data()) }) }) }(jQuery), +function (a) { "use strict"; function b(b) { var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""); return a(d) } function c(b) { return this.each(function () { var c = a(this), e = c.data("bs.collapse"), f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b); !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]() }) } var d = function (b, c) { this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle() }; d.VERSION = "3.3.7", d.TRANSITION_DURATION = 350, d.DEFAULTS = { toggle: !0 }, d.prototype.dimension = function () { var a = this.$element.hasClass("width"); return a ? "width" : "height" }, d.prototype.show = function () { if (!this.transitioning && !this.$element.hasClass("in")) { var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"); if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) { var f = a.Event("show.bs.collapse"); if (this.$element.trigger(f), !f.isDefaultPrevented()) { e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null)); var g = this.dimension(); this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
vendor: 3,236 bytes, line 6
6 var h = function () { this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse") }; if (!a.support.transition) return h.call(this); var i = a.camelCase(["scroll", g].join("-")); this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i]) } } } }, d.prototype.hide = function () { if (!this.transitioning && this.$element.hasClass("in")) { var b = a.Event("hide.bs.collapse"); if (this.$element.trigger(b), !b.isDefaultPrevented()) { var c = this.dimension(); this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1; var e = function () { this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse") }; return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this) } } }, d.prototype.toggle = function () { this[this.$element.hasClass("in") ? "hide" : "show"]() }, d.prototype.getParent = function () { return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) { var e = a(d); this.addAriaAndCollapsedClass(b(e), e) }, this)).end() }, d.prototype.addAriaAndCollapsedClass = function (a, b) { var c = a.hasClass("in"); a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c) }; var e = a.fn.collapse; a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () { return a.fn.collapse = e, this }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) { var e = a(this); e.attr("data-target") || d.preventDefault(); var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : e.data(); c.call(f, h) }) }(jQuery), +function (a) { "use strict"; function b(b) { var c = b.attr("data-target"); c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "")); var d = c && a(c); return d && d.length ? d : b.parent() } function c(c) { c && 3 === c.which || (a(e).remove(), a(f).each(function () { var d = a(this), e = b(d), f = { relatedTarget: this }; e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f))))) })) } function d(b) { return this.each(function () { var c = a(this), d = c.data("bs.dropdown"); d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c) }) } var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function (b) { a(b).on("click.bs.dropdown", this.toggle) }; g.VERSION = "3.3.7", g.prototype.toggle = function (d) { var e = a(this); if (!e.is(".disabled, :disabled")) { var f = b(e), g = f.hasClass("open"); if (c(), !g) { "ontouchstart" in document.documentElement && !f.closest(".
6navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c); var h = { relatedTarget: this }; if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return; e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h)) } return !1 } }, g.prototype.keydown = function (c) { if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) { var d = a(this); if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) { var e = b(d), g = e.hasClass("open"); if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click"); var h = " li:not(.disabled):visible a", i = e.find(".dropdown-menu" + h); if (i.length) { var j = i.index(c.target); 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus") } } } }; var h = a.fn.dropdown; a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () { return a.fn.dropdown = h, this }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function (a) { a.stopPropagation() }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown) }(jQuery), +function (a) { "use strict"; function b(b, d) { return this.each(function () { var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b); f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d) }) } var c = function (b, c) { this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () { this.$element.trigger("loaded.bs.modal") }, this)) }; c.VERSION = "3.3.7", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }, c.prototype.toggle = function (a) { return this.isShown ? this.hide() : this.show(a) }, c.prototype.show = function (b) { var d = this, e = a.Event("show.bs.modal", { relatedTarget: b }); this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function () { d.$element.one("mouseup.dismiss.bs.modal", function (b) { a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0) }) }), this.backdrop(function () { var e = a.support.transition && d.$element.hasClass("fade"); d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus(); var f = a.Event("shown.bs.modal", { relatedTarget: b }); e ? d.$dialog.one("bsTransitionEnd", function () { d.$element.trigger("focus").trigger(f) }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f) })) }, c.prototype.hide = function (b) { b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal()) }, c.prototype.enforceFocus = function () { a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) { document === a.target || this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus") }, this)) }, c.prototype.escape = function () { this.isShown && this.options.keyboard ? this.$element.on("key
6down.dismiss.bs.modal", a.proxy(function (a) { 27 == a.which && this.hide() }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal") }, c.prototype.resize = function () { this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal") }, c.prototype.hideModal = function () { var a = this; this.$element.hide(), this.backdrop(function () { a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal") }) }, c.prototype.removeBackdrop = function () { this.$backdrop && this.$backdrop.remove(), this.$backdrop = null }, c.prototype.backdrop = function (b) { var d = this, e = this.$element.hasClass("fade") ? "fade" : ""; if (this.isShown && this.options.backdrop) { var f = a.support.transition && e; if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function (a) { return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide())) }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return; f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass("in"); var g = function () { d.removeBackdrop(), b && b() }; a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g() } else b && b() }, c.prototype.handleUpdate = function () { this.adjustDialog() }, c.prototype.adjustDialog = function () { var a = this.$element[0].scrollHeight > document.documentElement.clientHeight; this.$element.css({ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "", paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : "" }) }, c.prototype.resetAdjustments = function () { this.$element.css({ paddingLeft: "", paddingRight: "" }) }, c.prototype.checkScrollbar = function () { var a = window.innerWidth; if (!a) { var b = document.documentElement.getBoundingClientRect(); a = b.right - Math.abs(b.left) } this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar() }, c.prototype.setScrollbar = function () { var a = parseInt(this.$body.css("padding-right") || 0, 10); this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth) }, c.prototype.resetScrollbar = function () { this.$body.css("padding-right", this.originalBodyPad) }, c.prototype.measureScrollbar = function () { var a = document.createElement("div"); a.className = "modal-scrollbar-measure", this.$body.append(a); var b = a.offsetWidth - a.clientWidth; return this.$body[0].removeChild(a), b }; var d = a.fn.modal; a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () { return a.fn.modal = d, this }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) { var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")), g = f.data("bs.modal") ? "toggle" : a.extend({ remote: !/#/.test(e) && e }, f.data(), d.data()); d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) { a.isDefaultPrevented() || f.one("hidden.bs.modal", function () { d.is(":visible") && d.trigger("focus") }) }), b.call(f, g, this) }) }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b; !e && /destroy|hide/.test(b) || (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]()) }) } var c = function (a, b) { this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b) }; c.VERSION = "3.3.7", c.TRANSITION_DURATION = 150, c.DEFAULTS = { animation: !0, placement: "top", selector: !1, template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1, viewport: { selector: "body", padding: 0 } }, c.prototype.init = function (b, c, d) { if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = { click: !1, hover: !1, focus: !1 }, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!"); for (var e = this.options.trigger.split(" "), f = e.length; f--;) { var g = e[f]; if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) { var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout"; this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this)) } } this.options.selector ? this._options = a.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle() }, c.prototype.getDefaults = function () { return c.DEFAULTS }, c.prototype.getOptions = function (b) { return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }), b }, c.prototype.getDelegateOptions = function () { var b = {}, c = this.getDefaults(); return this._options && a.each(this._options, function (a, d) { c[a] != d && (b[a] = d) }), b }, c.prototype.enter = function (b) { var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type); return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void (c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void (c.timeout = setTimeout(function () { "in" == c.hoverState && c.show() }, c.options.delay.show)) : c.show()) }, c.prototype.isInStateTrue = function () { for (var a in this.inState) if (this.inState[a]) return !0; return !1 }, c.prototype.leave = function (b) { var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type); if (c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), !c.isInStateTrue()) return clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void (c.timeout = setTimeout(function () { "out" == c.hoverState && c.hide() }, c.options.delay.hide)) : c.hide() }, c.prototype.show = function () { var b = a.Event("show.bs." + this.type); if (this.hasContent() && this.enabled) { this.$element.trigger(b); var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); if (b.isDefaultPrevented() || !d) return; var e = this, f = this.tip(), g = this.getUID(this.type); this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
vendor: 14,549 bytes, lines 6-10
6 var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement, i = /\s?auto?\s?/i, j = i.test(h); j && (h = h.replace(i, "") || "top"), f.detach().css({ top: 0, left: 0, display: "block" }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type); var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight; if (j) { var n = h, o = this.getPosition(this.$viewport); h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h) } var p = this.getCalculatedOffset(h, k, l, m); this.applyPlacement(p, h); var q = function () { var a = e.hoverState; e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e) }; a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q() } }, c.prototype.applyPlacement = function (b, c) { var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10); isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({ using: function (a) { d.css({ top: Math.round(a.top), left: Math.round(a.left) }) } }, b), 0), d.addClass("in"); var i = d[0].offsetWidth, j = d[0].offsetHeight; "top" == c && j != f && (b.top = b.top + f - j); var k = this.getViewportAdjustedDelta(c, b, i, j); k.left ? b.left += k.left : b.top += k.top; var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j, n = l ? "offsetWidth" : "offsetHeight"; d.offset(b), this.replaceArrow(m, d[0][n], l) }, c.prototype.replaceArrow = function (a, b, c) { this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "") }, c.prototype.setContent = function () { var a = this.tip(), b = this.getTitle(); a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right") }, c.prototype.hide = function (b) { function d() { "in" != e.hoverState && f.detach(), e.$element && e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b() } var e = this, f = a(this.$tip), g = a.Event("hide.bs." + this.type); if (this.$element.trigger(g), !g.isDefaultPrevented()) return f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this }, c.prototype.fixTitle = function () { var a = this.$element; (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "") }, c.prototype.hasContent = function () { return this.getTitle() }, c.prototype.getPosition = function (b) { b = b || this.$element; var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect(); null == e.width && (e = a.extend({}, e, { width: e.right - e.left, height: e.bottom - e.top })); var f = window.SVGElement && c instanceof window.SVGElement, g = d ? { top: 0, left: 0 } : f ? null : b.offset(), h = { scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop() }, i = d ? { width: a(window).width(), height: a(window).height() } : null; return a.extend({}, e, h, i, g) }, c.prototype.getCalculatedOffset = function (a, b, c, d) { return "bottom" == a ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : "top" == a ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : "left" == a ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width } }, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) { var e = { top: 0, left: 0 }; if (!this.$viewport) return e; var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport); if (/right|left/.test(a)) { var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d; h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i) } else { var j = b.left - f, k = b.left + f + c; j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k) } return e }, c.prototype.getTitle = function () { var a, b = this.$element, c = this.options; return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title) }, c.prototype.getUID = function (a) { do a += ~~(1e6 * Math.random()); while (document.getElementById(a)); return a }, c.prototype.tip = function () { if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!"); return this.$tip }, c.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") }, c.prototype.enable = function () { this.enabled = !0 }, c.prototype.disable = function () { this.enabled = !1 }, c.prototype.toggleEnabled = function () { this.enabled = !this.enabled }, c.prototype.toggle = function (b) { var c = this; b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c) }, c.prototype.destroy = function () { var a = this; clearTimeout(this.timeout), this.hide(function () { a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null, a.$element = null }) }; var d = a.fn.tooltip; a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () { return a.fn.tooltip = d, this } }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b; !e && /destroy|hide/.test(b) || (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]()) }) } var c = function (a, b) { this.init("popover", a, b) }; if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js"); c.VERSION = "3.3.7", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, { placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () { return c.DEFAULTS }, c.prototype.setContent = function () { var a = this.tip(), b = this.getTitle(), c = this.getContent(); a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide() }, c.prototype.hasContent = function () { return this.getTitle() || this.getContent() }, c.prototype.getContent = function () { var a = this.$element, b = this.options; return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content) }, c.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find(".arrow") }; var d = a.fn.popover; a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () { return a.fn.popover = d, this } }(jQuery), +function (a) { 7 "use strict"; function b(c, d) { this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process() } function c(c) { return this.each(function () { var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c; e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]() }) } b.VERSION = "3.3.7", b.DEFAULTS = { offset: 10 }, b.prototype.getScrollHeight = function () { return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) }, b.prototype.refresh = function () { var b = this, c = "offset", d = 0; this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () { var b = a(this), e = b.data("target") || b.attr("href"), f = /^#./.test(e) && a(e); return f && f.length && f.is(":visible") && [[f[c]().top + d, e]] || null }).sort(function (a, b) { return a[0] - b[0] }).each(function () { b.offsets.push(this[0]), b.targets.push(this[1]) }) }, b.prototype.process = function () { var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(), d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget; if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a); if (g && b < e[0]) return this.activeTarget = null, this.clear(); for (a = e.length; a--;) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a]) }, b.prototype.activate = function (b) { 8 this.activeTarget = b, this.clear(); var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active"); d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy") 9 }, b.prototype.clear = function () { a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active") }; var d = a.fn.scrollspy; a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () { return a.fn.scrollspy = d, this }, a(window).on("load.bs.scrollspy.data-api", function () { a('[data-spy="scroll"]').each(function () { var b = a(this); c.call(b, b.data()) }) }) 10}(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.tab"); e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]() }) } var c = function (b) { this.element = a(b) }; c.VERSION = "3.3.7", c.TRANSITION_DURATION = 150, c.prototype.show = function () { var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target"); if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) { var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", { relatedTarget: b[0] }), g = a.Event("show.bs.tab", { relatedTarget: e[0] }); if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) { var h = a(d); this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () { e.trigger({ type: "hidden.bs.tab", relatedTarget: b[0] }), b.trigger({ type: "shown.bs.tab", relatedTarget: e[0] }) }) } } }, c.prototype.activate = function (b, d, e) { function f() { g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e() } var g = d.find("> .active"), h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length); g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in") }; var d = a.fn.tab; a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () { return a.fn.tab = d, this }; var e = function (c) { c.preventDefault(), b.call(a(this), "show") }; a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e) }(jQuery), +function (a) { "use strict"; function b(b) { return this.each(function () { var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b; e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]() }) } var c = function (b, d) { this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition() }; c.VERSION = "3.3.7", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = { offset: 0, target: window }, c.prototype.getState = function (a, b, c, d) { var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height(); if (null != c && "top" == this.affixed) return e < c && "top"; if ("bottom" == this.affixed) return null != c ? !(e + this.unpin <= f.top) && "bottom" : !(e + g <= a - d) && "bottom"; var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b; return null != c && e <= c ? "top" : null != d && i + j >= a - d && "bottom" }, c.prototype.getPinnedOffset = function () { if (this.pinnedOffset) return this.pinnedOffset; this.$element.removeClass(c.RESET).addClass("affix"); var a = this.$target.scrollTop(), b = this.$element.offset(); return this.pinnedOffset = b.top - a }, c.prototype.checkPositionWithEventLoop = function () { setTimeout(a.proxy(this.checkPosition, this), 1) }, c.prototype.checkPosition = function () { if (this.$element.is(":visible")) { var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = Math.max(a(document).height(), a(document.body).height()); "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
10 var h = this.getState(g, b, e, f); if (this.affixed != h) { null != this.unpin && this.$element.css("top", ""); var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix"); if (this.$element.trigger(j), j.isDefaultPrevented()) return; this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix") } "bottom" == h && this.$element.offset({ top: g - b - f }) } }; var d = a.fn.affix; a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () { return a.fn.affix = d, this }, a(window).on("load", function () { a('[data-spy="affix"]').each(function () { var c = a(this), d = c.data(); d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d) }) }) }(jQuery); 11/*! 12 * Bootstrap v4.3.1 (https://getbootstrap.com/) 13 * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 14 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 15 */ 16(function (global, factory) { 17 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : 18 typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : 19 (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper)); 20}(this, function (exports, $, Popper) { 'use strict'; 21 22 $ = $ && $.hasOwnProperty('default') ? $['default'] : $; 23 Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; 24 25 function _defineProperties(target, props) { 26 for (var i = 0; i < props.length; i++) { 27 var descriptor = props[i]; 28 descriptor.enumerable = descriptor.enumerable || false; 29 descriptor.configurable = true; 30 if ("value" in descriptor) descriptor.writable = true; 31 Object.defineProperty(target, descriptor.key, descriptor); 32 } 33 } 34 35 function _createClass(Constructor, protoProps, staticProps) { 36 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 37 if (staticProps) _defineProperties(Constructor, staticProps); 38 return Constructor; 39 } 40 41 function _defineProperty(obj, key, value) { 42 if (key in obj) { 43 Object.defineProperty(obj, key, { 44 value: value, 45 enumerable: true, 46 configurable: true, 47 writable: true 48 }); 49 } else { 50 obj[key] = value; 51 } 52 53 return obj; 54 } 55 56 function _objectSpread(target) { 57 for (var i = 1; i < arguments.length; i++) { 58 var source = arguments[i] != null ? arguments[i] : {}; 59 var ownKeys = Object.keys(source); 60 61 if (typeof Object.getOwnPropertySymbols === 'function') { 62 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { 63 return Object.getOwnPropertyDescriptor(source, sym).enumerable; 64 })); 65 } 66 67 ownKeys.forEach(function (key) { 68 _defineProperty(target, key, source[key]); 69 }); 70 } 71 72 return target; 73 } 74 75 function _inheritsLoose(subClass, superClass) { 76 subClass.prototype = Object.create(superClass.prototype); 77 subClass.prototype.constructor = subClass; 78 subClass.__proto__ = superClass; 79 } 80 81 /** 82 * -------------------------------------------------------------------------- 83 * Bootstrap (v4.3.1): util.js 84 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 85 * -------------------------------------------------------------------------- 86 */ 87 /** 88 * ------------------------------------------------------------------------ 89 * Private TransitionEnd Helpers 90 * ------------------------------------------------------------------------ 91 */ 92 93 var TRANSITION_END = 'transitionend'; 94 var MAX_UID = 1000000; 95 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) 96 97 function toType(obj) { 98 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 99 } 100 101 function getSpecialTransitionEndEvent() { 102 return { 103 bindType: TRANSITION_END, 104 delegateType: TRANSITION_END, 105 handle: function handle(event) { 106 if ($(event.target).is(this)) { 107 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 108 } 109 110 return undefined; // eslint-disable-line no-undefined 111 } 112 }; 113 } 114 115 function transitionEndEmulator(duration) { 116 var _this = this; 117 118 var called = false; 119 $(this).one(Util.TRANSITION_END, function () { 120 called = true; 121 });
vendor: 9,562 bytes, lines 122-446
122 setTimeout(function () { 123 if (!called) { 124 Util.triggerTransitionEnd(_this); 125 } 126 }, duration); 127 return this; 128 } 129 130 function setTransitionEndSupport() { 131 $.fn.emulateTransitionEnd = transitionEndEmulator; 132 $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 133 } 134 /** 135 * -------------------------------------------------------------------------- 136 * Public Util Api 137 * -------------------------------------------------------------------------- 138 */ 139 140 141 var Util = { 142 TRANSITION_END: 'bsTransitionEnd', 143 getUID: function getUID(prefix) { 144 do { 145 // eslint-disable-next-line no-bitwise 146 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 147 } while (document.getElementById(prefix)); 148 149 return prefix; 150 }, 151 getSelectorFromElement: function getSelectorFromElement(element) { 152 var selector = element.getAttribute('data-target'); 153 154 if (!selector || selector === '#') { 155 var hrefAttr = element.getAttribute('href'); 156 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; 157 } 158 159 try { 160 return document.querySelector(selector) ? selector : null; 161 } catch (err) { 162 return null; 163 } 164 }, 165 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { 166 if (!element) { 167 return 0; 168 } // Get transition-duration of the element 169 170 171 var transitionDuration = $(element).css('transition-duration'); 172 var transitionDelay = $(element).css('transition-delay'); 173 var floatTransitionDuration = parseFloat(transitionDuration); 174 var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found 175 176 if (!floatTransitionDuration && !floatTransitionDelay) { 177 return 0; 178 } // If multiple durations are defined, take the first 179 180 181 transitionDuration = transitionDuration.split(',')[0]; 182 transitionDelay = transitionDelay.split(',')[0]; 183 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 184 }, 185 reflow: function reflow(element) { 186 return element.offsetHeight; 187 }, 188 triggerTransitionEnd: function triggerTransitionEnd(element) { 189 $(element).trigger(TRANSITION_END); 190 }, 191 // TODO: Remove in v5 192 supportsTransitionEnd: function supportsTransitionEnd() { 193 return Boolean(TRANSITION_END); 194 }, 195 isElement: function isElement(obj) { 196 return (obj[0] || obj).nodeType; 197 }, 198 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 199 for (var property in configTypes) { 200 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 201 var expectedTypes = configTypes[property]; 202 var value = config[property]; 203 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 204 205 if (!new RegExp(expectedTypes).test(valueType)) { 206 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 207 } 208 } 209 } 210 }, 211 findShadowRoot: function findShadowRoot(element) { 212 if (!document.documentElement.attachShadow) { 213 return null; 214 } // Can find the shadow root otherwise it'll return the document 215 216 217 if (typeof element.getRootNode === 'function') { 218 var root = element.getRootNode(); 219 return root instanceof ShadowRoot ? root : null; 220 } 221 222 if (element instanceof ShadowRoot) { 223 return element; 224 } // when we don't find a shadow root 225 226 227 if (!element.parentNode) { 228 return null; 229 } 230 231 return Util.findShadowRoot(element.parentNode); 232 } 233 }; 234 setTransitionEndSupport(); 235 236 /** 237 * ------------------------------------------------------------------------ 238 * Constants 239 * ------------------------------------------------------------------------ 240 */ 241 242 var NAME = 'alert'; 243 var VERSION = '4.3.1'; 244 var DATA_KEY = 'bs.alert'; 245 var EVENT_KEY = "." + DATA_KEY; 246 var DATA_API_KEY = '.data-api'; 247 var JQUERY_NO_CONFLICT = $.fn[NAME]; 248 var Selector = { 249 DISMISS: '[data-dismiss="alert"]' 250 }; 251 var Event = { 252 CLOSE: "close" + EVENT_KEY, 253 CLOSED: "closed" + EVENT_KEY, 254 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY 255 }; 256 var ClassName = { 257 ALERT: 'alert', 258 FADE: 'fade', 259 SHOW: 'show' 260 /** 261 * ------------------------------------------------------------------------ 262 * Class Definition 263 * ------------------------------------------------------------------------ 264 */ 265 266 }; 267 268 var Alert = 269 /*#__PURE__*/ 270 function () { 271 function Alert(element) { 272 this._element = element; 273 } // Getters 274 275 276 var _proto = Alert.prototype; 277 278 // Public 279 _proto.close = function close(element) { 280 var rootElement = this._element; 281 282 if (element) { 283 rootElement = this._getRootElement(element); 284 } 285 286 var customEvent = this._triggerCloseEvent(rootElement); 287 288 if (customEvent.isDefaultPrevented()) { 289 return; 290 } 291 292 this._removeElement(rootElement); 293 }; 294 295 _proto.dispose = function dispose() { 296 $.removeData(this._element, DATA_KEY); 297 this._element = null; 298 } // Private 299 ; 300 301 _proto._getRootElement = function _getRootElement(element) { 302 var selector = Util.getSelectorFromElement(element); 303 var parent = false; 304 305 if (selector) { 306 parent = document.querySelector(selector); 307 } 308 309 if (!parent) { 310 parent = $(element).closest("." + ClassName.ALERT)[0]; 311 } 312 313 return parent; 314 }; 315 316 _proto._triggerCloseEvent = function _triggerCloseEvent(element) { 317 var closeEvent = $.Event(Event.CLOSE); 318 $(element).trigger(closeEvent); 319 return closeEvent; 320 }; 321 322 _proto._removeElement = function _removeElement(element) { 323 var _this = this; 324 325 $(element).removeClass(ClassName.SHOW); 326 327 if (!$(element).hasClass(ClassName.FADE)) { 328 this._destroyElement(element); 329 330 return; 331 } 332 333 var transitionDuration = Util.getTransitionDurationFromElement(element); 334 $(element).one(Util.TRANSITION_END, function (event) { 335 return _this._destroyElement(element, event); 336 }).emulateTransitionEnd(transitionDuration); 337 }; 338 339 _proto._destroyElement = function _destroyElement(element) { 340 $(element).detach().trigger(Event.CLOSED).remove(); 341 } // Static 342 ; 343 344 Alert._jQueryInterface = function _jQueryInterface(config) { 345 return this.each(function () { 346 var $element = $(this); 347 var data = $element.data(DATA_KEY); 348 349 if (!data) { 350 data = new Alert(this); 351 $element.data(DATA_KEY, data); 352 } 353 354 if (config === 'close') { 355 data[config](this); 356 } 357 }); 358 }; 359 360 Alert._handleDismiss = function _handleDismiss(alertInstance) { 361 return function (event) { 362 if (event) { 363 event.preventDefault(); 364 } 365 366 alertInstance.close(this); 367 }; 368 }; 369 370 _createClass(Alert, null, [{ 371 key: "VERSION", 372 get: function get() { 373 return VERSION; 374 } 375 }]); 376 377 return Alert; 378 }(); 379 /** 380 * ------------------------------------------------------------------------ 381 * Data Api implementation 382 * ------------------------------------------------------------------------ 383 */ 384 385 386 $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); 387 /** 388 * ------------------------------------------------------------------------ 389 * jQuery 390 * ------------------------------------------------------------------------ 391 */ 392 393 $.fn[NAME] = Alert._jQueryInterface; 394 $.fn[NAME].Constructor = Alert; 395 396 $.fn[NAME].noConflict = function () { 397 $.fn[NAME] = JQUERY_NO_CONFLICT; 398 return Alert._jQueryInterface; 399 }; 400 401 /** 402 * ------------------------------------------------------------------------ 403 * Constants 404 * ------------------------------------------------------------------------ 405 */ 406 407 var NAME$1 = 'button'; 408 var VERSION$1 = '4.3.1'; 409 var DATA_KEY$1 = 'bs.button'; 410 var EVENT_KEY$1 = "." + DATA_KEY$1; 411 var DATA_API_KEY$1 = '.data-api'; 412 var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1]; 413 var ClassName$1 = { 414 ACTIVE: 'active', 415 BUTTON: 'btn', 416 FOCUS: 'focus' 417 }; 418 var Selector$1 = { 419 DATA_TOGGLE_CARROT: '[data-toggle^="button"]', 420 DATA_TOGGLE: '[data-toggle="buttons"]', 421 INPUT: 'input:not([type="hidden"])', 422 ACTIVE: '.active', 423 BUTTON: '.btn' 424 }; 425 var Event$1 = { 426 CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1, 427 FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1) 428 /** 429 * ------------------------------------------------------------------------ 430 * Class Definition 431 * ------------------------------------------------------------------------ 432 */ 433 434 }; 435 436 var Button = 437 /*#__PURE__*/ 438 function () { 439 function Button(element) { 440 this._element = element; 441 } // Getters 442 443 444 var _proto = Button.prototype; 445 446 // Public
vendor: 5,607 bytes, lines 447-628
447 _proto.toggle = function toggle() { 448 var triggerChangeEvent = true; 449 var addAriaPressed = true; 450 var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0]; 451 452 if (rootElement) { 453 var input = this._element.querySelector(Selector$1.INPUT); 454 455 if (input) { 456 if (input.type === 'radio') { 457 if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) { 458 triggerChangeEvent = false; 459 } else { 460 var activeElement = rootElement.querySelector(Selector$1.ACTIVE); 461 462 if (activeElement) { 463 $(activeElement).removeClass(ClassName$1.ACTIVE); 464 } 465 } 466 } 467 468 if (triggerChangeEvent) { 469 if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { 470 return; 471 } 472 473 input.checked = !this._element.classList.contains(ClassName$1.ACTIVE); 474 $(input).trigger('change'); 475 } 476 477 input.focus(); 478 addAriaPressed = false; 479 } 480 } 481 482 if (addAriaPressed) { 483 this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE)); 484 } 485 486 if (triggerChangeEvent) { 487 $(this._element).toggleClass(ClassName$1.ACTIVE); 488 } 489 }; 490 491 _proto.dispose = function dispose() { 492 $.removeData(this._element, DATA_KEY$1); 493 this._element = null; 494 } // Static 495 ; 496 497 Button._jQueryInterface = function _jQueryInterface(config) { 498 return this.each(function () { 499 var data = $(this).data(DATA_KEY$1); 500 501 if (!data) { 502 data = new Button(this); 503 $(this).data(DATA_KEY$1, data); 504 } 505 506 if (config === 'toggle') { 507 data[config](); 508 } 509 }); 510 }; 511 512 _createClass(Button, null, [{ 513 key: "VERSION", 514 get: function get() { 515 return VERSION$1; 516 } 517 }]); 518 519 return Button; 520 }(); 521 /** 522 * ------------------------------------------------------------------------ 523 * Data Api implementation 524 * ------------------------------------------------------------------------ 525 */ 526 527 528 $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) { 529 event.preventDefault(); 530 var button = event.target; 531 532 if (!$(button).hasClass(ClassName$1.BUTTON)) { 533 button = $(button).closest(Selector$1.BUTTON); 534 } 535 536 Button._jQueryInterface.call($(button), 'toggle'); 537 }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) { 538 var button = $(event.target).closest(Selector$1.BUTTON)[0]; 539 $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type)); 540 }); 541 /** 542 * ------------------------------------------------------------------------ 543 * jQuery 544 * ------------------------------------------------------------------------ 545 */ 546 547 $.fn[NAME$1] = Button._jQueryInterface; 548 $.fn[NAME$1].Constructor = Button; 549 550 $.fn[NAME$1].noConflict = function () { 551 $.fn[NAME$1] = JQUERY_NO_CONFLICT$1; 552 return Button._jQueryInterface; 553 }; 554 555 /** 556 * ------------------------------------------------------------------------ 557 * Constants 558 * ------------------------------------------------------------------------ 559 */ 560 561 var NAME$2 = 'carousel'; 562 var VERSION$2 = '4.3.1'; 563 var DATA_KEY$2 = 'bs.carousel'; 564 var EVENT_KEY$2 = "." + DATA_KEY$2; 565 var DATA_API_KEY$2 = '.data-api'; 566 var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2]; 567 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key 568 569 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key 570 571 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 572 573 var SWIPE_THRESHOLD = 40; 574 var Default = { 575 interval: 5000, 576 keyboard: true, 577 slide: false, 578 pause: 'hover', 579 wrap: true, 580 touch: true 581 }; 582 var DefaultType = { 583 interval: '(number|boolean)', 584 keyboard: 'boolean', 585 slide: '(boolean|string)', 586 pause: '(string|boolean)', 587 wrap: 'boolean', 588 touch: 'boolean' 589 }; 590 var Direction = { 591 NEXT: 'next', 592 PREV: 'prev', 593 LEFT: 'left', 594 RIGHT: 'right' 595 }; 596 var Event$2 = { 597 SLIDE: "slide" + EVENT_KEY$2, 598 SLID: "slid" + EVENT_KEY$2, 599 KEYDOWN: "keydown" + EVENT_KEY$2, 600 MOUSEENTER: "mouseenter" + EVENT_KEY$2, 601 MOUSELEAVE: "mouseleave" + EVENT_KEY$2, 602 TOUCHSTART: "touchstart" + EVENT_KEY$2, 603 TOUCHMOVE: "touchmove" + EVENT_KEY$2, 604 TOUCHEND: "touchend" + EVENT_KEY$2, 605 POINTERDOWN: "pointerdown" + EVENT_KEY$2, 606 POINTERUP: "pointerup" + EVENT_KEY$2, 607 DRAG_START: "dragstart" + EVENT_KEY$2, 608 LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2, 609 CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2 610 }; 611 var ClassName$2 = { 612 CAROUSEL: 'carousel', 613 ACTIVE: 'active', 614 SLIDE: 'slide', 615 RIGHT: 'carousel-item-right', 616 LEFT: 'carousel-item-left', 617 NEXT: 'carousel-item-next', 618 PREV: 'carousel-item-prev', 619 ITEM: 'carousel-item', 620 POINTER_EVENT: 'pointer-event' 621 }; 622 var Selector$2 = { 623 ACTIVE: '.active', 624 ACTIVE_ITEM: '.active.carousel-item', 625 ITEM: '.carousel-item', 626 ITEM_IMG: '.carousel-item img', 627 NEXT_PREV: '.carousel-item-next, .carousel-item-prev', 628 INDICATORS: '.carousel-indicators',
vendor: 6,043 bytes, lines 629-838
629 DATA_SLIDE: '[data-slide], [data-slide-to]', 630 DATA_RIDE: '[data-ride="carousel"]' 631 }; 632 var PointerType = { 633 TOUCH: 'touch', 634 PEN: 'pen' 635 /** 636 * ------------------------------------------------------------------------ 637 * Class Definition 638 * ------------------------------------------------------------------------ 639 */ 640 641 }; 642 643 var Carousel = 644 /*#__PURE__*/ 645 function () { 646 function Carousel(element, config) { 647 this._items = null; 648 this._interval = null; 649 this._activeElement = null; 650 this._isPaused = false; 651 this._isSliding = false; 652 this.touchTimeout = null; 653 this.touchStartX = 0; 654 this.touchDeltaX = 0; 655 this._config = this._getConfig(config); 656 this._element = element; 657 this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS); 658 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; 659 this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); 660 661 this._addEventListeners(); 662 } // Getters 663 664 665 var _proto = Carousel.prototype; 666 667 // Public 668 _proto.next = function next() { 669 if (!this._isSliding) { 670 this._slide(Direction.NEXT); 671 } 672 }; 673 674 _proto.nextWhenVisible = function nextWhenVisible() { 675 // Don't call next when the page isn't visible 676 // or the carousel or its parent isn't visible 677 if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { 678 this.next(); 679 } 680 }; 681 682 _proto.prev = function prev() { 683 if (!this._isSliding) { 684 this._slide(Direction.PREV); 685 } 686 }; 687 688 _proto.pause = function pause(event) { 689 if (!event) { 690 this._isPaused = true; 691 } 692 693 if (this._element.querySelector(Selector$2.NEXT_PREV)) { 694 Util.triggerTransitionEnd(this._element); 695 this.cycle(true); 696 } 697 698 clearInterval(this._interval); 699 this._interval = null; 700 }; 701 702 _proto.cycle = function cycle(event) { 703 if (!event) { 704 this._isPaused = false; 705 } 706 707 if (this._interval) { 708 clearInterval(this._interval); 709 this._interval = null; 710 } 711 712 if (this._config.interval && !this._isPaused) { 713 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); 714 } 715 }; 716 717 _proto.to = function to(index) { 718 var _this = this; 719 720 this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); 721 722 var activeIndex = this._getItemIndex(this._activeElement); 723 724 if (index > this._items.length - 1 || index < 0) { 725 return; 726 } 727 728 if (this._isSliding) { 729 $(this._element).one(Event$2.SLID, function () { 730 return _this.to(index); 731 }); 732 return; 733 } 734 735 if (activeIndex === index) { 736 this.pause(); 737 this.cycle(); 738 return; 739 } 740 741 var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; 742 743 this._slide(direction, this._items[index]); 744 }; 745 746 _proto.dispose = function dispose() { 747 $(this._element).off(EVENT_KEY$2); 748 $.removeData(this._element, DATA_KEY$2); 749 this._items = null; 750 this._config = null; 751 this._element = null; 752 this._interval = null; 753 this._isPaused = null; 754 this._isSliding = null; 755 this._activeElement = null; 756 this._indicatorsElement = null; 757 } // Private 758 ; 759 760 _proto._getConfig = function _getConfig(config) { 761 config = _objectSpread({}, Default, config); 762 Util.typeCheckConfig(NAME$2, config, DefaultType); 763 return config; 764 }; 765 766 _proto._handleSwipe = function _handleSwipe() { 767 var absDeltax = Math.abs(this.touchDeltaX); 768 769 if (absDeltax <= SWIPE_THRESHOLD) { 770 return; 771 } 772 773 var direction = absDeltax / this.touchDeltaX; // swipe left 774 775 if (direction > 0) { 776 this.prev(); 777 } // swipe right 778 779 780 if (direction < 0) { 781 this.next(); 782 } 783 }; 784 785 _proto._addEventListeners = function _addEventListeners() { 786 var _this2 = this; 787 788 if (this._config.keyboard) { 789 $(this._element).on(Event$2.KEYDOWN, function (event) { 790 return _this2._keydown(event); 791 }); 792 } 793 794 if (this._config.pause === 'hover') { 795 $(this._element).on(Event$2.MOUSEENTER, function (event) { 796 return _this2.pause(event); 797 }).on(Event$2.MOUSELEAVE, function (event) { 798 return _this2.cycle(event); 799 }); 800 } 801 802 if (this._config.touch) { 803 this._addTouchEventListeners(); 804 } 805 }; 806 807 _proto._addTouchEventListeners = function _addTouchEventListeners() { 808 var _this3 = this; 809 810 if (!this._touchSupported) { 811 return; 812 } 813 814 var start = function start(event) { 815 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { 816 _this3.touchStartX = event.originalEvent.clientX; 817 } else if (!_this3._pointerEvent) { 818 _this3.touchStartX = event.originalEvent.touches[0].clientX; 819 } 820 }; 821 822 var move = function move(event) { 823 // ensure swiping with one touch and not pinching 824 if (event.originalEvent.touches && event.originalEvent.touches.length > 1) { 825 _this3.touchDeltaX = 0; 826 } else { 827 _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX; 828 } 829 }; 830 831 var end = function end(event) { 832 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { 833 _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; 834 } 835 836 _this3._handleSwipe(); 837 838 if (_this3._config.pause === 'hover') {
839 // If it's a touch-enabled device, mouseenter/leave are fired as 840 // part of the mouse compatibility events on first tap - the carousel 841 // would stop cycling until user tapped out of it; 842 // here, we listen for touchend, explicitly pause the carousel 843 // (as if it's the second time we tap on it, mouseenter compat event 844 // is NOT fired) and after a timeout (to allow for mouse compatibility 845 // events to fire) we explicitly restart cycling 846 _this3.pause(); 847 848 if (_this3.touchTimeout) { 849 clearTimeout(_this3.touchTimeout); 850 } 851 852 _this3.touchTimeout = setTimeout(function (event) { 853 return _this3.cycle(event); 854 }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); 855 } 856 }; 857 858 $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) { 859 return e.preventDefault(); 860 }); 861 862 if (this._pointerEvent) { 863 $(this._element).on(Event$2.POINTERDOWN, function (event) { 864 return start(event); 865 }); 866 $(this._element).on(Event$2.POINTERUP, function (event) { 867 return end(event); 868 }); 869 870 this._element.classList.add(ClassName$2.POINTER_EVENT); 871 } else { 872 $(this._element).on(Event$2.TOUCHSTART, function (event) { 873 return start(event); 874 }); 875 $(this._element).on(Event$2.TOUCHMOVE, function (event) { 876 return move(event); 877 }); 878 $(this._element).on(Event$2.TOUCHEND, function (event) { 879 return end(event); 880 }); 881 } 882 }; 883 884 _proto._keydown = function _keydown(event) { 885 if (/input|textarea/i.test(event.target.tagName)) { 886 return; 887 } 888 889 switch (event.which) { 890 case ARROW_LEFT_KEYCODE: 891 event.preventDefault(); 892 this.prev(); 893 break; 894 895 case ARROW_RIGHT_KEYCODE: 896 event.preventDefault(); 897 this.next(); 898 break; 899 900 default: 901 } 902 }; 903 904 _proto._getItemIndex = function _getItemIndex(element) { 905 this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : []; 906 return this._items.indexOf(element); 907 }; 908 909 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { 910 var isNextDirection = direction === Direction.NEXT; 911 var isPrevDirection = direction === Direction.PREV; 912 913 var activeIndex = this._getItemIndex(activeElement); 914 915 var lastItemIndex = this._items.length - 1; 916 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; 917 918 if (isGoingToWrap && !this._config.wrap) { 919 return activeElement; 920 } 921 922 var delta = direction === Direction.PREV ? -1 : 1; 923 var itemIndex = (activeIndex + delta) % this._items.length; 924 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; 925 }; 926 927 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { 928 var targetIndex = this._getItemIndex(relatedTarget); 929 930 var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM)); 931 932 var slideEvent = $.Event(Event$2.SLIDE, { 933 relatedTarget: relatedTarget, 934 direction: eventDirectionName, 935 from: fromIndex, 936 to: targetIndex 937 }); 938 $(this._element).trigger(slideEvent); 939 return slideEvent; 940 }; 941 942 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { 943 if (this._indicatorsElement) { 944 var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE)); 945 $(indicators).removeClass(ClassName$2.ACTIVE); 946 947 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; 948 949 if (nextIndicator) { 950 $(nextIndicator).addClass(ClassName$2.ACTIVE); 951 } 952 } 953 }; 954 955 _proto._slide = function _slide(direction, element) { 956 var _this4 = this; 957 958 var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM); 959 960 var activeElementIndex = this._getItemIndex(activeElement); 961 962 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); 963 964 var nextElementIndex = this._getItemIndex(nextElement); 965 966 var isCycling = Boolean(this._interval); 967 var directionalClassName; 968 var orderClassName; 969 var eventDirectionName; 970 971 if (direction === Direction.NEXT) { 972 directionalClassName = ClassName$2.LEFT; 973 orderClassName = ClassName$2.NEXT; 974 eventDirectionName = Direction.LEFT; 975 } else { 976 directionalClassName = ClassName$2.RIGHT; 977 orderClassName = ClassName$2.PREV; 978 eventDirectionName = Direction.RIGHT; 979 } 980 981 if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) { 982 this._isSliding = false; 983 return; 984 } 985 986 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); 987 988 if (slideEvent.isDefaultPrevented()) { 989 return; 990 } 991 992 if (!activeElement || !nextElement) { 993 // Some weirdness is happening, so we bail 994 return; 995 } 996 997 this._isSliding = true; 998 999 if (isCycling) { 1000 this.pause(); 1001 } 1002 1003 this._setActiveIndicatorElement(nextElement); 1004 1005 var slidEvent = $.Event(Event$2.SLID, { 1006 relatedTarget: nextElement, 1007 direction: eventDirectionName, 1008 from: activeElementIndex, 1009 to: nextElementIndex 1010 }); 1011 1012 if ($(this._element).hasClass(ClassName$2.SLIDE)) { 1013 $(nextElement).addClass(orderClassName); 1014 Util.reflow(nextElement); 1015 $(activeElement).addClass(directionalClassName); 1016 $(nextElement).addClass(directionalClassName); 1017 var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10); 1018 1019 if (nextElementInterval) { 1020 this._config.defaultInterval = this._config.defaultInterval || this._config.interval; 1021 this._config.interval = nextElementInterval; 1022 } else { 1023 this._config.interval = this._config.defaultInterval || this._config.interval; 1024 } 1025 1026 var transitionDuration = Util.getTransitionDurationFromElement(activeElement); 1027 $(activeElement).one(Util.TRANSITION_END, function () { 1028 $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE); 1029 $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName); 1030 _this4._isSliding = false; 1031 setTimeout(function () { 1032 return $(_this4._element).trigger(slidEvent); 1033 }, 0); 1034 }).emulateTransitionEnd(transitionDuration); 1035 } else { 1036 $(activeElement).removeClass(ClassName$2.ACTIVE); 1037 $(nextElement).addClass(ClassName$2.ACTIVE); 1038 this._isSliding = false; 1039 $(this._element).trigger(slidEvent); 1040 } 1041 1042 if (isCycling) { 1043 this.cycle(); 1044 } 1045 } // Static 1046 ; 1047 1048 Carousel._jQueryInterface = function _jQueryInterface(config) { 1049 return this.each(function () { 1050 var data = $(this).data(DATA_KEY$2); 1051 1052 var _config = _objectSpread({}, Default, $(this).data()); 1053 1054 if (typeof config === 'object') { 1055 _config = _objectSpread({}, _config, config); 1056 } 1057 1058 var action = typeof config === 'string' ? config : _config.slide; 1059 1060 if (!data) { 1061 data = new Carousel(this, _config); 1062 $(this).data(DATA_KEY$2, data); 1063 } 1064 1065 if (typeof config === 'number') { 1066 data.to(config); 1067 } else if (typeof action === 'string') { 1068 if (typeof data[action] === 'undefined') {
1069 throw new TypeError("No method named \"" + action + "\""); 1070 } 1071 1072 data[action](); 1073 } else if (_config.interval && _config.ride) { 1074 data.pause(); 1075 data.cycle(); 1076 } 1077 }); 1078 }; 1079 1080 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { 1081 var selector = Util.getSelectorFromElement(this); 1082 1083 if (!selector) { 1084 return; 1085 } 1086 1087 var target = $(selector)[0]; 1088 1089 if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) { 1090 return; 1091 } 1092 1093 var config = _objectSpread({}, $(target).data(), $(this).data()); 1094 1095 var slideIndex = this.getAttribute('data-slide-to'); 1096 1097 if (slideIndex) { 1098 config.interval = false; 1099 } 1100 1101 Carousel._jQueryInterface.call($(target), config); 1102 1103 if (slideIndex) { 1104 $(target).data(DATA_KEY$2).to(slideIndex); 1105 } 1106 1107 event.preventDefault(); 1108 }; 1109 1110 _createClass(Carousel, null, [{ 1111 key: "VERSION", 1112 get: function get() { 1113 return VERSION$2; 1114 } 1115 }, { 1116 key: "Default", 1117 get: function get() { 1118 return Default; 1119 } 1120 }]); 1121 1122 return Carousel; 1123 }(); 1124 /** 1125 * ------------------------------------------------------------------------ 1126 * Data Api implementation 1127 * ------------------------------------------------------------------------ 1128 */ 1129 1130 1131 $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler); 1132 $(window).on(Event$2.LOAD_DATA_API, function () { 1133 var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE)); 1134 1135 for (var i = 0, len = carousels.length; i < len; i++) { 1136 var $carousel = $(carousels[i]); 1137 1138 Carousel._jQueryInterface.call($carousel, $carousel.data()); 1139 } 1140 }); 1141 /** 1142 * ------------------------------------------------------------------------ 1143 * jQuery 1144 * ------------------------------------------------------------------------ 1145 */ 1146 1147 $.fn[NAME$2] = Carousel._jQueryInterface; 1148 $.fn[NAME$2].Constructor = Carousel; 1149 1150 $.fn[NAME$2].noConflict = function () { 1151 $.fn[NAME$2] = JQUERY_NO_CONFLICT$2; 1152 return Carousel._jQueryInterface; 1153 }; 1154 1155 /** 1156 * ------------------------------------------------------------------------ 1157 * Constants 1158 * ------------------------------------------------------------------------ 1159 */ 1160 1161 var NAME$3 = 'collapse'; 1162 var VERSION$3 = '4.3.1'; 1163 var DATA_KEY$3 = 'bs.collapse'; 1164 var EVENT_KEY$3 = "." + DATA_KEY$3; 1165 var DATA_API_KEY$3 = '.data-api'; 1166 var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3]; 1167 var Default$1 = { 1168 toggle: true, 1169 parent: '' 1170 }; 1171 var DefaultType$1 = { 1172 toggle: 'boolean', 1173 parent: '(string|element)' 1174 }; 1175 var Event$3 = { 1176 SHOW: "show" + EVENT_KEY$3, 1177 SHOWN: "shown" + EVENT_KEY$3, 1178 HIDE: "hide" + EVENT_KEY$3, 1179 HIDDEN: "hidden" + EVENT_KEY$3, 1180 CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3 1181 }; 1182 var ClassName$3 = { 1183 SHOW: 'show', 1184 COLLAPSE: 'collapse', 1185 COLLAPSING: 'collapsing', 1186 COLLAPSED: 'collapsed' 1187 }; 1188 var Dimension = { 1189 WIDTH: 'width', 1190 HEIGHT: 'height' 1191 }; 1192 var Selector$3 = { 1193 ACTIVES: '.show, .collapsing', 1194 DATA_TOGGLE: '[data-toggle="collapse"]' 1195 /** 1196 * ------------------------------------------------------------------------ 1197 * Class Definition 1198 * ------------------------------------------------------------------------ 1199 */ 1200 1201 }; 1202 1203 var Collapse = 1204 /*#__PURE__*/ 1205 function () { 1206 function Collapse(element, config) { 1207 this._isTransitioning = false; 1208 this._element = element; 1209 this._config = this._getConfig(config); 1210 this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); 1211 var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE)); 1212 1213 for (var i = 0, len = toggleList.length; i < len; i++) { 1214 var elem = toggleList[i]; 1215 var selector = Util.getSelectorFromElement(elem); 1216 var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { 1217 return foundElem === element; 1218 }); 1219 1220 if (selector !== null && filterElement.length > 0) { 1221 this._selector = selector; 1222 1223 this._triggerArray.push(elem); 1224 } 1225 } 1226 1227 this._parent = this._config.parent ? this._getParent() : null; 1228 1229 if (!this._config.parent) { 1230 this._addAriaAndCollapsedClass(this._element, this._triggerArray); 1231 } 1232 1233 if (this._config.toggle) { 1234 this.toggle(); 1235 } 1236 } // Getters 1237 1238 1239 var _proto = Collapse.prototype; 1240 1241 // Public
1242 _proto.toggle = function toggle() { 1243 if ($(this._element).hasClass(ClassName$3.SHOW)) { 1244 this.hide(); 1245 } else { 1246 this.show(); 1247 } 1248 }; 1249 1250 _proto.show = function show() { 1251 var _this = this; 1252 1253 if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) { 1254 return; 1255 } 1256 1257 var actives; 1258 var activesData; 1259 1260 if (this._parent) { 1261 actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) { 1262 if (typeof _this._config.parent === 'string') { 1263 return elem.getAttribute('data-parent') === _this._config.parent; 1264 } 1265 1266 return elem.classList.contains(ClassName$3.COLLAPSE); 1267 }); 1268 1269 if (actives.length === 0) { 1270 actives = null; 1271 } 1272 } 1273 1274 if (actives) { 1275 activesData = $(actives).not(this._selector).data(DATA_KEY$3); 1276 1277 if (activesData && activesData._isTransitioning) { 1278 return; 1279 } 1280 } 1281 1282 var startEvent = $.Event(Event$3.SHOW); 1283 $(this._element).trigger(startEvent); 1284 1285 if (startEvent.isDefaultPrevented()) { 1286 return; 1287 } 1288 1289 if (actives) { 1290 Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide'); 1291 1292 if (!activesData) { 1293 $(actives).data(DATA_KEY$3, null); 1294 } 1295 } 1296 1297 var dimension = this._getDimension(); 1298 1299 $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING); 1300 this._element.style[dimension] = 0; 1301 1302 if (this._triggerArray.length) { 1303 $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true); 1304 } 1305 1306 this.setTransitioning(true); 1307 1308 var complete = function complete() { 1309 $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW); 1310 _this._element.style[dimension] = ''; 1311 1312 _this.setTransitioning(false); 1313 1314 $(_this._element).trigger(Event$3.SHOWN); 1315 }; 1316 1317 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 1318 var scrollSize = "scroll" + capitalizedDimension; 1319 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 1320 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 1321 this._element.style[dimension] = this._element[scrollSize] + "px"; 1322 }; 1323 1324 _proto.hide = function hide() { 1325 var _this2 = this; 1326 1327 if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) { 1328 return; 1329 } 1330 1331 var startEvent = $.Event(Event$3.HIDE); 1332 $(this._element).trigger(startEvent); 1333 1334 if (startEvent.isDefaultPrevented()) { 1335 return; 1336 } 1337 1338 var dimension = this._getDimension(); 1339 1340 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; 1341 Util.reflow(this._element); 1342 $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW); 1343 var triggerArrayLength = this._triggerArray.length; 1344 1345 if (triggerArrayLength > 0) { 1346 for (var i = 0; i < triggerArrayLength; i++) { 1347 var trigger = this._triggerArray[i]; 1348 var selector = Util.getSelectorFromElement(trigger); 1349 1350 if (selector !== null) { 1351 var $elem = $([].slice.call(document.querySelectorAll(selector))); 1352 1353 if (!$elem.hasClass(ClassName$3.SHOW)) { 1354 $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false); 1355 } 1356 } 1357 } 1358 } 1359 1360 this.setTransitioning(true); 1361 1362 var complete = function complete() { 1363 _this2.setTransitioning(false); 1364 1365 $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN); 1366 }; 1367 1368 this._element.style[dimension] = ''; 1369 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 1370 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 1371 }; 1372 1373 _proto.setTransitioning = function setTransitioning(isTransitioning) { 1374 this._isTransitioning = isTransitioning; 1375 }; 1376 1377 _proto.dispose = function dispose() { 1378 $.removeData(this._element, DATA_KEY$3); 1379 this._config = null; 1380 this._parent = null; 1381 this._element = null; 1382 this._triggerArray = null; 1383 this._isTransitioning = null; 1384 } // Private 1385 ; 1386 1387 _proto._getConfig = function _getConfig(config) { 1388 config = _objectSpread({}, Default$1, config); 1389 config.toggle = Boolean(config.toggle); // Coerce string values 1390 1391 Util.typeCheckConfig(NAME$3, config, DefaultType$1); 1392 return config; 1393 }; 1394 1395 _proto._getDimension = function _getDimension() { 1396 var hasWidth = $(this._element).hasClass(Dimension.WIDTH); 1397 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; 1398 }; 1399 1400 _proto._getParent = function _getParent() { 1401 var _this3 = this; 1402 1403 var parent; 1404 1405 if (Util.isElement(this._config.parent)) { 1406 parent = this._config.parent; // It's a jQuery object 1407 1408 if (typeof this._config.parent.jquery !== 'undefined') { 1409 parent = this._config.parent[0]; 1410 } 1411 } else { 1412 parent = document.querySelector(this._config.parent); 1413 } 1414 1415 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; 1416 var children = [].slice.call(parent.querySelectorAll(selector)); 1417 $(children).each(function (i, element) { 1418 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
vendor: 6,017 bytes, lines 1419-1614
1419 }); 1420 return parent; 1421 }; 1422 1423 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { 1424 var isOpen = $(element).hasClass(ClassName$3.SHOW); 1425 1426 if (triggerArray.length) { 1427 $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); 1428 } 1429 } // Static 1430 ; 1431 1432 Collapse._getTargetFromElement = function _getTargetFromElement(element) { 1433 var selector = Util.getSelectorFromElement(element); 1434 return selector ? document.querySelector(selector) : null; 1435 }; 1436 1437 Collapse._jQueryInterface = function _jQueryInterface(config) { 1438 return this.each(function () { 1439 var $this = $(this); 1440 var data = $this.data(DATA_KEY$3); 1441 1442 var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {}); 1443 1444 if (!data && _config.toggle && /show|hide/.test(config)) { 1445 _config.toggle = false; 1446 } 1447 1448 if (!data) { 1449 data = new Collapse(this, _config); 1450 $this.data(DATA_KEY$3, data); 1451 } 1452 1453 if (typeof config === 'string') { 1454 if (typeof data[config] === 'undefined') { 1455 throw new TypeError("No method named \"" + config + "\""); 1456 } 1457 1458 data[config](); 1459 } 1460 }); 1461 }; 1462 1463 _createClass(Collapse, null, [{ 1464 key: "VERSION", 1465 get: function get() { 1466 return VERSION$3; 1467 } 1468 }, { 1469 key: "Default", 1470 get: function get() { 1471 return Default$1; 1472 } 1473 }]); 1474 1475 return Collapse; 1476 }(); 1477 /** 1478 * ------------------------------------------------------------------------ 1479 * Data Api implementation 1480 * ------------------------------------------------------------------------ 1481 */ 1482 1483 1484 $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) { 1485 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 1486 if (event.currentTarget.tagName === 'A') { 1487 event.preventDefault(); 1488 } 1489 1490 var $trigger = $(this); 1491 var selector = Util.getSelectorFromElement(this); 1492 var selectors = [].slice.call(document.querySelectorAll(selector)); 1493 $(selectors).each(function () { 1494 var $target = $(this); 1495 var data = $target.data(DATA_KEY$3); 1496 var config = data ? 'toggle' : $trigger.data(); 1497 1498 Collapse._jQueryInterface.call($target, config); 1499 }); 1500 }); 1501 /** 1502 * ------------------------------------------------------------------------ 1503 * jQuery 1504 * ------------------------------------------------------------------------ 1505 */ 1506 1507 $.fn[NAME$3] = Collapse._jQueryInterface; 1508 $.fn[NAME$3].Constructor = Collapse; 1509 1510 $.fn[NAME$3].noConflict = function () { 1511 $.fn[NAME$3] = JQUERY_NO_CONFLICT$3; 1512 return Collapse._jQueryInterface; 1513 }; 1514 1515 /** 1516 * ------------------------------------------------------------------------ 1517 * Constants 1518 * ------------------------------------------------------------------------ 1519 */ 1520 1521 var NAME$4 = 'dropdown'; 1522 var VERSION$4 = '4.3.1'; 1523 var DATA_KEY$4 = 'bs.dropdown'; 1524 var EVENT_KEY$4 = "." + DATA_KEY$4; 1525 var DATA_API_KEY$4 = '.data-api'; 1526 var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4]; 1527 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 1528 1529 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key 1530 1531 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key 1532 1533 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key 1534 1535 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key 1536 1537 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) 1538 1539 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); 1540 var Event$4 = { 1541 HIDE: "hide" + EVENT_KEY$4, 1542 HIDDEN: "hidden" + EVENT_KEY$4, 1543 SHOW: "show" + EVENT_KEY$4, 1544 SHOWN: "shown" + EVENT_KEY$4, 1545 CLICK: "click" + EVENT_KEY$4, 1546 CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4, 1547 KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4, 1548 KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4 1549 }; 1550 var ClassName$4 = { 1551 DISABLED: 'disabled', 1552 SHOW: 'show', 1553 DROPUP: 'dropup', 1554 DROPRIGHT: 'dropright', 1555 DROPLEFT: 'dropleft', 1556 MENURIGHT: 'dropdown-menu-right', 1557 MENULEFT: 'dropdown-menu-left', 1558 POSITION_STATIC: 'position-static' 1559 }; 1560 var Selector$4 = { 1561 DATA_TOGGLE: '[data-toggle="dropdown"]', 1562 FORM_CHILD: '.dropdown form', 1563 MENU: '.dropdown-menu', 1564 NAVBAR_NAV: '.navbar-nav', 1565 VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' 1566 }; 1567 var AttachmentMap = { 1568 TOP: 'top-start', 1569 TOPEND: 'top-end', 1570 BOTTOM: 'bottom-start', 1571 BOTTOMEND: 'bottom-end', 1572 RIGHT: 'right-start', 1573 RIGHTEND: 'right-end', 1574 LEFT: 'left-start', 1575 LEFTEND: 'left-end' 1576 }; 1577 var Default$2 = { 1578 offset: 0, 1579 flip: true, 1580 boundary: 'scrollParent', 1581 reference: 'toggle', 1582 display: 'dynamic' 1583 }; 1584 var DefaultType$2 = { 1585 offset: '(number|string|function)', 1586 flip: 'boolean', 1587 boundary: '(string|element)', 1588 reference: '(string|element)', 1589 display: 'string' 1590 /** 1591 * ------------------------------------------------------------------------ 1592 * Class Definition 1593 * ------------------------------------------------------------------------ 1594 */ 1595 1596 }; 1597 1598 var Dropdown = 1599 /*#__PURE__*/ 1600 function () { 1601 function Dropdown(element, config) { 1602 this._element = element; 1603 this._popper = null; 1604 this._config = this._getConfig(config); 1605 this._menu = this._getMenuElement(); 1606 this._inNavbar = this._detectNavbar(); 1607 1608 this._addEventListeners(); 1609 } // Getters 1610 1611 1612 var _proto = Dropdown.prototype; 1613 1614 // Public
1615 _proto.toggle = function toggle() { 1616 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) { 1617 return; 1618 } 1619 1620 var parent = Dropdown._getParentFromElement(this._element); 1621 1622 var isActive = $(this._menu).hasClass(ClassName$4.SHOW); 1623 1624 Dropdown._clearMenus(); 1625 1626 if (isActive) { 1627 return; 1628 } 1629 1630 var relatedTarget = { 1631 relatedTarget: this._element 1632 }; 1633 var showEvent = $.Event(Event$4.SHOW, relatedTarget); 1634 $(parent).trigger(showEvent); 1635 1636 if (showEvent.isDefaultPrevented()) { 1637 return; 1638 } // Disable totally Popper.js for Dropdown in Navbar 1639 1640 1641 if (!this._inNavbar) { 1642 /** 1643 * Check for Popper dependency 1644 * Popper - https://popper.js.org 1645 */ 1646 if (typeof Popper === 'undefined') { 1647 throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)'); 1648 } 1649 1650 var referenceElement = this._element; 1651 1652 if (this._config.reference === 'parent') { 1653 referenceElement = parent; 1654 } else if (Util.isElement(this._config.reference)) { 1655 referenceElement = this._config.reference; // Check if it's jQuery element 1656 1657 if (typeof this._config.reference.jquery !== 'undefined') { 1658 referenceElement = this._config.reference[0]; 1659 } 1660 } // If boundary is not `scrollParent`, then set position to `static` 1661 // to allow the menu to "escape" the scroll parent's boundaries 1662 // https://github.com/twbs/bootstrap/issues/24251 1663 1664 1665 if (this._config.boundary !== 'scrollParent') { 1666 $(parent).addClass(ClassName$4.POSITION_STATIC); 1667 } 1668 1669 this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); 1670 } // If this is a touch-enabled device we add extra 1671 // empty mouseover listeners to the body's immediate children; 1672 // only needed because of broken event delegation on iOS 1673 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 1674 1675 1676 if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) { 1677 $(document.body).children().on('mouseover', null, $.noop); 1678 } 1679 1680 this._element.focus(); 1681 1682 this._element.setAttribute('aria-expanded', true); 1683 1684 $(this._menu).toggleClass(ClassName$4.SHOW); 1685 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); 1686 }; 1687 1688 _proto.show = function show() { 1689 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) { 1690 return; 1691 } 1692 1693 var relatedTarget = { 1694 relatedTarget: this._element 1695 }; 1696 var showEvent = $.Event(Event$4.SHOW, relatedTarget); 1697 1698 var parent = Dropdown._getParentFromElement(this._element); 1699 1700 $(parent).trigger(showEvent); 1701 1702 if (showEvent.isDefaultPrevented()) { 1703 return; 1704 } 1705 1706 $(this._menu).toggleClass(ClassName$4.SHOW); 1707 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget)); 1708 }; 1709 1710 _proto.hide = function hide() { 1711 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) { 1712 return; 1713 } 1714 1715 var relatedTarget = { 1716 relatedTarget: this._element 1717 }; 1718 var hideEvent = $.Event(Event$4.HIDE, relatedTarget); 1719 1720 var parent = Dropdown._getParentFromElement(this._element); 1721 1722 $(parent).trigger(hideEvent); 1723 1724 if (hideEvent.isDefaultPrevented()) { 1725 return; 1726 } 1727 1728 $(this._menu).toggleClass(ClassName$4.SHOW); 1729 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); 1730 }; 1731 1732 _proto.dispose = function dispose() { 1733 $.removeData(this._element, DATA_KEY$4); 1734 $(this._element).off(EVENT_KEY$4); 1735 this._element = null; 1736 this._menu = null; 1737 1738 if (this._popper !== null) { 1739 this._popper.destroy(); 1740 1741 this._popper = null; 1742 } 1743 }; 1744
1745 _proto.update = function update() { 1746 this._inNavbar = this._detectNavbar(); 1747 1748 if (this._popper !== null) { 1749 this._popper.scheduleUpdate(); 1750 } 1751 } // Private 1752 ; 1753 1754 _proto._addEventListeners = function _addEventListeners() { 1755 var _this = this; 1756 1757 $(this._element).on(Event$4.CLICK, function (event) { 1758 event.preventDefault(); 1759 event.stopPropagation(); 1760 1761 _this.toggle(); 1762 }); 1763 }; 1764 1765 _proto._getConfig = function _getConfig(config) { 1766 config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config); 1767 Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); 1768 return config; 1769 }; 1770 1771 _proto._getMenuElement = function _getMenuElement() { 1772 if (!this._menu) { 1773 var parent = Dropdown._getParentFromElement(this._element); 1774 1775 if (parent) { 1776 this._menu = parent.querySelector(Selector$4.MENU); 1777 } 1778 } 1779 1780 return this._menu; 1781 }; 1782 1783 _proto._getPlacement = function _getPlacement() { 1784 var $parentDropdown = $(this._element.parentNode); 1785 var placement = AttachmentMap.BOTTOM; // Handle dropup 1786 1787 if ($parentDropdown.hasClass(ClassName$4.DROPUP)) { 1788 placement = AttachmentMap.TOP; 1789 1790 if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { 1791 placement = AttachmentMap.TOPEND; 1792 } 1793 } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) { 1794 placement = AttachmentMap.RIGHT; 1795 } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) { 1796 placement = AttachmentMap.LEFT; 1797 } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) { 1798 placement = AttachmentMap.BOTTOMEND; 1799 } 1800 1801 return placement; 1802 }; 1803 1804 _proto._detectNavbar = function _detectNavbar() { 1805 return $(this._element).closest('.navbar').length > 0; 1806 }; 1807 1808 _proto._getOffset = function _getOffset() { 1809 var _this2 = this; 1810 1811 var offset = {}; 1812 1813 if (typeof this._config.offset === 'function') { 1814 offset.fn = function (data) { 1815 data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); 1816 return data; 1817 }; 1818 } else { 1819 offset.offset = this._config.offset; 1820 } 1821 1822 return offset; 1823 }; 1824 1825 _proto._getPopperConfig = function _getPopperConfig() { 1826 var popperConfig = { 1827 placement: this._getPlacement(), 1828 modifiers: { 1829 offset: this._getOffset(), 1830 flip: { 1831 enabled: this._config.flip 1832 }, 1833 preventOverflow: { 1834 boundariesElement: this._config.boundary 1835 } 1836 } // Disable Popper.js if we have a static display 1837 1838 }; 1839 1840 if (this._config.display === 'static') { 1841 popperConfig.modifiers.applyStyle = { 1842 enabled: false 1843 }; 1844 } 1845 1846 return popperConfig; 1847 } // Static 1848 ; 1849 1850 Dropdown._jQueryInterface = function _jQueryInterface(config) { 1851 return this.each(function () { 1852 var data = $(this).data(DATA_KEY$4); 1853 1854 var _config = typeof config === 'object' ? config : null; 1855 1856 if (!data) { 1857 data = new Dropdown(this, _config); 1858 $(this).data(DATA_KEY$4, data); 1859 } 1860 1861 if (typeof config === 'string') { 1862 if (typeof data[config] === 'undefined') { 1863 throw new TypeError("No method named \"" + config + "\""); 1864 } 1865 1866 data[config](); 1867 } 1868 }); 1869 }; 1870 1871 Dropdown._clearMenus = function _clearMenus(event) { 1872 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { 1873 return; 1874 } 1875 1876 var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE)); 1877 1878 for (var i = 0, len = toggles.length; i < len; i++) { 1879 var parent = Dropdown._getParentFromElement(toggles[i]); 1880 1881 var context = $(toggles[i]).data(DATA_KEY$4); 1882 var relatedTarget = { 1883 relatedTarget: toggles[i] 1884 }; 1885 1886 if (event && event.type === 'click') { 1887 relatedTarget.clickEvent = event; 1888 } 1889 1890 if (!context) { 1891 continue; 1892 } 1893 1894 var dropdownMenu = context._menu; 1895 1896 if (!$(parent).hasClass(ClassName$4.SHOW)) { 1897 continue; 1898 } 1899 1900 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { 1901 continue; 1902 } 1903 1904 var hideEvent = $.Event(Event$4.HIDE, relatedTarget); 1905 $(parent).trigger(hideEvent); 1906 1907 if (hideEvent.isDefaultPrevented()) { 1908 continue; 1909 } // If this is a touch-enabled device we remove the extra 1910 // empty mouseover listeners we added for iOS support 1911 1912 1913 if ('ontouchstart' in document.documentElement) { 1914 $(document.body).children().off('mouseover', null, $.noop); 1915 } 1916 1917 toggles[i].setAttribute('aria-expanded', 'false'); 1918 $(dropdownMenu).removeClass(ClassName$4.SHOW); 1919 $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget)); 1920 } 1921 }; 1922 1923 Dropdown._getParentFromElement = function _getParentFromElement(element) { 1924 var parent; 1925 var selector = Util.getSelectorFromElement(element); 1926 1927 if (selector) { 1928 parent = document.querySelector(selector); 1929 } 1930 1931 return parent || element.parentNode; 1932 } // eslint-disable-next-line complexity 1933 ; 1934 1935 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { 1936 // If not input/textarea: 1937 // - And not a key in REGEXP_KEYDOWN => not a dropdown command 1938 // If input/textarea: 1939 // - If space key => not a dropdown command 1940 // - If key is other than escape 1941 // - If key is not up or down => not a dropdown command 1942 // - If trigger inside the menu =>
1942 not a dropdown command 1943 if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { 1944 return; 1945 } 1946 1947 event.preventDefault(); 1948 event.stopPropagation(); 1949 1950 if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) { 1951 return; 1952 } 1953 1954 var parent = Dropdown._getParentFromElement(this); 1955 1956 var isActive = $(parent).hasClass(ClassName$4.SHOW); 1957 1958 if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { 1959 if (event.which === ESCAPE_KEYCODE) { 1960 var toggle = parent.querySelector(Selector$4.DATA_TOGGLE); 1961 $(toggle).trigger('focus'); 1962 } 1963 1964 $(this).trigger('click'); 1965 return; 1966 } 1967 1968 var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)); 1969 1970 if (items.length === 0) { 1971 return; 1972 } 1973 1974 var index = items.indexOf(event.target); 1975 1976 if (event.which === ARROW_UP_KEYCODE && index > 0) { 1977 // Up 1978 index--; 1979 } 1980 1981 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { 1982 // Down 1983 index++; 1984 } 1985 1986 if (index < 0) { 1987 index = 0; 1988 } 1989 1990 items[index].focus(); 1991 }; 1992 1993 _createClass(Dropdown, null, [{ 1994 key: "VERSION", 1995 get: function get() { 1996 return VERSION$4; 1997 } 1998 }, { 1999 key: "Default", 2000 get: function get() { 2001 return Default$2; 2002 } 2003 }, { 2004 key: "DefaultType", 2005 get: function get() { 2006 return DefaultType$2; 2007 } 2008 }]); 2009 2010 return Dropdown; 2011 }(); 2012 /** 2013 * ------------------------------------------------------------------------ 2014 * Data Api implementation 2015 * ------------------------------------------------------------------------ 2016 */ 2017 2018 2019 $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) { 2020 event.preventDefault(); 2021 event.stopPropagation(); 2022 2023 Dropdown._jQueryInterface.call($(this), 'toggle'); 2024 }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) { 2025 e.stopPropagation(); 2026 }); 2027 /** 2028 * ------------------------------------------------------------------------ 2029 * jQuery 2030 * ------------------------------------------------------------------------ 2031 */ 2032 2033 $.fn[NAME$4] = Dropdown._jQueryInterface; 2034 $.fn[NAME$4].Constructor = Dropdown; 2035 2036 $.fn[NAME$4].noConflict = function () { 2037 $.fn[NAME$4] = JQUERY_NO_CONFLICT$4; 2038 return Dropdown._jQueryInterface; 2039 }; 2040 2041 /** 2042 * ------------------------------------------------------------------------ 2043 * Constants 2044 * ------------------------------------------------------------------------ 2045 */ 2046 2047 var NAME$5 = 'modal'; 2048 var VERSION$5 = '4.3.1'; 2049 var DATA_KEY$5 = 'bs.modal'; 2050 var EVENT_KEY$5 = "." + DATA_KEY$5; 2051 var DATA_API_KEY$5 = '.data-api'; 2052 var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5]; 2053 var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key 2054 2055 var Default$3 = { 2056 backdrop: true, 2057 keyboard: true, 2058 focus: true, 2059 show: true 2060 }; 2061 var DefaultType$3 = { 2062 backdrop: '(boolean|string)', 2063 keyboard: 'boolean', 2064 focus: 'boolean', 2065 show: 'boolean' 2066 }; 2067 var Event$5 = { 2068 HIDE: "hide" + EVENT_KEY$5, 2069 HIDDEN: "hidden" + EVENT_KEY$5, 2070 SHOW: "show" + EVENT_KEY$5, 2071 SHOWN: "shown" + EVENT_KEY$5, 2072 FOCUSIN: "focusin" + EVENT_KEY$5, 2073 RESIZE: "resize" + EVENT_KEY$5, 2074 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5, 2075 KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5, 2076 MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5, 2077 MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5, 2078 CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 2079 }; 2080 var ClassName$5 = {
2081 SCROLLABLE: 'modal-dialog-scrollable', 2082 SCROLLBAR_MEASURER: 'modal-scrollbar-measure', 2083 BACKDROP: 'modal-backdrop', 2084 OPEN: 'modal-open', 2085 FADE: 'fade', 2086 SHOW: 'show' 2087 }; 2088 var Selector$5 = { 2089 DIALOG: '.modal-dialog', 2090 MODAL_BODY: '.modal-body', 2091 DATA_TOGGLE: '[data-toggle="modal"]', 2092 DATA_DISMISS: '[data-dismiss="modal"]', 2093 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', 2094 STICKY_CONTENT: '.sticky-top' 2095 /** 2096 * ------------------------------------------------------------------------ 2097 * Class Definition 2098 * ------------------------------------------------------------------------ 2099 */ 2100 2101 }; 2102 2103 var Modal = 2104 /*#__PURE__*/ 2105 function () { 2106 function Modal(element, config) { 2107 this._config = this._getConfig(config); 2108 this._element = element; 2109 this._dialog = element.querySelector(Selector$5.DIALOG); 2110 this._backdrop = null; 2111 this._isShown = false; 2112 this._isBodyOverflowing = false; 2113 this._ignoreBackdropClick = false; 2114 this._isTransitioning = false; 2115 this._scrollbarWidth = 0; 2116 } // Getters 2117 2118 2119 var _proto = Modal.prototype; 2120 2121 // Public 2122 _proto.toggle = function toggle(relatedTarget) { 2123 return this._isShown ? this.hide() : this.show(relatedTarget); 2124 }; 2125 2126 _proto.show = function show(relatedTarget) { 2127 var _this = this; 2128 2129 if (this._isShown || this._isTransitioning) { 2130 return; 2131 } 2132 2133 if ($(this._element).hasClass(ClassName$5.FADE)) { 2134 this._isTransitioning = true; 2135 } 2136 2137 var showEvent = $.Event(Event$5.SHOW, { 2138 relatedTarget: relatedTarget 2139 }); 2140 $(this._element).trigger(showEvent); 2141 2142 if (this._isShown || showEvent.isDefaultPrevented()) { 2143 return; 2144 } 2145 2146 this._isShown = true; 2147 2148 this._checkScrollbar(); 2149 2150 this._setScrollbar(); 2151 2152 this._adjustDialog(); 2153 2154 this._setEscapeEvent(); 2155 2156 this._setResizeEvent(); 2157 2158 $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) { 2159 return _this.hide(event); 2160 }); 2161 $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () { 2162 $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) { 2163 if ($(event.target).is(_this._element)) { 2164 _this._ignoreBackdropClick = true; 2165 } 2166 }); 2167 }); 2168 2169 this._showBackdrop(function () { 2170 return _this._showElement(relatedTarget); 2171 }); 2172 }; 2173 2174 _proto.hide = function hide(event) { 2175 var _this2 = this; 2176 2177 if (event) { 2178 event.preventDefault(); 2179 } 2180 2181 if (!this._isShown || this._isTransitioning) { 2182 return; 2183 } 2184 2185 var hideEvent = $.Event(Event$5.HIDE); 2186 $(this._element).trigger(hideEvent); 2187 2188 if (!this._isShown || hideEvent.isDefaultPrevented()) { 2189 return; 2190 } 2191 2192 this._isShown = false; 2193 var transition = $(this._element).hasClass(ClassName$5.FADE); 2194 2195 if (transition) { 2196 this._isTransitioning = true; 2197 } 2198 2199 this._setEscapeEvent(); 2200 2201 this._setResizeEvent(); 2202 2203 $(document).off(Event$5.FOCUSIN); 2204 $(this._element).removeClass(ClassName$5.SHOW); 2205 $(this._element).off(Event$5.CLICK_DISMISS); 2206 $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS); 2207 2208 if (transition) { 2209 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 2210 $(this._element).one(Util.TRANSITION_END, function (event) { 2211 return _this2._hideModal(event); 2212 }).emulateTransitionEnd(transitionDuration); 2213 } else { 2214 this._hideModal(); 2215 } 2216 }; 2217 2218 _proto.dispose = function dispose() { 2219 [window, this._element, this._dialog].forEach(function (htmlElement) { 2220 return $(htmlElement).off(EVENT_KEY$5); 2221 }); 2222 /** 2223 * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` 2224 * Do not move `document` in `htmlElements` array 2225 * It will remove `Event.CLICK_DATA_API` event that should remain 2226 */ 2227 2228 $(document).off(Event$5.FOCUSIN); 2229 $.removeData(this._element, DATA_KEY$5); 2230 this._config = null; 2231 this._element = null; 2232 this._dialog = null; 2233 this._backdrop = null; 2234 this._isShown = null; 2235 this._isBodyOverflowing = null; 2236 this._ignoreBackdropClick = null; 2237 this._isTransitioning = null; 2238 this._scrollbarWidth = null; 2239 }; 2240 2241 _proto.handleUpdate = function handleUpdate() { 2242 this._adjustDialog(); 2243 } // Private 2244 ; 2245 2246 _proto._getConfig = function _getConfig(config) { 2247 config = _objectSpread({}, Default$3, config); 2248 Util.typeCheckConfig(NAME$5, config, DefaultType$3); 2249 return config; 2250 }; 2251 2252 _proto._showElement = function _showElement(relatedTarget) { 2253 var _this3 = this; 2254 2255 var transition = $(this._element).hasClass(ClassName$5.FADE); 2256 2257 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 2258 // Don't move modal's DOM position 2259 document.body.appendChild(this._element); 2260 } 2261 2262 this._element.style.display = 'block'; 2263 2264 this._element.removeAttribute('aria-hidden'); 2265 2266 this._element.setAttribute('aria-modal', true); 2267 2268 if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { 2269 this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; 2270 } else { 2271 this._element.scrollTop = 0; 2272 } 2273 2274 if (transition) { 2275 Util.reflow(this._element); 2276 } 2277 2278 $(this._element).addClass(ClassName$5.SHOW); 2279 2280 if (this._config.focus) { 2281 this._enforceFocus(); 2282 } 2283 2284 var shownEvent = $.Event(Event$5.SHOWN, { 2285 relatedTarget: relatedTarget 2286 }); 2287 2288 var transitionComplete = function transitionComplete() { 2289 if (_this3._config.focus) { 2290 _this3._element.focus(); 2291 } 2292 2293 _this3._isTransitioning = false; 2294 $(_this3._element).trigger(shownEvent); 2295 }; 2296 2297 if (transition) { 2298 var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); 2299 $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); 2300 } else { 2301 transitionComplete(); 2302 } 2303 }; 2304 2305 _proto._enforceFocus = function _enforceFocus() { 2306 var _this4 = this; 2307 2308 $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop 2309 .on(Event$5.FOCUSIN, function (event) { 2310 if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) { 2311 _this4._element.focus(); 2312 } 2313 }); 2314 }; 2315 2316 _proto._setEscapeEvent = function _setEscapeEvent() { 2317 var _this5 = this; 2318 2319 if (this._isShown && this._config.keyboard) { 2320 $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) { 2321 if (event.which === ESCAPE_KEYCODE$1) { 2322 event.preventDefault(); 2323 2324 _this5.hide(); 2325 } 2326 }); 2327 } else if (!this._isShown) { 2328 $(this._element).off(Event$5.KEYDOWN_DISMISS); 2329 } 2330 }; 2331 2332 _proto._setResizeEvent = function _setResizeEvent() { 2333 var _this6 = this; 2334 2335 if (this._isShown) { 2336 $(window).on(Event$5.RESIZE, function (event) { 2337 return _this6.handleUpdate(event); 2338 }); 2339 } else { 2340 $(window).off(Event$5.RESIZE); 2341 } 2342 }; 2343 2344 _proto._hideModal = function _hideModal() { 2345 var _this7 = this; 2346 2347 this._element.style.display = 'none'; 2348 2349 this._element.setAttribute('aria-hidden', true); 2350 2351 this._element.removeAttribute('aria-modal'); 2352 2353 this._isTransitioning = false; 2354 2355 this._showBackdrop(function () { 2356 $(document.body).removeClass(ClassName$5.OPEN); 2357 2358 _this7._resetAdjustments(); 2359 2360 _this7._resetScrollbar(); 2361 2362 $(_this7._element).trigger(Event$5.HIDDEN); 2363 }); 2364 }; 2365 2366 _proto._removeBackdrop = function _removeBackdrop() { 2367 if (this._backdrop) { 2368 $(this._backdrop).remove(); 2369 this._backdrop = null; 2370 } 2371 }; 2372 2373 _proto._showBackdrop = function _showBackdrop(callback) { 2374 var _this8 = this; 2375 2376 var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : ''; 2377 2378 if (this._isShown && this._config.backdrop) { 2379 this._backdrop = document.createElement('div'); 2380 this._backdrop.className = ClassName$5.BACKDROP; 2381 2382 if (animate) { 2383 this._backdrop.classList.add(animate); 2384 } 2385 2386 $(this._backdrop).appendTo(document.body); 2387 $(this._element).on(Event$5.CLICK_DISMISS, function (event) { 2388 if (_this8._ignoreBackdropClick) { 2389 _this8._ignoreBackdropClick = false; 2390 return; 2391 } 2392 2393 if (event.target !== event.currentTarget) { 2394 return; 2395 } 2396 2397 if (_this8._config.backdrop === 'static') { 2398 _this8._element.focus(); 2399 } else { 2400 _this8.hide(); 2401 } 2402 }); 2403 2404 if (animate) { 2405 Util.reflow(this._backdrop); 2406 } 2407 2408 $(this._backdrop).addClass(ClassName$5.SHOW); 2409 2410 if (!callback) { 2411 return; 2412 } 2413 2414 if (!animate) { 2415 callback(); 2416 return; 2417 } 2418 2419 var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 2420 $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); 2421 } else if (!this._isShown && this._backdrop) { 2422 $(this._backdrop).removeClass(ClassName$5.SHOW); 2423 2424 var callbackRemove = function callbackRemove() { 2425 _this8._removeBackdrop(); 2426 2427 if (callback) { 2428 callback(); 2429 } 2430 }; 2431 2432 if ($(this._element).hasClass(ClassName$5.FADE)) { 2433 var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 2434 2435 $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); 2436 } else { 2437 callbackRemove(); 2438 } 2439 } else if (callback) { 2440 callback(); 2441 } 2442 } // ---------------------------------------------------------------------- 2443 // the following methods are used to handle overflowing modals 2444 // todo (fat): these should probably be refactored out of modal.js 2445 // ---------------------------------------------------------------------- 2446 ; 2447
2448 _proto._adjustDialog = function _adjustDialog() { 2449 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 2450 2451 if (!this._isBodyOverflowing && isModalOverflowing) { 2452 this._element.style.paddingLeft = this._scrollbarWidth + "px"; 2453 } 2454 2455 if (this._isBodyOverflowing && !isModalOverflowing) { 2456 this._element.style.paddingRight = this._scrollbarWidth + "px"; 2457 } 2458 }; 2459 2460 _proto._resetAdjustments = function _resetAdjustments() { 2461 this._element.style.paddingLeft = ''; 2462 this._element.style.paddingRight = ''; 2463 }; 2464 2465 _proto._checkScrollbar = function _checkScrollbar() { 2466 var rect = document.body.getBoundingClientRect(); 2467 this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; 2468 this._scrollbarWidth = this._getScrollbarWidth(); 2469 }; 2470 2471 _proto._setScrollbar = function _setScrollbar() { 2472 var _this9 = this; 2473 2474 if (this._isBodyOverflowing) { 2475 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set 2476 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set 2477 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); 2478 var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding 2479 2480 $(fixedContent).each(function (index, element) { 2481 var actualPadding = element.style.paddingRight; 2482 var calculatedPadding = $(element).css('padding-right'); 2483 $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); 2484 }); // Adjust sticky content margin 2485 2486 $(stickyContent).each(function (index, element) { 2487 var actualMargin = element.style.marginRight; 2488 var calculatedMargin = $(element).css('margin-right'); 2489 $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); 2490 }); // Adjust body padding 2491 2492 var actualPadding = document.body.style.paddingRight; 2493 var calculatedPadding = $(document.body).css('padding-right'); 2494 $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); 2495 } 2496 2497 $(document.body).addClass(ClassName$5.OPEN); 2498 }; 2499 2500 _proto._resetScrollbar = function _resetScrollbar() { 2501 // Restore fixed content padding 2502 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT)); 2503 $(fixedContent).each(function (index, element) { 2504 var padding = $(element).data('padding-right'); 2505 $(element).removeData('padding-right'); 2506 element.style.paddingRight = padding ? padding : ''; 2507 }); // Restore sticky content 2508 2509 var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT)); 2510 $(elements).each(function (index, element) { 2511 var margin = $(element).data('margin-right'); 2512 2513 if (typeof margin !== 'undefined') { 2514 $(element).css('margin-right', margin).removeData('margin-right'); 2515 } 2516 }); // Restore body padding 2517 2518 var padding = $(document.body).data('padding-right'); 2519 $(document.body).removeData('padding-right'); 2520 document.body.style.paddingRight = padding ? padding : ''; 2521 }; 2522 2523 _proto._getScrollbarWidth = function _getScrollbarWidth() { 2524 // thx d.walsh 2525 var scrollDiv = document.createElement('div'); 2526 scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER; 2527 document.body.appendChild(scrollDiv); 2528 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; 2529 document.body.removeChild(scrollDiv); 2530 return scrollbarWidth; 2531 } // Static 2532 ; 2533 2534 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { 2535 return this.each(function () { 2536 var data = $(this).data(DATA_KEY$5); 2537 2538 var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {}); 2539 2540 if (!data) { 2541 data = new Modal(this, _config); 2542 $(this).data(DATA_KEY$5, data); 2543 } 2544 2545 if (typeof config === 'string') { 2546 if (typeof data[config] === 'undefined') {
2547 throw new TypeError("No method named \"" + config + "\""); 2548 } 2549 2550 data[config](relatedTarget); 2551 } else if (_config.show) { 2552 data.show(relatedTarget); 2553 } 2554 }); 2555 }; 2556 2557 _createClass(Modal, null, [{ 2558 key: "VERSION", 2559 get: function get() { 2560 return VERSION$5; 2561 } 2562 }, { 2563 key: "Default", 2564 get: function get() { 2565 return Default$3; 2566 } 2567 }]); 2568 2569 return Modal; 2570 }(); 2571 /** 2572 * ------------------------------------------------------------------------ 2573 * Data Api implementation 2574 * ------------------------------------------------------------------------ 2575 */ 2576 2577 2578 $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) { 2579 var _this10 = this; 2580 2581 var target; 2582 var selector = Util.getSelectorFromElement(this); 2583 2584 if (selector) { 2585 target = document.querySelector(selector); 2586 } 2587 2588 var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data()); 2589 2590 if (this.tagName === 'A' || this.tagName === 'AREA') { 2591 event.preventDefault(); 2592 } 2593 2594 var $target = $(target).one(Event$5.SHOW, function (showEvent) { 2595 if (showEvent.isDefaultPrevented()) { 2596 // Only register focus restorer if modal will actually get shown 2597 return; 2598 } 2599 2600 $target.one(Event$5.HIDDEN, function () { 2601 if ($(_this10).is(':visible')) { 2602 _this10.focus(); 2603 } 2604 }); 2605 }); 2606 2607 Modal._jQueryInterface.call($(target), config, this); 2608 }); 2609 /** 2610 * ------------------------------------------------------------------------ 2611 * jQuery 2612 * ------------------------------------------------------------------------ 2613 */ 2614 2615 $.fn[NAME$5] = Modal._jQueryInterface; 2616 $.fn[NAME$5].Constructor = Modal; 2617 2618 $.fn[NAME$5].noConflict = function () { 2619 $.fn[NAME$5] = JQUERY_NO_CONFLICT$5; 2620 return Modal._jQueryInterface; 2621 }; 2622 2623 /** 2624 * -------------------------------------------------------------------------- 2625 * Bootstrap (v4.3.1): tools/sanitizer.js 2626 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2627 * -------------------------------------------------------------------------- 2628 */ 2629 var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; 2630 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; 2631 var DefaultWhitelist = { 2632 // Global attributes allowed on any supplied element below. 2633 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 2634 a: ['target', 'href', 'title', 'rel'], 2635 area: [], 2636 b: [], 2637 br: [], 2638 col: [], 2639 code: [], 2640 div: [], 2641 em: [], 2642 hr: [], 2643 h1: [], 2644 h2: [], 2645 h3: [], 2646 h4: [], 2647 h5: [], 2648 h6: [], 2649 i: [], 2650 img: ['src', 'alt', 'title', 'width', 'height'], 2651 li: [], 2652 ol: [], 2653 p: [], 2654 pre: [], 2655 s: [], 2656 small: [], 2657 span: [], 2658 sub: [], 2659 sup: [], 2660 strong: [], 2661 u: [], 2662 ul: [] 2663 /** 2664 * A pattern that recognizes a commonly useful subset of URLs that are safe. 2665 * 2666 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 2667 */ 2668 2669 }; 2670 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi; 2671 /** 2672 * A pattern that matches safe data URLs. Only matches image, video and audio types. 2673 * 2674 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts 2675 */ 2676 2677 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i; 2678 2679 function allowedAttribute(attr, allowedAttributeList) { 2680 var attrName = attr.nodeName.toLowerCase(); 2681 2682 if (allowedAttributeList.indexOf(attrName) !== -1) { 2683 if (uriAttrs.indexOf(attrName) !== -1) { 2684 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); 2685 } 2686 2687 return true; 2688 } 2689 2690 var regExp = allowedAttributeList.filter(function (attrRegex) {
vendor: 7,487 bytes, lines 2691-2955
2691 return attrRegex instanceof RegExp; 2692 }); // Check if a regular expression validates the attribute. 2693 2694 for (var i = 0, l = regExp.length; i < l; i++) { 2695 if (attrName.match(regExp[i])) { 2696 return true; 2697 } 2698 } 2699 2700 return false; 2701 } 2702 2703 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { 2704 if (unsafeHtml.length === 0) { 2705 return unsafeHtml; 2706 } 2707 2708 if (sanitizeFn && typeof sanitizeFn === 'function') { 2709 return sanitizeFn(unsafeHtml); 2710 } 2711 2712 var domParser = new window.DOMParser(); 2713 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); 2714 var whitelistKeys = Object.keys(whiteList); 2715 var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); 2716 2717 var _loop = function _loop(i, len) { 2718 var el = elements[i]; 2719 var elName = el.nodeName.toLowerCase(); 2720 2721 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { 2722 el.parentNode.removeChild(el); 2723 return "continue"; 2724 } 2725 2726 var attributeList = [].slice.call(el.attributes); 2727 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); 2728 attributeList.forEach(function (attr) { 2729 if (!allowedAttribute(attr, whitelistedAttributes)) { 2730 el.removeAttribute(attr.nodeName); 2731 } 2732 }); 2733 }; 2734 2735 for (var i = 0, len = elements.length; i < len; i++) { 2736 var _ret = _loop(i, len); 2737 2738 if (_ret === "continue") continue; 2739 } 2740 2741 return createdDocument.body.innerHTML; 2742 } 2743 2744 /** 2745 * ------------------------------------------------------------------------ 2746 * Constants 2747 * ------------------------------------------------------------------------ 2748 */ 2749 2750 var NAME$6 = 'tooltip'; 2751 var VERSION$6 = '4.3.1'; 2752 var DATA_KEY$6 = 'bs.tooltip'; 2753 var EVENT_KEY$6 = "." + DATA_KEY$6; 2754 var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; 2755 var CLASS_PREFIX = 'bs-tooltip'; 2756 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 2757 var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; 2758 var DefaultType$4 = { 2759 animation: 'boolean', 2760 template: 'string', 2761 title: '(string|element|function)', 2762 trigger: 'string', 2763 delay: '(number|object)', 2764 html: 'boolean', 2765 selector: '(string|boolean)', 2766 placement: '(string|function)', 2767 offset: '(number|string|function)', 2768 container: '(string|element|boolean)', 2769 fallbackPlacement: '(string|array)', 2770 boundary: '(string|element)', 2771 sanitize: 'boolean', 2772 sanitizeFn: '(null|function)', 2773 whiteList: 'object' 2774 }; 2775 var AttachmentMap$1 = { 2776 AUTO: 'auto', 2777 TOP: 'top', 2778 RIGHT: 'right', 2779 BOTTOM: 'bottom', 2780 LEFT: 'left' 2781 }; 2782 var Default$4 = { 2783 animation: true, 2784 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>', 2785 trigger: 'hover focus', 2786 title: '', 2787 delay: 0, 2788 html: false, 2789 selector: false, 2790 placement: 'top', 2791 offset: 0, 2792 container: false, 2793 fallbackPlacement: 'flip', 2794 boundary: 'scrollParent', 2795 sanitize: true, 2796 sanitizeFn: null, 2797 whiteList: DefaultWhitelist 2798 }; 2799 var HoverState = { 2800 SHOW: 'show', 2801 OUT: 'out' 2802 }; 2803 var Event$6 = { 2804 HIDE: "hide" + EVENT_KEY$6, 2805 HIDDEN: "hidden" + EVENT_KEY$6, 2806 SHOW: "show" + EVENT_KEY$6, 2807 SHOWN: "shown" + EVENT_KEY$6, 2808 INSERTED: "inserted" + EVENT_KEY$6, 2809 CLICK: "click" + EVENT_KEY$6, 2810 FOCUSIN: "focusin" + EVENT_KEY$6, 2811 FOCUSOUT: "focusout" + EVENT_KEY$6, 2812 MOUSEENTER: "mouseenter" + EVENT_KEY$6, 2813 MOUSELEAVE: "mouseleave" + EVENT_KEY$6 2814 }; 2815 var ClassName$6 = { 2816 FADE: 'fade', 2817 SHOW: 'show' 2818 }; 2819 var Selector$6 = { 2820 TOOLTIP: '.tooltip', 2821 TOOLTIP_INNER: '.tooltip-inner', 2822 ARROW: '.arrow' 2823 }; 2824 var Trigger = { 2825 HOVER: 'hover', 2826 FOCUS: 'focus', 2827 CLICK: 'click', 2828 MANUAL: 'manual' 2829 /** 2830 * ------------------------------------------------------------------------ 2831 * Class Definition 2832 * ------------------------------------------------------------------------ 2833 */ 2834 2835 }; 2836 2837 var Tooltip = 2838 /*#__PURE__*/ 2839 function () { 2840 function Tooltip(element, config) { 2841 /** 2842 * Check for Popper dependency 2843 * Popper - https://popper.js.org 2844 */ 2845 if (typeof Popper === 'undefined') { 2846 throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)'); 2847 } // private 2848 2849 2850 this._isEnabled = true; 2851 this._timeout = 0; 2852 this._hoverState = ''; 2853 this._activeTrigger = {}; 2854 this._popper = null; // Protected 2855 2856 this.element = element; 2857 this.config = this._getConfig(config); 2858 this.tip = null; 2859 2860 this._setListeners(); 2861 } // Getters 2862 2863 2864 var _proto = Tooltip.prototype; 2865 2866 // Public 2867 _proto.enable = function enable() { 2868 this._isEnabled = true; 2869 }; 2870 2871 _proto.disable = function disable() { 2872 this._isEnabled = false; 2873 }; 2874 2875 _proto.toggleEnabled = function toggleEnabled() { 2876 this._isEnabled = !this._isEnabled; 2877 }; 2878 2879 _proto.toggle = function toggle(event) { 2880 if (!this._isEnabled) { 2881 return; 2882 } 2883 2884 if (event) { 2885 var dataKey = this.constructor.DATA_KEY; 2886 var context = $(event.currentTarget).data(dataKey); 2887 2888 if (!context) { 2889 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 2890 $(event.currentTarget).data(dataKey, context); 2891 } 2892 2893 context._activeTrigger.click = !context._activeTrigger.click; 2894 2895 if (context._isWithActiveTrigger()) { 2896 context._enter(null, context); 2897 } else { 2898 context._leave(null, context); 2899 } 2900 } else { 2901 if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) { 2902 this._leave(null, this); 2903 2904 return; 2905 } 2906 2907 this._enter(null, this); 2908 } 2909 }; 2910 2911 _proto.dispose = function dispose() { 2912 clearTimeout(this._timeout); 2913 $.removeData(this.element, this.constructor.DATA_KEY); 2914 $(this.element).off(this.constructor.EVENT_KEY); 2915 $(this.element).closest('.modal').off('hide.bs.modal'); 2916 2917 if (this.tip) { 2918 $(this.tip).remove(); 2919 } 2920 2921 this._isEnabled = null; 2922 this._timeout = null; 2923 this._hoverState = null; 2924 this._activeTrigger = null; 2925 2926 if (this._popper !== null) { 2927 this._popper.destroy(); 2928 } 2929 2930 this._popper = null; 2931 this.element = null; 2932 this.config = null; 2933 this.tip = null; 2934 }; 2935 2936 _proto.show = function show() { 2937 var _this = this; 2938 2939 if ($(this.element).css('display') === 'none') { 2940 throw new Error('Please use show on visible elements'); 2941 } 2942 2943 var showEvent = $.Event(this.constructor.Event.SHOW); 2944 2945 if (this.isWithContent() && this._isEnabled) { 2946 $(this.element).trigger(showEvent); 2947 var shadowRoot = Util.findShadowRoot(this.element); 2948 var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); 2949 2950 if (showEvent.isDefaultPrevented() || !isInTheDom) { 2951 return; 2952 } 2953 2954 var tip = this.getTipElement(); 2955 var tipId = Util.getUID(this.constructor.NAME);
2956 tip.setAttribute('id', tipId); 2957 this.element.setAttribute('aria-describedby', tipId); 2958 this.setContent(); 2959 2960 if (this.config.animation) { 2961 $(tip).addClass(ClassName$6.FADE); 2962 } 2963 2964 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; 2965 2966 var attachment = this._getAttachment(placement); 2967 2968 this.addAttachmentClass(attachment); 2969 2970 var container = this._getContainer(); 2971 2972 $(tip).data(this.constructor.DATA_KEY, this); 2973 2974 if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { 2975 $(tip).appendTo(container); 2976 } 2977 2978 $(this.element).trigger(this.constructor.Event.INSERTED); 2979 this._popper = new Popper(this.element, tip, { 2980 placement: attachment, 2981 modifiers: { 2982 offset: this._getOffset(), 2983 flip: { 2984 behavior: this.config.fallbackPlacement 2985 }, 2986 arrow: { 2987 element: Selector$6.ARROW 2988 }, 2989 preventOverflow: { 2990 boundariesElement: this.config.boundary 2991 } 2992 }, 2993 onCreate: function onCreate(data) { 2994 if (data.originalPlacement !== data.placement) { 2995 _this._handlePopperPlacementChange(data); 2996 } 2997 }, 2998 onUpdate: function onUpdate(data) { 2999 return _this._handlePopperPlacementChange(data); 3000 } 3001 }); 3002 $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra 3003 // empty mouseover listeners to the body's immediate children; 3004 // only needed because of broken event delegation on iOS 3005 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 3006 3007 if ('ontouchstart' in document.documentElement) { 3008 $(document.body).children().on('mouseover', null, $.noop); 3009 } 3010 3011 var complete = function complete() { 3012 if (_this.config.animation) { 3013 _this._fixTransition(); 3014 } 3015 3016 var prevHoverState = _this._hoverState; 3017 _this._hoverState = null; 3018 $(_this.element).trigger(_this.constructor.Event.SHOWN); 3019 3020 if (prevHoverState === HoverState.OUT) { 3021 _this._leave(null, _this); 3022 } 3023 }; 3024 3025 if ($(this.tip).hasClass(ClassName$6.FADE)) { 3026 var transitionDuration = Util.getTransitionDurationFromElement(this.tip); 3027 $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 3028 } else { 3029 complete(); 3030 } 3031 } 3032 }; 3033 3034 _proto.hide = function hide(callback) { 3035 var _this2 = this; 3036 3037 var tip = this.getTipElement(); 3038 var hideEvent = $.Event(this.constructor.Event.HIDE); 3039 3040 var complete = function complete() { 3041 if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { 3042 tip.parentNode.removeChild(tip); 3043 } 3044 3045 _this2._cleanTipClass(); 3046 3047 _this2.element.removeAttribute('aria-describedby'); 3048 3049 $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); 3050 3051 if (_this2._popper !== null) { 3052 _this2._popper.destroy(); 3053 } 3054 3055 if (callback) { 3056 callback(); 3057 } 3058 }; 3059 3060 $(this.element).trigger(hideEvent); 3061 3062 if (hideEvent.isDefaultPrevented()) { 3063 return; 3064 } 3065 3066 $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra 3067 // empty mouseover listeners we added for iOS support 3068 3069 if ('ontouchstart' in document.documentElement) { 3070 $(document.body).children().off('mouseover', null, $.noop); 3071 } 3072 3073 this._activeTrigger[Trigger.CLICK] = false; 3074 this._activeTrigger[Trigger.FOCUS] = false; 3075 this._activeTrigger[Trigger.HOVER] = false; 3076 3077 if ($(this.tip).hasClass(ClassName$6.FADE)) { 3078 var transitionDuration = Util.getTransitionDurationFromElement(tip); 3079 $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 3080 } else { 3081 complete(); 3082 } 3083 3084 this._hoverState = ''; 3085 }; 3086
3087 _proto.update = function update() { 3088 if (this._popper !== null) { 3089 this._popper.scheduleUpdate(); 3090 } 3091 } // Protected 3092 ; 3093 3094 _proto.isWithContent = function isWithContent() { 3095 return Boolean(this.getTitle()); 3096 }; 3097 3098 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 3099 $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 3100 }; 3101 3102 _proto.getTipElement = function getTipElement() { 3103 this.tip = this.tip || $(this.config.template)[0]; 3104 return this.tip; 3105 }; 3106 3107 _proto.setContent = function setContent() { 3108 var tip = this.getTipElement(); 3109 this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle()); 3110 $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW); 3111 }; 3112 3113 _proto.setElementContent = function setElementContent($element, content) { 3114 if (typeof content === 'object' && (content.nodeType || content.jquery)) { 3115 // Content is a DOM node or a jQuery 3116 if (this.config.html) { 3117 if (!$(content).parent().is($element)) { 3118 $element.empty().append(content); 3119 } 3120 } else { 3121 $element.text($(content).text()); 3122 } 3123 3124 return; 3125 } 3126 3127 if (this.config.html) { 3128 if (this.config.sanitize) { 3129 content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); 3130 } 3131 3132 $element.html(content); 3133 } else { 3134 $element.text(content); 3135 } 3136 }; 3137 3138 _proto.getTitle = function getTitle() { 3139 var title = this.element.getAttribute('data-original-title'); 3140 3141 if (!title) { 3142 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; 3143 } 3144 3145 return title; 3146 } // Private 3147 ; 3148 3149 _proto._getOffset = function _getOffset() { 3150 var _this3 = this; 3151 3152 var offset = {}; 3153 3154 if (typeof this.config.offset === 'function') { 3155 offset.fn = function (data) { 3156 data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); 3157 return data; 3158 }; 3159 } else { 3160 offset.offset = this.config.offset; 3161 } 3162 3163 return offset; 3164 }; 3165 3166 _proto._getContainer = function _getContainer() { 3167 if (this.config.container === false) { 3168 return document.body; 3169 } 3170 3171 if (Util.isElement(this.config.container)) { 3172 return $(this.config.container); 3173 } 3174 3175 return $(document).find(this.config.container); 3176 }; 3177 3178 _proto._getAttachment = function _getAttachment(placement) { 3179 return AttachmentMap$1[placement.toUpperCase()]; 3180 }; 3181 3182 _proto._setListeners = function _setListeners() { 3183 var _this4 = this; 3184 3185 var triggers = this.config.trigger.split(' '); 3186 triggers.forEach(function (trigger) { 3187 if (trigger === 'click') { 3188 $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { 3189 return _this4.toggle(event); 3190 }); 3191 } else if (trigger !== Trigger.MANUAL) { 3192 var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; 3193 var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; 3194 $(_this4.element).on(eventIn, _this4.config.selector, function (event) { 3195 return _this4._enter(event); 3196 }).on(eventOut, _this4.config.selector, function (event) { 3197 return _this4._leave(event); 3198 }); 3199 } 3200 }); 3201 $(this.element).closest('.modal').on('hide.bs.modal', function () { 3202 if (_this4.element) { 3203 _this4.hide(); 3204 } 3205 }); 3206 3207 if (this.config.selector) { 3208 this.config = _objectSpread({}, this.config, { 3209 trigger: 'manual', 3210 selector: '' 3211 }); 3212 } else { 3213 this._fixTitle(); 3214 } 3215 }; 3216 3217 _proto._fixTitle = function _fixTitle() { 3218 var titleType = typeof this.element.getAttribute('data-original-title'); 3219 3220 if (this.element.getAttribute('title') || titleType !== 'string') { 3221 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); 3222 this.element.setAttribute('title', ''); 3223 } 3224 }; 3225 3226 _proto._enter = function _enter(event, context) { 3227 var dataKey = this.constructor.DATA_KEY; 3228 context = context || $(event.currentTarget).data(dataKey); 3229 3230 if (!context) { 3231 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 3232 $(event.currentTarget).data(dataKey, context); 3233 } 3234 3235 if (event) { 3236 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; 3237 } 3238 3239 if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) { 3240 context._hoverState = HoverState.SHOW; 3241 return; 3242 } 3243 3244 clearTimeout(context._timeout); 3245 context._hoverState = HoverState.SHOW; 3246 3247 if (!context.config.delay || !context.config.delay.show) { 3248 context.show(); 3249 return; 3250 } 3251 3252 context._timeout = setTimeout(function () { 3253 if (context._hoverState === HoverState.SHOW) { 3254 context.show(); 3255 } 3256 }, context.config.delay.show); 3257 }; 3258 3259 _proto._leave = function _leave(event, context) { 3260 var dataKey = this.constructor.DATA_KEY; 3261 context = context || $(event.currentTarget).data(dataKey); 3262 3263 if (!context) { 3264 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 3265 $(event.currentTarget).data(dataKey, context); 3266 } 3267 3268 if (event) { 3269 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; 3270 } 3271 3272 if (context._isWithActiveTrigger()) { 3273 return; 3274 } 3275 3276 clearTimeout(context._timeout); 3277 context._hoverState = HoverState.OUT; 3278 3279 if (!context.config.delay || !context.config.delay.hide) { 3280 context.hide(); 3281 return; 3282 } 3283 3284 context._timeout = setTimeout(function () { 3285 if (context._hoverState === HoverState.OUT) { 3286 context.hide(); 3287 } 3288 }, context.config.delay.hide); 3289 }; 3290 3291 _proto._isWithActiveTrigger = function _isWithActiveTrigger() { 3292 for (var trigger in this._activeTrigger) { 3293 if (this._activeTrigger[trigger]) { 3294 return true; 3295 } 3296 } 3297 3298 return false; 3299 }; 3300 3301 _proto._getConfig = function _getConfig(config) { 3302 var dataAttributes = $(this.element).data();
vendor: 10,114 bytes, lines 3303-3675
3303 Object.keys(dataAttributes).forEach(function (dataAttr) { 3304 if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { 3305 delete dataAttributes[dataAttr]; 3306 } 3307 }); 3308 config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); 3309 3310 if (typeof config.delay === 'number') { 3311 config.delay = { 3312 show: config.delay, 3313 hide: config.delay 3314 }; 3315 } 3316 3317 if (typeof config.title === 'number') { 3318 config.title = config.title.toString(); 3319 } 3320 3321 if (typeof config.content === 'number') { 3322 config.content = config.content.toString(); 3323 } 3324 3325 Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); 3326 3327 if (config.sanitize) { 3328 config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); 3329 } 3330 3331 return config; 3332 }; 3333 3334 _proto._getDelegateConfig = function _getDelegateConfig() { 3335 var config = {}; 3336 3337 if (this.config) { 3338 for (var key in this.config) { 3339 if (this.constructor.Default[key] !== this.config[key]) { 3340 config[key] = this.config[key]; 3341 } 3342 } 3343 } 3344 3345 return config; 3346 }; 3347 3348 _proto._cleanTipClass = function _cleanTipClass() { 3349 var $tip = $(this.getTipElement()); 3350 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 3351 3352 if (tabClass !== null && tabClass.length) { 3353 $tip.removeClass(tabClass.join('')); 3354 } 3355 }; 3356 3357 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { 3358 var popperInstance = popperData.instance; 3359 this.tip = popperInstance.popper; 3360 3361 this._cleanTipClass(); 3362 3363 this.addAttachmentClass(this._getAttachment(popperData.placement)); 3364 }; 3365 3366 _proto._fixTransition = function _fixTransition() { 3367 var tip = this.getTipElement(); 3368 var initConfigAnimation = this.config.animation; 3369 3370 if (tip.getAttribute('x-placement') !== null) { 3371 return; 3372 } 3373 3374 $(tip).removeClass(ClassName$6.FADE); 3375 this.config.animation = false; 3376 this.hide(); 3377 this.show(); 3378 this.config.animation = initConfigAnimation; 3379 } // Static 3380 ; 3381 3382 Tooltip._jQueryInterface = function _jQueryInterface(config) { 3383 return this.each(function () { 3384 var data = $(this).data(DATA_KEY$6); 3385 3386 var _config = typeof config === 'object' && config; 3387 3388 if (!data && /dispose|hide/.test(config)) { 3389 return; 3390 } 3391 3392 if (!data) { 3393 data = new Tooltip(this, _config); 3394 $(this).data(DATA_KEY$6, data); 3395 } 3396 3397 if (typeof config === 'string') { 3398 if (typeof data[config] === 'undefined') { 3399 throw new TypeError("No method named \"" + config + "\""); 3400 } 3401 3402 data[config](); 3403 } 3404 }); 3405 }; 3406 3407 _createClass(Tooltip, null, [{ 3408 key: "VERSION", 3409 get: function get() { 3410 return VERSION$6; 3411 } 3412 }, { 3413 key: "Default", 3414 get: function get() { 3415 return Default$4; 3416 } 3417 }, { 3418 key: "NAME", 3419 get: function get() { 3420 return NAME$6; 3421 } 3422 }, { 3423 key: "DATA_KEY", 3424 get: function get() { 3425 return DATA_KEY$6; 3426 } 3427 }, { 3428 key: "Event", 3429 get: function get() { 3430 return Event$6; 3431 } 3432 }, { 3433 key: "EVENT_KEY", 3434 get: function get() { 3435 return EVENT_KEY$6; 3436 } 3437 }, { 3438 key: "DefaultType", 3439 get: function get() { 3440 return DefaultType$4; 3441 } 3442 }]); 3443 3444 return Tooltip; 3445 }(); 3446 /** 3447 * ------------------------------------------------------------------------ 3448 * jQuery 3449 * ------------------------------------------------------------------------ 3450 */ 3451 3452 3453 $.fn[NAME$6] = Tooltip._jQueryInterface; 3454 $.fn[NAME$6].Constructor = Tooltip; 3455 3456 $.fn[NAME$6].noConflict = function () { 3457 $.fn[NAME$6] = JQUERY_NO_CONFLICT$6; 3458 return Tooltip._jQueryInterface; 3459 }; 3460 3461 /** 3462 * ------------------------------------------------------------------------ 3463 * Constants 3464 * ------------------------------------------------------------------------ 3465 */ 3466 3467 var NAME$7 = 'popover'; 3468 var VERSION$7 = '4.3.1'; 3469 var DATA_KEY$7 = 'bs.popover'; 3470 var EVENT_KEY$7 = "." + DATA_KEY$7; 3471 var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; 3472 var CLASS_PREFIX$1 = 'bs-popover'; 3473 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); 3474 3475 var Default$5 = _objectSpread({}, Tooltip.Default, { 3476 placement: 'right', 3477 trigger: 'click', 3478 content: '', 3479 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' 3480 }); 3481 3482 var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, { 3483 content: '(string|element|function)' 3484 }); 3485 3486 var ClassName$7 = { 3487 FADE: 'fade', 3488 SHOW: 'show' 3489 }; 3490 var Selector$7 = { 3491 TITLE: '.popover-header', 3492 CONTENT: '.popover-body' 3493 }; 3494 var Event$7 = { 3495 HIDE: "hide" + EVENT_KEY$7, 3496 HIDDEN: "hidden" + EVENT_KEY$7, 3497 SHOW: "show" + EVENT_KEY$7, 3498 SHOWN: "shown" + EVENT_KEY$7, 3499 INSERTED: "inserted" + EVENT_KEY$7, 3500 CLICK: "click" + EVENT_KEY$7, 3501 FOCUSIN: "focusin" + EVENT_KEY$7, 3502 FOCUSOUT: "focusout" + EVENT_KEY$7, 3503 MOUSEENTER: "mouseenter" + EVENT_KEY$7, 3504 MOUSELEAVE: "mouseleave" + EVENT_KEY$7 3505 /** 3506 * ------------------------------------------------------------------------ 3507 * Class Definition 3508 * ------------------------------------------------------------------------ 3509 */ 3510 3511 }; 3512 3513 var Popover = 3514 /*#__PURE__*/ 3515 function (_Tooltip) { 3516 _inheritsLoose(Popover, _Tooltip); 3517 3518 function Popover() { 3519 return _Tooltip.apply(this, arguments) || this; 3520 } 3521 3522 var _proto = Popover.prototype; 3523 3524 // Overrides 3525 _proto.isWithContent = function isWithContent() { 3526 return this.getTitle() || this._getContent(); 3527 }; 3528 3529 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 3530 $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); 3531 }; 3532 3533 _proto.getTipElement = function getTipElement() { 3534 this.tip = this.tip || $(this.config.template)[0]; 3535 return this.tip; 3536 }; 3537 3538 _proto.setContent = function setContent() { 3539 var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events 3540 3541 this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle()); 3542 3543 var content = this._getContent(); 3544 3545 if (typeof content === 'function') { 3546 content = content.call(this.element); 3547 } 3548 3549 this.setElementContent($tip.find(Selector$7.CONTENT), content); 3550 $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); 3551 } // Private 3552 ; 3553 3554 _proto._getContent = function _getContent() { 3555 return this.element.getAttribute('data-content') || this.config.content; 3556 }; 3557 3558 _proto._cleanTipClass = function _cleanTipClass() { 3559 var $tip = $(this.getTipElement()); 3560 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); 3561 3562 if (tabClass !== null && tabClass.length > 0) { 3563 $tip.removeClass(tabClass.join('')); 3564 } 3565 } // Static 3566 ; 3567 3568 Popover._jQueryInterface = function _jQueryInterface(config) { 3569 return this.each(function () { 3570 var data = $(this).data(DATA_KEY$7); 3571 3572 var _config = typeof config === 'object' ? config : null; 3573 3574 if (!data && /dispose|hide/.test(config)) { 3575 return; 3576 } 3577 3578 if (!data) { 3579 data = new Popover(this, _config); 3580 $(this).data(DATA_KEY$7, data); 3581 } 3582 3583 if (typeof config === 'string') { 3584 if (typeof data[config] === 'undefined') { 3585 throw new TypeError("No method named \"" + config + "\""); 3586 } 3587 3588 data[config](); 3589 } 3590 }); 3591 }; 3592 3593 _createClass(Popover, null, [{ 3594 key: "VERSION", 3595 // Getters 3596 get: function get() { 3597 return VERSION$7; 3598 } 3599 }, { 3600 key: "Default", 3601 get: function get() { 3602 return Default$5; 3603 } 3604 }, { 3605 key: "NAME", 3606 get: function get() { 3607 return NAME$7; 3608 } 3609 }, { 3610 key: "DATA_KEY", 3611 get: function get() { 3612 return DATA_KEY$7; 3613 } 3614 }, { 3615 key: "Event", 3616 get: function get() { 3617 return Event$7; 3618 } 3619 }, { 3620 key: "EVENT_KEY", 3621 get: function get() { 3622 return EVENT_KEY$7; 3623 } 3624 }, { 3625 key: "DefaultType", 3626 get: function get() { 3627 return DefaultType$5; 3628 } 3629 }]); 3630 3631 return Popover; 3632 }(Tooltip); 3633 /** 3634 * ------------------------------------------------------------------------ 3635 * jQuery 3636 * ------------------------------------------------------------------------ 3637 */ 3638 3639 3640 $.fn[NAME$7] = Popover._jQueryInterface; 3641 $.fn[NAME$7].Constructor = Popover; 3642 3643 $.fn[NAME$7].noConflict = function () { 3644 $.fn[NAME$7] = JQUERY_NO_CONFLICT$7; 3645 return Popover._jQueryInterface; 3646 }; 3647 3648 /** 3649 * ------------------------------------------------------------------------ 3650 * Constants 3651 * ------------------------------------------------------------------------ 3652 */ 3653 3654 var NAME$8 = 'scrollspy'; 3655 var VERSION$8 = '4.3.1'; 3656 var DATA_KEY$8 = 'bs.scrollspy'; 3657 var EVENT_KEY$8 = "." + DATA_KEY$8; 3658 var DATA_API_KEY$6 = '.data-api'; 3659 var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8]; 3660 var Default$6 = { 3661 offset: 10, 3662 method: 'auto', 3663 target: '' 3664 }; 3665 var DefaultType$6 = { 3666 offset: 'number', 3667 method: 'string', 3668 target: '(string|element)' 3669 }; 3670 var Event$8 = { 3671 ACTIVATE: "activate" + EVENT_KEY$8, 3672 SCROLL: "scroll" + EVENT_KEY$8, 3673 LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6 3674 }; 3675 var ClassName$8 = {
3676 DROPDOWN_ITEM: 'dropdown-item', 3677 DROPDOWN_MENU: 'dropdown-menu', 3678 ACTIVE: 'active' 3679 }; 3680 var Selector$8 = { 3681 DATA_SPY: '[data-spy="scroll"]', 3682 ACTIVE: '.active', 3683 NAV_LIST_GROUP: '.nav, .list-group', 3684 NAV_LINKS: '.nav-link', 3685 NAV_ITEMS: '.nav-item', 3686 LIST_ITEMS: '.list-group-item', 3687 DROPDOWN: '.dropdown', 3688 DROPDOWN_ITEMS: '.dropdown-item', 3689 DROPDOWN_TOGGLE: '.dropdown-toggle' 3690 }; 3691 var OffsetMethod = { 3692 OFFSET: 'offset', 3693 POSITION: 'position' 3694 /** 3695 * ------------------------------------------------------------------------ 3696 * Class Definition 3697 * ------------------------------------------------------------------------ 3698 */ 3699 3700 }; 3701 3702 var ScrollSpy = 3703 /*#__PURE__*/ 3704 function () { 3705 function ScrollSpy(element, config) { 3706 var _this = this; 3707 3708 this._element = element; 3709 this._scrollElement = element.tagName === 'BODY' ? window : element; 3710 this._config = this._getConfig(config); 3711 this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS); 3712 this._offsets = []; 3713 this._targets = []; 3714 this._activeTarget = null; 3715 this._scrollHeight = 0; 3716 $(this._scrollElement).on(Event$8.SCROLL, function (event) { 3717 return _this._process(event); 3718 }); 3719 this.refresh(); 3720 3721 this._process(); 3722 } // Getters 3723 3724 3725 var _proto = ScrollSpy.prototype; 3726 3727 // Public 3728 _proto.refresh = function refresh() { 3729 var _this2 = this; 3730 3731 var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; 3732 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 3733 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; 3734 this._offsets = []; 3735 this._targets = []; 3736 this._scrollHeight = this._getScrollHeight(); 3737 var targets = [].slice.call(document.querySelectorAll(this._selector)); 3738 targets.map(function (element) { 3739 var target; 3740 var targetSelector = Util.getSelectorFromElement(element); 3741 3742 if (targetSelector) { 3743 target = document.querySelector(targetSelector); 3744 } 3745 3746 if (target) { 3747 var targetBCR = target.getBoundingClientRect(); 3748 3749 if (targetBCR.width || targetBCR.height) { 3750 // TODO (fat): remove sketch reliance on jQuery position/offset 3751 return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; 3752 } 3753 } 3754 3755 return null; 3756 }).filter(function (item) { 3757 return item; 3758 }).sort(function (a, b) { 3759 return a[0] - b[0]; 3760 }
vendor: 4,246 bytes, lines 3760-3883
3760).forEach(function (item) { 3761 _this2._offsets.push(item[0]); 3762 3763 _this2._targets.push(item[1]); 3764 }); 3765 }; 3766 3767 _proto.dispose = function dispose() { 3768 $.removeData(this._element, DATA_KEY$8); 3769 $(this._scrollElement).off(EVENT_KEY$8); 3770 this._element = null; 3771 this._scrollElement = null; 3772 this._config = null; 3773 this._selector = null; 3774 this._offsets = null; 3775 this._targets = null; 3776 this._activeTarget = null; 3777 this._scrollHeight = null; 3778 } // Private 3779 ; 3780 3781 _proto._getConfig = function _getConfig(config) { 3782 config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); 3783 3784 if (typeof config.target !== 'string') { 3785 var id = $(config.target).attr('id'); 3786 3787 if (!id) { 3788 id = Util.getUID(NAME$8); 3789 $(config.target).attr('id', id); 3790 } 3791 3792 config.target = "#" + id; 3793 } 3794 3795 Util.typeCheckConfig(NAME$8, config, DefaultType$6); 3796 return config; 3797 }; 3798 3799 _proto._getScrollTop = function _getScrollTop() { 3800 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 3801 }; 3802 3803 _proto._getScrollHeight = function _getScrollHeight() { 3804 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 3805 }; 3806 3807 _proto._getOffsetHeight = function _getOffsetHeight() { 3808 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 3809 }; 3810 3811 _proto._process = function _process() { 3812 var scrollTop = this._getScrollTop() + this._config.offset; 3813 3814 var scrollHeight = this._getScrollHeight(); 3815 3816 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 3817 3818 if (this._scrollHeight !== scrollHeight) { 3819 this.refresh(); 3820 } 3821 3822 if (scrollTop >= maxScroll) { 3823 var target = this._targets[this._targets.length - 1]; 3824 3825 if (this._activeTarget !== target) { 3826 this._activate(target); 3827 } 3828 3829 return; 3830 } 3831 3832 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 3833 this._activeTarget = null; 3834 3835 this._clear(); 3836 3837 return; 3838 } 3839 3840 var offsetLength = this._offsets.length; 3841 3842 for (var i = offsetLength; i--;) { 3843 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 3844 3845 if (isActiveTarget) { 3846 this._activate(this._targets[i]); 3847 } 3848 } 3849 }; 3850 3851 _proto._activate = function _activate(target) { 3852 this._activeTarget = target; 3853 3854 this._clear(); 3855 3856 var queries = this._selector.split(',').map(function (selector) { 3857 return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; 3858 }); 3859 3860 var $link = $([].slice.call(document.querySelectorAll(queries.join(',')))); 3861 3862 if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) { 3863 $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE); 3864 $link.addClass(ClassName$8.ACTIVE); 3865 } else { 3866 // Set triggered link as active 3867 $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active 3868 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 3869 3870 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item 3871 3872 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE); 3873 } 3874 3875 $(this._scrollElement).trigger(Event$8.ACTIVATE, { 3876 relatedTarget: target 3877 }); 3878 }; 3879 3880 _proto._clear = function _clear() { 3881 [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { 3882 return node.classList.contains(ClassName$8.ACTIVE); 3883 }
3883).forEach(function (node) { 3884 return node.classList.remove(ClassName$8.ACTIVE); 3885 }); 3886 } // Static 3887 ; 3888 3889 ScrollSpy._jQueryInterface = function _jQueryInterface(config) { 3890 return this.each(function () { 3891 var data = $(this).data(DATA_KEY$8); 3892 3893 var _config = typeof config === 'object' && config; 3894 3895 if (!data) { 3896 data = new ScrollSpy(this, _config); 3897 $(this).data(DATA_KEY$8, data); 3898 } 3899 3900 if (typeof config === 'string') { 3901 if (typeof data[config] === 'undefined') { 3902 throw new TypeError("No method named \"" + config + "\""); 3903 } 3904 3905 data[config](); 3906 } 3907 }); 3908 }; 3909 3910 _createClass(ScrollSpy, null, [{ 3911 key: "VERSION", 3912 get: function get() { 3913 return VERSION$8; 3914 } 3915 }, { 3916 key: "Default", 3917 get: function get() { 3918 return Default$6; 3919 } 3920 }]); 3921 3922 return ScrollSpy; 3923 }(); 3924 /** 3925 * ------------------------------------------------------------------------ 3926 * Data Api implementation 3927 * ------------------------------------------------------------------------ 3928 */ 3929 3930 3931 $(window).on(Event$8.LOAD_DATA_API, function () { 3932 var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY)); 3933 var scrollSpysLength = scrollSpys.length; 3934 3935 for (var i = scrollSpysLength; i--;) { 3936 var $spy = $(scrollSpys[i]); 3937 3938 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 3939 } 3940 }); 3941 /** 3942 * ------------------------------------------------------------------------ 3943 * jQuery 3944 * ------------------------------------------------------------------------ 3945 */ 3946 3947 $.fn[NAME$8] = ScrollSpy._jQueryInterface; 3948 $.fn[NAME$8].Constructor = ScrollSpy; 3949 3950 $.fn[NAME$8].noConflict = function () { 3951 $.fn[NAME$8] = JQUERY_NO_CONFLICT$8; 3952 return ScrollSpy._jQueryInterface; 3953 }; 3954 3955 /** 3956 * ------------------------------------------------------------------------ 3957 * Constants 3958 * ------------------------------------------------------------------------ 3959 */ 3960 3961 var NAME$9 = 'tab'; 3962 var VERSION$9 = '4.3.1'; 3963 var DATA_KEY$9 = 'bs.tab'; 3964 var EVENT_KEY$9 = "." + DATA_KEY$9; 3965 var DATA_API_KEY$7 = '.data-api'; 3966 var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9]; 3967 var Event$9 = { 3968 HIDE: "hide" + EVENT_KEY$9, 3969 HIDDEN: "hidden" + EVENT_KEY$9, 3970 SHOW: "show" + EVENT_KEY$9, 3971 SHOWN: "shown" + EVENT_KEY$9, 3972 CLICK_DATA_API: "click" + EVENT_KEY$9 + DATA_API_KEY$7 3973 }; 3974 var ClassName$9 = { 3975 DROPDOWN_MENU: 'dropdown-menu', 3976 ACTIVE: 'active', 3977 DISABLED: 'disabled', 3978 FADE: 'fade', 3979 SHOW: 'show' 3980 }; 3981 var Selector$9 = { 3982 DROPDOWN: '.dropdown', 3983 NAV_LIST_GROUP: '.nav, .list-group', 3984 ACTIVE: '.active', 3985 ACTIVE_UL: '> li > .active', 3986 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', 3987 DROPDOWN_TOGGLE: '.dropdown-toggle', 3988 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' 3989 /** 3990 * ------------------------------------------------------------------------ 3991 * Class Definition 3992 * ------------------------------------------------------------------------ 3993 */ 3994 3995 }; 3996 3997 var Tab = 3998 /*#__PURE__*/ 3999 function () { 4000 function Tab(element) { 4001 this._element = element; 4002 } // Getters 4003 4004 4005 var _proto = Tab.prototype; 4006 4007 // Public 4008 _proto.show = function show() { 4009 var _this = this; 4010 4011 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) { 4012 return; 4013 } 4014 4015 var target; 4016 var previous; 4017 var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0]; 4018 var selector = Util.getSelectorFromElement(this._element); 4019 4020 if (listElement) { 4021 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE; 4022 previous = $.makeArray($(listElement).find(itemSelector)); 4023 previous = previous[previous.length - 1]; 4024 } 4025 4026 var hideEvent = $.Event(Event$9.HIDE, { 4027 relatedTarget: this._element 4028 }); 4029 var showEvent = $.Event(Event$9.SHOW, { 4030 relatedTarget: previous 4031 }); 4032 4033 if (previous) { 4034 $(previous).trigger(hideEvent); 4035 } 4036 4037 $(this._element).trigger(showEvent); 4038 4039 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { 4040 return; 4041 } 4042 4043 if (selector) { 4044 target = document.querySelector(selector); 4045 } 4046 4047 this._activate(this._element, listElement); 4048 4049 var complete = function complete() { 4050 var hiddenEvent = $.Event(Event$9.HIDDEN, { 4051 relatedTarget: _this._element 4052 }); 4053 var shownEvent = $.Event(Event$9.SHOWN, { 4054 relatedTarget: previous 4055 }); 4056 $(previous).trigger(hiddenEvent); 4057 $(_this._element).trigger(shownEvent); 4058 }; 4059 4060 if (target) { 4061 this._activate(target, target.parentNode, complete); 4062 } else { 4063 complete(); 4064 } 4065 }; 4066 4067 _proto.dispose = function dispose() { 4068 $.removeData(this._element, DATA_KEY$9); 4069 this._element = null; 4070 } // Private 4071 ; 4072 4073 _proto._activate = function _activate(element, container, callback) { 4074 var _this2 = this; 4075 4076 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE); 4077 var active = activeElements[0]; 4078 var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE); 4079 4080 var complete = function complete() { 4081 return _this2._transitionComplete(element, active, callback); 4082 }; 4083 4084 if (active && isTransitioning) { 4085 var transitionDuration = Util.getTransitionDurationFromElement(active); 4086 $(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 4087 } else { 4088 complete(); 4089 } 4090 }; 4091 4092 _proto._transitionComplete = function _transitionComplete(element, active, callback) { 4093 if (active) { 4094 $(active).removeClass(ClassName$9.ACTIVE);
4095 var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0]; 4096 4097 if (dropdownChild) { 4098 $(dropdownChild).removeClass(ClassName$9.ACTIVE); 4099 } 4100 4101 if (active.getAttribute('role') === 'tab') { 4102 active.setAttribute('aria-selected', false); 4103 } 4104 } 4105 4106 $(element).addClass(ClassName$9.ACTIVE); 4107 4108 if (element.getAttribute('role') === 'tab') { 4109 element.setAttribute('aria-selected', true); 4110 } 4111 4112 Util.reflow(element); 4113 4114 if (element.classList.contains(ClassName$9.FADE)) { 4115 element.classList.add(ClassName$9.SHOW); 4116 } 4117 4118 if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) { 4119 var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0]; 4120 4121 if (dropdownElement) { 4122 var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE)); 4123 $(dropdownToggleList).addClass(ClassName$9.ACTIVE); 4124 } 4125 4126 element.setAttribute('aria-expanded', true); 4127 } 4128 4129 if (callback) { 4130 callback(); 4131 } 4132 } // Static 4133 ; 4134 4135 Tab._jQueryInterface = function _jQueryInterface(config) { 4136 return this.each(function () { 4137 var $this = $(this); 4138 var data = $this.data(DATA_KEY$9); 4139 4140 if (!data) { 4141 data = new Tab(this); 4142 $this.data(DATA_KEY$9, data); 4143 } 4144 4145 if (typeof config === 'string') { 4146 if (typeof data[config] === 'undefined') { 4147 throw new TypeError("No method named \"" + config + "\""); 4148 } 4149 4150 data[config](); 4151 } 4152 }); 4153 }; 4154 4155 _createClass(Tab, null, [{ 4156 key: "VERSION", 4157 get: function get() { 4158 return VERSION$9; 4159 } 4160 }]); 4161 4162 return Tab; 4163 }(); 4164 /** 4165 * ------------------------------------------------------------------------ 4166 * Data Api implementation 4167 * ------------------------------------------------------------------------ 4168 */ 4169 4170 4171 $(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) { 4172 event.preventDefault(); 4173 4174 Tab._jQueryInterface.call($(this), 'show'); 4175 }); 4176 /** 4177 * ------------------------------------------------------------------------ 4178 * jQuery 4179 * ------------------------------------------------------------------------ 4180 */ 4181 4182 $.fn[NAME$9] = Tab._jQueryInterface; 4183 $.fn[NAME$9].Constructor = Tab; 4184 4185 $.fn[NAME$9].noConflict = function () { 4186 $.fn[NAME$9] = JQUERY_NO_CONFLICT$9; 4187 return Tab._jQueryInterface; 4188 }; 4189 4190 /** 4191 * ------------------------------------------------------------------------ 4192 * Constants 4193 * ------------------------------------------------------------------------ 4194 */ 4195 4196 var NAME$a = 'toast'; 4197 var VERSION$a = '4.3.1'; 4198 var DATA_KEY$a = 'bs.toast'; 4199 var EVENT_KEY$a = "." + DATA_KEY$a; 4200 var JQUERY_NO_CONFLICT$a = $.fn[NAME$a]; 4201 var Event$a = { 4202 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a, 4203 HIDE: "hide" + EVENT_KEY$a, 4204 HIDDEN: "hidden" + EVENT_KEY$a, 4205 SHOW: "show" + EVENT_KEY$a, 4206 SHOWN: "shown" + EVENT_KEY$a 4207 }; 4208 var ClassName$a = { 4209 FADE: 'fade', 4210 HIDE: 'hide', 4211 SHOW: 'show', 4212 SHOWING: 'showing' 4213 }; 4214 var DefaultType$7 = { 4215 animation: 'boolean', 4216 autohide: 'boolean', 4217 delay: 'number' 4218 }; 4219 var Default$7 = { 4220 animation: true, 4221 autohide: true, 4222 delay: 500 4223 }; 4224 var Selector$a = { 4225 DATA_DISMISS: '[data-dismiss="toast"]' 4226 /** 4227 * ------------------------------------------------------------------------ 4228 * Class Definition 4229 * ------------------------------------------------------------------------ 4230 */ 4231 4232 }; 4233 4234 var Toast = 4235 /*#__PURE__*/ 4236 function () { 4237 function Toast(element, config) { 4238 this._element = element; 4239 this._config = this._getConfig(config); 4240 this._timeout = null; 4241 4242 this._setListeners(); 4243 } // Getters 4244 4245 4246 var _proto = Toast.prototype; 4247 4248 // Public 4249 _proto.show = function show() { 4250 var _this = this; 4251 4252 $(this._element).trigger(Event$a.SHOW); 4253 4254 if (this._config.animation) { 4255 this._element.classList.add(ClassName$a.FADE); 4256 } 4257 4258 var complete = function complete() { 4259 _this._element.classList.remove(ClassName$a.SHOWING); 4260 4261 _this._element.classList.add(ClassName$a.SHOW); 4262 4263 $(_this._element).trigger(Event$a.SHOWN); 4264 4265 if (_this._config.autohide) { 4266 _this.hide(); 4267 } 4268 }; 4269 4270 this._element.classList.remove(ClassName$a.HIDE); 4271 4272 this._element.classList.add(ClassName$a.SHOWING); 4273 4274 if (this._config.animation) { 4275 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 4276 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 4277 } else { 4278 complete(); 4279 } 4280 }; 4281 4282 _proto.hide = function hide(withoutTimeout) { 4283 var _this2 = this; 4284 4285 if (!this._element.classList.contains(ClassName$a.SHOW)) { 4286 return; 4287 } 4288 4289 $(this._element).trigger(Event$a.HIDE); 4290 4291 if (withoutTimeout) { 4292 this._close(); 4293 } else { 4294 this._timeout = setTimeout(function () { 4295 _this2._close(); 4296 }, this._config.delay); 4297 } 4298 }; 4299 4300 _proto.dispose = function dispose() { 4301 clearTimeout(this._timeout); 4302 this._timeout = null; 4303 4304 if (this._element.classList.contains(ClassName$a.SHOW)) { 4305 this._element.classList.remove(ClassName$a.SHOW); 4306 } 4307 4308 $(this._element).off(Event$a.CLICK_DISMISS); 4309 $.removeData(this._element, DATA_KEY$a); 4310 this._element = null; 4311 this._config = null; 4312 } // Private 4313 ; 4314 4315 _proto._getConfig = function _getConfig(config) { 4316 config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {}); 4317 Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType); 4318 return config; 4319 }; 4320 4321 _proto._setListeners = function _setListeners() { 4322 var _this3 = this; 4323 4324 $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () { 4325 return _this3.hide(true); 4326 }); 4327 }; 4328 4329 _proto._close = function _close() { 4330 var _this4 = this; 4331 4332 var complete = function complete() { 4333 _this4._element.classList.add(ClassName$a.HIDE); 4334 4335 $(_this4._element).trigger(Event$a.HIDDEN); 4336 }; 4337 4338 this._element.classList.remove(ClassName$a.SHOW); 4339 4340 if (this._config.animation) { 4341 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 4342 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 4343 } else { 4344 complete(); 4345 } 4346 } // Static 4347 ; 4348 4349 Toast._jQueryInterface = function _jQueryInterface(config) { 4350 return this.each(function () { 4351 var $element = $(this); 4352 var data = $element.data(DATA_KEY$a); 4353 4354 var _config = typeof config === 'object' && config; 4355 4356 if (!data) { 4357 data = new Toast(this, _config); 4358 $element.data(DATA_KEY$a, data); 4359 } 4360 4361 if (typeof config === 'string') { 4362 if (typeof data[config] === 'undefined') {
vendor: 14,170 bytes, lines 4363-4451
4363 throw new TypeError("No method named \"" + config + "\""); 4364 } 4365 4366 data[config](this); 4367 } 4368 }); 4369 }; 4370 4371 _createClass(Toast, null, [{ 4372 key: "VERSION", 4373 get: function get() { 4374 return VERSION$a; 4375 } 4376 }, { 4377 key: "DefaultType", 4378 get: function get() { 4379 return DefaultType$7; 4380 } 4381 }, { 4382 key: "Default", 4383 get: function get() { 4384 return Default$7; 4385 } 4386 }]); 4387 4388 return Toast; 4389 }(); 4390 /** 4391 * ------------------------------------------------------------------------ 4392 * jQuery 4393 * ------------------------------------------------------------------------ 4394 */ 4395 4396 4397 $.fn[NAME$a] = Toast._jQueryInterface; 4398 $.fn[NAME$a].Constructor = Toast; 4399 4400 $.fn[NAME$a].noConflict = function () { 4401 $.fn[NAME$a] = JQUERY_NO_CONFLICT$a; 4402 return Toast._jQueryInterface; 4403 }; 4404 4405 /** 4406 * -------------------------------------------------------------------------- 4407 * Bootstrap (v4.3.1): index.js 4408 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 4409 * -------------------------------------------------------------------------- 4410 */ 4411 4412 (function () { 4413 if (typeof $ === 'undefined') { 4414 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 4415 } 4416 4417 var version = $.fn.jquery.split(' ')[0].split('.'); 4418 var minMajor = 1; 4419 var ltMajor = 2; 4420 var minMinor = 9; 4421 var minPatch = 1; 4422 var maxMajor = 4; 4423 4424 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { 4425 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 4426 } 4427 })(); 4428 4429 exports.Util = Util; 4430 exports.Alert = Alert; 4431 exports.Button = Button; 4432 exports.Carousel = Carousel; 4433 exports.Collapse = Collapse; 4434 exports.Dropdown = Dropdown; 4435 exports.Modal = Modal; 4436 exports.Popover = Popover; 4437 exports.Scrollspy = ScrollSpy; 4438 exports.Tab = Tab; 4439 exports.Toast = Toast; 4440 exports.Tooltip = Tooltip; 4441 4442 Object.defineProperty(exports, '__esModule', { value: true }); 4443 4444})); 4445 4446/*! 4447 * Bootstrap v4.5.2 (https://getbootstrap.com/) 4448 * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4449 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4450 */ 4451!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exports, require("jquery"), require("popper.js")) : "function" == typeof define && define.amd ? define(["exports", "jquery", "popper.js"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).bootstrap = {}, t.jQuery, t.Popper) }(this, (function (t, e, n) { "use strict"; function i(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } function o(t, e, n) { return e && i(t.prototype, e), n && i(t, n), t } function s() { return (s = Object.assign || function (t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]) } return t }).apply(this, arguments) } e = e && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e, n = n && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n; function r(t) { var n = this, i = !1; return e(this).one(a.TRANSITION_END, (function () { i = !0 })), setTimeout((function () { i || a.triggerTransitionEnd(n) }), t), this } var a = { TRANSITION_END: "bsTransitionEnd", getUID: function (t) { do { t += ~~(1e6 * Math.random()) } while (document.getElementById(t)); return t }, getSelectorFromElement: function (t) { var e = t.getAttribute("data-target"); if (!e || "#" === e) { var n = t.getAttribute("href"); e = n && "#" !== n ? n.trim() : "" } try { return document.querySelector(e) ? e : null } catch (t) { return null } }, getTransitionDurationFromElement: function (t) { if (!t) return 0; var n = e(t).css("transition-duration"), i = e(t).css("transition-delay"), o = parseFloat(n), s = parseFloat(i); return o || s ? (n = n.split(",")[0], i = i.split(",")[0], 1e3 * (parseFloat(n) + parseFloat(i))) : 0 }, reflow: function (t) { return t.offsetHeight }, triggerTransitionEnd: function (t) { e(t).trigger("transitionend") }, supportsTransitionEnd: function () { return Boolean("transitionend") }, isElement: function (t) { return (t[0] || t).nodeType }, typeCheckConfig: function (t, e, n) { for (var i in n) if (Object.prototype.hasOwnProperty.call(n, i)) { var o = n[i], s = e[i], r = s && a.isElement(s) ? "element" : null === (l = s) || "undefined" == typeof l ? "" + l : {}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase(); if (!new RegExp(o).test(r)) throw new Error(t.toUpperCase() + ': Option "' + i + '" provided type "' + r + '" but expected type "' + o + '".') } var l }, findShadowRoot: function (t) { if (!document.documentElement.attachShadow) return null; if ("function" == typeof t.getRootNode) { var e = t.getRootNode(); return e instanceof ShadowRoot ? e : null } return t instanceof ShadowRoot ? t : t.parentNode ? a.findShadowRoot(t.parentNode) : null }, jQueryDetection: function () { if ("undefined" == typeof e) throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript."); var t = e.fn.jquery.split(" ")[0].split("."); if (t[0] < 2 && t[1] < 9 || 1 === t[0] && 9 === t[1] && t[2] < 1 || t[0] >= 4) throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0") } }; a.jQueryDetection(), e.fn.emulateTransitionEnd = r, e.event.special[a.TRANSITION_END] = { bindType: "transitionend", delegateType: "transitionend", handle: function (t) { if (e(t.target).is(this)) return t.handleObj.handler.apply(this, arguments) } }; var l = "alert", c = e.fn[l], h = function () { function t(t) { this._element = t } var n = t.prototype; return n.close = function (t) { var e = this._element; t && (e = this._getRootElement(t)), this._triggerCloseEvent(e).isDefaultPrevented() || this._removeElement(e) }, n.dispose = function () { e.removeData(this._element, "bs.alert"), this._element = null }, n._getRootElement = function (t) { var n = a.getSelectorFromElement(t), i = !1; return n && (i = document.querySelector(n)), i || (i = e(t).closest(".alert")[0]), i }, n._triggerCloseEvent = function (t) { var n = e.Event("close.bs.alert"); return e(t).trigger(n), n }, n._removeElement = function (t) { var n = this; if (e(t).removeClass("show"), e(t).hasClass("fade")) { var i = a.getTransitionDurationFromElement(t); e(t).one(a.TRANSITION_END, (function (e) { return n._destroyElement(t, e) })).emulateTransitionEnd(i) } else this._destroyElement(t) }, n._destroyElement = function (t) { e(t).detach().trigger("closed.bs.alert").remove() }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this), o = i.data("bs.alert"); o || (o = new t(this), i.data("bs.alert", o)), "close" === n && o[n](this) })) }, t._handleDismiss = function (t) { return function (e) { e && e.preventDefault(), t.close(this) } }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }]), t }(); e(document).on("click.bs.alert.data-api", '[data-dismiss="alert"]', h._handleDismiss(new h)), e.fn[l] = h._jQueryInterface, e.fn[l].Constructor = h, e.fn[l].noConflict = function () { return e.fn[l] = c, h._jQueryInterface }; var u = e.fn.button, d = function () { function t(t) { this._element = t } var n = t.prototype; return n.toggle = function () { var t = !0, n = !0, i = e(this._element).closest('[data-toggle="buttons"]')[0]; if (i) { var o = this._element.querySelector('input:not([type="hidden"])'); if (o) { if ("radio" === o.type) if (o.checked && this._element.classList.contains("active")) t = !1; else { var s = i.querySelector(".active"); s && e(s).removeClass("active") } t && ("checkbox" !== o.type && "radio" !== o.type || (o.checked = !this._element.classList.contains("active")), e(o).trigger("change")), o.focus(), n = !1 } } this._element.hasAttribute("disabled") || this._element.classList.contains("disabled") || (n && this._element.setAttribute("aria-pressed", !this._element.classList.contains("active")), t && e(this._element).toggleClass("active")) }, n.dispose = function () { e.removeData(this._element, "bs.button"), this._element = null }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this).data("bs.button"); i || (i = new t(this), e(this).data("bs.button", i)), "toggle" === n && i[n]() })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }]), t }(); e(document).on("click.bs.button.data-api", '[data-toggle^="button"]', (function (t) { var n = t.target, i = n; if (e(n).hasClass("btn") || (n = e(n).closest(".btn")[0]), !n || n.hasAttribute("disabled") || n.classList.contains("disabled")) t.preventDefault(); else { var o = n.querySelector('input:not([type="hidden"])'); if (o && (o.hasAttribute("disabled") || o.classList.contains("disabled"))) return void t.preventDefault(); ("LABEL" !== i.tagName || o && "checkbox" !== o.type) && d._jQueryInterface.call(e(n), "toggle") } })).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', (function (t) { var n = e(t.target).closest(".btn")[0]; e(n).toggleClass("focus", /^focus(in)?$/.test(t.type)) })), e(window).on("load.bs.button.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')), e = 0, n = t.length; e < n; e++) { var i = t[e], o = i.querySelector('input:not([type="hidden"])'); o.checked || o.hasAttribute("checked") ? i.classList.add("active") : i.classList.remove("active") } for (var s = 0, r = (t = [].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length; s < r; s++) { var a = t[s]; "true" === a.getAttribute("aria-pressed") ? a.classList.add("active") : a.classList.remove("active") } })), e.fn.button = d._jQueryInterface, e.fn.button.Constructor = d, e.fn.button.noConflict = function () { return e.fn.button = u, d._jQueryInterface }; var f = "carousel", g = ".bs.carousel", m = e.fn[f], p = { interval: 5e3, keyboard: !0, slide: !1, pause: "hover", wrap: !0, touch: !0 }, _ = { interval: "(number|boolean)", keyboard: "boolean", slide: "(boolean|string)", pause: "(string|boolean)", wrap: "boolean", touch: "boolean" }, v = { TOUCH: "touch", PEN: "pen" }, b = function () { function t(t, e) { this._items = null, this._interval = null, this._activeElement = null, this._isPaused = !1, this._isSliding = !1, this.touchTimeout = null, this.touchStartX = 0, this.touchDeltaX = 0, this._config = this._getConfig(e), this._element = t, this._indicatorsElement = this._element.querySelector(".carousel-indicators"), this._touchSupported = "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0, this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent), this._addEventListeners() } var n = t.prototype; return n.next = function () { this._isSliding || this._slide("next") }, n.nextWhenVisible = function () { !document.hidden && e(this._element).is(":visible") && "hidden" !== e(this._element).css("visibility") && this.next() }, n.prev = function () { this._isSliding || this._slide("prev") }, n.pause = function (t) { t || (this._isPaused = !0), this._element.querySelector(".carousel-item-next, .carousel-item-prev") && (a.triggerTransitionEnd(this._element), this.cycle(!0)), clearInterval(this._interval), this._interval = null }, n.cycle = function (t) { t || (this._isPaused = !1), this._interval && (clearInterval(this._interval), this._interval = null), this._config.interval && !this._isPaused && (this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval)) }, n.to = function (t) { var n = this; this._activeElement = this._element.querySelector(".active.carousel-item"); var i = this._getItemIndex(this._activeElement); if (!(t > this._items.length - 1 || t < 0)) if (this._isSliding) e(this._element).one("slid.bs.carousel", (function () { return n.to(t) })); else { if (i === t) return this.pause(), void this.cycle(); var o = t > i ? "next" : "prev"; this._slide(o, this._items[t]) } }, n.dispose = function () { e(this._element).off(g), e.removeData(this._element, "bs.carousel"), this._items = null, this._config = null, this._element = null, this._interval = null, this._isPaused = null, this._isSliding = null, this._activeElement = null, this._indicatorsElement = null }, n._getConfig = function (t) { return t = s({}, p, t), a.typeCheckConfig(f, t, _), t }, n._handleSwipe = function () { var t = Math.abs(this.touchDeltaX); if (!(t <= 40)) { var e = t / this.touchDeltaX; this.touchDeltaX = 0, e > 0 && this.prev(), e < 0 && this.next() } }, n._addEventListeners = function () { var t = this; this._config.keyboard && e(this._element).on("keydown.bs.carousel", (function (e) { return t._keydown(e) })), "hover" === this._config.pause && e(this._element).on("mouseenter.bs.carousel", (function (e) { return t.pause(e) })).on("mouseleave.bs.carousel", (function (e) { return t.cycle(e) })), this._config.touch && this._addTouchEventListeners() }, n._addTouchEventListeners = function () { var t = this; if (this._touchSupported) { var n = function (e) { t._pointerEvent && v[e.originalEvent.pointerType.toUpperCase()] ? t.touchStartX = e.originalEvent.clientX : t._pointerEvent || (t.touchStartX = e.originalEvent.touches[0].clientX) }, i = function (e) { t._pointerEvent && v[e.originalEvent.pointerType.toUpperCase()] && (t.touchDeltaX = e.originalEvent.clientX - t.touchStartX), t._handleSwipe(), "hover" === t._config.pause && (t.pause(), t.touchTimeout && clearTimeout(t.touchTimeout), t.touchTimeout = setTimeout((function (e) { return t.cycle(e) }), 500 + t._config.interval)) }; e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.c
4451arousel", (function (t) { return t.preventDefault() })), this._pointerEvent ? (e(this._element).on("pointerdown.bs.carousel", (function (t) { return n(t) })), e(this._element).on("pointerup.bs.carousel", (function (t) { return i(t) })), this._element.classList.add("pointer-event")) : (e(this._element).on("touchstart.bs.carousel", (function (t) { return n(t) })), e(this._element).on("touchmove.bs.carousel", (function (e) { return function (e) { e.originalEvent.touches && e.originalEvent.touches.length > 1 ? t.touchDeltaX = 0 : t.touchDeltaX = e.originalEvent.touches[0].clientX - t.touchStartX }(e) })), e(this._element).on("touchend.bs.carousel", (function (t) { return i(t) }))) } }, n._keydown = function (t) { if (!/input|textarea/i.test(t.target.tagName)) switch (t.which) { case 37: t.preventDefault(), this.prev(); break; case 39: t.preventDefault(), this.next() } }, n._getItemIndex = function (t) { return this._items = t && t.parentNode ? [].slice.call(t.parentNode.querySelectorAll(".carousel-item")) : [], this._items.indexOf(t) }, n._getItemByDirection = function (t, e) { var n = "next" === t, i = "prev" === t, o = this._getItemIndex(e), s = this._items.length - 1; if ((i && 0 === o || n && o === s) && !this._config.wrap) return e; var r = (o + ("prev" === t ? -1 : 1)) % this._items.length; return -1 === r ? this._items[this._items.length - 1] : this._items[r] }, n._triggerSlideEvent = function (t, n) { var i = this._getItemIndex(t), o = this._getItemIndex(this._element.querySelector(".active.carousel-item")), s = e.Event("slide.bs.carousel", { relatedTarget: t, direction: n, from: o, to: i }); return e(this._element).trigger(s), s }, n._setActiveIndicatorElement = function (t) { if (this._indicatorsElement) { var n = [].slice.call(this._indicatorsElement.querySelectorAll(".active")); e(n).removeClass("active"); var i = this._indicatorsElement.children[this._getItemIndex(t)]; i && e(i).addClass("active") } }, n._slide = function (t, n) { var i, o, s, r = this, l = this._element.querySelector(".active.carousel-item"), c = this._getItemIndex(l), h = n || l && this._getItemByDirection(t, l), u = this._getItemIndex(h), d = Boolean(this._interval); if ("next" === t ? (i = "carousel-item-left", o = "carousel-item-next", s = "left") : (i = "carousel-item-right", o = "carousel-item-prev", s = "right"), h && e(h).hasClass("active")) this._isSliding = !1; else if (!this._triggerSlideEvent(h, s).isDefaultPrevented() && l && h) { this._isSliding = !0, d && this.pause(), this._setActiveIndicatorElement(h); var f = e.Event("slid.bs.carousel", { relatedTarget: h, direction: s, from: c, to: u }); if (e(this._element).hasClass("slide")) { e(h).addClass(o), a.reflow(h), e(l).addClass(i), e(h).addClass(i); var g = parseInt(h.getAttribute("data-interval"), 10); g ? (this._config.defaultInterval = this._config.defaultInterval || this._config.interval, this._config.interval = g) : this._config.interval = this._config.defaultInterval || this._config.interval; var m = a.getTransitionDurationFromElement(l); e(l).one(a.TRANSITION_END, (function () { e(h).removeClass(i + " " + o).addClass("active"), e(l).removeClass("active " + o + " " + i), r._isSliding = !1, setTimeout((function () { return e(r._element).trigger(f) }), 0) })).emulateTransitionEnd(m) } else e(l).removeClass("active"), e(h).addClass("active"), this._isSliding = !1, e(this._element).trigger(f); d && this.cycle() } }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this).data("bs.carousel"), o = s({}, p, e(this).data()); "object" == typeof n && (o = s({}, o, n)); var r = "string" == typeof n ? n : o.slide; if (i || (i = new t(this, o), e(this).data("bs.carousel", i)), "number" == typeof n) i.to(n); else if ("string" == typeof r) { if ("undefined" == typeof i[r]) throw new TypeError('No method named "' + r + '"'); i[r]() } else o.interval && o.ride && (i.pause(), i.cycle()) })) }, t._dataApiClickHandler = function (n) { var i = a.getSelectorFromElement(this); if (i) { var o = e(i)[0]; if (o && e(o).hasClass("carousel")) { var r = s({}
vendor: 5,002 bytes, line 4451
4451, e(o).data(), e(this).data()), l = this.getAttribute("data-slide-to"); l && (r.interval = !1), t._jQueryInterface.call(e(o), r), l && e(o).data("bs.carousel").to(l), n.preventDefault() } } }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return p } }]), t }(); e(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", b._dataApiClickHandler), e(window).on("load.bs.carousel.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-ride="carousel"]')), n = 0, i = t.length; n < i; n++) { var o = e(t[n]); b._jQueryInterface.call(o, o.data()) } })), e.fn[f] = b._jQueryInterface, e.fn[f].Constructor = b, e.fn[f].noConflict = function () { return e.fn[f] = m, b._jQueryInterface }; var y = "collapse", E = e.fn[y], w = { toggle: !0, parent: "" }, T = { toggle: "boolean", parent: "(string|element)" }, C = function () { function t(t, e) { this._isTransitioning = !1, this._element = t, this._config = this._getConfig(e), this._triggerArray = [].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#' + t.id + '"],[data-toggle="collapse"][data-target="#' + t.id + '"]')); for (var n = [].slice.call(document.querySelectorAll('[data-toggle="collapse"]')), i = 0, o = n.length; i < o; i++) { var s = n[i], r = a.getSelectorFromElement(s), l = [].slice.call(document.querySelectorAll(r)).filter((function (e) { return e === t })); null !== r && l.length > 0 && (this._selector = r, this._triggerArray.push(s)) } this._parent = this._config.parent ? this._getParent() : null, this._config.parent || this._addAriaAndCollapsedClass(this._element, this._triggerArray), this._config.toggle && this.toggle() } var n = t.prototype; return n.toggle = function () { e(this._element).hasClass("show") ? this.hide() : this.show() }, n.show = function () { var n, i, o = this; if (!this._isTransitioning && !e(this._element).hasClass("show") && (this._parent && 0 === (n = [].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function (t) { return "string" == typeof o._config.parent ? t.getAttribute("data-parent") === o._config.parent : t.classList.contains("collapse") }))).length && (n = null), !(n && (i = e(n).not(this._selector).data("bs.collapse")) && i._isTransitioning))) { var s = e.Event("show.bs.collapse"); if (e(this._element).trigger(s), !s.isDefaultPrevented()) { n && (t._jQueryInterface.call(e(n).not(this._selector), "hide"), i || e(n).data("bs.collapse", null)); var r = this._getDimension(); e(this._element).removeClass("collapse").addClass("collapsing"), this._element.style[r] = 0, this._triggerArray.length && e(this._triggerArray).removeClass("collapsed").attr("aria-expanded", !0), this.setTransitioning(!0); var l = "scroll" + (r[0].toUpperCase() + r.slice(1)), c = a.getTransitionDurationFromElement(this._element); e(this._element).one(a.TRANSITION_END, (function () { e(o._element).removeClass("collapsing").addClass("collapse show"), o._element.style[r] = "", o.setTransitioning(!1), e(o._element).trigger("shown.bs.collapse") })).emulateTransitionEnd(c), this._element.style[r] = this._element[l] + "px" } } }, n.hide = function () { var t = this; if (!this._isTransitioning && e(this._element).hasClass("show")) { var n = e.Event("hide.bs.collapse"); if (e(this._element).trigger(n), !n.isDefaultPrevented()) { var i = this._getDimension(); this._element.style[i] = this._element.getBoundingClientRect()[i] + "px", a.reflow(this._element), e(this._element).addClass("collapsing").removeClass("collapse show"); var o = this._triggerArray.length; if (o > 0) for (var s = 0; s < o; s++) { var r = this._triggerArray[s], l = a.getSelectorFromElement(r); if (null !== l) e([].slice.call(document.querySelectorAll(l))).hasClass("show") || e(r).addClass("collapsed").attr("aria-expanded", !1) } this.setTransitioning(!0); this._element.style[i] = ""; var c = a.getTransitionDurationFromElement(this._element); e(this._element).one(a.TRANSITION_END, (function () { t.setTransitioning(!1), e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse") })).emulateTransitionEnd(c) } } }, n.setTransitioning = function (t) { this._isTransitioning = t }, n.dispose = function () { e.removeData(this._element, "bs.collapse"), this._config = null, this._parent = null, this._element = null, this._triggerArray = null, this._isTransitioning = null }, n._getConfig = function (t) { return (t = s({}, w, t)).toggle = Boolean(t.toggle), a.typeCheckConfig(y, t, T), t }, n._getDimension = function () { return e(this._element).hasClass("width") ? "width" : "height" }, n._getParent = function () { var n, i = this; a.isElement(this._config.parent) ? (n = this._config.parent, "undefined" != typeof this._config.parent.jquery && (n = this._config.parent[0])) : n = document.querySelector(this._config.parent); var o = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]', s = [].slice.call(n.querySelectorAll(
4451o)); return e(s).each((function (e, n) { i._addAriaAndCollapsedClass(t._getTargetFromElement(n), [n]) })), n }, n._addAriaAndCollapsedClass = function (t, n) { var i = e(t).hasClass("show"); n.length && e(n).toggleClass("collapsed", !i).attr("aria-expanded", i) }, t._getTargetFromElement = function (t) { var e = a.getSelectorFromElement(t); return e ? document.querySelector(e) : null }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this), o = i.data("bs.collapse"), r = s({}, w, i.data(), "object" == typeof n && n ? n : {}); if (!o && r.toggle && "string" == typeof n && /show|hide/.test(n) && (r.toggle = !1), o || (o = new t(this, r), i.data("bs.collapse", o)), "string" == typeof n) { if ("undefined" == typeof o[n]) throw new TypeError('No method named "' + n + '"'); o[n]() } })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return w } }]), t }(); e(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', (function (t) { "A" === t.currentTarget.tagName && t.preventDefault(); var n = e(this), i = a.getSelectorFromElement(this), o = [].slice.call(document.querySelectorAll(i)); e(o).each((function () { var t = e(this), i = t.data("bs.collapse") ? "toggle" : n.data(); C._jQueryInterface.call(t, i) })) })), e.fn[y] = C._jQueryInterface, e.fn[y].Constructor = C, e.fn[y].noConflict = function () { return e.fn[y] = E, C._jQueryInterface }; var S = "dropdown", k = e.fn[S], D = new RegExp("38|40|27"), N = { offset: 0, flip: !0, boundary: "scrollParent", reference: "toggle", display: "dynamic", popperConfig: null }, A = { offset: "(number|string|function)", flip: "boolean", boundary: "(string|element)", reference: "(string|element)", display: "string", popperConfig: "(null|object)" }, I = function () { function t(t, e) { this._element = t, this._popper = null, this._config = this._getConfig(e), this._menu = this._getMenuElement(), this._inNavbar = this._detectNavbar(), this._addEventListeners() } var i = t.prototype; return i.toggle = function () { if (!this._element.disabled && !e(this._element).hasClass("disabled")) { var n = e(this._menu).hasClass("show"); t._clearMenus(), n || this.show(!0) } }, i.show = function (i) { if (void 0 === i && (i = !1), !(this._element.disabled || e(this._element).hasClass("disabled") || e(this._menu).hasClass("show"))) { var o = { relatedTarget: this._element }, s = e.Event("show.bs.dropdown", o), r = t._getParentFromElement(this._element); if (e(r).trigger(s), !s.isDefaultPrevented()) { if (!this._inNavbar && i) { if ("undefined" == typeof n) throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)"); var l = this._element; "parent" === this._config.reference ? l = r : a.isElement(this._config.reference) && (l = this._config.reference, "undefined" != typeof this._config.reference.jquery && (l = this._config.reference[0])), "scrollParent" !== this._config.boundary && e(r).addClass("position-static"), this._popper = new n(l, this._menu, this._getPopperConfig()) } "ontouchstart" in document.documentElement && 0 === e(r).closest(".navbar-nav").length && e(document.body).children().on("mouseover", null, e.noop), this._element.focus(), this._element.setAttribute("aria-expanded", !0), e(this._menu).toggleClass("show"), e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown", o)) } } }, i.hide = function () { if (!this._element.disabled && !e(this._element).hasClass("disabled") && e(this._menu).hasClass("show")) { var n = { relatedTarget: this._element }, i = e.Event("hide.bs.dropdown", n), o = t._getParentFromElement(this._element); e(o).trigger(i), i.isDefaultPrevented() || (this._popper && this._popper.destroy(), e(this._menu).toggleClass("show"), e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown", n))) } }, i.dispose = function () { e.removeData(this._element, "bs.dropdown"), e(this._element).off(".bs.dropdown"), this._element = null, this._menu = null, null !== this._popper && (this._popper.destroy(), this._popper = null) }, i.update = function () { this._inNavbar = this._detectNavbar(), null !== this._popper && this._popper.scheduleUpdate() }, i._addEventListeners = function () { var t = this; e(this._element).on("click.bs.dropdown", (function (e) { e.preventDefault(), e.stopPropagation(), t.toggle(
4451) })) }, i._getConfig = function (t) { return t = s({}, this.constructor.Default, e(this._element).data(), t), a.typeCheckConfig(S, t, this.constructor.DefaultType), t }, i._getMenuElement = function () { if (!this._menu) { var e = t._getParentFromElement(this._element); e && (this._menu = e.querySelector(".dropdown-menu")) } return this._menu }, i._getPlacement = function () { var t = e(this._element.parentNode), n = "bottom-start"; return t.hasClass("dropup") ? n = e(this._menu).hasClass("dropdown-menu-right") ? "top-end" : "top-start" : t.hasClass("dropright") ? n = "right-start" : t.hasClass("dropleft") ? n = "left-start" : e(this._menu).hasClass("dropdown-menu-right") && (n = "bottom-end"), n }, i._detectNavbar = function () { return e(this._element).closest(".navbar").length > 0 }, i._getOffset = function () { var t = this, e = {}; return "function" == typeof this._config.offset ? e.fn = function (e) { return e.offsets = s({}, e.offsets, t._config.offset(e.offsets, t._element) || {}), e } : e.offset = this._config.offset, e }, i._getPopperConfig = function () { var t = { placement: this._getPlacement(), modifiers: { offset: this._getOffset(), flip: { enabled: this._config.flip }, preventOverflow: { boundariesElement: this._config.boundary } } }; return "static" === this._config.display && (t.modifiers.applyStyle = { enabled: !1 }), s({}, t, this._config.popperConfig) }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this).data("bs.dropdown"); if (i || (i = new t(this, "object" == typeof n ? n : null), e(this).data("bs.dropdown", i)), "string" == typeof n) { if ("undefined" == typeof i[n]) throw new TypeError('No method named "' + n + '"'); i[n]() } })) }, t._clearMenus = function (n) { if (!n || 3 !== n.which && ("keyup" !== n.type || 9 === n.which)) for (var i = [].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')), o = 0, s = i.length; o < s; o++) { var r = t._getParentFromElement(i[o]), a = e(i[o]).data("bs.dropdown"), l = { relatedTarget: i[o] }; if (n && "click" === n.type && (l.clickEvent = n), a) { var c = a._menu; if (e(r).hasClass("show") && !(n && ("click" === n.type && /input|textarea/i.test(n.target.tagName) || "keyup" === n.type && 9 === n.which) && e.contains(r, n.target))) { var h = e.Event("hide.bs.dropdown", l); e(r).trigger(h), h.isDefaultPrevented() || ("ontouchstart" in document.documentElement && e(document.body).children().off("mouseover", null, e.noop), i[o].setAttribute("aria-expanded", "false"), a._popper && a._popper.destroy(), e(c).removeClass("show"), e(r).removeClass("show").trigger(e.Event("hidden.bs.dropdown", l))) } } } }, t._getParentFromElement = function (t) { var e, n = a.getSelectorFromElement(t); return n && (e = document.querySelector(n)), e || t.parentNode }, t._dataApiKeydownHandler = function (n) { if (!(/input|textarea/i.test(n.target.tagName) ? 32 === n.which || 27 !== n.which && (40 !== n.which && 38 !== n.which || e(n.target).closest(".dropdown-menu").length) : !D.test(n.which)) && !this.disabled && !e(this).hasClass("disabled")) { var i = t._getParentFromElement(this), o = e(i).hasClass("show"); if (o || 27 !== n.which) { if (n.preventDefault(), n.stopPropagation(), !o || o && (27 === n.which || 32 === n.which)) return 27 === n.which && e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"), void e(this).trigger("click"); var s = [].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function (t) { return e(t).is(":visible") })); if (0 !== s.length) { var r = s.indexOf(n.target); 38 === n.which && r > 0 && r--, 40 === n.which && r < s.length - 1 && r++, r < 0 && (r = 0), s[r].focus() } } } }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return N } }, { key: "DefaultType", get: function () { return A } }]), t }(); e(document).on("keydown.bs.dropdown.data-api", '[data-toggle="dropdown"]', I._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api", ".dropdown-menu", I._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api", I._clearMenus).on("click.bs.dropdown.data-api", '[data-toggle="dropdown"]', (function (t) { t.preventDefault(), t.stopPropagation(), I._jQueryInterface.call(e(this), "toggle") })).on("click.bs.dropdown.data-api", ".dropdown form", (function (t) { t.stopPropagation() })), e.fn[S] = I._jQueryInterface, e.fn[S].Constructor = I, e.fn[S].noConflict = function () { return e.fn[S] = k, I._jQueryInterface }; var O = e.fn.modal, j = { backdrop: !0, keyboard: !0, focus: !0, show: !0 }, x = { backdrop: "(boolean|string)", keyboard: "boolean", focus: "boolean", show: "boolean" }, P = function () { function t(t, e) { this._config = this._getConfig(e), this._element = t, this._dialog = t.querySelector(".modal-dialog"), this._backdrop = null, this._isShown = !1, this._isBodyOverflowing = !1, this._ignoreBackdropClick = !1, this._isTransitioning = !1, this._scrollbarWidth = 0 } var n = t.prototype; return n.toggle = function (t) { return this._isShown ? this.hide() : this.show(t) }, n.show = function (t) { var n = this; if (!this._isShown && !this._isTransitioning) { e(this._element).hasClass("fade") && (this._isTransitioning = !0); var i = e.Event("show.bs.modal", { relatedTarget: t }); e(this._element).trigger(i), this._isShown || i.isDefaultPrevented() || (this._isShown = !0, this._checkScrollbar(), this._setScrollbar(), this._adjustDialog(), this._setEscapeEvent(), this._setResizeEvent(), e(this._element).on("click.dismiss.bs.modal", '[data-dismiss="modal"]', (function (t) { return n.hide(t) })), e(this._dialog).on("mousedown.dismiss.bs.modal", (function () { e(n._element).one("mouseup.dismiss.bs.modal", (function (t) { e(t.target).is(n._element) && (n._ignoreBackdropClick = !0) })) })), this._showBackdrop((function () { return n._showElement(t) }))) } }, n.hide = function (t) { var n = this; if (t && t.preventDefault(), this._isShown && !this._isTransitioning) { var i = e.Event("hide.bs.modal"); if (e(this._element).trigger(i), this._isShown && !i.isDefaultPrevented()) { this._isShown = !1; var o = e(this._element).hasClass("fade"); if (o && (this._isTransitioning = !0), this._setEscapeEvent(), this._setResizeEvent(), e(document).off("focusin.bs.modal"), e(this._element).removeClass("show"), e(this._element).off("
4451click.dismiss.bs.modal"), e(this._dialog).off("mousedown.dismiss.bs.modal"), o) { var s = a.getTransitionDurationFromElement(this._element); e(this._element).one(a.TRANSITION_END, (function (t) { return n._hideModal(t) })).emulateTransitionEnd(s) } else this._hideModal() } } }, n.dispose = function () { [window, this._element, this._dialog].forEach((function (t) { return e(t).off(".bs.modal") })), e(document).off("focusin.bs.modal"), e.removeData(this._element, "bs.modal"), this._config = null, this._element = null, this._dialog = null, this._backdrop = null, this._isShown = null, this._isBodyOverflowing = null, this._ignoreBackdropClick = null, this._isTransitioning = null, this._scrollbarWidth = null }, n.handleUpdate = function () { this._adjustDialog() }, n._getConfig = function (t) { return t = s({}, j, t), a.typeCheckConfig("modal", t, x), t }, n._triggerBackdropTransition = function () { var t = this; if ("static" === this._config.backdrop) { var n = e.Event("hidePrevented.bs.modal"); if (e(this._element).trigger(n), n.defaultPrevented) return; var i = this._element.scrollHeight > document.documentElement.clientHeight; i || (this._element.style.overflowY = "hidden"), this._element.classList.add("modal-static"); var o = a.getTransitionDurationFromElement(this._dialog); e(this._element).off(a.TRANSITION_END), e(this._element).one(a.TRANSITION_END, (function () { t._element.classList.remove("modal-static"), i || e(t._element).one(a.TRANSITION_END, (function () { t._element.style.overflowY = "" })).emulateTransitionEnd(t._element, o) })).emulateTransitionEnd(o), this._element.focus() } else this.hide() }, n._showElement = function (t) { var n = this, i = e(this._element).hasClass("fade"), o = this._dialog ? this._dialog.querySelector(".modal-body") : null; this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE || document.body.appendChild(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), e(this._dialog).hasClass("modal-dialog-scrollable") && o ? o.scrollTop = 0 : this._element.scrollTop = 0, i && a.reflow(this._element), e(this._element).addClass("show"), this._config.focus && this._enforceFocus(); var s = e.Event("shown.bs.modal", { relatedTarget: t }), r = function () { n._config.focus && n._element.focus(), n._isTransitioning = !1, e(n._element).trigger(s) }; if (i) { var l = a.getTransitionDurationFromElement(this._dialog); e(this._dialog).one(a.TRANSITION_END, r).emulateTransitionEnd(l) } else r() }, n._enforceFocus = function () { var t = this; e(document).off("focusin.bs.modal").on("focusin.bs.modal", (function (n) { document !== n.target && t._element !== n.target && 0 === e(t._element).has(n.target).length && t._element.focus() })) }, n._setEscapeEvent = function () { var t = this; this._isShown ? e(this._element).on("keydown.dismiss.bs.modal", (function (e) { t._config.keyboard && 27 === e.which ? (e.preventDefault(), t.hide()) : t._config.keyboard || 27 !== e.which || t._triggerBackdropTransition() })) : this._isShown || e(this._element).off("keydown.dismiss.bs.modal") }, n._setResizeEvent = function () { var t = this; this._isShown ? e(window).on("resize.bs.modal", (function (e) { return t.handleUpdate(e) })) : e(window).off("resize.bs.modal") }, n._hideModal = function () { var t = this; this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._showBackdrop((function () { e(document.body).removeClass("modal-open"), t._resetAdjustments(), t._resetScrollbar(), e(t._element).trigger("hidden.bs.modal") })) }, n._removeBackdrop = function () { this._backdrop && (e(this._backdrop).remove(), this._backdrop = null) }, n._showBackdrop = function (t) { var n = this, i = e(this._element).hasClass("fade") ? "fade" : ""; if (this._isShown && this._config.backdrop) { if (this._backdrop = document.createElement("div"), this._backdrop.className = "modal
4451-backdrop", i && this._backdrop.classList.add(i), e(this._backdrop).appendTo(document.body), e(this._element).on("click.dismiss.bs.modal", (function (t) { n._ignoreBackdropClick ? n._ignoreBackdropClick = !1 : t.target === t.currentTarget && n._triggerBackdropTransition() })), i && a.reflow(this._backdrop), e(this._backdrop).addClass("show"), !t) return; if (!i) return void t(); var o = a.getTransitionDurationFromElement(this._backdrop); e(this._backdrop).one(a.TRANSITION_END, t).emulateTransitionEnd(o) } else if (!this._isShown && this._backdrop) { e(this._backdrop).removeClass("show"); var s = function () { n._removeBackdrop(), t && t() }; if (e(this._element).hasClass("fade")) { var r = a.getTransitionDurationFromElement(this._backdrop); e(this._backdrop).one(a.TRANSITION_END, s).emulateTransitionEnd(r) } else s() } else t && t() }, n._adjustDialog = function () { var t = this._element.scrollHeight > document.documentElement.clientHeight; !this._isBodyOverflowing && t && (this._element.style.paddingLeft = this._scrollbarWidth + "px"), this._isBodyOverflowing && !t && (this._element.style.paddingRight = this._scrollbarWidth + "px") }, n._resetAdjustments = function () { this._element.style.paddingLeft = "", this._element.style.paddingRight = "" }, n._checkScrollbar = function () { var t = document.body.getBoundingClientRect(); this._isBodyOverflowing = Math.round(t.left + t.right) < window.innerWidth, this._scrollbarWidth = this._getScrollbarWidth() }, n._setScrollbar = function () { var t = this; if (this._isBodyOverflowing) { var n = [].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")), i = [].slice.call(document.querySelectorAll(".sticky-top")); e(n).each((function (n, i) { var o = i.style.paddingRight, s = e(i).css("padding-right"); e(i).data("padding-right", o).css("padding-right", parseFloat(s) + t._scrollbarWidth + "px") })), e(i).each((function (n, i) { var o = i.style.marginRight, s = e(i).css("margin-right"); e(i).data("margin-right", o).css("margin-right", parseFloat(s) - t._scrollbarWidth + "px") })); var o = document.body.style.paddingRight, s = e(document.body).css("padding-right"); e(document.body).data("padding-right", o).css("padding-right", parseFloat(s) + this._scrollbarWidth + "px") } e(document.body).addClass("modal-open") }, n._resetScrollbar = function () { var t = [].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")); e(t).each((function (t, n) { var i = e(n).data("padding-right"); e(n).removeData("padding-right"), n.style.paddingRight = i || "" })); var n = [].slice.call(document.querySelectorAll(".sticky-top")); e(n).each((function (t, n) { var i = e(n).data("margin-right"); "undefined" != typeof i && e(n).css("margin-right", i).removeData("margin-right") })); var i = e(document.body).data("padding-right"); e(document.body).removeData("padding-right"), document.body.style.paddingRight = i || "" }, n._getScrollbarWidth = function () { var t = document.createElement("div"); t.className = "modal-scrollbar-measure", document.body.appendChild(t); var e = t.getBoundingClientRect().width - t.clientWidth; return document.body.removeChild(t), e }, t._jQueryInterface = function (n, i) { return this.each((function () { var o = e(this).data("bs.modal"), r = s({}, j, e(this).data(), "object" == typeof n && n ? n : {}); if (o || (o = new t(this, r), e(this).data("bs.modal", o)), "string" == typeof n) { if ("undefined" == typeof o[n]) throw new TypeError('No method named "' + n + '"'); o[n](i) } else r.show && o.show(i) })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return j } }]), t }(); e(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', (function (t) { var n, i = this, o = a.getSelectorFromElement(this); o && (n = document.querySelector(o)); var r = e(n).data("bs.modal") ? "toggle" : s({}, e(n).data(), e(this).data()); "A" !== this.tagName && "AREA" !== this.tagName || t.preventDefault(); var l = e(n).one("show.bs.modal", (function (t) { t.isDefaultPrevented() || l.one("hidden.bs.modal", (function () { e(i).is(":visible") && i.focus() })) })); P._jQueryInterface.call(e(n), r, this) })), e.fn.modal = P._jQueryInterface, e.fn.modal.Constructor = P, e.fn.modal.noConflict = function () { return e.fn.modal = O, P._jQueryInterface }; var R = ["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"], L = { "*": ["class", "dir", "id", "lang", "role", /^aria-[\w-]*$/i], a: ["target", "href", "title", "rel"], area: [], b: [], br: [], col: [], code: [], div: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ["src", "srcset", "alt", "title", "width", "height"], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] }, q = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi, F = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; function Q(t, e, n) { if (0 === t.length) return t; if (n && "function" == typeof n) return n(t); for (var i = (new window.DOMParser).parseFromString(t, "text/html"), o = Object.keys(e), s = [].slice.call(i.body.querySelectorAll("*")), r = function (t, n) { var i = s[t], r = i.nodeName.toLowerCase(); if (-1 === o.indexOf(i.nodeName.toLowerCase())) return i.parentNode.removeChild(i), "continue"; var a = [].slice.call(i.attributes), l = [].concat(e["*"] || [], e[r] || []); a.forEach((function (t) { (function (t, e) { var n = t.nodeName.toLowerCase(); if (-1 !== e.indexOf(n)) return -1 === R.indexOf(n) || Boolean(t.nodeValue.match(q) || t.nodeValue.match(F)); for (var i = e.filter((function (t) { return t instanceof RegExp })), o = 0, s = i.length; o < s; o++)if (n.match(i[o])) return !0; return !1 })(t, l) || i.removeAttribute(t.nodeName) })) }, a = 0, l = s.length; a < l; a++)r(a); return i.body.innerHTML } var B = "tooltip", H = e.fn[B], U = new RegExp("(^|\\s)bs-tooltip\\S+", "g"), M = ["sanitize", "whiteList", "sanitizeFn"], W = { animation: "boolean", template: "string", title: "(string|element|function)", trigger: "string", delay: "(number|object)", html: "boolean", selector: "(string|boolean)", placement: "(string|function)", offset: "(number|string|function)", container: "(string|element|boolean)", fallbackPlacement: "(string|array)", boundary: "(string|element)", sanitize: "boolean", sanitizeFn: "(null|function)", whiteList: "object", popperConfig: "(null|object)" }, V = { AUTO: "auto", TOP: "top", RIGHT: "right", BOTTOM: "bottom", LEFT: "left" }, z = { animation: !0, template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, selector: !1, placement: "top", offset: 0, container: !1, fallbackPlacement: "flip", boundary: "scrollParent", sanitize: !0, sanitizeFn: null, whiteList: L, popperConfig: null }, K = { HIDE: "hide.bs.tooltip", HIDDEN: "hidden.bs.tooltip", SHOW: "show.bs.tooltip", SHOWN: "shown.bs.tooltip", INSERTED: "inserted.bs.tooltip", CLICK: "click.bs.tooltip", FOCUSIN: "focusin.bs.tooltip", FOCUSOUT: "focusout.bs.tooltip", MOUSEENTER: "mouseenter.bs.tooltip", MOUSELEAVE: "mouseleave.bs.tooltip" }, X = function () { function t(t, e) { if ("undefined" == typeof n) throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)"); this._isEnabled = !0, this._timeout = 0, this._hoverState = "", this._activeTrigger = {}, this._popper = null, this.element = t, this.config = this._getConfig(e), this.tip = null, this._setListeners() } var i = t.prototype; return i.enable = function () { this._isEnabled = !0 }, i.disable = function () { this._isEnabled = !1 }, i.toggleEnabled = function () { this._isEnabled = !this._isEnabled }, i.toggle = function (t) { if (this._isEnabled) if (t) { var n = this.constructor.DATA_KEY, i = e(t.currentTarget).data(n); i || (i = new this.constructor(t.currentTarget, this._getDelegateConfig()), e(t.currentTarget).data(n, i)
4451), i._activeTrigger.click = !i._activeTrigger.click, i._isWithActiveTrigger() ? i._enter(null, i) : i._leave(null, i) } else { if (e(this.getTipElement()).hasClass("show")) return void this._leave(null, this); this._enter(null, this) } }, i.dispose = function () { clearTimeout(this._timeout), e.removeData(this.element, this.constructor.DATA_KEY), e(this.element).off(this.constructor.EVENT_KEY), e(this.element).closest(".modal").off("hide.bs.modal", this._hideModalHandler), this.tip && e(this.tip).remove(), this._isEnabled = null, this._timeout = null, this._hoverState = null, this._activeTrigger = null, this._popper && this._popper.destroy(), this._popper = null, this.element = null, this.config = null, this.tip = null }, i.show = function () { var t = this; if ("none" === e(this.element).css("display")) throw new Error("Please use show on visible elements"); var i = e.Event(this.constructor.Event.SHOW); if (this.isWithContent() && this._isEnabled) { e(this.element).trigger(i); var o = a.findShadowRoot(this.element), s = e.contains(null !== o ? o : this.element.ownerDocument.documentElement, this.element); if (i.isDefaultPrevented() || !s) return; var r = this.getTipElement(), l = a.getUID(this.constructor.NAME); r.setAttribute("id", l), this.element.setAttribute("aria-describedby", l), this.setContent(), this.config.animation && e(r).addClass("fade"); var c = "function" == typeof this.config.placement ? this.config.placement.call(this, r, this.element) : this.config.placement, h = this._getAttachment(c); this.addAttachmentClass(h); var u = this._getContainer(); e(r).data(this.constructor.DATA_KEY, this), e.contains(this.element.ownerDocument.documentElement, this.tip) || e(r).appendTo(u), e(this.element).trigger(this.constructor.Event.INSERTED), this._popper = new n(this.element, r, this._getPopperConfig(h)), e(r).addClass("show"), "ontouchstart" in document.documentElement && e(document.body).children().on("mouseover", null, e.noop); var d = function () { t.config.animation && t._fixTransition(); var n = t._hoverState; t._hoverState = null, e(t.element).trigger(t.constructor.Event.SHOWN), "out" === n && t._leave(null, t) }; if (e(this.tip).hasClass("fade")) { var f = a.getTransitionDurationFromElement(this.tip); e(this.tip).one(a.TRANSITION_END, d).emulateTransitionEnd(f) } else d() } }, i.hide = function (t) { var n = this, i = this.getTipElement(), o = e.Event(this.constructor.Event.HIDE), s = function () { "show" !== n._hoverState && i.parentNode && i.parentNode.removeChild(i), n._cleanTipClass(), n.element.removeAttribute("aria-describedby"), e(n.element).trigger(n.constructor.Event.HIDDEN), null !== n._popper && n._popper.destroy(), t && t() }; if (e(this.element).trigger(o), !o.isDefaultPrevented()) { if (e(i).removeClass("show"), "ontouchstart" in document.documentElement && e(document.body).children().off("mouseover", null, e.noop), this._activeTrigger.click = !1, this._activeTrigger.focus = !1, this._activeTrigger.hover = !1, e(this.tip).hasClass("fade")) { var r = a.getTransitionDurationFromElement(i); e(i).one(a.TRANSITION_END, s).emulateTransitionEnd(r) } else s(); this._hoverState = "" } }, i.update = function () { null !== this._popper && this._popper.scheduleUpdate() }, i.isWithContent = function () { return Boolean(this.getTitle()) }, i.addAttachmentClass = function (t) { e(this.getTipElement()).addClass("bs-tooltip-" + t) }, i.getTipElement = function () { return this.tip = this.tip || e(this.config.template)[0], this.tip }, i.setContent = function () { var t = this.getTipElement(); this.setElementContent(e(t.querySelectorAll(".tooltip-inner")), this.getTitle()), e(t).removeClass("fade show") }, i.setElementContent = function (t, n) { "object" != typeof n || !n.nodeType && !n.jquery ? this.config.html ? (this.config.sanitize && (n = Q(n, this.config.whiteList, this.config.sanitizeFn)), t.html(n)) : t.text(n) : this.config.html ? e(n).parent().is(t) || t.empty().append(n) : t.text(e(n).text()) }, i.getTitle = function () { var t = this.element.getAttribute("data-original-title"); return t || (t = "function" == typeof this.config.title ? this.config.title.call(this.element) : this.config.title), t }, i._getPopperConfig = function (t) { var e = this; return s({}, { placement: t, modifiers: { offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, arrow: { element: ".arrow" }
vendor: 4,717 bytes, line 4451
4451, preventOverflow: { boundariesElement: this.config.boundary } }, onCreate: function (t) { t.originalPlacement !== t.placement && e._handlePopperPlacementChange(t) }, onUpdate: function (t) { return e._handlePopperPlacementChange(t) } }, this.config.popperConfig) }, i._getOffset = function () { var t = this, e = {}; return "function" == typeof this.config.offset ? e.fn = function (e) { return e.offsets = s({}, e.offsets, t.config.offset(e.offsets, t.element) || {}), e } : e.offset = this.config.offset, e }, i._getContainer = function () { return !1 === this.config.container ? document.body : a.isElement(this.config.container) ? e(this.config.container) : e(document).find(this.config.container) }, i._getAttachment = function (t) { return V[t.toUpperCase()] }, i._setListeners = function () { var t = this; this.config.trigger.split(" ").forEach((function (n) { if ("click" === n) e(t.element).on(t.constructor.Event.CLICK, t.config.selector, (function (e) { return t.toggle(e) })); else if ("manual" !== n) { var i = "hover" === n ? t.constructor.Event.MOUSEENTER : t.constructor.Event.FOCUSIN, o = "hover" === n ? t.constructor.Event.MOUSELEAVE : t.constructor.Event.FOCUSOUT; e(t.element).on(i, t.config.selector, (function (e) { return t._enter(e) })).on(o, t.config.selector, (function (e) { return t._leave(e) })) } })), this._hideModalHandler = function () { t.element && t.hide() }, e(this.element).closest(".modal").on("hide.bs.modal", this._hideModalHandler), this.config.selector ? this.config = s({}, this.config, { trigger: "manual", selector: "" }) : this._fixTitle() }, i._fixTitle = function () { var t = typeof this.element.getAttribute("data-original-title"); (this.element.getAttribute("title") || "string" !== t) && (this.element.setAttribute("data-original-title", this.element.getAttribute("title") || ""), this.element.setAttribute("title", "")) }, i._enter = function (t, n) { var i = this.constructor.DATA_KEY; (n = n || e(t.currentTarget).data(i)) || (n = new this.constructor(t.currentTarget, this._getDelegateConfig()), e(t.currentTarget).data(i, n)), t && (n._activeTrigger["focusin" === t.type ? "focus" : "hover"] = !0), e(n.getTipElement()).hasClass("show") || "show" === n._hoverState ? n._hoverState = "show" : (clearTimeout(n._timeout), n._hoverState = "show", n.config.delay && n.config.delay.show ? n._timeout = setTimeout((function () { "show" === n._hoverState && n.show() }), n.config.delay.show) : n.show()) }, i._leave = function (t, n) { var i = this.constructor.DATA_KEY; (n = n || e(t.currentTarget).data(i)) || (n = new this.constructor(t.currentTarget, this._getDelegateConfig()), e(t.currentTarget).data(i, n)), t && (n._activeTrigger["focusout" === t.type ? "focus" : "hover"] = !1), n._isWithActiveTrigger() || (clearTimeout(n._timeout), n._hoverState = "out", n.config.delay && n.config.delay.hide ? n._timeout = setTimeout((function () { "out" === n._hoverState && n.hide() }), n.config.delay.hide) : n.hide()) }, i._isWithActiveTrigger = function () { for (var t in this._activeTrigger) if (this._activeTrigger[t]) return !0; return !1 }, i._getConfig = function (t) { var n = e(this.element).data(); return Object.keys(n).forEach((function (t) { -1 !== M.indexOf(t) && delete n[t] })), "number" == typeof (t = s({}, this.constructor.Default, n, "object" == typeof t && t ? t : {})).delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), a.typeCheckConfig(B, t, this.constructor.DefaultType), t.sanitize && (t.template = Q(t.template, t.whiteList, t.sanitizeFn)), t }, i._getDelegateConfig = function () { var t = {}; if (this.config) for (var e in this.config) this.constructor.Default[e] !== this.config[e] && (t[e] = this.config[e]); return t }, i._cleanTipClass = function () { var t = e(this.getTipElement()), n = t.attr("class").match(U); null !== n && n.length && t.removeClass(n.join("")) }, i._handlePopperPlacementChange = function (t) { this.tip = t.instance.popper, this._cleanTipClass(), this.addAttachmentClass(this._getAttachment(t.placement)) }, i._fixTransition = function () { var t = this.getTipElement(), n = this.config.animation; null === t.getAttribute("x-placement") && (e(t).removeClass("fade"), this.config.animation = !1, this.hide(), this.show(), this.config.animation = n) }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this).data("bs.tooltip"), o = "object" == typeof n && n; if ((i || !/dispose|hide/.test(n)) && (i || (i = new t(this, o), e(this).data("bs.tooltip", i)), "string" == typeof n)) { if ("undefined" == typeof i[n]) throw new TypeError('No method n
4451amed "' + n + '"'); i[n]() } })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return z } }, { key: "NAME", get: function () { return B } }, { key: "DATA_KEY", get: function () { return "bs.tooltip" } }, { key: "Event", get: function () { return K } }, { key: "EVENT_KEY", get: function () { return ".bs.tooltip" } }, { key: "DefaultType", get: function () { return W } }]), t }(); e.fn[B] = X._jQueryInterface, e.fn[B].Constructor = X, e.fn[B].noConflict = function () { return e.fn[B] = H, X._jQueryInterface }; var Y = "popover", $ = e.fn[Y], J = new RegExp("(^|\\s)bs-popover\\S+", "g"), G = s({}, X.Default, { placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>' }), Z = s({}, X.DefaultType, { content: "(string|element|function)" }), tt = { HIDE: "hide.bs.popover", HIDDEN: "hidden.bs.popover", SHOW: "show.bs.popover", SHOWN: "shown.bs.popover", INSERTED: "inserted.bs.popover", CLICK: "click.bs.popover", FOCUSIN: "focusin.bs.popover", FOCUSOUT: "focusout.bs.popover", MOUSEENTER: "mouseenter.bs.popover", MOUSELEAVE: "mouseleave.bs.popover" }, et = function (t) { var n, i; function s() { return t.apply(this, arguments) || this } i = t, (n = s).prototype = Object.create(i.prototype), n.prototype.constructor = n, n.__proto__ = i; var r = s.prototype; return r.isWithContent = function () { return this.getTitle() || this._getContent() }, r.addAttachmentClass = function (t) { e(this.getTipElement()).addClass("bs-popover-" + t) }, r.getTipElement = function () { return this.tip = this.tip || e(this.config.template)[0], this.tip }, r.setContent = function () { var t = e(this.getTipElement()); this.setElementContent(t.find(".popover-header"), this.getTitle()); var n = this._getContent(); "function" == typeof n && (n = n.call(this.element)), this.setElementContent(t.find(".popover-body"), n), t.removeClass("fade show") }, r._getContent = function () { return this.element.getAttribute("data-content") || this.config.content }, r._cleanTipClass = function () { var t = e(this.getTipElement()), n = t.attr("class").match(J); null !== n && n.length > 0 && t.removeClass(n.join("")) }, s._jQueryInterface = function (t) { return this.each((function () { var n = e(this).data("bs.popover"), i = "object" == typeof t ? t : null; if ((n || !/dispose|hide/.test(t)) && (n || (n = new s(this, i), e(this).data("bs.popover", n)), "string" == typeof t)) { if ("undefined" == typeof n[t]) throw new TypeError('No method named "' + t + '"'); n[t]() } })) }, o(s, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return G } }, { key: "NAME", get: function () { return Y } }, { key: "DATA_KEY", get: function () { return "bs.popover" } }, { key: "Event", get: function () { return tt } }, { key: "EVENT_KEY", get: function () { return ".bs.popover" } }, { key: "DefaultType", get: function () { return Z } }]), s }(X); e.fn[Y] = et._jQueryInterface, e.fn[Y].Constructor = et, e.fn[Y].noConflict = function () { return e.fn[Y] = $, et._jQueryInterface }; var nt = "scrollspy", it = e.fn[nt], ot = { offset: 10, method: "auto", target: "" }, st = { offset: "number", method: "string", target: "(string|element)" }, rt = function () { function t(t, n) { var i = this; this._element = t, this._scrollElement = "BODY" === t.tagName ? window : t, this._config = this._getConfig(n), this._selector = this._config.target + " .nav-link," + this._config.target + " .list-group-item," + this._config.target + " .dropdown-item", this._offsets = [], this._targets = [], this._activeTarget = null, this._scrollHeight = 0, e(this._scrollElement).on("scroll.bs.scrollspy", (function (t) { return i._process(t) })), this.refresh(), this._process() } var n = t.prototype; return n.refresh = function () { var t = this, n = this._scrollElement === this._scrollElement.window ? "offset" : "position", i = "auto" === this._config.method ? n : this._config.method, o = "position" === i ? this._getScrollTop() : 0; this._offsets = [], this._targets = [], this._scrollHeight = this._getScrollHeight(), [].slice.call(document.querySelectorAll(this._selector)).map((function (t) { var n, s = a.getSelectorFromElement(t); if (s && (n = document.querySelector(s)), n) { var r = n.getBoundingClientRect(); if (r.width || r.height) return [e(n)[i]().top + o, s] } return null })).filter((function (t) { return t })).sort((function (t, e) { return t[0] - e[0] }
vendor: 4,346 bytes, line 4451
4451)).forEach((function (e) { t._offsets.push(e[0]), t._targets.push(e[1]) })) }, n.dispose = function () { e.removeData(this._element, "bs.scrollspy"), e(this._scrollElement).off(".bs.scrollspy"), this._element = null, this._scrollElement = null, this._config = null, this._selector = null, this._offsets = null, this._targets = null, this._activeTarget = null, this._scrollHeight = null }, n._getConfig = function (t) { if ("string" != typeof (t = s({}, ot, "object" == typeof t && t ? t : {})).target && a.isElement(t.target)) { var n = e(t.target).attr("id"); n || (n = a.getUID(nt), e(t.target).attr("id", n)), t.target = "#" + n } return a.typeCheckConfig(nt, t, st), t }, n._getScrollTop = function () { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop }, n._getScrollHeight = function () { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) }, n._getOffsetHeight = function () { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height }, n._process = function () { var t = this._getScrollTop() + this._config.offset, e = this._getScrollHeight(), n = this._config.offset + e - this._getOffsetHeight(); if (this._scrollHeight !== e && this.refresh(), t >= n) { var i = this._targets[this._targets.length - 1]; this._activeTarget !== i && this._activate(i) } else { if (this._activeTarget && t < this._offsets[0] && this._offsets[0] > 0) return this._activeTarget = null, void this._clear(); for (var o = this._offsets.length; o--;) { this._activeTarget !== this._targets[o] && t >= this._offsets[o] && ("undefined" == typeof this._offsets[o + 1] || t < this._offsets[o + 1]) && this._activate(this._targets[o]) } } }, n._activate = function (t) { this._activeTarget = t, this._clear(); var n = this._selector.split(",").map((function (e) { return e + '[data-target="' + t + '"],' + e + '[href="' + t + '"]' })), i = e([].slice.call(document.querySelectorAll(n.join(",")))); i.hasClass("dropdown-item") ? (i.closest(".dropdown").find(".dropdown-toggle").addClass("active"), i.addClass("active")) : (i.addClass("active"), i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"), i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")), e(this._scrollElement).trigger("activate.bs.scrollspy", { relatedTarget: t }) }, n._clear = function () { [].slice.call(document.querySelectorAll(this._selector)).filter((function (t) { return t.classList.contains("active") })).forEach((function (t) { return t.classList.remove("active") })) }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this).data("bs.scrollspy"); if (i || (i = new t(this, "object" == typeof n && n), e(this).data("bs.scrollspy", i)), "string" == typeof n) { if ("undefined" == typeof i[n]) throw new TypeError('No method named "' + n + '"'); i[n]() } })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "Default", get: function () { return ot } }]), t }(); e(window).on("load.bs.scrollspy.data-api", (function () { for (var t = [].slice.call(document.querySelectorAll('[data-spy="scroll"]')), n = t.length; n--;) { var i = e(t[n]); rt._jQueryInterface.call(i, i.data()) } })), e.fn[nt] = rt._jQueryInterface, e.fn[nt].Constructor = rt, e.fn[nt].noConflict = function () { return e.fn[nt] = it, rt._jQueryInterface }; var at = e.fn.tab, lt = function () { function t(t) { this._element = t } var n = t.prototype; return n.show = function () { var t = this; if (!(this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && e(this._element).hasClass("active") || e(this._element).hasClass("disabled"))) { var n, i, o = e(this._element).closest(".nav, .list-group")[0], s = a.getSelectorFromElement(this._element); if (o) { var r = "UL" === o.nodeName || "OL" === o.nodeName ? "> li > .active" : ".active"; i = (i = e.makeArray(e(o).find(r)))[i.length - 1] } var l = e.Event("hide.bs.tab", { relatedTarget: this._element }), c = e.Event("show.bs.tab", { relatedTarget: i }); if (i && e(i).trigger(l), e(this._element).trigger(c), !c.isDefaultPrevented() && !l.isDefaultPrevented()) { s && (n = document.querySelector(s)), this._activate(this._element, o);
4451 var h = function () { var n = e.Event("hidden.bs.tab", { relatedTarget: t._element }), o = e.Event("shown.bs.tab", { relatedTarget: i }); e(i).trigger(n), e(t._element).trigger(o) }; n ? this._activate(n, n.parentNode, h) : h() } } }, n.dispose = function () { e.removeData(this._element, "bs.tab"), this._element = null }, n._activate = function (t, n, i) { var o = this, s = (!n || "UL" !== n.nodeName && "OL" !== n.nodeName ? e(n).children(".active") : e(n).find("> li > .active"))[0], r = i && s && e(s).hasClass("fade"), l = function () { return o._transitionComplete(t, s, i) }; if (s && r) { var c = a.getTransitionDurationFromElement(s); e(s).removeClass("show").one(a.TRANSITION_END, l).emulateTransitionEnd(c) } else l() }, n._transitionComplete = function (t, n, i) { if (n) { e(n).removeClass("active"); var o = e(n.parentNode).find("> .dropdown-menu .active")[0]; o && e(o).removeClass("active"), "tab" === n.getAttribute("role") && n.setAttribute("aria-selected", !1) } if (e(t).addClass("active"), "tab" === t.getAttribute("role") && t.setAttribute("aria-selected", !0), a.reflow(t), t.classList.contains("fade") && t.classList.add("show"), t.parentNode && e(t.parentNode).hasClass("dropdown-menu")) { var s = e(t).closest(".dropdown")[0]; if (s) { var r = [].slice.call(s.querySelectorAll(".dropdown-toggle")); e(r).addClass("active") } t.setAttribute("aria-expanded", !0) } i && i() }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this), o = i.data("bs.tab"); if (o || (o = new t(this), i.data("bs.tab", o)), "string" == typeof n) { if ("undefined" == typeof o[n]) throw new TypeError('No method named "' + n + '"'); o[n]() } })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }]), t }(); e(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', (function (t) { t.preventDefault(), lt._jQueryInterface.call(e(this), "show") })), e.fn.tab = lt._jQueryInterface, e.fn.tab.Constructor = lt, e.fn.tab.noConflict = function () { return e.fn.tab = at, lt._jQueryInterface }; var ct = e.fn.toast, ht = { animation: "boolean", autohide: "boolean", delay: "number" }, ut = { animation: !0, autohide: !0, delay: 500 }, dt = function () { function t(t, e) { this._element = t, this._config = this._getConfig(e), this._timeout = null, this._setListeners() } var n = t.prototype; return n.show = function () { var t = this, n = e.Event("show.bs.toast"); if (e(this._element).trigger(n), !n.isDefaultPrevented()) { this._clearTimeout(), this._config.animation && this._element.classList.add("fade"); var i = function () { t._element.classList.remove("showing"), t._element.classList.add("show"), e(t._element).trigger("shown.bs.toast"), t._config.autohide && (t._timeout = setTimeout((function () { t.hide() }), t._config.delay)) }; if (this._element.classList.remove("hide"), a.reflow(this._element), this._element.classList.add("showing"), this._config.animation) { var o = a.getTransitionDurationFromElement(this._element); e(this._element).one(a.TRANSITION_END, i).emulateTransitionEnd(o) } else i() } }, n.hide = function () { if (this._element.classList.contains("show")) { var t = e.Event("hide.bs.toast"); e(this._element).trigger(t), t.isDefaultPrevented() || this._close() } }, n.dispose = function () { this._clearTimeout(), this._element.classList.contains("show") && this._element.classList.remove("show"), e(this._element).off("click.dismiss.bs.toast"), e.removeData(this._element, "bs.toast"), this._element = null, this._config = null }, n._getConfig = function (t) { return t = s({}, ut, e(this._element).data(), "object" == typeof t && t ? t : {}), a.typeCheckConfig("toast", t, this.constructor.DefaultType), t }, n._setListeners = function () { var t = this; e(this._element).on("click.dismiss.bs.toast", '[data-dismiss="toast"]', (function () { return t.hide() })) }, n._close = function () { var t = this, n = function () { t._element.classList.add("hide"), e(t._element).trigger("hidden.bs.toast") }; if (this._element.classList.remove("show"), this._config.animation) { var i = a.getTransitionDurationFromElement(this._element); e(this._element).one(a.TRANSITION_END, n).emulateTransitionEnd(i) } else n() }, n._clearTimeout = function () { clearTimeout(this._timeout), this._timeout = null }, t._jQueryInterface = function (n) { return this.each((function () { var i = e(this), o = i.data("bs.toast"); if (o || (o = new t(this, "object" == typeof n && n), i.data("bs.toast", o)), "string" == typeof n) { if ("undefined" == typeof o[n]) throw new TypeError('No method n
vendor: 3,695 bytes, lines 4451-4538
4451amed "' + n + '"'); o[n](this) } })) }, o(t, null, [{ key: "VERSION", get: function () { return "4.5.2" } }, { key: "DefaultType", get: function () { return ht } }, { key: "Default", get: function () { return ut } }]), t }(); e.fn.toast = dt._jQueryInterface, e.fn.toast.Constructor = dt, e.fn.toast.noConflict = function () { return e.fn.toast = ct, dt._jQueryInterface }, t.Alert = h, t.Button = d, t.Carousel = b, t.Collapse = C, t.Dropdown = I, t.Modal = P, t.Popover = et, t.Scrollspy = rt, t.Tab = lt, t.Toast = dt, t.Tooltip = X, t.Util = a, Object.defineProperty(t, "__esModule", { value: !0 }) })); 4452/*! 4453 * Bootstrap v5.3.0 (https://getbootstrap.com/) 4454 * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4455 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4456 */ 4457(function (global, factory) { 4458 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) : 4459 typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) : 4460 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper)); 4461})(this, (function (Popper) { 'use strict'; 4462 4463 function _interopNamespaceDefault(e) { 4464 const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } }); 4465 if (e) { 4466 for (const k in e) { 4467 if (k !== 'default') { 4468 const d = Object.getOwnPropertyDescriptor(e, k); 4469 Object.defineProperty(n, k, d.get ? d : { 4470 enumerable: true, 4471 get: () => e[k] 4472 }); 4473 } 4474 } 4475 } 4476 n.default = e; 4477 return Object.freeze(n); 4478 } 4479 4480 const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper); 4481 4482 /** 4483 * -------------------------------------------------------------------------- 4484 * Bootstrap dom/data.js 4485 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4486 * -------------------------------------------------------------------------- 4487 */ 4488 4489 /** 4490 * Constants 4491 */ 4492 4493 const elementMap = new Map(); 4494 const Data = { 4495 set(element, key, instance) { 4496 if (!elementMap.has(element)) { 4497 elementMap.set(element, new Map()); 4498 } 4499 const instanceMap = elementMap.get(element); 4500 4501 // make it clear we only want one instance per element 4502 // can be removed later when multiple key/instances are fine to be used 4503 if (!instanceMap.has(key) && instanceMap.size !== 0) { 4504 // eslint-disable-next-line no-console 4505 console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); 4506 return; 4507 } 4508 instanceMap.set(key, instance); 4509 }, 4510 get(element, key) { 4511 if (elementMap.has(element)) { 4512 return elementMap.get(element).get(key) || null; 4513 } 4514 return null; 4515 }, 4516 remove(element, key) { 4517 if (!elementMap.has(element)) { 4518 return; 4519 } 4520 const instanceMap = elementMap.get(element); 4521 instanceMap.delete(key); 4522 4523 // free up element references if there are no instances left for an element 4524 if (instanceMap.size === 0) { 4525 elementMap.delete(element); 4526 } 4527 } 4528 }; 4529 4530 /** 4531 * -------------------------------------------------------------------------- 4532 * Bootstrap util/index.js 4533 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4534 * -------------------------------------------------------------------------- 4535 */ 4536 4537 const MAX_UID = 1000000; 4538 const MILLISECONDS_MULTIPLIER = 1000;
vendor: 4,800 bytes, lines 4539-4690
4539 const TRANSITION_END = 'transitionend'; 4540 4541 /** 4542 * Properly escape IDs selectors to handle weird IDs 4543 * @param {string} selector 4544 * @returns {string} 4545 */ 4546 const parseSelector = selector => { 4547 if (selector && window.CSS && window.CSS.escape) { 4548 // document.querySelector needs escaping to handle IDs (html5+) containing for instance / 4549 selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`); 4550 } 4551 return selector; 4552 }; 4553 4554 // Shout-out Angus Croll (https://goo.gl/pxwQGp) 4555 const toType = object => { 4556 if (object === null || object === undefined) { 4557 return `${object}`; 4558 } 4559 return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase(); 4560 }; 4561 4562 /** 4563 * Public Util API 4564 */ 4565 4566 const getUID = prefix => { 4567 do { 4568 prefix += Math.floor(Math.random() * MAX_UID); 4569 } while (document.getElementById(prefix)); 4570 return prefix; 4571 }; 4572 const getTransitionDurationFromElement = element => { 4573 if (!element) { 4574 return 0; 4575 } 4576 4577 // Get transition-duration of the element 4578 let { 4579 transitionDuration, 4580 transitionDelay 4581 } = window.getComputedStyle(element); 4582 const floatTransitionDuration = Number.parseFloat(transitionDuration); 4583 const floatTransitionDelay = Number.parseFloat(transitionDelay); 4584 4585 // Return 0 if element or transition duration is not found 4586 if (!floatTransitionDuration && !floatTransitionDelay) { 4587 return 0; 4588 } 4589 4590 // If multiple durations are defined, take the first 4591 transitionDuration = transitionDuration.split(',')[0]; 4592 transitionDelay = transitionDelay.split(',')[0]; 4593 return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 4594 }; 4595 const triggerTransitionEnd = element => { 4596 element.dispatchEvent(new Event(TRANSITION_END)); 4597 }; 4598 const isElement = object => { 4599 if (!object || typeof object !== 'object') { 4600 return false; 4601 } 4602 if (typeof object.jquery !== 'undefined') { 4603 object = object[0]; 4604 } 4605 return typeof object.nodeType !== 'undefined'; 4606 }; 4607 const getElement = object => { 4608 // it's a jQuery object or a node element 4609 if (isElement(object)) { 4610 return object.jquery ? object[0] : object; 4611 } 4612 if (typeof object === 'string' && object.length > 0) { 4613 return document.querySelector(parseSelector(object)); 4614 } 4615 return null; 4616 }; 4617 const isVisible = element => { 4618 if (!isElement(element) || element.getClientRects().length === 0) { 4619 return false; 4620 } 4621 const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; 4622 // Handle `details` element as its content may falsie appear visible when it is closed 4623 const closedDetails = element.closest('details:not([open])'); 4624 if (!closedDetails) { 4625 return elementIsVisible; 4626 } 4627 if (closedDetails !== element) { 4628 const summary = element.closest('summary'); 4629 if (summary && summary.parentNode !== closedDetails) { 4630 return false; 4631 } 4632 if (summary === null) { 4633 return false; 4634 } 4635 } 4636 return elementIsVisible; 4637 }; 4638 const isDisabled = element => { 4639 if (!element || element.nodeType !== Node.ELEMENT_NODE) { 4640 return true; 4641 } 4642 if (element.classList.contains('disabled')) { 4643 return true; 4644 } 4645 if (typeof element.disabled !== 'undefined') { 4646 return element.disabled; 4647 } 4648 return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'; 4649 }; 4650 const findShadowRoot = element => { 4651 if (!document.documentElement.attachShadow) { 4652 return null; 4653 } 4654 4655 // Can find the shadow root otherwise it'll return the document 4656 if (typeof element.getRootNode === 'function') { 4657 const root = element.getRootNode(); 4658 return root instanceof ShadowRoot ? root : null; 4659 } 4660 if (element instanceof ShadowRoot) { 4661 return element; 4662 } 4663 4664 // when we don't find a shadow root 4665 if (!element.parentNode) { 4666 return null; 4667 } 4668 return findShadowRoot(element.parentNode); 4669 }; 4670 const noop = () => {}; 4671 4672 /** 4673 * Trick to restart an element's animation 4674 * 4675 * @param {HTMLElement} element 4676 * @return void 4677 * 4678 * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation 4679 */ 4680 const reflow = element => { 4681 element.offsetHeight; // eslint-disable-line no-unused-expressions 4682 }; 4683 4684 const getjQuery = () => { 4685 if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) { 4686 return window.jQuery; 4687 } 4688 return null; 4689 }; 4690 const DOMContentLoadedCallbacks = [];
vendor: 4,813 bytes, lines 4691-4821
4691 const onDOMContentLoaded = callback => { 4692 if (document.readyState === 'loading') { 4693 // add listener on the first call when the document is in loading state 4694 if (!DOMContentLoadedCallbacks.length) { 4695 document.addEventListener('DOMContentLoaded', () => { 4696 for (const callback of DOMContentLoadedCallbacks) { 4697 callback(); 4698 } 4699 }); 4700 } 4701 DOMContentLoadedCallbacks.push(callback); 4702 } else { 4703 callback(); 4704 } 4705 }; 4706 const isRTL = () => document.documentElement.dir === 'rtl'; 4707 const defineJQueryPlugin = plugin => { 4708 onDOMContentLoaded(() => { 4709 const $ = getjQuery(); 4710 /* istanbul ignore if */ 4711 if ($) { 4712 const name = plugin.NAME; 4713 const JQUERY_NO_CONFLICT = $.fn[name]; 4714 $.fn[name] = plugin.jQueryInterface; 4715 $.fn[name].Constructor = plugin; 4716 $.fn[name].noConflict = () => { 4717 $.fn[name] = JQUERY_NO_CONFLICT; 4718 return plugin.jQueryInterface; 4719 }; 4720 } 4721 }); 4722 }; 4723 const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => { 4724 return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue; 4725 }; 4726 const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { 4727 if (!waitForTransition) { 4728 execute(callback); 4729 return; 4730 } 4731 const durationPadding = 5; 4732 const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; 4733 let called = false; 4734 const handler = ({ 4735 target 4736 }) => { 4737 if (target !== transitionElement) { 4738 return; 4739 } 4740 called = true; 4741 transitionElement.removeEventListener(TRANSITION_END, handler); 4742 execute(callback); 4743 }; 4744 transitionElement.addEventListener(TRANSITION_END, handler); 4745 setTimeout(() => { 4746 if (!called) { 4747 triggerTransitionEnd(transitionElement); 4748 } 4749 }, emulatedDuration); 4750 }; 4751 4752 /** 4753 * Return the previous/next element of a list. 4754 * 4755 * @param {array} list The list of elements 4756 * @param activeElement The active element 4757 * @param shouldGetNext Choose to get next or previous element 4758 * @param isCycleAllowed 4759 * @return {Element|elem} The proper element 4760 */ 4761 const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => { 4762 const listLength = list.length; 4763 let index = list.indexOf(activeElement); 4764 4765 // if the element does not exist in the list return an element 4766 // depending on the direction and if cycle is allowed 4767 if (index === -1) { 4768 return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]; 4769 } 4770 index += shouldGetNext ? 1 : -1; 4771 if (isCycleAllowed) { 4772 index = (index + listLength) % listLength; 4773 } 4774 return list[Math.max(0, Math.min(index, listLength - 1))]; 4775 }; 4776 4777 /** 4778 * -------------------------------------------------------------------------- 4779 * Bootstrap dom/event-handler.js 4780 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 4781 * -------------------------------------------------------------------------- 4782 */ 4783 4784 4785 /** 4786 * Constants 4787 */ 4788 4789 const namespaceRegex = /[^.]*(?=\..*)\.|.*/; 4790 const stripNameRegex = /\..*/; 4791 const stripUidRegex = /::\d+$/; 4792 const eventRegistry = {}; // Events storage 4793 let uidEvent = 1; 4794 const customEvents = { 4795 mouseenter: 'mouseover', 4796 mouseleave: 'mouseout' 4797 }; 4798 const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']); 4799 4800 /** 4801 * Private methods 4802 */ 4803 4804 function makeEventUid(element, uid) { 4805 return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; 4806 } 4807 function getElementEvents(element) { 4808 const uid = makeEventUid(element); 4809 element.uidEvent = uid; 4810 eventRegistry[uid] = eventRegistry[uid] || {}; 4811 return eventRegistry[uid]; 4812 } 4813 function bootstrapHandler(element, fn) { 4814 return function handler(event) { 4815 hydrateObj(event, { 4816 delegateTarget: element 4817 }); 4818 if (handler.oneOff) { 4819 EventHandler.off(element, event.type, fn); 4820 } 4821 return fn.apply(element, [event]);
vendor: 5,105 bytes, lines 4822-4937
4822 }; 4823 } 4824 function bootstrapDelegationHandler(element, selector, fn) { 4825 return function handler(event) { 4826 const domElements = element.querySelectorAll(selector); 4827 for (let { 4828 target 4829 } = event; target && target !== this; target = target.parentNode) { 4830 for (const domElement of domElements) { 4831 if (domElement !== target) { 4832 continue; 4833 } 4834 hydrateObj(event, { 4835 delegateTarget: target 4836 }); 4837 if (handler.oneOff) { 4838 EventHandler.off(element, event.type, selector, fn); 4839 } 4840 return fn.apply(target, [event]); 4841 } 4842 } 4843 }; 4844 } 4845 function findHandler(events, callable, delegationSelector = null) { 4846 return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector); 4847 } 4848 function normalizeParameters(originalTypeEvent, handler, delegationFunction) { 4849 const isDelegated = typeof handler === 'string'; 4850 // TODO: tooltip passes `false` instead of selector, so we need to check 4851 const callable = isDelegated ? delegationFunction : handler || delegationFunction; 4852 let typeEvent = getTypeEvent(originalTypeEvent); 4853 if (!nativeEvents.has(typeEvent)) { 4854 typeEvent = originalTypeEvent; 4855 } 4856 return [isDelegated, callable, typeEvent]; 4857 } 4858 function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) { 4859 if (typeof originalTypeEvent !== 'string' || !element) { 4860 return; 4861 } 4862 let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); 4863 4864 // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position 4865 // this prevents the handler from being dispatched the same way as mouseover or mouseout does 4866 if (originalTypeEvent in customEvents) { 4867 const wrapFunction = fn => { 4868 return function (event) { 4869 if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { 4870 return fn.call(this, event); 4871 } 4872 }; 4873 }; 4874 callable = wrapFunction(callable); 4875 } 4876 const events = getElementEvents(element); 4877 const handlers = events[typeEvent] || (events[typeEvent] = {}); 4878 const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null); 4879 if (previousFunction) { 4880 previousFunction.oneOff = previousFunction.oneOff && oneOff; 4881 return; 4882 } 4883 const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, '')); 4884 const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable); 4885 fn.delegationSelector = isDelegated ? handler : null; 4886 fn.callable = callable; 4887 fn.oneOff = oneOff; 4888 fn.uidEvent = uid; 4889 handlers[uid] = fn; 4890 element.addEventListener(typeEvent, fn, isDelegated); 4891 } 4892 function removeHandler(element, events, typeEvent, handler, delegationSelector) { 4893 const fn = findHandler(events[typeEvent], handler, delegationSelector); 4894 if (!fn) { 4895 return; 4896 } 4897 element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); 4898 delete events[typeEvent][fn.uidEvent]; 4899 } 4900 function removeNamespacedHandlers(element, events, typeEvent, namespace) { 4901 const storeElementEvent = events[typeEvent] || {}; 4902 for (const [handlerKey, event] of Object.entries(storeElementEvent)) { 4903 if (handlerKey.includes(namespace)) { 4904 removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); 4905 } 4906 } 4907 } 4908 function getTypeEvent(event) { 4909 // allow to get the native events from namespaced events ('click.bs.button' --> 'click') 4910 event = event.replace(stripNameRegex, ''); 4911 return customEvents[event] || event; 4912 } 4913 const EventHandler = { 4914 on(element, event, handler, delegationFunction) { 4915 addHandler(element, event, handler, delegationFunction, false); 4916 }, 4917 one(element, event, handler, delegationFunction) { 4918 addHandler(element, event, handler, delegationFunction, true); 4919 }, 4920 off(element, originalTypeEvent, handler, delegationFunction) { 4921 if (typeof originalTypeEvent !== 'string' || !element) { 4922 return; 4923 } 4924 const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); 4925 const inNamespace = typeEvent !== originalTypeEvent; 4926 const events = getElementEvents(element); 4927 const storeElementEvent = events[typeEvent] || {}; 4928 const isNamespace = originalTypeEvent.startsWith('.'); 4929 if (typeof callable !== 'undefined') { 4930 // Simplest case: handler is passed, remove that listener ONLY. 4931 if (!Object.keys(storeElementEvent).length) { 4932 return; 4933 } 4934 removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null); 4935 return; 4936 } 4937 if (isNamespace) {
vendor: 6,448 bytes, lines 4938-5142
4938 for (const elementEvent of Object.keys(events)) { 4939 removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); 4940 } 4941 } 4942 for (const [keyHandlers, event] of Object.entries(storeElementEvent)) { 4943 const handlerKey = keyHandlers.replace(stripUidRegex, ''); 4944 if (!inNamespace || originalTypeEvent.includes(handlerKey)) { 4945 removeHandler(element, events, typeEvent, event.callable, event.delegationSelector); 4946 } 4947 } 4948 }, 4949 trigger(element, event, args) { 4950 if (typeof event !== 'string' || !element) { 4951 return null; 4952 } 4953 const $ = getjQuery(); 4954 const typeEvent = getTypeEvent(event); 4955 const inNamespace = event !== typeEvent; 4956 let jQueryEvent = null; 4957 let bubbles = true; 4958 let nativeDispatch = true; 4959 let defaultPrevented = false; 4960 if (inNamespace && $) { 4961 jQueryEvent = $.Event(event, args); 4962 $(element).trigger(jQueryEvent); 4963 bubbles = !jQueryEvent.isPropagationStopped(); 4964 nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); 4965 defaultPrevented = jQueryEvent.isDefaultPrevented(); 4966 } 4967 const evt = hydrateObj(new Event(event, { 4968 bubbles, 4969 cancelable: true 4970 }), args); 4971 if (defaultPrevented) { 4972 evt.preventDefault(); 4973 } 4974 if (nativeDispatch) { 4975 element.dispatchEvent(evt); 4976 } 4977 if (evt.defaultPrevented && jQueryEvent) { 4978 jQueryEvent.preventDefault(); 4979 } 4980 return evt; 4981 } 4982 }; 4983 function hydrateObj(obj, meta = {}) { 4984 for (const [key, value] of Object.entries(meta)) { 4985 try { 4986 obj[key] = value; 4987 } catch (_unused) { 4988 Object.defineProperty(obj, key, { 4989 configurable: true, 4990 get() { 4991 return value; 4992 } 4993 }); 4994 } 4995 } 4996 return obj; 4997 } 4998 4999 /** 5000 * -------------------------------------------------------------------------- 5001 * Bootstrap dom/manipulator.js 5002 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5003 * -------------------------------------------------------------------------- 5004 */ 5005 5006 function normalizeData(value) { 5007 if (value === 'true') { 5008 return true; 5009 } 5010 if (value === 'false') { 5011 return false; 5012 } 5013 if (value === Number(value).toString()) { 5014 return Number(value); 5015 } 5016 if (value === '' || value === 'null') { 5017 return null; 5018 } 5019 if (typeof value !== 'string') { 5020 return value; 5021 } 5022 try { 5023 return JSON.parse(decodeURIComponent(value)); 5024 } catch (_unused) { 5025 return value; 5026 } 5027 } 5028 function normalizeDataKey(key) { 5029 return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`); 5030 } 5031 const Manipulator = { 5032 setDataAttribute(element, key, value) { 5033 element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); 5034 }, 5035 removeDataAttribute(element, key) { 5036 element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); 5037 }, 5038 getDataAttributes(element) { 5039 if (!element) { 5040 return {}; 5041 } 5042 const attributes = {}; 5043 const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig')); 5044 for (const key of bsKeys) { 5045 let pureKey = key.replace(/^bs/, ''); 5046 pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length); 5047 attributes[pureKey] = normalizeData(element.dataset[key]); 5048 } 5049 return attributes; 5050 }, 5051 getDataAttribute(element, key) { 5052 return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); 5053 } 5054 }; 5055 5056 /** 5057 * -------------------------------------------------------------------------- 5058 * Bootstrap util/config.js 5059 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5060 * -------------------------------------------------------------------------- 5061 */ 5062 5063 5064 /** 5065 * Class definition 5066 */ 5067 5068 class Config { 5069 // Getters 5070 static get Default() { 5071 return {}; 5072 } 5073 static get DefaultType() { 5074 return {}; 5075 } 5076 static get NAME() { 5077 throw new Error('You have to implement the static method "NAME", for each component!'); 5078 } 5079 _getConfig(config) { 5080 config = this._mergeConfigObj(config); 5081 config = this._configAfterMerge(config); 5082 this._typeCheckConfig(config); 5083 return config; 5084 } 5085 _configAfterMerge(config) { 5086 return config; 5087 } 5088 _mergeConfigObj(config, element) { 5089 const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse 5090 5091 return { 5092 ...this.constructor.Default, 5093 ...(typeof jsonConfig === 'object' ? jsonConfig : {}), 5094 ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}), 5095 ...(typeof config === 'object' ? config : {}) 5096 }; 5097 } 5098 _typeCheckConfig(config, configTypes = this.constructor.DefaultType) { 5099 for (const [property, expectedTypes] of Object.entries(configTypes)) { 5100 const value = config[property]; 5101 const valueType = isElement(value) ? 'element' : toType(value); 5102 if (!new RegExp(expectedTypes).test(valueType)) { 5103 throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`); 5104 } 5105 } 5106 } 5107 } 5108 5109 /** 5110 * -------------------------------------------------------------------------- 5111 * Bootstrap base-component.js 5112 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5113 * -------------------------------------------------------------------------- 5114 */ 5115 5116 5117 /** 5118 * Constants 5119 */ 5120 5121 const VERSION = '5.3.0'; 5122 5123 /** 5124 * Class definition 5125 */ 5126 5127 class BaseComponent extends Config { 5128 constructor(element, config) { 5129 super(); 5130 element = getElement(element); 5131 if (!element) { 5132 return; 5133 } 5134 this._element = element; 5135 this._config = this._getConfig(config); 5136 Data.set(this._element, this.constructor.DATA_KEY, this); 5137 } 5138 5139 // Public 5140 dispose() { 5141 Data.remove(this._element, this.constructor.DATA_KEY); 5142 EventHandler.off(this._element, this.constructor.EVENT_KEY);
vendor: 34,861 bytes, lines 5143-6191
5143 for (const propertyName of Object.getOwnPropertyNames(this)) { 5144 this[propertyName] = null; 5145 } 5146 } 5147 _queueCallback(callback, element, isAnimated = true) { 5148 executeAfterTransition(callback, element, isAnimated); 5149 } 5150 _getConfig(config) { 5151 config = this._mergeConfigObj(config, this._element); 5152 config = this._configAfterMerge(config); 5153 this._typeCheckConfig(config); 5154 return config; 5155 } 5156 5157 // Static 5158 static getInstance(element) { 5159 return Data.get(getElement(element), this.DATA_KEY); 5160 } 5161 static getOrCreateInstance(element, config = {}) { 5162 return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null); 5163 } 5164 static get VERSION() { 5165 return VERSION; 5166 } 5167 static get DATA_KEY() { 5168 return `bs.${this.NAME}`; 5169 } 5170 static get EVENT_KEY() { 5171 return `.${this.DATA_KEY}`; 5172 } 5173 static eventName(name) { 5174 return `${name}${this.EVENT_KEY}`; 5175 } 5176 } 5177 5178 /** 5179 * -------------------------------------------------------------------------- 5180 * Bootstrap dom/selector-engine.js 5181 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5182 * -------------------------------------------------------------------------- 5183 */ 5184 5185 const getSelector = element => { 5186 let selector = element.getAttribute('data-bs-target'); 5187 if (!selector || selector === '#') { 5188 let hrefAttribute = element.getAttribute('href'); 5189 5190 // The only valid content that could double as a selector are IDs or classes, 5191 // so everything starting with `#` or `.`. If a "real" URL is used as the selector, 5192 // `document.querySelector` will rightfully complain it is invalid. 5193 // See https://github.com/twbs/bootstrap/issues/32273 5194 if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) { 5195 return null; 5196 } 5197 5198 // Just in case some CMS puts out a full URL with the anchor appended 5199 if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) { 5200 hrefAttribute = `#${hrefAttribute.split('#')[1]}`; 5201 } 5202 selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null; 5203 } 5204 return parseSelector(selector); 5205 }; 5206 const SelectorEngine = { 5207 find(selector, element = document.documentElement) { 5208 return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); 5209 }, 5210 findOne(selector, element = document.documentElement) { 5211 return Element.prototype.querySelector.call(element, selector); 5212 }, 5213 children(element, selector) { 5214 return [].concat(...element.children).filter(child => child.matches(selector)); 5215 }, 5216 parents(element, selector) { 5217 const parents = []; 5218 let ancestor = element.parentNode.closest(selector); 5219 while (ancestor) { 5220 parents.push(ancestor); 5221 ancestor = ancestor.parentNode.closest(selector); 5222 } 5223 return parents; 5224 }, 5225 prev(element, selector) { 5226 let previous = element.previousElementSibling; 5227 while (previous) { 5228 if (previous.matches(selector)) { 5229 return [previous]; 5230 } 5231 previous = previous.previousElementSibling; 5232 } 5233 return []; 5234 }, 5235 // TODO: this is now unused; remove later along with prev() 5236 next(element, selector) { 5237 let next = element.nextElementSibling; 5238 while (next) { 5239 if (next.matches(selector)) { 5240 return [next]; 5241 } 5242 next = next.nextElementSibling; 5243 } 5244 return []; 5245 }, 5246 focusableChildren(element) { 5247 const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(','); 5248 return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el)); 5249 }, 5250 getSelectorFromElement(element) { 5251 const selector = getSelector(element); 5252 if (selector) { 5253 return SelectorEngine.findOne(selector) ? selector : null; 5254 } 5255 return null; 5256 }, 5257 getElementFromSelector(element) { 5258 const selector = getSelector(element); 5259 return selector ? SelectorEngine.findOne(selector) : null; 5260 }, 5261 getMultipleElementsFromSelector(element) { 5262 const selector = getSelector(element); 5263 return selector ? SelectorEngine.find(selector) : []; 5264 } 5265 }; 5266 5267 /** 5268 * -------------------------------------------------------------------------- 5269 * Bootstrap util/component-functions.js 5270 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5271 * -------------------------------------------------------------------------- 5272 */ 5273 5274 const enableDismissTrigger = (component, method = 'hide') => { 5275 const clickEvent = `click.dismiss${component.EVENT_KEY}`; 5276 const name = component.NAME; 5277 EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { 5278 if (['A', 'AREA'].includes(this.tagName)) { 5279 event.preventDefault(); 5280 } 5281 if (isDisabled(this)) { 5282 return; 5283 } 5284 const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`); 5285 const instance = component.getOrCreateInstance(target); 5286 5287 // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method 5288 instance[method](); 5289 }); 5290 }; 5291 5292 /** 5293 * -------------------------------------------------------------------------- 5294 * Bootstrap alert.js 5295 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5296 * -------------------------------------------------------------------------- 5297 */ 5298 5299 5300 /** 5301 * Constants 5302 */ 5303 5304 const NAME$f = 'alert'; 5305 const DATA_KEY$a = 'bs.alert'; 5306 const EVENT_KEY$b = `.${DATA_KEY$a}`; 5307 const EVENT_CLOSE = `close${EVENT_KEY$b}`; 5308 const EVENT_CLOSED = `closed${EVENT_KEY$b}`; 5309 const CLASS_NAME_FADE$5 = 'fade'; 5310 const CLASS_NAME_SHOW$8 = 'show'; 5311 5312 /** 5313 * Class definition 5314 */ 5315 5316 class Alert extends BaseComponent { 5317 // Getters 5318 static get NAME() { 5319 return NAME$f; 5320 } 5321 5322 // Public 5323 close() { 5324 const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE); 5325 if (closeEvent.defaultPrevented) { 5326 return; 5327 } 5328 this._element.classList.remove(CLASS_NAME_SHOW$8); 5329 const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5); 5330 this._queueCallback(() => this._destroyElement(), this._element, isAnimated); 5331 } 5332 5333 // Private 5334 _destroyElement() { 5335 this._element.remove(); 5336 EventHandler.trigger(this._element, EVENT_CLOSED); 5337 this.dispose(); 5338 } 5339 5340 // Static 5341 static jQueryInterface(config) { 5342 return this.each(function () { 5343 const data = Alert.getOrCreateInstance(this); 5344 if (typeof config !== 'string') { 5345 return; 5346 } 5347 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 5348 throw new TypeError(`No method named "${config}"`); 5349 } 5350 data[config](this); 5351 }); 5352 } 5353 } 5354 5355 /** 5356 * Data API implementation 5357 */ 5358 5359 enableDismissTrigger(Alert, 'close'); 5360 5361 /** 5362 * jQuery 5363 */ 5364 5365 defineJQueryPlugin(Alert); 5366 5367 /** 5368 * -------------------------------------------------------------------------- 5369 * Bootstrap button.js 5370 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5371 * -------------------------------------------------------------------------- 5372 */ 5373 5374 5375 /** 5376 * Constants 5377 */ 5378 5379 const NAME$e = 'button'; 5380 const DATA_KEY$9 = 'bs.button'; 5381 const EVENT_KEY$a = `.${DATA_KEY$9}`; 5382 const DATA_API_KEY$6 = '.data-api'; 5383 const CLASS_NAME_ACTIVE$3 = 'active'; 5384 const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; 5385 const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`; 5386 5387 /** 5388 * Class definition 5389 */ 5390 5391 class Button extends BaseComponent { 5392 // Getters 5393 static get NAME() { 5394 return NAME$e; 5395 } 5396 5397 // Public 5398 toggle() { 5399 // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method 5400 this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3)); 5401 } 5402 5403 // Static 5404 static jQueryInterface(config) { 5405 return this.each(function () { 5406 const data = Button.getOrCreateInstance(this); 5407 if (config === 'toggle') { 5408 data[config](); 5409 } 5410 }); 5411 } 5412 } 5413 5414 /** 5415 * Data API implementation 5416 */ 5417 5418 EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => { 5419 event.preventDefault(); 5420 const button = event.target.closest(SELECTOR_DATA_TOGGLE$5); 5421 const data = Button.getOrCreateInstance(button); 5422 data.toggle(); 5423 }); 5424 5425 /** 5426 * jQuery 5427 */ 5428 5429 defineJQueryPlugin(Button); 5430 5431 /** 5432 * -------------------------------------------------------------------------- 5433 * Bootstrap util/swipe.js 5434 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5435 * -------------------------------------------------------------------------- 5436 */ 5437 5438 5439 /** 5440 * Constants 5441 */ 5442 5443 const NAME$d = 'swipe'; 5444 const EVENT_KEY$9 = '.bs.swipe'; 5445 const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`; 5446 const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`; 5447 const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`; 5448 const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`; 5449 const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`; 5450 const POINTER_TYPE_TOUCH = 'touch'; 5451 const POINTER_TYPE_PEN = 'pen'; 5452 const CLASS_NAME_POINTER_EVENT = 'pointer-event'; 5453 const SWIPE_THRESHOLD = 40; 5454 const Default$c = { 5455 endCallback: null, 5456 leftCallback: null, 5457 rightCallback: null 5458 }; 5459 const DefaultType$c = { 5460 endCallback: '(function|null)', 5461 leftCallback: '(function|null)', 5462 rightCallback: '(function|null)' 5463 }; 5464 5465 /** 5466 * Class definition 5467 */ 5468 5469 class Swipe extends Config { 5470 constructor(element, config) { 5471 super(); 5472 this._element = element; 5473 if (!element || !Swipe.isSupported()) { 5474 return; 5475 } 5476 this._config = this._getConfig(config); 5477 this._deltaX = 0; 5478 this._supportPointerEvents = Boolean(window.PointerEvent); 5479 this._initEvents(); 5480 } 5481 5482 // Getters 5483 static get Default() { 5484 return Default$c; 5485 } 5486 static get DefaultType() { 5487 return DefaultType$c; 5488 } 5489 static get NAME() { 5490 return NAME$d; 5491 } 5492 5493 // Public 5494 dispose() { 5495 EventHandler.off(this._element, EVENT_KEY$9); 5496 } 5497 5498 // Private 5499 _start(event) { 5500 if (!this._supportPointerEvents) { 5501 this._deltaX = event.touches[0].clientX; 5502 return; 5503 } 5504 if (this._eventIsPointerPenTouch(event)) { 5505 this._deltaX = event.clientX; 5506 } 5507 } 5508 _end(event) { 5509 if (this._eventIsPointerPenTouch(event)) { 5510 this._deltaX = event.clientX - this._deltaX; 5511 } 5512 this._handleSwipe(); 5513 execute(this._config.endCallback); 5514 } 5515 _move(event) { 5516 this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX; 5517 } 5518 _handleSwipe() { 5519 const absDeltaX = Math.abs(this._deltaX); 5520 if (absDeltaX <= SWIPE_THRESHOLD) { 5521 return; 5522 } 5523 const direction = absDeltaX / this._deltaX; 5524 this._deltaX = 0; 5525 if (!direction) { 5526 return; 5527 } 5528 execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback); 5529 } 5530 _initEvents() { 5531 if (this._supportPointerEvents) { 5532 EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event)); 5533 EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event)); 5534 this._element.classList.add(CLASS_NAME_POINTER_EVENT); 5535 } else { 5536 EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event)); 5537 EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event)); 5538 EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event)); 5539 } 5540 } 5541 _eventIsPointerPenTouch(event) { 5542 return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH); 5543 } 5544 5545 // Static 5546 static isSupported() { 5547 return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; 5548 } 5549 } 5550 5551 /** 5552 * -------------------------------------------------------------------------- 5553 * Bootstrap carousel.js 5554 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5555 * -------------------------------------------------------------------------- 5556 */ 5557 5558 5559 /** 5560 * Constants 5561 */ 5562 5563 const NAME$c = 'carousel'; 5564 const DATA_KEY$8 = 'bs.carousel'; 5565 const EVENT_KEY$8 = `.${DATA_KEY$8}`; 5566 const DATA_API_KEY$5 = '.data-api'; 5567 const ARROW_LEFT_KEY$1 = 'ArrowLeft'; 5568 const ARROW_RIGHT_KEY$1 = 'ArrowRight'; 5569 const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 5570 5571 const ORDER_NEXT = 'next'; 5572 const ORDER_PREV = 'prev'; 5573 const DIRECTION_LEFT = 'left'; 5574 const DIRECTION_RIGHT = 'right'; 5575 const EVENT_SLIDE = `slide${EVENT_KEY$8}`; 5576 const EVENT_SLID = `slid${EVENT_KEY$8}`; 5577 const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`; 5578 const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`; 5579 const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`; 5580 const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`; 5581 const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`; 5582 const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`; 5583 const CLASS_NAME_CAROUSEL = 'carousel'; 5584 const CLASS_NAME_ACTIVE$2 = 'active'; 5585 const CLASS_NAME_SLIDE = 'slide'; 5586 const CLASS_NAME_END = 'carousel-item-end'; 5587 const CLASS_NAME_START = 'carousel-item-start'; 5588 const CLASS_NAME_NEXT = 'carousel-item-next'; 5589 const CLASS_NAME_PREV = 'carousel-item-prev'; 5590 const SELECTOR_ACTIVE = '.active'; 5591 const SELECTOR_ITEM = '.carousel-item'; 5592 const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM; 5593 const SELECTOR_ITEM_IMG = '.carousel-item img'; 5594 const SELECTOR_INDICATORS = '.carousel-indicators'; 5595 const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; 5596 const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; 5597 const KEY_TO_DIRECTION = { 5598 [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT, 5599 [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT 5600 }; 5601 const Default$b = { 5602 interval: 5000, 5603 keyboard: true, 5604 pause: 'hover', 5605 ride: false, 5606 touch: true, 5607 wrap: true 5608 }; 5609 const DefaultType$b = { 5610 interval: '(number|boolean)', 5611 // TODO:v6 remove boolean support 5612 keyboard: 'boolean', 5613 pause: '(string|boolean)', 5614 ride: '(boolean|string)', 5615 touch: 'boolean', 5616 wrap: 'boolean' 5617 }; 5618 5619 /** 5620 * Class definition 5621 */ 5622 5623 class Carousel extends BaseComponent { 5624 constructor(element, config) { 5625 super(element, config); 5626 this._interval = null; 5627 this._activeElement = null; 5628 this._isSliding = false; 5629 this.touchTimeout = null; 5630 this._swipeHelper = null; 5631 this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element); 5632 this._addEventListeners(); 5633 if (this._config.ride === CLASS_NAME_CAROUSEL) { 5634 this.cycle(); 5635 } 5636 } 5637 5638 // Getters 5639 static get Default() { 5640 return Default$b; 5641 } 5642 static get DefaultType() { 5643 return DefaultType$b; 5644 } 5645 static get NAME() { 5646 return NAME$c; 5647 } 5648 5649 // Public 5650 next() { 5651 this._slide(ORDER_NEXT); 5652 } 5653 nextWhenVisible() { 5654 // FIXME TODO use `document.visibilityState` 5655 // Don't call next when the page isn't visible 5656 // or the carousel or its parent isn't visible 5657 if (!document.hidden && isVisible(this._element)) { 5658 this.next(); 5659 } 5660 } 5661 prev() { 5662 this._slide(ORDER_PREV); 5663 } 5664 pause() { 5665 if (this._isSliding) { 5666 triggerTransitionEnd(this._element); 5667 } 5668 this._clearInterval(); 5669 } 5670 cycle() { 5671 this._clearInterval(); 5672 this._updateInterval(); 5673 this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval); 5674 } 5675 _maybeEnableCycle() { 5676 if (!this._config.ride) { 5677 return; 5678 } 5679 if (this._isSliding) { 5680 EventHandler.one(this._element, EVENT_SLID, () => this.cycle()); 5681 return; 5682 } 5683 this.cycle(); 5684 } 5685 to(index) { 5686 const items = this._getItems(); 5687 if (index > items.length - 1 || index < 0) { 5688 return; 5689 } 5690 if (this._isSliding) { 5691 EventHandler.one(this._element, EVENT_SLID, () => this.to(index)); 5692 return; 5693 } 5694 const activeIndex = this._getItemIndex(this._getActive()); 5695 if (activeIndex === index) { 5696 return; 5697 } 5698 const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; 5699 this._slide(order, items[index]); 5700 } 5701 dispose() { 5702 if (this._swipeHelper) { 5703 this._swipeHelper.dispose(); 5704 } 5705 super.dispose(); 5706 } 5707 5708 // Private 5709 _configAfterMerge(config) { 5710 config.defaultInterval = config.interval; 5711 return config; 5712 } 5713 _addEventListeners() { 5714 if (this._config.keyboard) { 5715 EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event)); 5716 } 5717 if (this._config.pause === 'hover') { 5718 EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause()); 5719 EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle()); 5720 } 5721 if (this._config.touch && Swipe.isSupported()) { 5722 this._addTouchEventListeners(); 5723 } 5724 } 5725 _addTouchEventListeners() { 5726 for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) { 5727 EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault()); 5728 } 5729 const endCallBack = () => { 5730 if (this._config.pause !== 'hover') { 5731 return; 5732 } 5733 5734 // If it's a touch-enabled device, mouseenter/leave are fired as 5735 // part of the mouse compatibility events on first tap - the carousel 5736 // would stop cycling until user tapped out of it; 5737 // here, we listen for touchend, explicitly pause the carousel 5738 // (as if it's the second time we tap on it, mouseenter compat event 5739 // is NOT fired) and after a timeout (to allow for mouse compatibility 5740 // events to fire) we explicitly restart cycling 5741 5742 this.pause(); 5743 if (this.touchTimeout) { 5744 clearTimeout(this.touchTimeout); 5745 } 5746 this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval); 5747 }; 5748 const swipeConfig = { 5749 leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)), 5750 rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)), 5751 endCallback: endCallBack 5752 }; 5753 this._swipeHelper = new Swipe(this._element, swipeConfig); 5754 } 5755 _keydown(event) { 5756 if (/input|textarea/i.test(event.target.tagName)) { 5757 return; 5758 } 5759 const direction = KEY_TO_DIRECTION[event.key]; 5760 if (direction) { 5761 event.preventDefault(); 5762 this._slide(this._directionToOrder(direction)); 5763 } 5764 } 5765 _getItemIndex(element) { 5766 return this._getItems().indexOf(element); 5767 } 5768 _setActiveIndicatorElement(index) { 5769 if (!this._indicatorsElement) { 5770 return; 5771 } 5772 const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement); 5773 activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2); 5774 activeIndicator.removeAttribute('aria-current'); 5775 const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement); 5776 if (newActiveIndicator) { 5777 newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2); 5778 newActiveIndicator.setAttribute('aria-current', 'true'); 5779 } 5780 } 5781 _updateInterval() { 5782 const element = this._activeElement || this._getActive(); 5783 if (!element) { 5784 return; 5785 } 5786 const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10); 5787 this._config.interval = elementInterval || this._config.defaultInterval; 5788 } 5789 _slide(order, element = null) { 5790 if (this._isSliding) { 5791 return; 5792 } 5793 const activeElement = this._getActive(); 5794 const isNext = order === ORDER_NEXT; 5795 const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap); 5796 if (nextElement === activeElement) { 5797 return; 5798 } 5799 const nextElementIndex = this._getItemIndex(nextElement); 5800 const triggerEvent = eventName => { 5801 return EventHandler.trigger(this._element, eventName, { 5802 relatedTarget: nextElement, 5803 direction: this._orderToDirection(order), 5804 from: this._getItemIndex(activeElement), 5805 to: nextElementIndex 5806 }); 5807 }; 5808 const slideEvent = triggerEvent(EVENT_SLIDE); 5809 if (slideEvent.defaultPrevented) { 5810 return; 5811 } 5812 if (!activeElement || !nextElement) { 5813 // Some weirdness is happening, so we bail 5814 // TODO: change tests that use empty divs to avoid this check 5815 return; 5816 } 5817 const isCycling = Boolean(this._interval); 5818 this.pause(); 5819 this._isSliding = true; 5820 this._setActiveIndicatorElement(nextElementIndex); 5821 this._activeElement = nextElement; 5822 const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END; 5823 const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV; 5824 nextElement.classList.add(orderClassName); 5825 reflow(nextElement); 5826 activeElement.classList.add(directionalClassName); 5827 nextElement.classList.add(directionalClassName); 5828 const completeCallBack = () => { 5829 nextElement.classList.remove(directionalClassName, orderClassName); 5830 nextElement.classList.add(CLASS_NAME_ACTIVE$2); 5831 activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName); 5832 this._isSliding = false; 5833 triggerEvent(EVENT_SLID); 5834 }; 5835 this._queueCallback(completeCallBack, activeElement, this._isAnimated()); 5836 if (isCycling) { 5837 this.cycle(); 5838 } 5839 } 5840 _isAnimated() { 5841 return this._element.classList.contains(CLASS_NAME_SLIDE); 5842 } 5843 _getActive() { 5844 return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); 5845 } 5846 _getItems() { 5847 return SelectorEngine.find(SELECTOR_ITEM, this._element); 5848 } 5849 _clearInterval() { 5850 if (this._interval) { 5851 clearInterval(this._interval); 5852 this._interval = null; 5853 } 5854 } 5855 _directionToOrder(direction) { 5856 if (isRTL()) { 5857 return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT; 5858 } 5859 return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV; 5860 } 5861 _orderToDirection(order) { 5862 if (isRTL()) { 5863 return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT; 5864 } 5865 return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT; 5866 } 5867 5868 // Static 5869 static jQueryInterface(config) { 5870 return this.each(function () { 5871 const data = Carousel.getOrCreateInstance(this, config); 5872 if (typeof config === 'number') { 5873 data.to(config); 5874 return; 5875 } 5876 if (typeof config === 'string') { 5877 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 5878 throw new TypeError(`No method named "${config}"`); 5879 } 5880 data[config](); 5881 } 5882 }); 5883 } 5884 } 5885 5886 /** 5887 * Data API implementation 5888 */ 5889 5890 EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) { 5891 const target = SelectorEngine.getElementFromSelector(this); 5892 if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { 5893 return; 5894 } 5895 event.preventDefault(); 5896 const carousel = Carousel.getOrCreateInstance(target); 5897 const slideIndex = this.getAttribute('data-bs-slide-to'); 5898 if (slideIndex) { 5899 carousel.to(slideIndex); 5900 carousel._maybeEnableCycle(); 5901 return; 5902 } 5903 if (Manipulator.getDataAttribute(this, 'slide') === 'next') { 5904 carousel.next(); 5905 carousel._maybeEnableCycle(); 5906 return; 5907 } 5908 carousel.prev(); 5909 carousel._maybeEnableCycle(); 5910 }); 5911 EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => { 5912 const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE); 5913 for (const carousel of carousels) { 5914 Carousel.getOrCreateInstance(carousel); 5915 } 5916 }); 5917 5918 /** 5919 * jQuery 5920 */ 5921 5922 defineJQueryPlugin(Carousel); 5923 5924 /** 5925 * -------------------------------------------------------------------------- 5926 * Bootstrap collapse.js 5927 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5928 * -------------------------------------------------------------------------- 5929 */ 5930 5931 5932 /** 5933 * Constants 5934 */ 5935 5936 const NAME$b = 'collapse'; 5937 const DATA_KEY$7 = 'bs.collapse'; 5938 const EVENT_KEY$7 = `.${DATA_KEY$7}`; 5939 const DATA_API_KEY$4 = '.data-api'; 5940 const EVENT_SHOW$6 = `show${EVENT_KEY$7}`; 5941 const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`; 5942 const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`; 5943 const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`; 5944 const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`; 5945 const CLASS_NAME_SHOW$7 = 'show'; 5946 const CLASS_NAME_COLLAPSE = 'collapse'; 5947 const CLASS_NAME_COLLAPSING = 'collapsing'; 5948 const CLASS_NAME_COLLAPSED = 'collapsed'; 5949 const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; 5950 const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'; 5951 const WIDTH = 'width'; 5952 const HEIGHT = 'height'; 5953 const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'; 5954 const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]'; 5955 const Default$a = { 5956 parent: null, 5957 toggle: true 5958 }; 5959 const DefaultType$a = { 5960 parent: '(null|element)', 5961 toggle: 'boolean' 5962 }; 5963 5964 /** 5965 * Class definition 5966 */ 5967 5968 class Collapse extends BaseComponent { 5969 constructor(element, config) { 5970 super(element, config); 5971 this._isTransitioning = false; 5972 this._triggerArray = []; 5973 const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); 5974 for (const elem of toggleList) { 5975 const selector = SelectorEngine.getSelectorFromElement(elem); 5976 const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element); 5977 if (selector !== null && filterElement.length) { 5978 this._triggerArray.push(elem); 5979 } 5980 } 5981 this._initializeChildren(); 5982 if (!this._config.parent) { 5983 this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); 5984 } 5985 if (this._config.toggle) { 5986 this.toggle(); 5987 } 5988 } 5989 5990 // Getters 5991 static get Default() { 5992 return Default$a; 5993 } 5994 static get DefaultType() { 5995 return DefaultType$a; 5996 } 5997 static get NAME() { 5998 return NAME$b; 5999 } 6000 6001 // Public 6002 toggle() { 6003 if (this._isShown()) { 6004 this.hide(); 6005 } else { 6006 this.show(); 6007 } 6008 } 6009 show() { 6010 if (this._isTransitioning || this._isShown()) { 6011 return; 6012 } 6013 let activeChildren = []; 6014 6015 // find active children 6016 if (this._config.parent) { 6017 activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, { 6018 toggle: false 6019 })); 6020 } 6021 if (activeChildren.length && activeChildren[0]._isTransitioning) { 6022 return; 6023 } 6024 const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6); 6025 if (startEvent.defaultPrevented) { 6026 return; 6027 } 6028 for (const activeInstance of activeChildren) { 6029 activeInstance.hide(); 6030 } 6031 const dimension = this._getDimension(); 6032 this._element.classList.remove(CLASS_NAME_COLLAPSE); 6033 this._element.classList.add(CLASS_NAME_COLLAPSING); 6034 this._element.style[dimension] = 0; 6035 this._addAriaAndCollapsedClass(this._triggerArray, true); 6036 this._isTransitioning = true; 6037 const complete = () => { 6038 this._isTransitioning = false; 6039 this._element.classList.remove(CLASS_NAME_COLLAPSING); 6040 this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); 6041 this._element.style[dimension] = ''; 6042 EventHandler.trigger(this._element, EVENT_SHOWN$6); 6043 }; 6044 const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 6045 const scrollSize = `scroll${capitalizedDimension}`; 6046 this._queueCallback(complete, this._element, true); 6047 this._element.style[dimension] = `${this._element[scrollSize]}px`; 6048 } 6049 hide() { 6050 if (this._isTransitioning || !this._isShown()) { 6051 return; 6052 } 6053 const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6); 6054 if (startEvent.defaultPrevented) { 6055 return; 6056 } 6057 const dimension = this._getDimension(); 6058 this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; 6059 reflow(this._element); 6060 this._element.classList.add(CLASS_NAME_COLLAPSING); 6061 this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); 6062 for (const trigger of this._triggerArray) { 6063 const element = SelectorEngine.getElementFromSelector(trigger); 6064 if (element && !this._isShown(element)) { 6065 this._addAriaAndCollapsedClass([trigger], false); 6066 } 6067 } 6068 this._isTransitioning = true; 6069 const complete = () => { 6070 this._isTransitioning = false; 6071 this._element.classList.remove(CLASS_NAME_COLLAPSING); 6072 this._element.classList.add(CLASS_NAME_COLLAPSE); 6073 EventHandler.trigger(this._element, EVENT_HIDDEN$6); 6074 }; 6075 this._element.style[dimension] = ''; 6076 this._queueCallback(complete, this._element, true); 6077 } 6078 _isShown(element = this._element) { 6079 return element.classList.contains(CLASS_NAME_SHOW$7); 6080 } 6081 6082 // Private 6083 _configAfterMerge(config) { 6084 config.toggle = Boolean(config.toggle); // Coerce string values 6085 config.parent = getElement(config.parent); 6086 return config; 6087 } 6088 _getDimension() { 6089 return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; 6090 } 6091 _initializeChildren() { 6092 if (!this._config.parent) { 6093 return; 6094 } 6095 const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4); 6096 for (const element of children) { 6097 const selected = SelectorEngine.getElementFromSelector(element); 6098 if (selected) { 6099 this._addAriaAndCollapsedClass([element], this._isShown(selected)); 6100 } 6101 } 6102 } 6103 _getFirstLevelChildren(selector) { 6104 const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); 6105 // remove children if greater depth 6106 return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element)); 6107 } 6108 _addAriaAndCollapsedClass(triggerArray, isOpen) { 6109 if (!triggerArray.length) { 6110 return; 6111 } 6112 for (const element of triggerArray) { 6113 element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen); 6114 element.setAttribute('aria-expanded', isOpen); 6115 } 6116 } 6117 6118 // Static 6119 static jQueryInterface(config) { 6120 const _config = {}; 6121 if (typeof config === 'string' && /show|hide/.test(config)) { 6122 _config.toggle = false; 6123 } 6124 return this.each(function () { 6125 const data = Collapse.getOrCreateInstance(this, _config); 6126 if (typeof config === 'string') { 6127 if (typeof data[config] === 'undefined') { 6128 throw new TypeError(`No method named "${config}"`); 6129 } 6130 data[config](); 6131 } 6132 }); 6133 } 6134 } 6135 6136 /** 6137 * Data API implementation 6138 */ 6139 6140 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) { 6141 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 6142 if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { 6143 event.preventDefault(); 6144 } 6145 for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) { 6146 Collapse.getOrCreateInstance(element, { 6147 toggle: false 6148 }).toggle(); 6149 } 6150 }); 6151 6152 /** 6153 * jQuery 6154 */ 6155 6156 defineJQueryPlugin(Collapse); 6157 6158 /** 6159 * -------------------------------------------------------------------------- 6160 * Bootstrap dropdown.js 6161 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6162 * -------------------------------------------------------------------------- 6163 */ 6164 6165 6166 /** 6167 * Constants 6168 */ 6169 6170 const NAME$a = 'dropdown'; 6171 const DATA_KEY$6 = 'bs.dropdown'; 6172 const EVENT_KEY$6 = `.${DATA_KEY$6}`; 6173 const DATA_API_KEY$3 = '.data-api'; 6174 const ESCAPE_KEY$2 = 'Escape'; 6175 const TAB_KEY$1 = 'Tab'; 6176 const ARROW_UP_KEY$1 = 'ArrowUp'; 6177 const ARROW_DOWN_KEY$1 = 'ArrowDown'; 6178 const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button 6179 6180 const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`; 6181 const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`; 6182 const EVENT_SHOW$5 = `show${EVENT_KEY$6}`; 6183 const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`; 6184 const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`; 6185 const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`; 6186 const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`; 6187 const CLASS_NAME_SHOW$6 = 'show'; 6188 const CLASS_NAME_DROPUP = 'dropup'; 6189 const CLASS_NAME_DROPEND = 'dropend'; 6190 const CLASS_NAME_DROPSTART = 'dropstart'; 6191 const CLASS_NAME_DROPUP_CENTER = 'dropup-center';
vendor: 6,606 bytes, lines 6192-6363
6192 const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center'; 6193 const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)'; 6194 const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`; 6195 const SELECTOR_MENU = '.dropdown-menu'; 6196 const SELECTOR_NAVBAR = '.navbar'; 6197 const SELECTOR_NAVBAR_NAV = '.navbar-nav'; 6198 const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; 6199 const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'; 6200 const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'; 6201 const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'; 6202 const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; 6203 const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; 6204 const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; 6205 const PLACEMENT_TOPCENTER = 'top'; 6206 const PLACEMENT_BOTTOMCENTER = 'bottom'; 6207 const Default$9 = { 6208 autoClose: true, 6209 boundary: 'clippingParents', 6210 display: 'dynamic', 6211 offset: [0, 2], 6212 popperConfig: null, 6213 reference: 'toggle' 6214 }; 6215 const DefaultType$9 = { 6216 autoClose: '(boolean|string)', 6217 boundary: '(string|element)', 6218 display: 'string', 6219 offset: '(array|string|function)', 6220 popperConfig: '(null|object|function)', 6221 reference: '(string|element|object)' 6222 }; 6223 6224 /** 6225 * Class definition 6226 */ 6227 6228 class Dropdown extends BaseComponent { 6229 constructor(element, config) { 6230 super(element, config); 6231 this._popper = null; 6232 this._parent = this._element.parentNode; // dropdown wrapper 6233 // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/ 6234 this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent); 6235 this._inNavbar = this._detectNavbar(); 6236 } 6237 6238 // Getters 6239 static get Default() { 6240 return Default$9; 6241 } 6242 static get DefaultType() { 6243 return DefaultType$9; 6244 } 6245 static get NAME() { 6246 return NAME$a; 6247 } 6248 6249 // Public 6250 toggle() { 6251 return this._isShown() ? this.hide() : this.show(); 6252 } 6253 show() { 6254 if (isDisabled(this._element) || this._isShown()) { 6255 return; 6256 } 6257 const relatedTarget = { 6258 relatedTarget: this._element 6259 }; 6260 const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget); 6261 if (showEvent.defaultPrevented) { 6262 return; 6263 } 6264 this._createPopper(); 6265 6266 // If this is a touch-enabled device we add extra 6267 // empty mouseover listeners to the body's immediate children; 6268 // only needed because of broken event delegation on iOS 6269 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 6270 if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) { 6271 for (const element of [].concat(...document.body.children)) { 6272 EventHandler.on(element, 'mouseover', noop); 6273 } 6274 } 6275 this._element.focus(); 6276 this._element.setAttribute('aria-expanded', true); 6277 this._menu.classList.add(CLASS_NAME_SHOW$6); 6278 this._element.classList.add(CLASS_NAME_SHOW$6); 6279 EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget); 6280 } 6281 hide() { 6282 if (isDisabled(this._element) || !this._isShown()) { 6283 return; 6284 } 6285 const relatedTarget = { 6286 relatedTarget: this._element 6287 }; 6288 this._completeHide(relatedTarget); 6289 } 6290 dispose() { 6291 if (this._popper) { 6292 this._popper.destroy(); 6293 } 6294 super.dispose(); 6295 } 6296 update() { 6297 this._inNavbar = this._detectNavbar(); 6298 if (this._popper) { 6299 this._popper.update(); 6300 } 6301 } 6302 6303 // Private 6304 _completeHide(relatedTarget) { 6305 const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget); 6306 if (hideEvent.defaultPrevented) { 6307 return; 6308 } 6309 6310 // If this is a touch-enabled device we remove the extra 6311 // empty mouseover listeners we added for iOS support 6312 if ('ontouchstart' in document.documentElement) { 6313 for (const element of [].concat(...document.body.children)) { 6314 EventHandler.off(element, 'mouseover', noop); 6315 } 6316 } 6317 if (this._popper) { 6318 this._popper.destroy(); 6319 } 6320 this._menu.classList.remove(CLASS_NAME_SHOW$6); 6321 this._element.classList.remove(CLASS_NAME_SHOW$6); 6322 this._element.setAttribute('aria-expanded', 'false'); 6323 Manipulator.removeDataAttribute(this._menu, 'popper'); 6324 EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget); 6325 } 6326 _getConfig(config) { 6327 config = super._getConfig(config); 6328 if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { 6329 // Popper virtual elements require a getBoundingClientRect method 6330 throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); 6331 } 6332 return config; 6333 } 6334 _createPopper() { 6335 if (typeof Popper__namespace === 'undefined') { 6336 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); 6337 } 6338 let referenceElement = this._element; 6339 if (this._config.reference === 'parent') { 6340 referenceElement = this._parent; 6341 } else if (isElement(this._config.reference)) { 6342 referenceElement = getElement(this._config.reference); 6343 } else if (typeof this._config.reference === 'object') { 6344 referenceElement = this._config.reference; 6345 } 6346 const popperConfig = this._getPopperConfig(); 6347 this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig); 6348 } 6349 _isShown() { 6350 return this._menu.classList.contains(CLASS_NAME_SHOW$6); 6351 } 6352 _getPlacement() { 6353 const parentDropdown = this._parent; 6354 if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { 6355 return PLACEMENT_RIGHT; 6356 } 6357 if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { 6358 return PLACEMENT_LEFT; 6359 } 6360 if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) { 6361 return PLACEMENT_TOPCENTER; 6362 } 6363 if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENT
vendor: 4,195 bytes, lines 6363-6477
6363ER)) { 6364 return PLACEMENT_BOTTOMCENTER; 6365 } 6366 6367 // We need to trim the value because custom properties can also include spaces 6368 const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'; 6369 if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) { 6370 return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP; 6371 } 6372 return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM; 6373 } 6374 _detectNavbar() { 6375 return this._element.closest(SELECTOR_NAVBAR) !== null; 6376 } 6377 _getOffset() { 6378 const { 6379 offset 6380 } = this._config; 6381 if (typeof offset === 'string') { 6382 return offset.split(',').map(value => Number.parseInt(value, 10)); 6383 } 6384 if (typeof offset === 'function') { 6385 return popperData => offset(popperData, this._element); 6386 } 6387 return offset; 6388 } 6389 _getPopperConfig() { 6390 const defaultBsPopperConfig = { 6391 placement: this._getPlacement(), 6392 modifiers: [{ 6393 name: 'preventOverflow', 6394 options: { 6395 boundary: this._config.boundary 6396 } 6397 }, { 6398 name: 'offset', 6399 options: { 6400 offset: this._getOffset() 6401 } 6402 }] 6403 }; 6404 6405 // Disable Popper if we have a static display or Dropdown is in Navbar 6406 if (this._inNavbar || this._config.display === 'static') { 6407 Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove 6408 defaultBsPopperConfig.modifiers = [{ 6409 name: 'applyStyles', 6410 enabled: false 6411 }]; 6412 } 6413 return { 6414 ...defaultBsPopperConfig, 6415 ...execute(this._config.popperConfig, [defaultBsPopperConfig]) 6416 }; 6417 } 6418 _selectMenuItem({ 6419 key, 6420 target 6421 }) { 6422 const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element)); 6423 if (!items.length) { 6424 return; 6425 } 6426 6427 // if target isn't included in items (e.g. when expanding the dropdown) 6428 // allow cycling to get the last item in case key equals ARROW_UP_KEY 6429 getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus(); 6430 } 6431 6432 // Static 6433 static jQueryInterface(config) { 6434 return this.each(function () { 6435 const data = Dropdown.getOrCreateInstance(this, config); 6436 if (typeof config !== 'string') { 6437 return; 6438 } 6439 if (typeof data[config] === 'undefined') { 6440 throw new TypeError(`No method named "${config}"`); 6441 } 6442 data[config](); 6443 }); 6444 } 6445 static clearMenus(event) { 6446 if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) { 6447 return; 6448 } 6449 const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN); 6450 for (const toggle of openToggles) { 6451 const context = Dropdown.getInstance(toggle); 6452 if (!context || context._config.autoClose === false) { 6453 continue; 6454 } 6455 const composedPath = event.composedPath(); 6456 const isMenuTarget = composedPath.includes(context._menu); 6457 if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { 6458 continue; 6459 } 6460 6461 // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu 6462 if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) { 6463 continue; 6464 } 6465 const relatedTarget = { 6466 relatedTarget: context._element 6467 }; 6468 if (event.type === 'click') { 6469 relatedTarget.clickEvent = event; 6470 } 6471 context._completeHide(relatedTarget); 6472 } 6473 } 6474 static dataApiKeydownHandler(event) { 6475 // If not an UP | DOWN | ESCAPE key => not a dropdown command 6476 // If input/textarea && if key is other than ESCAPE => not a dropdown command 6477
vendor: 32,163 bytes, lines 6478-7469
6478 const isInput = /input|textarea/i.test(event.target.tagName); 6479 const isEscapeEvent = event.key === ESCAPE_KEY$2; 6480 const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key); 6481 if (!isUpOrDownEvent && !isEscapeEvent) { 6482 return; 6483 } 6484 if (isInput && !isEscapeEvent) { 6485 return; 6486 } 6487 event.preventDefault(); 6488 6489 // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/ 6490 const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode); 6491 const instance = Dropdown.getOrCreateInstance(getToggleButton); 6492 if (isUpOrDownEvent) { 6493 event.stopPropagation(); 6494 instance.show(); 6495 instance._selectMenuItem(event); 6496 return; 6497 } 6498 if (instance._isShown()) { 6499 // else is escape and we check if it is shown 6500 event.stopPropagation(); 6501 instance.hide(); 6502 getToggleButton.focus(); 6503 } 6504 } 6505 } 6506 6507 /** 6508 * Data API implementation 6509 */ 6510 6511 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler); 6512 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler); 6513 EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus); 6514 EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); 6515 EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { 6516 event.preventDefault(); 6517 Dropdown.getOrCreateInstance(this).toggle(); 6518 }); 6519 6520 /** 6521 * jQuery 6522 */ 6523 6524 defineJQueryPlugin(Dropdown); 6525 6526 /** 6527 * -------------------------------------------------------------------------- 6528 * Bootstrap util/backdrop.js 6529 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6530 * -------------------------------------------------------------------------- 6531 */ 6532 6533 6534 /** 6535 * Constants 6536 */ 6537 6538 const NAME$9 = 'backdrop'; 6539 const CLASS_NAME_FADE$4 = 'fade'; 6540 const CLASS_NAME_SHOW$5 = 'show'; 6541 const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`; 6542 const Default$8 = { 6543 className: 'modal-backdrop', 6544 clickCallback: null, 6545 isAnimated: false, 6546 isVisible: true, 6547 // if false, we use the backdrop helper without adding any element to the dom 6548 rootElement: 'body' // give the choice to place backdrop under different elements 6549 }; 6550 6551 const DefaultType$8 = { 6552 className: 'string', 6553 clickCallback: '(function|null)', 6554 isAnimated: 'boolean', 6555 isVisible: 'boolean', 6556 rootElement: '(element|string)' 6557 }; 6558 6559 /** 6560 * Class definition 6561 */ 6562 6563 class Backdrop extends Config { 6564 constructor(config) { 6565 super(); 6566 this._config = this._getConfig(config); 6567 this._isAppended = false; 6568 this._element = null; 6569 } 6570 6571 // Getters 6572 static get Default() { 6573 return Default$8; 6574 } 6575 static get DefaultType() { 6576 return DefaultType$8; 6577 } 6578 static get NAME() { 6579 return NAME$9; 6580 } 6581 6582 // Public 6583 show(callback) { 6584 if (!this._config.isVisible) { 6585 execute(callback); 6586 return; 6587 } 6588 this._append(); 6589 const element = this._getElement(); 6590 if (this._config.isAnimated) { 6591 reflow(element); 6592 } 6593 element.classList.add(CLASS_NAME_SHOW$5); 6594 this._emulateAnimation(() => { 6595 execute(callback); 6596 }); 6597 } 6598 hide(callback) { 6599 if (!this._config.isVisible) { 6600 execute(callback); 6601 return; 6602 } 6603 this._getElement().classList.remove(CLASS_NAME_SHOW$5); 6604 this._emulateAnimation(() => { 6605 this.dispose(); 6606 execute(callback); 6607 }); 6608 } 6609 dispose() { 6610 if (!this._isAppended) { 6611 return; 6612 } 6613 EventHandler.off(this._element, EVENT_MOUSEDOWN); 6614 this._element.remove(); 6615 this._isAppended = false; 6616 } 6617 6618 // Private 6619 _getElement() { 6620 if (!this._element) { 6621 const backdrop = document.createElement('div'); 6622 backdrop.className = this._config.className; 6623 if (this._config.isAnimated) { 6624 backdrop.classList.add(CLASS_NAME_FADE$4); 6625 } 6626 this._element = backdrop; 6627 } 6628 return this._element; 6629 } 6630 _configAfterMerge(config) { 6631 // use getElement() with the default "body" to get a fresh Element on each instantiation 6632 config.rootElement = getElement(config.rootElement); 6633 return config; 6634 } 6635 _append() { 6636 if (this._isAppended) { 6637 return; 6638 } 6639 const element = this._getElement(); 6640 this._config.rootElement.append(element); 6641 EventHandler.on(element, EVENT_MOUSEDOWN, () => { 6642 execute(this._config.clickCallback); 6643 }); 6644 this._isAppended = true; 6645 } 6646 _emulateAnimation(callback) { 6647 executeAfterTransition(callback, this._getElement(), this._config.isAnimated); 6648 } 6649 } 6650 6651 /** 6652 * -------------------------------------------------------------------------- 6653 * Bootstrap util/focustrap.js 6654 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6655 * -------------------------------------------------------------------------- 6656 */ 6657 6658 6659 /** 6660 * Constants 6661 */ 6662 6663 const NAME$8 = 'focustrap'; 6664 const DATA_KEY$5 = 'bs.focustrap'; 6665 const EVENT_KEY$5 = `.${DATA_KEY$5}`; 6666 const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`; 6667 const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`; 6668 const TAB_KEY = 'Tab'; 6669 const TAB_NAV_FORWARD = 'forward'; 6670 const TAB_NAV_BACKWARD = 'backward'; 6671 const Default$7 = { 6672 autofocus: true, 6673 trapElement: null // The element to trap focus inside of 6674 }; 6675 6676 const DefaultType$7 = { 6677 autofocus: 'boolean', 6678 trapElement: 'element' 6679 }; 6680 6681 /** 6682 * Class definition 6683 */ 6684 6685 class FocusTrap extends Config { 6686 constructor(config) { 6687 super(); 6688 this._config = this._getConfig(config); 6689 this._isActive = false; 6690 this._lastTabNavDirection = null; 6691 } 6692 6693 // Getters 6694 static get Default() { 6695 return Default$7; 6696 } 6697 static get DefaultType() { 6698 return DefaultType$7; 6699 } 6700 static get NAME() { 6701 return NAME$8; 6702 } 6703 6704 // Public 6705 activate() { 6706 if (this._isActive) { 6707 return; 6708 } 6709 if (this._config.autofocus) { 6710 this._config.trapElement.focus(); 6711 } 6712 EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop 6713 EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event)); 6714 EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event)); 6715 this._isActive = true; 6716 } 6717 deactivate() { 6718 if (!this._isActive) { 6719 return; 6720 } 6721 this._isActive = false; 6722 EventHandler.off(document, EVENT_KEY$5); 6723 } 6724 6725 // Private 6726 _handleFocusin(event) { 6727 const { 6728 trapElement 6729 } = this._config; 6730 if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) { 6731 return; 6732 } 6733 const elements = SelectorEngine.focusableChildren(trapElement); 6734 if (elements.length === 0) { 6735 trapElement.focus(); 6736 } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) { 6737 elements[elements.length - 1].focus(); 6738 } else { 6739 elements[0].focus(); 6740 } 6741 } 6742 _handleKeydown(event) { 6743 if (event.key !== TAB_KEY) { 6744 return; 6745 } 6746 this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD; 6747 } 6748 } 6749 6750 /** 6751 * -------------------------------------------------------------------------- 6752 * Bootstrap util/scrollBar.js 6753 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6754 * -------------------------------------------------------------------------- 6755 */ 6756 6757 6758 /** 6759 * Constants 6760 */ 6761 6762 const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; 6763 const SELECTOR_STICKY_CONTENT = '.sticky-top'; 6764 const PROPERTY_PADDING = 'padding-right'; 6765 const PROPERTY_MARGIN = 'margin-right'; 6766 6767 /** 6768 * Class definition 6769 */ 6770 6771 class ScrollBarHelper { 6772 constructor() { 6773 this._element = document.body; 6774 } 6775 6776 // Public 6777 getWidth() { 6778 // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes 6779 const documentWidth = document.documentElement.clientWidth; 6780 return Math.abs(window.innerWidth - documentWidth); 6781 } 6782 hide() { 6783 const width = this.getWidth(); 6784 this._disableOverFlow(); 6785 // give padding to element to balance the hidden scrollbar width 6786 this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); 6787 // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth 6788 this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width); 6789 this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width); 6790 } 6791 reset() { 6792 this._resetElementAttributes(this._element, 'overflow'); 6793 this._resetElementAttributes(this._element, PROPERTY_PADDING); 6794 this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING); 6795 this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN); 6796 } 6797 isOverflowing() { 6798 return this.getWidth() > 0; 6799 } 6800 6801 // Private 6802 _disableOverFlow() { 6803 this._saveInitialAttribute(this._element, 'overflow'); 6804 this._element.style.overflow = 'hidden'; 6805 } 6806 _setElementAttributes(selector, styleProperty, callback) { 6807 const scrollbarWidth = this.getWidth(); 6808 const manipulationCallBack = element => { 6809 if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) { 6810 return; 6811 } 6812 this._saveInitialAttribute(element, styleProperty); 6813 const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty); 6814 element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`); 6815 }; 6816 this._applyManipulationCallback(selector, manipulationCallBack); 6817 } 6818 _saveInitialAttribute(element, styleProperty) { 6819 const actualValue = element.style.getPropertyValue(styleProperty); 6820 if (actualValue) { 6821 Manipulator.setDataAttribute(element, styleProperty, actualValue); 6822 } 6823 } 6824 _resetElementAttributes(selector, styleProperty) { 6825 const manipulationCallBack = element => { 6826 const value = Manipulator.getDataAttribute(element, styleProperty); 6827 // We only want to remove the property if the value is `null`; the value can also be zero 6828 if (value === null) { 6829 element.style.removeProperty(styleProperty); 6830 return; 6831 } 6832 Manipulator.removeDataAttribute(element, styleProperty); 6833 element.style.setProperty(styleProperty, value); 6834 }; 6835 this._applyManipulationCallback(selector, manipulationCallBack); 6836 } 6837 _applyManipulationCallback(selector, callBack) { 6838 if (isElement(selector)) { 6839 callBack(selector); 6840 return; 6841 } 6842 for (const sel of SelectorEngine.find(selector, this._element)) { 6843 callBack(sel); 6844 } 6845 } 6846 } 6847 6848 /** 6849 * -------------------------------------------------------------------------- 6850 * Bootstrap modal.js 6851 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 6852 * -------------------------------------------------------------------------- 6853 */ 6854 6855 6856 /** 6857 * Constants 6858 */ 6859 6860 const NAME$7 = 'modal'; 6861 const DATA_KEY$4 = 'bs.modal'; 6862 const EVENT_KEY$4 = `.${DATA_KEY$4}`; 6863 const DATA_API_KEY$2 = '.data-api'; 6864 const ESCAPE_KEY$1 = 'Escape'; 6865 const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`; 6866 const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`; 6867 const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`; 6868 const EVENT_SHOW$4 = `show${EVENT_KEY$4}`; 6869 const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`; 6870 const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`; 6871 const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`; 6872 const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`; 6873 const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`; 6874 const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`; 6875 const CLASS_NAME_OPEN = 'modal-open'; 6876 const CLASS_NAME_FADE$3 = 'fade'; 6877 const CLASS_NAME_SHOW$4 = 'show'; 6878 const CLASS_NAME_STATIC = 'modal-static'; 6879 const OPEN_SELECTOR$1 = '.modal.show'; 6880 const SELECTOR_DIALOG = '.modal-dialog'; 6881 const SELECTOR_MODAL_BODY = '.modal-body'; 6882 const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; 6883 const Default$6 = { 6884 backdrop: true, 6885 focus: true, 6886 keyboard: true 6887 }; 6888 const DefaultType$6 = { 6889 backdrop: '(boolean|string)', 6890 focus: 'boolean', 6891 keyboard: 'boolean' 6892 }; 6893 6894 /** 6895 * Class definition 6896 */ 6897 6898 class Modal extends BaseComponent { 6899 constructor(element, config) { 6900 super(element, config); 6901 this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element); 6902 this._backdrop = this._initializeBackDrop(); 6903 this._focustrap = this._initializeFocusTrap(); 6904 this._isShown = false; 6905 this._isTransitioning = false; 6906 this._scrollBar = new ScrollBarHelper(); 6907 this._addEventListeners(); 6908 } 6909 6910 // Getters 6911 static get Default() { 6912 return Default$6; 6913 } 6914 static get DefaultType() { 6915 return DefaultType$6; 6916 } 6917 static get NAME() { 6918 return NAME$7; 6919 } 6920 6921 // Public 6922 toggle(relatedTarget) { 6923 return this._isShown ? this.hide() : this.show(relatedTarget); 6924 } 6925 show(relatedTarget) { 6926 if (this._isShown || this._isTransitioning) { 6927 return; 6928 } 6929 const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, { 6930 relatedTarget 6931 }); 6932 if (showEvent.defaultPrevented) { 6933 return; 6934 } 6935 this._isShown = true; 6936 this._isTransitioning = true; 6937 this._scrollBar.hide(); 6938 document.body.classList.add(CLASS_NAME_OPEN); 6939 this._adjustDialog(); 6940 this._backdrop.show(() => this._showElement(relatedTarget)); 6941 } 6942 hide() { 6943 if (!this._isShown || this._isTransitioning) { 6944 return; 6945 } 6946 const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4); 6947 if (hideEvent.defaultPrevented) { 6948 return; 6949 } 6950 this._isShown = false; 6951 this._isTransitioning = true; 6952 this._focustrap.deactivate(); 6953 this._element.classList.remove(CLASS_NAME_SHOW$4); 6954 this._queueCallback(() => this._hideModal(), this._element, this._isAnimated()); 6955 } 6956 dispose() { 6957 EventHandler.off(window, EVENT_KEY$4); 6958 EventHandler.off(this._dialog, EVENT_KEY$4); 6959 this._backdrop.dispose(); 6960 this._focustrap.deactivate(); 6961 super.dispose(); 6962 } 6963 handleUpdate() { 6964 this._adjustDialog(); 6965 } 6966 6967 // Private 6968 _initializeBackDrop() { 6969 return new Backdrop({ 6970 isVisible: Boolean(this._config.backdrop), 6971 // 'static' option will be translated to true, and booleans will keep their value, 6972 isAnimated: this._isAnimated() 6973 }); 6974 } 6975 _initializeFocusTrap() { 6976 return new FocusTrap({ 6977 trapElement: this._element 6978 }); 6979 } 6980 _showElement(relatedTarget) { 6981 // try to append dynamic modal 6982 if (!document.body.contains(this._element)) { 6983 document.body.append(this._element); 6984 } 6985 this._element.style.display = 'block'; 6986 this._element.removeAttribute('aria-hidden'); 6987 this._element.setAttribute('aria-modal', true); 6988 this._element.setAttribute('role', 'dialog'); 6989 this._element.scrollTop = 0; 6990 const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog); 6991 if (modalBody) { 6992 modalBody.scrollTop = 0; 6993 } 6994 reflow(this._element); 6995 this._element.classList.add(CLASS_NAME_SHOW$4); 6996 const transitionComplete = () => { 6997 if (this._config.focus) { 6998 this._focustrap.activate(); 6999 } 7000 this._isTransitioning = false; 7001 EventHandler.trigger(this._element, EVENT_SHOWN$4, { 7002 relatedTarget 7003 }); 7004 }; 7005 this._queueCallback(transitionComplete, this._dialog, this._isAnimated()); 7006 } 7007 _addEventListeners() { 7008 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => { 7009 if (event.key !== ESCAPE_KEY$1) { 7010 return; 7011 } 7012 if (this._config.keyboard) { 7013 this.hide(); 7014 return; 7015 } 7016 this._triggerBackdropTransition(); 7017 }); 7018 EventHandler.on(window, EVENT_RESIZE$1, () => { 7019 if (this._isShown && !this._isTransitioning) { 7020 this._adjustDialog(); 7021 } 7022 }); 7023 EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => { 7024 // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks 7025 EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => { 7026 if (this._element !== event.target || this._element !== event2.target) { 7027 return; 7028 } 7029 if (this._config.backdrop === 'static') { 7030 this._triggerBackdropTransition(); 7031 return; 7032 } 7033 if (this._config.backdrop) { 7034 this.hide(); 7035 } 7036 }); 7037 }); 7038 } 7039 _hideModal() { 7040 this._element.style.display = 'none'; 7041 this._element.setAttribute('aria-hidden', true); 7042 this._element.removeAttribute('aria-modal'); 7043 this._element.removeAttribute('role'); 7044 this._isTransitioning = false; 7045 this._backdrop.hide(() => { 7046 document.body.classList.remove(CLASS_NAME_OPEN); 7047 this._resetAdjustments(); 7048 this._scrollBar.reset(); 7049 EventHandler.trigger(this._element, EVENT_HIDDEN$4); 7050 }); 7051 } 7052 _isAnimated() { 7053 return this._element.classList.contains(CLASS_NAME_FADE$3); 7054 } 7055 _triggerBackdropTransition() { 7056 const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1); 7057 if (hideEvent.defaultPrevented) { 7058 return; 7059 } 7060 const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 7061 const initialOverflowY = this._element.style.overflowY; 7062 // return if the following background transition hasn't yet completed 7063 if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) { 7064 return; 7065 } 7066 if (!isModalOverflowing) { 7067 this._element.style.overflowY = 'hidden'; 7068 } 7069 this._element.classList.add(CLASS_NAME_STATIC); 7070 this._queueCallback(() => { 7071 this._element.classList.remove(CLASS_NAME_STATIC); 7072 this._queueCallback(() => { 7073 this._element.style.overflowY = initialOverflowY; 7074 }, this._dialog); 7075 }, this._dialog); 7076 this._element.focus(); 7077 } 7078 7079 /** 7080 * The following methods are used to handle overflowing modals 7081 */ 7082 7083 _adjustDialog() { 7084 const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 7085 const scrollbarWidth = this._scrollBar.getWidth(); 7086 const isBodyOverflowing = scrollbarWidth > 0; 7087 if (isBodyOverflowing && !isModalOverflowing) { 7088 const property = isRTL() ? 'paddingLeft' : 'paddingRight'; 7089 this._element.style[property] = `${scrollbarWidth}px`; 7090 } 7091 if (!isBodyOverflowing && isModalOverflowing) { 7092 const property = isRTL() ? 'paddingRight' : 'paddingLeft'; 7093 this._element.style[property] = `${scrollbarWidth}px`; 7094 } 7095 } 7096 _resetAdjustments() { 7097 this._element.style.paddingLeft = ''; 7098 this._element.style.paddingRight = ''; 7099 } 7100 7101 // Static 7102 static jQueryInterface(config, relatedTarget) { 7103 return this.each(function () { 7104 const data = Modal.getOrCreateInstance(this, config); 7105 if (typeof config !== 'string') { 7106 return; 7107 } 7108 if (typeof data[config] === 'undefined') { 7109 throw new TypeError(`No method named "${config}"`); 7110 } 7111 data[config](relatedTarget); 7112 }); 7113 } 7114 } 7115 7116 /** 7117 * Data API implementation 7118 */ 7119 7120 EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) { 7121 const target = SelectorEngine.getElementFromSelector(this); 7122 if (['A', 'AREA'].includes(this.tagName)) { 7123 event.preventDefault(); 7124 } 7125 EventHandler.one(target, EVENT_SHOW$4, showEvent => { 7126 if (showEvent.defaultPrevented) { 7127 // only register focus restorer if modal will actually get shown 7128 return; 7129 } 7130 EventHandler.one(target, EVENT_HIDDEN$4, () => { 7131 if (isVisible(this)) { 7132 this.focus(); 7133 } 7134 }); 7135 }); 7136 7137 // avoid conflict when clicking modal toggler while another one is open 7138 const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1); 7139 if (alreadyOpen) { 7140 Modal.getInstance(alreadyOpen).hide(); 7141 } 7142 const data = Modal.getOrCreateInstance(target); 7143 data.toggle(this); 7144 }); 7145 enableDismissTrigger(Modal); 7146 7147 /** 7148 * jQuery 7149 */ 7150 7151 defineJQueryPlugin(Modal); 7152 7153 /** 7154 * -------------------------------------------------------------------------- 7155 * Bootstrap offcanvas.js 7156 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 7157 * -------------------------------------------------------------------------- 7158 */ 7159 7160 7161 /** 7162 * Constants 7163 */ 7164 7165 const NAME$6 = 'offcanvas'; 7166 const DATA_KEY$3 = 'bs.offcanvas'; 7167 const EVENT_KEY$3 = `.${DATA_KEY$3}`; 7168 const DATA_API_KEY$1 = '.data-api'; 7169 const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`; 7170 const ESCAPE_KEY = 'Escape'; 7171 const CLASS_NAME_SHOW$3 = 'show'; 7172 const CLASS_NAME_SHOWING$1 = 'showing'; 7173 const CLASS_NAME_HIDING = 'hiding'; 7174 const CLASS_NAME_BACKDROP = 'offcanvas-backdrop'; 7175 const OPEN_SELECTOR = '.offcanvas.show'; 7176 const EVENT_SHOW$3 = `show${EVENT_KEY$3}`; 7177 const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`; 7178 const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`; 7179 const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`; 7180 const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`; 7181 const EVENT_RESIZE = `resize${EVENT_KEY$3}`; 7182 const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`; 7183 const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`; 7184 const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; 7185 const Default$5 = { 7186 backdrop: true, 7187 keyboard: true, 7188 scroll: false 7189 }; 7190 const DefaultType$5 = { 7191 backdrop: '(boolean|string)', 7192 keyboard: 'boolean', 7193 scroll: 'boolean' 7194 }; 7195 7196 /** 7197 * Class definition 7198 */ 7199 7200 class Offcanvas extends BaseComponent { 7201 constructor(element, config) { 7202 super(element, config); 7203 this._isShown = false; 7204 this._backdrop = this._initializeBackDrop(); 7205 this._focustrap = this._initializeFocusTrap(); 7206 this._addEventListeners(); 7207 } 7208 7209 // Getters 7210 static get Default() { 7211 return Default$5; 7212 } 7213 static get DefaultType() { 7214 return DefaultType$5; 7215 } 7216 static get NAME() { 7217 return NAME$6; 7218 } 7219 7220 // Public 7221 toggle(relatedTarget) { 7222 return this._isShown ? this.hide() : this.show(relatedTarget); 7223 } 7224 show(relatedTarget) { 7225 if (this._isShown) { 7226 return; 7227 } 7228 const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, { 7229 relatedTarget 7230 }); 7231 if (showEvent.defaultPrevented) { 7232 return; 7233 } 7234 this._isShown = true; 7235 this._backdrop.show(); 7236 if (!this._config.scroll) { 7237 new ScrollBarHelper().hide(); 7238 } 7239 this._element.setAttribute('aria-modal', true); 7240 this._element.setAttribute('role', 'dialog'); 7241 this._element.classList.add(CLASS_NAME_SHOWING$1); 7242 const completeCallBack = () => { 7243 if (!this._config.scroll || this._config.backdrop) { 7244 this._focustrap.activate(); 7245 } 7246 this._element.classList.add(CLASS_NAME_SHOW$3); 7247 this._element.classList.remove(CLASS_NAME_SHOWING$1); 7248 EventHandler.trigger(this._element, EVENT_SHOWN$3, { 7249 relatedTarget 7250 }); 7251 }; 7252 this._queueCallback(completeCallBack, this._element, true); 7253 } 7254 hide() { 7255 if (!this._isShown) { 7256 return; 7257 } 7258 const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3); 7259 if (hideEvent.defaultPrevented) { 7260 return; 7261 } 7262 this._focustrap.deactivate(); 7263 this._element.blur(); 7264 this._isShown = false; 7265 this._element.classList.add(CLASS_NAME_HIDING); 7266 this._backdrop.hide(); 7267 const completeCallback = () => { 7268 this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING); 7269 this._element.removeAttribute('aria-modal'); 7270 this._element.removeAttribute('role'); 7271 if (!this._config.scroll) { 7272 new ScrollBarHelper().reset(); 7273 } 7274 EventHandler.trigger(this._element, EVENT_HIDDEN$3); 7275 }; 7276 this._queueCallback(completeCallback, this._element, true); 7277 } 7278 dispose() { 7279 this._backdrop.dispose(); 7280 this._focustrap.deactivate(); 7281 super.dispose(); 7282 } 7283 7284 // Private 7285 _initializeBackDrop() { 7286 const clickCallback = () => { 7287 if (this._config.backdrop === 'static') { 7288 EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED); 7289 return; 7290 } 7291 this.hide(); 7292 }; 7293 7294 // 'static' option will be translated to true, and booleans will keep their value 7295 const isVisible = Boolean(this._config.backdrop); 7296 return new Backdrop({ 7297 className: CLASS_NAME_BACKDROP, 7298 isVisible, 7299 isAnimated: true, 7300 rootElement: this._element.parentNode, 7301 clickCallback: isVisible ? clickCallback : null 7302 }); 7303 } 7304 _initializeFocusTrap() { 7305 return new FocusTrap({ 7306 trapElement: this._element 7307 }); 7308 } 7309 _addEventListeners() { 7310 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { 7311 if (event.key !== ESCAPE_KEY) { 7312 return; 7313 } 7314 if (this._config.keyboard) { 7315 this.hide(); 7316 return; 7317 } 7318 EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED); 7319 }); 7320 } 7321 7322 // Static 7323 static jQueryInterface(config) { 7324 return this.each(function () { 7325 const data = Offcanvas.getOrCreateInstance(this, config); 7326 if (typeof config !== 'string') { 7327 return; 7328 } 7329 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 7330 throw new TypeError(`No method named "${config}"`); 7331 } 7332 data[config](this); 7333 }); 7334 } 7335 } 7336 7337 /** 7338 * Data API implementation 7339 */ 7340 7341 EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) { 7342 const target = SelectorEngine.getElementFromSelector(this); 7343 if (['A', 'AREA'].includes(this.tagName)) { 7344 event.preventDefault(); 7345 } 7346 if (isDisabled(this)) { 7347 return; 7348 } 7349 EventHandler.one(target, EVENT_HIDDEN$3, () => { 7350 // focus on trigger when it is closed 7351 if (isVisible(this)) { 7352 this.focus(); 7353 } 7354 }); 7355 7356 // avoid conflict when clicking a toggler of an offcanvas, while another is open 7357 const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR); 7358 if (alreadyOpen && alreadyOpen !== target) { 7359 Offcanvas.getInstance(alreadyOpen).hide(); 7360 } 7361 const data = Offcanvas.getOrCreateInstance(target); 7362 data.toggle(this); 7363 }); 7364 EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => { 7365 for (const selector of SelectorEngine.find(OPEN_SELECTOR)) { 7366 Offcanvas.getOrCreateInstance(selector).show(); 7367 } 7368 }); 7369 EventHandler.on(window, EVENT_RESIZE, () => { 7370 for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) { 7371 if (getComputedStyle(element).position !== 'fixed') { 7372 Offcanvas.getOrCreateInstance(element).hide(); 7373 } 7374 } 7375 }); 7376 enableDismissTrigger(Offcanvas); 7377 7378 /** 7379 * jQuery 7380 */ 7381 7382 defineJQueryPlugin(Offcanvas); 7383 7384 /** 7385 * -------------------------------------------------------------------------- 7386 * Bootstrap util/sanitizer.js 7387 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 7388 * -------------------------------------------------------------------------- 7389 */ 7390 7391 // js-docs-start allow-list 7392 const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; 7393 const DefaultAllowlist = { 7394 // Global attributes allowed on any supplied element below. 7395 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 7396 a: ['target', 'href', 'title', 'rel'], 7397 area: [], 7398 b: [], 7399 br: [], 7400 col: [], 7401 code: [], 7402 div: [], 7403 em: [], 7404 hr: [], 7405 h1: [], 7406 h2: [], 7407 h3: [], 7408 h4: [], 7409 h5: [], 7410 h6: [], 7411 i: [], 7412 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], 7413 li: [], 7414 ol: [], 7415 p: [], 7416 pre: [], 7417 s: [], 7418 small: [], 7419 span: [], 7420 sub: [], 7421 sup: [], 7422 strong: [], 7423 u: [], 7424 ul: [] 7425 }; 7426 // js-docs-end allow-list 7427 7428 const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']); 7429 7430 /** 7431 * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation 7432 * contexts. 7433 * 7434 * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38 7435 */ 7436 // eslint-disable-next-line unicorn/better-regex 7437 const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i; 7438 const allowedAttribute = (attribute, allowedAttributeList) => { 7439 const attributeName = attribute.nodeName.toLowerCase(); 7440 if (allowedAttributeList.includes(attributeName)) { 7441 if (uriAttributes.has(attributeName)) { 7442 return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue)); 7443 } 7444 return true; 7445 } 7446 7447 // Check if a regular expression validates the attribute. 7448 return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName)); 7449 }; 7450 function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { 7451 if (!unsafeHtml.length) { 7452 return unsafeHtml; 7453 } 7454 if (sanitizeFunction && typeof sanitizeFunction === 'function') { 7455 return sanitizeFunction(unsafeHtml); 7456 } 7457 const domParser = new window.DOMParser(); 7458 const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); 7459 const elements = [].concat(...createdDocument.body.querySelectorAll('*')); 7460 for (const element of elements) { 7461 const elementName = element.nodeName.toLowerCase(); 7462 if (!Object.keys(allowList).includes(elementName)) { 7463 element.remove(); 7464 continue; 7465 } 7466 const attributeList = [].concat(...element.attributes); 7467 const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []); 7468 for (const attribute of attributeList) { 7469 if (!allowedAttribute(attribute, allowedAttributes)) {
vendor: 8,160 bytes, lines 7470-7757
7470 element.removeAttribute(attribute.nodeName); 7471 } 7472 } 7473 } 7474 return createdDocument.body.innerHTML; 7475 } 7476 7477 /** 7478 * -------------------------------------------------------------------------- 7479 * Bootstrap util/template-factory.js 7480 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 7481 * -------------------------------------------------------------------------- 7482 */ 7483 7484 7485 /** 7486 * Constants 7487 */ 7488 7489 const NAME$5 = 'TemplateFactory'; 7490 const Default$4 = { 7491 allowList: DefaultAllowlist, 7492 content: {}, 7493 // { selector : text , selector2 : text2 , } 7494 extraClass: '', 7495 html: false, 7496 sanitize: true, 7497 sanitizeFn: null, 7498 template: '<div></div>' 7499 }; 7500 const DefaultType$4 = { 7501 allowList: 'object', 7502 content: 'object', 7503 extraClass: '(string|function)', 7504 html: 'boolean', 7505 sanitize: 'boolean', 7506 sanitizeFn: '(null|function)', 7507 template: 'string' 7508 }; 7509 const DefaultContentType = { 7510 entry: '(string|element|function|null)', 7511 selector: '(string|element)' 7512 }; 7513 7514 /** 7515 * Class definition 7516 */ 7517 7518 class TemplateFactory extends Config { 7519 constructor(config) { 7520 super(); 7521 this._config = this._getConfig(config); 7522 } 7523 7524 // Getters 7525 static get Default() { 7526 return Default$4; 7527 } 7528 static get DefaultType() { 7529 return DefaultType$4; 7530 } 7531 static get NAME() { 7532 return NAME$5; 7533 } 7534 7535 // Public 7536 getContent() { 7537 return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean); 7538 } 7539 hasContent() { 7540 return this.getContent().length > 0; 7541 } 7542 changeContent(content) { 7543 this._checkContent(content); 7544 this._config.content = { 7545 ...this._config.content, 7546 ...content 7547 }; 7548 return this; 7549 } 7550 toHtml() { 7551 const templateWrapper = document.createElement('div'); 7552 templateWrapper.innerHTML = this._maybeSanitize(this._config.template); 7553 for (const [selector, text] of Object.entries(this._config.content)) { 7554 this._setContent(templateWrapper, text, selector); 7555 } 7556 const template = templateWrapper.children[0]; 7557 const extraClass = this._resolvePossibleFunction(this._config.extraClass); 7558 if (extraClass) { 7559 template.classList.add(...extraClass.split(' ')); 7560 } 7561 return template; 7562 } 7563 7564 // Private 7565 _typeCheckConfig(config) { 7566 super._typeCheckConfig(config); 7567 this._checkContent(config.content); 7568 } 7569 _checkContent(arg) { 7570 for (const [selector, content] of Object.entries(arg)) { 7571 super._typeCheckConfig({ 7572 selector, 7573 entry: content 7574 }, DefaultContentType); 7575 } 7576 } 7577 _setContent(template, content, selector) { 7578 const templateElement = SelectorEngine.findOne(selector, template); 7579 if (!templateElement) { 7580 return; 7581 } 7582 content = this._resolvePossibleFunction(content); 7583 if (!content) { 7584 templateElement.remove(); 7585 return; 7586 } 7587 if (isElement(content)) { 7588 this._putElementInTemplate(getElement(content), templateElement); 7589 return; 7590 } 7591 if (this._config.html) { 7592 templateElement.innerHTML = this._maybeSanitize(content); 7593 return; 7594 } 7595 templateElement.textContent = content; 7596 } 7597 _maybeSanitize(arg) { 7598 return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg; 7599 } 7600 _resolvePossibleFunction(arg) { 7601 return execute(arg, [this]); 7602 } 7603 _putElementInTemplate(element, templateElement) { 7604 if (this._config.html) { 7605 templateElement.innerHTML = ''; 7606 templateElement.append(element); 7607 return; 7608 } 7609 templateElement.textContent = element.textContent; 7610 } 7611 } 7612 7613 /** 7614 * -------------------------------------------------------------------------- 7615 * Bootstrap tooltip.js 7616 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 7617 * -------------------------------------------------------------------------- 7618 */ 7619 7620 7621 /** 7622 * Constants 7623 */ 7624 7625 const NAME$4 = 'tooltip'; 7626 const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); 7627 const CLASS_NAME_FADE$2 = 'fade'; 7628 const CLASS_NAME_MODAL = 'modal'; 7629 const CLASS_NAME_SHOW$2 = 'show'; 7630 const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; 7631 const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; 7632 const EVENT_MODAL_HIDE = 'hide.bs.modal'; 7633 const TRIGGER_HOVER = 'hover'; 7634 const TRIGGER_FOCUS = 'focus'; 7635 const TRIGGER_CLICK = 'click'; 7636 const TRIGGER_MANUAL = 'manual'; 7637 const EVENT_HIDE$2 = 'hide'; 7638 const EVENT_HIDDEN$2 = 'hidden'; 7639 const EVENT_SHOW$2 = 'show'; 7640 const EVENT_SHOWN$2 = 'shown'; 7641 const EVENT_INSERTED = 'inserted'; 7642 const EVENT_CLICK$1 = 'click'; 7643 const EVENT_FOCUSIN$1 = 'focusin'; 7644 const EVENT_FOCUSOUT$1 = 'focusout'; 7645 const EVENT_MOUSEENTER = 'mouseenter'; 7646 const EVENT_MOUSELEAVE = 'mouseleave'; 7647 const AttachmentMap = { 7648 AUTO: 'auto', 7649 TOP: 'top', 7650 RIGHT: isRTL() ? 'left' : 'right', 7651 BOTTOM: 'bottom', 7652 LEFT: isRTL() ? 'right' : 'left' 7653 }; 7654 const Default$3 = { 7655 allowList: DefaultAllowlist, 7656 animation: true, 7657 boundary: 'clippingParents', 7658 container: false, 7659 customClass: '', 7660 delay: 0, 7661 fallbackPlacements: ['top', 'right', 'bottom', 'left'], 7662 html: false, 7663 offset: [0, 6], 7664 placement: 'top', 7665 popperConfig: null, 7666 sanitize: true, 7667 sanitizeFn: null, 7668 selector: false, 7669 template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>', 7670 title: '', 7671 trigger: 'hover focus' 7672 }; 7673 const DefaultType$3 = { 7674 allowList: 'object', 7675 animation: 'boolean', 7676 boundary: '(string|element)', 7677 container: '(string|element|boolean)', 7678 customClass: '(string|function)', 7679 delay: '(number|object)', 7680 fallbackPlacements: 'array', 7681 html: 'boolean', 7682 offset: '(array|string|function)', 7683 placement: '(string|function)', 7684 popperConfig: '(null|object|function)', 7685 sanitize: 'boolean', 7686 sanitizeFn: '(null|function)', 7687 selector: '(string|boolean)', 7688 template: 'string', 7689 title: '(string|element|function)', 7690 trigger: 'string' 7691 }; 7692 7693 /** 7694 * Class definition 7695 */ 7696 7697 class Tooltip extends BaseComponent { 7698 constructor(element, config) { 7699 if (typeof Popper__namespace === 'undefined') { 7700 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); 7701 } 7702 super(element, config); 7703 7704 // Private 7705 this._isEnabled = true; 7706 this._timeout = 0; 7707 this._isHovered = null; 7708 this._activeTrigger = {}; 7709 this._popper = null; 7710 this._templateFactory = null; 7711 this._newContent = null; 7712 7713 // Protected 7714 this.tip = null; 7715 this._setListeners(); 7716 if (!this._config.selector) { 7717 this._fixTitle(); 7718 } 7719 } 7720 7721 // Getters 7722 static get Default() { 7723 return Default$3; 7724 } 7725 static get DefaultType() { 7726 return DefaultType$3; 7727 } 7728 static get NAME() { 7729 return NAME$4; 7730 } 7731 7732 // Public 7733 enable() { 7734 this._isEnabled = true; 7735 } 7736 disable() { 7737 this._isEnabled = false; 7738 } 7739 toggleEnabled() { 7740 this._isEnabled = !this._isEnabled; 7741 } 7742 toggle() { 7743 if (!this._isEnabled) { 7744 return; 7745 } 7746 this._activeTrigger.click = !this._activeTrigger.click; 7747 if (this._isShown()) { 7748 this._leave(); 7749 return; 7750 } 7751 this._enter(); 7752 } 7753 dispose() { 7754 clearTimeout(this._timeout); 7755 EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); 7756 if (this._element.getAttribute('data-bs-original-title')) { 7757 this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
vendor: 5,735 bytes, lines 7758-7917
7758 } 7759 this._disposePopper(); 7760 super.dispose(); 7761 } 7762 show() { 7763 if (this._element.style.display === 'none') { 7764 throw new Error('Please use show on visible elements'); 7765 } 7766 if (!(this._isWithContent() && this._isEnabled)) { 7767 return; 7768 } 7769 const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2)); 7770 const shadowRoot = findShadowRoot(this._element); 7771 const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element); 7772 if (showEvent.defaultPrevented || !isInTheDom) { 7773 return; 7774 } 7775 7776 // TODO: v6 remove this or make it optional 7777 this._disposePopper(); 7778 const tip = this._getTipElement(); 7779 this._element.setAttribute('aria-describedby', tip.getAttribute('id')); 7780 const { 7781 container 7782 } = this._config; 7783 if (!this._element.ownerDocument.documentElement.contains(this.tip)) { 7784 container.append(tip); 7785 EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED)); 7786 } 7787 this._popper = this._createPopper(tip); 7788 tip.classList.add(CLASS_NAME_SHOW$2); 7789 7790 // If this is a touch-enabled device we add extra 7791 // empty mouseover listeners to the body's immediate children; 7792 // only needed because of broken event delegation on iOS 7793 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 7794 if ('ontouchstart' in document.documentElement) { 7795 for (const element of [].concat(...document.body.children)) { 7796 EventHandler.on(element, 'mouseover', noop); 7797 } 7798 } 7799 const complete = () => { 7800 EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2)); 7801 if (this._isHovered === false) { 7802 this._leave(); 7803 } 7804 this._isHovered = false; 7805 }; 7806 this._queueCallback(complete, this.tip, this._isAnimated()); 7807 } 7808 hide() { 7809 if (!this._isShown()) { 7810 return; 7811 } 7812 const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2)); 7813 if (hideEvent.defaultPrevented) { 7814 return; 7815 } 7816 const tip = this._getTipElement(); 7817 tip.classList.remove(CLASS_NAME_SHOW$2); 7818 7819 // If this is a touch-enabled device we remove the extra 7820 // empty mouseover listeners we added for iOS support 7821 if ('ontouchstart' in document.documentElement) { 7822 for (const element of [].concat(...document.body.children)) { 7823 EventHandler.off(element, 'mouseover', noop); 7824 } 7825 } 7826 this._activeTrigger[TRIGGER_CLICK] = false; 7827 this._activeTrigger[TRIGGER_FOCUS] = false; 7828 this._activeTrigger[TRIGGER_HOVER] = false; 7829 this._isHovered = null; // it is a trick to support manual triggering 7830 7831 const complete = () => { 7832 if (this._isWithActiveTrigger()) { 7833 return; 7834 } 7835 if (!this._isHovered) { 7836 this._disposePopper(); 7837 } 7838 this._element.removeAttribute('aria-describedby'); 7839 EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2)); 7840 }; 7841 this._queueCallback(complete, this.tip, this._isAnimated()); 7842 } 7843 update() { 7844 if (this._popper) { 7845 this._popper.update(); 7846 } 7847 } 7848 7849 // Protected 7850 _isWithContent() { 7851 return Boolean(this._getTitle()); 7852 } 7853 _getTipElement() { 7854 if (!this.tip) { 7855 this.tip = this._createTipElement(this._newContent || this._getContentForTemplate()); 7856 } 7857 return this.tip; 7858 } 7859 _createTipElement(content) { 7860 const tip = this._getTemplateFactory(content).toHtml(); 7861 7862 // TODO: remove this check in v6 7863 if (!tip) { 7864 return null; 7865 } 7866 tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); 7867 // TODO: v6 the following can be achieved with CSS only 7868 tip.classList.add(`bs-${this.constructor.NAME}-auto`); 7869 const tipId = getUID(this.constructor.NAME).toString(); 7870 tip.setAttribute('id', tipId); 7871 if (this._isAnimated()) { 7872 tip.classList.add(CLASS_NAME_FADE$2); 7873 } 7874 return tip; 7875 } 7876 setContent(content) { 7877 this._newContent = content; 7878 if (this._isShown()) { 7879 this._disposePopper(); 7880 this.show(); 7881 } 7882 } 7883 _getTemplateFactory(content) { 7884 if (this._templateFactory) { 7885 this._templateFactory.changeContent(content); 7886 } else { 7887 this._templateFactory = new TemplateFactory({ 7888 ...this._config, 7889 // the `content` var has to be after `this._config` 7890 // to override config.content in case of popover 7891 content, 7892 extraClass: this._resolvePossibleFunction(this._config.customClass) 7893 }); 7894 } 7895 return this._templateFactory; 7896 } 7897 _getContentForTemplate() { 7898 return { 7899 [SELECTOR_TOOLTIP_INNER]: this._getTitle() 7900 }; 7901 } 7902 _getTitle() { 7903 return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title'); 7904 } 7905 7906 // Private 7907 _initializeOnDelegatedTarget(event) { 7908 return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); 7909 } 7910 _isAnimated() { 7911 return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2); 7912 } 7913 _isShown() { 7914 return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2); 7915 } 7916 _createPopper(tip) { 7917 const placement = execute(this._config.placement, [this, tip, this._element]);
vendor: 4,859 bytes, lines 7918-8047
7918 const attachment = AttachmentMap[placement.toUpperCase()]; 7919 return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment)); 7920 } 7921 _getOffset() { 7922 const { 7923 offset 7924 } = this._config; 7925 if (typeof offset === 'string') { 7926 return offset.split(',').map(value => Number.parseInt(value, 10)); 7927 } 7928 if (typeof offset === 'function') { 7929 return popperData => offset(popperData, this._element); 7930 } 7931 return offset; 7932 } 7933 _resolvePossibleFunction(arg) { 7934 return execute(arg, [this._element]); 7935 } 7936 _getPopperConfig(attachment) { 7937 const defaultBsPopperConfig = { 7938 placement: attachment, 7939 modifiers: [{ 7940 name: 'flip', 7941 options: { 7942 fallbackPlacements: this._config.fallbackPlacements 7943 } 7944 }, { 7945 name: 'offset', 7946 options: { 7947 offset: this._getOffset() 7948 } 7949 }, { 7950 name: 'preventOverflow', 7951 options: { 7952 boundary: this._config.boundary 7953 } 7954 }, { 7955 name: 'arrow', 7956 options: { 7957 element: `.${this.constructor.NAME}-arrow` 7958 } 7959 }, { 7960 name: 'preSetPlacement', 7961 enabled: true, 7962 phase: 'beforeMain', 7963 fn: data => { 7964 // Pre-set Popper's placement attribute in order to read the arrow sizes properly. 7965 // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement 7966 this._getTipElement().setAttribute('data-popper-placement', data.state.placement); 7967 } 7968 }] 7969 }; 7970 return { 7971 ...defaultBsPopperConfig, 7972 ...execute(this._config.popperConfig, [defaultBsPopperConfig]) 7973 }; 7974 } 7975 _setListeners() { 7976 const triggers = this._config.trigger.split(' '); 7977 for (const trigger of triggers) { 7978 if (trigger === 'click') { 7979 EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => { 7980 const context = this._initializeOnDelegatedTarget(event); 7981 context.toggle(); 7982 }); 7983 } else if (trigger !== TRIGGER_MANUAL) { 7984 const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1); 7985 const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1); 7986 EventHandler.on(this._element, eventIn, this._config.selector, event => { 7987 const context = this._initializeOnDelegatedTarget(event); 7988 context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; 7989 context._enter(); 7990 }); 7991 EventHandler.on(this._element, eventOut, this._config.selector, event => { 7992 const context = this._initializeOnDelegatedTarget(event); 7993 context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); 7994 context._leave(); 7995 }); 7996 } 7997 } 7998 this._hideModalHandler = () => { 7999 if (this._element) { 8000 this.hide(); 8001 } 8002 }; 8003 EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); 8004 } 8005 _fixTitle() { 8006 const title = this._element.getAttribute('title'); 8007 if (!title) { 8008 return; 8009 } 8010 if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) { 8011 this._element.setAttribute('aria-label', title); 8012 } 8013 this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility 8014 this._element.removeAttribute('title'); 8015 } 8016 _enter() { 8017 if (this._isShown() || this._isHovered) { 8018 this._isHovered = true; 8019 return; 8020 } 8021 this._isHovered = true; 8022 this._setTimeout(() => { 8023 if (this._isHovered) { 8024 this.show(); 8025 } 8026 }, this._config.delay.show); 8027 } 8028 _leave() { 8029 if (this._isWithActiveTrigger()) { 8030 return; 8031 } 8032 this._isHovered = false; 8033 this._setTimeout(() => { 8034 if (!this._isHovered) { 8035 this.hide(); 8036 } 8037 }, this._config.delay.hide); 8038 } 8039 _setTimeout(handler, timeout) { 8040 clearTimeout(this._timeout); 8041 this._timeout = setTimeout(handler, timeout); 8042 } 8043 _isWithActiveTrigger() { 8044 return Object.values(this._activeTrigger).includes(true); 8045 } 8046 _getConfig(config) { 8047 const dataAttributes = Manipulator.getDataAttributes(this._element);
vendor: 15,467 bytes, lines 8048-8513
8048 for (const dataAttribute of Object.keys(dataAttributes)) { 8049 if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) { 8050 delete dataAttributes[dataAttribute]; 8051 } 8052 } 8053 config = { 8054 ...dataAttributes, 8055 ...(typeof config === 'object' && config ? config : {}) 8056 }; 8057 config = this._mergeConfigObj(config); 8058 config = this._configAfterMerge(config); 8059 this._typeCheckConfig(config); 8060 return config; 8061 } 8062 _configAfterMerge(config) { 8063 config.container = config.container === false ? document.body : getElement(config.container); 8064 if (typeof config.delay === 'number') { 8065 config.delay = { 8066 show: config.delay, 8067 hide: config.delay 8068 }; 8069 } 8070 if (typeof config.title === 'number') { 8071 config.title = config.title.toString(); 8072 } 8073 if (typeof config.content === 'number') { 8074 config.content = config.content.toString(); 8075 } 8076 return config; 8077 } 8078 _getDelegateConfig() { 8079 const config = {}; 8080 for (const [key, value] of Object.entries(this._config)) { 8081 if (this.constructor.Default[key] !== value) { 8082 config[key] = value; 8083 } 8084 } 8085 config.selector = false; 8086 config.trigger = 'manual'; 8087 8088 // In the future can be replaced with: 8089 // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]]) 8090 // `Object.fromEntries(keysWithDifferentValues)` 8091 return config; 8092 } 8093 _disposePopper() { 8094 if (this._popper) { 8095 this._popper.destroy(); 8096 this._popper = null; 8097 } 8098 if (this.tip) { 8099 this.tip.remove(); 8100 this.tip = null; 8101 } 8102 } 8103 8104 // Static 8105 static jQueryInterface(config) { 8106 return this.each(function () { 8107 const data = Tooltip.getOrCreateInstance(this, config); 8108 if (typeof config !== 'string') { 8109 return; 8110 } 8111 if (typeof data[config] === 'undefined') { 8112 throw new TypeError(`No method named "${config}"`); 8113 } 8114 data[config](); 8115 }); 8116 } 8117 } 8118 8119 /** 8120 * jQuery 8121 */ 8122 8123 defineJQueryPlugin(Tooltip); 8124 8125 /** 8126 * -------------------------------------------------------------------------- 8127 * Bootstrap popover.js 8128 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 8129 * -------------------------------------------------------------------------- 8130 */ 8131 8132 8133 /** 8134 * Constants 8135 */ 8136 8137 const NAME$3 = 'popover'; 8138 const SELECTOR_TITLE = '.popover-header'; 8139 const SELECTOR_CONTENT = '.popover-body'; 8140 const Default$2 = { 8141 ...Tooltip.Default, 8142 content: '', 8143 offset: [0, 8], 8144 placement: 'right', 8145 template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>', 8146 trigger: 'click' 8147 }; 8148 const DefaultType$2 = { 8149 ...Tooltip.DefaultType, 8150 content: '(null|string|element|function)' 8151 }; 8152 8153 /** 8154 * Class definition 8155 */ 8156 8157 class Popover extends Tooltip { 8158 // Getters 8159 static get Default() { 8160 return Default$2; 8161 } 8162 static get DefaultType() { 8163 return DefaultType$2; 8164 } 8165 static get NAME() { 8166 return NAME$3; 8167 } 8168 8169 // Overrides 8170 _isWithContent() { 8171 return this._getTitle() || this._getContent(); 8172 } 8173 8174 // Private 8175 _getContentForTemplate() { 8176 return { 8177 [SELECTOR_TITLE]: this._getTitle(), 8178 [SELECTOR_CONTENT]: this._getContent() 8179 }; 8180 } 8181 _getContent() { 8182 return this._resolvePossibleFunction(this._config.content); 8183 } 8184 8185 // Static 8186 static jQueryInterface(config) { 8187 return this.each(function () { 8188 const data = Popover.getOrCreateInstance(this, config); 8189 if (typeof config !== 'string') { 8190 return; 8191 } 8192 if (typeof data[config] === 'undefined') { 8193 throw new TypeError(`No method named "${config}"`); 8194 } 8195 data[config](); 8196 }); 8197 } 8198 } 8199 8200 /** 8201 * jQuery 8202 */ 8203 8204 defineJQueryPlugin(Popover); 8205 8206 /** 8207 * -------------------------------------------------------------------------- 8208 * Bootstrap scrollspy.js 8209 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 8210 * -------------------------------------------------------------------------- 8211 */ 8212 8213 8214 /** 8215 * Constants 8216 */ 8217 8218 const NAME$2 = 'scrollspy'; 8219 const DATA_KEY$2 = 'bs.scrollspy'; 8220 const EVENT_KEY$2 = `.${DATA_KEY$2}`; 8221 const DATA_API_KEY = '.data-api'; 8222 const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`; 8223 const EVENT_CLICK = `click${EVENT_KEY$2}`; 8224 const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`; 8225 const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; 8226 const CLASS_NAME_ACTIVE$1 = 'active'; 8227 const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]'; 8228 const SELECTOR_TARGET_LINKS = '[href]'; 8229 const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; 8230 const SELECTOR_NAV_LINKS = '.nav-link'; 8231 const SELECTOR_NAV_ITEMS = '.nav-item'; 8232 const SELECTOR_LIST_ITEMS = '.list-group-item'; 8233 const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`; 8234 const SELECTOR_DROPDOWN = '.dropdown'; 8235 const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; 8236 const Default$1 = { 8237 offset: null, 8238 // TODO: v6 @deprecated, keep it for backwards compatibility reasons 8239 rootMargin: '0px 0px -25%', 8240 smoothScroll: false, 8241 target: null, 8242 threshold: [0.1, 0.5, 1] 8243 }; 8244 const DefaultType$1 = { 8245 offset: '(number|null)', 8246 // TODO v6 @deprecated, keep it for backwards compatibility reasons 8247 rootMargin: 'string', 8248 smoothScroll: 'boolean', 8249 target: 'element', 8250 threshold: 'array' 8251 }; 8252 8253 /** 8254 * Class definition 8255 */ 8256 8257 class ScrollSpy extends BaseComponent { 8258 constructor(element, config) { 8259 super(element, config); 8260 8261 // this._element is the observablesContainer and config.target the menu links wrapper 8262 this._targetLinks = new Map(); 8263 this._observableSections = new Map(); 8264 this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element; 8265 this._activeTarget = null; 8266 this._observer = null; 8267 this._previousScrollData = { 8268 visibleEntryTop: 0, 8269 parentScrollTop: 0 8270 }; 8271 this.refresh(); // initialize 8272 } 8273 8274 // Getters 8275 static get Default() { 8276 return Default$1; 8277 } 8278 static get DefaultType() { 8279 return DefaultType$1; 8280 } 8281 static get NAME() { 8282 return NAME$2; 8283 } 8284 8285 // Public 8286 refresh() { 8287 this._initializeTargetsAndObservables(); 8288 this._maybeEnableSmoothScroll(); 8289 if (this._observer) { 8290 this._observer.disconnect(); 8291 } else { 8292 this._observer = this._getNewObserver(); 8293 } 8294 for (const section of this._observableSections.values()) { 8295 this._observer.observe(section); 8296 } 8297 } 8298 dispose() { 8299 this._observer.disconnect(); 8300 super.dispose(); 8301 } 8302 8303 // Private 8304 _configAfterMerge(config) { 8305 // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case 8306 config.target = getElement(config.target) || document.body; 8307 8308 // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only 8309 config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin; 8310 if (typeof config.threshold === 'string') { 8311 config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value)); 8312 } 8313 return config; 8314 } 8315 _maybeEnableSmoothScroll() { 8316 if (!this._config.smoothScroll) { 8317 return; 8318 } 8319 8320 // unregister any previous listeners 8321 EventHandler.off(this._config.target, EVENT_CLICK); 8322 EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => { 8323 const observableSection = this._observableSections.get(event.target.hash); 8324 if (observableSection) { 8325 event.preventDefault(); 8326 const root = this._rootElement || window; 8327 const height = observableSection.offsetTop - this._element.offsetTop; 8328 if (root.scrollTo) { 8329 root.scrollTo({ 8330 top: height, 8331 behavior: 'smooth' 8332 }); 8333 return; 8334 } 8335 8336 // Chrome 60 doesn't support `scrollTo` 8337 root.scrollTop = height; 8338 } 8339 }); 8340 } 8341 _getNewObserver() { 8342 const options = { 8343 root: this._rootElement, 8344 threshold: this._config.threshold, 8345 rootMargin: this._config.rootMargin 8346 }; 8347 return new IntersectionObserver(entries => this._observerCallback(entries), options); 8348 } 8349 8350 // The logic of selection 8351 _observerCallback(entries) { 8352 const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`); 8353 const activate = entry => { 8354 this._previousScrollData.visibleEntryTop = entry.target.offsetTop; 8355 this._process(targetElement(entry)); 8356 }; 8357 const parentScrollTop = (this._rootElement || document.documentElement).scrollTop; 8358 const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop; 8359 this._previousScrollData.parentScrollTop = parentScrollTop; 8360 for (const entry of entries) { 8361 if (!entry.isIntersecting) { 8362 this._activeTarget = null; 8363 this._clearActiveClass(targetElement(entry)); 8364 continue; 8365 } 8366 const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; 8367 // if we are scrolling down, pick the bigger offsetTop 8368 if (userScrollsDown && entryIsLowerThanPrevious) { 8369 activate(entry); 8370 // if parent isn't scrolled, let's keep the first visible item, breaking the iteration 8371 if (!parentScrollTop) { 8372 return; 8373 } 8374 continue; 8375 } 8376 8377 // if we are scrolling up, pick the smallest offsetTop 8378 if (!userScrollsDown && !entryIsLowerThanPrevious) { 8379 activate(entry); 8380 } 8381 } 8382 } 8383 _initializeTargetsAndObservables() { 8384 this._targetLinks = new Map(); 8385 this._observableSections = new Map(); 8386 const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target); 8387 for (const anchor of targetLinks) { 8388 // ensure that the anchor has an id and is not disabled 8389 if (!anchor.hash || isDisabled(anchor)) { 8390 continue; 8391 } 8392 const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element); 8393 8394 // ensure that the observableSection exists & is visible 8395 if (isVisible(observableSection)) { 8396 this._targetLinks.set(decodeURI(anchor.hash), anchor); 8397 this._observableSections.set(anchor.hash, observableSection); 8398 } 8399 } 8400 } 8401 _process(target) { 8402 if (this._activeTarget === target) { 8403 return; 8404 } 8405 this._clearActiveClass(this._config.target); 8406 this._activeTarget = target; 8407 target.classList.add(CLASS_NAME_ACTIVE$1); 8408 this._activateParents(target); 8409 EventHandler.trigger(this._element, EVENT_ACTIVATE, { 8410 relatedTarget: target 8411 }); 8412 } 8413 _activateParents(target) { 8414 // Activate dropdown parents 8415 if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { 8416 SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1); 8417 return; 8418 } 8419 for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) { 8420 // Set triggered links parents as active 8421 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 8422 for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) { 8423 item.classList.add(CLASS_NAME_ACTIVE$1); 8424 } 8425 } 8426 } 8427 _clearActiveClass(parent) { 8428 parent.classList.remove(CLASS_NAME_ACTIVE$1); 8429 const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent); 8430 for (const node of activeNodes) { 8431 node.classList.remove(CLASS_NAME_ACTIVE$1); 8432 } 8433 } 8434 8435 // Static 8436 static jQueryInterface(config) { 8437 return this.each(function () { 8438 const data = ScrollSpy.getOrCreateInstance(this, config); 8439 if (typeof config !== 'string') { 8440 return; 8441 } 8442 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 8443 throw new TypeError(`No method named "${config}"`); 8444 } 8445 data[config](); 8446 }); 8447 } 8448 } 8449 8450 /** 8451 * Data API implementation 8452 */ 8453 8454 EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => { 8455 for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) { 8456 ScrollSpy.getOrCreateInstance(spy); 8457 } 8458 }); 8459 8460 /** 8461 * jQuery 8462 */ 8463 8464 defineJQueryPlugin(ScrollSpy); 8465 8466 /** 8467 * -------------------------------------------------------------------------- 8468 * Bootstrap tab.js 8469 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 8470 * -------------------------------------------------------------------------- 8471 */ 8472 8473 8474 /** 8475 * Constants 8476 */ 8477 8478 const NAME$1 = 'tab'; 8479 const DATA_KEY$1 = 'bs.tab'; 8480 const EVENT_KEY$1 = `.${DATA_KEY$1}`; 8481 const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`; 8482 const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`; 8483 const EVENT_SHOW$1 = `show${EVENT_KEY$1}`; 8484 const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`; 8485 const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`; 8486 const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`; 8487 const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`; 8488 const ARROW_LEFT_KEY = 'ArrowLeft'; 8489 const ARROW_RIGHT_KEY = 'ArrowRight'; 8490 const ARROW_UP_KEY = 'ArrowUp'; 8491 const ARROW_DOWN_KEY = 'ArrowDown'; 8492 const CLASS_NAME_ACTIVE = 'active'; 8493 const CLASS_NAME_FADE$1 = 'fade'; 8494 const CLASS_NAME_SHOW$1 = 'show'; 8495 const CLASS_DROPDOWN = 'dropdown'; 8496 const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; 8497 const SELECTOR_DROPDOWN_MENU = '.dropdown-menu'; 8498 const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)'; 8499 const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]'; 8500 const SELECTOR_OUTER = '.nav-item, .list-group-item'; 8501 const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`; 8502 const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6 8503 const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`; 8504 const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`; 8505 8506 /** 8507 * Class definition 8508 */ 8509 8510 class Tab extends BaseComponent { 8511 constructor(element) { 8512 super(element); 8513 this._parent = this._element.closest(SELECTOR_TAB_PANEL);
vendor: 5,048 bytes, lines 8514-8650
8514 if (!this._parent) { 8515 return; 8516 // TODO: should throw exception in v6 8517 // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`) 8518 } 8519 8520 // Set up initial aria attributes 8521 this._setInitialAttributes(this._parent, this._getChildren()); 8522 EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)); 8523 } 8524 8525 // Getters 8526 static get NAME() { 8527 return NAME$1; 8528 } 8529 8530 // Public 8531 show() { 8532 // Shows this elem and deactivate the active sibling if exists 8533 const innerElem = this._element; 8534 if (this._elemIsActive(innerElem)) { 8535 return; 8536 } 8537 8538 // Search for active tab on same parent to deactivate it 8539 const active = this._getActiveElem(); 8540 const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, { 8541 relatedTarget: innerElem 8542 }) : null; 8543 const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, { 8544 relatedTarget: active 8545 }); 8546 if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) { 8547 return; 8548 } 8549 this._deactivate(active, innerElem); 8550 this._activate(innerElem, active); 8551 } 8552 8553 // Private 8554 _activate(element, relatedElem) { 8555 if (!element) { 8556 return; 8557 } 8558 element.classList.add(CLASS_NAME_ACTIVE); 8559 this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section 8560 8561 const complete = () => { 8562 if (element.getAttribute('role') !== 'tab') { 8563 element.classList.add(CLASS_NAME_SHOW$1); 8564 return; 8565 } 8566 element.removeAttribute('tabindex'); 8567 element.setAttribute('aria-selected', true); 8568 this._toggleDropDown(element, true); 8569 EventHandler.trigger(element, EVENT_SHOWN$1, { 8570 relatedTarget: relatedElem 8571 }); 8572 }; 8573 this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1)); 8574 } 8575 _deactivate(element, relatedElem) { 8576 if (!element) { 8577 return; 8578 } 8579 element.classList.remove(CLASS_NAME_ACTIVE); 8580 element.blur(); 8581 this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too 8582 8583 const complete = () => { 8584 if (element.getAttribute('role') !== 'tab') { 8585 element.classList.remove(CLASS_NAME_SHOW$1); 8586 return; 8587 } 8588 element.setAttribute('aria-selected', false); 8589 element.setAttribute('tabindex', '-1'); 8590 this._toggleDropDown(element, false); 8591 EventHandler.trigger(element, EVENT_HIDDEN$1, { 8592 relatedTarget: relatedElem 8593 }); 8594 }; 8595 this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1)); 8596 } 8597 _keydown(event) { 8598 if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) { 8599 return; 8600 } 8601 event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page 8602 event.preventDefault(); 8603 const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key); 8604 const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true); 8605 if (nextActiveElement) { 8606 nextActiveElement.focus({ 8607 preventScroll: true 8608 }); 8609 Tab.getOrCreateInstance(nextActiveElement).show(); 8610 } 8611 } 8612 _getChildren() { 8613 // collection of inner elements 8614 return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent); 8615 } 8616 _getActiveElem() { 8617 return this._getChildren().find(child => this._elemIsActive(child)) || null; 8618 } 8619 _setInitialAttributes(parent, children) { 8620 this._setAttributeIfNotExists(parent, 'role', 'tablist'); 8621 for (const child of children) { 8622 this._setInitialAttributesOnChild(child); 8623 } 8624 } 8625 _setInitialAttributesOnChild(child) { 8626 child = this._getInnerElement(child); 8627 const isActive = this._elemIsActive(child); 8628 const outerElem = this._getOuterElement(child); 8629 child.setAttribute('aria-selected', isActive); 8630 if (outerElem !== child) { 8631 this._setAttributeIfNotExists(outerElem, 'role', 'presentation'); 8632 } 8633 if (!isActive) { 8634 child.setAttribute('tabindex', '-1'); 8635 } 8636 this._setAttributeIfNotExists(child, 'role', 'tab'); 8637 8638 // set attributes to the related panel too 8639 this._setInitialAttributesOnTargetPanel(child); 8640 } 8641 _setInitialAttributesOnTargetPanel(child) { 8642 const target = SelectorEngine.getElementFromSelector(child); 8643 if (!target) { 8644 return; 8645 } 8646 this._setAttributeIfNotExists(target, 'role', 'tabpanel'); 8647 if (child.id) { 8648 this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`); 8649 } 8650 }
vendor: 7,313 bytes, lines 8651-8891
8651 _toggleDropDown(element, open) { 8652 const outerElem = this._getOuterElement(element); 8653 if (!outerElem.classList.contains(CLASS_DROPDOWN)) { 8654 return; 8655 } 8656 const toggle = (selector, className) => { 8657 const element = SelectorEngine.findOne(selector, outerElem); 8658 if (element) { 8659 element.classList.toggle(className, open); 8660 } 8661 }; 8662 toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE); 8663 toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1); 8664 outerElem.setAttribute('aria-expanded', open); 8665 } 8666 _setAttributeIfNotExists(element, attribute, value) { 8667 if (!element.hasAttribute(attribute)) { 8668 element.setAttribute(attribute, value); 8669 } 8670 } 8671 _elemIsActive(elem) { 8672 return elem.classList.contains(CLASS_NAME_ACTIVE); 8673 } 8674 8675 // Try to get the inner element (usually the .nav-link) 8676 _getInnerElement(elem) { 8677 return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem); 8678 } 8679 8680 // Try to get the outer element (usually the .nav-item) 8681 _getOuterElement(elem) { 8682 return elem.closest(SELECTOR_OUTER) || elem; 8683 } 8684 8685 // Static 8686 static jQueryInterface(config) { 8687 return this.each(function () { 8688 const data = Tab.getOrCreateInstance(this); 8689 if (typeof config !== 'string') { 8690 return; 8691 } 8692 if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { 8693 throw new TypeError(`No method named "${config}"`); 8694 } 8695 data[config](); 8696 }); 8697 } 8698 } 8699 8700 /** 8701 * Data API implementation 8702 */ 8703 8704 EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { 8705 if (['A', 'AREA'].includes(this.tagName)) { 8706 event.preventDefault(); 8707 } 8708 if (isDisabled(this)) { 8709 return; 8710 } 8711 Tab.getOrCreateInstance(this).show(); 8712 }); 8713 8714 /** 8715 * Initialize on focus 8716 */ 8717 EventHandler.on(window, EVENT_LOAD_DATA_API, () => { 8718 for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) { 8719 Tab.getOrCreateInstance(element); 8720 } 8721 }); 8722 /** 8723 * jQuery 8724 */ 8725 8726 defineJQueryPlugin(Tab); 8727 8728 /** 8729 * -------------------------------------------------------------------------- 8730 * Bootstrap toast.js 8731 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 8732 * -------------------------------------------------------------------------- 8733 */ 8734 8735 8736 /** 8737 * Constants 8738 */ 8739 8740 const NAME = 'toast'; 8741 const DATA_KEY = 'bs.toast'; 8742 const EVENT_KEY = `.${DATA_KEY}`; 8743 const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`; 8744 const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`; 8745 const EVENT_FOCUSIN = `focusin${EVENT_KEY}`; 8746 const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`; 8747 const EVENT_HIDE = `hide${EVENT_KEY}`; 8748 const EVENT_HIDDEN = `hidden${EVENT_KEY}`; 8749 const EVENT_SHOW = `show${EVENT_KEY}`; 8750 const EVENT_SHOWN = `shown${EVENT_KEY}`; 8751 const CLASS_NAME_FADE = 'fade'; 8752 const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility 8753 const CLASS_NAME_SHOW = 'show'; 8754 const CLASS_NAME_SHOWING = 'showing'; 8755 const DefaultType = { 8756 animation: 'boolean', 8757 autohide: 'boolean', 8758 delay: 'number' 8759 }; 8760 const Default = { 8761 animation: true, 8762 autohide: true, 8763 delay: 5000 8764 }; 8765 8766 /** 8767 * Class definition 8768 */ 8769 8770 class Toast extends BaseComponent { 8771 constructor(element, config) { 8772 super(element, config); 8773 this._timeout = null; 8774 this._hasMouseInteraction = false; 8775 this._hasKeyboardInteraction = false; 8776 this._setListeners(); 8777 } 8778 8779 // Getters 8780 static get Default() { 8781 return Default; 8782 } 8783 static get DefaultType() { 8784 return DefaultType; 8785 } 8786 static get NAME() { 8787 return NAME; 8788 } 8789 8790 // Public 8791 show() { 8792 const showEvent = EventHandler.trigger(this._element, EVENT_SHOW); 8793 if (showEvent.defaultPrevented) { 8794 return; 8795 } 8796 this._clearTimeout(); 8797 if (this._config.animation) { 8798 this._element.classList.add(CLASS_NAME_FADE); 8799 } 8800 const complete = () => { 8801 this._element.classList.remove(CLASS_NAME_SHOWING); 8802 EventHandler.trigger(this._element, EVENT_SHOWN); 8803 this._maybeScheduleHide(); 8804 }; 8805 this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated 8806 reflow(this._element); 8807 this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING); 8808 this._queueCallback(complete, this._element, this._config.animation); 8809 } 8810 hide() { 8811 if (!this.isShown()) { 8812 return; 8813 } 8814 const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE); 8815 if (hideEvent.defaultPrevented) { 8816 return; 8817 } 8818 const complete = () => { 8819 this._element.classList.add(CLASS_NAME_HIDE); // @deprecated 8820 this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW); 8821 EventHandler.trigger(this._element, EVENT_HIDDEN); 8822 }; 8823 this._element.classList.add(CLASS_NAME_SHOWING); 8824 this._queueCallback(complete, this._element, this._config.animation); 8825 } 8826 dispose() { 8827 this._clearTimeout(); 8828 if (this.isShown()) { 8829 this._element.classList.remove(CLASS_NAME_SHOW); 8830 } 8831 super.dispose(); 8832 } 8833 isShown() { 8834 return this._element.classList.contains(CLASS_NAME_SHOW); 8835 } 8836 8837 // Private 8838 8839 _maybeScheduleHide() { 8840 if (!this._config.autohide) { 8841 return; 8842 } 8843 if (this._hasMouseInteraction || this._hasKeyboardInteraction) { 8844 return; 8845 } 8846 this._timeout = setTimeout(() => { 8847 this.hide(); 8848 }, this._config.delay); 8849 } 8850 _onInteraction(event, isInteracting) { 8851 switch (event.type) { 8852 case 'mouseover': 8853 case 'mouseout': 8854 { 8855 this._hasMouseInteraction = isInteracting; 8856 break; 8857 } 8858 case 'focusin': 8859 case 'focusout': 8860 { 8861 this._hasKeyboardInteraction = isInteracting; 8862 break; 8863 } 8864 } 8865 if (isInteracting) { 8866 this._clearTimeout(); 8867 return; 8868 } 8869 const nextElement = event.relatedTarget; 8870 if (this._element === nextElement || this._element.contains(nextElement)) { 8871 return; 8872 } 8873 this._maybeScheduleHide(); 8874 } 8875 _setListeners() { 8876 EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true)); 8877 EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false)); 8878 EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true)); 8879 EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false)); 8880 } 8881 _clearTimeout() { 8882 clearTimeout(this._timeout); 8883 this._timeout = null; 8884 } 8885 8886 // Static 8887 static jQueryInterface(config) { 8888 return this.each(function () { 8889 const data = Toast.getOrCreateInstance(this, config); 8890 if (typeof config === 'string') { 8891 if (typeof data[config] === 'undefined') {
vendor: 5,180 bytes, lines 8892-8942
8892 throw new TypeError(`No method named "${config}"`); 8893 } 8894 data[config](this); 8895 } 8896 }); 8897 } 8898 } 8899 8900 /** 8901 * Data API implementation 8902 */ 8903 8904 enableDismissTrigger(Toast); 8905 8906 /** 8907 * jQuery 8908 */ 8909 8910 defineJQueryPlugin(Toast); 8911 8912 /** 8913 * -------------------------------------------------------------------------- 8914 * Bootstrap index.umd.js 8915 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 8916 * -------------------------------------------------------------------------- 8917 */ 8918 8919 const index_umd = { 8920 Alert, 8921 Button, 8922 Carousel, 8923 Collapse, 8924 Dropdown, 8925 Modal, 8926 Offcanvas, 8927 Popover, 8928 ScrollSpy, 8929 Tab, 8930 Toast, 8931 Tooltip 8932 }; 8933 8934 return index_umd; 8935 8936})); 8937 8938/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl 8939 * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT 8940 * */ 8941 8942!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.