PageSourceSearch

https://demotix.com/wp-content/themes/blogus/js/bootstrap.js?ver=7.1.2

js demotix.com collected 2026-09-24 06:30:04 UTC 153,248 bytes, 4,995 lines download raw bytes

1/*!
2  * Bootstrap v5.0.1 (https://getbootstrap.com/)
3  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5  */
6(function (global, factory) {
7  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
8  typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
9  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
10}(this, (function (Popper) { 'use strict';
11
12  function _interopNamespace(e) {
13    if (e && e.__esModule) return e;
14    var n = Object.create(null);
15    if (e) {
16      Object.keys(e).forEach(function (k) {
17        if (k !== 'default') {
18          var d = Object.getOwnPropertyDescriptor(e, k);
19          Object.defineProperty(n, k, d.get ? d : {
20            enumerable: true,
21            get: function () {
22              return e[k];
23            }
24          });
25        }
26      });
27    }
28    n['default'] = e;
29    return Object.freeze(n);
30  }
31
32  var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
33
34  /**
35   * --------------------------------------------------------------------------
36   * Bootstrap (v5.0.1): dom/selector-engine.js
37   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
38   * --------------------------------------------------------------------------
39   */
40
41  /**
42   * ------------------------------------------------------------------------
43   * Constants
44   * ------------------------------------------------------------------------
45   */
46  const NODE_TEXT = 3;
47  const SelectorEngine = {
48    find(selector, element = document.documentElement) {
49      return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
50    },
51
52    findOne(selector, element = document.documentElement) {
53      return Element.prototype.querySelector.call(element, selector);
54    },
55
56    children(element, selector) {
57      return [].concat(...element.children).filter(child => child.matches(selector));
58    },
59
60    parents(element, selector) {
61      const parents = [];
62      let ancestor = element.parentNode;
63
64      while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
65        if (ancestor.matches(selector)) {
66          parents.push(ancestor);
67        }
68
69        ancestor = ancestor.parentNode;
70      }
71
72      return parents;
73    },
74
75    prev(element, selector) {
76      let previous = element.previousElementSibling;
77
78      while (previous) {
79        if (previous.matches(selector)) {
80          return [previous];
81        }
82
83        previous = previous.previousElementSibling;
84      }
85
86      return [];
87    },
88
89    next(element, selector) {
90      let next = element.nextElementSibling;
91
92      while (next) {
93        if (next.matches(selector)) {
94          return [next];
95        }
96
97        next = next.nextElementSibling;
98      }
99
100      return [];
101    }
102
103  };
104
105  /**
106   * --------------------------------------------------------------------------
107   * Bootstrap (v5.0.1): util/index.js
108   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
109   * --------------------------------------------------------------------------
110   */
111
112  const MAX_UID = 1000000;
113  const MILLISECONDS_MULTIPLIER = 1000;
vendor: 4,429 bytes, lines 114-256
114  const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
115
116  const toType = obj => {
117    if (obj === null || obj === undefined) {
118      return `${obj}`;
119    }
120
121    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
122  };
123  /**
124   * --------------------------------------------------------------------------
125   * Public Util Api
126   * --------------------------------------------------------------------------
127   */
128
129
130  const getUID = prefix => {
131    do {
132      prefix += Math.floor(Math.random() * MAX_UID);
133    } while (document.getElementById(prefix));
134
135    return prefix;
136  };
137
138  const getSelector = element => {
139    let selector = element.getAttribute('data-bs-target');
140
141    if (!selector || selector === '#') {
142      let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
143      // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
144      // `document.querySelector` will rightfully complain it is invalid.
145      // See https://github.com/twbs/bootstrap/issues/32273
146
147      if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
148        return null;
149      } // Just in case some CMS puts out a full URL with the anchor appended
150
151
152      if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
153        hrefAttr = `#${hrefAttr.split('#')[1]}`;
154      }
155
156      selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
157    }
158
159    return selector;
160  };
161
162  const getSelectorFromElement = element => {
163    const selector = getSelector(element);
164
165    if (selector) {
166      return document.querySelector(selector) ? selector : null;
167    }
168
169    return null;
170  };
171
172  const getElementFromSelector = element => {
173    const selector = getSelector(element);
174    return selector ? document.querySelector(selector) : null;
175  };
176
177  const getTransitionDurationFromElement = element => {
178    if (!element) {
179      return 0;
180    } // Get transition-duration of the element
181
182
183    let {
184      transitionDuration,
185      transitionDelay
186    } = window.getComputedStyle(element);
187    const floatTransitionDuration = Number.parseFloat(transitionDuration);
188    const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
189
190    if (!floatTransitionDuration && !floatTransitionDelay) {
191      return 0;
192    } // If multiple durations are defined, take the first
193
194
195    transitionDuration = transitionDuration.split(',')[0];
196    transitionDelay = transitionDelay.split(',')[0];
197    return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
198  };
199
200  const triggerTransitionEnd = element => {
201    element.dispatchEvent(new Event(TRANSITION_END));
202  };
203
204  const isElement = obj => {
205    if (!obj || typeof obj !== 'object') {
206      return false;
207    }
208
209    if (typeof obj.jquery !== 'undefined') {
210      obj = obj[0];
211    }
212
213    return typeof obj.nodeType !== 'undefined';
214  };
215
216  const getElement = obj => {
217    if (isElement(obj)) {
218      // it's a jQuery object or a node element
219      return obj.jquery ? obj[0] : obj;
220    }
221
222    if (typeof obj === 'string' && obj.length > 0) {
223      return SelectorEngine.findOne(obj);
224    }
225
226    return null;
227  };
228
229  const emulateTransitionEnd = (element, duration) => {
230    let called = false;
231    const durationPadding = 5;
232    const emulatedDuration = duration + durationPadding;
233
234    function listener() {
235      called = true;
236      element.removeEventListener(TRANSITION_END, listener);
237    }
238
239    element.addEventListener(TRANSITION_END, listener);
240    setTimeout(() => {
241      if (!called) {
242        triggerTransitionEnd(element);
243      }
244    }, emulatedDuration);
245  };
246
247  const typeCheckConfig = (componentName, config, configTypes) => {
248    Object.keys(configTypes).forEach(property => {
249      const expectedTypes = configTypes[property];
250      const value = config[property];
251      const valueType = value && isElement(value) ? 'element' : toType(value);
252
253      if (!new RegExp(expectedTypes).test(valueType)) {
254        throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
255      }
256    });
257  };
258
259  const isVisible = element => {
260    if (!element) {
261      return false;
262    }
263
264    if (element.style && element.parentNode && element.parentNode.style) {
265      const elementStyle = getComputedStyle(element);
266      const parentNodeStyle = getComputedStyle(element.parentNode);
267      return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
268    }
269
270    return false;
271  };
272
273  const isDisabled = element => {
274    if (!element || element.nodeType !== Node.ELEMENT_NODE) {
275      return true;
276    }
277
278    if (element.classList.contains('disabled')) {
279      return true;
280    }
281
282    if (typeof element.disabled !== 'undefined') {
283      return element.disabled;
284    }
285
286    return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
287  };
288
289  const findShadowRoot = element => {
290    if (!document.documentElement.attachShadow) {
291      return null;
292    } // Can find the shadow root otherwise it'll return the document
293
294
295    if (typeof element.getRootNode === 'function') {
296      const root = element.getRootNode();
297      return root instanceof ShadowRoot ? root : null;
298    }
299
300    if (element instanceof ShadowRoot) {
301      return element;
302    } // when we don't find a shadow root
303
304
305    if (!element.parentNode) {
306      return null;
307    }
308
309    return findShadowRoot(element.parentNode);
310  };
311
312  const noop = () => {};
313
314  const reflow = element => element.offsetHeight;
315
316  const getjQuery = () => {
317    const {
318      jQuery
319    } = window;
320
321    if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
322      return jQuery;
323    }
324
325    return null;
326  };
327
328  const onDOMContentLoaded = callback => {
329    if (document.readyState === 'loading') {
330      document.addEventListener('DOMContentLoaded', callback);
331    } else {
332      callback();
333    }
334  };
335
336  const isRTL = () => document.documentElement.dir === 'rtl';
337
338  const defineJQueryPlugin = plugin => {
339    onDOMContentLoaded(() => {
340      const $ = getjQuery();
341      /* istanbul ignore if */
342
343      if ($) {
344        const name = plugin.NAME;
345        const JQUERY_NO_CONFLICT = $.fn[name];
346        $.fn[name] = plugin.jQueryInterface;
347        $.fn[name].Constructor = plugin;
348
349        $.fn[name].noConflict = () => {
350          $.fn[name] = JQUERY_NO_CONFLICT;
351          return plugin.jQueryInterface;
352        };
353      }
354    });
355  };
356
357  const execute = callback => {
358    if (typeof callback === 'function') {
359      callback();
360    }
361  };
362
363  /**
364   * --------------------------------------------------------------------------
365   * Bootstrap (v5.0.1): dom/data.js
366   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
367   * --------------------------------------------------------------------------
368   */
369
370  /**
371   * ------------------------------------------------------------------------
372   * Constants
373   * ------------------------------------------------------------------------
374   */
375  const elementMap = new Map();
376  var Data = {
377    set(element, key, instance) {
378      if (!elementMap.has(element)) {
379        elementMap.set(element, new Map());
380      }
381
382      const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
383      // can be removed later when multiple key/instances are fine to be used
384
385      if (!instanceMap.has(key) && instanceMap.size !== 0) {
386        // eslint-disable-next-line no-console
387        console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
388        return;
389      }
390
391      instanceMap.set(key, instance);
392    },
393
394    get(element, key) {
395      if (elementMap.has(element)) {
396        return elementMap.get(element).get(key) || null;
397      }
398
399      return null;
400    },
401
402    remove(element, key) {
403      if (!elementMap.has(element)) {
404        return;
405      }
406
407      const instanceMap = elementMap.get(element);
408      instanceMap.delete(key); // free up element references if there are no instances left for an element
409
410      if (instanceMap.size === 0) {
411        elementMap.delete(element);
412      }
413    }
414
415  };
416
417  /**
418   * --------------------------------------------------------------------------
419   * Bootstrap (v5.0.1): dom/event-handler.js
420   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
421   * --------------------------------------------------------------------------
422   */
423  /**
424   * ------------------------------------------------------------------------
425   * Constants
426   * ------------------------------------------------------------------------
427   */
428
429  const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
430  const stripNameRegex = /\..*/;
431  const stripUidRegex = /::\d+$/;
432  const eventRegistry = {}; // Events storage
433
434  let uidEvent = 1;
435  const customEvents = {
436    mouseenter: 'mouseover',
437    mouseleave: 'mouseout'
438  };
439  const customEventsRegex = /^(mouseenter|mouseleave)/i;
440  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']);
441  /**
442   * ------------------------------------------------------------------------
443   * Private methods
444   * ------------------------------------------------------------------------
445   */
446
447  function getUidEvent(element, uid) {
448    return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
449  }
450
451  function getEvent(element) {
452    const uid = getUidEvent(element);
453    element.uidEvent = uid;
454    eventRegistry[uid] = eventRegistry[uid] || {};
455    return eventRegistry[uid];
456  }
457
458  function bootstrapHandler(element, fn) {
459    return function handler(event) {
460      event.delegateTarget = element;
461
462      if (handler.oneOff) {
463        EventHandler.off(element, event.type, fn);
464      }
465
466      return fn.apply(element, [event]);
467    };
468  }
469
470  function bootstrapDelegationHandler(element, selector, fn) {
471    return function handler(event) {
472      const domElements = element.querySelectorAll(selector);
473
474      for (let {
475        target
476      } = event; target && target !== this; target = target.parentNode) {
477        for (let i = domElements.length; i--;) {
478          if (domElements[i] === target) {
479            event.delegateTarget = target;
480
481            if (handler.oneOff) {
482              // eslint-disable-next-line unicorn/consistent-destructuring
483              EventHandler.off(element, event.type, selector, fn);
484            }
485
486            return fn.apply(target, [event]);
487          }
488        }
489      } // To please ESLint
490
491
492      return null;
493    };
494  }
495
496  function findHandler(events, handler, delegationSelector = null) {
497    const uidEventList = Object.keys(events);
498
499    for (let i = 0, len = uidEventList.length; i < len; i++) {
500      const event = events[uidEventList[i]];
501
502      if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
503        return event;
504      }
505    }
506
507    return null;
508  }
509
510  function normalizeParams(originalTypeEvent, handler, delegationFn) {
511    const delegation = typeof handler === 'string';
512    const originalHandler = delegation ? delegationFn : handler;
513    let typeEvent = getTypeEvent(originalTypeEvent);
514    const isNative = nativeEvents.has(typeEvent);
515
516    if (!isNative) {
517      typeEvent = originalTypeEvent;
518    }
519
520    return [delegation, originalHandler, typeEvent];
521  }
522
523  function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
524    if (typeof originalTypeEvent !== 'string' || !element) {
525      return;
526    }
527
528    if (!handler) {
529      handler = delegationFn;
530      delegationFn = null;
531    } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
532    // this prevents the handler from being dispatched the same way as mouseover or mouseout does
533
534
535    if (customEventsRegex.test(originalTypeEvent)) {
536      const wrapFn = fn => {
537        return function (event) {
538          if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
539            return fn.call(this, event);
540          }
541        };
542      };
543
544      if (delegationFn) {
545        delegationFn = wrapFn(delegationFn);
546      } else {
547        handler = wrapFn(handler);
548      }
549    }
550
551    const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
552    const events = getEvent(element);
553    const handlers = events[typeEvent] || (events[typeEvent] = {});
554    const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
555
556    if (previousFn) {
557      previousFn.oneOff = previousFn.oneOff && oneOff;
558      return;
559    }
560
561    const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
562    const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
563    fn.delegationSelector = delegation ? handler : null;
564    fn.originalHandler = originalHandler;
565    fn.oneOff = oneOff;
566    fn.uidEvent = uid;
567    handlers[uid] = fn;
568    element.addEventListener(typeEvent, fn, delegation);
569  }
570
571  function removeHandler(element, events, typeEvent, handler, delegationSelector) {
572    const fn = findHandler(events[typeEvent], handler, delegationSelector);
573
574    if (!fn) {
575      return;
576    }
577
578    element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
579    delete events[typeEvent][fn.uidEvent];
580  }
581
582  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
583    const storeElementEvent = events[typeEvent] || {};
584    Object.keys(storeElementEvent).forEach(handlerKey => {
585      if (handlerKey.includes(namespace)) {
586        const event = storeElementEvent[handlerKey];
587        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
588      }
589    });
590  }
591
592  function getTypeEvent(event) {
593    // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
594    event = event.replace(stripNameRegex, '');
595    return customEvents[event] || event;
596  }
597
598  const EventHandler = {
599    on(element, event, handler, delegationFn) {
600      addHandler(element, event, handler, delegationFn, false);
601    },
602
603    one(element, event, handler, delegationFn) {
604      addHandler(element, event, handler, delegationFn, true);
605    },
606
607    off(element, originalTypeEvent, handler, delegationFn) {
608      if (typeof originalTypeEvent !== 'string' || !element) {
609        return;
610      }
611
612      const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
613      const inNamespace = typeEvent !== originalTypeEvent;
614      const events = getEvent(element);
615      const isNamespace = originalTypeEvent.startsWith('.');
616
617      if (typeof originalHandler !== 'undefined') {
618        // Simplest case: handler is passed, remove that listener ONLY.
619        if (!events || !events[typeEvent]) {
620          return;
621        }
622
623        removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
624        return;
625      }
626
627      if (isNamespace) {
628        Object.keys(events).forEach(elementEvent => {
629          removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
630        });
631      }
632
633      const storeElementEvent = events[typeEvent] || {};
634      Object.keys(storeElementEvent).forEach(keyHandlers => {
635        const handlerKey = keyHandlers.replace(stripUidRegex, '');
636
637        if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
638          const event = storeElementEvent[keyHandlers];
639          removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
640        }
641      });
642    },
643
644    trigger(element, event, args) {
645      if (typeof event !== 'string' || !element) {
646        return null;
647      }
648
649      const $ = getjQuery();
650      const typeEvent = getTypeEvent(event);
651      const inNamespace = event !== typeEvent;
652      const isNative = nativeEvents.has(typeEvent);
653      let jQueryEvent;
654      let bubbles = true;
655      let nativeDispatch = true;
656      let defaultPrevented = false;
657      let evt = null;
658
659      if (inNamespace && $) {
660        jQueryEvent = $.Event(event, args);
661        $(element).trigger(jQueryEvent);
662        bubbles = !jQueryEvent.isPropagationStopped();
663        nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
664        defaultPrevented = jQueryEvent.isDefaultPrevented();
665      }
666
667      if (isNative) {
668        evt = document.createEvent('HTMLEvents');
669        evt.initEvent(typeEvent, bubbles, true);
670      } else {
671        evt = new CustomEvent(event, {
672          bubbles,
673          cancelable: true
674        });
675      } // merge custom information in our event
676
677
678      if (typeof args !== 'undefined') {
679        Object.keys(args).forEach(key => {
680          Object.defineProperty(evt, key, {
681            get() {
682              return args[key];
683            }
684
685          });
686        });
687      }
688
689      if (defaultPrevented) {
690        evt.preventDefault();
691      }
692
693      if (nativeDispatch) {
694        element.dispatchEvent(evt);
695      }
696
697      if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
698        jQueryEvent.preventDefault();
699      }
700
701      return evt;
702    }
703
704  };
705
706  /**
707   * --------------------------------------------------------------------------
708   * Bootstrap (v5.0.1): base-component.js
709   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
710   * --------------------------------------------------------------------------
711   */
712  /**
713   * ------------------------------------------------------------------------
714   * Constants
715   * ------------------------------------------------------------------------
716   */
717
718  const VERSION = '5.0.1';
719
720  class BaseComponent {
721    constructor(element) {
722      element = getElement(element);
723
724      if (!element) {
725        return;
726      }
727
728      this._element = element;
729      Data.set(this._element, this.constructor.DATA_KEY, this);
730    }
731
732    dispose() {
733      Data.remove(this._element, this.constructor.DATA_KEY);
734      EventHandler.off(this._element, this.constructor.EVENT_KEY);
735      Object.getOwnPropertyNames(this).forEach(propertyName => {
736        this[propertyName] = null;
737      });
738    }
739
740    _queueCallback(callback, element, isAnimated = true) {
741      if (!isAnimated) {
742        execute(callback);
743        return;
744      }
745
746      const transitionDuration = getTransitionDurationFromElement(element);
747      EventHandler.one(element, 'transitionend', () => execute(callback));
748      emulateTransitionEnd(element, transitionDuration);
749    }
750    /** Static */
751
752
753    static getInstance(element) {
754      return Data.get(element, this.DATA_KEY);
755    }
756
757    static get VERSION() {
758      return VERSION;
759    }
760
761    static get NAME() {
762      throw new Error('You have to implement the static method "NAME", for each component!');
763    }
764
765    static get DATA_KEY() {
766      return `bs.${this.NAME}`;
767    }
768
769    static get EVENT_KEY() {
770      return `.${this.DATA_KEY}`;
771    }
772
773  }
774
775  /**
776   * --------------------------------------------------------------------------
777   * Bootstrap (v5.0.1): alert.js
778   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
779   * --------------------------------------------------------------------------
780   */
781  /**
782   * ------------------------------------------------------------------------
783   * Constants
784   * ------------------------------------------------------------------------
785   */
786
787  const NAME$c = 'alert';
788  const DATA_KEY$b = 'bs.alert';
789  const EVENT_KEY$b = `.${DATA_KEY$b}`;
790  const DATA_API_KEY$8 = '.data-api';
791  const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
792  const EVENT_CLOSE = `close${EVENT_KEY$b}`;
793  const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
794  const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
795  const CLASS_NAME_ALERT = 'alert';
796  const CLASS_NAME_FADE$6 = 'fade';
797  const CLASS_NAME_SHOW$9 = 'show';
798  /**
799   * ------------------------------------------------------------------------
800   * Class Definition
801   * ------------------------------------------------------------------------
802   */
803
804  class Alert extends BaseComponent {
805    // Getters
806    static get NAME() {
807      return NAME$c;
808    } // Public
809
810
811    close(element) {
812      const rootElement = element ? this._getRootElement(element) : this._element;
813
814      const customEvent = this._triggerCloseEvent(rootElement);
815
816      if (customEvent === null || customEvent.defaultPrevented) {
817        return;
818      }
819
820      this._removeElement(rootElement);
821    } // Private
822
823
824    _getRootElement(element) {
825      return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
826    }
827
828    _triggerCloseEvent(element) {
829      return EventHandler.trigger(element, EVENT_CLOSE);
830    }
831
832    _removeElement(element) {
833      element.classList.remove(CLASS_NAME_SHOW$9);
834      const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
835
836      this._queueCallback(() => this._destroyElement(element), element, isAnimated);
837    }
838
839    _destroyElement(element) {
840      if (element.parentNode) {
841        element.parentNode.removeChild(element);
842      }
843
844      EventHandler.trigger(element, EVENT_CLOSED);
845    } // Static
846
847
848    static jQueryInterface(config) {
849      return this.each(function () {
850        let data = Data.get(this, DATA_KEY$b);
851
852        if (!data) {
853          data = new Alert(this);
854        }
855
856        if (config === 'close') {
857          data[config](this);
858        }
859      });
860    }
861
862    static handleDismiss(alertInstance) {
863      return function (event) {
864        if (event) {
865          event.preventDefault();
866        }
867
868        alertInstance.close(this);
869      };
870    }
871
872  }
873  /**
874   * ------------------------------------------------------------------------
875   * Data Api implementation
876   * ------------------------------------------------------------------------
877   */
878
879
880  EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
881  /**
882   * ------------------------------------------------------------------------
883   * jQuery
884   * ------------------------------------------------------------------------
885   * add .Alert to jQuery only if jQuery is present
886   */
887
888  defineJQueryPlugin(Alert);
889
890  /**
891   * --------------------------------------------------------------------------
892   * Bootstrap (v5.0.1): button.js
893   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
894   * --------------------------------------------------------------------------
895   */
896  /**
897   * ------------------------------------------------------------------------
898   * Constants
899   * ------------------------------------------------------------------------
900   */
901
902  const NAME$b = 'button';
903  const DATA_KEY$a = 'bs.button';
904  const EVENT_KEY$a = `.${DATA_KEY$a}`;
905  const DATA_API_KEY$7 = '.data-api';
906  const CLASS_NAME_ACTIVE$3 = 'active';
907  const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
908  const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
909  /**
910   * ------------------------------------------------------------------------
911   * Class Definition
912   * ------------------------------------------------------------------------
913   */
914
915  class Button extends BaseComponent {
916    // Getters
917    static get NAME() {
918      return NAME$b;
919    } // Public
920
921
922    toggle() {
923      // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle(
923)` method
924      this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
925    } // Static
926
927
928    static jQueryInterface(config) {
929      return this.each(function () {
930        let data = Data.get(this, DATA_KEY$a);
931
932        if (!data) {
933          data = new Button(this);
934        }
935
936        if (config === 'toggle') {
937          data[config]();
938        }
939      });
940    }
941
942  }
943  /**
944   * ------------------------------------------------------------------------
945   * Data Api implementation
946   * ------------------------------------------------------------------------
947   */
948
949
950  EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
951    event.preventDefault();
952    const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
953    let data = Data.get(button, DATA_KEY$a);
954
955    if (!data) {
956      data = new Button(button);
957    }
958
959    data.toggle();
960  });
961  /**
962   * ------------------------------------------------------------------------
963   * jQuery
964   * ------------------------------------------------------------------------
965   * add .Button to jQuery only if jQuery is present
966   */
967
968  defineJQueryPlugin(Button);
969
970  /**
971   * --------------------------------------------------------------------------
972   * Bootstrap (v5.0.1): dom/manipulator.js
973   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
974   * --------------------------------------------------------------------------
975   */
976  function normalizeData(val) {
977    if (val === 'true') {
978      return true;
979    }
980
981    if (val === 'false') {
982      return false;
983    }
984
985    if (val === Number(val).toString()) {
986      return Number(val);
987    }
988
989    if (val === '' || val === 'null') {
990      return null;
991    }
992
993    return val;
994  }
995
996  function normalizeDataKey(key) {
997    return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
998  }
999
1000  const Manipulator = {
1001    setDataAttribute(element, key, value) {
1002      element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
1003    },
1004
1005    removeDataAttribute(element, key) {
1006      element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
1007    },
1008
1009    getDataAttributes(element) {
1010      if (!element) {
1011        return {};
1012      }
1013
1014      const attributes = {};
1015      Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {
1016        let pureKey = key.replace(/^bs/, '');
1017        pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
1018        attributes[pureKey] = normalizeData(element.dataset[key]);
1019      });
1020      return attributes;
1021    },
1022
1023    getDataAttribute(element, key) {
1024      return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
1025    },
1026
1027    offset(element) {
1028      const rect = element.getBoundingClientRect();
1029      return {
1030        top: rect.top + document.body.scrollTop,
1031        left: rect.left + document.body.scrollLeft
1032      };
1033    },
1034
1035    position(element) {
1036      return {
1037        top: element.offsetTop,
1038        left: element.offsetLeft
1039      };
1040    }
1041
1042  };
1043
1044  /**
1045   * --------------------------------------------------------------------------
1046   * Bootstrap (v5.0.1): carousel.js
1047   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1048   * --------------------------------------------------------------------------
1049   */
1050  /**
1051   * ------------------------------------------------------------------------
1052   * Constants
1053   * ------------------------------------------------------------------------
1054   */
1055
1056  const NAME$a = 'carousel';
1057  const DATA_KEY$9 = 'bs.carousel';
1058  const EVENT_KEY$9 = `.${DATA_KEY$9}`;
1059  const DATA_API_KEY$6 = '.data-api';
1060  const ARROW_LEFT_KEY = 'ArrowLeft';
1061  const ARROW_RIGHT_KEY = 'ArrowRight';
1062  const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
1063
1064  const SWIPE_THRESHOLD = 40;
1065  const Default$9 = {
1066    interval: 5000,
1067    keyboard: true,
1068    slide: false,
1069    pause: 'hover',
1070    wrap: true,
1071    touch: true
1072  };
1073  const DefaultType$9 = {
1074    interval: '(number|boolean)',
1075    keyboard: 'boolean',
1076    slide: '(boolean|string)',
1077    pause: '(string|boolean)',
1078    wrap: 'boolean',
1079    touch: 'boolean'
1080  };
1081  const ORDER_NEXT = 'next';
1082  const ORDER_PREV = 'prev';
1083  const DIRECTION_LEFT = 'left';
1084  const DIRECTION_RIGHT = 'right';
1085  const EVENT_SLIDE = `slide${EVENT_KEY$9}`;
1086  const EVENT_SLID = `slid${EVENT_KEY$9}`;
1087  const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`;
1088  const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`;
1089  const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`;
1090  const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
1091  const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
1092  const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
1093  const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
1094  const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
1095  const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`;
1096  const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`;
1097  const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`;
1098  const CLASS_NAME_CAROUSEL = 'carousel';
1099  const CLASS_NAME_ACTIVE$2 = 'active';
1100  const CLASS_NAME_SLIDE = 'slide';
1101  const CLASS_NAME_END = 'carousel-item-end';
1102  const CLASS_NAME_START = 'carousel-item-start';
1103  const CLASS_NAME_NEXT = 'carousel-item-next';
1104  const CLASS_NAME_PREV = 'carousel-item-prev';
1105  const CLASS_NAME_POINTER_EVENT = 'pointer-event';
1106  const SELECTOR_ACTIVE$1 = '.active';
1107  const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
1108  const SELECTOR_ITEM = '.carousel-item';
1109  const SELECTOR_ITEM_IMG = '.carousel-item img';
1110  const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
1111  const SELECTOR_INDICATORS = '.carousel-indicators';
1112  const SELECTOR_INDICATOR = '[data-bs-target]';
1113  const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1114  const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1115  const POINTER_TYPE_TOUCH = 'touch';
1116  const POINTER_TYPE_PEN = 'pen';
1117  /**
1118   * ------------------------------------------------------------------------
1119   * Class Definition
1120   * ------------------------------------------------------------------------
1121   */
1122
1123  class Carousel extends BaseComponent {
1124    constructor(element, config) {
1125      super(element);
1126      this._items = null;
1127      this._interval = null;
1128      this._activeElement = null;
1129      this._isPaused = false;
1130      this._isSliding = false;
1131      this.touchTimeout = null;
1132      this.touchStartX = 0;
1133      this.touchDeltaX = 0;
1134      this._config = this._getConfig(config);
1135      this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
1136      this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1137      this._pointerEvent = Boolean(window.PointerEvent);
1138
1139      this._addEventListeners();
1140    } // Getters
1141
1142
1143    static get Default() {
1144      return Default$9;
1145    }
1146
1147    static get NAME() {
1148      return NAME$a;
1149    } // Public
1150
1151
1152    next() {
1153      if (!this._isSliding) {
1154        this._slide(ORDER_NEXT);
1155      }
1156    }
1157
1158    nextWhenVisible() {
1159      // Don't call next when the page isn't visible
1160      // or the carousel or its parent isn't visible
1161      if (!document.hidden && isVisible(this._element)) {
1162        this.next();
1163      }
1164    }
1165
1166    prev() {
1167      if (!this._isSliding) {
1168        this._slide(ORDER_PREV);
1169      }
1170    }
1171
1172    pause(event) {
1173      if (!event) {
1174        this._isPaused = true;
1175      }
1176
1177      if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
1178        triggerTransitionEnd(this._element);
1179        this.cycle(true);
1180      }
1181
1182      clearInterval(this._interval);
1183      this._interval = null;
1184    }
1185
1186    cycle(event) {
1187      if (!event) {
1188        this._isPaused = false;
1189      }
1190
1191      if (this._interval) {
1192        clearInterval(this._interval);
1193        this._interval = null;
1194      }
1195
1196      if (this._config && this._config.interval && !this._isPaused) {
1197        this._updateInterval();
1198
1199        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
1200      }
1201    }
1202
1203    to(index) {
1204      this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1205
1206      const activeIndex = this._getItemIndex(this._activeElement);
1207
1208      if (index > this._items.length - 1 || index < 0) {
1209        return;
1210      }
1211
1212      if (this._isSliding) {
1213        EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
1214        return;
1215      }
1216
1217      if (activeIndex === index) {
1218        this.pause();
1219        this.cycle();
1220        return;
1221      }
1222
1223      const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1224
1225      this._slide(order, this._items[index]);
1226    } // Private
1227
1228
1229    _getConfig(config) {
1230      config = { ...Default$9,
1231        ...config
1232      };
1233      typeCheckConfig(NAME$a, config, DefaultType$9);
1234      return config;
1235    }
1236
1237    _handleSwipe() {
1238      const absDeltax = Math.abs(this.touchDeltaX);
1239
1240      if (absDeltax <= SWIPE_THRESHOLD) {
1241        return;
1242      }
1243
1244      const direction = absDeltax / this.touchDeltaX;
1245      this.touchDeltaX = 0;
1246
1247      if (!direction) {
1248        return;
1249      }
1250
1251      this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);
1252    }
1253
1254    _addEventListeners() {
1255      if (this._config.keyboard) {
1256        EventHandler.on(this._element, EVENT_KEYDOWN, event =>
1256 this._keydown(event));
1257      }
1258
1259      if (this._config.pause === 'hover') {
1260        EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
1261        EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
1262      }
1263
1264      if (this._config.touch && this._touchSupported) {
1265        this._addTouchEventListeners();
1266      }
1267    }
1268
1269    _addTouchEventListeners() {
1270      const start = event => {
1271        if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
1272          this.touchStartX = event.clientX;
1273        } else if (!this._pointerEvent) {
1274          this.touchStartX = event.touches[0].clientX;
1275        }
1276      };
1277
1278      const move = event => {
1279        // ensure swiping with one touch and not pinching
1280        this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;
1281      };
1282
1283      const end = event => {
1284        if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
1285          this.touchDeltaX = event.clientX - this.touchStartX;
1286        }
1287
1288        this._handleSwipe();
1289
1290        if (this._config.pause === 'hover') {
1291          // If it's a touch-enabled device, mouseenter/leave are fired as
1292          // part of the mouse compatibility events on first tap - the carousel
1293          // would stop cycling until user tapped out of it;
1294          // here, we listen for touchend, explicitly pause the carousel
1295          // (as if it's the second time we tap on it, mouseenter compat event
1296          // is NOT fired) and after a timeout (to allow for mouse compatibility
1297          // events to fire) we explicitly restart cycling
1298          this.pause();
1299
1300          if (this.touchTimeout) {
1301            clearTimeout(this.touchTimeout);
1302          }
1303
1304          this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
1305        }
1306      };
1307
1308      SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
1309        EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
1310      });
1311
1312      if (this._pointerEvent) {
1313        EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));
1314        EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));
1315
1316        this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1317      } else {
1318        EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));
1319        EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));
1320        EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));
1321      }
1322    }
1323
1324    _keydown(event) {
1325      if (/input|textarea/i.test(event.target.tagName)) {
1326        return;
1327      }
1328
1329      if (event.key === ARROW_LEFT_KEY) {
1330        event.preventDefault();
1331
1332        this._slide(DIRECTION_RIGHT);
1333      } else if (event.key === ARROW_RIGHT_KEY) {
1334        event.preventDefault();
1335
1336        this._slide(DIRECTION_LEFT);
1337      }
1338    }
1339
1340    _getItemIndex(element) {
1341      this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
1342      return this._items.indexOf(element);
1343    }
1344
1345    _getItemByOrder(order, activeElement) {
1346      const isNext = order === ORDER_NEXT;
1347      const isPrev = order === ORDER_PREV;
1348
1349      const activeIndex = this._getItemIndex(activeElement);
1350
1351      const lastItemIndex = this._items.length - 1;
1352      const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
1353
1354      if (isGoingToWrap && !this._config.wrap) {
1355        return activeElement;
1356      }
1357
1358      const delta = isPrev ? -1 : 1;
1359      const itemIndex = (activeIndex + delta) % this._items.length;
1360      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
1361    }
1362
1363    _triggerSlideEvent(relatedTarget, eventDirectionName) {
1364      const targetIndex = this._getItemIndex(relatedTarget);
1365
1366      const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
1367
1368      return EventHandler.trigger(this._element, EVENT_SLIDE, {
1369        relatedTarget,
1370        direction: eventDirectionName,
1371        from: fromIndex,
1372        to: targetIndex
1373      });
1374    }
1375
1376    _setActiveIndicatorElement(element) {
1377      if (this._indicatorsElement) {
1378        const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);
1379        activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
1380        activeIndicator.removeAttribute('aria-current');
1381        const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);
1382
1383        for (let i = 0; i < indicators.length; i++) {
1384          if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
1385            indicators[i].classList.add(CLASS_NAME_ACTIVE$2);
1386            indicators[i].setAttribute('aria-current', 'true');
1387            break;
1388          }
1389        }
1390      }
1391    }
1392
1393    _updateInterval() {
1394      const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1395
1396      if (!element) {
1397        return;
1398      }
1399
1400      const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1401
1402      if (elementInterval) {
1403        this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1404        this._config.interval = elementInterval;
1405      } else {
1406        this._config.interval = this._config.defaultInterval || this._config.interval;
1407      }
1408    }
1409
1410    _slide(directionOrOrder, element) {
1411      const order = this._directionToOrder(directionOrOrder);
1412
1413      const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1414
1415      const activeElementIndex = this._getItemIndex(activeElement);
1416
1417      const nextElement = element || this._getItemByOrder(order, activeElement);
1418
1419      const nextElementIndex = this._getItemIndex(nextElement);
1420
1421      const isCycling = Boolean(this._interval);
1422      const isNext = order === ORDER_NEXT;
1423      const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
1424      const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
1425
1426      const eventDirectionName = this._orderToDirection(order);
1427
1428      if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {
1429        this._isSliding = false;
1430        return;
1431      }
1432
1433      const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1434
1435      if (slideEvent.defaultPrevented) {
1436        return;
1437      }
1438
1439      if (!activeElement || !nextElement) {
1440        // Some weirdness is happening, so we bail
1441        return;
1442      }
1443
1444      this._isSliding = true;
1445
1446      if (isCycling) {
1447        this.pause();
1448      }
1449
1450      this._setActiveIndicatorElement(nextElement);
1451
1452      this._activeElement = nextElement;
1453
1454      const triggerSlidEvent = () => {
1455        EventHandler.trigger(this._element, EVENT_SLID, {
1456          relatedTarget: nextElement,
1457          direction: eventDirectionName,
1458          from: activeElementIndex,
1459          to: nextElementIndex
1460        });
1461      };
1462
1463      if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1464        nextElement.classList.add(orderClassName);
1465        reflow(nextElement);
1466        activeElement.classList.add(directionalClassName);
1467        nextElement.classList.add(directionalClassName);
1468
1469        const completeCallBack = () => {
1470          nextElement.classList.remove(directionalClassName, orderClassName);
1471          nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1472          activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1473          this._isSliding = false;
1474          setTimeout(triggerSlidEvent, 0);
1475        };
1476
1477        this._queueCallback(completeCallBack, activeElement, true);
1478      } else {
1479        activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
1480        nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1481        this._isSliding = false;
1482        triggerSlidEvent();
1483      }
1484
1485      if (isCycling) {
1486        this.cycle();
1487      }
1488    }
1489
1490    _directionToOrder(direction) {
1491      if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
1492        return direction;
1493      }
1494
1495      if (isRTL()) {
1496        return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
1497      }
1498
1499      return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
1500    }
1501
1502    _orderToDirection(order) {
1503      if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
1504        return order;
1505      }
1506
1507      if (isRTL()) {
1508        return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
1509      }
1510
1511      return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
1512    } // Static
1513
1514
1515    static carouselInterface(element, config) {
1516      let data = Data.get(element, DATA_KEY$9);
1517      let _config = { ...Default$9,
1518        ...Manipulator.getDataAttributes(element)
1519      };
1520
1521      if (typeof config === 'object') {
1522        _config = { ..._config,
1523          ...config
1524        };
1525      }
1526
1527      const action = typeof config === 'string' ? config : _config.slide;
1528
1529      if (!data) {
1530        data = new Carousel(element, _config);
1531      }
1532
1533      if (typeof config === 'number') {
1534        data.to(config);
1535      } else if (typeof action === 'string') {
1536        if (typeof data[action] === 'undefined') {
1537          throw new TypeError(`No method named "${action}"`);
1538        }
1539
1540        data[action]();
1541      } else if (_config.interval && _config.ride) {
1542        data.pause();
1543        data.cycle();
1544      }
1545    }
1546
1547    static jQueryInterface(config) {
1548      return this.each(function () {
1549        Carousel.carouselInterface(this, config);
1550      });
1551    }
1552
1553    static dataApiClickHandler(event) {
1554      const target = getElementFromSelector(this);
1555
1556      if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1557        return;
1558      }
1559
1560      const config = { ...Manipulator.getDataAttributes(target),
1561        ...Manipulator.getDataAttributes(this)
1562      };
1563      const slideIndex = this.getAttribute('data-bs-slide-to');
1564
1565      if (slideIndex) {
1566        config.interval = false;
1567      }
1568
1569      Carousel.carouselInterface(target, config);
1570
1571      if (slideIndex) {
1572        Data.get(target, DATA_KEY$9).to(slideIndex);
1573      }
1574
1575      event.preventDefault();
1576    }
1577
1578  }
1579  /**
1580   * ------------------------------------------------------------------------
1581   * Data Api implementation
1582   * ------------------------------------------------------------------------
1583   */
1584
1585
1586  EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
1587  EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
1588    const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1589
1590    for (let i = 0, len = carousels.length; i < len; i++) {
1591      Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY$9));
1592    }
1593  });
1594  /**
1595   * ------------------------------------------------------------------------
1596   * jQuery
1597   * ------------------------------------------------------------------------
1598   * add .Carousel to jQuery only if jQuery is present
1599   */
1600
1601  defineJQueryPlugin(Carousel);
1602
1603  /**
1604   * --------------------------------------------------------------------------
1605   * Bootstrap (v5.0.1): collapse.js
1606   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1607   * --------------------------------------------------------------------------
1608   */
1609  /**
1610   * ------------------------------------------------------------------------
1611   * Constants
1612   * ------------------------------------------------------------------------
1613   */
1614
1615  const NAME$9 = 'collapse';
1616  const DATA_KEY$8 = 'bs.collapse';
1617  const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1618  const DATA_API_KEY$5 = '.data-api';
1619  const Default$8 = {
1620    toggle: true,
1621    parent: ''
1622  };
1623  const DefaultType$8 = {
1624    toggle: 'boolean',
1625    parent: '(string|element)'
1626  };
1627  const EVENT_SHOW$5 = `show${EVENT_KEY$8}`;
1628  const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`;
1629  const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;
1630  const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;
1631  const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
1632  const CLASS_NAME_SHOW$8 = 'show';
1633  const CLASS_NAME_COLLAPSE = 'collapse';
1634  const CLASS_NAME_COLLAPSING = 'collapsing';
1635  const CLASS_NAME_COLLAPSED = 'collapsed';
1636  const WIDTH = 'width';
1637  const HEIGHT = 'height';
1638  const SELECTOR_ACTIVES = '.show, .collapsing';
1639  const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
1640  /**
1641   * ------------------------------------------------------------------------
1642   * Class Definition
1643   * ------------------------------------------------------------------------
1644   */
1645
1646  class Collapse extends BaseComponent {
1647    constructor(element, config) {
1648      super(element);
1649      this._isTransitioning = false;
1650      this._config = this._getConfig(config);
1651      this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`);
1652      const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1653
1654      for (let i = 0, len = toggleList.length; i < len; i++) {
1655        const elem = toggleList[i];
1656        const selector = getSelectorFromElement(elem);
1657        const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);
1658
1659        if (selector !== null && filterElement.length) {
1660          this._selector = selector;
1661
1662          this._triggerArray.push(elem);
1663        }
1664      }
1665
1666      this._parent = this._config.parent ? this._getParent() : null;
1667
1668      if (!this._config.parent) {
1669        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1670      }
1671
1672      if (this._config.toggle) {
1673        this.toggle();
1674      }
1675    } // Getters
1676
1677
1678    static get Default() {
1679      return Default$8;
1680    }
1681
1682    static get NAME() {
1683      return NAME$9;
1684    } // Public
1685
1686
1687    toggle() {
1688      if (this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1689        this.hide();
1690      } else {
1691        this.show();
1692      }
1693    }
1694
1695    show() {
1696      if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1697        return;
1698      }
1699
1700      let actives;
1701      let activesData;
1702
1703      if (this._parent) {
1704        actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => {
1705          if (typeof this._config.parent === 'string') {
1706            return elem.getAttribute('data-bs-parent') === this._config.parent;
1707          }
1708
1709          return elem.classList.contains(CLASS_NAME_COLLAPSE);
1710        });
1711
1712        if (actives.length === 0) {
1713          actives = null;
1714        }
1715      }
1716
1717      const container = SelectorEngine.findOne(this._selector);
1718
1719      if (actives) {
1720        const tempActiveData = actives.find(elem => container !== elem);
1721        activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY$8) : null;
1722
1723        if (activesData && activesData._isTransitioning) {
1724          return;
1725        }
1726      }
1727
1728      const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);
1729
1730      if (startEvent.defaultPrevented) {
1731        return;
1732      }
1733
1734      if (actives) {
1735        actives.forEach(elemActive => {
1736          if (container !== elemActive) {
1737            Collapse.collapseInterface(elemActive, 'hide');
1738          }
1739
1740          if (!activesData) {
1741            Data.set(elemActive, DATA_KEY$8, null);
1742          }
1743        });
1744      }
1745
1746      const dimension = this._getDimension();
1747
1748      this._element.classList.remove(CLASS_NAME_COLLAPSE);
1749
1750      this._element.classList.add(CLASS_NAME_COLLAPSING);
1751
1752      this._element.style[dimension] = 0;
1753
1754      if (this._triggerArray.length) {
1755        this._triggerArray.forEach(element => {
1756          element.classList.remove(CLASS_NAME_COLLAPSED);
1757          element.setAttribute('aria-expanded', true);
1758        });
1759      }
1760
1761      this.setTransitioning(true);
1762
1763      const complete = () => {
1764        this._element.classList.remove(CLASS_NAME_COLLAPSING);
1765
1766        this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1767
1768        this._element.style[dimension] = '';
1769        this.setTransitioning(false);
1770        EventHandler.trigger(this._element, EVENT_SHOWN$5);
1771      };
1772
1773      const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1774      const scrollSize = `scroll${capitalizedDimension}`;
1775
1776      this._queueCallback(complete, this._element, true);
1777
1778      this._element.style[dimension] = `${this._element[scrollSize]}px`;
1779    }
1780
1781    hide() {
1782      if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1783        return;
1784      }
1785
1786      const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);
1787
1788      if (startEvent.defaultPrevented) {
1789        return;
1790      }
1791
1792      const dimension = this._getDimension();
1793
1794      this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
1795      reflow(this._element);
1796
1797      this._element.classList.add(CLASS_NAME_COLLAPSING);
1798
1799      this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1800
1801      const triggerArrayLength = this._triggerArray.length;
1802
1803      if (triggerArrayLength > 0) {
1804        for (let i = 0; i < triggerArrayLength; i++) {
1805          const trigger = this._triggerArray[i];
1806          const elem = getElementFromSelector(trigger);
1807
1808          if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) {
1809            trigger.classList.add(CLASS_NAME_COLLAPSED);
1810            trigger.setAttribute('aria-expanded', false);
1811          }
1812        }
1813      }
1814
1815      this.setTransitioning(true);
1816
1817      const complete = () => {
1818        this.setTransitioning(false);
1819
1820        this._element.classList.remove(CLASS_NAME_COLLAPSING);
1821
1822        this._element.classList.add(CLASS_NAME_COLLAPSE);
1823
1824        EventHandler.trigger(this._element, EVENT_HIDDEN$5);
1825      };
1826
1827      this._element.style[dimension] = '';
1828
1829      this._queueCallback(complete, this._element, true);
1830    }
1831
1832    setTransitioning(isTransitioning) {
1833      this._isTransitioning = isTransitioning;
1834    } // Private
1835
1836
1837    _getConfig(config) {
1838      config = { ...Default$8,
1839        ...config
1840      };
1841      config.toggle = Boolean(config.toggle); // Coerce string values
1842
1843      typeCheckConfig(NAME$9, config, DefaultType$8);
1844      return config;
1845    }
1846
1847    _getDimension() {
1848      return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
1849    }
1850
1851    _getParent() {
1852      let {
1853        parent
1854      } = this._config;
1855      parent = getElement(parent);
1856      const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
1857      SelectorEngine.find(selector, parent).forEach(element => {
1858        const selected = getElementFromSelector(element);
1859
1860        this._addAriaAndCollapsedClass(selected, [element]);
1861      });
1862      return parent;
1863    }
1864
1865    _addAriaAndCollapsedClass(element, triggerArray) {
1866      if (!element || !triggerArray.length) {
1867        return;
1868      }
1869
1870      const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
1871      triggerArray.forEach(elem => {
1872        if (isOpen) {
1873          elem.classList.remove(CLASS_NAME_COLLAPSED);
1874        } else {
1875          elem.classList.add(CLASS_NAME_COLLAPSED);
1876        }
1877
1878        elem.setAttribute('aria-expanded', isOpen);
1879      });
1880    } // Static
1881
1882
1883    static collapseInterface(element, config) {
1884      let data = Data.get(element, DATA_KEY$8);
1885      const _config = { ...Default$8,
1886        ...Manipulator.getDataAttributes(element),
1887        ...(typeof config === 'object' && config ? config : {})
1888      };
1889
1890      if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1891        _config.toggle = false;
1892      }
1893
1894      if (!data) {
1895        data = new Collapse(element, _config);
1896      }
1897
1898      if (typeof config === 'string') {
1899        if (typeof data[config] === 'undefined') {
1900          throw new TypeError(`No method named "${config}"`);
1901        }
1902
1903        data[config]();
1904      }
1905    }
1906
1907    static jQueryInterface(config) {
1908      return this.each(function () {
1909        Collapse.collapseInterface(this, config);
1910      });
1911    }
1912
1913  }
1914  /**
1915   * ------------------------------------------------------------------------
1916   * Data Api implementation
1917   * ------------------------------------------------------------------------
1918   */
1919
1920
1921  EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
1922    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1923    if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
1924      event.preventDefault();
1925    }
1926
1927    const triggerData = Manipulator.getDataAttributes(this);
1928    const selector = getSelectorFromElement(this);
1929    const selectorElements = SelectorEngine.find(selector);
1930    selectorElements.forEach(element => {
1931      const data = Data.get(element, DATA_KEY$8);
1932      let config;
1933
1934      if (data) {
1935        // update parent attribute
1936        if (data._parent === null && typeof triggerData.parent === 'string') {
1937          data._config.parent = triggerData.parent;
1938          data._parent = data._getParent();
1939        }
1940
1941        config = 'toggle';
1942      } else {
1943        config = triggerData;
1944      }
1945
1946      Collapse.collapseInterface(element, config);
1947    });
1948  });
1949  /**
1950   * ------------------------------------------------------------------------
1951   * jQuery
1952   * ------------------------------------------------------------------------
1953   * add .Collapse to jQuery only if jQuery is present
1954   */
1955
1956  defineJQueryPlugin(Collapse);
1957
1958  /**
1959   * --------------------------------------------------------------------------
1960   * Bootstrap (v5.0.1): dropdown.js
1961   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1962   * --------------------------------------------------------------------------
1963   */
1964  /**
1965   * ------------------------------------------------------------------------
1966   * Constants
1967   * ------------------------------------------------------------------------
1968   */
1969
1970  const NAME$8 = 'dropdown';
1971  const DATA_KEY$7 = 'bs.dropdown';
1972  const EVENT_KEY$7 = `.${DATA_KEY$7}`;
1973  const DATA_API_KEY$4 = '.data-api';
1974  const ESCAPE_KEY$2 = 'Escape';
1975  const SPACE_KEY = 'Space';
1976  const TAB_KEY = 'Tab';
1977  const ARROW_UP_KEY = 'ArrowUp';
1978  const ARROW_DOWN_KEY = 'ArrowDown';
1979  const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
1980
1981  const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
1982  const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`;
1983  const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`;
1984  const EVENT_SHOW$4 = `show${EVENT_KEY$7}`;
1985  const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`;
1986  const EVENT_CLICK = `click${EVENT_KEY$7}`;
1987  const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
1988  const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
1989  const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
1990  const CLASS_NAME_SHOW$7 = 'show';
1991  const CLASS_NAME_DROPUP = 'dropup';
1992  const CLASS_NAME_DROPEND = 'dropend';
1993  const CLASS_NAME_DROPSTART = 'dropstart';
1994  const CLASS_NAME_NAVBAR = 'navbar';
1995  const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]';
1996  const SELECTOR_MENU = '.dropdown-menu';
1997  const SELECTOR_NAVBAR_NAV = '.navbar-nav';
1998  const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1999  const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
2000  const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
2001  const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
2002  const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
2003  const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
2004  const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
2005  const Default$7 = {
2006    offset: [0, 2],
2007    boundary: 'clippingParents',
2008    reference: 'toggle',
2009    display: 'dynamic',
2010    popperConfig: null,
2011    autoClose: true
2012  };
2013  const DefaultType$7 = {
2014    offset: '(array|string|function)',
2015    boundary: '(string|element)',
2016    reference: '(string|element|object)',
2017    display: 'string',
2018    popperConfig: '(null|object|function)',
2019    autoClose: '(boolean|string)'
2020  };
2021  /**
2022   * ------------------------------------------------------------------------
2023   * Class Definition
2024   * ------------------------------------------------------------------------
2025   */
2026
2027  class Dropdown extends BaseComponent {
2028    constructor(element, config) {
2029      super(element);
2030      this._popper = null;
2031      this._config = this._getConfig(config);
2032      this._menu = this._getMenuElement();
2033      this._inNavbar = this._detectNavbar();
2034
2035      this._addEventListeners();
2036    } // Getters
2037
2038
2039    static get Default() {
2040      return Default$7;
2041    }
2042
2043    static get DefaultType() {
2044      return DefaultType$7;
2045    }
2046
2047    static get NAME() {
2048      return NAME$8;
2049    } // Public
2050
2051
2052    toggle() {
2053      if (isDisabled(this._element)) {
2054        return;
2055      }
2056
2057      const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
2058
2059      if (isActive) {
2060        this.hide();
2061        return;
2062      }
2063
2064      this.show();
2065    }
2066
2067    show() {
2068      if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
2069        return;
2070      }
2071
2072      const parent = Dropdown.getParentFromElement(this._element);
2073      const relatedTarget = {
2074        relatedTarget: this._element
2075      };
2076      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);
2077
2078      if (showEvent.defaultPrevented) {
2079        return;
2080      } // Totally disable Popper for Dropdowns in Navbar
2081
2082
2083      if (this._inNavbar) {
2084        Manipulator.setDataAttribute(this._menu, 'popper', 'none');
2085      } else {
2086        if (typeof Popper__namespace === 'undefined') {
2087          throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
2088        }
2089
2090        let referenceElement = this._element;
2091
2092        if (this._config.reference === 'parent') {
2093          referenceElement = parent;
2094        } else if (isElement(this._config.reference)) {
2095          referenceElement = getElement(this._config.reference);
2096        } else if (typeof this._config.reference === 'object') {
2097          referenceElement = this._config.reference;
2098        }
2099
2100        const popperConfig = this._getPopperConfig();
2101
2102        const isDisplayStatic = popperConfig.modifiers.find(modifier =>
2102 modifier.name === 'applyStyles' && modifier.enabled === false);
2103        this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
2104
2105        if (isDisplayStatic) {
2106          Manipulator.setDataAttribute(this._menu, 'popper', 'static');
2107        }
2108      } // If this is a touch-enabled device we add extra
2109      // empty mouseover listeners to the body's immediate children;
2110      // only needed because of broken event delegation on iOS
2111      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
2112
2113
2114      if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
2115        [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));
2116      }
2117
2118      this._element.focus();
2119
2120      this._element.setAttribute('aria-expanded', true);
2121
2122      this._menu.classList.toggle(CLASS_NAME_SHOW$7);
2123
2124      this._element.classList.toggle(CLASS_NAME_SHOW$7);
2125
2126      EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
2127    }
2128
2129    hide() {
2130      if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
2131        return;
2132      }
2133
2134      const relatedTarget = {
2135        relatedTarget: this._element
2136      };
2137
2138      this._completeHide(relatedTarget);
2139    }
2140
2141    dispose() {
2142      if (this._popper) {
2143        this._popper.destroy();
2144      }
2145
2146      super.dispose();
2147    }
2148
2149    update() {
2150      this._inNavbar = this._detectNavbar();
2151
2152      if (this._popper) {
2153        this._popper.update();
2154      }
2155    } // Private
2156
2157
2158    _addEventListeners() {
2159      EventHandler.on(this._element, EVENT_CLICK, event => {
2160        event.preventDefault();
2161        this.toggle();
2162      });
2163    }
2164
2165    _completeHide(relatedTarget) {
2166      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
2167
2168      if (hideEvent.defaultPrevented) {
2169        return;
2170      } // If this is a touch-enabled device we remove the extra
2171      // empty mouseover listeners we added for iOS support
2172
2173
2174      if ('ontouchstart' in document.documentElement) {
2175        [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));
2176      }
2177
2178      if (this._popper) {
2179        this._popper.destroy();
2180      }
2181
2182      this._menu.classList.remove(CLASS_NAME_SHOW$7);
2183
2184      this._element.classList.remove(CLASS_NAME_SHOW$7);
2185
2186      this._element.setAttribute('aria-expanded', 'false');
2187
2188      Manipulator.removeDataAttribute(this._menu, 'popper');
2189      EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
2190    }
2191
2192    _getConfig(config) {
2193      config = { ...this.constructor.Default,
2194        ...Manipulator.getDataAttributes(this._element),
2195        ...config
2196      };
2197      typeCheckConfig(NAME$8, config, this.constructor.DefaultType);
2198
2199      if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
2200        // Popper virtual elements require a getBoundingClientRect method
2201        throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
2202      }
2203
2204      return config;
2205    }
2206
2207    _getMenuElement() {
2208      return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
2209    }
2210
2211    _getPlacement() {
2212      const parentDropdown = this._element.parentNode;
2213
2214      if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
2215        return PLACEMENT_RIGHT;
2216      }
2217
2218      if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
2219        return PLACEMENT_LEFT;
2220      } // We need to trim the value because custom properties can also include spaces
2221
2222
2223      const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
2224
2225      if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
2226        return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
2227      }
2228
2229      return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
2230    }
2231
2232    _detectNavbar() {
2233      return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;
2234    }
2235
2236    _getOffset() {
2237      const {
2238        offset
2239      } = this._config;
2240
2241      if (typeof offset === 'string') {
2242        return offset.split(',').map(val => Number.parseInt(val, 10));
2243      }
2244
2245      if (typeof offset === 'function') {
2246        return popperData => offset(popperData, this._element);
2247      }
2248
2249      return offset;
2250    }
2251
2252    _getPopperConfig() {
2253      const defaultBsPopperConfig = {
2254        placement: this._getPlacement(),
2255        modifiers: [{
2256          name: 'preventOverflow',
2257          options: {
2258            boundary: this._config.boundary
2259          }
2260        }, {
2261          name: 'offset',
2262          options: {
2263            offset: this._getOffset()
2264          }
2265        }]
2266      }; // Disable Popper if we have a static display
2267
2268      if (this._config.display === 'static') {
2269        defaultBsPopperConfig.modifiers = [{
2270          name: 'applyStyles',
2271          enabled: false
2272        }];
2273      }
2274
2275      return { ...defaultBsPopperConfig,
2276        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
2277      };
2278    }
2279
2280    _selectMenuItem(event) {
2281      const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
2282
2283      if (!items.length) {
2284        return;
2285      }
2286
2287      let index = items.indexOf(event.target); // Up
2288
2289      if (event.key === ARROW_UP_KEY && index > 0) {
2290        index--;
2291      } // Down
2292
2293
2294      if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
2295        index++;
2296      } // index is -1 if the first keydown is an ArrowUp
2297
2298
2299      index = index === -1 ? 0 : index;
2300      items[index].focus();
2301    } // Static
2302
2303
2304    static dropdownInterface(element, config) {
2305      let data = Data.get(element, DATA_KEY$7);
2306
2307      const _config = typeof config === 'object' ? config : null;
2308
2309      if (!data) {
2310        data = new Dropdown(element, _config);
2311      }
2312
2313      if (typeof config === 'string') {
2314        if (typeof data[config] === 'undefined') {
2315          throw new TypeError(`No method named "${config}"`);
2316        }
2317
2318        data[config]();
2319      }
2320    }
2321
2322    static jQueryInterface(config) {
2323      return this.each(function () {
2324        Dropdown.dropdownInterface(this, config);
2325      });
2326    }
2327
2328    static clearMenus(event) {
2329      if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
2330        return;
2331      }
2332
2333      const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
2334
2335      for (let i = 0, len = toggles.length; i < len; i++) {
2336        const context = Data.get(toggles[i], DATA_KEY$7);
2337
2338        if (!context || context._config.autoClose === false) {
2339          continue;
2340        }
2341
2342        if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) {
2343          continue;
2344        }
2345
2346        const relatedTarget = {
2347          relatedTarget: context._element
2348        };
2349
2350        if (event) {
2351          const composedPath = event.composedPath();
2352          const isMenuTarget = composedPath.includes(context._menu);
2353
2354          if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
2355            continue;
2356          } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
2357
2358
2359          if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
2360            continue;
2361          }
2362
2363          if (event.type === 'click') {
2364            relatedTarget.clickEvent = event;
2365          }
2366        }
2367
2368        context._completeHide(relatedTarget);
2369      }
2370    }
2371
2372    static getParentFromElement(element) {
2373      return getElementFromSelector(element) || element.parentNode;
2374    }
2375
2376    static dataApiKeydownHandler(event) {
2377      // If not input/textarea:
2378      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
2379      // If input/textarea:
2380      //  - If space key => not a dropdown command
2381      //  - If key is other than escape
2382      //    - If key is not up or down => not a dropdown command
2383      //    - If trigger inside the menu => not a dropdown command
2384      if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
2385        return;
2386      }
2387
2388      const isActive = this.classList.contains(CLASS_NAME_SHOW$7);
2389
2390      if (!isActive && event.key === ESCAPE_KEY$2) {
2391        return;
2392      }
2393
2394      event.preventDefault();
2395      event.stopPropagation();
2396
2397      if (isDisabled(this)) {
2398        return;
2399      }
2400
2401      const getToggleButton = () =>
2401 this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
2402
2403      if (event.key === ESCAPE_KEY$2) {
2404        getToggleButton().focus();
2405        Dropdown.clearMenus();
2406        return;
2407      }
2408
2409      if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
2410        getToggleButton().click();
2411        return;
2412      }
2413
2414      if (!isActive || event.key === SPACE_KEY) {
2415        Dropdown.clearMenus();
2416        return;
2417      }
2418
2419      Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
2420    }
2421
2422  }
2423  /**
2424   * ------------------------------------------------------------------------
2425   * Data Api implementation
2426   * ------------------------------------------------------------------------
2427   */
2428
2429
2430  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
2431  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2432  EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
2433  EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2434  EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
2435    event.preventDefault();
2436    Dropdown.dropdownInterface(this);
2437  });
2438  /**
2439   * ------------------------------------------------------------------------
2440   * jQuery
2441   * ------------------------------------------------------------------------
2442   * add .Dropdown to jQuery only if jQuery is present
2443   */
2444
2445  defineJQueryPlugin(Dropdown);
2446
2447  /**
2448   * --------------------------------------------------------------------------
2449   * Bootstrap (v5.0.1): util/scrollBar.js
2450   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2451   * --------------------------------------------------------------------------
2452   */
2453  const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2454  const SELECTOR_STICKY_CONTENT = '.sticky-top';
2455
2456  const getWidth = () => {
2457    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2458    const documentWidth = document.documentElement.clientWidth;
2459    return Math.abs(window.innerWidth - documentWidth);
2460  };
2461
2462  const hide = (width = getWidth()) => {
2463    _disableOverFlow(); // give padding to element to balances the hidden scrollbar width
2464
2465
2466    _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
2467
2468
2469    _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
2470
2471    _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
2472  };
2473
2474  const _disableOverFlow = () => {
2475    const actualValue = document.body.style.overflow;
2476
2477    if (actualValue) {
2478      Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
2479    }
2480
2481    document.body.style.overflow = 'hidden';
2482  };
2483
2484  const _setElementAttributes = (selector, styleProp, callback) => {
2485    const scrollbarWidth = getWidth();
2486    SelectorEngine.find(selector).forEach(element => {
2487      if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
2488        return;
2489      }
2490
2491      const actualValue = element.style[styleProp];
2492      const calculatedValue = window.getComputedStyle(element)[styleProp];
2493      Manipulator.setDataAttribute(element, styleProp, actualValue);
2494      element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
2495    });
2496  };
2497
2498  const reset = () => {
2499    _resetElementAttributes('body', 'overflow');
2500
2501    _resetElementAttributes('body', 'paddingRight');
2502
2503    _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
2504
2505    _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
2506  };
2507
2508  const _resetElementAttributes = (selector, styleProp) => {
2509    SelectorEngine.find(selector).forEach(element => {
2510      const value = Manipulator.getDataAttribute(element, styleProp);
2511
2512      if (typeof value === 'undefined') {
2513        element.style.removeProperty(styleProp);
2514      } else {
2515        Manipulator.removeDataAttribute(element, styleProp);
2516        element.style[styleProp] = value;
2517      }
2518    });
2519  };
2520
2521  /**
2522   * --------------------------------------------------------------------------
2523   * Bootstrap (v5.0.1): util/backdrop.js
2524   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2525   * --------------------------------------------------------------------------
2526   */
2527  const Default$6 = {
2528    isVisible: true,
2529    // if false, we use the backdrop helper without adding any element to the dom
2530    isAnimated: false,
2531    rootElement: document.body,
2532    // give the choice to place backdrop under different elements
2533    clickCallback: null
2534  };
2535  const DefaultType$6 = {
2536    isVisible: 'boolean',
2537    isAnimated: 'boolean',
2538    rootElement: 'element',
2539    clickCallback: '(function|null)'
2540  };
2541  const NAME$7 = 'backdrop';
2542  const CLASS_NAME_BACKDROP = 'modal-backdrop';
2543  const CLASS_NAME_FADE$5 = 'fade';
2544  const CLASS_NAME_SHOW$6 = 'show';
2545  const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
2546
2547  class Backdrop {
2548    constructor(config) {
2549      this._config = this._getConfig(config);
2550      this._isAppended = false;
2551      this._element = null;
2552    }
2553
2554    show(callback) {
2555      if (!this._config.isVisible) {
2556        execute(callback);
2557        return;
2558      }
2559
2560      this._append();
2561
2562      if (this._config.isAnimated) {
2563        reflow(this._getElement());
2564      }
2565
2566      this._getElement().classList.add(CLASS_NAME_SHOW$6);
2567
2568      this._emulateAnimation(() => {
2569        execute(callback);
2570      });
2571    }
2572
2573    hide(callback) {
2574      if (!this._config.isVisible) {
2575        execute(callback);
2576        return;
2577      }
2578
2579      this._getElement().classList.remove(CLASS_NAME_SHOW$6);
2580
2581      this._emulateAnimation(() => {
2582        this.dispose();
2583        execute(callback);
2584      });
2585    } // Private
2586
2587
2588    _getElement() {
2589      if (!this._element) {
2590        const backdrop = document.createElement('div');
2591        backdrop.className = CLASS_NAME_BACKDROP;
2592
2593        if (this._config.isAnimated) {
2594          backdrop.classList.add(CLASS_NAME_FADE$5);
2595        }
2596
2597        this._element = backdrop;
2598      }
2599
2600      return this._element;
2601    }
2602
2603    _getConfig(config) {
2604      config = { ...Default$6,
2605        ...(typeof config === 'object' ? config : {})
2606      };
2607      config.rootElement = config.rootElement || document.body;
2608      typeCheckConfig(NAME$7, config, DefaultType$6);
2609      return config;
2610    }
2611
2612    _append() {
2613      if (this._isAppended) {
2614        return;
2615      }
2616
2617      this._config.rootElement.appendChild(this._getElement());
2618
2619      EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
2620        execute(this._config.clickCallback);
2621      });
2622      this._isAppended = true;
2623    }
2624
2625    dispose() {
2626      if (!this._isAppended) {
2627        return;
2628      }
2629
2630      EventHandler.off(this._element, EVENT_MOUSEDOWN);
2631
2632      this._getElement().parentNode.removeChild(this._element);
2633
2634      this._isAppended = false;
2635    }
2636
2637    _emulateAnimation(callback) {
2638      if (!this._config.isAnimated) {
2639        execute(callback);
2640        return;
2641      }
2642
2643      const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
2644      EventHandler.one(this._getElement(), 'transitionend', () => execute(callback));
2645      emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
2646    }
2647
2648  }
2649
2650  /**
2651   * --------------------------------------------------------------------------
2652   * Bootstrap (v5.0.1): modal.js
2653   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2654   * --------------------------------------------------------------------------
2655   */
2656  /**
2657   * ------------------------------------------------------------------------
2658   * Constants
2659   * ------------------------------------------------------------------------
2660   */
2661
2662  const NAME$6 = 'modal';
2663  const DATA_KEY$6 = 'bs.modal';
2664  const EVENT_KEY$6 = `.${DATA_KEY$6}`;
2665  const DATA_API_KEY$3 = '.data-api';
2666  const ESCAPE_KEY$1 = 'Escape';
2667  const Default$5 = {
2668    backdrop: true,
2669    keyboard: true,
2670    focus: true
2671  };
2672  const DefaultType$5 = {
2673    backdrop: '(boolean|string)',
2674    keyboard: 'boolean',
2675    focus: 'boolean'
2676  };
2677  const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;
2678  const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
2679  const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
2680  const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
2681  const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
2682  const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
2683  const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
2684  const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
2685  const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
2686  const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
2687  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
2688  const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
2689  const CLASS_NAME_OPEN = 'modal-open';
2690  const CLASS_NAME_FADE$4 = 'fade';
2691  const CLASS_NAME_SHOW$5 = 'show';
2692  const CLASS_NAME_STATIC = 'modal-static';
2693  const SELECTOR_DIALOG = '.modal-dialog';
2694  const SELECTOR_MODAL_BODY = '.modal-body';
2695  const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
2696  const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
2697  /**
2698   * ------------------------------------------------------------------------
2699   * Class Definition
2700   * ------------------------------------------------------------------------
2701   */
2702
2703  class Modal extends BaseComponent {
2704    constructor(element, config) {
2705      super(element);
2706      this._config = this._getConfig(config);
2707      this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
2708      this._backdrop = this._initializeBackDrop();
2709      this._isShown = false;
2710      this._ignoreBackdropClick = false;
2711      this._isTransitioning = false;
2712    } // Getters
2713
2714
2715    static get Default() {
2716      return Default$5;
2717    }
2718
2719    static get NAME() {
2720      return NAME$6;
2721    } // Public
2722
2723
2724    toggle(relatedTarget) {
2725      return this._isShown ? this.hide() : this.show(relatedTarget);
2726    }
2727
2728    show(relatedTarget) {
2729      if (this._isShown || this._isTransitioning) {
2730        return;
2731      }
2732
2733      if (this._isAnimated()) {
2734        this._isTransitioning = true;
2735      }
2736
2737      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
2738        relatedTarget
2739      });
2740
2741      if (this._isShown || showEvent.defaultPrevented) {
2742        return;
2743      }
2744
2745      this._isShown = true;
2746      hide();
2747      document.body.classList.add(CLASS_NAME_OPEN);
2748
2749      this._adjustDialog();
2750
2751      this._setEscapeEvent();
2752
2753      this._setResizeEvent();
2754
2755      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
2756      EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
2757        EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
2758          if (event.target === this._element) {
2759            this._ignoreBackdropClick = true;
2760          }
2761        });
2762      });
2763
2764      this._showBackdrop(() => this._showElement(relatedTarget));
2765    }
2766
2767    hide(event) {
2768      if (event) {
2769        event.preventDefault();
2770      }
2771
2772      if (!this._isShown || this._isTransitioning) {
2773        return;
2774      }
2775
2776      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
2777
2778      if (hideEvent.defaultPrevented) {
2779        return;
2780      }
2781
2782      this._isShown = false;
2783
2784      const isAnimated = this._isAnimated();
2785
2786      if (isAnimated) {
2787        this._isTransitioning = true;
2788      }
2789
2790      this._setEscapeEvent();
2791
2792      this._setResizeEvent();
2793
2794      EventHandler.off(document, EVENT_FOCUSIN$2);
2795
2796      this._element.classList.remove(CLASS_NAME_SHOW$5);
2797
2798      EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
2799      EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
2800
2801      this._queueCallback(() => this._hideModal(), this._element, isAnimated);
2802    }
2803
2804    dispose() {
2805      [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
2806
2807      this._backdrop.dispose();
2808
2809      super.dispose();
2810      /**
2811       * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
2812       * Do not move `document` in `htmlElements` array
2813       * It will remove `EVENT_CLICK_DATA_API` event that should remain
2814       */
2815
2816      EventHandler.off(document, EVENT_FOCUSIN$2);
2817    }
2818
2819    handleUpdate() {
2820      this._adjustDialog();
2821    } // Private
2822
2823
2824    _initializeBackDrop() {
2825      return new Backdrop({
2826        isVisible: Boolean(this._config.backdrop),
2827        // 'static' option will be translated to true, and booleans will keep their value
2828        isAnimated: this._isAnimated()
2829      });
2830    }
2831
2832    _getConfig(config) {
2833      config = { ...Default$5,
2834        ...Manipulator.getDataAttributes(this._element),
2835        ...config
2836      };
2837      typeCheckConfig(NAME$6, config, DefaultType$5);
2838      return config;
2839    }
2840
2841    _showElement(relatedTarget) {
2842      const isAnimated = this._isAnimated();
2843
2844      const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2845
2846      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2847        // Don't move modal's DOM position
2848        document.body.appendChild(this._element);
2849      }
2850
2851      this._element.style.display = 'block';
2852
2853      this._element.removeAttribute('aria-hidden');
2854
2855      this._element.setAttribute('aria-modal', true);
2856
2857      this._element.setAttribute('role', 'dialog');
2858
2859      this._element.scrollTop = 0;
2860
2861      if (modalBody) {
2862        modalBody.scrollTop = 0;
2863      }
2864
2865      if (isAnimated) {
2866        reflow(this._element);
2867      }
2868
2869      this._element.classList.add(CLASS_NAME_SHOW$5);
2870
2871      if (this._config.focus) {
2872        this._enforceFocus();
2873      }
2874
2875      const transitionComplete = () => {
2876        if (this._config.focus) {
2877          this._element.focus();
2878        }
2879
2880        this._isTransitioning = false;
2881        EventHandler.trigger(this._element, EVENT_SHOWN$3, {
2882          relatedTarget
2883        });
2884      };
2885
2886      this._queueCallback(transitionComplete, this._dialog, isAnimated);
2887    }
2888
2889    _enforceFocus() {
2890      EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
2891
2892      EventHandler.on(document, EVENT_FOCUSIN$2, event => {
2893        if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
2894          this._element.focus();
2895        }
2896      });
2897    }
2898
2899    _setEscapeEvent() {
2900      if (this._isShown) {
2901        EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
2902          if (this._config.keyboard && event.key === ESCAPE_KEY$1) {
2903            event.preventDefault();
2904            this.hide();
2905          } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {
2906            this._triggerBackdropTransition();
2907          }
2908        });
2909      } else {
2910        EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
2911      }
2912    }
2913
2914    _setResizeEvent() {
2915      if (this._isShown) {
2916        EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());
2917      } else {
2918        EventHandler.off(window, EVENT_RESIZE);
2919      }
2920    }
2921
2922    _hideModal() {
2923      this._element.style.display = 'none';
2924
2925      this._element.setAttribute('aria-hidden', true);
2926
2927      this._element.removeAttribute('aria-modal');
2928
2929      this._element.removeAttribute('role');
2930
2931      this._isTransitioning = false;
2932
2933      this._backdrop.hide(() => {
2934        document.body.classList.remove(CLASS_NAME_OPEN);
2935
2936        this._resetAdjustments();
2937
2938        reset();
2939        EventHandler.trigger(this._element, EVENT_HIDDEN$3);
2940      });
2941    }
2942
2943    _showBackdrop(callback) {
2944      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
2945        if (this._ignoreBackdropClick) {
2946          this._ignoreBackdropClick = false;
2947          return;
2948        }
2949
2950        if (event.target !== event.currentTarget) {
2951          return;
2952        }
2953
2954        if (this._config.backdrop === true) {
2955          this.hide();
2956        } else if (this._config.backdrop === 'static') {
2957          this._triggerBackdropTransition();
2958        }
2959      });
2960
2961      this._backdrop.show(callback);
2962    }
2963
2964    _isAnimated() {
2965      return this._element.classList.contains(CLASS_NAME_FADE$4);
2966    }
2967
2968    _triggerBackdropTransition() {
2969      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2970
2971      if (hideEvent.defaultPrevented) {
2972        return;
2973      }
2974
2975      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2976
2977      if (!isModalOverflowing) {
2978        this._element.style.overflowY = 'hidden';
2979      }
2980
2981      this._element.classList.add(CLASS_NAME_STATIC);
2982
2983      const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
2984      EventHandler.off(this._element, 'transitionend');
2985      EventHandler.one(this._element, 'transitionend', () => {
2986        this._element.classList.remove(CLASS_NAME_STATIC);
2987
2988        if (!isModalOverflowing) {
2989          EventHandler.one(this._element, 'transitionend', () => {
2990            this._element.style.overflowY = '';
2991          });
2992          emulateTransitionEnd(this._element, modalTransitionDuration);
2993        }
2994      });
2995      emulateTransitionEnd(this._element, modalTransitionDuration);
2996
2997      this._element.focus();
2998    } // ----------------------------------------------------------------------
2999    // the following methods are used to handle overflowing modals
3000    // ----------------------------------------------------------------------
3001
3002
3003    _adjustDialog() {
3004      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
3005      const scrollbarWidth = getWidth();
3006      const isBodyOverflowing = scrollbarWidth > 0;
3007
3008      if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
3009        this._element.style.paddingLeft = `${scrollbarWidth}px`;
3010      }
3011
3012      if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
3013        this._element.style.paddingRight = `${scrollbarWidth}px`;
3014      }
3015    }
3016
3017    _resetAdjustments() {
3018      this._element.style.paddingLeft = '';
3019      this._element.style.paddingRight = '';
3020    } // Static
3021
3022
3023    static jQueryInterface(config, relatedTarget) {
3024      return this.each(function () {
3025        const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
3026
3027        if (typeof config !== 'string') {
3028          return;
3029        }
3030
3031        if (typeof data[config] === 'undefined') {
3032          throw new TypeError(`No method named "${config}"`);
3033        }
3034
3035        data[config](relatedTarget);
3036      });
3037    }
3038
3039  }
3040  /**
3041   * ------------------------------------------------------------------------
3042   * Data Api implementation
3043   * ------------------------------------------------------------------------
3044   */
3045
3046
3047  EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
3048    const target = getElementFromSelector(this);
3049
3050    if (['A', 'AREA'].includes(this.tagName)) {
3051      event.preventDefault();
3052    }
3053
3054    EventHandler.one(target, EVENT_SHOW$3, showEvent => {
3055      if (showEvent.defaultPrevented) {
3056        // only register focus restorer if modal will actually get shown
3057        return;
3058      }
3059
3060      EventHandler.one(target, EVENT_HIDDEN$3, () => {
3061        if (isVisible(this)) {
3062          this.focus();
3063        }
3064      });
3065    });
3066    const data = Modal.getInstance(target) || new Modal(target);
3067    data.toggle(this);
3068  });
3069  /**
3070   * ------------------------------------------------------------------------
3071   * jQuery
3072   * ------------------------------------------------------------------------
3073   * add .Modal to jQuery only if jQuery is present
3074   */
3075
3076  defineJQueryPlugin(Modal);
3077
3078  /**
3079   * --------------------------------------------------------------------------
3080   * Bootstrap (v5.0.1): offcanvas.js
3081   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3082   * --------------------------------------------------------------------------
3083   */
3084  /**
3085   * ------------------------------------------------------------------------
3086   * Constants
3087   * ------------------------------------------------------------------------
3088   */
3089
3090  const NAME$5 = 'offcanvas';
3091  const DATA_KEY$5 = 'bs.offcanvas';
3092  const EVENT_KEY$5 = `.${DATA_KEY$5}`;
3093  const DATA_API_KEY$2 = '.data-api';
3094  const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;
3095  const ESCAPE_KEY = 'Escape';
3096  const Default$4 = {
3097    backdrop: true,
3098    keyboard: true,
3099    scroll: false
3100  };
3101  const DefaultType$4 = {
3102    backdrop: 'boolean',
3103    keyboard: 'boolean',
3104    scroll: 'boolean'
3105  };
3106  const CLASS_NAME_SHOW$4 = 'show';
3107  const OPEN_SELECTOR = '.offcanvas.show';
3108  const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
3109  const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
3110  const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
3111  const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
3112  const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
3113  const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
3114  const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
3115  const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
3116  const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
3117  const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
3118  /**
3119   * ------------------------------------------------------------------------
3120   * Class Definition
3121   * ------------------------------------------------------------------------
3122   */
3123
3124  class Offcanvas extends BaseComponent {
3125    constructor(element, config) {
3126      super(element);
3127      this._config = this._getConfig(config);
3128      this._isShown = false;
3129      this._backdrop = this._initializeBackDrop();
3130
3131      this._addEventListeners();
3132    } // Getters
3133
3134
3135    static get NAME() {
3136      return NAME$5;
3137    }
3138
3139    static get Default() {
3140      return Default$4;
3141    } // Public
3142
3143
3144    toggle(relatedTarget) {
3145      return this._isShown ? this.hide() : this.show(relatedTarget);
3146    }
3147
3148    show(relatedTarget) {
3149      if (this._isShown) {
3150        return;
3151      }
3152
3153      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
3154        relatedTarget
3155      });
3156
3157      if (showEvent.defaultPrevented) {
3158        return;
3159      }
3160
3161      this._isShown = true;
3162      this._element.style.visibility = 'visible';
3163
3164      this._backdrop.show();
3165
3166      if (!this._config.scroll) {
3167        hide();
3168
3169        this._enforceFocusOnElement(this._element);
3170      }
3171
3172      this._element.removeAttribute('aria-hidden');
3173
3174      this._element.setAttribute('aria-modal', true);
3175
3176      this._element.setAttribute('role', 'dialog');
3177
3178      this._element.classList.add(CLASS_NAME_SHOW$4);
3179
3180      const completeCallBack = () => {
3181        EventHandler.trigger(this._element, EVENT_SHOWN$2, {
3182          relatedTarget
3183        });
3184      };
3185
3186      this._queueCallback(completeCallBack, this._element, true);
3187    }
3188
3189    hide() {
3190      if (!this._isShown) {
3191        return;
3192      }
3193
3194      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
3195
3196      if (hideEvent.defaultPrevented) {
3197        return;
3198      }
3199
3200      EventHandler.off(document, EVENT_FOCUSIN$1);
3201
3202      this._element.blur();
3203
3204      this._isShown = false;
3205
3206      this._element.classList.remove(CLASS_NAME_SHOW$4);
3207
3208      this._backdrop.hide();
3209
3210      const completeCallback = () => {
3211        this._element.setAttribute('aria-hidden', true);
3212
3213        this._element.removeAttribute('aria-modal');
3214
3215        this._element.removeAttribute('role');
3216
3217        this._element.style.visibility = 'hidden';
3218
3219        if (!this._config.scroll) {
3220          reset();
3221        }
3222
3223        EventHandler.trigger(this._element, EVENT_HIDDEN$2);
3224      };
3225
3226      this._queueCallback(completeCallback, this._element, true);
3227    }
3228
3229    dispose() {
3230      this._backdrop.dispose();
3231
3232      super.dispose();
3233      EventHandler.off(document, EVENT_FOCUSIN$1);
3234    } // Private
3235
3236
3237    _getConfig(config) {
3238      config = { ...Default$4,
3239        ...Manipulator.getDataAttributes(this._element),
3240        ...(typeof config === 'object' ? config : {})
3241      };
3242      typeCheckConfig(NAME$5, config, DefaultType$4);
3243      return config;
3244    }
3245
3246    _initializeBackDrop() {
3247      return new Backdrop({
3248        isVisible: this._config.backdrop,
3249        isAnimated: true,
3250        rootElement: this._element.parentNode,
3251        clickCallback: () => this.hide()
3252      });
3253    }
3254
3255    _enforceFocusOnElement(element) {
3256      EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
3257
3258      EventHandler.on(document, EVENT_FOCUSIN$1, event => {
3259        if (document !== event.target && element !== event.target && !element.contains(event.target)) {
3260          element.focus();
3261        }
3262      });
3263      element.focus();
3264    }
3265
3266    _addEventListeners() {
3267      EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
3268      EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
3269        if (this._config.keyboard && event.key === ESCAPE_KEY) {
3270          this.hide();
3271        }
3272      });
3273    } // Static
3274
3275
3276    static jQueryInterface(config) {
3277      return this.each(function () {
3278        const data = Data.get(this, DATA_KEY$5) || new Offcanvas(this, typeof config === 'object' ? config : {});
3279
3280        if (typeof config !== 'string') {
3281          return;
3282        }
3283
3284        if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
3285          throw new TypeError(`No method named "${config}"`);
3286        }
3287
3288        data[config](this);
3289      });
3290    }
3291
3292  }
3293  /**
3294   * ------------------------------------------------------------------------
3295   * Data Api implementation
3296   * ------------------------------------------------------------------------
3297   */
3298
3299
3300  EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
3301    const target = getElementFromSelector(this);
3302
3303    if (['A', 'AREA'].includes(this.tagName)) {
3304      event.preventDefault();
3305    }
3306
3307    if (isDisabled(this)) {
3308      return;
3309    }
3310
3311    EventHandler.one(target, EVENT_HIDDEN$2, () => {
3312      // focus on trigger when it is closed
3313      if (isVisible(this)) {
3314        this.focus();
3315      }
3316    }); // avoid conflict when clicking a toggler of an offcanvas, while another is open
3317
3318    const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
3319
3320    if (allReadyOpen && allReadyOpen !== target) {
3321      Offcanvas.getInstance(allReadyOpen).hide();
3322    }
3323
3324    const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);
3325    data.toggle(this);
3326  });
3327  EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
3328    SelectorEngine.find(OPEN_SELECTOR).forEach(el => (Data.get(el, DATA_KEY$5) || new Offcanvas(el)).show());
3329  });
3330  /**
3331   * ------------------------------------------------------------------------
3332   * jQuery
3333   * ------------------------------------------------------------------------
3334   */
3335
3336  defineJQueryPlugin(Offcanvas);
3337
3338  /**
3339   * --------------------------------------------------------------------------
3340   * Bootstrap (v5.0.1): util/sanitizer.js
3341   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3342   * --------------------------------------------------------------------------
3343   */
3344  const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3345  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3346  /**
3347   * A pattern that recognizes a commonly useful subset of URLs that are safe.
3348   *
3349   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
3350   */
3351
3352  const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
3353  /**
3354   * A pattern that matches safe data URLs. Only matches image, video and audio types.
3355   *
3356   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
3357   */
3358
3359  const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
3360
3361  const allowedAttribute = (attr, allowedAttributeList) => {
3362    const attrName = attr.nodeName.toLowerCase();
3363
3364    if (allowedAttributeList.includes(attrName)) {
3365      if (uriAttrs.has(attrName)) {
3366        return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
3367      }
3368
3369      return true;
3370    }
3371
3372    const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
3373
3374    for (let i = 0, len = regExp.length; i < len; i++) {
3375      if (regExp[i].test(attrName)) {
3376        return true;
3377      }
3378    }
3379
3380    return false;
3381  };
3382
3383  const DefaultAllowlist = {
3384    // Global attributes allowed on any supplied element below.
3385    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
3386    a: ['target', 'href', 'title', 'rel'],
3387    area: [],
3388    b: [],
3389    br: [],
3390    col: [],
3391    code: [],
3392    div: [],
3393    em: [],
3394    hr: [],
3395    h1: [],
3396    h2: [],
3397    h3: [],
3398    h4: [],
3399    h5: [],
3400    h6: [],
3401    i: [],
3402    img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
3403    li: [],
3404    ol: [],
3405    p: [],
3406    pre: [],
3407    s: [],
3408    small: [],
3409    span: [],
3410    sub: [],
3411    sup: [],
3412    strong: [],
3413    u: [],
3414    ul: []
3415  };
3416  function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
3417    if (!unsafeHtml.length) {
3418      return unsafeHtml;
3419    }
3420
3421    if (sanitizeFn && typeof sanitizeFn === 'function') {
3422      return sanitizeFn(unsafeHtml);
3423    }
3424
3425    const domParser = new window.DOMParser();
3426    const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3427    const allowlistKeys = Object.keys(allowList);
3428    const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
3429
3430    for (let i = 0, len = elements.length; i < len; i++) {
3431      const el = elements[i];
3432      const elName = el.nodeName.toLowerCase();
3433
3434      if (!allowlistKeys.includes(elName)) {
3435        el.parentNode.removeChild(el);
3436        continue;
3437      }
3438
3439      const attributeList = [].concat(...el.attributes);
3440      const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
3441      attributeList.forEach(attr => {
3442        if (!allowedAttribute(attr, allowedAttributes)) {
3443          el.removeAttribute(attr.nodeName);
3444        }
3445      });
3446    }
3447
3448    return createdDocument.body.innerHTML;
3449  }
3450
3451  /**
3452   * --------------------------------------------------------------------------
3453   * Bootstrap (v5.0.1): tooltip.js
3454   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3455   * --------------------------------------------------------------------------
3456   */
3457  /**
3458   * ------------------------------------------------------------------------
3459   * Constants
3460   * ------------------------------------------------------------------------
3461   */
3462
3463  const NAME$4 = 'tooltip';
3464  const DATA_KEY$4 = 'bs.tooltip';
3465  const EVENT_KEY$4 = `.${DATA_KEY$4}`;
3466  const CLASS_PREFIX$1 = 'bs-tooltip';
3467  const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
3468  const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3469  const DefaultType$3 = {
3470    animation: 'boolean',
3471    template: 'string',
3472    title: '(string|element|function)',
3473    trigger: 'string',
3474    delay: '(number|object)',
3475    html: 'boolean',
3476    selector: '(string|boolean)',
3477    placement: '(string|function)',
3478    offset: '(array|string|function)',
3479    container: '(string|element|boolean)',
3480    fallbackPlacements: 'array',
3481    boundary: '(string|element)',
3482    customClass: '(string|function)',
3483    sanitize: 'boolean',
3484    sanitizeFn: '(null|function)',
3485    allowList: 'object',
3486    popperConfig: '(null|object|function)'
3487  };
3488  const AttachmentMap = {
3489    AUTO: 'auto',
3490    TOP: 'top',
3491    RIGHT: isRTL() ? 'left' : 'right',
3492    BOTTOM: 'bottom',
3493    LEFT: isRTL() ? 'right' : 'left'
3494  };
3495  const Default$3 = {
3496    animation: true,
3497    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3498    trigger: 'hover focus',
3499    title: '',
3500    delay: 0,
3501    html: false,
3502    selector: false,
3503    placement: 'top',
3504    offset: [0, 0],
3505    container: false,
3506    fallbackPlacements: ['top', 'right', 'bottom', 'left'],
3507    boundary: 'clippingParents',
3508    customClass: '',
3509    sanitize: true,
3510    sanitizeFn: null,
3511    allowList: DefaultAllowlist,
3512    popperConfig: null
3513  };
3514  const Event$2 = {
3515    HIDE: `hide${EVENT_KEY$4}`,
3516    HIDDEN: `hidden${EVENT_KEY$4}`,
3517    SHOW: `show${EVENT_KEY$4}`,
3518    SHOWN: `shown${EVENT_KEY$4}`,
3519    INSERTED: `inserted${EVENT_KEY$4}`,
3520    CLICK: `click${EVENT_KEY$4}`,
3521    FOCUSIN: `focusin${EVENT_KEY$4}`,
3522    FOCUSOUT: `focusout${EVENT_KEY$4}`,
3523    MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
3524    MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
3525  };
3526  const CLASS_NAME_FADE$3 = 'fade';
3527  const CLASS_NAME_MODAL = 'modal';
3528  const CLASS_NAME_SHOW$3 = 'show';
3529  const HOVER_STATE_SHOW = 'show';
3530  const HOVER_STATE_OUT = 'out';
3531  const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3532  const TRIGGER_HOVER = 'hover';
3533  const TRIGGER_FOCUS = 'focus';
3534  const TRIGGER_CLICK = 'click';
3535  const TRIGGER_MANUAL = 'manual';
3536  /**
3537   * ------------------------------------------------------------------------
3538   * Class Definition
3539   * ------------------------------------------------------------------------
3540   */
3541
3542  class Tooltip extends BaseComponent {
3543    constructor(element, config) {
3544      if (typeof Popper__namespace === 'undefined') {
3545        throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
3546      }
3547
3548      super(element); // private
3549
3550      this._isEnabled = true;
3551      this._timeout = 0;
3552      this._hoverState = '';
3553      this._activeTrigger = {};
3554      this._popper = null; // Protected
3555
3556      this._config = this._getConfig(config);
3557      this.tip = null;
3558
3559      this._setListeners();
3560    } // Getters
3561
3562
3563    static get Default() {
3564      return Default$3;
3565    }
3566
3567    static get NAME() {
3568      return NAME$4;
3569    }
3570
3571    static get Event() {
3572      return Event$2;
3573    }
3574
3575    static get DefaultType() {
3576      return DefaultType$3;
3577    } // Public
3578
3579
3580    enable() {
3581      this._isEnabled = true;
3582    }
3583
3584    disable() {
3585      this._isEnabled = false;
3586    }
3587
3588    toggleEnabled() {
3589      this._isEnabled = !this._isEnabled;
3590    }
3591
3592    toggle(event) {
3593      if (!this._isEnabled) {
3594        return;
3595      }
3596
3597      if (event) {
3598        const context = this._initializeOnDelegatedTarget(event);
3599
3600        context._activeTrigger.click = !context._activeTrigger.click;
3601
3602        if (context._isWithActiveTrigger()) {
3603          context._enter(null, context);
3604        } else {
3605          context._leave(null, context);
3606        }
3607      } else {
3608        if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
3609          this._leave(null, this);
3610
3611          return;
3612        }
3613
3614        this._enter(null, this);
3615      }
3616    }
3617
3618    dispose() {
3619      clearTimeout(this._timeout);
3620      EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
3621
3622      if (this.tip && this.tip.parentNode) {
3623        this.tip.parentNode.removeChild(this.tip);
3624      }
3625
3626      if (this._popper) {
3627        this._popper.destroy();
3628      }
3629
3630      super.dispose();
3631    }
3632
3633    show() {
3634      if (this._element.style.display === 'none') {
3635        throw new Error('Please use show on visible elements');
3636      }
3637
3638      if (!(this.isWithContent() && this._isEnabled)) {
3639        return;
3640      }
3641
3642      const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
3643      const shadowRoot = findShadowRoot(this._element);
3644      const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
3645
3646      if (showEvent.defaultPrevented || !isInTheDom) {
3647        return;
3648      }
3649
3650      const tip = this.getTipElement();
3651      const tipId = getUID(this.constructor.NAME);
3652      tip.setAttribute('id', tipId);
3653
3654      this._element.setAttribute('aria-describedby', tipId);
3655
3656      this.setContent();
3657
3658      if (this._config.animation) {
3659        tip.classList.add(CLASS_NAME_FADE$3);
3660      }
3661
3662      const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
3663
3664      const attachment = this._getAttachment(placement);
3665
3666      this._addAttachmentClass(attachment);
3667
3668      const {
3669        container
3670      } = this._config;
3671      Data.set(tip, this.constructor.DATA_KEY, this);
3672
3673      if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3674        container.appendChild(tip);
3675        EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
3676      }
3677
3678      if (this._popper) {
3679        this._popper.update();
3680      } else {
3681        this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
3682      }
3683
3684      tip.classList.add(CLASS_NAME_SHOW$3);
3685      const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
3686
3687      if (customClass) {
3688        tip.classList.add(...customClass.split(' '));
3689      } // If this is a touch-enabled device we add extra
3690      // empty mouseover listeners to the body's immediate children;
3691      // only needed because of broken event delegation on iOS
3692      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3693
3694
3695      if ('ontouchstart' in document.documentElement) {
3696        [].concat(...document.body.children).forEach(element => {
3697          EventHandler.on(element, 'mouseover', noop);
3698        });
3699      }
3700
3701      const complete = () => {
3702        const prevHoverState = this._hoverState;
3703        this._hoverState = null;
3704        EventHandler.trigger(this._element, this.constructor.Event.SHOWN);
3705
3706        if (prevHoverState === HOVER_STATE_OUT) {
3707          this._leave(null, this);
3708        }
3709      };
3710
3711      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
3712
3713      this._queueCallback(complete, this.tip, isAnimated);
3714    }
3715
3716    hide() {
3717      if (!this._popper) {
3718        return;
3719      }
3720
3721      const tip = this.getTipElement();
3722
3723      const complete = () => {
3724        if (this._isWithActiveTrigger()) {
3725          return;
3726        }
3727
3728        if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3729          tip.parentNode.removeChild(tip);
3730        }
3731
3732        this._cleanTipClass();
3733
3734        this._element.removeAttribute('aria-describedby');
3735
3736        EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
3737
3738        if (this._popper) {
3739          this._popper.destroy();
3740
3741          this._popper = null;
3742        }
3743      };
3744
3745      const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
3746
3747      if (hideEvent.defaultPrevented) {
3748        return;
3749      }
3750
3751      tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
3752      // empty mouseover listeners we added for iOS support
3753
3754      if ('ontouchstart' in document.documentElement) {
3755        [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));
3756      }
3757
3758      this._activeTrigger[TRIGGER_CLICK] = false;
3759      this._activeTrigger[TRIGGER_FOCUS] = false;
3760      this._activeTrigger[TRIGGER_HOVER] = false;
3761      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
3762
3763      this._queueCallback(complete, this.tip, isAnimated);
3764
3765      this._hoverState = '';
3766    }
3767
3768    update() {
3769      if (this._popper !== null) {
3770        this._popper.update();
3771      }
3772    } // Protected
3773
3774
3775    isWithContent() {
3776      return Boolean(this.getTitle());
3777    }
3778
3779    getTipElement() {
3780      if (this.tip) {
3781        return this.tip;
3782      }
3783
3784      const element = document.createElement('div');
3785      element.innerHTML = this._config.template;
3786      this.tip = element.children[0];
3787      return this.tip;
3788    }
3789
3790    setContent() {
3791      const tip = this.getTipElement();
3792      this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
3793      tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
3794    }
3795
3796    setElementContent(element, content) {
3797      if (element === null) {
3798        return;
3799      }
3800
3801      if (isElement(content)) {
3802        content = getElement(content); // content is a DOM node or a jQuery
3803
3804        if (this._config.html) {
3805          if (content.parentNode !== element) {
3806            element.innerHTML = '';
3807            element.appendChild(content);
3808          }
3809        } else {
3810          element.textContent = content.textContent;
3811        }
3812
3813        return;
3814      }
3815
3816      if (this._config.html) {
3817        if (this._config.sanitize) {
3818          content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
3819        }
3820
3821        element.innerHTML = content;
3822      } else {
3823        element.textContent = content;
3824      }
3825    }
3826
3827    getTitle() {
3828      let title = this._element.getAttribute('data-bs-original-title');
3829
3830      if (!title) {
3831        title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
3832      }
3833
3834      return title;
3835    }
3836
3837    updateAttachment(attachment) {
3838      if (attachment === 'right') {
3839        return 'end';
3840      }
3841
3842      if (attachment === 'left') {
3843        return 'start';
3844      }
3845
3846      return attachment;
3847    } // Private
3848
3849
3850    _initializeOnDelegatedTarget(event, context) {
3851      const dataKey = this.constructor.DATA_KEY;
3852      context = context || Data.get(event.delegateTarget, dataKey);
3853
3854      if (!context) {
3855        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3856        Data.set(event.delegateTarget, dataKey, context);
3857      }
3858
3859      return context;
3860    }
3861
3862    _getOffset() {
3863      const {
3864        offset
3865      } = this._config;
3866
3867      if (typeof offset === 'string') {
3868        return offset.split(',').map(val => Number.parseInt(val, 10));
3869      }
3870
3871      if (typeof offset === 'function') {
3872        return popperData => offset(popperData, this._element);
3873      }
3874
3875      return offset;
3876    }
3877
3878    _getPopperConfig(attachment) {
3879      const defaultBsPopperConfig = {
3880        placement: attachment,
3881        modifiers: [{
3882          name: 'flip',
3883          options: {
3884            fallbackPlacements: this._config.fallbackPlacements
3885          }
3886        }, {
3887          name: 'offset',
3888          options: {
3889            offset: this._getOffset()
3890          }
3891        }, {
3892          name: 'preventOverflow',
3893          options: {
3894            boundary: this._config.boundary
3895          }
3896        }, {
3897          name: 'arrow',
3898          options: {
3899            element: `.${this.constructor.NAME}-arrow`
3900          }
3901        }, {
3902          name: 'onChange',
3903          enabled: true,
3904          phase: 'afterWrite',
3905          fn: data => this._handlePopperPlacementChange(data)
3906        }],
3907        onFirstUpdate: data => {
3908          if (data.options.placement !== data.placement) {
3909            this._handlePopperPlacementChange(data);
3910          }
3911        }
3912      };
3913      return { ...defaultBsPopperConfig,
3914        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
3915      };
3916    }
3917
3918    _addAttachmentClass(attachment) {
3919      this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
3920    }
3921
3922    _getAttachment(placement) {
3923      return AttachmentMap[placement.toUpperCase()];
3924    }
3925
3926    _setListeners() {
3927      const triggers = this._config.trigger.split(' ');
3928
3929      triggers.forEach(trigger => {
3930        if (trigger === 'click') {
3931          EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
3932        } else if (trigger !== TRIGGER_MANUAL) {
3933          const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
3934          const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
3935          EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
3936          EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
3937        }
3938      });
3939
3940      this._hideModalHandler = () => {
3941        if (this._element) {
3942          this.hide();
3943        }
3944      };
3945
3946      EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
3947
3948      if (this._config.selector) {
3949        this._config = { ...this._config,
3950          trigger: 'manual',
3951          selector: ''
3952        };
3953      } else {
3954        this._fixTitle();
3955      }
3956    }
3957
3958    _fixTitle() {
3959      const title = this._element.getAttribute('title');
3960
3961      const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
3962
3963      if (title || originalTitleType !== 'string') {
3964        this._element.setAttribute('data-bs-original-title', title || '');
3965
3966        if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
3967          this._element.setAttribute('aria-label', title);
3968        }
3969
3970        this._element.setAttribute('title', '');
3971      }
3972    }
3973
3974    _enter(event, context) {
3975      context = this._initializeOnDelegatedTarget(event, context);
3976
3977      if (event) {
3978        context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3979      }
3980
3981      if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
3982        context._hoverState = HOVER_STATE_SHOW;
3983        return;
3984      }
3985
3986      clearTimeout(context._timeout);
3987      context._hoverState = HOVER_STATE_SHOW;
3988
3989      if (!context._config.delay || !context._config.delay.show) {
3990        context.show();
3991        return;
3992      }
3993
3994      context._timeout = setTimeout(() => {
3995        if (context._hoverState === HOVER_STATE_SHOW) {
3996          context.show();
3997        }
3998      }, context._config.delay.show);
3999    }
4000
4001    _leave(event, context) {
4002      context = this._initializeOnDelegatedTarget(event, context);
4003
4004      if (event) {
4005        context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
4006      }
4007
4008      if (context._isWithActiveTrigger()) {
4009        return;
4010      }
4011
4012      clearTimeout(context._timeout);
4013      context._hoverState = HOVER_STATE_OUT;
4014
4015      if (!context._config.delay || !context._config.delay.hide) {
4016        context.hide();
4017        return;
4018      }
4019
4020      context._timeout = setTimeout(() => {
4021        if (context._hoverState === HOVER_STATE_OUT) {
4022          context.hide();
4023        }
4024      }, context._config.delay.hide);
4025    }
4026
4027    _isWithActiveTrigger() {
4028      for (const trigger in this._activeTrigger) {
4029        if (this._activeTrigger[trigger]) {
4030          return true;
4031        }
4032      }
4033
4034      return false;
4035    }
4036
4037    _getConfig(config) {
4038      const dataAttributes = Manipulator.getDataAttributes(this._element);
4039      Object.keys(dataAttributes).forEach(dataAttr => {
4040        if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
4041          delete dataAttributes[dataAttr];
4042        }
4043      });
4044      config = { ...this.constructor.Default,
4045        ...dataAttributes,
4046        ...(typeof config === 'object' && config ? config : {})
4047      };
4048      config.container = config.container === false ? document.body : getElement(config.container);
4049
4050      if (typeof config.delay === 'number') {
4051        config.delay = {
4052          show: config.delay,
4053          hide: config.delay
4054        };
4055      }
4056
4057      if (typeof config.title === 'number') {
4058        config.title = config.title.toString();
4059      }
4060
4061      if (typeof config.content === 'number') {
4062        config.content = config.content.toString();
4063      }
4064
4065      typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
4066
4067      if (config.sanitize) {
4068        config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
4069      }
4070
4071      return config;
4072    }
4073
4074    _getDelegateConfig() {
4075      const config = {};
4076
4077      if (this._config) {
4078        for (const key in this._config) {
4079          if (this.constructor.Default[key] !== this._config[key]) {
4080            config[key] = this._config[key];
4081          }
4082        }
4083      }
4084
4085      return config;
4086    }
4087
4088    _cleanTipClass() {
4089      const tip = this.getTipElement();
4090      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
4091
4092      if (tabClass !== null && tabClass.length > 0) {
4093        tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
4094      }
4095    }
4096
4097    _handlePopperPlacementChange(popperData) {
4098      const {
4099        state
4100      } = popperData;
4101
4102      if (!state) {
4103        return;
4104      }
4105
4106      this.tip = state.elements.popper;
4107
4108      this._cleanTipClass();
4109
4110      this._addAttachmentClass(this._getAttachment(state.placement));
4111    } // Static
4112
4113
4114    static jQueryInterface(config) {
4115      return this.each(function () {
4116        let data = Data.get(this, DATA_KEY$4);
4117
4118        const _config = typeof config === 'object' && config;
4119
4120        if (!data && /dispose|hide/.test(config)) {
4121          return;
4122        }
4123
4124        if (!data) {
4125          data = new Tooltip(this, _config);
4126        }
4127
4128        if (typeof config === 'string') {
4129          if (typeof data[config] === 'undefined') {
4130            throw new TypeError(`No method named "${config}"`);
4131          }
4132
4133          data[config]();
4134        }
4135      });
4136    }
4137
4138  }
4139  /**
4140   * ------------------------------------------------------------------------
4141   * jQuery
4142   * ------------------------------------------------------------------------
4143   * add .Tooltip to jQuery only if jQuery is present
4144   */
4145
4146
4147  defineJQueryPlugin(Tooltip);
4148
4149  /**
4150   * --------------------------------------------------------------------------
4151   * Bootstrap (v5.0.1): popover.js
4152   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4153   * --------------------------------------------------------------------------
4154   */
4155  /**
4156   * ------------------------------------------------------------------------
4157   * Constants
4158   * ------------------------------------------------------------------------
4159   */
4160
4161  const NAME$3 = 'popover';
4162  const DATA_KEY$3 = 'bs.popover';
4163  const EVENT_KEY$3 = `.${DATA_KEY$3}`;
4164  const CLASS_PREFIX = 'bs-popover';
4165  const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
4166  const Default$2 = { ...Tooltip.Default,
4167    placement: 'right',
4168    offset: [0, 8],
4169    trigger: 'click',
4170    content: '',
4171    template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
4172  };
4173  const DefaultType$2 = { ...Tooltip.DefaultType,
4174    content: '(string|element|function)'
4175  };
4176  const Event$1 = {
4177    HIDE: `hide${EVENT_KEY$3}`,
4178    HIDDEN: `hidden${EVENT_KEY$3}`,
4179    SHOW: `show${EVENT_KEY$3}`,
4180    SHOWN: `shown${EVENT_KEY$3}`,
4181    INSERTED: `inserted${EVENT_KEY$3}`,
4182    CLICK: `click${EVENT_KEY$3}`,
4183    FOCUSIN: `focusin${EVENT_KEY$3}`,
4184    FOCUSOUT: `focusout${EVENT_KEY$3}`,
4185    MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
4186    MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
4187  };
4188  const CLASS_NAME_FADE$2 = 'fade';
4189  const CLASS_NAME_SHOW$2 = 'show';
4190  const SELECTOR_TITLE = '.popover-header';
4191  const SELECTOR_CONTENT = '.popover-body';
4192  /**
4193   * ------------------------------------------------------------------------
4194   * Class Definition
4195   * ------------------------------------------------------------------------
4196   */
4197
4198  class Popover extends Tooltip {
4199    // Getters
4200    static get Default() {
4201      return Default$2;
4202    }
4203
4204    static get NAME() {
4205      return NAME$3;
4206    }
4207
4208    static get Event() {
4209      return Event$1;
4210    }
4211
4212    static get DefaultType() {
4213      return DefaultType$2;
4214    } // Overrides
4215
4216
4217    isWithContent() {
4218      return this.getTitle() || this._getContent();
4219    }
4220
4221    setContent() {
4222      const tip = this.getTipElement(); // we use append for html objects to maintain js events
4223
4224      this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
4225
4226      let content = this._getContent();
4227
4228      if (typeof content === 'function') {
4229        content = content.call(this._element);
4230      }
4231
4232      this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
4233      tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
4234    } // Private
4235
4236
4237    _addAttachmentClass(attachment) {
4238      this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
4239    }
4240
4241    _getContent() {
4242      return this._element.getAttribute('data-bs-content') || this._config.content;
4243    }
4244
4245    _cleanTipClass() {
4246      const tip = this.getTipElement();
4247      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
4248
4249      if (tabClass !== null && tabClass.length > 0) {
4250        tabClass.map(token =>
4250 token.trim()).forEach(tClass => tip.classList.remove(tClass));
4251      }
4252    } // Static
4253
4254
4255    static jQueryInterface(config) {
4256      return this.each(function () {
4257        let data = Data.get(this, DATA_KEY$3);
4258
4259        const _config = typeof config === 'object' ? config : null;
4260
4261        if (!data && /dispose|hide/.test(config)) {
4262          return;
4263        }
4264
4265        if (!data) {
4266          data = new Popover(this, _config);
4267          Data.set(this, DATA_KEY$3, data);
4268        }
4269
4270        if (typeof config === 'string') {
4271          if (typeof data[config] === 'undefined') {
4272            throw new TypeError(`No method named "${config}"`);
4273          }
4274
4275          data[config]();
4276        }
4277      });
4278    }
4279
4280  }
4281  /**
4282   * ------------------------------------------------------------------------
4283   * jQuery
4284   * ------------------------------------------------------------------------
4285   * add .Popover to jQuery only if jQuery is present
4286   */
4287
4288
4289  defineJQueryPlugin(Popover);
4290
4291  /**
4292   * --------------------------------------------------------------------------
4293   * Bootstrap (v5.0.1): scrollspy.js
4294   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4295   * --------------------------------------------------------------------------
4296   */
4297  /**
4298   * ------------------------------------------------------------------------
4299   * Constants
4300   * ------------------------------------------------------------------------
4301   */
4302
4303  const NAME$2 = 'scrollspy';
4304  const DATA_KEY$2 = 'bs.scrollspy';
4305  const EVENT_KEY$2 = `.${DATA_KEY$2}`;
4306  const DATA_API_KEY$1 = '.data-api';
4307  const Default$1 = {
4308    offset: 10,
4309    method: 'auto',
4310    target: ''
4311  };
4312  const DefaultType$1 = {
4313    offset: 'number',
4314    method: 'string',
4315    target: '(string|element)'
4316  };
4317  const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
4318  const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;
4319  const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;
4320  const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
4321  const CLASS_NAME_ACTIVE$1 = 'active';
4322  const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
4323  const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
4324  const SELECTOR_NAV_LINKS = '.nav-link';
4325  const SELECTOR_NAV_ITEMS = '.nav-item';
4326  const SELECTOR_LIST_ITEMS = '.list-group-item';
4327  const SELECTOR_DROPDOWN$1 = '.dropdown';
4328  const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4329  const METHOD_OFFSET = 'offset';
4330  const METHOD_POSITION = 'position';
4331  /**
4332   * ------------------------------------------------------------------------
4333   * Class Definition
4334   * ------------------------------------------------------------------------
4335   */
4336
4337  class ScrollSpy extends BaseComponent {
4338    constructor(element, config) {
4339      super(element);
4340      this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
4341      this._config = this._getConfig(config);
4342      this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
4343      this._offsets = [];
4344      this._targets = [];
4345      this._activeTarget = null;
4346      this._scrollHeight = 0;
4347      EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());
4348      this.refresh();
4349
4350      this._process();
4351    } // Getters
4352
4353
4354    static get Default() {
4355      return Default$1;
4356    }
4357
4358    static get NAME() {
4359      return NAME$2;
4360    } // Public
4361
4362
4363    refresh() {
4364      const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
4365      const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
4366      const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
4367      this._offsets = [];
4368      this._targets = [];
4369      this._scrollHeight = this._getScrollHeight();
4370      const targets = SelectorEngine.find(this._selector);
4371      targets.map(element => {
4372        const targetSelector = getSelectorFromElement(element);
4373        const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
4374
4375        if (target) {
4376          const targetBCR = target.getBoundingClientRect();
4377
4378          if (targetBCR.width || targetBCR.height) {
4379            return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
4380          }
4381        }
4382
4383        return null;
4384      }).filter(item => item).sort((a, b) =>
4384 a[0] - b[0]).forEach(item => {
4385        this._offsets.push(item[0]);
4386
4387        this._targets.push(item[1]);
4388      });
4389    }
4390
4391    dispose() {
4392      EventHandler.off(this._scrollElement, EVENT_KEY$2);
4393      super.dispose();
4394    } // Private
4395
4396
4397    _getConfig(config) {
4398      config = { ...Default$1,
4399        ...Manipulator.getDataAttributes(this._element),
4400        ...(typeof config === 'object' && config ? config : {})
4401      };
4402
4403      if (typeof config.target !== 'string' && isElement(config.target)) {
4404        let {
4405          id
4406        } = config.target;
4407
4408        if (!id) {
4409          id = getUID(NAME$2);
4410          config.target.id = id;
4411        }
4412
4413        config.target = `#${id}`;
4414      }
4415
4416      typeCheckConfig(NAME$2, config, DefaultType$1);
4417      return config;
4418    }
4419
4420    _getScrollTop() {
4421      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
4422    }
4423
4424    _getScrollHeight() {
4425      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
4426    }
4427
4428    _getOffsetHeight() {
4429      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
4430    }
4431
4432    _process() {
4433      const scrollTop = this._getScrollTop() + this._config.offset;
4434
4435      const scrollHeight = this._getScrollHeight();
4436
4437      const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
4438
4439      if (this._scrollHeight !== scrollHeight) {
4440        this.refresh();
4441      }
4442
4443      if (scrollTop >= maxScroll) {
4444        const target = this._targets[this._targets.length - 1];
4445
4446        if (this._activeTarget !== target) {
4447          this._activate(target);
4448        }
4449
4450        return;
4451      }
4452
4453      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
4454        this._activeTarget = null;
4455
4456        this._clear();
4457
4458        return;
4459      }
4460
4461      for (let i = this._offsets.length; i--;) {
4462        const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
4463
4464        if (isActiveTarget) {
4465          this._activate(this._targets[i]);
4466        }
4467      }
4468    }
4469
4470    _activate(target) {
4471      this._activeTarget = target;
4472
4473      this._clear();
4474
4475      const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
4476
4477      const link = SelectorEngine.findOne(queries.join(','));
4478
4479      if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
4480        SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
4481        link.classList.add(CLASS_NAME_ACTIVE$1);
4482      } else {
4483        // Set triggered link as active
4484        link.classList.add(CLASS_NAME_ACTIVE$1);
4485        SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
4486          // Set triggered links parents as active
4487          // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
4488          SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1)); // Handle special case when .nav-link is inside .nav-item
4489
4490          SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
4491            SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1));
4492          });
4493        });
4494      }
4495
4496      EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
4497        relatedTarget: target
4498      });
4499    }
4500
4501    _clear() {
4502      SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
4503    } // Static
4504
4505
4506    static jQueryInterface(config) {
4507      return this.each(function () {
4508        const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
4509
4510        if (typeof config !== 'string') {
4511          return;
4512        }
4513
4514        if (typeof data[config] === 'undefined') {
4515          throw new TypeError(`No method named "${config}"`);
4516        }
4517
4518        data[config]();
4519      });
4520    }
4521
4522  }
4523  /**
4524   * ------------------------------------------------------------------------
4525   * Data Api implementation
4526   * ------------------------------------------------------------------------
4527   */
4528
4529
4530  EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
4531    SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
4532  });
4533  /**
4534   * ------------------------------------------------------------------------
4535   * jQuery
4536   * ------------------------------------------------------------------------
4537   * add .ScrollSpy to jQuery only if jQuery is present
4538   */
4539
4540  defineJQueryPlugin(ScrollSpy);
4541
4542  /**
4543   * --------------------------------------------------------------------------
4544   * Bootstrap (v5.0.1): tab.js
4545   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4546   * --------------------------------------------------------------------------
4547   */
4548  /**
4549   * ------------------------------------------------------------------------
4550   * Constants
4551   * ------------------------------------------------------------------------
4552   */
4553
4554  const NAME$1 = 'tab';
4555  const DATA_KEY$1 = 'bs.tab';
4556  const EVENT_KEY$1 = `.${DATA_KEY$1}`;
4557  const DATA_API_KEY = '.data-api';
4558  const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
4559  const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
4560  const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
4561  const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
4562  const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}${DATA_API_KEY}`;
4563  const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
4564  const CLASS_NAME_ACTIVE = 'active';
4565  const CLASS_NAME_FADE$1 = 'fade';
4566  const CLASS_NAME_SHOW$1 = 'show';
4567  const SELECTOR_DROPDOWN = '.dropdown';
4568  const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
4569  const SELECTOR_ACTIVE = '.active';
4570  const SELECTOR_ACTIVE_UL = ':scope > li > .active';
4571  const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
4572  const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4573  const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
4574  /**
4575   * ------------------------------------------------------------------------
4576   * Class Definition
4577   * ------------------------------------------------------------------------
4578   */
4579
4580  class Tab extends BaseComponent {
4581    // Getters
4582    static get NAME() {
4583      return NAME$1;
4584    } // Public
4585
4586
4587    show() {
4588      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
4589        return;
4590      }
4591
4592      let previous;
4593      const target = getElementFromSelector(this._element);
4594
4595      const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
4596
4597      if (listElement) {
4598        const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
4599        previous = SelectorEngine.find(itemSelector, listElement);
4600        previous = previous[previous.length - 1];
4601      }
4602
4603      const hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {
4604        relatedTarget: this._element
4605      }) : null;
4606      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, {
4607        relatedTarget: previous
4608      });
4609
4610      if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
4611        return;
4612      }
4613
4614      this._activate(this._element, listElement);
4615
4616      const complete = () => {
4617        EventHandler.trigger(previous, EVENT_HIDDEN$1, {
4618          relatedTarget: this._element
4619        });
4620        EventHandler.trigger(this._element, EVENT_SHOWN$1, {
4621          relatedTarget: previous
4622        });
4623      };
4624
4625      if (target) {
4626        this._activate(target, target.parentNode, complete);
4627      } else {
4628        complete();
4629      }
4630    } // Private
4631
4632
4633    _activate(element, container, callback) {
4634      const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
4635      const active = activeElements[0];
4636      const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1);
4637
4638      const complete = () => this._transitionComplete(element, active, callback);
4639
4640      if (active && isTransitioning) {
4641        active.classList.remove(CLASS_NAME_SHOW$1);
4642
4643        this._queueCallback(complete, element, true);
4644      } else {
4645        complete();
4646      }
4647    }
4648
4649    _transitionComplete(element, active, callback) {
4650      if (active) {
4651        active.classList.remove(CLASS_NAME_ACTIVE);
4652        const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
4653
4654        if (dropdownChild) {
4655          dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
4656        }
4657
4658        if (active.getAttribute('role') === 'tab') {
4659          active.setAttribute('aria-selected', false);
4660        }
4661      }
4662
4663      element.classList.add(CLASS_NAME_ACTIVE);
4664
4665      if (element.getAttribute('role') === 'tab') {
4666        element.setAttribute('aria-selected', true);
4667      }
4668
4669      reflow(element);
4670
4671      if (element.classList.contains(CLASS_NAME_FADE$1)) {
4672        element.classList.add(CLASS_NAME_SHOW$1);
4673      }
4674
4675      let parent = element.parentNode;
4676
4677      if (parent && parent.nodeName === 'LI') {
4678        parent = parent.parentNode;
4679      }
4680
4681      if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
4682        const dropdownElement = element.closest(SELECTOR_DROPDOWN);
4683
4684        if (dropdownElement) {
4685          SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
4686        }
4687
4688        element.setAttribute('aria-expanded', true);
4689      }
4690
4691      if (callback) {
4692        callback();
4693      }
4694    } // Static
4695
4696
4697    static jQueryInterface(config) {
4698      return this.each(function () {
4699        const data = Data.get(this, DATA_KEY$1) || new Tab(this);
4700
4701        if (typeof config === 'string') {
4702          if (typeof data[config] === 'undefined') {
4703            throw new TypeError(`No method named "${config}"`);
4704          }
4705
4706          data[config]();
4707        }
4708      });
4709    }
4710
4711  }
4712  /**
4713   * ------------------------------------------------------------------------
4714   * Data Api implementation
4715   * ------------------------------------------------------------------------
4716   */
4717
4718
4719  EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
4720    if (['A', 'AREA'].includes(this.tagName)) {
4721      event.preventDefault();
4722    }
4723
4724    if (isDisabled(this)) {
4725      return;
4726    }
4727
4728    const data = Data.get(this, DATA_KEY$1) || new Tab(this);
4729    data.show();
4730  });
4731  /**
4732   * ------------------------------------------------------------------------
4733   * jQuery
4734   * ------------------------------------------------------------------------
4735   * add .Tab to jQuery only if jQuery is present
4736   */
4737
4738  defineJQueryPlugin(Tab);
4739
4740  /**
4741   * --------------------------------------------------------------------------
4742   * Bootstrap (v5.0.1): toast.js
4743   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4744   * --------------------------------------------------------------------------
4745   */
4746  /**
4747   * ------------------------------------------------------------------------
4748   * Constants
4749   * ------------------------------------------------------------------------
4750   */
4751
4752  const NAME = 'toast';
4753  const DATA_KEY = 'bs.toast';
4754  const EVENT_KEY = `.${DATA_KEY}`;
4755  const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
4756  const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
4757  const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
4758  const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
4759  const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
4760  const EVENT_HIDE = `hide${EVENT_KEY}`;
4761  const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
4762  const EVENT_SHOW = `show${EVENT_KEY}`;
4763  const EVENT_SHOWN = `shown${EVENT_KEY}`;
4764  const CLASS_NAME_FADE = 'fade';
4765  const CLASS_NAME_HIDE = 'hide';
4766  const CLASS_NAME_SHOW = 'show';
4767  const CLASS_NAME_SHOWING = 'showing';
4768  const DefaultType = {
4769    animation: 'boolean',
4770    autohide: 'boolean',
4771    delay: 'number'
4772  };
4773  const Default = {
4774    animation: true,
4775    autohide: true,
4776    delay: 5000
4777  };
4778  const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
4779  /**
4780   * ------------------------------------------------------------------------
4781   * Class Definition
4782   * ------------------------------------------------------------------------
4783   */
4784
4785  class Toast extends BaseComponent {
4786    constructor(element, config) {
4787      super(element);
4788      this._config = this._getConfig(config);
4789      this._timeout = null;
4790      this._hasMouseInteraction = false;
4791      this._hasKeyboardInteraction = false;
4792
4793      this._setListeners();
4794    } // Getters
4795
4796
4797    static get DefaultType() {
4798      return DefaultType;
4799    }
4800
4801    static get Default() {
4802      return Default;
4803    }
4804
4805    static get NAME() {
4806      return NAME;
4807    } // Public
4808
4809
4810    show() {
4811      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
4812
4813      if (showEvent.defaultPrevented) {
4814        return;
4815      }
4816
4817      this._clearTimeout();
4818
4819      if (this._config.animation) {
4820        this._element.classList.add(CLASS_NAME_FADE);
4821      }
4822
4823      const complete = () => {
4824        this._element.classList.remove(CLASS_NAME_SHOWING);
4825
4826        this._element.classList.add(CLASS_NAME_SHOW);
4827
4828        EventHandler.trigger(this._element, EVENT_SHOWN);
4829
4830        this._maybeScheduleHide();
4831      };
4832
4833      this._element.classList.remove(CLASS_NAME_HIDE);
4834
4835      reflow(this._element);
4836
4837      this._element.classList.add(CLASS_NAME_SHOWING);
4838
4839      this._queueCallback(complete, this._element, this._config.animation);
4840    }
4841
4842    hide() {
4843      if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
4844        return;
4845      }
4846
4847      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
4848
4849      if (hideEvent.defaultPrevented) {
4850        return;
4851      }
4852
4853      const complete = () => {
4854        this._element.classList.add(CLASS_NAME_HIDE);
4855
4856        EventHandler.trigger(this._element, EVENT_HIDDEN);
4857      };
4858
4859      this._element.classList.remove(CLASS_NAME_SHOW);
4860
4861      this._queueCallback(complete, this._element, this._config.animation);
4862    }
4863
4864    dispose() {
4865      this._clearTimeout();
4866
4867      if (this._element.classList.contains(CLASS_NAME_SHOW)) {
4868        this._element.classList.remove(CLASS_NAME_SHOW);
4869      }
4870
4871      super.dispose();
4872    } // Private
4873
4874
4875    _getConfig(config) {
4876      config = { ...Default,
4877        ...Manipulator.getDataAttributes(this._element),
4878        ...(typeof config === 'object' && config ? config : {})
4879      };
4880      typeCheckConfig(NAME, config, this.constructor.DefaultType);
4881      return config;
4882    }
4883
4884    _maybeScheduleHide() {
4885      if (!this._config.autohide) {
4886        return;
4887      }
4888
4889      if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
4890        return;
4891      }
4892
4893      this._timeout = setTimeout(() => {
4894        this.hide();
4895      }, this._config.delay);
4896    }
4897
4898    _onInteraction(event, isInteracting) {
4899      switch (event.type) {
4900        case 'mouseover':
4901        case 'mouseout':
4902          this._hasMouseInteraction = isInteracting;
4903          break;
4904
4905        case 'focusin':
4906        case 'focusout':
4907          this._hasKeyboardInteraction = isInteracting;
4908          break;
4909      }
4910
4911      if (isInteracting) {
4912        this._clearTimeout();
4913
4914        return;
4915      }
4916
4917      const nextElement = event.relatedTarget;
4918
4919      if (this._element === nextElement || this._element.contains(nextElement)) {
4920        return;
4921      }
4922
4923      this._maybeScheduleHide();
4924    }
4925
4926    _setListeners() {
4927      EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
4928      EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
4929      EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
4930      EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
4931      EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
4932    }
4933
4934    _clearTimeout() {
4935      clearTimeout(this._timeout);
4936      this._timeout = null;
4937    } // Static
4938
4939
4940    static jQueryInterface(config) {
4941      return this.each(function () {
4942        let data = Data.get(this, DATA_KEY);
4943
4944        const _config = typeof config === 'object' && config;
4945
4946        if (!data) {
4947          data = new Toast(this, _config);
4948        }
4949
4950        if (typeof config === 'string') {
4951          if (typeof data[config] === 'undefined') {
4952            throw new TypeError(`No method named "${config}"`);
4953          }
4954
4955          data[config](this);
4956        }
4957      });
4958    }
4959
4960  }
4961  /**
4962   * ------------------------------------------------------------------------
4963   * jQuery
4964   * ------------------------------------------------------------------------
4965   * add .Toast to jQuery only if jQuery is present
4966   */
4967
4968
4969  defineJQueryPlugin(Toast);
4970
4971  /**
4972   * --------------------------------------------------------------------------
4973   * Bootstrap (v5.0.1): index.umd.js
4974   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4975   * --------------------------------------------------------------------------
4976   */
4977  var index_umd = {
4978    Alert,
4979    Button,
4980    Carousel,
4981    Collapse,
4982    Dropdown,
4983    Modal,
4984    Offcanvas,
4985    Popover,
4986    ScrollSpy,
4987    Tab,
4988    Toast,
4989    Tooltip
4990  };
4991
4992  return index_umd;
4993
4994})));
4995//# sourceMappingURL=bootstrap.js.map

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.