2 * Bootstrap v4.3.1 (https://getbootstrap.com/)
3 * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6 (function (global, factory) {
7 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
8 typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
9 (global = global || self, factory(global.bootstrap = {}, global.jQuery));
10 }(this, function (exports, $) { 'use strict';
12 $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
14 function _defineProperties(target, props) {
15 for (var i = 0; i < props.length; i++) {
16 var descriptor = props[i];
17 descriptor.enumerable = descriptor.enumerable || false;
18 descriptor.configurable = true;
19 if ("value" in descriptor) descriptor.writable = true;
20 Object.defineProperty(target, descriptor.key, descriptor);
24 function _createClass(Constructor, protoProps, staticProps) {
25 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
26 if (staticProps) _defineProperties(Constructor, staticProps);
30 function _defineProperty(obj, key, value) {
32 Object.defineProperty(obj, key, {
45 function _objectSpread(target) {
46 for (var i = 1; i < arguments.length; i++) {
47 var source = arguments[i] != null ? arguments[i] : {};
48 var ownKeys = Object.keys(source);
50 if (typeof Object.getOwnPropertySymbols === 'function') {
51 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
52 return Object.getOwnPropertyDescriptor(source, sym).enumerable;
56 ownKeys.forEach(function (key) {
57 _defineProperty(target, key, source[key]);
64 function _inheritsLoose(subClass, superClass) {
65 subClass.prototype = Object.create(superClass.prototype);
66 subClass.prototype.constructor = subClass;
67 subClass.__proto__ = superClass;
71 * --------------------------------------------------------------------------
72 * Bootstrap (v4.3.1): util.js
73 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
74 * --------------------------------------------------------------------------
77 * ------------------------------------------------------------------------
78 * Private TransitionEnd Helpers
79 * ------------------------------------------------------------------------
82 var TRANSITION_END = 'transitionend';
83 var MAX_UID = 1000000;
84 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
86 function toType(obj) {
87 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
90 function getSpecialTransitionEndEvent() {
92 bindType: TRANSITION_END,
93 delegateType: TRANSITION_END,
94 handle: function handle(event) {
95 if ($(event.target).is(this)) {
96 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
99 return undefined; // eslint-disable-line no-undefined
104 function transitionEndEmulator(duration) {
108 $(this).one(Util.TRANSITION_END, function () {
111 setTimeout(function () {
113 Util.triggerTransitionEnd(_this);
119 function setTransitionEndSupport() {
120 $.fn.emulateTransitionEnd = transitionEndEmulator;
121 $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
124 * --------------------------------------------------------------------------
126 * --------------------------------------------------------------------------
131 TRANSITION_END: 'bsTransitionEnd',
132 getUID: function getUID(prefix) {
134 // eslint-disable-next-line no-bitwise
135 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
136 } while (document.getElementById(prefix));
140 getSelectorFromElement: function getSelectorFromElement(element) {
141 var selector = element.getAttribute('data-target');
143 if (!selector || selector === '#') {
144 var hrefAttr = element.getAttribute('href');
145 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
149 return document.querySelector(selector) ? selector : null;
154 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
157 } // Get transition-duration of the element
160 var transitionDuration = $(element).css('transition-duration');
161 var transitionDelay = $(element).css('transition-delay');
162 var floatTransitionDuration = parseFloat(transitionDuration);
163 var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
165 if (!floatTransitionDuration && !floatTransitionDelay) {
167 } // If multiple durations are defined, take the first
170 transitionDuration = transitionDuration.split(',')[0];
171 transitionDelay = transitionDelay.split(',')[0];
172 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
174 reflow: function reflow(element) {
175 return element.offsetHeight;
177 triggerTransitionEnd: function triggerTransitionEnd(element) {
178 $(element).trigger(TRANSITION_END);
180 // TODO: Remove in v5
181 supportsTransitionEnd: function supportsTransitionEnd() {
182 return Boolean(TRANSITION_END);
184 isElement: function isElement(obj) {
185 return (obj[0] || obj).nodeType;
187 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
188 for (var property in configTypes) {
189 if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
190 var expectedTypes = configTypes[property];
191 var value = config[property];
192 var valueType = value && Util.isElement(value) ? 'element' : toType(value);
194 if (!new RegExp(expectedTypes).test(valueType)) {
195 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
200 findShadowRoot: function findShadowRoot(element) {
201 if (!document.documentElement.attachShadow) {
203 } // Can find the shadow root otherwise it'll return the document
206 if (typeof element.getRootNode === 'function') {
207 var root = element.getRootNode();
208 return root instanceof ShadowRoot ? root : null;
211 if (element instanceof ShadowRoot) {
213 } // when we don't find a shadow root
216 if (!element.parentNode) {
220 return Util.findShadowRoot(element.parentNode);
223 setTransitionEndSupport();
226 * ------------------------------------------------------------------------
228 * ------------------------------------------------------------------------
232 var VERSION = '4.3.1';
233 var DATA_KEY = 'bs.alert';
234 var EVENT_KEY = "." + DATA_KEY;
235 var DATA_API_KEY = '.data-api';
236 var JQUERY_NO_CONFLICT = $.fn[NAME];
238 DISMISS: '[data-dismiss="alert"]'
241 CLOSE: "close" + EVENT_KEY,
242 CLOSED: "closed" + EVENT_KEY,
243 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
250 * ------------------------------------------------------------------------
252 * ------------------------------------------------------------------------
260 function Alert(element) {
261 this._element = element;
265 var _proto = Alert.prototype;
268 _proto.close = function close(element) {
269 var rootElement = this._element;
272 rootElement = this._getRootElement(element);
275 var customEvent = this._triggerCloseEvent(rootElement);
277 if (customEvent.isDefaultPrevented()) {
281 this._removeElement(rootElement);
284 _proto.dispose = function dispose() {
285 $.removeData(this._element, DATA_KEY);
286 this._element = null;
290 _proto._getRootElement = function _getRootElement(element) {
291 var selector = Util.getSelectorFromElement(element);
295 parent = document.querySelector(selector);
299 parent = $(element).closest("." + ClassName.ALERT)[0];
305 _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
306 var closeEvent = $.Event(Event.CLOSE);
307 $(element).trigger(closeEvent);
311 _proto._removeElement = function _removeElement(element) {
314 $(element).removeClass(ClassName.SHOW);
316 if (!$(element).hasClass(ClassName.FADE)) {
317 this._destroyElement(element);
322 var transitionDuration = Util.getTransitionDurationFromElement(element);
323 $(element).one(Util.TRANSITION_END, function (event) {
324 return _this._destroyElement(element, event);
325 }).emulateTransitionEnd(transitionDuration);
328 _proto._destroyElement = function _destroyElement(element) {
329 $(element).detach().trigger(Event.CLOSED).remove();
333 Alert._jQueryInterface = function _jQueryInterface(config) {
334 return this.each(function () {
335 var $element = $(this);
336 var data = $element.data(DATA_KEY);
339 data = new Alert(this);
340 $element.data(DATA_KEY, data);
343 if (config === 'close') {
349 Alert._handleDismiss = function _handleDismiss(alertInstance) {
350 return function (event) {
352 event.preventDefault();
355 alertInstance.close(this);
359 _createClass(Alert, null, [{
361 get: function get() {
369 * ------------------------------------------------------------------------
370 * Data Api implementation
371 * ------------------------------------------------------------------------
375 $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
377 * ------------------------------------------------------------------------
379 * ------------------------------------------------------------------------
382 $.fn[NAME] = Alert._jQueryInterface;
383 $.fn[NAME].Constructor = Alert;
385 $.fn[NAME].noConflict = function () {
386 $.fn[NAME] = JQUERY_NO_CONFLICT;
387 return Alert._jQueryInterface;
391 * ------------------------------------------------------------------------
393 * ------------------------------------------------------------------------
396 var NAME$1 = 'button';
397 var VERSION$1 = '4.3.1';
398 var DATA_KEY$1 = 'bs.button';
399 var EVENT_KEY$1 = "." + DATA_KEY$1;
400 var DATA_API_KEY$1 = '.data-api';
401 var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
408 DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
409 DATA_TOGGLE: '[data-toggle="buttons"]',
410 INPUT: 'input:not([type="hidden"])',
415 CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
416 FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1)
418 * ------------------------------------------------------------------------
420 * ------------------------------------------------------------------------
428 function Button(element) {
429 this._element = element;
433 var _proto = Button.prototype;
436 _proto.toggle = function toggle() {
437 var triggerChangeEvent = true;
438 var addAriaPressed = true;
439 var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
442 var input = this._element.querySelector(Selector$1.INPUT);
445 if (input.type === 'radio') {
446 if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
447 triggerChangeEvent = false;
449 var activeElement = rootElement.querySelector(Selector$1.ACTIVE);
452 $(activeElement).removeClass(ClassName$1.ACTIVE);
457 if (triggerChangeEvent) {
458 if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
462 input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
463 $(input).trigger('change');
467 addAriaPressed = false;
471 if (addAriaPressed) {
472 this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
475 if (triggerChangeEvent) {
476 $(this._element).toggleClass(ClassName$1.ACTIVE);
480 _proto.dispose = function dispose() {
481 $.removeData(this._element, DATA_KEY$1);
482 this._element = null;
486 Button._jQueryInterface = function _jQueryInterface(config) {
487 return this.each(function () {
488 var data = $(this).data(DATA_KEY$1);
491 data = new Button(this);
492 $(this).data(DATA_KEY$1, data);
495 if (config === 'toggle') {
501 _createClass(Button, null, [{
503 get: function get() {
511 * ------------------------------------------------------------------------
512 * Data Api implementation
513 * ------------------------------------------------------------------------
517 $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
518 event.preventDefault();
519 var button = event.target;
521 if (!$(button).hasClass(ClassName$1.BUTTON)) {
522 button = $(button).closest(Selector$1.BUTTON);
525 Button._jQueryInterface.call($(button), 'toggle');
526 }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
527 var button = $(event.target).closest(Selector$1.BUTTON)[0];
528 $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
531 * ------------------------------------------------------------------------
533 * ------------------------------------------------------------------------
536 $.fn[NAME$1] = Button._jQueryInterface;
537 $.fn[NAME$1].Constructor = Button;
539 $.fn[NAME$1].noConflict = function () {
540 $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
541 return Button._jQueryInterface;
545 * ------------------------------------------------------------------------
547 * ------------------------------------------------------------------------
550 var NAME$2 = 'carousel';
551 var VERSION$2 = '4.3.1';
552 var DATA_KEY$2 = 'bs.carousel';
553 var EVENT_KEY$2 = "." + DATA_KEY$2;
554 var DATA_API_KEY$2 = '.data-api';
555 var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
556 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
558 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
560 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
562 var SWIPE_THRESHOLD = 40;
572 interval: '(number|boolean)',
574 slide: '(boolean|string)',
575 pause: '(string|boolean)',
586 SLIDE: "slide" + EVENT_KEY$2,
587 SLID: "slid" + EVENT_KEY$2,
588 KEYDOWN: "keydown" + EVENT_KEY$2,
589 MOUSEENTER: "mouseenter" + EVENT_KEY$2,
590 MOUSELEAVE: "mouseleave" + EVENT_KEY$2,
591 TOUCHSTART: "touchstart" + EVENT_KEY$2,
592 TOUCHMOVE: "touchmove" + EVENT_KEY$2,
593 TOUCHEND: "touchend" + EVENT_KEY$2,
594 POINTERDOWN: "pointerdown" + EVENT_KEY$2,
595 POINTERUP: "pointerup" + EVENT_KEY$2,
596 DRAG_START: "dragstart" + EVENT_KEY$2,
597 LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2,
598 CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2
601 CAROUSEL: 'carousel',
604 RIGHT: 'carousel-item-right',
605 LEFT: 'carousel-item-left',
606 NEXT: 'carousel-item-next',
607 PREV: 'carousel-item-prev',
608 ITEM: 'carousel-item',
609 POINTER_EVENT: 'pointer-event'
613 ACTIVE_ITEM: '.active.carousel-item',
614 ITEM: '.carousel-item',
615 ITEM_IMG: '.carousel-item img',
616 NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
617 INDICATORS: '.carousel-indicators',
618 DATA_SLIDE: '[data-slide], [data-slide-to]',
619 DATA_RIDE: '[data-ride="carousel"]'
625 * ------------------------------------------------------------------------
627 * ------------------------------------------------------------------------
635 function Carousel(element, config) {
637 this._interval = null;
638 this._activeElement = null;
639 this._isPaused = false;
640 this._isSliding = false;
641 this.touchTimeout = null;
642 this.touchStartX = 0;
643 this.touchDeltaX = 0;
644 this._config = this._getConfig(config);
645 this._element = element;
646 this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);
647 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
648 this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
650 this._addEventListeners();
654 var _proto = Carousel.prototype;
657 _proto.next = function next() {
658 if (!this._isSliding) {
659 this._slide(Direction.NEXT);
663 _proto.nextWhenVisible = function nextWhenVisible() {
664 // Don't call next when the page isn't visible
665 // or the carousel or its parent isn't visible
666 if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
671 _proto.prev = function prev() {
672 if (!this._isSliding) {
673 this._slide(Direction.PREV);
677 _proto.pause = function pause(event) {
679 this._isPaused = true;
682 if (this._element.querySelector(Selector$2.NEXT_PREV)) {
683 Util.triggerTransitionEnd(this._element);
687 clearInterval(this._interval);
688 this._interval = null;
691 _proto.cycle = function cycle(event) {
693 this._isPaused = false;
696 if (this._interval) {
697 clearInterval(this._interval);
698 this._interval = null;
701 if (this._config.interval && !this._isPaused) {
702 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
706 _proto.to = function to(index) {
709 this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
711 var activeIndex = this._getItemIndex(this._activeElement);
713 if (index > this._items.length - 1 || index < 0) {
717 if (this._isSliding) {
718 $(this._element).one(Event$2.SLID, function () {
719 return _this.to(index);
724 if (activeIndex === index) {
730 var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
732 this._slide(direction, this._items[index]);
735 _proto.dispose = function dispose() {
736 $(this._element).off(EVENT_KEY$2);
737 $.removeData(this._element, DATA_KEY$2);
740 this._element = null;
741 this._interval = null;
742 this._isPaused = null;
743 this._isSliding = null;
744 this._activeElement = null;
745 this._indicatorsElement = null;
749 _proto._getConfig = function _getConfig(config) {
750 config = _objectSpread({}, Default, config);
751 Util.typeCheckConfig(NAME$2, config, DefaultType);
755 _proto._handleSwipe = function _handleSwipe() {
756 var absDeltax = Math.abs(this.touchDeltaX);
758 if (absDeltax <= SWIPE_THRESHOLD) {
762 var direction = absDeltax / this.touchDeltaX; // swipe left
774 _proto._addEventListeners = function _addEventListeners() {
777 if (this._config.keyboard) {
778 $(this._element).on(Event$2.KEYDOWN, function (event) {
779 return _this2._keydown(event);
783 if (this._config.pause === 'hover') {
784 $(this._element).on(Event$2.MOUSEENTER, function (event) {
785 return _this2.pause(event);
786 }).on(Event$2.MOUSELEAVE, function (event) {
787 return _this2.cycle(event);
791 if (this._config.touch) {
792 this._addTouchEventListeners();
796 _proto._addTouchEventListeners = function _addTouchEventListeners() {
799 if (!this._touchSupported) {
803 var start = function start(event) {
804 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
805 _this3.touchStartX = event.originalEvent.clientX;
806 } else if (!_this3._pointerEvent) {
807 _this3.touchStartX = event.originalEvent.touches[0].clientX;
811 var move = function move(event) {
812 // ensure swiping with one touch and not pinching
813 if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
814 _this3.touchDeltaX = 0;
816 _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
820 var end = function end(event) {
821 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
822 _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
825 _this3._handleSwipe();
827 if (_this3._config.pause === 'hover') {
828 // If it's a touch-enabled device, mouseenter/leave are fired as
829 // part of the mouse compatibility events on first tap - the carousel
830 // would stop cycling until user tapped out of it;
831 // here, we listen for touchend, explicitly pause the carousel
832 // (as if it's the second time we tap on it, mouseenter compat event
833 // is NOT fired) and after a timeout (to allow for mouse compatibility
834 // events to fire) we explicitly restart cycling
837 if (_this3.touchTimeout) {
838 clearTimeout(_this3.touchTimeout);
841 _this3.touchTimeout = setTimeout(function (event) {
842 return _this3.cycle(event);
843 }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
847 $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {
848 return e.preventDefault();
851 if (this._pointerEvent) {
852 $(this._element).on(Event$2.POINTERDOWN, function (event) {
855 $(this._element).on(Event$2.POINTERUP, function (event) {
859 this._element.classList.add(ClassName$2.POINTER_EVENT);
861 $(this._element).on(Event$2.TOUCHSTART, function (event) {
864 $(this._element).on(Event$2.TOUCHMOVE, function (event) {
867 $(this._element).on(Event$2.TOUCHEND, function (event) {
873 _proto._keydown = function _keydown(event) {
874 if (/input|textarea/i.test(event.target.tagName)) {
878 switch (event.which) {
879 case ARROW_LEFT_KEYCODE:
880 event.preventDefault();
884 case ARROW_RIGHT_KEYCODE:
885 event.preventDefault();
893 _proto._getItemIndex = function _getItemIndex(element) {
894 this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];
895 return this._items.indexOf(element);
898 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
899 var isNextDirection = direction === Direction.NEXT;
900 var isPrevDirection = direction === Direction.PREV;
902 var activeIndex = this._getItemIndex(activeElement);
904 var lastItemIndex = this._items.length - 1;
905 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
907 if (isGoingToWrap && !this._config.wrap) {
908 return activeElement;
911 var delta = direction === Direction.PREV ? -1 : 1;
912 var itemIndex = (activeIndex + delta) % this._items.length;
913 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
916 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
917 var targetIndex = this._getItemIndex(relatedTarget);
919 var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));
921 var slideEvent = $.Event(Event$2.SLIDE, {
922 relatedTarget: relatedTarget,
923 direction: eventDirectionName,
927 $(this._element).trigger(slideEvent);
931 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
932 if (this._indicatorsElement) {
933 var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));
934 $(indicators).removeClass(ClassName$2.ACTIVE);
936 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
939 $(nextIndicator).addClass(ClassName$2.ACTIVE);
944 _proto._slide = function _slide(direction, element) {
947 var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
949 var activeElementIndex = this._getItemIndex(activeElement);
951 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
953 var nextElementIndex = this._getItemIndex(nextElement);
955 var isCycling = Boolean(this._interval);
956 var directionalClassName;
958 var eventDirectionName;
960 if (direction === Direction.NEXT) {
961 directionalClassName = ClassName$2.LEFT;
962 orderClassName = ClassName$2.NEXT;
963 eventDirectionName = Direction.LEFT;
965 directionalClassName = ClassName$2.RIGHT;
966 orderClassName = ClassName$2.PREV;
967 eventDirectionName = Direction.RIGHT;
970 if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {
971 this._isSliding = false;
975 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
977 if (slideEvent.isDefaultPrevented()) {
981 if (!activeElement || !nextElement) {
982 // Some weirdness is happening, so we bail
986 this._isSliding = true;
992 this._setActiveIndicatorElement(nextElement);
994 var slidEvent = $.Event(Event$2.SLID, {
995 relatedTarget: nextElement,
996 direction: eventDirectionName,
997 from: activeElementIndex,
1001 if ($(this._element).hasClass(ClassName$2.SLIDE)) {
1002 $(nextElement).addClass(orderClassName);
1003 Util.reflow(nextElement);
1004 $(activeElement).addClass(directionalClassName);
1005 $(nextElement).addClass(directionalClassName);
1006 var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
1008 if (nextElementInterval) {
1009 this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1010 this._config.interval = nextElementInterval;
1012 this._config.interval = this._config.defaultInterval || this._config.interval;
1015 var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
1016 $(activeElement).one(Util.TRANSITION_END, function () {
1017 $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE);
1018 $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName);
1019 _this4._isSliding = false;
1020 setTimeout(function () {
1021 return $(_this4._element).trigger(slidEvent);
1023 }).emulateTransitionEnd(transitionDuration);
1025 $(activeElement).removeClass(ClassName$2.ACTIVE);
1026 $(nextElement).addClass(ClassName$2.ACTIVE);
1027 this._isSliding = false;
1028 $(this._element).trigger(slidEvent);
1037 Carousel._jQueryInterface = function _jQueryInterface(config) {
1038 return this.each(function () {
1039 var data = $(this).data(DATA_KEY$2);
1041 var _config = _objectSpread({}, Default, $(this).data());
1043 if (typeof config === 'object') {
1044 _config = _objectSpread({}, _config, config);
1047 var action = typeof config === 'string' ? config : _config.slide;
1050 data = new Carousel(this, _config);
1051 $(this).data(DATA_KEY$2, data);
1054 if (typeof config === 'number') {
1056 } else if (typeof action === 'string') {
1057 if (typeof data[action] === 'undefined') {
1058 throw new TypeError("No method named \"" + action + "\"");
1062 } else if (_config.interval && _config.ride) {
1069 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
1070 var selector = Util.getSelectorFromElement(this);
1076 var target = $(selector)[0];
1078 if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {
1082 var config = _objectSpread({}, $(target).data(), $(this).data());
1084 var slideIndex = this.getAttribute('data-slide-to');
1087 config.interval = false;
1090 Carousel._jQueryInterface.call($(target), config);
1093 $(target).data(DATA_KEY$2).to(slideIndex);
1096 event.preventDefault();
1099 _createClass(Carousel, null, [{
1101 get: function get() {
1106 get: function get() {
1114 * ------------------------------------------------------------------------
1115 * Data Api implementation
1116 * ------------------------------------------------------------------------
1120 $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
1121 $(window).on(Event$2.LOAD_DATA_API, function () {
1122 var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));
1124 for (var i = 0, len = carousels.length; i < len; i++) {
1125 var $carousel = $(carousels[i]);
1127 Carousel._jQueryInterface.call($carousel, $carousel.data());
1131 * ------------------------------------------------------------------------
1133 * ------------------------------------------------------------------------
1136 $.fn[NAME$2] = Carousel._jQueryInterface;
1137 $.fn[NAME$2].Constructor = Carousel;
1139 $.fn[NAME$2].noConflict = function () {
1140 $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
1141 return Carousel._jQueryInterface;
1145 * ------------------------------------------------------------------------
1147 * ------------------------------------------------------------------------
1150 var NAME$3 = 'collapse';
1151 var VERSION$3 = '4.3.1';
1152 var DATA_KEY$3 = 'bs.collapse';
1153 var EVENT_KEY$3 = "." + DATA_KEY$3;
1154 var DATA_API_KEY$3 = '.data-api';
1155 var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
1160 var DefaultType$1 = {
1162 parent: '(string|element)'
1165 SHOW: "show" + EVENT_KEY$3,
1166 SHOWN: "shown" + EVENT_KEY$3,
1167 HIDE: "hide" + EVENT_KEY$3,
1168 HIDDEN: "hidden" + EVENT_KEY$3,
1169 CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3
1173 COLLAPSE: 'collapse',
1174 COLLAPSING: 'collapsing',
1175 COLLAPSED: 'collapsed'
1182 ACTIVES: '.show, .collapsing',
1183 DATA_TOGGLE: '[data-toggle="collapse"]'
1185 * ------------------------------------------------------------------------
1187 * ------------------------------------------------------------------------
1195 function Collapse(element, config) {
1196 this._isTransitioning = false;
1197 this._element = element;
1198 this._config = this._getConfig(config);
1199 this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1200 var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
1202 for (var i = 0, len = toggleList.length; i < len; i++) {
1203 var elem = toggleList[i];
1204 var selector = Util.getSelectorFromElement(elem);
1205 var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1206 return foundElem === element;
1209 if (selector !== null && filterElement.length > 0) {
1210 this._selector = selector;
1212 this._triggerArray.push(elem);
1216 this._parent = this._config.parent ? this._getParent() : null;
1218 if (!this._config.parent) {
1219 this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1222 if (this._config.toggle) {
1228 var _proto = Collapse.prototype;
1231 _proto.toggle = function toggle() {
1232 if ($(this._element).hasClass(ClassName$3.SHOW)) {
1239 _proto.show = function show() {
1242 if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
1250 actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {
1251 if (typeof _this._config.parent === 'string') {
1252 return elem.getAttribute('data-parent') === _this._config.parent;
1255 return elem.classList.contains(ClassName$3.COLLAPSE);
1258 if (actives.length === 0) {
1264 activesData = $(actives).not(this._selector).data(DATA_KEY$3);
1266 if (activesData && activesData._isTransitioning) {
1271 var startEvent = $.Event(Event$3.SHOW);
1272 $(this._element).trigger(startEvent);
1274 if (startEvent.isDefaultPrevented()) {
1279 Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
1282 $(actives).data(DATA_KEY$3, null);
1286 var dimension = this._getDimension();
1288 $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);
1289 this._element.style[dimension] = 0;
1291 if (this._triggerArray.length) {
1292 $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);
1295 this.setTransitioning(true);
1297 var complete = function complete() {
1298 $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);
1299 _this._element.style[dimension] = '';
1301 _this.setTransitioning(false);
1303 $(_this._element).trigger(Event$3.SHOWN);
1306 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1307 var scrollSize = "scroll" + capitalizedDimension;
1308 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1309 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1310 this._element.style[dimension] = this._element[scrollSize] + "px";
1313 _proto.hide = function hide() {
1316 if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
1320 var startEvent = $.Event(Event$3.HIDE);
1321 $(this._element).trigger(startEvent);
1323 if (startEvent.isDefaultPrevented()) {
1327 var dimension = this._getDimension();
1329 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1330 Util.reflow(this._element);
1331 $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);
1332 var triggerArrayLength = this._triggerArray.length;
1334 if (triggerArrayLength > 0) {
1335 for (var i = 0; i < triggerArrayLength; i++) {
1336 var trigger = this._triggerArray[i];
1337 var selector = Util.getSelectorFromElement(trigger);
1339 if (selector !== null) {
1340 var $elem = $([].slice.call(document.querySelectorAll(selector)));
1342 if (!$elem.hasClass(ClassName$3.SHOW)) {
1343 $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);
1349 this.setTransitioning(true);
1351 var complete = function complete() {
1352 _this2.setTransitioning(false);
1354 $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);
1357 this._element.style[dimension] = '';
1358 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1359 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1362 _proto.setTransitioning = function setTransitioning(isTransitioning) {
1363 this._isTransitioning = isTransitioning;
1366 _proto.dispose = function dispose() {
1367 $.removeData(this._element, DATA_KEY$3);
1368 this._config = null;
1369 this._parent = null;
1370 this._element = null;
1371 this._triggerArray = null;
1372 this._isTransitioning = null;
1376 _proto._getConfig = function _getConfig(config) {
1377 config = _objectSpread({}, Default$1, config);
1378 config.toggle = Boolean(config.toggle); // Coerce string values
1380 Util.typeCheckConfig(NAME$3, config, DefaultType$1);
1384 _proto._getDimension = function _getDimension() {
1385 var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1386 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1389 _proto._getParent = function _getParent() {
1394 if (Util.isElement(this._config.parent)) {
1395 parent = this._config.parent; // It's a jQuery object
1397 if (typeof this._config.parent.jquery !== 'undefined') {
1398 parent = this._config.parent[0];
1401 parent = document.querySelector(this._config.parent);
1404 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1405 var children = [].slice.call(parent.querySelectorAll(selector));
1406 $(children).each(function (i, element) {
1407 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1412 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1413 var isOpen = $(element).hasClass(ClassName$3.SHOW);
1415 if (triggerArray.length) {
1416 $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1421 Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1422 var selector = Util.getSelectorFromElement(element);
1423 return selector ? document.querySelector(selector) : null;
1426 Collapse._jQueryInterface = function _jQueryInterface(config) {
1427 return this.each(function () {
1428 var $this = $(this);
1429 var data = $this.data(DATA_KEY$3);
1431 var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
1433 if (!data && _config.toggle && /show|hide/.test(config)) {
1434 _config.toggle = false;
1438 data = new Collapse(this, _config);
1439 $this.data(DATA_KEY$3, data);
1442 if (typeof config === 'string') {
1443 if (typeof data[config] === 'undefined') {
1444 throw new TypeError("No method named \"" + config + "\"");
1452 _createClass(Collapse, null, [{
1454 get: function get() {
1459 get: function get() {
1467 * ------------------------------------------------------------------------
1468 * Data Api implementation
1469 * ------------------------------------------------------------------------
1473 $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
1474 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1475 if (event.currentTarget.tagName === 'A') {
1476 event.preventDefault();
1479 var $trigger = $(this);
1480 var selector = Util.getSelectorFromElement(this);
1481 var selectors = [].slice.call(document.querySelectorAll(selector));
1482 $(selectors).each(function () {
1483 var $target = $(this);
1484 var data = $target.data(DATA_KEY$3);
1485 var config = data ? 'toggle' : $trigger.data();
1487 Collapse._jQueryInterface.call($target, config);
1491 * ------------------------------------------------------------------------
1493 * ------------------------------------------------------------------------
1496 $.fn[NAME$3] = Collapse._jQueryInterface;
1497 $.fn[NAME$3].Constructor = Collapse;
1499 $.fn[NAME$3].noConflict = function () {
1500 $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
1501 return Collapse._jQueryInterface;
1505 * @fileOverview Kickass library to create and place poppers near their reference elements.
1508 * Copyright (c) 2016 Federico Zivolo and contributors
1510 * Permission is hereby granted, free of charge, to any person obtaining a copy
1511 * of this software and associated documentation files (the "Software"), to deal
1512 * in the Software without restriction, including without limitation the rights
1513 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1514 * copies of the Software, and to permit persons to whom the Software is
1515 * furnished to do so, subject to the following conditions:
1517 * The above copyright notice and this permission notice shall be included in all
1518 * copies or substantial portions of the Software.
1520 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1521 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1522 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1523 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1524 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1525 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1528 var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
1530 var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
1531 var timeoutDuration = 0;
1532 for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
1533 if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
1534 timeoutDuration = 1;
1539 function microtaskDebounce(fn) {
1541 return function () {
1546 window.Promise.resolve().then(function () {
1553 function taskDebounce(fn) {
1554 var scheduled = false;
1555 return function () {
1558 setTimeout(function () {
1561 }, timeoutDuration);
1566 var supportsMicroTasks = isBrowser && window.Promise;
1569 * Create a debounced version of a method, that's asynchronously deferred
1570 * but called in the minimum time possible.
1573 * @memberof Popper.Utils
1574 * @argument {Function} fn
1575 * @returns {Function}
1577 var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
1580 * Check if the given variable is a function
1582 * @memberof Popper.Utils
1583 * @argument {Any} functionToCheck - variable to check
1584 * @returns {Boolean} answer to: is a function?
1586 function isFunction(functionToCheck) {
1588 return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1592 * Get CSS computed property of the given element
1594 * @memberof Popper.Utils
1595 * @argument {Eement} element
1596 * @argument {String} property
1598 function getStyleComputedProperty(element, property) {
1599 if (element.nodeType !== 1) {
1602 // NOTE: 1 DOM access here
1603 var window = element.ownerDocument.defaultView;
1604 var css = window.getComputedStyle(element, null);
1605 return property ? css[property] : css;
1609 * Returns the parentNode or the host of the element
1611 * @memberof Popper.Utils
1612 * @argument {Element} element
1613 * @returns {Element} parent
1615 function getParentNode(element) {
1616 if (element.nodeName === 'HTML') {
1619 return element.parentNode || element.host;
1623 * Returns the scrolling parent of the given element
1625 * @memberof Popper.Utils
1626 * @argument {Element} element
1627 * @returns {Element} scroll parent
1629 function getScrollParent(element) {
1630 // Return body, `getScroll` will take care to get the correct `scrollTop` from it
1632 return document.body;
1635 switch (element.nodeName) {
1638 return element.ownerDocument.body;
1640 return element.body;
1643 // Firefox want us to check `-x` and `-y` variations as well
1645 var _getStyleComputedProp = getStyleComputedProperty(element),
1646 overflow = _getStyleComputedProp.overflow,
1647 overflowX = _getStyleComputedProp.overflowX,
1648 overflowY = _getStyleComputedProp.overflowY;
1650 if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
1654 return getScrollParent(getParentNode(element));
1657 var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
1658 var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
1661 * Determines if the browser is Internet Explorer
1663 * @memberof Popper.Utils
1664 * @param {Number} version to check
1665 * @returns {Boolean} isIE
1667 function isIE(version) {
1668 if (version === 11) {
1671 if (version === 10) {
1674 return isIE11 || isIE10;
1678 * Returns the offset parent of the given element
1680 * @memberof Popper.Utils
1681 * @argument {Element} element
1682 * @returns {Element} offset parent
1684 function getOffsetParent(element) {
1686 return document.documentElement;
1689 var noOffsetParent = isIE(10) ? document.body : null;
1691 // NOTE: 1 DOM access here
1692 var offsetParent = element.offsetParent || null;
1693 // Skip hidden elements which don't have an offsetParent
1694 while (offsetParent === noOffsetParent && element.nextElementSibling) {
1695 offsetParent = (element = element.nextElementSibling).offsetParent;
1698 var nodeName = offsetParent && offsetParent.nodeName;
1700 if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
1701 return element ? element.ownerDocument.documentElement : document.documentElement;
1704 // .offsetParent will return the closest TH, TD or TABLE in case
1705 // no offsetParent is present, I hate this job...
1706 if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
1707 return getOffsetParent(offsetParent);
1710 return offsetParent;
1713 function isOffsetContainer(element) {
1714 var nodeName = element.nodeName;
1716 if (nodeName === 'BODY') {
1719 return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
1723 * Finds the root node (document, shadowDOM root) of the given element
1725 * @memberof Popper.Utils
1726 * @argument {Element} node
1727 * @returns {Element} root node
1729 function getRoot(node) {
1730 if (node.parentNode !== null) {
1731 return getRoot(node.parentNode);
1738 * Finds the offset parent common to the two provided nodes
1740 * @memberof Popper.Utils
1741 * @argument {Element} element1
1742 * @argument {Element} element2
1743 * @returns {Element} common offset parent
1745 function findCommonOffsetParent(element1, element2) {
1746 // This check is needed to avoid errors in case one of the elements isn't defined for any reason
1747 if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
1748 return document.documentElement;
1751 // Here we make sure to give as "start" the element that comes first in the DOM
1752 var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
1753 var start = order ? element1 : element2;
1754 var end = order ? element2 : element1;
1756 // Get common ancestor container
1757 var range = document.createRange();
1758 range.setStart(start, 0);
1759 range.setEnd(end, 0);
1760 var commonAncestorContainer = range.commonAncestorContainer;
1762 // Both nodes are inside #document
1764 if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
1765 if (isOffsetContainer(commonAncestorContainer)) {
1766 return commonAncestorContainer;
1769 return getOffsetParent(commonAncestorContainer);
1772 // one of the nodes is inside shadowDOM, find which one
1773 var element1root = getRoot(element1);
1774 if (element1root.host) {
1775 return findCommonOffsetParent(element1root.host, element2);
1777 return findCommonOffsetParent(element1, getRoot(element2).host);
1782 * Gets the scroll value of the given element in the given side (top and left)
1784 * @memberof Popper.Utils
1785 * @argument {Element} element
1786 * @argument {String} side `top` or `left`
1787 * @returns {number} amount of scrolled pixels
1789 function getScroll(element) {
1790 var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
1792 var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
1793 var nodeName = element.nodeName;
1795 if (nodeName === 'BODY' || nodeName === 'HTML') {
1796 var html = element.ownerDocument.documentElement;
1797 var scrollingElement = element.ownerDocument.scrollingElement || html;
1798 return scrollingElement[upperSide];
1801 return element[upperSide];
1805 * Sum or subtract the element scroll values (left and top) from a given rect object
1807 * @memberof Popper.Utils
1808 * @param {Object} rect - Rect object you want to change
1809 * @param {HTMLElement} element - The element from the function reads the scroll values
1810 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
1811 * @return {Object} rect - The modifier rect object
1813 function includeScroll(rect, element) {
1814 var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1816 var scrollTop = getScroll(element, 'top');
1817 var scrollLeft = getScroll(element, 'left');
1818 var modifier = subtract ? -1 : 1;
1819 rect.top += scrollTop * modifier;
1820 rect.bottom += scrollTop * modifier;
1821 rect.left += scrollLeft * modifier;
1822 rect.right += scrollLeft * modifier;
1827 * Helper to detect borders of a given element
1829 * @memberof Popper.Utils
1830 * @param {CSSStyleDeclaration} styles
1831 * Result of `getStyleComputedProperty` on the given element
1832 * @param {String} axis - `x` or `y`
1833 * @return {number} borders - The borders size of the given axis
1836 function getBordersSize(styles, axis) {
1837 var sideA = axis === 'x' ? 'Left' : 'Top';
1838 var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
1840 return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
1843 function getSize(axis, body, html, computedStyle) {
1844 return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
1847 function getWindowSizes(document) {
1848 var body = document.body;
1849 var html = document.documentElement;
1850 var computedStyle = isIE(10) && getComputedStyle(html);
1853 height: getSize('Height', body, html, computedStyle),
1854 width: getSize('Width', body, html, computedStyle)
1858 var classCallCheck = function (instance, Constructor) {
1859 if (!(instance instanceof Constructor)) {
1860 throw new TypeError("Cannot call a class as a function");
1864 var createClass = function () {
1865 function defineProperties(target, props) {
1866 for (var i = 0; i < props.length; i++) {
1867 var descriptor = props[i];
1868 descriptor.enumerable = descriptor.enumerable || false;
1869 descriptor.configurable = true;
1870 if ("value" in descriptor) descriptor.writable = true;
1871 Object.defineProperty(target, descriptor.key, descriptor);
1875 return function (Constructor, protoProps, staticProps) {
1876 if (protoProps) defineProperties(Constructor.prototype, protoProps);
1877 if (staticProps) defineProperties(Constructor, staticProps);
1886 var defineProperty = function (obj, key, value) {
1888 Object.defineProperty(obj, key, {
1901 var _extends = Object.assign || function (target) {
1902 for (var i = 1; i < arguments.length; i++) {
1903 var source = arguments[i];
1905 for (var key in source) {
1906 if (Object.prototype.hasOwnProperty.call(source, key)) {
1907 target[key] = source[key];
1916 * Given element offsets, generate an output similar to getBoundingClientRect
1918 * @memberof Popper.Utils
1919 * @argument {Object} offsets
1920 * @returns {Object} ClientRect like output
1922 function getClientRect(offsets) {
1923 return _extends({}, offsets, {
1924 right: offsets.left + offsets.width,
1925 bottom: offsets.top + offsets.height
1930 * Get bounding client rect of given element
1932 * @memberof Popper.Utils
1933 * @param {HTMLElement} element
1934 * @return {Object} client rect
1936 function getBoundingClientRect(element) {
1939 // IE10 10 FIX: Please, don't ask, the element isn't
1940 // considered in DOM in some circumstances...
1941 // This isn't reproducible in IE10 compatibility mode of IE11
1944 rect = element.getBoundingClientRect();
1945 var scrollTop = getScroll(element, 'top');
1946 var scrollLeft = getScroll(element, 'left');
1947 rect.top += scrollTop;
1948 rect.left += scrollLeft;
1949 rect.bottom += scrollTop;
1950 rect.right += scrollLeft;
1952 rect = element.getBoundingClientRect();
1959 width: rect.right - rect.left,
1960 height: rect.bottom - rect.top
1963 // subtract scrollbar size from sizes
1964 var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
1965 var width = sizes.width || element.clientWidth || result.right - result.left;
1966 var height = sizes.height || element.clientHeight || result.bottom - result.top;
1968 var horizScrollbar = element.offsetWidth - width;
1969 var vertScrollbar = element.offsetHeight - height;
1971 // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
1972 // we make this check conditional for performance reasons
1973 if (horizScrollbar || vertScrollbar) {
1974 var styles = getStyleComputedProperty(element);
1975 horizScrollbar -= getBordersSize(styles, 'x');
1976 vertScrollbar -= getBordersSize(styles, 'y');
1978 result.width -= horizScrollbar;
1979 result.height -= vertScrollbar;
1982 return getClientRect(result);
1985 function getOffsetRectRelativeToArbitraryNode(children, parent) {
1986 var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1988 var isIE10 = isIE(10);
1989 var isHTML = parent.nodeName === 'HTML';
1990 var childrenRect = getBoundingClientRect(children);
1991 var parentRect = getBoundingClientRect(parent);
1992 var scrollParent = getScrollParent(children);
1994 var styles = getStyleComputedProperty(parent);
1995 var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
1996 var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
1998 // In cases where the parent is fixed, we must ignore negative scroll in offset calc
1999 if (fixedPosition && isHTML) {
2000 parentRect.top = Math.max(parentRect.top, 0);
2001 parentRect.left = Math.max(parentRect.left, 0);
2003 var offsets = getClientRect({
2004 top: childrenRect.top - parentRect.top - borderTopWidth,
2005 left: childrenRect.left - parentRect.left - borderLeftWidth,
2006 width: childrenRect.width,
2007 height: childrenRect.height
2009 offsets.marginTop = 0;
2010 offsets.marginLeft = 0;
2012 // Subtract margins of documentElement in case it's being used as parent
2013 // we do this only on HTML because it's the only element that behaves
2014 // differently when margins are applied to it. The margins are included in
2015 // the box of the documentElement, in the other cases not.
2016 if (!isIE10 && isHTML) {
2017 var marginTop = parseFloat(styles.marginTop, 10);
2018 var marginLeft = parseFloat(styles.marginLeft, 10);
2020 offsets.top -= borderTopWidth - marginTop;
2021 offsets.bottom -= borderTopWidth - marginTop;
2022 offsets.left -= borderLeftWidth - marginLeft;
2023 offsets.right -= borderLeftWidth - marginLeft;
2025 // Attach marginTop and marginLeft because in some circumstances we may need them
2026 offsets.marginTop = marginTop;
2027 offsets.marginLeft = marginLeft;
2030 if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
2031 offsets = includeScroll(offsets, parent);
2037 function getViewportOffsetRectRelativeToArtbitraryNode(element) {
2038 var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2040 var html = element.ownerDocument.documentElement;
2041 var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
2042 var width = Math.max(html.clientWidth, window.innerWidth || 0);
2043 var height = Math.max(html.clientHeight, window.innerHeight || 0);
2045 var scrollTop = !excludeScroll ? getScroll(html) : 0;
2046 var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
2049 top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
2050 left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
2055 return getClientRect(offset);
2059 * Check if the given element is fixed or is inside a fixed parent
2061 * @memberof Popper.Utils
2062 * @argument {Element} element
2063 * @argument {Element} customContainer
2064 * @returns {Boolean} answer to "isFixed?"
2066 function isFixed(element) {
2067 var nodeName = element.nodeName;
2068 if (nodeName === 'BODY' || nodeName === 'HTML') {
2071 if (getStyleComputedProperty(element, 'position') === 'fixed') {
2074 var parentNode = getParentNode(element);
2078 return isFixed(parentNode);
2082 * Finds the first parent of an element that has a transformed property defined
2084 * @memberof Popper.Utils
2085 * @argument {Element} element
2086 * @returns {Element} first transformed parent or documentElement
2089 function getFixedPositionOffsetParent(element) {
2090 // This check is needed to avoid errors in case one of the elements isn't defined for any reason
2091 if (!element || !element.parentElement || isIE()) {
2092 return document.documentElement;
2094 var el = element.parentElement;
2095 while (el && getStyleComputedProperty(el, 'transform') === 'none') {
2096 el = el.parentElement;
2098 return el || document.documentElement;
2102 * Computed the boundaries limits and return them
2104 * @memberof Popper.Utils
2105 * @param {HTMLElement} popper
2106 * @param {HTMLElement} reference
2107 * @param {number} padding
2108 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
2109 * @param {Boolean} fixedPosition - Is in fixed position mode
2110 * @returns {Object} Coordinates of the boundaries
2112 function getBoundaries(popper, reference, padding, boundariesElement) {
2113 var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2115 // NOTE: 1 DOM access here
2117 var boundaries = { top: 0, left: 0 };
2118 var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
2120 // Handle viewport case
2121 if (boundariesElement === 'viewport') {
2122 boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
2124 // Handle other cases based on DOM element used as boundaries
2125 var boundariesNode = void 0;
2126 if (boundariesElement === 'scrollParent') {
2127 boundariesNode = getScrollParent(getParentNode(reference));
2128 if (boundariesNode.nodeName === 'BODY') {
2129 boundariesNode = popper.ownerDocument.documentElement;
2131 } else if (boundariesElement === 'window') {
2132 boundariesNode = popper.ownerDocument.documentElement;
2134 boundariesNode = boundariesElement;
2137 var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
2139 // In case of HTML, we need a different computation
2140 if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
2141 var _getWindowSizes = getWindowSizes(popper.ownerDocument),
2142 height = _getWindowSizes.height,
2143 width = _getWindowSizes.width;
2145 boundaries.top += offsets.top - offsets.marginTop;
2146 boundaries.bottom = height + offsets.top;
2147 boundaries.left += offsets.left - offsets.marginLeft;
2148 boundaries.right = width + offsets.left;
2150 // for all the other DOM elements, this one is good
2151 boundaries = offsets;
2156 padding = padding || 0;
2157 var isPaddingNumber = typeof padding === 'number';
2158 boundaries.left += isPaddingNumber ? padding : padding.left || 0;
2159 boundaries.top += isPaddingNumber ? padding : padding.top || 0;
2160 boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
2161 boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
2166 function getArea(_ref) {
2167 var width = _ref.width,
2168 height = _ref.height;
2170 return width * height;
2174 * Utility used to transform the `auto` placement to the placement with more
2177 * @memberof Popper.Utils
2178 * @argument {Object} data - The data object generated by update method
2179 * @argument {Object} options - Modifiers configuration and options
2180 * @returns {Object} The data object, properly modified
2182 function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
2183 var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
2185 if (placement.indexOf('auto') === -1) {
2189 var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
2193 width: boundaries.width,
2194 height: refRect.top - boundaries.top
2197 width: boundaries.right - refRect.right,
2198 height: boundaries.height
2201 width: boundaries.width,
2202 height: boundaries.bottom - refRect.bottom
2205 width: refRect.left - boundaries.left,
2206 height: boundaries.height
2210 var sortedAreas = Object.keys(rects).map(function (key) {
2214 area: getArea(rects[key])
2216 }).sort(function (a, b) {
2217 return b.area - a.area;
2220 var filteredAreas = sortedAreas.filter(function (_ref2) {
2221 var width = _ref2.width,
2222 height = _ref2.height;
2223 return width >= popper.clientWidth && height >= popper.clientHeight;
2226 var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
2228 var variation = placement.split('-')[1];
2230 return computedPlacement + (variation ? '-' + variation : '');
2234 * Get offsets to the reference element
2236 * @memberof Popper.Utils
2237 * @param {Object} state
2238 * @param {Element} popper - the popper element
2239 * @param {Element} reference - the reference element (the popper will be relative to this)
2240 * @param {Element} fixedPosition - is in fixed position mode
2241 * @returns {Object} An object containing the offsets which will be applied to the popper
2243 function getReferenceOffsets(state, popper, reference) {
2244 var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2246 var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
2247 return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
2251 * Get the outer sizes of the given element (offset size + margins)
2253 * @memberof Popper.Utils
2254 * @argument {Element} element
2255 * @returns {Object} object containing width and height properties
2257 function getOuterSizes(element) {
2258 var window = element.ownerDocument.defaultView;
2259 var styles = window.getComputedStyle(element);
2260 var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
2261 var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
2263 width: element.offsetWidth + y,
2264 height: element.offsetHeight + x
2270 * Get the opposite placement of the given one
2272 * @memberof Popper.Utils
2273 * @argument {String} placement
2274 * @returns {String} flipped placement
2276 function getOppositePlacement(placement) {
2277 var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2278 return placement.replace(/left|right|bottom|top/g, function (matched) {
2279 return hash[matched];
2284 * Get offsets to the popper
2286 * @memberof Popper.Utils
2287 * @param {Object} position - CSS position the Popper will get applied
2288 * @param {HTMLElement} popper - the popper element
2289 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
2290 * @param {String} placement - one of the valid placement options
2291 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
2293 function getPopperOffsets(popper, referenceOffsets, placement) {
2294 placement = placement.split('-')[0];
2296 // Get popper node sizes
2297 var popperRect = getOuterSizes(popper);
2299 // Add position, width and height to our offsets object
2300 var popperOffsets = {
2301 width: popperRect.width,
2302 height: popperRect.height
2305 // depending by the popper placement we have to compute its offsets slightly differently
2306 var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
2307 var mainSide = isHoriz ? 'top' : 'left';
2308 var secondarySide = isHoriz ? 'left' : 'top';
2309 var measurement = isHoriz ? 'height' : 'width';
2310 var secondaryMeasurement = !isHoriz ? 'height' : 'width';
2312 popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
2313 if (placement === secondarySide) {
2314 popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
2316 popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
2319 return popperOffsets;
2323 * Mimics the `find` method of Array
2325 * @memberof Popper.Utils
2326 * @argument {Array} arr
2329 * @returns index or -1
2331 function find(arr, check) {
2332 // use native find if supported
2333 if (Array.prototype.find) {
2334 return arr.find(check);
2337 // use `filter` to obtain the same behavior of `find`
2338 return arr.filter(check)[0];
2342 * Return the index of the matching object
2344 * @memberof Popper.Utils
2345 * @argument {Array} arr
2348 * @returns index or -1
2350 function findIndex(arr, prop, value) {
2351 // use native findIndex if supported
2352 if (Array.prototype.findIndex) {
2353 return arr.findIndex(function (cur) {
2354 return cur[prop] === value;
2358 // use `find` + `indexOf` if `findIndex` isn't supported
2359 var match = find(arr, function (obj) {
2360 return obj[prop] === value;
2362 return arr.indexOf(match);
2366 * Loop trough the list of modifiers and run them in order,
2367 * each of them will then edit the data object.
2369 * @memberof Popper.Utils
2370 * @param {dataObject} data
2371 * @param {Array} modifiers
2372 * @param {String} ends - Optional modifier name used as stopper
2373 * @returns {dataObject}
2375 function runModifiers(modifiers, data, ends) {
2376 var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
2378 modifiersToRun.forEach(function (modifier) {
2379 if (modifier['function']) {
2380 // eslint-disable-line dot-notation
2381 console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
2383 var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
2384 if (modifier.enabled && isFunction(fn)) {
2385 // Add properties to offsets to make them a complete clientRect object
2386 // we do this before each modifier to make sure the previous one doesn't
2387 // mess with these values
2388 data.offsets.popper = getClientRect(data.offsets.popper);
2389 data.offsets.reference = getClientRect(data.offsets.reference);
2391 data = fn(data, modifier);
2399 * Updates the position of the popper, computing the new offsets and applying
2400 * the new style.<br />
2401 * Prefer `scheduleUpdate` over `update` because of performance reasons.
2406 // if popper is destroyed, don't perform any further update
2407 if (this.state.isDestroyed) {
2420 // compute reference element offsets
2421 data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
2423 // compute auto placement, store placement inside the data object,
2424 // modifiers will be able to edit `placement` if needed
2425 // and refer to originalPlacement to know the original value
2426 data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
2428 // store the computed placement inside `originalPlacement`
2429 data.originalPlacement = data.placement;
2431 data.positionFixed = this.options.positionFixed;
2433 // compute the popper offsets
2434 data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
2436 data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
2438 // run the modifiers
2439 data = runModifiers(this.modifiers, data);
2441 // the first `update` will call `onCreate` callback
2442 // the other ones will call `onUpdate` callback
2443 if (!this.state.isCreated) {
2444 this.state.isCreated = true;
2445 this.options.onCreate(data);
2447 this.options.onUpdate(data);
2452 * Helper used to know if the given modifier is enabled.
2454 * @memberof Popper.Utils
2455 * @returns {Boolean}
2457 function isModifierEnabled(modifiers, modifierName) {
2458 return modifiers.some(function (_ref) {
2459 var name = _ref.name,
2460 enabled = _ref.enabled;
2461 return enabled && name === modifierName;
2466 * Get the prefixed supported property name
2468 * @memberof Popper.Utils
2469 * @argument {String} property (camelCase)
2470 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
2472 function getSupportedPropertyName(property) {
2473 var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
2474 var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
2476 for (var i = 0; i < prefixes.length; i++) {
2477 var prefix = prefixes[i];
2478 var toCheck = prefix ? '' + prefix + upperProp : property;
2479 if (typeof document.body.style[toCheck] !== 'undefined') {
2487 * Destroys the popper.
2491 function destroy() {
2492 this.state.isDestroyed = true;
2494 // touch DOM only if `applyStyle` modifier is enabled
2495 if (isModifierEnabled(this.modifiers, 'applyStyle')) {
2496 this.popper.removeAttribute('x-placement');
2497 this.popper.style.position = '';
2498 this.popper.style.top = '';
2499 this.popper.style.left = '';
2500 this.popper.style.right = '';
2501 this.popper.style.bottom = '';
2502 this.popper.style.willChange = '';
2503 this.popper.style[getSupportedPropertyName('transform')] = '';
2506 this.disableEventListeners();
2508 // remove the popper if user explicity asked for the deletion on destroy
2509 // do not use `remove` because IE11 doesn't support it
2510 if (this.options.removeOnDestroy) {
2511 this.popper.parentNode.removeChild(this.popper);
2517 * Get the window associated with the element
2518 * @argument {Element} element
2521 function getWindow(element) {
2522 var ownerDocument = element.ownerDocument;
2523 return ownerDocument ? ownerDocument.defaultView : window;
2526 function attachToScrollParents(scrollParent, event, callback, scrollParents) {
2527 var isBody = scrollParent.nodeName === 'BODY';
2528 var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
2529 target.addEventListener(event, callback, { passive: true });
2532 attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
2534 scrollParents.push(target);
2538 * Setup needed event listeners used to update the popper position
2540 * @memberof Popper.Utils
2543 function setupEventListeners(reference, options, state, updateBound) {
2544 // Resize event listener on window
2545 state.updateBound = updateBound;
2546 getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
2548 // Scroll event listener on scroll parents
2549 var scrollElement = getScrollParent(reference);
2550 attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
2551 state.scrollElement = scrollElement;
2552 state.eventsEnabled = true;
2558 * It will add resize/scroll events and start recalculating
2559 * position of the popper element when they are triggered.
2563 function enableEventListeners() {
2564 if (!this.state.eventsEnabled) {
2565 this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
2570 * Remove event listeners used to update the popper position
2572 * @memberof Popper.Utils
2575 function removeEventListeners(reference, state) {
2576 // Remove resize event listener on window
2577 getWindow(reference).removeEventListener('resize', state.updateBound);
2579 // Remove scroll event listener on scroll parents
2580 state.scrollParents.forEach(function (target) {
2581 target.removeEventListener('scroll', state.updateBound);
2585 state.updateBound = null;
2586 state.scrollParents = [];
2587 state.scrollElement = null;
2588 state.eventsEnabled = false;
2593 * It will remove resize/scroll events and won't recalculate popper position
2594 * when they are triggered. It also won't trigger `onUpdate` callback anymore,
2595 * unless you call `update` method manually.
2599 function disableEventListeners() {
2600 if (this.state.eventsEnabled) {
2601 cancelAnimationFrame(this.scheduleUpdate);
2602 this.state = removeEventListeners(this.reference, this.state);
2607 * Tells if a given input is a number
2609 * @memberof Popper.Utils
2610 * @param {*} input to check
2613 function isNumeric(n) {
2614 return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2618 * Set the style to the given popper
2620 * @memberof Popper.Utils
2621 * @argument {Element} element - Element to apply the style to
2622 * @argument {Object} styles
2623 * Object with a list of properties and values which will be applied to the element
2625 function setStyles(element, styles) {
2626 Object.keys(styles).forEach(function (prop) {
2628 // add unit if the value is numeric and is one of the following
2629 if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
2632 element.style[prop] = styles[prop] + unit;
2637 * Set the attributes to the given popper
2639 * @memberof Popper.Utils
2640 * @argument {Element} element - Element to apply the attributes to
2641 * @argument {Object} styles
2642 * Object with a list of properties and values which will be applied to the element
2644 function setAttributes(element, attributes) {
2645 Object.keys(attributes).forEach(function (prop) {
2646 var value = attributes[prop];
2647 if (value !== false) {
2648 element.setAttribute(prop, attributes[prop]);
2650 element.removeAttribute(prop);
2657 * @memberof Modifiers
2658 * @argument {Object} data - The data object generated by `update` method
2659 * @argument {Object} data.styles - List of style properties - values to apply to popper element
2660 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
2661 * @argument {Object} options - Modifiers configuration and options
2662 * @returns {Object} The same data object
2664 function applyStyle(data) {
2665 // any property present in `data.styles` will be applied to the popper,
2666 // in this way we can make the 3rd party modifiers add custom styles to it
2667 // Be aware, modifiers could override the properties defined in the previous
2668 // lines of this modifier!
2669 setStyles(data.instance.popper, data.styles);
2671 // any property present in `data.attributes` will be applied to the popper,
2672 // they will be set as HTML attributes of the element
2673 setAttributes(data.instance.popper, data.attributes);
2675 // if arrowElement is defined and arrowStyles has some properties
2676 if (data.arrowElement && Object.keys(data.arrowStyles).length) {
2677 setStyles(data.arrowElement, data.arrowStyles);
2684 * Set the x-placement attribute before everything else because it could be used
2685 * to add margins to the popper margins needs to be calculated to get the
2686 * correct popper offsets.
2688 * @memberof Popper.modifiers
2689 * @param {HTMLElement} reference - The reference element used to position the popper
2690 * @param {HTMLElement} popper - The HTML element used as popper
2691 * @param {Object} options - Popper.js options
2693 function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
2694 // compute reference element offsets
2695 var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
2697 // compute auto placement, store placement inside the data object,
2698 // modifiers will be able to edit `placement` if needed
2699 // and refer to originalPlacement to know the original value
2700 var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
2702 popper.setAttribute('x-placement', placement);
2704 // Apply `position` to popper before anything else because
2705 // without the position applied we can't guarantee correct computations
2706 setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
2713 * @memberof Popper.Utils
2714 * @argument {Object} data - The data object generated by `update` method
2715 * @argument {Boolean} shouldRound - If the offsets should be rounded at all
2716 * @returns {Object} The popper's position offsets rounded
2718 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
2719 * good as it can be within reason.
2720 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
2722 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
2723 * as well on High DPI screens).
2725 * Firefox prefers no rounding for positioning and does not have blurriness on
2728 * Only horizontal placement and left/right values need to be considered.
2730 function getRoundedOffsets(data, shouldRound) {
2731 var _data$offsets = data.offsets,
2732 popper = _data$offsets.popper,
2733 reference = _data$offsets.reference;
2734 var round = Math.round,
2737 var noRound = function noRound(v) {
2741 var referenceWidth = round(reference.width);
2742 var popperWidth = round(popper.width);
2744 var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
2745 var isVariation = data.placement.indexOf('-') !== -1;
2746 var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
2747 var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
2749 var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
2750 var verticalToInteger = !shouldRound ? noRound : round;
2753 left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
2754 top: verticalToInteger(popper.top),
2755 bottom: verticalToInteger(popper.bottom),
2756 right: horizontalToInteger(popper.right)
2760 var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
2764 * @memberof Modifiers
2765 * @argument {Object} data - The data object generated by `update` method
2766 * @argument {Object} options - Modifiers configuration and options
2767 * @returns {Object} The data object, properly modified
2769 function computeStyle(data, options) {
2772 var popper = data.offsets.popper;
2774 // Remove this legacy support in Popper.js v2
2776 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
2777 return modifier.name === 'applyStyle';
2779 if (legacyGpuAccelerationOption !== undefined) {
2780 console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
2782 var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
2784 var offsetParent = getOffsetParent(data.instance.popper);
2785 var offsetParentRect = getBoundingClientRect(offsetParent);
2789 position: popper.position
2792 var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
2794 var sideA = x === 'bottom' ? 'top' : 'bottom';
2795 var sideB = y === 'right' ? 'left' : 'right';
2797 // if gpuAcceleration is set to `true` and transform is supported,
2798 // we use `translate3d` to apply the position to the popper we
2799 // automatically use the supported prefixed version if needed
2800 var prefixedProperty = getSupportedPropertyName('transform');
2802 // now, let's make a step back and look at this code closely (wtf?)
2803 // If the content of the popper grows once it's been positioned, it
2804 // may happen that the popper gets misplaced because of the new content
2805 // overflowing its reference element
2806 // To avoid this problem, we provide two options (x and y), which allow
2807 // the consumer to define the offset origin.
2808 // If we position a popper on top of a reference element, we can set
2809 // `x` to `top` to make the popper grow towards its top instead of
2813 if (sideA === 'bottom') {
2814 // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
2815 // and not the bottom of the html element
2816 if (offsetParent.nodeName === 'HTML') {
2817 top = -offsetParent.clientHeight + offsets.bottom;
2819 top = -offsetParentRect.height + offsets.bottom;
2824 if (sideB === 'right') {
2825 if (offsetParent.nodeName === 'HTML') {
2826 left = -offsetParent.clientWidth + offsets.right;
2828 left = -offsetParentRect.width + offsets.right;
2831 left = offsets.left;
2833 if (gpuAcceleration && prefixedProperty) {
2834 styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2837 styles.willChange = 'transform';
2839 // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
2840 var invertTop = sideA === 'bottom' ? -1 : 1;
2841 var invertLeft = sideB === 'right' ? -1 : 1;
2842 styles[sideA] = top * invertTop;
2843 styles[sideB] = left * invertLeft;
2844 styles.willChange = sideA + ', ' + sideB;
2849 'x-placement': data.placement
2852 // Update `data` attributes, styles and arrowStyles
2853 data.attributes = _extends({}, attributes, data.attributes);
2854 data.styles = _extends({}, styles, data.styles);
2855 data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
2861 * Helper used to know if the given modifier depends from another one.<br />
2862 * It checks if the needed modifier is listed and enabled.
2864 * @memberof Popper.Utils
2865 * @param {Array} modifiers - list of modifiers
2866 * @param {String} requestingName - name of requesting modifier
2867 * @param {String} requestedName - name of requested modifier
2868 * @returns {Boolean}
2870 function isModifierRequired(modifiers, requestingName, requestedName) {
2871 var requesting = find(modifiers, function (_ref) {
2872 var name = _ref.name;
2873 return name === requestingName;
2876 var isRequired = !!requesting && modifiers.some(function (modifier) {
2877 return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
2881 var _requesting = '`' + requestingName + '`';
2882 var requested = '`' + requestedName + '`';
2883 console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
2890 * @memberof Modifiers
2891 * @argument {Object} data - The data object generated by update method
2892 * @argument {Object} options - Modifiers configuration and options
2893 * @returns {Object} The data object, properly modified
2895 function arrow(data, options) {
2896 var _data$offsets$arrow;
2898 // arrow depends on keepTogether in order to work
2899 if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
2903 var arrowElement = options.element;
2905 // if arrowElement is a string, suppose it's a CSS selector
2906 if (typeof arrowElement === 'string') {
2907 arrowElement = data.instance.popper.querySelector(arrowElement);
2909 // if arrowElement is not found, don't run the modifier
2910 if (!arrowElement) {
2914 // if the arrowElement isn't a query selector we must check that the
2915 // provided DOM node is child of its popper node
2916 if (!data.instance.popper.contains(arrowElement)) {
2917 console.warn('WARNING: `arrow.element` must be child of its popper element!');
2922 var placement = data.placement.split('-')[0];
2923 var _data$offsets = data.offsets,
2924 popper = _data$offsets.popper,
2925 reference = _data$offsets.reference;
2927 var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2929 var len = isVertical ? 'height' : 'width';
2930 var sideCapitalized = isVertical ? 'Top' : 'Left';
2931 var side = sideCapitalized.toLowerCase();
2932 var altSide = isVertical ? 'left' : 'top';
2933 var opSide = isVertical ? 'bottom' : 'right';
2934 var arrowElementSize = getOuterSizes(arrowElement)[len];
2937 // extends keepTogether behavior making sure the popper and its
2938 // reference have enough pixels in conjunction
2942 if (reference[opSide] - arrowElementSize < popper[side]) {
2943 data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
2945 // bottom/right side
2946 if (reference[side] + arrowElementSize > popper[opSide]) {
2947 data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
2949 data.offsets.popper = getClientRect(data.offsets.popper);
2951 // compute center of the popper
2952 var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
2954 // Compute the sideValue using the updated popper offsets
2955 // take popper margin in account because we don't have this info available
2956 var css = getStyleComputedProperty(data.instance.popper);
2957 var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
2958 var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
2959 var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
2961 // prevent arrowElement from being placed not contiguously to its popper
2962 sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
2964 data.arrowElement = arrowElement;
2965 data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
2971 * Get the opposite placement variation of the given one
2973 * @memberof Popper.Utils
2974 * @argument {String} placement variation
2975 * @returns {String} flipped placement variation
2977 function getOppositeVariation(variation) {
2978 if (variation === 'end') {
2980 } else if (variation === 'start') {
2987 * List of accepted placements to use as values of the `placement` option.<br />
2988 * Valid placements are:
2995 * Each placement can have a variation from this list:
2999 * Variations are interpreted easily if you think of them as the left to right
3000 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
3002 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
3004 * Some valid examples are:
3005 * - `top-end` (on top of reference, right aligned)
3006 * - `right-start` (on right of reference, top aligned)
3007 * - `bottom` (on bottom, centered)
3008 * - `auto-end` (on the side with more space available, alignment depends by placement)
3014 * @method placements
3017 var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
3019 // Get rid of `auto` `auto-start` and `auto-end`
3020 var validPlacements = placements.slice(3);
3023 * Given an initial placement, returns all the subsequent placements
3024 * clockwise (or counter-clockwise).
3027 * @memberof Popper.Utils
3028 * @argument {String} placement - A valid placement (it accepts variations)
3029 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
3030 * @returns {Array} placements including their variations
3032 function clockwise(placement) {
3033 var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3035 var index = validPlacements.indexOf(placement);
3036 var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
3037 return counter ? arr.reverse() : arr;
3042 CLOCKWISE: 'clockwise',
3043 COUNTERCLOCKWISE: 'counterclockwise'
3048 * @memberof Modifiers
3049 * @argument {Object} data - The data object generated by update method
3050 * @argument {Object} options - Modifiers configuration and options
3051 * @returns {Object} The data object, properly modified
3053 function flip(data, options) {
3054 // if `inner` modifier is enabled, we can't use the `flip` modifier
3055 if (isModifierEnabled(data.instance.modifiers, 'inner')) {
3059 if (data.flipped && data.placement === data.originalPlacement) {
3060 // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3064 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
3066 var placement = data.placement.split('-')[0];
3067 var placementOpposite = getOppositePlacement(placement);
3068 var variation = data.placement.split('-')[1] || '';
3072 switch (options.behavior) {
3073 case BEHAVIORS.FLIP:
3074 flipOrder = [placement, placementOpposite];
3076 case BEHAVIORS.CLOCKWISE:
3077 flipOrder = clockwise(placement);
3079 case BEHAVIORS.COUNTERCLOCKWISE:
3080 flipOrder = clockwise(placement, true);
3083 flipOrder = options.behavior;
3086 flipOrder.forEach(function (step, index) {
3087 if (placement !== step || flipOrder.length === index + 1) {
3091 placement = data.placement.split('-')[0];
3092 placementOpposite = getOppositePlacement(placement);
3094 var popperOffsets = data.offsets.popper;
3095 var refOffsets = data.offsets.reference;
3097 // using floor because the reference offsets may contain decimals we are not going to consider here
3098 var floor = Math.floor;
3099 var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
3101 var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
3102 var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
3103 var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
3104 var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
3106 var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
3108 // flip the variation if required
3109 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
3110 var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
3112 if (overlapsRef || overflowsBoundaries || flippedVariation) {
3113 // this boolean to detect any flip loop
3114 data.flipped = true;
3116 if (overlapsRef || overflowsBoundaries) {
3117 placement = flipOrder[index + 1];
3120 if (flippedVariation) {
3121 variation = getOppositeVariation(variation);
3124 data.placement = placement + (variation ? '-' + variation : '');
3126 // this object contains `position`, we want to preserve it along with
3127 // any additional property we may add in the future
3128 data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
3130 data = runModifiers(data.instance.modifiers, data, 'flip');
3138 * @memberof Modifiers
3139 * @argument {Object} data - The data object generated by update method
3140 * @argument {Object} options - Modifiers configuration and options
3141 * @returns {Object} The data object, properly modified
3143 function keepTogether(data) {
3144 var _data$offsets = data.offsets,
3145 popper = _data$offsets.popper,
3146 reference = _data$offsets.reference;
3148 var placement = data.placement.split('-')[0];
3149 var floor = Math.floor;
3150 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
3151 var side = isVertical ? 'right' : 'bottom';
3152 var opSide = isVertical ? 'left' : 'top';
3153 var measurement = isVertical ? 'width' : 'height';
3155 if (popper[side] < floor(reference[opSide])) {
3156 data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
3158 if (popper[opSide] > floor(reference[side])) {
3159 data.offsets.popper[opSide] = floor(reference[side]);
3166 * Converts a string containing value + unit into a px value number
3168 * @memberof {modifiers~offset}
3170 * @argument {String} str - Value + unit string
3171 * @argument {String} measurement - `height` or `width`
3172 * @argument {Object} popperOffsets
3173 * @argument {Object} referenceOffsets
3174 * @returns {Number|String}
3175 * Value in pixels, or original string if no values were extracted
3177 function toValue(str, measurement, popperOffsets, referenceOffsets) {
3178 // separate value from unit
3179 var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
3180 var value = +split[1];
3181 var unit = split[2];
3183 // If it's not a number it's an operator, I guess
3188 if (unit.indexOf('%') === 0) {
3189 var element = void 0;
3192 element = popperOffsets;
3197 element = referenceOffsets;
3200 var rect = getClientRect(element);
3201 return rect[measurement] / 100 * value;
3202 } else if (unit === 'vh' || unit === 'vw') {
3203 // if is a vh or vw, we calculate the size based on the viewport
3205 if (unit === 'vh') {
3206 size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
3208 size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
3210 return size / 100 * value;
3212 // if is an explicit pixel unit, we get rid of the unit and keep the value
3213 // if is an implicit unit, it's px, and we return just the value
3219 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
3221 * @memberof {modifiers~offset}
3223 * @argument {String} offset
3224 * @argument {Object} popperOffsets
3225 * @argument {Object} referenceOffsets
3226 * @argument {String} basePlacement
3227 * @returns {Array} a two cells array with x and y offsets in numbers
3229 function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
3230 var offsets = [0, 0];
3232 // Use height if placement is left or right and index is 0 otherwise use width
3233 // in this way the first offset will use an axis and the second one
3234 // will use the other one
3235 var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
3237 // Split the offset string to obtain a list of values and operands
3238 // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
3239 var fragments = offset.split(/(\+|\-)/).map(function (frag) {
3243 // Detect if the offset string contains a pair of values or a single one
3244 // they could be separated by comma or space
3245 var divider = fragments.indexOf(find(fragments, function (frag) {
3246 return frag.search(/,|\s/) !== -1;
3249 if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
3250 console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
3253 // If divider is found, we divide the list of values and operands to divide
3254 // them by ofset X and Y.
3255 var splitRegex = /\s*,\s*|\s+/;
3256 var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
3258 // Convert the values with units to absolute pixels to allow our computations
3259 ops = ops.map(function (op, index) {
3260 // Most of the units rely on the orientation of the popper
3261 var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
3262 var mergeWithPrevious = false;
3264 // This aggregates any `+` or `-` sign that aren't considered operators
3265 // e.g.: 10 + +5 => [10, +, +5]
3266 .reduce(function (a, b) {
3267 if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
3268 a[a.length - 1] = b;
3269 mergeWithPrevious = true;
3271 } else if (mergeWithPrevious) {
3272 a[a.length - 1] += b;
3273 mergeWithPrevious = false;
3279 // Here we convert the string values into number values (in px)
3280 .map(function (str) {
3281 return toValue(str, measurement, popperOffsets, referenceOffsets);
3285 // Loop trough the offsets arrays and execute the operations
3286 ops.forEach(function (op, index) {
3287 op.forEach(function (frag, index2) {
3288 if (isNumeric(frag)) {
3289 offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
3298 * @memberof Modifiers
3299 * @argument {Object} data - The data object generated by update method
3300 * @argument {Object} options - Modifiers configuration and options
3301 * @argument {Number|String} options.offset=0
3302 * The offset value as described in the modifier description
3303 * @returns {Object} The data object, properly modified
3305 function offset(data, _ref) {
3306 var offset = _ref.offset;
3307 var placement = data.placement,
3308 _data$offsets = data.offsets,
3309 popper = _data$offsets.popper,
3310 reference = _data$offsets.reference;
3312 var basePlacement = placement.split('-')[0];
3314 var offsets = void 0;
3315 if (isNumeric(+offset)) {
3316 offsets = [+offset, 0];
3318 offsets = parseOffset(offset, popper, reference, basePlacement);
3321 if (basePlacement === 'left') {
3322 popper.top += offsets[0];
3323 popper.left -= offsets[1];
3324 } else if (basePlacement === 'right') {
3325 popper.top += offsets[0];
3326 popper.left += offsets[1];
3327 } else if (basePlacement === 'top') {
3328 popper.left += offsets[0];
3329 popper.top -= offsets[1];
3330 } else if (basePlacement === 'bottom') {
3331 popper.left += offsets[0];
3332 popper.top += offsets[1];
3335 data.popper = popper;
3341 * @memberof Modifiers
3342 * @argument {Object} data - The data object generated by `update` method
3343 * @argument {Object} options - Modifiers configuration and options
3344 * @returns {Object} The data object, properly modified
3346 function preventOverflow(data, options) {
3347 var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
3349 // If offsetParent is the reference element, we really want to
3350 // go one step up and use the next offsetParent as reference to
3351 // avoid to make this modifier completely useless and look like broken
3352 if (data.instance.reference === boundariesElement) {
3353 boundariesElement = getOffsetParent(boundariesElement);
3356 // NOTE: DOM access here
3357 // resets the popper's position so that the document size can be calculated excluding
3358 // the size of the popper element itself
3359 var transformProp = getSupportedPropertyName('transform');
3360 var popperStyles = data.instance.popper.style; // assignment to help minification
3361 var top = popperStyles.top,
3362 left = popperStyles.left,
3363 transform = popperStyles[transformProp];
3365 popperStyles.top = '';
3366 popperStyles.left = '';
3367 popperStyles[transformProp] = '';
3369 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
3371 // NOTE: DOM access here
3372 // restores the original style properties after the offsets have been computed
3373 popperStyles.top = top;
3374 popperStyles.left = left;
3375 popperStyles[transformProp] = transform;
3377 options.boundaries = boundaries;
3379 var order = options.priority;
3380 var popper = data.offsets.popper;
3383 primary: function primary(placement) {
3384 var value = popper[placement];
3385 if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
3386 value = Math.max(popper[placement], boundaries[placement]);
3388 return defineProperty({}, placement, value);
3390 secondary: function secondary(placement) {
3391 var mainSide = placement === 'right' ? 'left' : 'top';
3392 var value = popper[mainSide];
3393 if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
3394 value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
3396 return defineProperty({}, mainSide, value);
3400 order.forEach(function (placement) {
3401 var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
3402 popper = _extends({}, popper, check[side](placement));
3405 data.offsets.popper = popper;
3412 * @memberof Modifiers
3413 * @argument {Object} data - The data object generated by `update` method
3414 * @argument {Object} options - Modifiers configuration and options
3415 * @returns {Object} The data object, properly modified
3417 function shift(data) {
3418 var placement = data.placement;
3419 var basePlacement = placement.split('-')[0];
3420 var shiftvariation = placement.split('-')[1];
3422 // if shift shiftvariation is specified, run the modifier
3423 if (shiftvariation) {
3424 var _data$offsets = data.offsets,
3425 reference = _data$offsets.reference,
3426 popper = _data$offsets.popper;
3428 var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
3429 var side = isVertical ? 'left' : 'top';
3430 var measurement = isVertical ? 'width' : 'height';
3432 var shiftOffsets = {
3433 start: defineProperty({}, side, reference[side]),
3434 end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
3437 data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
3445 * @memberof Modifiers
3446 * @argument {Object} data - The data object generated by update method
3447 * @argument {Object} options - Modifiers configuration and options
3448 * @returns {Object} The data object, properly modified
3450 function hide(data) {
3451 if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
3455 var refRect = data.offsets.reference;
3456 var bound = find(data.instance.modifiers, function (modifier) {
3457 return modifier.name === 'preventOverflow';
3460 if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
3461 // Avoid unnecessary DOM access if visibility hasn't changed
3462 if (data.hide === true) {
3467 data.attributes['x-out-of-boundaries'] = '';
3469 // Avoid unnecessary DOM access if visibility hasn't changed
3470 if (data.hide === false) {
3475 data.attributes['x-out-of-boundaries'] = false;
3483 * @memberof Modifiers
3484 * @argument {Object} data - The data object generated by `update` method
3485 * @argument {Object} options - Modifiers configuration and options
3486 * @returns {Object} The data object, properly modified
3488 function inner(data) {
3489 var placement = data.placement;
3490 var basePlacement = placement.split('-')[0];
3491 var _data$offsets = data.offsets,
3492 popper = _data$offsets.popper,
3493 reference = _data$offsets.reference;
3495 var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
3497 var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
3499 popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
3501 data.placement = getOppositePlacement(placement);
3502 data.offsets.popper = getClientRect(popper);
3508 * Modifier function, each modifier can have a function of this type assigned
3509 * to its `fn` property.<br />
3510 * These functions will be called on each update, this means that you must
3511 * make sure they are performant enough to avoid performance bottlenecks.
3513 * @function ModifierFn
3514 * @argument {dataObject} data - The data object generated by `update` method
3515 * @argument {Object} options - Modifiers configuration and options
3516 * @returns {dataObject} The data object, properly modified
3520 * Modifiers are plugins used to alter the behavior of your poppers.<br />
3521 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
3522 * needed by the library.
3524 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
3525 * All the other properties are configurations that could be tweaked.
3526 * @namespace modifiers
3530 * Modifier used to shift the popper on the start or end of its reference
3532 * It will read the variation of the `placement` property.<br />
3533 * It can be one either `-end` or `-start`.
3534 * @memberof modifiers
3538 /** @prop {number} order=100 - Index used to define the order of execution */
3540 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3542 /** @prop {ModifierFn} */
3547 * The `offset` modifier can shift your popper on both its axis.
3549 * It accepts the following units:
3550 * - `px` or unit-less, interpreted as pixels
3551 * - `%` or `%r`, percentage relative to the length of the reference element
3552 * - `%p`, percentage relative to the length of the popper element
3553 * - `vw`, CSS viewport width unit
3554 * - `vh`, CSS viewport height unit
3556 * For length is intended the main axis relative to the placement of the popper.<br />
3557 * This means that if the placement is `top` or `bottom`, the length will be the
3558 * `width`. In case of `left` or `right`, it will be the `height`.
3560 * You can provide a single value (as `Number` or `String`), or a pair of values
3561 * as `String` divided by a comma or one (or more) white spaces.<br />
3562 * The latter is a deprecated method because it leads to confusion and will be
3563 * removed in v2.<br />
3564 * Additionally, it accepts additions and subtractions between different units.
3565 * Note that multiplications and divisions aren't supported.
3567 * Valid examples are:
3575 * '-10px + 5vh, 5px - 6%'
3577 * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
3578 * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
3579 * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
3581 * @memberof modifiers
3585 /** @prop {number} order=200 - Index used to define the order of execution */
3587 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3589 /** @prop {ModifierFn} */
3591 /** @prop {Number|String} offset=0
3592 * The offset value as described in the modifier description
3598 * Modifier used to prevent the popper from being positioned outside the boundary.
3600 * A scenario exists where the reference itself is not within the boundaries.<br />
3601 * We can say it has "escaped the boundaries" — or just "escaped".<br />
3602 * In this case we need to decide whether the popper should either:
3604 * - detach from the reference and remain "trapped" in the boundaries, or
3605 * - if it should ignore the boundary and "escape with its reference"
3607 * When `escapeWithReference` is set to`true` and reference is completely
3608 * outside its boundaries, the popper will overflow (or completely leave)
3609 * the boundaries in order to remain attached to the edge of the reference.
3611 * @memberof modifiers
3615 /** @prop {number} order=300 - Index used to define the order of execution */
3617 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3619 /** @prop {ModifierFn} */
3620 fn: preventOverflow,
3622 * @prop {Array} [priority=['left','right','top','bottom']]
3623 * Popper will try to prevent overflow following these priorities by default,
3624 * then, it could overflow on the left and on top of the `boundariesElement`
3626 priority: ['left', 'right', 'top', 'bottom'],
3628 * @prop {number} padding=5
3629 * Amount of pixel used to define a minimum distance between the boundaries
3630 * and the popper. This makes sure the popper always has a little padding
3631 * between the edges of its container
3635 * @prop {String|HTMLElement} boundariesElement='scrollParent'
3636 * Boundaries used by the modifier. Can be `scrollParent`, `window`,
3637 * `viewport` or any DOM element.
3639 boundariesElement: 'scrollParent'
3643 * Modifier used to make sure the reference and its popper stay near each other
3644 * without leaving any gap between the two. Especially useful when the arrow is
3645 * enabled and you want to ensure that it points to its reference element.
3646 * It cares only about the first axis. You can still have poppers with margin
3647 * between the popper and its reference element.
3648 * @memberof modifiers
3652 /** @prop {number} order=400 - Index used to define the order of execution */
3654 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3656 /** @prop {ModifierFn} */
3661 * This modifier is used to move the `arrowElement` of the popper to make
3662 * sure it is positioned between the reference element and its popper element.
3663 * It will read the outer size of the `arrowElement` node to detect how many
3664 * pixels of conjunction are needed.
3666 * It has no effect if no `arrowElement` is provided.
3667 * @memberof modifiers
3671 /** @prop {number} order=500 - Index used to define the order of execution */
3673 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3675 /** @prop {ModifierFn} */
3677 /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
3678 element: '[x-arrow]'
3682 * Modifier used to flip the popper's placement when it starts to overlap its
3683 * reference element.
3685 * Requires the `preventOverflow` modifier before it in order to work.
3687 * **NOTE:** this modifier will interrupt the current update cycle and will
3688 * restart it if it detects the need to flip the placement.
3689 * @memberof modifiers
3693 /** @prop {number} order=600 - Index used to define the order of execution */
3695 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3697 /** @prop {ModifierFn} */
3700 * @prop {String|Array} behavior='flip'
3701 * The behavior used to change the popper's placement. It can be one of
3702 * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
3703 * placements (with optional variations)
3707 * @prop {number} padding=5
3708 * The popper will flip if it hits the edges of the `boundariesElement`
3712 * @prop {String|HTMLElement} boundariesElement='viewport'
3713 * The element which will define the boundaries of the popper position.
3714 * The popper will never be placed outside of the defined boundaries
3715 * (except if `keepTogether` is enabled)
3717 boundariesElement: 'viewport'
3721 * Modifier used to make the popper flow toward the inner of the reference element.
3722 * By default, when this modifier is disabled, the popper will be placed outside
3723 * the reference element.
3724 * @memberof modifiers
3728 /** @prop {number} order=700 - Index used to define the order of execution */
3730 /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
3732 /** @prop {ModifierFn} */
3737 * Modifier used to hide the popper when its reference element is outside of the
3738 * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
3739 * be used to hide with a CSS selector the popper when its reference is
3740 * out of boundaries.
3742 * Requires the `preventOverflow` modifier before it in order to work.
3743 * @memberof modifiers
3747 /** @prop {number} order=800 - Index used to define the order of execution */
3749 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3751 /** @prop {ModifierFn} */
3756 * Computes the style that will be applied to the popper element to gets
3757 * properly positioned.
3759 * Note that this modifier will not touch the DOM, it just prepares the styles
3760 * so that `applyStyle` modifier can apply it. This separation is useful
3761 * in case you need to replace `applyStyle` with a custom implementation.
3763 * This modifier has `850` as `order` value to maintain backward compatibility
3764 * with previous versions of Popper.js. Expect the modifiers ordering method
3765 * to change in future major versions of the library.
3767 * @memberof modifiers
3771 /** @prop {number} order=850 - Index used to define the order of execution */
3773 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3775 /** @prop {ModifierFn} */
3778 * @prop {Boolean} gpuAcceleration=true
3779 * If true, it uses the CSS 3D transformation to position the popper.
3780 * Otherwise, it will use the `top` and `left` properties
3782 gpuAcceleration: true,
3784 * @prop {string} [x='bottom']
3785 * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
3786 * Change this if your popper should grow in a direction different from `bottom`
3790 * @prop {string} [x='left']
3791 * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
3792 * Change this if your popper should grow in a direction different from `right`
3798 * Applies the computed styles to the popper element.
3800 * All the DOM manipulations are limited to this modifier. This is useful in case
3801 * you want to integrate Popper.js inside a framework or view library and you
3802 * want to delegate all the DOM manipulations to it.
3804 * Note that if you disable this modifier, you must make sure the popper element
3805 * has its position set to `absolute` before Popper.js can do its work!
3807 * Just disable this modifier and define your own to achieve the desired effect.
3809 * @memberof modifiers
3813 /** @prop {number} order=900 - Index used to define the order of execution */
3815 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3817 /** @prop {ModifierFn} */
3819 /** @prop {Function} */
3820 onLoad: applyStyleOnLoad,
3822 * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
3823 * @prop {Boolean} gpuAcceleration=true
3824 * If true, it uses the CSS 3D transformation to position the popper.
3825 * Otherwise, it will use the `top` and `left` properties
3827 gpuAcceleration: undefined
3832 * The `dataObject` is an object containing all the information used by Popper.js.
3833 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
3835 * @property {Object} data.instance The Popper.js instance
3836 * @property {String} data.placement Placement applied to popper
3837 * @property {String} data.originalPlacement Placement originally defined on init
3838 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
3839 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
3840 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
3841 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
3842 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
3843 * @property {Object} data.boundaries Offsets of the popper boundaries
3844 * @property {Object} data.offsets The measurements of popper, reference and arrow elements
3845 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
3846 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
3847 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
3851 * Default options provided to Popper.js constructor.<br />
3852 * These can be overridden using the `options` argument of Popper.js.<br />
3853 * To override an option, simply pass an object with the same
3854 * structure of the `options` object, as the 3rd argument. For example:
3856 * new Popper(ref, pop, {
3858 * preventOverflow: { enabled: false }
3868 * Popper's placement.
3869 * @prop {Popper.placements} placement='bottom'
3871 placement: 'bottom',
3874 * Set this to true if you want popper to position it self in 'fixed' mode
3875 * @prop {Boolean} positionFixed=false
3877 positionFixed: false,
3880 * Whether events (resize, scroll) are initially enabled.
3881 * @prop {Boolean} eventsEnabled=true
3883 eventsEnabled: true,
3886 * Set to true if you want to automatically remove the popper when
3887 * you call the `destroy` method.
3888 * @prop {Boolean} removeOnDestroy=false
3890 removeOnDestroy: false,
3893 * Callback called when the popper is created.<br />
3894 * By default, it is set to no-op.<br />
3895 * Access Popper.js instance with `data.instance`.
3898 onCreate: function onCreate() {},
3901 * Callback called when the popper is updated. This callback is not called
3902 * on the initialization/creation of the popper, but only on subsequent
3904 * By default, it is set to no-op.<br />
3905 * Access Popper.js instance with `data.instance`.
3908 onUpdate: function onUpdate() {},
3911 * List of modifiers used to modify the offsets before they are applied to the popper.
3912 * They provide most of the functionalities of Popper.js.
3915 modifiers: modifiers
3919 * @callback onCreate
3920 * @param {dataObject} data
3924 * @callback onUpdate
3925 * @param {dataObject} data
3930 var Popper = function () {
3932 * Creates a new Popper.js instance.
3934 * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
3935 * @param {HTMLElement} popper - The HTML element used as the popper
3936 * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
3937 * @return {Object} instance - The generated Popper.js instance
3939 function Popper(reference, popper) {
3942 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3943 classCallCheck(this, Popper);
3945 this.scheduleUpdate = function () {
3946 return requestAnimationFrame(_this.update);
3949 // make update() debounced, so that it only runs at most once-per-tick
3950 this.update = debounce(this.update.bind(this));
3952 // with {} we create a new object with the options inside it
3953 this.options = _extends({}, Popper.Defaults, options);
3962 // get reference and popper elements (allow jQuery wrappers)
3963 this.reference = reference && reference.jquery ? reference[0] : reference;
3964 this.popper = popper && popper.jquery ? popper[0] : popper;
3966 // Deep merge modifiers options
3967 this.options.modifiers = {};
3968 Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
3969 _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
3972 // Refactoring modifiers' list (Object => Array)
3973 this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
3976 }, _this.options.modifiers[name]);
3978 // sort the modifiers by order
3979 .sort(function (a, b) {
3980 return a.order - b.order;
3983 // modifiers have the ability to execute arbitrary code when Popper.js get inited
3984 // such code is executed in the same order of its modifier
3985 // they could add new properties to their options configuration
3986 // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
3987 this.modifiers.forEach(function (modifierOptions) {
3988 if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
3989 modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
3993 // fire the first update to position the popper in the right place
3996 var eventsEnabled = this.options.eventsEnabled;
3997 if (eventsEnabled) {
3998 // setup event listeners, they will take care of update the position in specific situations
3999 this.enableEventListeners();
4002 this.state.eventsEnabled = eventsEnabled;
4005 // We can't use class properties because they don't get listed in the
4006 // class prototype and break stuff like Sinon stubs
4009 createClass(Popper, [{
4011 value: function update$$1() {
4012 return update.call(this);
4016 value: function destroy$$1() {
4017 return destroy.call(this);
4020 key: 'enableEventListeners',
4021 value: function enableEventListeners$$1() {
4022 return enableEventListeners.call(this);
4025 key: 'disableEventListeners',
4026 value: function disableEventListeners$$1() {
4027 return disableEventListeners.call(this);
4031 * Schedules an update. It will run on the next UI update available.
4032 * @method scheduleUpdate
4038 * Collection of utilities useful when writing custom modifiers.
4039 * Starting from version 1.7, this method is available only if you
4040 * include `popper-utils.js` before `popper.js`.
4042 * **DEPRECATION**: This way to access PopperUtils is deprecated
4043 * and will be removed in v2! Use the PopperUtils module directly instead.
4044 * Due to the high instability of the methods contained in Utils, we can't
4045 * guarantee them to follow semver. Use them at your own risk!
4049 * @deprecated since version 1.8
4059 * The `referenceObject` is an object that provides an interface compatible with Popper.js
4060 * and lets you use it as replacement of a real DOM node.<br />
4061 * You can use this method to position a popper relatively to a set of coordinates
4062 * in case you don't have a DOM node to use as reference.
4065 * new Popper(referenceObject, popperNode);
4068 * NB: This feature isn't supported in Internet Explorer 10.
4069 * @name referenceObject
4070 * @property {Function} data.getBoundingClientRect
4071 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
4072 * @property {number} data.clientWidth
4073 * An ES6 getter that will return the width of the virtual reference element.
4074 * @property {number} data.clientHeight
4075 * An ES6 getter that will return the height of the virtual reference element.
4079 Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
4080 Popper.placements = placements;
4081 Popper.Defaults = Defaults;
4084 * ------------------------------------------------------------------------
4086 * ------------------------------------------------------------------------
4089 var NAME$4 = 'dropdown';
4090 var VERSION$4 = '4.3.1';
4091 var DATA_KEY$4 = 'bs.dropdown';
4092 var EVENT_KEY$4 = "." + DATA_KEY$4;
4093 var DATA_API_KEY$4 = '.data-api';
4094 var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
4095 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
4097 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
4099 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
4101 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
4103 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
4105 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
4107 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
4109 HIDE: "hide" + EVENT_KEY$4,
4110 HIDDEN: "hidden" + EVENT_KEY$4,
4111 SHOW: "show" + EVENT_KEY$4,
4112 SHOWN: "shown" + EVENT_KEY$4,
4113 CLICK: "click" + EVENT_KEY$4,
4114 CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4,
4115 KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4,
4116 KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4
4119 DISABLED: 'disabled',
4122 DROPRIGHT: 'dropright',
4123 DROPLEFT: 'dropleft',
4124 MENURIGHT: 'dropdown-menu-right',
4125 MENULEFT: 'dropdown-menu-left',
4126 POSITION_STATIC: 'position-static'
4129 DATA_TOGGLE: '[data-toggle="dropdown"]',
4130 FORM_CHILD: '.dropdown form',
4131 MENU: '.dropdown-menu',
4132 NAVBAR_NAV: '.navbar-nav',
4133 VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
4135 var AttachmentMap = {
4138 BOTTOM: 'bottom-start',
4139 BOTTOMEND: 'bottom-end',
4140 RIGHT: 'right-start',
4141 RIGHTEND: 'right-end',
4148 boundary: 'scrollParent',
4149 reference: 'toggle',
4152 var DefaultType$2 = {
4153 offset: '(number|string|function)',
4155 boundary: '(string|element)',
4156 reference: '(string|element)',
4159 * ------------------------------------------------------------------------
4161 * ------------------------------------------------------------------------
4169 function Dropdown(element, config) {
4170 this._element = element;
4171 this._popper = null;
4172 this._config = this._getConfig(config);
4173 this._menu = this._getMenuElement();
4174 this._inNavbar = this._detectNavbar();
4176 this._addEventListeners();
4180 var _proto = Dropdown.prototype;
4183 _proto.toggle = function toggle() {
4184 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) {
4188 var parent = Dropdown._getParentFromElement(this._element);
4190 var isActive = $(this._menu).hasClass(ClassName$4.SHOW);
4192 Dropdown._clearMenus();
4198 var relatedTarget = {
4199 relatedTarget: this._element
4201 var showEvent = $.Event(Event$4.SHOW, relatedTarget);
4202 $(parent).trigger(showEvent);
4204 if (showEvent.isDefaultPrevented()) {
4206 } // Disable totally Popper.js for Dropdown in Navbar
4209 if (!this._inNavbar) {
4211 * Check for Popper dependency
4212 * Popper - https://popper.js.org
4214 if (typeof Popper === 'undefined') {
4215 throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
4218 var referenceElement = this._element;
4220 if (this._config.reference === 'parent') {
4221 referenceElement = parent;
4222 } else if (Util.isElement(this._config.reference)) {
4223 referenceElement = this._config.reference; // Check if it's jQuery element
4225 if (typeof this._config.reference.jquery !== 'undefined') {
4226 referenceElement = this._config.reference[0];
4228 } // If boundary is not `scrollParent`, then set position to `static`
4229 // to allow the menu to "escape" the scroll parent's boundaries
4230 // https://github.com/twbs/bootstrap/issues/24251
4233 if (this._config.boundary !== 'scrollParent') {
4234 $(parent).addClass(ClassName$4.POSITION_STATIC);
4237 this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
4238 } // If this is a touch-enabled device we add extra
4239 // empty mouseover listeners to the body's immediate children;
4240 // only needed because of broken event delegation on iOS
4241 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
4244 if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) {
4245 $(document.body).children().on('mouseover', null, $.noop);
4248 this._element.focus();
4250 this._element.setAttribute('aria-expanded', true);
4252 $(this._menu).toggleClass(ClassName$4.SHOW);
4253 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
4256 _proto.show = function show() {
4257 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
4261 var relatedTarget = {
4262 relatedTarget: this._element
4264 var showEvent = $.Event(Event$4.SHOW, relatedTarget);
4266 var parent = Dropdown._getParentFromElement(this._element);
4268 $(parent).trigger(showEvent);
4270 if (showEvent.isDefaultPrevented()) {
4274 $(this._menu).toggleClass(ClassName$4.SHOW);
4275 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
4278 _proto.hide = function hide() {
4279 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {
4283 var relatedTarget = {
4284 relatedTarget: this._element
4286 var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
4288 var parent = Dropdown._getParentFromElement(this._element);
4290 $(parent).trigger(hideEvent);
4292 if (hideEvent.isDefaultPrevented()) {
4296 $(this._menu).toggleClass(ClassName$4.SHOW);
4297 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
4300 _proto.dispose = function dispose() {
4301 $.removeData(this._element, DATA_KEY$4);
4302 $(this._element).off(EVENT_KEY$4);
4303 this._element = null;
4306 if (this._popper !== null) {
4307 this._popper.destroy();
4309 this._popper = null;
4313 _proto.update = function update() {
4314 this._inNavbar = this._detectNavbar();
4316 if (this._popper !== null) {
4317 this._popper.scheduleUpdate();
4322 _proto._addEventListeners = function _addEventListeners() {
4325 $(this._element).on(Event$4.CLICK, function (event) {
4326 event.preventDefault();
4327 event.stopPropagation();
4333 _proto._getConfig = function _getConfig(config) {
4334 config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
4335 Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
4339 _proto._getMenuElement = function _getMenuElement() {
4341 var parent = Dropdown._getParentFromElement(this._element);
4344 this._menu = parent.querySelector(Selector$4.MENU);
4351 _proto._getPlacement = function _getPlacement() {
4352 var $parentDropdown = $(this._element.parentNode);
4353 var placement = AttachmentMap.BOTTOM; // Handle dropup
4355 if ($parentDropdown.hasClass(ClassName$4.DROPUP)) {
4356 placement = AttachmentMap.TOP;
4358 if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
4359 placement = AttachmentMap.TOPEND;
4361 } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) {
4362 placement = AttachmentMap.RIGHT;
4363 } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) {
4364 placement = AttachmentMap.LEFT;
4365 } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
4366 placement = AttachmentMap.BOTTOMEND;
4372 _proto._detectNavbar = function _detectNavbar() {
4373 return $(this._element).closest('.navbar').length > 0;
4376 _proto._getOffset = function _getOffset() {
4381 if (typeof this._config.offset === 'function') {
4382 offset.fn = function (data) {
4383 data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
4387 offset.offset = this._config.offset;
4393 _proto._getPopperConfig = function _getPopperConfig() {
4394 var popperConfig = {
4395 placement: this._getPlacement(),
4397 offset: this._getOffset(),
4399 enabled: this._config.flip
4402 boundariesElement: this._config.boundary
4404 } // Disable Popper.js if we have a static display
4408 if (this._config.display === 'static') {
4409 popperConfig.modifiers.applyStyle = {
4414 return popperConfig;
4418 Dropdown._jQueryInterface = function _jQueryInterface(config) {
4419 return this.each(function () {
4420 var data = $(this).data(DATA_KEY$4);
4422 var _config = typeof config === 'object' ? config : null;
4425 data = new Dropdown(this, _config);
4426 $(this).data(DATA_KEY$4, data);
4429 if (typeof config === 'string') {
4430 if (typeof data[config] === 'undefined') {
4431 throw new TypeError("No method named \"" + config + "\"");
4439 Dropdown._clearMenus = function _clearMenus(event) {
4440 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
4444 var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE));
4446 for (var i = 0, len = toggles.length; i < len; i++) {
4447 var parent = Dropdown._getParentFromElement(toggles[i]);
4449 var context = $(toggles[i]).data(DATA_KEY$4);
4450 var relatedTarget = {
4451 relatedTarget: toggles[i]
4454 if (event && event.type === 'click') {
4455 relatedTarget.clickEvent = event;
4462 var dropdownMenu = context._menu;
4464 if (!$(parent).hasClass(ClassName$4.SHOW)) {
4468 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
4472 var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
4473 $(parent).trigger(hideEvent);
4475 if (hideEvent.isDefaultPrevented()) {
4477 } // If this is a touch-enabled device we remove the extra
4478 // empty mouseover listeners we added for iOS support
4481 if ('ontouchstart' in document.documentElement) {
4482 $(document.body).children().off('mouseover', null, $.noop);
4485 toggles[i].setAttribute('aria-expanded', 'false');
4486 $(dropdownMenu).removeClass(ClassName$4.SHOW);
4487 $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
4491 Dropdown._getParentFromElement = function _getParentFromElement(element) {
4493 var selector = Util.getSelectorFromElement(element);
4496 parent = document.querySelector(selector);
4499 return parent || element.parentNode;
4500 } // eslint-disable-next-line complexity
4503 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
4504 // If not input/textarea:
4505 // - And not a key in REGEXP_KEYDOWN => not a dropdown command
4506 // If input/textarea:
4507 // - If space key => not a dropdown command
4508 // - If key is other than escape
4509 // - If key is not up or down => not a dropdown command
4510 // - If trigger inside the menu => not a dropdown command
4511 if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
4515 event.preventDefault();
4516 event.stopPropagation();
4518 if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) {
4522 var parent = Dropdown._getParentFromElement(this);
4524 var isActive = $(parent).hasClass(ClassName$4.SHOW);
4526 if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
4527 if (event.which === ESCAPE_KEYCODE) {
4528 var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);
4529 $(toggle).trigger('focus');
4532 $(this).trigger('click');
4536 var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS));
4538 if (items.length === 0) {
4542 var index = items.indexOf(event.target);
4544 if (event.which === ARROW_UP_KEYCODE && index > 0) {
4549 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
4558 items[index].focus();
4561 _createClass(Dropdown, null, [{
4563 get: function get() {
4568 get: function get() {
4573 get: function get() {
4574 return DefaultType$2;
4581 * ------------------------------------------------------------------------
4582 * Data Api implementation
4583 * ------------------------------------------------------------------------
4587 $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
4588 event.preventDefault();
4589 event.stopPropagation();
4591 Dropdown._jQueryInterface.call($(this), 'toggle');
4592 }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
4593 e.stopPropagation();
4596 * ------------------------------------------------------------------------
4598 * ------------------------------------------------------------------------
4601 $.fn[NAME$4] = Dropdown._jQueryInterface;
4602 $.fn[NAME$4].Constructor = Dropdown;
4604 $.fn[NAME$4].noConflict = function () {
4605 $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
4606 return Dropdown._jQueryInterface;
4610 * ------------------------------------------------------------------------
4612 * ------------------------------------------------------------------------
4615 var NAME$5 = 'modal';
4616 var VERSION$5 = '4.3.1';
4617 var DATA_KEY$5 = 'bs.modal';
4618 var EVENT_KEY$5 = "." + DATA_KEY$5;
4619 var DATA_API_KEY$5 = '.data-api';
4620 var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
4621 var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
4629 var DefaultType$3 = {
4630 backdrop: '(boolean|string)',
4631 keyboard: 'boolean',
4636 HIDE: "hide" + EVENT_KEY$5,
4637 HIDDEN: "hidden" + EVENT_KEY$5,
4638 SHOW: "show" + EVENT_KEY$5,
4639 SHOWN: "shown" + EVENT_KEY$5,
4640 FOCUSIN: "focusin" + EVENT_KEY$5,
4641 RESIZE: "resize" + EVENT_KEY$5,
4642 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5,
4643 KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5,
4644 MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5,
4645 MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5,
4646 CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5
4649 SCROLLABLE: 'modal-dialog-scrollable',
4650 SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
4651 BACKDROP: 'modal-backdrop',
4657 DIALOG: '.modal-dialog',
4658 MODAL_BODY: '.modal-body',
4659 DATA_TOGGLE: '[data-toggle="modal"]',
4660 DATA_DISMISS: '[data-dismiss="modal"]',
4661 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
4662 STICKY_CONTENT: '.sticky-top'
4664 * ------------------------------------------------------------------------
4666 * ------------------------------------------------------------------------
4674 function Modal(element, config) {
4675 this._config = this._getConfig(config);
4676 this._element = element;
4677 this._dialog = element.querySelector(Selector$5.DIALOG);
4678 this._backdrop = null;
4679 this._isShown = false;
4680 this._isBodyOverflowing = false;
4681 this._ignoreBackdropClick = false;
4682 this._isTransitioning = false;
4683 this._scrollbarWidth = 0;
4687 var _proto = Modal.prototype;
4690 _proto.toggle = function toggle(relatedTarget) {
4691 return this._isShown ? this.hide() : this.show(relatedTarget);
4694 _proto.show = function show(relatedTarget) {
4697 if (this._isShown || this._isTransitioning) {
4701 if ($(this._element).hasClass(ClassName$5.FADE)) {
4702 this._isTransitioning = true;
4705 var showEvent = $.Event(Event$5.SHOW, {
4706 relatedTarget: relatedTarget
4708 $(this._element).trigger(showEvent);
4710 if (this._isShown || showEvent.isDefaultPrevented()) {
4714 this._isShown = true;
4716 this._checkScrollbar();
4718 this._setScrollbar();
4720 this._adjustDialog();
4722 this._setEscapeEvent();
4724 this._setResizeEvent();
4726 $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
4727 return _this.hide(event);
4729 $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () {
4730 $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) {
4731 if ($(event.target).is(_this._element)) {
4732 _this._ignoreBackdropClick = true;
4737 this._showBackdrop(function () {
4738 return _this._showElement(relatedTarget);
4742 _proto.hide = function hide(event) {
4746 event.preventDefault();
4749 if (!this._isShown || this._isTransitioning) {
4753 var hideEvent = $.Event(Event$5.HIDE);
4754 $(this._element).trigger(hideEvent);
4756 if (!this._isShown || hideEvent.isDefaultPrevented()) {
4760 this._isShown = false;
4761 var transition = $(this._element).hasClass(ClassName$5.FADE);
4764 this._isTransitioning = true;
4767 this._setEscapeEvent();
4769 this._setResizeEvent();
4771 $(document).off(Event$5.FOCUSIN);
4772 $(this._element).removeClass(ClassName$5.SHOW);
4773 $(this._element).off(Event$5.CLICK_DISMISS);
4774 $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS);
4777 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4778 $(this._element).one(Util.TRANSITION_END, function (event) {
4779 return _this2._hideModal(event);
4780 }).emulateTransitionEnd(transitionDuration);
4786 _proto.dispose = function dispose() {
4787 [window, this._element, this._dialog].forEach(function (htmlElement) {
4788 return $(htmlElement).off(EVENT_KEY$5);
4791 * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
4792 * Do not move `document` in `htmlElements` array
4793 * It will remove `Event.CLICK_DATA_API` event that should remain
4796 $(document).off(Event$5.FOCUSIN);
4797 $.removeData(this._element, DATA_KEY$5);
4798 this._config = null;
4799 this._element = null;
4800 this._dialog = null;
4801 this._backdrop = null;
4802 this._isShown = null;
4803 this._isBodyOverflowing = null;
4804 this._ignoreBackdropClick = null;
4805 this._isTransitioning = null;
4806 this._scrollbarWidth = null;
4809 _proto.handleUpdate = function handleUpdate() {
4810 this._adjustDialog();
4814 _proto._getConfig = function _getConfig(config) {
4815 config = _objectSpread({}, Default$3, config);
4816 Util.typeCheckConfig(NAME$5, config, DefaultType$3);
4820 _proto._showElement = function _showElement(relatedTarget) {
4823 var transition = $(this._element).hasClass(ClassName$5.FADE);
4825 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
4826 // Don't move modal's DOM position
4827 document.body.appendChild(this._element);
4830 this._element.style.display = 'block';
4832 this._element.removeAttribute('aria-hidden');
4834 this._element.setAttribute('aria-modal', true);
4836 if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
4837 this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
4839 this._element.scrollTop = 0;
4843 Util.reflow(this._element);
4846 $(this._element).addClass(ClassName$5.SHOW);
4848 if (this._config.focus) {
4849 this._enforceFocus();
4852 var shownEvent = $.Event(Event$5.SHOWN, {
4853 relatedTarget: relatedTarget
4856 var transitionComplete = function transitionComplete() {
4857 if (_this3._config.focus) {
4858 _this3._element.focus();
4861 _this3._isTransitioning = false;
4862 $(_this3._element).trigger(shownEvent);
4866 var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
4867 $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
4869 transitionComplete();
4873 _proto._enforceFocus = function _enforceFocus() {
4876 $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop
4877 .on(Event$5.FOCUSIN, function (event) {
4878 if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
4879 _this4._element.focus();
4884 _proto._setEscapeEvent = function _setEscapeEvent() {
4887 if (this._isShown && this._config.keyboard) {
4888 $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {
4889 if (event.which === ESCAPE_KEYCODE$1) {
4890 event.preventDefault();
4895 } else if (!this._isShown) {
4896 $(this._element).off(Event$5.KEYDOWN_DISMISS);
4900 _proto._setResizeEvent = function _setResizeEvent() {
4903 if (this._isShown) {
4904 $(window).on(Event$5.RESIZE, function (event) {
4905 return _this6.handleUpdate(event);
4908 $(window).off(Event$5.RESIZE);
4912 _proto._hideModal = function _hideModal() {
4915 this._element.style.display = 'none';
4917 this._element.setAttribute('aria-hidden', true);
4919 this._element.removeAttribute('aria-modal');
4921 this._isTransitioning = false;
4923 this._showBackdrop(function () {
4924 $(document.body).removeClass(ClassName$5.OPEN);
4926 _this7._resetAdjustments();
4928 _this7._resetScrollbar();
4930 $(_this7._element).trigger(Event$5.HIDDEN);
4934 _proto._removeBackdrop = function _removeBackdrop() {
4935 if (this._backdrop) {
4936 $(this._backdrop).remove();
4937 this._backdrop = null;
4941 _proto._showBackdrop = function _showBackdrop(callback) {
4944 var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';
4946 if (this._isShown && this._config.backdrop) {
4947 this._backdrop = document.createElement('div');
4948 this._backdrop.className = ClassName$5.BACKDROP;
4951 this._backdrop.classList.add(animate);
4954 $(this._backdrop).appendTo(document.body);
4955 $(this._element).on(Event$5.CLICK_DISMISS, function (event) {
4956 if (_this8._ignoreBackdropClick) {
4957 _this8._ignoreBackdropClick = false;
4961 if (event.target !== event.currentTarget) {
4965 if (_this8._config.backdrop === 'static') {
4966 _this8._element.focus();
4973 Util.reflow(this._backdrop);
4976 $(this._backdrop).addClass(ClassName$5.SHOW);
4987 var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
4988 $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
4989 } else if (!this._isShown && this._backdrop) {
4990 $(this._backdrop).removeClass(ClassName$5.SHOW);
4992 var callbackRemove = function callbackRemove() {
4993 _this8._removeBackdrop();
5000 if ($(this._element).hasClass(ClassName$5.FADE)) {
5001 var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
5003 $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
5007 } else if (callback) {
5010 } // ----------------------------------------------------------------------
5011 // the following methods are used to handle overflowing modals
5012 // todo (fat): these should probably be refactored out of modal.js
5013 // ----------------------------------------------------------------------
5016 _proto._adjustDialog = function _adjustDialog() {
5017 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
5019 if (!this._isBodyOverflowing && isModalOverflowing) {
5020 this._element.style.paddingLeft = this._scrollbarWidth + "px";
5023 if (this._isBodyOverflowing && !isModalOverflowing) {
5024 this._element.style.paddingRight = this._scrollbarWidth + "px";
5028 _proto._resetAdjustments = function _resetAdjustments() {
5029 this._element.style.paddingLeft = '';
5030 this._element.style.paddingRight = '';
5033 _proto._checkScrollbar = function _checkScrollbar() {
5034 var rect = document.body.getBoundingClientRect();
5035 this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
5036 this._scrollbarWidth = this._getScrollbarWidth();
5039 _proto._setScrollbar = function _setScrollbar() {
5042 if (this._isBodyOverflowing) {
5043 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
5044 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
5045 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
5046 var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding
5048 $(fixedContent).each(function (index, element) {
5049 var actualPadding = element.style.paddingRight;
5050 var calculatedPadding = $(element).css('padding-right');
5051 $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
5052 }); // Adjust sticky content margin
5054 $(stickyContent).each(function (index, element) {
5055 var actualMargin = element.style.marginRight;
5056 var calculatedMargin = $(element).css('margin-right');
5057 $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
5058 }); // Adjust body padding
5060 var actualPadding = document.body.style.paddingRight;
5061 var calculatedPadding = $(document.body).css('padding-right');
5062 $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
5065 $(document.body).addClass(ClassName$5.OPEN);
5068 _proto._resetScrollbar = function _resetScrollbar() {
5069 // Restore fixed content padding
5070 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
5071 $(fixedContent).each(function (index, element) {
5072 var padding = $(element).data('padding-right');
5073 $(element).removeData('padding-right');
5074 element.style.paddingRight = padding ? padding : '';
5075 }); // Restore sticky content
5077 var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT));
5078 $(elements).each(function (index, element) {
5079 var margin = $(element).data('margin-right');
5081 if (typeof margin !== 'undefined') {
5082 $(element).css('margin-right', margin).removeData('margin-right');
5084 }); // Restore body padding
5086 var padding = $(document.body).data('padding-right');
5087 $(document.body).removeData('padding-right');
5088 document.body.style.paddingRight = padding ? padding : '';
5091 _proto._getScrollbarWidth = function _getScrollbarWidth() {
5093 var scrollDiv = document.createElement('div');
5094 scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;
5095 document.body.appendChild(scrollDiv);
5096 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
5097 document.body.removeChild(scrollDiv);
5098 return scrollbarWidth;
5102 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
5103 return this.each(function () {
5104 var data = $(this).data(DATA_KEY$5);
5106 var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
5109 data = new Modal(this, _config);
5110 $(this).data(DATA_KEY$5, data);
5113 if (typeof config === 'string') {
5114 if (typeof data[config] === 'undefined') {
5115 throw new TypeError("No method named \"" + config + "\"");
5118 data[config](relatedTarget);
5119 } else if (_config.show) {
5120 data.show(relatedTarget);
5125 _createClass(Modal, null, [{
5127 get: function get() {
5132 get: function get() {
5140 * ------------------------------------------------------------------------
5141 * Data Api implementation
5142 * ------------------------------------------------------------------------
5146 $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
5150 var selector = Util.getSelectorFromElement(this);
5153 target = document.querySelector(selector);
5156 var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
5158 if (this.tagName === 'A' || this.tagName === 'AREA') {
5159 event.preventDefault();
5162 var $target = $(target).one(Event$5.SHOW, function (showEvent) {
5163 if (showEvent.isDefaultPrevented()) {
5164 // Only register focus restorer if modal will actually get shown
5168 $target.one(Event$5.HIDDEN, function () {
5169 if ($(_this10).is(':visible')) {
5175 Modal._jQueryInterface.call($(target), config, this);
5178 * ------------------------------------------------------------------------
5180 * ------------------------------------------------------------------------
5183 $.fn[NAME$5] = Modal._jQueryInterface;
5184 $.fn[NAME$5].Constructor = Modal;
5186 $.fn[NAME$5].noConflict = function () {
5187 $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
5188 return Modal._jQueryInterface;
5192 * --------------------------------------------------------------------------
5193 * Bootstrap (v4.3.1): tools/sanitizer.js
5194 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5195 * --------------------------------------------------------------------------
5197 var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
5198 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
5199 var DefaultWhitelist = {
5200 // Global attributes allowed on any supplied element below.
5201 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
5202 a: ['target', 'href', 'title', 'rel'],
5218 img: ['src', 'alt', 'title', 'width', 'height'],
5232 * A pattern that recognizes a commonly useful subset of URLs that are safe.
5234 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
5238 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
5240 * A pattern that matches safe data URLs. Only matches image, video and audio types.
5242 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
5245 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
5247 function allowedAttribute(attr, allowedAttributeList) {
5248 var attrName = attr.nodeName.toLowerCase();
5250 if (allowedAttributeList.indexOf(attrName) !== -1) {
5251 if (uriAttrs.indexOf(attrName) !== -1) {
5252 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
5258 var regExp = allowedAttributeList.filter(function (attrRegex) {
5259 return attrRegex instanceof RegExp;
5260 }); // Check if a regular expression validates the attribute.
5262 for (var i = 0, l = regExp.length; i < l; i++) {
5263 if (attrName.match(regExp[i])) {
5271 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
5272 if (unsafeHtml.length === 0) {
5276 if (sanitizeFn && typeof sanitizeFn === 'function') {
5277 return sanitizeFn(unsafeHtml);
5280 var domParser = new window.DOMParser();
5281 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
5282 var whitelistKeys = Object.keys(whiteList);
5283 var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
5285 var _loop = function _loop(i, len) {
5286 var el = elements[i];
5287 var elName = el.nodeName.toLowerCase();
5289 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
5290 el.parentNode.removeChild(el);
5294 var attributeList = [].slice.call(el.attributes);
5295 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
5296 attributeList.forEach(function (attr) {
5297 if (!allowedAttribute(attr, whitelistedAttributes)) {
5298 el.removeAttribute(attr.nodeName);
5303 for (var i = 0, len = elements.length; i < len; i++) {
5304 var _ret = _loop(i, len);
5306 if (_ret === "continue") continue;
5309 return createdDocument.body.innerHTML;
5313 * ------------------------------------------------------------------------
5315 * ------------------------------------------------------------------------
5318 var NAME$6 = 'tooltip';
5319 var VERSION$6 = '4.3.1';
5320 var DATA_KEY$6 = 'bs.tooltip';
5321 var EVENT_KEY$6 = "." + DATA_KEY$6;
5322 var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
5323 var CLASS_PREFIX = 'bs-tooltip';
5324 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
5325 var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
5326 var DefaultType$4 = {
5327 animation: 'boolean',
5329 title: '(string|element|function)',
5331 delay: '(number|object)',
5333 selector: '(string|boolean)',
5334 placement: '(string|function)',
5335 offset: '(number|string|function)',
5336 container: '(string|element|boolean)',
5337 fallbackPlacement: '(string|array)',
5338 boundary: '(string|element)',
5339 sanitize: 'boolean',
5340 sanitizeFn: '(null|function)',
5343 var AttachmentMap$1 = {
5352 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
5353 trigger: 'hover focus',
5361 fallbackPlacement: 'flip',
5362 boundary: 'scrollParent',
5365 whiteList: DefaultWhitelist
5372 HIDE: "hide" + EVENT_KEY$6,
5373 HIDDEN: "hidden" + EVENT_KEY$6,
5374 SHOW: "show" + EVENT_KEY$6,
5375 SHOWN: "shown" + EVENT_KEY$6,
5376 INSERTED: "inserted" + EVENT_KEY$6,
5377 CLICK: "click" + EVENT_KEY$6,
5378 FOCUSIN: "focusin" + EVENT_KEY$6,
5379 FOCUSOUT: "focusout" + EVENT_KEY$6,
5380 MOUSEENTER: "mouseenter" + EVENT_KEY$6,
5381 MOUSELEAVE: "mouseleave" + EVENT_KEY$6
5388 TOOLTIP: '.tooltip',
5389 TOOLTIP_INNER: '.tooltip-inner',
5398 * ------------------------------------------------------------------------
5400 * ------------------------------------------------------------------------
5408 function Tooltip(element, config) {
5410 * Check for Popper dependency
5411 * Popper - https://popper.js.org
5413 if (typeof Popper === 'undefined') {
5414 throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
5418 this._isEnabled = true;
5420 this._hoverState = '';
5421 this._activeTrigger = {};
5422 this._popper = null; // Protected
5424 this.element = element;
5425 this.config = this._getConfig(config);
5428 this._setListeners();
5432 var _proto = Tooltip.prototype;
5435 _proto.enable = function enable() {
5436 this._isEnabled = true;
5439 _proto.disable = function disable() {
5440 this._isEnabled = false;
5443 _proto.toggleEnabled = function toggleEnabled() {
5444 this._isEnabled = !this._isEnabled;
5447 _proto.toggle = function toggle(event) {
5448 if (!this._isEnabled) {
5453 var dataKey = this.constructor.DATA_KEY;
5454 var context = $(event.currentTarget).data(dataKey);
5457 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5458 $(event.currentTarget).data(dataKey, context);
5461 context._activeTrigger.click = !context._activeTrigger.click;
5463 if (context._isWithActiveTrigger()) {
5464 context._enter(null, context);
5466 context._leave(null, context);
5469 if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {
5470 this._leave(null, this);
5475 this._enter(null, this);
5479 _proto.dispose = function dispose() {
5480 clearTimeout(this._timeout);
5481 $.removeData(this.element, this.constructor.DATA_KEY);
5482 $(this.element).off(this.constructor.EVENT_KEY);
5483 $(this.element).closest('.modal').off('hide.bs.modal');
5486 $(this.tip).remove();
5489 this._isEnabled = null;
5490 this._timeout = null;
5491 this._hoverState = null;
5492 this._activeTrigger = null;
5494 if (this._popper !== null) {
5495 this._popper.destroy();
5498 this._popper = null;
5499 this.element = null;
5504 _proto.show = function show() {
5507 if ($(this.element).css('display') === 'none') {
5508 throw new Error('Please use show on visible elements');
5511 var showEvent = $.Event(this.constructor.Event.SHOW);
5513 if (this.isWithContent() && this._isEnabled) {
5514 $(this.element).trigger(showEvent);
5515 var shadowRoot = Util.findShadowRoot(this.element);
5516 var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
5518 if (showEvent.isDefaultPrevented() || !isInTheDom) {
5522 var tip = this.getTipElement();
5523 var tipId = Util.getUID(this.constructor.NAME);
5524 tip.setAttribute('id', tipId);
5525 this.element.setAttribute('aria-describedby', tipId);
5528 if (this.config.animation) {
5529 $(tip).addClass(ClassName$6.FADE);
5532 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
5534 var attachment = this._getAttachment(placement);
5536 this.addAttachmentClass(attachment);
5538 var container = this._getContainer();
5540 $(tip).data(this.constructor.DATA_KEY, this);
5542 if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
5543 $(tip).appendTo(container);
5546 $(this.element).trigger(this.constructor.Event.INSERTED);
5547 this._popper = new Popper(this.element, tip, {
5548 placement: attachment,
5550 offset: this._getOffset(),
5552 behavior: this.config.fallbackPlacement
5555 element: Selector$6.ARROW
5558 boundariesElement: this.config.boundary
5561 onCreate: function onCreate(data) {
5562 if (data.originalPlacement !== data.placement) {
5563 _this._handlePopperPlacementChange(data);
5566 onUpdate: function onUpdate(data) {
5567 return _this._handlePopperPlacementChange(data);
5570 $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
5571 // empty mouseover listeners to the body's immediate children;
5572 // only needed because of broken event delegation on iOS
5573 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
5575 if ('ontouchstart' in document.documentElement) {
5576 $(document.body).children().on('mouseover', null, $.noop);
5579 var complete = function complete() {
5580 if (_this.config.animation) {
5581 _this._fixTransition();
5584 var prevHoverState = _this._hoverState;
5585 _this._hoverState = null;
5586 $(_this.element).trigger(_this.constructor.Event.SHOWN);
5588 if (prevHoverState === HoverState.OUT) {
5589 _this._leave(null, _this);
5593 if ($(this.tip).hasClass(ClassName$6.FADE)) {
5594 var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
5595 $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5602 _proto.hide = function hide(callback) {
5605 var tip = this.getTipElement();
5606 var hideEvent = $.Event(this.constructor.Event.HIDE);
5608 var complete = function complete() {
5609 if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
5610 tip.parentNode.removeChild(tip);
5613 _this2._cleanTipClass();
5615 _this2.element.removeAttribute('aria-describedby');
5617 $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
5619 if (_this2._popper !== null) {
5620 _this2._popper.destroy();
5628 $(this.element).trigger(hideEvent);
5630 if (hideEvent.isDefaultPrevented()) {
5634 $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
5635 // empty mouseover listeners we added for iOS support
5637 if ('ontouchstart' in document.documentElement) {
5638 $(document.body).children().off('mouseover', null, $.noop);
5641 this._activeTrigger[Trigger.CLICK] = false;
5642 this._activeTrigger[Trigger.FOCUS] = false;
5643 this._activeTrigger[Trigger.HOVER] = false;
5645 if ($(this.tip).hasClass(ClassName$6.FADE)) {
5646 var transitionDuration = Util.getTransitionDurationFromElement(tip);
5647 $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5652 this._hoverState = '';
5655 _proto.update = function update() {
5656 if (this._popper !== null) {
5657 this._popper.scheduleUpdate();
5662 _proto.isWithContent = function isWithContent() {
5663 return Boolean(this.getTitle());
5666 _proto.addAttachmentClass = function addAttachmentClass(attachment) {
5667 $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
5670 _proto.getTipElement = function getTipElement() {
5671 this.tip = this.tip || $(this.config.template)[0];
5675 _proto.setContent = function setContent() {
5676 var tip = this.getTipElement();
5677 this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
5678 $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
5681 _proto.setElementContent = function setElementContent($element, content) {
5682 if (typeof content === 'object' && (content.nodeType || content.jquery)) {
5683 // Content is a DOM node or a jQuery
5684 if (this.config.html) {
5685 if (!$(content).parent().is($element)) {
5686 $element.empty().append(content);
5689 $element.text($(content).text());
5695 if (this.config.html) {
5696 if (this.config.sanitize) {
5697 content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
5700 $element.html(content);
5702 $element.text(content);
5706 _proto.getTitle = function getTitle() {
5707 var title = this.element.getAttribute('data-original-title');
5710 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
5717 _proto._getOffset = function _getOffset() {
5722 if (typeof this.config.offset === 'function') {
5723 offset.fn = function (data) {
5724 data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
5728 offset.offset = this.config.offset;
5734 _proto._getContainer = function _getContainer() {
5735 if (this.config.container === false) {
5736 return document.body;
5739 if (Util.isElement(this.config.container)) {
5740 return $(this.config.container);
5743 return $(document).find(this.config.container);
5746 _proto._getAttachment = function _getAttachment(placement) {
5747 return AttachmentMap$1[placement.toUpperCase()];
5750 _proto._setListeners = function _setListeners() {
5753 var triggers = this.config.trigger.split(' ');
5754 triggers.forEach(function (trigger) {
5755 if (trigger === 'click') {
5756 $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
5757 return _this4.toggle(event);
5759 } else if (trigger !== Trigger.MANUAL) {
5760 var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
5761 var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
5762 $(_this4.element).on(eventIn, _this4.config.selector, function (event) {
5763 return _this4._enter(event);
5764 }).on(eventOut, _this4.config.selector, function (event) {
5765 return _this4._leave(event);
5769 $(this.element).closest('.modal').on('hide.bs.modal', function () {
5770 if (_this4.element) {
5775 if (this.config.selector) {
5776 this.config = _objectSpread({}, this.config, {
5785 _proto._fixTitle = function _fixTitle() {
5786 var titleType = typeof this.element.getAttribute('data-original-title');
5788 if (this.element.getAttribute('title') || titleType !== 'string') {
5789 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
5790 this.element.setAttribute('title', '');
5794 _proto._enter = function _enter(event, context) {
5795 var dataKey = this.constructor.DATA_KEY;
5796 context = context || $(event.currentTarget).data(dataKey);
5799 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5800 $(event.currentTarget).data(dataKey, context);
5804 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
5807 if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
5808 context._hoverState = HoverState.SHOW;
5812 clearTimeout(context._timeout);
5813 context._hoverState = HoverState.SHOW;
5815 if (!context.config.delay || !context.config.delay.show) {
5820 context._timeout = setTimeout(function () {
5821 if (context._hoverState === HoverState.SHOW) {
5824 }, context.config.delay.show);
5827 _proto._leave = function _leave(event, context) {
5828 var dataKey = this.constructor.DATA_KEY;
5829 context = context || $(event.currentTarget).data(dataKey);
5832 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5833 $(event.currentTarget).data(dataKey, context);
5837 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
5840 if (context._isWithActiveTrigger()) {
5844 clearTimeout(context._timeout);
5845 context._hoverState = HoverState.OUT;
5847 if (!context.config.delay || !context.config.delay.hide) {
5852 context._timeout = setTimeout(function () {
5853 if (context._hoverState === HoverState.OUT) {
5856 }, context.config.delay.hide);
5859 _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
5860 for (var trigger in this._activeTrigger) {
5861 if (this._activeTrigger[trigger]) {
5869 _proto._getConfig = function _getConfig(config) {
5870 var dataAttributes = $(this.element).data();
5871 Object.keys(dataAttributes).forEach(function (dataAttr) {
5872 if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
5873 delete dataAttributes[dataAttr];
5876 config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
5878 if (typeof config.delay === 'number') {
5885 if (typeof config.title === 'number') {
5886 config.title = config.title.toString();
5889 if (typeof config.content === 'number') {
5890 config.content = config.content.toString();
5893 Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
5895 if (config.sanitize) {
5896 config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
5902 _proto._getDelegateConfig = function _getDelegateConfig() {
5906 for (var key in this.config) {
5907 if (this.constructor.Default[key] !== this.config[key]) {
5908 config[key] = this.config[key];
5916 _proto._cleanTipClass = function _cleanTipClass() {
5917 var $tip = $(this.getTipElement());
5918 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
5920 if (tabClass !== null && tabClass.length) {
5921 $tip.removeClass(tabClass.join(''));
5925 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
5926 var popperInstance = popperData.instance;
5927 this.tip = popperInstance.popper;
5929 this._cleanTipClass();
5931 this.addAttachmentClass(this._getAttachment(popperData.placement));
5934 _proto._fixTransition = function _fixTransition() {
5935 var tip = this.getTipElement();
5936 var initConfigAnimation = this.config.animation;
5938 if (tip.getAttribute('x-placement') !== null) {
5942 $(tip).removeClass(ClassName$6.FADE);
5943 this.config.animation = false;
5946 this.config.animation = initConfigAnimation;
5950 Tooltip._jQueryInterface = function _jQueryInterface(config) {
5951 return this.each(function () {
5952 var data = $(this).data(DATA_KEY$6);
5954 var _config = typeof config === 'object' && config;
5956 if (!data && /dispose|hide/.test(config)) {
5961 data = new Tooltip(this, _config);
5962 $(this).data(DATA_KEY$6, data);
5965 if (typeof config === 'string') {
5966 if (typeof data[config] === 'undefined') {
5967 throw new TypeError("No method named \"" + config + "\"");
5975 _createClass(Tooltip, null, [{
5977 get: function get() {
5982 get: function get() {
5987 get: function get() {
5992 get: function get() {
5997 get: function get() {
6002 get: function get() {
6007 get: function get() {
6008 return DefaultType$4;
6015 * ------------------------------------------------------------------------
6017 * ------------------------------------------------------------------------
6021 $.fn[NAME$6] = Tooltip._jQueryInterface;
6022 $.fn[NAME$6].Constructor = Tooltip;
6024 $.fn[NAME$6].noConflict = function () {
6025 $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
6026 return Tooltip._jQueryInterface;
6030 * ------------------------------------------------------------------------
6032 * ------------------------------------------------------------------------
6035 var NAME$7 = 'popover';
6036 var VERSION$7 = '4.3.1';
6037 var DATA_KEY$7 = 'bs.popover';
6038 var EVENT_KEY$7 = "." + DATA_KEY$7;
6039 var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
6040 var CLASS_PREFIX$1 = 'bs-popover';
6041 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
6043 var Default$5 = _objectSpread({}, Tooltip.Default, {
6047 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
6050 var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
6051 content: '(string|element|function)'
6059 TITLE: '.popover-header',
6060 CONTENT: '.popover-body'
6063 HIDE: "hide" + EVENT_KEY$7,
6064 HIDDEN: "hidden" + EVENT_KEY$7,
6065 SHOW: "show" + EVENT_KEY$7,
6066 SHOWN: "shown" + EVENT_KEY$7,
6067 INSERTED: "inserted" + EVENT_KEY$7,
6068 CLICK: "click" + EVENT_KEY$7,
6069 FOCUSIN: "focusin" + EVENT_KEY$7,
6070 FOCUSOUT: "focusout" + EVENT_KEY$7,
6071 MOUSEENTER: "mouseenter" + EVENT_KEY$7,
6072 MOUSELEAVE: "mouseleave" + EVENT_KEY$7
6074 * ------------------------------------------------------------------------
6076 * ------------------------------------------------------------------------
6083 function (_Tooltip) {
6084 _inheritsLoose(Popover, _Tooltip);
6086 function Popover() {
6087 return _Tooltip.apply(this, arguments) || this;
6090 var _proto = Popover.prototype;
6093 _proto.isWithContent = function isWithContent() {
6094 return this.getTitle() || this._getContent();
6097 _proto.addAttachmentClass = function addAttachmentClass(attachment) {
6098 $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
6101 _proto.getTipElement = function getTipElement() {
6102 this.tip = this.tip || $(this.config.template)[0];
6106 _proto.setContent = function setContent() {
6107 var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
6109 this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle());
6111 var content = this._getContent();
6113 if (typeof content === 'function') {
6114 content = content.call(this.element);
6117 this.setElementContent($tip.find(Selector$7.CONTENT), content);
6118 $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW);
6122 _proto._getContent = function _getContent() {
6123 return this.element.getAttribute('data-content') || this.config.content;
6126 _proto._cleanTipClass = function _cleanTipClass() {
6127 var $tip = $(this.getTipElement());
6128 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
6130 if (tabClass !== null && tabClass.length > 0) {
6131 $tip.removeClass(tabClass.join(''));
6136 Popover._jQueryInterface = function _jQueryInterface(config) {
6137 return this.each(function () {
6138 var data = $(this).data(DATA_KEY$7);
6140 var _config = typeof config === 'object' ? config : null;
6142 if (!data && /dispose|hide/.test(config)) {
6147 data = new Popover(this, _config);
6148 $(this).data(DATA_KEY$7, data);
6151 if (typeof config === 'string') {
6152 if (typeof data[config] === 'undefined') {
6153 throw new TypeError("No method named \"" + config + "\"");
6161 _createClass(Popover, null, [{
6164 get: function get() {
6169 get: function get() {
6174 get: function get() {
6179 get: function get() {
6184 get: function get() {
6189 get: function get() {
6194 get: function get() {
6195 return DefaultType$5;
6202 * ------------------------------------------------------------------------
6204 * ------------------------------------------------------------------------
6208 $.fn[NAME$7] = Popover._jQueryInterface;
6209 $.fn[NAME$7].Constructor = Popover;
6211 $.fn[NAME$7].noConflict = function () {
6212 $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
6213 return Popover._jQueryInterface;
6217 * ------------------------------------------------------------------------
6219 * ------------------------------------------------------------------------
6222 var NAME$8 = 'scrollspy';
6223 var VERSION$8 = '4.3.1';
6224 var DATA_KEY$8 = 'bs.scrollspy';
6225 var EVENT_KEY$8 = "." + DATA_KEY$8;
6226 var DATA_API_KEY$6 = '.data-api';
6227 var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
6233 var DefaultType$6 = {
6236 target: '(string|element)'
6239 ACTIVATE: "activate" + EVENT_KEY$8,
6240 SCROLL: "scroll" + EVENT_KEY$8,
6241 LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6
6244 DROPDOWN_ITEM: 'dropdown-item',
6245 DROPDOWN_MENU: 'dropdown-menu',
6249 DATA_SPY: '[data-spy="scroll"]',
6251 NAV_LIST_GROUP: '.nav, .list-group',
6252 NAV_LINKS: '.nav-link',
6253 NAV_ITEMS: '.nav-item',
6254 LIST_ITEMS: '.list-group-item',
6255 DROPDOWN: '.dropdown',
6256 DROPDOWN_ITEMS: '.dropdown-item',
6257 DROPDOWN_TOGGLE: '.dropdown-toggle'
6259 var OffsetMethod = {
6261 POSITION: 'position'
6263 * ------------------------------------------------------------------------
6265 * ------------------------------------------------------------------------
6273 function ScrollSpy(element, config) {
6276 this._element = element;
6277 this._scrollElement = element.tagName === 'BODY' ? window : element;
6278 this._config = this._getConfig(config);
6279 this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS);
6282 this._activeTarget = null;
6283 this._scrollHeight = 0;
6284 $(this._scrollElement).on(Event$8.SCROLL, function (event) {
6285 return _this._process(event);
6293 var _proto = ScrollSpy.prototype;
6296 _proto.refresh = function refresh() {
6299 var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
6300 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
6301 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
6304 this._scrollHeight = this._getScrollHeight();
6305 var targets = [].slice.call(document.querySelectorAll(this._selector));
6306 targets.map(function (element) {
6308 var targetSelector = Util.getSelectorFromElement(element);
6310 if (targetSelector) {
6311 target = document.querySelector(targetSelector);
6315 var targetBCR = target.getBoundingClientRect();
6317 if (targetBCR.width || targetBCR.height) {
6318 // TODO (fat): remove sketch reliance on jQuery position/offset
6319 return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
6324 }).filter(function (item) {
6326 }).sort(function (a, b) {
6328 }).forEach(function (item) {
6329 _this2._offsets.push(item[0]);
6331 _this2._targets.push(item[1]);
6335 _proto.dispose = function dispose() {
6336 $.removeData(this._element, DATA_KEY$8);
6337 $(this._scrollElement).off(EVENT_KEY$8);
6338 this._element = null;
6339 this._scrollElement = null;
6340 this._config = null;
6341 this._selector = null;
6342 this._offsets = null;
6343 this._targets = null;
6344 this._activeTarget = null;
6345 this._scrollHeight = null;
6349 _proto._getConfig = function _getConfig(config) {
6350 config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
6352 if (typeof config.target !== 'string') {
6353 var id = $(config.target).attr('id');
6356 id = Util.getUID(NAME$8);
6357 $(config.target).attr('id', id);
6360 config.target = "#" + id;
6363 Util.typeCheckConfig(NAME$8, config, DefaultType$6);
6367 _proto._getScrollTop = function _getScrollTop() {
6368 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
6371 _proto._getScrollHeight = function _getScrollHeight() {
6372 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
6375 _proto._getOffsetHeight = function _getOffsetHeight() {
6376 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
6379 _proto._process = function _process() {
6380 var scrollTop = this._getScrollTop() + this._config.offset;
6382 var scrollHeight = this._getScrollHeight();
6384 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
6386 if (this._scrollHeight !== scrollHeight) {
6390 if (scrollTop >= maxScroll) {
6391 var target = this._targets[this._targets.length - 1];
6393 if (this._activeTarget !== target) {
6394 this._activate(target);
6400 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
6401 this._activeTarget = null;
6408 var offsetLength = this._offsets.length;
6410 for (var i = offsetLength; i--;) {
6411 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
6413 if (isActiveTarget) {
6414 this._activate(this._targets[i]);
6419 _proto._activate = function _activate(target) {
6420 this._activeTarget = target;
6424 var queries = this._selector.split(',').map(function (selector) {
6425 return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
6428 var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
6430 if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {
6431 $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE);
6432 $link.addClass(ClassName$8.ACTIVE);
6434 // Set triggered link as active
6435 $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active
6436 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
6438 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item
6440 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE);
6443 $(this._scrollElement).trigger(Event$8.ACTIVATE, {
6444 relatedTarget: target
6448 _proto._clear = function _clear() {
6449 [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
6450 return node.classList.contains(ClassName$8.ACTIVE);
6451 }).forEach(function (node) {
6452 return node.classList.remove(ClassName$8.ACTIVE);
6457 ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
6458 return this.each(function () {
6459 var data = $(this).data(DATA_KEY$8);
6461 var _config = typeof config === 'object' && config;
6464 data = new ScrollSpy(this, _config);
6465 $(this).data(DATA_KEY$8, data);
6468 if (typeof config === 'string') {
6469 if (typeof data[config] === 'undefined') {
6470 throw new TypeError("No method named \"" + config + "\"");
6478 _createClass(ScrollSpy, null, [{
6480 get: function get() {
6485 get: function get() {
6493 * ------------------------------------------------------------------------
6494 * Data Api implementation
6495 * ------------------------------------------------------------------------
6499 $(window).on(Event$8.LOAD_DATA_API, function () {
6500 var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY));
6501 var scrollSpysLength = scrollSpys.length;
6503 for (var i = scrollSpysLength; i--;) {
6504 var $spy = $(scrollSpys[i]);
6506 ScrollSpy._jQueryInterface.call($spy, $spy.data());
6510 * ------------------------------------------------------------------------
6512 * ------------------------------------------------------------------------
6515 $.fn[NAME$8] = ScrollSpy._jQueryInterface;
6516 $.fn[NAME$8].Constructor = ScrollSpy;
6518 $.fn[NAME$8].noConflict = function () {
6519 $.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
6520 return ScrollSpy._jQueryInterface;
6524 * ------------------------------------------------------------------------
6526 * ------------------------------------------------------------------------
6530 var VERSION$9 = '4.3.1';
6531 var DATA_KEY$9 = 'bs.tab';
6532 var EVENT_KEY$9 = "." + DATA_KEY$9;
6533 var DATA_API_KEY$7 = '.data-api';
6534 var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
6536 HIDE: "hide" + EVENT_KEY$9,
6537 HIDDEN: "hidden" + EVENT_KEY$9,
6538 SHOW: "show" + EVENT_KEY$9,
6539 SHOWN: "shown" + EVENT_KEY$9,
6540 CLICK_DATA_API: "click" + EVENT_KEY$9 + DATA_API_KEY$7
6543 DROPDOWN_MENU: 'dropdown-menu',
6545 DISABLED: 'disabled',
6550 DROPDOWN: '.dropdown',
6551 NAV_LIST_GROUP: '.nav, .list-group',
6553 ACTIVE_UL: '> li > .active',
6554 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
6555 DROPDOWN_TOGGLE: '.dropdown-toggle',
6556 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
6558 * ------------------------------------------------------------------------
6560 * ------------------------------------------------------------------------
6568 function Tab(element) {
6569 this._element = element;
6573 var _proto = Tab.prototype;
6576 _proto.show = function show() {
6579 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {
6585 var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0];
6586 var selector = Util.getSelectorFromElement(this._element);
6589 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
6590 previous = $.makeArray($(listElement).find(itemSelector));
6591 previous = previous[previous.length - 1];
6594 var hideEvent = $.Event(Event$9.HIDE, {
6595 relatedTarget: this._element
6597 var showEvent = $.Event(Event$9.SHOW, {
6598 relatedTarget: previous
6602 $(previous).trigger(hideEvent);
6605 $(this._element).trigger(showEvent);
6607 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
6612 target = document.querySelector(selector);
6615 this._activate(this._element, listElement);
6617 var complete = function complete() {
6618 var hiddenEvent = $.Event(Event$9.HIDDEN, {
6619 relatedTarget: _this._element
6621 var shownEvent = $.Event(Event$9.SHOWN, {
6622 relatedTarget: previous
6624 $(previous).trigger(hiddenEvent);
6625 $(_this._element).trigger(shownEvent);
6629 this._activate(target, target.parentNode, complete);
6635 _proto.dispose = function dispose() {
6636 $.removeData(this._element, DATA_KEY$9);
6637 this._element = null;
6641 _proto._activate = function _activate(element, container, callback) {
6644 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
6645 var active = activeElements[0];
6646 var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);
6648 var complete = function complete() {
6649 return _this2._transitionComplete(element, active, callback);
6652 if (active && isTransitioning) {
6653 var transitionDuration = Util.getTransitionDurationFromElement(active);
6654 $(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6660 _proto._transitionComplete = function _transitionComplete(element, active, callback) {
6662 $(active).removeClass(ClassName$9.ACTIVE);
6663 var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];
6665 if (dropdownChild) {
6666 $(dropdownChild).removeClass(ClassName$9.ACTIVE);
6669 if (active.getAttribute('role') === 'tab') {
6670 active.setAttribute('aria-selected', false);
6674 $(element).addClass(ClassName$9.ACTIVE);
6676 if (element.getAttribute('role') === 'tab') {
6677 element.setAttribute('aria-selected', true);
6680 Util.reflow(element);
6682 if (element.classList.contains(ClassName$9.FADE)) {
6683 element.classList.add(ClassName$9.SHOW);
6686 if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {
6687 var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];
6689 if (dropdownElement) {
6690 var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));
6691 $(dropdownToggleList).addClass(ClassName$9.ACTIVE);
6694 element.setAttribute('aria-expanded', true);
6703 Tab._jQueryInterface = function _jQueryInterface(config) {
6704 return this.each(function () {
6705 var $this = $(this);
6706 var data = $this.data(DATA_KEY$9);
6709 data = new Tab(this);
6710 $this.data(DATA_KEY$9, data);
6713 if (typeof config === 'string') {
6714 if (typeof data[config] === 'undefined') {
6715 throw new TypeError("No method named \"" + config + "\"");
6723 _createClass(Tab, null, [{
6725 get: function get() {
6733 * ------------------------------------------------------------------------
6734 * Data Api implementation
6735 * ------------------------------------------------------------------------
6739 $(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
6740 event.preventDefault();
6742 Tab._jQueryInterface.call($(this), 'show');
6745 * ------------------------------------------------------------------------
6747 * ------------------------------------------------------------------------
6750 $.fn[NAME$9] = Tab._jQueryInterface;
6751 $.fn[NAME$9].Constructor = Tab;
6753 $.fn[NAME$9].noConflict = function () {
6754 $.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
6755 return Tab._jQueryInterface;
6759 * ------------------------------------------------------------------------
6761 * ------------------------------------------------------------------------
6764 var NAME$a = 'toast';
6765 var VERSION$a = '4.3.1';
6766 var DATA_KEY$a = 'bs.toast';
6767 var EVENT_KEY$a = "." + DATA_KEY$a;
6768 var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
6770 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
6771 HIDE: "hide" + EVENT_KEY$a,
6772 HIDDEN: "hidden" + EVENT_KEY$a,
6773 SHOW: "show" + EVENT_KEY$a,
6774 SHOWN: "shown" + EVENT_KEY$a
6782 var DefaultType$7 = {
6783 animation: 'boolean',
6784 autohide: 'boolean',
6793 DATA_DISMISS: '[data-dismiss="toast"]'
6795 * ------------------------------------------------------------------------
6797 * ------------------------------------------------------------------------
6805 function Toast(element, config) {
6806 this._element = element;
6807 this._config = this._getConfig(config);
6808 this._timeout = null;
6810 this._setListeners();
6814 var _proto = Toast.prototype;
6817 _proto.show = function show() {
6820 $(this._element).trigger(Event$a.SHOW);
6822 if (this._config.animation) {
6823 this._element.classList.add(ClassName$a.FADE);
6826 var complete = function complete() {
6827 _this._element.classList.remove(ClassName$a.SHOWING);
6829 _this._element.classList.add(ClassName$a.SHOW);
6831 $(_this._element).trigger(Event$a.SHOWN);
6833 if (_this._config.autohide) {
6838 this._element.classList.remove(ClassName$a.HIDE);
6840 this._element.classList.add(ClassName$a.SHOWING);
6842 if (this._config.animation) {
6843 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
6844 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6850 _proto.hide = function hide(withoutTimeout) {
6853 if (!this._element.classList.contains(ClassName$a.SHOW)) {
6857 $(this._element).trigger(Event$a.HIDE);
6859 if (withoutTimeout) {
6862 this._timeout = setTimeout(function () {
6864 }, this._config.delay);
6868 _proto.dispose = function dispose() {
6869 clearTimeout(this._timeout);
6870 this._timeout = null;
6872 if (this._element.classList.contains(ClassName$a.SHOW)) {
6873 this._element.classList.remove(ClassName$a.SHOW);
6876 $(this._element).off(Event$a.CLICK_DISMISS);
6877 $.removeData(this._element, DATA_KEY$a);
6878 this._element = null;
6879 this._config = null;
6883 _proto._getConfig = function _getConfig(config) {
6884 config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
6885 Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
6889 _proto._setListeners = function _setListeners() {
6892 $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
6893 return _this3.hide(true);
6897 _proto._close = function _close() {
6900 var complete = function complete() {
6901 _this4._element.classList.add(ClassName$a.HIDE);
6903 $(_this4._element).trigger(Event$a.HIDDEN);
6906 this._element.classList.remove(ClassName$a.SHOW);
6908 if (this._config.animation) {
6909 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
6910 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6917 Toast._jQueryInterface = function _jQueryInterface(config) {
6918 return this.each(function () {
6919 var $element = $(this);
6920 var data = $element.data(DATA_KEY$a);
6922 var _config = typeof config === 'object' && config;
6925 data = new Toast(this, _config);
6926 $element.data(DATA_KEY$a, data);
6929 if (typeof config === 'string') {
6930 if (typeof data[config] === 'undefined') {
6931 throw new TypeError("No method named \"" + config + "\"");
6939 _createClass(Toast, null, [{
6941 get: function get() {
6946 get: function get() {
6947 return DefaultType$7;
6951 get: function get() {
6959 * ------------------------------------------------------------------------
6961 * ------------------------------------------------------------------------
6965 $.fn[NAME$a] = Toast._jQueryInterface;
6966 $.fn[NAME$a].Constructor = Toast;
6968 $.fn[NAME$a].noConflict = function () {
6969 $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
6970 return Toast._jQueryInterface;
6974 * --------------------------------------------------------------------------
6975 * Bootstrap (v4.3.1): index.js
6976 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6977 * --------------------------------------------------------------------------
6981 if (typeof $ === 'undefined') {
6982 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
6985 var version = $.fn.jquery.split(' ')[0].split('.');
6992 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
6993 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
6997 exports.Util = Util;
6998 exports.Alert = Alert;
6999 exports.Button = Button;
7000 exports.Carousel = Carousel;
7001 exports.Collapse = Collapse;
7002 exports.Dropdown = Dropdown;
7003 exports.Modal = Modal;
7004 exports.Popover = Popover;
7005 exports.Scrollspy = ScrollSpy;
7007 exports.Toast = Toast;
7008 exports.Tooltip = Tooltip;
7010 Object.defineProperty(exports, '__esModule', { value: true });
7013 //# sourceMappingURL=bootstrap.bundle.js.map