File indexing completed on 2026-04-09 07:58:24
0001
0002
0003
0004
0005
0006 import * as Popper from '@popperjs/core';
0007 import { createPopper } from '@popperjs/core';
0008
0009 function _defineProperties(target, props) {
0010 for (var i = 0; i < props.length; i++) {
0011 var descriptor = props[i];
0012 descriptor.enumerable = descriptor.enumerable || false;
0013 descriptor.configurable = true;
0014 if ("value" in descriptor) descriptor.writable = true;
0015 Object.defineProperty(target, descriptor.key, descriptor);
0016 }
0017 }
0018
0019 function _createClass(Constructor, protoProps, staticProps) {
0020 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
0021 if (staticProps) _defineProperties(Constructor, staticProps);
0022 return Constructor;
0023 }
0024
0025 function _extends() {
0026 _extends = Object.assign || function (target) {
0027 for (var i = 1; i < arguments.length; i++) {
0028 var source = arguments[i];
0029
0030 for (var key in source) {
0031 if (Object.prototype.hasOwnProperty.call(source, key)) {
0032 target[key] = source[key];
0033 }
0034 }
0035 }
0036
0037 return target;
0038 };
0039
0040 return _extends.apply(this, arguments);
0041 }
0042
0043 function _inheritsLoose(subClass, superClass) {
0044 subClass.prototype = Object.create(superClass.prototype);
0045 subClass.prototype.constructor = subClass;
0046 subClass.__proto__ = superClass;
0047 }
0048
0049
0050
0051
0052
0053
0054
0055 var MAX_UID = 1000000;
0056 var MILLISECONDS_MULTIPLIER = 1000;
0057 var TRANSITION_END = 'transitionend';
0058
0059 var toType = function toType(obj) {
0060 if (obj === null || obj === undefined) {
0061 return "" + obj;
0062 }
0063
0064 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
0065 };
0066
0067
0068
0069
0070
0071
0072
0073 var getUID = function getUID(prefix) {
0074 do {
0075 prefix += Math.floor(Math.random() * MAX_UID);
0076 } while (document.getElementById(prefix));
0077
0078 return prefix;
0079 };
0080
0081 var getSelector = function getSelector(element) {
0082 var selector = element.getAttribute('data-bs-target');
0083
0084 if (!selector || selector === '#') {
0085 var hrefAttr = element.getAttribute('href');
0086 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
0087 }
0088
0089 return selector;
0090 };
0091
0092 var getSelectorFromElement = function getSelectorFromElement(element) {
0093 var selector = getSelector(element);
0094
0095 if (selector) {
0096 return document.querySelector(selector) ? selector : null;
0097 }
0098
0099 return null;
0100 };
0101
0102 var getElementFromSelector = function getElementFromSelector(element) {
0103 var selector = getSelector(element);
0104 return selector ? document.querySelector(selector) : null;
0105 };
0106
0107 var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
0108 if (!element) {
0109 return 0;
0110 }
0111
0112
0113 var _window$getComputedSt = window.getComputedStyle(element),
0114 transitionDuration = _window$getComputedSt.transitionDuration,
0115 transitionDelay = _window$getComputedSt.transitionDelay;
0116
0117 var floatTransitionDuration = Number.parseFloat(transitionDuration);
0118 var floatTransitionDelay = Number.parseFloat(transitionDelay);
0119
0120 if (!floatTransitionDuration && !floatTransitionDelay) {
0121 return 0;
0122 }
0123
0124
0125 transitionDuration = transitionDuration.split(',')[0];
0126 transitionDelay = transitionDelay.split(',')[0];
0127 return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
0128 };
0129
0130 var triggerTransitionEnd = function triggerTransitionEnd(element) {
0131 element.dispatchEvent(new Event(TRANSITION_END));
0132 };
0133
0134 var isElement = function isElement(obj) {
0135 return (obj[0] || obj).nodeType;
0136 };
0137
0138 var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
0139 var called = false;
0140 var durationPadding = 5;
0141 var emulatedDuration = duration + durationPadding;
0142
0143 function listener() {
0144 called = true;
0145 element.removeEventListener(TRANSITION_END, listener);
0146 }
0147
0148 element.addEventListener(TRANSITION_END, listener);
0149 setTimeout(function () {
0150 if (!called) {
0151 triggerTransitionEnd(element);
0152 }
0153 }, emulatedDuration);
0154 };
0155
0156 var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
0157 Object.keys(configTypes).forEach(function (property) {
0158 var expectedTypes = configTypes[property];
0159 var value = config[property];
0160 var valueType = value && isElement(value) ? 'element' : toType(value);
0161
0162 if (!new RegExp(expectedTypes).test(valueType)) {
0163 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
0164 }
0165 });
0166 };
0167
0168 var isVisible = function isVisible(element) {
0169 if (!element) {
0170 return false;
0171 }
0172
0173 if (element.style && element.parentNode && element.parentNode.style) {
0174 var elementStyle = getComputedStyle(element);
0175 var parentNodeStyle = getComputedStyle(element.parentNode);
0176 return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
0177 }
0178
0179 return false;
0180 };
0181
0182 var findShadowRoot = function findShadowRoot(element) {
0183 if (!document.documentElement.attachShadow) {
0184 return null;
0185 }
0186
0187
0188 if (typeof element.getRootNode === 'function') {
0189 var root = element.getRootNode();
0190 return root instanceof ShadowRoot ? root : null;
0191 }
0192
0193 if (element instanceof ShadowRoot) {
0194 return element;
0195 }
0196
0197
0198 if (!element.parentNode) {
0199 return null;
0200 }
0201
0202 return findShadowRoot(element.parentNode);
0203 };
0204
0205 var noop = function noop() {
0206 return function () {};
0207 };
0208
0209 var reflow = function reflow(element) {
0210 return element.offsetHeight;
0211 };
0212
0213 var getjQuery = function getjQuery() {
0214 var _window = window,
0215 jQuery = _window.jQuery;
0216
0217 if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
0218 return jQuery;
0219 }
0220
0221 return null;
0222 };
0223
0224 var onDOMContentLoaded = function onDOMContentLoaded(callback) {
0225 if (document.readyState === 'loading') {
0226 document.addEventListener('DOMContentLoaded', callback);
0227 } else {
0228 callback();
0229 }
0230 };
0231
0232 var isRTL = document.documentElement.dir === 'rtl';
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244
0245
0246 var mapData = function () {
0247 var storeData = {};
0248 var id = 1;
0249 return {
0250 set: function set(element, key, data) {
0251 if (typeof element.bsKey === 'undefined') {
0252 element.bsKey = {
0253 key: key,
0254 id: id
0255 };
0256 id++;
0257 }
0258
0259 storeData[element.bsKey.id] = data;
0260 },
0261 get: function get(element, key) {
0262 if (!element || typeof element.bsKey === 'undefined') {
0263 return null;
0264 }
0265
0266 var keyProperties = element.bsKey;
0267
0268 if (keyProperties.key === key) {
0269 return storeData[keyProperties.id];
0270 }
0271
0272 return null;
0273 },
0274 delete: function _delete(element, key) {
0275 if (typeof element.bsKey === 'undefined') {
0276 return;
0277 }
0278
0279 var keyProperties = element.bsKey;
0280
0281 if (keyProperties.key === key) {
0282 delete storeData[keyProperties.id];
0283 delete element.bsKey;
0284 }
0285 }
0286 };
0287 }();
0288
0289 var Data = {
0290 setData: function setData(instance, key, data) {
0291 mapData.set(instance, key, data);
0292 },
0293 getData: function getData(instance, key) {
0294 return mapData.get(instance, key);
0295 },
0296 removeData: function removeData(instance, key) {
0297 mapData.delete(instance, key);
0298 }
0299 };
0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311
0312
0313 var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
0314 var stripNameRegex = /\..*/;
0315 var stripUidRegex = /::\d+$/;
0316 var eventRegistry = {};
0317
0318 var uidEvent = 1;
0319 var customEvents = {
0320 mouseenter: 'mouseover',
0321 mouseleave: 'mouseout'
0322 };
0323 var 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']);
0324
0325
0326
0327
0328
0329
0330 function getUidEvent(element, uid) {
0331 return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
0332 }
0333
0334 function getEvent(element) {
0335 var uid = getUidEvent(element);
0336 element.uidEvent = uid;
0337 eventRegistry[uid] = eventRegistry[uid] || {};
0338 return eventRegistry[uid];
0339 }
0340
0341 function bootstrapHandler(element, fn) {
0342 return function handler(event) {
0343 event.delegateTarget = element;
0344
0345 if (handler.oneOff) {
0346 EventHandler.off(element, event.type, fn);
0347 }
0348
0349 return fn.apply(element, [event]);
0350 };
0351 }
0352
0353 function bootstrapDelegationHandler(element, selector, fn) {
0354 return function handler(event) {
0355 var domElements = element.querySelectorAll(selector);
0356
0357 for (var target = event.target; target && target !== this; target = target.parentNode) {
0358 for (var i = domElements.length; i--;) {
0359 if (domElements[i] === target) {
0360 event.delegateTarget = target;
0361
0362 if (handler.oneOff) {
0363 EventHandler.off(element, event.type, fn);
0364 }
0365
0366 return fn.apply(target, [event]);
0367 }
0368 }
0369 }
0370
0371
0372 return null;
0373 };
0374 }
0375
0376 function findHandler(events, handler, delegationSelector) {
0377 if (delegationSelector === void 0) {
0378 delegationSelector = null;
0379 }
0380
0381 var uidEventList = Object.keys(events);
0382
0383 for (var i = 0, len = uidEventList.length; i < len; i++) {
0384 var event = events[uidEventList[i]];
0385
0386 if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
0387 return event;
0388 }
0389 }
0390
0391 return null;
0392 }
0393
0394 function normalizeParams(originalTypeEvent, handler, delegationFn) {
0395 var delegation = typeof handler === 'string';
0396 var originalHandler = delegation ? delegationFn : handler;
0397
0398 var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
0399 var custom = customEvents[typeEvent];
0400
0401 if (custom) {
0402 typeEvent = custom;
0403 }
0404
0405 var isNative = nativeEvents.has(typeEvent);
0406
0407 if (!isNative) {
0408 typeEvent = originalTypeEvent;
0409 }
0410
0411 return [delegation, originalHandler, typeEvent];
0412 }
0413
0414 function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
0415 if (typeof originalTypeEvent !== 'string' || !element) {
0416 return;
0417 }
0418
0419 if (!handler) {
0420 handler = delegationFn;
0421 delegationFn = null;
0422 }
0423
0424 var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
0425 delegation = _normalizeParams[0],
0426 originalHandler = _normalizeParams[1],
0427 typeEvent = _normalizeParams[2];
0428
0429 var events = getEvent(element);
0430 var handlers = events[typeEvent] || (events[typeEvent] = {});
0431 var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
0432
0433 if (previousFn) {
0434 previousFn.oneOff = previousFn.oneOff && oneOff;
0435 return;
0436 }
0437
0438 var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
0439 var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
0440 fn.delegationSelector = delegation ? handler : null;
0441 fn.originalHandler = originalHandler;
0442 fn.oneOff = oneOff;
0443 fn.uidEvent = uid;
0444 handlers[uid] = fn;
0445 element.addEventListener(typeEvent, fn, delegation);
0446 }
0447
0448 function removeHandler(element, events, typeEvent, handler, delegationSelector) {
0449 var fn = findHandler(events[typeEvent], handler, delegationSelector);
0450
0451 if (!fn) {
0452 return;
0453 }
0454
0455 element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
0456 delete events[typeEvent][fn.uidEvent];
0457 }
0458
0459 function removeNamespacedHandlers(element, events, typeEvent, namespace) {
0460 var storeElementEvent = events[typeEvent] || {};
0461 Object.keys(storeElementEvent).forEach(function (handlerKey) {
0462 if (handlerKey.includes(namespace)) {
0463 var event = storeElementEvent[handlerKey];
0464 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
0465 }
0466 });
0467 }
0468
0469 var EventHandler = {
0470 on: function on(element, event, handler, delegationFn) {
0471 addHandler(element, event, handler, delegationFn, false);
0472 },
0473 one: function one(element, event, handler, delegationFn) {
0474 addHandler(element, event, handler, delegationFn, true);
0475 },
0476 off: function off(element, originalTypeEvent, handler, delegationFn) {
0477 if (typeof originalTypeEvent !== 'string' || !element) {
0478 return;
0479 }
0480
0481 var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
0482 delegation = _normalizeParams2[0],
0483 originalHandler = _normalizeParams2[1],
0484 typeEvent = _normalizeParams2[2];
0485
0486 var inNamespace = typeEvent !== originalTypeEvent;
0487 var events = getEvent(element);
0488 var isNamespace = originalTypeEvent.startsWith('.');
0489
0490 if (typeof originalHandler !== 'undefined') {
0491
0492 if (!events || !events[typeEvent]) {
0493 return;
0494 }
0495
0496 removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
0497 return;
0498 }
0499
0500 if (isNamespace) {
0501 Object.keys(events).forEach(function (elementEvent) {
0502 removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
0503 });
0504 }
0505
0506 var storeElementEvent = events[typeEvent] || {};
0507 Object.keys(storeElementEvent).forEach(function (keyHandlers) {
0508 var handlerKey = keyHandlers.replace(stripUidRegex, '');
0509
0510 if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
0511 var event = storeElementEvent[keyHandlers];
0512 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
0513 }
0514 });
0515 },
0516 trigger: function trigger(element, event, args) {
0517 if (typeof event !== 'string' || !element) {
0518 return null;
0519 }
0520
0521 var $ = getjQuery();
0522 var typeEvent = event.replace(stripNameRegex, '');
0523 var inNamespace = event !== typeEvent;
0524 var isNative = nativeEvents.has(typeEvent);
0525 var jQueryEvent;
0526 var bubbles = true;
0527 var nativeDispatch = true;
0528 var defaultPrevented = false;
0529 var evt = null;
0530
0531 if (inNamespace && $) {
0532 jQueryEvent = $.Event(event, args);
0533 $(element).trigger(jQueryEvent);
0534 bubbles = !jQueryEvent.isPropagationStopped();
0535 nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
0536 defaultPrevented = jQueryEvent.isDefaultPrevented();
0537 }
0538
0539 if (isNative) {
0540 evt = document.createEvent('HTMLEvents');
0541 evt.initEvent(typeEvent, bubbles, true);
0542 } else {
0543 evt = new CustomEvent(event, {
0544 bubbles: bubbles,
0545 cancelable: true
0546 });
0547 }
0548
0549
0550 if (typeof args !== 'undefined') {
0551 Object.keys(args).forEach(function (key) {
0552 Object.defineProperty(evt, key, {
0553 get: function get() {
0554 return args[key];
0555 }
0556 });
0557 });
0558 }
0559
0560 if (defaultPrevented) {
0561 evt.preventDefault();
0562 }
0563
0564 if (nativeDispatch) {
0565 element.dispatchEvent(evt);
0566 }
0567
0568 if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
0569 jQueryEvent.preventDefault();
0570 }
0571
0572 return evt;
0573 }
0574 };
0575
0576
0577
0578
0579
0580
0581
0582 var VERSION = '5.0.0-beta1';
0583
0584 var BaseComponent = function () {
0585 function BaseComponent(element) {
0586 if (!element) {
0587 return;
0588 }
0589
0590 this._element = element;
0591 Data.setData(element, this.constructor.DATA_KEY, this);
0592 }
0593
0594 var _proto = BaseComponent.prototype;
0595
0596 _proto.dispose = function dispose() {
0597 Data.removeData(this._element, this.constructor.DATA_KEY);
0598 this._element = null;
0599 }
0600
0601 ;
0602
0603 BaseComponent.getInstance = function getInstance(element) {
0604 return Data.getData(element, this.DATA_KEY);
0605 };
0606
0607 _createClass(BaseComponent, null, [{
0608 key: "VERSION",
0609 get: function get() {
0610 return VERSION;
0611 }
0612 }]);
0613
0614 return BaseComponent;
0615 }();
0616
0617
0618
0619
0620
0621
0622
0623 var NAME = 'alert';
0624 var DATA_KEY = 'bs.alert';
0625 var EVENT_KEY = "." + DATA_KEY;
0626 var DATA_API_KEY = '.data-api';
0627 var SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
0628 var EVENT_CLOSE = "close" + EVENT_KEY;
0629 var EVENT_CLOSED = "closed" + EVENT_KEY;
0630 var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
0631 var CLASSNAME_ALERT = 'alert';
0632 var CLASSNAME_FADE = 'fade';
0633 var CLASSNAME_SHOW = 'show';
0634
0635
0636
0637
0638
0639
0640 var Alert = function (_BaseComponent) {
0641 _inheritsLoose(Alert, _BaseComponent);
0642
0643 function Alert() {
0644 return _BaseComponent.apply(this, arguments) || this;
0645 }
0646
0647 var _proto = Alert.prototype;
0648
0649
0650 _proto.close = function close(element) {
0651 var rootElement = element ? this._getRootElement(element) : this._element;
0652
0653 var customEvent = this._triggerCloseEvent(rootElement);
0654
0655 if (customEvent === null || customEvent.defaultPrevented) {
0656 return;
0657 }
0658
0659 this._removeElement(rootElement);
0660 }
0661 ;
0662
0663 _proto._getRootElement = function _getRootElement(element) {
0664 return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
0665 };
0666
0667 _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
0668 return EventHandler.trigger(element, EVENT_CLOSE);
0669 };
0670
0671 _proto._removeElement = function _removeElement(element) {
0672 var _this = this;
0673
0674 element.classList.remove(CLASSNAME_SHOW);
0675
0676 if (!element.classList.contains(CLASSNAME_FADE)) {
0677 this._destroyElement(element);
0678
0679 return;
0680 }
0681
0682 var transitionDuration = getTransitionDurationFromElement(element);
0683 EventHandler.one(element, TRANSITION_END, function () {
0684 return _this._destroyElement(element);
0685 });
0686 emulateTransitionEnd(element, transitionDuration);
0687 };
0688
0689 _proto._destroyElement = function _destroyElement(element) {
0690 if (element.parentNode) {
0691 element.parentNode.removeChild(element);
0692 }
0693
0694 EventHandler.trigger(element, EVENT_CLOSED);
0695 }
0696 ;
0697
0698 Alert.jQueryInterface = function jQueryInterface(config) {
0699 return this.each(function () {
0700 var data = Data.getData(this, DATA_KEY);
0701
0702 if (!data) {
0703 data = new Alert(this);
0704 }
0705
0706 if (config === 'close') {
0707 data[config](this);
0708 }
0709 });
0710 };
0711
0712 Alert.handleDismiss = function handleDismiss(alertInstance) {
0713 return function (event) {
0714 if (event) {
0715 event.preventDefault();
0716 }
0717
0718 alertInstance.close(this);
0719 };
0720 };
0721
0722 _createClass(Alert, null, [{
0723 key: "DATA_KEY",
0724
0725 get: function get() {
0726 return DATA_KEY;
0727 }
0728 }]);
0729
0730 return Alert;
0731 }(BaseComponent);
0732
0733
0734
0735
0736
0737
0738
0739 EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
0740
0741
0742
0743
0744
0745
0746
0747 onDOMContentLoaded(function () {
0748 var $ = getjQuery();
0749
0750
0751 if ($) {
0752 var JQUERY_NO_CONFLICT = $.fn[NAME];
0753 $.fn[NAME] = Alert.jQueryInterface;
0754 $.fn[NAME].Constructor = Alert;
0755
0756 $.fn[NAME].noConflict = function () {
0757 $.fn[NAME] = JQUERY_NO_CONFLICT;
0758 return Alert.jQueryInterface;
0759 };
0760 }
0761 });
0762
0763
0764
0765
0766
0767
0768
0769 var NAME$1 = 'button';
0770 var DATA_KEY$1 = 'bs.button';
0771 var EVENT_KEY$1 = "." + DATA_KEY$1;
0772 var DATA_API_KEY$1 = '.data-api';
0773 var CLASS_NAME_ACTIVE = 'active';
0774 var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
0775 var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1;
0776
0777
0778
0779
0780
0781
0782 var Button = function (_BaseComponent) {
0783 _inheritsLoose(Button, _BaseComponent);
0784
0785 function Button() {
0786 return _BaseComponent.apply(this, arguments) || this;
0787 }
0788
0789 var _proto = Button.prototype;
0790
0791
0792 _proto.toggle = function toggle() {
0793
0794 this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
0795 }
0796 ;
0797
0798 Button.jQueryInterface = function jQueryInterface(config) {
0799 return this.each(function () {
0800 var data = Data.getData(this, DATA_KEY$1);
0801
0802 if (!data) {
0803 data = new Button(this);
0804 }
0805
0806 if (config === 'toggle') {
0807 data[config]();
0808 }
0809 });
0810 };
0811
0812 _createClass(Button, null, [{
0813 key: "DATA_KEY",
0814
0815 get: function get() {
0816 return DATA_KEY$1;
0817 }
0818 }]);
0819
0820 return Button;
0821 }(BaseComponent);
0822
0823
0824
0825
0826
0827
0828
0829 EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE, function (event) {
0830 event.preventDefault();
0831 var button = event.target.closest(SELECTOR_DATA_TOGGLE);
0832 var data = Data.getData(button, DATA_KEY$1);
0833
0834 if (!data) {
0835 data = new Button(button);
0836 }
0837
0838 data.toggle();
0839 });
0840
0841
0842
0843
0844
0845
0846
0847 onDOMContentLoaded(function () {
0848 var $ = getjQuery();
0849
0850
0851 if ($) {
0852 var JQUERY_NO_CONFLICT = $.fn[NAME$1];
0853 $.fn[NAME$1] = Button.jQueryInterface;
0854 $.fn[NAME$1].Constructor = Button;
0855
0856 $.fn[NAME$1].noConflict = function () {
0857 $.fn[NAME$1] = JQUERY_NO_CONFLICT;
0858 return Button.jQueryInterface;
0859 };
0860 }
0861 });
0862
0863
0864
0865
0866
0867
0868
0869 function normalizeData(val) {
0870 if (val === 'true') {
0871 return true;
0872 }
0873
0874 if (val === 'false') {
0875 return false;
0876 }
0877
0878 if (val === Number(val).toString()) {
0879 return Number(val);
0880 }
0881
0882 if (val === '' || val === 'null') {
0883 return null;
0884 }
0885
0886 return val;
0887 }
0888
0889 function normalizeDataKey(key) {
0890 return key.replace(/[A-Z]/g, function (chr) {
0891 return "-" + chr.toLowerCase();
0892 });
0893 }
0894
0895 var Manipulator = {
0896 setDataAttribute: function setDataAttribute(element, key, value) {
0897 element.setAttribute("data-bs-" + normalizeDataKey(key), value);
0898 },
0899 removeDataAttribute: function removeDataAttribute(element, key) {
0900 element.removeAttribute("data-bs-" + normalizeDataKey(key));
0901 },
0902 getDataAttributes: function getDataAttributes(element) {
0903 if (!element) {
0904 return {};
0905 }
0906
0907 var attributes = {};
0908 Object.keys(element.dataset).filter(function (key) {
0909 return key.startsWith('bs');
0910 }).forEach(function (key) {
0911 var pureKey = key.replace(/^bs/, '');
0912 pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
0913 attributes[pureKey] = normalizeData(element.dataset[key]);
0914 });
0915 return attributes;
0916 },
0917 getDataAttribute: function getDataAttribute(element, key) {
0918 return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
0919 },
0920 offset: function offset(element) {
0921 var rect = element.getBoundingClientRect();
0922 return {
0923 top: rect.top + document.body.scrollTop,
0924 left: rect.left + document.body.scrollLeft
0925 };
0926 },
0927 position: function position(element) {
0928 return {
0929 top: element.offsetTop,
0930 left: element.offsetLeft
0931 };
0932 }
0933 };
0934
0935
0936
0937
0938
0939
0940
0941
0942
0943
0944
0945
0946
0947 var NODE_TEXT = 3;
0948 var SelectorEngine = {
0949 matches: function matches(element, selector) {
0950 return element.matches(selector);
0951 },
0952 find: function find(selector, element) {
0953 var _ref;
0954
0955 if (element === void 0) {
0956 element = document.documentElement;
0957 }
0958
0959 return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
0960 },
0961 findOne: function findOne(selector, element) {
0962 if (element === void 0) {
0963 element = document.documentElement;
0964 }
0965
0966 return Element.prototype.querySelector.call(element, selector);
0967 },
0968 children: function children(element, selector) {
0969 var _ref2;
0970
0971 var children = (_ref2 = []).concat.apply(_ref2, element.children);
0972
0973 return children.filter(function (child) {
0974 return child.matches(selector);
0975 });
0976 },
0977 parents: function parents(element, selector) {
0978 var parents = [];
0979 var ancestor = element.parentNode;
0980
0981 while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
0982 if (this.matches(ancestor, selector)) {
0983 parents.push(ancestor);
0984 }
0985
0986 ancestor = ancestor.parentNode;
0987 }
0988
0989 return parents;
0990 },
0991 prev: function prev(element, selector) {
0992 var previous = element.previousElementSibling;
0993
0994 while (previous) {
0995 if (previous.matches(selector)) {
0996 return [previous];
0997 }
0998
0999 previous = previous.previousElementSibling;
1000 }
1001
1002 return [];
1003 },
1004 next: function next(element, selector) {
1005 var next = element.nextElementSibling;
1006
1007 while (next) {
1008 if (this.matches(next, selector)) {
1009 return [next];
1010 }
1011
1012 next = next.nextElementSibling;
1013 }
1014
1015 return [];
1016 }
1017 };
1018
1019
1020
1021
1022
1023
1024
1025 var NAME$2 = 'carousel';
1026 var DATA_KEY$2 = 'bs.carousel';
1027 var EVENT_KEY$2 = "." + DATA_KEY$2;
1028 var DATA_API_KEY$2 = '.data-api';
1029 var ARROW_LEFT_KEY = 'ArrowLeft';
1030 var ARROW_RIGHT_KEY = 'ArrowRight';
1031 var TOUCHEVENT_COMPAT_WAIT = 500;
1032
1033 var SWIPE_THRESHOLD = 40;
1034 var Default = {
1035 interval: 5000,
1036 keyboard: true,
1037 slide: false,
1038 pause: 'hover',
1039 wrap: true,
1040 touch: true
1041 };
1042 var DefaultType = {
1043 interval: '(number|boolean)',
1044 keyboard: 'boolean',
1045 slide: '(boolean|string)',
1046 pause: '(string|boolean)',
1047 wrap: 'boolean',
1048 touch: 'boolean'
1049 };
1050 var DIRECTION_NEXT = 'next';
1051 var DIRECTION_PREV = 'prev';
1052 var DIRECTION_LEFT = 'left';
1053 var DIRECTION_RIGHT = 'right';
1054 var EVENT_SLIDE = "slide" + EVENT_KEY$2;
1055 var EVENT_SLID = "slid" + EVENT_KEY$2;
1056 var EVENT_KEYDOWN = "keydown" + EVENT_KEY$2;
1057 var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$2;
1058 var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$2;
1059 var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$2;
1060 var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$2;
1061 var EVENT_TOUCHEND = "touchend" + EVENT_KEY$2;
1062 var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2;
1063 var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2;
1064 var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2;
1065 var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
1066 var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2;
1067 var CLASS_NAME_CAROUSEL = 'carousel';
1068 var CLASS_NAME_ACTIVE$1 = 'active';
1069 var CLASS_NAME_SLIDE = 'slide';
1070 var CLASS_NAME_END = 'carousel-item-end';
1071 var CLASS_NAME_START = 'carousel-item-start';
1072 var CLASS_NAME_NEXT = 'carousel-item-next';
1073 var CLASS_NAME_PREV = 'carousel-item-prev';
1074 var CLASS_NAME_POINTER_EVENT = 'pointer-event';
1075 var SELECTOR_ACTIVE = '.active';
1076 var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
1077 var SELECTOR_ITEM = '.carousel-item';
1078 var SELECTOR_ITEM_IMG = '.carousel-item img';
1079 var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
1080 var SELECTOR_INDICATORS = '.carousel-indicators';
1081 var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1082 var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1083 var PointerType = {
1084 TOUCH: 'touch',
1085 PEN: 'pen'
1086 };
1087
1088
1089
1090
1091
1092
1093 var Carousel = function (_BaseComponent) {
1094 _inheritsLoose(Carousel, _BaseComponent);
1095
1096 function Carousel(element, config) {
1097 var _this;
1098
1099 _this = _BaseComponent.call(this, element) || this;
1100 _this._items = null;
1101 _this._interval = null;
1102 _this._activeElement = null;
1103 _this._isPaused = false;
1104 _this._isSliding = false;
1105 _this.touchTimeout = null;
1106 _this.touchStartX = 0;
1107 _this.touchDeltaX = 0;
1108 _this._config = _this._getConfig(config);
1109 _this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, _this._element);
1110 _this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1111 _this._pointerEvent = Boolean(window.PointerEvent);
1112
1113 _this._addEventListeners();
1114
1115 return _this;
1116 }
1117
1118
1119 var _proto = Carousel.prototype;
1120
1121
1122 _proto.next = function next() {
1123 if (!this._isSliding) {
1124 this._slide(DIRECTION_NEXT);
1125 }
1126 };
1127
1128 _proto.nextWhenVisible = function nextWhenVisible() {
1129
1130
1131 if (!document.hidden && isVisible(this._element)) {
1132 this.next();
1133 }
1134 };
1135
1136 _proto.prev = function prev() {
1137 if (!this._isSliding) {
1138 this._slide(DIRECTION_PREV);
1139 }
1140 };
1141
1142 _proto.pause = function pause(event) {
1143 if (!event) {
1144 this._isPaused = true;
1145 }
1146
1147 if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
1148 triggerTransitionEnd(this._element);
1149 this.cycle(true);
1150 }
1151
1152 clearInterval(this._interval);
1153 this._interval = null;
1154 };
1155
1156 _proto.cycle = function cycle(event) {
1157 if (!event) {
1158 this._isPaused = false;
1159 }
1160
1161 if (this._interval) {
1162 clearInterval(this._interval);
1163 this._interval = null;
1164 }
1165
1166 if (this._config && this._config.interval && !this._isPaused) {
1167 this._updateInterval();
1168
1169 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
1170 }
1171 };
1172
1173 _proto.to = function to(index) {
1174 var _this2 = this;
1175
1176 this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1177
1178 var activeIndex = this._getItemIndex(this._activeElement);
1179
1180 if (index > this._items.length - 1 || index < 0) {
1181 return;
1182 }
1183
1184 if (this._isSliding) {
1185 EventHandler.one(this._element, EVENT_SLID, function () {
1186 return _this2.to(index);
1187 });
1188 return;
1189 }
1190
1191 if (activeIndex === index) {
1192 this.pause();
1193 this.cycle();
1194 return;
1195 }
1196
1197 var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
1198
1199 this._slide(direction, this._items[index]);
1200 };
1201
1202 _proto.dispose = function dispose() {
1203 _BaseComponent.prototype.dispose.call(this);
1204
1205 EventHandler.off(this._element, EVENT_KEY$2);
1206 this._items = null;
1207 this._config = null;
1208 this._interval = null;
1209 this._isPaused = null;
1210 this._isSliding = null;
1211 this._activeElement = null;
1212 this._indicatorsElement = null;
1213 }
1214 ;
1215
1216 _proto._getConfig = function _getConfig(config) {
1217 config = _extends({}, Default, config);
1218 typeCheckConfig(NAME$2, config, DefaultType);
1219 return config;
1220 };
1221
1222 _proto._handleSwipe = function _handleSwipe() {
1223 var absDeltax = Math.abs(this.touchDeltaX);
1224
1225 if (absDeltax <= SWIPE_THRESHOLD) {
1226 return;
1227 }
1228
1229 var direction = absDeltax / this.touchDeltaX;
1230 this.touchDeltaX = 0;
1231
1232 if (direction > 0) {
1233 this.prev();
1234 }
1235
1236
1237 if (direction < 0) {
1238 this.next();
1239 }
1240 };
1241
1242 _proto._addEventListeners = function _addEventListeners() {
1243 var _this3 = this;
1244
1245 if (this._config.keyboard) {
1246 EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
1247 return _this3._keydown(event);
1248 });
1249 }
1250
1251 if (this._config.pause === 'hover') {
1252 EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
1253 return _this3.pause(event);
1254 });
1255 EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
1256 return _this3.cycle(event);
1257 });
1258 }
1259
1260 if (this._config.touch && this._touchSupported) {
1261 this._addTouchEventListeners();
1262 }
1263 };
1264
1265 _proto._addTouchEventListeners = function _addTouchEventListeners() {
1266 var _this4 = this;
1267
1268 var start = function start(event) {
1269 if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
1270 _this4.touchStartX = event.clientX;
1271 } else if (!_this4._pointerEvent) {
1272 _this4.touchStartX = event.touches[0].clientX;
1273 }
1274 };
1275
1276 var move = function move(event) {
1277
1278 if (event.touches && event.touches.length > 1) {
1279 _this4.touchDeltaX = 0;
1280 } else {
1281 _this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX;
1282 }
1283 };
1284
1285 var end = function end(event) {
1286 if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
1287 _this4.touchDeltaX = event.clientX - _this4.touchStartX;
1288 }
1289
1290 _this4._handleSwipe();
1291
1292 if (_this4._config.pause === 'hover') {
1293
1294
1295
1296
1297
1298
1299
1300 _this4.pause();
1301
1302 if (_this4.touchTimeout) {
1303 clearTimeout(_this4.touchTimeout);
1304 }
1305
1306 _this4.touchTimeout = setTimeout(function (event) {
1307 return _this4.cycle(event);
1308 }, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
1309 }
1310 };
1311
1312 SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
1313 EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
1314 return e.preventDefault();
1315 });
1316 });
1317
1318 if (this._pointerEvent) {
1319 EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
1320 return start(event);
1321 });
1322 EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
1323 return end(event);
1324 });
1325
1326 this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1327 } else {
1328 EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
1329 return start(event);
1330 });
1331 EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
1332 return move(event);
1333 });
1334 EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
1335 return end(event);
1336 });
1337 }
1338 };
1339
1340 _proto._keydown = function _keydown(event) {
1341 if (/input|textarea/i.test(event.target.tagName)) {
1342 return;
1343 }
1344
1345 switch (event.key) {
1346 case ARROW_LEFT_KEY:
1347 event.preventDefault();
1348 this.prev();
1349 break;
1350
1351 case ARROW_RIGHT_KEY:
1352 event.preventDefault();
1353 this.next();
1354 break;
1355 }
1356 };
1357
1358 _proto._getItemIndex = function _getItemIndex(element) {
1359 this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
1360 return this._items.indexOf(element);
1361 };
1362
1363 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
1364 var isNextDirection = direction === DIRECTION_NEXT;
1365 var isPrevDirection = direction === DIRECTION_PREV;
1366
1367 var activeIndex = this._getItemIndex(activeElement);
1368
1369 var lastItemIndex = this._items.length - 1;
1370 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
1371
1372 if (isGoingToWrap && !this._config.wrap) {
1373 return activeElement;
1374 }
1375
1376 var delta = direction === DIRECTION_PREV ? -1 : 1;
1377 var itemIndex = (activeIndex + delta) % this._items.length;
1378 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
1379 };
1380
1381 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
1382 var targetIndex = this._getItemIndex(relatedTarget);
1383
1384 var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
1385
1386 return EventHandler.trigger(this._element, EVENT_SLIDE, {
1387 relatedTarget: relatedTarget,
1388 direction: eventDirectionName,
1389 from: fromIndex,
1390 to: targetIndex
1391 });
1392 };
1393
1394 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
1395 if (this._indicatorsElement) {
1396 var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
1397
1398 for (var i = 0; i < indicators.length; i++) {
1399 indicators[i].classList.remove(CLASS_NAME_ACTIVE$1);
1400 }
1401
1402 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
1403
1404 if (nextIndicator) {
1405 nextIndicator.classList.add(CLASS_NAME_ACTIVE$1);
1406 }
1407 }
1408 };
1409
1410 _proto._updateInterval = function _updateInterval() {
1411 var element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1412
1413 if (!element) {
1414 return;
1415 }
1416
1417 var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1418
1419 if (elementInterval) {
1420 this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1421 this._config.interval = elementInterval;
1422 } else {
1423 this._config.interval = this._config.defaultInterval || this._config.interval;
1424 }
1425 };
1426
1427 _proto._slide = function _slide(direction, element) {
1428 var _this5 = this;
1429
1430 var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1431
1432 var activeElementIndex = this._getItemIndex(activeElement);
1433
1434 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
1435
1436 var nextElementIndex = this._getItemIndex(nextElement);
1437
1438 var isCycling = Boolean(this._interval);
1439 var directionalClassName;
1440 var orderClassName;
1441 var eventDirectionName;
1442
1443 if (direction === DIRECTION_NEXT) {
1444 directionalClassName = CLASS_NAME_START;
1445 orderClassName = CLASS_NAME_NEXT;
1446 eventDirectionName = DIRECTION_LEFT;
1447 } else {
1448 directionalClassName = CLASS_NAME_END;
1449 orderClassName = CLASS_NAME_PREV;
1450 eventDirectionName = DIRECTION_RIGHT;
1451 }
1452
1453 if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) {
1454 this._isSliding = false;
1455 return;
1456 }
1457
1458 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1459
1460 if (slideEvent.defaultPrevented) {
1461 return;
1462 }
1463
1464 if (!activeElement || !nextElement) {
1465
1466 return;
1467 }
1468
1469 this._isSliding = true;
1470
1471 if (isCycling) {
1472 this.pause();
1473 }
1474
1475 this._setActiveIndicatorElement(nextElement);
1476
1477 this._activeElement = nextElement;
1478
1479 if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1480 nextElement.classList.add(orderClassName);
1481 reflow(nextElement);
1482 activeElement.classList.add(directionalClassName);
1483 nextElement.classList.add(directionalClassName);
1484 var transitionDuration = getTransitionDurationFromElement(activeElement);
1485 EventHandler.one(activeElement, TRANSITION_END, function () {
1486 nextElement.classList.remove(directionalClassName, orderClassName);
1487 nextElement.classList.add(CLASS_NAME_ACTIVE$1);
1488 activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName);
1489 _this5._isSliding = false;
1490 setTimeout(function () {
1491 EventHandler.trigger(_this5._element, EVENT_SLID, {
1492 relatedTarget: nextElement,
1493 direction: eventDirectionName,
1494 from: activeElementIndex,
1495 to: nextElementIndex
1496 });
1497 }, 0);
1498 });
1499 emulateTransitionEnd(activeElement, transitionDuration);
1500 } else {
1501 activeElement.classList.remove(CLASS_NAME_ACTIVE$1);
1502 nextElement.classList.add(CLASS_NAME_ACTIVE$1);
1503 this._isSliding = false;
1504 EventHandler.trigger(this._element, EVENT_SLID, {
1505 relatedTarget: nextElement,
1506 direction: eventDirectionName,
1507 from: activeElementIndex,
1508 to: nextElementIndex
1509 });
1510 }
1511
1512 if (isCycling) {
1513 this.cycle();
1514 }
1515 }
1516 ;
1517
1518 Carousel.carouselInterface = function carouselInterface(element, config) {
1519 var data = Data.getData(element, DATA_KEY$2);
1520
1521 var _config = _extends({}, Default, Manipulator.getDataAttributes(element));
1522
1523 if (typeof config === 'object') {
1524 _config = _extends({}, _config, config);
1525 }
1526
1527 var 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 Carousel.jQueryInterface = function jQueryInterface(config) {
1548 return this.each(function () {
1549 Carousel.carouselInterface(this, config);
1550 });
1551 };
1552
1553 Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
1554 var target = getElementFromSelector(this);
1555
1556 if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1557 return;
1558 }
1559
1560 var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
1561
1562 var slideIndex = this.getAttribute('data-bs-slide-to');
1563
1564 if (slideIndex) {
1565 config.interval = false;
1566 }
1567
1568 Carousel.carouselInterface(target, config);
1569
1570 if (slideIndex) {
1571 Data.getData(target, DATA_KEY$2).to(slideIndex);
1572 }
1573
1574 event.preventDefault();
1575 };
1576
1577 _createClass(Carousel, null, [{
1578 key: "Default",
1579 get: function get() {
1580 return Default;
1581 }
1582 }, {
1583 key: "DATA_KEY",
1584 get: function get() {
1585 return DATA_KEY$2;
1586 }
1587 }]);
1588
1589 return Carousel;
1590 }(BaseComponent);
1591
1592
1593
1594
1595
1596
1597
1598 EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
1599 EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
1600 var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1601
1602 for (var i = 0, len = carousels.length; i < len; i++) {
1603 Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
1604 }
1605 });
1606
1607
1608
1609
1610
1611
1612
1613 onDOMContentLoaded(function () {
1614 var $ = getjQuery();
1615
1616
1617 if ($) {
1618 var JQUERY_NO_CONFLICT = $.fn[NAME$2];
1619 $.fn[NAME$2] = Carousel.jQueryInterface;
1620 $.fn[NAME$2].Constructor = Carousel;
1621
1622 $.fn[NAME$2].noConflict = function () {
1623 $.fn[NAME$2] = JQUERY_NO_CONFLICT;
1624 return Carousel.jQueryInterface;
1625 };
1626 }
1627 });
1628
1629
1630
1631
1632
1633
1634
1635 var NAME$3 = 'collapse';
1636 var DATA_KEY$3 = 'bs.collapse';
1637 var EVENT_KEY$3 = "." + DATA_KEY$3;
1638 var DATA_API_KEY$3 = '.data-api';
1639 var Default$1 = {
1640 toggle: true,
1641 parent: ''
1642 };
1643 var DefaultType$1 = {
1644 toggle: 'boolean',
1645 parent: '(string|element)'
1646 };
1647 var EVENT_SHOW = "show" + EVENT_KEY$3;
1648 var EVENT_SHOWN = "shown" + EVENT_KEY$3;
1649 var EVENT_HIDE = "hide" + EVENT_KEY$3;
1650 var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
1651 var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
1652 var CLASS_NAME_SHOW = 'show';
1653 var CLASS_NAME_COLLAPSE = 'collapse';
1654 var CLASS_NAME_COLLAPSING = 'collapsing';
1655 var CLASS_NAME_COLLAPSED = 'collapsed';
1656 var WIDTH = 'width';
1657 var HEIGHT = 'height';
1658 var SELECTOR_ACTIVES = '.show, .collapsing';
1659 var SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="collapse"]';
1660
1661
1662
1663
1664
1665
1666 var Collapse = function (_BaseComponent) {
1667 _inheritsLoose(Collapse, _BaseComponent);
1668
1669 function Collapse(element, config) {
1670 var _this;
1671
1672 _this = _BaseComponent.call(this, element) || this;
1673 _this._isTransitioning = false;
1674 _this._config = _this._getConfig(config);
1675 _this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1 + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE$1 + "[data-bs-target=\"#" + element.id + "\"]"));
1676 var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1);
1677
1678 for (var i = 0, len = toggleList.length; i < len; i++) {
1679 var elem = toggleList[i];
1680 var selector = getSelectorFromElement(elem);
1681 var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
1682 return foundElem === element;
1683 });
1684
1685 if (selector !== null && filterElement.length) {
1686 _this._selector = selector;
1687
1688 _this._triggerArray.push(elem);
1689 }
1690 }
1691
1692 _this._parent = _this._config.parent ? _this._getParent() : null;
1693
1694 if (!_this._config.parent) {
1695 _this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);
1696 }
1697
1698 if (_this._config.toggle) {
1699 _this.toggle();
1700 }
1701
1702 return _this;
1703 }
1704
1705
1706 var _proto = Collapse.prototype;
1707
1708
1709 _proto.toggle = function toggle() {
1710 if (this._element.classList.contains(CLASS_NAME_SHOW)) {
1711 this.hide();
1712 } else {
1713 this.show();
1714 }
1715 };
1716
1717 _proto.show = function show() {
1718 var _this2 = this;
1719
1720 if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
1721 return;
1722 }
1723
1724 var actives;
1725 var activesData;
1726
1727 if (this._parent) {
1728 actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
1729 if (typeof _this2._config.parent === 'string') {
1730 return elem.getAttribute('data-bs-parent') === _this2._config.parent;
1731 }
1732
1733 return elem.classList.contains(CLASS_NAME_COLLAPSE);
1734 });
1735
1736 if (actives.length === 0) {
1737 actives = null;
1738 }
1739 }
1740
1741 var container = SelectorEngine.findOne(this._selector);
1742
1743 if (actives) {
1744 var tempActiveData = actives.find(function (elem) {
1745 return container !== elem;
1746 });
1747 activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY$3) : null;
1748
1749 if (activesData && activesData._isTransitioning) {
1750 return;
1751 }
1752 }
1753
1754 var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
1755
1756 if (startEvent.defaultPrevented) {
1757 return;
1758 }
1759
1760 if (actives) {
1761 actives.forEach(function (elemActive) {
1762 if (container !== elemActive) {
1763 Collapse.collapseInterface(elemActive, 'hide');
1764 }
1765
1766 if (!activesData) {
1767 Data.setData(elemActive, DATA_KEY$3, null);
1768 }
1769 });
1770 }
1771
1772 var dimension = this._getDimension();
1773
1774 this._element.classList.remove(CLASS_NAME_COLLAPSE);
1775
1776 this._element.classList.add(CLASS_NAME_COLLAPSING);
1777
1778 this._element.style[dimension] = 0;
1779
1780 if (this._triggerArray.length) {
1781 this._triggerArray.forEach(function (element) {
1782 element.classList.remove(CLASS_NAME_COLLAPSED);
1783 element.setAttribute('aria-expanded', true);
1784 });
1785 }
1786
1787 this.setTransitioning(true);
1788
1789 var complete = function complete() {
1790 _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
1791
1792 _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
1793
1794 _this2._element.style[dimension] = '';
1795
1796 _this2.setTransitioning(false);
1797
1798 EventHandler.trigger(_this2._element, EVENT_SHOWN);
1799 };
1800
1801 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1802 var scrollSize = "scroll" + capitalizedDimension;
1803 var transitionDuration = getTransitionDurationFromElement(this._element);
1804 EventHandler.one(this._element, TRANSITION_END, complete);
1805 emulateTransitionEnd(this._element, transitionDuration);
1806 this._element.style[dimension] = this._element[scrollSize] + "px";
1807 };
1808
1809 _proto.hide = function hide() {
1810 var _this3 = this;
1811
1812 if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
1813 return;
1814 }
1815
1816 var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
1817
1818 if (startEvent.defaultPrevented) {
1819 return;
1820 }
1821
1822 var dimension = this._getDimension();
1823
1824 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1825 reflow(this._element);
1826
1827 this._element.classList.add(CLASS_NAME_COLLAPSING);
1828
1829 this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
1830
1831 var triggerArrayLength = this._triggerArray.length;
1832
1833 if (triggerArrayLength > 0) {
1834 for (var i = 0; i < triggerArrayLength; i++) {
1835 var trigger = this._triggerArray[i];
1836 var elem = getElementFromSelector(trigger);
1837
1838 if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
1839 trigger.classList.add(CLASS_NAME_COLLAPSED);
1840 trigger.setAttribute('aria-expanded', false);
1841 }
1842 }
1843 }
1844
1845 this.setTransitioning(true);
1846
1847 var complete = function complete() {
1848 _this3.setTransitioning(false);
1849
1850 _this3._element.classList.remove(CLASS_NAME_COLLAPSING);
1851
1852 _this3._element.classList.add(CLASS_NAME_COLLAPSE);
1853
1854 EventHandler.trigger(_this3._element, EVENT_HIDDEN);
1855 };
1856
1857 this._element.style[dimension] = '';
1858 var transitionDuration = getTransitionDurationFromElement(this._element);
1859 EventHandler.one(this._element, TRANSITION_END, complete);
1860 emulateTransitionEnd(this._element, transitionDuration);
1861 };
1862
1863 _proto.setTransitioning = function setTransitioning(isTransitioning) {
1864 this._isTransitioning = isTransitioning;
1865 };
1866
1867 _proto.dispose = function dispose() {
1868 _BaseComponent.prototype.dispose.call(this);
1869
1870 this._config = null;
1871 this._parent = null;
1872 this._triggerArray = null;
1873 this._isTransitioning = null;
1874 }
1875 ;
1876
1877 _proto._getConfig = function _getConfig(config) {
1878 config = _extends({}, Default$1, config);
1879 config.toggle = Boolean(config.toggle);
1880
1881 typeCheckConfig(NAME$3, config, DefaultType$1);
1882 return config;
1883 };
1884
1885 _proto._getDimension = function _getDimension() {
1886 return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
1887 };
1888
1889 _proto._getParent = function _getParent() {
1890 var _this4 = this;
1891
1892 var parent = this._config.parent;
1893
1894 if (isElement(parent)) {
1895
1896 if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
1897 parent = parent[0];
1898 }
1899 } else {
1900 parent = SelectorEngine.findOne(parent);
1901 }
1902
1903 var selector = SELECTOR_DATA_TOGGLE$1 + "[data-bs-parent=\"" + parent + "\"]";
1904 SelectorEngine.find(selector, parent).forEach(function (element) {
1905 var selected = getElementFromSelector(element);
1906
1907 _this4._addAriaAndCollapsedClass(selected, [element]);
1908 });
1909 return parent;
1910 };
1911
1912 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1913 if (!element || !triggerArray.length) {
1914 return;
1915 }
1916
1917 var isOpen = element.classList.contains(CLASS_NAME_SHOW);
1918 triggerArray.forEach(function (elem) {
1919 if (isOpen) {
1920 elem.classList.remove(CLASS_NAME_COLLAPSED);
1921 } else {
1922 elem.classList.add(CLASS_NAME_COLLAPSED);
1923 }
1924
1925 elem.setAttribute('aria-expanded', isOpen);
1926 });
1927 }
1928 ;
1929
1930 Collapse.collapseInterface = function collapseInterface(element, config) {
1931 var data = Data.getData(element, DATA_KEY$3);
1932
1933 var _config = _extends({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
1934
1935 if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1936 _config.toggle = false;
1937 }
1938
1939 if (!data) {
1940 data = new Collapse(element, _config);
1941 }
1942
1943 if (typeof config === 'string') {
1944 if (typeof data[config] === 'undefined') {
1945 throw new TypeError("No method named \"" + config + "\"");
1946 }
1947
1948 data[config]();
1949 }
1950 };
1951
1952 Collapse.jQueryInterface = function jQueryInterface(config) {
1953 return this.each(function () {
1954 Collapse.collapseInterface(this, config);
1955 });
1956 };
1957
1958 _createClass(Collapse, null, [{
1959 key: "Default",
1960 get: function get() {
1961 return Default$1;
1962 }
1963 }, {
1964 key: "DATA_KEY",
1965 get: function get() {
1966 return DATA_KEY$3;
1967 }
1968 }]);
1969
1970 return Collapse;
1971 }(BaseComponent);
1972
1973
1974
1975
1976
1977
1978
1979 EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
1980
1981 if (event.target.tagName === 'A') {
1982 event.preventDefault();
1983 }
1984
1985 var triggerData = Manipulator.getDataAttributes(this);
1986 var selector = getSelectorFromElement(this);
1987 var selectorElements = SelectorEngine.find(selector);
1988 selectorElements.forEach(function (element) {
1989 var data = Data.getData(element, DATA_KEY$3);
1990 var config;
1991
1992 if (data) {
1993
1994 if (data._parent === null && typeof triggerData.parent === 'string') {
1995 data._config.parent = triggerData.parent;
1996 data._parent = data._getParent();
1997 }
1998
1999 config = 'toggle';
2000 } else {
2001 config = triggerData;
2002 }
2003
2004 Collapse.collapseInterface(element, config);
2005 });
2006 });
2007
2008
2009
2010
2011
2012
2013
2014 onDOMContentLoaded(function () {
2015 var $ = getjQuery();
2016
2017
2018 if ($) {
2019 var JQUERY_NO_CONFLICT = $.fn[NAME$3];
2020 $.fn[NAME$3] = Collapse.jQueryInterface;
2021 $.fn[NAME$3].Constructor = Collapse;
2022
2023 $.fn[NAME$3].noConflict = function () {
2024 $.fn[NAME$3] = JQUERY_NO_CONFLICT;
2025 return Collapse.jQueryInterface;
2026 };
2027 }
2028 });
2029
2030
2031
2032
2033
2034
2035
2036 var NAME$4 = 'dropdown';
2037 var DATA_KEY$4 = 'bs.dropdown';
2038 var EVENT_KEY$4 = "." + DATA_KEY$4;
2039 var DATA_API_KEY$4 = '.data-api';
2040 var ESCAPE_KEY = 'Escape';
2041 var SPACE_KEY = 'Space';
2042 var TAB_KEY = 'Tab';
2043 var ARROW_UP_KEY = 'ArrowUp';
2044 var ARROW_DOWN_KEY = 'ArrowDown';
2045 var RIGHT_MOUSE_BUTTON = 2;
2046
2047 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
2048 var EVENT_HIDE$1 = "hide" + EVENT_KEY$4;
2049 var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4;
2050 var EVENT_SHOW$1 = "show" + EVENT_KEY$4;
2051 var EVENT_SHOWN$1 = "shown" + EVENT_KEY$4;
2052 var EVENT_CLICK = "click" + EVENT_KEY$4;
2053 var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$4 + DATA_API_KEY$4;
2054 var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
2055 var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
2056 var CLASS_NAME_DISABLED = 'disabled';
2057 var CLASS_NAME_SHOW$1 = 'show';
2058 var CLASS_NAME_DROPUP = 'dropup';
2059 var CLASS_NAME_DROPEND = 'dropend';
2060 var CLASS_NAME_DROPSTART = 'dropstart';
2061 var CLASS_NAME_NAVBAR = 'navbar';
2062 var SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="dropdown"]';
2063 var SELECTOR_FORM_CHILD = '.dropdown form';
2064 var SELECTOR_MENU = '.dropdown-menu';
2065 var SELECTOR_NAVBAR_NAV = '.navbar-nav';
2066 var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
2067 var PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start';
2068 var PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end';
2069 var PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start';
2070 var PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end';
2071 var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start';
2072 var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start';
2073 var Default$2 = {
2074 offset: 0,
2075 flip: true,
2076 boundary: 'clippingParents',
2077 reference: 'toggle',
2078 display: 'dynamic',
2079 popperConfig: null
2080 };
2081 var DefaultType$2 = {
2082 offset: '(number|string|function)',
2083 flip: 'boolean',
2084 boundary: '(string|element)',
2085 reference: '(string|element)',
2086 display: 'string',
2087 popperConfig: '(null|object)'
2088 };
2089
2090
2091
2092
2093
2094
2095 var Dropdown = function (_BaseComponent) {
2096 _inheritsLoose(Dropdown, _BaseComponent);
2097
2098 function Dropdown(element, config) {
2099 var _this;
2100
2101 _this = _BaseComponent.call(this, element) || this;
2102 _this._popper = null;
2103 _this._config = _this._getConfig(config);
2104 _this._menu = _this._getMenuElement();
2105 _this._inNavbar = _this._detectNavbar();
2106
2107 _this._addEventListeners();
2108
2109 return _this;
2110 }
2111
2112
2113 var _proto = Dropdown.prototype;
2114
2115
2116 _proto.toggle = function toggle() {
2117 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
2118 return;
2119 }
2120
2121 var isActive = this._element.classList.contains(CLASS_NAME_SHOW$1);
2122
2123 Dropdown.clearMenus();
2124
2125 if (isActive) {
2126 return;
2127 }
2128
2129 this.show();
2130 };
2131
2132 _proto.show = function show() {
2133 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
2134 return;
2135 }
2136
2137 var parent = Dropdown.getParentFromElement(this._element);
2138 var relatedTarget = {
2139 relatedTarget: this._element
2140 };
2141 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, relatedTarget);
2142
2143 if (showEvent.defaultPrevented) {
2144 return;
2145 }
2146
2147
2148 if (!this._inNavbar) {
2149 if (typeof Popper === 'undefined') {
2150 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
2151 }
2152
2153 var referenceElement = this._element;
2154
2155 if (this._config.reference === 'parent') {
2156 referenceElement = parent;
2157 } else if (isElement(this._config.reference)) {
2158 referenceElement = this._config.reference;
2159
2160 if (typeof this._config.reference.jquery !== 'undefined') {
2161 referenceElement = this._config.reference[0];
2162 }
2163 }
2164
2165 this._popper = createPopper(referenceElement, this._menu, this._getPopperConfig());
2166 }
2167
2168
2169
2170
2171
2172 if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
2173 var _ref;
2174
2175 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
2176 return EventHandler.on(elem, 'mouseover', null, noop());
2177 });
2178 }
2179
2180 this._element.focus();
2181
2182 this._element.setAttribute('aria-expanded', true);
2183
2184 this._menu.classList.toggle(CLASS_NAME_SHOW$1);
2185
2186 this._element.classList.toggle(CLASS_NAME_SHOW$1);
2187
2188 EventHandler.trigger(parent, EVENT_SHOWN$1, relatedTarget);
2189 };
2190
2191 _proto.hide = function hide() {
2192 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
2193 return;
2194 }
2195
2196 var parent = Dropdown.getParentFromElement(this._element);
2197 var relatedTarget = {
2198 relatedTarget: this._element
2199 };
2200 var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
2201
2202 if (hideEvent.defaultPrevented) {
2203 return;
2204 }
2205
2206 if (this._popper) {
2207 this._popper.destroy();
2208 }
2209
2210 this._menu.classList.toggle(CLASS_NAME_SHOW$1);
2211
2212 this._element.classList.toggle(CLASS_NAME_SHOW$1);
2213
2214 EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
2215 };
2216
2217 _proto.dispose = function dispose() {
2218 _BaseComponent.prototype.dispose.call(this);
2219
2220 EventHandler.off(this._element, EVENT_KEY$4);
2221 this._menu = null;
2222
2223 if (this._popper) {
2224 this._popper.destroy();
2225
2226 this._popper = null;
2227 }
2228 };
2229
2230 _proto.update = function update() {
2231 this._inNavbar = this._detectNavbar();
2232
2233 if (this._popper) {
2234 this._popper.update();
2235 }
2236 }
2237 ;
2238
2239 _proto._addEventListeners = function _addEventListeners() {
2240 var _this2 = this;
2241
2242 EventHandler.on(this._element, EVENT_CLICK, function (event) {
2243 event.preventDefault();
2244 event.stopPropagation();
2245
2246 _this2.toggle();
2247 });
2248 };
2249
2250 _proto._getConfig = function _getConfig(config) {
2251 config = _extends({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
2252 typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
2253 return config;
2254 };
2255
2256 _proto._getMenuElement = function _getMenuElement() {
2257 return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
2258 };
2259
2260 _proto._getPlacement = function _getPlacement() {
2261 var parentDropdown = this._element.parentNode;
2262
2263 if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
2264 return PLACEMENT_RIGHT;
2265 }
2266
2267 if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
2268 return PLACEMENT_LEFT;
2269 }
2270
2271
2272 var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
2273
2274 if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
2275 return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
2276 }
2277
2278 return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
2279 };
2280
2281 _proto._detectNavbar = function _detectNavbar() {
2282 return this._element.closest("." + CLASS_NAME_NAVBAR) !== null;
2283 };
2284
2285 _proto._getPopperConfig = function _getPopperConfig() {
2286 var popperConfig = {
2287 placement: this._getPlacement(),
2288 modifiers: [{
2289 name: 'preventOverflow',
2290 options: {
2291 altBoundary: this._config.flip,
2292 rootBoundary: this._config.boundary
2293 }
2294 }]
2295 };
2296
2297 if (this._config.display === 'static') {
2298 popperConfig.modifiers = [{
2299 name: 'applyStyles',
2300 enabled: false
2301 }];
2302 }
2303
2304 return _extends({}, popperConfig, this._config.popperConfig);
2305 }
2306 ;
2307
2308 Dropdown.dropdownInterface = function dropdownInterface(element, config) {
2309 var data = Data.getData(element, DATA_KEY$4);
2310
2311 var _config = typeof config === 'object' ? config : null;
2312
2313 if (!data) {
2314 data = new Dropdown(element, _config);
2315 }
2316
2317 if (typeof config === 'string') {
2318 if (typeof data[config] === 'undefined') {
2319 throw new TypeError("No method named \"" + config + "\"");
2320 }
2321
2322 data[config]();
2323 }
2324 };
2325
2326 Dropdown.jQueryInterface = function jQueryInterface(config) {
2327 return this.each(function () {
2328 Dropdown.dropdownInterface(this, config);
2329 });
2330 };
2331
2332 Dropdown.clearMenus = function clearMenus(event) {
2333 if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
2334 return;
2335 }
2336
2337 var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2);
2338
2339 for (var i = 0, len = toggles.length; i < len; i++) {
2340 var parent = Dropdown.getParentFromElement(toggles[i]);
2341 var context = Data.getData(toggles[i], DATA_KEY$4);
2342 var relatedTarget = {
2343 relatedTarget: toggles[i]
2344 };
2345
2346 if (event && event.type === 'click') {
2347 relatedTarget.clickEvent = event;
2348 }
2349
2350 if (!context) {
2351 continue;
2352 }
2353
2354 var dropdownMenu = context._menu;
2355
2356 if (!toggles[i].classList.contains(CLASS_NAME_SHOW$1)) {
2357 continue;
2358 }
2359
2360 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
2361 continue;
2362 }
2363
2364 var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
2365
2366 if (hideEvent.defaultPrevented) {
2367 continue;
2368 }
2369
2370
2371
2372 if ('ontouchstart' in document.documentElement) {
2373 var _ref2;
2374
2375 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
2376 return EventHandler.off(elem, 'mouseover', null, noop());
2377 });
2378 }
2379
2380 toggles[i].setAttribute('aria-expanded', 'false');
2381
2382 if (context._popper) {
2383 context._popper.destroy();
2384 }
2385
2386 dropdownMenu.classList.remove(CLASS_NAME_SHOW$1);
2387 toggles[i].classList.remove(CLASS_NAME_SHOW$1);
2388 EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
2389 }
2390 };
2391
2392 Dropdown.getParentFromElement = function getParentFromElement(element) {
2393 return getElementFromSelector(element) || element.parentNode;
2394 };
2395
2396 Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
2397
2398
2399
2400
2401
2402
2403
2404 if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
2405 return;
2406 }
2407
2408 event.preventDefault();
2409 event.stopPropagation();
2410
2411 if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
2412 return;
2413 }
2414
2415 var parent = Dropdown.getParentFromElement(this);
2416 var isActive = this.classList.contains(CLASS_NAME_SHOW$1);
2417
2418 if (event.key === ESCAPE_KEY) {
2419 var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];
2420 button.focus();
2421 Dropdown.clearMenus();
2422 return;
2423 }
2424
2425 if (!isActive || event.key === SPACE_KEY) {
2426 Dropdown.clearMenus();
2427 return;
2428 }
2429
2430 var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
2431
2432 if (!items.length) {
2433 return;
2434 }
2435
2436 var index = items.indexOf(event.target);
2437
2438 if (event.key === ARROW_UP_KEY && index > 0) {
2439 index--;
2440 }
2441
2442
2443 if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
2444 index++;
2445 }
2446
2447
2448 index = index === -1 ? 0 : index;
2449 items[index].focus();
2450 };
2451
2452 _createClass(Dropdown, null, [{
2453 key: "Default",
2454 get: function get() {
2455 return Default$2;
2456 }
2457 }, {
2458 key: "DefaultType",
2459 get: function get() {
2460 return DefaultType$2;
2461 }
2462 }, {
2463 key: "DATA_KEY",
2464 get: function get() {
2465 return DATA_KEY$4;
2466 }
2467 }]);
2468
2469 return Dropdown;
2470 }(BaseComponent);
2471
2472
2473
2474
2475
2476
2477
2478 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown.dataApiKeydownHandler);
2479 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2480 EventHandler.on(document, EVENT_CLICK_DATA_API$4, Dropdown.clearMenus);
2481 EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2482 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
2483 event.preventDefault();
2484 event.stopPropagation();
2485 Dropdown.dropdownInterface(this, 'toggle');
2486 });
2487 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
2488 return e.stopPropagation();
2489 });
2490
2491
2492
2493
2494
2495
2496
2497 onDOMContentLoaded(function () {
2498 var $ = getjQuery();
2499
2500
2501 if ($) {
2502 var JQUERY_NO_CONFLICT = $.fn[NAME$4];
2503 $.fn[NAME$4] = Dropdown.jQueryInterface;
2504 $.fn[NAME$4].Constructor = Dropdown;
2505
2506 $.fn[NAME$4].noConflict = function () {
2507 $.fn[NAME$4] = JQUERY_NO_CONFLICT;
2508 return Dropdown.jQueryInterface;
2509 };
2510 }
2511 });
2512
2513
2514
2515
2516
2517
2518
2519 var NAME$5 = 'modal';
2520 var DATA_KEY$5 = 'bs.modal';
2521 var EVENT_KEY$5 = "." + DATA_KEY$5;
2522 var DATA_API_KEY$5 = '.data-api';
2523 var ESCAPE_KEY$1 = 'Escape';
2524 var Default$3 = {
2525 backdrop: true,
2526 keyboard: true,
2527 focus: true
2528 };
2529 var DefaultType$3 = {
2530 backdrop: '(boolean|string)',
2531 keyboard: 'boolean',
2532 focus: 'boolean'
2533 };
2534 var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
2535 var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
2536 var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
2537 var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
2538 var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
2539 var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
2540 var EVENT_RESIZE = "resize" + EVENT_KEY$5;
2541 var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$5;
2542 var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
2543 var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
2544 var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
2545 var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5;
2546 var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
2547 var CLASS_NAME_BACKDROP = 'modal-backdrop';
2548 var CLASS_NAME_OPEN = 'modal-open';
2549 var CLASS_NAME_FADE = 'fade';
2550 var CLASS_NAME_SHOW$2 = 'show';
2551 var CLASS_NAME_STATIC = 'modal-static';
2552 var SELECTOR_DIALOG = '.modal-dialog';
2553 var SELECTOR_MODAL_BODY = '.modal-body';
2554 var SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="modal"]';
2555 var SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
2556 var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2557 var SELECTOR_STICKY_CONTENT = '.sticky-top';
2558
2559
2560
2561
2562
2563
2564 var Modal = function (_BaseComponent) {
2565 _inheritsLoose(Modal, _BaseComponent);
2566
2567 function Modal(element, config) {
2568 var _this;
2569
2570 _this = _BaseComponent.call(this, element) || this;
2571 _this._config = _this._getConfig(config);
2572 _this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
2573 _this._backdrop = null;
2574 _this._isShown = false;
2575 _this._isBodyOverflowing = false;
2576 _this._ignoreBackdropClick = false;
2577 _this._isTransitioning = false;
2578 _this._scrollbarWidth = 0;
2579 return _this;
2580 }
2581
2582
2583 var _proto = Modal.prototype;
2584
2585
2586 _proto.toggle = function toggle(relatedTarget) {
2587 return this._isShown ? this.hide() : this.show(relatedTarget);
2588 };
2589
2590 _proto.show = function show(relatedTarget) {
2591 var _this2 = this;
2592
2593 if (this._isShown || this._isTransitioning) {
2594 return;
2595 }
2596
2597 if (this._element.classList.contains(CLASS_NAME_FADE)) {
2598 this._isTransitioning = true;
2599 }
2600
2601 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
2602 relatedTarget: relatedTarget
2603 });
2604
2605 if (this._isShown || showEvent.defaultPrevented) {
2606 return;
2607 }
2608
2609 this._isShown = true;
2610
2611 this._checkScrollbar();
2612
2613 this._setScrollbar();
2614
2615 this._adjustDialog();
2616
2617 this._setEscapeEvent();
2618
2619 this._setResizeEvent();
2620
2621 EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
2622 return _this2.hide(event);
2623 });
2624 EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
2625 EventHandler.one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) {
2626 if (event.target === _this2._element) {
2627 _this2._ignoreBackdropClick = true;
2628 }
2629 });
2630 });
2631
2632 this._showBackdrop(function () {
2633 return _this2._showElement(relatedTarget);
2634 });
2635 };
2636
2637 _proto.hide = function hide(event) {
2638 var _this3 = this;
2639
2640 if (event) {
2641 event.preventDefault();
2642 }
2643
2644 if (!this._isShown || this._isTransitioning) {
2645 return;
2646 }
2647
2648 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
2649
2650 if (hideEvent.defaultPrevented) {
2651 return;
2652 }
2653
2654 this._isShown = false;
2655
2656 var transition = this._element.classList.contains(CLASS_NAME_FADE);
2657
2658 if (transition) {
2659 this._isTransitioning = true;
2660 }
2661
2662 this._setEscapeEvent();
2663
2664 this._setResizeEvent();
2665
2666 EventHandler.off(document, EVENT_FOCUSIN);
2667
2668 this._element.classList.remove(CLASS_NAME_SHOW$2);
2669
2670 EventHandler.off(this._element, EVENT_CLICK_DISMISS);
2671 EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
2672
2673 if (transition) {
2674 var transitionDuration = getTransitionDurationFromElement(this._element);
2675 EventHandler.one(this._element, TRANSITION_END, function (event) {
2676 return _this3._hideModal(event);
2677 });
2678 emulateTransitionEnd(this._element, transitionDuration);
2679 } else {
2680 this._hideModal();
2681 }
2682 };
2683
2684 _proto.dispose = function dispose() {
2685 [window, this._element, this._dialog].forEach(function (htmlElement) {
2686 return EventHandler.off(htmlElement, EVENT_KEY$5);
2687 });
2688
2689 _BaseComponent.prototype.dispose.call(this);
2690
2691
2692
2693
2694
2695
2696
2697 EventHandler.off(document, EVENT_FOCUSIN);
2698 this._config = null;
2699 this._dialog = null;
2700 this._backdrop = null;
2701 this._isShown = null;
2702 this._isBodyOverflowing = null;
2703 this._ignoreBackdropClick = null;
2704 this._isTransitioning = null;
2705 this._scrollbarWidth = null;
2706 };
2707
2708 _proto.handleUpdate = function handleUpdate() {
2709 this._adjustDialog();
2710 }
2711 ;
2712
2713 _proto._getConfig = function _getConfig(config) {
2714 config = _extends({}, Default$3, config);
2715 typeCheckConfig(NAME$5, config, DefaultType$3);
2716 return config;
2717 };
2718
2719 _proto._showElement = function _showElement(relatedTarget) {
2720 var _this4 = this;
2721
2722 var transition = this._element.classList.contains(CLASS_NAME_FADE);
2723
2724 var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2725
2726 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2727
2728 document.body.appendChild(this._element);
2729 }
2730
2731 this._element.style.display = 'block';
2732
2733 this._element.removeAttribute('aria-hidden');
2734
2735 this._element.setAttribute('aria-modal', true);
2736
2737 this._element.setAttribute('role', 'dialog');
2738
2739 this._element.scrollTop = 0;
2740
2741 if (modalBody) {
2742 modalBody.scrollTop = 0;
2743 }
2744
2745 if (transition) {
2746 reflow(this._element);
2747 }
2748
2749 this._element.classList.add(CLASS_NAME_SHOW$2);
2750
2751 if (this._config.focus) {
2752 this._enforceFocus();
2753 }
2754
2755 var transitionComplete = function transitionComplete() {
2756 if (_this4._config.focus) {
2757 _this4._element.focus();
2758 }
2759
2760 _this4._isTransitioning = false;
2761 EventHandler.trigger(_this4._element, EVENT_SHOWN$2, {
2762 relatedTarget: relatedTarget
2763 });
2764 };
2765
2766 if (transition) {
2767 var transitionDuration = getTransitionDurationFromElement(this._dialog);
2768 EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
2769 emulateTransitionEnd(this._dialog, transitionDuration);
2770 } else {
2771 transitionComplete();
2772 }
2773 };
2774
2775 _proto._enforceFocus = function _enforceFocus() {
2776 var _this5 = this;
2777
2778 EventHandler.off(document, EVENT_FOCUSIN);
2779
2780 EventHandler.on(document, EVENT_FOCUSIN, function (event) {
2781 if (document !== event.target && _this5._element !== event.target && !_this5._element.contains(event.target)) {
2782 _this5._element.focus();
2783 }
2784 });
2785 };
2786
2787 _proto._setEscapeEvent = function _setEscapeEvent() {
2788 var _this6 = this;
2789
2790 if (this._isShown) {
2791 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
2792 if (_this6._config.keyboard && event.key === ESCAPE_KEY$1) {
2793 event.preventDefault();
2794
2795 _this6.hide();
2796 } else if (!_this6._config.keyboard && event.key === ESCAPE_KEY$1) {
2797 _this6._triggerBackdropTransition();
2798 }
2799 });
2800 } else {
2801 EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
2802 }
2803 };
2804
2805 _proto._setResizeEvent = function _setResizeEvent() {
2806 var _this7 = this;
2807
2808 if (this._isShown) {
2809 EventHandler.on(window, EVENT_RESIZE, function () {
2810 return _this7._adjustDialog();
2811 });
2812 } else {
2813 EventHandler.off(window, EVENT_RESIZE);
2814 }
2815 };
2816
2817 _proto._hideModal = function _hideModal() {
2818 var _this8 = this;
2819
2820 this._element.style.display = 'none';
2821
2822 this._element.setAttribute('aria-hidden', true);
2823
2824 this._element.removeAttribute('aria-modal');
2825
2826 this._element.removeAttribute('role');
2827
2828 this._isTransitioning = false;
2829
2830 this._showBackdrop(function () {
2831 document.body.classList.remove(CLASS_NAME_OPEN);
2832
2833 _this8._resetAdjustments();
2834
2835 _this8._resetScrollbar();
2836
2837 EventHandler.trigger(_this8._element, EVENT_HIDDEN$2);
2838 });
2839 };
2840
2841 _proto._removeBackdrop = function _removeBackdrop() {
2842 this._backdrop.parentNode.removeChild(this._backdrop);
2843
2844 this._backdrop = null;
2845 };
2846
2847 _proto._showBackdrop = function _showBackdrop(callback) {
2848 var _this9 = this;
2849
2850 var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
2851
2852 if (this._isShown && this._config.backdrop) {
2853 this._backdrop = document.createElement('div');
2854 this._backdrop.className = CLASS_NAME_BACKDROP;
2855
2856 if (animate) {
2857 this._backdrop.classList.add(animate);
2858 }
2859
2860 document.body.appendChild(this._backdrop);
2861 EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
2862 if (_this9._ignoreBackdropClick) {
2863 _this9._ignoreBackdropClick = false;
2864 return;
2865 }
2866
2867 if (event.target !== event.currentTarget) {
2868 return;
2869 }
2870
2871 if (_this9._config.backdrop === 'static') {
2872 _this9._triggerBackdropTransition();
2873 } else {
2874 _this9.hide();
2875 }
2876 });
2877
2878 if (animate) {
2879 reflow(this._backdrop);
2880 }
2881
2882 this._backdrop.classList.add(CLASS_NAME_SHOW$2);
2883
2884 if (!animate) {
2885 callback();
2886 return;
2887 }
2888
2889 var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
2890 EventHandler.one(this._backdrop, TRANSITION_END, callback);
2891 emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
2892 } else if (!this._isShown && this._backdrop) {
2893 this._backdrop.classList.remove(CLASS_NAME_SHOW$2);
2894
2895 var callbackRemove = function callbackRemove() {
2896 _this9._removeBackdrop();
2897
2898 callback();
2899 };
2900
2901 if (this._element.classList.contains(CLASS_NAME_FADE)) {
2902 var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
2903
2904 EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
2905 emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
2906 } else {
2907 callbackRemove();
2908 }
2909 } else {
2910 callback();
2911 }
2912 };
2913
2914 _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
2915 var _this10 = this;
2916
2917 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2918
2919 if (hideEvent.defaultPrevented) {
2920 return;
2921 }
2922
2923 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2924
2925 if (!isModalOverflowing) {
2926 this._element.style.overflowY = 'hidden';
2927 }
2928
2929 this._element.classList.add(CLASS_NAME_STATIC);
2930
2931 var modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
2932 EventHandler.off(this._element, TRANSITION_END);
2933 EventHandler.one(this._element, TRANSITION_END, function () {
2934 _this10._element.classList.remove(CLASS_NAME_STATIC);
2935
2936 if (!isModalOverflowing) {
2937 EventHandler.one(_this10._element, TRANSITION_END, function () {
2938 _this10._element.style.overflowY = '';
2939 });
2940 emulateTransitionEnd(_this10._element, modalTransitionDuration);
2941 }
2942 });
2943 emulateTransitionEnd(this._element, modalTransitionDuration);
2944
2945 this._element.focus();
2946 }
2947
2948
2949 ;
2950
2951 _proto._adjustDialog = function _adjustDialog() {
2952 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2953
2954 if (!this._isBodyOverflowing && isModalOverflowing && !isRTL || this._isBodyOverflowing && !isModalOverflowing && isRTL) {
2955 this._element.style.paddingLeft = this._scrollbarWidth + "px";
2956 }
2957
2958 if (this._isBodyOverflowing && !isModalOverflowing && !isRTL || !this._isBodyOverflowing && isModalOverflowing && isRTL) {
2959 this._element.style.paddingRight = this._scrollbarWidth + "px";
2960 }
2961 };
2962
2963 _proto._resetAdjustments = function _resetAdjustments() {
2964 this._element.style.paddingLeft = '';
2965 this._element.style.paddingRight = '';
2966 };
2967
2968 _proto._checkScrollbar = function _checkScrollbar() {
2969 var rect = document.body.getBoundingClientRect();
2970 this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
2971 this._scrollbarWidth = this._getScrollbarWidth();
2972 };
2973
2974 _proto._setScrollbar = function _setScrollbar() {
2975 var _this11 = this;
2976
2977 if (this._isBodyOverflowing) {
2978
2979
2980
2981 SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
2982 var actualPadding = element.style.paddingRight;
2983 var calculatedPadding = window.getComputedStyle(element)['padding-right'];
2984 Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
2985 element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px";
2986 });
2987
2988 SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
2989 var actualMargin = element.style.marginRight;
2990 var calculatedMargin = window.getComputedStyle(element)['margin-right'];
2991 Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
2992 element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px";
2993 });
2994
2995 var actualPadding = document.body.style.paddingRight;
2996 var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
2997 Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
2998 document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
2999 }
3000
3001 document.body.classList.add(CLASS_NAME_OPEN);
3002 };
3003
3004 _proto._resetScrollbar = function _resetScrollbar() {
3005
3006 SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
3007 var padding = Manipulator.getDataAttribute(element, 'padding-right');
3008
3009 if (typeof padding !== 'undefined') {
3010 Manipulator.removeDataAttribute(element, 'padding-right');
3011 element.style.paddingRight = padding;
3012 }
3013 });
3014
3015 SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
3016 var margin = Manipulator.getDataAttribute(element, 'margin-right');
3017
3018 if (typeof margin !== 'undefined') {
3019 Manipulator.removeDataAttribute(element, 'margin-right');
3020 element.style.marginRight = margin;
3021 }
3022 });
3023
3024 var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
3025
3026 if (typeof padding === 'undefined') {
3027 document.body.style.paddingRight = '';
3028 } else {
3029 Manipulator.removeDataAttribute(document.body, 'padding-right');
3030 document.body.style.paddingRight = padding;
3031 }
3032 };
3033
3034 _proto._getScrollbarWidth = function _getScrollbarWidth() {
3035
3036 var scrollDiv = document.createElement('div');
3037 scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
3038 document.body.appendChild(scrollDiv);
3039 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
3040 document.body.removeChild(scrollDiv);
3041 return scrollbarWidth;
3042 }
3043 ;
3044
3045 Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
3046 return this.each(function () {
3047 var data = Data.getData(this, DATA_KEY$5);
3048
3049 var _config = _extends({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
3050
3051 if (!data) {
3052 data = new Modal(this, _config);
3053 }
3054
3055 if (typeof config === 'string') {
3056 if (typeof data[config] === 'undefined') {
3057 throw new TypeError("No method named \"" + config + "\"");
3058 }
3059
3060 data[config](relatedTarget);
3061 }
3062 });
3063 };
3064
3065 _createClass(Modal, null, [{
3066 key: "Default",
3067 get: function get() {
3068 return Default$3;
3069 }
3070 }, {
3071 key: "DATA_KEY",
3072 get: function get() {
3073 return DATA_KEY$5;
3074 }
3075 }]);
3076
3077 return Modal;
3078 }(BaseComponent);
3079
3080
3081
3082
3083
3084
3085
3086 EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
3087 var _this12 = this;
3088
3089 var target = getElementFromSelector(this);
3090
3091 if (this.tagName === 'A' || this.tagName === 'AREA') {
3092 event.preventDefault();
3093 }
3094
3095 EventHandler.one(target, EVENT_SHOW$2, function (showEvent) {
3096 if (showEvent.defaultPrevented) {
3097
3098 return;
3099 }
3100
3101 EventHandler.one(target, EVENT_HIDDEN$2, function () {
3102 if (isVisible(_this12)) {
3103 _this12.focus();
3104 }
3105 });
3106 });
3107 var data = Data.getData(target, DATA_KEY$5);
3108
3109 if (!data) {
3110 var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
3111
3112 data = new Modal(target, config);
3113 }
3114
3115 data.show(this);
3116 });
3117
3118
3119
3120
3121
3122
3123
3124 onDOMContentLoaded(function () {
3125 var $ = getjQuery();
3126
3127
3128 if ($) {
3129 var JQUERY_NO_CONFLICT = $.fn[NAME$5];
3130 $.fn[NAME$5] = Modal.jQueryInterface;
3131 $.fn[NAME$5].Constructor = Modal;
3132
3133 $.fn[NAME$5].noConflict = function () {
3134 $.fn[NAME$5] = JQUERY_NO_CONFLICT;
3135 return Modal.jQueryInterface;
3136 };
3137 }
3138 });
3139
3140
3141
3142
3143
3144
3145
3146 var uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3147 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3148
3149
3150
3151
3152
3153
3154 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
3155
3156
3157
3158
3159
3160
3161 var 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;
3162
3163 var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
3164 var attrName = attr.nodeName.toLowerCase();
3165
3166 if (allowedAttributeList.includes(attrName)) {
3167 if (uriAttrs.has(attrName)) {
3168 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
3169 }
3170
3171 return true;
3172 }
3173
3174 var regExp = allowedAttributeList.filter(function (attrRegex) {
3175 return attrRegex instanceof RegExp;
3176 });
3177
3178 for (var i = 0, len = regExp.length; i < len; i++) {
3179 if (attrName.match(regExp[i])) {
3180 return true;
3181 }
3182 }
3183
3184 return false;
3185 };
3186
3187 var DefaultAllowlist = {
3188
3189 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
3190 a: ['target', 'href', 'title', 'rel'],
3191 area: [],
3192 b: [],
3193 br: [],
3194 col: [],
3195 code: [],
3196 div: [],
3197 em: [],
3198 hr: [],
3199 h1: [],
3200 h2: [],
3201 h3: [],
3202 h4: [],
3203 h5: [],
3204 h6: [],
3205 i: [],
3206 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
3207 li: [],
3208 ol: [],
3209 p: [],
3210 pre: [],
3211 s: [],
3212 small: [],
3213 span: [],
3214 sub: [],
3215 sup: [],
3216 strong: [],
3217 u: [],
3218 ul: []
3219 };
3220 function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
3221 var _ref;
3222
3223 if (!unsafeHtml.length) {
3224 return unsafeHtml;
3225 }
3226
3227 if (sanitizeFn && typeof sanitizeFn === 'function') {
3228 return sanitizeFn(unsafeHtml);
3229 }
3230
3231 var domParser = new window.DOMParser();
3232 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3233 var allowlistKeys = Object.keys(allowList);
3234
3235 var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
3236
3237 var _loop = function _loop(i, len) {
3238 var _ref2;
3239
3240 var el = elements[i];
3241 var elName = el.nodeName.toLowerCase();
3242
3243 if (!allowlistKeys.includes(elName)) {
3244 el.parentNode.removeChild(el);
3245 return "continue";
3246 }
3247
3248 var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
3249
3250 var allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
3251 attributeList.forEach(function (attr) {
3252 if (!allowedAttribute(attr, allowedAttributes)) {
3253 el.removeAttribute(attr.nodeName);
3254 }
3255 });
3256 };
3257
3258 for (var i = 0, len = elements.length; i < len; i++) {
3259 var _ret = _loop(i);
3260
3261 if (_ret === "continue") continue;
3262 }
3263
3264 return createdDocument.body.innerHTML;
3265 }
3266
3267
3268
3269
3270
3271
3272
3273 var NAME$6 = 'tooltip';
3274 var DATA_KEY$6 = 'bs.tooltip';
3275 var EVENT_KEY$6 = "." + DATA_KEY$6;
3276 var CLASS_PREFIX = 'bs-tooltip';
3277 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
3278 var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3279 var DefaultType$4 = {
3280 animation: 'boolean',
3281 template: 'string',
3282 title: '(string|element|function)',
3283 trigger: 'string',
3284 delay: '(number|object)',
3285 html: 'boolean',
3286 selector: '(string|boolean)',
3287 placement: '(string|function)',
3288 container: '(string|element|boolean)',
3289 fallbackPlacements: '(null|array)',
3290 boundary: '(string|element)',
3291 customClass: '(string|function)',
3292 sanitize: 'boolean',
3293 sanitizeFn: '(null|function)',
3294 allowList: 'object',
3295 popperConfig: '(null|object)'
3296 };
3297 var AttachmentMap = {
3298 AUTO: 'auto',
3299 TOP: 'top',
3300 RIGHT: isRTL ? 'left' : 'right',
3301 BOTTOM: 'bottom',
3302 LEFT: isRTL ? 'right' : 'left'
3303 };
3304 var Default$4 = {
3305 animation: true,
3306 template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3307 trigger: 'hover focus',
3308 title: '',
3309 delay: 0,
3310 html: false,
3311 selector: false,
3312 placement: 'top',
3313 container: false,
3314 fallbackPlacements: null,
3315 boundary: 'clippingParents',
3316 customClass: '',
3317 sanitize: true,
3318 sanitizeFn: null,
3319 allowList: DefaultAllowlist,
3320 popperConfig: null
3321 };
3322 var Event$1 = {
3323 HIDE: "hide" + EVENT_KEY$6,
3324 HIDDEN: "hidden" + EVENT_KEY$6,
3325 SHOW: "show" + EVENT_KEY$6,
3326 SHOWN: "shown" + EVENT_KEY$6,
3327 INSERTED: "inserted" + EVENT_KEY$6,
3328 CLICK: "click" + EVENT_KEY$6,
3329 FOCUSIN: "focusin" + EVENT_KEY$6,
3330 FOCUSOUT: "focusout" + EVENT_KEY$6,
3331 MOUSEENTER: "mouseenter" + EVENT_KEY$6,
3332 MOUSELEAVE: "mouseleave" + EVENT_KEY$6
3333 };
3334 var CLASS_NAME_FADE$1 = 'fade';
3335 var CLASS_NAME_MODAL = 'modal';
3336 var CLASS_NAME_SHOW$3 = 'show';
3337 var HOVER_STATE_SHOW = 'show';
3338 var HOVER_STATE_OUT = 'out';
3339 var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3340 var TRIGGER_HOVER = 'hover';
3341 var TRIGGER_FOCUS = 'focus';
3342 var TRIGGER_CLICK = 'click';
3343 var TRIGGER_MANUAL = 'manual';
3344
3345
3346
3347
3348
3349
3350 var Tooltip = function (_BaseComponent) {
3351 _inheritsLoose(Tooltip, _BaseComponent);
3352
3353 function Tooltip(element, config) {
3354 var _this;
3355
3356 if (typeof Popper === 'undefined') {
3357 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
3358 }
3359
3360 _this = _BaseComponent.call(this, element) || this;
3361
3362 _this._isEnabled = true;
3363 _this._timeout = 0;
3364 _this._hoverState = '';
3365 _this._activeTrigger = {};
3366 _this._popper = null;
3367
3368 _this.config = _this._getConfig(config);
3369 _this.tip = null;
3370
3371 _this._setListeners();
3372
3373 return _this;
3374 }
3375
3376
3377 var _proto = Tooltip.prototype;
3378
3379
3380 _proto.enable = function enable() {
3381 this._isEnabled = true;
3382 };
3383
3384 _proto.disable = function disable() {
3385 this._isEnabled = false;
3386 };
3387
3388 _proto.toggleEnabled = function toggleEnabled() {
3389 this._isEnabled = !this._isEnabled;
3390 };
3391
3392 _proto.toggle = function toggle(event) {
3393 if (!this._isEnabled) {
3394 return;
3395 }
3396
3397 if (event) {
3398 var dataKey = this.constructor.DATA_KEY;
3399 var context = Data.getData(event.delegateTarget, dataKey);
3400
3401 if (!context) {
3402 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3403 Data.setData(event.delegateTarget, dataKey, context);
3404 }
3405
3406 context._activeTrigger.click = !context._activeTrigger.click;
3407
3408 if (context._isWithActiveTrigger()) {
3409 context._enter(null, context);
3410 } else {
3411 context._leave(null, context);
3412 }
3413 } else {
3414 if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
3415 this._leave(null, this);
3416
3417 return;
3418 }
3419
3420 this._enter(null, this);
3421 }
3422 };
3423
3424 _proto.dispose = function dispose() {
3425 clearTimeout(this._timeout);
3426 EventHandler.off(this._element, this.constructor.EVENT_KEY);
3427 EventHandler.off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
3428
3429 if (this.tip) {
3430 this.tip.parentNode.removeChild(this.tip);
3431 }
3432
3433 this._isEnabled = null;
3434 this._timeout = null;
3435 this._hoverState = null;
3436 this._activeTrigger = null;
3437
3438 if (this._popper) {
3439 this._popper.destroy();
3440 }
3441
3442 this._popper = null;
3443 this.config = null;
3444 this.tip = null;
3445
3446 _BaseComponent.prototype.dispose.call(this);
3447 };
3448
3449 _proto.show = function show() {
3450 var _this2 = this;
3451
3452 if (this._element.style.display === 'none') {
3453 throw new Error('Please use show on visible elements');
3454 }
3455
3456 if (this.isWithContent() && this._isEnabled) {
3457 var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
3458 var shadowRoot = findShadowRoot(this._element);
3459 var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
3460
3461 if (showEvent.defaultPrevented || !isInTheDom) {
3462 return;
3463 }
3464
3465 var tip = this.getTipElement();
3466 var tipId = getUID(this.constructor.NAME);
3467 tip.setAttribute('id', tipId);
3468
3469 this._element.setAttribute('aria-describedby', tipId);
3470
3471 this.setContent();
3472
3473 if (this.config.animation) {
3474 tip.classList.add(CLASS_NAME_FADE$1);
3475 }
3476
3477 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
3478
3479 var attachment = this._getAttachment(placement);
3480
3481 this._addAttachmentClass(attachment);
3482
3483 var container = this._getContainer();
3484
3485 Data.setData(tip, this.constructor.DATA_KEY, this);
3486
3487 if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3488 container.appendChild(tip);
3489 }
3490
3491 EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
3492 this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));
3493 tip.classList.add(CLASS_NAME_SHOW$3);
3494 var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
3495
3496 if (customClass) {
3497 var _tip$classList;
3498
3499 (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' '));
3500 }
3501
3502
3503
3504
3505
3506 if ('ontouchstart' in document.documentElement) {
3507 var _ref;
3508
3509 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
3510 EventHandler.on(element, 'mouseover', noop());
3511 });
3512 }
3513
3514 var complete = function complete() {
3515 var prevHoverState = _this2._hoverState;
3516 _this2._hoverState = null;
3517 EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN);
3518
3519 if (prevHoverState === HOVER_STATE_OUT) {
3520 _this2._leave(null, _this2);
3521 }
3522 };
3523
3524 if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
3525 var transitionDuration = getTransitionDurationFromElement(this.tip);
3526 EventHandler.one(this.tip, TRANSITION_END, complete);
3527 emulateTransitionEnd(this.tip, transitionDuration);
3528 } else {
3529 complete();
3530 }
3531 }
3532 };
3533
3534 _proto.hide = function hide() {
3535 var _this3 = this;
3536
3537 if (!this._popper) {
3538 return;
3539 }
3540
3541 var tip = this.getTipElement();
3542
3543 var complete = function complete() {
3544 if (_this3._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3545 tip.parentNode.removeChild(tip);
3546 }
3547
3548 _this3._cleanTipClass();
3549
3550 _this3._element.removeAttribute('aria-describedby');
3551
3552 EventHandler.trigger(_this3._element, _this3.constructor.Event.HIDDEN);
3553
3554 if (_this3._popper) {
3555 _this3._popper.destroy();
3556
3557 _this3._popper = null;
3558 }
3559 };
3560
3561 var hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
3562
3563 if (hideEvent.defaultPrevented) {
3564 return;
3565 }
3566
3567 tip.classList.remove(CLASS_NAME_SHOW$3);
3568
3569
3570 if ('ontouchstart' in document.documentElement) {
3571 var _ref2;
3572
3573 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
3574 return EventHandler.off(element, 'mouseover', noop);
3575 });
3576 }
3577
3578 this._activeTrigger[TRIGGER_CLICK] = false;
3579 this._activeTrigger[TRIGGER_FOCUS] = false;
3580 this._activeTrigger[TRIGGER_HOVER] = false;
3581
3582 if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
3583 var transitionDuration = getTransitionDurationFromElement(tip);
3584 EventHandler.one(tip, TRANSITION_END, complete);
3585 emulateTransitionEnd(tip, transitionDuration);
3586 } else {
3587 complete();
3588 }
3589
3590 this._hoverState = '';
3591 };
3592
3593 _proto.update = function update() {
3594 if (this._popper !== null) {
3595 this._popper.update();
3596 }
3597 }
3598 ;
3599
3600 _proto.isWithContent = function isWithContent() {
3601 return Boolean(this.getTitle());
3602 };
3603
3604 _proto.getTipElement = function getTipElement() {
3605 if (this.tip) {
3606 return this.tip;
3607 }
3608
3609 var element = document.createElement('div');
3610 element.innerHTML = this.config.template;
3611 this.tip = element.children[0];
3612 return this.tip;
3613 };
3614
3615 _proto.setContent = function setContent() {
3616 var tip = this.getTipElement();
3617 this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
3618 tip.classList.remove(CLASS_NAME_FADE$1, CLASS_NAME_SHOW$3);
3619 };
3620
3621 _proto.setElementContent = function setElementContent(element, content) {
3622 if (element === null) {
3623 return;
3624 }
3625
3626 if (typeof content === 'object' && isElement(content)) {
3627 if (content.jquery) {
3628 content = content[0];
3629 }
3630
3631
3632 if (this.config.html) {
3633 if (content.parentNode !== element) {
3634 element.innerHTML = '';
3635 element.appendChild(content);
3636 }
3637 } else {
3638 element.textContent = content.textContent;
3639 }
3640
3641 return;
3642 }
3643
3644 if (this.config.html) {
3645 if (this.config.sanitize) {
3646 content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);
3647 }
3648
3649 element.innerHTML = content;
3650 } else {
3651 element.textContent = content;
3652 }
3653 };
3654
3655 _proto.getTitle = function getTitle() {
3656 var title = this._element.getAttribute('data-bs-original-title');
3657
3658 if (!title) {
3659 title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;
3660 }
3661
3662 return title;
3663 };
3664
3665 _proto.updateAttachment = function updateAttachment(attachment) {
3666 if (attachment === 'right') {
3667 return 'end';
3668 }
3669
3670 if (attachment === 'left') {
3671 return 'start';
3672 }
3673
3674 return attachment;
3675 }
3676 ;
3677
3678 _proto._getPopperConfig = function _getPopperConfig(attachment) {
3679 var _this4 = this;
3680
3681 var flipModifier = {
3682 name: 'flip',
3683 options: {
3684 altBoundary: true
3685 }
3686 };
3687
3688 if (this.config.fallbackPlacements) {
3689 flipModifier.options.fallbackPlacements = this.config.fallbackPlacements;
3690 }
3691
3692 var defaultBsConfig = {
3693 placement: attachment,
3694 modifiers: [flipModifier, {
3695 name: 'preventOverflow',
3696 options: {
3697 rootBoundary: this.config.boundary
3698 }
3699 }, {
3700 name: 'arrow',
3701 options: {
3702 element: "." + this.constructor.NAME + "-arrow"
3703 }
3704 }, {
3705 name: 'onChange',
3706 enabled: true,
3707 phase: 'afterWrite',
3708 fn: function fn(data) {
3709 return _this4._handlePopperPlacementChange(data);
3710 }
3711 }],
3712 onFirstUpdate: function onFirstUpdate(data) {
3713 if (data.options.placement !== data.placement) {
3714 _this4._handlePopperPlacementChange(data);
3715 }
3716 }
3717 };
3718 return _extends({}, defaultBsConfig, this.config.popperConfig);
3719 };
3720
3721 _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
3722 this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
3723 };
3724
3725 _proto._getContainer = function _getContainer() {
3726 if (this.config.container === false) {
3727 return document.body;
3728 }
3729
3730 if (isElement(this.config.container)) {
3731 return this.config.container;
3732 }
3733
3734 return SelectorEngine.findOne(this.config.container);
3735 };
3736
3737 _proto._getAttachment = function _getAttachment(placement) {
3738 return AttachmentMap[placement.toUpperCase()];
3739 };
3740
3741 _proto._setListeners = function _setListeners() {
3742 var _this5 = this;
3743
3744 var triggers = this.config.trigger.split(' ');
3745 triggers.forEach(function (trigger) {
3746 if (trigger === 'click') {
3747 EventHandler.on(_this5._element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
3748 return _this5.toggle(event);
3749 });
3750 } else if (trigger !== TRIGGER_MANUAL) {
3751 var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
3752 var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
3753 EventHandler.on(_this5._element, eventIn, _this5.config.selector, function (event) {
3754 return _this5._enter(event);
3755 });
3756 EventHandler.on(_this5._element, eventOut, _this5.config.selector, function (event) {
3757 return _this5._leave(event);
3758 });
3759 }
3760 });
3761
3762 this._hideModalHandler = function () {
3763 if (_this5._element) {
3764 _this5.hide();
3765 }
3766 };
3767
3768 EventHandler.on(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
3769
3770 if (this.config.selector) {
3771 this.config = _extends({}, this.config, {
3772 trigger: 'manual',
3773 selector: ''
3774 });
3775 } else {
3776 this._fixTitle();
3777 }
3778 };
3779
3780 _proto._fixTitle = function _fixTitle() {
3781 var title = this._element.getAttribute('title');
3782
3783 var originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
3784
3785 if (title || originalTitleType !== 'string') {
3786 this._element.setAttribute('data-bs-original-title', title || '');
3787
3788 if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
3789 this._element.setAttribute('aria-label', title);
3790 }
3791
3792 this._element.setAttribute('title', '');
3793 }
3794 };
3795
3796 _proto._enter = function _enter(event, context) {
3797 var dataKey = this.constructor.DATA_KEY;
3798 context = context || Data.getData(event.delegateTarget, dataKey);
3799
3800 if (!context) {
3801 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3802 Data.setData(event.delegateTarget, dataKey, context);
3803 }
3804
3805 if (event) {
3806 context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3807 }
3808
3809 if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
3810 context._hoverState = HOVER_STATE_SHOW;
3811 return;
3812 }
3813
3814 clearTimeout(context._timeout);
3815 context._hoverState = HOVER_STATE_SHOW;
3816
3817 if (!context.config.delay || !context.config.delay.show) {
3818 context.show();
3819 return;
3820 }
3821
3822 context._timeout = setTimeout(function () {
3823 if (context._hoverState === HOVER_STATE_SHOW) {
3824 context.show();
3825 }
3826 }, context.config.delay.show);
3827 };
3828
3829 _proto._leave = function _leave(event, context) {
3830 var dataKey = this.constructor.DATA_KEY;
3831 context = context || Data.getData(event.delegateTarget, dataKey);
3832
3833 if (!context) {
3834 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3835 Data.setData(event.delegateTarget, dataKey, context);
3836 }
3837
3838 if (event) {
3839 context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
3840 }
3841
3842 if (context._isWithActiveTrigger()) {
3843 return;
3844 }
3845
3846 clearTimeout(context._timeout);
3847 context._hoverState = HOVER_STATE_OUT;
3848
3849 if (!context.config.delay || !context.config.delay.hide) {
3850 context.hide();
3851 return;
3852 }
3853
3854 context._timeout = setTimeout(function () {
3855 if (context._hoverState === HOVER_STATE_OUT) {
3856 context.hide();
3857 }
3858 }, context.config.delay.hide);
3859 };
3860
3861 _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
3862 for (var trigger in this._activeTrigger) {
3863 if (this._activeTrigger[trigger]) {
3864 return true;
3865 }
3866 }
3867
3868 return false;
3869 };
3870
3871 _proto._getConfig = function _getConfig(config) {
3872 var dataAttributes = Manipulator.getDataAttributes(this._element);
3873 Object.keys(dataAttributes).forEach(function (dataAttr) {
3874 if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
3875 delete dataAttributes[dataAttr];
3876 }
3877 });
3878
3879 if (config && typeof config.container === 'object' && config.container.jquery) {
3880 config.container = config.container[0];
3881 }
3882
3883 config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
3884
3885 if (typeof config.delay === 'number') {
3886 config.delay = {
3887 show: config.delay,
3888 hide: config.delay
3889 };
3890 }
3891
3892 if (typeof config.title === 'number') {
3893 config.title = config.title.toString();
3894 }
3895
3896 if (typeof config.content === 'number') {
3897 config.content = config.content.toString();
3898 }
3899
3900 typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
3901
3902 if (config.sanitize) {
3903 config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
3904 }
3905
3906 return config;
3907 };
3908
3909 _proto._getDelegateConfig = function _getDelegateConfig() {
3910 var config = {};
3911
3912 if (this.config) {
3913 for (var key in this.config) {
3914 if (this.constructor.Default[key] !== this.config[key]) {
3915 config[key] = this.config[key];
3916 }
3917 }
3918 }
3919
3920 return config;
3921 };
3922
3923 _proto._cleanTipClass = function _cleanTipClass() {
3924 var tip = this.getTipElement();
3925 var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
3926
3927 if (tabClass !== null && tabClass.length > 0) {
3928 tabClass.map(function (token) {
3929 return token.trim();
3930 }).forEach(function (tClass) {
3931 return tip.classList.remove(tClass);
3932 });
3933 }
3934 };
3935
3936 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
3937 var state = popperData.state;
3938
3939 if (!state) {
3940 return;
3941 }
3942
3943 this.tip = state.elements.popper;
3944
3945 this._cleanTipClass();
3946
3947 this._addAttachmentClass(this._getAttachment(state.placement));
3948 }
3949 ;
3950
3951 Tooltip.jQueryInterface = function jQueryInterface(config) {
3952 return this.each(function () {
3953 var data = Data.getData(this, DATA_KEY$6);
3954
3955 var _config = typeof config === 'object' && config;
3956
3957 if (!data && /dispose|hide/.test(config)) {
3958 return;
3959 }
3960
3961 if (!data) {
3962 data = new Tooltip(this, _config);
3963 }
3964
3965 if (typeof config === 'string') {
3966 if (typeof data[config] === 'undefined') {
3967 throw new TypeError("No method named \"" + config + "\"");
3968 }
3969
3970 data[config]();
3971 }
3972 });
3973 };
3974
3975 _createClass(Tooltip, null, [{
3976 key: "Default",
3977 get: function get() {
3978 return Default$4;
3979 }
3980 }, {
3981 key: "NAME",
3982 get: function get() {
3983 return NAME$6;
3984 }
3985 }, {
3986 key: "DATA_KEY",
3987 get: function get() {
3988 return DATA_KEY$6;
3989 }
3990 }, {
3991 key: "Event",
3992 get: function get() {
3993 return Event$1;
3994 }
3995 }, {
3996 key: "EVENT_KEY",
3997 get: function get() {
3998 return EVENT_KEY$6;
3999 }
4000 }, {
4001 key: "DefaultType",
4002 get: function get() {
4003 return DefaultType$4;
4004 }
4005 }]);
4006
4007 return Tooltip;
4008 }(BaseComponent);
4009
4010
4011
4012
4013
4014
4015
4016
4017 onDOMContentLoaded(function () {
4018 var $ = getjQuery();
4019
4020
4021 if ($) {
4022 var JQUERY_NO_CONFLICT = $.fn[NAME$6];
4023 $.fn[NAME$6] = Tooltip.jQueryInterface;
4024 $.fn[NAME$6].Constructor = Tooltip;
4025
4026 $.fn[NAME$6].noConflict = function () {
4027 $.fn[NAME$6] = JQUERY_NO_CONFLICT;
4028 return Tooltip.jQueryInterface;
4029 };
4030 }
4031 });
4032
4033
4034
4035
4036
4037
4038
4039 var NAME$7 = 'popover';
4040 var DATA_KEY$7 = 'bs.popover';
4041 var EVENT_KEY$7 = "." + DATA_KEY$7;
4042 var CLASS_PREFIX$1 = 'bs-popover';
4043 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
4044
4045 var Default$5 = _extends({}, Tooltip.Default, {
4046 placement: 'right',
4047 trigger: 'click',
4048 content: '',
4049 template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
4050 });
4051
4052 var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
4053 content: '(string|element|function)'
4054 });
4055
4056 var Event$2 = {
4057 HIDE: "hide" + EVENT_KEY$7,
4058 HIDDEN: "hidden" + EVENT_KEY$7,
4059 SHOW: "show" + EVENT_KEY$7,
4060 SHOWN: "shown" + EVENT_KEY$7,
4061 INSERTED: "inserted" + EVENT_KEY$7,
4062 CLICK: "click" + EVENT_KEY$7,
4063 FOCUSIN: "focusin" + EVENT_KEY$7,
4064 FOCUSOUT: "focusout" + EVENT_KEY$7,
4065 MOUSEENTER: "mouseenter" + EVENT_KEY$7,
4066 MOUSELEAVE: "mouseleave" + EVENT_KEY$7
4067 };
4068 var CLASS_NAME_FADE$2 = 'fade';
4069 var CLASS_NAME_SHOW$4 = 'show';
4070 var SELECTOR_TITLE = '.popover-header';
4071 var SELECTOR_CONTENT = '.popover-body';
4072
4073
4074
4075
4076
4077
4078 var Popover = function (_Tooltip) {
4079 _inheritsLoose(Popover, _Tooltip);
4080
4081 function Popover() {
4082 return _Tooltip.apply(this, arguments) || this;
4083 }
4084
4085 var _proto = Popover.prototype;
4086
4087
4088 _proto.isWithContent = function isWithContent() {
4089 return this.getTitle() || this._getContent();
4090 };
4091
4092 _proto.setContent = function setContent() {
4093 var tip = this.getTipElement();
4094
4095 this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
4096
4097 var content = this._getContent();
4098
4099 if (typeof content === 'function') {
4100 content = content.call(this._element);
4101 }
4102
4103 this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
4104 tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4);
4105 }
4106 ;
4107
4108 _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
4109 this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + this.updateAttachment(attachment));
4110 };
4111
4112 _proto._getContent = function _getContent() {
4113 return this._element.getAttribute('data-bs-content') || this.config.content;
4114 };
4115
4116 _proto._cleanTipClass = function _cleanTipClass() {
4117 var tip = this.getTipElement();
4118 var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
4119
4120 if (tabClass !== null && tabClass.length > 0) {
4121 tabClass.map(function (token) {
4122 return token.trim();
4123 }).forEach(function (tClass) {
4124 return tip.classList.remove(tClass);
4125 });
4126 }
4127 }
4128 ;
4129
4130 Popover.jQueryInterface = function jQueryInterface(config) {
4131 return this.each(function () {
4132 var data = Data.getData(this, DATA_KEY$7);
4133
4134 var _config = typeof config === 'object' ? config : null;
4135
4136 if (!data && /dispose|hide/.test(config)) {
4137 return;
4138 }
4139
4140 if (!data) {
4141 data = new Popover(this, _config);
4142 Data.setData(this, DATA_KEY$7, data);
4143 }
4144
4145 if (typeof config === 'string') {
4146 if (typeof data[config] === 'undefined') {
4147 throw new TypeError("No method named \"" + config + "\"");
4148 }
4149
4150 data[config]();
4151 }
4152 });
4153 };
4154
4155 _createClass(Popover, null, [{
4156 key: "Default",
4157
4158 get: function get() {
4159 return Default$5;
4160 }
4161 }, {
4162 key: "NAME",
4163 get: function get() {
4164 return NAME$7;
4165 }
4166 }, {
4167 key: "DATA_KEY",
4168 get: function get() {
4169 return DATA_KEY$7;
4170 }
4171 }, {
4172 key: "Event",
4173 get: function get() {
4174 return Event$2;
4175 }
4176 }, {
4177 key: "EVENT_KEY",
4178 get: function get() {
4179 return EVENT_KEY$7;
4180 }
4181 }, {
4182 key: "DefaultType",
4183 get: function get() {
4184 return DefaultType$5;
4185 }
4186 }]);
4187
4188 return Popover;
4189 }(Tooltip);
4190
4191
4192
4193
4194
4195
4196
4197
4198 onDOMContentLoaded(function () {
4199 var $ = getjQuery();
4200
4201
4202 if ($) {
4203 var JQUERY_NO_CONFLICT = $.fn[NAME$7];
4204 $.fn[NAME$7] = Popover.jQueryInterface;
4205 $.fn[NAME$7].Constructor = Popover;
4206
4207 $.fn[NAME$7].noConflict = function () {
4208 $.fn[NAME$7] = JQUERY_NO_CONFLICT;
4209 return Popover.jQueryInterface;
4210 };
4211 }
4212 });
4213
4214
4215
4216
4217
4218
4219
4220 var NAME$8 = 'scrollspy';
4221 var DATA_KEY$8 = 'bs.scrollspy';
4222 var EVENT_KEY$8 = "." + DATA_KEY$8;
4223 var DATA_API_KEY$6 = '.data-api';
4224 var Default$6 = {
4225 offset: 10,
4226 method: 'auto',
4227 target: ''
4228 };
4229 var DefaultType$6 = {
4230 offset: 'number',
4231 method: 'string',
4232 target: '(string|element)'
4233 };
4234 var EVENT_ACTIVATE = "activate" + EVENT_KEY$8;
4235 var EVENT_SCROLL = "scroll" + EVENT_KEY$8;
4236 var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
4237 var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
4238 var CLASS_NAME_ACTIVE$2 = 'active';
4239 var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
4240 var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
4241 var SELECTOR_NAV_LINKS = '.nav-link';
4242 var SELECTOR_NAV_ITEMS = '.nav-item';
4243 var SELECTOR_LIST_ITEMS = '.list-group-item';
4244 var SELECTOR_DROPDOWN = '.dropdown';
4245 var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4246 var METHOD_OFFSET = 'offset';
4247 var METHOD_POSITION = 'position';
4248
4249
4250
4251
4252
4253
4254 var ScrollSpy = function (_BaseComponent) {
4255 _inheritsLoose(ScrollSpy, _BaseComponent);
4256
4257 function ScrollSpy(element, config) {
4258 var _this;
4259
4260 _this = _BaseComponent.call(this, element) || this;
4261 _this._scrollElement = element.tagName === 'BODY' ? window : element;
4262 _this._config = _this._getConfig(config);
4263 _this._selector = _this._config.target + " " + SELECTOR_NAV_LINKS + ", " + _this._config.target + " " + SELECTOR_LIST_ITEMS + ", " + _this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM;
4264 _this._offsets = [];
4265 _this._targets = [];
4266 _this._activeTarget = null;
4267 _this._scrollHeight = 0;
4268 EventHandler.on(_this._scrollElement, EVENT_SCROLL, function (event) {
4269 return _this._process(event);
4270 });
4271
4272 _this.refresh();
4273
4274 _this._process();
4275
4276 return _this;
4277 }
4278
4279
4280 var _proto = ScrollSpy.prototype;
4281
4282
4283 _proto.refresh = function refresh() {
4284 var _this2 = this;
4285
4286 var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
4287 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
4288 var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
4289 this._offsets = [];
4290 this._targets = [];
4291 this._scrollHeight = this._getScrollHeight();
4292 var targets = SelectorEngine.find(this._selector);
4293 targets.map(function (element) {
4294 var targetSelector = getSelectorFromElement(element);
4295 var target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
4296
4297 if (target) {
4298 var targetBCR = target.getBoundingClientRect();
4299
4300 if (targetBCR.width || targetBCR.height) {
4301 return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
4302 }
4303 }
4304
4305 return null;
4306 }).filter(function (item) {
4307 return item;
4308 }).sort(function (a, b) {
4309 return a[0] - b[0];
4310 }).forEach(function (item) {
4311 _this2._offsets.push(item[0]);
4312
4313 _this2._targets.push(item[1]);
4314 });
4315 };
4316
4317 _proto.dispose = function dispose() {
4318 _BaseComponent.prototype.dispose.call(this);
4319
4320 EventHandler.off(this._scrollElement, EVENT_KEY$8);
4321 this._scrollElement = null;
4322 this._config = null;
4323 this._selector = null;
4324 this._offsets = null;
4325 this._targets = null;
4326 this._activeTarget = null;
4327 this._scrollHeight = null;
4328 }
4329 ;
4330
4331 _proto._getConfig = function _getConfig(config) {
4332 config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
4333
4334 if (typeof config.target !== 'string' && isElement(config.target)) {
4335 var id = config.target.id;
4336
4337 if (!id) {
4338 id = getUID(NAME$8);
4339 config.target.id = id;
4340 }
4341
4342 config.target = "#" + id;
4343 }
4344
4345 typeCheckConfig(NAME$8, config, DefaultType$6);
4346 return config;
4347 };
4348
4349 _proto._getScrollTop = function _getScrollTop() {
4350 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
4351 };
4352
4353 _proto._getScrollHeight = function _getScrollHeight() {
4354 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
4355 };
4356
4357 _proto._getOffsetHeight = function _getOffsetHeight() {
4358 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
4359 };
4360
4361 _proto._process = function _process() {
4362 var scrollTop = this._getScrollTop() + this._config.offset;
4363
4364 var scrollHeight = this._getScrollHeight();
4365
4366 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
4367
4368 if (this._scrollHeight !== scrollHeight) {
4369 this.refresh();
4370 }
4371
4372 if (scrollTop >= maxScroll) {
4373 var target = this._targets[this._targets.length - 1];
4374
4375 if (this._activeTarget !== target) {
4376 this._activate(target);
4377 }
4378
4379 return;
4380 }
4381
4382 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
4383 this._activeTarget = null;
4384
4385 this._clear();
4386
4387 return;
4388 }
4389
4390 for (var i = this._offsets.length; i--;) {
4391 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
4392
4393 if (isActiveTarget) {
4394 this._activate(this._targets[i]);
4395 }
4396 }
4397 };
4398
4399 _proto._activate = function _activate(target) {
4400 this._activeTarget = target;
4401
4402 this._clear();
4403
4404 var queries = this._selector.split(',').map(function (selector) {
4405 return selector + "[data-bs-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
4406 });
4407
4408 var link = SelectorEngine.findOne(queries.join(','));
4409
4410 if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
4411 SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$2);
4412 link.classList.add(CLASS_NAME_ACTIVE$2);
4413 } else {
4414
4415 link.classList.add(CLASS_NAME_ACTIVE$2);
4416 SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {
4417
4418
4419 SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
4420 return item.classList.add(CLASS_NAME_ACTIVE$2);
4421 });
4422
4423 SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
4424 SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
4425 return item.classList.add(CLASS_NAME_ACTIVE$2);
4426 });
4427 });
4428 });
4429 }
4430
4431 EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
4432 relatedTarget: target
4433 });
4434 };
4435
4436 _proto._clear = function _clear() {
4437 SelectorEngine.find(this._selector).filter(function (node) {
4438 return node.classList.contains(CLASS_NAME_ACTIVE$2);
4439 }).forEach(function (node) {
4440 return node.classList.remove(CLASS_NAME_ACTIVE$2);
4441 });
4442 }
4443 ;
4444
4445 ScrollSpy.jQueryInterface = function jQueryInterface(config) {
4446 return this.each(function () {
4447 var data = Data.getData(this, DATA_KEY$8);
4448
4449 var _config = typeof config === 'object' && config;
4450
4451 if (!data) {
4452 data = new ScrollSpy(this, _config);
4453 }
4454
4455 if (typeof config === 'string') {
4456 if (typeof data[config] === 'undefined') {
4457 throw new TypeError("No method named \"" + config + "\"");
4458 }
4459
4460 data[config]();
4461 }
4462 });
4463 };
4464
4465 _createClass(ScrollSpy, null, [{
4466 key: "Default",
4467 get: function get() {
4468 return Default$6;
4469 }
4470 }, {
4471 key: "DATA_KEY",
4472 get: function get() {
4473 return DATA_KEY$8;
4474 }
4475 }]);
4476
4477 return ScrollSpy;
4478 }(BaseComponent);
4479
4480
4481
4482
4483
4484
4485
4486 EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () {
4487 SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
4488 return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
4489 });
4490 });
4491
4492
4493
4494
4495
4496
4497
4498 onDOMContentLoaded(function () {
4499 var $ = getjQuery();
4500
4501
4502 if ($) {
4503 var JQUERY_NO_CONFLICT = $.fn[NAME$8];
4504 $.fn[NAME$8] = ScrollSpy.jQueryInterface;
4505 $.fn[NAME$8].Constructor = ScrollSpy;
4506
4507 $.fn[NAME$8].noConflict = function () {
4508 $.fn[NAME$8] = JQUERY_NO_CONFLICT;
4509 return ScrollSpy.jQueryInterface;
4510 };
4511 }
4512 });
4513
4514
4515
4516
4517
4518
4519
4520 var NAME$9 = 'tab';
4521 var DATA_KEY$9 = 'bs.tab';
4522 var EVENT_KEY$9 = "." + DATA_KEY$9;
4523 var DATA_API_KEY$7 = '.data-api';
4524 var EVENT_HIDE$3 = "hide" + EVENT_KEY$9;
4525 var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$9;
4526 var EVENT_SHOW$3 = "show" + EVENT_KEY$9;
4527 var EVENT_SHOWN$3 = "shown" + EVENT_KEY$9;
4528 var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$9 + DATA_API_KEY$7;
4529 var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
4530 var CLASS_NAME_ACTIVE$3 = 'active';
4531 var CLASS_NAME_DISABLED$1 = 'disabled';
4532 var CLASS_NAME_FADE$3 = 'fade';
4533 var CLASS_NAME_SHOW$5 = 'show';
4534 var SELECTOR_DROPDOWN$1 = '.dropdown';
4535 var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
4536 var SELECTOR_ACTIVE$1 = '.active';
4537 var SELECTOR_ACTIVE_UL = ':scope > li > .active';
4538 var SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
4539 var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4540 var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
4541
4542
4543
4544
4545
4546
4547 var Tab = function (_BaseComponent) {
4548 _inheritsLoose(Tab, _BaseComponent);
4549
4550 function Tab() {
4551 return _BaseComponent.apply(this, arguments) || this;
4552 }
4553
4554 var _proto = Tab.prototype;
4555
4556
4557 _proto.show = function show() {
4558 var _this = this;
4559
4560 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE$3) || this._element.classList.contains(CLASS_NAME_DISABLED$1)) {
4561 return;
4562 }
4563
4564 var previous;
4565 var target = getElementFromSelector(this._element);
4566
4567 var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP$1);
4568
4569 if (listElement) {
4570 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$1;
4571 previous = SelectorEngine.find(itemSelector, listElement);
4572 previous = previous[previous.length - 1];
4573 }
4574
4575 var hideEvent = null;
4576
4577 if (previous) {
4578 hideEvent = EventHandler.trigger(previous, EVENT_HIDE$3, {
4579 relatedTarget: this._element
4580 });
4581 }
4582
4583 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
4584 relatedTarget: previous
4585 });
4586
4587 if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
4588 return;
4589 }
4590
4591 this._activate(this._element, listElement);
4592
4593 var complete = function complete() {
4594 EventHandler.trigger(previous, EVENT_HIDDEN$3, {
4595 relatedTarget: _this._element
4596 });
4597 EventHandler.trigger(_this._element, EVENT_SHOWN$3, {
4598 relatedTarget: previous
4599 });
4600 };
4601
4602 if (target) {
4603 this._activate(target, target.parentNode, complete);
4604 } else {
4605 complete();
4606 }
4607 }
4608 ;
4609
4610 _proto._activate = function _activate(element, container, callback) {
4611 var _this2 = this;
4612
4613 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1);
4614 var active = activeElements[0];
4615 var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$3);
4616
4617 var complete = function complete() {
4618 return _this2._transitionComplete(element, active, callback);
4619 };
4620
4621 if (active && isTransitioning) {
4622 var transitionDuration = getTransitionDurationFromElement(active);
4623 active.classList.remove(CLASS_NAME_SHOW$5);
4624 EventHandler.one(active, TRANSITION_END, complete);
4625 emulateTransitionEnd(active, transitionDuration);
4626 } else {
4627 complete();
4628 }
4629 };
4630
4631 _proto._transitionComplete = function _transitionComplete(element, active, callback) {
4632 if (active) {
4633 active.classList.remove(CLASS_NAME_ACTIVE$3);
4634 var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
4635
4636 if (dropdownChild) {
4637 dropdownChild.classList.remove(CLASS_NAME_ACTIVE$3);
4638 }
4639
4640 if (active.getAttribute('role') === 'tab') {
4641 active.setAttribute('aria-selected', false);
4642 }
4643 }
4644
4645 element.classList.add(CLASS_NAME_ACTIVE$3);
4646
4647 if (element.getAttribute('role') === 'tab') {
4648 element.setAttribute('aria-selected', true);
4649 }
4650
4651 reflow(element);
4652
4653 if (element.classList.contains(CLASS_NAME_FADE$3)) {
4654 element.classList.add(CLASS_NAME_SHOW$5);
4655 }
4656
4657 if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
4658 var dropdownElement = element.closest(SELECTOR_DROPDOWN$1);
4659
4660 if (dropdownElement) {
4661 SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE$1).forEach(function (dropdown) {
4662 return dropdown.classList.add(CLASS_NAME_ACTIVE$3);
4663 });
4664 }
4665
4666 element.setAttribute('aria-expanded', true);
4667 }
4668
4669 if (callback) {
4670 callback();
4671 }
4672 }
4673 ;
4674
4675 Tab.jQueryInterface = function jQueryInterface(config) {
4676 return this.each(function () {
4677 var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
4678
4679 if (typeof config === 'string') {
4680 if (typeof data[config] === 'undefined') {
4681 throw new TypeError("No method named \"" + config + "\"");
4682 }
4683
4684 data[config]();
4685 }
4686 });
4687 };
4688
4689 _createClass(Tab, null, [{
4690 key: "DATA_KEY",
4691
4692 get: function get() {
4693 return DATA_KEY$9;
4694 }
4695 }]);
4696
4697 return Tab;
4698 }(BaseComponent);
4699
4700
4701
4702
4703
4704
4705
4706 EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
4707 event.preventDefault();
4708 var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
4709 data.show();
4710 });
4711
4712
4713
4714
4715
4716
4717
4718 onDOMContentLoaded(function () {
4719 var $ = getjQuery();
4720
4721
4722 if ($) {
4723 var JQUERY_NO_CONFLICT = $.fn[NAME$9];
4724 $.fn[NAME$9] = Tab.jQueryInterface;
4725 $.fn[NAME$9].Constructor = Tab;
4726
4727 $.fn[NAME$9].noConflict = function () {
4728 $.fn[NAME$9] = JQUERY_NO_CONFLICT;
4729 return Tab.jQueryInterface;
4730 };
4731 }
4732 });
4733
4734
4735
4736
4737
4738
4739
4740 var NAME$a = 'toast';
4741 var DATA_KEY$a = 'bs.toast';
4742 var EVENT_KEY$a = "." + DATA_KEY$a;
4743 var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$a;
4744 var EVENT_HIDE$4 = "hide" + EVENT_KEY$a;
4745 var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
4746 var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
4747 var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
4748 var CLASS_NAME_FADE$4 = 'fade';
4749 var CLASS_NAME_HIDE = 'hide';
4750 var CLASS_NAME_SHOW$6 = 'show';
4751 var CLASS_NAME_SHOWING = 'showing';
4752 var DefaultType$7 = {
4753 animation: 'boolean',
4754 autohide: 'boolean',
4755 delay: 'number'
4756 };
4757 var Default$7 = {
4758 animation: true,
4759 autohide: true,
4760 delay: 5000
4761 };
4762 var SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="toast"]';
4763
4764
4765
4766
4767
4768
4769 var Toast = function (_BaseComponent) {
4770 _inheritsLoose(Toast, _BaseComponent);
4771
4772 function Toast(element, config) {
4773 var _this;
4774
4775 _this = _BaseComponent.call(this, element) || this;
4776 _this._config = _this._getConfig(config);
4777 _this._timeout = null;
4778
4779 _this._setListeners();
4780
4781 return _this;
4782 }
4783
4784
4785 var _proto = Toast.prototype;
4786
4787
4788 _proto.show = function show() {
4789 var _this2 = this;
4790
4791 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4);
4792
4793 if (showEvent.defaultPrevented) {
4794 return;
4795 }
4796
4797 this._clearTimeout();
4798
4799 if (this._config.animation) {
4800 this._element.classList.add(CLASS_NAME_FADE$4);
4801 }
4802
4803 var complete = function complete() {
4804 _this2._element.classList.remove(CLASS_NAME_SHOWING);
4805
4806 _this2._element.classList.add(CLASS_NAME_SHOW$6);
4807
4808 EventHandler.trigger(_this2._element, EVENT_SHOWN$4);
4809
4810 if (_this2._config.autohide) {
4811 _this2._timeout = setTimeout(function () {
4812 _this2.hide();
4813 }, _this2._config.delay);
4814 }
4815 };
4816
4817 this._element.classList.remove(CLASS_NAME_HIDE);
4818
4819 reflow(this._element);
4820
4821 this._element.classList.add(CLASS_NAME_SHOWING);
4822
4823 if (this._config.animation) {
4824 var transitionDuration = getTransitionDurationFromElement(this._element);
4825 EventHandler.one(this._element, TRANSITION_END, complete);
4826 emulateTransitionEnd(this._element, transitionDuration);
4827 } else {
4828 complete();
4829 }
4830 };
4831
4832 _proto.hide = function hide() {
4833 var _this3 = this;
4834
4835 if (!this._element.classList.contains(CLASS_NAME_SHOW$6)) {
4836 return;
4837 }
4838
4839 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
4840
4841 if (hideEvent.defaultPrevented) {
4842 return;
4843 }
4844
4845 var complete = function complete() {
4846 _this3._element.classList.add(CLASS_NAME_HIDE);
4847
4848 EventHandler.trigger(_this3._element, EVENT_HIDDEN$4);
4849 };
4850
4851 this._element.classList.remove(CLASS_NAME_SHOW$6);
4852
4853 if (this._config.animation) {
4854 var transitionDuration = getTransitionDurationFromElement(this._element);
4855 EventHandler.one(this._element, TRANSITION_END, complete);
4856 emulateTransitionEnd(this._element, transitionDuration);
4857 } else {
4858 complete();
4859 }
4860 };
4861
4862 _proto.dispose = function dispose() {
4863 this._clearTimeout();
4864
4865 if (this._element.classList.contains(CLASS_NAME_SHOW$6)) {
4866 this._element.classList.remove(CLASS_NAME_SHOW$6);
4867 }
4868
4869 EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);
4870
4871 _BaseComponent.prototype.dispose.call(this);
4872
4873 this._config = null;
4874 }
4875 ;
4876
4877 _proto._getConfig = function _getConfig(config) {
4878 config = _extends({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
4879 typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
4880 return config;
4881 };
4882
4883 _proto._setListeners = function _setListeners() {
4884 var _this4 = this;
4885
4886 EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
4887 return _this4.hide();
4888 });
4889 };
4890
4891 _proto._clearTimeout = function _clearTimeout() {
4892 clearTimeout(this._timeout);
4893 this._timeout = null;
4894 }
4895 ;
4896
4897 Toast.jQueryInterface = function jQueryInterface(config) {
4898 return this.each(function () {
4899 var data = Data.getData(this, DATA_KEY$a);
4900
4901 var _config = typeof config === 'object' && config;
4902
4903 if (!data) {
4904 data = new Toast(this, _config);
4905 }
4906
4907 if (typeof config === 'string') {
4908 if (typeof data[config] === 'undefined') {
4909 throw new TypeError("No method named \"" + config + "\"");
4910 }
4911
4912 data[config](this);
4913 }
4914 });
4915 };
4916
4917 _createClass(Toast, null, [{
4918 key: "DefaultType",
4919 get: function get() {
4920 return DefaultType$7;
4921 }
4922 }, {
4923 key: "Default",
4924 get: function get() {
4925 return Default$7;
4926 }
4927 }, {
4928 key: "DATA_KEY",
4929 get: function get() {
4930 return DATA_KEY$a;
4931 }
4932 }]);
4933
4934 return Toast;
4935 }(BaseComponent);
4936
4937
4938
4939
4940
4941
4942
4943
4944 onDOMContentLoaded(function () {
4945 var $ = getjQuery();
4946
4947
4948 if ($) {
4949 var JQUERY_NO_CONFLICT = $.fn[NAME$a];
4950 $.fn[NAME$a] = Toast.jQueryInterface;
4951 $.fn[NAME$a].Constructor = Toast;
4952
4953 $.fn[NAME$a].noConflict = function () {
4954 $.fn[NAME$a] = JQUERY_NO_CONFLICT;
4955 return Toast.jQueryInterface;
4956 };
4957 }
4958 });
4959
4960 export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Popover, ScrollSpy, Tab, Toast, Tooltip };
4961