aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js')
-rw-r--r--vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js210
1 files changed, 100 insertions, 110 deletions
diff --git a/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js b/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
index d9236dace..483657a33 100644
--- a/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
+++ b/vendor/twbs/bootstrap/dist/js/bootstrap.bundle.js
@@ -1,12 +1,12 @@
/*!
- * Bootstrap v4.5.0 (https://getbootstrap.com/)
+ * Bootstrap v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
- (global = global || self, factory(global.bootstrap = {}, global.jQuery));
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery));
}(this, (function (exports, $) { 'use strict';
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
@@ -27,53 +27,22 @@
return Constructor;
}
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
+ function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
- return obj;
- }
-
- function ownKeys(object, enumerableOnly) {
- var keys = Object.keys(object);
-
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(object);
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
- });
- keys.push.apply(keys, symbols);
- }
-
- return keys;
- }
-
- function _objectSpread2(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
-
- if (i % 2) {
- ownKeys(Object(source), true).forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
- } else if (Object.getOwnPropertyDescriptors) {
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
- } else {
- ownKeys(Object(source)).forEach(function (key) {
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
- });
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
}
- }
- return target;
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
@@ -84,8 +53,8 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.0): util.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v4.5.2): util.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
@@ -265,7 +234,7 @@
*/
var NAME = 'alert';
- var VERSION = '4.5.0';
+ var VERSION = '4.5.2';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -421,7 +390,7 @@
*/
var NAME$1 = 'button';
- var VERSION$1 = '4.5.0';
+ var VERSION$1 = '4.5.2';
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
@@ -556,11 +525,9 @@
return;
}
- if (initialButton.tagName === 'LABEL' && inputBtn && inputBtn.type === 'checkbox') {
- event.preventDefault(); // work around event sent to label and input
+ if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') {
+ Button._jQueryInterface.call($(button), 'toggle');
}
-
- Button._jQueryInterface.call($(button), 'toggle');
}
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = $(event.target).closest(SELECTOR_BUTTON)[0];
@@ -616,7 +583,7 @@
*/
var NAME$2 = 'carousel';
- var VERSION$2 = '4.5.0';
+ var VERSION$2 = '4.5.2';
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
@@ -803,7 +770,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2({}, Default), config);
+ config = _extends({}, Default, config);
Util.typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@@ -1093,10 +1060,10 @@
return this.each(function () {
var data = $(this).data(DATA_KEY$2);
- var _config = _objectSpread2(_objectSpread2({}, Default), $(this).data());
+ var _config = _extends({}, Default, $(this).data());
if (typeof config === 'object') {
- _config = _objectSpread2(_objectSpread2({}, _config), config);
+ _config = _extends({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
@@ -1134,7 +1101,7 @@
return;
}
- var config = _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
+ var config = _extends({}, $(target).data(), $(this).data());
var slideIndex = this.getAttribute('data-slide-to');
@@ -1203,7 +1170,7 @@
*/
var NAME$3 = 'collapse';
- var VERSION$3 = '4.5.0';
+ var VERSION$3 = '4.5.2';
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
@@ -1418,7 +1385,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2({}, Default$1), config);
+ config = _extends({}, Default$1, config);
config.toggle = Boolean(config.toggle); // Coerce string values
Util.typeCheckConfig(NAME$3, config, DefaultType$1);
@@ -1472,7 +1439,7 @@
var $this = $(this);
var data = $this.data(DATA_KEY$3);
- var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$1), $this.data()), typeof config === 'object' && config ? config : {});
+ var _config = _extends({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
_config.toggle = false;
@@ -1547,7 +1514,7 @@
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
- * @version 1.16.0
+ * @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
@@ -1893,7 +1860,7 @@
var sideA = axis === 'x' ? 'Left' : 'Top';
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
- return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
+ return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
}
function getSize(axis, body, html, computedStyle) {
@@ -1954,7 +1921,7 @@
return obj;
};
- var _extends = Object.assign || function (target) {
+ var _extends$1 = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
@@ -1976,7 +1943,7 @@
* @returns {Object} ClientRect like output
*/
function getClientRect(offsets) {
- return _extends({}, offsets, {
+ return _extends$1({}, offsets, {
right: offsets.left + offsets.width,
bottom: offsets.top + offsets.height
});
@@ -2048,8 +2015,8 @@
var scrollParent = getScrollParent(children);
var styles = getStyleComputedProperty(parent);
- var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
- var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
+ var borderTopWidth = parseFloat(styles.borderTopWidth);
+ var borderLeftWidth = parseFloat(styles.borderLeftWidth);
// In cases where the parent is fixed, we must ignore negative scroll in offset calc
if (fixedPosition && isHTML) {
@@ -2070,8 +2037,8 @@
// differently when margins are applied to it. The margins are included in
// the box of the documentElement, in the other cases not.
if (!isIE10 && isHTML) {
- var marginTop = parseFloat(styles.marginTop, 10);
- var marginLeft = parseFloat(styles.marginLeft, 10);
+ var marginTop = parseFloat(styles.marginTop);
+ var marginLeft = parseFloat(styles.marginLeft);
offsets.top -= borderTopWidth - marginTop;
offsets.bottom -= borderTopWidth - marginTop;
@@ -2264,7 +2231,7 @@
};
var sortedAreas = Object.keys(rects).map(function (key) {
- return _extends({
+ return _extends$1({
key: key
}, rects[key], {
area: getArea(rects[key])
@@ -2906,9 +2873,9 @@
};
// Update `data` attributes, styles and arrowStyles
- data.attributes = _extends({}, attributes, data.attributes);
- data.styles = _extends({}, styles, data.styles);
- data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
+ data.attributes = _extends$1({}, attributes, data.attributes);
+ data.styles = _extends$1({}, styles, data.styles);
+ data.arrowStyles = _extends$1({}, data.offsets.arrow, data.arrowStyles);
return data;
}
@@ -3010,8 +2977,8 @@
// Compute the sideValue using the updated popper offsets
// take popper margin in account because we don't have this info available
var css = getStyleComputedProperty(data.instance.popper);
- var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
- var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
+ var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
+ var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
// prevent arrowElement from being placed not contiguously to its popper
@@ -3188,7 +3155,7 @@
// this object contains `position`, we want to preserve it along with
// any additional property we may add in the future
- data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
+ data.offsets.popper = _extends$1({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
data = runModifiers(data.instance.modifiers, data, 'flip');
}
@@ -3462,7 +3429,7 @@
order.forEach(function (placement) {
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
- popper = _extends({}, popper, check[side](placement));
+ popper = _extends$1({}, popper, check[side](placement));
});
data.offsets.popper = popper;
@@ -3497,7 +3464,7 @@
end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
};
- data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
+ data.offsets.popper = _extends$1({}, popper, shiftOffsets[shiftvariation]);
}
return data;
@@ -4029,7 +3996,7 @@
this.update = debounce(this.update.bind(this));
// with {} we create a new object with the options inside it
- this.options = _extends({}, Popper.Defaults, options);
+ this.options = _extends$1({}, Popper.Defaults, options);
// init state
this.state = {
@@ -4044,13 +4011,13 @@
// Deep merge modifiers options
this.options.modifiers = {};
- Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
- _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
+ Object.keys(_extends$1({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
+ _this.options.modifiers[name] = _extends$1({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
});
// Refactoring modifiers' list (Object => Array)
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
- return _extends({
+ return _extends$1({
name: name
}, _this.options.modifiers[name]);
})
@@ -4166,7 +4133,7 @@
*/
var NAME$4 = 'dropdown';
- var VERSION$4 = '4.5.0';
+ var VERSION$4 = '4.5.2';
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
@@ -4393,7 +4360,7 @@
};
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), $(this._element).data()), config);
+ config = _extends({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
return config;
};
@@ -4438,7 +4405,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
+ data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
@@ -4468,7 +4435,7 @@
};
}
- return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig);
+ return _extends({}, popperConfig, this._config.popperConfig);
} // Static
;
@@ -4680,7 +4647,7 @@
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.5.0';
+ var VERSION$5 = '4.5.2';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
@@ -4872,7 +4839,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2({}, Default$3), config);
+ config = _extends({}, Default$3, config);
Util.typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
@@ -4888,11 +4855,24 @@
return;
}
+ var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+
+ if (!isModalOverflowing) {
+ this._element.style.overflowY = 'hidden';
+ }
+
this._element.classList.add(CLASS_NAME_STATIC);
- var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element);
+ var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
+ $(this._element).off(Util.TRANSITION_END);
$(this._element).one(Util.TRANSITION_END, function () {
_this3._element.classList.remove(CLASS_NAME_STATIC);
+
+ if (!isModalOverflowing) {
+ $(_this3._element).one(Util.TRANSITION_END, function () {
+ _this3._element.style.overflowY = '';
+ }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
+ }
}).emulateTransitionEnd(modalTransitionDuration);
this._element.focus();
@@ -4918,6 +4898,8 @@
this._element.setAttribute('aria-modal', true);
+ this._element.setAttribute('role', 'dialog');
+
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0;
} else {
@@ -5005,6 +4987,8 @@
this._element.removeAttribute('aria-modal');
+ this._element.removeAttribute('role');
+
this._isTransitioning = false;
this._showBackdrop(function () {
@@ -5186,7 +5170,7 @@
return this.each(function () {
var data = $(this).data(DATA_KEY$5);
- var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$3), $(this).data()), typeof config === 'object' && config ? config : {});
+ var _config = _extends({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
@@ -5236,7 +5220,7 @@
target = document.querySelector(selector);
}
- var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread2(_objectSpread2({}, $(target).data()), $(this).data());
+ var config = $(target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
@@ -5273,8 +5257,8 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.0): tools/sanitizer.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v4.5.2): tools/sanitizer.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
@@ -5399,7 +5383,7 @@
*/
var NAME$6 = 'tooltip';
- var VERSION$6 = '4.5.0';
+ var VERSION$6 = '4.5.2';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
@@ -5787,7 +5771,7 @@
return _this3._handlePopperPlacementChange(data);
}
};
- return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig);
+ return _extends({}, defaultBsConfig, this.config.popperConfig);
};
_proto._getOffset = function _getOffset() {
@@ -5797,7 +5781,7 @@
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
+ data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
return data;
};
} else {
@@ -5852,7 +5836,7 @@
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
if (this.config.selector) {
- this.config = _objectSpread2(_objectSpread2({}, this.config), {}, {
+ this.config = _extends({}, this.config, {
trigger: 'manual',
selector: ''
});
@@ -5952,7 +5936,7 @@
delete dataAttributes[dataAttr];
}
});
- config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
+ config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -6111,21 +6095,21 @@
*/
var NAME$7 = 'popover';
- var VERSION$7 = '4.5.0';
+ var VERSION$7 = '4.5.2';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
- var Default$5 = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, {
+ var Default$5 = _extends({}, Tooltip.Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
- var DefaultType$5 = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, {
+ var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
content: '(string|element|function)'
});
@@ -6291,7 +6275,7 @@
*/
var NAME$8 = 'scrollspy';
- var VERSION$8 = '4.5.0';
+ var VERSION$8 = '4.5.2';
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
@@ -6405,7 +6389,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2({}, Default$6), typeof config === 'object' && config ? config : {});
+ config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
var id = $(config.target).attr('id');
@@ -6583,7 +6567,7 @@
*/
var NAME$9 = 'tab';
- var VERSION$9 = '4.5.0';
+ var VERSION$9 = '4.5.2';
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
@@ -6809,7 +6793,7 @@
*/
var NAME$a = 'toast';
- var VERSION$a = '4.5.0';
+ var VERSION$a = '4.5.2';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
@@ -6862,6 +6846,8 @@
return;
}
+ this._clearTimeout();
+
if (this._config.animation) {
this._element.classList.add(CLASS_NAME_FADE$5);
}
@@ -6910,8 +6896,7 @@
};
_proto.dispose = function dispose() {
- clearTimeout(this._timeout);
- this._timeout = null;
+ this._clearTimeout();
if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
this._element.classList.remove(CLASS_NAME_SHOW$7);
@@ -6925,7 +6910,7 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$7), $(this._element).data()), typeof config === 'object' && config ? config : {});
+ config = _extends({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
@@ -6955,6 +6940,11 @@
} else {
complete();
}
+ };
+
+ _proto._clearTimeout = function _clearTimeout() {
+ clearTimeout(this._timeout);
+ this._timeout = null;
} // Static
;