understrap/js/theme-bootstrap4.min.js

32 lines
79 KiB
JavaScript

/*!
* Understrap v1.1.0 (https://understrap.com)
* Copyright 2013-2022 The UnderStrap Authors (https://github.com/understrap/understrap/graphs/contributors)
* Licensed under GPL (http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).understrap={},t.jQuery)}(this,(function(t,e){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=i(e);const s="transitionend";function o(t){let e=!1;return n.default(this).one(r.TRANSITION_END,(()=>{e=!0})),setTimeout((()=>{e||r.triggerTransitionEnd(this)}),t),this}const r={TRANSITION_END:"bsTransitionEnd",getUID(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement(t){let e=t.getAttribute("data-target");if(!e||"#"===e){const i=t.getAttribute("href");e=i&&"#"!==i?i.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement(t){if(!t)return 0;let e=n.default(t).css("transition-duration"),i=n.default(t).css("transition-delay");const s=parseFloat(e),o=parseFloat(i);return s||o?(e=e.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(e)+parseFloat(i))):0},reflow:t=>t.offsetHeight,triggerTransitionEnd(t){n.default(t).trigger(s)},supportsTransitionEnd:()=>Boolean(s),isElement:t=>(t[0]||t).nodeType,typeCheckConfig(t,e,i){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const o=i[s],a=e[s],l=a&&r.isElement(a)?"element":null==(n=a)?`${n}`:{}.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(l))throw new Error(`${t.toUpperCase()}: Option "${s}" provided type "${l}" but expected type "${o}".`)}var n},findShadowRoot(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?r.findShadowRoot(t.parentNode):null},jQueryDetection(){if(void 0===n.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");const t=n.default.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")}};r.jQueryDetection(),n.default.fn.emulateTransitionEnd=o,n.default.event.special[r.TRANSITION_END]={bindType:s,delegateType:s,handle(t){if(n.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};const a="bs.alert",l=n.default.fn.alert;class d{constructor(t){this._element=t}static get VERSION(){return"4.6.1"}close(t){let e=this._element;t&&(e=this._getRootElement(t));this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)}dispose(){n.default.removeData(this._element,a),this._element=null}_getRootElement(t){const e=r.getSelectorFromElement(t);let i=!1;return e&&(i=document.querySelector(e)),i||(i=n.default(t).closest(".alert")[0]),i}_triggerCloseEvent(t){const e=n.default.Event("close.bs.alert");return n.default(t).trigger(e),e}_removeElement(t){if(n.default(t).removeClass("show"),!n.default(t).hasClass("fade"))return void this._destroyElement(t);const e=r.getTransitionDurationFromElement(t);n.default(t).one(r.TRANSITION_END,(e=>this._destroyElement(t,e))).emulateTransitionEnd(e)}_destroyElement(t){n.default(t).detach().trigger("closed.bs.alert").remove()}static _jQueryInterface(t){return this.each((function(){const e=n.default(this);let i=e.data(a);i||(i=new d(this),e.data(a,i)),"close"===t&&i[t](this)}))}static _handleDismiss(t){return function(e){e&&e.preventDefault(),t.close(this)}}}n.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',d._handleDismiss(new d)),n.default.fn.alert=d._jQueryInterface,n.default.fn.alert.Constructor=d,n.default.fn.alert.noConflict=()=>(n.default.fn.alert=l,d._jQueryInterface);const c="bs.button",h=n.default.fn.button,u="active",f='[data-toggle^="button"]',p='input:not([type="hidden"])',m=".btn";class g{constructor(t){this._element=t,this.shouldAvoidTriggerChange=!1}static get VERSION(){return"4.6.1"}toggle(){let t=!0,e=!0;const i=n.default(this._element).closest('[data-toggle="buttons"]')[0];if(i){const s=this._element.querySelector(p);if(s){if("radio"===s.type)if(s.checked&&this._element.classList.contains(u))t=!1;else{const t=i.querySelector(".active");t&&n.default(t).removeClass(u)}t&&("checkbox"!==s.type&&"radio"!==s.type||(s.checked=!this._element.classList.contains(u)),this.shouldAvoidTriggerChange||n.default(s).trigger("change")),s.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(u)),t&&n.default(this._element).toggleClass(u))}dispose(){n.default.removeData(this._element,c),this._element=null}static _jQueryInterface(t,e){return this.each((function(){const i=n.default(this);let s=i.data(c);s||(s=new g(this),i.data(c,s)),s.shouldAvoidTriggerChange=e,"toggle"===t&&s[t]()}))}}n.default(document).on("click.bs.button.data-api",f,(t=>{let e=t.target;const i=e;if(n.default(e).hasClass("btn")||(e=n.default(e).closest(m)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{const s=e.querySelector(p);if(s&&(s.hasAttribute("disabled")||s.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==i.tagName&&"LABEL"===e.tagName||g._jQueryInterface.call(n.default(e),"toggle","INPUT"===i.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",f,(t=>{const e=n.default(t.target).closest(m)[0];n.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),n.default(window).on("load.bs.button.data-api",(()=>{let t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn'));for(let e=0,i=t.length;e<i;e++){const i=t[e],n=i.querySelector(p);n.checked||n.hasAttribute("checked")?i.classList.add(u):i.classList.remove(u)}t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'));for(let e=0,i=t.length;e<i;e++){const i=t[e];"true"===i.getAttribute("aria-pressed")?i.classList.add(u):i.classList.remove(u)}})),n.default.fn.button=g._jQueryInterface,n.default.fn.button.Constructor=g,n.default.fn.button.noConflict=()=>(n.default.fn.button=h,g._jQueryInterface);const _="carousel",v="bs.carousel",b=".bs.carousel",y=n.default.fn[_],E="active",w="next",T="prev",C="slid.bs.carousel",S=".active.carousel-item",D={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},N={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},A={TOUCH:"touch",PEN:"pen"};class I{constructor(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()}static get VERSION(){return"4.6.1"}static get Default(){return D}next(){this._isSliding||this._slide(w)}nextWhenVisible(){const t=n.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()}prev(){this._isSliding||this._slide(T)}pause(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(r.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=this._element.querySelector(S);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void n.default(this._element).one(C,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const i=t>e?w:T;this._slide(i,this._items[t])}dispose(){n.default(this._element).off(b),n.default.removeData(this._element,v),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}_getConfig(t){return t={...D,...t},r.typeCheckConfig(_,t,N),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}_addEventListeners(){this._config.keyboard&&n.default(this._element).on("keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&n.default(this._element).on("mouseenter.bs.carousel",(t=>this.pause(t))).on("mouseleave.bs.carousel",(t=>this.cycle(t))),this._config.touch&&this._addTouchEventListeners()}_addTouchEventListeners(){if(!this._touchSupported)return;const t=t=>{this._pointerEvent&&A[t.originalEvent.pointerType.toUpperCase()]?this.touchStartX=t.originalEvent.clientX:this._pointerEvent||(this.touchStartX=t.originalEvent.touches[0].clientX)},e=t=>{this.touchDeltaX=t.originalEvent.touches&&t.originalEvent.touches.length>1?0:t.originalEvent.touches[0].clientX-this.touchStartX},i=t=>{this._pointerEvent&&A[t.originalEvent.pointerType.toUpperCase()]&&(this.touchDeltaX=t.originalEvent.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),500+this._config.interval))};n.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(t=>t.preventDefault())),this._pointerEvent?(n.default(this._element).on("pointerdown.bs.carousel",(e=>t(e))),n.default(this._element).on("pointerup.bs.carousel",(t=>i(t))),this._element.classList.add("pointer-event")):(n.default(this._element).on("touchstart.bs.carousel",(e=>t(e))),n.default(this._element).on("touchmove.bs.carousel",(t=>e(t))),n.default(this._element).on("touchend.bs.carousel",(t=>i(t))))}_keydown(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()}}_getItemIndex(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)}_getItemByDirection(t,e){const i=t===w,n=t===T,s=this._getItemIndex(e),o=this._items.length-1;if((n&&0===s||i&&s===o)&&!this._config.wrap)return e;const r=(s+(t===T?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),s=this._getItemIndex(this._element.querySelector(S)),o=n.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:s,to:i});return n.default(this._element).trigger(o),o}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));n.default(e).removeClass(E);const i=this._indicatorsElement.children[this._getItemIndex(t)];i&&n.default(i).addClass(E)}}_updateInterval(){const t=this._activeElement||this._element.querySelector(S);if(!t)return;const e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._element.querySelector(S),s=this._getItemIndex(i),o=e||i&&this._getItemByDirection(t,i),a=this._getItemIndex(o),l=Boolean(this._interval);let d,c,h;if(t===w?(d="carousel-item-left",c="carousel-item-next",h="left"):(d="carousel-item-right",c="carousel-item-prev",h="right"),o&&n.default(o).hasClass(E))return void(this._isSliding=!1);if(this._triggerSlideEvent(o,h).isDefaultPrevented())return;if(!i||!o)return;this._isSliding=!0,l&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const u=n.default.Event(C,{relatedTarget:o,direction:h,from:s,to:a});if(n.default(this._element).hasClass("slide")){n.default(o).addClass(c),r.reflow(o),n.default(i).addClass(d),n.default(o).addClass(d);const t=r.getTransitionDurationFromElement(i);n.default(i).one(r.TRANSITION_END,(()=>{n.default(o).removeClass(`${d} ${c}`).addClass(E),n.default(i).removeClass(`active ${c} ${d}`),this._isSliding=!1,setTimeout((()=>n.default(this._element).trigger(u)),0)})).emulateTransitionEnd(t)}else n.default(i).removeClass(E),n.default(o).addClass(E),this._isSliding=!1,n.default(this._element).trigger(u);l&&this.cycle()}static _jQueryInterface(t){return this.each((function(){let e=n.default(this).data(v),i={...D,...n.default(this).data()};"object"==typeof t&&(i={...i,...t});const s="string"==typeof t?t:i.slide;if(e||(e=new I(this,i),n.default(this).data(v,e)),"number"==typeof t)e.to(t);else if("string"==typeof s){if(void 0===e[s])throw new TypeError(`No method named "${s}"`);e[s]()}else i.interval&&i.ride&&(e.pause(),e.cycle())}))}static _dataApiClickHandler(t){const e=r.getSelectorFromElement(this);if(!e)return;const i=n.default(e)[0];if(!i||!n.default(i).hasClass("carousel"))return;const s={...n.default(i).data(),...n.default(this).data()},o=this.getAttribute("data-slide-to");o&&(s.interval=!1),I._jQueryInterface.call(n.default(i),s),o&&n.default(i).data(v).to(o),t.preventDefault()}}n.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",I._dataApiClickHandler),n.default(window).on("load.bs.carousel.data-api",(()=>{const t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]'));for(let e=0,i=t.length;e<i;e++){const i=n.default(t[e]);I._jQueryInterface.call(i,i.data())}})),n.default.fn[_]=I._jQueryInterface,n.default.fn[_].Constructor=I,n.default.fn[_].noConflict=()=>(n.default.fn[_]=y,I._jQueryInterface);const O="collapse",x="bs.collapse",k=n.default.fn[O],L="show",j="collapse",P="collapsing",F="collapsed",R="width",B='[data-toggle="collapse"]',H={toggle:!0,parent:""},M={toggle:"boolean",parent:"(string|element)"};class q{constructor(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}"]`));const i=[].slice.call(document.querySelectorAll(B));for(let e=0,n=i.length;e<n;e++){const n=i[e],s=r.getSelectorFromElement(n),o=[].slice.call(document.querySelectorAll(s)).filter((e=>e===t));null!==s&&o.length>0&&(this._selector=s,this._triggerArray.push(n))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get VERSION(){return"4.6.1"}static get Default(){return H}toggle(){n.default(this._element).hasClass(L)?this.hide():this.show()}show(){if(this._isTransitioning||n.default(this._element).hasClass(L))return;let t,e;if(this._parent&&(t=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((t=>"string"==typeof this._config.parent?t.getAttribute("data-parent")===this._config.parent:t.classList.contains(j))),0===t.length&&(t=null)),t&&(e=n.default(t).not(this._selector).data(x),e&&e._isTransitioning))return;const i=n.default.Event("show.bs.collapse");if(n.default(this._element).trigger(i),i.isDefaultPrevented())return;t&&(q._jQueryInterface.call(n.default(t).not(this._selector),"hide"),e||n.default(t).data(x,null));const s=this._getDimension();n.default(this._element).removeClass(j).addClass(P),this._element.style[s]=0,this._triggerArray.length&&n.default(this._triggerArray).removeClass(F).attr("aria-expanded",!0),this.setTransitioning(!0);const o=`scroll${s[0].toUpperCase()+s.slice(1)}`,a=r.getTransitionDurationFromElement(this._element);n.default(this._element).one(r.TRANSITION_END,(()=>{n.default(this._element).removeClass(P).addClass("collapse show"),this._element.style[s]="",this.setTransitioning(!1),n.default(this._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(a),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!n.default(this._element).hasClass(L))return;const t=n.default.Event("hide.bs.collapse");if(n.default(this._element).trigger(t),t.isDefaultPrevented())return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,r.reflow(this._element),n.default(this._element).addClass(P).removeClass("collapse show");const i=this._triggerArray.length;if(i>0)for(let t=0;t<i;t++){const e=this._triggerArray[t],i=r.getSelectorFromElement(e);if(null!==i){n.default([].slice.call(document.querySelectorAll(i))).hasClass(L)||n.default(e).addClass(F).attr("aria-expanded",!1)}}this.setTransitioning(!0);this._element.style[e]="";const s=r.getTransitionDurationFromElement(this._element);n.default(this._element).one(r.TRANSITION_END,(()=>{this.setTransitioning(!1),n.default(this._element).removeClass(P).addClass(j).trigger("hidden.bs.collapse")})).emulateTransitionEnd(s)}setTransitioning(t){this._isTransitioning=t}dispose(){n.default.removeData(this._element,x),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}_getConfig(t){return(t={...H,...t}).toggle=Boolean(t.toggle),r.typeCheckConfig(O,t,M),t}_getDimension(){return n.default(this._element).hasClass(R)?R:"height"}_getParent(){let t;r.isElement(this._config.parent)?(t=this._config.parent,void 0!==this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);const e=`[data-toggle="collapse"][data-parent="${this._config.parent}"]`,i=[].slice.call(t.querySelectorAll(e));return n.default(i).each(((t,e)=>{this._addAriaAndCollapsedClass(q._getTargetFromElement(e),[e])})),t}_addAriaAndCollapsedClass(t,e){const i=n.default(t).hasClass(L);e.length&&n.default(e).toggleClass(F,!i).attr("aria-expanded",i)}static _getTargetFromElement(t){const e=r.getSelectorFromElement(t);return e?document.querySelector(e):null}static _jQueryInterface(t){return this.each((function(){const e=n.default(this);let i=e.data(x);const s={...H,...e.data(),..."object"==typeof t&&t?t:{}};if(!i&&s.toggle&&"string"==typeof t&&/show|hide/.test(t)&&(s.toggle=!1),i||(i=new q(this,s),e.data(x,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}n.default(document).on("click.bs.collapse.data-api",B,(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();const e=n.default(this),i=r.getSelectorFromElement(this),s=[].slice.call(document.querySelectorAll(i));n.default(s).each((function(){const t=n.default(this),i=t.data(x)?"toggle":e.data();q._jQueryInterface.call(t,i)}))})),n.default.fn[O]=q._jQueryInterface,n.default.fn[O].Constructor=q,n.default.fn[O].noConflict=()=>(n.default.fn[O]=k,q._jQueryInterface);
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var Q="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,W=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(Q&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var $=Q&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),W))}};function U(t){return t&&"[object Function]"==={}.toString.call(t)}function V(t,e){if(1!==t.nodeType)return[];var i=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?i[e]:i}function Y(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function z(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=V(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/(auto|scroll|overlay)/.test(i+s+n)?t:z(Y(t))}function K(t){return t&&t.referenceNode?t.referenceNode:t}var X=Q&&!(!window.MSInputMethodContext||!document.documentMode),J=Q&&/MSIE 10/.test(navigator.userAgent);function G(t){return 11===t?X:10===t?J:X||J}function Z(t){if(!t)return document.documentElement;for(var e=G(10)?document.body:null,i=t.offsetParent||null;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===V(i,"position")?Z(i):i:t?t.ownerDocument.documentElement:document.documentElement}function tt(t){return null!==t.parentNode?tt(t.parentNode):t}function et(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,s=i?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(s,0);var r,a,l=o.commonAncestorContainer;if(t!==l&&e!==l||n.contains(s))return"BODY"===(a=(r=l).nodeName)||"HTML"!==a&&Z(r.firstElementChild)!==r?Z(l):l;var d=tt(t);return d.host?et(d.host,e):et(t,tt(e).host)}function it(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i="top"===e?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var s=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||s;return o[i]}return t[i]}function nt(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=it(e,"top"),s=it(e,"left"),o=i?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=s*o,t.right+=s*o,t}function st(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"])+parseFloat(t["border"+n+"Width"])}function ot(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],G(10)?parseInt(i["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function rt(t){var e=t.body,i=t.documentElement,n=G(10)&&getComputedStyle(i);return{height:ot("Height",e,i,n),width:ot("Width",e,i,n)}}var at=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},lt=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),dt=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};function ht(t){return ct({},t,{right:t.left+t.width,bottom:t.top+t.height})}function ut(t){var e={};try{if(G(10)){e=t.getBoundingClientRect();var i=it(t,"top"),n=it(t,"left");e.top+=i,e.left+=n,e.bottom+=i,e.right+=n}else e=t.getBoundingClientRect()}catch(t){}var s={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?rt(t.ownerDocument):{},r=o.width||t.clientWidth||s.width,a=o.height||t.clientHeight||s.height,l=t.offsetWidth-r,d=t.offsetHeight-a;if(l||d){var c=V(t);l-=st(c,"x"),d-=st(c,"y"),s.width-=l,s.height-=d}return ht(s)}function ft(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=G(10),s="HTML"===e.nodeName,o=ut(t),r=ut(e),a=z(t),l=V(e),d=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);i&&s&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var h=ht({top:o.top-r.top-d,left:o.left-r.left-c,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!n&&s){var u=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);h.top-=d-u,h.bottom-=d-u,h.left-=c-f,h.right-=c-f,h.marginTop=u,h.marginLeft=f}return(n&&!i?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(h=nt(h,e)),h}function pt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,n=ft(t,i),s=Math.max(i.clientWidth,window.innerWidth||0),o=Math.max(i.clientHeight,window.innerHeight||0),r=e?0:it(i),a=e?0:it(i,"left"),l={top:r-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:s,height:o};return ht(l)}function mt(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===V(t,"position"))return!0;var i=Y(t);return!!i&&mt(i)}function gt(t){if(!t||!t.parentElement||G())return document.documentElement;for(var e=t.parentElement;e&&"none"===V(e,"transform");)e=e.parentElement;return e||document.documentElement}function _t(t,e,i,n){var s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},r=s?gt(t):et(t,K(e));if("viewport"===n)o=pt(r,s);else{var a=void 0;"scrollParent"===n?"BODY"===(a=z(Y(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===n?t.ownerDocument.documentElement:n;var l=ft(a,r,s);if("HTML"!==a.nodeName||mt(r))o=l;else{var d=rt(t.ownerDocument),c=d.height,h=d.width;o.top+=l.top-l.marginTop,o.bottom=c+l.top,o.left+=l.left-l.marginLeft,o.right=h+l.left}}var u="number"==typeof(i=i||0);return o.left+=u?i:i.left||0,o.top+=u?i:i.top||0,o.right-=u?i:i.right||0,o.bottom-=u?i:i.bottom||0,o}function vt(t){return t.width*t.height}function bt(t,e,i,n,s){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var r=_t(i,n,o,s),a={top:{width:r.width,height:e.top-r.top},right:{width:r.right-e.right,height:r.height},bottom:{width:r.width,height:r.bottom-e.bottom},left:{width:e.left-r.left,height:r.height}},l=Object.keys(a).map((function(t){return ct({key:t},a[t],{area:vt(a[t])})})).sort((function(t,e){return e.area-t.area})),d=l.filter((function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight})),c=d.length>0?d[0].key:l[0].key,h=t.split("-")[1];return c+(h?"-"+h:"")}function yt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=n?gt(e):et(e,K(i));return ft(i,s,n)}function Et(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),i=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function wt(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function Tt(t,e,i){i=i.split("-")[0];var n=Et(t),s={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(i),r=o?"top":"left",a=o?"left":"top",l=o?"height":"width",d=o?"width":"height";return s[r]=e[r]+e[l]/2-n[l]/2,s[a]=i===a?e[a]-n[d]:e[wt(a)],s}function Ct(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function St(t,e,i){return(void 0===i?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===i}));var n=Ct(t,(function(t){return t[e]===i}));return t.indexOf(n)}(t,"name",i))).forEach((function(t){t.function;var i=t.function||t.fn;t.enabled&&U(i)&&(e.offsets.popper=ht(e.offsets.popper),e.offsets.reference=ht(e.offsets.reference),e=i(e,t))})),e}function Dt(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=yt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=bt(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=Tt(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=St(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function Nt(t,e){return t.some((function(t){var i=t.name;return t.enabled&&i===e}))}function At(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var s=e[n],o=s?""+s+i:t;if(void 0!==document.body.style[o])return o}return null}function It(){return this.state.isDestroyed=!0,Nt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[At("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Ot(t){var e=t.ownerDocument;return e?e.defaultView:window}function xt(t,e,i,n){var s="BODY"===t.nodeName,o=s?t.ownerDocument.defaultView:t;o.addEventListener(e,i,{passive:!0}),s||xt(z(o.parentNode),e,i,n),n.push(o)}function kt(t,e,i,n){i.updateBound=n,Ot(t).addEventListener("resize",i.updateBound,{passive:!0});var s=z(t);return xt(s,"scroll",i.updateBound,i.scrollParents),i.scrollElement=s,i.eventsEnabled=!0,i}function Lt(){this.state.eventsEnabled||(this.state=kt(this.reference,this.options,this.state,this.scheduleUpdate))}function jt(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,Ot(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function Pt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function Ft(t,e){Object.keys(e).forEach((function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&Pt(e[i])&&(n="px"),t.style[i]=e[i]+n}))}var Rt=Q&&/Firefox/i.test(navigator.userAgent);function Bt(t,e,i){var n=Ct(t,(function(t){return t.name===e})),s=!!n&&t.some((function(t){return t.name===i&&t.enabled&&t.order<n.order}));if(!s);return s}var Ht=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Mt=Ht.slice(3);function qt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Mt.indexOf(t),n=Mt.slice(i+1).concat(Mt.slice(0,i));return e?n.reverse():n}var Qt="flip",Wt="clockwise",$t="counterclockwise";function Ut(t,e,i,n){var s=[0,0],o=-1!==["right","left"].indexOf(n),r=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=r.indexOf(Ct(r,(function(t){return-1!==t.search(/,|\s/)})));r[a]&&r[a].indexOf(",");var l=/\s*,\s*|\s+/,d=-1!==a?[r.slice(0,a).concat([r[a].split(l)[0]]),[r[a].split(l)[1]].concat(r.slice(a+1))]:[r];return d=d.map((function(t,n){var s=(1===n?!o:o)?"height":"width",r=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,r=!0,t):r?(t[t.length-1]+=e,r=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,i,n){var s=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+s[1],r=s[2];if(!o)return t;if(0===r.indexOf("%")){return ht("%p"===r?i:n)[e]/100*o}if("vh"===r||"vw"===r)return("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,s,e,i)}))})),d.forEach((function(t,e){t.forEach((function(i,n){Pt(i)&&(s[e]+=i*("-"===t[n-1]?-1:1))}))})),s}var Vt={shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var s=t.offsets,o=s.reference,r=s.popper,a=-1!==["bottom","top"].indexOf(i),l=a?"left":"top",d=a?"width":"height",c={start:dt({},l,o[l]),end:dt({},l,o[l]+o[d]-r[d])};t.offsets.popper=ct({},r,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,s=t.offsets,o=s.popper,r=s.reference,a=n.split("-")[0],l=void 0;return l=Pt(+i)?[+i,0]:Ut(i,o,r,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||Z(t.instance.popper);t.instance.reference===i&&(i=Z(i));var n=At("transform"),s=t.instance.popper.style,o=s.top,r=s.left,a=s[n];s.top="",s.left="",s[n]="";var l=_t(t.instance.popper,t.instance.reference,e.padding,i,t.positionFixed);s.top=o,s.left=r,s[n]=a,e.boundaries=l;var d=e.priority,c=t.offsets.popper,h={primary:function(t){var i=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(i=Math.max(c[t],l[t])),dt({},t,i)},secondary:function(t){var i="right"===t?"left":"top",n=c[i];return c[t]>l[t]&&!e.escapeWithReference&&(n=Math.min(c[i],l[t]-("right"===t?c.width:c.height))),dt({},i,n)}};return d.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=ct({},c,h[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,s=t.placement.split("-")[0],o=Math.floor,r=-1!==["top","bottom"].indexOf(s),a=r?"right":"bottom",l=r?"left":"top",d=r?"width":"height";return i[a]<o(n[l])&&(t.offsets.popper[l]=o(n[l])-i[d]),i[l]>o(n[a])&&(t.offsets.popper[l]=o(n[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!Bt(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return t;var s=t.placement.split("-")[0],o=t.offsets,r=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(s),d=l?"height":"width",c=l?"Top":"Left",h=c.toLowerCase(),u=l?"left":"top",f=l?"bottom":"right",p=Et(n)[d];a[f]-p<r[h]&&(t.offsets.popper[h]-=r[h]-(a[f]-p)),a[h]+p>r[f]&&(t.offsets.popper[h]+=a[h]+p-r[f]),t.offsets.popper=ht(t.offsets.popper);var m=a[h]+a[d]/2-p/2,g=V(t.instance.popper),_=parseFloat(g["margin"+c]),v=parseFloat(g["border"+c+"Width"]),b=m-t.offsets.popper[h]-_-v;return b=Math.max(Math.min(r[d]-p,b),0),t.arrowElement=n,t.offsets.arrow=(dt(i={},h,Math.round(b)),dt(i,u,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(Nt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=_t(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],s=wt(n),o=t.placement.split("-")[1]||"",r=[];switch(e.behavior){case Qt:r=[n,s];break;case Wt:r=qt(n);break;case $t:r=qt(n,!0);break;default:r=e.behavior}return r.forEach((function(a,l){if(n!==a||r.length===l+1)return t;n=t.placement.split("-")[0],s=wt(n);var d=t.offsets.popper,c=t.offsets.reference,h=Math.floor,u="left"===n&&h(d.right)>h(c.left)||"right"===n&&h(d.left)<h(c.right)||"top"===n&&h(d.bottom)>h(c.top)||"bottom"===n&&h(d.top)<h(c.bottom),f=h(d.left)<h(i.left),p=h(d.right)>h(i.right),m=h(d.top)<h(i.top),g=h(d.bottom)>h(i.bottom),_="left"===n&&f||"right"===n&&p||"top"===n&&m||"bottom"===n&&g,v=-1!==["top","bottom"].indexOf(n),b=!!e.flipVariations&&(v&&"start"===o&&f||v&&"end"===o&&p||!v&&"start"===o&&m||!v&&"end"===o&&g),y=!!e.flipVariationsByContent&&(v&&"start"===o&&p||v&&"end"===o&&f||!v&&"start"===o&&g||!v&&"end"===o&&m),E=b||y;(u||_||E)&&(t.flipped=!0,(u||_)&&(n=r[l+1]),E&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=ct({},t.offsets.popper,Tt(t.instance.popper,t.offsets.reference,t.placement)),t=St(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,s=n.popper,o=n.reference,r=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return s[r?"left":"top"]=o[i]-(a?s[r?"width":"height"]:0),t.placement=wt(e),t.offsets.popper=ht(s),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Bt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=Ct(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var i=e.x,n=e.y,s=t.offsets.popper,o=Ct(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration,r=void 0!==o?o:e.gpuAcceleration,a=Z(t.instance.popper),l=ut(a),d={position:s.position},c=function(t,e){var i=t.offsets,n=i.popper,s=i.reference,o=Math.round,r=Math.floor,a=function(t){return t},l=o(s.width),d=o(n.width),c=-1!==["left","right"].indexOf(t.placement),h=-1!==t.placement.indexOf("-"),u=e?c||h||l%2==d%2?o:r:a,f=e?o:a;return{left:u(l%2==1&&d%2==1&&!h&&e?n.left-1:n.left),top:f(n.top),bottom:f(n.bottom),right:u(n.right)}}(t,window.devicePixelRatio<2||!Rt),h="bottom"===i?"top":"bottom",u="right"===n?"left":"right",f=At("transform"),p=void 0,m=void 0;if(m="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-l.height+c.bottom:c.top,p="right"===u?"HTML"===a.nodeName?-a.clientWidth+c.right:-l.width+c.right:c.left,r&&f)d[f]="translate3d("+p+"px, "+m+"px, 0)",d[h]=0,d[u]=0,d.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===u?-1:1;d[h]=m*g,d[u]=p*_,d.willChange=h+", "+u}var v={"x-placement":t.placement};return t.attributes=ct({},v,t.attributes),t.styles=ct({},d,t.styles),t.arrowStyles=ct({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,i;return Ft(t.instance.popper,t.styles),e=t.instance.popper,i=t.attributes,Object.keys(i).forEach((function(t){!1!==i[t]?e.setAttribute(t,i[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&Ft(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,i,n,s){var o=yt(s,e,t,i.positionFixed),r=bt(i.placement,o,e,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return e.setAttribute("x-placement",r),Ft(e,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}},Yt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Vt},zt=function(){function t(e,i){var n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};at(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=$(this.update.bind(this)),this.options=ct({},t.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(ct({},t.Defaults.modifiers,s.modifiers)).forEach((function(e){n.options.modifiers[e]=ct({},t.Defaults.modifiers[e]||{},s.modifiers?s.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return ct({name:t},n.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&U(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return lt(t,[{key:"update",value:function(){return Dt.call(this)}},{key:"destroy",value:function(){return It.call(this)}},{key:"enableEventListeners",value:function(){return Lt.call(this)}},{key:"disableEventListeners",value:function(){return jt.call(this)}}]),t}();zt.Utils=("undefined"!=typeof window?window:global).PopperUtils,zt.placements=Ht,zt.Defaults=Yt;var Kt=zt;const Xt="dropdown",Jt="bs.dropdown",Gt=".bs.dropdown",Zt=n.default.fn[Xt],te=new RegExp("38|40|27"),ee="disabled",ie="show",ne="dropdown-menu-right",se="hide.bs.dropdown",oe="hidden.bs.dropdown",re="click.bs.dropdown.data-api",ae="keydown.bs.dropdown.data-api",le='[data-toggle="dropdown"]',de=".dropdown-menu",ce={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},he={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"};class ue{constructor(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get VERSION(){return"4.6.1"}static get Default(){return ce}static get DefaultType(){return he}toggle(){if(this._element.disabled||n.default(this._element).hasClass(ee))return;const t=n.default(this._menu).hasClass(ie);ue._clearMenus(),t||this.show(!0)}show(t=!1){if(this._element.disabled||n.default(this._element).hasClass(ee)||n.default(this._menu).hasClass(ie))return;const e={relatedTarget:this._element},i=n.default.Event("show.bs.dropdown",e),s=ue._getParentFromElement(this._element);if(n.default(s).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar&&t){if(void 0===Kt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=s:r.isElement(this._config.reference)&&(t=this._config.reference,void 0!==this._config.reference.jquery&&(t=this._config.reference[0])),"scrollParent"!==this._config.boundary&&n.default(s).addClass("position-static"),this._popper=new Kt(t,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===n.default(s).closest(".navbar-nav").length&&n.default(document.body).children().on("mouseover",null,n.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),n.default(this._menu).toggleClass(ie),n.default(s).toggleClass(ie).trigger(n.default.Event("shown.bs.dropdown",e))}}hide(){if(this._element.disabled||n.default(this._element).hasClass(ee)||!n.default(this._menu).hasClass(ie))return;const t={relatedTarget:this._element},e=n.default.Event(se,t),i=ue._getParentFromElement(this._element);n.default(i).trigger(e),e.isDefaultPrevented()||(this._popper&&this._popper.destroy(),n.default(this._menu).toggleClass(ie),n.default(i).toggleClass(ie).trigger(n.default.Event(oe,t)))}dispose(){n.default.removeData(this._element,Jt),n.default(this._element).off(Gt),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)}update(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()}_addEventListeners(){n.default(this._element).on("click.bs.dropdown",(t=>{t.preventDefault(),t.stopPropagation(),this.toggle()}))}_getConfig(t){return t={...this.constructor.Default,...n.default(this._element).data(),...t},r.typeCheckConfig(Xt,t,this.constructor.DefaultType),t}_getMenuElement(){if(!this._menu){const t=ue._getParentFromElement(this._element);t&&(this._menu=t.querySelector(de))}return this._menu}_getPlacement(){const t=n.default(this._element.parentNode);let e="bottom-start";return t.hasClass("dropup")?e=n.default(this._menu).hasClass(ne)?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":n.default(this._menu).hasClass(ne)&&(e="bottom-end"),e}_detectNavbar(){return n.default(this._element).closest(".navbar").length>0}_getOffset(){const t={};return"function"==typeof this._config.offset?t.fn=t=>(t.offsets={...t.offsets,...this._config.offset(t.offsets,this._element)},t):t.offset=this._config.offset,t}_getPopperConfig(){const 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}),{...t,...this._config.popperConfig}}static _jQueryInterface(t){return this.each((function(){let e=n.default(this).data(Jt);if(e||(e=new ue(this,"object"==typeof t?t:null),n.default(this).data(Jt,e)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static _clearMenus(t){if(t&&(3===t.which||"keyup"===t.type&&9!==t.which))return;const e=[].slice.call(document.querySelectorAll(le));for(let i=0,s=e.length;i<s;i++){const s=ue._getParentFromElement(e[i]),o=n.default(e[i]).data(Jt),r={relatedTarget:e[i]};if(t&&"click"===t.type&&(r.clickEvent=t),!o)continue;const a=o._menu;if(!n.default(s).hasClass(ie))continue;if(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&n.default.contains(s,t.target))continue;const l=n.default.Event(se,r);n.default(s).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&n.default(document.body).children().off("mouseover",null,n.default.noop),e[i].setAttribute("aria-expanded","false"),o._popper&&o._popper.destroy(),n.default(a).removeClass(ie),n.default(s).removeClass(ie).trigger(n.default.Event(oe,r)))}}static _getParentFromElement(t){let e;const i=r.getSelectorFromElement(t);return i&&(e=document.querySelector(i)),e||t.parentNode}static _dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||n.default(t.target).closest(de).length):!te.test(t.which))return;if(this.disabled||n.default(this).hasClass(ee))return;const e=ue._getParentFromElement(this),i=n.default(e).hasClass(ie);if(!i&&27===t.which)return;if(t.preventDefault(),t.stopPropagation(),!i||27===t.which||32===t.which)return 27===t.which&&n.default(e.querySelector(le)).trigger("focus"),void n.default(this).trigger("click");const s=[].slice.call(e.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((t=>n.default(t).is(":visible")));if(0===s.length)return;let o=s.indexOf(t.target);38===t.which&&o>0&&o--,40===t.which&&o<s.length-1&&o++,o<0&&(o=0),s[o].focus()}}n.default(document).on(ae,le,ue._dataApiKeydownHandler).on(ae,de,ue._dataApiKeydownHandler).on(`${re} keyup.bs.dropdown.data-api`,ue._clearMenus).on(re,le,(function(t){t.preventDefault(),t.stopPropagation(),ue._jQueryInterface.call(n.default(this),"toggle")})).on(re,".dropdown form",(t=>{t.stopPropagation()})),n.default.fn[Xt]=ue._jQueryInterface,n.default.fn[Xt].Constructor=ue,n.default.fn[Xt].noConflict=()=>(n.default.fn[Xt]=Zt,ue._jQueryInterface);const fe="modal",pe="bs.modal",me=".bs.modal",ge=n.default.fn.modal,_e="modal-open",ve="fade",be="show",ye="modal-static",Ee="hidden.bs.modal",we="show.bs.modal",Te="focusin.bs.modal",Ce="resize.bs.modal",Se="click.dismiss.bs.modal",De="keydown.dismiss.bs.modal",Ne="mousedown.dismiss.bs.modal",Ae=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ie=".sticky-top",Oe={backdrop:!0,keyboard:!0,focus:!0,show:!0},xe={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"};class ke{constructor(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}static get VERSION(){return"4.6.1"}static get Default(){return Oe}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;const e=n.default.Event(we,{relatedTarget:t});n.default(this._element).trigger(e),e.isDefaultPrevented()||(this._isShown=!0,n.default(this._element).hasClass(ve)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),n.default(this._element).on(Se,'[data-dismiss="modal"]',(t=>this.hide(t))),n.default(this._dialog).on(Ne,(()=>{n.default(this._element).one("mouseup.dismiss.bs.modal",(t=>{n.default(t.target).is(this._element)&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(t){if(t&&t.preventDefault(),!this._isShown||this._isTransitioning)return;const e=n.default.Event("hide.bs.modal");if(n.default(this._element).trigger(e),!this._isShown||e.isDefaultPrevented())return;this._isShown=!1;const i=n.default(this._element).hasClass(ve);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),n.default(document).off(Te),n.default(this._element).removeClass(be),n.default(this._element).off(Se),n.default(this._dialog).off(Ne),i){const t=r.getTransitionDurationFromElement(this._element);n.default(this._element).one(r.TRANSITION_END,(t=>this._hideModal(t))).emulateTransitionEnd(t)}else this._hideModal()}dispose(){[window,this._element,this._dialog].forEach((t=>n.default(t).off(me))),n.default(document).off(Te),n.default.removeData(this._element,pe),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}handleUpdate(){this._adjustDialog()}_getConfig(t){return t={...Oe,...t},r.typeCheckConfig(fe,t,xe),t}_triggerBackdropTransition(){const t=n.default.Event("hidePrevented.bs.modal");if(n.default(this._element).trigger(t),t.isDefaultPrevented())return;const e=this._element.scrollHeight>document.documentElement.clientHeight;e||(this._element.style.overflowY="hidden"),this._element.classList.add(ye);const i=r.getTransitionDurationFromElement(this._dialog);n.default(this._element).off(r.TRANSITION_END),n.default(this._element).one(r.TRANSITION_END,(()=>{this._element.classList.remove(ye),e||n.default(this._element).one(r.TRANSITION_END,(()=>{this._element.style.overflowY=""})).emulateTransitionEnd(this._element,i)})).emulateTransitionEnd(i),this._element.focus()}_showElement(t){const e=n.default(this._element).hasClass(ve),i=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"),n.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,e&&r.reflow(this._element),n.default(this._element).addClass(be),this._config.focus&&this._enforceFocus();const s=n.default.Event("shown.bs.modal",{relatedTarget:t}),o=()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,n.default(this._element).trigger(s)};if(e){const t=r.getTransitionDurationFromElement(this._dialog);n.default(this._dialog).one(r.TRANSITION_END,o).emulateTransitionEnd(t)}else o()}_enforceFocus(){n.default(document).off(Te).on(Te,(t=>{document!==t.target&&this._element!==t.target&&0===n.default(this._element).has(t.target).length&&this._element.focus()}))}_setEscapeEvent(){this._isShown?n.default(this._element).on(De,(t=>{this._config.keyboard&&27===t.which?(t.preventDefault(),this.hide()):this._config.keyboard||27!==t.which||this._triggerBackdropTransition()})):this._isShown||n.default(this._element).off(De)}_setResizeEvent(){this._isShown?n.default(window).on(Ce,(t=>this.handleUpdate(t))):n.default(window).off(Ce)}_hideModal(){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((()=>{n.default(document.body).removeClass(_e),this._resetAdjustments(),this._resetScrollbar(),n.default(this._element).trigger(Ee)}))}_removeBackdrop(){this._backdrop&&(n.default(this._backdrop).remove(),this._backdrop=null)}_showBackdrop(t){const e=n.default(this._element).hasClass(ve)?ve:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",e&&this._backdrop.classList.add(e),n.default(this._backdrop).appendTo(document.body),n.default(this._element).on(Se,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===this._config.backdrop?this._triggerBackdropTransition():this.hide())})),e&&r.reflow(this._backdrop),n.default(this._backdrop).addClass(be),!t)return;if(!e)return void t();const i=r.getTransitionDurationFromElement(this._backdrop);n.default(this._backdrop).one(r.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){n.default(this._backdrop).removeClass(be);const e=()=>{this._removeBackdrop(),t&&t()};if(n.default(this._element).hasClass(ve)){const t=r.getTransitionDurationFromElement(this._backdrop);n.default(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(t)}else e()}else t&&t()}_adjustDialog(){const 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`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}_checkScrollbar(){const t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()}_setScrollbar(){if(this._isBodyOverflowing){const t=[].slice.call(document.querySelectorAll(Ae)),e=[].slice.call(document.querySelectorAll(Ie));n.default(t).each(((t,e)=>{const i=e.style.paddingRight,s=n.default(e).css("padding-right");n.default(e).data("padding-right",i).css("padding-right",`${parseFloat(s)+this._scrollbarWidth}px`)})),n.default(e).each(((t,e)=>{const i=e.style.marginRight,s=n.default(e).css("margin-right");n.default(e).data("margin-right",i).css("margin-right",parseFloat(s)-this._scrollbarWidth+"px")}));const i=document.body.style.paddingRight,s=n.default(document.body).css("padding-right");n.default(document.body).data("padding-right",i).css("padding-right",`${parseFloat(s)+this._scrollbarWidth}px`)}n.default(document.body).addClass(_e)}_resetScrollbar(){const t=[].slice.call(document.querySelectorAll(Ae));n.default(t).each(((t,e)=>{const i=n.default(e).data("padding-right");n.default(e).removeData("padding-right"),e.style.paddingRight=i||""}));const e=[].slice.call(document.querySelectorAll(".sticky-top"));n.default(e).each(((t,e)=>{const i=n.default(e).data("margin-right");void 0!==i&&n.default(e).css("margin-right",i).removeData("margin-right")}));const i=n.default(document.body).data("padding-right");n.default(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""}_getScrollbarWidth(){const t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}static _jQueryInterface(t,e){return this.each((function(){let i=n.default(this).data(pe);const s={...Oe,...n.default(this).data(),..."object"==typeof t&&t?t:{}};if(i||(i=new ke(this,s),n.default(this).data(pe,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}else s.show&&i.show(e)}))}}n.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){let e;const i=r.getSelectorFromElement(this);i&&(e=document.querySelector(i));const s=n.default(e).data(pe)?"toggle":{...n.default(e).data(),...n.default(this).data()};"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();const o=n.default(e).one(we,(t=>{t.isDefaultPrevented()||o.one(Ee,(()=>{n.default(this).is(":visible")&&this.focus()}))}));ke._jQueryInterface.call(n.default(e),s,this)})),n.default.fn.modal=ke._jQueryInterface,n.default.fn.modal.Constructor=ke,n.default.fn.modal.noConflict=()=>(n.default.fn.modal=ge,ke._jQueryInterface);const Le=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],je={"*":["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:[]},Pe=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Fe=/^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 Re(t,e){const i=t.nodeName.toLowerCase();if(-1!==e.indexOf(i))return-1===Le.indexOf(i)||Boolean(Pe.test(t.nodeValue)||Fe.test(t.nodeValue));const n=e.filter((t=>t instanceof RegExp));for(let t=0,e=n.length;t<e;t++)if(n[t].test(i))return!0;return!1}function Be(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),o=[].slice.call(n.body.querySelectorAll("*"));for(let t=0,i=o.length;t<i;t++){const i=o[t],n=i.nodeName.toLowerCase();if(-1===s.indexOf(i.nodeName.toLowerCase())){i.parentNode.removeChild(i);continue}const r=[].slice.call(i.attributes),a=[].concat(e["*"]||[],e[n]||[]);r.forEach((t=>{Re(t,a)||i.removeAttribute(t.nodeName)}))}return n.body.innerHTML}const He="tooltip",Me="bs.tooltip",qe=".bs.tooltip",Qe=n.default.fn.tooltip,We=new RegExp("(^|\\s)bs-tooltip\\S+","g"),$e=["sanitize","whiteList","sanitizeFn"],Ue="fade",Ve="show",Ye="show",ze="out",Ke="hover",Xe="focus",Je={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Ge={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",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:je,popperConfig:null},Ze={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)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},ti={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"};class ei{constructor(t,e){if(void 0===Kt)throw new TypeError("Bootstrap's tooltips require Popper (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()}static get VERSION(){return"4.6.1"}static get Default(){return Ge}static get NAME(){return He}static get DATA_KEY(){return Me}static get Event(){return ti}static get EVENT_KEY(){return qe}static get DefaultType(){return Ze}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this.constructor.DATA_KEY;let i=n.default(t.currentTarget).data(e);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),n.default(t.currentTarget).data(e,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(n.default(this.getTipElement()).hasClass(Ve))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),n.default.removeData(this.element,this.constructor.DATA_KEY),n.default(this.element).off(this.constructor.EVENT_KEY),n.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&n.default(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}show(){if("none"===n.default(this.element).css("display"))throw new Error("Please use show on visible elements");const t=n.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){n.default(this.element).trigger(t);const e=r.findShadowRoot(this.element),i=n.default.contains(null!==e?e:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;const s=this.getTipElement(),o=r.getUID(this.constructor.NAME);s.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&n.default(s).addClass(Ue);const a="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,l=this._getAttachment(a);this.addAttachmentClass(l);const d=this._getContainer();n.default(s).data(this.constructor.DATA_KEY,this),n.default.contains(this.element.ownerDocument.documentElement,this.tip)||n.default(s).appendTo(d),n.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Kt(this.element,s,this._getPopperConfig(l)),n.default(s).addClass(Ve),n.default(s).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&n.default(document.body).children().on("mouseover",null,n.default.noop);const c=()=>{this.config.animation&&this._fixTransition();const t=this._hoverState;this._hoverState=null,n.default(this.element).trigger(this.constructor.Event.SHOWN),t===ze&&this._leave(null,this)};if(n.default(this.tip).hasClass(Ue)){const t=r.getTransitionDurationFromElement(this.tip);n.default(this.tip).one(r.TRANSITION_END,c).emulateTransitionEnd(t)}else c()}}hide(t){const e=this.getTipElement(),i=n.default.Event(this.constructor.Event.HIDE),s=()=>{this._hoverState!==Ye&&e.parentNode&&e.parentNode.removeChild(e),this._cleanTipClass(),this.element.removeAttribute("aria-describedby"),n.default(this.element).trigger(this.constructor.Event.HIDDEN),null!==this._popper&&this._popper.destroy(),t&&t()};if(n.default(this.element).trigger(i),!i.isDefaultPrevented()){if(n.default(e).removeClass(Ve),"ontouchstart"in document.documentElement&&n.default(document.body).children().off("mouseover",null,n.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,n.default(this.tip).hasClass(Ue)){const t=r.getTransitionDurationFromElement(e);n.default(e).one(r.TRANSITION_END,s).emulateTransitionEnd(t)}else s();this._hoverState=""}}update(){null!==this._popper&&this._popper.scheduleUpdate()}isWithContent(){return Boolean(this.getTitle())}addAttachmentClass(t){n.default(this.getTipElement()).addClass(`bs-tooltip-${t}`)}getTipElement(){return this.tip=this.tip||n.default(this.config.template)[0],this.tip}setContent(){const t=this.getTipElement();this.setElementContent(n.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),n.default(t).removeClass("fade show")}setElementContent(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Be(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?n.default(e).parent().is(t)||t.empty().append(e):t.text(n.default(e).text())}getTitle(){let 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}_getPopperConfig(t){return{...{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:t=>{t.originalPlacement!==t.placement&&this._handlePopperPlacementChange(t)},onUpdate:t=>this._handlePopperPlacementChange(t)},...this.config.popperConfig}}_getOffset(){const t={};return"function"==typeof this.config.offset?t.fn=t=>(t.offsets={...t.offsets,...this.config.offset(t.offsets,this.element)},t):t.offset=this.config.offset,t}_getContainer(){return!1===this.config.container?document.body:r.isElement(this.config.container)?n.default(this.config.container):n.default(document).find(this.config.container)}_getAttachment(t){return Je[t.toUpperCase()]}_setListeners(){this.config.trigger.split(" ").forEach((t=>{if("click"===t)n.default(this.element).on(this.constructor.Event.CLICK,this.config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e=t===Ke?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===Ke?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;n.default(this.element).on(e,this.config.selector,(t=>this._enter(t))).on(i,this.config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this.element&&this.hide()},n.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config={...this.config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const 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",""))}_enter(t,e){const i=this.constructor.DATA_KEY;(e=e||n.default(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),n.default(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusin"===t.type?Xe:Ke]=!0),n.default(e.getTipElement()).hasClass(Ve)||e._hoverState===Ye?e._hoverState=Ye:(clearTimeout(e._timeout),e._hoverState=Ye,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===Ye&&e.show()}),e.config.delay.show):e.show())}_leave(t,e){const i=this.constructor.DATA_KEY;(e=e||n.default(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),n.default(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusout"===t.type?Xe:Ke]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=ze,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===ze&&e.hide()}),e.config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=n.default(this.element).data();return Object.keys(e).forEach((t=>{-1!==$e.indexOf(t)&&delete e[t]})),"number"==typeof(t={...this.constructor.Default,...e,..."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()),r.typeCheckConfig(He,t,this.constructor.DefaultType),t.sanitize&&(t.template=Be(t.template,t.whiteList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};if(this.config)for(const e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t}_cleanTipClass(){const t=n.default(this.getTipElement()),e=t.attr("class").match(We);null!==e&&e.length&&t.removeClass(e.join(""))}_handlePopperPlacementChange(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))}_fixTransition(){const t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(n.default(t).removeClass(Ue),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)}static _jQueryInterface(t){return this.each((function(){const e=n.default(this);let i=e.data(Me);const s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new ei(this,s),e.data(Me,i)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}n.default.fn.tooltip=ei._jQueryInterface,n.default.fn.tooltip.Constructor=ei,n.default.fn.tooltip.noConflict=()=>(n.default.fn.tooltip=Qe,ei._jQueryInterface);const ii="popover",ni="bs.popover",si=".bs.popover",oi=n.default.fn.popover,ri=new RegExp("(^|\\s)bs-popover\\S+","g"),ai={...ei.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>'},li={...ei.DefaultType,content:"(string|element|function)"},di={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"};class ci extends ei{static get VERSION(){return"4.6.1"}static get Default(){return ai}static get NAME(){return ii}static get DATA_KEY(){return ni}static get Event(){return di}static get EVENT_KEY(){return si}static get DefaultType(){return li}isWithContent(){return this.getTitle()||this._getContent()}addAttachmentClass(t){n.default(this.getTipElement()).addClass(`bs-popover-${t}`)}getTipElement(){return this.tip=this.tip||n.default(this.config.template)[0],this.tip}setContent(){const t=n.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());let e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")}_getContent(){return this.element.getAttribute("data-content")||this.config.content}_cleanTipClass(){const t=n.default(this.getTipElement()),e=t.attr("class").match(ri);null!==e&&e.length>0&&t.removeClass(e.join(""))}static _jQueryInterface(t){return this.each((function(){let e=n.default(this).data(ni);const i="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new ci(this,i),n.default(this).data(ni,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}n.default.fn.popover=ci._jQueryInterface,n.default.fn.popover.Constructor=ci,n.default.fn.popover.noConflict=()=>(n.default.fn.popover=oi,ci._jQueryInterface);const hi="scrollspy",ui="bs.scrollspy",fi=".bs.scrollspy",pi=n.default.fn[hi],mi="active",gi="position",_i=".nav, .list-group",vi=".nav-link",bi={offset:10,method:"auto",target:""},yi={offset:"number",method:"string",target:"(string|element)"};class Ei{constructor(t,e){this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),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,n.default(this._scrollElement).on("scroll.bs.scrollspy",(t=>this._process(t))),this.refresh(),this._process()}static get VERSION(){return"4.6.1"}static get Default(){return bi}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":gi,e="auto"===this._config.method?t:this._config.method,i=e===gi?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map((t=>{let s;const o=r.getSelectorFromElement(t);if(o&&(s=document.querySelector(o)),s){const t=s.getBoundingClientRect();if(t.width||t.height)return[n.default(s)[e]().top+i,o]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){n.default.removeData(this._element,ui),n.default(this._scrollElement).off(fi),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}_getConfig(t){if("string"!=typeof(t={...bi,..."object"==typeof t&&t?t:{}}).target&&r.isElement(t.target)){let e=n.default(t.target).attr("id");e||(e=r.getUID(hi),n.default(t.target).attr("id",e)),t.target=`#${e}`}return r.typeCheckConfig(hi,t,yi),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;){this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}}_activate(t){this._activeTarget=t,this._clear();const e=this._selector.split(",").map((e=>`${e}[data-target="${t}"],${e}[href="${t}"]`)),i=n.default([].slice.call(document.querySelectorAll(e.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass(mi),i.addClass(mi)):(i.addClass(mi),i.parents(_i).prev(".nav-link, .list-group-item").addClass(mi),i.parents(_i).prev(".nav-item").children(vi).addClass(mi)),n.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})}_clear(){[].slice.call(document.querySelectorAll(this._selector)).filter((t=>t.classList.contains(mi))).forEach((t=>t.classList.remove(mi)))}static _jQueryInterface(t){return this.each((function(){let e=n.default(this).data(ui);if(e||(e=new Ei(this,"object"==typeof t&&t),n.default(this).data(ui,e)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}n.default(window).on("load.bs.scrollspy.data-api",(()=>{const t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]'));for(let e=t.length;e--;){const i=n.default(t[e]);Ei._jQueryInterface.call(i,i.data())}})),n.default.fn[hi]=Ei._jQueryInterface,n.default.fn[hi].Constructor=Ei,n.default.fn[hi].noConflict=()=>(n.default.fn[hi]=pi,Ei._jQueryInterface);const wi="bs.tab",Ti=n.default.fn.tab,Ci="active",Si="fade",Di="show",Ni=".active",Ai="> li > .active";class Ii{constructor(t){this._element=t}static get VERSION(){return"4.6.1"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&n.default(this._element).hasClass(Ci)||n.default(this._element).hasClass("disabled"))return;let t,e;const i=n.default(this._element).closest(".nav, .list-group")[0],s=r.getSelectorFromElement(this._element);if(i){const t="UL"===i.nodeName||"OL"===i.nodeName?Ai:Ni;e=n.default.makeArray(n.default(i).find(t)),e=e[e.length-1]}const o=n.default.Event("hide.bs.tab",{relatedTarget:this._element}),a=n.default.Event("show.bs.tab",{relatedTarget:e});if(e&&n.default(e).trigger(o),n.default(this._element).trigger(a),a.isDefaultPrevented()||o.isDefaultPrevented())return;s&&(t=document.querySelector(s)),this._activate(this._element,i);const l=()=>{const t=n.default.Event("hidden.bs.tab",{relatedTarget:this._element}),i=n.default.Event("shown.bs.tab",{relatedTarget:e});n.default(e).trigger(t),n.default(this._element).trigger(i)};t?this._activate(t,t.parentNode,l):l()}dispose(){n.default.removeData(this._element,wi),this._element=null}_activate(t,e,i){const s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?n.default(e).children(Ni):n.default(e).find(Ai))[0],o=i&&s&&n.default(s).hasClass(Si),a=()=>this._transitionComplete(t,s,i);if(s&&o){const t=r.getTransitionDurationFromElement(s);n.default(s).removeClass(Di).one(r.TRANSITION_END,a).emulateTransitionEnd(t)}else a()}_transitionComplete(t,e,i){if(e){n.default(e).removeClass(Ci);const t=n.default(e.parentNode).find("> .dropdown-menu .active")[0];t&&n.default(t).removeClass(Ci),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}n.default(t).addClass(Ci),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),r.reflow(t),t.classList.contains(Si)&&t.classList.add(Di);let s=t.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&n.default(s).hasClass("dropdown-menu")){const e=n.default(t).closest(".dropdown")[0];if(e){const t=[].slice.call(e.querySelectorAll(".dropdown-toggle"));n.default(t).addClass(Ci)}t.setAttribute("aria-expanded",!0)}i&&i()}static _jQueryInterface(t){return this.each((function(){const e=n.default(this);let i=e.data(wi);if(i||(i=new Ii(this),e.data(wi,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}n.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),Ii._jQueryInterface.call(n.default(this),"show")})),n.default.fn.tab=Ii._jQueryInterface,n.default.fn.tab.Constructor=Ii,n.default.fn.tab.noConflict=()=>(n.default.fn.tab=Ti,Ii._jQueryInterface);const Oi="toast",xi="bs.toast",ki=n.default.fn.toast,Li="hide",ji="show",Pi="showing",Fi="click.dismiss.bs.toast",Ri={animation:!0,autohide:!0,delay:500},Bi={animation:"boolean",autohide:"boolean",delay:"number"};class Hi{constructor(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}static get VERSION(){return"4.6.1"}static get DefaultType(){return Bi}static get Default(){return Ri}show(){const t=n.default.Event("show.bs.toast");if(n.default(this._element).trigger(t),t.isDefaultPrevented())return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");const e=()=>{this._element.classList.remove(Pi),this._element.classList.add(ji),n.default(this._element).trigger("shown.bs.toast"),this._config.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay))};if(this._element.classList.remove(Li),r.reflow(this._element),this._element.classList.add(Pi),this._config.animation){const t=r.getTransitionDurationFromElement(this._element);n.default(this._element).one(r.TRANSITION_END,e).emulateTransitionEnd(t)}else e()}hide(){if(!this._element.classList.contains(ji))return;const t=n.default.Event("hide.bs.toast");n.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}dispose(){this._clearTimeout(),this._element.classList.contains(ji)&&this._element.classList.remove(ji),n.default(this._element).off(Fi),n.default.removeData(this._element,xi),this._element=null,this._config=null}_getConfig(t){return t={...Ri,...n.default(this._element).data(),..."object"==typeof t&&t?t:{}},r.typeCheckConfig(Oi,t,this.constructor.DefaultType),t}_setListeners(){n.default(this._element).on(Fi,'[data-dismiss="toast"]',(()=>this.hide()))}_close(){const t=()=>{this._element.classList.add(Li),n.default(this._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(ji),this._config.animation){const e=r.getTransitionDurationFromElement(this._element);n.default(this._element).one(r.TRANSITION_END,t).emulateTransitionEnd(e)}else t()}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static _jQueryInterface(t){return this.each((function(){const e=n.default(this);let i=e.data(xi);if(i||(i=new Hi(this,"object"==typeof t&&t),e.data(xi,i)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](this)}}))}}var Mi,qi,Qi;n.default.fn.toast=Hi._jQueryInterface,n.default.fn.toast.Constructor=Hi,n.default.fn.toast.noConflict=()=>(n.default.fn.toast=ki,Hi._jQueryInterface),Mi=navigator.userAgent.toLowerCase().indexOf("webkit")>-1,qi=navigator.userAgent.toLowerCase().indexOf("opera")>-1,Qi=navigator.userAgent.toLowerCase().indexOf("msie")>-1,(Mi||qi||Qi)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1),t.Alert=d,t.Button=g,t.Carousel=I,t.Collapse=q,t.Dropdown=ue,t.Modal=ke,t.Popover=ci,t.Scrollspy=Ei,t.Tab=Ii,t.Toast=Hi,t.Tooltip=ei,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=theme-bootstrap4.min.js.map