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 = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery));
10
})(this, (function (exports, $) { 'use strict';
12
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
var $__default = _interopDefaultLegacy($);
16
function _defineProperties(target, props) {
17
for (var i = 0; i < props.length; i++) {
18
var descriptor = props[i];
19
descriptor.enumerable = descriptor.enumerable || false;
20
descriptor.configurable = true;
21
if ("value" in descriptor) descriptor.writable = true;
22
Object.defineProperty(target, descriptor.key, descriptor);
26
function _createClass(Constructor, protoProps, staticProps) {
27
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28
if (staticProps) _defineProperties(Constructor, staticProps);
32
function _extends$1() {
33
_extends$1 = Object.assign || function (target) {
34
for (var i = 1; i < arguments.length; i++) {
35
var source = arguments[i];
37
for (var key in source) {
38
if (Object.prototype.hasOwnProperty.call(source, key)) {
39
target[key] = source[key];
47
return _extends$1.apply(this, arguments);
50
function _inheritsLoose(subClass, superClass) {
51
subClass.prototype = Object.create(superClass.prototype);
52
subClass.prototype.constructor = subClass;
54
_setPrototypeOf(subClass, superClass);
57
function _setPrototypeOf(o, p) {
58
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
63
return _setPrototypeOf(o, p);
76
var TRANSITION_END = 'transitionend';
77
var MAX_UID = 1000000;
78
var MILLISECONDS_MULTIPLIER = 1000;
80
function toType(obj) {
81
if (obj === null || typeof obj === 'undefined') {
85
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
88
function getSpecialTransitionEndEvent() {
90
bindType: TRANSITION_END,
91
delegateType: TRANSITION_END,
92
handle: function handle(event) {
93
if ($__default["default"](event.target).is(this)) {
94
return event.handleObj.handler.apply(this, arguments);
102
function transitionEndEmulator(duration) {
106
$__default["default"](this).one(Util.TRANSITION_END, function () {
109
setTimeout(function () {
111
Util.triggerTransitionEnd(_this);
117
function setTransitionEndSupport() {
118
$__default["default"].fn.emulateTransitionEnd = transitionEndEmulator;
119
$__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
127
TRANSITION_END: 'bsTransitionEnd',
128
getUID: function getUID(prefix) {
131
prefix += ~~(Math.random() * MAX_UID);
132
} while (document.getElementById(prefix));
136
getSelectorFromElement: function getSelectorFromElement(element) {
137
var selector = element.getAttribute('data-target');
139
if (!selector || selector === '#') {
140
var hrefAttr = element.getAttribute('href');
141
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
145
return document.querySelector(selector) ? selector : null;
150
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
156
var transitionDuration = $__default["default"](element).css('transition-duration');
157
var transitionDelay = $__default["default"](element).css('transition-delay');
158
var floatTransitionDuration = parseFloat(transitionDuration);
159
var floatTransitionDelay = parseFloat(transitionDelay);
161
if (!floatTransitionDuration && !floatTransitionDelay) {
166
transitionDuration = transitionDuration.split(',')[0];
167
transitionDelay = transitionDelay.split(',')[0];
168
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
170
reflow: function reflow(element) {
171
return element.offsetHeight;
173
triggerTransitionEnd: function triggerTransitionEnd(element) {
174
$__default["default"](element).trigger(TRANSITION_END);
176
supportsTransitionEnd: function supportsTransitionEnd() {
177
return Boolean(TRANSITION_END);
179
isElement: function isElement(obj) {
180
return (obj[0] || obj).nodeType;
182
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
183
for (var property in configTypes) {
184
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
185
var expectedTypes = configTypes[property];
186
var value = config[property];
187
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
189
if (!new RegExp(expectedTypes).test(valueType)) {
190
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
195
findShadowRoot: function findShadowRoot(element) {
196
if (!document.documentElement.attachShadow) {
201
if (typeof element.getRootNode === 'function') {
202
var root = element.getRootNode();
203
return root instanceof ShadowRoot ? root : null;
206
if (element instanceof ShadowRoot) {
211
if (!element.parentNode) {
215
return Util.findShadowRoot(element.parentNode);
217
jQueryDetection: function jQueryDetection() {
218
if (typeof $__default["default"] === 'undefined') {
219
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
222
var version = $__default["default"].fn.jquery.split(' ')[0].split('.');
229
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
230
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
234
Util.jQueryDetection();
235
setTransitionEndSupport();
241
var NAME$a = 'alert';
242
var VERSION$a = '4.6.1';
243
var DATA_KEY$a = 'bs.alert';
244
var EVENT_KEY$a = "." + DATA_KEY$a;
245
var DATA_API_KEY$7 = '.data-api';
246
var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a];
247
var CLASS_NAME_ALERT = 'alert';
248
var CLASS_NAME_FADE$5 = 'fade';
249
var CLASS_NAME_SHOW$7 = 'show';
250
var EVENT_CLOSE = "close" + EVENT_KEY$a;
251
var EVENT_CLOSED = "closed" + EVENT_KEY$a;
252
var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$7;
253
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
258
var Alert = function () {
259
function Alert(element) {
260
this._element = element;
264
var _proto = Alert.prototype;
267
_proto.close = function close(element) {
268
var rootElement = this._element;
271
rootElement = this._getRootElement(element);
274
var customEvent = this._triggerCloseEvent(rootElement);
276
if (customEvent.isDefaultPrevented()) {
280
this._removeElement(rootElement);
283
_proto.dispose = function dispose() {
284
$__default["default"].removeData(this._element, DATA_KEY$a);
285
this._element = null;
289
_proto._getRootElement = function _getRootElement(element) {
290
var selector = Util.getSelectorFromElement(element);
294
parent = document.querySelector(selector);
298
parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
304
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
305
var closeEvent = $__default["default"].Event(EVENT_CLOSE);
306
$__default["default"](element).trigger(closeEvent);
310
_proto._removeElement = function _removeElement(element) {
313
$__default["default"](element).removeClass(CLASS_NAME_SHOW$7);
315
if (!$__default["default"](element).hasClass(CLASS_NAME_FADE$5)) {
316
this._destroyElement(element);
321
var transitionDuration = Util.getTransitionDurationFromElement(element);
322
$__default["default"](element).one(Util.TRANSITION_END, function (event) {
323
return _this._destroyElement(element, event);
324
}).emulateTransitionEnd(transitionDuration);
327
_proto._destroyElement = function _destroyElement(element) {
328
$__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
332
Alert._jQueryInterface = function _jQueryInterface(config) {
333
return this.each(function () {
334
var $element = $__default["default"](this);
335
var data = $element.data(DATA_KEY$a);
338
data = new Alert(this);
339
$element.data(DATA_KEY$a, data);
342
if (config === 'close') {
348
Alert._handleDismiss = function _handleDismiss(alertInstance) {
349
return function (event) {
351
event.preventDefault();
354
alertInstance.close(this);
358
_createClass(Alert, null, [{
360
get: function get() {
372
$__default["default"](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
377
$__default["default"].fn[NAME$a] = Alert._jQueryInterface;
378
$__default["default"].fn[NAME$a].Constructor = Alert;
380
$__default["default"].fn[NAME$a].noConflict = function () {
381
$__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
382
return Alert._jQueryInterface;
389
var NAME$9 = 'button';
390
var VERSION$9 = '4.6.1';
391
var DATA_KEY$9 = 'bs.button';
392
var EVENT_KEY$9 = "." + DATA_KEY$9;
393
var DATA_API_KEY$6 = '.data-api';
394
var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9];
395
var CLASS_NAME_ACTIVE$3 = 'active';
396
var CLASS_NAME_BUTTON = 'btn';
397
var CLASS_NAME_FOCUS = 'focus';
398
var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$9 + DATA_API_KEY$6;
399
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$9 + DATA_API_KEY$6 + " " + ("blur" + EVENT_KEY$9 + DATA_API_KEY$6);
400
var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$6;
401
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
402
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
403
var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="button"]';
404
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
405
var SELECTOR_INPUT = 'input:not([type="hidden"])';
406
var SELECTOR_ACTIVE$2 = '.active';
407
var SELECTOR_BUTTON = '.btn';
412
var Button = function () {
413
function Button(element) {
414
this._element = element;
415
this.shouldAvoidTriggerChange = false;
419
var _proto = Button.prototype;
422
_proto.toggle = function toggle() {
423
var triggerChangeEvent = true;
424
var addAriaPressed = true;
425
var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
428
var input = this._element.querySelector(SELECTOR_INPUT);
431
if (input.type === 'radio') {
432
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE$3)) {
433
triggerChangeEvent = false;
435
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE$2);
438
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$3);
443
if (triggerChangeEvent) {
445
if (input.type === 'checkbox' || input.type === 'radio') {
446
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE$3);
449
if (!this.shouldAvoidTriggerChange) {
450
$__default["default"](input).trigger('change');
455
addAriaPressed = false;
459
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
460
if (addAriaPressed) {
461
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE$3));
464
if (triggerChangeEvent) {
465
$__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE$3);
470
_proto.dispose = function dispose() {
471
$__default["default"].removeData(this._element, DATA_KEY$9);
472
this._element = null;
476
Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
477
return this.each(function () {
478
var $element = $__default["default"](this);
479
var data = $element.data(DATA_KEY$9);
482
data = new Button(this);
483
$element.data(DATA_KEY$9, data);
486
data.shouldAvoidTriggerChange = avoidTriggerChange;
488
if (config === 'toggle') {
494
_createClass(Button, null, [{
496
get: function get() {
508
$__default["default"](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
509
var button = event.target;
510
var initialButton = button;
512
if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) {
513
button = $__default["default"](button).closest(SELECTOR_BUTTON)[0];
516
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
517
event.preventDefault();
519
var inputBtn = button.querySelector(SELECTOR_INPUT);
521
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
522
event.preventDefault();
527
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
528
Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT');
531
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
532
var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0];
533
$__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
535
$__default["default"](window).on(EVENT_LOAD_DATA_API$2, function () {
538
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
540
for (var i = 0, len = buttons.length; i < len; i++) {
541
var button = buttons[i];
542
var input = button.querySelector(SELECTOR_INPUT);
544
if (input.checked || input.hasAttribute('checked')) {
545
button.classList.add(CLASS_NAME_ACTIVE$3);
547
button.classList.remove(CLASS_NAME_ACTIVE$3);
552
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$4));
554
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
555
var _button = buttons[_i];
557
if (_button.getAttribute('aria-pressed') === 'true') {
558
_button.classList.add(CLASS_NAME_ACTIVE$3);
560
_button.classList.remove(CLASS_NAME_ACTIVE$3);
568
$__default["default"].fn[NAME$9] = Button._jQueryInterface;
569
$__default["default"].fn[NAME$9].Constructor = Button;
571
$__default["default"].fn[NAME$9].noConflict = function () {
572
$__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
573
return Button._jQueryInterface;
580
var NAME$8 = 'carousel';
581
var VERSION$8 = '4.6.1';
582
var DATA_KEY$8 = 'bs.carousel';
583
var EVENT_KEY$8 = "." + DATA_KEY$8;
584
var DATA_API_KEY$5 = '.data-api';
585
var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8];
586
var ARROW_LEFT_KEYCODE = 37;
588
var ARROW_RIGHT_KEYCODE = 39;
590
var TOUCHEVENT_COMPAT_WAIT = 500;
592
var SWIPE_THRESHOLD = 40;
593
var CLASS_NAME_CAROUSEL = 'carousel';
594
var CLASS_NAME_ACTIVE$2 = 'active';
595
var CLASS_NAME_SLIDE = 'slide';
596
var CLASS_NAME_RIGHT = 'carousel-item-right';
597
var CLASS_NAME_LEFT = 'carousel-item-left';
598
var CLASS_NAME_NEXT = 'carousel-item-next';
599
var CLASS_NAME_PREV = 'carousel-item-prev';
600
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
601
var DIRECTION_NEXT = 'next';
602
var DIRECTION_PREV = 'prev';
603
var DIRECTION_LEFT = 'left';
604
var DIRECTION_RIGHT = 'right';
605
var EVENT_SLIDE = "slide" + EVENT_KEY$8;
606
var EVENT_SLID = "slid" + EVENT_KEY$8;
607
var EVENT_KEYDOWN = "keydown" + EVENT_KEY$8;
608
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$8;
609
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$8;
610
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$8;
611
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$8;
612
var EVENT_TOUCHEND = "touchend" + EVENT_KEY$8;
613
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$8;
614
var EVENT_POINTERUP = "pointerup" + EVENT_KEY$8;
615
var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8;
616
var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$5;
617
var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$8 + DATA_API_KEY$5;
618
var SELECTOR_ACTIVE$1 = '.active';
619
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
620
var SELECTOR_ITEM = '.carousel-item';
621
var SELECTOR_ITEM_IMG = '.carousel-item img';
622
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
623
var SELECTOR_INDICATORS = '.carousel-indicators';
624
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
625
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
634
var DefaultType$7 = {
635
interval: '(number|boolean)',
637
slide: '(boolean|string)',
638
pause: '(string|boolean)',
650
var Carousel = function () {
651
function Carousel(element, config) {
653
this._interval = null;
654
this._activeElement = null;
655
this._isPaused = false;
656
this._isSliding = false;
657
this.touchTimeout = null;
658
this.touchStartX = 0;
659
this.touchDeltaX = 0;
660
this._config = this._getConfig(config);
661
this._element = element;
662
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
663
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
664
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
666
this._addEventListeners();
670
var _proto = Carousel.prototype;
673
_proto.next = function next() {
674
if (!this._isSliding) {
675
this._slide(DIRECTION_NEXT);
679
_proto.nextWhenVisible = function nextWhenVisible() {
680
var $element = $__default["default"](this._element);
683
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
688
_proto.prev = function prev() {
689
if (!this._isSliding) {
690
this._slide(DIRECTION_PREV);
694
_proto.pause = function pause(event) {
696
this._isPaused = true;
699
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
700
Util.triggerTransitionEnd(this._element);
704
clearInterval(this._interval);
705
this._interval = null;
708
_proto.cycle = function cycle(event) {
710
this._isPaused = false;
713
if (this._interval) {
714
clearInterval(this._interval);
715
this._interval = null;
718
if (this._config.interval && !this._isPaused) {
719
this._updateInterval();
721
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
725
_proto.to = function to(index) {
728
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
730
var activeIndex = this._getItemIndex(this._activeElement);
732
if (index > this._items.length - 1 || index < 0) {
736
if (this._isSliding) {
737
$__default["default"](this._element).one(EVENT_SLID, function () {
738
return _this.to(index);
743
if (activeIndex === index) {
749
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
751
this._slide(direction, this._items[index]);
754
_proto.dispose = function dispose() {
755
$__default["default"](this._element).off(EVENT_KEY$8);
756
$__default["default"].removeData(this._element, DATA_KEY$8);
759
this._element = null;
760
this._interval = null;
761
this._isPaused = null;
762
this._isSliding = null;
763
this._activeElement = null;
764
this._indicatorsElement = null;
768
_proto._getConfig = function _getConfig(config) {
769
config = _extends$1({}, Default$7, config);
770
Util.typeCheckConfig(NAME$8, config, DefaultType$7);
774
_proto._handleSwipe = function _handleSwipe() {
775
var absDeltax = Math.abs(this.touchDeltaX);
777
if (absDeltax <= SWIPE_THRESHOLD) {
781
var direction = absDeltax / this.touchDeltaX;
782
this.touchDeltaX = 0;
794
_proto._addEventListeners = function _addEventListeners() {
797
if (this._config.keyboard) {
798
$__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
799
return _this2._keydown(event);
803
if (this._config.pause === 'hover') {
804
$__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
805
return _this2.pause(event);
806
}).on(EVENT_MOUSELEAVE, function (event) {
807
return _this2.cycle(event);
811
if (this._config.touch) {
812
this._addTouchEventListeners();
816
_proto._addTouchEventListeners = function _addTouchEventListeners() {
819
if (!this._touchSupported) {
823
var start = function start(event) {
824
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
825
_this3.touchStartX = event.originalEvent.clientX;
826
} else if (!_this3._pointerEvent) {
827
_this3.touchStartX = event.originalEvent.touches[0].clientX;
831
var move = function move(event) {
833
_this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
836
var end = function end(event) {
837
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
838
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
841
_this3._handleSwipe();
843
if (_this3._config.pause === 'hover') {
853
if (_this3.touchTimeout) {
854
clearTimeout(_this3.touchTimeout);
857
_this3.touchTimeout = setTimeout(function (event) {
858
return _this3.cycle(event);
859
}, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
863
$__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
864
return e.preventDefault();
867
if (this._pointerEvent) {
868
$__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
871
$__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
875
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
877
$__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
880
$__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
883
$__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
889
_proto._keydown = function _keydown(event) {
890
if (/input|textarea/i.test(event.target.tagName)) {
894
switch (event.which) {
895
case ARROW_LEFT_KEYCODE:
896
event.preventDefault();
900
case ARROW_RIGHT_KEYCODE:
901
event.preventDefault();
907
_proto._getItemIndex = function _getItemIndex(element) {
908
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
909
return this._items.indexOf(element);
912
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
913
var isNextDirection = direction === DIRECTION_NEXT;
914
var isPrevDirection = direction === DIRECTION_PREV;
916
var activeIndex = this._getItemIndex(activeElement);
918
var lastItemIndex = this._items.length - 1;
919
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
921
if (isGoingToWrap && !this._config.wrap) {
922
return activeElement;
925
var delta = direction === DIRECTION_PREV ? -1 : 1;
926
var itemIndex = (activeIndex + delta) % this._items.length;
927
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
930
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
931
var targetIndex = this._getItemIndex(relatedTarget);
933
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
935
var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
936
relatedTarget: relatedTarget,
937
direction: eventDirectionName,
941
$__default["default"](this._element).trigger(slideEvent);
945
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
946
if (this._indicatorsElement) {
947
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
948
$__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE$2);
950
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
953
$__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE$2);
958
_proto._updateInterval = function _updateInterval() {
959
var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
965
var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
967
if (elementInterval) {
968
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
969
this._config.interval = elementInterval;
971
this._config.interval = this._config.defaultInterval || this._config.interval;
975
_proto._slide = function _slide(direction, element) {
978
var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
980
var activeElementIndex = this._getItemIndex(activeElement);
982
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
984
var nextElementIndex = this._getItemIndex(nextElement);
986
var isCycling = Boolean(this._interval);
987
var directionalClassName;
989
var eventDirectionName;
991
if (direction === DIRECTION_NEXT) {
992
directionalClassName = CLASS_NAME_LEFT;
993
orderClassName = CLASS_NAME_NEXT;
994
eventDirectionName = DIRECTION_LEFT;
996
directionalClassName = CLASS_NAME_RIGHT;
997
orderClassName = CLASS_NAME_PREV;
998
eventDirectionName = DIRECTION_RIGHT;
1001
if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE$2)) {
1002
this._isSliding = false;
1006
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1008
if (slideEvent.isDefaultPrevented()) {
1012
if (!activeElement || !nextElement) {
1017
this._isSliding = true;
1023
this._setActiveIndicatorElement(nextElement);
1025
this._activeElement = nextElement;
1026
var slidEvent = $__default["default"].Event(EVENT_SLID, {
1027
relatedTarget: nextElement,
1028
direction: eventDirectionName,
1029
from: activeElementIndex,
1030
to: nextElementIndex
1033
if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
1034
$__default["default"](nextElement).addClass(orderClassName);
1035
Util.reflow(nextElement);
1036
$__default["default"](activeElement).addClass(directionalClassName);
1037
$__default["default"](nextElement).addClass(directionalClassName);
1038
var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
1039
$__default["default"](activeElement).one(Util.TRANSITION_END, function () {
1040
$__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$2);
1041
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2 + " " + orderClassName + " " + directionalClassName);
1042
_this4._isSliding = false;
1043
setTimeout(function () {
1044
return $__default["default"](_this4._element).trigger(slidEvent);
1046
}).emulateTransitionEnd(transitionDuration);
1048
$__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2);
1049
$__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE$2);
1050
this._isSliding = false;
1051
$__default["default"](this._element).trigger(slidEvent);
1060
Carousel._jQueryInterface = function _jQueryInterface(config) {
1061
return this.each(function () {
1062
var data = $__default["default"](this).data(DATA_KEY$8);
1064
var _config = _extends$1({}, Default$7, $__default["default"](this).data());
1066
if (typeof config === 'object') {
1067
_config = _extends$1({}, _config, config);
1070
var action = typeof config === 'string' ? config : _config.slide;
1073
data = new Carousel(this, _config);
1074
$__default["default"](this).data(DATA_KEY$8, data);
1077
if (typeof config === 'number') {
1079
} else if (typeof action === 'string') {
1080
if (typeof data[action] === 'undefined') {
1081
throw new TypeError("No method named \"" + action + "\"");
1085
} else if (_config.interval && _config.ride) {
1092
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
1093
var selector = Util.getSelectorFromElement(this);
1099
var target = $__default["default"](selector)[0];
1101
if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
1105
var config = _extends$1({}, $__default["default"](target).data(), $__default["default"](this).data());
1107
var slideIndex = this.getAttribute('data-slide-to');
1110
config.interval = false;
1113
Carousel._jQueryInterface.call($__default["default"](target), config);
1116
$__default["default"](target).data(DATA_KEY$8).to(slideIndex);
1119
event.preventDefault();
1122
_createClass(Carousel, null, [{
1124
get: function get() {
1129
get: function get() {
1141
$__default["default"](document).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
1142
$__default["default"](window).on(EVENT_LOAD_DATA_API$1, function () {
1143
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
1145
for (var i = 0, len = carousels.length; i < len; i++) {
1146
var $carousel = $__default["default"](carousels[i]);
1148
Carousel._jQueryInterface.call($carousel, $carousel.data());
1155
$__default["default"].fn[NAME$8] = Carousel._jQueryInterface;
1156
$__default["default"].fn[NAME$8].Constructor = Carousel;
1158
$__default["default"].fn[NAME$8].noConflict = function () {
1159
$__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
1160
return Carousel._jQueryInterface;
1167
var NAME$7 = 'collapse';
1168
var VERSION$7 = '4.6.1';
1169
var DATA_KEY$7 = 'bs.collapse';
1170
var EVENT_KEY$7 = "." + DATA_KEY$7;
1171
var DATA_API_KEY$4 = '.data-api';
1172
var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7];
1173
var CLASS_NAME_SHOW$6 = 'show';
1174
var CLASS_NAME_COLLAPSE = 'collapse';
1175
var CLASS_NAME_COLLAPSING = 'collapsing';
1176
var CLASS_NAME_COLLAPSED = 'collapsed';
1177
var DIMENSION_WIDTH = 'width';
1178
var DIMENSION_HEIGHT = 'height';
1179
var EVENT_SHOW$4 = "show" + EVENT_KEY$7;
1180
var EVENT_SHOWN$4 = "shown" + EVENT_KEY$7;
1181
var EVENT_HIDE$4 = "hide" + EVENT_KEY$7;
1182
var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$7;
1183
var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$7 + DATA_API_KEY$4;
1184
var SELECTOR_ACTIVES = '.show, .collapsing';
1185
var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="collapse"]';
1190
var DefaultType$6 = {
1192
parent: '(string|element)'
1198
var Collapse = function () {
1199
function Collapse(element, config) {
1200
this._isTransitioning = false;
1201
this._element = element;
1202
this._config = this._getConfig(config);
1203
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1204
var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$3));
1206
for (var i = 0, len = toggleList.length; i < len; i++) {
1207
var elem = toggleList[i];
1208
var selector = Util.getSelectorFromElement(elem);
1209
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1210
return foundElem === element;
1213
if (selector !== null && filterElement.length > 0) {
1214
this._selector = selector;
1216
this._triggerArray.push(elem);
1220
this._parent = this._config.parent ? this._getParent() : null;
1222
if (!this._config.parent) {
1223
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1226
if (this._config.toggle) {
1232
var _proto = Collapse.prototype;
1235
_proto.toggle = function toggle() {
1236
if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1243
_proto.show = function show() {
1246
if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1254
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
1255
if (typeof _this._config.parent === 'string') {
1256
return elem.getAttribute('data-parent') === _this._config.parent;
1259
return elem.classList.contains(CLASS_NAME_COLLAPSE);
1262
if (actives.length === 0) {
1268
activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY$7);
1270
if (activesData && activesData._isTransitioning) {
1275
var startEvent = $__default["default"].Event(EVENT_SHOW$4);
1276
$__default["default"](this._element).trigger(startEvent);
1278
if (startEvent.isDefaultPrevented()) {
1283
Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide');
1286
$__default["default"](actives).data(DATA_KEY$7, null);
1290
var dimension = this._getDimension();
1292
$__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
1293
this._element.style[dimension] = 0;
1295
if (this._triggerArray.length) {
1296
$__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
1299
this.setTransitioning(true);
1301
var complete = function complete() {
1302
$__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
1303
_this._element.style[dimension] = '';
1305
_this.setTransitioning(false);
1307
$__default["default"](_this._element).trigger(EVENT_SHOWN$4);
1310
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1311
var scrollSize = "scroll" + capitalizedDimension;
1312
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1313
$__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1314
this._element.style[dimension] = this._element[scrollSize] + "px";
1317
_proto.hide = function hide() {
1320
if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) {
1324
var startEvent = $__default["default"].Event(EVENT_HIDE$4);
1325
$__default["default"](this._element).trigger(startEvent);
1327
if (startEvent.isDefaultPrevented()) {
1331
var dimension = this._getDimension();
1333
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1334
Util.reflow(this._element);
1335
$__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6);
1336
var triggerArrayLength = this._triggerArray.length;
1338
if (triggerArrayLength > 0) {
1339
for (var i = 0; i < triggerArrayLength; i++) {
1340
var trigger = this._triggerArray[i];
1341
var selector = Util.getSelectorFromElement(trigger);
1343
if (selector !== null) {
1344
var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector)));
1346
if (!$elem.hasClass(CLASS_NAME_SHOW$6)) {
1347
$__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
1353
this.setTransitioning(true);
1355
var complete = function complete() {
1356
_this2.setTransitioning(false);
1358
$__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN$4);
1361
this._element.style[dimension] = '';
1362
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1363
$__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1366
_proto.setTransitioning = function setTransitioning(isTransitioning) {
1367
this._isTransitioning = isTransitioning;
1370
_proto.dispose = function dispose() {
1371
$__default["default"].removeData(this._element, DATA_KEY$7);
1372
this._config = null;
1373
this._parent = null;
1374
this._element = null;
1375
this._triggerArray = null;
1376
this._isTransitioning = null;
1380
_proto._getConfig = function _getConfig(config) {
1381
config = _extends$1({}, Default$6, config);
1382
config.toggle = Boolean(config.toggle);
1384
Util.typeCheckConfig(NAME$7, config, DefaultType$6);
1388
_proto._getDimension = function _getDimension() {
1389
var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH);
1390
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
1393
_proto._getParent = function _getParent() {
1398
if (Util.isElement(this._config.parent)) {
1399
parent = this._config.parent;
1401
if (typeof this._config.parent.jquery !== 'undefined') {
1402
parent = this._config.parent[0];
1405
parent = document.querySelector(this._config.parent);
1408
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1409
var children = [].slice.call(parent.querySelectorAll(selector));
1410
$__default["default"](children).each(function (i, element) {
1411
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1416
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1417
var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW$6);
1419
if (triggerArray.length) {
1420
$__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1425
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1426
var selector = Util.getSelectorFromElement(element);
1427
return selector ? document.querySelector(selector) : null;
1430
Collapse._jQueryInterface = function _jQueryInterface(config) {
1431
return this.each(function () {
1432
var $element = $__default["default"](this);
1433
var data = $element.data(DATA_KEY$7);
1435
var _config = _extends$1({}, Default$6, $element.data(), typeof config === 'object' && config ? config : {});
1437
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1438
_config.toggle = false;
1442
data = new Collapse(this, _config);
1443
$element.data(DATA_KEY$7, data);
1446
if (typeof config === 'string') {
1447
if (typeof data[config] === 'undefined') {
1448
throw new TypeError("No method named \"" + config + "\"");
1456
_createClass(Collapse, null, [{
1458
get: function get() {
1463
get: function get() {
1475
$__default["default"](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
1477
if (event.currentTarget.tagName === 'A') {
1478
event.preventDefault();
1481
var $trigger = $__default["default"](this);
1482
var selector = Util.getSelectorFromElement(this);
1483
var selectors = [].slice.call(document.querySelectorAll(selector));
1484
$__default["default"](selectors).each(function () {
1485
var $target = $__default["default"](this);
1486
var data = $target.data(DATA_KEY$7);
1487
var config = data ? 'toggle' : $trigger.data();
1489
Collapse._jQueryInterface.call($target, config);
1496
$__default["default"].fn[NAME$7] = Collapse._jQueryInterface;
1497
$__default["default"].fn[NAME$7].Constructor = Collapse;
1499
$__default["default"].fn[NAME$7].noConflict = function () {
1500
$__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
1501
return Collapse._jQueryInterface;
1528
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
1530
var timeoutDuration = function () {
1531
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
1532
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
1533
if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
1540
function microtaskDebounce(fn) {
1542
return function () {
1547
window.Promise.resolve().then(function () {
1554
function taskDebounce(fn) {
1555
var scheduled = false;
1556
return function () {
1559
setTimeout(function () {
1562
}, timeoutDuration);
1567
var supportsMicroTasks = isBrowser && window.Promise;
1578
var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
1587
function isFunction(functionToCheck) {
1589
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1599
function getStyleComputedProperty(element, property) {
1600
if (element.nodeType !== 1) {
1604
var window = element.ownerDocument.defaultView;
1605
var css = window.getComputedStyle(element, null);
1606
return property ? css[property] : css;
1616
function getParentNode(element) {
1617
if (element.nodeName === 'HTML') {
1620
return element.parentNode || element.host;
1630
function getScrollParent(element) {
1633
return document.body;
1636
switch (element.nodeName) {
1639
return element.ownerDocument.body;
1641
return element.body;
1646
var _getStyleComputedProp = getStyleComputedProperty(element),
1647
overflow = _getStyleComputedProp.overflow,
1648
overflowX = _getStyleComputedProp.overflowX,
1649
overflowY = _getStyleComputedProp.overflowY;
1651
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
1655
return getScrollParent(getParentNode(element));
1665
function getReferenceNode(reference) {
1666
return reference && reference.referenceNode ? reference.referenceNode : reference;
1669
var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
1670
var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
1679
function isIE(version) {
1680
if (version === 11) {
1683
if (version === 10) {
1686
return isIE11 || isIE10;
1696
function getOffsetParent(element) {
1698
return document.documentElement;
1701
var noOffsetParent = isIE(10) ? document.body : null;
1704
var offsetParent = element.offsetParent || null;
1706
while (offsetParent === noOffsetParent && element.nextElementSibling) {
1707
offsetParent = (element = element.nextElementSibling).offsetParent;
1710
var nodeName = offsetParent && offsetParent.nodeName;
1712
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
1713
return element ? element.ownerDocument.documentElement : document.documentElement;
1718
if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
1719
return getOffsetParent(offsetParent);
1722
return offsetParent;
1725
function isOffsetContainer(element) {
1726
var nodeName = element.nodeName;
1728
if (nodeName === 'BODY') {
1731
return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
1741
function getRoot(node) {
1742
if (node.parentNode !== null) {
1743
return getRoot(node.parentNode);
1757
function findCommonOffsetParent(element1, element2) {
1759
if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
1760
return document.documentElement;
1764
var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
1765
var start = order ? element1 : element2;
1766
var end = order ? element2 : element1;
1769
var range = document.createRange();
1770
range.setStart(start, 0);
1771
range.setEnd(end, 0);
1772
var commonAncestorContainer = range.commonAncestorContainer;
1776
if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
1777
if (isOffsetContainer(commonAncestorContainer)) {
1778
return commonAncestorContainer;
1781
return getOffsetParent(commonAncestorContainer);
1785
var element1root = getRoot(element1);
1786
if (element1root.host) {
1787
return findCommonOffsetParent(element1root.host, element2);
1789
return findCommonOffsetParent(element1, getRoot(element2).host);
1801
function getScroll(element) {
1802
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
1804
var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
1805
var nodeName = element.nodeName;
1807
if (nodeName === 'BODY' || nodeName === 'HTML') {
1808
var html = element.ownerDocument.documentElement;
1809
var scrollingElement = element.ownerDocument.scrollingElement || html;
1810
return scrollingElement[upperSide];
1813
return element[upperSide];
1825
function includeScroll(rect, element) {
1826
var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1828
var scrollTop = getScroll(element, 'top');
1829
var scrollLeft = getScroll(element, 'left');
1830
var modifier = subtract ? -1 : 1;
1831
rect.top += scrollTop * modifier;
1832
rect.bottom += scrollTop * modifier;
1833
rect.left += scrollLeft * modifier;
1834
rect.right += scrollLeft * modifier;
1848
function getBordersSize(styles, axis) {
1849
var sideA = axis === 'x' ? 'Left' : 'Top';
1850
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
1852
return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
1855
function getSize(axis, body, html, computedStyle) {
1856
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);
1859
function getWindowSizes(document) {
1860
var body = document.body;
1861
var html = document.documentElement;
1862
var computedStyle = isIE(10) && getComputedStyle(html);
1865
height: getSize('Height', body, html, computedStyle),
1866
width: getSize('Width', body, html, computedStyle)
1870
var classCallCheck = function (instance, Constructor) {
1871
if (!(instance instanceof Constructor)) {
1872
throw new TypeError("Cannot call a class as a function");
1876
var createClass = function () {
1877
function defineProperties(target, props) {
1878
for (var i = 0; i < props.length; i++) {
1879
var descriptor = props[i];
1880
descriptor.enumerable = descriptor.enumerable || false;
1881
descriptor.configurable = true;
1882
if ("value" in descriptor) descriptor.writable = true;
1883
Object.defineProperty(target, descriptor.key, descriptor);
1887
return function (Constructor, protoProps, staticProps) {
1888
if (protoProps) defineProperties(Constructor.prototype, protoProps);
1889
if (staticProps) defineProperties(Constructor, staticProps);
1898
var defineProperty = function (obj, key, value) {
1900
Object.defineProperty(obj, key, {
1913
var _extends = Object.assign || function (target) {
1914
for (var i = 1; i < arguments.length; i++) {
1915
var source = arguments[i];
1917
for (var key in source) {
1918
if (Object.prototype.hasOwnProperty.call(source, key)) {
1919
target[key] = source[key];
1934
function getClientRect(offsets) {
1935
return _extends({}, offsets, {
1936
right: offsets.left + offsets.width,
1937
bottom: offsets.top + offsets.height
1948
function getBoundingClientRect(element) {
1956
rect = element.getBoundingClientRect();
1957
var scrollTop = getScroll(element, 'top');
1958
var scrollLeft = getScroll(element, 'left');
1959
rect.top += scrollTop;
1960
rect.left += scrollLeft;
1961
rect.bottom += scrollTop;
1962
rect.right += scrollLeft;
1964
rect = element.getBoundingClientRect();
1971
width: rect.right - rect.left,
1972
height: rect.bottom - rect.top
1976
var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
1977
var width = sizes.width || element.clientWidth || result.width;
1978
var height = sizes.height || element.clientHeight || result.height;
1980
var horizScrollbar = element.offsetWidth - width;
1981
var vertScrollbar = element.offsetHeight - height;
1985
if (horizScrollbar || vertScrollbar) {
1986
var styles = getStyleComputedProperty(element);
1987
horizScrollbar -= getBordersSize(styles, 'x');
1988
vertScrollbar -= getBordersSize(styles, 'y');
1990
result.width -= horizScrollbar;
1991
result.height -= vertScrollbar;
1994
return getClientRect(result);
1997
function getOffsetRectRelativeToArbitraryNode(children, parent) {
1998
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2000
var isIE10 = isIE(10);
2001
var isHTML = parent.nodeName === 'HTML';
2002
var childrenRect = getBoundingClientRect(children);
2003
var parentRect = getBoundingClientRect(parent);
2004
var scrollParent = getScrollParent(children);
2006
var styles = getStyleComputedProperty(parent);
2007
var borderTopWidth = parseFloat(styles.borderTopWidth);
2008
var borderLeftWidth = parseFloat(styles.borderLeftWidth);
2011
if (fixedPosition && isHTML) {
2012
parentRect.top = Math.max(parentRect.top, 0);
2013
parentRect.left = Math.max(parentRect.left, 0);
2015
var offsets = getClientRect({
2016
top: childrenRect.top - parentRect.top - borderTopWidth,
2017
left: childrenRect.left - parentRect.left - borderLeftWidth,
2018
width: childrenRect.width,
2019
height: childrenRect.height
2021
offsets.marginTop = 0;
2022
offsets.marginLeft = 0;
2028
if (!isIE10 && isHTML) {
2029
var marginTop = parseFloat(styles.marginTop);
2030
var marginLeft = parseFloat(styles.marginLeft);
2032
offsets.top -= borderTopWidth - marginTop;
2033
offsets.bottom -= borderTopWidth - marginTop;
2034
offsets.left -= borderLeftWidth - marginLeft;
2035
offsets.right -= borderLeftWidth - marginLeft;
2038
offsets.marginTop = marginTop;
2039
offsets.marginLeft = marginLeft;
2042
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
2043
offsets = includeScroll(offsets, parent);
2049
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
2050
var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2052
var html = element.ownerDocument.documentElement;
2053
var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
2054
var width = Math.max(html.clientWidth, window.innerWidth || 0);
2055
var height = Math.max(html.clientHeight, window.innerHeight || 0);
2057
var scrollTop = !excludeScroll ? getScroll(html) : 0;
2058
var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
2061
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
2062
left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
2067
return getClientRect(offset);
2078
function isFixed(element) {
2079
var nodeName = element.nodeName;
2080
if (nodeName === 'BODY' || nodeName === 'HTML') {
2083
if (getStyleComputedProperty(element, 'position') === 'fixed') {
2086
var parentNode = getParentNode(element);
2090
return isFixed(parentNode);
2101
function getFixedPositionOffsetParent(element) {
2103
if (!element || !element.parentElement || isIE()) {
2104
return document.documentElement;
2106
var el = element.parentElement;
2107
while (el && getStyleComputedProperty(el, 'transform') === 'none') {
2108
el = el.parentElement;
2110
return el || document.documentElement;
2124
function getBoundaries(popper, reference, padding, boundariesElement) {
2125
var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
2129
var boundaries = { top: 0, left: 0 };
2130
var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
2133
if (boundariesElement === 'viewport') {
2134
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
2137
var boundariesNode = void 0;
2138
if (boundariesElement === 'scrollParent') {
2139
boundariesNode = getScrollParent(getParentNode(reference));
2140
if (boundariesNode.nodeName === 'BODY') {
2141
boundariesNode = popper.ownerDocument.documentElement;
2143
} else if (boundariesElement === 'window') {
2144
boundariesNode = popper.ownerDocument.documentElement;
2146
boundariesNode = boundariesElement;
2149
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
2152
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
2153
var _getWindowSizes = getWindowSizes(popper.ownerDocument),
2154
height = _getWindowSizes.height,
2155
width = _getWindowSizes.width;
2157
boundaries.top += offsets.top - offsets.marginTop;
2158
boundaries.bottom = height + offsets.top;
2159
boundaries.left += offsets.left - offsets.marginLeft;
2160
boundaries.right = width + offsets.left;
2163
boundaries = offsets;
2168
padding = padding || 0;
2169
var isPaddingNumber = typeof padding === 'number';
2170
boundaries.left += isPaddingNumber ? padding : padding.left || 0;
2171
boundaries.top += isPaddingNumber ? padding : padding.top || 0;
2172
boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
2173
boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
2178
function getArea(_ref) {
2179
var width = _ref.width,
2180
height = _ref.height;
2182
return width * height;
2194
function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
2195
var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
2197
if (placement.indexOf('auto') === -1) {
2201
var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
2205
width: boundaries.width,
2206
height: refRect.top - boundaries.top
2209
width: boundaries.right - refRect.right,
2210
height: boundaries.height
2213
width: boundaries.width,
2214
height: boundaries.bottom - refRect.bottom
2217
width: refRect.left - boundaries.left,
2218
height: boundaries.height
2222
var sortedAreas = Object.keys(rects).map(function (key) {
2226
area: getArea(rects[key])
2228
}).sort(function (a, b) {
2229
return b.area - a.area;
2232
var filteredAreas = sortedAreas.filter(function (_ref2) {
2233
var width = _ref2.width,
2234
height = _ref2.height;
2235
return width >= popper.clientWidth && height >= popper.clientHeight;
2238
var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
2240
var variation = placement.split('-')[1];
2242
return computedPlacement + (variation ? '-' + variation : '');
2255
function getReferenceOffsets(state, popper, reference) {
2256
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2258
var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
2259
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
2269
function getOuterSizes(element) {
2270
var window = element.ownerDocument.defaultView;
2271
var styles = window.getComputedStyle(element);
2272
var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
2273
var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
2275
width: element.offsetWidth + y,
2276
height: element.offsetHeight + x
2288
function getOppositePlacement(placement) {
2289
var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
2290
return placement.replace(/left|right|bottom|top/g, function (matched) {
2291
return hash[matched];
2305
function getPopperOffsets(popper, referenceOffsets, placement) {
2306
placement = placement.split('-')[0];
2309
var popperRect = getOuterSizes(popper);
2312
var popperOffsets = {
2313
width: popperRect.width,
2314
height: popperRect.height
2318
var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
2319
var mainSide = isHoriz ? 'top' : 'left';
2320
var secondarySide = isHoriz ? 'left' : 'top';
2321
var measurement = isHoriz ? 'height' : 'width';
2322
var secondaryMeasurement = !isHoriz ? 'height' : 'width';
2324
popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
2325
if (placement === secondarySide) {
2326
popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
2328
popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
2331
return popperOffsets;
2343
function find(arr, check) {
2345
if (Array.prototype.find) {
2346
return arr.find(check);
2350
return arr.filter(check)[0];
2362
function findIndex(arr, prop, value) {
2364
if (Array.prototype.findIndex) {
2365
return arr.findIndex(function (cur) {
2366
return cur[prop] === value;
2371
var match = find(arr, function (obj) {
2372
return obj[prop] === value;
2374
return arr.indexOf(match);
2387
function runModifiers(modifiers, data, ends) {
2388
var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
2390
modifiersToRun.forEach(function (modifier) {
2391
if (modifier['function']) {
2393
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
2395
var fn = modifier['function'] || modifier.fn;
2396
if (modifier.enabled && isFunction(fn)) {
2400
data.offsets.popper = getClientRect(data.offsets.popper);
2401
data.offsets.reference = getClientRect(data.offsets.reference);
2403
data = fn(data, modifier);
2419
if (this.state.isDestroyed) {
2433
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
2438
data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
2441
data.originalPlacement = data.placement;
2443
data.positionFixed = this.options.positionFixed;
2446
data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
2448
data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
2451
data = runModifiers(this.modifiers, data);
2455
if (!this.state.isCreated) {
2456
this.state.isCreated = true;
2457
this.options.onCreate(data);
2459
this.options.onUpdate(data);
2469
function isModifierEnabled(modifiers, modifierName) {
2470
return modifiers.some(function (_ref) {
2471
var name = _ref.name,
2472
enabled = _ref.enabled;
2473
return enabled && name === modifierName;
2484
function getSupportedPropertyName(property) {
2485
var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
2486
var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
2488
for (var i = 0; i < prefixes.length; i++) {
2489
var prefix = prefixes[i];
2490
var toCheck = prefix ? '' + prefix + upperProp : property;
2491
if (typeof document.body.style[toCheck] !== 'undefined') {
2503
function destroy() {
2504
this.state.isDestroyed = true;
2507
if (isModifierEnabled(this.modifiers, 'applyStyle')) {
2508
this.popper.removeAttribute('x-placement');
2509
this.popper.style.position = '';
2510
this.popper.style.top = '';
2511
this.popper.style.left = '';
2512
this.popper.style.right = '';
2513
this.popper.style.bottom = '';
2514
this.popper.style.willChange = '';
2515
this.popper.style[getSupportedPropertyName('transform')] = '';
2518
this.disableEventListeners();
2522
if (this.options.removeOnDestroy) {
2523
this.popper.parentNode.removeChild(this.popper);
2533
function getWindow(element) {
2534
var ownerDocument = element.ownerDocument;
2535
return ownerDocument ? ownerDocument.defaultView : window;
2538
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
2539
var isBody = scrollParent.nodeName === 'BODY';
2540
var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
2541
target.addEventListener(event, callback, { passive: true });
2544
attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
2546
scrollParents.push(target);
2555
function setupEventListeners(reference, options, state, updateBound) {
2557
state.updateBound = updateBound;
2558
getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
2561
var scrollElement = getScrollParent(reference);
2562
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
2563
state.scrollElement = scrollElement;
2564
state.eventsEnabled = true;
2575
function enableEventListeners() {
2576
if (!this.state.eventsEnabled) {
2577
this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
2587
function removeEventListeners(reference, state) {
2589
getWindow(reference).removeEventListener('resize', state.updateBound);
2592
state.scrollParents.forEach(function (target) {
2593
target.removeEventListener('scroll', state.updateBound);
2597
state.updateBound = null;
2598
state.scrollParents = [];
2599
state.scrollElement = null;
2600
state.eventsEnabled = false;
2611
function disableEventListeners() {
2612
if (this.state.eventsEnabled) {
2613
cancelAnimationFrame(this.scheduleUpdate);
2614
this.state = removeEventListeners(this.reference, this.state);
2625
function isNumeric(n) {
2626
return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
2637
function setStyles(element, styles) {
2638
Object.keys(styles).forEach(function (prop) {
2641
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
2644
element.style[prop] = styles[prop] + unit;
2656
function setAttributes(element, attributes) {
2657
Object.keys(attributes).forEach(function (prop) {
2658
var value = attributes[prop];
2659
if (value !== false) {
2660
element.setAttribute(prop, attributes[prop]);
2662
element.removeAttribute(prop);
2676
function applyStyle(data) {
2681
setStyles(data.instance.popper, data.styles);
2685
setAttributes(data.instance.popper, data.attributes);
2688
if (data.arrowElement && Object.keys(data.arrowStyles).length) {
2689
setStyles(data.arrowElement, data.arrowStyles);
2705
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
2707
var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
2712
var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
2714
popper.setAttribute('x-placement', placement);
2718
setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
2742
function getRoundedOffsets(data, shouldRound) {
2743
var _data$offsets = data.offsets,
2744
popper = _data$offsets.popper,
2745
reference = _data$offsets.reference;
2746
var round = Math.round,
2749
var noRound = function noRound(v) {
2753
var referenceWidth = round(reference.width);
2754
var popperWidth = round(popper.width);
2756
var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
2757
var isVariation = data.placement.indexOf('-') !== -1;
2758
var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
2759
var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
2761
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
2762
var verticalToInteger = !shouldRound ? noRound : round;
2765
left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
2766
top: verticalToInteger(popper.top),
2767
bottom: verticalToInteger(popper.bottom),
2768
right: horizontalToInteger(popper.right)
2772
var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
2781
function computeStyle(data, options) {
2784
var popper = data.offsets.popper;
2788
var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
2789
return modifier.name === 'applyStyle';
2791
if (legacyGpuAccelerationOption !== undefined) {
2792
console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
2794
var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
2796
var offsetParent = getOffsetParent(data.instance.popper);
2797
var offsetParentRect = getBoundingClientRect(offsetParent);
2801
position: popper.position
2804
var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
2806
var sideA = x === 'bottom' ? 'top' : 'bottom';
2807
var sideB = y === 'right' ? 'left' : 'right';
2812
var prefixedProperty = getSupportedPropertyName('transform');
2825
if (sideA === 'bottom') {
2828
if (offsetParent.nodeName === 'HTML') {
2829
top = -offsetParent.clientHeight + offsets.bottom;
2831
top = -offsetParentRect.height + offsets.bottom;
2836
if (sideB === 'right') {
2837
if (offsetParent.nodeName === 'HTML') {
2838
left = -offsetParent.clientWidth + offsets.right;
2840
left = -offsetParentRect.width + offsets.right;
2843
left = offsets.left;
2845
if (gpuAcceleration && prefixedProperty) {
2846
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
2849
styles.willChange = 'transform';
2852
var invertTop = sideA === 'bottom' ? -1 : 1;
2853
var invertLeft = sideB === 'right' ? -1 : 1;
2854
styles[sideA] = top * invertTop;
2855
styles[sideB] = left * invertLeft;
2856
styles.willChange = sideA + ', ' + sideB;
2861
'x-placement': data.placement
2865
data.attributes = _extends({}, attributes, data.attributes);
2866
data.styles = _extends({}, styles, data.styles);
2867
data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
2882
function isModifierRequired(modifiers, requestingName, requestedName) {
2883
var requesting = find(modifiers, function (_ref) {
2884
var name = _ref.name;
2885
return name === requestingName;
2888
var isRequired = !!requesting && modifiers.some(function (modifier) {
2889
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
2893
var _requesting = '`' + requestingName + '`';
2894
var requested = '`' + requestedName + '`';
2895
console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
2907
function arrow(data, options) {
2908
var _data$offsets$arrow;
2911
if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
2915
var arrowElement = options.element;
2918
if (typeof arrowElement === 'string') {
2919
arrowElement = data.instance.popper.querySelector(arrowElement);
2922
if (!arrowElement) {
2928
if (!data.instance.popper.contains(arrowElement)) {
2929
console.warn('WARNING: `arrow.element` must be child of its popper element!');
2934
var placement = data.placement.split('-')[0];
2935
var _data$offsets = data.offsets,
2936
popper = _data$offsets.popper,
2937
reference = _data$offsets.reference;
2939
var isVertical = ['left', 'right'].indexOf(placement) !== -1;
2941
var len = isVertical ? 'height' : 'width';
2942
var sideCapitalized = isVertical ? 'Top' : 'Left';
2943
var side = sideCapitalized.toLowerCase();
2944
var altSide = isVertical ? 'left' : 'top';
2945
var opSide = isVertical ? 'bottom' : 'right';
2946
var arrowElementSize = getOuterSizes(arrowElement)[len];
2954
if (reference[opSide] - arrowElementSize < popper[side]) {
2955
data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
2958
if (reference[side] + arrowElementSize > popper[opSide]) {
2959
data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
2961
data.offsets.popper = getClientRect(data.offsets.popper);
2964
var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
2968
var css = getStyleComputedProperty(data.instance.popper);
2969
var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
2970
var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
2971
var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
2974
sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
2976
data.arrowElement = arrowElement;
2977
data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
2989
function getOppositeVariation(variation) {
2990
if (variation === 'end') {
2992
} else if (variation === 'start') {
3029
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'];
3032
var validPlacements = placements.slice(3);
3044
function clockwise(placement) {
3045
var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3047
var index = validPlacements.indexOf(placement);
3048
var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
3049
return counter ? arr.reverse() : arr;
3054
CLOCKWISE: 'clockwise',
3055
COUNTERCLOCKWISE: 'counterclockwise'
3065
function flip(data, options) {
3067
if (isModifierEnabled(data.instance.modifiers, 'inner')) {
3071
if (data.flipped && data.placement === data.originalPlacement) {
3076
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
3078
var placement = data.placement.split('-')[0];
3079
var placementOpposite = getOppositePlacement(placement);
3080
var variation = data.placement.split('-')[1] || '';
3084
switch (options.behavior) {
3085
case BEHAVIORS.FLIP:
3086
flipOrder = [placement, placementOpposite];
3088
case BEHAVIORS.CLOCKWISE:
3089
flipOrder = clockwise(placement);
3091
case BEHAVIORS.COUNTERCLOCKWISE:
3092
flipOrder = clockwise(placement, true);
3095
flipOrder = options.behavior;
3098
flipOrder.forEach(function (step, index) {
3099
if (placement !== step || flipOrder.length === index + 1) {
3103
placement = data.placement.split('-')[0];
3104
placementOpposite = getOppositePlacement(placement);
3106
var popperOffsets = data.offsets.popper;
3107
var refOffsets = data.offsets.reference;
3110
var floor = Math.floor;
3111
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);
3113
var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
3114
var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
3115
var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
3116
var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
3118
var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
3121
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
3124
var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
3127
var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
3129
var flippedVariation = flippedVariationByRef || flippedVariationByContent;
3131
if (overlapsRef || overflowsBoundaries || flippedVariation) {
3133
data.flipped = true;
3135
if (overlapsRef || overflowsBoundaries) {
3136
placement = flipOrder[index + 1];
3139
if (flippedVariation) {
3140
variation = getOppositeVariation(variation);
3143
data.placement = placement + (variation ? '-' + variation : '');
3147
data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
3149
data = runModifiers(data.instance.modifiers, data, 'flip');
3162
function keepTogether(data) {
3163
var _data$offsets = data.offsets,
3164
popper = _data$offsets.popper,
3165
reference = _data$offsets.reference;
3167
var placement = data.placement.split('-')[0];
3168
var floor = Math.floor;
3169
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
3170
var side = isVertical ? 'right' : 'bottom';
3171
var opSide = isVertical ? 'left' : 'top';
3172
var measurement = isVertical ? 'width' : 'height';
3174
if (popper[side] < floor(reference[opSide])) {
3175
data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
3177
if (popper[opSide] > floor(reference[side])) {
3178
data.offsets.popper[opSide] = floor(reference[side]);
3196
function toValue(str, measurement, popperOffsets, referenceOffsets) {
3198
var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
3199
var value = +split[1];
3200
var unit = split[2];
3207
if (unit.indexOf('%') === 0) {
3208
var element = void 0;
3211
element = popperOffsets;
3216
element = referenceOffsets;
3219
var rect = getClientRect(element);
3220
return rect[measurement] / 100 * value;
3221
} else if (unit === 'vh' || unit === 'vw') {
3224
if (unit === 'vh') {
3225
size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
3227
size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
3229
return size / 100 * value;
3248
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
3249
var offsets = [0, 0];
3254
var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
3258
var fragments = offset.split(/(\+|\-)/).map(function (frag) {
3264
var divider = fragments.indexOf(find(fragments, function (frag) {
3265
return frag.search(/,|\s/) !== -1;
3268
if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
3269
console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
3274
var splitRegex = /\s*,\s*|\s+/;
3275
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];
3278
ops = ops.map(function (op, index) {
3280
var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
3281
var mergeWithPrevious = false;
3285
.reduce(function (a, b) {
3286
if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
3287
a[a.length - 1] = b;
3288
mergeWithPrevious = true;
3290
} else if (mergeWithPrevious) {
3291
a[a.length - 1] += b;
3292
mergeWithPrevious = false;
3299
.map(function (str) {
3300
return toValue(str, measurement, popperOffsets, referenceOffsets);
3305
ops.forEach(function (op, index) {
3306
op.forEach(function (frag, index2) {
3307
if (isNumeric(frag)) {
3308
offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
3324
function offset(data, _ref) {
3325
var offset = _ref.offset;
3326
var placement = data.placement,
3327
_data$offsets = data.offsets,
3328
popper = _data$offsets.popper,
3329
reference = _data$offsets.reference;
3331
var basePlacement = placement.split('-')[0];
3333
var offsets = void 0;
3334
if (isNumeric(+offset)) {
3335
offsets = [+offset, 0];
3337
offsets = parseOffset(offset, popper, reference, basePlacement);
3340
if (basePlacement === 'left') {
3341
popper.top += offsets[0];
3342
popper.left -= offsets[1];
3343
} else if (basePlacement === 'right') {
3344
popper.top += offsets[0];
3345
popper.left += offsets[1];
3346
} else if (basePlacement === 'top') {
3347
popper.left += offsets[0];
3348
popper.top -= offsets[1];
3349
} else if (basePlacement === 'bottom') {
3350
popper.left += offsets[0];
3351
popper.top += offsets[1];
3354
data.popper = popper;
3365
function preventOverflow(data, options) {
3366
var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
3371
if (data.instance.reference === boundariesElement) {
3372
boundariesElement = getOffsetParent(boundariesElement);
3378
var transformProp = getSupportedPropertyName('transform');
3379
var popperStyles = data.instance.popper.style;
3380
var top = popperStyles.top,
3381
left = popperStyles.left,
3382
transform = popperStyles[transformProp];
3384
popperStyles.top = '';
3385
popperStyles.left = '';
3386
popperStyles[transformProp] = '';
3388
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
3392
popperStyles.top = top;
3393
popperStyles.left = left;
3394
popperStyles[transformProp] = transform;
3396
options.boundaries = boundaries;
3398
var order = options.priority;
3399
var popper = data.offsets.popper;
3402
primary: function primary(placement) {
3403
var value = popper[placement];
3404
if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
3405
value = Math.max(popper[placement], boundaries[placement]);
3407
return defineProperty({}, placement, value);
3409
secondary: function secondary(placement) {
3410
var mainSide = placement === 'right' ? 'left' : 'top';
3411
var value = popper[mainSide];
3412
if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
3413
value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
3415
return defineProperty({}, mainSide, value);
3419
order.forEach(function (placement) {
3420
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
3421
popper = _extends({}, popper, check[side](placement));
3424
data.offsets.popper = popper;
3436
function shift(data) {
3437
var placement = data.placement;
3438
var basePlacement = placement.split('-')[0];
3439
var shiftvariation = placement.split('-')[1];
3442
if (shiftvariation) {
3443
var _data$offsets = data.offsets,
3444
reference = _data$offsets.reference,
3445
popper = _data$offsets.popper;
3447
var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
3448
var side = isVertical ? 'left' : 'top';
3449
var measurement = isVertical ? 'width' : 'height';
3451
var shiftOffsets = {
3452
start: defineProperty({}, side, reference[side]),
3453
end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
3456
data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
3469
function hide(data) {
3470
if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
3474
var refRect = data.offsets.reference;
3475
var bound = find(data.instance.modifiers, function (modifier) {
3476
return modifier.name === 'preventOverflow';
3479
if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
3481
if (data.hide === true) {
3486
data.attributes['x-out-of-boundaries'] = '';
3489
if (data.hide === false) {
3494
data.attributes['x-out-of-boundaries'] = false;
3507
function inner(data) {
3508
var placement = data.placement;
3509
var basePlacement = placement.split('-')[0];
3510
var _data$offsets = data.offsets,
3511
popper = _data$offsets.popper,
3512
reference = _data$offsets.reference;
3514
var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
3516
var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
3518
popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
3520
data.placement = getOppositePlacement(placement);
3521
data.offsets.popper = getClientRect(popper);
3639
fn: preventOverflow,
3645
priority: ['left', 'right', 'top', 'bottom'],
3658
boundariesElement: 'scrollParent'
3697
element: '[x-arrow]'
3736
boundariesElement: 'viewport',
3744
flipVariations: false,
3752
flipVariationsByContent: false
3817
gpuAcceleration: true,
3855
onLoad: applyStyleOnLoad,
3862
gpuAcceleration: undefined
3906
placement: 'bottom',
3912
positionFixed: false,
3918
eventsEnabled: true,
3925
removeOnDestroy: false,
3933
onCreate: function onCreate() {},
3943
onUpdate: function onUpdate() {},
3950
modifiers: modifiers
3965
var Popper = function () {
3974
function Popper(reference, popper) {
3977
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
3978
classCallCheck(this, Popper);
3980
this.scheduleUpdate = function () {
3981
return requestAnimationFrame(_this.update);
3985
this.update = debounce(this.update.bind(this));
3988
this.options = _extends({}, Popper.Defaults, options);
3998
this.reference = reference && reference.jquery ? reference[0] : reference;
3999
this.popper = popper && popper.jquery ? popper[0] : popper;
4002
this.options.modifiers = {};
4003
Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
4004
_this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
4008
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
4011
}, _this.options.modifiers[name]);
4014
.sort(function (a, b) {
4015
return a.order - b.order;
4022
this.modifiers.forEach(function (modifierOptions) {
4023
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
4024
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
4031
var eventsEnabled = this.options.eventsEnabled;
4032
if (eventsEnabled) {
4034
this.enableEventListeners();
4037
this.state.eventsEnabled = eventsEnabled;
4044
createClass(Popper, [{
4046
value: function update$$1() {
4047
return update.call(this);
4051
value: function destroy$$1() {
4052
return destroy.call(this);
4055
key: 'enableEventListeners',
4056
value: function enableEventListeners$$1() {
4057
return enableEventListeners.call(this);
4060
key: 'disableEventListeners',
4061
value: function disableEventListeners$$1() {
4062
return disableEventListeners.call(this);
4114
Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
4115
Popper.placements = placements;
4116
Popper.Defaults = Defaults;
4118
var Popper$1 = Popper;
4124
var NAME$6 = 'dropdown';
4125
var VERSION$6 = '4.6.1';
4126
var DATA_KEY$6 = 'bs.dropdown';
4127
var EVENT_KEY$6 = "." + DATA_KEY$6;
4128
var DATA_API_KEY$3 = '.data-api';
4129
var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6];
4130
var ESCAPE_KEYCODE$1 = 27;
4132
var SPACE_KEYCODE = 32;
4134
var TAB_KEYCODE = 9;
4136
var ARROW_UP_KEYCODE = 38;
4138
var ARROW_DOWN_KEYCODE = 40;
4140
var RIGHT_MOUSE_BUTTON_WHICH = 3;
4142
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE$1);
4143
var CLASS_NAME_DISABLED$1 = 'disabled';
4144
var CLASS_NAME_SHOW$5 = 'show';
4145
var CLASS_NAME_DROPUP = 'dropup';
4146
var CLASS_NAME_DROPRIGHT = 'dropright';
4147
var CLASS_NAME_DROPLEFT = 'dropleft';
4148
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
4149
var CLASS_NAME_POSITION_STATIC = 'position-static';
4150
var EVENT_HIDE$3 = "hide" + EVENT_KEY$6;
4151
var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6;
4152
var EVENT_SHOW$3 = "show" + EVENT_KEY$6;
4153
var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6;
4154
var EVENT_CLICK = "click" + EVENT_KEY$6;
4155
var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3;
4156
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3;
4157
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3;
4158
var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
4159
var SELECTOR_FORM_CHILD = '.dropdown form';
4160
var SELECTOR_MENU = '.dropdown-menu';
4161
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
4162
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
4163
var PLACEMENT_TOP = 'top-start';
4164
var PLACEMENT_TOPEND = 'top-end';
4165
var PLACEMENT_BOTTOM = 'bottom-start';
4166
var PLACEMENT_BOTTOMEND = 'bottom-end';
4167
var PLACEMENT_RIGHT = 'right-start';
4168
var PLACEMENT_LEFT = 'left-start';
4172
boundary: 'scrollParent',
4173
reference: 'toggle',
4177
var DefaultType$5 = {
4178
offset: '(number|string|function)',
4180
boundary: '(string|element)',
4181
reference: '(string|element)',
4183
popperConfig: '(null|object)'
4189
var Dropdown = function () {
4190
function Dropdown(element, config) {
4191
this._element = element;
4192
this._popper = null;
4193
this._config = this._getConfig(config);
4194
this._menu = this._getMenuElement();
4195
this._inNavbar = this._detectNavbar();
4197
this._addEventListeners();
4201
var _proto = Dropdown.prototype;
4204
_proto.toggle = function toggle() {
4205
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1)) {
4209
var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5);
4211
Dropdown._clearMenus();
4220
_proto.show = function show(usePopper) {
4221
if (usePopper === void 0) {
4225
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
4229
var relatedTarget = {
4230
relatedTarget: this._element
4232
var showEvent = $__default["default"].Event(EVENT_SHOW$3, relatedTarget);
4234
var parent = Dropdown._getParentFromElement(this._element);
4236
$__default["default"](parent).trigger(showEvent);
4238
if (showEvent.isDefaultPrevented()) {
4243
if (!this._inNavbar && usePopper) {
4245
if (typeof Popper$1 === 'undefined') {
4246
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
4249
var referenceElement = this._element;
4251
if (this._config.reference === 'parent') {
4252
referenceElement = parent;
4253
} else if (Util.isElement(this._config.reference)) {
4254
referenceElement = this._config.reference;
4256
if (typeof this._config.reference.jquery !== 'undefined') {
4257
referenceElement = this._config.reference[0];
4264
if (this._config.boundary !== 'scrollParent') {
4265
$__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC);
4268
this._popper = new Popper$1(referenceElement, this._menu, this._getPopperConfig());
4275
if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
4276
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
4279
this._element.focus();
4281
this._element.setAttribute('aria-expanded', true);
4283
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
4284
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_SHOWN$3, relatedTarget));
4287
_proto.hide = function hide() {
4288
if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) {
4292
var relatedTarget = {
4293
relatedTarget: this._element
4295
var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
4297
var parent = Dropdown._getParentFromElement(this._element);
4299
$__default["default"](parent).trigger(hideEvent);
4301
if (hideEvent.isDefaultPrevented()) {
4306
this._popper.destroy();
4309
$__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5);
4310
$__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
4313
_proto.dispose = function dispose() {
4314
$__default["default"].removeData(this._element, DATA_KEY$6);
4315
$__default["default"](this._element).off(EVENT_KEY$6);
4316
this._element = null;
4319
if (this._popper !== null) {
4320
this._popper.destroy();
4322
this._popper = null;
4326
_proto.update = function update() {
4327
this._inNavbar = this._detectNavbar();
4329
if (this._popper !== null) {
4330
this._popper.scheduleUpdate();
4335
_proto._addEventListeners = function _addEventListeners() {
4338
$__default["default"](this._element).on(EVENT_CLICK, function (event) {
4339
event.preventDefault();
4340
event.stopPropagation();
4346
_proto._getConfig = function _getConfig(config) {
4347
config = _extends$1({}, this.constructor.Default, $__default["default"](this._element).data(), config);
4348
Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
4352
_proto._getMenuElement = function _getMenuElement() {
4354
var parent = Dropdown._getParentFromElement(this._element);
4357
this._menu = parent.querySelector(SELECTOR_MENU);
4364
_proto._getPlacement = function _getPlacement() {
4365
var $parentDropdown = $__default["default"](this._element.parentNode);
4366
var placement = PLACEMENT_BOTTOM;
4368
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
4369
placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
4370
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
4371
placement = PLACEMENT_RIGHT;
4372
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
4373
placement = PLACEMENT_LEFT;
4374
} else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
4375
placement = PLACEMENT_BOTTOMEND;
4381
_proto._detectNavbar = function _detectNavbar() {
4382
return $__default["default"](this._element).closest('.navbar').length > 0;
4385
_proto._getOffset = function _getOffset() {
4390
if (typeof this._config.offset === 'function') {
4391
offset.fn = function (data) {
4392
data.offsets = _extends$1({}, data.offsets, _this2._config.offset(data.offsets, _this2._element));
4396
offset.offset = this._config.offset;
4402
_proto._getPopperConfig = function _getPopperConfig() {
4403
var popperConfig = {
4404
placement: this._getPlacement(),
4406
offset: this._getOffset(),
4408
enabled: this._config.flip
4411
boundariesElement: this._config.boundary
4416
if (this._config.display === 'static') {
4417
popperConfig.modifiers.applyStyle = {
4422
return _extends$1({}, popperConfig, this._config.popperConfig);
4426
Dropdown._jQueryInterface = function _jQueryInterface(config) {
4427
return this.each(function () {
4428
var data = $__default["default"](this).data(DATA_KEY$6);
4430
var _config = typeof config === 'object' ? config : null;
4433
data = new Dropdown(this, _config);
4434
$__default["default"](this).data(DATA_KEY$6, data);
4437
if (typeof config === 'string') {
4438
if (typeof data[config] === 'undefined') {
4439
throw new TypeError("No method named \"" + config + "\"");
4447
Dropdown._clearMenus = function _clearMenus(event) {
4448
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
4452
var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
4454
for (var i = 0, len = toggles.length; i < len; i++) {
4455
var parent = Dropdown._getParentFromElement(toggles[i]);
4457
var context = $__default["default"](toggles[i]).data(DATA_KEY$6);
4458
var relatedTarget = {
4459
relatedTarget: toggles[i]
4462
if (event && event.type === 'click') {
4463
relatedTarget.clickEvent = event;
4470
var dropdownMenu = context._menu;
4472
if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW$5)) {
4476
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) {
4480
var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget);
4481
$__default["default"](parent).trigger(hideEvent);
4483
if (hideEvent.isDefaultPrevented()) {
4489
if ('ontouchstart' in document.documentElement) {
4490
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
4493
toggles[i].setAttribute('aria-expanded', 'false');
4495
if (context._popper) {
4496
context._popper.destroy();
4499
$__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW$5);
4500
$__default["default"](parent).removeClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget));
4504
Dropdown._getParentFromElement = function _getParentFromElement(element) {
4506
var selector = Util.getSelectorFromElement(element);
4509
parent = document.querySelector(selector);
4512
return parent || element.parentNode;
4516
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
4524
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE$1 && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
4528
if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED$1)) {
4532
var parent = Dropdown._getParentFromElement(this);
4534
var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW$5);
4536
if (!isActive && event.which === ESCAPE_KEYCODE$1) {
4540
event.preventDefault();
4541
event.stopPropagation();
4543
if (!isActive || event.which === ESCAPE_KEYCODE$1 || event.which === SPACE_KEYCODE) {
4544
if (event.which === ESCAPE_KEYCODE$1) {
4545
$__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
4548
$__default["default"](this).trigger('click');
4552
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
4553
return $__default["default"](item).is(':visible');
4556
if (items.length === 0) {
4560
var index = items.indexOf(event.target);
4562
if (event.which === ARROW_UP_KEYCODE && index > 0) {
4567
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
4576
items[index].focus();
4579
_createClass(Dropdown, null, [{
4581
get: function get() {
4586
get: function get() {
4591
get: function get() {
4592
return DefaultType$5;
4603
$__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$2 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
4604
event.preventDefault();
4605
event.stopPropagation();
4607
Dropdown._jQueryInterface.call($__default["default"](this), 'toggle');
4608
}).on(EVENT_CLICK_DATA_API$2, SELECTOR_FORM_CHILD, function (e) {
4609
e.stopPropagation();
4615
$__default["default"].fn[NAME$6] = Dropdown._jQueryInterface;
4616
$__default["default"].fn[NAME$6].Constructor = Dropdown;
4618
$__default["default"].fn[NAME$6].noConflict = function () {
4619
$__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
4620
return Dropdown._jQueryInterface;
4627
var NAME$5 = 'modal';
4628
var VERSION$5 = '4.6.1';
4629
var DATA_KEY$5 = 'bs.modal';
4630
var EVENT_KEY$5 = "." + DATA_KEY$5;
4631
var DATA_API_KEY$2 = '.data-api';
4632
var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5];
4633
var ESCAPE_KEYCODE = 27;
4635
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
4636
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
4637
var CLASS_NAME_BACKDROP = 'modal-backdrop';
4638
var CLASS_NAME_OPEN = 'modal-open';
4639
var CLASS_NAME_FADE$4 = 'fade';
4640
var CLASS_NAME_SHOW$4 = 'show';
4641
var CLASS_NAME_STATIC = 'modal-static';
4642
var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
4643
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
4644
var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
4645
var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
4646
var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
4647
var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
4648
var EVENT_RESIZE = "resize" + EVENT_KEY$5;
4649
var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$5;
4650
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
4651
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
4652
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
4653
var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2;
4654
var SELECTOR_DIALOG = '.modal-dialog';
4655
var SELECTOR_MODAL_BODY = '.modal-body';
4656
var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="modal"]';
4657
var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="modal"]';
4658
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
4659
var SELECTOR_STICKY_CONTENT = '.sticky-top';
4666
var DefaultType$4 = {
4667
backdrop: '(boolean|string)',
4668
keyboard: 'boolean',
4676
var Modal = function () {
4677
function Modal(element, config) {
4678
this._config = this._getConfig(config);
4679
this._element = element;
4680
this._dialog = element.querySelector(SELECTOR_DIALOG);
4681
this._backdrop = null;
4682
this._isShown = false;
4683
this._isBodyOverflowing = false;
4684
this._ignoreBackdropClick = false;
4685
this._isTransitioning = false;
4686
this._scrollbarWidth = 0;
4690
var _proto = Modal.prototype;
4693
_proto.toggle = function toggle(relatedTarget) {
4694
return this._isShown ? this.hide() : this.show(relatedTarget);
4697
_proto.show = function show(relatedTarget) {
4700
if (this._isShown || this._isTransitioning) {
4704
var showEvent = $__default["default"].Event(EVENT_SHOW$2, {
4705
relatedTarget: relatedTarget
4707
$__default["default"](this._element).trigger(showEvent);
4709
if (showEvent.isDefaultPrevented()) {
4713
this._isShown = true;
4715
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
4716
this._isTransitioning = true;
4719
this._checkScrollbar();
4721
this._setScrollbar();
4723
this._adjustDialog();
4725
this._setEscapeEvent();
4727
this._setResizeEvent();
4729
$__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function (event) {
4730
return _this.hide(event);
4732
$__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
4733
$__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
4734
if ($__default["default"](event.target).is(_this._element)) {
4735
_this._ignoreBackdropClick = true;
4740
this._showBackdrop(function () {
4741
return _this._showElement(relatedTarget);
4745
_proto.hide = function hide(event) {
4749
event.preventDefault();
4752
if (!this._isShown || this._isTransitioning) {
4756
var hideEvent = $__default["default"].Event(EVENT_HIDE$2);
4757
$__default["default"](this._element).trigger(hideEvent);
4759
if (!this._isShown || hideEvent.isDefaultPrevented()) {
4763
this._isShown = false;
4764
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
4767
this._isTransitioning = true;
4770
this._setEscapeEvent();
4772
this._setResizeEvent();
4774
$__default["default"](document).off(EVENT_FOCUSIN);
4775
$__default["default"](this._element).removeClass(CLASS_NAME_SHOW$4);
4776
$__default["default"](this._element).off(EVENT_CLICK_DISMISS$1);
4777
$__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
4780
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4781
$__default["default"](this._element).one(Util.TRANSITION_END, function (event) {
4782
return _this2._hideModal(event);
4783
}).emulateTransitionEnd(transitionDuration);
4789
_proto.dispose = function dispose() {
4790
[window, this._element, this._dialog].forEach(function (htmlElement) {
4791
return $__default["default"](htmlElement).off(EVENT_KEY$5);
4799
$__default["default"](document).off(EVENT_FOCUSIN);
4800
$__default["default"].removeData(this._element, DATA_KEY$5);
4801
this._config = null;
4802
this._element = null;
4803
this._dialog = null;
4804
this._backdrop = null;
4805
this._isShown = null;
4806
this._isBodyOverflowing = null;
4807
this._ignoreBackdropClick = null;
4808
this._isTransitioning = null;
4809
this._scrollbarWidth = null;
4812
_proto.handleUpdate = function handleUpdate() {
4813
this._adjustDialog();
4817
_proto._getConfig = function _getConfig(config) {
4818
config = _extends$1({}, Default$4, config);
4819
Util.typeCheckConfig(NAME$5, config, DefaultType$4);
4823
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
4826
var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED);
4827
$__default["default"](this._element).trigger(hideEventPrevented);
4829
if (hideEventPrevented.isDefaultPrevented()) {
4833
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
4835
if (!isModalOverflowing) {
4836
this._element.style.overflowY = 'hidden';
4839
this._element.classList.add(CLASS_NAME_STATIC);
4841
var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
4842
$__default["default"](this._element).off(Util.TRANSITION_END);
4843
$__default["default"](this._element).one(Util.TRANSITION_END, function () {
4844
_this3._element.classList.remove(CLASS_NAME_STATIC);
4846
if (!isModalOverflowing) {
4847
$__default["default"](_this3._element).one(Util.TRANSITION_END, function () {
4848
_this3._element.style.overflowY = '';
4849
}).emulateTransitionEnd(_this3._element, modalTransitionDuration);
4851
}).emulateTransitionEnd(modalTransitionDuration);
4853
this._element.focus();
4856
_proto._showElement = function _showElement(relatedTarget) {
4859
var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4);
4860
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
4862
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
4864
document.body.appendChild(this._element);
4867
this._element.style.display = 'block';
4869
this._element.removeAttribute('aria-hidden');
4871
this._element.setAttribute('aria-modal', true);
4873
this._element.setAttribute('role', 'dialog');
4875
if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
4876
modalBody.scrollTop = 0;
4878
this._element.scrollTop = 0;
4882
Util.reflow(this._element);
4885
$__default["default"](this._element).addClass(CLASS_NAME_SHOW$4);
4887
if (this._config.focus) {
4888
this._enforceFocus();
4891
var shownEvent = $__default["default"].Event(EVENT_SHOWN$2, {
4892
relatedTarget: relatedTarget
4895
var transitionComplete = function transitionComplete() {
4896
if (_this4._config.focus) {
4897
_this4._element.focus();
4900
_this4._isTransitioning = false;
4901
$__default["default"](_this4._element).trigger(shownEvent);
4905
var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
4906
$__default["default"](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
4908
transitionComplete();
4912
_proto._enforceFocus = function _enforceFocus() {
4915
$__default["default"](document).off(EVENT_FOCUSIN)
4916
.on(EVENT_FOCUSIN, function (event) {
4917
if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) {
4918
_this5._element.focus();
4923
_proto._setEscapeEvent = function _setEscapeEvent() {
4926
if (this._isShown) {
4927
$__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
4928
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
4929
event.preventDefault();
4932
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
4933
_this6._triggerBackdropTransition();
4936
} else if (!this._isShown) {
4937
$__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS);
4941
_proto._setResizeEvent = function _setResizeEvent() {
4944
if (this._isShown) {
4945
$__default["default"](window).on(EVENT_RESIZE, function (event) {
4946
return _this7.handleUpdate(event);
4949
$__default["default"](window).off(EVENT_RESIZE);
4953
_proto._hideModal = function _hideModal() {
4956
this._element.style.display = 'none';
4958
this._element.setAttribute('aria-hidden', true);
4960
this._element.removeAttribute('aria-modal');
4962
this._element.removeAttribute('role');
4964
this._isTransitioning = false;
4966
this._showBackdrop(function () {
4967
$__default["default"](document.body).removeClass(CLASS_NAME_OPEN);
4969
_this8._resetAdjustments();
4971
_this8._resetScrollbar();
4973
$__default["default"](_this8._element).trigger(EVENT_HIDDEN$2);
4977
_proto._removeBackdrop = function _removeBackdrop() {
4978
if (this._backdrop) {
4979
$__default["default"](this._backdrop).remove();
4980
this._backdrop = null;
4984
_proto._showBackdrop = function _showBackdrop(callback) {
4987
var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4) ? CLASS_NAME_FADE$4 : '';
4989
if (this._isShown && this._config.backdrop) {
4990
this._backdrop = document.createElement('div');
4991
this._backdrop.className = CLASS_NAME_BACKDROP;
4994
this._backdrop.classList.add(animate);
4997
$__default["default"](this._backdrop).appendTo(document.body);
4998
$__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, function (event) {
4999
if (_this9._ignoreBackdropClick) {
5000
_this9._ignoreBackdropClick = false;
5004
if (event.target !== event.currentTarget) {
5008
if (_this9._config.backdrop === 'static') {
5009
_this9._triggerBackdropTransition();
5016
Util.reflow(this._backdrop);
5019
$__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW$4);
5030
var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
5031
$__default["default"](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
5032
} else if (!this._isShown && this._backdrop) {
5033
$__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW$4);
5035
var callbackRemove = function callbackRemove() {
5036
_this9._removeBackdrop();
5043
if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) {
5044
var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
5046
$__default["default"](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
5050
} else if (callback) {
5059
_proto._adjustDialog = function _adjustDialog() {
5060
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
5062
if (!this._isBodyOverflowing && isModalOverflowing) {
5063
this._element.style.paddingLeft = this._scrollbarWidth + "px";
5066
if (this._isBodyOverflowing && !isModalOverflowing) {
5067
this._element.style.paddingRight = this._scrollbarWidth + "px";
5071
_proto._resetAdjustments = function _resetAdjustments() {
5072
this._element.style.paddingLeft = '';
5073
this._element.style.paddingRight = '';
5076
_proto._checkScrollbar = function _checkScrollbar() {
5077
var rect = document.body.getBoundingClientRect();
5078
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
5079
this._scrollbarWidth = this._getScrollbarWidth();
5082
_proto._setScrollbar = function _setScrollbar() {
5085
if (this._isBodyOverflowing) {
5088
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
5089
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT));
5091
$__default["default"](fixedContent).each(function (index, element) {
5092
var actualPadding = element.style.paddingRight;
5093
var calculatedPadding = $__default["default"](element).css('padding-right');
5094
$__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
5097
$__default["default"](stickyContent).each(function (index, element) {
5098
var actualMargin = element.style.marginRight;
5099
var calculatedMargin = $__default["default"](element).css('margin-right');
5100
$__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
5103
var actualPadding = document.body.style.paddingRight;
5104
var calculatedPadding = $__default["default"](document.body).css('padding-right');
5105
$__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
5108
$__default["default"](document.body).addClass(CLASS_NAME_OPEN);
5111
_proto._resetScrollbar = function _resetScrollbar() {
5113
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
5114
$__default["default"](fixedContent).each(function (index, element) {
5115
var padding = $__default["default"](element).data('padding-right');
5116
$__default["default"](element).removeData('padding-right');
5117
element.style.paddingRight = padding ? padding : '';
5120
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
5121
$__default["default"](elements).each(function (index, element) {
5122
var margin = $__default["default"](element).data('margin-right');
5124
if (typeof margin !== 'undefined') {
5125
$__default["default"](element).css('margin-right', margin).removeData('margin-right');
5129
var padding = $__default["default"](document.body).data('padding-right');
5130
$__default["default"](document.body).removeData('padding-right');
5131
document.body.style.paddingRight = padding ? padding : '';
5134
_proto._getScrollbarWidth = function _getScrollbarWidth() {
5136
var scrollDiv = document.createElement('div');
5137
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
5138
document.body.appendChild(scrollDiv);
5139
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
5140
document.body.removeChild(scrollDiv);
5141
return scrollbarWidth;
5145
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
5146
return this.each(function () {
5147
var data = $__default["default"](this).data(DATA_KEY$5);
5149
var _config = _extends$1({}, Default$4, $__default["default"](this).data(), typeof config === 'object' && config ? config : {});
5152
data = new Modal(this, _config);
5153
$__default["default"](this).data(DATA_KEY$5, data);
5156
if (typeof config === 'string') {
5157
if (typeof data[config] === 'undefined') {
5158
throw new TypeError("No method named \"" + config + "\"");
5161
data[config](relatedTarget);
5162
} else if (_config.show) {
5163
data.show(relatedTarget);
5168
_createClass(Modal, null, [{
5170
get: function get() {
5175
get: function get() {
5187
$__default["default"](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
5191
var selector = Util.getSelectorFromElement(this);
5194
target = document.querySelector(selector);
5197
var config = $__default["default"](target).data(DATA_KEY$5) ? 'toggle' : _extends$1({}, $__default["default"](target).data(), $__default["default"](this).data());
5199
if (this.tagName === 'A' || this.tagName === 'AREA') {
5200
event.preventDefault();
5203
var $target = $__default["default"](target).one(EVENT_SHOW$2, function (showEvent) {
5204
if (showEvent.isDefaultPrevented()) {
5209
$target.one(EVENT_HIDDEN$2, function () {
5210
if ($__default["default"](_this11).is(':visible')) {
5216
Modal._jQueryInterface.call($__default["default"](target), config, this);
5222
$__default["default"].fn[NAME$5] = Modal._jQueryInterface;
5223
$__default["default"].fn[NAME$5].Constructor = Modal;
5225
$__default["default"].fn[NAME$5].noConflict = function () {
5226
$__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
5227
return Modal._jQueryInterface;
5236
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
5237
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
5238
var DefaultWhitelist = {
5240
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
5241
a: ['target', 'href', 'title', 'rel'],
5257
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
5277
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
5284
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
5286
function allowedAttribute(attr, allowedAttributeList) {
5287
var attrName = attr.nodeName.toLowerCase();
5289
if (allowedAttributeList.indexOf(attrName) !== -1) {
5290
if (uriAttrs.indexOf(attrName) !== -1) {
5291
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
5297
var regExp = allowedAttributeList.filter(function (attrRegex) {
5298
return attrRegex instanceof RegExp;
5301
for (var i = 0, len = regExp.length; i < len; i++) {
5302
if (regExp[i].test(attrName)) {
5310
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
5311
if (unsafeHtml.length === 0) {
5315
if (sanitizeFn && typeof sanitizeFn === 'function') {
5316
return sanitizeFn(unsafeHtml);
5319
var domParser = new window.DOMParser();
5320
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
5321
var whitelistKeys = Object.keys(whiteList);
5322
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
5324
var _loop = function _loop(i, len) {
5325
var el = elements[i];
5326
var elName = el.nodeName.toLowerCase();
5328
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
5329
el.parentNode.removeChild(el);
5333
var attributeList = [].slice.call(el.attributes);
5335
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
5336
attributeList.forEach(function (attr) {
5337
if (!allowedAttribute(attr, whitelistedAttributes)) {
5338
el.removeAttribute(attr.nodeName);
5343
for (var i = 0, len = elements.length; i < len; i++) {
5344
var _ret = _loop(i);
5346
if (_ret === "continue") continue;
5349
return createdDocument.body.innerHTML;
5356
var NAME$4 = 'tooltip';
5357
var VERSION$4 = '4.6.1';
5358
var DATA_KEY$4 = 'bs.tooltip';
5359
var EVENT_KEY$4 = "." + DATA_KEY$4;
5360
var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
5361
var CLASS_PREFIX$1 = 'bs-tooltip';
5362
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
5363
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
5364
var CLASS_NAME_FADE$3 = 'fade';
5365
var CLASS_NAME_SHOW$3 = 'show';
5366
var HOVER_STATE_SHOW = 'show';
5367
var HOVER_STATE_OUT = 'out';
5368
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
5369
var SELECTOR_ARROW = '.arrow';
5370
var TRIGGER_HOVER = 'hover';
5371
var TRIGGER_FOCUS = 'focus';
5372
var TRIGGER_CLICK = 'click';
5373
var TRIGGER_MANUAL = 'manual';
5374
var AttachmentMap = {
5383
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
5384
trigger: 'hover focus',
5392
fallbackPlacement: 'flip',
5393
boundary: 'scrollParent',
5397
whiteList: DefaultWhitelist,
5400
var DefaultType$3 = {
5401
animation: 'boolean',
5403
title: '(string|element|function)',
5405
delay: '(number|object)',
5407
selector: '(string|boolean)',
5408
placement: '(string|function)',
5409
offset: '(number|string|function)',
5410
container: '(string|element|boolean)',
5411
fallbackPlacement: '(string|array)',
5412
boundary: '(string|element)',
5413
customClass: '(string|function)',
5414
sanitize: 'boolean',
5415
sanitizeFn: '(null|function)',
5416
whiteList: 'object',
5417
popperConfig: '(null|object)'
5420
HIDE: "hide" + EVENT_KEY$4,
5421
HIDDEN: "hidden" + EVENT_KEY$4,
5422
SHOW: "show" + EVENT_KEY$4,
5423
SHOWN: "shown" + EVENT_KEY$4,
5424
INSERTED: "inserted" + EVENT_KEY$4,
5425
CLICK: "click" + EVENT_KEY$4,
5426
FOCUSIN: "focusin" + EVENT_KEY$4,
5427
FOCUSOUT: "focusout" + EVENT_KEY$4,
5428
MOUSEENTER: "mouseenter" + EVENT_KEY$4,
5429
MOUSELEAVE: "mouseleave" + EVENT_KEY$4
5435
var Tooltip = function () {
5436
function Tooltip(element, config) {
5437
if (typeof Popper$1 === 'undefined') {
5438
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
5442
this._isEnabled = true;
5444
this._hoverState = '';
5445
this._activeTrigger = {};
5446
this._popper = null;
5448
this.element = element;
5449
this.config = this._getConfig(config);
5452
this._setListeners();
5456
var _proto = Tooltip.prototype;
5459
_proto.enable = function enable() {
5460
this._isEnabled = true;
5463
_proto.disable = function disable() {
5464
this._isEnabled = false;
5467
_proto.toggleEnabled = function toggleEnabled() {
5468
this._isEnabled = !this._isEnabled;
5471
_proto.toggle = function toggle(event) {
5472
if (!this._isEnabled) {
5477
var dataKey = this.constructor.DATA_KEY;
5478
var context = $__default["default"](event.currentTarget).data(dataKey);
5481
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5482
$__default["default"](event.currentTarget).data(dataKey, context);
5485
context._activeTrigger.click = !context._activeTrigger.click;
5487
if (context._isWithActiveTrigger()) {
5488
context._enter(null, context);
5490
context._leave(null, context);
5493
if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW$3)) {
5494
this._leave(null, this);
5499
this._enter(null, this);
5503
_proto.dispose = function dispose() {
5504
clearTimeout(this._timeout);
5505
$__default["default"].removeData(this.element, this.constructor.DATA_KEY);
5506
$__default["default"](this.element).off(this.constructor.EVENT_KEY);
5507
$__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
5510
$__default["default"](this.tip).remove();
5513
this._isEnabled = null;
5514
this._timeout = null;
5515
this._hoverState = null;
5516
this._activeTrigger = null;
5519
this._popper.destroy();
5522
this._popper = null;
5523
this.element = null;
5528
_proto.show = function show() {
5531
if ($__default["default"](this.element).css('display') === 'none') {
5532
throw new Error('Please use show on visible elements');
5535
var showEvent = $__default["default"].Event(this.constructor.Event.SHOW);
5537
if (this.isWithContent() && this._isEnabled) {
5538
$__default["default"](this.element).trigger(showEvent);
5539
var shadowRoot = Util.findShadowRoot(this.element);
5540
var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
5542
if (showEvent.isDefaultPrevented() || !isInTheDom) {
5546
var tip = this.getTipElement();
5547
var tipId = Util.getUID(this.constructor.NAME);
5548
tip.setAttribute('id', tipId);
5549
this.element.setAttribute('aria-describedby', tipId);
5552
if (this.config.animation) {
5553
$__default["default"](tip).addClass(CLASS_NAME_FADE$3);
5556
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
5558
var attachment = this._getAttachment(placement);
5560
this.addAttachmentClass(attachment);
5562
var container = this._getContainer();
5564
$__default["default"](tip).data(this.constructor.DATA_KEY, this);
5566
if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) {
5567
$__default["default"](tip).appendTo(container);
5570
$__default["default"](this.element).trigger(this.constructor.Event.INSERTED);
5571
this._popper = new Popper$1(this.element, tip, this._getPopperConfig(attachment));
5572
$__default["default"](tip).addClass(CLASS_NAME_SHOW$3);
5573
$__default["default"](tip).addClass(this.config.customClass);
5578
if ('ontouchstart' in document.documentElement) {
5579
$__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop);
5582
var complete = function complete() {
5583
if (_this.config.animation) {
5584
_this._fixTransition();
5587
var prevHoverState = _this._hoverState;
5588
_this._hoverState = null;
5589
$__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN);
5591
if (prevHoverState === HOVER_STATE_OUT) {
5592
_this._leave(null, _this);
5596
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
5597
var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
5598
$__default["default"](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5605
_proto.hide = function hide(callback) {
5608
var tip = this.getTipElement();
5609
var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE);
5611
var complete = function complete() {
5612
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
5613
tip.parentNode.removeChild(tip);
5616
_this2._cleanTipClass();
5618
_this2.element.removeAttribute('aria-describedby');
5620
$__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
5622
if (_this2._popper !== null) {
5623
_this2._popper.destroy();
5631
$__default["default"](this.element).trigger(hideEvent);
5633
if (hideEvent.isDefaultPrevented()) {
5637
$__default["default"](tip).removeClass(CLASS_NAME_SHOW$3);
5640
if ('ontouchstart' in document.documentElement) {
5641
$__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop);
5644
this._activeTrigger[TRIGGER_CLICK] = false;
5645
this._activeTrigger[TRIGGER_FOCUS] = false;
5646
this._activeTrigger[TRIGGER_HOVER] = false;
5648
if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) {
5649
var transitionDuration = Util.getTransitionDurationFromElement(tip);
5650
$__default["default"](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
5655
this._hoverState = '';
5658
_proto.update = function update() {
5659
if (this._popper !== null) {
5660
this._popper.scheduleUpdate();
5665
_proto.isWithContent = function isWithContent() {
5666
return Boolean(this.getTitle());
5669
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
5670
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
5673
_proto.getTipElement = function getTipElement() {
5674
this.tip = this.tip || $__default["default"](this.config.template)[0];
5678
_proto.setContent = function setContent() {
5679
var tip = this.getTipElement();
5680
this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
5681
$__default["default"](tip).removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$3);
5684
_proto.setElementContent = function setElementContent($element, content) {
5685
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
5687
if (this.config.html) {
5688
if (!$__default["default"](content).parent().is($element)) {
5689
$element.empty().append(content);
5692
$element.text($__default["default"](content).text());
5698
if (this.config.html) {
5699
if (this.config.sanitize) {
5700
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
5703
$element.html(content);
5705
$element.text(content);
5709
_proto.getTitle = function getTitle() {
5710
var title = this.element.getAttribute('data-original-title');
5713
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
5720
_proto._getPopperConfig = function _getPopperConfig(attachment) {
5723
var defaultBsConfig = {
5724
placement: attachment,
5726
offset: this._getOffset(),
5728
behavior: this.config.fallbackPlacement
5731
element: SELECTOR_ARROW
5734
boundariesElement: this.config.boundary
5737
onCreate: function onCreate(data) {
5738
if (data.originalPlacement !== data.placement) {
5739
_this3._handlePopperPlacementChange(data);
5742
onUpdate: function onUpdate(data) {
5743
return _this3._handlePopperPlacementChange(data);
5746
return _extends$1({}, defaultBsConfig, this.config.popperConfig);
5749
_proto._getOffset = function _getOffset() {
5754
if (typeof this.config.offset === 'function') {
5755
offset.fn = function (data) {
5756
data.offsets = _extends$1({}, data.offsets, _this4.config.offset(data.offsets, _this4.element));
5760
offset.offset = this.config.offset;
5766
_proto._getContainer = function _getContainer() {
5767
if (this.config.container === false) {
5768
return document.body;
5771
if (Util.isElement(this.config.container)) {
5772
return $__default["default"](this.config.container);
5775
return $__default["default"](document).find(this.config.container);
5778
_proto._getAttachment = function _getAttachment(placement) {
5779
return AttachmentMap[placement.toUpperCase()];
5782
_proto._setListeners = function _setListeners() {
5785
var triggers = this.config.trigger.split(' ');
5786
triggers.forEach(function (trigger) {
5787
if (trigger === 'click') {
5788
$__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
5789
return _this5.toggle(event);
5791
} else if (trigger !== TRIGGER_MANUAL) {
5792
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
5793
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
5794
$__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) {
5795
return _this5._enter(event);
5796
}).on(eventOut, _this5.config.selector, function (event) {
5797
return _this5._leave(event);
5802
this._hideModalHandler = function () {
5803
if (_this5.element) {
5808
$__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
5810
if (this.config.selector) {
5811
this.config = _extends$1({}, this.config, {
5820
_proto._fixTitle = function _fixTitle() {
5821
var titleType = typeof this.element.getAttribute('data-original-title');
5823
if (this.element.getAttribute('title') || titleType !== 'string') {
5824
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
5825
this.element.setAttribute('title', '');
5829
_proto._enter = function _enter(event, context) {
5830
var dataKey = this.constructor.DATA_KEY;
5831
context = context || $__default["default"](event.currentTarget).data(dataKey);
5834
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5835
$__default["default"](event.currentTarget).data(dataKey, context);
5839
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
5842
if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
5843
context._hoverState = HOVER_STATE_SHOW;
5847
clearTimeout(context._timeout);
5848
context._hoverState = HOVER_STATE_SHOW;
5850
if (!context.config.delay || !context.config.delay.show) {
5855
context._timeout = setTimeout(function () {
5856
if (context._hoverState === HOVER_STATE_SHOW) {
5859
}, context.config.delay.show);
5862
_proto._leave = function _leave(event, context) {
5863
var dataKey = this.constructor.DATA_KEY;
5864
context = context || $__default["default"](event.currentTarget).data(dataKey);
5867
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
5868
$__default["default"](event.currentTarget).data(dataKey, context);
5872
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
5875
if (context._isWithActiveTrigger()) {
5879
clearTimeout(context._timeout);
5880
context._hoverState = HOVER_STATE_OUT;
5882
if (!context.config.delay || !context.config.delay.hide) {
5887
context._timeout = setTimeout(function () {
5888
if (context._hoverState === HOVER_STATE_OUT) {
5891
}, context.config.delay.hide);
5894
_proto._isWithActiveTrigger = function _isWithActiveTrigger() {
5895
for (var trigger in this._activeTrigger) {
5896
if (this._activeTrigger[trigger]) {
5904
_proto._getConfig = function _getConfig(config) {
5905
var dataAttributes = $__default["default"](this.element).data();
5906
Object.keys(dataAttributes).forEach(function (dataAttr) {
5907
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
5908
delete dataAttributes[dataAttr];
5911
config = _extends$1({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
5913
if (typeof config.delay === 'number') {
5920
if (typeof config.title === 'number') {
5921
config.title = config.title.toString();
5924
if (typeof config.content === 'number') {
5925
config.content = config.content.toString();
5928
Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
5930
if (config.sanitize) {
5931
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
5937
_proto._getDelegateConfig = function _getDelegateConfig() {
5941
for (var key in this.config) {
5942
if (this.constructor.Default[key] !== this.config[key]) {
5943
config[key] = this.config[key];
5951
_proto._cleanTipClass = function _cleanTipClass() {
5952
var $tip = $__default["default"](this.getTipElement());
5953
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
5955
if (tabClass !== null && tabClass.length) {
5956
$tip.removeClass(tabClass.join(''));
5960
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
5961
this.tip = popperData.instance.popper;
5963
this._cleanTipClass();
5965
this.addAttachmentClass(this._getAttachment(popperData.placement));
5968
_proto._fixTransition = function _fixTransition() {
5969
var tip = this.getTipElement();
5970
var initConfigAnimation = this.config.animation;
5972
if (tip.getAttribute('x-placement') !== null) {
5976
$__default["default"](tip).removeClass(CLASS_NAME_FADE$3);
5977
this.config.animation = false;
5980
this.config.animation = initConfigAnimation;
5984
Tooltip._jQueryInterface = function _jQueryInterface(config) {
5985
return this.each(function () {
5986
var $element = $__default["default"](this);
5987
var data = $element.data(DATA_KEY$4);
5989
var _config = typeof config === 'object' && config;
5991
if (!data && /dispose|hide/.test(config)) {
5996
data = new Tooltip(this, _config);
5997
$element.data(DATA_KEY$4, data);
6000
if (typeof config === 'string') {
6001
if (typeof data[config] === 'undefined') {
6002
throw new TypeError("No method named \"" + config + "\"");
6010
_createClass(Tooltip, null, [{
6012
get: function get() {
6017
get: function get() {
6022
get: function get() {
6027
get: function get() {
6032
get: function get() {
6037
get: function get() {
6042
get: function get() {
6043
return DefaultType$3;
6054
$__default["default"].fn[NAME$4] = Tooltip._jQueryInterface;
6055
$__default["default"].fn[NAME$4].Constructor = Tooltip;
6057
$__default["default"].fn[NAME$4].noConflict = function () {
6058
$__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
6059
return Tooltip._jQueryInterface;
6066
var NAME$3 = 'popover';
6067
var VERSION$3 = '4.6.1';
6068
var DATA_KEY$3 = 'bs.popover';
6069
var EVENT_KEY$3 = "." + DATA_KEY$3;
6070
var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
6071
var CLASS_PREFIX = 'bs-popover';
6072
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
6073
var CLASS_NAME_FADE$2 = 'fade';
6074
var CLASS_NAME_SHOW$2 = 'show';
6075
var SELECTOR_TITLE = '.popover-header';
6076
var SELECTOR_CONTENT = '.popover-body';
6078
var Default$2 = _extends$1({}, Tooltip.Default, {
6082
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
6085
var DefaultType$2 = _extends$1({}, Tooltip.DefaultType, {
6086
content: '(string|element|function)'
6090
HIDE: "hide" + EVENT_KEY$3,
6091
HIDDEN: "hidden" + EVENT_KEY$3,
6092
SHOW: "show" + EVENT_KEY$3,
6093
SHOWN: "shown" + EVENT_KEY$3,
6094
INSERTED: "inserted" + EVENT_KEY$3,
6095
CLICK: "click" + EVENT_KEY$3,
6096
FOCUSIN: "focusin" + EVENT_KEY$3,
6097
FOCUSOUT: "focusout" + EVENT_KEY$3,
6098
MOUSEENTER: "mouseenter" + EVENT_KEY$3,
6099
MOUSELEAVE: "mouseleave" + EVENT_KEY$3
6105
var Popover = function (_Tooltip) {
6106
_inheritsLoose(Popover, _Tooltip);
6108
function Popover() {
6109
return _Tooltip.apply(this, arguments) || this;
6112
var _proto = Popover.prototype;
6115
_proto.isWithContent = function isWithContent() {
6116
return this.getTitle() || this._getContent();
6119
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
6120
$__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
6123
_proto.getTipElement = function getTipElement() {
6124
this.tip = this.tip || $__default["default"](this.config.template)[0];
6128
_proto.setContent = function setContent() {
6129
var $tip = $__default["default"](this.getTipElement());
6131
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
6133
var content = this._getContent();
6135
if (typeof content === 'function') {
6136
content = content.call(this.element);
6139
this.setElementContent($tip.find(SELECTOR_CONTENT), content);
6140
$tip.removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$2);
6144
_proto._getContent = function _getContent() {
6145
return this.element.getAttribute('data-content') || this.config.content;
6148
_proto._cleanTipClass = function _cleanTipClass() {
6149
var $tip = $__default["default"](this.getTipElement());
6150
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
6152
if (tabClass !== null && tabClass.length > 0) {
6153
$tip.removeClass(tabClass.join(''));
6158
Popover._jQueryInterface = function _jQueryInterface(config) {
6159
return this.each(function () {
6160
var data = $__default["default"](this).data(DATA_KEY$3);
6162
var _config = typeof config === 'object' ? config : null;
6164
if (!data && /dispose|hide/.test(config)) {
6169
data = new Popover(this, _config);
6170
$__default["default"](this).data(DATA_KEY$3, data);
6173
if (typeof config === 'string') {
6174
if (typeof data[config] === 'undefined') {
6175
throw new TypeError("No method named \"" + config + "\"");
6183
_createClass(Popover, null, [{
6191
get: function get() {
6196
get: function get() {
6201
get: function get() {
6206
get: function get() {
6211
get: function get() {
6216
get: function get() {
6217
return DefaultType$2;
6228
$__default["default"].fn[NAME$3] = Popover._jQueryInterface;
6229
$__default["default"].fn[NAME$3].Constructor = Popover;
6231
$__default["default"].fn[NAME$3].noConflict = function () {
6232
$__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
6233
return Popover._jQueryInterface;
6240
var NAME$2 = 'scrollspy';
6241
var VERSION$2 = '4.6.1';
6242
var DATA_KEY$2 = 'bs.scrollspy';
6243
var EVENT_KEY$2 = "." + DATA_KEY$2;
6244
var DATA_API_KEY$1 = '.data-api';
6245
var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2];
6246
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
6247
var CLASS_NAME_ACTIVE$1 = 'active';
6248
var EVENT_ACTIVATE = "activate" + EVENT_KEY$2;
6249
var EVENT_SCROLL = "scroll" + EVENT_KEY$2;
6250
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1;
6251
var METHOD_OFFSET = 'offset';
6252
var METHOD_POSITION = 'position';
6253
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
6254
var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
6255
var SELECTOR_NAV_LINKS = '.nav-link';
6256
var SELECTOR_NAV_ITEMS = '.nav-item';
6257
var SELECTOR_LIST_ITEMS = '.list-group-item';
6258
var SELECTOR_DROPDOWN$1 = '.dropdown';
6259
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
6260
var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
6266
var DefaultType$1 = {
6269
target: '(string|element)'
6275
var ScrollSpy = function () {
6276
function ScrollSpy(element, config) {
6279
this._element = element;
6280
this._scrollElement = element.tagName === 'BODY' ? window : element;
6281
this._config = this._getConfig(config);
6282
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
6285
this._activeTarget = null;
6286
this._scrollHeight = 0;
6287
$__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) {
6288
return _this._process(event);
6296
var _proto = ScrollSpy.prototype;
6299
_proto.refresh = function refresh() {
6302
var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
6303
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
6304
var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
6307
this._scrollHeight = this._getScrollHeight();
6308
var targets = [].slice.call(document.querySelectorAll(this._selector));
6309
targets.map(function (element) {
6311
var targetSelector = Util.getSelectorFromElement(element);
6313
if (targetSelector) {
6314
target = document.querySelector(targetSelector);
6318
var targetBCR = target.getBoundingClientRect();
6320
if (targetBCR.width || targetBCR.height) {
6322
return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector];
6327
}).filter(function (item) {
6329
}).sort(function (a, b) {
6331
}).forEach(function (item) {
6332
_this2._offsets.push(item[0]);
6334
_this2._targets.push(item[1]);
6338
_proto.dispose = function dispose() {
6339
$__default["default"].removeData(this._element, DATA_KEY$2);
6340
$__default["default"](this._scrollElement).off(EVENT_KEY$2);
6341
this._element = null;
6342
this._scrollElement = null;
6343
this._config = null;
6344
this._selector = null;
6345
this._offsets = null;
6346
this._targets = null;
6347
this._activeTarget = null;
6348
this._scrollHeight = null;
6352
_proto._getConfig = function _getConfig(config) {
6353
config = _extends$1({}, Default$1, typeof config === 'object' && config ? config : {});
6355
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
6356
var id = $__default["default"](config.target).attr('id');
6359
id = Util.getUID(NAME$2);
6360
$__default["default"](config.target).attr('id', id);
6363
config.target = "#" + id;
6366
Util.typeCheckConfig(NAME$2, config, DefaultType$1);
6370
_proto._getScrollTop = function _getScrollTop() {
6371
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
6374
_proto._getScrollHeight = function _getScrollHeight() {
6375
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
6378
_proto._getOffsetHeight = function _getOffsetHeight() {
6379
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
6382
_proto._process = function _process() {
6383
var scrollTop = this._getScrollTop() + this._config.offset;
6385
var scrollHeight = this._getScrollHeight();
6387
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
6389
if (this._scrollHeight !== scrollHeight) {
6393
if (scrollTop >= maxScroll) {
6394
var target = this._targets[this._targets.length - 1];
6396
if (this._activeTarget !== target) {
6397
this._activate(target);
6403
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
6404
this._activeTarget = null;
6411
for (var i = this._offsets.length; i--;) {
6412
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
6414
if (isActiveTarget) {
6415
this._activate(this._targets[i]);
6420
_proto._activate = function _activate(target) {
6421
this._activeTarget = target;
6425
var queries = this._selector.split(',').map(function (selector) {
6426
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
6429
var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(','))));
6431
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
6432
$link.closest(SELECTOR_DROPDOWN$1).find(SELECTOR_DROPDOWN_TOGGLE$1).addClass(CLASS_NAME_ACTIVE$1);
6433
$link.addClass(CLASS_NAME_ACTIVE$1);
6436
$link.addClass(CLASS_NAME_ACTIVE$1);
6439
$link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$1);
6441
$link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$1);
6444
$__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, {
6445
relatedTarget: target
6449
_proto._clear = function _clear() {
6450
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
6451
return node.classList.contains(CLASS_NAME_ACTIVE$1);
6452
}).forEach(function (node) {
6453
return node.classList.remove(CLASS_NAME_ACTIVE$1);
6458
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
6459
return this.each(function () {
6460
var data = $__default["default"](this).data(DATA_KEY$2);
6462
var _config = typeof config === 'object' && config;
6465
data = new ScrollSpy(this, _config);
6466
$__default["default"](this).data(DATA_KEY$2, data);
6469
if (typeof config === 'string') {
6470
if (typeof data[config] === 'undefined') {
6471
throw new TypeError("No method named \"" + config + "\"");
6479
_createClass(ScrollSpy, null, [{
6481
get: function get() {
6486
get: function get() {
6498
$__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
6499
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
6500
var scrollSpysLength = scrollSpys.length;
6502
for (var i = scrollSpysLength; i--;) {
6503
var $spy = $__default["default"](scrollSpys[i]);
6505
ScrollSpy._jQueryInterface.call($spy, $spy.data());
6512
$__default["default"].fn[NAME$2] = ScrollSpy._jQueryInterface;
6513
$__default["default"].fn[NAME$2].Constructor = ScrollSpy;
6515
$__default["default"].fn[NAME$2].noConflict = function () {
6516
$__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
6517
return ScrollSpy._jQueryInterface;
6525
var VERSION$1 = '4.6.1';
6526
var DATA_KEY$1 = 'bs.tab';
6527
var EVENT_KEY$1 = "." + DATA_KEY$1;
6528
var DATA_API_KEY = '.data-api';
6529
var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1];
6530
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
6531
var CLASS_NAME_ACTIVE = 'active';
6532
var CLASS_NAME_DISABLED = 'disabled';
6533
var CLASS_NAME_FADE$1 = 'fade';
6534
var CLASS_NAME_SHOW$1 = 'show';
6535
var EVENT_HIDE$1 = "hide" + EVENT_KEY$1;
6536
var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1;
6537
var EVENT_SHOW$1 = "show" + EVENT_KEY$1;
6538
var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1;
6539
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY;
6540
var SELECTOR_DROPDOWN = '.dropdown';
6541
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
6542
var SELECTOR_ACTIVE = '.active';
6543
var SELECTOR_ACTIVE_UL = '> li > .active';
6544
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
6545
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
6546
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
6551
var Tab = function () {
6552
function Tab(element) {
6553
this._element = element;
6557
var _proto = Tab.prototype;
6560
_proto.show = function show() {
6563
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED)) {
6569
var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
6570
var selector = Util.getSelectorFromElement(this._element);
6573
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
6574
previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector));
6575
previous = previous[previous.length - 1];
6578
var hideEvent = $__default["default"].Event(EVENT_HIDE$1, {
6579
relatedTarget: this._element
6581
var showEvent = $__default["default"].Event(EVENT_SHOW$1, {
6582
relatedTarget: previous
6586
$__default["default"](previous).trigger(hideEvent);
6589
$__default["default"](this._element).trigger(showEvent);
6591
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
6596
target = document.querySelector(selector);
6599
this._activate(this._element, listElement);
6601
var complete = function complete() {
6602
var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN$1, {
6603
relatedTarget: _this._element
6605
var shownEvent = $__default["default"].Event(EVENT_SHOWN$1, {
6606
relatedTarget: previous
6608
$__default["default"](previous).trigger(hiddenEvent);
6609
$__default["default"](_this._element).trigger(shownEvent);
6613
this._activate(target, target.parentNode, complete);
6619
_proto.dispose = function dispose() {
6620
$__default["default"].removeData(this._element, DATA_KEY$1);
6621
this._element = null;
6625
_proto._activate = function _activate(element, container, callback) {
6628
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE);
6629
var active = activeElements[0];
6630
var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE$1);
6632
var complete = function complete() {
6633
return _this2._transitionComplete(element, active, callback);
6636
if (active && isTransitioning) {
6637
var transitionDuration = Util.getTransitionDurationFromElement(active);
6638
$__default["default"](active).removeClass(CLASS_NAME_SHOW$1).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6644
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
6646
$__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
6647
var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
6649
if (dropdownChild) {
6650
$__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
6653
if (active.getAttribute('role') === 'tab') {
6654
active.setAttribute('aria-selected', false);
6658
$__default["default"](element).addClass(CLASS_NAME_ACTIVE);
6660
if (element.getAttribute('role') === 'tab') {
6661
element.setAttribute('aria-selected', true);
6664
Util.reflow(element);
6666
if (element.classList.contains(CLASS_NAME_FADE$1)) {
6667
element.classList.add(CLASS_NAME_SHOW$1);
6670
var parent = element.parentNode;
6672
if (parent && parent.nodeName === 'LI') {
6673
parent = parent.parentNode;
6676
if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
6677
var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0];
6679
if (dropdownElement) {
6680
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
6681
$__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
6684
element.setAttribute('aria-expanded', true);
6693
Tab._jQueryInterface = function _jQueryInterface(config) {
6694
return this.each(function () {
6695
var $this = $__default["default"](this);
6696
var data = $this.data(DATA_KEY$1);
6699
data = new Tab(this);
6700
$this.data(DATA_KEY$1, data);
6703
if (typeof config === 'string') {
6704
if (typeof data[config] === 'undefined') {
6705
throw new TypeError("No method named \"" + config + "\"");
6713
_createClass(Tab, null, [{
6715
get: function get() {
6727
$__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
6728
event.preventDefault();
6730
Tab._jQueryInterface.call($__default["default"](this), 'show');
6736
$__default["default"].fn[NAME$1] = Tab._jQueryInterface;
6737
$__default["default"].fn[NAME$1].Constructor = Tab;
6739
$__default["default"].fn[NAME$1].noConflict = function () {
6740
$__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
6741
return Tab._jQueryInterface;
6749
var VERSION = '4.6.1';
6750
var DATA_KEY = 'bs.toast';
6751
var EVENT_KEY = "." + DATA_KEY;
6752
var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
6753
var CLASS_NAME_FADE = 'fade';
6754
var CLASS_NAME_HIDE = 'hide';
6755
var CLASS_NAME_SHOW = 'show';
6756
var CLASS_NAME_SHOWING = 'showing';
6757
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
6758
var EVENT_HIDE = "hide" + EVENT_KEY;
6759
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
6760
var EVENT_SHOW = "show" + EVENT_KEY;
6761
var EVENT_SHOWN = "shown" + EVENT_KEY;
6762
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
6769
animation: 'boolean',
6770
autohide: 'boolean',
6777
var Toast = function () {
6778
function Toast(element, config) {
6779
this._element = element;
6780
this._config = this._getConfig(config);
6781
this._timeout = null;
6783
this._setListeners();
6787
var _proto = Toast.prototype;
6790
_proto.show = function show() {
6793
var showEvent = $__default["default"].Event(EVENT_SHOW);
6794
$__default["default"](this._element).trigger(showEvent);
6796
if (showEvent.isDefaultPrevented()) {
6800
this._clearTimeout();
6802
if (this._config.animation) {
6803
this._element.classList.add(CLASS_NAME_FADE);
6806
var complete = function complete() {
6807
_this._element.classList.remove(CLASS_NAME_SHOWING);
6809
_this._element.classList.add(CLASS_NAME_SHOW);
6811
$__default["default"](_this._element).trigger(EVENT_SHOWN);
6813
if (_this._config.autohide) {
6814
_this._timeout = setTimeout(function () {
6816
}, _this._config.delay);
6820
this._element.classList.remove(CLASS_NAME_HIDE);
6822
Util.reflow(this._element);
6824
this._element.classList.add(CLASS_NAME_SHOWING);
6826
if (this._config.animation) {
6827
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
6828
$__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6834
_proto.hide = function hide() {
6835
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
6839
var hideEvent = $__default["default"].Event(EVENT_HIDE);
6840
$__default["default"](this._element).trigger(hideEvent);
6842
if (hideEvent.isDefaultPrevented()) {
6849
_proto.dispose = function dispose() {
6850
this._clearTimeout();
6852
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
6853
this._element.classList.remove(CLASS_NAME_SHOW);
6856
$__default["default"](this._element).off(EVENT_CLICK_DISMISS);
6857
$__default["default"].removeData(this._element, DATA_KEY);
6858
this._element = null;
6859
this._config = null;
6863
_proto._getConfig = function _getConfig(config) {
6864
config = _extends$1({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {});
6865
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
6869
_proto._setListeners = function _setListeners() {
6872
$__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
6873
return _this2.hide();
6877
_proto._close = function _close() {
6880
var complete = function complete() {
6881
_this3._element.classList.add(CLASS_NAME_HIDE);
6883
$__default["default"](_this3._element).trigger(EVENT_HIDDEN);
6886
this._element.classList.remove(CLASS_NAME_SHOW);
6888
if (this._config.animation) {
6889
var transitionDuration = Util.getTransitionDurationFromElement(this._element);
6890
$__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
6896
_proto._clearTimeout = function _clearTimeout() {
6897
clearTimeout(this._timeout);
6898
this._timeout = null;
6902
Toast._jQueryInterface = function _jQueryInterface(config) {
6903
return this.each(function () {
6904
var $element = $__default["default"](this);
6905
var data = $element.data(DATA_KEY);
6907
var _config = typeof config === 'object' && config;
6910
data = new Toast(this, _config);
6911
$element.data(DATA_KEY, data);
6914
if (typeof config === 'string') {
6915
if (typeof data[config] === 'undefined') {
6916
throw new TypeError("No method named \"" + config + "\"");
6924
_createClass(Toast, null, [{
6926
get: function get() {
6931
get: function get() {
6936
get: function get() {
6948
$__default["default"].fn[NAME] = Toast._jQueryInterface;
6949
$__default["default"].fn[NAME].Constructor = Toast;
6951
$__default["default"].fn[NAME].noConflict = function () {
6952
$__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
6953
return Toast._jQueryInterface;
6956
exports.Alert = Alert;
6957
exports.Button = Button;
6958
exports.Carousel = Carousel;
6959
exports.Collapse = Collapse;
6960
exports.Dropdown = Dropdown;
6961
exports.Modal = Modal;
6962
exports.Popover = Popover;
6963
exports.Scrollspy = ScrollSpy;
6965
exports.Toast = Toast;
6966
exports.Tooltip = Tooltip;
6967
exports.Util = Util;
6969
Object.defineProperty(exports, '__esModule', { value: true });